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, 2020 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, 2020 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
35 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
36 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
37 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
38 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
39 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
40 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
43 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
60 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
61 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
62 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
63 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
64 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
65 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
66 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
67 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
68 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
69 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
70 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
71 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
72 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
74 ;;; This file is part of GNU Guix.
76 ;;; GNU Guix is free software; you can redistribute it and/or modify it
77 ;;; under the terms of the GNU General Public License as published by
78 ;;; the Free Software Foundation; either version 3 of the License, or (at
79 ;;; your option) any later version.
81 ;;; GNU Guix is distributed in the hope that it will be useful, but
82 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
83 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84 ;;; GNU General Public License for more details.
86 ;;; You should have received a copy of the GNU General Public License
87 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
89 (define-module (gnu packages python-xyz)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (gnu packages)
92 #:use-module (gnu packages algebra)
93 #:use-module (gnu packages adns)
94 #:use-module (gnu packages attr)
95 #:use-module (gnu packages backup)
96 #:use-module (gnu packages bash)
97 #:use-module (gnu packages check)
98 #:use-module (gnu packages compression)
99 #:use-module (gnu packages crypto)
100 #:use-module (gnu packages databases)
101 #:use-module (gnu packages dbm)
102 #:use-module (gnu packages enchant)
103 #:use-module (gnu packages file)
104 #:use-module (gnu packages fontutils)
105 #:use-module (gnu packages gcc)
106 #:use-module (gnu packages geo)
107 #:use-module (gnu packages ghostscript)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages glib)
110 #:use-module (gnu packages gnome)
111 #:use-module (gnu packages graphviz)
112 #:use-module (gnu packages graphics)
113 #:use-module (gnu packages gstreamer)
114 #:use-module (gnu packages gtk)
115 #:use-module (gnu packages icu4c)
116 #:use-module (gnu packages image)
117 #:use-module (gnu packages imagemagick)
118 #:use-module (gnu packages kerberos)
119 #:use-module (gnu packages libevent)
120 #:use-module (gnu packages libffi)
121 #:use-module (gnu packages linux)
122 #:use-module (gnu packages llvm)
123 #:use-module (gnu packages man)
124 #:use-module (gnu packages maths)
125 #:use-module (gnu packages monitoring)
126 #:use-module (gnu packages multiprecision)
127 #:use-module (gnu packages networking)
128 #:use-module (gnu packages ncurses)
129 #:use-module (gnu packages openstack)
130 #:use-module (gnu packages pcre)
131 #:use-module (gnu packages perl)
132 #:use-module (gnu packages photo)
133 #:use-module (gnu packages pkg-config)
134 #:use-module (gnu packages python)
135 #:use-module (gnu packages python-check)
136 #:use-module (gnu packages python-compression)
137 #:use-module (gnu packages python-crypto)
138 #:use-module (gnu packages python-science)
139 #:use-module (gnu packages python-web)
140 #:use-module (gnu packages qt)
141 #:use-module (gnu packages readline)
142 #:use-module (gnu packages sdl)
143 #:use-module (gnu packages search)
144 #:use-module (gnu packages shells)
145 #:use-module (gnu packages sphinx)
146 #:use-module (gnu packages ssh)
147 #:use-module (gnu packages terminals)
148 #:use-module (gnu packages tex)
149 #:use-module (gnu packages texinfo)
150 #:use-module (gnu packages time)
151 #:use-module (gnu packages tls)
152 #:use-module (gnu packages version-control)
153 #:use-module (gnu packages video)
154 #:use-module (gnu packages web)
155 #:use-module (gnu packages base)
156 #:use-module (gnu packages xml)
157 #:use-module (gnu packages xorg)
158 #:use-module (gnu packages xdisorg)
159 #:use-module (gnu packages tcl)
160 #:use-module (gnu packages bdw-gc)
161 #:use-module (gnu packages serialization)
162 #:use-module (guix packages)
163 #:use-module (guix download)
164 #:use-module (guix git-download)
165 #:use-module (guix hg-download)
166 #:use-module (guix utils)
167 #:use-module (guix build-system gnu)
168 #:use-module (guix build-system cmake)
169 #:use-module (guix build-system python)
170 #:use-module (guix build-system trivial)
171 #:use-module (srfi srfi-1)
172 #:use-module (srfi srfi-26))
174 (define-public python-tenacity
176 (name "python-tenacity")
180 (uri (pypi-uri "tenacity" version))
183 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
184 (build-system python-build-system)
186 `(("python-setuptools-scm" ,python-setuptools-scm)
187 ("python-sphinx" ,python-sphinx)
188 ("python-tornado" ,python-tornado)
189 ("python-pytest" ,python-pytest)))
191 `(("python-six" ,python-six)))
193 `(#:phases (modify-phases %standard-phases
198 (home-page "https://github.com/jd/tenacity")
199 (synopsis "Retrying library for python")
200 (description "Tenacity is a general-purpose python library to simplify the
201 task of adding retry behavior to just about anything.")
202 (license license:asl2.0)))
204 (define-public python-colorlog
206 (name "python-colorlog")
210 (uri (pypi-uri "colorlog" version))
213 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
214 (build-system python-build-system)
216 `(("python-pytest" ,python-pytest)))
218 `(#:phases (modify-phases %standard-phases
221 ;; Extend PYTHONPATH so the built package will be found.
223 (string-append (getcwd) "/build/lib:"
224 (getenv "PYTHONPATH")))
225 (invoke "pytest" "-p" "no:logging")
227 (home-page "https://github.com/borntyping/python-colorlog")
228 (synopsis "Log formatting with colors for python")
229 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
230 with Python's logging module that outputs records using terminal colors.")
231 (license license:expat)))
233 (define-public python-pyprind
235 (name "python-pyprind")
239 (uri (pypi-uri "PyPrind" version))
242 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
243 (build-system python-build-system)
245 `(("python-psutil" ,python-psutil)))
246 (home-page "https://github.com/rasbt/pyprind")
247 (synopsis "Python Progress Bar and Percent Indicator Utility")
248 (description "The PyPrind (Python Progress Indicator) module provides a
249 progress bar and a percentage indicator object that let you track the progress
250 of a loop structure or other iterative computation.")
251 (license license:bsd-3)))
253 (define-public python-gphoto2
255 (name "python-gphoto2")
259 (uri (pypi-uri "gphoto2" version))
262 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
263 (build-system python-build-system)
265 `(("pkg-config" ,pkg-config)))
267 `(("libgphoto2" ,libgphoto2)))
268 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
269 (synopsis "Python interface to libgphoto2")
270 (description "@code{python-gphoto2} is a comprehensive Python interface
271 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
272 automatically generate the interface code.")
273 (license license:gpl3+)))
275 (define-public python-colour
277 (name "python-colour")
281 (uri (pypi-uri "colour" version))
284 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
285 (build-system python-build-system)
287 `(("python-d2to1" ,python-d2to1)))
288 (home-page "https://github.com/vaab/colour")
289 (synopsis "Convert and manipulate various color representations")
290 (description "Pythonic way to manipulate color representations (HSL, RVB,
292 (license license:expat)))
294 (define-public python-d2to1
296 (name "python-d2to1")
297 (version "0.2.12.post1")
300 (uri (pypi-uri "d2to1" version))
303 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
304 (build-system python-build-system)
306 `(("python-nose" ,python-nose)))
307 (home-page "https://github.com/embray/d2to1")
308 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
310 (description "The python package d2to1 (the d is for distutils) allows
311 using distutils2-like setup.cfg files for a package's metadata with a
312 distribute/setuptools setup.py script.")
313 (license license:bsd-2)))
315 (define-public python-rawkit
317 (name "python-rawkit")
321 (uri (pypi-uri "rawkit" version))
324 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
325 (build-system python-build-system)
327 `(("python-pytest" ,python-pytest)
328 ("python-mock" ,python-mock)))
330 `(("libraw" ,libraw)))
331 (home-page "https://rawkit.readthedocs.io")
332 (synopsis "Ctypes-based LibRaw binding for Python")
333 (description "The rawkit package provides two modules: rawkit and libraw.
334 The rawkit module provides a high-level Pythonic interface for developing raw
335 photos, while the libraw module provides a CTypes based interface for
336 interacting with the low-level LibRaw C APIs.")
337 (license license:expat)))
339 (define-public python-easygui
341 (name "python-easygui")
345 (uri (pypi-uri "easygui" version))
348 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
349 (build-system python-build-system)
351 `(("python-tkinter" ,python "tk")))
352 (home-page "https://github.com/robertlugg/easygui")
353 (synopsis "GUI programming module for Python")
354 (description "EasyGUI is a module for very simple, very easy GUI
355 programming in Python. EasyGUI is different from other GUI generators in that
356 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
357 simple function calls.")
358 (license license:bsd-3)))
360 (define-public python-pymediainfo
362 (name "python-pymediainfo")
367 (uri (pypi-uri "pymediainfo" version))
370 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
371 (build-system python-build-system)
373 `(("python-setuptools-scm" ,python-setuptools-scm)
374 ("python-pytest" ,python-pytest)))
376 `(("libmediainfo" ,libmediainfo)))
379 (modify-phases %standard-phases
380 (add-after 'unpack 'patch-libmediainfo
382 (substitute* "pymediainfo/__init__.py"
383 (("libmediainfo.so.0")
384 (string-append (assoc-ref %build-inputs "libmediainfo")
385 "/lib/libmediainfo.so.0")))
389 ;; Extend PYTHONPATH so the built package will be found.
391 (string-append (getcwd) "/build/lib:"
392 (getenv "PYTHONPATH")))
393 ;; Skip the only failing test "test_parse_url"
394 (invoke "pytest" "-vv" "-k" "not test_parse_url")
397 "https://github.com/sbraz/pymediainfo")
399 "Python wrapper for the mediainfo library")
401 "Python wrapper for the mediainfo library to access the technical and tag
402 data for video and audio files.")
403 (license license:expat)))
405 (define-public python-psutil
407 (name "python-psutil")
412 (uri (pypi-uri "psutil" version))
414 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
415 (build-system python-build-system)
417 ;; FIXME: some tests does not return and times out.
419 (home-page "https://www.github.com/giampaolo/psutil")
420 (synopsis "Library for retrieving information on running processes")
422 "psutil (Python system and process utilities) is a library for retrieving
423 information on running processes and system utilization (CPU, memory, disks,
424 network) in Python. It is useful mainly for system monitoring, profiling and
425 limiting process resources and management of running processes. It implements
426 many functionalities offered by command line tools such as: ps, top, lsof,
427 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
428 pidof, tty, taskset, pmap.")
429 (properties `((python2-variant . ,(delay python2-psutil))))
430 (license license:bsd-3)))
432 (define-public python2-psutil
433 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
437 `(("python2-enum34" ,python2-enum34) ;optional
438 ,@(package-propagated-inputs base))))))
440 (define-public python-shapely
442 (name "python-shapely")
443 (version "1.6.4.post2")
447 (uri (pypi-uri "Shapely" version))
450 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
451 (build-system python-build-system)
453 `(("python-cython" ,python-cython)
454 ("python-matplotlib" ,python-matplotlib)
455 ("python-pytest" ,python-pytest)
456 ("python-pytest-cov" ,python-pytest-cov)))
460 `(("python-numpy" ,python-numpy)))
463 (modify-phases %standard-phases
464 (add-after 'unpack 'patch-geos-path
465 (lambda* (#:key inputs #:allow-other-keys)
466 (let ((geos (assoc-ref inputs "geos"))
467 (glibc (assoc-ref inputs ,(if (%current-target-system)
468 "cross-libc" "libc"))))
469 (substitute* "shapely/geos.py"
470 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
471 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
472 geos "/lib/libgeos_c.so'])"))
473 (("free = load_dll\\('c'\\)\\.free")
474 (string-append "free = load_dll('c', fallbacks=['"
475 glibc "/lib/libc.so.6']).free"))))
477 (home-page "https://github.com/Toblerity/Shapely")
478 (synopsis "Library for the manipulation and analysis of geometric objects")
479 (description "Shapely is a Python package for manipulation and analysis of
480 planar geometric objects. It is based on the @code{GEOS} library.")
481 (license license:bsd-3)))
483 (define-public python-shortuuid
485 (name "python-shortuuid")
490 (uri (pypi-uri "shortuuid" version))
493 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
494 (build-system python-build-system)
496 `(("python-pep8" ,python-pep8)))
497 (home-page "https://github.com/skorokithakis/shortuuid")
498 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
500 "@code{shortuuid} is a Python library for generating concise, unambiguous
501 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
502 module and then similar looking characters are removed.")
503 (license license:bsd-3)))
505 (define-public python-logwrap
507 (name "python-logwrap")
512 (uri (pypi-uri "logwrap" version ".zip"))
515 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
516 (build-system python-build-system)
518 `(("python-six" ,python-six)
519 ("python-typing" ,python-typing)))
522 ("python-cython" ,python-cython)
523 ("python-pytest" ,python-pytest)
524 ("python-pytest-cov" ,python-pytest-cov)
525 ("python-pytest-runner" ,python-pytest-runner)))
526 (home-page "https://github.com/penguinolog/logwrap")
527 (synopsis "Decorator for logging function arguments")
528 (description "This package provides a decorator to log function arguments
529 and function call return values in a human-readable way.")
530 (license license:asl2.0)))
532 (define-public python2-shapely
533 (package-with-python2 python-shapely))
535 (define-public python-clyent
537 (name "python-clyent")
542 (uri (pypi-uri "clyent" version))
545 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
546 (build-system python-build-system)
548 `(("python-mock" ,python-mock)))
549 (home-page "https://github.com/binstar/clyent")
550 (synopsis "Command line client library")
551 (description "Clyent is a Python command line utiliy library. It is used
552 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
553 (license license:bsd-3)))
555 (define-public python2-clyent
556 (package-with-python2 python-clyent))
558 (define-public python-babel
560 (name "python-babel")
565 (uri (pypi-uri "Babel" version))
568 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
569 (build-system python-build-system)
571 `(("python-freezegun" ,python-freezegun)
572 ("python-pytest" ,python-pytest)))
574 `(("python-pytz" ,python-pytz)))
576 `(#:phases (modify-phases %standard-phases
579 (invoke "pytest" "-vv" "-k"
581 ;; XXX: These tests fail when using Pytest 4.x and
582 ;; Babel 2.6.0. Try removing this for later versions.
583 "not test_no_inherit_metazone_marker_never_in_output"
584 " and not test_smoke_dates"
585 " and not test_smoke_numbers")))))))
586 (home-page "http://babel.pocoo.org/")
588 "Tools for internationalizing Python applications")
590 "Babel is composed of two major parts:
591 - tools to build and work with gettext message catalogs
592 - a Python interface to the CLDR (Common Locale Data Repository), providing
593 access to various locale display names, localized number and date formatting,
595 (license license:bsd-3)))
597 (define-public python2-babel
598 (package-with-python2 python-babel))
600 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
601 (define-public python2-babel-2.6
603 (inherit python2-babel)
607 (uri (pypi-uri "Babel" version))
610 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
612 (define-public python2-backport-ssl-match-hostname
614 (name "python2-backport-ssl-match-hostname")
619 (uri (pypi-uri "backports.ssl_match_hostname" version))
622 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
623 (build-system python-build-system)
626 #:tests? #f)) ; no test target
627 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
628 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
630 "This backport brings the ssl.match_hostname() function to users of
631 earlier versions of Python. The function checks the hostname in the
632 certificate returned by the server to which a connection has been established,
633 and verifies that it matches the intended target hostname.")
634 (license license:psfl)))
636 (define-public python-boolean.py
638 (name "python-boolean.py")
642 ;; There's no source tarball on PyPI.
645 (url "https://github.com/bastikr/boolean.py")
646 (commit (string-append "v" version))))
647 (file-name (git-file-name name version))
649 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
650 (build-system python-build-system)
651 (home-page "https://github.com/bastikr/boolean.py")
652 (synopsis "Boolean algebra in one Python module")
654 "This is a small Python library that implements boolean algebra.
655 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
656 @code{Symbol} class that can take on one of these two values. Calculations
657 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
658 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
659 Expressions are constructed from parsed strings or directly in Python.")
660 (license license:bsd-2)))
662 (define-public python-hdf4
669 (uri (pypi-uri name version))
672 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
673 (build-system python-build-system)
674 (native-inputs `(("nose" ,python-nose)))
675 (propagated-inputs `(("numpy" ,python-numpy)))
682 (modify-phases %standard-phases
685 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
686 ;; on to import numpy. Somehow this works on their CI system.
687 ;; Let's just manage PYTHONPATH here instead.
688 (substitute* "runexamples.sh"
689 (("export PYTHONPATH=.*") ""))
691 (string-append (getcwd) ":"
692 (getenv "PYTHONPATH")))
693 (invoke "./runexamples.sh")
694 (invoke "nosetests" "-v"))))))
695 (home-page "https://github.com/fhs/python-hdf4")
696 (synopsis "Python interface to the NCSA HDF4 library")
698 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
699 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
700 NetCDF files can also be read and modified. Python-HDF4 is a fork of
701 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
702 (license license:expat)))
704 (define-public python2-hdf4
705 (package-with-python2 python-hdf4))
707 (define-public python-h5py
714 (uri (pypi-uri "h5py" version))
717 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
718 (build-system python-build-system)
720 `(#:tests? #f ; no test target
722 (modify-phases %standard-phases
723 (add-after 'unpack 'fix-hdf5-paths
724 (lambda* (#:key inputs #:allow-other-keys)
725 (let ((prefix (assoc-ref inputs "hdf5")))
726 (substitute* "setup_build.py"
727 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
728 (string-append "['" prefix "/lib" "']"))
729 (("'/opt/local/include', '/usr/local/include'")
730 (string-append "'" prefix "/include" "'")))
731 (substitute* "setup_configure.py"
732 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
733 (string-append "['" prefix "/lib" "']")))
736 `(("python-six" ,python-six)
737 ("python-numpy" ,python-numpy)))
739 `(("hdf5" ,hdf5-1.10)))
741 `(("python-cython" ,python-cython)
742 ("python-pkgconfig" ,python-pkgconfig)
743 ("pkg-config" ,pkg-config)))
744 (home-page "https://www.h5py.org/")
745 (synopsis "Read and write HDF5 files from Python")
747 "The h5py package provides both a high- and low-level interface to the
748 HDF5 library from Python. The low-level interface is intended to be a
749 complete wrapping of the HDF5 API, while the high-level component supports
750 access to HDF5 files, datasets and groups using established Python and NumPy
752 (license license:bsd-3)))
754 (define-public python2-h5py
755 (package-with-python2 python-h5py))
757 (define-public python-sh
764 (uri (pypi-uri "sh" version))
767 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
768 (build-system python-build-system)
771 (modify-phases %standard-phases
774 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
775 (setenv "HOME" "/tmp")
776 (invoke "python" "sh.py" "test"))))))
778 `(("python-coverage" ,python-coverage)))
779 (home-page "https://github.com/amoffat/sh")
780 (synopsis "Python subprocess replacement")
781 (description "This package provides a replacement for Python's
782 @code{subprocess} feature.")
783 (license license:expat)))
785 (define-public python2-sh
786 (package-with-python2 python-sh))
788 (define-public python-cftime
790 (name "python-cftime")
795 (uri (pypi-uri "cftime" version))
797 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
798 (build-system python-build-system)
800 `(("python-numpy" ,python-numpy)))
802 `(("python-coveralls" ,python-coveralls)
803 ("python-cython" ,python-cython)
804 ("python-pytest-cov" ,python-pytest-cov)))
805 (home-page "https://github.com/Unidata/cftime")
806 (synopsis "Library for time handling")
808 "This package provides time-handling functionality that used to be part
809 of the netcdf4 package before.")
810 ;; This package claims to include code under the GPLv3 but is released
812 (license (list license:isc license:gpl3+))))
814 (define-public python-netcdf4
816 (name "python-netcdf4")
821 (uri (pypi-uri "netCDF4" version))
824 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
825 (build-system python-build-system)
828 (modify-phases %standard-phases
829 (add-after 'unpack 'configure-locations
830 (lambda* (#:key inputs #:allow-other-keys)
831 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
834 `(("python-cython" ,python-cython)))
836 `(("python-numpy" ,python-numpy)
837 ("python-cftime" ,python-cftime)))
842 (home-page "https://github.com/Unidata/netcdf4-python")
843 (synopsis "Python/numpy interface to the netCDF library")
844 (description "Netcdf4-python is a Python interface to the netCDF C
845 library. netCDF version 4 has many features not found in earlier
846 versions of the library and is implemented on top of HDF5. This module
847 can read and write files in both the new netCDF 4 and the old netCDF 3
848 format, and can create files that are readable by HDF5 clients. The
849 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
850 to users of that module.")
851 ;; The software is mainly ISC, but includes some files covered
852 ;; by the Expat license.
853 (license (list license:isc license:expat))))
855 (define-public python2-netcdf4
856 (package-with-python2 python-netcdf4))
858 (define-public python-license-expression
860 (name "python-license-expression")
865 (uri (pypi-uri "license-expression" version))
867 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
868 (build-system python-build-system)
870 `(("python-boolean.py" ,python-boolean.py)))
871 (home-page "https://github.com/nexB/license-expression")
872 (synopsis "Apply boolean logic to license expressions")
874 "This Python module defines a tiny language to evaluate and compare
875 license expressions using boolean logic. Logical combinations of licenses can
876 be tested for equality, containment, and equivalence. They can be normalised
877 and simplified. It supports SPDX license expressions as well as other naming
878 conventions and aliases in the same expression.")
879 (license license:gpl2+)))
881 (define-public python-lockfile
883 (name "python-lockfile")
888 (uri (pypi-uri "lockfile" version))
891 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
892 (build-system python-build-system)
893 (arguments '(#:test-target "check"))
895 `(("python-pbr" ,python-pbr)))
896 (home-page "https://launchpad.net/pylockfile")
897 (synopsis "Platform-independent file locking module")
899 "The lockfile package exports a LockFile class which provides a simple
900 API for locking files.")
901 (license license:expat)))
903 (define-public python2-lockfile
904 (package-with-python2 python-lockfile))
906 (define-public python-filelock
908 (name "python-filelock")
913 (uri (pypi-uri "filelock" version))
916 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
917 (build-system python-build-system)
919 "https://github.com/benediktschmitt/py-filelock")
920 (synopsis "Platform independent file lock")
921 (description "@code{filelock} contains a single module implementing
922 a platform independent file lock in Python, which provides a simple way of
923 inter-process communication.")
924 (license license:unlicense)))
926 (define-public python-semantic-version
928 (name "python-semantic-version")
933 (uri (pypi-uri "semantic_version" version))
936 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
937 (build-system python-build-system)
939 `(#:tests? #f)) ; PyPI tarball lacks tests
940 (home-page "https://github.com/rbarrois/python-semanticversion")
941 (synopsis "Semantic versioning module for Python")
943 "The @code{semantic_version} class is a small library for handling
944 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
946 It can compare versions, generate a new version that represents a bump in one of
947 the version levels, and check whether any given string is a proper semantic
948 version identifier.")
949 (license license:bsd-3)))
951 (define-public python2-semantic-version
952 (package-with-python2 python-semantic-version))
954 (define-public python-serpent
956 (name "python-serpent")
961 (uri (pypi-uri "serpent" version))
963 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
964 (build-system python-build-system)
966 `(("python-attrs" ,python-attrs)
967 ("python-pytz" ,python-pytz)))
968 (home-page "https://github.com/irmen/Serpent")
969 (synopsis "Serializer for literal Python expressions")
971 "Serpent provides @code{ast.literal_eval()}-compatible object tree
972 serialization. It serializes an object tree into bytes (an utf-8 encoded
973 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
974 to rebuild the original object tree.
976 Because only safe literals are encoded, it is safe to send serpent data to
977 other machines, such as over the network.")
978 (license license:expat)))
980 (define-public python-setuptools
982 (name "python-setuptools")
987 (uri (pypi-uri "setuptools" version ".zip"))
990 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
991 (modules '((guix build utils)))
994 ;; Remove included binaries which are used to build self-extracting
995 ;; installers for Windows.
996 ;; TODO: Find some way to build them ourself so we can include them.
997 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
999 (build-system python-build-system)
1000 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1001 ;; One could bootstrap with an internal untested setuptools.
1004 (home-page "https://pypi.org/project/setuptools/")
1006 "Library designed to facilitate packaging Python projects")
1008 "Setuptools is a fully-featured, stable library designed to facilitate
1009 packaging Python projects, where packaging includes:
1010 Python package and module definitions,
1011 distribution package metadata,
1013 project installation,
1014 platform-specific details,
1016 ;; TODO: setuptools now bundles the following libraries:
1017 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1018 (license (list license:psfl ; setuptools itself
1019 license:expat ; six, appdirs, pyparsing
1020 license:asl2.0 ; packaging is dual ASL2/BSD-2
1023 (define-public python2-setuptools
1024 (package-with-python2 python-setuptools))
1026 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1027 (define-public python-setuptools-for-tensorflow
1030 (inherit python-setuptools)
1033 (inherit (package-source python-setuptools))
1034 (uri (pypi-uri "setuptools" version ".zip"))
1037 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1039 (define-public python-uniseg
1041 (name "python-uniseg")
1046 (uri (pypi-uri "uniseg" version ".zip"))
1049 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1050 (build-system python-build-system)
1052 '(#:tests? #f)) ; The test suite requires network access.
1054 `(("unzip" ,unzip)))
1056 "https://bitbucket.org/emptypage/uniseg-python")
1058 "Python library to determine Unicode text segmentations")
1060 "Uniseg is a Python package used to determine Unicode text segmentations.
1061 Supported segmentations include:
1063 @item @dfn{Code point} (any value in the Unicode codespace)
1064 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1065 multiple Unicode code points, e.g. \"G\" + acute-accent)
1067 @item Sentence break
1070 (license license:expat)))
1072 (define-public python2-uniseg
1073 (package-with-python2 python-uniseg))
1075 (define-public python-humanfriendly
1077 (name "python-humanfriendly")
1082 (uri (pypi-uri "humanfriendly" version))
1085 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1086 (build-system python-build-system)
1088 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1091 `(("python-monotonic" ,python-monotonic)))
1092 (home-page "https://humanfriendly.readthedocs.io")
1093 (synopsis "Human-friendly input and output in Python")
1095 "The functions and classes in @code{humanfriendly} can be used to make
1096 text interfaces more user-friendly. It includes tools to parse and format
1097 numbers, file sizes, and timespans, timers for long-running operations, menus
1098 to allow the user to choose from a list of options, and terminal interaction
1100 (license license:expat)))
1102 (define-public python2-humanfriendly
1103 (package-with-python2 python-humanfriendly))
1105 (define-public python-capturer
1107 (name "python-capturer")
1112 (uri (pypi-uri "capturer" version))
1115 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1116 (build-system python-build-system)
1120 `(("python-humanfriendly" ,python-humanfriendly)))
1121 (home-page "https://capturer.readthedocs.io")
1122 (synopsis "Capture stdout and stderr streams of the current process")
1124 "The capturer package makes it easy to capture the stdout and stderr
1125 streams of the current process and subprocesses. Output can be relayed
1126 to the terminal in real time but is also available to the Python program
1127 for additional processing.")
1128 (license license:expat)))
1130 (define-public python2-capturer
1131 (package-with-python2 python-capturer))
1133 (define-public python-case
1135 (name "python-case")
1140 (uri (pypi-uri "case" version))
1143 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1144 (build-system python-build-system)
1146 `(("python-mock" ,python-mock)
1147 ("python-nose" ,python-nose)
1148 ("python-six" ,python-six)
1149 ("python-unittest2" ,python-unittest2)))
1151 `(("python-coverage" ,python-coverage)))
1152 (home-page "https://github.com/celery/case")
1153 (synopsis "Unittest utilities and convenience methods")
1155 "The @code{case} package provides utilities on top of unittest, including
1156 some helpful Python 2 compatibility convenience methods.")
1157 (license license:bsd-3)))
1159 (define-public python-verboselogs
1161 (name "python-verboselogs")
1166 (uri (pypi-uri "verboselogs" version))
1169 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1170 (build-system python-build-system)
1173 (modify-phases %standard-phases
1176 ;; Do not run pylint plugin test, as astroid is an old
1177 ;; unsupported version.
1178 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1179 "verboselogs/tests.py"))))))
1181 `(("python-mock" ,python-mock)
1182 ("python-pytest" ,python-pytest)))
1183 (home-page "https://verboselogs.readthedocs.io")
1184 (synopsis "Verbose logging level for Python's logging module")
1186 "The @code{verboselogs} package extends Python's @code{logging} module to
1187 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1188 (license license:expat)))
1190 (define-public python2-verboselogs
1191 (package-with-python2 python-verboselogs))
1193 (define-public python-coloredlogs
1195 (name "python-coloredlogs")
1200 (uri (pypi-uri "coloredlogs" version))
1203 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1204 (build-system python-build-system)
1206 `(;Tests require some updated modules
1209 `(("python-capturer" ,python-capturer)))
1210 (home-page "https://coloredlogs.readthedocs.io")
1211 (synopsis "Colored stream handler for Python's logging module")
1213 "The @code{coloredlogs} package enables colored terminal output for
1214 Python's logging module. The @code{ColoredFormatter} class inherits from
1215 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1216 messages in color.")
1217 (license license:expat)))
1219 (define-public python2-coloredlogs
1220 (package-with-python2 python-coloredlogs))
1222 (define-public python-editorconfig
1224 (name "python-editorconfig")
1229 (uri (pypi-uri "EditorConfig" version))
1232 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1233 (build-system python-build-system)
1234 (home-page "https://editorconfig.org/")
1235 (synopsis "EditorConfig bindings for python")
1236 (description "The EditorConfig project consists of a file format for
1237 defining coding styles and a collection of text editor plugins that enable
1238 editors to read the file format and adhere to defined styles. EditorConfig
1239 files are easily readable and they work nicely with version control systems.")
1240 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1241 (license (list license:bsd-2 license:psfl))))
1243 (define-public python-et-xmlfile
1245 (name "python-et-xmlfile")
1250 (uri (pypi-uri "et_xmlfile" version))
1253 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1254 (build-system python-build-system)
1256 `(#:phases (modify-phases %standard-phases
1259 (invoke "pytest"))))))
1261 `(("python-pytest" ,python-pytest)
1262 ("python-lxml" ,python-lxml))) ;used for the tests
1263 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1264 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1265 (description "This Python library is based upon the @code{xmlfile} module
1266 from @code{lxml}. It aims to provide a low memory, compatible implementation
1267 of @code{xmlfile}.")
1268 (license license:expat)))
1270 (define-public python2-et-xmlfile
1271 (package-with-python2 python-et-xmlfile))
1273 (define-public python-openpyxl
1275 (name "python-openpyxl")
1279 ;; We use the upstream repository, as the tests are not included in the
1283 (url "https://bitbucket.org/openpyxl/openpyxl")
1284 (changeset version)))
1285 (file-name (string-append name "-" version "-checkout"))
1287 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1288 (build-system python-build-system)
1290 `(#:phases (modify-phases %standard-phases
1293 (invoke "pytest"))))))
1295 ;; For the test suite.
1296 `(("python-lxml" ,python-lxml)
1297 ("python-pillow" ,python-pillow)
1298 ("python-pytest" ,python-pytest)))
1300 `(("python-et-xmlfile" ,python-et-xmlfile)
1301 ("python-jdcal" ,python-jdcal)))
1302 (home-page "https://openpyxl.readthedocs.io")
1303 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1304 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1305 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1307 (license license:expat)))
1309 (define-public python-eventlet
1311 (name "python-eventlet")
1316 (uri (pypi-uri "eventlet" version))
1319 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1320 (build-system python-build-system)
1322 `(("python-greenlet" ,python-greenlet)))
1324 ;; TODO: Requires unpackaged 'enum-compat'.
1326 (home-page "https://eventlet.net")
1327 (synopsis "Concurrent networking library for Python")
1329 "Eventlet is a concurrent networking library for Python that
1330 allows you to change how you run your code, not how you write it.
1331 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1332 Coroutines ensure that the developer uses a blocking style of programming
1333 that is similar to threading, but provide the benefits of non-blocking I/O.
1334 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1335 from the Python interpreter, or as a small part of a larger application.")
1336 (license license:expat)))
1338 (define-public python2-eventlet
1339 (let ((base (package-with-python2
1340 (strip-python2-variant python-eventlet))))
1341 (package (inherit base)
1343 `(("python2-enum34" ,python2-enum34)
1344 ,@(package-propagated-inputs base))))))
1346 (define-public python-six
1353 (uri (pypi-uri "six" version))
1356 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1357 (build-system python-build-system)
1360 (modify-phases %standard-phases
1363 (invoke "py.test" "-v"))))))
1365 `(("python-py" ,python-py)
1366 ("python-pytest" ,python-pytest-bootstrap)))
1367 (home-page "https://pypi.org/project/six/")
1368 (synopsis "Python 2 and 3 compatibility utilities")
1370 "Six is a Python 2 and 3 compatibility library. It provides utility
1371 functions for smoothing over the differences between the Python versions with
1372 the goal of writing Python code that is compatible on both Python versions.
1373 Six supports every Python version since 2.5. It is contained in only one
1374 Python file, so it can be easily copied into your project.")
1375 (license license:x11)))
1377 (define-public python2-six
1378 (package-with-python2 python-six))
1380 (define-public python-six-bootstrap
1382 (inherit python-six)
1383 (name "python-six-bootstrap")
1385 (arguments `(#:tests? #f))))
1387 (define-public python2-six-bootstrap
1388 (package-with-python2 python-six-bootstrap))
1390 (define-public python-schedule
1392 (name "python-schedule")
1397 (uri (pypi-uri "schedule" version))
1400 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1401 (build-system python-build-system)
1403 `(("python-pytest" ,python-pytest)
1404 ("python-mock" ,python-mock)))
1405 (home-page "https://github.com/dbader/schedule")
1406 (synopsis "Schedule periodic function calls in Python")
1408 "Schedule is an in-process scheduler for periodic jobs that uses the
1409 builder pattern for configuration. Schedule lets you run Python functions (or
1410 any other callable) periodically at pre-determined intervals using a simple,
1411 human-friendly syntax.")
1412 (license license:expat)))
1414 (define-public python2-schedule
1415 (package-with-python2 python-schedule))
1417 (define-public python2-mechanize
1419 (name "python2-mechanize")
1424 (uri (pypi-uri "mechanize" version))
1427 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1428 (build-system python-build-system)
1430 `(#:python ,python-2 ; apparently incompatible with Python 3
1432 ;; test fails with message
1433 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1434 ;; (python-3.3.2) or
1435 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1437 ;; The source code is from March 2011 and probably not up-to-date
1438 ;; with respect to python unit tests.
1439 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1441 "Stateful programmatic web browsing in Python")
1443 "Mechanize implements stateful programmatic web browsing in Python,
1444 after Andy Lester’s Perl module WWW::Mechanize.")
1445 (license (license:non-copyleft
1447 "See COPYING in the distribution."))))
1450 (define-public python-simplejson
1452 (name "python-simplejson")
1457 (uri (pypi-uri "simplejson" version))
1460 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1461 (build-system python-build-system)
1462 (home-page "http://simplejson.readthedocs.org/en/latest/")
1464 "Json library for Python")
1466 "JSON (JavaScript Object Notation) is a subset of JavaScript
1467 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1470 Simplejson exposes an API familiar to users of the standard library marshal
1471 and pickle modules. It is the externally maintained version of the json
1472 library contained in Python 2.6, but maintains compatibility with Python 2.5
1473 and (currently) has significant performance advantages, even without using
1474 the optional C extension for speedups. Simplejson is also supported on
1476 (license license:x11)))
1478 (define-public python2-simplejson
1479 (package-with-python2 python-simplejson))
1482 (define-public python-pyicu
1484 (name "python-pyicu")
1489 (uri (pypi-uri "PyICU" version))
1492 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1493 (build-system python-build-system)
1495 `(("icu4c" ,icu4c)))
1497 `(("python-pytest" ,python-pytest)
1498 ("python-six" ,python-six)))
1499 (home-page "https://github.com/ovalhub/pyicu")
1500 (synopsis "Python extension wrapping the ICU C++ API")
1502 "PyICU is a python extension wrapping the ICU C++ API.")
1503 (properties `((python2-variant . ,(delay python2-pyicu))))
1504 (license license:x11)))
1506 (define-public python2-pyicu
1507 (let ((base (package-with-python2
1508 (strip-python2-variant python-pyicu))))
1512 `(,@(package-arguments base)
1514 (modify-phases %standard-phases
1515 (add-before 'check 'delete-failing-test
1517 ;; XXX: This fails due to Unicode issues unique to Python 2,
1518 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1519 (delete-file "test/test_Script.py")
1522 (define-public python2-dogtail
1523 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1524 ;; spaces in indentation" with Python 3.
1526 (name "python2-dogtail")
1530 (uri (pypi-uri "dogtail" version))
1533 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1534 (build-system python-build-system)
1535 (arguments `(#:python ,python-2
1536 #:tests? #f)) ; invalid command "test"
1537 ;; Currently no offical homepage.
1538 (home-page "https://pypi.org/project/dogtail/")
1539 (synopsis "GUI test tool and automation framework written in Python")
1541 "Dogtail is a GUI test tool and automation framework written in Python.
1542 It uses Accessibility (a11y) technologies to communicate with desktop
1543 applications. dogtail scripts are written in Python and executed like any
1544 other Python program.")
1545 (license license:gpl2+)))
1547 (define-public python-empy
1549 (name "python-empy")
1553 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1557 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1558 (build-system python-build-system)
1560 `(#:tests? #f)) ; python2 only
1561 (home-page "http://www.alcyone.com/software/empy/")
1562 (synopsis "Templating system for Python")
1564 "EmPy is a system for embedding Python expressions and statements in
1565 template text; it takes an EmPy source file, processes it, and produces
1566 output. This is accomplished via expansions, which are special signals to the
1567 EmPy system and are set off by a special prefix (by default the at sign, @@).
1568 EmPy can expand arbitrary Python expressions and statements in this way, as
1569 well as a variety of special forms. Textual data not explicitly delimited in
1570 this way is sent unaffected to the output, allowing Python to be used in
1571 effect as a markup language. Also supported are callbacks via hooks,
1572 recording and playback via diversions, and dynamic, chainable filters. The
1573 system is highly configurable via command line options and embedded
1575 (license license:lgpl2.1+)))
1577 (define-public python2-empy
1578 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1581 (arguments `(,@(package-arguments base)
1584 (define-public python2-element-tree
1586 (name "python2-element-tree")
1591 "http://effbot.org/media/downloads/elementtree-"
1592 version "-20050316.tar.gz"))
1595 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1596 (build-system python-build-system)
1598 `(#:python ,python-2 ; seems to be part of Python 3
1599 #:tests? #f)) ; no 'test' sub-command
1600 (synopsis "Toolkit for XML processing in Python")
1602 "ElementTree is a Python library supporting lightweight XML processing.")
1603 (home-page "http://effbot.org/zone/element-index.htm")
1604 (license (license:x11-style
1605 "http://docs.python.org/2/license.html"
1606 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1608 (define-public python2-pybugz
1610 (name "python2-pybugz")
1615 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1619 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1620 (patches (search-patches "pybugz-stty.patch"
1621 "pybugz-encode-error.patch"))))
1622 (build-system python-build-system)
1624 `(#:python ,python-2 ; SyntaxError with Python 3
1625 #:tests? #f)) ; no 'test' sub-command
1627 `(("element-tree" ,python2-element-tree)))
1628 (synopsis "Python and command-line interface to Bugzilla")
1630 "PyBugz is a Python library and command-line tool to query the Bugzilla
1631 bug tracking system. It is meant as an aid to speed up interaction with the
1633 (home-page "http://www.liquidx.net/pybugz/")
1634 (license license:gpl2)))
1636 (define-public python2-enum
1638 (name "python2-enum")
1642 (uri (pypi-uri "enum" version))
1645 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1646 (build-system python-build-system)
1648 `(#:python ,python-2))
1649 (home-page "https://pypi.org/project/enum/")
1650 (synopsis "Robust enumerated type support in Python")
1652 "This provides a module for robust enumerations in Python. It has
1653 been superseded by the Python standard library and is provided only for
1655 ;; Choice of either license.
1656 (license (list license:gpl3+ license:psfl))))
1658 (define-public python-enum34
1660 (name "python-enum34")
1665 (uri (pypi-uri "enum34" version))
1668 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1669 (build-system python-build-system)
1670 (home-page "https://pypi.org/project/enum34/")
1671 (synopsis "Backported Python 3.4 Enum")
1673 "Enum34 is the new Python stdlib enum module available in Python 3.4
1674 backported for previous versions of Python from 2.4 to 3.3.")
1675 (license license:bsd-3)))
1677 (define-public python2-enum34
1678 (package-with-python2 python-enum34))
1680 (define-public python-parse-type
1682 (name "python-parse-type")
1687 (uri (pypi-uri "parse_type" version))
1690 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1691 (build-system python-build-system)
1693 `(("python-six" ,python-six)
1694 ("python-parse" ,python-parse)))
1696 `(("python-pytest" ,python-pytest)
1697 ("python-pytest-runner" ,python-pytest-runner)))
1698 (home-page "https://github.com/jenisys/parse_type")
1699 (synopsis "Extended parse module")
1701 "Parse_type extends the python parse module.")
1703 `((python2-variant . ,(delay python2-parse-type))))
1704 (license license:bsd-3)))
1706 (define-public python2-parse-type
1707 (let ((base (package-with-python2
1708 (strip-python2-variant python-parse-type))))
1709 (package (inherit base)
1711 `(("python2-enum34" ,python2-enum34)
1712 ,@(package-propagated-inputs base))))))
1714 (define-public python-parse
1716 (name "python-parse")
1721 (uri (pypi-uri "parse" version))
1724 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1725 (build-system python-build-system)
1728 (modify-phases %standard-phases
1730 (lambda _ (invoke "python" "test_parse.py"))))))
1731 (home-page "https://github.com/r1chardj0n3s/parse")
1732 (synopsis "Parse strings")
1734 "Parse strings using a specification based on the Python @code{format()}
1736 (license license:x11)))
1738 (define-public python-polib
1740 (name "python-polib")
1744 (uri (pypi-uri "polib" version))
1747 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1748 (build-system python-build-system)
1749 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1750 (synopsis "Manipulate, create and modify gettext files")
1751 (description "Polib can manipulate any gettext format (po, pot and mo)
1752 files. It can be used to create po files from scratch or to modify
1754 (license license:expat)))
1756 (define-public python2-polib
1757 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1760 (arguments `(,@(package-arguments base)
1761 ;; Tests don't work with python2.
1764 (define-public python-poyo
1766 (name "python-poyo")
1771 (uri (pypi-uri "poyo" version))
1774 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1775 (build-system python-build-system)
1776 (home-page "https://github.com/hackebrot/poyo")
1777 (synopsis "Lightweight YAML Parser for Python")
1779 "This package provides a lightweight YAML Parser for Python. It supports
1780 only a chosen subset of the YAML format that is required to parse cookiecutter
1781 user configuration files. It does not have support for serializing into YAML
1782 and is not compatible with JSON.")
1783 (license license:expat)))
1785 (define-public scons
1792 (url "https://github.com/SCons/scons.git")
1794 (file-name (git-file-name name version))
1797 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1798 (build-system python-build-system)
1800 `(#:use-setuptools? #f ; still relies on distutils
1801 #:tests? #f ; no 'python setup.py test' command
1803 (modify-phases %standard-phases
1804 (add-before 'build 'bootstrap
1806 (substitute* "src/engine/SCons/compat/__init__.py"
1807 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1808 "sys.modules[new] = __import__(old)"))
1809 (substitute* "src/engine/SCons/Platform/__init__.py"
1810 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1811 "mod = __import__(full_name)"))
1812 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1813 (chdir "build/scons")
1815 (home-page "https://scons.org/")
1816 (synopsis "Software construction tool written in Python")
1818 "SCons is a software construction tool. Think of SCons as an improved,
1819 cross-platform substitute for the classic Make utility with integrated
1820 functionality similar to autoconf/automake and compiler caches such as ccache.
1821 In short, SCons is an easier, more reliable and faster way to build
1823 (license license:x11)))
1825 (define-public scons-python2
1827 (inherit (package-with-python2 scons))
1828 (name "scons-python2")))
1830 (define-public python-extras
1832 (name "python-extras")
1837 (uri (pypi-uri "extras" version))
1840 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1841 (build-system python-build-system)
1843 ;; FIXME: Circular dependency on testtools.
1845 (home-page "https://github.com/testing-cabal/extras")
1846 (synopsis "Useful extensions to the Python standard library")
1848 "Extras is a set of extensions to the Python standard library.")
1849 (license license:expat)))
1851 (define-public python2-extras
1852 (package-with-python2 python-extras))
1854 (define-public python-mimeparse
1856 (name "python-mimeparse")
1861 (uri (pypi-uri "python-mimeparse" version))
1864 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1865 (build-system python-build-system)
1868 (modify-phases %standard-phases
1871 (invoke "./mimeparse_test.py"))))))
1873 "https://github.com/dbtsai/python-mimeparse")
1874 (synopsis "Python library for parsing MIME types")
1876 "Mimeparse provides basic functions for parsing MIME type names and
1877 matching them against a list of media-ranges.")
1878 (license license:expat)))
1880 (define-public python2-mimeparse
1881 (package-with-python2 python-mimeparse))
1883 (define-public python-miniboa
1885 (name "python-miniboa")
1890 (uri (pypi-uri "miniboa" version))
1893 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1894 (build-system python-build-system)
1895 (home-page "https://github.com/shmup/miniboa")
1896 (synopsis "Simple, single-threaded Telnet server")
1898 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1900 (license license:asl2.0)))
1902 (define-public python2-miniboa
1903 (package-with-python2 python-miniboa))
1905 (define-public python-pafy
1907 (name "python-pafy")
1912 (uri (pypi-uri "pafy" version))
1915 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1916 (build-system python-build-system)
1918 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1920 ;; Youtube-dl is a python package which is imported in the file
1921 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1922 `(("youtube-dl" ,youtube-dl)))
1923 (home-page "https://np1.github.io/pafy/")
1924 (synopsis "Retrieve YouTube content and metadata")
1926 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1927 (license license:lgpl3+)))
1929 (define-public python2-funcsigs
1931 (name "python2-funcsigs")
1935 (uri (pypi-uri "funcsigs" version))
1938 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1939 (build-system python-build-system)
1941 `(#:python ,python-2))
1943 `(("python2-unittest2" ,python2-unittest2)))
1944 (home-page "http://funcsigs.readthedocs.org")
1945 (synopsis "Python function signatures from PEP362")
1947 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1948 (license license:asl2.0)))
1950 (define-public python2-funcsigs-bootstrap
1952 (inherit python2-funcsigs)
1953 (name "python2-funcsigs-bootstrap")
1957 ,@(package-arguments python2-funcsigs)))))
1959 (define-public python-py
1966 (uri (pypi-uri "py" version))
1969 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1970 (build-system python-build-system)
1972 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1973 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1974 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1975 ;; Is this module globally installed?"
1978 `(("python-setuptools-scm" ,python-setuptools-scm)))
1979 (home-page "https://github.com/pytest-dev/py")
1980 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1982 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1983 code introspection, and logging.")
1984 (license license:expat)))
1986 (define-public python2-py
1987 (package-with-python2 python-py))
1989 ;; Recent versions of python-fixtures and python-testrepository need
1990 ;; python-pbr for packaging, which itself needs these two packages for
1992 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1993 ;; same source, just without any test dependencies and with tests disabled.
1994 ;; python-pbr-minmal is then used to package python-fixtures and
1995 ;; python-testrepository.
1996 ;; Strictly speaking we currently could remove the test-requirements from the
1997 ;; normal python-pbr package (and save this package) since test are disabled
1998 ;; there anyway. But this may change in future.
1999 (define-public python-pbr-minimal
2001 (name "python-pbr-minimal")
2006 (uri (pypi-uri "pbr" version))
2009 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2010 (build-system python-build-system)
2013 (home-page "https://docs.openstack.org/pbr/latest/")
2014 (synopsis "Minimal build of python-pbr used for bootstrapping")
2016 "Used only for bootstrapping python2-pbr, you should not need this.")
2017 (license license:asl2.0)))
2019 (define-public python2-pbr-minimal
2020 (package-with-python2 python-pbr-minimal))
2022 (define-public python-pbr
2024 (inherit python-pbr-minimal)
2027 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2029 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2031 `(("python-fixtures" ,python-fixtures-bootstrap)
2032 ;; discover, coverage, hacking, subunit
2033 ("python-mock" ,python-mock)
2034 ("python-six" ,python-six)
2035 ("python-sphinx" ,python-sphinx)
2036 ("python-testrepository" ,python-testrepository-bootstrap)
2037 ("python-testresources" ,python-testresources-bootstrap)
2038 ("python-testscenarios" ,python-testscenarios-bootstrap)
2039 ("python-testtools" ,python-testtools-bootstrap)
2040 ("python-virtualenv" ,python-virtualenv)))
2041 (synopsis "Enhance the default behavior of Python’s setuptools")
2043 "Python Build Reasonableness (PBR) is a library that injects some useful
2044 and sensible default behaviors into your setuptools run. It will set
2045 versions, process requirements files and generate AUTHORS and ChangeLog file
2046 from git information.
2049 (define-public python2-pbr
2050 (package-with-python2 python-pbr))
2052 (define-public python-pyrsistent
2054 (name "python-pyrsistent")
2056 (home-page "https://github.com/tobgu/pyrsistent")
2059 (uri (pypi-uri "pyrsistent" version))
2062 "103j63g6lb5dfspph96zxjdpnq9h991kazd4f09ddgkpxpivbiyd"))))
2063 (build-system python-build-system)
2065 `(("python-hypothesis" ,python-hypothesis)
2066 ("python-pytest" ,python-pytest)
2067 ("python-pytest-runner" ,python-pytest-runner)))
2069 `(("python-six" ,python-six)))
2070 (synopsis "Persistent data structures for Python")
2072 "Pyrsistent is a number of persistent collections (by some referred to as
2073 functional data structures). Persistent in the sense that they are immutable.
2075 All methods on a data structure that would normally mutate it instead return a
2076 new copy of the structure containing the requested updates. The original
2077 structure is left untouched.")
2078 (license license:expat)))
2080 (define-public python2-pyrsistent
2081 (package-with-python2 python-pyrsistent))
2083 (define-public python-exif-read
2085 (name "python-exif-read")
2089 (uri (pypi-uri "ExifRead" version))
2092 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2093 (build-system python-build-system)
2094 (arguments `(#:tests? #f)) ; no tests
2095 (home-page "https://github.com/ianare/exif-py")
2096 (synopsis "Python library to extract EXIF data from image files")
2098 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2100 (license license:bsd-3)))
2102 (define-public python2-exif-read
2103 (package-with-python2 python-exif-read))
2105 (define-public python-pyld
2107 (name "python-pyld")
2111 (uri (pypi-uri "PyLD" version))
2114 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2115 (build-system python-build-system)
2116 (home-page "https://github.com/digitalbazaar/pyld")
2117 (synopsis "Python implementation of the JSON-LD specification")
2119 "PyLD is an implementation of the JSON-LD specification.")
2120 (license license:bsd-3)))
2122 (define-public python2-pyld
2123 (package-with-python2 python-pyld))
2125 (define-public python-click
2127 (name "python-click")
2132 (uri (pypi-uri "click" version))
2135 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
2136 (build-system python-build-system)
2139 (modify-phases %standard-phases
2140 (add-after 'unpack 'fix-paths
2141 (lambda* (#:key inputs #:allow-other-keys)
2142 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2143 "cross-libc" "libc"))))
2144 (substitute* "click/_unicodefun.py"
2146 (string-append "'" glibc "/bin/locale'"))))
2150 (invoke "python" "-m" "pytest"))))))
2152 `(("python-pytest" ,python-pytest)))
2153 (home-page "https://palletsprojects.com/p/click/")
2154 (synopsis "Command line library for Python")
2156 "Click is a Python package for creating command line interfaces in a
2157 composable way with as little code as necessary. Its name stands for
2158 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2159 with sensible defaults out of the box.")
2160 (license license:bsd-3)))
2162 (define-public python2-click
2163 (package-with-python2 python-click))
2165 (define-public python-wheel
2167 (name "python-wheel")
2172 (uri (pypi-uri "wheel" version))
2175 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2176 (build-system python-build-system)
2178 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2179 ;; fails to find the newly-built bdist_wheel library, even though it is
2180 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2182 (home-page "https://bitbucket.org/pypa/wheel/")
2183 (synopsis "Format for built Python packages")
2185 "A wheel is a ZIP-format archive with a specially formatted filename and
2186 the @code{.whl} extension. It is designed to contain all the files for a PEP
2187 376 compatible install in a way that is very close to the on-disk format. Many
2188 packages will be properly installed with only the @code{Unpack} step and the
2189 unpacked archive preserves enough information to @code{Spread} (copy data and
2190 scripts to their final locations) at any later time. Wheel files can be
2191 installed with a newer @code{pip} or with wheel's own command line utility.")
2192 (license license:expat)))
2194 (define-public python2-wheel
2195 (package-with-python2 python-wheel))
2197 (define-public python-vcversioner
2199 (name "python-vcversioner")
2200 (version "2.16.0.0")
2204 (uri (pypi-uri "vcversioner" version))
2207 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2208 (build-system python-build-system)
2209 (synopsis "Python library for version number discovery")
2210 (description "Vcversioner is a Python library that inspects tagging
2211 information in a variety of version control systems in order to discover
2213 (home-page "https://github.com/habnabit/vcversioner")
2214 (license license:isc)))
2216 (define-public python2-vcversioner
2217 (package-with-python2 python-vcversioner))
2219 (define-public python-jdcal
2221 (name "python-jdcal")
2226 (uri (pypi-uri "jdcal" version))
2229 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2230 (build-system python-build-system)
2232 `(#:phases (modify-phases %standard-phases
2235 (invoke "pytest"))))))
2237 `(("python-pytest" ,python-pytest)))
2238 (home-page "https://github.com/phn/jdcal")
2239 (synopsis "Functions to convert between Julian dates Gregorian dates")
2240 (description "This Python library provides functions for converting
2241 between Julian dates and Gregorian dates.")
2242 (license license:bsd-2)))
2244 (define-public python2-jdcal
2245 (package-with-python2 python-jdcal))
2247 (define-public python-jsondiff
2249 (name "python-jsondiff")
2254 (uri (pypi-uri "jsondiff" version))
2257 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2258 (build-system python-build-system)
2260 `(("python-nose" ,python-nose)
2261 ("python-nose-random" ,python-nose-random)))
2263 "https://github.com/fzumstein/jsondiff")
2264 (synopsis "Compare JSON and JSON-like structures in Python")
2265 (description "@code{jsondiff} is a Python library which lets you
2266 compare, diff, and patch JSON and JSON-like structures in Python.")
2267 (license license:expat)))
2269 (define-public python-jsonschema
2271 (name "python-jsonschema")
2275 (uri (pypi-uri "jsonschema" version))
2278 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2279 (build-system python-build-system)
2282 (modify-phases %standard-phases
2285 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2286 (invoke "trial" "jsonschema"))))))
2288 `(("python-setuptools_scm" ,python-setuptools-scm)
2289 ("python-twisted" ,python-twisted)))
2291 `(("python-attrs" ,python-attrs)
2292 ("python-pyrsistent" ,python-pyrsistent)
2293 ("python-six" ,python-six)))
2294 (home-page "https://github.com/Julian/jsonschema")
2295 (synopsis "Implementation of JSON Schema for Python")
2297 "Jsonschema is an implementation of JSON Schema for Python.")
2298 (license license:expat)
2299 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2301 (define-public python2-jsonschema
2302 (let ((jsonschema (package-with-python2
2303 (strip-python2-variant python-jsonschema))))
2304 (package (inherit jsonschema)
2306 `(("python2-functools32" ,python2-functools32)
2307 ,@(package-propagated-inputs jsonschema))))))
2309 ;; This old version is still required by docker-compose as of 1.24.0.
2310 (define-public python-jsonschema-2.6
2312 (name "python-jsonschema")
2316 (uri (pypi-uri "jsonschema" version))
2319 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2320 (build-system python-build-system)
2323 (modify-phases %standard-phases
2324 (replace 'check (lambda _ (invoke "nosetests"))))))
2326 `(("python-nose" ,python-nose)
2327 ("python-vcversioner" ,python-vcversioner)))
2328 (home-page "https://github.com/Julian/jsonschema")
2329 (synopsis "Implementation of JSON Schema for Python")
2331 "Jsonschema is an implementation of JSON Schema for Python.")
2332 (license license:expat)
2333 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2335 (define-public python-schema
2337 (name "python-schema")
2342 (uri (pypi-uri "schema" version))
2345 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2346 (build-system python-build-system)
2348 `(("python-pytest" ,python-pytest)))
2349 (home-page "https://github.com/keleshev/schema")
2350 (synopsis "Simple data validation library")
2352 "@code{python-schema} is a library for validating Python data
2353 structures, such as those obtained from config-files, forms, external
2354 services or command-line parsing, converted from JSON/YAML (or
2355 something else) to Python data-types.")
2356 (license license:psfl)))
2358 (define-public python2-schema
2359 (package-with-python2 python-schema))
2361 (define-public python-schema-0.5
2362 (package (inherit python-schema)
2367 (uri (pypi-uri "schema" version))
2370 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2372 (define-public python2-schema-0.5
2373 (package-with-python2 python-schema-0.5))
2375 (define-public python-kitchen
2377 (name "python-kitchen")
2382 (uri (pypi-uri "kitchen" version))
2385 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2386 (build-system python-build-system)
2388 `(("python-chardet" ,python-chardet)))
2389 (home-page "https://github.com/fedora-infra/kitchen")
2390 (synopsis "Python API for snippets")
2391 (description "@code{kitchen} module provides a python API for all sorts of
2392 little useful snippets of code that everybody ends up writing for their projects
2393 but never seem big enough to build an independent release. Use kitchen and stop
2394 cutting and pasting that code over and over.")
2395 (license (list license:lgpl2.1+
2396 ;; subprocess.py, test_subprocess.py,
2397 ;; kitchen/pycompat25/defaultdict.py:
2400 (define-public python2-kitchen
2401 (package-with-python2 python-kitchen))
2403 (define-public python-unidecode
2405 (name "python-unidecode")
2409 (uri (pypi-uri "Unidecode" version))
2412 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2413 (build-system python-build-system)
2414 (home-page "https://pypi.org/project/Unidecode/")
2415 (synopsis "ASCII transliterations of Unicode text")
2417 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2418 useful when integrating with legacy code that doesn't support Unicode, or for
2419 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2420 machine identifiers from human-readable Unicode strings that should still be
2421 somewhat intelligible.")
2422 (license license:gpl2+)))
2424 (define-public python2-unidecode
2425 (package-with-python2 python-unidecode))
2427 (define-public python-pyjwt
2429 (name "python-pyjwt")
2434 (uri (pypi-uri "PyJWT" version))
2437 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2438 (modules '((guix build utils)))
2441 (for-each delete-file-recursively
2442 (find-files "." "\\.pyc$"))
2444 (build-system python-build-system)
2446 `(("python-pytest" ,python-pytest)
2447 ("python-pytest-cov" ,python-pytest-cov)
2448 ("python-pytest-runner" ,python-pytest-runner)))
2449 (home-page "https://github.com/progrium/pyjwt")
2450 (synopsis "JSON Web Token implementation in Python")
2452 "PyJWT is a JSON Web Token implementation written in Python.")
2453 (license license:expat)))
2455 (define-public python2-pyjwt
2456 (package-with-python2 python-pyjwt))
2458 (define-public python-pykka
2460 (name "python-pykka")
2465 (uri (pypi-uri "Pykka" version))
2468 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2469 (build-system python-build-system)
2471 `(("python-mock" ,python-mock)
2472 ("python-nose" ,python-nose)
2473 ("python-gevent" ,python-gevent)
2474 ("python-eventlet" ,python-eventlet)))
2475 (home-page "https://www.pykka.org/")
2476 (synopsis "Pykka is a Python implementation of the actor model")
2478 "Pykka is a Python implementation of the actor model.
2479 The actor model introduces some simple rules to control the sharing
2480 of state and cooperation between execution units, which makes it
2481 easier to build concurrent applications.")
2482 (license license:asl2.0)))
2484 (define-public python2-pykka
2485 (package-with-python2 python-pykka))
2487 (define-public python-pymsgbox
2489 (name "python-pymsgbox")
2495 ;; LICENSE.txt is not present on pypi
2496 (url "https://github.com/asweigart/PyMsgBox")
2497 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2498 (file-name (git-file-name name version))
2501 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2503 ;; Circular dependency to run tests:
2504 ;; Tests need pyautogui, which depends on pymsgbox.
2506 (build-system python-build-system)
2507 (home-page "https://github.com/asweigart/PyMsgBox")
2508 (synopsis "Python module for JavaScript-like message boxes")
2510 "PyMsgBox is a simple, cross-platform, pure Python module for
2511 JavaScript-like message boxes. Types of dialog boxes include:
2519 (license license:bsd-3)))
2521 (define-public python-pympler
2523 (name "python-pympler")
2524 (home-page "https://pythonhosted.org/Pympler/")
2528 (uri (pypi-uri "Pympler" version))
2531 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2532 (build-system python-build-system)
2534 `(#:phases (modify-phases %standard-phases
2536 (add-after 'install 'check
2537 (lambda* (#:key inputs outputs #:allow-other-keys)
2538 (add-installed-pythonpath inputs outputs)
2539 (invoke "python" "setup.py" "test"))))))
2540 (synopsis "Measure, monitor and analyze memory behavior")
2542 "Pympler is a development tool to measure, monitor and analyze
2543 the memory behavior of Python objects in a running Python application.
2545 By pympling a Python application, detailed insight in the size and the
2546 lifetime of Python objects can be obtained. Undesirable or unexpected
2547 runtime behavior like memory bloat and other @samp{pymples} can easily
2550 A web profiling frontend exposes process statistics, garbage
2551 visualisation and class tracker statistics.")
2552 (license license:asl2.0)))
2554 (define-public python2-pympler
2555 (package-with-python2 python-pympler))
2557 (define-public python-itsdangerous
2559 (name "python-itsdangerous")
2564 (uri (pypi-uri "itsdangerous" version))
2567 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2568 (build-system python-build-system)
2569 (home-page "https://palletsprojects.com/p/itsdangerous/")
2570 (synopsis "Python library for passing data to/from untrusted environments")
2572 "Itsdangerous provides various helpers to pass trusted data to untrusted
2573 environments and back.")
2574 (license license:bsd-3)))
2576 (define-public python2-itsdangerous
2577 (package-with-python2 python-itsdangerous))
2579 (define-public python-pyyaml
2581 (name "python-pyyaml")
2586 (uri (pypi-uri "PyYAML" version))
2589 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
2590 (build-system python-build-system)
2592 `(("libyaml" ,libyaml)))
2593 (home-page "https://pyyaml.org")
2594 (synopsis "YAML parser and emitter for Python")
2596 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2597 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2598 API, and sensible error messages. PyYAML supports standard YAML tags and
2599 provides Python-specific tags that allow to represent an arbitrary Python
2601 (license license:expat)))
2603 (define-public python2-pyyaml
2604 (package-with-python2 python-pyyaml))
2606 (define-public python-vine
2608 (name "python-vine")
2613 (uri (pypi-uri "vine" version))
2616 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2617 (build-system python-build-system)
2619 `(("python-pytest" ,python-pytest)
2620 ("python-case" ,python-case)))
2621 (home-page "https://github.com/celery/vine")
2622 (synopsis "Promises for Python")
2624 "@code{vine} provides a special implementation of promises in that it can
2625 be used both for \"promise of a value\" and lazy evaluation. The biggest
2626 upside for this is that everything in a promise can also be a promise,
2627 e.g. filters, callbacks and errbacks can all be promises.")
2628 (license license:bsd-3)))
2630 (define-public python-virtualenv
2632 (name "python-virtualenv")
2637 (uri (pypi-uri "virtualenv" version))
2640 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
2641 (build-system python-build-system)
2643 `(("python-mock" ,python-mock)
2644 ("python-pytest" ,python-pytest)
2645 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2646 ;; be an input at all". However, removing the input makes the build error:
2647 ;; File "setup.py", line 4, in <module>
2648 ;; raise RuntimeError("setuptools >= 41 required to build")
2649 ("python-setuptools" ,python-setuptools)
2650 ("python-setuptools-scm" ,python-setuptools-scm)))
2652 `(("python-appdirs" ,python-appdirs)
2653 ("python-distlib" ,python-distlib)
2654 ("python-filelock" ,python-filelock)
2655 ("python-six" ,python-six)
2656 ("python-importlib-metadata" ,python-importlib-metadata)))
2657 (home-page "https://virtualenv.pypa.io/")
2658 (synopsis "Virtual Python environment builder")
2660 "Virtualenv is a tool to create isolated Python environments.")
2661 (properties `((python2-variant . ,(delay python2-virtualenv))))
2662 (license license:expat)))
2664 (define-public python2-virtualenv
2665 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2669 `(#:python ,python-2
2671 (modify-phases %standard-phases
2672 (add-after 'set-paths 'adjust-PYTHONPATH
2673 (lambda* (#:key inputs #:allow-other-keys)
2674 (let* ((python (assoc-ref inputs "python"))
2675 (python-sitedir (string-append python "/lib/python2.7"
2677 ;; XXX: 'python2' always comes first on PYTHONPATH
2678 ;; and shadows the 'setuptools' input. Move python2
2679 ;; last: this should be fixed in python-build-system
2680 ;; in a future rebuild cycle.
2681 (setenv "PYTHONPATH"
2682 (string-append (string-join (delete python-sitedir
2684 (getenv "PYTHONPATH")
2687 ":" python-sitedir))
2688 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2689 (getenv "PYTHONPATH"))
2692 `(("python-contextlib2" ,python2-contextlib2)
2693 ,@(package-propagated-inputs base))))))
2695 (define-public python-markupsafe
2697 (name "python-markupsafe")
2702 (uri (pypi-uri "MarkupSafe" version))
2705 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2706 (build-system python-build-system)
2708 `(#:modules ((ice-9 ftw)
2712 (guix build python-build-system))
2713 #:phases (modify-phases %standard-phases
2716 (let ((cwd (getcwd))
2717 (libdir (find (cut string-prefix? "lib." <>)
2718 (scandir "build"))))
2719 (setenv "PYTHONPATH"
2720 (string-append cwd "/build/" libdir ":"
2721 (getenv "PYTHONPATH")))
2722 (invoke "pytest" "-vv")))))))
2724 `(("python-pytest" ,python-pytest)))
2725 (home-page "https://github.com/mitsuhiko/markupsafe")
2726 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2728 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2730 (license license:bsd-3)))
2732 (define-public python2-markupsafe
2733 (package-with-python2 python-markupsafe))
2735 (define-public python-jinja2
2737 (name "python-jinja2")
2742 (uri (pypi-uri "Jinja2" version))
2745 "0l72c11n959yzb8d3ankckb6yhjhm6x729zm7rkpk040qzxpy64k"))))
2746 (build-system python-build-system)
2748 '(#:phases (modify-phases %standard-phases
2750 (lambda* (#:key tests? #:allow-other-keys)
2753 (setenv "PYTHONPATH"
2754 (string-append "./build/lib:"
2755 (getenv "PYTHONPATH")))
2756 (invoke "pytest" "-vv"))
2757 (format #t "test suite not run~%"))
2760 `(("python-pytest" ,python-pytest)))
2762 `(("python-markupsafe" ,python-markupsafe)))
2763 (home-page "http://jinja.pocoo.org/")
2764 (synopsis "Python template engine")
2766 "Jinja2 is a small but fast and easy to use stand-alone template engine
2767 written in pure Python.")
2768 (license license:bsd-3)))
2770 (define-public python2-jinja2
2771 (package-with-python2 python-jinja2))
2773 (define-public python-jinja2-time
2775 (name "python-jinja2-time")
2780 (uri (pypi-uri "jinja2-time" version))
2783 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2784 (build-system python-build-system)
2786 `(("python-arrow" ,python-arrow)
2787 ("python-jinja2" ,python-jinja2)))
2789 "https://github.com/hackebrot/jinja2-time")
2790 (synopsis "Jinja2 Extension for Dates and Times")
2792 "This package provides an extension for the template engine Jinja2. It
2793 adds a 'now' tag providing a convenient access to the arrow.now() API from
2794 templates. A format string can be provided to control the output.")
2795 (license license:expat)))
2797 (define-public python-pystache
2799 (name "python-pystache")
2803 (uri (pypi-uri "pystache" version))
2806 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2807 (build-system python-build-system)
2809 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2810 (home-page "http://defunkt.io/pystache/")
2811 (synopsis "Python logic-less template engine")
2813 "Pystache is a Python implementation of the framework agnostic,
2814 logic-free templating system Mustache.")
2815 (license license:expat)
2816 (properties `((python2-variant . ,(delay python2-pystache))))))
2818 (define-public python2-pystache
2819 (package (inherit (package-with-python2
2820 (strip-python2-variant python-pystache)))
2822 `(#:python ,python-2
2824 (modify-phases %standard-phases
2827 (invoke "python" "test_pystache.py"))))))))
2829 (define-public python-joblib
2831 (name "python-joblib")
2835 (uri (pypi-uri "joblib" version))
2838 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
2839 (build-system python-build-system)
2842 (modify-phases %standard-phases
2844 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2846 `(("python-pytest" ,python-pytest)))
2847 (home-page "https://joblib.readthedocs.io/")
2848 (synopsis "Using Python functions as pipeline jobs")
2850 "Joblib is a set of tools to provide lightweight pipelining in Python.
2851 In particular, joblib offers: transparent disk-caching of the output values
2852 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2853 logging and tracing of the execution.")
2854 (license license:bsd-3)))
2856 (define-public python2-joblib
2857 (package-with-python2 python-joblib))
2859 (define-public python-daemon
2861 (name "python-daemon")
2866 (uri (pypi-uri "python-daemon" version))
2869 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2870 (build-system python-build-system)
2873 (modify-phases %standard-phases
2874 (add-before 'check 'disable-tests
2876 ;; FIXME: Determine why test fails
2877 (substitute* "test/test_daemon.py"
2878 (("test_detaches_process_context")
2879 "skip_test_detaches_process_context"))
2882 `(("python-lockfile" ,python-lockfile)))
2884 `(("python-unittest2" ,python-unittest2)
2885 ("python-testtools" ,python-testtools)
2886 ("python-testscenarios" ,python-testscenarios)
2887 ("python-mock" ,python-mock)
2888 ("python-docutils" ,python-docutils)))
2889 (home-page "https://pagure.io/python-daemon/")
2890 (synopsis "Python library for making a Unix daemon process")
2891 (description "Python-daemon is a library that assists a Python program to
2892 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2894 This library provides a @code{DaemonContext} class that manages the following
2895 important tasks for becoming a daemon process:
2897 @item Detach the process into its own process group.
2898 @item Set process environment appropriate for running inside a chroot.
2899 @item Renounce suid and sgid privileges.
2900 @item Close all open file descriptors.
2901 @item Change the working directory, uid, gid, and umask.
2902 @item Set appropriate signal handlers.
2903 @item Open new file descriptors for stdin, stdout, and stderr.
2904 @item Manage a specified PID lock file.
2905 @item Register cleanup functions for at-exit processing.
2907 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2908 (license (list license:asl2.0 license:gpl3+))))
2910 (define-public python-anytree
2912 (name "python-anytree")
2916 (uri (pypi-uri "anytree" version))
2919 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2920 (build-system python-build-system)
2922 `(("python-six" ,python-six)))
2925 ("graphviz" ,graphviz) ;for 'dot'
2926 ("python-nose" ,python-nose)))
2927 (home-page "https://github.com/c0fec0de/anytree")
2928 (synopsis "Lightweight tree data library")
2930 "@code{anytree} is a simple, lightweight, and extensible tree data
2931 structure for Python.")
2932 (license license:asl2.0)))
2934 (define-public python-docutils
2936 (name "python-docutils")
2941 (uri (pypi-uri "docutils" version))
2944 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
2945 (build-system python-build-system)
2947 '(#:phases (modify-phases %standard-phases
2949 (lambda* (#:key tests? #:allow-other-keys)
2951 (invoke "python" "test/alltests.py")
2952 (format #t "test suite not run~%"))
2954 (home-page "http://docutils.sourceforge.net/")
2955 (synopsis "Python Documentation Utilities")
2957 "Docutils is a modular system for processing documentation into useful
2958 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2960 ;; Most of the source code is public domain, but some source files are
2961 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2962 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2964 (define-public python2-docutils
2965 (package-with-python2 python-docutils))
2967 ;; python2-sphinx fails its test suite with newer versions.
2968 (define-public python2-docutils-0.14
2970 (inherit python2-docutils)
2974 (uri (pypi-uri "docutils" version))
2977 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
2979 (define-public python-pygments
2981 (name "python-pygments")
2986 (uri (pypi-uri "Pygments" version))
2989 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
2990 (build-system python-build-system)
2992 ;; FIXME: Tests require sphinx, which depends on this.
2994 (home-page "https://pygments.org/")
2995 (synopsis "Syntax highlighting")
2997 "Pygments is a syntax highlighting package written in Python.")
2998 (license license:bsd-2)))
3000 (define-public python2-pygments
3001 (package-with-python2 python-pygments))
3003 (define-public python-bumpversion
3005 (name "python-bumpversion")
3010 (uri (pypi-uri "bumpversion" version))
3013 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3014 (build-system python-build-system)
3015 (home-page "https://github.com/peritus/bumpversion")
3016 (synopsis "Tool to bump software version")
3017 (description "This tool provides a command-line interface (CLI) to bump a
3018 software version simply.")
3019 (license license:expat)))
3021 (define-public python-deprecated
3023 (name "python-deprecated")
3029 (url "https://github.com/tantale/deprecated.git")
3030 (commit (string-append "v" version))))
3031 (file-name (git-file-name name version))
3034 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3035 (build-system python-build-system)
3037 `(#:phases (modify-phases %standard-phases
3040 (invoke "pytest"))))))
3042 `(("python-wrapt" ,python-wrapt)))
3044 `(("python-bumpversion" ,python-bumpversion)
3045 ("python-pytest" ,python-pytest)
3046 ("python-pytest-cov" ,python-pytest-cov)
3047 ("python-sphinx" ,python-sphinx)
3048 ("python-tox" ,python-tox)))
3049 (home-page "https://github.com/tantale/deprecated")
3050 (synopsis "Python decorator to deprecate classes, functions or methods")
3051 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3052 to deprecate classes, functions or methods.")
3053 (license license:expat)))
3055 (define-public python-pygithub
3057 (name "python-pygithub")
3060 ;; We fetch from the Git repo because there are no tests in the PyPI
3065 (url "https://github.com/PyGithub/PyGithub.git")
3066 (commit (string-append "v" version))))
3067 (file-name (git-file-name name version))
3069 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3070 (build-system python-build-system)
3072 `(#:phases (modify-phases %standard-phases
3073 ;; Some tests rely on the network.
3074 (add-after 'unpack 'disable-failing-tests
3076 (substitute* "tests/Issue142.py"
3077 (("testDecodeJson") "disabled_testDecodeJson"))
3079 (add-before 'check 'prepare-for-tests
3081 (for-each (lambda (f)
3083 (find-files "./tests"))
3084 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3085 (setenv "PYTHONPATH"
3086 (string-append "./tests:" (getenv "PYTHONPATH")))
3089 `(("python-deprecated" ,python-deprecated)
3090 ("python-pyjwt" ,python-pyjwt)
3091 ("python-requests" ,python-requests)))
3092 (native-inputs `(("python-httpretty" ,python-httpretty)))
3093 (home-page "https://pygithub.readthedocs.io/en/latest/")
3094 (synopsis "Python library for the GitHub API")
3095 (description "This library allows managing GitHub resources such as
3096 repositories, user profiles, and organizations in your Python applications,
3097 using version 3 of the GitHub application programming interface (API).")
3098 (license license:lgpl3+)))
3100 (define-public python-rellu
3102 (name "python-rellu")
3107 (uri (pypi-uri "rellu" version))
3110 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3111 (build-system python-build-system)
3113 `(("python-invoke" ,python-invoke)
3114 ("python-pygithub" ,python-pygithub)))
3115 (home-page "https://github.com/robotframework/rellu")
3116 (synopsis "Utilities to create PyPI releases")
3117 (description "This collection of utilities contains tooling and templates
3118 to assist in creating releases on GitHub and publishing them on PyPI. It is
3119 designed to be used by Robot Framework and tools and libraries in its
3120 ecosystem, but can naturally be used also by other projects.")
3121 (license license:asl2.0)))
3123 (define-public python-robotframework
3125 (name "python-robotframework")
3127 ;; There are no tests in the PyPI archive.
3132 (url "https://github.com/robotframework/robotframework.git")
3133 (commit (string-append "v" version))))
3134 (file-name (git-file-name name version))
3136 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
3137 (patches (search-patches
3138 "python-robotframework-honor-source-date-epoch.patch"))))
3139 (build-system python-build-system)
3141 `(#:phases (modify-phases %standard-phases
3142 (add-before 'build 'build-and-install-doc
3143 (lambda* (#:key outputs #:allow-other-keys)
3144 (let* ((doc-output (assoc-ref outputs "doc"))
3145 (doc (string-append doc-output "/share/"
3146 ,name "-" ,version "/")))
3147 (invoke "invoke" "library-docs" "all")
3149 (copy-recursively "doc/libraries"
3150 (string-append doc "/libraries"))
3154 (invoke "python" "utest/run.py"))))))
3156 `(("python-invoke" ,python-invoke)
3157 ("python-rellu" ,python-rellu)
3158 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3159 (outputs '("out" "doc"))
3160 (home-page "https://robotframework.org")
3161 (synopsis "Generic automation framework")
3162 (description "Robot Framework is a generic automation framework for
3163 acceptance testing, acceptance test driven development (ATDD), and robotic
3164 process automation (RPA).")
3165 (license license:asl2.0)))
3167 (define-public python-robotframework-lint
3168 ;; There is no properly tagged release; the commit below seems to correspond
3169 ;; to the 0.9 stable release available from PyPI. The tests are not
3170 ;; included in the PyPI archive, so we fetch the sources from the upstream
3172 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3175 (name "python-robotframework-lint")
3176 (version (git-version "0.9.0" revision commit))
3181 (url "https://github.com/boakley/robotframework-lint.git")
3183 (file-name (git-file-name name version))
3186 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3187 (build-system python-build-system)
3190 (modify-phases %standard-phases
3193 (invoke "python" "-m" "robot" "-A"
3194 "tests/conf/default.args" "tests"))))))
3196 `(("python-robotframework" ,python-robotframework)))
3197 (home-page "https://github.com/boakley/robotframework-lint/")
3198 (synopsis "Static analysis tool (linter) for Robot Framework")
3199 (description "This package provides the @code{rflint} command-line
3200 utility, a static analysis tool (linter) for Robot Framework source files.")
3201 (license license:asl2.0))))
3203 (define-public python-robotframework-sshlibrary
3205 (name "python-robotframework-sshlibrary")
3207 ;; There are no tests in the PyPI archive.
3212 (url "https://github.com/robotframework/SSHLibrary.git")
3213 (commit (string-append "v" version))))
3214 (file-name (git-file-name name version))
3217 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3218 (build-system python-build-system)
3221 (modify-phases %standard-phases
3222 (add-before 'build 'build-and-install-doc
3223 (lambda* (#:key outputs #:allow-other-keys)
3224 (let* ((doc-output (assoc-ref outputs "doc"))
3225 (doc (string-append doc-output "/share/"
3226 ,name "-" ,version "/")))
3227 (invoke "chmod" "-R" "+w" "docs")
3228 (invoke "invoke" "kw-docs" "project-docs")
3230 (for-each delete-file (find-files "docs" "\\.rst"))
3231 (copy-recursively "docs" doc)
3235 ;; Some tests require an SSH server; we remove them.
3236 (delete-file "utest/test_client_api.py")
3237 (delete-file "utest/test_scp.py")
3238 (invoke "python" "utest/run.py"))))))
3240 `(("python-robotframework" ,python-robotframework)
3241 ("python-paramiko" ,python-paramiko)
3242 ("python-scp" ,python-scp)))
3244 `(("openssh" ,openssh)
3246 ;; To generate the documentation
3247 ("python-docutils" ,python-docutils)
3248 ("python-invoke" ,python-invoke)
3249 ("python-pygments" ,python-pygments)
3250 ("python-rellu" ,python-rellu)))
3251 (outputs '("out" "doc"))
3252 (home-page "https://github.com/robotframework/SSHLibrary")
3253 (synopsis "Robot Framework library for SSH and SFTP")
3254 (description "SSHLibrary is a Robot Framework library providing support
3255 for SSH and SFTP. It has the following main usages:
3257 @item Executing commands on the remote machine, either blocking or non-blocking.
3258 @item Writing and reading in an interactive shell.
3259 @item Transferring files and directories over SFTP.
3260 @item Ensuring that files and directories exist on the remote machine.
3262 (license license:asl2.0)))
3264 (define-public python-rstr
3266 (name "python-rstr")
3271 (uri (pypi-uri "rstr" version))
3274 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3275 (build-system python-build-system)
3277 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3278 (synopsis "Generate random strings in Python")
3279 (description "This package provides a python module for generating
3280 random strings of various types. It could be useful for fuzz testing,
3281 generating dummy data, or other applications. It has no dependencies
3282 outside the standard library.")
3283 (license license:bsd-3)))
3285 (define-public python-scp
3292 (uri (pypi-uri "scp" version))
3295 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3296 (build-system python-build-system)
3298 '(#:tests? #f)) ;tests require an SSH server
3300 `(("python-paramiko" ,python-paramiko)))
3301 (home-page "https://github.com/jbardin/scp.py")
3302 (synopsis "SCP protocol module for Python and Paramiko")
3303 (description "The scp module extends the Paramiko library to send and
3304 receive files via the SCP1 protocol, as implemented by the OpenSSH
3305 @command{scp} program.")
3306 (license license:gpl2+)))
3308 (define-public python-rst.linker
3310 (name "python-rst.linker")
3315 (uri (pypi-uri "rst.linker" version))
3317 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3318 (build-system python-build-system)
3320 `(("python-dateutil" ,python-dateutil)
3321 ("python-six" ,python-six)))
3323 `(("python-setuptools-scm" ,python-setuptools-scm)))
3324 ;; Test would require path.py, which would introduce a cyclic dependence.
3325 (arguments `(#:tests? #f))
3326 ;; Note: As of version 1.7 the documentation is not worth building.
3327 (home-page "https://github.com/jaraco/rst.linker")
3328 (synopsis "Sphinx plugin to add links and timestamps")
3329 (description "rst.linker allows to automatically replace text by a
3330 reStructuredText external reference or timestamps. It's primary purpose is to
3331 augment the changelog, but it can be used for other documents, too.")
3332 (license license:expat)))
3334 (define-public python2-rst.linker
3335 (package-with-python2 python-rst.linker))
3337 (define-public python-feedgenerator
3339 (name "python-feedgenerator")
3344 (uri (pypi-uri "feedgenerator" version))
3347 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3348 (modules '((guix build utils)))
3351 ;; Remove pre-compiled .pyc files from source.
3352 (for-each delete-file-recursively
3353 (find-files "." "__pycache__" #:directories? #t))
3354 (for-each delete-file (find-files "." "\\.pyc$"))
3356 (build-system python-build-system)
3358 `(("python-pytz" ,python-pytz)
3359 ("python-six" ,python-six)))
3360 (home-page "https://github.com/getpelican/feedgenerator")
3362 "Standalone version of Django's Atom/RSS feed generator")
3364 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3365 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3366 (license license:bsd-3)))
3368 (define-public python2-feedgenerator
3369 (package-with-python2 python-feedgenerator))
3371 (define-public python-toml
3373 (name "python-toml")
3378 (uri (pypi-uri "toml" version))
3381 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3382 (build-system python-build-system)
3384 `(#:tests? #f)) ;no tests suite in release
3385 (home-page "https://github.com/uiri/toml")
3386 (synopsis "Library for TOML")
3388 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3389 Language (TOML) configuration files.")
3390 (license license:expat)))
3392 (define-public python-jsonrpc-server
3394 (name "python-jsonrpc-server")
3399 (uri (pypi-uri "python-jsonrpc-server" version))
3402 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3403 (build-system python-build-system)
3405 `(("python-future" ,python-future)
3406 ("python-mock" ,python-mock)
3407 ("python-pytest" ,python-pytest)
3408 ("python-ujson" ,python-ujson)))
3410 "https://github.com/palantir/python-jsonrpc-server")
3411 (synopsis "JSON RPC 2.0 server library")
3413 "This package provides a JSON RPC 2.0 server library for Python.")
3414 (license license:expat)))
3416 (define-public python-pydocstyle
3418 (name "python-pydocstyle")
3423 (uri (pypi-uri "pydocstyle" version))
3426 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3427 (build-system python-build-system)
3429 `(("python-six" ,python-six)
3430 ("python-snowballstemmer" ,python-snowballstemmer)))
3432 "https://github.com/PyCQA/pydocstyle/")
3433 (synopsis "Python docstring style checker")
3435 "This package provides a style checker for the Python Language
3437 (license license:expat)))
3439 (define-public python-language-server
3441 (name "python-language-server")
3446 (uri (pypi-uri "python-language-server" version))
3449 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
3450 (build-system python-build-system)
3452 `(("python-pluggy" ,python-pluggy)
3453 ("python-jsonrpc-server" ,python-jsonrpc-server)
3454 ("python-jedi" ,python-jedi)
3455 ("python-yapf" ,python-yapf)
3456 ("python-pyflakes" ,python-pyflakes)
3457 ("python-pydocstyle" ,python-pydocstyle)
3458 ("python-pycodestyle" ,python-pycodestyle)
3459 ("python-mccabe" ,python-mccabe)
3460 ("python-rope" ,python-rope)
3461 ("python-autopep8" ,python-autopep8)
3462 ("python-flake8" ,python-flake8)
3463 ("python-pylint" ,python-pylint)))
3464 (home-page "https://github.com/palantir/python-language-server")
3465 (synopsis "Python implementation of the Language Server Protocol")
3467 "The Python Language Server (pyls) is an implementation of the Python 3
3468 language specification for the Language Server Protocol (LSP). This tool is
3469 used in text editing environments to provide a complete and integrated
3470 feature-set for programming Python effectively.")
3471 (license license:expat)))
3473 (define-public python-pathspec
3475 (name "python-pathspec")
3480 (uri (pypi-uri "pathspec" version))
3483 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3484 (build-system python-build-system)
3485 (home-page "https://github.com/cpburnz/python-path-specification")
3486 (synopsis "Utility library for gitignore style pattern matching of file paths")
3488 "This package provides a utility library for gitignore style pattern
3489 matching of file paths.")
3490 (license license:mpl2.0)))
3492 (define-public python-black
3494 (name "python-black")
3499 (uri (pypi-uri "black" version))
3502 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
3503 (build-system python-build-system)
3506 (modify-phases %standard-phases
3507 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3509 (let ((python3 (which "python3")))
3510 (substitute* '("tests/data/fmtonoff.py"
3511 "tests/data/string_prefixes.py"
3512 "tests/data/function.py"
3513 "tests/data/python37.py")
3514 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3515 (string-append "#!" python3 (if (string? minor-version)
3519 (add-after 'unpack 'disable-broken-tests
3521 ;; These tests are supposed to be skipped when the blackd
3522 ;; dependencies are missing, but this doesn't quite work.
3523 (substitute* "tests/test_black.py"
3524 (("( *)class BlackDTestCase.*" match indent)
3525 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3526 indent "class BlackDTestCase(unittest.TestCase):\n"))
3527 (("web.Application") "False")
3528 (("@unittest_run_loop") ""))
3530 ;; Patching the above file breaks the self test
3531 (substitute* "tests/test_black.py"
3532 (("( *)def test_self" match indent)
3533 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3536 `(("python-click" ,python-click)
3537 ("python-attrs" ,python-attrs)
3538 ("python-appdirs" ,python-appdirs)
3539 ("python-pathspec" ,python-pathspec)
3540 ("python-regex" ,python-regex)
3541 ("python-toml" ,python-toml)
3542 ("python-typed-ast" ,python-typed-ast)))
3544 `(("python-setuptools-scm" ,python-setuptools-scm)))
3545 (home-page "https://github.com/ambv/black")
3546 (synopsis "The uncompromising code formatter")
3547 (description "Black is the uncompromising Python code formatter.")
3548 (license license:expat)))
3550 (define-public python-blinker
3552 (name "python-blinker")
3557 (uri (pypi-uri "blinker" version))
3560 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3561 (build-system python-build-system)
3562 (home-page "https://pythonhosted.org/blinker/")
3563 (synopsis "Fast, simple object-to-object and broadcast signaling")
3565 "Blinker provides a fast dispatching system that allows any number of
3566 interested parties to subscribe to events, or \"signals\".")
3567 (license license:expat)))
3569 (define-public python2-blinker
3570 (package-with-python2 python-blinker))
3572 (define-public pelican
3579 (uri (pypi-uri "pelican" version))
3582 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3583 (build-system python-build-system)
3585 `(("python-blinker" ,python-blinker)
3586 ("python-dateutil" ,python-dateutil)
3587 ("python-docutils" ,python-docutils)
3588 ("python-feedgenerator" ,python-feedgenerator)
3589 ("python-jinja2" ,python-jinja2)
3590 ("python-markdown" ,python-markdown)
3591 ("python-pygments" ,python-pygments)
3592 ("python-pytz" ,python-pytz)
3593 ("python-six" ,python-six)
3594 ("python-unidecode" ,python-unidecode)))
3595 (home-page "https://getpelican.com/")
3597 `(;; XXX Requires a lot more packages to do unit tests :P
3599 (synopsis "Python-based static site publishing system")
3601 "Pelican is a tool to generate a static blog from reStructuredText,
3602 Markdown input files, and more. Pelican uses Jinja2 for templating
3603 and is very extensible.")
3604 (license license:agpl3+)))
3606 (define-public mallard-ducktype
3608 (name "mallard-ducktype")
3613 ;; git-reference because tests are not included in pypi source tarball
3614 ;; https://issues.guix.gnu.org/issue/36755#2
3616 (url "https://github.com/projectmallard/mallard-ducktype.git")
3618 (file-name (git-file-name name version))
3621 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3622 (build-system python-build-system)
3625 (modify-phases %standard-phases
3628 (with-directory-excursion "tests"
3629 (invoke "sh" "runtests")))))))
3630 (home-page "http://projectmallard.org")
3631 (synopsis "Convert Ducktype to Mallard documentation markup")
3633 "Ducktype is a lightweight syntax that can represent all the semantics
3634 of the Mallard XML documentation system. Ducktype files can be converted to
3635 Mallard using the @command{ducktype} tool. The yelp-tools package
3636 provides additional functionality on the produced Mallard documents.")
3637 (license license:expat)))
3639 (define-public python-cython
3641 (name "python-cython")
3646 (uri (pypi-uri "Cython" version))
3649 "0c5cjyxfvba6c0vih1fvhywp8bpz30vwvbjqdm1q1k55xzhmkn30"))))
3650 (build-system python-build-system)
3651 ;; we need the full python package and not just the python-wrapper
3652 ;; because we need libpython3.3m.so
3654 `(("python" ,python)))
3657 (modify-phases %standard-phases
3658 (add-before 'check 'set-HOME
3659 ;; some tests require access to "$HOME/.cython"
3660 (lambda _ (setenv "HOME" "/tmp") #t))
3663 ;; Disable compiler optimizations to greatly reduce the running
3664 ;; time of the test suite.
3665 (setenv "CFLAGS" "-O0")
3667 (invoke "python" "runtests.py" "-vv"
3668 "-j" (number->string (parallel-job-count))))))))
3669 (home-page "https://cython.org/")
3670 (synopsis "C extensions for Python")
3671 (description "Cython is an optimising static compiler for both the Python
3672 programming language and the extended Cython programming language. It makes
3673 writing C extensions for Python as easy as Python itself.")
3674 (license license:asl2.0)
3675 (properties `((python2-variant . ,(delay python2-cython))))))
3677 (define-public python2-cython
3678 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3681 (name "python2-cython")
3683 `(("python-2" ,python-2))) ;this is not automatically changed
3685 (substitute-keyword-arguments (package-arguments base)
3687 `(modify-phases ,phases
3688 ;; XXX: On i686-linux, running the parallel tests fails on many-core
3689 ;; systems, see <https://github.com/cython/cython/issues/2807>.
3690 ;; TODO: Move this logic to the regular check phase in a future
3692 ,@(if (string-prefix? "i686" (%current-system))
3695 (setenv "CFLAGS" "-O0")
3696 (invoke "python" "runtests.py" "-vv"
3697 "-j" (number->string (parallel-job-count))
3698 "-x" "run.parallel"))))
3700 (add-before 'check 'adjust-test_embed
3702 (substitute* "runtests.py"
3703 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3704 ;; so it can give the right -L flag to GCC when embedding static
3705 ;; builds of Python. It is unaware that the Python "config"
3706 ;; directory (where the static library lives) was renamed in
3707 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3708 ;; which works fine, because that is where the shared library is.
3710 ;; It also appears to be unaware that the Makefile in Demos/embed
3711 ;; already unconditionally pass the static library location to GCC,
3712 ;; after checking sysconfig.get_config_var('LIBPL).
3714 ;; The effect is that the linker is unable to resolve libexpat
3715 ;; symbols when building for Python 2, because neither the Python 2
3716 ;; shared library nor Expat is available. To fix it, we can either
3717 ;; add Expat as an input and make it visible to the linker, or just
3718 ;; prevent it from overriding the Python shared library location.
3719 ;; The end result is identical, so we take the easy route.
3720 ((" or libname not in os\\.listdir\\(libdir\\)")
3724 ;; The RPython toolchain currently does not support Python 3.
3725 (define-public python2-rpython
3727 (name "python2-rpython")
3732 (uri (pypi-uri "rpython" version))
3735 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3736 (build-system python-build-system)
3737 (arguments `(#:python ,python-2))
3739 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3740 (home-page "https://rpython.readthedocs.org")
3741 (synopsis "Framework for implementing interpreters and virtual machines")
3742 (description "RPython is a translation and support framework for
3743 producing implementations of dynamic languages, emphasizing a clean separation
3744 between language specification and implementation aspects.")
3745 (license license:expat)))
3747 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3748 ;; python-scipy still build, as these three packages are often used together.
3749 (define-public python-numpy
3751 (name "python-numpy")
3757 "https://github.com/numpy/numpy/releases/download/v"
3758 version "/numpy-" version ".tar.gz"))
3761 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3762 (build-system python-build-system)
3764 `(("openblas" ,openblas)
3765 ("lapack" ,lapack)))
3767 `(("python-cython" ,python-cython)
3768 ("python-pytest" ,python-pytest)
3769 ("gfortran" ,gfortran)))
3772 (modify-phases %standard-phases
3773 (add-before 'build 'configure-blas-lapack
3774 (lambda* (#:key inputs #:allow-other-keys)
3775 (call-with-output-file "site.cfg"
3779 libraries = openblas
3780 library_dirs = ~a/lib
3781 include_dirs = ~a/include
3783 # backslash-n to make emacs happy
3785 lapack_libs = lapack
3786 library_dirs = ~a/lib
3787 include_dirs = ~a/include
3789 (assoc-ref inputs "openblas")
3790 (assoc-ref inputs "openblas")
3791 (assoc-ref inputs "lapack")
3792 (assoc-ref inputs "lapack"))))
3794 (add-before 'build 'fix-executable-paths
3795 (lambda* (#:key inputs #:allow-other-keys)
3796 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3797 ;; instead of /bin/sh.
3798 (substitute* "numpy/distutils/exec_command.py"
3799 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3800 (string-append match-start (assoc-ref inputs "bash") match-end)))
3801 ;; Use "gcc" executable, not "cc".
3802 (substitute* "numpy/distutils/system_info.py"
3803 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3804 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3806 ;; Tests can only be run after the library has been installed and not
3807 ;; within the source directory.
3809 (add-after 'install 'check
3810 (lambda* (#:key outputs inputs #:allow-other-keys)
3811 ;; Make installed package available for running the tests
3812 (add-installed-pythonpath inputs outputs)
3813 ;; Make sure "f2py" etc is found.
3814 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3815 ":" (getenv "PATH")))
3816 (with-directory-excursion "/tmp"
3817 (invoke "python" "-c"
3818 "import numpy; numpy.test(verbose=2)")))))))
3819 (home-page "https://numpy.org")
3820 (synopsis "Fundamental package for scientific computing with Python")
3821 (description "NumPy is the fundamental package for scientific computing
3822 with Python. It contains among other things: a powerful N-dimensional array
3823 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3824 and Fortran code, useful linear algebra, Fourier transform, and random number
3826 (properties `((python2-variant . ,(delay python2-numpy))))
3827 (license license:bsd-3)))
3829 ;; Numpy 1.16.x are the last versions that support Python 2.
3830 (define-public python2-numpy
3831 (let ((numpy (package-with-python2
3832 (strip-python2-variant python-numpy))))
3839 "https://github.com/numpy/numpy/releases/download/v"
3840 version "/numpy-" version ".tar.gz"))
3843 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3845 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3846 ;; interest only for legacy code going back to NumPy's predecessor
3848 (define-public python2-numpy-1.8
3849 (package (inherit python2-numpy)
3855 (url "https://github.com/numpy/numpy")
3856 (commit (string-append "v" version))))
3857 (file-name (git-file-name "numpy" version))
3860 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3862 (substitute-keyword-arguments (package-arguments python2-numpy)
3864 `(modify-phases ,phases
3865 (replace 'configure-blas-lapack
3866 (lambda* (#:key inputs #:allow-other-keys)
3867 (call-with-output-file "site.cfg"
3871 libraries = openblas,lapack
3872 library_dirs = ~a/lib:~a/lib
3873 include_dirs = ~a/include:~a/include
3875 (assoc-ref inputs "openblas")
3876 (assoc-ref inputs "lapack")
3877 (assoc-ref inputs "openblas")
3878 (assoc-ref inputs "lapack"))))
3881 `(("python2-nose" ,python2-nose)))
3882 (description "NumPy is the fundamental package for scientific computing
3883 with Python. It contains among other things: a powerful N-dimensional array
3884 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3885 and Fortran code, useful linear algebra, Fourier transform, and random number
3886 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3887 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3889 (license license:bsd-3)))
3891 (define-public python-munch
3893 (name "python-munch")
3898 (uri (pypi-uri "munch" version))
3901 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3902 (build-system python-build-system)
3903 (home-page "https://github.com/Infinidat/munch")
3904 (synopsis "Dot-accessible dictionary")
3905 (description "Munch is a dot-accessible dictionary similar to JavaScript
3907 (license license:expat)))
3909 (define-public python2-munch
3910 (package-with-python2 python-munch))
3912 (define-public python-colormath
3914 (name "python-colormath")
3919 (uri (pypi-uri "colormath" version))
3922 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3923 (build-system python-build-system)
3925 `(("python-networkx" ,python-networkx)
3926 ("python-numpy" ,python-numpy)))
3927 (home-page "https://github.com/gtaylor/python-colormath")
3928 (synopsis "Color math and conversion library")
3930 "This is a Python library for color math and conversions.")
3931 (license license:bsd-3)))
3933 (define-public python2-colormath
3934 (package-with-python2 python-colormath))
3936 (define-public python-spectra
3938 (name "python-spectra")
3943 (uri (pypi-uri "spectra" version))
3946 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3947 (build-system python-build-system)
3950 (modify-phases %standard-phases
3952 (lambda _ (invoke "nosetests" "-v"))))))
3954 `(("python-colormath" ,python-colormath)))
3956 `(("python-nose" ,python-nose)))
3957 (home-page "https://github.com/jsvine/spectra")
3958 (synopsis "Color scales and color conversion")
3960 "This package provides a Python library intended to make color math,
3961 color scales, and color space conversion easy. It has support for:
3966 @item Color blending
3967 @item Brightening/darkening colors
3968 @item Saturating/desaturating colors
3969 @item Conversion to/from multiple color spaces.
3971 (license license:expat)))
3973 (define-public python2-spectra
3974 (package-with-python2 python-spectra))
3976 (define-public python-numpy-documentation
3978 (name "python-numpy-documentation")
3979 (version (package-version python-numpy))
3980 (source (package-source python-numpy))
3981 (build-system python-build-system)
3983 `(("python-matplotlib" ,python-matplotlib)
3984 ("python-numpy" ,python-numpy)
3985 ("pkg-config" ,pkg-config)
3986 ("python-sphinx" ,python-sphinx)
3987 ("python-numpydoc" ,python-numpydoc)
3988 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3990 texlive-generic-ifxetex
3991 texlive-generic-pdftex
3993 texlive-latex-capt-of
3995 texlive-latex-environ
3996 texlive-latex-eqparbox
3997 texlive-latex-etoolbox
3998 texlive-latex-expdlist
3999 texlive-latex-fancyhdr
4000 texlive-latex-fancyvrb
4001 texlive-latex-fncychap
4003 texlive-latex-framed
4004 texlive-latex-geometry
4005 texlive-latex-graphics
4006 texlive-latex-hyperref
4007 texlive-latex-mdwtools
4008 texlive-latex-multirow
4009 texlive-latex-needspace
4010 texlive-latex-oberdiek
4011 texlive-latex-parskip
4012 texlive-latex-preview
4013 texlive-latex-tabulary
4014 texlive-latex-threeparttable
4015 texlive-latex-titlesec
4016 texlive-latex-trimspaces
4018 texlive-latex-upquote
4020 texlive-latex-varwidth
4021 texlive-latex-wrapfig)))
4022 ("texinfo" ,texinfo)
4024 ("scipy-sphinx-theme"
4025 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4028 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4029 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4032 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4033 ,@(package-native-inputs python-numpy)))
4035 `(#:tests? #f ; we're only generating the documentation
4037 (modify-phases %standard-phases
4040 (lambda* (#:key inputs outputs #:allow-other-keys)
4041 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4043 data "/doc/" ,name "-"
4044 ,(package-version python-numpy)))
4045 (info-reader (string-append data "/info"))
4046 (html (string-append doc "/html"))
4047 (scipy-sphinx-theme "scipy-sphinx-theme")
4048 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4049 (pyver ,(string-append "PYVER=")))
4051 ;; FIXME: this is needed to for texlive-union to generate
4052 ;; fonts, which are not found.
4053 (setenv "HOME" "/tmp")
4055 (with-directory-excursion "doc"
4056 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4058 (invoke "make" "html" pyver)
4059 (invoke "make" "latex" "PAPER=a4" pyver)
4060 (invoke "make" "-C" "build/latex"
4061 "all-pdf" "PAPER=a4" pyver)
4062 ;; FIXME: Generation of the info file fails.
4063 ;; (invoke "make" "info" pyver)
4065 ;; (copy-file "build/texinfo/numpy.info"
4066 ;; (string-append info "/numpy.info"))
4067 (for-each (lambda (file)
4068 (copy-file (string-append "build/latex" file)
4069 (string-append doc file)))
4070 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4071 (with-directory-excursion "build/html"
4072 (for-each (lambda (file)
4073 (let* ((dir (dirname file))
4074 (tgt-dir (string-append html "/" dir)))
4075 (unless (equal? "." dir)
4077 (install-file file html)))
4078 (find-files "." ".*")))))
4080 (home-page (package-home-page python-numpy))
4081 (synopsis "Documentation for the python-numpy package")
4082 (description (package-description python-numpy))
4083 (license (package-license python-numpy))))
4085 (define-public python2-numpy-documentation
4086 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4088 (inherit numpy-documentation)
4089 (native-inputs `(("python2-functools32" ,python2-functools32)
4090 ,@(package-native-inputs numpy-documentation))))))
4092 (define-public python-pygit2
4094 (name "python-pygit2")
4099 (uri (pypi-uri "pygit2" version))
4101 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4102 (build-system python-build-system)
4104 '(#:tests? #f)) ; tests don't run correctly in our environment
4106 `(("python-cached-property" ,python-cached-property)
4107 ("python-cffi" ,python-cffi)
4108 ("libgit2" ,libgit2)))
4110 `(("python-pytest" ,python-pytest)))
4111 (home-page "https://github.com/libgit2/pygit2")
4112 (synopsis "Python bindings for libgit2")
4113 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4114 library, libgit2 implements Git plumbing.")
4115 ;; GPL2.0 only, with linking exception.
4116 (license license:gpl2)))
4118 (define-public python-pyparsing
4120 (name "python-pyparsing")
4125 (uri (pypi-uri "pyparsing" version))
4127 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
4128 (build-system python-build-system)
4129 (outputs '("out" "doc"))
4131 `(#:tests? #f ; no test target
4133 (modify-phases %standard-phases
4134 (add-after 'install 'install-doc
4135 (lambda* (#:key outputs #:allow-other-keys)
4136 (let* ((doc (string-append (assoc-ref outputs "doc")
4137 "/share/doc/" ,name "-" ,version))
4138 (html-doc (string-append doc "/html"))
4139 (examples (string-append doc "/examples")))
4145 (install-file file tgt))
4146 (find-files dir ".*")))
4147 (list "docs" "htmldoc" "examples")
4148 (list doc html-doc examples))
4150 (home-page "https://github.com/pyparsing/pyparsing")
4151 (synopsis "Python parsing class library")
4153 "The pyparsing module is an alternative approach to creating and
4154 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4155 of regular expressions. The pyparsing module provides a library of classes
4156 that client code uses to construct the grammar directly in Python code.")
4157 (license license:expat)))
4159 (define-public python2-pyparsing
4160 (package-with-python2 python-pyparsing))
4162 (define-public python-numpydoc
4164 (name "python-numpydoc")
4169 (uri (pypi-uri "numpydoc" version))
4172 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4173 (build-system python-build-system)
4175 `(("python-sphinx" ,python-sphinx)))
4177 `(("python-nose" ,python-nose)))
4178 (home-page "https://pypi.org/project/numpydoc/")
4180 "Numpy's Sphinx extensions")
4182 "Sphinx extension to support docstrings in Numpy format.")
4183 (license license:bsd-2)))
4185 (define-public python2-numpydoc
4186 (package-with-python2 python-numpydoc))
4188 (define-public python-numexpr
4190 (name "python-numexpr")
4195 (uri (pypi-uri "numexpr" version))
4198 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4199 (build-system python-build-system)
4200 (arguments `(#:tests? #f)) ; no tests included
4202 `(("python-numpy" ,python-numpy)))
4203 (home-page "https://github.com/pydata/numexpr")
4204 (synopsis "Fast numerical expression evaluator for NumPy")
4206 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4207 expressions that operate on arrays are accelerated and use less memory than
4208 doing the same calculation in Python. In addition, its multi-threaded
4209 capabilities can make use of all your cores, which may accelerate
4210 computations, most specially if they are not memory-bounded (e.g. those using
4211 transcendental functions).")
4212 (license license:expat)))
4214 (define-public python2-numexpr
4215 (package-with-python2 python-numexpr))
4217 (define-public python-cycler
4219 (name "python-cycler")
4223 (uri (pypi-uri "cycler" version))
4226 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4227 (build-system python-build-system)
4229 ;; XXX: The current version requires 'coveralls' which we don't have.
4230 ;; Enable this for the next release which uses 'python-pytest'.
4233 `(("python-six" ,python-six)))
4234 (home-page "http://matplotlib.org/cycler/")
4235 (synopsis "Composable keyword argument iterator")
4237 "When using @code{matplotlib} and plotting more than one line, it is
4238 common to want to be able to want to be able to cycle over one or more artist
4239 styles; but the plotting logic can quickly become involved.
4240 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4241 @code{Cycler} class was developed.")
4242 (license license:bsd-3)))
4244 (define-public python2-cycler
4245 (package-with-python2 python-cycler))
4247 (define-public python-colorspacious
4249 (name "python-colorspacious")
4255 (url "https://github.com/njsmith/colorspacious.git")
4256 (commit (string-append "v" version))))
4257 (file-name (git-file-name name version))
4259 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4260 (build-system python-build-system)
4262 `(("python-numpy" ,python-numpy)))
4264 `(("python-nose" ,python-nose)))
4267 (modify-phases %standard-phases
4270 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4271 (home-page "https://github.com/njsmith/colorspacious")
4272 (synopsis "Python library for colorspace conversions")
4273 (description "@code{colorspacious} is a Python library that lets you
4274 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4275 (license license:expat)))
4277 (define-public python2-colorspacious
4278 (package-with-python2 python-colorspacious))
4280 (define-public python-matplotlib
4282 (name "python-matplotlib")
4287 (uri (pypi-uri "matplotlib" version))
4290 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4291 (build-system python-build-system)
4292 (propagated-inputs ; the following packages are all needed at run time
4293 `(("python-cycler" ,python-cycler)
4294 ("python-kiwisolver" ,python-kiwisolver)
4295 ("python-pyparsing" ,python-pyparsing)
4296 ("python-pygobject" ,python-pygobject)
4297 ("gobject-introspection" ,gobject-introspection)
4298 ("python-tkinter" ,python "tk")
4299 ("python-dateutil" ,python-dateutil)
4300 ("python-numpy" ,python-numpy)
4301 ("python-pillow" ,python-pillow)
4302 ("python-pytz" ,python-pytz)
4303 ("python-six" ,python-six)
4304 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4305 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4306 ;; object. For this reason we need to import both libraries.
4307 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4308 ("python-pycairo" ,python-pycairo)
4309 ("python-cairocffi" ,python-cairocffi)))
4311 `(("libpng" ,libpng)
4312 ("imagemagick" ,imagemagick)
4313 ("freetype" ,freetype)
4316 ;; FIXME: Add backends when available.
4317 ;("python-wxpython" ,python-wxpython)
4321 `(("pkg-config" ,pkg-config)
4322 ("python-pytest" ,python-pytest)
4323 ("python-mock" ,python-mock)
4328 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4331 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4334 (modify-phases %standard-phases
4335 ;; XXX We disable all image comparison tests because we're using a
4336 ;; newer version of FreeType than matplotlib expects. This leads to
4337 ;; minor differences throughout the tests.
4338 (add-after 'unpack 'fix-and-disable-failing-tests
4340 (substitute* (append (find-files "lib/matplotlib/tests/"
4342 (find-files "lib/mpl_toolkits/tests"
4344 (("^from matplotlib" match)
4345 (string-append "import pytest\n" match))
4346 (("( *)@image_comparison" match indent)
4347 (string-append indent
4348 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4350 (substitute* "lib/matplotlib/tests/test_animation.py"
4351 (("/bin/sh") (which "sh")))
4352 (for-each delete-file
4353 ;; test_normal_axes, test_get_tightbbox_polar
4354 '("lib/matplotlib/tests/test_axes.py"
4355 ;; We don't use the webagg backend and this test forces it.
4356 "lib/matplotlib/tests/test_backend_webagg.py"
4357 ;; test_outward_ticks
4358 "lib/matplotlib/tests/test_tightlayout.py"
4359 ;; test_hidden_axes fails with minor extent
4360 ;; differences, possibly due to the use of a
4361 ;; different version of FreeType.
4362 "lib/matplotlib/tests/test_constrainedlayout.py"
4363 ;; Fontconfig returns no fonts.
4364 "lib/matplotlib/tests/test_font_manager.py"))
4366 (add-before 'install 'install-jquery-ui
4367 (lambda* (#:key outputs inputs #:allow-other-keys)
4368 (let ((dir (string-append (assoc-ref outputs "out")
4369 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4372 (assoc-ref inputs "jquery-ui")
4376 (lambda* (#:key outputs inputs #:allow-other-keys)
4377 (add-installed-pythonpath inputs outputs)
4378 (invoke "python" "tests.py" "-v"
4379 "-m" "not network and not webagg")))
4380 (add-before 'build 'configure-environment
4381 (lambda* (#:key outputs inputs #:allow-other-keys)
4382 (let ((cairo (assoc-ref inputs "cairo")))
4383 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4385 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4386 (setenv "HOME" (getcwd))
4387 (call-with-output-file "setup.cfg"
4389 (format port "[directories]~%
4390 basedirlist = ~a,~a~%
4393 (assoc-ref inputs "tcl")
4394 (assoc-ref inputs "tk")))))
4396 (home-page "https://matplotlib.org/")
4397 (synopsis "2D plotting library for Python")
4399 "Matplotlib is a Python 2D plotting library which produces publication
4400 quality figures in a variety of hardcopy formats and interactive environments
4401 across platforms. Matplotlib can be used in Python scripts, the python and
4402 ipython shell, web application servers, and six graphical user interface
4404 (license license:psfl)
4405 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4407 (define-public python2-matplotlib
4408 (let ((matplotlib (package-with-python2
4409 (strip-python2-variant python-matplotlib))))
4410 (package (inherit matplotlib)
4415 (uri (pypi-uri "matplotlib" version))
4418 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4420 (substitute-keyword-arguments (package-arguments matplotlib)
4422 `(modify-phases ,phases
4423 (replace 'install-jquery-ui
4424 (lambda* (#:key outputs inputs #:allow-other-keys)
4425 (let ((dir (string-append (assoc-ref outputs "out")
4426 "/lib/python2.7/site-packages/"
4427 "matplotlib/backends/web_backend/")))
4430 (assoc-ref inputs "jquery-ui")
4433 (delete 'fix-and-disable-failing-tests)
4434 (delete 'check))))) ; These tests weren't run the the past.
4435 ;; Make sure to use special packages for Python 2 instead
4436 ;; of those automatically rewritten by package-with-python2.
4438 `(("python2-pycairo" ,python2-pycairo)
4439 ("python2-backports-functools-lru-cache"
4440 ,python2-backports-functools-lru-cache)
4441 ("python2-functools32" ,python2-functools32)
4442 ("python2-pygobject-2" ,python2-pygobject-2)
4443 ("python2-subprocess32" ,python2-subprocess32)
4444 ("python2-tkinter" ,python-2 "tk")
4445 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4446 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4448 (define-public python-matplotlib-documentation
4450 (name "python-matplotlib-documentation")
4451 (version (package-version python-matplotlib))
4452 (source (package-source python-matplotlib))
4453 (build-system python-build-system)
4455 `(("python-matplotlib" ,python-matplotlib)
4456 ("python-colorspacious" ,python-colorspacious)
4457 ("python-sphinx" ,python-sphinx)
4458 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4459 ("python-sphinx-gallery" ,python-sphinx-gallery)
4460 ("python-numpydoc" ,python-numpydoc)
4461 ("python-ipython" ,python-ipython)
4462 ("python-ipykernel" ,python-ipykernel)
4463 ("python-mock" ,python-mock)
4464 ("graphviz" ,graphviz)
4465 ("texlive" ,(texlive-union (list texlive-amsfonts
4466 texlive-latex-amsmath
4467 texlive-latex-enumitem
4468 texlive-latex-expdlist
4469 texlive-latex-geometry
4470 texlive-latex-preview
4471 texlive-latex-type1cm
4474 texlive-generic-pdftex
4477 texlive-fonts-adobe-times
4478 texlive-fonts-txfonts)))
4479 ("texinfo" ,texinfo)
4480 ,@(package-native-inputs python-matplotlib)))
4482 `(#:tests? #f ; we're only generating documentation
4484 (modify-phases %standard-phases
4485 ;; The tests in python-matplotlib are run after the install phase, so
4486 ;; we need to delete the extra phase here.
4491 (setenv "PYTHONPATH"
4492 (string-append (getenv "PYTHONPATH")
4493 ":" (getcwd) "/../examples/units"))
4494 (substitute* "conf.py"
4496 (("^SHA = check_output.*")
4497 (string-append "SHA = \"" ,version "\"\n"))
4498 ;; Don't fetch intersphinx files from the Internet
4499 (("^explicit_order_folders" m)
4500 (string-append "intersphinx_mapping = {}\n" m))
4501 (("'sphinx.ext.intersphinx',") "")
4502 ;; Disable URL embedding which requires internet access.
4503 (("'https://docs.scipy.org/doc/numpy'") "None")
4504 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4506 "SPHINXBUILD=sphinx-build"
4507 "SPHINXOPTS=" ; don't abort on warnings
4510 (lambda* (#:key inputs outputs #:allow-other-keys)
4511 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4512 (doc (string-append data "/doc/python-matplotlib-" ,version))
4513 (info (string-append data "/info"))
4514 (html (string-append doc "/html")))
4517 (copy-recursively "build/html" html)
4518 (symlink (string-append html "/_images")
4519 (string-append info "/matplotlib-figures"))
4520 (with-directory-excursion "build/texinfo"
4521 (substitute* "matplotlib.texi"
4522 (("@image\\{([^,]*)" all file)
4523 (string-append "@image{matplotlib-figures/" file)))
4524 (symlink (string-append html "/_images")
4525 "./matplotlib-figures")
4526 (invoke "makeinfo" "--no-split"
4527 "-o" "matplotlib.info" "matplotlib.texi"))
4528 (install-file "build/texinfo/matplotlib.info" info))
4530 (home-page (package-home-page python-matplotlib))
4531 (synopsis "Documentation for the python-matplotlib package")
4532 (description (package-description python-matplotlib))
4533 (license (package-license python-matplotlib))))
4535 (define-public python2-matplotlib-documentation
4536 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4540 (alist-delete "python-sphinx-copybutton"
4541 (package-native-inputs parent))))))
4543 (define-public python-matplotlib-venn
4545 (name "python-matplotlib-venn")
4550 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4553 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4554 (build-system python-build-system)
4555 (arguments '(#:tests? #f)) ; tests are not included
4557 `(("python-matplotlib" ,python-matplotlib)
4558 ("python-numpy" ,python-numpy)
4559 ("python-scipy" ,python-scipy)))
4561 `(("unzip" ,unzip)))
4562 (home-page "https://github.com/konstantint/matplotlib-venn")
4563 (synopsis "Plot area-proportional Venn diagrams")
4565 "This package provides tools for plotting area-proportional two- and
4566 three-way Venn diagrams in @code{matplotlib}.")
4567 (license license:expat)))
4569 (define-public python2-pysnptools
4571 (name "python2-pysnptools")
4576 (uri (pypi-uri "pysnptools" version))
4579 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4580 (build-system python-build-system)
4582 `(#:python ,python-2 ; only Python 2.7 is supported
4583 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4585 `(("python2-numpy" ,python2-numpy)
4586 ("python2-scipy" ,python2-scipy)
4587 ("python2-pandas" ,python2-pandas)))
4589 `(("python2-cython" ,python2-cython)))
4590 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4591 (synopsis "Library for reading and manipulating genetic data")
4593 "PySnpTools is a library for reading and manipulating genetic data. It
4594 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4595 those files. It can also efficiently manipulate ranges of integers using set
4596 operators such as union, intersection, and difference.")
4597 (license license:asl2.0)))
4599 (define-public python-socksipy-branch
4601 (name "python-socksipy-branch")
4606 (uri (pypi-uri "SocksiPy-branch" version))
4609 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4610 (build-system python-build-system)
4612 `(#:tests? #f)) ; There are no tests
4613 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4614 (synopsis "Python SOCKS module")
4616 "SocksiPy - A Python SOCKS client module. It provides a
4617 socket-like interface that supports connections to any TCP
4618 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4619 The original version was developed by Dan Haim, this is a
4620 branch created by Mario Vilas to address some open issues,
4621 as the original project seems to have been abandoned circa 2007.")
4622 (license license:bsd-3)))
4624 (define-public python2-socksipy-branch
4625 (package-with-python2 python-socksipy-branch))
4627 (define-public python-socksipychain
4629 (name "python-socksipychain")
4635 (url "https://github.com/pagekite/PySocksipyChain.git")
4636 (commit (string-append "v" version))))
4637 (file-name (git-file-name name version))
4640 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4641 (build-system python-build-system)
4643 `(#:tests? #f)) ; Tests try to access the network.
4644 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4645 (synopsis "Python SOCKS module with chained proxies support")
4647 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4648 adds support for arbitrary chaining of proxy servers and various modes of
4649 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4650 a simple netcat replacement with chaining support.")
4651 (license license:bsd-3)))
4653 (define-public python-pycodestyle
4655 (name "python-pycodestyle")
4660 (uri (pypi-uri "pycodestyle" version))
4663 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4664 (build-system python-build-system)
4665 (home-page "https://pycodestyle.readthedocs.io/")
4666 (synopsis "Python style guide checker")
4667 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4668 Python code against some of the style conventions in
4669 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4670 (license license:expat)))
4672 (define-public python2-pycodestyle
4673 (package-with-python2 python-pycodestyle))
4675 (define-public python-multidict
4677 (name "python-multidict")
4682 (uri (pypi-uri "multidict" version))
4685 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
4686 (build-system python-build-system)
4688 '(#:modules ((ice-9 ftw)
4692 (guix build python-build-system))
4693 #:phases (modify-phases %standard-phases
4695 (lambda* (#:key tests? #:allow-other-keys)
4698 (let ((libdir (find (cut string-prefix? "lib." <>)
4699 (scandir "build"))))
4700 (setenv "PYTHONPATH"
4701 (string-append "./build/" libdir ":"
4702 (getenv "PYTHONPATH")))
4703 (invoke "pytest" "-vv")))
4704 (format #t "test suite not run~%"))
4707 `(("python-pytest" ,python-pytest)
4708 ("python-pytest-cov" ,python-pytest-cov)))
4709 (home-page "https://github.com/aio-libs/multidict/")
4710 (synopsis "Multidict implementation")
4711 (description "Multidict is dict-like collection of key-value pairs
4712 where key might be occurred more than once in the container.")
4713 (license license:asl2.0)))
4715 (define-public python-orderedmultidict
4717 (name "python-orderedmultidict")
4722 (uri (pypi-uri "orderedmultidict" version))
4725 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4726 (build-system python-build-system)
4729 (modify-phases %standard-phases
4730 (add-after 'unpack 'fix-tests
4732 ;; The package uses nosetest for running the tests.
4733 ;; Adding this initfile allows to run the test suite
4734 ;; without requiring nosetest.
4735 (with-output-to-file "tests/__init__.py" newline)
4738 `(("python-six" ,python-six)))
4740 `(("python-pycodestyle" ,python-pycodestyle)))
4741 (home-page "https://github.com/gruns/orderedmultidict")
4742 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4743 (description "This package contains a library for ordered multivalue
4744 dictionaries. A multivalue dictionary is a dictionary that can store
4745 multiple values for the same key. An ordered multivalue dictionary is a
4746 multivalue dictionary that retains the order of insertions and deletions.")
4747 (license license:unlicense)))
4749 (define-public python2-orderedmultidict
4750 (package-with-python2 python-orderedmultidict))
4752 (define-public python-autopep8
4754 (name "python-autopep8")
4759 (uri (pypi-uri "autopep8" version))
4762 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4763 (build-system python-build-system)
4765 `(("python-pycodestyle" ,python-pycodestyle)))
4766 (home-page "https://github.com/hhatto/autopep8")
4767 (synopsis "Format Python code according to the PEP 8 style guide")
4769 "@code{autopep8} automatically formats Python code to conform to
4770 the PEP 8 style guide. It uses the pycodestyle utility to determine
4771 what parts of the code needs to be formatted. @code{autopep8} is
4772 capable of fixing most of the formatting issues that can be reported
4774 (license (license:non-copyleft
4775 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4777 (define-public python2-autopep8
4778 (package-with-python2 python-autopep8))
4780 (define-public python-distlib
4782 (name "python-distlib")
4787 (uri (pypi-uri "distlib" version ".zip"))
4790 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4791 (build-system python-build-system)
4794 (modify-phases %standard-phases
4795 (add-before 'build 'no-/bin/sh
4797 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4798 (("/bin/sh") (which "sh")))
4800 (add-before 'check 'prepare-test-env
4802 (setenv "HOME" "/tmp")
4803 ;; NOTE: Any value works, the variable just has to be present.
4804 (setenv "SKIP_ONLINE" "1")
4806 (native-inputs `(("unzip" ,unzip)))
4807 (home-page "https://bitbucket.org/pypa/distlib")
4808 (synopsis "Distribution utilities")
4809 (description "Distlib is a library which implements low-level functions that
4810 relate to packaging and distribution of Python software. It is intended to be
4811 used as the basis for third-party packaging tools.")
4812 (license license:psfl)))
4814 (define-public python-distutils-extra
4816 (name "python-distutils-extra")
4821 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4822 version "/+download/python-distutils-extra-"
4826 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4827 (build-system python-build-system)
4828 (home-page "https://launchpad.net/python-distutils-extra/")
4829 (synopsis "Enhancements to Python's distutils")
4831 "The python-distutils-extra module enables you to easily integrate
4832 gettext support, themed icons, and scrollkeeper-based documentation into
4833 Python's distutils.")
4834 (license license:gpl2)))
4836 (define-public python2-distutils-extra
4837 (package-with-python2 python-distutils-extra))
4839 (define-public python2-elib.intl
4841 (name "python2-elib.intl")
4845 ;; This project doesn't tag releases or publish tarballs, so we take
4846 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4849 (url "https://github.com/dieterv/elib.intl.git")
4850 (commit "d09997cfef")))
4851 (file-name (string-append name "-" version "-checkout"))
4854 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4855 (build-system python-build-system)
4857 ;; incompatible with Python 3 (exception syntax)
4858 `(#:python ,python-2
4860 (home-page "https://github.com/dieterv/elib.intl")
4861 (synopsis "Enhanced internationalization for Python")
4863 "The elib.intl module provides enhanced internationalization (I18N)
4864 services for your Python modules and applications.")
4865 (license license:lgpl3+)))
4867 (define-public python-olefile
4869 (name "python-olefile")
4874 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4875 "download/v" version "/olefile-" version ".tar.gz"))
4876 (file-name (string-append name "-" version ".tar.gz"))
4879 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4880 (build-system python-build-system)
4881 (home-page "https://www.decalage.info/python/olefileio")
4882 (synopsis "Read and write Microsoft OLE2 files.")
4884 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4885 Storage or Compound Document, Microsoft Office). It is an improved version of
4886 the OleFileIO module from PIL, the Python Image Library.")
4887 (license license:bsd-3)))
4889 (define-public python2-olefile
4890 (package-with-python2 python-olefile))
4892 (define-public python-pillow
4894 (name "python-pillow")
4899 (uri (pypi-uri "Pillow" version))
4902 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4903 (build-system python-build-system)
4905 `(("python-pytest" ,python-pytest)))
4907 `(("freetype" ,freetype)
4909 ("libjpeg" ,libjpeg)
4910 ("libtiff" ,libtiff)
4911 ("libwebp" ,libwebp)
4912 ("openjpeg" ,openjpeg)
4915 `(("python-olefile" ,python-olefile)))
4918 (modify-phases %standard-phases
4919 (add-after 'unpack 'patch-ldconfig
4921 (substitute* "setup.py"
4922 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4924 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4927 (setenv "HOME" (getcwd))
4928 ;; Make installed package available for running the tests.
4929 (add-installed-pythonpath inputs outputs)
4930 (invoke "python" "selftest.py" "--installed")
4931 (invoke "python" "-m" "pytest" "-vv"))
4933 (home-page "https://python-pillow.org")
4934 (synopsis "Fork of the Python Imaging Library")
4936 "The Python Imaging Library adds image processing capabilities to your
4937 Python interpreter. This library provides extensive file format support, an
4938 efficient internal representation, and fairly powerful image processing
4939 capabilities. The core image library is designed for fast access to data
4940 stored in a few basic pixel formats. It should provide a solid foundation for
4941 a general image processing tool.")
4942 (license (license:x11-style
4943 "http://www.pythonware.com/products/pil/license.htm"
4944 "The PIL Software License"))))
4946 (define-public python2-pillow
4947 (package-with-python2 python-pillow))
4949 (define-public python-pycparser
4951 (name "python-pycparser")
4956 (uri (pypi-uri "pycparser" version))
4959 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4960 (outputs '("out" "doc"))
4961 (build-system python-build-system)
4963 `(("pkg-config" ,pkg-config)))
4966 (modify-phases %standard-phases
4969 (with-directory-excursion "tests"
4970 (invoke "python" "all_tests.py"))
4972 (add-after 'install 'install-doc
4973 (lambda* (#:key outputs #:allow-other-keys)
4974 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4975 (doc (string-append data "/doc/" ,name "-" ,version))
4976 (examples (string-append doc "/examples")))
4978 (for-each (lambda (file)
4979 (copy-file (string-append "." file)
4980 (string-append doc file)))
4981 '("/README.rst" "/CHANGES" "/LICENSE"))
4982 (copy-recursively "examples" examples)
4984 (home-page "https://github.com/eliben/pycparser")
4985 (synopsis "C parser in Python")
4987 "Pycparser is a complete parser of the C language, written in pure Python
4988 using the PLY parsing library. It parses C code into an AST and can serve as
4989 a front-end for C compilers or analysis tools.")
4990 (license license:bsd-3)))
4992 (define-public python2-pycparser
4993 (package-with-python2 python-pycparser))
4995 (define-public python-pywavelets
4997 (name "python-pywavelets")
4999 (home-page "https://github.com/PyWavelets/pywt")
5002 (uri (pypi-uri "PyWavelets" version))
5005 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
5006 (build-system python-build-system)
5008 '(#:modules ((ice-9 ftw)
5012 (guix build python-build-system))
5013 #:phases (modify-phases %standard-phases
5016 (let ((cwd (getcwd))
5017 (libdir (find (cut string-prefix? "lib." <>)
5018 (scandir "build"))))
5019 (with-directory-excursion (string-append cwd "/build/" libdir)
5020 (invoke "nosetests" "-v" "."))))))))
5022 `(("python-matplotlib" ,python-matplotlib) ;for tests
5023 ("python-nose" ,python-nose)))
5025 `(("python-numpy" ,python-numpy)))
5026 (synopsis "Wavelet transforms in Python")
5028 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5029 mathematical basis functions that are localized in both time and frequency.
5030 Wavelet transforms are time-frequency transforms employing wavelets. They are
5031 similar to Fourier transforms, the difference being that Fourier transforms are
5032 localized only in frequency instead of in time and frequency.")
5033 (license license:expat)))
5035 (define-public python2-pywavelets
5036 (package-with-python2 python-pywavelets))
5038 (define-public python-xcffib
5040 (name "python-xcffib")
5045 (uri (pypi-uri "xcffib" version))
5048 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5049 (build-system python-build-system)
5051 `(("libxcb" ,libxcb)))
5053 `(("python-cffi" ,python-cffi) ; used at run time
5054 ("python-six" ,python-six)))
5056 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5059 (modify-phases %standard-phases
5060 (add-after 'unpack 'fix-libxcb-path
5061 (lambda* (#:key inputs #:allow-other-keys)
5062 (let ((libxcb (assoc-ref inputs "libxcb")))
5063 (substitute* '("xcffib/__init__.py")
5064 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5066 (add-after 'install 'install-doc
5067 (lambda* (#:key outputs #:allow-other-keys)
5068 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5069 "/doc/" ,name "-" ,version)))
5071 (copy-file "README.md"
5072 (string-append doc "/README.md"))
5074 (home-page "https://github.com/tych0/xcffib")
5075 (synopsis "XCB Python bindings")
5077 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5078 support for Python 3 and PyPy. It is based on cffi.")
5079 (license license:expat)))
5081 (define-public python2-xcffib
5082 (package-with-python2 python-xcffib))
5084 (define-public python-cairocffi
5086 (name "python-cairocffi")
5091 (uri (pypi-uri "cairocffi" version))
5094 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5095 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5096 (build-system python-build-system)
5097 (outputs '("out" "doc"))
5101 ("gdk-pixbuf" ,gdk-pixbuf)
5105 `(("pkg-config" ,pkg-config)
5106 ("python-pytest" ,python-pytest)
5107 ("python-pytest-cov" ,python-pytest-cov)
5108 ("python-pytest-runner" ,python-pytest-runner)
5109 ("python-sphinx" ,python-sphinx)
5110 ("python-docutils" ,python-docutils)))
5112 `(("python-xcffib" ,python-xcffib))) ; used at run time
5115 (modify-phases %standard-phases
5116 (add-after 'unpack 'patch-paths
5117 (lambda* (#:key inputs outputs #:allow-other-keys)
5118 (substitute* (find-files "." "\\.py$")
5119 (("dlopen\\(ffi, 'cairo'")
5120 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5121 "/lib/libcairo.so.2'"))
5122 (("dlopen\\(ffi, 'gdk-3'")
5123 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5124 "/lib/libgtk-3.so.0'"))
5125 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5126 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5127 "/lib/libgdk_pixbuf-2.0.so.0'"))
5128 (("dlopen\\(ffi, 'glib-2.0'")
5129 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5130 "/lib/libglib-2.0.so.0'"))
5131 (("dlopen\\(ffi, 'gobject-2.0'")
5132 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5133 "/lib/libgobject-2.0.so.0'"))
5134 (("dlopen\\(ffi, 'pangocairo-1.0'")
5135 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5136 "/lib/libpangocairo-1.0.so.0'"))
5137 (("dlopen\\(ffi, 'pango-1.0'")
5138 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5139 "/lib/libpango-1.0.so.0'")))
5141 (add-after 'install 'install-doc
5142 (lambda* (#:key inputs outputs #:allow-other-keys)
5143 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5144 (doc (string-append data "/doc/" ,name "-" ,version))
5145 (html (string-append doc "/html")))
5146 (setenv "LD_LIBRARY_PATH"
5147 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5148 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5149 (setenv "LANG" "en_US.UTF-8")
5151 (for-each (lambda (file)
5152 (copy-file (string-append "." file)
5153 (string-append doc file)))
5154 '("/README.rst" "/CHANGES" "/LICENSE"))
5155 (system* "python" "setup.py" "build_sphinx")
5156 (copy-recursively "docs/_build/html" html)
5158 (home-page "https://github.com/Kozea/cairocffi")
5159 (synopsis "Python bindings and object-oriented API for Cairo")
5161 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5162 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5163 graphics library with support for multiple backends including image buffers,
5164 PNG, PostScript, PDF, and SVG file output.")
5165 (license license:bsd-3)))
5167 (define-public python2-cairocffi
5168 (package-with-python2 python-cairocffi))
5170 (define-public python-decorator
5172 (name "python-decorator")
5177 (uri (pypi-uri "decorator" version))
5179 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5180 (build-system python-build-system)
5181 (home-page "https://pypi.org/project/decorator/")
5182 (synopsis "Python module to simplify usage of decorators")
5184 "The aim of the decorator module is to simplify the usage of decorators
5185 for the average programmer, and to popularize decorators usage giving examples
5186 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5187 etc. The core of this module is a decorator factory.")
5188 (license license:expat)))
5190 (define-public python2-decorator
5191 (package-with-python2 python-decorator))
5193 (define-public python-drmaa
5195 (name "python-drmaa")
5200 (uri (pypi-uri "drmaa" version))
5202 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5203 (build-system python-build-system)
5204 ;; The test suite requires libdrmaa which is provided by the cluster
5205 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5206 ;; should be set to the path of the libdrmaa library.
5207 (arguments '(#:tests? #f))
5209 `(("python-nose" ,python-nose)))
5210 (home-page "https://pypi.org/project/drmaa/")
5211 (synopsis "Python bindings for the DRMAA library")
5213 "A Python package for Distributed Resource Management (DRM) job
5214 submission and control. This package is an implementation of the DRMAA 1.0
5215 Python language binding specification.")
5216 (license license:bsd-3)))
5218 (define-public python2-drmaa
5219 (package-with-python2 python-drmaa))
5221 (define-public python-grako
5223 (name "python-grako")
5229 (pypi-uri "grako" version ".zip"))
5232 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5233 (build-system python-build-system)
5234 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5237 ("python-pytest" ,python-pytest)
5238 ("python-pytest-runner" ,python-pytest-runner)))
5239 (home-page "https://bitbucket.org/neogeny/grako")
5240 (synopsis "EBNF parser generator")
5242 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5243 memoizing PEG/Packrat parser in Python.")
5244 (license license:bsd-3)))
5246 (define-public python2-grako
5247 (package-with-python2 python-grako))
5249 (define-public python-gridmap
5251 (name "python-gridmap")
5257 (url "https://github.com/pygridtools/gridmap.git")
5258 (commit (string-append "v" version))))
5259 (file-name (git-file-name name version))
5261 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
5262 (build-system python-build-system)
5264 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5266 `(("python-psutil" ,python-psutil)
5267 ("python-drmaa" ,python-drmaa)
5268 ("python-pyzmq" ,python-pyzmq)))
5269 (home-page "https://github.com/pygridtools/gridmap")
5270 (synopsis "Create jobs on a cluster directly from Python")
5272 "Gridmap is a Python package to allow you to easily create jobs on the
5273 cluster directly from Python. You can directly map Python functions onto the
5274 cluster without needing to write any wrapper code yourself.")
5275 (license license:gpl3+)))
5277 (define-public python2-gridmap
5278 (package-with-python2 python-gridmap))
5280 (define-public python-honcho
5282 (name "python-honcho")
5288 (url "https://github.com/nickstenning/honcho.git")
5289 (commit (string-append "v" version))))
5290 (file-name (git-file-name name version))
5292 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5293 (build-system python-build-system)
5295 `(("python-pytest" ,python-pytest)
5296 ("python-mock" ,python-mock)
5297 ("python-tox" ,python-tox)
5298 ("which" ,which))) ;for tests
5300 `(("python-jinja2" ,python-jinja2)))
5303 (modify-phases %standard-phases
5305 (add-after 'install 'check
5306 (lambda* (#:key outputs inputs #:allow-other-keys)
5307 ;; fix honcho path in testsuite
5308 (substitute* "tests/conftest.py"
5309 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5310 "/bin/honcho" "'")))
5311 ;; It's easier to run tests after install.
5312 ;; Make installed package available for running the tests
5313 (add-installed-pythonpath inputs outputs)
5314 (invoke "py.test" "-v"))))))
5315 (home-page "https://github.com/nickstenning/honcho")
5316 (synopsis "Manage Procfile-based applications")
5318 "A Procfile is a file which describes how to run an application
5319 consisting of several processes. honcho starts all listed processes.
5320 The output of all running processes is collected by honcho and
5322 (license license:expat)))
5324 (define-public python2-honcho
5325 (package-with-python2 python-honcho))
5327 (define-public python-pexpect
5329 (name "python-pexpect")
5334 (uri (pypi-uri "pexpect" version))
5336 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5337 (build-system python-build-system)
5340 (modify-phases %standard-phases
5341 (add-before 'check 'prepare-tests
5343 (substitute* (find-files "tests")
5344 (("/bin/ls") (which "ls"))
5345 (("/bin/echo") (which "echo"))
5346 (("/bin/which") (which "which"))
5347 ;; Many tests try to use the /bin directory which
5348 ;; is not present in the build environment.
5349 ;; Use one that's non-empty and unlikely to change.
5350 (("/bin'") "/dev'"))
5351 ;; XXX: Socket connection test gets "Connection reset by peer".
5352 ;; Why does it not work? Delete for now.
5353 (delete-file "tests/test_socket.py")
5355 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5357 `(("python-nose" ,python-nose)
5358 ("python-pytest" ,python-pytest)
5361 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5363 `(("python-ptyprocess" ,python-ptyprocess)))
5364 (home-page "http://pexpect.readthedocs.org/")
5365 (synopsis "Controlling interactive console applications")
5367 "Pexpect is a pure Python module for spawning child applications;
5368 controlling them; and responding to expected patterns in their output.
5369 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5370 child application and control it as if a human were typing commands.")
5371 (license license:isc)))
5373 (define-public python2-pexpect
5374 (package-with-python2 python-pexpect))
5376 (define-public python-setuptools-scm
5378 (name "python-setuptools-scm")
5382 (uri (pypi-uri "setuptools_scm" version))
5385 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5386 (build-system python-build-system)
5387 (home-page "https://github.com/pypa/setuptools_scm/")
5388 (synopsis "Manage Python package versions in SCM metadata")
5390 "Setuptools_scm handles managing your Python package versions in
5391 @dfn{software configuration management} (SCM) metadata instead of declaring
5392 them as the version argument or in a SCM managed file.")
5393 (license license:expat)))
5395 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
5396 (define-public python-setuptools-scm-3.3
5398 (inherit python-setuptools-scm)
5402 (uri (pypi-uri "setuptools_scm" version))
5405 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5407 (define-public python2-setuptools-scm
5408 (package-with-python2 python-setuptools-scm))
5410 (define-public python-pathlib2
5412 (name "python-pathlib2")
5417 (uri (pypi-uri "pathlib2" version))
5420 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5421 (build-system python-build-system)
5423 `(("python-scandir" ,python-scandir)
5424 ("python-six" ,python-six)))
5425 (home-page "https://pypi.org/project/pathlib2/")
5426 (synopsis "Object-oriented file system paths")
5427 (description "The goal of pathlib2 is to provide a backport of the
5428 standard @code{pathlib} module which tracks the standard library module, so
5429 all the newest features of the standard @code{pathlib} can be used also on
5430 older Python versions.")
5431 (license license:expat)))
5433 (define-public python2-importlib-resources
5435 (name "python2-importlib-resources")
5439 (uri (pypi-uri "importlib_resources" version))
5442 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5443 (build-system python-build-system)
5445 `(#:python ,python-2))
5447 `(("python-wheel" ,python2-wheel)))
5449 `(("python-pathlib2" ,python2-pathlib2)
5450 ("python-typing" ,python2-typing)))
5451 (home-page "https://gitlab.com/python-devs/importlib_resources")
5452 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5454 "This package provides an implementation of @code{importlib.resources}
5455 for older versions of Python.")
5456 (license license:asl2.0)))
5458 (define-public python-importlib-metadata
5460 (name "python-importlib-metadata")
5465 (uri (pypi-uri "importlib_metadata" version))
5467 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
5468 (build-system python-build-system)
5470 `(("python-zipp" ,python-zipp)))
5472 `(("python-setuptools-scm" ,python-setuptools-scm)
5473 ("python-packaging" ,python-packaging)))
5474 (home-page "https://importlib-metadata.readthedocs.io/")
5475 (synopsis "Read metadata from Python packages")
5477 "@code{importlib_metadata} is a library which provides an API for
5478 accessing an installed Python package's metadata, such as its entry points or
5479 its top-level name. This functionality intends to replace most uses of
5480 @code{pkg_resources} entry point API and metadata API. Along with
5481 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5482 need to use the older and less efficient @code{pkg_resources} package.")
5483 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5484 (license license:asl2.0)))
5486 (define-public python2-importlib-metadata
5487 (let ((base (package-with-python2 (strip-python2-variant
5488 python-importlib-metadata))))
5491 (name "python2-importlib-metadata")
5493 `(("python-configparser" ,python2-configparser)
5494 ("python-contextlib2" ,python2-contextlib2)
5495 ("python-importlib-resources" ,python2-importlib-resources)
5496 ("python-pathlib2" ,python2-pathlib2)
5497 ,@(package-propagated-inputs base))))))
5499 (define-public python-jaraco-packaging
5501 (name "python-jaraco-packaging")
5506 (uri (pypi-uri "jaraco.packaging" version))
5509 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5510 (build-system python-build-system)
5512 `(("python-pytest" ,python-pytest)
5513 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5514 ("python-pytest-flake8" ,python-pytest-flake8)
5515 ("python-rst.linker" ,python-rst.linker)
5516 ("python-setuptools" ,python-setuptools)
5517 ("python-setuptools-scm" ,python-setuptools-scm)
5518 ("python-six" ,python-six)
5519 ("python-sphinx" ,python-sphinx)))
5520 (home-page "https://github.com/jaraco/jaraco.packaging")
5521 (synopsis "Tools to supplement packaging Python releases")
5523 "This package provides various tools to supplement packaging Python
5525 (license license:expat)))
5527 (define-public python-pathpy
5529 (name "python-pathpy")
5534 (uri (pypi-uri "path.py" version))
5536 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5537 (outputs '("out" "doc"))
5538 (build-system python-build-system)
5540 `(("python-appdirs" ,python-appdirs)
5541 ("python-importlib-metadata" ,python-importlib-metadata)))
5543 `(("python-setuptools-scm" ,python-setuptools-scm)
5544 ("python-sphinx" ,python-sphinx)
5545 ("python-rst.linker" ,python-rst.linker)
5546 ("python-pytest" ,python-pytest)
5547 ("python-pytest-runner" ,python-pytest-runner)
5548 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5551 (modify-phases %standard-phases
5552 (add-after 'build 'build-doc
5554 (setenv "LANG" "en_US.UTF-8")
5555 (invoke "python" "setup.py" "build_sphinx")))
5556 (add-after 'install 'install-doc
5557 (lambda* (#:key outputs #:allow-other-keys)
5558 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5559 (doc (string-append data "/doc/" ,name "-" ,version))
5560 (html (string-append doc "/html")))
5562 (for-each (lambda (file)
5563 (copy-file file (string-append doc "/" file)))
5564 '("README.rst" "CHANGES.rst"))
5565 (copy-recursively "build/sphinx/html" html)
5569 ;; The import time test aborts if an import takes longer than
5570 ;; 100ms. It may very well take a little longer than that.
5571 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5572 (home-page "https://github.com/jaraco/path.py")
5573 (synopsis "Python module wrapper for built-in os.path")
5575 "@code{path.py} implements path objects as first-class entities, allowing
5576 common operations on files to be invoked on those path objects directly.")
5577 (license license:expat)))
5579 (define-public python2-pathpy
5580 (package-with-python2 python-pathpy))
5582 (define-public python-simplegeneric
5584 (name "python-simplegeneric")
5589 (uri (pypi-uri "simplegeneric" version ".zip"))
5591 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5592 (build-system python-build-system)
5594 `(("unzip" ,unzip)))
5595 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5596 (synopsis "Python module for simple generic functions")
5598 "The simplegeneric module lets you define simple single-dispatch generic
5599 functions, akin to Python’s built-in generic functions like @code{len()},
5600 @code{iter()} and so on. However, instead of using specially-named methods,
5601 these generic functions use simple lookup tables, akin to those used by
5602 e.g. @code{pickle.dump()} and other generic functions found in the Python
5604 (license license:zpl2.1)))
5606 (define-public python2-simplegeneric
5607 (package-with-python2 python-simplegeneric))
5609 (define-public python-ipython-genutils
5610 ;; TODO: This package is retired, check if can be removed, see description.
5612 (name "python-ipython-genutils")
5617 (uri (pypi-uri "ipython_genutils" version))
5619 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5620 (build-system python-build-system)
5621 (arguments `(#:tests? #f)) ; no tests
5622 (home-page "https://ipython.org")
5623 (synopsis "Vestigial utilities from IPython")
5625 "This package provides retired utilities from IPython. No packages
5626 outside IPython/Jupyter should depend on it.
5628 This package shouldn't exist. It contains some common utilities shared by
5629 Jupyter and IPython projects during The Big Split. As soon as possible, those
5630 packages will remove their dependency on this, and this package will go
5632 (license license:bsd-3)))
5634 (define-public python2-ipython-genutils
5635 (package-with-python2 python-ipython-genutils))
5637 (define-public python-traitlets
5639 (name "python-traitlets")
5644 (uri (pypi-uri "traitlets" version))
5647 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5648 (build-system python-build-system)
5651 (modify-phases %standard-phases
5652 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5654 `(("python-ipython-genutils" ,python-ipython-genutils)
5655 ("python-decorator" ,python-decorator)))
5657 `(("python-pytest" ,python-pytest)))
5658 (properties `((python2-variant . ,(delay python2-traitlets))))
5659 (home-page "https://ipython.org")
5660 (synopsis "Configuration system for Python applications")
5662 "Traitlets is a framework that lets Python classes have attributes with
5663 type checking, dynamically calculated default values, and ‘on change’
5664 callbacks. The package also includes a mechanism to use traitlets for
5665 configuration, loading values from files or from command line arguments. This
5666 is a distinct layer on top of traitlets, so you can use traitlets in your code
5667 without using the configuration machinery.")
5668 (license license:bsd-3)))
5670 (define-public python2-traitlets
5671 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5675 `(("python2-enum34" ,python2-enum34)
5676 ,@(package-propagated-inputs traitlets))))))
5678 (define-public python-jupyter-core
5680 (name "python-jupyter-core")
5685 (uri (string-append (pypi-uri "jupyter_core" version)))
5688 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5689 (build-system python-build-system)
5690 ;; FIXME: not sure how to run the tests
5691 (arguments `(#:tests? #f))
5693 `(("python-traitlets" ,python-traitlets)))
5694 (home-page "http://jupyter.org/")
5695 (synopsis "Jupyter base package")
5697 "Jupyter core is the base package on which Jupyter projects rely.")
5698 (license license:bsd-3)))
5700 (define-public python2-jupyter-core
5701 (package-with-python2 python-jupyter-core))
5703 (define-public python-jupyter-client
5705 (name "python-jupyter-client")
5710 (uri (pypi-uri "jupyter_client" version))
5713 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5714 (build-system python-build-system)
5715 ;; Tests fail because of missing native python kernel which I assume is
5716 ;; provided by the ipython package, which we cannot use because it would
5717 ;; cause a dependency cycle.
5721 #:phases (modify-phases %standard-phases
5722 (add-after 'unpack 'set-tool-file-names
5723 (lambda* (#:key inputs #:allow-other-keys)
5724 (let ((iproute (assoc-ref inputs "iproute")))
5725 (substitute* "jupyter_client/localinterfaces.py"
5727 (string-append "'" iproute "/sbin/ip'")))
5730 `(("iproute" ,iproute)))
5732 `(("python-pyzmq" ,python-pyzmq)
5733 ("python-traitlets" ,python-traitlets)
5734 ("python-jupyter-core" ,python-jupyter-core)))
5735 (home-page "http://jupyter.org/")
5736 (synopsis "Jupyter protocol implementation and client libraries")
5738 "The @code{jupyter_client} package contains the reference implementation
5739 of the Jupyter protocol. It also provides client and kernel management APIs
5740 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5741 installing @code{kernelspec}s for use with Jupyter frontends.")
5742 (license license:bsd-3)))
5744 (define-public python2-jupyter-client
5745 (package-with-python2 python-jupyter-client))
5747 (define-public python-ipykernel
5749 (name "python-ipykernel")
5754 (uri (pypi-uri "ipykernel" version))
5756 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5757 (build-system python-build-system)
5760 (modify-phases %standard-phases
5763 (setenv "HOME" "/tmp")
5764 (invoke "pytest" "-v")
5766 (add-after 'install 'set-python-file-name
5767 (lambda* (#:key outputs #:allow-other-keys)
5768 ;; Record the absolute file name of the 'python' executable in
5770 (let ((out (assoc-ref outputs "out")))
5771 (substitute* (string-append out "/share/jupyter"
5772 "/kernels/python3/kernel.json")
5774 (string-append "\"" (which "python") "\"")))
5777 `(("python-ipython" ,python-ipython)
5778 ;; imported at runtime during connect
5779 ("python-jupyter-client" ,python-jupyter-client)))
5781 `(("python-flaky" ,python-flaky)
5782 ("python-nose" ,python-nose)
5783 ("python-pytest" ,python-pytest)))
5784 (home-page "https://ipython.org")
5785 (synopsis "IPython Kernel for Jupyter")
5787 "This package provides the IPython kernel for Jupyter.")
5788 (properties `((python2-variant . ,(delay python2-ipykernel))))
5789 (license license:bsd-3)))
5791 ;; Version 5.x and above no longer support Python 2.
5792 (define-public python2-ipykernel
5794 (name "python2-ipykernel")
5799 (uri (pypi-uri "ipykernel" version))
5801 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
5802 (build-system python-build-system)
5804 `(#:python ,python-2))
5806 `(("python2-ipython" ,python2-ipython)
5807 ;; imported at runtime during connect
5808 ("python2-jupyter-client" ,python2-jupyter-client)
5809 ("python2-tornado" ,python2-tornado)
5810 ("python2-traitlets" ,python2-traitlets)))
5812 `(("python2-mock" ,python2-mock)
5813 ("python2-nose" ,python2-nose)
5814 ("python2-pytest" ,python2-pytest)
5815 ("python2-pytest-cov" ,python2-pytest-cov)))
5816 (home-page "https://ipython.org")
5817 (synopsis "IPython Kernel for Jupyter")
5819 "This package provides the IPython kernel for Jupyter.")
5820 (license license:bsd-3)))
5822 (define-public python-pari-jupyter
5824 (name "python-pari-jupyter")
5829 (uri (pypi-uri "pari_jupyter" version))
5832 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5833 (build-system python-build-system)
5835 `(("python-ipykernel" ,python-ipykernel)))
5837 `(("pari-gp" ,pari-gp)
5838 ("readline" ,readline)))
5840 `(#:tests? #f)) ; no test suite
5842 "https://github.com/jdemeyer/pari_jupyter")
5843 (synopsis "A Jupyter kernel for PARI/GP")
5844 (description "The package provides a PARI/GP kernel for Jupyter.")
5845 (license license:gpl3+)))
5847 (define-public python-backcall
5849 (name "python-backcall")
5854 (uri (pypi-uri "backcall" version))
5857 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5858 (build-system python-build-system)
5859 (home-page "https://github.com/takluyver/backcall/")
5860 (synopsis "Specifications for callback functions passed in to an API")
5862 "If your code lets other people supply callback functions, it's important
5863 to specify the function signature you expect, and check that functions support
5864 that. Adding extra parameters later would break other peoples code unless
5865 you're careful. The @code{backcall} package provides a way of specifying the
5866 callback signature using a prototype function.")
5867 (license license:bsd-3)))
5869 (define-public python-ipython
5871 (name "python-ipython")
5876 (uri (pypi-uri "ipython" version ".tar.gz"))
5878 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5879 (build-system python-build-system)
5881 `(("python-backcall" ,python-backcall)
5882 ("python-pyzmq" ,python-pyzmq)
5883 ("python-prompt-toolkit" ,python-prompt-toolkit)
5884 ("python-terminado" ,python-terminado)
5885 ("python-matplotlib" ,python-matplotlib)
5886 ("python-numpy" ,python-numpy)
5887 ("python-numpydoc" ,python-numpydoc)
5888 ("python-jedi" ,python-jedi)
5889 ("python-jinja2" ,python-jinja2)
5890 ("python-mistune" ,python-mistune)
5891 ("python-pexpect" ,python-pexpect)
5892 ("python-pickleshare" ,python-pickleshare)
5893 ("python-simplegeneric" ,python-simplegeneric)
5894 ("python-jsonschema" ,python-jsonschema)
5895 ("python-traitlets" ,python-traitlets)
5896 ("python-nbformat" ,python-nbformat)
5897 ("python-pygments" ,python-pygments)))
5899 `(("readline" ,readline)
5902 `(("graphviz" ,graphviz)
5903 ("pkg-config" ,pkg-config)
5904 ("python-requests" ,python-requests) ;; for tests
5905 ("python-testpath" ,python-testpath)
5906 ("python-nose" ,python-nose)))
5909 (modify-phases %standard-phases
5910 (add-after 'unpack 'make-docs-reproducible
5912 (substitute* "IPython/sphinxext/ipython_directive.py"
5913 ((".*import datetime") "")
5914 ((".*datetime.datetime.now\\(\\)") "")
5915 (("%timeit") "# %timeit"))
5917 ;; Tests can only be run after the library has been installed and not
5918 ;; within the source directory.
5920 (add-after 'install 'check
5921 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5924 ;; Make installed package available for running the tests
5925 (add-installed-pythonpath inputs outputs)
5926 (setenv "HOME" "/tmp/") ;; required by a test
5927 ;; We only test the core because one of the other tests
5928 ;; tries to import ipykernel.
5929 (invoke "python" "IPython/testing/iptest.py"
5930 "-v" "IPython/core/tests"))
5932 (add-before 'check 'fix-tests
5933 (lambda* (#:key inputs #:allow-other-keys)
5934 (substitute* "./IPython/utils/_process_posix.py"
5935 (("/usr/bin/env', 'which") (which "which")))
5936 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5937 (("#!/usr/bin/env python")
5938 (string-append "#!" (which "python"))))
5939 ;; This test introduces a circular dependency on ipykernel
5940 ;; (which depends on ipython).
5941 (delete-file "IPython/core/tests/test_display.py")
5942 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5943 (delete-file "IPython/core/tests/test_interactiveshell.py")
5945 (home-page "https://ipython.org")
5946 (synopsis "IPython is a tool for interactive computing in Python")
5948 "IPython provides a rich architecture for interactive computing with:
5949 Powerful interactive shells, a browser-based notebook, support for interactive
5950 data visualization, embeddable interpreters and tools for parallel
5952 (properties `((python2-variant . ,(delay python2-ipython))))
5953 (license license:bsd-3)))
5955 ;; This is the latest release of the LTS version of ipython with support for
5956 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5957 ;; dropped support for Python 2.7.
5958 (define-public python2-ipython
5960 (name "python2-ipython")
5965 (uri (pypi-uri "ipython" version ".tar.gz"))
5967 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5968 (build-system python-build-system)
5970 `(("python2-backports-shutil-get-terminal-size"
5971 ,python2-backports-shutil-get-terminal-size)
5972 ("python2-pathlib2" ,python2-pathlib2)
5973 ("python2-pyzmq" ,python2-pyzmq)
5974 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5975 ("python2-terminado" ,python2-terminado)
5976 ("python2-matplotlib" ,python2-matplotlib)
5977 ("python2-numpy" ,python2-numpy)
5978 ("python2-numpydoc" ,python2-numpydoc)
5979 ("python2-jinja2" ,python2-jinja2)
5980 ("python2-mistune" ,python2-mistune)
5981 ("python2-pexpect" ,python2-pexpect)
5982 ("python2-pickleshare" ,python2-pickleshare)
5983 ("python2-simplegeneric" ,python2-simplegeneric)
5984 ("python2-jsonschema" ,python2-jsonschema)
5985 ("python2-traitlets" ,python2-traitlets)
5986 ("python2-nbformat" ,python2-nbformat)
5987 ("python2-pygments" ,python2-pygments)))
5989 `(("readline" ,readline)
5992 `(("graphviz" ,graphviz)
5993 ("pkg-config" ,pkg-config)
5994 ("python2-requests" ,python2-requests) ;; for tests
5995 ("python2-testpath" ,python2-testpath)
5996 ("python2-mock" ,python2-mock)
5997 ("python2-nose" ,python2-nose)))
5999 `(#:python ,python-2
6001 (modify-phases %standard-phases
6002 (add-before 'check 'delete-broken-tests
6003 (lambda* (#:key inputs #:allow-other-keys)
6004 ;; These tests throw errors for unknown reasons.
6005 (delete-file "IPython/core/tests/test_displayhook.py")
6006 (delete-file "IPython/core/tests/test_magic_terminal.py")
6007 (delete-file "IPython/core/tests/test_profile.py")
6009 (home-page "https://ipython.org")
6010 (synopsis "IPython is a tool for interactive computing in Python")
6012 "IPython provides a rich architecture for interactive computing with:
6013 Powerful interactive shells, a browser-based notebook, support for interactive
6014 data visualization, embeddable interpreters and tools for parallel
6016 (license license:bsd-3)))
6018 (define-public python-ipython-documentation
6020 (inherit python-ipython)
6021 (name "python-ipython-documentation")
6022 (version (package-version python-ipython))
6025 (modify-phases %standard-phases
6029 (lambda* (#:key outputs #:allow-other-keys)
6030 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6031 (doc (string-append data "/doc/" ,name "-" ,version))
6032 (html (string-append doc "/html"))
6033 (man1 (string-append data "/man/man1"))
6034 (info (string-append data "/info"))
6035 (examples (string-append doc "/examples"))
6036 (python-arg (string-append "PYTHON=" (which "python"))))
6037 (setenv "LANG" "en_US.utf8")
6038 (with-directory-excursion "docs"
6039 ;; FIXME: pdf fails to build
6040 ;;(system* "make" "pdf" "PAPER=a4")
6041 (system* "make" python-arg "html")
6042 ;; FIXME: the generated texi file contains ^@^@, which trips
6044 ;; (system* "make" python-arg "info")
6046 (copy-recursively "docs/man" man1)
6047 (copy-recursively "examples" examples)
6048 (copy-recursively "docs/build/html" html)
6049 ;; (copy-file "docs/build/latex/ipython.pdf"
6050 ;; (string-append doc "/ipython.pdf"))
6052 ;; (copy-file "docs/build/texinfo/ipython.info"
6053 ;; (string-append info "/ipython.info"))
6054 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6057 `(("python-ipython" ,python-ipython)
6058 ("python-ipykernel" ,python-ipykernel)))
6060 `(("python-sphinx" ,python-sphinx)
6061 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6062 ;; FIXME: It's possible that a smaller union would work just as well.
6063 ("texlive" ,(texlive-union (list texlive-amsfonts
6065 texlive-generic-ifxetex
6066 texlive-generic-pdftex
6067 texlive-latex-capt-of
6069 texlive-latex-environ
6070 texlive-latex-eqparbox
6071 texlive-latex-etoolbox
6072 texlive-latex-expdlist
6073 texlive-latex-fancyhdr
6074 texlive-latex-fancyvrb
6075 texlive-latex-fncychap
6077 texlive-latex-framed
6078 texlive-latex-geometry
6079 texlive-latex-graphics
6080 texlive-latex-hyperref
6081 texlive-latex-mdwtools
6082 texlive-latex-multirow
6083 texlive-latex-needspace
6084 texlive-latex-oberdiek
6085 texlive-latex-parskip
6086 texlive-latex-preview
6087 texlive-latex-tabulary
6088 texlive-latex-threeparttable
6089 texlive-latex-titlesec
6090 texlive-latex-trimspaces
6092 texlive-latex-upquote
6094 texlive-latex-varwidth
6095 texlive-latex-wrapfig)))
6096 ("texinfo" ,texinfo)))))
6098 (define-public python-urwid
6100 (name "python-urwid")
6105 (uri (pypi-uri "urwid" version))
6108 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
6109 (build-system python-build-system)
6110 (home-page "http://urwid.org")
6111 (synopsis "Console user interface library for Python")
6113 "Urwid is a curses-based UI/widget library for Python. It includes many
6114 features useful for text console applications.")
6115 (license license:lgpl2.1+)))
6117 (define-public python2-urwid
6118 (package-with-python2 python-urwid))
6120 (define-public python-urwidtrees
6122 (name "python-urwidtrees")
6127 ;; package author intends on distributing via github rather than pypi:
6128 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6130 (url "https://github.com/pazz/urwidtrees")
6132 (file-name (git-file-name name version))
6135 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
6136 (build-system python-build-system)
6138 '(#:use-setuptools? #f
6139 #:tests? #f)) ; no tests
6140 (propagated-inputs `(("python-urwid" ,python-urwid)))
6141 (home-page "https://github.com/pazz/urwidtrees")
6142 (synopsis "Tree widgets for urwid")
6143 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6144 toolkit. Use it to build trees of widgets.")
6145 (license license:gpl3+)))
6147 (define-public python2-urwidtrees
6148 (package-with-python2 python-urwidtrees))
6150 (define-public python-ua-parser
6152 (name "python-ua-parser")
6157 (uri (pypi-uri "ua-parser" version))
6160 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
6161 (build-system python-build-system)
6163 `(#:tests? #f)) ;no test suite in release
6165 `(("python-pyyaml" ,python-pyyaml)))
6166 (home-page "https://github.com/ua-parser/uap-python")
6167 (synopsis "User agent parser")
6169 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
6170 (license license:asl2.0)))
6172 (define-public python2-ua-parser
6173 (package-with-python2 python-ua-parser))
6175 (define-public python-user-agents
6177 (name "python-user-agents")
6182 (uri (pypi-uri "user-agents" version))
6185 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
6186 (build-system python-build-system)
6188 `(#:tests? #f)) ;missing devices.json test file in release
6190 `(("python-ua-parser" ,python-ua-parser)))
6191 (home-page "https://github.com/selwin/python-user-agents")
6192 (synopsis "User Agent strings parsing library")
6194 "A library to identify devices (phones, tablets) and their capabilities by
6195 parsing (browser/HTTP) user agent strings.")
6196 (license license:expat)))
6198 (define-public python2-user-agents
6199 (package-with-python2 python-user-agents))
6201 (define-public python-dbus
6203 (name "python-dbus")
6208 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
6209 "dbus-python-" version ".tar.gz"))
6211 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
6212 (build-system gnu-build-system)
6214 `(("pkg-config" ,pkg-config)))
6216 `(("python" ,python-wrapper)
6217 ("dbus-glib" ,dbus-glib)))
6218 (synopsis "Python bindings for D-bus")
6219 (description "python-dbus provides bindings for libdbus, the reference
6220 implementation of D-Bus.")
6221 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
6222 (license license:expat)))
6224 (define-public python2-dbus
6225 (package (inherit python-dbus)
6226 (name "python2-dbus")
6227 (inputs `(("python" ,python-2)
6228 ,@(alist-delete "python"
6229 (package-inputs python-dbus)
6232 (define-public python-notify2
6234 (name "python-notify2")
6239 (uri (pypi-uri "notify2" version))
6242 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
6243 (build-system python-build-system)
6244 (arguments `(#:tests? #f)) ; tests depend on system state
6246 `(("python-dbus" ,python-dbus)))
6247 (home-page "https://bitbucket.org/takluyver/pynotify2")
6248 (synopsis "Python interface to D-Bus notifications")
6250 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6251 It is a reimplementation of pynotify in pure Python, and an alternative to
6252 the GObject Introspection bindings to libnotify for non-GTK applications.")
6253 (license (list license:bsd-2
6254 license:lgpl2.1+))))
6256 (define-public python2-notify2
6257 (package-with-python2 python-notify2))
6259 ;; beautifulsoup4 has a totally different namespace than 3.x,
6260 ;; and pypi seems to put it under its own name, so I guess we should too
6261 (define-public python-beautifulsoup4
6263 (name "python-beautifulsoup4")
6268 (uri (pypi-uri "beautifulsoup4" version))
6271 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
6272 (build-system python-build-system)
6275 (modify-phases %standard-phases
6276 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6277 ;; must use this conversion script when building with Python 3. The
6278 ;; conversion script also runs the tests.
6279 ;; For more information, see the file 'convert-py3k' in the source
6282 (lambda _ (invoke "./convert-py3k"))))))
6284 `(("python-soupsieve" ,python-soupsieve)))
6286 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6288 "Python screen-scraping library")
6290 "Beautiful Soup is a Python library designed for rapidly setting up
6291 screen-scraping projects. It offers Pythonic idioms for navigating,
6292 searching, and modifying a parse tree, providing a toolkit for
6293 dissecting a document and extracting what you need. It automatically
6294 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6295 (license license:expat)
6296 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6298 (define-public python2-beautifulsoup4
6300 (inherit (package-with-python2
6301 (strip-python2-variant python-beautifulsoup4)))
6302 (arguments `(#:python ,python-2))))
6304 (define-public python-soupsieve
6306 (name "python-soupsieve")
6311 (uri (pypi-uri "soupsieve" version))
6314 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
6315 (build-system python-build-system)
6316 (arguments `(#:tests? #f))
6317 ;;XXX: 2 tests fail currently despite claming they were to be
6318 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6319 ;;don't want to create a circular dependency.
6320 (home-page "https://github.com/facelessuser/soupsieve")
6321 (synopsis "CSS selector library")
6323 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6324 Soup 4. It aims to provide selecting, matching, and filtering using modern
6325 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6326 specifications up through the latest CSS level 4 drafts and beyond (though
6327 some are not yet implemented).")
6328 (properties `((python2-variant . ,(delay python2-soupsieve))))
6329 (license license:expat)))
6331 (define-public python2-soupsieve
6332 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6336 `(("python2-backports-functools-lru-cache"
6337 ,python2-backports-functools-lru-cache)
6338 ,@(package-propagated-inputs base))))))
6340 (define-public python-netifaces
6342 (name "python-netifaces")
6347 (uri (pypi-uri "netifaces" version))
6350 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6351 (build-system python-build-system)
6352 (home-page "https://github.com/al45tair/netifaces")
6354 "Python module for portable network interface information")
6356 "Netifaces is a Python module providing information on network
6357 interfaces in an easy and portable manner.")
6358 (license license:expat)))
6360 (define-public python2-netifaces
6361 (package-with-python2 python-netifaces))
6363 (define-public python-networkx
6365 (name "python-networkx")
6370 (uri (pypi-uri "networkx" version))
6372 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
6373 (build-system python-build-system)
6375 '(#:phases (modify-phases %standard-phases
6377 (lambda* (#:key tests? #:allow-other-keys)
6379 (invoke "pytest" "-vv" "--pyargs" "networkx")
6380 (format #t "test suite not run~%"))
6382 ;; python-decorator is needed at runtime.
6384 `(("python-decorator" ,python-decorator)))
6386 `(("python-pytest" ,python-pytest)))
6387 (home-page "https://networkx.github.io/")
6388 (synopsis "Python module for creating and manipulating graphs and networks")
6390 "NetworkX is a Python package for the creation, manipulation, and study
6391 of the structure, dynamics, and functions of complex networks.")
6392 (properties `((python2-variant . ,(delay python2-networkx))))
6393 (license license:bsd-3)))
6395 ;; NetworkX 2.2 is the last version with support for Python 2.
6396 (define-public python2-networkx
6397 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
6403 (uri (pypi-uri "networkx" version ".zip"))
6406 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6408 `(#:python ,python-2))
6410 `(("python-nose" ,python2-nose)
6411 ("unzip" ,unzip))))))
6413 (define-public python-datrie
6415 (name "python-datrie")
6420 (uri (pypi-uri "datrie" version))
6423 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6424 (build-system python-build-system)
6426 `(("python-cython" ,python-cython)
6427 ("python-hypothesis" ,python-hypothesis)
6428 ("python-pytest" ,python-pytest)
6429 ("python-pytest-runner" ,python-pytest-runner)))
6430 (home-page "https://github.com/kmike/datrie")
6431 (synopsis "Fast, efficiently stored trie for Python")
6433 "This package provides a fast, efficiently stored trie implementation for
6435 (license license:lgpl2.1+)))
6437 (define-public snakemake
6444 (uri (pypi-uri "snakemake" version))
6446 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6447 (build-system python-build-system)
6449 ;; TODO: Package missing test dependencies.
6452 (modify-phases %standard-phases
6453 ;; For cluster execution Snakemake will call Python. Since there is
6454 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6455 ;; this by calling the snakemake wrapper instead.
6456 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6457 (lambda* (#:key outputs #:allow-other-keys)
6458 (substitute* "snakemake/executors.py"
6459 (("\\{sys.executable\\} -m snakemake")
6460 (string-append (assoc-ref outputs "out")
6464 `(("python-appdirs" ,python-appdirs)
6465 ("python-configargparse" ,python-configargparse)
6466 ("python-datrie" ,python-datrie)
6467 ("python-docutils" ,python-docutils)
6468 ("python-gitpython" ,python-gitpython)
6469 ("python-jinja2" ,python-jinja2)
6470 ("python-jsonschema" ,python-jsonschema)
6471 ("python-networkx" ,python-networkx)
6472 ("python-psutil" ,python-psutil)
6473 ("python-pyyaml" ,python-pyyaml)
6474 ("python-ratelimiter" ,python-ratelimiter)
6475 ("python-requests" ,python-requests)
6476 ("python-wrapt" ,python-wrapt)))
6477 (home-page "https://snakemake.readthedocs.io")
6478 (synopsis "Python-based execution environment for make-like workflows")
6480 "Snakemake aims to reduce the complexity of creating workflows by
6481 providing a clean and modern domain specific specification language (DSL) in
6482 Python style, together with a fast and comfortable execution environment.")
6483 (license license:expat)))
6485 (define-public python-pyqrcode
6487 (name "python-pyqrcode")
6492 (uri (pypi-uri "PyQRCode" version))
6495 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6496 (build-system python-build-system)
6498 "https://github.com/mnooner256/pyqrcode")
6499 (synopsis "QR code generator")
6501 "Pyqrcode is a QR code generator written purely in Python with
6502 SVG, EPS, PNG and terminal output.")
6503 (license license:bsd-3)))
6505 (define-public python-seaborn
6507 (name "python-seaborn")
6512 (uri (pypi-uri "seaborn" version))
6514 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
6515 (build-system python-build-system)
6518 (modify-phases %standard-phases
6519 (add-before 'check 'start-xserver
6520 (lambda* (#:key inputs #:allow-other-keys)
6521 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6522 ;; There must be a running X server and make check doesn't
6523 ;; start one. Therefore we must do it.
6524 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6525 (setenv "DISPLAY" ":1")
6527 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6529 `(("python-pandas" ,python-pandas)
6530 ("python-matplotlib" ,python-matplotlib)
6531 ("python-numpy" ,python-numpy)
6532 ("python-scipy" ,python-scipy)))
6534 `(("python-pytest" ,python-pytest)
6535 ("xorg-server" ,xorg-server-for-tests)))
6536 (home-page "https://seaborn.pydata.org/")
6537 (synopsis "Statistical data visualization")
6539 "Seaborn is a library for making attractive and informative statistical
6540 graphics in Python. It is built on top of matplotlib and tightly integrated
6541 with the PyData stack, including support for numpy and pandas data structures
6542 and statistical routines from scipy and statsmodels.")
6543 (properties `((python2-variant . ,(delay python2-seaborn))))
6544 (license license:bsd-3)))
6546 ;; 0.9.1 is the last release with support for Python 2.
6547 (define-public python2-seaborn
6548 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6554 (uri (pypi-uri "seaborn" version))
6557 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
6559 (define-public python-mpmath
6561 (name "python-mpmath")
6565 (uri (string-append "http://mpmath.org/files/mpmath-"
6569 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6570 (build-system python-build-system)
6573 (modify-phases %standard-phases
6576 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6577 (home-page "http://mpmath.org")
6578 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6580 "@code{mpmath} can be used as an arbitrary-precision substitute for
6581 Python's float/complex types and math/cmath modules, but also does much
6582 more advanced mathematics.")
6583 (license license:bsd-3)))
6585 (define-public python2-mpmath
6586 (package-with-python2 python-mpmath))
6588 (define-public python-bigfloat
6590 (name "python-bigfloat")
6595 (uri (pypi-uri "bigfloat" version))
6597 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6598 (build-system python-build-system)
6601 (home-page "https://github.com/mdickinson/bigfloat")
6602 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6604 "This package provides a Python interface to the MPFR library for
6605 multiprecision arithmetic.")
6606 (license license:lgpl3+)))
6608 (define-public python2-bigfloat
6609 (package-with-python2 python-bigfloat))
6611 (define-public python-sympy
6613 (name "python-sympy")
6619 "https://github.com/sympy/sympy/releases/download/sympy-"
6620 version "/sympy-" version ".tar.gz"))
6622 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6623 (build-system python-build-system)
6626 (modify-phases %standard-phases
6627 ;; Run the core tests after installation. By default it would run
6628 ;; *all* tests, which take a very long time to complete and are known
6631 (add-after 'install 'check
6632 (lambda* (#:key outputs #:allow-other-keys)
6633 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6636 `(("python-mpmath" ,python-mpmath)))
6637 (home-page "https://www.sympy.org/")
6638 (synopsis "Python library for symbolic mathematics")
6640 "SymPy is a Python library for symbolic mathematics. It aims to become a
6641 full-featured computer algebra system (CAS) while keeping the code as simple
6642 as possible in order to be comprehensible and easily extensible.")
6643 (license license:bsd-3)))
6645 (define-public python2-sympy
6647 (inherit (package-with-python2 python-sympy))
6650 (modify-phases %standard-phases
6651 ;; Run the core tests after installation. By default it would run
6652 ;; *all* tests, which take a very long time to complete and are known
6655 (add-after 'install 'check
6656 (lambda* (#:key outputs #:allow-other-keys)
6657 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6660 (define-public python-q
6667 (uri (pypi-uri "q" version))
6670 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6671 (build-system python-build-system)
6672 (home-page "https://github.com/zestyping/q")
6673 (synopsis "Quick-and-dirty debugging output for tired programmers")
6675 "q is a Python module for \"print\" style of debugging Python code. It
6676 provides convenient short API for print out of values, tracebacks, and
6677 falling into the Python interpreter.")
6678 (license license:asl2.0)))
6680 (define-public python2-q
6681 (package-with-python2 python-q))
6683 (define-public python2-xlib
6685 (name "python2-xlib")
6689 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6691 "python-xlib-" version ".tar.gz"))
6694 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6695 (build-system python-build-system)
6697 `(#:python ,python-2 ;Python 2 only
6698 #:tests? #f)) ;no tests
6699 (home-page "http://python-xlib.sourceforge.net/")
6700 (synopsis "Python X11 client library")
6702 "The Python X Library is intended to be a fully functional X client
6703 library for Python programs. It is useful to implement low-level X clients.
6704 It is written entirely in Python.")
6705 (license license:gpl2+)))
6707 (define-public python-singledispatch
6709 (name "python-singledispatch")
6714 (uri (pypi-uri "singledispatch" version))
6717 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6718 (build-system python-build-system)
6720 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6722 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
6723 (synopsis "Backport of singledispatch feature from Python 3.4")
6725 "This library brings functools.singledispatch from Python 3.4 to Python
6727 (license license:expat)))
6729 (define-public python2-singledispatch
6730 (package-with-python2 python-singledispatch))
6732 ;; the python- version can be removed with python-3.5
6733 (define-public python-backports-abc
6735 (name "python-backports-abc")
6740 (uri (pypi-uri "backports_abc" version))
6743 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6744 (build-system python-build-system)
6745 (home-page "https://github.com/cython/backports_abc")
6746 (synopsis "Backport of additions to the 'collections.abc' module")
6748 "Python-backports-abc provides a backport of additions to the
6749 @code{collections.abc} module in Python-3.5.")
6750 (license license:psfl)))
6752 (define-public python2-backports-abc
6753 (package-with-python2 python-backports-abc))
6755 (define-public python-backports-csv
6757 (name "python-backports-csv")
6762 (uri (pypi-uri "backports.csv" version))
6765 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6766 (build-system python-build-system)
6767 (home-page "https://github.com/ryanhiebert/backports.csv")
6768 (synopsis "Backport of Python 3's csv module for Python 2")
6770 "Provides a backport of Python 3's @code{csv} module for parsing
6771 comma separated values. The API of the @code{csv} module in Python 2
6772 is drastically different from the @code{csv} module in Python 3.
6773 This is due, for the most part, to the difference between str in
6774 Python 2 and Python 3.")
6775 (license license:psfl)))
6777 (define-public python2-backports-csv
6778 (package-with-python2 python-backports-csv))
6780 (define-public python2-backports-shutil-get-terminal-size
6782 (name "python2-backports-shutil-get-terminal-size")
6787 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6790 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6791 (build-system python-build-system)
6793 `(#:python ,python-2
6795 (modify-phases %standard-phases
6798 (invoke "py.test" "-v"))))))
6800 `(("python2-pytest" ,python2-pytest)))
6801 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6802 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6804 "This package provides a backport of the @code{get_terminal_size
6805 function} from Python 3.3's @code{shutil}.
6806 Unlike the original version it is written in pure Python rather than C,
6807 so it might be a tiny bit slower.")
6808 (license license:expat)))
6810 (define-public python-waf
6816 (uri (string-append "https://waf.io/"
6817 "waf-" version ".tar.bz2"))
6820 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6821 (build-system python-build-system)
6824 (modify-phases %standard-phases
6827 ;; XXX: Find a way to add all extra tools.
6828 (let ((tools '("gccdeps"
6829 "clang_compilation_database")))
6830 (invoke "python" "waf-light" "configure" "build"
6831 (string-append "--tools="
6832 (string-join tools ","))))))
6835 (invoke "python" "waf" "--version")))
6837 (lambda* (#:key outputs #:allow-other-keys)
6838 (let ((out (assoc-ref outputs "out")))
6839 (install-file "waf" (string-append out "/bin")))
6841 ;; waf breaks when it is wrapped.
6843 (home-page "https://waf.io/")
6844 (synopsis "Python-based build system")
6846 "Waf is a Python-based framework for configuring, compiling and installing
6848 (license license:bsd-3)))
6850 (define-public python2-waf
6851 (package-with-python2 python-waf))
6853 (define-public python-pyzmq
6855 (name "python-pyzmq")
6860 (uri (pypi-uri "pyzmq" version))
6862 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6863 (build-system python-build-system)
6866 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6867 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6868 ;; --inplace' for 'python setup.py test' to work.
6871 `(("zeromq" ,zeromq)))
6873 `(("pkg-config" ,pkg-config)
6874 ("python-nose" ,python-nose)))
6875 (home-page "https://github.com/zeromq/pyzmq")
6876 (synopsis "Python bindings for 0MQ")
6878 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6879 (license license:bsd-4)))
6881 (define-public python2-pyzmq
6882 (package-with-python2 python-pyzmq))
6884 (define-public python-pep8
6885 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6886 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6887 ;; some dependents' test suites, and nothing more.
6889 (name "python-pep8")
6894 (uri (pypi-uri "pep8" version))
6897 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6898 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6899 (build-system python-build-system)
6900 (home-page "https://pep8.readthedocs.org/")
6901 (synopsis "Python style guide checker")
6903 "This tools checks Python code against some of the style conventions in
6905 (license license:expat)))
6907 (define-public python2-pep8
6908 (package-with-python2 python-pep8))
6910 (define-public python-pyflakes
6912 (name "python-pyflakes")
6917 (uri (pypi-uri "pyflakes" version))
6920 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6921 (build-system python-build-system)
6923 "https://github.com/pyflakes/pyflakes")
6924 (synopsis "Passive checker of Python programs")
6926 "Pyflakes statically checks Python source code for common errors.")
6927 (license license:expat)))
6929 (define-public python2-pyflakes
6930 (package-with-python2 python-pyflakes))
6932 (define-public python-mccabe
6934 (name "python-mccabe")
6939 (uri (pypi-uri "mccabe" version))
6942 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6943 (build-system python-build-system)
6945 `(("python-pytest" ,python-pytest-bootstrap)
6946 ("python-pytest-runner" ,python-pytest-runner)))
6947 (home-page "https://github.com/flintwork/mccabe")
6948 (synopsis "McCabe checker, plugin for flake8")
6950 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6951 complexity of Python source code.")
6952 (license license:expat)))
6954 (define-public python2-mccabe
6955 (package-with-python2 python-mccabe))
6957 (define-public python-mccabe-0.2.1
6958 (package (inherit python-mccabe)
6963 (uri (pypi-uri "mccabe" version))
6966 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6968 (define-public python2-mccabe-0.2.1
6969 (package-with-python2 python-mccabe-0.2.1))
6971 ;; Flake8 2.4.1 requires an older version of pep8.
6972 ;; This should be removed ASAP.
6973 (define-public python-pep8-1.5.7
6974 (package (inherit python-pep8)
6979 (uri (pypi-uri "pep8" version))
6982 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6984 ;; XXX Tests not compatible with Python 3.5.
6987 (define-public python2-pep8-1.5.7
6988 (package-with-python2 python-pep8-1.5.7))
6990 ;; Flake8 2.4.1 requires an older version of pyflakes.
6991 ;; This should be removed ASAP.
6992 (define-public python-pyflakes-0.8.1
6993 (package (inherit python-pyflakes)
6998 (uri (pypi-uri "pyflakes" version))
7001 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
7003 ;; XXX Tests not compatible with Python 3.5.
7006 (define-public python2-pyflakes-0.8.1
7007 (package-with-python2 python-pyflakes-0.8.1))
7009 (define-public python-flake8
7011 (name "python-flake8")
7015 (uri (pypi-uri "flake8" version))
7018 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
7019 (build-system python-build-system)
7022 (modify-phases %standard-phases
7024 (add-after 'install 'check
7025 (lambda* (#:key inputs outputs #:allow-other-keys)
7026 (add-installed-pythonpath inputs outputs)
7027 (invoke "pytest" "-v")
7030 `(("python-pycodestyle" ,python-pycodestyle)
7031 ("python-entrypoints" ,python-entrypoints)
7032 ("python-pyflakes" ,python-pyflakes)
7033 ("python-mccabe" ,python-mccabe)))
7035 `(("python-mock" ,python-mock)
7036 ("python-pytest" ,python-pytest-bootstrap)
7037 ("python-pytest-runner" ,python-pytest-runner)))
7038 (home-page "https://gitlab.com/pycqa/flake8")
7040 "The modular source code checker: pep8, pyflakes and co")
7042 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7043 (properties `((python2-variant . ,(delay python2-flake8))))
7044 (license license:expat)))
7046 (define-public python2-flake8
7047 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
7048 (package (inherit base)
7050 `(("python2-configparser" ,python2-configparser)
7051 ("python2-enum34" ,python2-enum34)
7052 ("python2-functools32" ,python2-functools32)
7053 ("python2-typing" ,python2-typing)
7054 ,@(package-propagated-inputs base))))))
7056 ;; python-hacking requires flake8 <2.6.0.
7057 (define-public python-flake8-2.5
7059 (inherit python-flake8)
7063 (uri (pypi-uri "flake8" version))
7066 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
7068 `(("python-pep8" ,python-pep8)
7069 ,@(package-propagated-inputs python-flake8)))
7070 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
7072 (define-public python2-flake8-2.5
7074 (inherit python2-flake8)
7075 (version (package-version python-flake8-2.5))
7077 (inherit (package-source python-flake8-2.5))))
7079 `(("python2-pep8" ,python2-pep8)
7080 ,@(package-propagated-inputs python2-flake8)))))
7082 (define-public python-flake8-polyfill
7084 (name "python-flake8-polyfill")
7089 (uri (pypi-uri "flake8-polyfill" version))
7092 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7093 (build-system python-build-system)
7096 (modify-phases %standard-phases
7099 ;; Be compatible with Pytest 4:
7100 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7101 (substitute* "setup.cfg"
7105 (setenv "PYTHONPATH"
7106 (string-append (getcwd) "/build/lib:"
7107 (getenv "PYTHONPATH")))
7108 (invoke "py.test" "-v"))))))
7110 `(("python-flake8" ,python-flake8)
7111 ("python-mock" ,python-mock)
7112 ("python-pep8" ,python-pep8)
7113 ("python-pycodestyle" ,python-pycodestyle)
7114 ("python-pytest" ,python-pytest)))
7115 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7116 (synopsis "Polyfill package for Flake8 plugins")
7118 "This package that provides some compatibility helpers for Flake8
7119 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7120 (license license:expat)))
7122 (define-public python2-flake8-polyfill
7123 (package-with-python2 python-flake8-polyfill))
7125 (define-public python-mistune
7127 (name "python-mistune")
7132 (uri (pypi-uri "mistune" version))
7135 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7136 (build-system python-build-system)
7138 `(("python-nose" ,python-nose)
7139 ("python-cython" ,python-cython)))
7140 (home-page "https://github.com/lepture/mistune")
7141 (synopsis "Markdown parser in pure Python")
7142 (description "This package provides a fast markdown parser in pure
7144 (license license:bsd-3)))
7146 (define-public python2-mistune
7147 (package-with-python2 python-mistune))
7149 (define-public python-markdown
7151 (name "python-markdown")
7156 (uri (pypi-uri "Markdown" version))
7159 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
7160 (build-system python-build-system)
7162 `(("python-nose" ,python-nose)
7163 ("python-pyyaml" ,python-pyyaml)))
7164 (home-page "https://python-markdown.github.io/")
7165 (synopsis "Python implementation of Markdown")
7167 "This package provides a Python implementation of John Gruber's
7168 Markdown. The library features international input, various Markdown
7169 extensions, and several HTML output formats. A command line wrapper
7170 markdown_py is also provided to convert Markdown files to HTML.")
7171 (properties `((python2-variant . ,(delay python2-markdown))))
7172 (license license:bsd-3)))
7174 ;; Markdown 3.2 dropped support for Python 2.
7175 (define-public python2-markdown
7176 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7182 (uri (pypi-uri "Markdown" version))
7185 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
7187 (define-public python-ptyprocess
7189 (name "python-ptyprocess")
7194 (uri (pypi-uri "ptyprocess" version))
7197 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7198 (build-system python-build-system)
7200 `(("python-nose" ,python-nose)))
7203 (modify-phases %standard-phases
7205 (lambda _ (invoke "nosetests"))))))
7206 (home-page "https://github.com/pexpect/ptyprocess")
7207 (synopsis "Run a subprocess in a pseudo terminal")
7209 "This package provides a Python library used to launch a subprocess in a
7210 pseudo terminal (pty), and interact with both the process and its pty.")
7211 (license license:isc)))
7213 (define-public python2-ptyprocess
7214 (package-with-python2 python-ptyprocess))
7216 (define-public python-cram
7218 (name "python-cram")
7220 (home-page "https://bitheap.org/cram/")
7223 (uri (list (string-append home-page "cram-"
7225 (pypi-uri "cram" version)))
7228 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7231 (modify-phases %standard-phases
7232 (add-after 'unpack 'patch-source
7234 (substitute* (find-files "cram" ".*\\.py$")
7235 ;; Replace default shell path.
7236 (("/bin/sh") (which "sh")))
7237 (substitute* (find-files "tests" ".*\\.t$")
7239 (("/bin/bash") (which "bash"))
7240 (("/bin/sh") (which "sh")))
7241 (substitute* "cram/_test.py"
7242 ;; This hack works around a bug triggered by substituting
7243 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7244 ;; "cram -h", which breaks the output at 80 characters. This
7245 ;; causes the line showing the default shell to break into two
7246 ;; lines, but the test expects a single line...
7247 (("env\\['COLUMNS'\\] = '80'")
7248 "env['COLUMNS'] = '160'"))
7250 (substitute* "Makefile"
7251 ;; Recent versions of python-coverage have caused the test
7252 ;; coverage to decrease (as of version 0.7). Allow that.
7253 (("--fail-under=100")
7258 ;; The test phase uses the built library and executable.
7259 (lambda* (#:key inputs outputs #:allow-other-keys)
7260 (add-installed-pythonpath inputs outputs)
7261 (setenv "PATH" (string-append (getenv "PATH") ":"
7262 (assoc-ref outputs "out") "/bin"))
7263 (invoke "make" "test"))))))
7264 (build-system python-build-system)
7266 `(("python-coverage" ,python-coverage)
7268 (synopsis "Simple testing framework for command line applications")
7270 "Cram is a functional testing framework for command line applications.
7271 Cram tests look like snippets of interactive shell sessions. Cram runs each
7272 command and compares the command output in the test with the command’s actual
7274 (license license:gpl2+)))
7276 (define-public python2-cram
7277 (package-with-python2 python-cram))
7279 (define-public python-straight-plugin
7281 (name "python-straight-plugin")
7286 (uri (pypi-uri "straight.plugin" version))
7289 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7290 (build-system python-build-system)
7291 (home-page "https://github.com/ironfroggy/straight.plugin")
7292 (synopsis "Simple namespaced plugin facility")
7293 (description "Straight Plugin provides a type of plugin you can create from
7294 almost any existing Python modules, and an easy way for outside developers to
7295 add functionality and customization to your projects with their own plugins.")
7296 (license license:expat)))
7298 (define-public python2-straight-plugin
7299 (package-with-python2 python-straight-plugin))
7301 (define-public python-fonttools
7303 (name "python-fonttools")
7307 (uri (pypi-uri "fonttools" version ".zip"))
7310 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
7311 (build-system python-build-system)
7314 ("python-pytest" ,python-pytest)
7315 ("python-pytest-runner" ,python-pytest-runner)))
7316 (home-page "https://github.com/fonttools/fonttools")
7317 (synopsis "Tools to manipulate font files")
7319 "FontTools/TTX is a library to manipulate font files from Python. It
7320 supports reading and writing of TrueType/OpenType fonts, reading and writing
7321 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7322 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7323 from an XML-based format.")
7324 (license license:expat)))
7326 (define-public python2-fonttools
7327 (package-with-python2 python-fonttools))
7329 (define-public python-ly
7336 (uri (pypi-uri name version))
7339 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7340 (build-system python-build-system)
7342 ;; FIXME: Some tests need network access.
7344 (synopsis "Tool and library for manipulating LilyPond files")
7345 (description "This package provides a Python library to parse, manipulate
7346 or create documents in LilyPond format. A command line program ly is also
7347 provided that can be used to do various manipulations with LilyPond files.")
7348 (home-page "https://pypi.org/project/python-ly/")
7349 (license license:gpl2+)))
7351 (define-public python-appdirs
7353 (name "python-appdirs")
7358 (uri (pypi-uri "appdirs" version))
7361 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7362 (build-system python-build-system)
7363 (home-page "https://github.com/ActiveState/appdirs")
7365 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7367 "This module provides a portable way of finding out where user data
7368 should be stored on various operating systems.")
7369 (license license:expat)))
7371 (define-public python2-appdirs
7372 (package-with-python2 python-appdirs))
7374 (define-public python-llfuse
7376 (name "python-llfuse")
7380 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7383 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7384 (build-system python-build-system)
7389 `(("pkg-config" ,pkg-config)))
7390 (synopsis "Python bindings for FUSE")
7392 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7393 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7394 (license license:lgpl2.0+)
7395 (properties `((python2-variant . ,(delay python2-llfuse))))))
7397 (define-public python2-llfuse
7398 (package (inherit (package-with-python2
7399 (strip-python2-variant python-llfuse)))
7400 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7403 (define-public python-llfuse-0.41
7404 (package (inherit python-llfuse)
7409 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7410 "llfuse-" version ".tar.bz2"))
7413 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7414 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7415 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7416 (license (list license:expat license:lgpl2.0+))))
7418 (define-public python-msgpack
7420 (name "python-msgpack")
7424 (uri (pypi-uri "msgpack" version))
7427 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7428 (build-system python-build-system)
7430 `(#:modules ((guix build utils)
7431 (guix build python-build-system)
7436 (modify-phases %standard-phases
7439 (let ((cwd (getcwd)))
7440 (setenv "PYTHONPATH"
7441 (string-append cwd "/build/"
7442 (find (cut string-prefix? "lib" <>)
7443 (scandir (string-append cwd "/build")))
7445 (getenv "PYTHONPATH")))
7446 (invoke "pytest" "-v" "test")))))))
7448 `(("python-pytest" ,python-pytest)))
7449 (synopsis "MessagePack (de)serializer")
7450 (description "MessagePack is a fast, compact binary serialization format,
7451 suitable for similar data to JSON. This package provides CPython bindings for
7452 reading and writing MessagePack data.")
7453 (home-page "https://pypi.org/project/msgpack/")
7454 (license license:asl2.0)))
7456 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7457 ;; release 0.5. Some packages like borg still call it by the old name for now.
7458 ;; <https://bugs.gnu.org/30662>
7459 (define-public python-msgpack-transitional
7461 (inherit python-msgpack)
7462 (name "python-msgpack-transitional")
7464 (substitute-keyword-arguments (package-arguments python-msgpack)
7466 `(modify-phases ,phases
7467 (add-after 'unpack 'configure-transitional
7469 ;; Keep using the old name.
7470 (substitute* "setup.py"
7471 (("TRANSITIONAL = False")
7472 "TRANSITIONAL = 1"))
7475 (define-public python2-msgpack
7476 (package-with-python2 python-msgpack))
7478 (define-public python-netaddr
7480 (name "python-netaddr")
7485 (uri (pypi-uri "netaddr" version))
7488 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7489 (build-system python-build-system)
7490 (arguments `(#:tests? #f)) ;; No tests.
7491 (home-page "https://github.com/drkjam/netaddr/")
7492 (synopsis "Pythonic manipulation of network addresses")
7494 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7495 and MAC network addresses.")
7496 (license license:bsd-3)))
7498 (define-public python2-netaddr
7499 (package-with-python2 python-netaddr))
7501 (define-public python2-pyroute2
7503 (name "python2-pyroute2")
7508 (uri (pypi-uri "pyroute2" version))
7511 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7512 (build-system python-build-system)
7514 `(#:python ,python-2)) ;Python 3.x is not supported
7515 (home-page "https://github.com/svinota/pyroute2")
7516 (synopsis "Python netlink library")
7518 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7519 Supported netlink families and protocols include:
7521 @item rtnl, network settings - addresses, routes, traffic controls
7522 @item nfnetlink - netfilter API: ipset, nftables, ...
7523 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7524 @item devlink - manage and monitor devlink-enabled hardware
7525 @item generic - generic netlink families
7527 @item nl80211 - wireless functions API (basic support)
7528 @item taskstats - extended process statistics
7529 @item acpi_events - ACPI events monitoring
7530 @item thermal_events - thermal events monitoring
7531 @item VFS_DQUOT - disk quota events monitoring
7534 (license license:gpl2+)))
7536 (define-public python-wrapt
7538 (name "python-wrapt")
7543 (uri (pypi-uri "wrapt" version))
7546 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7547 (build-system python-build-system)
7549 ;; Tests are not included in the tarball, they are only available in the
7552 (home-page "https://github.com/GrahamDumpleton/wrapt")
7553 (synopsis "Module for decorators, wrappers and monkey patching")
7555 "The aim of the wrapt module is to provide a transparent object proxy for
7556 Python, which can be used as the basis for the construction of function
7557 wrappers and decorator functions.")
7558 (license license:bsd-2)))
7560 (define-public python2-wrapt
7561 (package-with-python2 python-wrapt))
7563 (define-public python-xlrd
7565 (name "python-xlrd")
7569 (uri (pypi-uri "xlrd" version))
7572 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7573 (build-system python-build-system)
7576 (modify-phases %standard-phases
7577 ;; Some tests depend on writing a temporary file to the user's home
7579 (add-after 'unpack 'fix-tests
7581 (delete-file "tests/test_open_workbook.py")
7583 (home-page "http://www.python-excel.org/")
7584 (synopsis "Library for extracting data from Excel files")
7585 (description "This package provides a library to extract data from
7586 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7587 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7588 Unicode-aware. It is not intended as an end-user tool.")
7589 (license license:bsd-3)))
7591 (define-public python2-xlrd
7592 (package-with-python2 python-xlrd))
7594 (define-public python-prettytable
7596 (name "python-prettytable")
7601 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7604 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7605 (build-system python-build-system)
7606 (home-page "https://code.google.com/archive/p/prettytable/")
7607 (synopsis "Display tabular data in an ASCII table format")
7609 "A library designed to represent tabular data in visually appealing ASCII
7610 tables. PrettyTable allows for selection of which columns are to be printed,
7611 independent alignment of columns (left or right justified or centred) and
7612 printing of sub-tables by specifying a row range.")
7613 (license license:bsd-3)))
7615 (define-public python2-prettytable
7616 (package-with-python2 python-prettytable))
7618 (define-public python-tables
7620 (name "python-tables")
7625 (uri (pypi-uri "tables" version))
7628 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7629 (modules '((guix build utils)))
7632 ;; Remove pre-compiled .pyc files from source.
7633 (for-each delete-file-recursively
7634 (find-files "." "__pycache__" #:directories? #t))
7635 (for-each delete-file (find-files "." "\\.pyc$"))
7637 (build-system python-build-system)
7639 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7640 ;; or "check", so we must override the build and check phases.
7642 (modify-phases %standard-phases
7643 (add-after 'unpack 'use-gcc
7645 (substitute* "setup.py"
7646 (("compiler = new_compiler\\(\\)" line)
7648 "\ncompiler.set_executables(compiler='gcc',"
7649 "compiler_so='gcc',"
7651 "linker_so='gcc -shared')")))
7653 (add-after 'unpack 'disable-tuning
7655 (substitute* "setup.py"
7657 "cpu_flags = ['sse2']\n"))
7660 (lambda* (#:key inputs #:allow-other-keys)
7661 (invoke "python" "setup.py" "build"
7662 (string-append "--hdf5="
7663 (assoc-ref inputs "hdf5")))))
7665 (lambda* (#:key inputs #:allow-other-keys)
7666 (invoke "python" "setup.py" "check"
7667 (string-append "--hdf5="
7668 (assoc-ref inputs "hdf5"))))))))
7670 `(("python-numexpr" ,python-numexpr)
7671 ("python-numpy" ,python-numpy)))
7673 `(("python-cython" ,python-cython)
7674 ("pkg-config" ,pkg-config)))
7676 `(("hdf5" ,hdf5-1.10)
7679 (home-page "http://www.pytables.org/")
7680 (synopsis "Hierarchical datasets for Python")
7681 (description "PyTables is a package for managing hierarchical datasets and
7682 designed to efficiently cope with extremely large amounts of data.")
7683 (license license:bsd-3)))
7685 (define-public python2-tables
7686 (package-with-python2 python-tables))
7688 (define-public python-pytest-black
7690 (name "python-pytest-black")
7695 (uri (pypi-uri "pytest-black" version))
7698 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7699 (build-system python-build-system)
7701 `(("python-pytest" ,python-pytest)
7702 ("python-black" ,python-black)
7703 ("python-toml" ,python-toml)))
7705 `(("python-setuptools-scm" ,python-setuptools-scm)))
7706 (home-page "https://github.com/shopkeep/pytest-black")
7707 (synopsis "Pytest plugin to enable format checking with black")
7709 "This package provides a pytest plugin to enable format checking with the
7710 Python code formatter \"black\".")
7711 (license license:expat)))
7713 (define-public python-get-version
7715 (name "python-get-version")
7720 (uri (pypi-uri "get_version" version))
7723 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7724 (build-system python-build-system)
7726 `(("python-pygments" ,python-pygments)
7727 ("python-pytest" ,python-pytest)
7728 ("python-pytest-black" ,python-pytest-black)
7729 ("python-pytest-cov" ,python-pytest-cov)
7730 ("python-setuptools" ,python-setuptools)
7731 ("python-testpath" ,python-testpath)))
7732 (home-page "https://github.com/flying-sheep/get_version")
7733 (synopsis "Version helper in the spirit of versioneer")
7735 "This package provides a version helper that lets you automatically use
7736 the latest @code{vX.X.X} Git tag as the version in your Python package. It
7737 also supports getting the version from Python source distributions or, once
7738 your package is installed, via @code{pkg_resources} (part of
7739 @code{setuptools}).")
7740 (license license:gpl3+)))
7742 (define-public python-legacy-api-wrap
7744 (name "python-legacy-api-wrap")
7749 (uri (pypi-uri "legacy-api-wrap" version))
7752 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7753 (build-system python-build-system)
7755 `(("python-get-version" ,python-get-version)
7756 ("python-pytest" ,python-pytest)
7757 ("python-pytest-black" ,python-pytest-black)
7758 ("python-pytest-cov" ,python-pytest-cov)
7759 ("python-setuptools" ,python-setuptools)))
7760 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7761 (synopsis "Legacy API wrapper")
7762 (description "This module defines a decorator to wrap legacy APIs. The
7763 primary use case is APIs defined before keyword-only parameters existed.")
7764 (license license:gpl3+)))
7766 (define-public python-pyasn1
7768 (name "python-pyasn1")
7773 (uri (pypi-uri "pyasn1" version))
7776 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7777 (build-system python-build-system)
7778 (home-page "http://pyasn1.sourceforge.net/")
7779 (synopsis "ASN.1 types and codecs")
7781 "This is an implementation of ASN.1 types and codecs in Python. It is
7782 suitable for a wide range of protocols based on the ASN.1 specification.")
7783 (license license:bsd-2)))
7785 (define-public python2-pyasn1
7786 (package-with-python2 python-pyasn1))
7788 (define-public python-pyasn1-modules
7790 (name "python-pyasn1-modules")
7795 (uri (pypi-uri "pyasn1-modules" version))
7798 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7799 (build-system python-build-system)
7801 `(("python-pyasn1" ,python-pyasn1)))
7802 (home-page "https://sourceforge.net/projects/pyasn1/")
7803 (synopsis "ASN.1 codec implementations")
7805 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7806 implementations of ASN.1-based codecs and protocols.")
7807 (license license:bsd-3)))
7809 (define-public python2-pyasn1-modules
7810 (package-with-python2 python-pyasn1-modules))
7812 (define-public python-ipaddress
7814 (name "python-ipaddress")
7818 (uri (pypi-uri "ipaddress" version))
7821 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7822 (build-system python-build-system)
7823 (home-page "https://github.com/phihag/ipaddress")
7824 (synopsis "IP address manipulation library")
7826 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7827 in Python. This library is used to create, poke at, and manipulate IPv4 and
7828 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7829 module to older versions of Python.")
7830 (license license:psfl)))
7832 (define-public python2-ipaddress
7833 (package-with-python2 python-ipaddress))
7835 (define-public python2-ipaddr
7837 (name "python2-ipaddr")
7842 (uri (pypi-uri "ipaddr" version))
7844 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7845 (build-system python-build-system)
7847 `(#:python ,python-2 ;version 2 only
7849 (modify-phases %standard-phases
7851 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7852 (home-page "https://github.com/google/ipaddr-py")
7853 (synopsis "IP address manipulation library")
7855 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7856 IPv6 addresses and networks.
7858 For new implementations you may prefer to use the standard module
7859 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7860 versions of Python.")
7861 (license license:asl2.0)))
7863 (define-public python-idna
7865 (name "python-idna")
7870 (uri (pypi-uri "idna" version))
7873 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7874 (build-system python-build-system)
7875 (home-page "https://github.com/kjd/idna")
7876 (synopsis "Internationalized domain names in applications")
7878 "This is a library to support the Internationalised Domain Names in
7879 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7880 protocol is often referred to as “IDNA2008” and can produce different results
7881 from the earlier standard from 2003. The library is also intended to act as a
7882 suitable drop-in replacement for the “encodings.idna” module that comes with
7883 the Python standard library but currently only supports the older 2003
7885 (license license:bsd-4)))
7887 (define-public python-idna-2.7
7888 (package (inherit python-idna)
7892 (uri (pypi-uri "idna" version))
7895 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7898 (define-public python2-idna
7899 (package-with-python2 python-idna))
7901 (define-public python-idna-ssl
7903 (name "python-idna-ssl")
7908 (uri (pypi-uri "idna-ssl" version))
7911 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7912 (build-system python-build-system)
7914 `(#:tests? #f)) ;circular dependency with python-aiohttp
7915 (home-page "https://github.com/aio-libs/idna-ssl")
7916 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7917 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7919 (license license:expat)))
7921 (define-public python-pretend
7923 (name "python-pretend")
7928 (uri (pypi-uri "pretend" version))
7931 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7932 (build-system python-build-system)
7933 (home-page "https://github.com/alex/pretend")
7934 (synopsis "Library for stubbing in Python")
7936 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7937 technique for writing tests. You may hear the term mixed up with mocks,
7938 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7939 responses, rather than doing any computation.")
7940 (license license:bsd-3)))
7942 (define-public python2-pretend
7943 (package-with-python2 python-pretend))
7945 (define-public python-pip
7952 (uri (pypi-uri "pip" version))
7955 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
7956 (build-system python-build-system)
7958 '(#:tests? #f)) ; there are no tests in the pypi archive.
7959 (home-page "https://pip.pypa.io/")
7960 (synopsis "Package manager for Python software")
7962 "Pip is a package manager for Python software, that finds packages on the
7963 Python Package Index (PyPI).")
7964 (license license:expat)))
7966 (define-public python2-pip
7967 (package-with-python2 python-pip))
7969 (define-public python-tlsh
7971 (name "python-tlsh")
7973 (home-page "https://github.com/trendmicro/tlsh")
7978 (url "https://github.com/trendmicro/tlsh.git")
7979 (commit (string-append "v" version))))
7980 (file-name (git-file-name name version))
7982 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7983 (build-system cmake-build-system)
7985 '(#:out-of-source? #f
7986 #:phases (modify-phases %standard-phases
7989 (lambda* (#:key outputs #:allow-other-keys)
7990 ;; Build and install the Python bindings. The underlying
7991 ;; C++ library is apparently not meant to be installed.
7992 (let ((out (assoc-ref outputs "out")))
7993 (with-directory-excursion "py_ext"
7994 (and (system* "python" "setup.py" "build")
7995 (system* "python" "setup.py" "install"
7996 (string-append "--prefix=" out))))))))))
7997 (inputs `(("python" ,python-wrapper))) ;for the bindings
7998 (synopsis "Fuzzy matching library for Python")
8000 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8001 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8002 value which can be used for similarity comparisons. Similar objects have
8003 similar hash values, which allows for the detection of similar objects by
8004 comparing their hash values. The byte stream should have a sufficient amount
8005 of complexity; for example, a byte stream of identical bytes will not generate
8007 (license license:asl2.0)))
8009 (define-public python2-tlsh
8011 (inherit python-tlsh)
8012 (name "python2-tlsh")
8013 (inputs `(("python" ,python-2)))))
8015 (define-public python-termcolor
8017 (name "python-termcolor")
8022 (uri (pypi-uri "termcolor" version))
8025 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8026 (build-system python-build-system)
8028 ;; There are no tests.
8030 (home-page "https://pypi.org/project/termcolor/")
8031 (synopsis "ANSII Color formatting for terminal output")
8033 "This package provides ANSII Color formatting for output in terminals.")
8034 (license license:expat)))
8036 (define-public python2-termcolor
8037 (package-with-python2 python-termcolor))
8039 (define-public python-libarchive-c
8041 (name "python-libarchive-c")
8045 (uri (pypi-uri "libarchive-c" version))
8048 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
8049 (build-system python-build-system)
8051 '(#:phases (modify-phases %standard-phases
8053 'build 'reference-libarchive
8054 (lambda* (#:key inputs #:allow-other-keys)
8055 ;; Retain the absolute file name of libarchive.so.
8056 (let ((libarchive (assoc-ref inputs "libarchive")))
8057 (substitute* "libarchive/ffi.py"
8058 (("find_library\\('archive'\\)")
8059 (string-append "'" libarchive
8060 "/lib/libarchive.so'"))))))
8062 (lambda _ (invoke "pytest" "-vv"))))))
8064 `(("python-mock" ,python-mock)
8065 ("python-pytest" ,python-pytest)))
8067 `(("libarchive" ,libarchive)))
8068 (home-page "https://github.com/Changaco/python-libarchive-c")
8069 (synopsis "Python interface to libarchive")
8071 "This package provides Python bindings to libarchive, a C library to
8072 access possibly compressed archives in many different formats. It uses
8073 Python's @code{ctypes} foreign function interface (FFI).")
8074 (license license:lgpl2.0+)))
8076 (define-public python2-libarchive-c
8077 (package-with-python2 python-libarchive-c))
8079 (define-public python-file
8082 (name "python-file")
8083 (build-system python-build-system)
8085 '(#:tests? #f ;no tests
8086 #:configure-flags '("--single-version-externally-managed" "--root=/")
8087 #:phases (modify-phases %standard-phases
8088 (add-before 'build 'change-directory
8092 (add-before 'build 'set-library-file-name
8093 (lambda* (#:key inputs #:allow-other-keys)
8094 (let ((file (assoc-ref inputs "file")))
8095 (substitute* "magic.py"
8096 (("find_library\\('magic'\\)")
8097 (string-append "'" file "/lib/libmagic.so'")))
8099 (inputs `(("file" ,file)))
8100 (native-inputs (if (%current-target-system)
8101 `(("self" ,this-package))
8103 (synopsis "Python bindings to the libmagic file type guesser. Note that
8104 this module and the python-magic module both provide a \"magic.py\" file;
8105 these two modules, which are different and were developed separately, both
8106 serve the same purpose: provide Python bindings for libmagic.")))
8108 (define-public python2-file
8109 (package-with-python2 python-file))
8111 (define-public python-debian
8113 (name "python-debian")
8114 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
8118 ;; Use git-fetch, as pypi doesn't include test suite.
8123 (file-name (git-file-name name version))
8126 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
8127 (build-system python-build-system)
8129 `(#:phases (modify-phases %standard-phases
8130 (add-after 'unpack 'remove-debian-specific-tests
8131 ;; python-apt, apt and dpkg are not yet available in guix,
8132 ;; and these tests heavily depend on them.
8134 (delete-file "lib/debian/tests/test_deb822.py")
8135 (delete-file "lib/debian/tests/test_debfile.py")
8138 `(("python-six" ,python-six)
8139 ("python-chardet" ,python-chardet)))
8140 (synopsis "Debian package related modules")
8142 ;; XXX: Use @enumerate instead of @itemize to work around
8143 ;; <http://bugs.gnu.org/21772>.
8144 "This package provides Python modules that abstract many formats of
8145 Debian-related files, such as:
8148 @item Debtags information;
8149 @item @file{debian/changelog} files;
8150 @item packages files, pdiffs;
8151 @item control files of single or multiple RFC822-style paragraphs---e.g.
8152 @file{debian/control}, @file{.changes}, @file{.dsc};
8153 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8154 contained files and meta-information.
8157 ;; Modules are either GPLv2+ or GPLv3+.
8158 (license license:gpl3+)))
8160 (define-public python-nbformat
8162 (name "python-nbformat")
8167 (uri (pypi-uri "nbformat" version))
8170 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8171 (build-system python-build-system)
8172 (arguments `(#:tests? #f)) ; no test target
8174 `(("python-ipython-genutils" ,python-ipython-genutils)
8175 ("python-jsonschema" ,python-jsonschema)
8176 ("python-jupyter-core" ,python-jupyter-core)
8177 ("python-traitlets" ,python-traitlets)))
8178 (home-page "http://jupyter.org")
8179 (synopsis "Jupyter Notebook format")
8180 (description "This package provides the reference implementation of the
8181 Jupyter Notebook format and Python APIs for working with notebooks.")
8182 (license license:bsd-3)))
8184 (define-public python2-nbformat
8185 (package-with-python2 python-nbformat))
8187 (define-public python-bleach
8189 (name "python-bleach")
8194 (uri (pypi-uri "bleach" version))
8197 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
8198 (build-system python-build-system)
8200 `(("python-webencodings" ,python-webencodings)
8201 ("python-six" ,python-six)))
8203 `(("python-pytest" ,python-pytest)
8204 ("python-pytest-runner" ,python-pytest-runner-2)))
8205 (home-page "https://github.com/jsocol/bleach")
8206 (synopsis "Whitelist-based HTML-sanitizing tool")
8207 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8208 (license license:asl2.0)))
8210 (define-public python2-bleach
8211 (package-with-python2 python-bleach))
8213 (define-public python-entrypoints
8215 (name "python-entrypoints")
8220 (uri (pypi-uri "entrypoints" version))
8223 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
8224 (build-system python-build-system)
8225 ;; The package does not come with a setup.py file, so we have to generate
8230 (modify-phases %standard-phases
8231 (add-after 'unpack 'create-setup.py
8233 (call-with-output-file "setup.py"
8236 from setuptools import setup
8237 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8239 (home-page "https://github.com/takluyver/entrypoints")
8240 (synopsis "Discover and load entry points from installed Python packages")
8241 (description "Entry points are a way for Python packages to advertise
8242 objects with some common interface. The most common examples are
8243 @code{console_scripts} entry points, which define shell commands by
8244 identifying a Python function to run. The @code{entrypoints} module contains
8245 functions to find and load entry points.")
8246 (license license:expat)))
8248 (define-public python2-entrypoints
8249 (package-with-python2 python-entrypoints))
8251 (define-public python-nbconvert
8253 (name "python-nbconvert")
8258 (uri (pypi-uri "nbconvert" version))
8261 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8262 (build-system python-build-system)
8264 `(;; The "bdist_egg" target is disabled by default, causing the installation
8266 #:configure-flags (list "bdist_egg")
8267 ;; FIXME: 5 failures, 40 errors.
8270 ;; (modify-phases %standard-phases
8273 ;; (zero? (system* "py.test" "-v")))))
8275 `(("python-pytest" ,python-pytest)))
8277 `(("python-bleach" ,python-bleach)
8278 ("python-entrypoints" ,python-entrypoints)
8279 ("python-jinja2" ,python-jinja2)
8280 ("python-jupyter-core" ,python-jupyter-core)
8281 ("python-mistune" ,python-mistune)
8282 ("python-nbformat" ,python-nbformat)
8283 ("python-pygments" ,python-pygments)
8284 ("python-traitlets" ,python-traitlets)))
8285 (home-page "http://jupyter.org")
8286 (synopsis "Converting Jupyter Notebooks")
8287 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8288 notebooks to various other formats via Jinja templates. It allows you to
8289 convert an @code{.ipynb} notebook file into various static formats including:
8297 @item ReStructured Text (rst)
8298 @item executable script
8300 (license license:bsd-3)))
8302 (define-public python2-nbconvert
8303 (package-with-python2 python-nbconvert))
8305 (define-public python-notebook
8307 (name "python-notebook")
8311 (uri (pypi-uri "notebook" version))
8314 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8315 (build-system python-build-system)
8318 (modify-phases %standard-phases
8321 ;; These tests require a browser
8322 (delete-file-recursively "notebook/tests/selenium")
8323 ;; Some tests need HOME
8324 (setenv "HOME" "/tmp")
8325 ;; This file contains "warningfilters", which are not supported
8326 ;; by this version of nose.
8327 (delete-file "setup.cfg")
8328 (with-directory-excursion "/tmp"
8329 (invoke "nosetests" "-v"))
8332 `(("python-jupyter-core" ,python-jupyter-core)
8333 ("python-nbformat" ,python-nbformat)
8334 ("python-nbconvert" ,python-nbconvert)
8335 ("python-prometheus-client" ,python-prometheus-client)
8336 ("python-send2trash" ,python-send2trash)
8337 ("python-terminado" ,python-terminado)))
8339 `(("python-nose" ,python-nose)
8340 ("python-sphinx" ,python-sphinx)
8341 ("python-requests" ,python-requests)))
8342 (home-page "http://jupyter.org/")
8343 (synopsis "Web-based notebook environment for interactive computing")
8345 "The Jupyter HTML notebook is a web-based notebook environment for
8346 interactive computing.")
8347 (properties `((python2-variant . ,(delay python2-notebook))))
8348 (license license:bsd-3)))
8350 (define-public python2-notebook
8351 (let ((base (package-with-python2
8352 (strip-python2-variant python-notebook))))
8353 (package (inherit base)
8355 `(("python2-mock" ,python2-mock)
8356 ,@(package-native-inputs base)))
8358 (substitute-keyword-arguments (package-arguments base)
8360 `(modify-phases ,phases
8361 (add-before 'check 'disable-test-case
8362 ;; The test requires network access to localhost. Curiously it
8363 ;; fails with Python 2 only. Simply make the test-case return
8367 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8368 (("formats = self.nbconvert_api") "return #")))))))))))
8370 (define-public python-widgetsnbextension
8372 (name "python-widgetsnbextension")
8377 (uri (pypi-uri "widgetsnbextension" version))
8380 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8381 (build-system python-build-system)
8383 `(("python-ipykernel" ,python-ipykernel)
8384 ("python-notebook" ,python-notebook)))
8386 `(("python-certifi" ,python-certifi)
8387 ("python-nose" ,python-nose)))
8388 (home-page "https://ipython.org")
8389 (synopsis "IPython HTML widgets for Jupyter")
8390 (description "This package provides interactive HTML widgets for Jupyter
8392 (license license:bsd-3)))
8394 (define-public python2-widgetsnbextension
8395 (package-with-python2 python-widgetsnbextension))
8397 (define-public python-ipywidgets
8399 (name "python-ipywidgets")
8404 (uri (pypi-uri "ipywidgets" version))
8407 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8408 (build-system python-build-system)
8410 `(("python-ipython" ,python-ipython)
8411 ("python-traitlets" ,python-traitlets)
8412 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8414 `(("python-nose" ,python-nose)
8415 ("python-pytest" ,python-pytest)))
8416 (home-page "https://ipython.org")
8417 (synopsis "IPython HTML widgets for Jupyter")
8418 (description "Ipywidgets are interactive HTML widgets for Jupyter
8419 notebooks and the IPython kernel. Notebooks come alive when interactive
8420 widgets are used. Users gain control of their data and can visualize changes
8422 (license license:bsd-3)))
8424 (define-public python2-ipywidgets
8425 (package-with-python2 python-ipywidgets))
8427 (define-public python-jupyter-console
8429 (name "python-jupyter-console")
8434 (uri (pypi-uri "jupyter_console" version))
8437 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8438 (build-system python-build-system)
8440 `(("python-ipykernel" ,python-ipykernel)
8441 ("python-jupyter-client" ,python-jupyter-client)
8442 ("python-prompt-toolkit" ,python-prompt-toolkit)
8443 ("python-pygments" ,python-pygments)))
8445 `(("python-nose" ,python-nose)))
8446 (home-page "https://jupyter.org")
8447 (synopsis "Jupyter terminal console")
8448 (description "This package provides a terminal-based console frontend for
8449 Jupyter kernels. It also allows for console-based interaction with non-Python
8450 Jupyter kernels such as IJulia and IRKernel.")
8451 (properties `((python2-variant . ,(delay python2-jupyter-console))))
8452 (license license:bsd-3)))
8454 (define-public python2-jupyter-console
8456 (name "python2-jupyter-console")
8461 (uri (pypi-uri "jupyter_console" version))
8464 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8465 (build-system python-build-system)
8467 `(#:python ,python-2
8468 #:tests? #f)) ; Tests only run in a TTY.
8470 `(("python2-ipykernel" ,python2-ipykernel)
8471 ("python2-jupyter-client" ,python2-jupyter-client)
8472 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8473 ("python2-pygments" ,python2-pygments)))
8475 `(("python2-nose" ,python2-nose)))
8476 (home-page "https://jupyter.org")
8477 (synopsis "Jupyter terminal console")
8478 (description "This package provides a terminal-based console frontend for
8479 Jupyter kernels. It also allows for console-based interaction with non-Python
8480 Jupyter kernels such as IJulia and IRKernel.")
8481 (license license:bsd-3)))
8483 ;; The python-ipython and python-jupyter-console require each other. To get
8484 ;; the functionality in both packages working, strip down the
8485 ;; python-jupyter-console package when using it as an input to python-ipython.
8486 (define python-jupyter-console-minimal
8488 (inherit python-jupyter-console)
8489 (name "python-jupyter-console-minimal")
8491 (substitute-keyword-arguments
8492 (package-arguments python-jupyter-console)
8494 `(modify-phases ,phases
8495 (add-after 'install 'delete-bin
8496 (lambda* (#:key outputs #:allow-other-keys)
8497 ;; Delete the bin files, to avoid conflicts in profiles
8498 ;; where python-ipython and python-jupyter-console are
8500 (delete-file-recursively
8502 (assoc-ref outputs "out") "/bin"))))))))
8503 ;; Remove the python-ipython propagated input, to avoid the cycle
8507 (package-propagated-inputs python-jupyter-console)))))
8509 (define-public python-qtconsole
8511 (name "python-qtconsole")
8516 (uri (pypi-uri "qtconsole" version))
8519 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8520 (build-system python-build-system)
8522 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8523 ;; but we only have the LTS version 5.x. This means that there might be
8524 ;; runtime errors, but since this is a dependency of the Jupyter package,
8525 ;; and Jupyter can be used without the qtconsole we can overlook this for
8529 (modify-phases %standard-phases
8530 (add-before 'check 'pre-check
8532 (setenv "QT_QPA_PLATFORM" "offscreen")
8535 `(("python-ipykernel" ,python-ipykernel)
8536 ("python-ipython" ,python-ipython)))
8538 `(("python-pytest" ,python-pytest)))
8539 (home-page "http://jupyter.org")
8540 (synopsis "Jupyter Qt console")
8541 (description "This package provides a Qt-based console for Jupyter with
8542 support for rich media output.")
8543 (license license:bsd-3)))
8545 (define-public python-jsbeautifier
8547 (name "python-jsbeautifier")
8549 (home-page "https://github.com/beautify-web/js-beautify")
8554 (commit (string-append "v" version))))
8555 (file-name (git-file-name name version))
8558 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8559 (build-system python-build-system)
8561 `(#:phases (modify-phases %standard-phases
8562 (add-after 'unpack 'chdir
8564 ;; The upstream Git repository contains all the code,
8565 ;; but this package only builds the python code.
8568 (add-after 'unpack 'patch-python-six-requirements
8570 (substitute* "python/setup.py"
8575 `(("python-editorconfig" ,python-editorconfig)
8576 ("python-six" ,python-six)))
8578 `(("python-pytest" ,python-pytest)))
8579 (synopsis "JavaScript unobfuscator and beautifier")
8580 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8581 popular online obfuscators.")
8582 (license license:expat)))
8584 (define-public jupyter
8591 (uri (pypi-uri "jupyter" version))
8594 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8595 (build-system python-build-system)
8596 (arguments '(#:tests? #f)) ; there are none.
8598 `(("python-ipykernel" ,python-ipykernel)
8599 ("python-ipywidgets" ,python-ipywidgets)
8600 ("python-jupyter-console" ,python-jupyter-console)
8601 ("python-nbconvert" ,python-nbconvert)
8602 ("python-notebook" ,python-notebook)
8603 ("python-qtconsole" ,python-qtconsole)))
8604 (native-search-paths
8605 (list (search-path-specification
8606 (variable "JUPYTER_PATH")
8607 (files '("share/jupyter")))))
8608 (home-page "https://jupyter.org")
8609 (synopsis "Web application for interactive documents")
8611 "The Jupyter Notebook is a web application that allows you to create and
8612 share documents that contain live code, equations, visualizations and
8613 explanatory text. Uses include: data cleaning and transformation, numerical
8614 simulation, statistical modeling, machine learning and much more.")
8615 (license license:bsd-3)))
8617 (define-public python-chardet
8619 (name "python-chardet")
8624 (uri (pypi-uri "chardet" version))
8627 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8629 `(("python-hypothesis" ,python-hypothesis)
8630 ("python-pytest" ,python-pytest)
8631 ("python-pytest-runner" ,python-pytest-runner)))
8632 (build-system python-build-system)
8633 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8634 (arguments `(#:tests? #f))
8635 (home-page "https://github.com/chardet/chardet")
8636 (synopsis "Universal encoding detector for Python 2 and 3")
8638 "This package provides @code{chardet}, a Python module that can
8639 automatically detect a wide range of file encodings.")
8640 (license license:lgpl2.1+)))
8642 (define-public python2-chardet
8643 (package-with-python2 python-chardet))
8645 (define-public python-docopt
8647 (name "python-docopt")
8652 ;; The release on PyPI does not include tests.
8654 (url "https://github.com/docopt/docopt")
8656 (file-name (git-file-name name version))
8659 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8660 (build-system python-build-system)
8662 `(("python-pytest" ,python-pytest)))
8665 (modify-phases %standard-phases
8667 (lambda _ (invoke "py.test"))))))
8668 (home-page "http://docopt.org")
8669 (synopsis "Command-line interface description language for Python")
8670 (description "This library allows the user to define a command-line
8671 interface from a program's help message rather than specifying it
8672 programmatically with command-line parsers like @code{getopt} and
8674 (license license:expat)))
8676 (define-public python2-docopt
8677 (package-with-python2 python-docopt))
8679 (define-public python-pythondialog
8681 (name "python-pythondialog")
8686 (uri (pypi-uri "pythondialog" version))
8689 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8690 (build-system python-build-system)
8693 (modify-phases %standard-phases
8694 (add-after 'unpack 'patch-path
8695 (lambda* (#:key inputs #:allow-other-keys)
8696 (let* ((dialog (assoc-ref inputs "dialog")))
8697 ;; Since this library really wants to grovel the search path, we
8698 ;; must hardcode dialog's store path into it.
8699 (substitute* "dialog.py"
8700 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8701 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8703 #:tests? #f)) ; no test suite
8705 `(("dialog" ,dialog)))
8706 (home-page "http://pythondialog.sourceforge.net/")
8707 (synopsis "Python interface to the UNIX dialog utility")
8708 (description "A Python wrapper for the dialog utility. Its purpose is to
8709 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8710 This allows one to make simple text-mode user interfaces on Unix-like systems")
8711 (license license:lgpl2.1)
8712 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8714 (define-public python2-pythondialog
8715 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8718 (version (package-version python-pythondialog))
8721 (uri (pypi-uri "python2-pythondialog" version))
8724 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8726 (define-public python-configobj
8728 (name "python-configobj")
8732 (uri (pypi-uri "configobj" version))
8735 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8736 ;; Patch setup.py so it looks for python-setuptools, which is
8737 ;; required to parse the keyword 'install_requires' in setup.py.
8738 (patches (search-patches "python-configobj-setuptools.patch"))))
8739 (build-system python-build-system)
8741 `(("python-six" ,python-six)))
8742 (synopsis "Config file reading, writing and validation")
8743 (description "ConfigObj is a simple but powerful config file reader and
8744 writer: an ini file round tripper. Its main feature is that it is very easy to
8745 use, with a straightforward programmer’s interface and a simple syntax for
8747 (home-page "https://github.com/DiffSK/configobj")
8748 (license license:bsd-3)))
8750 (define-public python2-configobj
8751 (package-with-python2 python-configobj))
8753 (define-public python-configargparse
8755 (name "python-configargparse")
8759 (uri (pypi-uri "ConfigArgParse" version))
8762 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8763 (build-system python-build-system)
8765 `(("python-pyyaml" ,python-pyyaml)))
8768 (modify-phases %standard-phases
8771 ;; Bypass setuptools-shim because one test relies on "setup.py"
8772 ;; being the first argument passed to the python call.
8774 ;; NOTE: Many tests do not run because they rely on Python's
8775 ;; built-in test.test_argparse, but we remove the unit tests from
8776 ;; our Python installation.
8777 (invoke "python" "setup.py" "test"))))))
8778 (synopsis "Replacement for argparse")
8779 (description "A drop-in replacement for argparse that allows options to also
8780 be set via config files and/or environment variables.")
8781 (home-page "https://github.com/bw2/ConfigArgParse")
8782 (license license:expat)))
8784 (define-public python2-configargparse
8785 (package-with-python2 python-configargparse))
8787 (define-public python-argparse-manpage
8789 (name "python-argparse-manpage")
8794 (uri (pypi-uri "argparse-manpage" version))
8797 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8798 (build-system python-build-system)
8799 (home-page "https://github.com/praiskup/argparse-manpage")
8800 (synopsis "Build manual page from Python's ArgumentParser object")
8802 "This package provides tools to build manual pages from Python's
8803 @code{ArgumentParser} object.")
8804 (license license:asl2.0)))
8806 (define-public python-contextlib2
8808 (name "python-contextlib2")
8809 (version "0.6.0.post1")
8813 (uri (pypi-uri "contextlib2" version))
8816 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
8817 (build-system python-build-system)
8818 (home-page "https://contextlib2.readthedocs.org/")
8819 (synopsis "Tools for decorators and context managers")
8820 (description "This module is primarily a backport of the Python
8821 3.2 contextlib to earlier Python versions. Like contextlib, it
8822 provides utilities for common tasks involving decorators and context
8823 managers. It also contains additional features that are not part of
8824 the standard library.")
8825 (properties `((python2-variant . ,(delay python2-contextlib2))))
8826 (license license:psfl)))
8828 (define-public python2-contextlib2
8829 (let ((base (package-with-python2
8830 (strip-python2-variant python-contextlib2))))
8834 (substitute-keyword-arguments (package-arguments base)
8836 `(modify-phases ,phases
8838 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8840 `(("python2-unittest2" ,python2-unittest2))))))
8842 (define-public python-texttable
8844 (name "python-texttable")
8849 (uri (pypi-uri "texttable" version))
8852 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
8853 (build-system python-build-system)
8856 (modify-phases %standard-phases
8858 (lambda _ (invoke "pytest" "tests.py"))))))
8860 `(("python-pytest" ,python-pytest)))
8861 (home-page "https://github.com/foutaise/texttable/")
8862 (synopsis "Python module for creating simple ASCII tables")
8863 (description "Texttable is a Python module for creating simple ASCII
8865 (license license:expat)))
8867 (define-public python2-texttable
8868 (package-with-python2 python-texttable))
8870 (define-public python-atomicwrites
8872 (name "python-atomicwrites")
8876 (uri (pypi-uri "atomicwrites" version))
8879 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8880 (build-system python-build-system)
8881 (synopsis "Atomic file writes in Python")
8882 (description "Library for atomic file writes using platform dependent tools
8883 for atomic file system operations.")
8884 (home-page "https://github.com/untitaker/python-atomicwrites")
8885 (license license:expat)))
8887 (define-public python2-atomicwrites
8888 (package-with-python2 python-atomicwrites))
8890 (define-public python-click-threading
8892 (name "python-click-threading")
8896 (uri (pypi-uri "click-threading" version))
8899 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8900 (build-system python-build-system)
8902 `(("python-click" ,python-click)))
8903 (synopsis "Utilities for multithreading in Click")
8904 (description "This package provides utilities for multithreading in Click
8906 (home-page "https://github.com/click-contrib/click-threading")
8907 (license license:expat)))
8909 (define-public python-click-log
8911 (name "python-click-log")
8915 (uri (pypi-uri "click-log" version))
8918 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8919 (build-system python-build-system)
8921 `(("python-click" ,python-click)))
8922 (synopsis "Logging for click applications")
8923 (description "This package provides a Python library for logging Click
8925 (home-page "https://github.com/click-contrib/click-log")
8926 (license license:expat)))
8928 (define-public python-apipkg
8930 (name "python-apipkg")
8934 (uri (pypi-uri "apipkg" version))
8937 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8938 (build-system python-build-system)
8940 `(("python-pytest" ,python-pytest)))
8941 (synopsis "Namespace control and lazy-import mechanism")
8942 (description "With apipkg you can control the exported namespace of a Python
8943 package and greatly reduce the number of imports for your users. It is a small
8944 pure Python module that works on virtually all Python versions.")
8945 (home-page "https://github.com/pytest-dev/apipkg")
8946 (license license:expat)))
8948 (define-public python2-apipkg
8949 (package-with-python2 python-apipkg))
8951 (define-public python-execnet
8953 (name "python-execnet")
8957 (uri (pypi-uri "execnet" version))
8960 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8961 (build-system python-build-system)
8963 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8964 ;; The two test failures are caused by the lack of an `ssh` executable.
8965 ;; The test suite can be run with pytest after the 'install' phase.
8968 `(("python-pytest" ,python-pytest)
8969 ("python-setuptools-scm" ,python-setuptools-scm)))
8971 `(("python-apipkg" ,python-apipkg)))
8972 (synopsis "Rapid multi-Python deployment")
8973 (description "Execnet provides a share-nothing model with
8974 channel-send/receive communication for distributing execution across many
8975 Python interpreters across version, platform and network barriers. It has a
8976 minimal and fast API targeting the following uses:
8978 @item distribute tasks to (many) local or remote CPUs
8979 @item write and deploy hybrid multi-process applications
8980 @item write scripts to administer multiple environments
8982 (home-page "https://codespeak.net/execnet/")
8983 (license license:expat)))
8985 (define-public python2-execnet
8986 (package-with-python2 python-execnet))
8988 (define-public python-icalendar
8990 (name "python-icalendar")
8994 (uri (pypi-uri "icalendar" version))
8997 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8998 (build-system python-build-system)
9000 `(("python-dateutil" ,python-dateutil)
9001 ("python-pytz" ,python-pytz)))
9002 (synopsis "Python library for parsing iCalendar files")
9003 (description "The icalendar package is a parser/generator of iCalendar
9004 files for use with Python.")
9005 (home-page "https://github.com/collective/icalendar")
9006 (license license:bsd-2)))
9008 (define-public python-args
9010 (name "python-args")
9014 (uri (pypi-uri "args" version))
9017 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9018 (build-system python-build-system)
9019 (home-page "https://github.com/kennethreitz/args")
9020 (synopsis "Command-line argument parser")
9022 "This library provides a Python module to parse command-line arguments.")
9023 (license license:bsd-3)))
9025 (define-public python2-args
9026 (package-with-python2 python-args))
9028 (define-public python-clint
9030 (name "python-clint")
9034 (uri (pypi-uri "clint" version))
9037 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9038 (build-system python-build-system)
9041 (modify-phases %standard-phases
9043 (lambda _ (invoke "py.test" "-v"))))))
9045 `(("python-pytest" ,python-pytest)))
9047 `(("python-args" ,python-args)))
9048 (home-page "https://github.com/kennethreitz/clint")
9049 (synopsis "Command-line interface tools")
9051 "Clint is a Python module filled with a set of tools for developing
9052 command-line applications, including tools for colored and indented
9053 output, progress bar display, and pipes.")
9054 (license license:isc)))
9056 (define-public python2-clint
9057 (package-with-python2 python-clint))
9059 (define-public python-rply
9061 (name "python-rply")
9065 (uri (pypi-uri "rply" version))
9068 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9069 (build-system python-build-system)
9071 `(("python-appdirs" ,python-appdirs)))
9072 (home-page "https://github.com/alex/rply")
9073 (synopsis "Parser generator for Python")
9075 "This package provides a pure Python based parser generator, that also
9076 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9077 with a new public API, and RPython support.")
9078 (license license:bsd-3)))
9080 (define-public python2-rply
9081 (package-with-python2 python-rply))
9083 (define-public python-hy
9089 (uri (pypi-uri "hy" version))
9092 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
9093 (build-system python-build-system)
9096 (modify-phases %standard-phases
9097 (add-before 'install 'set-HOME
9099 (setenv "HOME" "/tmp")))
9102 ;; Tests require write access to HOME.
9103 (setenv "HOME" "/tmp")
9104 (invoke "nosetests"))))))
9106 `(("python-coverage" ,python-coverage)
9107 ("python-nose" ,python-nose)))
9109 `(("python-astor" ,python-astor)
9110 ("python-clint" ,python-clint)
9111 ("python-rply" ,python-rply)
9112 ("python-fastentrypoints"
9113 ,python-fastentrypoints)
9114 ("python-funcparserlib"
9115 ,python-funcparserlib)))
9116 (home-page "http://hylang.org/")
9117 (synopsis "Lisp frontend to Python")
9119 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9120 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9121 Python at your fingertips, in Lisp form.")
9122 (license license:expat)))
9124 (define-public python2-hy
9125 (package-with-python2 python-hy))
9127 (define-public python2-functools32
9129 (name "python2-functools32")
9134 (uri (pypi-uri "functools32" version))
9137 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9138 (build-system python-build-system)
9140 `(#:python ,python-2
9141 #:tests? #f)) ; no test target
9142 (home-page "https://github.com/MiCHiLU/python-functools32")
9144 "Backport of the functools module from Python 3.2.3")
9146 "This package is a backport of the @code{functools} module from Python
9147 3.2.3 for use with older versions of Python and PyPy.")
9148 (license license:expat)))
9150 (define-public python2-subprocess32
9152 (name "python2-subprocess32")
9156 (uri (pypi-uri "subprocess32" version))
9159 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9161 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9162 (build-system python-build-system)
9164 `(#:python ,python-2
9165 ;; The test suite fails with Python > 2.7.13:
9166 ;; import test.support
9167 ;; ImportError: No module named support
9170 (modify-phases %standard-phases
9171 (add-after 'unpack 'patch-/bin/sh
9173 (substitute* '("subprocess32.py"
9174 "test_subprocess32.py")
9175 (("/bin/sh") (which "sh")))
9177 (home-page "https://github.com/google/python-subprocess32")
9178 (synopsis "Backport of the subprocess module from Python 3.2")
9180 "This is a backport of the @code{subprocess} standard library module
9181 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9182 new features. On POSIX systems it is guaranteed to be reliable when used
9183 in threaded applications. It includes timeout support from Python 3.3 but
9184 otherwise matches 3.2’s API.")
9185 (license license:psfl)))
9187 (define-public python2-futures
9189 (name "python2-futures")
9194 (uri (pypi-uri "futures" version))
9197 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9198 (build-system python-build-system)
9200 `(#:python ,python-2
9202 (modify-phases %standard-phases
9205 (invoke "python" "test_futures.py")
9207 (home-page "https://github.com/agronholm/pythonfutures")
9209 "Backport of the concurrent.futures package from Python 3.2")
9211 "The concurrent.futures module provides a high-level interface for
9212 asynchronously executing callables. This package backports the
9213 concurrent.futures package from Python 3.2")
9214 (license license:bsd-3)))
9216 (define-public python-promise
9218 (name "python-promise")
9223 (uri (pypi-uri "promise" version))
9226 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9227 (build-system python-build-system)
9228 ;; Tests wants python-futures, which is a python2 only program, and
9229 ;; can't be found by python-promise at test time.
9230 (arguments `(#:tests? #f))
9231 (home-page "https://github.com/syrusakbary/promise")
9232 (synopsis "Promises/A+ implementation for Python")
9234 "Promises/A+ implementation for Python")
9235 (properties `((python2-variant . ,(delay python2-promise))))
9236 (license license:expat)))
9238 (define-public python2-promise
9239 (let ((promise (package-with-python2
9240 (strip-python2-variant python-promise))))
9241 (package (inherit promise)
9242 (arguments (substitute-keyword-arguments (package-arguments promise)
9245 `(("python2-futures" ,python2-futures)
9246 ("python2-pytest" ,python2-pytest)
9247 ,@(package-native-inputs promise))))))
9249 (define-public python-progressbar33
9251 (name "python-progressbar33")
9256 (uri (pypi-uri "progressbar33" version))
9259 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
9260 (build-system python-build-system)
9261 (home-page "http://github.com/germangh/python-progressbar")
9262 (synopsis "Text progress bar library for Python")
9264 "This package provides a text progress bar library for Python. This
9265 version only differs from the original @code{progressbar} package in that it
9266 uses relative package imports instead of absolute imports, which is necessary
9267 for the module to work under Python 3.3.")
9268 ;; Either or both of these licenses may be selected.
9269 (license (list license:lgpl2.1+ license:bsd-3))))
9271 (define-public python-colorama
9273 (name "python-colorama")
9278 (uri (pypi-uri "colorama" version))
9281 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
9282 (build-system python-build-system)
9283 (synopsis "Colored terminal text rendering for Python")
9284 (description "Colorama is a Python library for rendering colored terminal
9286 (home-page "https://pypi.org/project/colorama/")
9287 (license license:bsd-3)))
9289 (define-public python2-colorama
9290 (package-with-python2 python-colorama))
9292 (define-public python-rsa
9299 (uri (pypi-uri "rsa" version))
9302 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9303 (build-system python-build-system)
9305 `(("python-pyasn1" ,python-pyasn1)))
9306 (synopsis "Pure-Python RSA implementation")
9307 (description "Python-RSA is a pure-Python RSA implementation. It supports
9308 encryption and decryption, signing and verifying signatures, and key
9309 generation according to PKCS#1 version 1.5. It can be used as a Python
9310 library as well as on the command line.")
9311 (home-page "https://stuvel.eu/rsa")
9312 (license license:asl2.0)))
9314 (define-public python2-rsa
9315 (package-with-python2 python-rsa))
9317 (define-public python-pluggy
9319 (name "python-pluggy")
9324 (uri (pypi-uri "pluggy" version))
9327 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
9328 (build-system python-build-system)
9330 `(("python-setuptools-scm" ,python-setuptools-scm)))
9331 (synopsis "Plugin and hook calling mechanism for Python")
9332 (description "Pluggy is an extraction of the plugin manager as used by
9333 Pytest but stripped of Pytest specific details.")
9334 (home-page "https://pypi.org/project/pluggy/")
9335 (license license:expat)))
9337 (define-public python2-pluggy
9338 (package-with-python2 python-pluggy))
9340 (define-public python-tox
9347 (uri (pypi-uri "tox" version))
9350 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9351 (build-system python-build-system)
9353 ;; FIXME: Tests require pytest-timeout, which itself requires
9354 ;; pytest>=2.8.0 for installation.
9357 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9358 ("python-py" ,python-py)
9359 ("python-virtualenv" ,python-virtualenv)))
9361 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9362 ("python-pytest" ,python-pytest) ; >= 2.3.5
9363 ("python-setuptools-scm" ,python-setuptools-scm)))
9364 (home-page "https://tox.readthedocs.io")
9365 (synopsis "Virtualenv-based automation of test activities")
9366 (description "Tox is a generic virtualenv management and test command line
9367 tool. It can be used to check that a package installs correctly with
9368 different Python versions and interpreters, or run tests in each type of
9369 supported environment, or act as a frontend to continuous integration
9371 (license license:expat)))
9373 (define-public python2-tox
9374 (package-with-python2 python-tox))
9376 (define-public python-jmespath
9378 (name "python-jmespath")
9383 (uri (pypi-uri "jmespath" version))
9386 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
9387 (build-system python-build-system)
9389 `(("python-nose" ,python-nose)))
9390 (synopsis "JSON Matching Expressions")
9391 (description "JMESPath (pronounced “james path”) is a Python library that
9392 allows one to declaratively specify how to extract elements from a JSON
9394 (home-page "https://github.com/jmespath/jmespath.py")
9395 (license license:expat)))
9397 (define-public python2-jmespath
9398 (package-with-python2 python-jmespath))
9400 (define-public python-botocore
9402 (name "python-botocore")
9403 (version "1.12.149")
9407 (uri (pypi-uri "botocore" version))
9410 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9411 (build-system python-build-system)
9413 ;; FIXME: Many tests are failing.
9416 `(("python-dateutil" ,python-dateutil)
9417 ("python-docutils" ,python-docutils)
9418 ("python-jmespath" ,python-jmespath)))
9420 `(("python-mock" ,python-mock)
9421 ("python-nose" ,python-nose)
9423 ("python-tox" ,python-tox)
9424 ("python-urllib3" ,python-urllib3)
9425 ("python-wheel" ,python-wheel)))
9426 (home-page "https://github.com/boto/botocore")
9427 (synopsis "Low-level interface to AWS")
9428 (description "Botocore is a Python library that provides a low-level
9429 interface to the Amazon Web Services (AWS) API.")
9430 (license license:asl2.0)))
9432 (define-public python2-botocore
9433 (package-with-python2 python-botocore))
9435 (define-public python-xdo
9442 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9443 "python-xdo_" version ".orig.tar.gz"))
9446 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9447 (build-system python-build-system)
9450 (modify-phases %standard-phases
9451 (add-before 'install 'patch-libxdo-path
9452 ;; Hardcode the path of dynamically loaded libxdo library.
9453 (lambda* (#:key inputs #:allow-other-keys)
9454 (let ((libxdo (string-append
9455 (assoc-ref inputs "xdotool")
9457 (substitute* "xdo/_xdo.py"
9458 (("find_library\\(\"xdo\"\\)")
9459 (simple-format #f "\"~a\"" libxdo)))
9461 #:tests? #f)) ; no tests provided
9463 `(("python-six" ,python-six)))
9465 `(("xdotool" ,xdotool)
9466 ("libX11" ,libx11)))
9467 (home-page "https://tracker.debian.org/pkg/python-xdo")
9468 (synopsis "Python library for simulating X11 keyboard/mouse input")
9469 (description "Provides bindings to libxdo for manipulating X11 via simulated
9470 input. (Note that this is mostly a legacy library; you may wish to look at
9471 python-xdo for newer bindings.)")
9472 (license license:bsd-3)))
9474 (define-public python2-xdo
9475 (package-with-python2 python-xdo))
9477 (define-public python-mako
9479 (name "python-mako")
9484 (uri (pypi-uri "Mako" version))
9487 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
9488 (build-system python-build-system)
9490 `(#:phases (modify-phases %standard-phases
9493 (invoke "pytest" "-vv"))))))
9495 `(("python-markupsafe" ,python-markupsafe)))
9497 `(("python-mock" ,python-mock)
9498 ("python-pytest" ,python-pytest)))
9499 (home-page "https://www.makotemplates.org/")
9500 (synopsis "Templating language for Python")
9501 (description "Mako is a templating language for Python that compiles
9502 templates into Python modules.")
9503 (license license:expat)))
9505 (define-public python2-mako
9506 (package-with-python2 python-mako))
9508 (define-public python-waitress
9510 (name "python-waitress")
9515 (uri (pypi-uri "waitress" version))
9516 (patches (search-patches "python-waitress-fix-tests.patch"))
9519 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9520 (build-system python-build-system)
9521 (home-page "https://github.com/Pylons/waitress")
9522 (synopsis "Waitress WSGI server")
9523 (description "Waitress is meant to be a production-quality pure-Python WSGI
9524 server with very acceptable performance.")
9525 (license license:zpl2.1)))
9527 (define-public python2-waitress
9528 (package-with-python2 python-waitress))
9530 (define-public python-whichcraft
9532 (name "python-whichcraft")
9537 (uri (pypi-uri "whichcraft" version))
9540 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9541 (build-system python-build-system)
9543 `(("python-pytest" ,python-pytest)))
9544 (home-page "https://github.com/pydanny/whichcraft")
9545 (synopsis "Cross-platform cross-python shutil.which functionality")
9547 "This package provides a shim of the shutil.which function that's
9548 designed to work across multiple versions of Python.")
9549 (license license:bsd-3)))
9551 (define-public python-cookiecutter
9553 (name "python-cookiecutter")
9558 (uri (pypi-uri "cookiecutter" version))
9561 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9562 (build-system python-build-system)
9564 `(("python-freezegun" ,python-freezegun)
9565 ("python-pytest" ,python-pytest)
9566 ("python-pytest-catchlog" ,python-pytest-catchlog)
9567 ("python-pytest-cov" ,python-pytest-cov)
9568 ("python-pytest-mock" ,python-pytest-mock)))
9570 `(("python-binaryornot" ,python-binaryornot)
9571 ("python-click" ,python-click)
9572 ("python-future" ,python-future)
9573 ("python-jinja2" ,python-jinja2)
9574 ("python-jinja2-time" ,python-jinja2-time)
9575 ("python-poyo" ,python-poyo)
9576 ("python-requests" ,python-requests)
9577 ("python-whichcraft" ,python-whichcraft)))
9578 (home-page "https://github.com/audreyr/cookiecutter")
9580 "Command-line utility that creates projects from project templates")
9582 "This package provides a command-line utility that creates projects from
9583 project templates, e.g. creating a Python package project from a Python package
9585 (license license:bsd-3)))
9587 (define-public python-pyquery
9589 (name "python-pyquery")
9594 (uri (pypi-uri "pyquery" version))
9597 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9598 (build-system python-build-system)
9600 `(("python-webob" ,python-webob)
9601 ("python-webtest" ,python-webtest)))
9603 `(("python-lxml" ,python-lxml)
9604 ("python-cssselect" ,python-cssselect)))
9605 (home-page "https://github.com/gawel/pyquery")
9606 (synopsis "Make jQuery-like queries on xml documents")
9607 (description "pyquery allows you to make jQuery queries on xml documents.
9608 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9609 fast xml and html manipulation.")
9610 (license license:bsd-3)))
9612 (define-public python-anyjson
9614 (name "python-anyjson")
9619 (uri (pypi-uri "anyjson" version))
9622 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9623 (build-system python-build-system)
9625 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9626 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9627 ;; whatever) so this transformation needs to be done before the tests
9628 ;; can be run. Maybe we could add a build step to transform beforehand
9629 ;; but it could be annoying/difficult.
9630 ;; We can enable tests for the Python 2 version, though, and do below.
9632 (home-page "https://bitbucket.org/runeh/anyjson/")
9634 "Wraps best available JSON implementation in a common interface")
9636 "Anyjson loads whichever is the fastest JSON module installed
9637 and provides a uniform API regardless of which JSON implementation is used.")
9638 (license license:bsd-3)
9639 (properties `((python2-variant . ,(delay python2-anyjson))))))
9641 (define-public python2-anyjson
9642 (let ((anyjson (package-with-python2
9643 (strip-python2-variant python-anyjson))))
9646 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9648 ,@(package-arguments anyjson)))
9649 (native-inputs `(("python2-nose" ,python2-nose))))))
9651 (define-public python-amqp
9653 (name "python-amqp")
9658 (uri (pypi-uri "amqp" version))
9661 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9662 (build-system python-build-system)
9664 `(("python-case" ,python-case)
9665 ("python-pytest-sugar" ,python-pytest-sugar)
9666 ("python-mock" ,python-mock)))
9668 `(("python-vine" ,python-vine)))
9669 (home-page "https://github.com/celery/py-amqp")
9671 "Low-level AMQP client for Python (fork of amqplib)")
9673 "This is a fork of amqplib which was originally written by Barry Pederson.
9674 It is maintained by the Celery project, and used by kombu as a pure python
9675 alternative when librabbitmq is not available.")
9676 (license license:lgpl2.1+)
9677 (properties `((python2-variant . ,(delay python2-amqp))))))
9679 (define-public python2-amqp
9680 (let ((amqp (package-with-python2
9681 (strip-python2-variant python-amqp))))
9684 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9685 ;; unmaintained. Weirdly, does not do this on the python 3
9688 ,@(package-arguments amqp))))))
9690 (define-public python-txamqp
9692 (name "python-txamqp")
9697 (uri (pypi-uri "txAMQP" version))
9700 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9701 (build-system python-build-system)
9703 `(("python-six" ,python-six)
9704 ("python-twisted" ,python-twisted)))
9705 (home-page "https://github.com/txamqp/txamqp")
9706 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9708 "This package provides a Python library for communicating with AMQP peers
9709 and brokers using the asynchronous networking framework Twisted. It contains
9710 all the necessary code to connect, send and receive messages to/from an
9711 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9712 also includes support for using Thrift RPC over AMQP in Twisted
9714 (license license:asl2.0)))
9716 (define-public python2-txamqp
9717 (package-with-python2 python-txamqp))
9719 (define-public python-kombu
9721 (name "python-kombu")
9726 (uri (pypi-uri "kombu" version))
9729 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9730 (build-system python-build-system)
9732 `(("python-mock" ,python-mock)
9733 ("python-case" ,python-case)
9734 ("python-pyro4" ,python-pyro4)
9735 ("python-pytest-sugar" ,python-pytest-sugar)
9736 ("python-pytz" ,python-pytz)))
9738 `(("python-anyjson" ,python-anyjson)
9739 ("python-amqp" ,python-amqp)
9740 ("python-redis" ,python-redis)))
9741 (home-page "https://kombu.readthedocs.io")
9742 (synopsis "Message passing library for Python")
9743 (description "The aim of Kombu is to make messaging in Python as easy as
9744 possible by providing an idiomatic high-level interface for the AMQ protocol,
9745 and also provide proven and tested solutions to common messaging problems.
9746 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9747 message orientation, queuing, routing, reliability and security, for which the
9748 RabbitMQ messaging server is the most popular implementation.")
9749 (license license:bsd-3)
9750 (properties `((python2-variant . ,(delay python2-kombu))))))
9752 (define-public python2-kombu
9753 (let ((kombu (package-with-python2
9754 (strip-python2-variant python-kombu))))
9757 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9758 ;; It works fine on the python3 variant.
9760 ,@(package-arguments kombu)))
9761 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9762 ,@(package-native-inputs kombu))))))
9764 (define-public python-billiard
9766 (name "python-billiard")
9771 (uri (pypi-uri "billiard" version))
9774 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9775 (build-system python-build-system)
9777 `(("python-case" ,python-case)
9778 ("python-pytest" ,python-pytest)))
9779 (home-page "https://github.com/celery/billiard")
9781 "Python multiprocessing fork with improvements and bugfixes")
9783 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9784 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9785 pyprocessing package. This standalone variant is intended to be compatible with
9786 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9787 (license license:bsd-3)
9788 (properties `((python2-variant . ,(delay python2-billiard))))))
9790 (define-public python2-billiard
9791 (let ((billiard (package-with-python2
9792 (strip-python2-variant python-billiard))))
9795 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9796 ("python2-mock" ,python2-mock)
9797 ,@(package-native-inputs billiard))))))
9799 (define-public python-celery
9801 (name "python-celery")
9806 (uri (pypi-uri "celery" version))
9809 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9810 (build-system python-build-system)
9812 '(;; TODO The tests fail with Python 3.7
9813 ;; https://github.com/celery/celery/issues/4849
9816 (modify-phases %standard-phases
9817 (add-after 'unpack 'patch-requirements
9819 (substitute* "requirements/test.txt"
9820 (("pytest>=3\\.0,<3\\.3")
9824 `(("python-case" ,python-case)
9825 ("python-pytest" ,python-pytest)))
9827 `(("python-pytz" ,python-pytz)
9828 ("python-billiard" ,python-billiard)
9829 ("python-kombu" ,python-kombu)))
9830 (home-page "https://celeryproject.org")
9831 (synopsis "Distributed Task Queue")
9832 (description "Celery is an asynchronous task queue/job queue based on
9833 distributed message passing. It is focused on real-time operation, but
9834 supports scheduling as well. The execution units, called tasks, are executed
9835 concurrently on a single or more worker servers using multiprocessing,
9836 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9837 synchronously (wait until ready).")
9838 (license license:bsd-3)
9839 (properties `((python2-variant . ,(delay python2-celery))))))
9841 (define-public python2-celery
9842 (let ((celery (package-with-python2
9843 (strip-python2-variant python-celery))))
9846 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9847 ("python2-mock" ,python2-mock)
9848 ,@(package-native-inputs celery))))))
9850 (define-public python-translitcodec
9852 (name "python-translitcodec")
9857 (uri (pypi-uri "translitcodec" version))
9860 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9861 (build-system python-build-system)
9863 `(#:tests? #f)) ; no tests provided
9865 "https://github.com/claudep/translitcodec")
9867 "Unicode to 8-bit charset transliteration codec")
9869 "This package contains codecs for transliterating ISO 10646 texts into
9870 best-effort representations using smaller coded character sets (ASCII,
9872 (license license:expat)))
9874 (define-public python2-translitcodec
9875 (package-with-python2 python-translitcodec))
9877 (define-public python-editor
9879 (name "python-editor")
9884 (uri (pypi-uri "python-editor" version))
9887 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
9888 (build-system python-build-system)
9890 '(#:tests? #f)) ;XXX: needs a TTY and an editor
9891 (home-page "https://github.com/fmoo/python-editor")
9892 (synopsis "Programmatically open an editor, capture the result")
9894 "python-editor is a library that provides the editor module for
9895 programmatically interfacing with your system's $EDITOR.")
9896 (license license:asl2.0)))
9898 (define-public python2-editor
9899 (package-with-python2 python-editor))
9901 (define-public python-vobject
9903 (name "python-vobject")
9907 (uri (pypi-uri "vobject" version))
9910 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9911 (build-system python-build-system)
9913 '(;; The test suite relies on some non-portable Windows interfaces.
9916 `(("python-dateutil" ,python-dateutil)
9917 ("python-pyicu" ,python-pyicu)))
9918 (synopsis "Parse and generate vCard and vCalendar files")
9919 (description "Vobject is intended to be a full featured Python package for
9920 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9921 are supported and well tested. vCard 3.0 files are supported, and all data
9922 should be imported, but only a few components are understood in a sophisticated
9924 (home-page "https://eventable.github.io/vobject/")
9925 (license license:asl2.0)))
9927 (define-public python2-vobject
9928 (package-with-python2 python-vobject))
9930 (define-public python-munkres
9932 (name "python-munkres")
9936 (uri (pypi-uri "munkres" version))
9939 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9940 (build-system python-build-system)
9942 '(#:tests? #f)) ; no test suite
9943 (home-page "https://software.clapper.org/munkres/")
9944 (synopsis "Implementation of the Munkres algorithm")
9945 (description "The Munkres module provides an implementation of the Munkres
9946 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9947 useful for solving the Assignment Problem.")
9948 (license license:bsd-3)))
9950 (define-public python2-munkres
9951 (package-with-python2 python-munkres))
9953 (define-public python-whoosh
9955 (name "python-whoosh")
9960 (uri (pypi-uri "Whoosh" version))
9963 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9964 (build-system python-build-system)
9965 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9967 `(("python-pytest" ,python-pytest)))
9968 (home-page "https://bitbucket.org/mchaput/whoosh")
9969 (synopsis "Full text indexing, search, and spell checking library")
9971 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9973 (license license:bsd-2)))
9975 (define-public python2-whoosh
9976 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9977 (package (inherit whoosh)
9979 `(("python2-backport-ssl-match-hostname"
9980 ,python2-backport-ssl-match-hostname)
9981 ,@(package-propagated-inputs whoosh))))))
9983 (define-public python-pathlib
9985 (name "python-pathlib")
9989 (uri (pypi-uri "pathlib" version))
9992 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9993 (build-system python-build-system)
9994 ;; The tests depend on the internal "test" module, which does not provide
9995 ;; a stable interface.
9996 (arguments `(#:tests? #f))
9997 (home-page "https://pathlib.readthedocs.org/")
9998 (synopsis "Object-oriented file system paths")
9999 (description "Pathlib offers a set of classes to handle file system paths.
10000 It offers the following advantages over using string objects:
10003 @item No more cumbersome use of os and os.path functions. Everything can
10004 be done easily through operators, attribute accesses, and method calls.
10005 @item Embodies the semantics of different path types. For example,
10006 comparing Windows paths ignores casing.
10007 @item Well-defined semantics, eliminating any inconsistencies or
10008 ambiguities (forward vs. backward slashes, etc.).
10011 Note: In Python 3.4, pathlib is now part of the standard library. For other
10012 Python versions please consider python-pathlib2 instead, which tracks the
10013 standard library module. This module (python-pathlib) isn't maintained
10015 (license license:expat)))
10017 (define-public python2-pathlib
10018 (package-with-python2 python-pathlib))
10020 (define-public python2-pathlib2
10022 (name "python2-pathlib2")
10026 (uri (pypi-uri "pathlib2" version))
10029 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
10030 (build-system python-build-system)
10031 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10032 ;; version is 3.4 which already includes this package as part of the
10033 ;; standard library.
10035 `(#:python ,python-2))
10037 `(("python2-scandir" ,python2-scandir)
10038 ("python2-six" ,python2-six)))
10039 (home-page "https://pypi.org/project/pathlib2/")
10040 (synopsis "Object-oriented file system paths - backport of standard
10042 (description "The goal of pathlib2 is to provide a backport of standard
10043 pathlib module which tracks the standard library module, so all the newest
10044 features of the standard pathlib can be used also on older Python versions.
10046 Pathlib offers a set of classes to handle file system paths. It offers the
10047 following advantages over using string objects:
10050 @item No more cumbersome use of os and os.path functions. Everything can
10051 be done easily through operators, attribute accesses, and method calls.
10052 @item Embodies the semantics of different path types. For example,
10053 comparing Windows paths ignores casing.
10054 @item Well-defined semantics, eliminating any inconsistencies or
10055 ambiguities (forward vs. backward slashes, etc.).
10057 (license license:expat)))
10059 (define-public python2-pathlib2-bootstrap
10062 (inherit python2-pathlib2)
10063 (name "python2-pathlib2-bootstrap")
10065 `(("python2-scandir" ,python2-scandir)
10066 ("python2-six" ,python2-six-bootstrap))))))
10068 (define-public python-jellyfish
10070 (name "python-jellyfish")
10074 (uri (pypi-uri "jellyfish" version))
10077 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10078 (build-system python-build-system)
10080 `(("python-pytest" ,python-pytest)))
10081 (home-page "https://github.com/jamesturk/jellyfish")
10082 (synopsis "Approximate and phonetic matching of strings")
10083 (description "Jellyfish uses a variety of string comparison and phonetic
10084 encoding algorithms to do fuzzy string matching.")
10085 (license license:bsd-2)
10086 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10088 (define-public python2-jellyfish
10089 (let ((jellyfish (package-with-python2
10090 (strip-python2-variant python-jellyfish))))
10091 (package (inherit jellyfish)
10092 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10093 ,@(package-native-inputs jellyfish))))))
10095 (define-public python2-unicodecsv
10097 (name "python2-unicodecsv")
10101 ;; The test suite is not included in the PyPi release.
10102 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10103 (uri (git-reference
10104 (url "https://github.com/jdunck/python-unicodecsv")
10106 (file-name (git-file-name name version))
10109 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
10110 (build-system python-build-system)
10112 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10113 #:python ,python-2))
10115 `(("python2-unittest2" ,python2-unittest2)))
10116 (home-page "https://github.com/jdunck/python-unicodecsv")
10117 (synopsis "Unicode CSV module for Python 2")
10118 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10119 module, adding support for Unicode strings.")
10120 (license license:bsd-2)))
10122 (define-public python-rarfile
10124 (name "python-rarfile")
10128 (uri (pypi-uri "rarfile" version))
10131 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10132 (build-system python-build-system)
10135 (modify-phases %standard-phases
10137 ;; Many tests fail, but the installation proceeds.
10138 (lambda _ (invoke "make" "-C" "test" "test"))))))
10140 `(("which" ,which))) ; required for tests
10142 `(("libarchive" ,libarchive)))
10143 (home-page "https://github.com/markokr/rarfile")
10144 (synopsis "RAR archive reader for Python")
10145 (description "This is Python module for RAR archive reading. The interface
10146 is made as zipfile like as possible.")
10147 (license license:isc)))
10149 (define-public python2-rarfile
10150 (package-with-python2 python-rarfile))
10152 (define-public python-magic
10154 (name "python-magic")
10159 (uri (pypi-uri "python-magic" version))
10162 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
10163 (file-name (string-append name "-" version "-checkout"))))
10164 (build-system python-build-system)
10166 ;; The tests are unreliable, so don't run them. The tests fail
10167 ;; under Python3 because they were written for Python2 and
10168 ;; contain import statements that do not work in Python3. One of
10169 ;; the tests fails under Python2 because its assertions are
10170 ;; overly stringent; it relies on comparing output strings which
10171 ;; are brittle and can change depending on the version of
10172 ;; libmagic being used and the system on which the test is
10173 ;; running. In my case, under GuixSD 0.10.0, only one test
10174 ;; failed, and it seems to have failed only because the version
10175 ;; of libmagic that is packaged in Guix outputs a slightly
10176 ;; different (but not wrong) string than the one that the test
10179 #:phases (modify-phases %standard-phases
10180 ;; Replace a specific method call with a hard-coded
10181 ;; path to the necessary libmagic.so file in the
10182 ;; store. If we don't do this, then the method call
10183 ;; will fail to find the libmagic.so file, which in
10184 ;; turn will cause any application using
10185 ;; python-magic to fail.
10186 (add-before 'build 'hard-code-path-to-libmagic
10187 (lambda* (#:key inputs #:allow-other-keys)
10188 (let ((file (assoc-ref inputs "file")))
10189 (substitute* "magic.py"
10190 (("ctypes.util.find_library\\('magic'\\)")
10191 (string-append "'" file "/lib/libmagic.so'")))
10193 (add-before 'install 'disable-egg-compression
10195 (let ((port (open-file "setup.cfg" "a")))
10196 (display "\n[easy_install]\nzip_ok = 0\n"
10201 ;; python-magic needs to be able to find libmagic.so.
10204 "https://github.com/ahupp/python-magic")
10206 "File type identification using libmagic")
10208 "This module uses ctypes to access the libmagic file type
10209 identification library. It makes use of the local magic database and
10210 supports both textual and MIME-type output. Note that this module and
10211 the python-file module both provide a \"magic.py\" file; these two
10212 modules, which are different and were developed separately, both serve
10213 the same purpose: to provide Python bindings for libmagic.")
10214 (license license:expat)))
10216 (define-public python2-magic
10217 (package-with-python2 python-magic))
10219 (define-public python2-s3cmd
10221 (name "python2-s3cmd")
10226 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10227 "s3cmd-" version ".tar.gz"))
10230 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10231 (build-system python-build-system)
10233 ;; s3cmd is written for python2 only and contains no tests.
10234 `(#:python ,python-2
10237 `(("python2-dateutil" ,python2-dateutil)
10238 ;; The python-file package also provides a magic.py module.
10239 ;; This is an unfortunate state of affairs; however, s3cmd
10240 ;; fails to install if it cannot find specifically the
10241 ;; python-magic package. Thus we include it, instead of using
10242 ;; python-file. Ironically, s3cmd sometimes works better
10243 ;; without libmagic bindings at all:
10244 ;; https://github.com/s3tools/s3cmd/issues/198
10245 ("python2-magic" ,python2-magic)))
10246 (home-page "http://s3tools.org/s3cmd")
10247 (synopsis "Command line tool for S3-compatible storage services")
10249 "S3cmd is a command line tool for uploading, retrieving and managing data
10250 in storage services that are compatible with the Amazon Simple Storage
10251 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10252 GnuPG encryption, and more. It also supports management of Amazon's
10253 CloudFront content delivery network.")
10254 (license license:gpl2+)))
10256 (define-public python-pkgconfig
10258 (name "python-pkgconfig")
10263 (uri (pypi-uri "pkgconfig" version))
10266 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10267 (build-system python-build-system)
10269 `(("python-nose" ,python-nose)))
10271 `(("pkg-config" ,pkg-config)))
10274 (modify-phases %standard-phases
10275 (add-before 'build 'patch
10276 ;; Hard-code the path to pkg-config.
10278 (substitute* "pkgconfig/pkgconfig.py"
10279 (("cmd = 'pkg-config")
10280 (string-append "cmd = '" (which "pkg-config"))))
10284 (invoke "nosetests" "test.py"))))))
10285 (home-page "https://github.com/matze/pkgconfig")
10286 (synopsis "Python interface for pkg-config")
10287 (description "This module provides a Python interface to pkg-config. It
10288 can be used to find all pkg-config packages, check if a package exists,
10289 check if a package meets certain version requirements, query CFLAGS and
10290 LDFLAGS and parse the output to build extensions with setup.py.")
10291 (license license:expat)))
10293 (define-public python2-pkgconfig
10294 (package-with-python2 python-pkgconfig))
10296 (define-public python-bz2file
10298 (name "python-bz2file")
10303 (uri (pypi-uri "bz2file" version))
10306 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10307 (build-system python-build-system)
10309 `(#:tests? #f)) ; Tests use deprecated python modules.
10310 (home-page "https://github.com/nvawda/bz2file")
10311 (synopsis "Read and write bzip2-compressed files")
10313 "Bz2file is a Python library for reading and writing bzip2-compressed
10314 files. It contains a drop-in replacement for the I/O interface in the
10315 standard library's @code{bz2} module, including features from the latest
10316 development version of CPython that are not available in older releases.")
10317 (license license:asl2.0)))
10319 (define-public python2-bz2file
10320 (package-with-python2 python-bz2file))
10322 (define-public python-future
10324 (name "python-future")
10329 (uri (pypi-uri "future" version))
10332 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
10333 (build-system python-build-system)
10334 ;; Many tests connect to the network or are otherwise flawed.
10335 ;; https://github.com/PythonCharmers/python-future/issues/210
10338 (home-page "http://python-future.org")
10339 (synopsis "Single-source support for Python 3 and 2")
10341 "@code{python-future} is the missing compatibility layer between Python 2 and
10342 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10343 to support both Python 2 and Python 3 with minimal overhead.")
10344 (license license:expat)))
10346 (define-public python2-future
10347 (package-with-python2 python-future))
10349 (define-public python-cysignals
10351 (name "python-cysignals")
10356 (uri (pypi-uri "cysignals" version))
10359 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
10360 (build-system python-build-system)
10362 `(("python-cython" ,python-cython)
10363 ("python-sphinx" ,python-sphinx)))
10365 `(("pari-gp" ,pari-gp)))
10367 `(#:modules ((guix build python-build-system)
10368 ((guix build gnu-build-system) #:prefix gnu:)
10369 (guix build utils))
10370 ;; FIXME: Tests are executed after installation and currently fail
10371 ;; when not installing into standard locations; the author is working
10375 (modify-phases %standard-phases
10378 (assoc-ref gnu:%standard-phases 'configure)))))
10380 "https://github.com/sagemath/cysignals")
10382 "Handling of interrupts and signals for Cython")
10384 "The cysignals package provides mechanisms to handle interrupts (and
10385 other signals and errors) in Cython code, using two related approaches,
10386 for mixed Cython/Python code or external C libraries and pure Cython code,
10388 (license license:lgpl3+)))
10390 (define-public python2-cysignals
10391 (package-with-python2 python-cysignals))
10393 (define-public python2-shedskin
10395 (name "python2-shedskin")
10400 (uri (string-append "https://github.com/shedskin/shedskin/"
10401 "releases/download/v" version
10402 "/shedskin-" version ".tgz"))
10405 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10406 (build-system python-build-system)
10408 `(#:python ,python-2
10409 #:phases (modify-phases %standard-phases
10410 (add-after 'unpack 'fix-resulting-include-libs
10411 (lambda* (#:key inputs #:allow-other-keys)
10412 (let ((libgc (assoc-ref inputs "libgc"))
10413 (pcre (assoc-ref inputs "pcre")))
10414 (substitute* "shedskin/makefile.py"
10415 (("variable == 'CCFLAGS':[ ]*")
10416 (string-append "variable == 'CCFLAGS':\n"
10417 " line += ' -I " pcre "/include"
10418 " -I " libgc "/include'"))
10419 (("variable == 'LFLAGS':[ ]*")
10420 (string-append "variable == 'LFLAGS':\n"
10421 " line += ' -L" pcre "/lib"
10422 " -L " libgc "/lib'")))
10424 (inputs `(("pcre" ,pcre)
10426 (home-page "https://shedskin.github.io/")
10427 (synopsis "Experimental Python-2 to C++ Compiler")
10428 (description (string-append "This is an experimental compiler for a subset of
10429 Python. It generates C++ code and a Makefile."))
10430 (license (list license:gpl3 license:bsd-3 license:expat))))
10432 (define-public python2-rope
10434 (name "python2-rope")
10439 (uri (pypi-uri "rope" version))
10442 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10444 ;; Rope has only partial python3 support, see `python-rope'
10445 `(#:python ,python-2))
10446 (build-system python-build-system)
10448 `(("python2-unittest2" ,python2-unittest2)))
10449 (home-page "https://github.com/python-rope/rope")
10450 (synopsis "Refactoring library for Python")
10451 (description "Rope is a refactoring library for Python. It facilitates
10452 the renaming, moving and extracting of attributes, functions, modules, fields
10453 and parameters in Python 2 source code. These refactorings can also be applied
10454 to occurrences in strings and comments.")
10455 (license license:gpl2)))
10457 (define-public python-rope
10459 (inherit python2-rope)
10460 (name "python-rope")
10461 (arguments `(#:python ,python-wrapper
10462 ;; XXX: Only partial python3 support, results in some failing
10463 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10465 (properties `((python2-variant . ,(delay python2-rope))))))
10467 (define-public python-py3status
10469 (name "python-py3status")
10474 (uri (pypi-uri "py3status" version))
10476 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10477 (build-system python-build-system)
10482 (modify-phases %standard-phases
10483 ;; 'file' is used for detection of configuration file encoding
10484 ;; let's make link the dependency to particular input
10485 (add-before 'build 'patch-file-path
10486 (lambda* (#:key inputs #:allow-other-keys)
10487 (let ((file-path (assoc-ref inputs "file")))
10488 (substitute* "py3status/parse_config.py"
10489 (("\\[\"file\", \"-b\"")
10490 (string-append "['" file-path "/bin/file', '-b'")))
10492 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10493 (home-page "https://github.com/ultrabug/py3status")
10494 (synopsis "Extensible i3status wrapper written in Python")
10495 (description "py3status is an i3status wrapper which extends i3status
10496 functionality in a modular way, allowing you to extend your panel with your
10497 own code, responding to click events and updating clock every second.")
10498 (license license:bsd-3)))
10500 (define-public python-tblib
10502 (name "python-tblib")
10506 (uri (pypi-uri "tblib" version))
10509 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
10510 (build-system python-build-system)
10513 (modify-phases %standard-phases
10516 ;; Upstream runs tests after installation and the package itself
10517 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10519 (setenv "PYTHONPATH"
10520 (string-append (getcwd) "/build/lib:"
10521 (getenv "PYTHONPATH")))
10522 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10524 `(("python-pytest" ,python-pytest)
10525 ("python-six" ,python-six)))
10526 (home-page "https://github.com/ionelmc/python-tblib")
10527 (synopsis "Traceback serialization library")
10529 "Traceback serialization allows you to:
10532 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10533 different processes. This allows better error handling when running code over
10534 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10536 @item Parse traceback strings and raise with the parsed tracebacks.
10538 (license license:bsd-3)))
10540 (define-public python2-tblib
10541 (package-with-python2 python-tblib))
10543 (define-public python-greenlet
10545 (name "python-greenlet")
10549 (uri (pypi-uri "greenlet" version))
10552 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10553 (build-system python-build-system)
10554 (home-page "https://greenlet.readthedocs.io/")
10555 (synopsis "Lightweight in-process concurrent programming")
10557 "Greenlet package is a spin-off of Stackless, a version of CPython
10558 that supports micro-threads called \"tasklets\". Tasklets run
10559 pseudo-concurrently (typically in a single or a few OS-level threads) and
10560 are synchronized with data exchanges on \"channels\".")
10561 (license (list license:psfl license:expat))))
10563 (define-public python2-greenlet
10564 (package-with-python2 python-greenlet))
10566 (define-public python-objgraph
10568 (name "python-objgraph")
10573 (uri (pypi-uri "objgraph" version))
10576 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
10577 (build-system python-build-system)
10579 `(("python-graphviz" ,python-graphviz)))
10581 `(("python-mock" ,python-mock)
10582 ("graphviz" ,graphviz)))
10583 (home-page "https://mg.pov.lt/objgraph/")
10584 (synopsis "Draw Python object reference graphs with graphviz")
10586 "This package provides tools to draw Python object reference graphs with
10588 (license license:expat)))
10590 (define-public python2-objgraph
10591 (package-with-python2 python-objgraph))
10593 (define-public python-gevent
10595 (name "python-gevent")
10599 (uri (pypi-uri "gevent" version))
10602 "1lchr4akw2jkm5v4kz7bdm4wv3knkfhbfn9vkkz4s5yrkcxzmdqy"))
10603 (modules '((guix build utils)))
10606 ;; unbunding libev and c-ares
10607 (delete-file-recursively "deps")
10609 (build-system python-build-system)
10611 `(#:modules ((ice-9 ftw)
10615 (guix build python-build-system))
10616 #:phases (modify-phases %standard-phases
10617 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10619 (substitute* "src/gevent/subprocess.py"
10620 (("/bin/sh") (which "sh")))
10621 (for-each (lambda (file)
10623 (("/bin/sh") (which "sh"))
10624 (("/bin/true") (which "true"))))
10625 (find-files "src/greentest" "\\.py$"))
10627 (add-before 'build 'do-not-use-bundled-sources
10628 (lambda* (#:key inputs #:allow-other-keys)
10629 (setenv "GEVENTSETUP_EMBED" "0")
10631 ;; Prevent building bundled libev.
10632 (substitute* "setup.py"
10633 (("run_make=_BUILDING")
10636 (let ((greenlet (string-append
10637 (assoc-ref inputs "python-greenlet")
10639 (match (scandir greenlet
10641 (string-prefix? "python" item)))
10643 (setenv "C_INCLUDE_PATH"
10644 (string-append greenlet "/" python ":"
10645 (or (getenv "C_INCLUDE_PATH")
10648 (add-before 'check 'pretend-to-be-CI
10650 ;; A few tests are skipped due to network constraints or
10651 ;; get longer timeouts when running in a CI environment.
10652 ;; Piggy-back on that, as we need the same adjustments.
10653 (setenv "TRAVIS" "1")
10654 (setenv "APPVEYOR" "1")
10656 (add-before 'check 'adjust-tests
10658 (let ((disabled-tests
10659 '(;; These tests rely on networking which is not
10660 ;; available in the build container.
10661 "test_urllib2net.py"
10663 "test__server_pywsgi.py"
10666 "test__socket_ssl.py"
10667 "test__socket_dns.py"
10668 "test__socket_dns6.py"
10669 "test___example_servers.py"
10670 "test__getaddrinfo_import.py"
10671 "test__examples.py"
10674 "test_urllib2_localnet.py"
10677 ;; XXX: These tests borrow functionality from the
10678 ;; Python builtin 'test' module, but it is not
10679 ;; installed with the Guix Python distribution.
10684 "test_threading.py"
10685 "test__threading_2.py"
10686 ;; FIXME: test_patch_twice_warning_events fails for
10687 ;; no apparent reason. Needs more investigation!
10689 ;; These tests rely on KeyboardInterrupts which do not
10690 ;; work inside the build container for some reason
10691 ;; (lack of controlling terminal?).
10692 "test_subprocess.py"
10693 "test__issues461_471.py"
10694 ;; TODO: Patch out the tests that use getprotobyname, etc
10695 ;; instead of disabling all the tests from these files.
10698 "test__execmodules.py")))
10699 (call-with-output-file "skipped_tests.txt"
10701 (display (string-join disabled-tests "\n") port)))
10705 ;; Make sure the build directory is on PYTHONPATH.
10706 (setenv "PYTHONPATH"
10708 (getenv "PYTHONPATH") ":"
10710 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10712 ;; Use the build daemons configured number of workers.
10713 (setenv "NWORKERS" (number->string (parallel-job-count)))
10715 (invoke "python" "-m" "gevent.tests" "--config"
10716 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
10718 `(("python-greenlet" ,python-greenlet)
10719 ("python-objgraph" ,python-objgraph)))
10721 `(("python-six" ,python-six)
10724 ("python-dnspython" ,python-dnspython)
10725 ("python-psutil" ,python-psutil)
10726 ("python-zope.event" ,python-zope-event)
10727 ("python-zope.interface" ,python-zope-interface)))
10729 `(("c-ares" ,c-ares)
10731 (home-page "http://www.gevent.org/")
10732 (synopsis "Coroutine-based network library")
10734 "gevent is a coroutine-based Python networking library that uses greenlet
10735 to provide a high-level synchronous API on top of the libev event loop.")
10736 (license license:expat)
10737 (properties `((python2-variant . ,(delay python2-gevent))))))
10739 (define-public python2-gevent
10740 (let ((base (package-with-python2
10741 (strip-python2-variant python-gevent))))
10744 (native-inputs `(,@(package-native-inputs base)
10745 ("python-mock" ,python2-mock))))))
10747 (define-public python-fastimport
10749 (name "python-fastimport")
10754 (uri (pypi-uri "fastimport" version))
10756 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10757 (build-system python-build-system)
10758 (home-page "https://github.com/jelmer/python-fastimport")
10759 (synopsis "VCS fastimport parser and generator in Python")
10760 (description "This package provides a parser for and generator of the Git
10761 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10763 (license license:gpl2+)))
10765 (define-public python2-fastimport
10766 (package-with-python2 python-fastimport))
10768 (define-public python-twisted
10770 (name "python-twisted")
10774 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10777 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10778 (build-system python-build-system)
10780 '(#:tests? #f)) ; FIXME: some tests fail
10782 `(("python-zope-interface" ,python-zope-interface)
10783 ("python-pyhamcrest" ,python-pyhamcrest)
10784 ("python-incremental" ,python-incremental)
10785 ("python-hyperlink" ,python-hyperlink)
10786 ("python-constantly" ,python-constantly)
10787 ("python-automat" ,python-automat)))
10788 (home-page "https://twistedmatrix.com/")
10789 (synopsis "Asynchronous networking framework written in Python")
10791 "Twisted is an extensible framework for Python programming, with special
10792 focus on event-based network programming and multiprotocol integration.")
10793 (license license:expat)))
10795 (define-public python2-twisted
10796 (package-with-python2 python-twisted))
10798 (define-public python-pika
10800 (name "python-pika")
10805 (uri (pypi-uri "pika" version))
10808 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10809 (build-system python-build-system)
10811 `(("python-pyev" ,python-pyev)
10812 ("python-tornado" ,python-tornado)
10813 ("python-twisted" ,python-twisted)))
10814 (home-page "https://pika.readthedocs.org")
10815 (synopsis "Pure Python AMQP Client Library")
10817 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10818 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10819 network support library.")
10820 (license license:bsd-3)))
10822 (define-public python2-pika
10823 (package-with-python2 python-pika))
10825 (define-public python-ply
10827 (name "python-ply")
10832 (uri (pypi-uri "ply" version))
10835 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10836 (build-system python-build-system)
10837 (home-page "http://www.dabeaz.com/ply/")
10838 (synopsis "Python Lex & Yacc")
10839 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10840 It uses LR parsing and does extensive error checking.")
10841 (license license:bsd-3)))
10843 (define-public python2-ply
10844 (package-with-python2 python-ply))
10846 (define-public python-tabulate
10848 (name "python-tabulate")
10852 (uri (pypi-uri "tabulate" version))
10855 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10856 (build-system python-build-system)
10858 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10859 ;; and the latest release is not tagged in the upstream repository.
10861 (home-page "https://bitbucket.org/astanin/python-tabulate")
10862 (synopsis "Pretty-print tabular data")
10864 "Tabulate is a library and command-line utility to pretty-print tabular
10866 (license license:expat)))
10868 (define-public python2-tabulate
10869 (package-with-python2 python-tabulate))
10871 (define-public python-kazoo
10873 (name "python-kazoo")
10878 (uri (pypi-uri "kazoo" version))
10881 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10882 (build-system python-build-system)
10883 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10885 `(("python-six" ,python-six)))
10886 (home-page "https://kazoo.readthedocs.org")
10887 (synopsis "High-level Zookeeper client library")
10889 "Kazoo is a Python client library for the Apache Zookeeper distributed
10890 application service. It is designed to be easy to use and to avoid common
10891 programming errors.")
10892 (license license:asl2.0)))
10894 (define-public python2-kazoo
10895 (package-with-python2 python-kazoo))
10897 (define-public python-pykafka
10899 (name "python-pykafka")
10903 (uri (pypi-uri "pykafka" version))
10906 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10907 (build-system python-build-system)
10908 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10910 `(("python-gevent" ,python-gevent)
10911 ("python-kazoo" ,python-kazoo)
10912 ("python-tabulate" ,python-tabulate)))
10914 `(("librdkafka" ,librdkafka)))
10915 (home-page "https://pykafka.readthedocs.io/")
10916 (synopsis "Apache Kafka client for Python")
10918 "PyKafka is a client for the Apache Kafka distributed messaging system.
10919 It includes Python implementations of Kafka producers and consumers, which
10920 are optionally backed by a C extension built on librdkafka.")
10921 (license license:asl2.0)))
10923 (define-public python2-pykafka
10924 (package-with-python2 python-pykafka))
10926 (define-public python-wcwidth
10928 (name "python-wcwidth")
10932 (uri (pypi-uri "wcwidth" version))
10935 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10936 (build-system python-build-system)
10937 (home-page "https://github.com/jquast/wcwidth")
10938 (synopsis "Measure number of terminal column cells of wide-character codes")
10939 (description "Wcwidth measures the number of terminal column cells of
10940 wide-character codes. It is useful for those implementing a terminal emulator,
10941 or programs that carefully produce output to be interpreted by one. It is a
10942 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10943 specified in POSIX.1-2001 and POSIX.1-2008.")
10944 (license license:expat)))
10946 (define-public python2-wcwidth
10947 (package-with-python2 python-wcwidth))
10949 (define-public python2-jsonrpclib
10951 (name "python2-jsonrpclib")
10955 (uri (pypi-uri "jsonrpclib" version))
10958 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10959 (build-system python-build-system)
10962 #:python ,python-2))
10963 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10964 (synopsis "Implementation of JSON-RPC specification for Python")
10966 "This library is an implementation of the JSON-RPC specification.
10967 It supports both the original 1.0 specification, as well as the
10968 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10970 (license license:asl2.0)))
10972 (define-public python-chai
10974 (name "python-chai")
10978 (uri (pypi-uri "chai" version))
10981 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10982 (build-system python-build-system)
10983 (home-page "https://github.com/agoragames/chai")
10984 (synopsis "Mocking framework for Python")
10986 "Chai provides an api for mocking, stubbing and spying your python
10987 objects, patterned after the Mocha library for Ruby.")
10988 (license license:bsd-3)))
10990 (define-public python2-chai
10991 (package-with-python2 python-chai))
10993 (define-public python-inflection
10995 (name "python-inflection")
10998 (origin (method url-fetch)
10999 (uri (pypi-uri "inflection" version))
11002 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11003 (build-system python-build-system)
11005 `(("python-pytest" ,python-pytest)))
11006 (home-page "https://github.com/jpvanhal/inflection")
11007 (synopsis "Python string transformation library")
11009 "Inflection is a string transformation library. It singularizes
11010 and pluralizes English words, and transforms strings from CamelCase to
11011 underscored string.")
11012 (license license:expat)))
11014 (define-public python2-inflection
11015 (package-with-python2 python-inflection))
11017 (define-public python-pylev
11019 (name "python-pylev")
11023 (uri (pypi-uri "pylev" version))
11026 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11027 (build-system python-build-system)
11028 (home-page "https://github.com/toastdriven/pylev")
11029 (synopsis "Levenshtein distance implementation in Python")
11030 (description "Pure Python Levenshtein implementation, based off the
11031 Wikipedia code samples at
11032 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11033 (license license:bsd-3)))
11035 (define-public python2-pylev
11036 (package-with-python2 python-pylev))
11038 (define-public python-cleo
11040 (name "python-cleo")
11044 (uri (pypi-uri "cleo" version))
11047 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
11048 (build-system python-build-system)
11051 ("python-mock" ,python-mock)
11052 ("python-pytest-mock" ,python-pytest-mock)
11053 ("python-pytest" ,python-pytest)))
11055 `(("python-backpack" ,python-backpack)
11056 ("python-clikit" ,python-clikit)
11057 ("python-pastel" ,python-pastel)
11058 ("python-pylev" ,python-pylev)))
11059 (home-page "https://github.com/sdispater/cleo")
11060 (synopsis "Command-line arguments library for Python")
11062 "Cleo allows you to create command-line commands with signature in
11063 docstring and colored output.")
11064 (license license:expat)))
11066 (define-public python2-cleo
11067 (package-with-python2 python-cleo))
11069 (define-public python-tomlkit
11071 (name "python-tomlkit")
11076 (uri (pypi-uri "tomlkit" version))
11078 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
11079 (build-system python-build-system)
11081 `(("python-pytest" ,python-pytest)))
11082 (home-page "https://github.com/sdispater/tomlkit")
11083 (synopsis "Style-preserving TOML library")
11085 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11086 preserves all comments, indentations, whitespace and internal element ordering,
11087 and makes them accessible and editable via an intuitive API. It can also
11088 create new TOML documents from scratch using the provided helpers. Part of the
11089 implementation has been adapted, improved, and fixed from Molten.")
11090 (license license:expat)))
11092 (define-public python-shellingham
11094 (name "python-shellingham")
11099 (uri (pypi-uri "shellingham" version))
11102 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
11103 (build-system python-build-system)
11105 "https://github.com/sarugaku/shellingham")
11106 (synopsis "Tool to detect surrounding shell")
11108 "Shellingham detects what shell the current Python executable is
11110 (license license:isc)))
11112 (define-public python-memcached
11114 (name "python-memcached")
11119 (uri (pypi-uri "python-memcached" version))
11122 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
11123 (build-system python-build-system)
11124 (propagated-inputs `(("python-six" ,python-six)))
11126 "https://github.com/linsomniac/python-memcached")
11127 (synopsis "Pure python memcached client")
11129 "This software is a pure Python interface to the memcached memory cache
11130 daemon. It is the client side software which allows storing values in one or
11131 more, possibly remote, memcached servers.")
11132 (license license:psfl)))
11134 (define-public python-clikit
11136 (name "python-clikit")
11141 (uri (pypi-uri "clikit" version))
11144 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
11145 (build-system python-build-system)
11147 `(("python-pastel" ,python-pastel)
11148 ("python-pylev" ,python-pylev)))
11149 (home-page "https://github.com/sdispater/clikit")
11150 (synopsis "Group of utilities to build command line interfaces")
11152 "CliKit is a group of utilities to build testable command line
11154 (license license:expat)))
11156 (define-public python-msgpack-python
11158 (name "python-msgpack-python")
11163 (uri (pypi-uri "msgpack-python" version))
11166 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
11167 (build-system python-build-system)
11168 (home-page "http://msgpack.org/")
11169 (synopsis "Package to deserialize messages in MessagePack binary format")
11171 "MessagePack is an efficient binary serialization format. It lets you
11172 exchange data among multiple languages like JSON. But it's faster and
11173 smaller. Small integers are encoded into a single byte, and typical short
11174 strings require only one extra byte in addition to the strings themselves.")
11175 (license license:asl2.0)))
11177 (define-public python-cachy
11179 (name "python-cachy")
11184 (uri (pypi-uri "cachy" version))
11187 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
11188 (build-system python-build-system)
11190 `(("python-fakeredis" ,python-fakeredis)
11191 ("python-flexmock" ,python-flexmock)
11192 ("python-pytest" ,python-pytest)))
11194 `(("python-memcached" ,python-memcached)
11195 ("python-msgpack-python" ,python-msgpack-python)
11196 ("python-redis" ,python-redis)))
11197 (home-page "https://github.com/sdispater/cachy")
11198 (synopsis "Simple yet effective caching library")
11200 "Cachy provides a simple yet effective caching library. A simple but
11201 powerful API: thread-safety; decorator syntax; support for memcached, redis,
11202 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
11203 (license license:expat)))
11205 (define-public poetry
11208 (version "0.12.17")
11209 ;; Poetry can only be built from source with poetry.
11213 (uri (pypi-uri "poetry" version))
11216 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
11217 (build-system python-build-system)
11219 `(#:tests? #f ;; Pypi does not have tests.
11221 (modify-phases %standard-phases
11224 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
11225 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
11229 `(("python-cachecontrol" ,python-cachecontrol)
11230 ("python-cachy" ,python-cachy)
11231 ("python-cleo" ,python-cleo)
11232 ("python-glob2" ,python-glob2)
11233 ("python-html5lib" ,python-html5lib)
11234 ("python-jsonschema" ,python-jsonschema)
11235 ("python-msgpack" ,python-msgpack)
11236 ("python-pkginfo" ,python-pkginfo)
11237 ("python-pyparsing" ,python-pyparsing)
11238 ("python-pyrsistent" ,python-pyrsistent)
11239 ("python-requests" ,python-requests)
11240 ("python-requests-toolbelt" ,python-requests-toolbelt)
11241 ("python-shellingham" ,python-shellingham)
11242 ("python-tomlkit" ,python-tomlkit)
11243 ("python-virtualenv" ,python-virtualenv)))
11244 (home-page "https://poetry.eustace.io/")
11245 (synopsis "Python dependency management and packaging made easy")
11246 (description "Poetry is a tool for dependency management and packaging
11247 in Python. It allows you to declare the libraries your project depends on and
11248 it will manage (install/update) them for you.")
11249 (license license:expat)))
11251 (define-public python-lazy-object-proxy
11253 (name "python-lazy-object-proxy")
11257 (uri (pypi-uri "lazy-object-proxy" version))
11260 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
11262 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
11263 (build-system python-build-system)
11264 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11265 (synopsis "Lazy object proxy for python")
11267 "Lazy object proxy is an object that wraps a callable but defers the call
11268 until the object is actually required, and caches the result of said call.")
11269 (license license:bsd-2)))
11271 (define-public python2-lazy-object-proxy
11272 (package-with-python2 python-lazy-object-proxy))
11274 (define-public python-dnspython
11276 (name "python-dnspython")
11280 (uri (string-append "http://www.dnspython.org/kits/"
11281 version "/dnspython-" version ".tar.gz"))
11284 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11285 (build-system python-build-system)
11286 (arguments '(#:tests? #f)) ; XXX: requires internet access
11287 (home-page "http://www.dnspython.org")
11288 (synopsis "DNS toolkit for Python")
11290 "dnspython is a DNS toolkit for Python. It supports almost all record
11291 types. It can be used for queries, zone transfers, and dynamic updates.
11292 It supports TSIG authenticated messages and EDNS0.")
11293 (license license:expat)))
11295 (define-public python2-dnspython
11296 (package-with-python2 python-dnspython))
11298 (define-public python-email-validator
11300 (name "python-email-validator")
11303 (origin (method url-fetch)
11304 (uri (pypi-uri "email_validator" version))
11307 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11308 (build-system python-build-system)
11311 (modify-phases %standard-phases
11312 (add-before 'build 'use-dnspython
11314 (substitute* "setup.py"
11315 (("dnspython3") "dnspython"))
11318 `(("python-dnspython" ,python-dnspython)
11319 ("python-idna" ,python-idna)))
11320 (home-page "https://github.com/JoshData/python-email-validator")
11321 (synopsis "Email address validation library for Python")
11323 "This library validates email address syntax and deliverability.")
11324 (license license:cc0)))
11326 (define-public python2-email-validator
11327 (package-with-python2 python-email-validator))
11329 (define-public python-ukpostcodeparser
11331 (name "python-ukpostcodeparser")
11335 (uri (pypi-uri "UkPostcodeParser" version))
11338 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11339 (build-system python-build-system)
11340 (home-page "https://github.com/hamstah/ukpostcodeparser")
11341 (synopsis "UK Postcode parser for Python")
11343 "This library provides the @code{parse_uk_postcode} function for
11344 parsing UK postcodes.")
11345 (license license:expat)))
11347 (define-public python2-ukpostcodeparser
11348 (package-with-python2 python-ukpostcodeparser))
11350 (define-public python-faker
11352 (name "python-faker")
11356 (uri (pypi-uri "Faker" version))
11359 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11361 (search-patches "python-faker-fix-build-32bit.patch"))
11362 (modules '((guix build utils)))
11365 (for-each delete-file (find-files "." "\\.pyc$"))
11367 (build-system python-build-system)
11370 (modify-phases %standard-phases
11372 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
11375 ("python-email-validator" ,python-email-validator)
11376 ("python-mock" ,python-mock)
11377 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11379 `(("python-dateutil" ,python-dateutil)
11380 ("python-six" ,python-six)))
11381 (home-page "https://github.com/joke2k/faker")
11382 (synopsis "Python package that generates fake data")
11384 "Faker is a Python package that generates fake data such as names,
11385 addresses, and phone numbers.")
11386 (license license:expat)
11387 (properties `((python2-variant . ,(delay python2-faker))))))
11389 (define-public python2-faker
11390 (let ((base (package-with-python2 (strip-python2-variant
11395 `(("python2-ipaddress" ,python2-ipaddress)
11396 ,@(package-propagated-inputs base))))))
11398 (define-public python-pyaml
11400 (name "python-pyaml")
11401 (version "18.11.0")
11404 (uri (pypi-uri "pyaml" version))
11407 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11408 (build-system python-build-system)
11410 `(("python-unidecode" ,python-unidecode)))
11412 `(("python-pyyaml" ,python-pyyaml)))
11413 (home-page "https://github.com/mk-fg/pretty-yaml")
11414 (synopsis "YAML pretty-print library for Python")
11416 "pyaml is a PyYAML based python module to produce pretty and readable
11417 YAML-serialized data.")
11418 (license license:wtfpl2)))
11420 (define-public python2-pyaml
11421 (package-with-python2 python-pyaml))
11423 (define-public python-backpack
11425 (name "python-backpack")
11430 (uri (pypi-uri "backpack" version))
11433 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11434 (build-system python-build-system)
11436 `(("python-pytest" ,python-pytest)
11437 ("python-nose" ,python-nose)))
11439 `(("python-simplejson" ,python-simplejson)))
11440 (home-page "https://github.com/sdispater/backpack")
11441 (synopsis "Utilities for working with Python collections")
11442 (description "Backpack provides some useful utilities for working with
11443 collections of data.")
11444 (license license:expat)))
11446 (define-public python2-backpack
11447 (package-with-python2 python-backpack))
11449 (define-public python-prompt-toolkit
11451 (name "python-prompt-toolkit")
11456 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11459 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11460 (build-system python-build-system)
11463 (modify-phases %standard-phases
11465 (add-after 'install 'post-install-check
11466 (lambda* (#:key inputs outputs #:allow-other-keys)
11467 ;; HOME is needed for the test
11468 ;; "test_pathcompleter_can_expanduser".
11469 (setenv "HOME" "/tmp")
11470 (add-installed-pythonpath inputs outputs)
11471 (invoke "py.test"))))))
11473 `(("python-wcwidth" ,python-wcwidth)
11474 ("python-six" ,python-six)
11475 ("python-pygments" ,python-pygments)))
11477 `(("python-pytest" ,python-pytest)))
11478 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11479 (synopsis "Library for building command line interfaces in Python")
11481 "Prompt-Toolkit is a library for building interactive command line
11482 interfaces in Python. It's like GNU Readline but it also features syntax
11483 highlighting while typing, out-of-the-box multi-line input editing, advanced
11484 code completion, incremental search, support for Chinese double-width
11485 characters, mouse support, and auto suggestions.")
11486 (license license:bsd-3)))
11488 (define-public python2-prompt-toolkit
11489 (package-with-python2 python-prompt-toolkit))
11491 (define-public python-prompt-toolkit-1
11492 (package (inherit python-prompt-toolkit)
11497 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11500 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11502 (define-public python2-prompt-toolkit-1
11503 (package-with-python2 python-prompt-toolkit-1))
11505 (define-public python-jedi
11507 (name "python-jedi")
11512 (uri (pypi-uri "jedi" version))
11513 (patches (search-patches "python-jedi-deleted-variables.patch"))
11516 "1mb5kmrk9bkc3kwzx02j62cdan1jqd92q1z7h7wi9d30jg5p3j6m"))))
11517 (build-system python-build-system)
11520 (modify-phases %standard-phases
11523 (setenv "HOME" "/tmp")
11524 (invoke "python" "-m" "pytest"))))))
11526 `(("python-pytest" ,python-pytest)
11527 ("python-docopt" ,python-docopt)))
11529 `(("python-parso" ,python-parso)))
11530 (home-page "https://github.com/davidhalter/jedi")
11531 (synopsis "Autocompletion and static analysis library for Python")
11533 "Jedi is a static analysis tool for Python that can be used in Integrated
11534 Development Environments (@dfn{IDE}s) and text editors. It understands Python
11535 on a deeper level than many other static analysis frameworks for Python.
11537 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11539 (license license:expat)))
11541 (define-public python2-jedi
11542 (package-with-python2 python-jedi))
11544 (define-public ptpython
11550 (uri (pypi-uri "ptpython" version))
11553 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11554 (build-system python-build-system)
11556 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11558 `(("python-docopt" ,python-docopt)
11559 ("python-jedi" ,python-jedi)
11560 ("python-prompt-toolkit" ,python-prompt-toolkit)
11561 ("python-pygments" ,python-pygments)))
11562 (home-page "https://github.com/jonathanslenders/ptpython")
11563 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11565 "ptpython is a Python read-eval-print loop with IDE-like features.
11566 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11567 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11569 (license license:bsd-3)
11570 (properties `((python2-variant . ,(delay ptpython-2))))))
11572 (define-public ptpython-2
11573 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11576 (name "ptpython2"))))
11578 (define-public python-stem
11580 (name "python-stem")
11585 (uri (pypi-uri "stem" version))
11588 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
11589 (build-system python-build-system)
11592 (modify-phases %standard-phases
11595 (invoke "./run_tests.py" "--unit")
11598 `(("python-mock" ,python-mock)
11599 ("python-pycodestyle" ,python-pycodestyle)
11600 ("python-pyflakes" ,python-pyflakes)))
11601 (home-page "https://stem.torproject.org/")
11603 "Python controller library that allows applications to interact with Tor")
11605 "Stem is a Python controller library for Tor. With it you can use Tor's
11606 control protocol to script against the Tor process and read descriptor data
11607 relays publish about themselves.")
11608 (license license:lgpl3)))
11610 (define-public python2-stem
11611 (package-with-python2 python-stem))
11613 (define-public python-pyserial
11615 (name "python-pyserial")
11620 (uri (pypi-uri "pyserial" version))
11623 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11624 (build-system python-build-system)
11626 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11628 ;; (modify-phases %standard-phases
11631 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11633 "https://github.com/pyserial/pyserial")
11634 (synopsis "Python Serial Port Bindings")
11635 (description "@code{pyserial} provide serial port bindings for Python. It
11636 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11637 and/or Xon/Xoff. The port is accessed in RAW mode.")
11638 (license license:bsd-3)))
11640 (define-public python2-pyserial
11641 (package-with-python2 python-pyserial))
11643 (define-public python-kivy
11645 (name "python-kivy")
11650 (uri (pypi-uri "Kivy" version))
11651 (file-name (string-append name "-" version ".tar.gz"))
11654 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11655 (build-system python-build-system)
11657 `(#:tests? #f ; Tests require many optional packages
11659 (modify-phases %standard-phases
11660 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11661 (lambda* (#:key inputs #:allow-other-keys)
11662 (setenv "KIVY_SDL2_PATH"
11663 (string-append (assoc-ref inputs "sdl-union")
11667 `(("pkg-config" ,pkg-config)
11668 ("python-cython" ,python-cython)))
11670 `(("gstreamer" ,gstreamer)
11673 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11674 (home-page "http://kivy.org")
11676 "Multitouch application framework")
11678 "A software library for rapid development of
11679 hardware-accelerated multitouch applications.")
11680 (license license:expat)))
11682 (define-public python2-kivy
11683 (package-with-python2 python-kivy))
11685 (define-public python-kivy-next
11686 (deprecated-package "python-kivy-next" python-kivy))
11688 (define-public python2-kivy-next
11689 (deprecated-package "python2-kivy-next" python2-kivy))
11691 (define-public python-binaryornot
11693 (name "python-binaryornot")
11697 (uri (pypi-uri "binaryornot" version))
11700 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11701 (build-system python-build-system)
11704 (modify-phases %standard-phases
11705 (add-after 'unpack 'patch-tests
11707 ;; TypeError: binary() got an unexpected keyword argument
11709 (substitute* "tests/test_check.py"
11710 (("average_size=512") ""))
11713 `(("python-chardet" ,python-chardet)
11714 ("python-hypothesis" ,python-hypothesis)))
11715 (home-page "https://github.com/audreyr/binaryornot")
11716 (synopsis "Package to check if a file is binary or text")
11717 (description "Ultra-lightweight pure Python package to check if a file is
11719 (license license:bsd-3)
11720 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11722 (define-public python2-binaryornot
11723 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11724 (package (inherit base)
11726 `(("python2-enum34" ,python2-enum34)
11727 ,@(package-propagated-inputs base))))))
11729 (define-public python-binwalk
11731 (name "python-binwalk")
11736 (uri (git-reference
11737 (url "https://github.com/ReFirmLabs/binwalk")
11738 (commit (string-append "v" version))))
11739 (file-name (git-file-name name version))
11742 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11743 (build-system python-build-system)
11746 (modify-phases %standard-phases
11747 (add-before 'check 'set-pythonpath
11749 (setenv "PYTHONPATH"
11752 ":" (getenv "PYTHONPATH")))
11756 `(("python-coverage" ,python-coverage)
11757 ("python-nose" ,python-nose)))
11758 (home-page "https://github.com/ReFirmLabs/binwalk")
11759 (synopsis "Firmware analysis tool")
11760 (description "Binwalk is a tool for analyzing, reverse engineering, and
11761 extracting firmware images")
11762 (license license:expat)))
11764 (define-public python-nltk
11766 (name "python-nltk")
11770 (uri (pypi-uri "nltk" version))
11773 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11774 (build-system python-build-system)
11776 '(;; The tests require some extra resources to be downloaded.
11777 ;; TODO Try packaging these resources.
11779 (home-page "http://nltk.org/")
11780 (synopsis "Natural Language Toolkit")
11781 (description "It provides interfaces to over 50 corpora and lexical
11782 resources such as WordNet, along with a suite of text processing libraries
11783 for classification, tokenization, stemming, tagging, parsing, and semantic
11784 reasoning, wrappers for natural language processing libraries.")
11785 (license license:asl2.0)))
11787 (define-public python2-nltk
11788 (package-with-python2 python-nltk))
11790 (define-public python-pymongo
11792 (name "python-pymongo")
11796 (uri (pypi-uri "pymongo" version))
11799 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11800 (build-system python-build-system)
11802 `(("python-certifi" ,python-certifi)))
11803 (home-page "https://github.com/mongodb/mongo-python-driver")
11804 (synopsis "Python driver for MongoDB")
11805 (description "Python driver for MongoDB.")
11806 (license license:asl2.0)))
11808 (define-public python2-pymongo
11809 (package-with-python2 python-pymongo))
11811 (define-public python-consul
11813 (name "python-consul")
11818 (uri (pypi-uri "python-consul" version))
11821 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11822 (build-system python-build-system)
11824 '(#:tests? #f)) ; The tests are not distributed
11826 `(("python-requests" ,python-requests)
11827 ("python-six" ,python-six)))
11828 (home-page "https://github.com/cablehead/python-consul")
11829 (synopsis "Python client for Consul")
11831 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11832 discovery, monitoring and configuration.")
11833 (license license:expat)))
11835 (define-public python2-consul
11836 (package-with-python2 python-consul))
11838 (define-public python-schematics
11840 (name "python-schematics")
11845 (uri (git-reference
11846 (url "https://github.com/schematics/schematics.git")
11847 (commit (string-append "v" version))))
11848 (file-name (git-file-name name version))
11850 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11851 (build-system python-build-system)
11853 `(("python-six" ,python-six)))
11855 ;; The tests require a bunch of not very nice packages with fixed
11856 ;; version requirements (e.g. python-coveralls).
11858 (home-page "https://github.com/schematics/schematics")
11859 (synopsis "Python Data Structures for Humans")
11860 (description "Python Data Structures for Humans.")
11861 (license license:bsd-3)))
11863 (define-public python2-schematics
11864 (package-with-python2 python-schematics))
11866 (define-public python-odfpy
11868 (name "python-odfpy")
11872 (uri (pypi-uri "odfpy" version))
11875 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11877 `(#:modules ((srfi srfi-1)
11878 (guix build python-build-system)
11879 (guix build utils))
11881 (modify-phases %standard-phases
11883 ;; The test runner invokes python2 and python3 for test*.py.
11884 ;; To avoid having both in inputs, we replicate it here.
11886 (for-each (lambda (test-file) (invoke "python" test-file))
11887 (find-files "tests" "^test.*\\.py$"))
11889 (build-system python-build-system)
11890 (home-page "https://github.com/eea/odfpy")
11891 (synopsis "Python API and tools to manipulate OpenDocument files")
11892 (description "Collection of libraries and utility programs written in
11893 Python to manipulate OpenDocument 1.2 files.")
11895 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11896 ;; number of files with other licenses.
11897 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11899 (define-public python2-odfpy
11900 (package-with-python2 python-odfpy))
11902 (define-public python-natsort
11904 (name "python-natsort")
11908 (uri (pypi-uri "natsort" version))
11911 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
11912 (build-system python-build-system)
11914 `(#:modules ((guix build utils)
11915 (guix build python-build-system)
11920 (modify-phases %standard-phases
11921 (add-before 'check 'set-cachedir
11922 ;; Tests require write access to $HOME by default
11923 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11926 (let ((cwd (getcwd)))
11927 (setenv "PYTHONPATH"
11930 (find (cut string-prefix? "lib" <>)
11931 (scandir (string-append cwd "/build")))
11933 (getenv "PYTHONPATH")))
11934 (invoke "pytest" "-v")))))))
11936 `(("python-hypothesis" ,python-hypothesis)
11937 ("python-pytest-cov" ,python-pytest-cov)
11938 ("python-pytest-mock" ,python-pytest-mock)
11939 ("python-pytest" ,python-pytest)))
11940 (propagated-inputs ; TODO: Add python-fastnumbers.
11941 `(("python-pyicu" ,python-pyicu)))
11942 (home-page "https://github.com/SethMMorton/natsort")
11943 (synopsis "Natural sorting for python and shell")
11945 "Natsort lets you apply natural sorting on lists instead of
11946 lexicographical. If you use the built-in @code{sorted} method in python
11947 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11948 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11949 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11950 identifies numbers and sorts them separately from strings. It can also sort
11951 version numbers, real numbers, mixed types and more, and comes with a shell
11952 command @command{natsort} that exposes this functionality in the command line.")
11953 (license license:expat)
11954 (properties `((python2-variant . ,(delay python2-natsort))))))
11956 ;; Natsort 6.x are the last versions with support for Python 2.
11957 (define-public python2-natsort
11958 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11959 (package (inherit base)
11963 (uri (pypi-uri "natsort" version))
11966 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
11968 `(("python2-pathlib" ,python2-pathlib)
11969 ,@(package-native-inputs base))))))
11971 (define-public glances
11978 (uri (pypi-uri "Glances" version))
11980 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
11981 (modules '((guix build utils)))
11984 ;; Glances phones PyPI for weekly update checks by default.
11985 ;; Disable these. The user can re-enable them if desired.
11986 (substitute* "glances/outdated.py"
11987 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11988 (string-append indentation
11989 "self.args.disable_check_update = True\n"
11992 (build-system python-build-system)
11994 `(("python-future" ,python-future)
11995 ("python-psutil" ,python-psutil)))
11996 (home-page "https://github.com/nicolargo/glances")
11997 (synopsis "Cross-platform curses-based monitoring tool")
11999 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12000 Glances uses the PsUtil library to get information from your system. It
12001 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12002 (license license:lgpl3+)))
12004 (define-public python-glances
12005 (deprecated-package "python-glances" glances))
12007 (define-public python-graphql-core
12009 (name "python-graphql-core")
12014 (uri (pypi-uri "graphql-core" version))
12017 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12018 (build-system python-build-system)
12020 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12022 (modify-phases %standard-phases
12023 (add-after 'unpack 'patch-hardcoded-version
12024 (lambda _ (substitute*
12026 (("'gevent==1.1rc1'") "'gevent'"))
12029 `(("python-gevent" ,python-gevent)
12030 ("python-mock" ,python-mock)
12031 ("python-pytest-mock" ,python-pytest-mock)))
12033 `(("python-promise" ,python-promise)
12034 ("python-six" ,python-six)))
12035 (home-page "https://github.com/graphql-python/graphql-core")
12036 (synopsis "GraphQL implementation for Python")
12038 "GraphQL implementation for Python. GraphQL is a data query language and
12039 runtime designed and used to request and deliver data to mobile and web apps.
12040 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12042 (license license:expat)))
12044 (define-public python2-graphql-core
12045 (package-with-python2 python-graphql-core))
12047 (define-public python-graphql-relay
12049 (name "python-graphql-relay")
12054 (uri (pypi-uri "graphql-relay" version))
12057 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12058 (build-system python-build-system)
12060 '(#:tests? #f)) ; The tests are not distributed
12062 `(("python-graphql-core" ,python-graphql-core)
12063 ("python-promise" ,python-promise)
12064 ("python-six" ,python-six)))
12065 (home-page "https://github.com/graphql-python/graphql-relay-py")
12066 (synopsis "Relay implementation for Python")
12068 "This is a library to allow the easy creation of Relay-compliant servers
12069 using the GraphQL Python reference implementation of a GraphQL server. It
12070 should be noted that the code is a exact port of the original
12071 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12073 (license license:expat)))
12075 (define-public python2-graphql-relay
12076 (package-with-python2 python-graphql-relay))
12078 (define-public python-graphene
12080 (name "python-graphene")
12085 (uri (pypi-uri "graphene" version))
12088 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12089 (build-system python-build-system)
12091 `(("python-graphql-core" ,python-graphql-core)
12092 ("python-graphql-relay" ,python-graphql-relay)
12093 ("python-iso8601" ,python-iso8601)
12094 ("python-promise" ,python-promise)
12095 ("python-six" ,python-six)))
12097 `(#:tests? #f)) ; no tests/ in the PyPI tarball
12098 (home-page "https://graphene-python.org/")
12099 (synopsis "GraphQL Framework for Python")
12101 "Graphene is a Python library for building GraphQL schemas/types.
12102 A GraphQL schema describes your data model, and provides a GraphQL server
12103 with an associated set of resolve methods that know how to fetch data.")
12104 (properties `((python2-variant . ,(delay python2-graphene))))
12105 (license license:expat)))
12107 (define-public python2-graphene
12108 (let ((base (package-with-python2
12109 (strip-python2-variant python-graphene))))
12110 (package (inherit base)
12112 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12113 ,@(package-native-inputs base))))))
12115 (define-public python-nautilus
12117 (name "python-nautilus")
12122 (uri (pypi-uri "nautilus" version))
12125 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12126 (build-system python-build-system)
12127 (arguments `(#:tests? #f)) ; fails to import test modules
12129 `(("python-bcrypt" ,python-bcrypt)
12130 ("python-click" ,python-click)
12131 ("python-consul" ,python-consul)
12132 ("python-graphene" ,python-graphene)
12133 ("python-jinja2" ,python-jinja2)
12134 ("python-peewee" ,python-peewee)
12135 ("python-pika" ,python-pika)
12136 ("python-tornado" ,python-tornado)
12137 ("python-wtforms" ,python-wtforms)))
12139 `(("python-nose2" ,python-nose2)))
12140 (home-page "https://github.com/AlecAivazis/nautilus")
12141 (synopsis "Library for creating microservice applications")
12143 "Nautilus is a framework for flux based microservices that looks to
12144 provide extendible implementations of common aspects of a cloud so that you can
12145 focus on building massively scalable web applications.")
12146 (license license:expat)))
12148 (define-public python-snowballstemmer
12150 (name "python-snowballstemmer")
12154 (uri (pypi-uri "snowballstemmer" version))
12157 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
12158 (build-system python-build-system)
12160 `(;; No tests exist
12162 (home-page "https://github.com/shibukawa/snowball_py")
12163 (synopsis "Snowball stemming library collection for Python")
12164 (description "This package provides 16 word stemmer algorithms generated
12165 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12167 (license license:bsd-3)))
12169 (define-public python2-snowballstemmer
12170 (package-with-python2 python-snowballstemmer))
12172 (define-public python-setproctitle
12174 (name "python-setproctitle")
12179 (uri (pypi-uri "setproctitle" version))
12182 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12183 (build-system python-build-system)
12186 (modify-phases %standard-phases
12187 (add-before 'check 'patch-Makefile
12188 ;; Stricly this is only required for the python2 variant.
12189 ;; But adding a phase in an inherited package seems to be
12190 ;; cumbersum. So we patch even for python3.
12192 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12194 (substitute* "Makefile"
12195 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12196 (string-append nose "/bin/nosetests "))))
12200 (setenv "PYTHON" (or (which "python3") (which "python")))
12201 (setenv "PYCONFIG" (or (which "python3-config")
12202 (which "python-config")))
12203 (setenv "CC" "gcc")
12204 ;; No need to extend PYTHONPATH to find the built package, since
12205 ;; the Makefile will build anyway
12206 (invoke "make" "check"))))))
12208 `(("procps" ,procps))) ; required for tests
12210 "https://github.com/dvarrazzo/py-setproctitle")
12212 "Setproctitle implementation for Python to customize the process title")
12213 (description "The library allows a process to change its title (as displayed
12214 by system tools such as ps and top).
12216 Changing the title is mostly useful in multi-process systems, for
12217 example when a master process is forked: changing the children's title
12218 allows to identify the task each process is busy with. The technique
12219 is used by PostgreSQL and the OpenSSH Server for example.")
12220 (license license:bsd-3)
12221 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12223 (define-public python2-setproctitle
12224 (let ((base (package-with-python2
12225 (strip-python2-variant python-setproctitle))))
12228 (native-inputs `(("python2-nose" ,python2-nose)
12229 ,@(package-native-inputs base))))))
12231 (define-public python-validictory
12233 (name "python-validictory")
12238 (uri (pypi-uri "validictory" version))
12241 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12242 (build-system python-build-system)
12245 (modify-phases %standard-phases
12246 (add-after 'unpack 'bootstrap
12247 ;; Move the tests out of the package directory to avoid
12250 (rename-file "validictory/tests" "tests")
12251 (delete-file "tests/__init__.py")))
12254 ;; Extend PYTHONPATH so the built package will be found.
12255 (setenv "PYTHONPATH"
12256 (string-append (getcwd) "/build/lib:"
12257 (getenv "PYTHONPATH")))
12258 (invoke "py.test" "-vv" ))))))
12260 `(("python-pytest" ,python-pytest)))
12262 "https://github.com/jamesturk/validictory")
12263 (synopsis "General purpose Python data validator")
12264 (description "It allows validation of arbitrary Python data structures.
12266 The schema format is based on the JSON Schema
12267 proposal (http://json-schema.org), so combined with json the library is also
12268 useful as a validator for JSON data.")
12269 (license license:expat)))
12271 (define-public python2-validictory
12272 (package-with-python2 python-validictory))
12274 (define-public python-pyelftools
12276 (name "python-pyelftools")
12281 (uri (pypi-uri "pyelftools" version))
12284 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
12285 (build-system python-build-system)
12288 (modify-phases %standard-phases
12289 (add-before 'check 'set-pythonpath
12291 (setenv "PYTHONPATH"
12294 ":" (getenv "PYTHONPATH")))
12297 "https://github.com/eliben/pyelftools")
12299 "Analyze binary and library file information")
12300 (description "This Python library provides interfaces for parsing and
12301 analyzing two binary and library file formats; the Executable and Linking
12302 Format (ELF), and debugging information in the Debugging With Attributed
12303 Record Format (DWARF).")
12304 (license license:public-domain)))
12306 (define-public python-pyev
12308 (name "python-pyev")
12313 (uri (pypi-uri "pyev" version))
12316 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12317 (build-system python-build-system)
12319 `(#:tests? #f ; no test suite
12321 (modify-phases %standard-phases
12322 (add-after 'unpack 'patch
12323 (lambda* (#:key inputs #:allow-other-keys)
12324 (let ((libev (string-append (assoc-ref inputs "libev")
12325 "/lib/libev.so.4")))
12326 (substitute* "setup.py"
12327 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12328 (string-append "libev_dll_name = \"" libev "\"")))))))))
12330 `(("libev" ,libev)))
12331 (home-page "http://pythonhosted.org/pyev/")
12332 (synopsis "Python libev interface")
12333 (description "Pyev provides a Python interface to libev.")
12334 (license license:gpl3)))
12336 (define-public python2-pyev
12337 (package-with-python2 python-pyev))
12339 (define-public python-imagesize
12341 (name "python-imagesize")
12346 (uri (pypi-uri "imagesize" version))
12349 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
12350 (build-system python-build-system)
12351 (home-page "https://github.com/shibukawa/imagesize_py")
12352 (synopsis "Gets image size of files in various formats in Python")
12354 "This package allows determination of image size from
12355 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12356 (license license:expat)))
12358 (define-public python2-imagesize
12359 (package-with-python2 python-imagesize))
12361 (define-public python-termstyle
12363 (name "python-termstyle")
12368 (uri (pypi-uri "termstyle" version))
12371 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12372 (build-system python-build-system)
12375 (modify-phases %standard-phases
12378 (invoke "python" "test3.py"))))))
12379 (home-page "https://github.com/gfxmonk/termstyle")
12380 (synopsis "Console text coloring for Python")
12381 (description "This package provides console text coloring for Python.")
12382 (license license:bsd-3)))
12384 (define-public python-argcomplete
12386 (name "python-argcomplete")
12391 (uri (pypi-uri "argcomplete" version))
12394 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
12395 (build-system python-build-system)
12398 (modify-phases %standard-phases
12399 (add-after 'unpack 'embed-tool-references
12401 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12403 (string-append " " (which "grep")))
12405 (string-append " " (which "egrep")))
12407 (string-append "elif " (which "which")))
12409 (string-append "$(" (which "which"))))
12415 `(("python-coverage" ,python-coverage)
12416 ("python-flake8" ,python-flake8)
12417 ("python-pexpect" ,python-pexpect)
12418 ("python-wheel" ,python-wheel)
12421 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
12422 (home-page "https://github.com/kislyuk/argcomplete")
12423 (synopsis "Shell tab completion for Python argparse")
12424 (description "argcomplete provides extensible command line tab completion
12425 of arguments and options for Python scripts using @code{argparse}. It's
12426 particularly useful for programs with many options or sub-parsers that can
12427 dynamically suggest completions; for example, when browsing resources over the
12429 (license license:asl2.0)))
12431 (define-public python2-argcomplete
12432 (package-with-python2 python-argcomplete))
12434 (define-public python-xopen
12436 (name "python-xopen")
12441 (uri (pypi-uri "xopen" version))
12444 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
12445 (build-system python-build-system)
12447 `(("python-setuptools-scm" ,python-setuptools-scm)))
12448 (home-page "https://github.com/marcelm/xopen/")
12449 (synopsis "Open compressed files transparently")
12450 (description "This module provides an @code{xopen} function that works like
12451 Python's built-in @code{open} function, but can also deal with compressed files.
12452 Supported compression formats are gzip, bzip2 and, xz, and are automatically
12453 recognized by their file extensions. The focus is on being as efficient as
12454 possible on all supported Python versions.")
12455 (license license:expat)))
12457 (define-public python2-xopen
12458 (let ((base (package-with-python2
12459 (strip-python2-variant python-xopen))))
12462 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12463 ,@(package-propagated-inputs base))))))
12465 (define-public python-cheetah
12467 (name "python-cheetah")
12472 (uri (pypi-uri "Cheetah3" version))
12475 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12476 (build-system python-build-system)
12478 `(#:modules ((guix build utils)
12479 (guix build python-build-system)
12483 #:phases (modify-phases %standard-phases
12484 (add-after 'unpack 'use-absolute-python
12486 (substitute* "Cheetah/CheetahWrapper.py"
12487 (("#!/usr/bin/env python")
12488 (string-append "#!" (which "python"))))
12492 (let ((cwd (getcwd)))
12493 (setenv "PYTHONPATH"
12496 (find (cut string-prefix? "lib" <>)
12497 (scandir (string-append cwd "/build")))
12498 ":" (getenv "PYTHONPATH")))
12500 (string-append (getenv "PATH")
12502 (setenv "TMPDIR" "/tmp")
12504 (substitute* "Cheetah/Tests/Test.py"
12505 (("unittest.TextTestRunner\\(\\)")
12506 "unittest.TextTestRunner(verbosity=2)"))
12508 (invoke "python" "Cheetah/Tests/Test.py")))))))
12510 `(("python-markdown" ,python-markdown))) ;optional
12511 (home-page "http://cheetahtemplate.org/")
12512 (synopsis "Template engine")
12513 (description "Cheetah is a text-based template engine and Python code
12516 Cheetah can be used as a standalone templating utility or referenced as
12517 a library from other Python applications. It has many potential uses,
12518 but web developers looking for a viable alternative to ASP, JSP, PHP and
12519 PSP are expected to be its principle user group.
12523 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12525 @item Cleanly separates content, graphic design, and program code.
12526 @item Blends the power and flexibility of Python with a simple template language
12527 that non-programmers can understand.
12528 @item Gives template writers full access to any Python data structure, module,
12529 function, object, or method in their templates.
12530 @item Makes code reuse easy by providing an object-orientated interface to
12531 templates that is accessible from Python code or other Cheetah templates.
12532 One template can subclass another and selectively reimplement sections of it.
12533 @item Provides a simple, yet powerful, caching mechanism that can dramatically
12534 improve the performance of a dynamic website.
12535 @item Compiles templates into optimized, yet readable, Python code.
12537 (license (license:x11-style "file://LICENSE"))))
12539 (define-public python2-cheetah
12540 (package-with-python2 python-cheetah))
12542 (define-public python-dulwich
12544 (name "python-dulwich")
12549 (uri (list (string-append "https://www.dulwich.io/releases/"
12550 "dulwich-" version ".tar.gz")
12551 (pypi-uri "dulwich" version)))
12554 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12555 (build-system python-build-system)
12558 (modify-phases %standard-phases
12559 (add-before 'check 'fix-tests
12560 (lambda* (#:key inputs #:allow-other-keys)
12561 ;; The tests use Popen with a custom environment which doesn't
12563 (substitute* "dulwich/tests/compat/utils.py"
12564 (("'git'") (string-append "'"
12567 (substitute* '("dulwich/tests/test_repository.py"
12568 "dulwich/tests/test_hooks.py")
12569 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12570 (setenv "TEST_RUNNER" "unittest")
12571 (setenv "PYTHONHASHSEED" "random")
12574 `(("python-fastimport" ,python-fastimport)))
12576 `(("python-mock" ,python-mock)
12577 ("python-geventhttpclient" ,python-geventhttpclient)
12579 (home-page "https://www.dulwich.io/")
12580 (synopsis "Git implementation in Python")
12581 (description "Dulwich is an implementation of the Git file formats and
12582 protocols written in pure Python.")
12583 ;; Can be used with either license.
12584 (license (list license:asl2.0 license:gpl2+))))
12586 (define-public python2-dulwich
12587 (package-with-python2 python-dulwich))
12589 (define-public python-pbkdf2
12591 (name "python-pbkdf2")
12596 (uri (pypi-uri "pbkdf2" version))
12599 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12600 (build-system python-build-system)
12603 (modify-phases %standard-phases
12606 (setenv "PYTHONPATH"
12607 (string-append (getcwd) "/build/lib:"
12608 (getenv "PYTHONPATH")))
12609 (invoke "python" "test/test_pbkdf2.py"))))))
12611 `(("python-pycrypto" ,python-pycrypto))) ; optional
12612 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12613 (synopsis "Password-based key derivation")
12614 (description "This module implements the password-based key derivation
12615 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12617 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12618 is part of the RSA Public Key Cryptography Standards series. The provided
12619 implementation takes a password or a passphrase and a salt value (and
12620 optionally a iteration count, a digest module, and a MAC module) and provides
12621 a file-like object from which an arbitrarly-sized key can be read.")
12622 (license license:expat)))
12624 (define-public python2-pbkdf2
12625 (package-with-python2 python-pbkdf2))
12627 (define-public python-qrcode
12629 (name "python-qrcode")
12634 (uri (pypi-uri "qrcode" version))
12636 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12637 (build-system python-build-system)
12639 ;; FIXME: Tests require packaging 'pymaging'.
12642 `(("python-lxml" ,python-lxml) ; for SVG output
12643 ("python-pillow" ,python-pillow) ; for PNG output
12644 ("python-six" ,python-six)))
12645 (home-page "https://github.com/lincolnloop/python-qrcode")
12646 (synopsis "QR Code image generator")
12647 (description "This package provides a pure Python QR Code generator
12648 module. It uses the Python Imaging Library (PIL) to allow for the generation
12651 In addition this package provides a command line tool to generate QR codes and
12652 either write these QR codes to a file or do the output as ascii art at the
12654 (license license:bsd-3)))
12656 (define-public python2-qrcode
12657 (package-with-python2 python-qrcode))
12659 (define-public python-rst2ansi
12661 (name "python-rst2ansi")
12666 (uri (pypi-uri "rst2ansi" version))
12669 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12670 (build-system python-build-system)
12672 `(("python-docutils" ,python-docutils)))
12673 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12674 (synopsis "Convert RST to ANSI-decorated console output")
12676 "Python module dedicated to rendering RST (reStructuredText) documents
12677 to ansi-escaped strings suitable for display in a terminal.")
12678 (license license:expat)))
12680 (define-public python-ansi2html
12682 (name "python-ansi2html")
12687 (uri (pypi-uri "ansi2html" version))
12690 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12691 (build-system python-build-system)
12693 `(("python-mock" ,python-mock)
12694 ("python-nose" ,python-nose)))
12696 `(("python-six" ,python-six)))
12697 (home-page "https://github.com/ralphbean/ansi2html")
12698 (synopsis "Convert ANSI-decorated console output to HTML")
12700 "@command{ansi2html} is a Python library and command line utility for
12701 convering text with ANSI color codes to HTML or LaTeX.")
12702 (license license:gpl3+)))
12704 (define-public python2-ansi2html
12705 (package-with-python2 python-ansi2html))
12707 (define-public python-ddt
12709 (name "python-ddt")
12714 (uri (pypi-uri "ddt" version))
12717 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12718 (build-system python-build-system)
12720 `(("python-mock" ,python-mock)
12721 ("python-nose" ,python-nose)))
12723 `(("python-six" ,python-six)
12724 ("python-pyyaml" ,python-pyyaml)))
12725 (home-page "https://github.com/txels/ddt")
12726 (synopsis "Data-Driven Tests")
12728 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12729 running it with different test data, and make it appear as multiple test
12731 (license license:expat)))
12733 (define-public python2-ddt
12734 (package-with-python2 python-ddt))
12736 (define-public python-pycountry
12738 (name "python-pycountry")
12739 (version "18.5.26")
12743 (uri (pypi-uri "pycountry" version))
12746 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12747 (build-system python-build-system)
12748 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12749 (synopsis "ISO databases for languages, countries, currencies, etc.")
12751 "@code{pycountry} provides the ISO databases for the standards:
12753 @item 639-3 (Languages)
12754 @item 3166 (Countries)
12755 @item 3166-3 (Deleted Countries)
12756 @item 3166-2 (Subdivisions of countries)
12757 @item 4217 (Currencies)
12758 @item 15924 (Scripts)
12760 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12761 through a Python API.")
12762 (license license:lgpl2.1+)))
12764 (define-public python2-pycountry
12765 (package-with-python2 python-pycountry))
12767 (define-public python-pycosat
12769 (name "python-pycosat")
12774 (uri (pypi-uri "pycosat" version))
12777 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12778 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12779 (build-system python-build-system)
12780 (home-page "https://github.com/ContinuumIO/pycosat")
12781 (synopsis "Bindings to picosat (a SAT solver)")
12783 "This package provides efficient Python bindings to @code{picosat} on
12784 the C level. When importing pycosat, the @code{picosat} solver becomes part
12785 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12786 Problem} (SAT) solver.")
12787 (license license:expat)))
12789 (define-public python2-pycosat
12790 (package-with-python2 python-pycosat))
12792 (define-public python2-ruamel.ordereddict
12794 (name "python2-ruamel.ordereddict")
12799 (uri (pypi-uri "ruamel.ordereddict" version))
12802 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12803 (build-system python-build-system)
12805 `(#:python ,python-2
12807 (modify-phases %standard-phases
12809 (add-after 'install 'check
12810 (lambda* (#:key inputs outputs #:allow-other-keys)
12811 (add-installed-pythonpath inputs outputs)
12812 (invoke "python" "test/testordereddict.py"))))))
12813 (home-page "https://bitbucket.org/ruamel/ordereddict")
12814 (synopsis "Version of dict that keeps keys in insertion order")
12816 "This is an implementation of an ordered dictionary with @dfn{Key
12817 Insertion Order} (KIO: updates of values do not affect the position of the
12818 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12819 removed and put at the back). The standard library module @code{OrderedDict},
12820 implemented later, implements a subset of @code{ordereddict} functionality.
12821 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12822 Order} (KSO, no sorting function can be specified, but a transform can be
12823 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12824 (license license:expat)))
12826 (define-public python-pypeg2
12828 (name "python-pypeg2")
12833 (uri (pypi-uri "pyPEG2" version))
12836 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12837 (build-system python-build-system)
12838 (propagated-inputs `(("python-lxml" ,python-lxml)))
12840 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12842 (home-page "https://fdik.org/pyPEG/")
12843 (synopsis "Parsering Expression Grammars in Python")
12844 (description "PyPEG is an intrinsic parser interpreter framework for
12845 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12846 parse many formal languages.")
12847 (license license:gpl2)))
12849 (define-public python-incremental
12851 (name "python-incremental")
12856 (uri (pypi-uri "incremental" version))
12859 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12860 (build-system python-build-system)
12861 (home-page "https://github.com/hawkowl/incremental")
12862 (synopsis "Library for versioning Python projects")
12863 (description "Incremental is a small library that versions your Python
12865 (license license:expat)))
12867 (define-public python2-incremental
12868 (package-with-python2 python-incremental))
12870 (define-public python-invoke
12872 (name "python-invoke")
12873 (home-page "https://www.pyinvoke.org/")
12877 (uri (pypi-uri "invoke" version))
12880 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12881 (build-system python-build-system)
12883 ;; XXX: Requires many dependencies that are not yet in Guix.
12885 (synopsis "Pythonic task execution")
12887 "Invoke is a Python task execution tool and library, drawing inspiration
12888 from various sources to arrive at a powerful and clean feature set. It is
12889 evolved from the Fabric project, but focuses on local and abstract concerns
12890 instead of servers and network commands.")
12891 (license license:bsd-3)))
12893 (define-public python2-invoke
12894 (package-with-python2 python-invoke))
12896 (define-public python-automat
12898 (name "python-automat")
12902 (uri (pypi-uri "Automat" version))
12905 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12906 (build-system python-build-system)
12907 ;; We disable the tests because they require python-twisted, while
12908 ;; python-twisted depends on python-automat. Twisted is optional, but the
12909 ;; tests fail if it is not available. Also see
12910 ;; <https://github.com/glyph/automat/issues/71>.
12911 (arguments '(#:tests? #f))
12913 `(("python-m2r" ,python-m2r)
12914 ("python-setuptools-scm" ,python-setuptools-scm)
12915 ("python-graphviz" ,python-graphviz)))
12917 `(("python-six" ,python-six)
12918 ("python-attrs" ,python-attrs)))
12919 (home-page "https://github.com/glyph/Automat")
12920 (synopsis "Self-service finite-state machines")
12921 (description "Automat is a library for concise, idiomatic Python
12922 expression of finite-state automata (particularly deterministic finite-state
12924 (license license:expat)))
12926 (define-public python2-automat
12927 (package-with-python2 python-automat))
12929 (define-public python-m2r
12931 (name "python-m2r")
12935 (uri (pypi-uri "m2r" version))
12938 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12939 (build-system python-build-system)
12941 `(("python-docutils" ,python-docutils)
12942 ("python-mistune" ,python-mistune)))
12944 `(("python-pygments" ,python-pygments)
12945 ("python-mock" ,python-mock)))
12946 (home-page "https://github.com/miyakogi/m2r")
12947 (synopsis "Markdown to reStructuredText converter")
12948 (description "M2R converts a markdown file including reST markups to valid
12950 (license license:expat)))
12952 (define-public python2-m2r
12953 (package-with-python2 python-m2r))
12955 (define-public python-constantly
12957 (name "python-constantly")
12961 (uri (pypi-uri "constantly" version))
12964 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12965 (build-system python-build-system)
12966 (home-page "https://github.com/twisted/constantly")
12967 (synopsis "Symbolic constants in Python")
12968 (description "Constantly is a Python library that provides symbolic
12969 constant support. It includes collections and constants with text, numeric,
12970 and bit flag values.")
12971 (license license:expat)))
12973 (define-public python2-constantly
12974 (package-with-python2 python-constantly))
12976 (define-public python-attrs
12978 (name "python-attrs")
12982 (uri (pypi-uri "attrs" version))
12985 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12986 (build-system python-build-system)
12988 `(#:modules ((guix build utils)
12989 (guix build python-build-system)
12993 #:phases (modify-phases %standard-phases
12996 (let ((cwd (getcwd)))
12997 (setenv "PYTHONPATH"
13000 (find (cut string-prefix? "lib" <>)
13001 (scandir (string-append cwd "/build")))
13003 (getenv "PYTHONPATH")))
13004 (invoke "python" "-m" "pytest")))))))
13006 `(("python-coverage" ,python-coverage)
13007 ("python-hypothesis" ,python-hypothesis)
13008 ("python-pympler" ,python-pympler)
13009 ("python-pytest" ,python-pytest)
13010 ("python-six" ,python-six)
13011 ("python-sphinx" ,python-sphinx)
13012 ("python-zope-interface" ,python-zope-interface)))
13013 (home-page "https://github.com/python-attrs/attrs/")
13014 (synopsis "Attributes without boilerplate")
13015 (description "@code{attrs} is a Python package with class decorators that
13016 ease the chores of implementing the most common attribute-related object
13018 (license license:expat)))
13020 (define-public python2-attrs
13021 (package-with-python2 python-attrs))
13023 (define-public python-attrs-bootstrap
13025 (inherit python-attrs)
13026 (name "python-attrs-bootstrap")
13027 (native-inputs `())
13028 (arguments `(#:tests? #f))))
13030 (define-public python2-attrs-bootstrap
13031 (package-with-python2 python-attrs-bootstrap))
13033 (define-public python2-cliapp
13035 (name "python2-cliapp")
13036 (version "1.20180812.1")
13040 (uri (string-append
13041 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13042 version ".tar.gz"))
13045 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
13046 (build-system python-build-system)
13048 `(#:python ,python-2
13050 (modify-phases %standard-phases
13051 ;; check phase needs to be run before the build phase. If not,
13052 ;; coverage-test-runner looks for tests for the built source files,
13055 (add-before 'build 'check
13057 ;; Disable python3 tests
13058 (substitute* "check"
13059 (("python3") "# python3"))
13060 (invoke "./check"))))))
13062 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13063 ("python2-pep8" ,python2-pep8)))
13065 `(("python2-pyaml" ,python2-pyaml)))
13066 (home-page "https://liw.fi/cliapp/")
13067 (synopsis "Python framework for command line programs")
13068 (description "@code{python2-cliapp} is a python framework for
13069 command line programs. It contains the typical stuff such programs
13070 need to do, such as parsing the command line for options, and
13071 iterating over input files.")
13072 (license license:gpl2+)))
13074 (define-public python2-ttystatus
13076 (name "python2-ttystatus")
13081 (uri (string-append
13082 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13083 version ".tar.gz"))
13086 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
13087 (build-system python-build-system)
13089 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13090 ("python2-pep8" ,python2-pep8)))
13092 `(#:python ,python-2
13094 (modify-phases %standard-phases
13095 ;; check phase needs to be run before the build phase. If not,
13096 ;; coverage-test-runner looks for tests for the built source files,
13099 (add-before 'build 'check
13100 (lambda _ (invoke "make" "check"))))))
13101 (home-page "https://liw.fi/ttystatus/")
13102 (synopsis "Python library for showing progress reporting and
13103 status updates on terminals")
13104 (description "@code{python2-ttystatus} is a python library for
13105 showing progress reporting and status updates on terminals, for
13106 command line programs. Output is automatically adapted to the width
13107 of the terminal: truncated if it does not fit, and resized if the
13108 terminal size changes.")
13109 (license license:gpl3+)))
13111 (define-public python2-tracing
13113 (name "python2-tracing")
13118 (uri (string-append
13119 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13120 version ".tar.gz"))
13123 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13124 (build-system python-build-system)
13126 `(#:python ,python-2))
13127 (home-page "https://liw.fi/tracing/")
13128 (synopsis "Python debug logging helper")
13129 (description "@code{python2-tracing} is a python library for
13130 logging debug messages. It provides a way to turn debugging messages
13131 on and off, based on the filename they occur in. It is much faster
13132 than using @code{logging.Filter} to accomplish the same thing, which
13133 matters when code is run in production mode. The actual logging still
13134 happens using the @code{logging} library.")
13135 (license license:gpl3+)))
13137 (define-public python2-larch
13139 (name "python2-larch")
13140 (version "1.20151025")
13144 (uri (string-append
13145 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13146 version ".tar.gz"))
13147 (patches (search-patches
13148 "python2-larch-coverage-4.0a6-compatibility.patch"))
13151 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13152 (build-system python-build-system)
13154 `(#:python ,python-2
13156 (modify-phases %standard-phases
13157 ;; check phase needs to be run before the build phase. If not,
13158 ;; coverage-test-runner looks for tests for the built source files,
13161 (add-before 'build 'check
13162 (lambda _ (invoke "make" "check"))))))
13164 `(("cmdtest" ,cmdtest)
13165 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13167 `(("python2-tracing" ,python2-tracing)))
13168 (home-page "https://liw.fi/larch/")
13169 (synopsis "Python copy-on-write B-tree library")
13170 (description "@code{python2-larch} is an implementation of
13171 particular kind of B-tree, based on research by Ohad Rodeh. See
13172 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13173 on the data structure.
13175 The distinctive feature of this B-tree is that a node is never
13176 (conceptually) modified. Instead, all updates are done by
13177 copy-on-write. This makes it easy to clone a tree, and modify only the
13178 clone, while other processes access the original tree.")
13179 (license license:gpl3+)))
13181 (define-public python-astroid
13183 (name "python-astroid")
13188 (uri (pypi-uri "astroid" version))
13190 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
13191 (build-system python-build-system)
13193 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13194 ("python-six" ,python-six)
13195 ("python-typed-ast" ,python-typed-ast)
13196 ("python-wrapt" ,python-wrapt)))
13198 `(("python-dateutil" ,python-dateutil)
13199 ("python-nose" ,python-nose)
13200 ("python-pytest" ,python-pytest)
13201 ("python-pytest-runner" ,python-pytest-runner)))
13204 (modify-phases %standard-phases
13205 (add-after 'unpack 'remove-spurious-test
13207 ;; This can be removed after upgrading from python-3.7
13208 ;; https://github.com/PyCQA/astroid/issues/593
13209 ;; https://bugs.python.org/issue34056
13210 (delete-file "astroid/tests/unittest_modutils.py")
13214 (invoke "pytest" "astroid"))))))
13215 (home-page "https://github.com/PyCQA/astroid")
13216 (synopsis "Common base representation of python source code for pylint and
13218 (description "@code{python-astroid} provides a common base representation
13219 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13221 It provides a compatible representation which comes from the _ast module. It
13222 rebuilds the tree generated by the builtin _ast module by recursively walking
13223 down the AST and building an extended ast. The new node classes have
13224 additional methods and attributes for different usages. They include some
13225 support for static inference and local name scopes. Furthermore, astroid
13226 builds partial trees by inspecting living objects.")
13227 (license license:lgpl2.1+)
13228 (properties `((python2-variant . ,(delay python2-astroid))))))
13230 (define-public python2-astroid
13231 (let ((base (package-with-python2
13232 (strip-python2-variant python-astroid))))
13233 (package (inherit base)
13234 ;; Version 2.x removes python2 support.
13239 (uri (pypi-uri "astroid" version))
13242 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13244 (substitute-keyword-arguments (package-arguments base)
13246 `(modify-phases ,phases
13247 (add-after 'unpack 'remove-spurious-test
13249 ;; https://github.com/PyCQA/astroid/issues/276
13250 (delete-file "astroid/tests/unittest_brain.py")
13254 (invoke"python" "-m" "unittest" "discover"
13255 "-p" "unittest*.py")))))))
13256 (native-inputs `())
13258 `(("python2-backports-functools-lru-cache"
13259 ,python2-backports-functools-lru-cache)
13260 ("python2-enum34" ,python2-enum34)
13261 ("python2-singledispatch" ,python2-singledispatch)
13262 ,@(alist-delete "python-typed-ast"
13263 (package-propagated-inputs base)))))))
13265 (define-public python-isort
13267 (name "python-isort")
13272 (uri (git-reference
13273 ;; Tests pass only from the Github sources
13274 (url "https://github.com/timothycrosley/isort")
13276 (file-name (git-file-name name version))
13279 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
13280 (build-system python-build-system)
13282 `(("python-mock" ,python-mock)
13283 ("python-pytest" ,python-pytest)))
13284 (home-page "https://github.com/timothycrosley/isort")
13285 (synopsis "Python utility/library to sort python imports")
13286 (description "@code{python-isort} is a python utility/library to sort
13287 imports alphabetically, and automatically separated into sections. It
13288 provides a command line utility, a python library and plugins for various
13290 (license license:expat)
13291 (properties `((python2-variant . ,(delay python2-isort))))))
13293 (define-public python2-isort
13294 (let ((base (package-with-python2
13295 (strip-python2-variant python-isort))))
13296 (package (inherit base)
13298 `(("python2-futures" ,python2-futures)
13299 ,@(package-native-inputs base))))))
13301 (define-public python2-backports-functools-lru-cache
13303 (name "python2-backports-functools-lru-cache")
13308 ;; only the pypi tarballs contain the necessary metadata
13309 (uri (pypi-uri "backports.functools_lru_cache" version))
13312 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
13313 (build-system python-build-system)
13315 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13317 `(#:python ,python-2))
13318 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13319 (synopsis "Backport of functools.lru_cache from Python 3.3")
13320 (description "@code{python2-backports-functools-lru-cache} is a backport
13321 of @code{functools.lru_cache} from python 3.3.")
13322 (license license:expat)))
13324 (define-public python-configparser
13326 (name "python-configparser")
13331 (uri (pypi-uri "configparser" version))
13334 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
13335 (build-system python-build-system)
13336 (home-page "https://github.com/jaraco/configparser/")
13337 (synopsis "Backport of configparser from python 3.5")
13338 (description "@code{python-configparser} is a backport of
13339 @code{configparser} from Python 3.5 so that it can be used directly
13340 in other versions.")
13341 (license license:expat)))
13343 (define-public python2-configparser
13344 (package-with-python2 python-configparser))
13346 (define-public python-mando
13348 (name "python-mando")
13352 (uri (pypi-uri "mando" version))
13355 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13356 (build-system python-build-system)
13358 `(("python-rst2ansi" ,python-rst2ansi)
13359 ("python-six" ,python-six)))
13361 `(("python-pytest" ,python-pytest)))
13362 (home-page "https://mando.readthedocs.org/")
13364 "Wrapper around argparse, allowing creation of complete CLI applications")
13366 "This package is a wrapper around argparse, allowing you to write complete CLI
13367 applications in seconds while maintaining all the flexibility.")
13368 (license license:expat)))
13370 (define-public python2-mando
13371 (package-with-python2 python-mando))
13373 (define-public python2-argparse
13375 (name "python2-argparse")
13380 (uri (pypi-uri "argparse" version))
13383 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13384 (build-system python-build-system)
13386 `(#:python ,python-2))
13387 (home-page "https://github.com/ThomasWaldmann/argparse/")
13388 (synopsis "Python command-line parsing library")
13390 "This package is mostly for people who want to have @code{argparse} on
13391 older Pythons because it was not part of the standard library back then.")
13392 (license license:psfl)))
13394 (define-public python-fudge
13396 (name "python-fudge")
13397 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13398 ;; package, which is currently the only use of this package.
13403 (uri (pypi-uri "fudge" version))
13406 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13407 (build-system python-build-system)
13409 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13410 (home-page "https://github.com/fudge-py/fudge")
13411 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13413 "Fudge is a Python module for using fake objects (mocks and stubs) to
13416 In readable Python code, you declare the methods available on your fake object
13417 and how they should be called. Then you inject that into your application and
13418 start testing. This declarative approach means you don’t have to record and
13419 playback actions and you don’t have to inspect your fakes after running code.
13420 If the fake object was used incorrectly then you’ll see an informative
13421 exception message with a traceback that points to the culprit.")
13422 (license license:expat)))
13424 (define-public python2-fudge
13425 (package-with-python2 python-fudge))
13427 (define-public python-mwclient
13429 (name "python-mwclient")
13434 ;; The PyPI version wouldn't contain tests.
13435 (uri (git-reference
13436 (url "https://github.com/mwclient/mwclient")
13437 (commit (string-append "v" version))))
13438 (file-name (git-file-name name version))
13441 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
13442 (build-system python-build-system)
13444 `(("python-requests-oauthlib" ,python-requests-oauthlib)
13445 ("python-six" ,python-six)))
13447 `(("python-mock" ,python-mock)
13448 ("python-pytest" ,python-pytest)
13449 ("python-pytest-cov" ,python-pytest-cov)
13450 ("python-pytest-runner" ,python-pytest-runner)
13451 ("python-responses" ,python-responses)))
13452 (home-page "https://github.com/btongminh/mwclient")
13453 (synopsis "MediaWiki API client")
13454 (description "This package provides a MediaWiki API client.")
13455 (license license:expat)))
13457 (define-public python2-mwclient
13458 (package-with-python2 python-mwclient))
13460 (define-public python-utils
13462 (name "python-utils")
13466 (uri (pypi-uri "python-utils" version))
13469 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13470 (build-system python-build-system)
13472 `(("pytest-runner" ,python-pytest-runner)
13473 ("pytest" ,python-pytest)
13474 ("six" ,python-six)))
13475 (home-page "https://github.com/WoLpH/python-utils")
13476 (synopsis "Convenient utilities not included with the standard Python install")
13478 "Python Utils is a collection of small Python functions and classes which
13479 make common patterns shorter and easier.")
13480 (license license:bsd-2)))
13482 (define-public python2-utils
13483 (package-with-python2 python-utils))
13485 (define-public python-diff-match-patch
13487 (name "python-diff-match-patch")
13488 (version "20121119")
13492 (uri (pypi-uri "diff-match-patch" version))
13495 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13496 (build-system python-build-system)
13497 (home-page "https://code.google.com/p/google-diff-match-patch")
13498 (synopsis "Synchronize plain text")
13499 (description "Diff Match and Patch libraries offer robust algorithms to
13500 perform the operations required for synchronizing plain text.")
13501 (license license:asl2.0)))
13503 (define-public python2-diff-match-patch
13504 (package-with-python2 python-diff-match-patch))
13506 (define-public python-dirsync
13508 (name "python-dirsync")
13513 (uri (pypi-uri "dirsync" version))
13516 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13517 (build-system python-build-system)
13519 `(("six" ,python-six)))
13520 (home-page "https://bitbucket.org/tkhyn/dirsync")
13521 (synopsis "Advanced directory tree synchronisation tool")
13522 (description "Advanced directory tree synchronisation tool.")
13523 (license license:expat)))
13525 (define-public python2-dirsync
13526 (package-with-python2 python-dirsync))
13528 (define-public python-levenshtein
13530 (name "python-levenshtein")
13535 (uri (pypi-uri "python-Levenshtein" version))
13538 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13539 (build-system python-build-system)
13540 (home-page "https://github.com/ztane/python-Levenshtein")
13541 (synopsis "Fast computation of Levenshtein distance and string similarity")
13543 "The Levenshtein Python C extension module contains functions for fast computation of
13545 @item Levenshtein (edit) distance, and edit operations
13546 @item string similarity
13547 @item approximate median strings, and generally string averaging
13548 @item string sequence and set similarity
13550 It supports both normal and Unicode strings.")
13551 (license license:gpl2+)))
13553 (define-public python2-levenshtein
13554 (package-with-python2 python-levenshtein))
13556 (define-public python-scandir
13558 (name "python-scandir")
13563 (uri (pypi-uri "scandir" version))
13565 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13566 (build-system python-build-system)
13568 `(#:phases (modify-phases %standard-phases
13571 (invoke "python" "test/run_tests.py"))))))
13572 (home-page "https://github.com/benhoyt/scandir")
13573 (synopsis "Directory iteration function")
13575 "Directory iteration function like os.listdir(), except that instead of
13576 returning a list of bare filenames, it yields DirEntry objects that include
13577 file type and stat information along with the name. Using scandir() increases
13578 the speed of os.walk() by 2-20 times (depending on the platform and file
13579 system) by avoiding unnecessary calls to os.stat() in most cases.
13581 This package is part of the Python standard library since version 3.5.")
13582 (license license:bsd-3)))
13584 (define-public python2-scandir
13585 (package-with-python2 python-scandir))
13587 (define-public python2-stemming
13589 (name "python2-stemming")
13594 (uri (pypi-uri "stemming" version))
13596 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13597 (build-system python-build-system)
13599 `(#:python ,python-2))
13600 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13601 (synopsis "Python implementations of various stemming algorithms")
13603 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13604 stemming algorithms for English. These implementations are straightforward and
13605 efficient, unlike some Python versions of the same algorithms available on the
13606 Web. This package is an extraction of the stemming code included in the Whoosh
13608 (license license:public-domain)))
13610 (define-public python-factory-boy
13612 (name "python-factory-boy")
13617 (uri (pypi-uri "factory_boy" version))
13619 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13620 (build-system python-build-system)
13622 ;; Tests are not included in the tarball.
13625 `(("faker" ,python-faker)))
13626 (home-page "https://github.com/benhoyt/scandir")
13627 (synopsis "Versatile test fixtures replacement")
13629 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13631 As a fixtures replacement tool, it aims to replace static, hard to maintain
13632 fixtures with easy-to-use factories for complex object.
13634 Instead of building an exhaustive test setup with every possible combination
13635 of corner cases, factory_boy allows you to use objects customized for the
13636 current test, while only declaring the test-specific fields")
13637 (license license:expat)))
13639 (define-public python2-factory-boy
13640 (package-with-python2 python-factory-boy))
13642 (define-public python-translate-toolkit
13644 (name "python-translate-toolkit")
13649 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13651 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13652 (build-system python-build-system)
13654 `(("python-pytest" ,python-pytest)
13655 ("python-sphinx" ,python-sphinx)))
13657 `(("python-babel" ,python-babel)
13658 ("python-beautifulsoup4" ,python-beautifulsoup4)
13659 ("python-chardet" ,python-chardet)
13660 ("python-diff-match-patch" ,python-diff-match-patch)
13661 ("python-levenshtein" ,python-levenshtein)
13662 ("python-lxml" ,python-lxml)
13663 ("python-six" ,python-six)
13664 ("python-vobject" ,python-vobject)
13665 ("python-pyyaml" ,python-pyyaml)))
13667 ;; TODO: tests are not run, because they end with
13668 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13670 ;; during test setup.
13672 (home-page "https://toolkit.translatehouse.org")
13673 (synopsis "Tools and API for translation and localization engineering")
13675 "Tools and API for translation and localization engineering. It contains
13676 several utilities, as well as an API for building localization tools.")
13677 (license license:gpl2+)))
13679 (define-public python2-translate-toolkit
13680 (package-with-python2 python-translate-toolkit))
13682 (define-public python-packaging
13684 (name "python-packaging")
13689 (uri (pypi-uri "packaging" version))
13690 ;; XXX: The URL in the patch file is wrong, it should be
13691 ;; <https://github.com/pypa/packaging/pull/256>.
13692 (patches (search-patches "python-packaging-test-arch.patch"))
13695 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13696 (build-system python-build-system)
13698 `(#:phases (modify-phases %standard-phases
13700 (lambda _ (invoke "py.test" "-vv"))))))
13702 `(("python-pretend" ,python-pretend)
13703 ("python-pytest" ,python-pytest)))
13705 `(("python-pyparsing" ,python-pyparsing)
13706 ("python-six" ,python-six)))
13707 (home-page "https://github.com/pypa/packaging")
13708 (synopsis "Core utilities for Python packages")
13709 (description "Packaging is a Python module for dealing with Python packages.
13710 It offers an interface for working with package versions, names, and dependency
13712 ;; From 'LICENSE': This software is made available under the terms of
13713 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13714 ;; Contributions to this software is made under the terms of *both* these
13716 (license (list license:asl2.0 license:bsd-2))))
13718 (define-public python2-packaging
13719 (package-with-python2 python-packaging))
13721 (define-public python-relatorio
13723 (name "python-relatorio")
13728 (uri (pypi-uri "relatorio" version))
13731 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13732 (build-system python-build-system)
13734 `(("python-lxml" ,python-lxml)
13735 ("python-genshi" ,python-genshi)))
13737 `(("python-magic" ,python-magic)))
13738 (home-page "https://relatorio.tryton.org/")
13739 (synopsis "Templating library able to output ODT and PDF files")
13740 (description "Relatorio is a templating library which provides a way to
13741 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13742 for more filetypes can be easily added by creating plugins for them.")
13743 (license license:gpl3+)))
13745 (define-public python2-relatorio
13746 (package-with-python2 python-relatorio))
13748 (define-public python-radon
13750 (name "python-radon")
13755 (uri (pypi-uri "radon" version))
13758 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
13759 (build-system python-build-system)
13761 `(#:phases (modify-phases %standard-phases
13764 (invoke "python" "radon/tests/run.py"))))))
13766 `(("python-colorama" ,python-colorama)
13767 ("python-flake8-polyfill" ,python-flake8-polyfill)
13768 ("python-mando" ,python-mando)))
13770 `(("python-pytest" ,python-pytest)
13771 ("python-pytest-mock" ,python-pytest-mock)))
13772 (home-page "https://radon.readthedocs.org/")
13773 (synopsis "Code Metrics in Python")
13774 (description "Radon is a Python tool which computes various code metrics.
13775 Supported metrics are:
13777 @item raw metrics: SLOC, comment lines, blank lines, &c.
13778 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13779 @item Halstead metrics (all of them)
13780 @item the Maintainability Index (a Visual Studio metric)
13782 (properties `((python2-variant . ,(delay python2-radon))))
13783 (license license:expat)))
13785 (define-public python2-radon
13786 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
13790 `(("python-configparser" ,python2-configparser)
13791 ("python-future" ,python2-future)
13792 ,@(package-propagated-inputs base))))))
13794 (define-public python-sure
13796 (name "python-sure")
13801 (uri (pypi-uri "sure" version))
13804 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13805 (build-system python-build-system)
13807 `(("python-mock" ,python-mock)
13808 ("python-six" ,python-six)))
13810 `(("python-nose" ,python-nose)))
13811 (home-page "https://github.com/gabrielfalcao/sure")
13812 (synopsis "Automated testing library in python for python")
13814 "Sure is a python library that leverages a DSL for writing assertions.
13815 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13816 (license license:gpl3+)))
13818 (define-public python2-sure
13819 (package-with-python2 python-sure))
13821 (define-public python2-couleur
13822 ;; This package does not seem to support python3 at all, hence,
13823 ;; only the python2 variant definition is provided.
13825 (name "python2-couleur")
13830 (uri (pypi-uri "couleur" version))
13833 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13834 (build-system python-build-system)
13836 `(#:python ,python-2))
13837 (home-page "https://github.com/gabrielfalcao/couleur")
13839 "ANSI terminal tool for python, colored shell and other handy fancy features")
13841 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13842 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13843 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13844 ;; https://github.com/gabrielfalcao/couleur/issues/11
13845 (license license:lgpl3+)))
13847 (define-public python-misaka
13849 (name "python-misaka")
13854 (uri (pypi-uri "misaka" version))
13857 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13858 (build-system python-build-system)
13860 `(;; Line 37 of setup.py calls self.run_command('develop')
13861 ;; in the 'check' phase. This command seems to be trying
13863 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13864 ;; for which it does not have the permission to write.
13867 `(("python-cffi" ,python-cffi)))
13868 (home-page "https://github.com/FSX/misaka")
13869 (synopsis "Python binding for Hoedown")
13871 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13872 library written in C. It features a fast HTML renderer and functionality to make custom
13873 renderers (e.g. man pages or LaTeX).")
13874 (license license:expat)))
13876 (define-public python2-misaka
13877 (package-with-python2 python-misaka))
13879 (define-public python2-steadymark
13880 ;; This is forced into being a python2 only variant
13881 ;; due to its dependence on couleur that has no support
13884 (name "python2-steadymark")
13889 (uri (pypi-uri "steadymark" version))
13892 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13893 (build-system python-build-system)
13895 `(("python-couleur" ,python2-couleur)
13896 ("python-sure" ,python2-sure)
13897 ("python-misaka" ,python2-misaka)))
13899 `(#:python ,python-2
13901 (modify-phases %standard-phases
13902 (add-before 'build 'patch-setup-py
13904 ;; Update requirements from dependency==version
13905 ;; to dependency>=version
13906 (substitute* "setup.py"
13909 (home-page "https://github.com/gabrielfalcao/steadymark")
13910 (synopsis "Markdown-based test runner for python")
13912 "@code{Steadymark} allows documentation to be written in github-flavoured
13913 markdown. The documentation may contain snippets of code surrounded by python
13914 code blocks and @code{Steadymark} will find these snippets and run them, making
13915 sure that there are no old malfunctional examples in the documentation examples.")
13916 (license license:expat)))
13918 (define-public python-jsonpointer
13920 (name "python-jsonpointer")
13925 (uri (pypi-uri "jsonpointer" version))
13928 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13929 (build-system python-build-system)
13930 (home-page "https://github.com/stefankoegl/python-json-pointer")
13931 (synopsis "Identify specific nodes in a JSON document")
13932 (description "@code{jsonpointer} allows you to access specific nodes
13933 by path in a JSON document (see RFC 6901).")
13934 (license license:bsd-3)))
13936 (define-public python2-jsonpointer
13937 (package-with-python2 python-jsonpointer))
13939 (define-public python-jsonpatch
13941 (name "python-jsonpatch")
13946 ;; pypi version lacks tests.js
13947 (uri (git-reference
13948 (url "https://github.com/stefankoegl/python-json-patch")
13949 (commit (string-append "v" version))))
13950 (file-name (git-file-name name version))
13953 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13954 (build-system python-build-system)
13956 `(("python-jsonpointer" ,python-jsonpointer)))
13957 (home-page "https://github.com/stefankoegl/python-json-patch")
13958 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13959 (description "@code{jsonpatch} is a library and program that allows
13960 applying JSON Patches according to RFC 6902.")
13961 (license license:bsd-3)))
13963 (define-public python2-jsonpatch
13964 (package-with-python2 python-jsonpatch))
13966 (define-public python-jsonpatch-0.4
13967 (package (inherit python-jsonpatch)
13968 (name "python-jsonpatch")
13973 (uri (git-reference
13974 (url "https://github.com/stefankoegl/python-json-patch")
13975 (commit (string-append "v" version))))
13976 (file-name (git-file-name name version))
13979 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13981 (define-public python2-jsonpatch-0.4
13982 (package-with-python2 python-jsonpatch-0.4))
13984 (define-public python-rfc3986
13986 (name "python-rfc3986")
13990 (uri (pypi-uri "rfc3986" version))
13993 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13994 (build-system python-build-system)
13996 `(#:modules ((guix build utils)
13997 (guix build python-build-system)
14002 (modify-phases %standard-phases
14005 (let ((cwd (getcwd)))
14006 (setenv "PYTHONPATH"
14007 (string-append cwd "/build/"
14008 (find (cut string-prefix? "lib" <>)
14009 (scandir (string-append cwd "/build")))
14011 (getenv "PYTHONPATH")))
14012 (invoke "pytest" "-v")))))))
14014 `(("python-pytest" ,python-pytest)))
14015 (home-page "https://rfc3986.readthedocs.io/")
14016 (synopsis "Parse and validate URI references")
14018 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14019 validation and authority parsing. This module also supports RFC@tie{}6874
14020 which adds support for zone identifiers to IPv6 addresses.")
14021 (license license:asl2.0)))
14023 (define-public python2-rfc3986
14024 (package-with-python2 python-rfc3986))
14026 (define-public python-rfc3987
14028 (name "python-rfc3987")
14033 (uri (pypi-uri "rfc3987" version))
14036 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14037 (build-system python-build-system)
14038 (home-page "https://pypi.org/project/rfc3987/")
14039 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14040 (description "@code{rfc3987} provides routines for parsing and
14041 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14042 (license license:gpl3+)))
14044 (define-public python2-rfc3987
14045 (package-with-python2 python-rfc3987))
14047 (define-public python-validate-email
14049 (name "python-validate-email")
14054 (uri (pypi-uri "validate_email" version))
14057 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14058 (build-system python-build-system)
14059 (home-page "https://github.com/syrusakbary/validate_email")
14060 (synopsis "Verifies if an email address is valid and really exists")
14061 (description "@code{validate_email} can be used to verify if an email
14062 address is valid and really exists.")
14063 (license license:lgpl3+)))
14065 (define-public python2-validate-email
14066 (package-with-python2 python-validate-email))
14068 (define-public python-flex
14070 (name "python-flex")
14075 (uri (pypi-uri "flex" version))
14078 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14079 (build-system python-build-system)
14081 `(("python-click" ,python-click)
14082 ("python-iso8601" ,python-iso8601)
14083 ("python-jsonpointer" ,python-jsonpointer)
14084 ("python-pyyaml" ,python-pyyaml)
14085 ("python-requests" ,python-requests)
14086 ("python-rfc3987" ,python-rfc3987)
14087 ("python-six" ,python-six)
14088 ("python-validate-email" ,python-validate-email)))
14089 (home-page "https://github.com/pipermerriam/flex")
14090 (synopsis "Validates Swagger schemata")
14091 (description "@code{flex} can be used to validate Swagger schemata.")
14092 (license license:bsd-3)))
14094 (define-public python2-flex
14095 (package-with-python2 python-flex))
14097 (define-public python-marshmallow
14099 (name "python-marshmallow")
14100 (version "3.0.0b14")
14104 (uri (pypi-uri "marshmallow" version))
14107 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14108 (build-system python-build-system)
14110 `(("python-dateutil" ,python-dateutil)
14111 ("python-simplejson" ,python-simplejson)))
14113 `(("python-pytest" ,python-pytest)
14114 ("python-pytz" ,python-pytz)))
14115 (home-page "https://github.com/marshmallow-code/marshmallow")
14116 (synopsis "Convert complex datatypes to and from native
14117 Python datatypes.")
14118 (description "@code{marshmallow} provides a library for converting
14119 complex datatypes to and from native Python datatypes.")
14120 (license license:expat)))
14122 (define-public python2-marshmallow
14123 (package-with-python2 python-marshmallow))
14125 (define-public python-apispec
14127 (name "python-apispec")
14132 (uri (pypi-uri "apispec" version))
14135 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14136 (build-system python-build-system)
14138 `(("python-pyyaml" ,python-pyyaml)))
14140 `(("python-pytest" ,python-pytest)
14141 ("python-flask" ,python-flask)
14142 ("python-marshmallow" ,python-marshmallow)
14143 ("python-tornado" ,python-tornado)
14144 ("python-bottle" ,python-bottle)
14145 ("python-mock" ,python-mock)))
14146 (home-page "https://github.com/marshmallow-code/apispec")
14147 (synopsis "Swagger 2.0 API specification generator")
14148 (description "@code{python-apispec} is a pluggable API specification
14149 generator. Currently supports the OpenAPI specification (f.k.a.
14151 (license license:expat)))
14153 (define-public python2-apispec
14154 (package-with-python2 python-apispec))
14156 (define-public python-flasgger
14158 (name "python-flasgger")
14163 (uri (git-reference
14164 (url "https://github.com/rochacbruno/flasgger.git")
14166 (file-name (git-file-name name version))
14168 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
14169 (build-system python-build-system)
14172 (modify-phases %standard-phases
14174 (lambda* (#:key inputs outputs #:allow-other-keys)
14175 (substitute* "Makefile"
14176 (("flake8 flasgger --ignore=F403")
14177 "flake8 flasgger --ignore=E731,F403"))
14178 (setenv "PYTHONPATH" (string-append (getcwd)
14180 (getenv "PYTHONPATH")))
14181 (invoke "py.test"))))))
14183 `(("python-flask" ,python-flask)
14184 ("python-pyyaml" ,python-pyyaml)
14185 ("python-jsonschema" ,python-jsonschema)
14186 ("python-mistune" ,python-mistune)
14187 ("python-six" ,python-six)))
14189 `(("python-decorator" ,python-decorator)
14190 ("python-flake8" ,python-flake8)
14191 ("python-flask-restful" ,python-flask-restful)
14192 ("python-flex" ,python-flex)
14193 ("python-pytest" ,python-pytest)
14194 ("python-pytest-cov" ,python-pytest-cov)
14195 ("python-marshmallow" ,python-marshmallow)
14196 ("python-apispec" ,python-apispec)))
14197 (home-page "https://github.com/rochacbruno/flasgger/")
14198 (synopsis "Extract Swagger specs from your Flask project")
14199 (description "@code{python-flasgger} allows extracting Swagger specs
14200 from your Flask project. It is a fork of Flask-Swagger.")
14201 (license license:expat)))
14203 (define-public python2-flasgger
14204 (package-with-python2 python-flasgger))
14206 (define-public python-swagger-spec-validator
14208 (name "python-swagger-spec-validator")
14213 (uri (pypi-uri "swagger-spec-validator" version))
14216 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
14217 (build-system python-build-system)
14219 `(("python-jsonschema" ,python-jsonschema)
14220 ("python-pyyaml" ,python-pyyaml)
14221 ("python-six" ,python-six)))
14223 "https://github.com/Yelp/swagger_spec_validator")
14224 (synopsis "Validation of Swagger specifications")
14225 (description "@code{swagger_spec_validator} provides a library for
14226 validating Swagger API specifications.")
14227 (license license:asl2.0)))
14229 (define-public python2-swagger-spec-validator
14230 (package-with-python2 python-swagger-spec-validator))
14232 (define-public python-apache-libcloud
14234 (name "python-apache-libcloud")
14239 (uri (pypi-uri "apache-libcloud" version))
14242 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
14243 (build-system python-build-system)
14246 (modify-phases %standard-phases
14247 (add-after 'unpack 'patch-ssh
14248 (lambda* (#:key inputs #:allow-other-keys)
14249 (substitute* "libcloud/compute/ssh.py"
14250 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
14253 (add-after 'unpack 'patch-tests
14255 (substitute* "./libcloud/test/test_file_fixtures.py"
14256 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
14257 (("def _ascii") "def _raw_data(self, method, url, body, headers):
14258 return (httplib.OK,
14260 {\"test\": \"value\"},
14261 httplib.responses[httplib.OK])
14263 (substitute* "libcloud/test/compute/test_ssh_client.py"
14264 (("class ShellOutSSHClientTests")
14265 "@unittest.skip(\"Guix container doesn't have ssh service\")
14266 class ShellOutSSHClientTests")
14267 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
14268 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
14269 (("'.xF0', '.x90', '.x8D', '.x88'")
14270 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
14272 (add-before 'check 'copy-secret
14274 (copy-file "libcloud/test/secrets.py-dist"
14275 "libcloud/test/secrets.py")
14278 `(("openssh" ,openssh)))
14280 `(("python-paramiko" ,python-paramiko)
14281 ("python-requests" ,python-requests)))
14283 `(("python-lockfile" ,python-lockfile)
14284 ("python-mock" ,python-mock)
14285 ("python-pytest" ,python-pytest)
14286 ("python-pytest-runner" ,python-pytest-runner)
14287 ("python-requests-mock" ,python-requests-mock)))
14288 (home-page "https://libcloud.apache.org/")
14289 (synopsis "Unified Cloud API")
14290 (description "@code{libcloud} is a Python library for interacting with
14291 many of the popular cloud service providers using a unified API.")
14292 (license license:asl2.0)))
14294 (define-public python2-apache-libcloud
14295 (package-with-python2 python-apache-libcloud))
14297 (define-public python-smmap
14299 (name "python-smmap")
14304 (uri (pypi-uri "smmap" version))
14306 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
14307 (build-system python-build-system)
14309 `(("python-nosexcover" ,python-nosexcover)))
14310 (home-page "https://github.com/Byron/smmap")
14311 (synopsis "Python sliding window memory map manager")
14312 (description "@code{smmap} is a pure Python implementation of a sliding
14313 window memory map manager.")
14314 (license license:bsd-3)))
14316 (define-public python-smmap2
14317 (deprecated-package "python-smmap2" python-smmap))
14319 (define-public python2-smmap
14320 (package-with-python2 python-smmap))
14322 (define-public python2-smmap2
14323 (deprecated-package "python2-smmap2" python2-smmap))
14325 (define-public python-regex
14327 (name "python-regex")
14328 (version "2019.04.14")
14331 (uri (pypi-uri "regex" version))
14334 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
14335 ;; TODO: Fix and enable regex_test.py tests that complain about the
14336 ;; test.support module not existing.
14337 (build-system python-build-system)
14338 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
14339 (synopsis "Alternative regular expression module")
14340 (description "This regular expression implementation is backwards-
14341 compatible with the standard @code{re} module, but offers additional
14342 functionality like full case-folding for case-insensitive matches in Unicode.")
14343 (license license:psfl)))
14345 (define-public python2-regex
14346 (package-with-python2 python-regex))
14348 (define-public python2-pyopengl
14350 (name "python2-pyopengl")
14355 (uri (pypi-uri "PyOpenGL" version))
14358 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14360 `(#:python ,python-2))
14361 (build-system python-build-system)
14362 (home-page "http://pyopengl.sourceforge.net")
14363 (synopsis "Standard OpenGL bindings for Python")
14365 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14366 related APIs. The binding is created using the standard @code{ctypes}
14368 (license license:bsd-3)))
14370 (define-public python2-pyopengl-accelerate
14372 (inherit python2-pyopengl)
14373 (name "python2-pyopengl-accelerate")
14378 (uri (pypi-uri "PyOpenGL-accelerate" version))
14381 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14382 (synopsis "Acceleration code for PyOpenGL")
14384 "This is the Cython-coded accelerator module for PyOpenGL.")))
14386 (define-public python-rencode
14388 (name "python-rencode")
14393 (uri (pypi-uri "rencode" version))
14396 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14397 (build-system python-build-system)
14400 (modify-phases %standard-phases
14401 (add-before 'check 'delete-bogus-test
14402 ;; This test requires /home/aresch/Downloads, which is not provided by
14403 ;; the build environment.
14405 (delete-file "rencode/t.py")
14407 (native-inputs `(("pkg-config" ,pkg-config)
14408 ("python-cython" ,python-cython)))
14409 (home-page "https://github.com/aresch/rencode")
14410 (synopsis "Serialization of heterogeneous data structures")
14412 "The @code{rencode} module is a data structure serialization library,
14413 similar to @code{bencode} from the BitTorrent project. For complex,
14414 heterogeneous data structures with many small elements, r-encoding stake up
14415 significantly less space than b-encodings. This version of rencode is a
14416 complete rewrite in Cython to attempt to increase the performance over the
14417 pure Python module.")
14418 (license license:bsd-3)))
14420 (define-public python2-rencode
14421 (package-with-python2 python-rencode))
14423 (define-public python-xenon
14425 (name "python-xenon")
14430 (uri (pypi-uri "xenon" version))
14433 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
14434 (build-system python-build-system)
14436 `(("python-pyyaml" ,python-pyyaml)
14437 ("python-radon" ,python-radon)
14438 ("python-requests" ,python-requests)
14439 ("python-flake8" ,python-flake8)
14440 ("python-tox" ,python-tox)))
14442 `(#:tests? #f ;test suite not shipped with the PyPI archive
14444 (modify-phases %standard-phases
14445 (add-before 'build 'patch-test-requirements
14447 ;; Remove httpretty dependency for tests.
14448 (substitute* "setup.py"
14449 (("httpretty") ""))
14451 (home-page "https://xenon.readthedocs.org/")
14452 (synopsis "Monitor code metrics for Python on your CI server")
14454 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14455 Ideally, @code{xenon} is run every time code is committed. Through command
14456 line options, various thresholds can be set for the complexity of code. It
14457 will fail (i.e. it will exit with a non-zero exit code) when any of these
14458 requirements is not met.")
14459 (license license:expat)))
14461 (define-public python2-xenon
14462 (package-with-python2 python-xenon))
14464 (define-public python-pysocks
14466 (name "python-pysocks")
14471 (uri (pypi-uri "PySocks" version))
14474 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
14475 (build-system python-build-system)
14476 (arguments `(#:tests? #f))
14477 (home-page "https://github.com/Anorov/PySocks")
14478 (synopsis "SOCKS client module")
14479 (description "@code{pysocks} is an updated and semi-actively maintained
14480 version of @code{SocksiPy} with bug fixes and extra features.")
14481 (license license:bsd-3)))
14483 (define-public python2-pysocks
14484 (package-with-python2 python-pysocks))
14486 (define-public python-pydiff
14488 (name "python-pydiff")
14493 (uri (pypi-uri "pydiff" version))
14496 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14497 (build-system python-build-system)
14498 (home-page "https://github.com/myint/pydiff")
14499 (synopsis "Library to diff two Python files at the bytecode level")
14501 "@code{pydiff} makes it easy to look for actual code changes while
14502 ignoring formatting changes.")
14503 (license license:expat)))
14505 (define-public python2-pydiff
14506 (package-with-python2 python-pydiff))
14508 (define-public python-tqdm
14510 (name "python-tqdm")
14515 (uri (pypi-uri "tqdm" version))
14518 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
14519 (build-system python-build-system)
14521 '(#:phases (modify-phases %standard-phases
14523 (lambda* (#:key inputs outputs #:allow-other-keys)
14524 (add-installed-pythonpath inputs outputs)
14525 ;; This invokation is taken from tox.ini.
14526 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
14527 "-d" "-v" "tqdm/"))))))
14529 `(("python-nose" ,python-nose)))
14530 (home-page "https://github.com/tqdm/tqdm")
14531 (synopsis "Fast, extensible progress meter")
14533 "Make loops show a progress bar on the console by just wrapping any
14534 iterable with @code{|tqdm(iterable)|}. Offers many options to define
14535 design and layout.")
14536 (license (list license:mpl2.0 license:expat))))
14538 (define-public python2-tqdm
14539 (package-with-python2 python-tqdm))
14541 (define-public python-pkginfo
14543 (name "python-pkginfo")
14548 (uri (pypi-uri "pkginfo" version))
14551 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14552 (build-system python-build-system)
14554 ;; The tests are broken upstream.
14557 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14559 "Query metadatdata from sdists, bdists, and installed packages")
14561 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14562 source distriubtion (an sdist) or a binary distribution (e.g., created by
14563 running bdist_egg). It can also query the EGG-INFO directory of an installed
14564 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14565 created by running @code{python setup.py develop}).")
14566 (license license:expat)))
14568 (define-public python2-pkginfo
14569 (package-with-python2 python-pkginfo))
14571 (define-public python-twine
14573 (name "python-twine")
14578 (uri (pypi-uri "twine" version))
14581 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14582 (build-system python-build-system)
14584 `(("python-tqdm" ,python-tqdm)
14585 ("python-pkginfo" ,python-pkginfo)
14586 ("python-requests" ,python-requests)
14587 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14588 (home-page "https://github.com/pypa/twine")
14589 (synopsis "Collection of utilities for interacting with PyPI")
14591 "@code{twine} currently supports registering projects and uploading
14592 distributions. It authenticates the user over HTTPS, allows them to pre-sign
14593 their files and supports any packaging format (including wheels).")
14594 (license license:asl2.0)))
14596 (define-public python2-twine
14597 (package-with-python2 python-twine))
14599 (define-public python-linecache2
14601 (name "python-linecache2")
14606 (uri (pypi-uri "linecache2" version))
14609 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14610 (build-system python-build-system)
14612 `(;; The tests depend on unittest2, and our version is a bit too old.
14615 `(("python-pbr" ,python-pbr-minimal)))
14617 "https://github.com/testing-cabal/linecache2")
14618 (synopsis "Backports of the linecache module")
14620 "The linecache module allows one to get any line from any file, while
14621 attempting to optimize internally, using a cache, the common case where many
14622 lines are read from a single file.")
14623 (license license:psfl)))
14625 (define-public python2-linecache2
14626 (package-with-python2 python-linecache2))
14628 (define-public python-traceback2
14630 (name "python-traceback2")
14635 (uri (pypi-uri "traceback2" version))
14638 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14639 (build-system python-build-system)
14641 `(;; python-traceback2 and python-unittest2 depend on one another.
14644 `(("python-pbr" ,python-pbr-minimal)))
14646 `(("python-linecache2" ,python-linecache2)))
14648 "https://github.com/testing-cabal/traceback2")
14649 (synopsis "Backports of the traceback module")
14651 "This module provides a standard interface to extract, format and print
14652 stack traces of Python programs. It exactly mimics the behavior of the Python
14653 interpreter when it prints a stack trace.")
14654 (license license:psfl)))
14656 (define-public python2-traceback2
14657 (package-with-python2 python-traceback2))
14659 (define-public python-ratelimiter
14661 (name "python-ratelimiter")
14666 (uri (pypi-uri "ratelimiter" version))
14669 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14670 (build-system python-build-system)
14672 '(#:tests? #f)) ; There are no tests in the pypi archive.
14673 (home-page "https://github.com/RazerM/ratelimiter")
14674 (synopsis "Simple rate limiting object")
14676 "The @code{ratelimiter} module ensures that an operation will not be
14677 executed more than a given number of times during a given period.")
14678 (license license:asl2.0)))
14680 (define-public python2-ratelimiter
14681 (package-with-python2 python-ratelimiter))
14683 (define-public python-dukpy
14685 (name "python-dukpy")
14690 (uri (git-reference
14691 (url "https://github.com/kovidgoyal/dukpy.git")
14692 (commit (string-append "v" version))))
14693 (file-name (git-file-name name version))
14695 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14696 (build-system python-build-system)
14697 (home-page "https://github.com/kovidgoyal/dukpy")
14698 (synopsis "Run JavaScript in python")
14700 "dukpy is a JavaScript runtime environment for Python using the duktape
14701 embeddable JavaScript engine.")
14702 ;; Dukpy is licensed under MIT like the embedded duktape library,
14703 ;; with 'errors.c' as GPL3.
14704 (license (list license:expat license:gpl3))))
14706 (define-public python2-dukpy
14707 (package-with-python2 python-dukpy))
14709 (define-public python-jsonrpclib-pelix
14711 (name "python-jsonrpclib-pelix")
14716 (uri (pypi-uri "jsonrpclib-pelix" version))
14719 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14720 (build-system python-build-system)
14722 `(#:tests? #f)) ; no tests in PyPI tarball
14723 (home-page "https://github.com/tcalmant/jsonrpclib/")
14724 (synopsis "JSON-RPC 2.0 client library for Python")
14726 "This library implements the JSON-RPC v2.0
14727 specification (backwards-compatible) as a client library for Python. This
14728 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14730 (license license:asl2.0)))
14732 (define-public python2-jsonrpclib-pelix
14733 (package-with-python2 python-jsonrpclib-pelix))
14735 (define-public python-setuptools-scm-git-archive
14737 (name "python-setuptools-scm-git-archive")
14742 (uri (pypi-uri "setuptools_scm_git_archive" version))
14745 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14746 (build-system python-build-system)
14748 `(("python-pytest" ,python-pytest)))
14750 `(("python-setuptools-scm" ,python-setuptools-scm)))
14751 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14752 (synopsis "Setuptools_scm plugin for git archives")
14754 "The setuptools_scm_git_archive package is a plugin to
14755 setuptools_scm, which supports obtaining versions from git archives that
14756 belong to tagged versions.")
14757 (license license:expat)))
14759 (define-public python2-setuptools-scm-git-archive
14760 (package-with-python2 python-setuptools-scm-git-archive))
14762 (define-public python-setuptools-git
14764 (name "python-setuptools-git")
14769 (uri (pypi-uri "setuptools-git" version))
14772 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14773 (build-system python-build-system)
14776 (modify-phases %standard-phases
14777 ;; This is needed for tests.
14778 (add-after 'unpack 'configure-git
14780 (setenv "HOME" "/tmp")
14781 (invoke "git" "config" "--global" "user.email" "guix")
14782 (invoke "git" "config" "--global" "user.name" "guix")
14785 `(("git" ,git-minimal)))
14786 (home-page "https://github.com/msabramo/setuptools-git")
14787 (synopsis "Setuptools revision control system plugin for Git")
14789 "This package provides a plugin for Setuptools for revision control with
14791 (license license:bsd-3)))
14793 (define-public python-pyclipper
14795 (name "python-pyclipper")
14796 (version "1.1.0.post3")
14800 (uri (pypi-uri "pyclipper" version ".zip"))
14802 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14803 (modules '((guix build utils)))
14806 ;; This file is generated by Cython.
14807 (delete-file "pyclipper/pyclipper.cpp") #t))))
14808 (build-system python-build-system)
14811 (modify-phases %standard-phases
14812 (add-before 'build 'cythonize-sources
14814 (with-directory-excursion "pyclipper"
14815 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14817 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14819 `(("python-cython" ,python-cython)
14820 ("python-pytest" ,python-pytest)
14821 ("python-pytest-runner" ,python-pytest-runner)
14822 ("python-unittest2" ,python-unittest2)
14824 (home-page "https://github.com/greginvm/pyclipper")
14825 (synopsis "Wrapper for Angus Johnson's Clipper library")
14827 "Pyclipper is a Cython wrapper for the C++ translation of the
14828 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14829 (license license:expat)))
14831 (define-public python2-pyclipper
14832 (package-with-python2 python-pyclipper))
14834 (define-public python2-booleanoperations
14836 (name "python2-booleanoperations")
14841 (uri (pypi-uri "booleanOperations" version ".zip"))
14844 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14845 (build-system python-build-system)
14847 `(#:python ,python-2))
14850 ("python2-pytest" ,python2-pytest)
14851 ("python2-pytest-runner" ,python2-pytest-runner)))
14853 `(("python-fonttools" ,python2-fonttools)
14854 ("python-pyclipper" ,python2-pyclipper)
14855 ("python-ufolib" ,python2-ufolib)))
14856 (home-page "https://github.com/typemytype/booleanOperations")
14857 (synopsis "Boolean operations on paths")
14859 "BooleanOperations provides a Python library that enables
14860 boolean operations on paths.")
14861 (license license:expat)))
14863 (define-public python-tempdir
14865 (name "python-tempdir")
14870 (uri (pypi-uri "tempdir" version))
14873 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14874 (build-system python-build-system)
14875 (home-page "https://pypi.org/project/tempdir/")
14877 ;; the package has no tests
14879 (synopsis "Python library for managing temporary directories")
14881 "This library manages temporary directories that are automatically
14882 deleted with all their contents when they are no longer needed. It is
14883 particularly convenient for use in tests.")
14884 (license license:expat)))
14886 (define-public python2-tempdir
14887 (package-with-python2 python-tempdir))
14889 (define-public python-activepapers
14891 (name "python-activepapers")
14896 (uri (pypi-uri "ActivePapers.Py" version))
14899 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14900 (build-system python-build-system)
14902 `(#:modules ((ice-9 ftw)
14905 (guix build python-build-system))
14908 (modify-phases %standard-phases
14909 (add-after 'unpack 'delete-python2-code
14911 (for-each delete-file
14912 '("lib/activepapers/builtins2.py"
14913 "lib/activepapers/standardlib2.py"
14914 "lib/activepapers/utility2.py"))))
14917 ;; Deactivate the test cases that download files
14918 (setenv "NO_NETWORK_ACCESS" "1")
14919 ;; For some strange reason, some tests fail if nosetests runs all
14920 ;; test modules in a single execution. They pass if each test
14921 ;; module is run individually.
14922 (for-each (lambda (filename)
14923 (invoke "nosetests"
14924 (string-append "tests/" filename)))
14927 (string-suffix? ".py" filename)))))))))
14929 `(("python-tempdir" ,python-tempdir)
14930 ("python-nose" ,python-nose)))
14932 `(("python-h5py" ,python-h5py)))
14933 (home-page "https://www.activepapers.org/")
14934 (synopsis "Executable papers for scientific computing")
14936 "ActivePapers is a tool for working with executable papers, which
14937 combine data, code, and documentation in single-file packages,
14938 suitable for publication as supplementary material or on repositories
14939 such as figshare or Zenodo.")
14940 (properties `((python2-variant . ,(delay python2-activepapers))))
14941 (license license:bsd-3)))
14943 (define-public python2-activepapers
14944 (let ((base (package-with-python2
14945 (strip-python2-variant python-activepapers))))
14949 (substitute-keyword-arguments (package-arguments base)
14951 `(modify-phases ,phases
14952 (delete 'delete-python2-code)
14953 (add-after 'unpack 'delete-python3-code
14955 (for-each delete-file
14956 '("lib/activepapers/builtins3.py"
14957 "lib/activepapers/standardlib3.py"
14958 "lib/activepapers/utility3.py")))))))))))
14960 (define-public python-semver
14962 (name "python-semver")
14967 (uri (pypi-uri "semver" version))
14970 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14971 (build-system python-build-system)
14973 `(("python-appdirs" ,python-appdirs)
14974 ("python-distlib" ,python-distlib)
14975 ("python-importlib-metadata" ,python-importlib-metadata)
14976 ("python-filelock" ,python-filelock)
14977 ("python-six" ,python-six)
14978 ("python-tox" ,python-tox)
14979 ("python-virtualenv" ,python-virtualenv)))
14980 (home-page "https://github.com/k-bx/python-semver")
14981 (synopsis "Python helper for Semantic Versioning")
14982 (description "This package provides a Python library for
14983 @url{Semantic Versioning, http://semver.org/}.")
14984 (license license:bsd-3)))
14986 (define-public python2-semver
14987 (package-with-python2 python-semver))
14989 (define-public python-pyro4
14991 (name "python-pyro4")
14996 (uri (pypi-uri "Pyro4" version))
14998 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14999 (build-system python-build-system)
15001 '(#:tests? #f)) ;FIXME: Some tests require network access.
15003 `(("python-cloudpickle" ,python-cloudpickle)
15004 ("python-dill" ,python-dill)
15005 ("python-msgpack" ,python-msgpack)))
15007 `(("python-serpent" ,python-serpent)))
15008 (home-page "https://pyro4.readthedocs.io")
15009 (synopsis "Distributed object middleware for Python")
15011 "Pyro enables you to build applications in which objects can talk to each
15012 other over the network. You can just use normal Python method calls to call
15013 objects on other machines, also known as remote procedure calls (RPC).")
15014 (license license:expat)))
15016 (define-public python2-pyro
15018 (name "python2-pyro")
15023 (uri (pypi-uri "Pyro" version))
15024 (file-name (string-append "Pyro-" version ".tar.gz"))
15027 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15028 (build-system python-build-system)
15030 ;; Pyro is not compatible with Python 3
15031 `(#:python ,python-2
15032 ;; Pyro has no test cases for automatic execution
15034 (home-page "http://pythonhosted.org/Pyro/")
15035 (synopsis "Distributed object manager for Python")
15036 (description "Pyro is a Distributed Object Technology system
15037 written in Python that is designed to be easy to use. It resembles
15038 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15039 which is a system and language independent Distributed Object Technology
15040 and has much more to offer than Pyro or RMI. Pyro 3.x is no
15041 longer maintained. New projects should use Pyro4 instead, which
15042 is the new Pyro version that is actively developed.")
15043 (license license:expat)))
15045 (define-public python2-scientific
15047 (name "python2-scientific")
15052 (uri (git-reference
15053 (url "https://github.com/khinsen/ScientificPython")
15054 (commit (string-append "rel" version))))
15055 (file-name (git-file-name name version))
15058 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
15059 (build-system python-build-system)
15061 `(("netcdf" ,netcdf)))
15063 `(("python-numpy" ,python2-numpy-1.8)
15064 ("python-pyro" ,python2-pyro)))
15066 ;; ScientificPython is not compatible with Python 3
15067 `(#:python ,python-2
15068 #:tests? #f ; No test suite
15070 (modify-phases %standard-phases
15072 (lambda* (#:key inputs #:allow-other-keys)
15073 (invoke "python" "setup.py" "build"
15074 (string-append "--netcdf_prefix="
15075 (assoc-ref inputs "netcdf"))))))))
15076 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
15077 (synopsis "Python modules for scientific computing")
15078 (description "ScientificPython is a collection of Python modules that are
15079 useful for scientific computing. Most modules are rather general (Geometry,
15080 physical units, automatic derivatives, ...) whereas others are more
15081 domain-specific (e.g. netCDF and PDB support). The library is currently
15082 not actively maintained and works only with Python 2 and NumPy < 1.9.")
15083 (license license:cecill-c)))
15085 (define-public python2-mmtk
15087 (name "python2-mmtk")
15092 (uri (git-reference
15093 (url "https://github.com/khinsen/MMTK")
15094 (commit (string-append "rel" version))))
15095 (file-name (git-file-name name version))
15098 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
15099 (build-system python-build-system)
15101 `(("netcdf" ,netcdf)))
15103 `(("python-scientific" ,python2-scientific)
15104 ("python-tkinter" ,python-2 "tk")))
15106 `(#:python ,python-2
15109 (modify-phases %standard-phases
15110 (add-before 'build 'includes-from-scientific
15111 (lambda* (#:key inputs #:allow-other-keys)
15112 (mkdir-p "Include/Scientific")
15115 (assoc-ref inputs "python-scientific")
15116 "/include/python2.7/Scientific")
15117 "Include/Scientific"))))))
15118 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15119 (synopsis "Python library for molecular simulation")
15120 (description "MMTK is a library for molecular simulations with an emphasis
15121 on biomolecules. It provides widely used methods such as Molecular Dynamics
15122 and normal mode analysis, but also basic routines for implementing new methods
15123 for simulation and analysis. The library is currently not actively maintained
15124 and works only with Python 2 and NumPy < 1.9.")
15125 (license license:cecill-c)))
15127 (define-public python-phonenumbers
15129 (name "python-phonenumbers")
15134 (uri (pypi-uri "phonenumbers" version))
15137 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15138 (build-system python-build-system)
15140 "https://github.com/daviddrysdale/python-phonenumbers")
15142 "Python library for dealing with international phone numbers")
15144 "This package provides a Python port of Google's libphonenumber library.")
15145 (license license:asl2.0)))
15147 (define-public python2-phonenumbers
15148 (package-with-python2 python-phonenumbers))
15150 (define-public python-send2trash
15152 (name "python-send2trash")
15155 (origin (method git-fetch)
15156 ;; Source tarball on PyPI doesn't include tests.
15157 (uri (git-reference
15158 (url "https://github.com/hsoft/send2trash.git")
15160 (file-name (git-file-name name version))
15163 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
15164 (build-system python-build-system)
15167 (modify-phases %standard-phases
15168 (add-before 'check 'pre-check
15170 (mkdir-p "/tmp/foo")
15171 (setenv "HOME" "/tmp/foo")
15173 (home-page "https://github.com/hsoft/send2trash")
15174 (synopsis "Send files to the user's @file{~/Trash} directory")
15175 (description "This package provides a Python library to send files to the
15176 user's @file{~/Trash} directory.")
15177 (properties `((python2-variant . ,(delay python2-send2trash))))
15178 (license license:bsd-3)))
15180 (define-public python2-send2trash
15182 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
15184 (substitute-keyword-arguments (package-arguments python-send2trash)
15186 `(modify-phases ,phases
15187 (add-before 'check 'setenv
15189 (setenv "PYTHONPATH"
15190 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
15193 (define-public python-yapf
15195 (name "python-yapf")
15200 (uri (pypi-uri "yapf" version))
15203 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
15204 (build-system python-build-system)
15205 (home-page "https://github.com/google/yapf")
15206 (synopsis "Formatter for Python code")
15207 (description "YAPF is a formatter for Python code. It's based off of
15208 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15209 takes the code and reformats it to the best formatting that conforms to the
15210 style guide, even if the original code didn't violate the style guide.")
15211 (license license:asl2.0)))
15213 (define-public python2-yapf
15214 (package-with-python2 python-yapf))
15216 (define-public python-gyp
15217 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
15220 (name "python-gyp")
15221 ;; Google does not release versions,
15222 ;; based on second most recent commit date.
15223 (version (git-version "0.0.0" revision commit))
15226 ;; Google does not release tarballs,
15227 ;; git checkout is needed.
15229 (uri (git-reference
15230 (url "https://chromium.googlesource.com/external/gyp")
15232 (file-name (git-file-name name version))
15235 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
15236 (build-system python-build-system)
15237 (home-page "https://gyp.gsrc.io/")
15238 (synopsis "GYP is a Meta-Build system")
15240 "GYP builds build systems for large, cross platform applications.
15241 It can be used to generate XCode projects, Visual Studio projects, Ninja build
15242 files, and Makefiles.")
15243 (license license:bsd-3))))
15245 (define-public python2-gyp
15246 (package-with-python2 python-gyp))
15248 (define-public python-whatever
15250 (name "python-whatever")
15255 (uri (git-reference
15256 (url "https://github.com/Suor/whatever")
15258 (file-name (git-file-name name version))
15260 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
15261 (build-system python-build-system)
15264 (modify-phases %standard-phases
15267 (invoke "py.test"))))))
15269 `(("python-pytest" ,python-pytest)))
15270 (home-page "http://github.com/Suor/whatever")
15271 (synopsis "Make anonymous functions by partial application of operators")
15272 (description "@code{whatever} provides an easy way to make anonymous
15273 functions by partial application of operators.")
15274 (license license:bsd-3)))
15276 (define-public python2-whatever
15277 (package-with-python2 python-whatever))
15279 (define-public python-funcy
15281 (name "python-funcy")
15286 (uri (git-reference
15287 (url "https://github.com/Suor/funcy.git")
15290 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
15291 (file-name (git-file-name name version))))
15292 (build-system python-build-system)
15295 (modify-phases %standard-phases
15298 (invoke "py.test"))))))
15300 `(("python-pytest" ,python-pytest)
15301 ("python-whatever" ,python-whatever)))
15302 (home-page "http://github.com/Suor/funcy")
15303 (synopsis "Functional tools")
15304 (description "@code{funcy} is a library that provides functional tools.
15307 @item merge - Merges collections of the same type
15308 @item walk - Type-preserving map
15309 @item select - Selects a part of a collection
15310 @item take - Takes the first n items of a collection
15311 @item first - Takes the first item of a collection
15312 @item remove - Predicated-removes items of a collection
15313 @item concat - Concatenates two collections
15314 @item flatten - Flattens a collection with subcollections
15315 @item distinct - Returns only distinct items
15316 @item split - Predicated-splits a collection
15317 @item split_at - Splits a collection at a given item
15318 @item group_by - Groups items by group
15319 @item pairwise - Pairs off adjacent items
15320 @item partial - Partially-applies a function
15321 @item curry - Curries a function
15322 @item compose - Composes functions
15323 @item complement - Complements a predicate
15324 @item all_fn - \"all\" with predicate
15326 (license license:bsd-3)))
15328 (define-public python2-funcy
15329 (package-with-python2 python-funcy))
15331 (define-public python-isoweek
15333 (name "python-isoweek")
15338 (uri (pypi-uri "isoweek" version))
15341 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
15342 (build-system python-build-system)
15343 (home-page "https://github.com/gisle/isoweek")
15344 (synopsis "Objects representing a week")
15345 (description "The @code{isoweek} module provide the class Week that
15346 implements the week definition of ISO 8601. This standard also defines
15347 a notation for identifying weeks; yyyyWww (where the W is a literal).
15348 Week instances stringify to this form.")
15349 (license license:bsd-3)))
15351 (define-public python2-isoweek
15352 (package-with-python2 python-isoweek))
15354 (define-public python-tokenize-rt
15356 (name "python-tokenize-rt")
15361 (uri (pypi-uri "tokenize-rt" version))
15364 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15365 (build-system python-build-system)
15366 (home-page "https://github.com/asottile/tokenize-rt")
15367 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15369 "This Python library is a wrapper around @code{tokenize} from the Python
15370 standard library. It provides two additional tokens @code{ESCAPED_NL} and
15371 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15372 and @code{tokens_to_src} to roundtrip.")
15373 (license license:expat)))
15375 (define-public python-future-fstrings
15377 (name "python-future-fstrings")
15382 (uri (pypi-uri "future_fstrings" version))
15385 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15386 (build-system python-build-system)
15388 `(("python-tokenize-rt" ,python-tokenize-rt)))
15389 (home-page "https://github.com/asottile/future-fstrings")
15390 (synopsis "Backport of fstrings to Python < 3.6")
15392 "This package provides a UTF-8 compatible encoding
15393 @code{future_fstrings}, which performs source manipulation. It decodes the
15394 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15395 @code{f} strings.")
15396 (license license:expat)))
15398 (define-public python-typed-ast
15400 (name "python-typed-ast")
15405 (uri (git-reference
15406 (url "https://github.com/python/typed_ast.git")
15409 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15410 (file-name (git-file-name name version))))
15411 (build-system python-build-system)
15413 `(#:modules ((guix build utils)
15414 (guix build python-build-system)
15419 (modify-phases %standard-phases
15422 (let ((cwd (getcwd)))
15423 (setenv "PYTHONPATH"
15424 (string-append cwd "/build/"
15425 (find (cut string-prefix? "lib" <>)
15426 (scandir (string-append cwd "/build")))
15428 (getenv "PYTHONPATH"))))
15431 (native-inputs `(("python-pytest" ,python-pytest)))
15432 (home-page "https://github.com/python/typed_ast")
15433 (synopsis "Fork of Python @code{ast} modules with type comment support")
15434 (description "This package provides a parser similar to the standard
15435 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15436 include PEP 484 type comments and are independent of the version of Python
15437 under which they are run. The @code{typed_ast} parsers produce the standard
15438 Python AST (plus type comments), and are both fast and correct, as they are
15439 based on the CPython 2.7 and 3.7 parsers.")
15440 ;; See the file "LICENSE" for the details.
15441 (license (list license:psfl
15443 license:expat)))) ;ast27/Parser/spark.py
15445 (define-public python-typing
15447 (name "python-typing")
15452 (uri (pypi-uri "typing" version))
15455 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15456 (build-system python-build-system)
15457 (home-page "https://docs.python.org/3/library/typing.html")
15458 (synopsis "Type hints for Python")
15459 (description "This is a backport of the standard library @code{typing}
15460 module to Python versions older than 3.5. Typing defines a standard notation
15461 for Python function and variable type annotations. The notation can be used
15462 for documenting code in a concise, standard format, and it has been designed
15463 to also be used by static and runtime type checkers, static analyzers, IDEs
15465 (license license:psfl)))
15467 (define-public python2-typing
15468 (package-with-python2 python-typing))
15470 (define-public python-typing-extensions
15472 (name "python-typing-extensions")
15477 (uri (pypi-uri "typing_extensions" version))
15480 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15481 (build-system python-build-system)
15483 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15484 (synopsis "Experimental type hints for Python")
15486 "The typing_extensions module contains additional @code{typing} hints not
15487 yet present in the of the @code{typing} standard library.
15488 Included are implementations of:
15491 @item ContextManager
15502 @item TYPE_CHECKING
15503 @item AsyncGenerator
15505 (license license:psfl)))
15507 (define-public bpython
15514 (uri (pypi-uri "bpython" version))
15516 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
15517 (build-system python-build-system)
15520 (modify-phases %standard-phases
15521 (add-after 'unpack 'remove-failing-test
15523 ;; Remove failing test. FIXME: make it pass
15524 (delete-file "bpython/test/test_args.py")
15526 (add-after 'wrap 'add-aliases
15527 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15528 (lambda* (#:key outputs #:allow-other-keys)
15529 (let ((out (assoc-ref outputs "out")))
15532 (symlink old (string-append out "/bin/" new)))
15533 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15534 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15537 `(("python-pygments" ,python-pygments)
15538 ("python-requests" ,python-requests)
15539 ("python-babel" ,python-babel) ; optional, for internationalization
15540 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15541 ("python-greenlet" ,python-greenlet)
15542 ("python-urwid" ,python-urwid) ; for bpython-urwid only
15543 ("python-six" ,python-six)))
15545 `(("python-sphinx" ,python-sphinx)
15546 ("python-mock" ,python-mock)))
15547 (home-page "https://bpython-interpreter.org/")
15548 (synopsis "Fancy interface to the Python interpreter")
15549 (description "Bpython is a fancy interface to the Python
15550 interpreter. bpython's main features are
15553 @item in-line syntax highlighting,
15554 @item readline-like autocomplete with suggestions displayed as you type,
15555 @item expected parameter list for any Python function,
15556 @item \"rewind\" function to pop the last line of code from memory and
15558 @item send the code you've entered off to a pastebin,
15559 @item save the code you've entered to a file, and
15560 @item auto-indentation.
15562 (license license:expat)))
15564 (define-public bpython2
15565 (let ((base (package-with-python2
15566 (strip-python2-variant bpython))))
15567 (package (inherit base)
15570 `(#:python ,python-2
15572 (modify-phases %standard-phases
15573 (add-after 'unpack 'remove-failing-test
15575 ;; Remove failing test. FIXME: make it pass
15576 (delete-file "bpython/test/test_args.py")
15577 ;; Disable failing test-cases (renaming inhibits they are
15579 (substitute* "bpython/test/test_curtsies_repl.py"
15580 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15581 (string-append a "xxx_off_" b))
15582 (("^(\\s*def )(test_complex\\W)" _ a b)
15583 (string-append a "xxx_off_" b)))
15585 (add-before 'build 'rename-scripts
15586 ;; rename the scripts to bypthon2, bpdb2, etc.
15588 (substitute* "setup.py"
15589 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15590 (string-append name "2" rest "\n"))
15591 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15592 (string-append name "2" (or sub "") rest "\n")))
15595 (define-public python-pyinotify
15597 (name "python-pyinotify")
15601 (uri (pypi-uri "pyinotify" version))
15604 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15605 (build-system python-build-system)
15606 (arguments `(#:tests? #f)) ;no tests
15607 (home-page "https://github.com/seb-m/pyinotify")
15608 (synopsis "Python library for monitoring inotify events")
15610 "@code{pyinotify} provides a Python interface for monitoring
15611 file system events on Linux.")
15612 (license license:expat)))
15614 (define-public python2-pyinotify
15615 (package-with-python2 python-pyinotify))
15617 ;; Ada parser uses this version.
15618 (define-public python2-quex-0.67.3
15620 (name "python2-quex")
15625 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15626 (version-major+minor version)
15627 "/quex-" version ".zip"))
15630 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15631 (build-system python-build-system)
15633 `(("unzip" ,unzip)))
15635 `(#:python ,python-2
15638 (modify-phases %standard-phases
15639 (delete 'configure)
15642 (lambda* (#:key outputs #:allow-other-keys)
15643 (let* ((out (assoc-ref outputs "out"))
15644 (share/quex (string-append out "/share/quex"))
15645 (bin (string-append out "/bin")))
15646 (copy-recursively "." share/quex)
15648 (symlink (string-append share/quex "/quex-exe.py")
15649 (string-append bin "/quex"))
15651 (native-search-paths
15652 (list (search-path-specification
15653 (variable "QUEX_PATH")
15654 (files '("share/quex")))))
15655 (home-page "http://quex.sourceforge.net/")
15656 (synopsis "Lexical analyzer generator in Python")
15657 (description "@code{quex} is a lexical analyzer generator in Python.")
15658 (license license:lgpl2.1+))) ; Non-military
15660 (define-public python2-quex
15661 (package (inherit python2-quex-0.67.3)
15662 (name "python2-quex")
15667 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15670 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15671 (file-name (string-append name "-" version ".tar.gz"))))))
15673 (define-public python-more-itertools
15675 (name "python-more-itertools")
15680 (uri (pypi-uri "more-itertools" version))
15683 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15684 (build-system python-build-system)
15685 (home-page "https://github.com/erikrose/more-itertools")
15686 (synopsis "More routines for operating on iterables, beyond itertools")
15687 (description "Python's built-in @code{itertools} module implements a
15688 number of iterator building blocks inspired by constructs from APL, Haskell,
15689 and SML. @code{more-itertools} includes additional building blocks for
15690 working with iterables.")
15691 (properties `((python2-variant . ,(delay python2-more-itertools))))
15692 (license license:expat)))
15694 ;; The 5.x series are the last versions supporting Python 2.7.
15695 (define-public python2-more-itertools
15697 (inherit python-more-itertools)
15698 (name "python2-more-itertools")
15702 (uri (pypi-uri "more-itertools" version))
15705 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15707 `(#:python ,python2-minimal))
15709 `(("python2-six" ,python2-six-bootstrap)))))
15711 (define-public python-latexcodec
15713 (name "python-latexcodec")
15718 (uri (pypi-uri "latexcodec" version))
15720 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15721 (build-system python-build-system)
15723 `(("python-six" ,python-six)))
15724 (home-page "https://readthedocs.org/projects/latexcodec/")
15725 (synopsis "Work with LaTeX code in Python")
15726 (description "Lexer and codec to work with LaTeX code in Python.")
15727 (license license:expat)))
15729 (define-public python-pybtex
15731 (name "python-pybtex")
15736 (uri (pypi-uri "pybtex" version))
15738 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15739 (build-system python-build-system)
15741 `(("python-nose" ,python-nose)))
15743 `(("python-latexcodec" ,python-latexcodec)
15744 ("python-pyyaml" ,python-pyyaml)
15745 ("python-six" ,python-six)))
15747 `(#:test-target "nosetests"))
15748 (home-page "https://pybtex.org/")
15749 (synopsis "BibTeX-compatible bibliography processor")
15750 (description "Pybtex is a BibTeX-compatible bibliography processor written
15751 in Python. You can simply type pybtex instead of bibtex.")
15752 (license license:expat)))
15754 (define-public python-onetimepass
15756 (name "python-onetimepass")
15761 (uri (pypi-uri "onetimepass" version))
15763 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15764 (build-system python-build-system)
15765 (propagated-inputs `(("python-six" ,python-six)))
15766 (home-page "https://github.com/tadeck/onetimepass/")
15767 (synopsis "One-time password library")
15768 (description "Python one-time password library for HMAC-based (HOTP) and
15769 time-based (TOTP) passwords.")
15770 (license license:expat)))
15772 (define-public python-parso
15774 (name "python-parso")
15779 (uri (pypi-uri "parso" version))
15782 "0mr1j4ijqnrihz1yap34g6i8vjldg5lz814sz4v0d8pbqvh5jmhc"))))
15784 `(("python-pytest" ,python-pytest)))
15785 (build-system python-build-system)
15787 `(#:phases (modify-phases %standard-phases
15789 (lambda _ (invoke "pytest" "-vv"))))))
15790 (home-page "https://github.com/davidhalter/parso")
15791 (synopsis "Python Parser")
15792 (description "Parso is a Python parser that supports error recovery and
15793 round-trip parsing for different Python versions (in multiple Python versions).
15794 Parso is also able to list multiple syntax errors in your Python file.")
15795 (license license:expat)))
15797 (define-public python2-parso
15798 (package-with-python2 python-parso))
15800 (define-public python-async-generator
15802 (name "python-async-generator")
15807 (uri (pypi-uri "async_generator" version))
15810 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15811 (build-system python-build-system)
15813 `(("python-pytest" ,python-pytest)))
15814 (home-page "https://github.com/python-trio/async_generator")
15815 (synopsis "Async generators and context managers for Python 3.5+")
15816 (description "@code{async_generator} back-ports Python 3.6's native async
15817 generators and Python 3.7's context managers into Python 3.5.")
15819 (license (list license:expat license:asl2.0))))
15821 (define-public python-async-timeout
15823 (name "python-async-timeout")
15828 (uri (pypi-uri "async-timeout" version))
15831 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15832 (build-system python-build-system)
15833 (home-page "https://github.com/aio-libs/async_timeout/")
15834 (synopsis "Timeout context manager for asyncio programs")
15835 (description "@code{async-timeout} provides a timeout timeout context
15836 manager compatible with @code{asyncio}.")
15837 (license license:asl2.0)))
15839 (define-public python-glob2
15841 (name "python-glob2")
15846 (uri (git-reference
15847 (url "https://github.com/miracle2k/python-glob2.git")
15848 (commit (string-append "v" version))))
15849 (file-name (git-file-name name version))
15851 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15852 (build-system python-build-system)
15853 (home-page "https://github.com/miracle2k/python-glob2/")
15854 (synopsis "Extended Version of the python buildin glob module")
15855 (description "This is an extended version of the Python
15856 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15860 @item The ability to capture the text matched by glob patterns, and return
15861 those matches alongside the file names.
15862 @item A recursive @code{**} globbing syntax, akin for example to the
15863 @code{globstar} option of Bash.
15864 @item The ability to replace the file system functions used, in order to glob
15865 on virtual file systems.
15866 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15869 Glob2 currently based on the glob code from Python 3.3.1.")
15870 (license license:bsd-2)))
15872 (define-public python2-glob2
15873 (package-with-python2 python-glob2))
15875 (define-public python-gipc
15877 (name "python-gipc")
15882 (uri (pypi-uri "gipc" version ".zip"))
15885 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15886 (build-system python-build-system)
15888 `(("unzip" ,unzip)))
15890 `(("python-gevent" ,python-gevent)))
15891 (home-page "https://gehrcke.de/gipc/")
15892 (synopsis "Child process management in the context of gevent")
15893 (description "Usage of Python's multiprocessing package in a
15894 gevent-powered application may raise problems. With @code{gipc},
15895 process-based child processes can safely be created anywhere within a
15896 gevent-powered application.")
15897 (license license:expat)))
15899 (define-public python2-gipc
15900 (package-with-python2 python-gipc))
15902 (define-public python-fusepy
15904 (name "python-fusepy")
15909 (uri (pypi-uri "fusepy" version))
15912 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15913 (build-system python-build-system)
15916 (modify-phases %standard-phases
15917 (add-before 'build 'set-library-file-name
15918 (lambda* (#:key inputs #:allow-other-keys)
15919 (let ((fuse (assoc-ref inputs "fuse")))
15920 (substitute* "fuse.py"
15921 (("find_library\\('fuse'\\)")
15922 (string-append "'" fuse "/lib/libfuse.so'")))
15926 (home-page "https://github.com/fusepy/fusepy")
15927 (synopsis "Simple ctypes bindings for FUSE")
15928 (description "Python module that provides a simple interface to FUSE and
15929 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15930 (license license:isc)))
15932 (define-public python2-fusepy
15933 (package-with-python2 python-fusepy))
15935 (define-public python2-gdrivefs
15937 (name "python2-gdrivefs")
15942 (uri (pypi-uri "gdrivefs" version))
15945 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15946 (build-system python-build-system)
15948 `(#:python ,python-2
15950 (modify-phases %standard-phases
15951 (add-before 'build 'patch-setup-py
15953 ;; Update requirements from dependency==version
15954 ;; to dependency>=version
15955 (substitute* "gdrivefs/resources/requirements.txt"
15959 `(("python2-gipc" ,python2-gipc)
15960 ("python2-gevent" ,python2-gevent)
15961 ("python2-greenlet" ,python2-greenlet)
15962 ("python2-httplib2" ,python2-httplib2)
15963 ("python2-uritemplate" ,python2-uritemplate)
15964 ("python2-oauth2client" ,python2-oauth2client)
15965 ("python2-six" ,python2-six)))
15967 `(("python2-dateutil" ,python2-dateutil)
15968 ("python2-fusepy" ,python2-fusepy)
15969 ("python2-google-api-client" ,python2-google-api-client)))
15970 (home-page "https://github.com/dsoprea/GDriveFS")
15971 (synopsis "Mount Google Drive as a local file system")
15972 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15973 under Python 2.7.")
15974 (license license:gpl2)))
15976 (define-public pybind11
15982 (uri (git-reference
15983 (url "https://github.com/pybind/pybind11.git")
15984 (commit (string-append "v" version))))
15987 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
15988 (file-name (git-file-name name version))))
15989 (build-system cmake-build-system)
15991 `(("python" ,python-wrapper)
15993 ;; The following dependencies are used for tests.
15994 ("python-pytest" ,python-pytest)
15995 ("catch" ,catch-framework2-1)
15998 `(#:configure-flags
15999 (list (string-append "-DCATCH_INCLUDE_DIR="
16000 (assoc-ref %build-inputs "catch")
16003 #:phases (modify-phases %standard-phases
16004 (add-after 'install 'install-python
16005 (lambda* (#:key outputs #:allow-other-keys)
16006 (let ((out (assoc-ref outputs "out")))
16007 (with-directory-excursion "../source"
16008 (setenv "PYBIND11_USE_CMAKE" "yes")
16009 (invoke "python" "setup.py" "install"
16010 "--single-version-externally-managed"
16012 (string-append "--prefix=" out)))))))
16014 #:test-target "check"))
16015 (home-page "https://github.com/pybind/pybind11/")
16016 (synopsis "Seamless operability between C++11 and Python")
16018 "@code{pybind11} is a lightweight header-only library that exposes C++
16019 types in Python and vice versa, mainly to create Python bindings of existing
16020 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
16021 library: to minimize boilerplate code in traditional extension modules by
16022 inferring type information using compile-time introspection.")
16023 (license license:bsd-3)))
16025 (define-public python-fasteners
16027 (name "python-fasteners")
16032 (uri (pypi-uri "fasteners" version))
16035 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16036 (build-system python-build-system)
16038 `(("python-monotonic" ,python-monotonic)
16039 ("python-six" ,python-six)
16040 ("python-testtools" ,python-testtools)))
16041 (home-page "https://github.com/harlowja/fasteners")
16042 (synopsis "Python package that provides useful locks")
16044 "This package provides a Python program that provides following locks:
16047 @item Locking decorator
16048 @item Reader-writer locks
16049 @item Inter-process locks
16050 @item Generic helpers
16052 (properties `((python2-variant . ,(delay python2-fasteners))))
16053 (license license:asl2.0)))
16055 (define-public python2-fasteners
16056 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16060 `(("python2-futures" ,python2-futures)
16061 ,@(package-propagated-inputs base))))))
16063 (define-public python-requests-file
16065 (name "python-requests-file")
16070 (uri (pypi-uri "requests-file" version))
16073 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16074 (build-system python-build-system)
16076 `(("python-requests" ,python-requests)
16077 ("python-six" ,python-six)))
16079 "https://github.com/dashea/requests-file")
16080 (synopsis "File transport adapter for Requests")
16082 "Requests-File is a transport adapter for use with the Requests Python
16083 library to allow local file system access via @code{file://} URLs.")
16084 (license license:asl2.0)))
16086 (define-public python2-requests-file
16087 (package-with-python2 python-requests-file))
16089 (define-public python-tldextract
16091 (name "python-tldextract")
16096 (uri (pypi-uri "tldextract" version))
16099 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16100 (build-system python-build-system)
16102 `(("python-pytest" ,python-pytest)
16103 ("python-responses" ,python-responses)))
16105 `(("python-idna" ,python-idna)
16106 ("python-requests" ,python-requests)
16107 ("python-requests-file" ,python-requests-file)))
16109 "https://github.com/john-kurkowski/tldextract")
16111 "Separate the TLD from the registered domain and subdomains of a URL")
16113 "TLDExtract accurately separates the TLD from the registered domain and
16114 subdomains of a URL, using the Public Suffix List. By default, this includes
16115 the public ICANN TLDs and their exceptions. It can optionally support the
16116 Public Suffix List's private domains as well.")
16117 (license license:bsd-3)))
16119 (define-public python2-tldextract
16120 (package-with-python2 python-tldextract))
16122 (define-public python-pynamecheap
16124 (name "python-pynamecheap")
16129 (uri (pypi-uri "PyNamecheap" version))
16132 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16133 (build-system python-build-system)
16135 `(("python-requests" ,python-requests)))
16137 "https://github.com/Bemmu/PyNamecheap")
16139 "Namecheap API client in Python")
16141 "PyNamecheap is a Namecheap API client in Python.")
16142 (license license:expat)))
16144 (define-public python2-pynamecheap
16145 (package-with-python2 python-pynamecheap))
16147 (define-public python-dns-lexicon
16149 (name "python-dns-lexicon")
16154 (uri (pypi-uri "dns-lexicon" version))
16157 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16158 (build-system python-build-system)
16160 `(#:tests? #f)) ;requires internet access
16162 `(("python-future" ,python-future)
16163 ("python-pynamecheap" ,python-pynamecheap)
16164 ("python-requests" ,python-requests)
16165 ("python-tldextract" ,python-tldextract)
16166 ("python-urllib3" ,python-urllib3)))
16167 (home-page "https://github.com/AnalogJ/lexicon")
16169 "Manipulate DNS records on various DNS providers")
16171 "Lexicon provides a way to manipulate DNS records on multiple DNS
16172 providers in a standardized way. It has a CLI but it can also be used as a
16173 Python library. It was designed to be used in automation, specifically with
16175 (license license:expat)))
16177 (define-public python2-dns-lexicon
16178 (package-with-python2 python-dns-lexicon))
16180 (define-public python-commandlines
16182 (name "python-commandlines")
16187 (uri (pypi-uri "commandlines" version))
16190 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
16191 (build-system python-build-system)
16192 (home-page "https://github.com/chrissimpkins/commandlines")
16193 (synopsis "Command line argument to object parsing library")
16195 "@code{Commandlines} is a Python library for command line application
16196 development that supports command line argument parsing, command string
16197 validation testing and application logic.")
16198 (license license:expat)))
16200 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
16201 ;; python-numba. They have a very unflexible relationship.
16202 (define-public python-numba
16204 (name "python-numba")
16209 (uri (pypi-uri "numba" version))
16212 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
16213 (build-system python-build-system)
16215 `(#:modules ((guix build utils)
16216 (guix build python-build-system)
16221 (modify-phases %standard-phases
16222 (add-after 'unpack 'disable-proprietary-features
16224 (setenv "NUMBA_DISABLE_HSA" "1")
16225 (setenv "NUMBA_DISABLE_CUDA" "1")
16227 (add-after 'unpack 'remove-failing-tests
16229 ;; FIXME: These tests fail for unknown reasons:
16230 ;; test_non_writable_pycache, test_non_creatable_pycache, and
16231 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
16232 (substitute* "numba/tests/test_dispatcher.py"
16233 (("def test(_non_writable_pycache)" _ m)
16234 (string-append "def guix_skip" m))
16235 (("def test(_non_creatable_pycache)" _ m)
16236 (string-append "def guix_skip" m))
16237 (("def test(_frozen)" _ m)
16238 (string-append "def guix_skip" m)))
16240 ;; These tests fail because we don't run the tests from the build
16241 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
16242 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
16243 (substitute* "numba/tests/test_pycc.py"
16244 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
16245 (string-append "def guix_skip" m)))
16247 ;; These tests fail because our version of Python does not have
16248 ;; a recognizable front-end for the Numba distribution to use
16249 ;; to check against.
16250 (substitute* "numba/tests/test_entrypoints.py"
16251 (("def test(_init_entrypoint)" _ m)
16252 (string-append "def guix_skip" m)))
16253 (substitute* "numba/tests/test_jitclasses.py"
16254 (("def test(_jitclass_longlabel_not_truncated)" _ m)
16255 (string-append "def guix_skip" m)))
16259 (let ((cwd (getcwd)))
16260 (setenv "PYTHONPATH"
16261 (string-append cwd "/build/"
16262 (find (cut string-prefix? "lib" <>)
16263 (scandir (string-append cwd "/build")))
16265 (getenv "PYTHONPATH")))
16266 ;; Something is wrong with the PYTHONPATH when running the
16267 ;; tests from the build directory, as it complains about not being
16268 ;; able to import certain modules.
16269 (with-directory-excursion "/tmp"
16270 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
16273 `(("python-llvmlite" ,python-llvmlite)
16274 ("python-numpy" ,python-numpy)
16275 ("python-singledispatch" ,python-singledispatch)))
16276 ;; Needed for tests.
16278 `(("python-jinja2" ,python-jinja2)
16279 ("python-pygments" ,python-pygments)))
16280 (home-page "https://numba.pydata.org")
16281 (synopsis "Compile Python code using LLVM")
16282 (description "Numba gives you the power to speed up your applications with
16283 high performance functions written directly in Python. With a few
16284 annotations, array-oriented and math-heavy Python code can be just-in-time
16285 compiled to native machine instructions, similar in performance to C, C++ and
16286 Fortran, without having to switch languages or Python interpreters.
16288 Numba works by generating optimized machine code using the LLVM compiler
16289 infrastructure at import time, runtime, or statically (using the included pycc
16291 (license license:bsd-3)))
16293 (define-public python-numcodecs
16295 (name "python-numcodecs")
16300 (uri (pypi-uri "numcodecs" version))
16303 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
16304 (build-system python-build-system)
16306 `(("python-numpy" ,python-numpy)
16307 ("python-msgpack" ,python-msgpack)))
16309 `(("python-pytest" ,python-pytest)
16310 ("python-setuptools-scm" ,python-setuptools-scm)))
16311 (home-page "https://github.com/zarr-developers/numcodecs")
16312 (synopsis "Buffer compression and transformation codecs")
16314 "This Python package provides buffer compression and transformation
16315 codecs for use in data storage and communication applications.")
16316 (license license:expat)))
16318 (define-public python-asciitree
16320 (name "python-asciitree")
16325 (uri (pypi-uri "asciitree" version))
16328 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
16329 (build-system python-build-system)
16330 (home-page "https://github.com/mbr/asciitree")
16331 (synopsis "Draws ASCII trees")
16332 (description "This package draws tree structures using characters.")
16333 (license license:expat)))
16335 (define-public python-zarr
16337 (name "python-zarr")
16342 (uri (pypi-uri "zarr" version))
16345 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
16346 (build-system python-build-system)
16349 (modify-phases %standard-phases
16350 (add-after 'unpack 'disable-service-tests
16352 (setenv "ZARR_TEST_ABS" "0")
16353 (setenv "ZARR_TEST_MONGO" "0")
16354 (setenv "ZARR_TEST_REDIS" "0")
16358 (invoke "pytest" "-vv" "-k" "not lmdb")
16361 `(("python-asciitree" ,python-asciitree)
16362 ("python-fasteners" ,python-fasteners)
16363 ("python-numcodecs" ,python-numcodecs)
16364 ("python-numpy" ,python-numpy)))
16366 `(("python-pytest" ,python-pytest)
16367 ("python-setuptools-scm" ,python-setuptools-scm)))
16368 (home-page "https://github.com/zarr-developers/zarr-python")
16369 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16371 "This package provides an implementation of chunked, compressed,
16372 N-dimensional arrays for Python.")
16373 (license license:expat)))
16375 (define-public python-anndata
16377 (name "python-anndata")
16382 (uri (pypi-uri "anndata" version))
16385 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
16386 (build-system python-build-system)
16389 (modify-phases %standard-phases
16390 (add-after 'unpack 'delete-inconvenient-tests
16392 ;; This test depends on python-scikit-learn.
16393 (delete-file "anndata/tests/test_inplace_subset.py")
16396 (add-after 'install 'check
16397 (lambda* (#:key inputs outputs #:allow-other-keys)
16398 (add-installed-pythonpath inputs outputs)
16399 (invoke "pytest" "-vv"))))))
16401 `(("python-h5py" ,python-h5py)
16402 ("python-importlib-metadata" ,python-importlib-metadata)
16403 ("python-natsort" ,python-natsort)
16404 ("python-numcodecs" ,python-numcodecs)
16405 ("python-packaging" ,python-packaging)
16406 ("python-pandas" ,python-pandas)
16407 ("python-scipy" ,python-scipy)
16408 ("python-zarr" ,python-zarr)))
16410 `(("python-joblib" ,python-joblib)
16411 ("python-pytest" ,python-pytest)
16412 ("python-setuptools-scm" ,python-setuptools-scm)))
16413 (home-page "https://github.com/theislab/anndata")
16414 (synopsis "Annotated data for data analysis pipelines")
16415 (description "Anndata is a package for simple (functional) high-level APIs
16416 for data analysis pipelines. In this context, it provides an efficient,
16417 scalable way of keeping track of data together with learned annotations and
16418 reduces the code overhead typically encountered when using a mostly
16419 object-oriented library such as @code{scikit-learn}.")
16420 (license license:bsd-3)))
16422 (define-public python-dill
16424 (name "python-dill")
16425 (version "0.3.1.1")
16429 (uri (pypi-uri "dill" version))
16431 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
16432 (build-system python-build-system)
16435 (modify-phases %standard-phases
16438 (with-directory-excursion "/tmp"
16439 (invoke "nosetests" "-v"))
16442 `(("python-nose" ,python-nose)))
16443 (home-page "https://pypi.org/project/dill/")
16444 (synopsis "Serialize all of Python")
16445 (description "Dill extends Python's @code{pickle} module for serializing
16446 and de-serializing Python objects to the majority of the built-in Python
16447 types. Dill provides the user the same interface as the @code{pickle} module,
16448 and also includes some additional features. In addition to pickling Python
16449 objects, @code{dill} provides the ability to save the state of an interpreter
16450 session in a single command. Hence, it would be feasible to save a
16451 interpreter session, close the interpreter, ship the pickled file to another
16452 computer, open a new interpreter, unpickle the session and thus continue from
16453 the saved state of the original interpreter session.")
16454 (license license:bsd-3)))
16456 (define-public python-multiprocess
16458 (name "python-multiprocess")
16463 (uri (pypi-uri "multiprocess" version))
16466 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
16467 (build-system python-build-system)
16470 (modify-phases %standard-phases
16471 (add-after 'unpack 'disable-broken-tests
16473 ;; This test is broken as there is no keyboard interrupt.
16474 (substitute* "py3.7/multiprocess/tests/__init__.py"
16475 (("^(.*)def test_wait_result"
16477 (string-append indent
16478 "@unittest.skip(\"Disabled by Guix\")\n"
16481 ;; Tests must be run after installation.
16483 (add-after 'install 'check
16484 (lambda* (#:key inputs outputs #:allow-other-keys)
16485 (add-installed-pythonpath inputs outputs)
16486 (invoke "python" "-m" "multiprocess.tests")
16489 `(("python-dill" ,python-dill)))
16490 (home-page "https://pypi.org/project/multiprocess/")
16491 (synopsis "Multiprocessing and multithreading in Python")
16493 "This package is a fork of the multiprocessing Python package, a package
16494 which supports the spawning of processes using the API of the standard
16495 library's @code{threading} module.")
16496 (license license:bsd-3)))
16498 (define-public python-toolz
16500 (name "python-toolz")
16505 (uri (pypi-uri "toolz" version))
16508 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16509 (build-system python-build-system)
16510 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16511 ;; unregistered loader type"
16512 (arguments '(#:tests? #f))
16513 (home-page "https://github.com/pytoolz/toolz/")
16514 (synopsis "List processing tools and functional utilities")
16516 "This package provides a set of utility functions for iterators,
16517 functions, and dictionaries.")
16518 (license license:bsd-3)))
16520 (define-public python2-toolz
16521 (package-with-python2 python-toolz))
16523 (define-public python-cytoolz
16525 (name "python-cytoolz")
16526 (version "0.9.0.1")
16530 (uri (pypi-uri "cytoolz" version))
16533 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16534 (build-system python-build-system)
16535 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16537 (arguments '(#:tests? #f))
16539 `(("python-toolz" ,python-toolz)))
16541 `(("python-cython" ,python-cython)))
16542 (home-page "https://github.com/pytoolz/cytoolz")
16543 (synopsis "High performance functional utilities")
16545 "The cytoolz package implements the same API as provided by toolz. The
16546 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16547 that is accessible to other projects developed in Cython.")
16548 (license license:bsd-3)))
16550 (define-public python-sortedcontainers
16552 (name "python-sortedcontainers")
16557 (uri (pypi-uri "sortedcontainers" version))
16560 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
16561 (build-system python-build-system)
16563 `(("python-tox" ,python-tox)))
16564 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16565 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16567 "This package provides a sorted collections library, written in
16569 (license license:asl2.0)))
16571 (define-public python-cloudpickle
16573 (name "python-cloudpickle")
16578 (uri (pypi-uri "cloudpickle" version))
16581 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16582 (build-system python-build-system)
16583 ;; FIXME: there are 5 errors in 122 tests:
16584 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16585 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16586 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16587 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16588 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16589 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16590 (arguments '(#:tests? #f))
16592 `(("python-pytest" ,python-pytest)
16593 ("python-mock" ,python-mock)
16594 ("python-tornado" ,python-tornado)))
16595 (home-page "https://github.com/cloudpipe/cloudpickle")
16596 (synopsis "Extended pickling support for Python objects")
16598 "Cloudpickle makes it possible to serialize Python constructs not
16599 supported by the default pickle module from the Python standard library. It
16600 is especially useful for cluster computing where Python expressions are
16601 shipped over the network to execute on remote hosts, possibly close to the
16603 (license license:bsd-3)))
16605 (define-public python2-cloudpickle
16606 (package-with-python2 python-cloudpickle))
16608 (define-public python-locket
16610 (name "python-locket")
16615 (uri (pypi-uri "locket" version))
16618 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16619 (build-system python-build-system)
16620 (home-page "https://github.com/mwilliamson/locket.py")
16621 (synopsis "File-based locks for Python")
16623 "Locket implements a lock that can be used by multiple processes provided
16624 they use the same path.")
16625 (license license:bsd-2)))
16627 (define-public python2-locket
16628 (package-with-python2 python-locket))
16630 (define-public python-blosc
16632 (name "python-blosc")
16637 (uri (pypi-uri "blosc" version))
16640 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16641 (build-system python-build-system)
16642 ;; FIXME: all tests pass, but then this error is printed:
16643 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16644 (arguments '(#:tests? #f))
16646 `(("python-numpy" ,python-numpy)))
16647 (home-page "https://github.com/blosc/python-blosc")
16648 (synopsis "Python wrapper for the Blosc data compressor library")
16649 (description "Blosc is a high performance compressor optimized for binary
16650 data. It has been designed to transmit data to the processor cache faster
16651 than the traditional, non-compressed, direct memory fetch approach via a
16652 @code{memcpy()} system call.
16654 Blosc works well for compressing numerical arrays that contains data with
16655 relatively low entropy, like sparse data, time series, grids with
16656 regular-spaced values, etc.
16658 This Python package wraps the Blosc library.")
16659 (license license:bsd-3)))
16661 (define-public python2-blosc
16662 (package-with-python2 python-blosc))
16664 (define-public python-partd
16666 (name "python-partd")
16671 (uri (pypi-uri "partd" version))
16674 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16675 (build-system python-build-system)
16677 `(("python-blosc" ,python-blosc)
16678 ("python-locket" ,python-locket)
16679 ("python-numpy" ,python-numpy)
16680 ("python-pandas" ,python-pandas)
16681 ("python-pyzmq" ,python-pyzmq)
16682 ("python-toolz" ,python-toolz)))
16683 (home-page "https://github.com/dask/partd/")
16684 (synopsis "Appendable key-value storage")
16685 (description "Partd stores key-value pairs. Values are raw bytes. We
16686 append on old values. Partd excels at shuffling operations.")
16687 (license license:bsd-3)))
16689 (define-public python2-partd
16690 (package-with-python2 python-partd))
16692 (define-public python-fsspec
16694 (name "python-fsspec")
16699 (uri (pypi-uri "fsspec" version))
16702 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16703 (build-system python-build-system)
16704 (arguments '(#:tests? #f)) ; there are none
16705 (home-page "https://github.com/intake/filesystem_spec")
16706 (synopsis "File-system specification")
16707 (description "The purpose of this package is to produce a template or
16708 specification for a file-system interface, that specific implementations
16709 should follow, so that applications making use of them can rely on a common
16710 behavior and not have to worry about the specific internal implementation
16711 decisions with any given backend.")
16712 (license license:bsd-3)))
16714 (define-public python-dask
16716 (name "python-dask")
16721 (uri (pypi-uri "dask" version))
16723 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
16724 (build-system python-build-system)
16727 (modify-phases %standard-phases
16728 (add-after 'unpack 'disable-broken-tests
16730 ;; This test is marked as xfail when pytest-xdist is used.
16731 (substitute* "dask/tests/test_threaded.py"
16732 (("def test_interrupt\\(\\)" m)
16733 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16735 ;; This one fails with a type error:
16736 ;; TypeError: Already tz-aware, use tz_convert to convert.
16737 (substitute* "dask/dataframe/tests/test_shuffle.py"
16738 (("def test_set_index_timestamp\\(\\)" m)
16739 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16743 (lambda _ (invoke "pytest" "-vv"))))))
16745 `(("python-cloudpickle" ,python-cloudpickle)
16746 ("python-fsspec" ,python-fsspec)
16747 ("python-numpy" ,python-numpy)
16748 ("python-packaging" ,python-packaging)
16749 ("python-pandas" ,python-pandas)
16750 ("python-partd" ,python-partd)
16751 ("python-toolz" ,python-toolz)
16752 ("python-pyyaml" ,python-pyyaml)))
16754 `(("python-pytest" ,python-pytest)
16755 ("python-pytest-runner" ,python-pytest-runner)))
16756 (home-page "https://github.com/dask/dask/")
16757 (synopsis "Parallel computing with task scheduling")
16759 "Dask is a flexible parallel computing library for analytics. It
16760 consists of two components: dynamic task scheduling optimized for computation,
16761 and large data collections like parallel arrays, dataframes, and lists that
16762 extend common interfaces like NumPy, Pandas, or Python iterators to
16763 larger-than-memory or distributed environments. These parallel collections
16764 run on top of the dynamic task schedulers. ")
16765 (license license:bsd-3)))
16767 (define-public python-ilinkedlist
16769 (name "python-ilinkedlist")
16774 (uri (pypi-uri "ilinkedlist" version))
16777 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16778 (build-system python-build-system)
16779 (native-inputs `(("python-pytest" ,python-pytest)))
16780 (inputs `(("python" ,python)))
16781 (home-page "https://github.com/luther9/ilinkedlist-py")
16782 (synopsis "Immutable linked list library")
16784 "This is a implementation of immutable linked lists for Python. It
16785 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16786 Since a linked list is treated as immutable, it is hashable, and its length
16787 can be retrieved in constant time. Some of the terminology is inspired by
16788 LISP. It is possible to create an improper list by creating a @code{Pair}
16789 with a non-list @code{cdr}.")
16790 (license license:gpl3+)))
16792 (define-public python-readlike
16794 (name "python-readlike")
16799 (uri (pypi-uri "readlike" version))
16801 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16802 (build-system python-build-system)
16803 (home-page "https://github.com/jangler/readlike")
16804 (synopsis "GNU Readline-like line editing module")
16806 "This Python module provides line editing functions similar to the default
16807 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16808 @code{readline} package, this one allows access to those capabilties in settings
16809 outside of a standard command-line interface. It is especially well-suited to
16810 interfacing with Urwid, due to a shared syntax for describing key inputs.
16812 Currently, all stateless Readline commands are implemented. Yanking and history
16813 are not supported.")
16814 (license license:expat)))
16816 (define-public python2-readlike
16817 (package-with-python2 python-readlike))
16819 (define-public python-reparser
16821 (name "python-reparser")
16826 (uri (pypi-uri "ReParser" version))
16828 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16829 (build-system python-build-system)
16830 (home-page "https://github.com/xmikos/reparser")
16831 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16833 "This Python library provides a simple lexer/parser for inline markup based
16834 on regular expressions.")
16835 (license license:expat)))
16837 (define-public python2-reparser
16838 (let ((reparser (package-with-python2
16839 (strip-python2-variant python-reparser))))
16840 (package (inherit reparser)
16842 `(("python2-enum34" ,python2-enum34)
16843 ,@(package-propagated-inputs reparser))))))
16845 (define-public python-precis-i18n
16847 (name "python-precis-i18n")
16852 (uri (pypi-uri "precis_i18n" version))
16855 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16856 (build-system python-build-system)
16857 (home-page "https://github.com/byllyfish/precis_i18n")
16858 (synopsis "Implementation of the PRECIS framework")
16860 "This module implements the PRECIS Framework as described in RFC 8264,
16861 RFC 8265 and RFC 8266.")
16862 (license license:expat)))
16864 (define-public python-absl-py
16866 (name "python-absl-py")
16871 (uri (pypi-uri "absl-py" version))
16874 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16875 (build-system python-build-system)
16877 `(("python-six" ,python-six)))
16878 (home-page "https://github.com/abseil/abseil-py")
16879 (synopsis "Abseil Python common libraries")
16881 "This package provides the Abseil Python Common Libraries, a collection
16882 of Python libraries for building Python applications.")
16883 (license license:asl2.0)))
16885 (define-public python-astor
16887 (name "python-astor")
16892 (uri (pypi-uri "astor" version))
16895 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16896 (build-system python-build-system)
16897 ;; FIXME: There are two errors and two test failures.
16898 (arguments `(#:tests? #f))
16899 (home-page "https://github.com/berkerpeksag/astor")
16900 (synopsis "Read and write Python ASTs")
16901 (description "Astor is designed to allow easy manipulation of Python
16902 source via the Abstract Syntax Tree.")
16903 (license license:bsd-3)))
16905 (define-public python2-astor
16906 (package-with-python2 python-astor))
16908 (define-public python-grpcio
16910 (name "python-grpcio")
16915 (uri (pypi-uri "grpcio" version))
16918 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16919 (build-system python-build-system)
16921 `(("python-six" ,python-six)))
16922 (home-page "https://grpc.io")
16923 (synopsis "HTTP/2-based RPC framework")
16924 (description "This package provides a Python library for communicating
16925 with the HTTP/2-based RPC framework gRPC.")
16926 (license license:asl2.0)))
16928 (define-public python-astunparse
16930 (name "python-astunparse")
16935 (uri (pypi-uri "astunparse" version))
16937 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16938 (build-system python-build-system)
16939 (arguments '(#:tests? #f)) ; there are none
16941 `(("python-six" ,python-six)
16942 ("python-wheel" ,python-wheel)))
16943 (home-page "https://github.com/simonpercivall/astunparse")
16944 (synopsis "AST unparser for Python")
16945 (description "This package provides an AST unparser for Python. It is a
16946 factored out version of @code{unparse} found in the Python source
16948 (license license:bsd-3)))
16950 (define-public python-gast
16952 (name "python-gast")
16957 (uri (pypi-uri "gast" version))
16959 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16960 (build-system python-build-system)
16962 `(("python-astunparse" ,python-astunparse)))
16963 (home-page "https://pypi.org/project/gast/")
16964 (synopsis "Generic Python AST that abstracts the underlying Python version")
16966 "GAST provides a compatibility layer between the AST of various Python
16967 versions, as produced by @code{ast.parse} from the standard @code{ast}
16969 (license license:bsd-3)))
16971 (define-public python-wikidata
16973 (name "python-wikidata")
16978 (uri (pypi-uri "Wikidata" version))
16981 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16982 (build-system python-build-system)
16984 `(("python-babel" ,python-babel)))
16985 (home-page "https://github.com/dahlia/wikidata")
16986 (synopsis "Wikidata client library")
16988 "This package provides a Python interface to
16989 @url{https://www.wikidata.org/, Wikidata}.")
16990 (properties '((upstream-name . "Wikidata")))
16991 (license license:gpl3+)))
16993 (define-public python-doctest-ignore-unicode
16995 (name "python-doctest-ignore-unicode")
17000 (uri (pypi-uri "doctest-ignore-unicode" version))
17003 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
17004 (build-system python-build-system)
17006 `(("python-nose" ,python-nose)))
17007 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
17008 (synopsis "Ignore Unicode literal prefixes in doctests")
17010 "This package adds support for a flag to ignore Unicode literal prefixes
17012 (license license:asl2.0)))
17014 (define-public python-attr
17016 (name "python-attr")
17021 (uri (pypi-uri "attr" version))
17024 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
17025 (build-system python-build-system)
17026 (home-page "https://github.com/denis-ryzhkov/attr")
17027 (synopsis "Decorator for attributes of target function or class")
17028 (description "Simple decorator to set attributes of target function or
17029 class in a @acronym{DRY, Don't Repeat Yourself} way.")
17030 (license license:expat)))
17032 (define-public python-construct
17034 (name "python-construct")
17035 (version "2.10.56")
17039 (uri (pypi-uri "construct" version))
17042 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
17043 (build-system python-build-system)
17045 `(#:tests? #f)) ; No tests exist.
17047 `(("python-extras" ,python-extras)
17048 ("python-arrow" ,python-arrow)
17049 ("python-numpy" ,python-numpy)
17050 ("python-ruamel.yaml" ,python-ruamel.yaml)))
17051 (home-page "https://construct.readthedocs.io")
17052 (synopsis "Declarative and symmetrical parser and builder for binary data")
17054 "This package provides both simple, atomic constructs (such as
17055 integers of various sizes), as well as composite ones which allow you
17056 form hierarchical and sequential structures of increasing complexity.
17057 It features bit and byte granularity, easy debugging and testing, an
17058 easy-to-extend subclass system, and lots of primitive constructs to
17059 make your work easier.")
17060 (license license:expat)))
17062 (define-public python-humanize
17064 (name "python-humanize")
17069 (uri (pypi-uri "humanize" version))
17072 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17074 '(#:tests? #f)) ; tests not in pypi archive
17075 (build-system python-build-system)
17076 (home-page "https://github.com/jmoiron/humanize")
17077 (synopsis "Print numerical information in a human-readable form")
17078 (description "This package provides a Python module that displays numbers
17079 and dates in \"human readable\" forms. For example, it would display
17080 \"12345591313\" as \"12.3 billion\".")
17081 (license license:expat)))
17083 (define-public python-txaio
17085 (name "python-txaio")
17090 (uri (pypi-uri "txaio" version))
17093 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17094 (build-system python-build-system)
17096 `(("python-twisted" ,python-twisted)
17097 ("python-six" ,python-six)))
17098 (home-page "https://github.com/crossbario/txaio")
17099 (synopsis "Compatibility layer between Python asyncio and Twisted")
17100 (description "Txaio provides a compatibility layer between the Python
17101 @code{asyncio} module and @code{Twisted}.")
17102 (license license:expat)))
17104 (define-public python-toolshed
17106 (name "python-toolshed")
17111 (uri (pypi-uri "toolshed" version))
17114 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17115 (build-system python-build-system)
17117 `(("python-nose" ,python-nose)))
17118 (home-page "https://github.com/brentp/toolshed/")
17119 (synopsis "Collection of modules and functions for working with data")
17120 (description "This is a collection of well-tested, simple modules and
17121 functions that aim to reduce boilerplate when working with data.")
17122 (license license:bsd-2)))
17124 (define-public python-annoy
17126 (name "python-annoy")
17131 (uri (pypi-uri "annoy" version))
17134 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17135 (build-system python-build-system)
17137 `(("python-nose" ,python-nose)))
17138 (home-page "https://github.com/spotify/annoy/")
17139 (synopsis "Approximate nearest neighbors library")
17141 "Annoy is a C++ library with Python bindings to search for points in
17142 space that are close to a given query point. It also creates large read-only
17143 file-based data structures that are @code{mmap}ped into memory so that many
17144 processes may share the same data.")
17145 (license license:asl2.0)))
17147 (define-public python-pylzma
17149 (name "python-pylzma")
17154 (uri (pypi-uri "pylzma" version))
17157 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
17158 (build-system python-build-system)
17159 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
17160 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
17161 (description "This package provides Python bindings for the LZMA library
17163 (license license:lgpl2.1+)))
17165 (define-public python2-pylzma
17166 (package-with-python2 python-pylzma))
17168 (define-public python2-zeroconf
17170 (name "python2-zeroconf")
17172 ;; This is the last version that supports Python 2.x.
17177 (uri (pypi-uri "zeroconf" version))
17180 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
17181 (build-system python-build-system)
17183 `(#:python ,python-2
17185 (modify-phases %standard-phases
17186 (add-after 'unpack 'patch-requires
17187 (lambda* (#:key inputs #:allow-other-keys)
17188 (substitute* "setup.py"
17193 `(("python2-six" ,python2-six)
17194 ("python2-enum32" ,python2-enum34)
17195 ("python2-netifaces" ,python2-netifaces)
17196 ("python2-typing" ,python2-typing)))
17197 (home-page "https://github.com/jstasiak/python-zeroconf")
17198 (synopsis "Pure Python mDNS service discovery")
17200 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
17202 (license license:lgpl2.1+)))
17204 (define-public python-bsddb3
17206 (name "python-bsddb3")
17211 (uri (pypi-uri "bsddb3" version))
17214 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
17215 (build-system python-build-system)
17220 (modify-phases %standard-phases
17221 (add-after 'unpack 'configure-locations
17222 (lambda* (#:key inputs #:allow-other-keys)
17223 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
17224 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
17228 (invoke "python3" "test3.py" "-v"))))))
17229 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
17230 (synopsis "Python bindings for Oracle Berkeley DB")
17232 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
17233 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
17234 Transaction objects, and each of these is exposed as a Python type in the
17235 bsddb3.db module. The database objects can use various access methods: btree,
17236 hash, recno, and queue. Complete support of Berkeley DB distributed
17237 transactions. Complete support for Berkeley DB Replication Manager.
17238 Complete support for Berkeley DB Base Replication. Support for RPC.")
17239 (license license:bsd-3)))
17241 (define-public python-dbfread
17243 (name "python-dbfread")
17247 (uri (pypi-uri "dbfread" version))
17250 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
17251 (build-system python-build-system)
17253 `(("python-pytest" ,python-pytest)))
17254 (home-page "https://dbfread.readthedocs.io")
17255 (synopsis "Read DBF Files with Python")
17257 "This library reads DBF files and returns the data as native Python data
17258 types for further processing. It is primarily intended for batch jobs and
17260 (license license:expat)))
17262 (define-public python-cached-property
17264 (name "python-cached-property")
17269 (uri (pypi-uri "cached-property" version))
17272 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
17273 (build-system python-build-system)
17276 (modify-phases %standard-phases
17277 ;; https://github.com/pydanny/cached-property/issues/131
17278 ;; recent versions of freezegun break one test
17279 (add-after 'unpack 'disable-broken-test
17281 (substitute* "tests/test_cached_property.py"
17282 (("def test_threads_ttl_expiry\\(self\\)" m)
17283 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
17287 `(("python-freezegun" ,python-freezegun)))
17289 "https://github.com/pydanny/cached-property")
17291 "Decorator for caching properties in classes")
17293 "This package provides a decorator which makes caching
17294 time-or-computationally-expensive properties quick and easy and works in Python
17296 (license license:bsd-3)))
17298 (define-public python-folium
17300 (name "python-folium")
17305 (uri (pypi-uri "folium" version))
17308 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
17309 (build-system python-build-system)
17311 `(("python-branca" ,python-branca)
17312 ("python-jinja2" ,python-jinja2)
17313 ("python-numpy" ,python-numpy)
17314 ("python-requests" ,python-requests)))
17316 `(("python-pytest" ,python-pytest)))
17317 (home-page "https://github.com/python-visualization/folium")
17318 (synopsis "Make beautiful maps with Leaflet.js & Python")
17319 (description "@code{folium} makes it easy to visualize data that’s been
17320 manipulated in Python on an interactive leaflet map. It enables both the
17321 binding of data to a map for @code{choropleth} visualizations as well as
17322 passing rich vector/raster/HTML visualizations as markers on the map.
17324 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
17325 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
17326 supports Image, Video, GeoJSON and TopoJSON overlays.")
17327 (license license:expat)))
17329 (define-public jube
17331 ;; This is a command-line tool, so no "python-" prefix.
17336 (uri (string-append
17337 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
17341 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
17342 (file-name (string-append "jube-" version ".tar.gz"))))
17343 (build-system python-build-system)
17344 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
17345 (synopsis "Benchmarking environment")
17347 "JUBE helps perform and analyze benchmarks in a systematic way. For each
17348 benchmarked application, benchmark data is stored in a format that allows JUBE
17349 to deduct the desired information. This data can be parsed by automatic pre-
17350 and post-processing scripts that draw information and store it more densely
17351 for manual interpretation.")
17352 (license license:gpl3+)))
17354 (define-public python-pyroutelib3
17356 (name "python-pyroutelib3")
17357 (version "1.3.post1")
17361 (uri (pypi-uri "pyroutelib3" version))
17364 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17365 (build-system python-build-system)
17367 `(("python-dateutil" ,python-dateutil)))
17368 (home-page "https://github.com/MKuranowski/pyroutelib3")
17369 (synopsis "Library for simple routing on OSM data")
17370 (description "Library for simple routing on OSM data")
17371 (license license:gpl3+)))
17373 (define-public python-bibtexparser
17375 (name "python-bibtexparser")
17380 (uri (pypi-uri "bibtexparser" version))
17383 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17384 (build-system python-build-system)
17386 `(("python-pyparsing" ,python-pyparsing)))
17388 `(("python-future" ,python-future)))
17389 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17390 (synopsis "Python library to parse BibTeX files")
17391 (description "BibtexParser is a Python library to parse BibTeX files.")
17392 (license (list license:bsd-3 license:lgpl3))))
17394 (define-public python-distro
17396 (name "python-distro")
17401 (uri (pypi-uri "distro" version))
17404 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17405 (build-system python-build-system)
17407 `(("python-pytest" ,python-pytest)))
17408 (home-page "https://github.com/nir0s/distro")
17410 "OS platform information API")
17412 "@code{distro} provides information about the OS distribution it runs on,
17413 such as a reliable machine-readable ID, or version information.
17415 It is the recommended replacement for Python's original
17416 `platform.linux_distribution` function (which will be removed in Python 3.8).
17417 @code{distro} also provides a command-line interface to output the platform
17418 information in various formats.")
17419 (license license:asl2.0)))
17421 (define-public python-cairosvg
17423 (name "python-cairosvg")
17428 (uri (pypi-uri "CairoSVG" version))
17430 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17431 (build-system python-build-system)
17434 (modify-phases %standard-phases
17436 (lambda _ (invoke "pytest"))))))
17438 `(("python-cairocffi" ,python-cairocffi)
17439 ("python-cssselect2" ,python-cssselect2)
17440 ("python-defusedxml" ,python-defusedxml)
17441 ("python-pillow" ,python-pillow)
17442 ("python-tinycss2" ,python-tinycss2)))
17444 `(("python-pytest-flake8" ,python-pytest-flake8)
17445 ("python-pytest-isort" ,python-pytest-isort)
17446 ("python-pytest-runner" ,python-pytest-runner)))
17447 (home-page "https://cairosvg.org/")
17448 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17449 (description "CairoSVG is a SVG converter based on Cairo. It can export
17450 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17451 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17452 parsed, the result is drawn to a Cairo surface that can be exported to
17453 qvarious formats: PDF, PostScript, PNG and even SVG.")
17454 (license license:lgpl3+)))
17456 (define-public python-pyphen
17458 (name "python-pyphen")
17463 (uri (pypi-uri "Pyphen" version))
17465 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17466 (build-system python-build-system)
17467 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17468 ;; embedded set provided by upstream - like Debian does.
17469 (home-page "https://github.com/Kozea/Pyphen")
17470 (synopsis "Pure Python module to hyphenate text")
17471 (description "Pyphen is a pure Python module to hyphenate text using
17472 existing Hunspell hyphenation dictionaries.")
17473 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
17475 (define-public python-intelhex
17477 (name "python-intelhex")
17482 (uri (pypi-uri "intelhex" version))
17485 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17486 (build-system python-build-system)
17487 (arguments '(#:tests? #f)) ;issue with version
17488 (home-page "https://pypi.org/project/IntelHex/")
17489 (synopsis "Python library for Intel HEX files manipulations")
17490 (description "The Intel HEX file format is widely used in microprocessors
17491 and microcontrollers area (embedded systems etc.) as the de facto standard for
17492 representation of code to be programmed into microelectronic devices. This
17493 package provides an intelhex Python library to read, write, create from
17494 scratch and manipulate data from Intel HEX file format. It also includes
17495 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17496 converters and more, those based on the library itself.")
17497 (license license:bsd-3)))
17499 (define-public python-pykwalify
17501 (name "python-pykwalify")
17506 (uri (pypi-uri "pykwalify" version))
17509 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17510 (build-system python-build-system)
17511 (arguments '(#:tests? #f)) ;missing dependencies
17513 `(("python-dateutil" ,python-dateutil)
17514 ("python-docopt" ,python-docopt)
17515 ("python-pyyaml" ,python-pyyaml)))
17516 (home-page "https://github.com/grokzen/pykwalify")
17518 "Python lib/cli for JSON/YAML schema validation")
17520 "This package provides a parser, schema validator, and data binding tool
17521 for YAML and JSON.")
17522 (license license:expat)))
17524 (define-public python-dbusmock
17526 (name "python-dbusmock")
17531 (uri (pypi-uri "python-dbusmock" version))
17534 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17535 (build-system python-build-system)
17538 (modify-phases %standard-phases
17539 (add-after 'unpack 'patch-shell-path
17541 (substitute* "tests/test_code.py"
17542 (("/bin/bash") (which "bash")))
17546 ("dbus" ,dbus) ; for dbus-daemon
17547 ("python-nose" ,python-nose)
17550 `(("python-dbus" ,python-dbus)
17551 ("python-pygobject" ,python-pygobject)))
17552 (home-page "https://github.com/martinpitt/python-dbusmock")
17553 (synopsis "Python library for mock D-Bus objects")
17554 (description "python-dbusmock allows for the easy creation of mock objects on
17555 D-Bus. This is useful for writing tests for software which talks to D-Bus
17556 services such as upower, systemd, logind, gnome-session or others, and it is
17557 hard (or impossible without root privileges) to set the state of the real
17558 services to what you expect in your tests.")
17559 (license license:lgpl3+)))
17561 (define-public python-ujson
17563 (name "python-ujson")
17568 (uri (pypi-uri "ujson" version))
17571 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17572 (build-system python-build-system)
17573 (home-page "http://www.esn.me")
17575 "Ultra fast JSON encoder and decoder for Python")
17577 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17578 bindings for Python 2.5+ and 3.")
17579 (license license:bsd-3)))
17581 (define-public python2-ujson
17582 (package-with-python2 python-ujson))
17584 (define-public python-iocapture
17585 ;; The latest release is more than a year older than this commit.
17586 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17589 (name "python-iocapture")
17594 (uri (git-reference
17595 (url "https://github.com/oinume/iocapture.git")
17597 (file-name (git-file-name name version))
17600 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17601 (build-system python-build-system)
17604 (modify-phases %standard-phases
17606 (add-after 'install 'check
17607 (lambda* (#:key inputs outputs #:allow-other-keys)
17608 (add-installed-pythonpath inputs outputs)
17609 (invoke "py.test" "-v" "tests")
17612 `(("python-flexmock" ,python-flexmock)
17613 ("python-pytest" ,python-pytest)
17614 ("python-pytest-cov" ,python-pytest-cov)
17615 ("python-six" ,python-six)))
17616 (home-page "https://github.com/oinume/iocapture")
17617 (synopsis "Python capturing tool for stdout and stderr")
17619 "This package helps you to capture the standard out (stdout) and the
17620 standard error channel (stderr) in your program.")
17621 (license license:expat))))
17623 (define-public python-argh
17624 ;; There are 21 commits since the latest release containing important
17626 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17629 (name "python-argh")
17630 (version (git-version "0.26.2" revision commit))
17634 (uri (git-reference
17635 (url "https://github.com/neithere/argh.git")
17637 (file-name (git-file-name name version))
17640 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17641 (build-system python-build-system)
17643 `(("python-iocapture" ,python-iocapture)
17644 ("python-mock" ,python-mock)
17645 ("python-pytest" ,python-pytest)
17646 ("python-pytest-cov" ,python-pytest-cov)
17647 ("python-pytest-xdist" ,python-pytest-xdist)
17648 ("python-tox" ,python-tox)))
17649 (home-page "https://github.com/neithere/argh/")
17650 (synopsis "Argparse wrapper with natural syntax")
17652 "python-argh is a small library that provides several layers of
17653 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17654 always possible to declare a command with the highest possible (and least
17655 flexible) layer and then tune the behaviour with any of the lower layers
17656 including the native API of @code{python-argparse}.")
17657 (license license:lgpl3+))))
17659 (define-public python-ppft
17661 (name "python-ppft")
17662 (version "1.6.6.1")
17666 (uri (pypi-uri "ppft" version))
17669 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17670 (build-system python-build-system)
17671 (arguments '(#:tests? #f)) ; there are none
17673 `(("python-six" ,python-six)))
17674 (home-page "https://pypi.org/project/ppft/")
17675 (synopsis "Fork of Parallel Python")
17677 "This package is a fork of Parallel Python. The Parallel Python
17678 module (@code{pp}) provides an easy and efficient way to create
17679 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17680 computers and clusters. It features cross-platform portability and dynamic
17682 (license license:bsd-3)))
17684 (define-public python-pox
17686 (name "python-pox")
17691 (uri (pypi-uri "pox" version))
17694 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17695 (build-system python-build-system)
17698 (modify-phases %standard-phases
17701 (mkdir-p "/tmp/guix")
17702 (setenv "SHELL" "bash")
17703 (setenv "USERNAME" "guix")
17704 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17705 (invoke "py.test" "-vv")
17708 `(("python-pytest" ,python-pytest)
17710 (home-page "https://pypi.org/project/pox/")
17711 (synopsis "Python utilities for filesystem exploration and automated builds")
17713 "Pox provides a collection of utilities for navigating and manipulating
17714 filesystems. This module is designed to facilitate some of the low level
17715 operating system interactions that are useful when exploring a filesystem on a
17716 remote host. Pox provides Python equivalents of several shell commands such
17717 as @command{which} and @command{find}. These commands allow automated
17718 discovery of what has been installed on an operating system, and where the
17719 essential tools are located.")
17720 (license license:bsd-3)))
17722 (define-public python-pathos
17724 (name "python-pathos")
17729 (uri (pypi-uri "pathos" version))
17732 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17733 (build-system python-build-system)
17736 (modify-phases %standard-phases
17739 (setenv "PYTHONPATH"
17740 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17741 (invoke "python" "./tests/__main__.py"))))))
17743 `(("python-dill" ,python-dill)
17744 ("python-multiprocess" ,python-multiprocess)
17745 ("python-pox" ,python-pox)
17746 ("python-ppft" ,python-ppft)))
17748 `(("python-pytest" ,python-pytest)))
17749 (home-page "https://pypi.org/project/pathos/")
17751 "Parallel graph management and execution in heterogeneous computing")
17753 "Python-pathos is a framework for heterogenous computing. It provides a
17754 consistent high-level interface for configuring and launching parallel
17755 computations across heterogenous resources. Python-pathos provides configurable
17756 launchers for parallel and distributed computing, where each launcher contains
17757 the syntactic logic to configure and launch jobs in an execution environment.")
17758 (license license:bsd-3)))
17760 (define-public python-flit
17762 (name "python-flit")
17767 (uri (pypi-uri "flit" version))
17770 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17771 (build-system python-build-system)
17773 `(#:tests? #f)) ; XXX: Check requires network access.
17774 (home-page "https://flit.readthedocs.io/")
17776 "Simple packaging tool for simple packages")
17778 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17779 packages a single importable module or package at a time, using the import
17780 name as the name on PyPI. All subpackages and data files within a package
17781 are included automatically.")
17782 (license license:bsd-3)))
17784 (define-public python-pathtools
17786 (name "python-pathtools")
17791 (uri (pypi-uri "pathtools" version))
17794 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17795 (build-system python-build-system)
17797 "https://github.com/gorakhargosh/pathtools")
17798 (synopsis "Path utilities for Python")
17799 (description "Pattern matching and various utilities for file systems
17801 (license license:expat)))
17803 (define-public python-fastentrypoints
17805 (name "python-fastentrypoints")
17810 (uri (pypi-uri "fastentrypoints" version))
17813 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17814 (build-system python-build-system)
17816 "https://github.com/ninjaaron/fast-entry_points")
17818 "Makes entry_points specified in setup.py load more quickly")
17820 "Using entry_points in your setup.py makes scripts that start really
17821 slowly because it imports pkg_resources. This package allows such setup
17822 scripts to load entry points more quickly.")
17823 (license license:bsd-3)))
17825 (define-public python-funcparserlib
17827 (name "python-funcparserlib")
17832 (uri (pypi-uri "funcparserlib" version))
17835 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17837 `(("python-tox" ,python-tox)))
17840 (modify-phases %standard-phases
17843 (invoke "tox"))))))
17844 (build-system python-build-system)
17846 "https://github.com/vlasovskikh/funcparserlib")
17848 "Recursive descent parsing library based on functional combinators")
17850 "This package is a recursive descent parsing library for Python based on
17851 functional combinators. Parser combinators are just higher-order functions
17852 that take parsers as their arguments and return them as result values.")
17853 (license license:expat)))
17855 (define-public python-speg
17857 (name "python-speg")
17862 (uri (pypi-uri "speg" version ".zip"))
17864 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17866 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17868 `(("unzip" ,unzip)))
17869 (build-system python-build-system)
17870 (home-page "https://github.com/avakar/speg")
17871 (synopsis "PEG-based parser interpreter with memoization")
17872 (description "This package is a PEG-based parser and interpreter with
17874 (license license:expat)))
17876 (define-public python-cson
17878 (name "python-cson")
17883 (uri (pypi-uri "cson" version))
17885 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17886 (build-system python-build-system)
17888 `(("python-speg" ,python-speg)))
17889 (home-page "https://github.com/avakar/pycson")
17890 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17891 (description "This package is a parser for Coffeescript Object
17893 (license license:expat)))
17895 (define-public python-asynctest
17897 (name "python-asynctest")
17902 (uri (pypi-uri "asynctest" version))
17905 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17906 (build-system python-build-system)
17909 (modify-phases %standard-phases
17912 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17913 (add-after 'unpack 'disable-tests
17915 (substitute* "test/test_selector.py"
17916 ;; XXX: This test fails for unknown reason inside the build
17918 (("def test_events_watched_outside_test_are_ignored")
17919 "@unittest.skip('disabled by guix')
17920 def test_events_watched_outside_test_are_ignored")))))))
17921 (home-page "https://github.com/Martiusweb/asynctest")
17922 (synopsis "Extension of unittest for testing asyncio libraries")
17924 "The package asynctest is built on top of the standard unittest module
17925 and cuts down boilerplate code when testing libraries for asyncio.")
17926 (license license:asl2.0)))
17928 (define-public python-aionotify
17930 (name "python-aionotify")
17934 ;; Source tarball on PyPi lacks tests
17936 (uri (git-reference
17937 (url "https://github.com/rbarrois/aionotify")
17938 (commit (string-append "v" version))))
17939 (file-name (git-file-name name version))
17941 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17942 (build-system python-build-system)
17943 (native-inputs `(("python-asynctest" ,python-asynctest)))
17944 (home-page "https://github.com/rbarrois/aionotify")
17945 (synopsis "Asyncio-powered inotify library")
17947 "@code{aionotify} is a simple, asyncio-based inotify library.")
17948 (license license:bsd-3)))
17950 (define-public python-forbiddenfruit
17952 (name "python-forbiddenfruit")
17956 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17958 (uri (git-reference
17959 (url "https://github.com/clarete/forbiddenfruit")
17961 (file-name (git-file-name name version))
17963 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17964 (build-system python-build-system)
17967 (modify-phases %standard-phases
17970 (invoke "make" "SKIP_DEPS=1"))))))
17972 `(("python-nose" ,python-nose)
17973 ("python-coverage" ,python-coverage)))
17974 (home-page "https://github.com/clarete/forbiddenfruit")
17975 (synopsis "Patch python built-in objects")
17976 (description "This project allows Python code to extend built-in types.")
17977 (license (list license:gpl3+ license:expat))))
17979 (define-public python-shouldbe
17981 (name "python-shouldbe")
17986 (uri (pypi-uri "shouldbe" version))
17989 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17990 (build-system python-build-system)
17992 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17994 `(("python-nose" ,python-nose)))
17995 (home-page "https://github.com/directxman12/should_be")
17996 (synopsis "Python Assertion Helpers inspired by Shouldly")
17998 "Python Assertion Helpers inspired by Shouldly.")
17999 (license license:isc)))
18001 (define-public python-k5test
18003 (name "python-k5test")
18008 (uri (pypi-uri "k5test" version))
18011 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
18012 (build-system python-build-system)
18014 `(("python-six" ,python-six)
18015 ;; `which`, `kadmin.local` binaries called inside library
18017 ("mit-krb5" ,mit-krb5)))
18018 (native-inputs `(("mit-krb5" ,mit-krb5)))
18021 (modify-phases %standard-phases
18022 (add-after 'unpack 'patch-paths
18024 (substitute* "k5test/realm.py"
18025 (("'kadmin_local'") "'kadmin.local'")))))))
18026 (home-page "https://github.com/pythongssapi/k5test")
18027 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18029 "@code{k5test} is a library for setting up self-contained Kerberos 5
18030 environments, and running Python unit tests inside those environments. It is
18031 based on the file of the same name found alongside the MIT Kerberos 5 unit
18033 (license license:isc)))
18035 (define-public python-gssapi
18037 (name "python-gssapi")
18042 (uri (pypi-uri "gssapi" version))
18045 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
18046 (build-system python-build-system)
18048 `(("python-decorator" ,python-decorator)
18049 ("python-six" ,python-six)))
18051 `(("mit-krb5" ,mit-krb5)))
18054 `(("python-shouldbe" ,python-shouldbe)
18055 ("python-parameterized" ,python-parameterized)
18056 ("python-k5test" ,python-k5test)
18057 ("python-nose" ,python-nose)))
18058 (home-page "https://github.com/pythongssapi/python-gssapi")
18059 (synopsis "Python GSSAPI Wrapper")
18061 "Python-GSSAPI provides both low-level and high level wrappers around the
18062 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18063 also be useable with other GSSAPI mechanisms.")
18064 (license license:isc)))
18066 (define-public python-check-manifest
18068 (name "python-check-manifest")
18073 (uri (pypi-uri "check-manifest" version))
18076 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18077 (build-system python-build-system)
18079 `(("python-mock" ,python-mock)
18081 (home-page "https://github.com/mgedmin/check-manifest")
18082 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18083 (description "Python package can include a MANIFEST.in file to help with
18084 sending package files to the Python Package Index. This package checks that
18085 file to ensure it completely and accurately describes your project.")
18086 (license license:expat)))
18088 (define-public python-android-stringslib
18090 (name "python-android-stringslib")
18095 (uri (git-reference
18096 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18097 (commit (string-append "v" version))))
18098 (file-name (git-file-name name version))
18101 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18102 (build-system python-build-system)
18105 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18106 (synopsis "Android strings.xml support")
18107 (description "Android Strings Lib provides support for android's strings.xml
18108 files. These files are used to translate strings in android apps.")
18109 (license license:expat)))
18111 (define-public python-watchdog
18113 (name "python-watchdog")
18118 (uri (pypi-uri "watchdog" version))
18121 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
18122 (build-system python-build-system)
18125 (modify-phases %standard-phases
18126 (add-before 'check 'remove-failing
18128 (delete-file "tests/test_inotify_buffer.py")
18129 (delete-file "tests/test_snapshot_diff.py")
18132 `(("python-argh" ,python-argh)
18133 ("python-pathtools" ,python-pathtools)
18134 ("python-pyyaml" ,python-pyyaml)))
18136 `(("python-pytest-cov" ,python-pytest-cov)
18137 ("python-pytest-timeout" ,python-pytest-timeout)))
18138 (home-page "https://github.com/gorakhargosh/watchdog")
18139 (synopsis "Filesystem events monitoring")
18140 (description "This package provides a way to monitor filesystem events
18141 such as a file modification and trigger an action. This is similar to inotify,
18143 (license license:asl2.0)))
18145 (define-public python-wget
18147 (name "python-wget")
18152 (uri (pypi-uri "wget" version ".zip"))
18155 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
18156 (build-system python-build-system)
18157 (native-inputs `(("unzip" ,unzip)))
18158 (home-page "https://bitbucket.org/techtonik/python-wget/")
18159 (synopsis "Pure Python download utility")
18160 (description "The python-wget library provides an API to download files
18161 with features similar to the @command{wget} utility.")
18162 (license license:unlicense)))
18164 (define-public offlate
18171 (uri (git-reference
18172 (url "https://framagit.org/tyreunom/offlate")
18174 (file-name (git-file-name name version))
18177 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
18178 (build-system python-build-system)
18183 `(("python-android-stringslib" ,python-android-stringslib)
18184 ("python-dateutil" ,python-dateutil)
18185 ("python-gitlab" ,python-gitlab)
18186 ("python-lxml" ,python-lxml)
18187 ("python-polib" ,python-polib)
18188 ("python-pyenchant" ,python-pyenchant)
18189 ("python-pygit2" ,python-pygit2)
18190 ("python-pygithub" ,python-pygithub)
18191 ("python-pyqt" ,python-pyqt)
18192 ("python-requests" ,python-requests)
18193 ("python-ruamel.yaml" ,python-ruamel.yaml)
18194 ("python-translation-finder" ,python-translation-finder)
18195 ("python-watchdog" ,python-watchdog)))
18197 `(("qttools" ,qttools)))
18198 (home-page "https://framagit.org/tyreunom/offlate")
18199 (synopsis "Offline translation interface for online translation tools")
18200 (description "Offlate offers a unified interface for different translation
18201 file formats, as well as many different online translation platforms. You can
18202 use it to get work from online platforms, specialized such as the Translation
18203 Project, or not such a gitlab instance when your upstream doesn't use any
18204 dedicated platform. The tool proposes a unified interface for any format and
18205 an upload option to send your work back to the platform.")
18206 (license license:gpl3+)))
18208 (define-public python-pypng
18210 (name "python-pypng")
18215 (uri (pypi-uri "pypng" version))
18217 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
18218 (build-system python-build-system)
18219 (home-page "https://github.com/drj11/pypng")
18220 (synopsis "Pure Python PNG image encoder/decoder")
18222 "The PyPNG module implements support for PNG images. It reads and writes
18223 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
18224 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
18225 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
18226 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
18227 A number of optional chunks can be specified (when writing) and
18228 understood (when reading): tRNS, bKGD, gAMA.
18230 PyPNG is not a high level toolkit for image processing (like PIL) and does not
18231 aim at being a replacement or competitor. Its strength lies in fine-grained
18232 extensive support of PNG features. It can also read and write Netpbm PAM
18233 files, with a focus on its use as an intermediate format for implementing
18234 custom PNG processing.")
18235 (license license:expat)))
18237 (define-public python-fuzzywuzzy
18239 (name "python-fuzzywuzzy")
18244 (uri (pypi-uri "fuzzywuzzy" version))
18247 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
18248 (build-system python-build-system)
18250 `(("python-hypothesis" ,python-hypothesis)
18251 ("python-pycodestyle" ,python-pycodestyle)
18252 ("python-pytest" ,python-pytest)))
18254 `(("python-levenshtein" ,python-levenshtein)))
18255 (home-page "https://github.com/seatgeek/fuzzywuzzy")
18256 (synopsis "Fuzzy string matching in Python")
18257 (description "Approximate string matching using
18258 @emph{Levenshtein Distance} to calculate the differences between
18260 (license license:gpl2)))
18262 (define-public python2-fuzzywuzzy
18263 (package-with-python2 python-fuzzywuzzy))