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, 2020 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 Nikita <nikita@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, 2020 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, 2020 Guillaume Le Vaillant <glv@posteo.net>
63 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
64 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
65 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
66 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
67 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
68 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
69 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
70 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
71 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
72 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
73 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
74 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
75 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
76 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
77 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
78 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
79 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
80 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
81 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
82 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
83 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
84 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
85 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
86 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
87 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
88 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
89 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
90 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
91 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; This file is part of GNU Guix.
95 ;;; GNU Guix is free software; you can redistribute it and/or modify it
96 ;;; under the terms of the GNU General Public License as published by
97 ;;; the Free Software Foundation; either version 3 of the License, or (at
98 ;;; your option) any later version.
100 ;;; GNU Guix is distributed in the hope that it will be useful, but
101 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
102 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
103 ;;; GNU General Public License for more details.
105 ;;; You should have received a copy of the GNU General Public License
106 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
108 (define-module (gnu packages python-xyz)
109 #:use-module ((guix licenses) #:prefix license:)
110 #:use-module (gnu packages)
111 #:use-module (gnu packages algebra)
112 #:use-module (gnu packages adns)
113 #:use-module (gnu packages aidc)
114 #:use-module (gnu packages attr)
115 #:use-module (gnu packages backup)
116 #:use-module (gnu packages bash)
117 #:use-module (gnu packages check)
118 #:use-module (gnu packages cmake)
119 #:use-module (gnu packages compression)
120 #:use-module (gnu packages crypto)
121 #:use-module (gnu packages databases)
122 #:use-module (gnu packages dbm)
123 #:use-module (gnu packages enchant)
124 #:use-module (gnu packages file)
125 #:use-module (gnu packages fontutils)
126 #:use-module (gnu packages gcc)
127 #:use-module (gnu packages geo)
128 #:use-module (gnu packages ghostscript)
129 #:use-module (gnu packages gl)
130 #:use-module (gnu packages glib)
131 #:use-module (gnu packages gnome)
132 #:use-module (gnu packages gnupg)
133 #:use-module (gnu packages graphviz)
134 #:use-module (gnu packages graphics)
135 #:use-module (gnu packages gsasl)
136 #:use-module (gnu packages gstreamer)
137 #:use-module (gnu packages gtk)
138 #:use-module (gnu packages haskell-xyz)
139 #:use-module (gnu packages icu4c)
140 #:use-module (gnu packages image)
141 #:use-module (gnu packages imagemagick)
142 #:use-module (gnu packages kerberos)
143 #:use-module (gnu packages libevent)
144 #:use-module (gnu packages libffi)
145 #:use-module (gnu packages libidn)
146 #:use-module (gnu packages linux)
147 #:use-module (gnu packages llvm)
148 #:use-module (gnu packages man)
149 #:use-module (gnu packages maths)
150 #:use-module (gnu packages monitoring)
151 #:use-module (gnu packages multiprecision)
152 #:use-module (gnu packages networking)
153 #:use-module (gnu packages ncurses)
154 #:use-module (gnu packages openstack)
155 #:use-module (gnu packages pcre)
156 #:use-module (gnu packages perl)
157 #:use-module (gnu packages photo)
158 #:use-module (gnu packages pkg-config)
159 #:use-module (gnu packages python)
160 #:use-module (gnu packages python-check)
161 #:use-module (gnu packages python-compression)
162 #:use-module (gnu packages python-crypto)
163 #:use-module (gnu packages python-science)
164 #:use-module (gnu packages python-web)
165 #:use-module (gnu packages qt)
166 #:use-module (gnu packages readline)
167 #:use-module (gnu packages sdl)
168 #:use-module (gnu packages search)
169 #:use-module (gnu packages shells)
170 #:use-module (gnu packages sphinx)
171 #:use-module (gnu packages ssh)
172 #:use-module (gnu packages terminals)
173 #:use-module (gnu packages tex)
174 #:use-module (gnu packages texinfo)
175 #:use-module (gnu packages textutils)
176 #:use-module (gnu packages time)
177 #:use-module (gnu packages tls)
178 #:use-module (gnu packages version-control)
179 #:use-module (gnu packages video)
180 #:use-module (gnu packages web)
181 #:use-module (gnu packages base)
182 #:use-module (gnu packages xml)
183 #:use-module (gnu packages xorg)
184 #:use-module (gnu packages xdisorg)
185 #:use-module (gnu packages tcl)
186 #:use-module (gnu packages bdw-gc)
187 #:use-module (gnu packages serialization)
188 #:use-module (guix packages)
189 #:use-module (guix download)
190 #:use-module (guix git-download)
191 #:use-module (guix hg-download)
192 #:use-module (guix utils)
193 #:use-module (guix build-system gnu)
194 #:use-module (guix build-system cmake)
195 #:use-module (guix build-system python)
196 #:use-module (guix build-system trivial)
197 #:use-module (srfi srfi-1)
198 #:use-module (srfi srfi-26))
200 (define-public python-slixmpp
202 (name "python-slixmpp")
209 (url "https://lab.louiz.org/poezio/slixmpp.git")
211 (string-append "slix-" version))))
213 (git-file-name name version))
215 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
216 (build-system python-build-system)
219 (modify-phases %standard-phases
220 (add-after 'unpack 'patch
222 (substitute* "setup.py"
227 `(("cython" ,python-cython)
229 ("pkg-config" ,pkg-config)))
231 `(("python-aiodns" ,python-aiodns)
232 ("python-aiohttp" ,python-aiohttp)
233 ("python-pyasn1" ,python-pyasn1)
234 ("python-pyasn1-modules" ,python-pyasn1-modules)))
237 ("python" ,python))) ; We are building a Python extension.
238 (synopsis "XMPP library without threads")
239 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
240 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
241 socket handling, the timers, the events dispatching) in order to remove all
243 (home-page "https://lab.louiz.org/poezio/slixmpp")
244 (license license:expat)))
246 (define-public python-tenacity
248 (name "python-tenacity")
252 (uri (pypi-uri "tenacity" version))
255 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
256 (build-system python-build-system)
258 `(("python-setuptools-scm" ,python-setuptools-scm)
259 ("python-sphinx" ,python-sphinx)
260 ("python-tornado" ,python-tornado)
261 ("python-pytest" ,python-pytest)))
263 `(("python-six" ,python-six)))
265 `(#:phases (modify-phases %standard-phases
270 (home-page "https://github.com/jd/tenacity")
271 (synopsis "Retrying library for python")
272 (description "Tenacity is a general-purpose python library to simplify the
273 task of adding retry behavior to just about anything.")
274 (license license:asl2.0)))
276 (define-public python-colorlog
278 (name "python-colorlog")
282 (uri (pypi-uri "colorlog" version))
285 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
286 (build-system python-build-system)
288 `(("python-pytest" ,python-pytest)))
290 `(#:phases (modify-phases %standard-phases
293 ;; Extend PYTHONPATH so the built package will be found.
295 (string-append (getcwd) "/build/lib:"
296 (getenv "PYTHONPATH")))
297 (invoke "pytest" "-p" "no:logging")
299 (home-page "https://github.com/borntyping/python-colorlog")
300 (synopsis "Log formatting with colors for python")
301 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
302 with Python's logging module that outputs records using terminal colors.")
303 (license license:expat)))
305 (define-public python-pyprind
307 (name "python-pyprind")
311 (uri (pypi-uri "PyPrind" version))
314 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
315 (build-system python-build-system)
317 `(("python-psutil" ,python-psutil)))
318 (home-page "https://github.com/rasbt/pyprind")
319 (synopsis "Python Progress Bar and Percent Indicator Utility")
320 (description "The PyPrind (Python Progress Indicator) module provides a
321 progress bar and a percentage indicator object that let you track the progress
322 of a loop structure or other iterative computation.")
323 (license license:bsd-3)))
325 (define-public python-gphoto2
327 (name "python-gphoto2")
331 (uri (pypi-uri "gphoto2" version))
334 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
335 (build-system python-build-system)
337 `(("pkg-config" ,pkg-config)))
339 `(("libgphoto2" ,libgphoto2)))
340 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
341 (synopsis "Python interface to libgphoto2")
342 (description "@code{python-gphoto2} is a comprehensive Python interface
343 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
344 automatically generate the interface code.")
345 (license license:gpl3+)))
347 (define-public python-colour
349 (name "python-colour")
353 (uri (pypi-uri "colour" version))
356 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
357 (build-system python-build-system)
359 `(("python-d2to1" ,python-d2to1)))
360 (home-page "https://github.com/vaab/colour")
361 (synopsis "Convert and manipulate various color representations")
362 (description "Pythonic way to manipulate color representations (HSL, RVB,
364 (license license:expat)))
366 (define-public python-d2to1
368 (name "python-d2to1")
369 (version "0.2.12.post1")
372 (uri (pypi-uri "d2to1" version))
375 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
376 (build-system python-build-system)
378 `(("python-nose" ,python-nose)))
379 (home-page "https://github.com/embray/d2to1")
380 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
382 (description "The python package d2to1 (the d is for distutils) allows
383 using distutils2-like setup.cfg files for a package's metadata with a
384 distribute/setuptools setup.py script.")
385 (license license:bsd-2)))
387 (define-public python-rawkit
389 (name "python-rawkit")
393 (uri (pypi-uri "rawkit" version))
396 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
397 (build-system python-build-system)
399 `(("python-pytest" ,python-pytest)
400 ("python-mock" ,python-mock)))
402 `(("libraw" ,libraw)))
403 (home-page "https://rawkit.readthedocs.io")
404 (synopsis "Ctypes-based LibRaw binding for Python")
405 (description "The rawkit package provides two modules: rawkit and libraw.
406 The rawkit module provides a high-level Pythonic interface for developing raw
407 photos, while the libraw module provides a CTypes based interface for
408 interacting with the low-level LibRaw C APIs.")
409 (license license:expat)))
411 (define-public python-easygui
413 (name "python-easygui")
417 (uri (pypi-uri "easygui" version))
420 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
421 (build-system python-build-system)
423 `(("python-tkinter" ,python "tk")))
424 (home-page "https://github.com/robertlugg/easygui")
425 (synopsis "GUI programming module for Python")
426 (description "EasyGUI is a module for very simple, very easy GUI
427 programming in Python. EasyGUI is different from other GUI generators in that
428 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
429 simple function calls.")
430 (license license:bsd-3)))
432 (define-public python-pymediainfo
434 (name "python-pymediainfo")
439 (uri (pypi-uri "pymediainfo" version))
442 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
443 (build-system python-build-system)
445 `(("python-setuptools-scm" ,python-setuptools-scm)
446 ("python-pytest" ,python-pytest)))
448 `(("libmediainfo" ,libmediainfo)))
451 (modify-phases %standard-phases
452 (add-after 'unpack 'patch-libmediainfo
454 (substitute* "pymediainfo/__init__.py"
455 (("libmediainfo.so.0")
456 (string-append (assoc-ref %build-inputs "libmediainfo")
457 "/lib/libmediainfo.so.0")))
461 ;; Extend PYTHONPATH so the built package will be found.
463 (string-append (getcwd) "/build/lib:"
464 (getenv "PYTHONPATH")))
465 ;; Skip the only failing test "test_parse_url"
466 (invoke "pytest" "-vv" "-k" "not test_parse_url")
469 "https://github.com/sbraz/pymediainfo")
471 "Python wrapper for the mediainfo library")
473 "Python wrapper for the mediainfo library to access the technical and tag
474 data for video and audio files.")
475 (license license:expat)))
477 (define-public python-psutil
479 (name "python-psutil")
484 (uri (pypi-uri "psutil" version))
486 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
487 (build-system python-build-system)
489 ;; FIXME: some tests do not return and time out. Some tests fail because
490 ;; some processes survive kill().
492 (home-page "https://www.github.com/giampaolo/psutil")
493 (synopsis "Library for retrieving information on running processes")
495 "psutil (Python system and process utilities) is a library for retrieving
496 information on running processes and system utilization (CPU, memory, disks,
497 network) in Python. It is useful mainly for system monitoring, profiling and
498 limiting process resources and management of running processes. It implements
499 many functionalities offered by command line tools such as: ps, top, lsof,
500 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
501 pidof, tty, taskset, pmap.")
502 (properties `((python2-variant . ,(delay python2-psutil))))
503 (license license:bsd-3)))
505 (define-public python2-psutil
506 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
510 `(("python2-enum34" ,python2-enum34) ;optional
511 ,@(package-propagated-inputs base))))))
513 (define-public python-shapely
515 (name "python-shapely")
520 (uri (pypi-uri "Shapely" version))
523 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
524 (modules '((guix build utils)))
527 (delete-file "shapely/speedups/_speedups.c")
528 (delete-file "shapely/vectorized/_vectorized.c")
530 (build-system python-build-system)
532 `(("python-cython" ,python-cython)
533 ("python-matplotlib" ,python-matplotlib)
534 ("python-pytest" ,python-pytest)
535 ("python-pytest-cov" ,python-pytest-cov)))
539 `(("python-numpy" ,python-numpy)))
542 (modify-phases %standard-phases
543 (add-after 'unpack 'patch-geos-path
544 (lambda* (#:key inputs #:allow-other-keys)
545 (let ((geos (assoc-ref inputs "geos"))
546 (glibc (assoc-ref inputs ,(if (%current-target-system)
547 "cross-libc" "libc"))))
548 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
549 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
550 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
551 geos "/lib/libgeos_c.so'])"))
552 (("free = load_dll\\('c'\\)\\.free")
553 (string-append "free = load_dll('c', fallbacks=['"
554 glibc "/lib/libc.so.6']).free"))
555 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
556 (string-append "free = load_dll('c', fallbacks=['"
557 glibc "/lib/libc.so.6']).free"))))
559 (home-page "https://github.com/Toblerity/Shapely")
560 (synopsis "Library for the manipulation and analysis of geometric objects")
561 (description "Shapely is a Python package for manipulation and analysis of
562 planar geometric objects. It is based on the @code{GEOS} library.")
563 (license license:bsd-3)))
565 (define-public python-shortuuid
567 (name "python-shortuuid")
572 (uri (pypi-uri "shortuuid" version))
575 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
576 (build-system python-build-system)
578 `(("python-pep8" ,python-pep8)))
579 (home-page "https://github.com/skorokithakis/shortuuid")
580 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
582 "@code{shortuuid} is a Python library for generating concise, unambiguous
583 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
584 module and then similar looking characters are removed.")
585 (license license:bsd-3)))
587 (define-public python-logwrap
589 (name "python-logwrap")
594 (uri (pypi-uri "logwrap" version ".zip"))
597 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
598 (build-system python-build-system)
600 `(("python-six" ,python-six)
601 ("python-typing" ,python-typing)))
604 ("python-cython" ,python-cython)
605 ("python-pytest" ,python-pytest)
606 ("python-pytest-cov" ,python-pytest-cov)
607 ("python-pytest-runner" ,python-pytest-runner)))
608 (home-page "https://github.com/penguinolog/logwrap")
609 (synopsis "Decorator for logging function arguments")
610 (description "This package provides a decorator to log function arguments
611 and function call return values in a human-readable way.")
612 (license license:asl2.0)))
614 (define-public python2-shapely
615 (package-with-python2 python-shapely))
617 (define-public python-clyent
619 (name "python-clyent")
624 (uri (pypi-uri "clyent" version))
627 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
628 (build-system python-build-system)
630 `(("python-mock" ,python-mock)))
631 (home-page "https://github.com/Anaconda-Platform/clyent")
632 (synopsis "Command line client library")
633 (description "Clyent is a Python command line utility library. It is used
634 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
635 (license license:bsd-3)))
637 (define-public python2-clyent
638 (package-with-python2 python-clyent))
640 (define-public python-babel
642 (name "python-babel")
647 (uri (pypi-uri "Babel" version))
650 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
651 (build-system python-build-system)
653 `(("python-freezegun" ,python-freezegun)
654 ("python-pytest" ,python-pytest)))
656 `(("python-pytz" ,python-pytz)))
658 `(#:phases (modify-phases %standard-phases
661 (invoke "pytest" "-vv" "-k"
663 ;; XXX: These tests fail when using Pytest 4.x and
664 ;; Babel 2.6.0. Try removing this for later versions.
665 "not test_no_inherit_metazone_marker_never_in_output"
666 " and not test_smoke_dates"
667 " and not test_smoke_numbers")))))))
668 (home-page "http://babel.pocoo.org/")
670 "Tools for internationalizing Python applications")
672 "Babel is composed of two major parts:
673 - tools to build and work with gettext message catalogs
674 - a Python interface to the CLDR (Common Locale Data Repository), providing
675 access to various locale display names, localized number and date formatting,
677 (license license:bsd-3)))
679 (define-public python2-babel
680 (package-with-python2 python-babel))
682 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
683 (define-public python2-babel-2.6
685 (inherit python2-babel)
689 (uri (pypi-uri "Babel" version))
692 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
694 (define-public python2-backport-ssl-match-hostname
696 (name "python2-backport-ssl-match-hostname")
701 (uri (pypi-uri "backports.ssl_match_hostname" version))
704 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
705 (build-system python-build-system)
708 #:tests? #f)) ; no test target
709 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
710 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
712 "This backport brings the ssl.match_hostname() function to users of
713 earlier versions of Python. The function checks the hostname in the
714 certificate returned by the server to which a connection has been established,
715 and verifies that it matches the intended target hostname.")
716 (license license:psfl)))
718 (define-public python-bitarray
720 (name "python-bitarray")
724 (uri (pypi-uri "bitarray" version))
727 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
728 (build-system python-build-system)
729 (home-page "https://github.com/ilanschnell/bitarray")
730 (synopsis "Efficient arrays of booleans")
731 (description "This package provides an object type which efficiently
732 represents an array of booleans. Bitarrays are sequence types and behave very
733 much like usual lists. Eight bits are represented by one byte in a contiguous
734 block of memory. The user can select between two representations:
735 little-endian and big-endian. All of the functionality is implemented in C.
736 Methods for accessing the machine representation are provided. This can be
737 useful when bit level access to binary files is required, such as portable
738 bitmap image files. Also, when dealing with compressed data which uses
739 variable bit length encoding, you may find this module useful.")
740 (license license:psfl)))
742 (define-public python-boolean.py
744 (name "python-boolean.py")
748 ;; There's no source tarball on PyPI.
751 (url "https://github.com/bastikr/boolean.py")
752 (commit (string-append "v" version))))
753 (file-name (git-file-name name version))
755 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
756 (build-system python-build-system)
757 (home-page "https://github.com/bastikr/boolean.py")
758 (synopsis "Boolean algebra in one Python module")
760 "This is a small Python library that implements boolean algebra.
761 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
762 @code{Symbol} class that can take on one of these two values. Calculations
763 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
764 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
765 Expressions are constructed from parsed strings or directly in Python.")
766 (license license:bsd-2)))
768 (define-public python-hdf4
775 (uri (pypi-uri name version))
778 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
779 (build-system python-build-system)
780 (native-inputs `(("nose" ,python-nose)))
781 (propagated-inputs `(("numpy" ,python-numpy)))
784 ("libjpeg" ,libjpeg-turbo)
788 (modify-phases %standard-phases
791 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
792 ;; on to import numpy. Somehow this works on their CI system.
793 ;; Let's just manage PYTHONPATH here instead.
794 (substitute* "runexamples.sh"
795 (("export PYTHONPATH=.*") ""))
797 (string-append (getcwd) ":"
798 (getenv "PYTHONPATH")))
799 (invoke "./runexamples.sh")
800 (invoke "nosetests" "-v"))))))
801 (home-page "https://github.com/fhs/python-hdf4")
802 (synopsis "Python interface to the NCSA HDF4 library")
804 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
805 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
806 NetCDF files can also be read and modified. Python-HDF4 is a fork of
807 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
808 (license license:expat)))
810 (define-public python2-hdf4
811 (package-with-python2 python-hdf4))
813 (define-public python-h5py
820 (uri (pypi-uri "h5py" version))
823 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
824 (build-system python-build-system)
826 `(#:tests? #f ; no test target
828 (modify-phases %standard-phases
829 (add-after 'unpack 'fix-hdf5-paths
830 (lambda* (#:key inputs #:allow-other-keys)
831 (let ((prefix (assoc-ref inputs "hdf5")))
832 (substitute* "setup_build.py"
833 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
834 (string-append "['" prefix "/lib" "']"))
835 (("'/opt/local/include', '/usr/local/include'")
836 (string-append "'" prefix "/include" "'")))
837 (substitute* "setup_configure.py"
838 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
839 (string-append "['" prefix "/lib" "']")))
842 `(("python-six" ,python-six)
843 ("python-numpy" ,python-numpy)))
845 `(("hdf5" ,hdf5-1.10)))
847 `(("python-cython" ,python-cython)
848 ("python-pkgconfig" ,python-pkgconfig)
849 ("pkg-config" ,pkg-config)))
850 (home-page "https://www.h5py.org/")
851 (synopsis "Read and write HDF5 files from Python")
853 "The h5py package provides both a high- and low-level interface to the
854 HDF5 library from Python. The low-level interface is intended to be a
855 complete wrapping of the HDF5 API, while the high-level component supports
856 access to HDF5 files, datasets and groups using established Python and NumPy
858 (license license:bsd-3)))
860 (define-public python2-h5py
861 (package-with-python2 python-h5py))
863 (define-public python-sh
870 (uri (pypi-uri "sh" version))
873 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
874 (build-system python-build-system)
877 (modify-phases %standard-phases
880 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
881 (setenv "HOME" "/tmp")
882 (invoke "python" "sh.py" "test"))))))
884 `(("python-coverage" ,python-coverage)))
885 (home-page "https://github.com/amoffat/sh")
886 (synopsis "Python subprocess replacement")
887 (description "This package provides a replacement for Python's
888 @code{subprocess} feature.")
889 (license license:expat)))
891 (define-public python2-sh
892 (package-with-python2 python-sh))
894 (define-public python-cftime
896 (name "python-cftime")
901 (uri (pypi-uri "cftime" version))
903 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
904 (build-system python-build-system)
906 `(("python-numpy" ,python-numpy)))
908 `(("python-coveralls" ,python-coveralls)
909 ("python-cython" ,python-cython)
910 ("python-pytest-cov" ,python-pytest-cov)))
911 (home-page "https://github.com/Unidata/cftime")
912 (synopsis "Library for time handling")
914 "This package provides time-handling functionality that used to be part
915 of the netcdf4 package before.")
916 ;; This package claims to include code under the GPLv3 but is released
918 (license (list license:isc license:gpl3+))))
920 (define-public python-netcdf4
922 (name "python-netcdf4")
927 (uri (pypi-uri "netCDF4" version))
930 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
931 (build-system python-build-system)
934 (modify-phases %standard-phases
935 (add-after 'unpack 'configure-locations
936 (lambda* (#:key inputs #:allow-other-keys)
937 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
940 `(("python-cython" ,python-cython)))
942 `(("python-numpy" ,python-numpy)
943 ("python-cftime" ,python-cftime)))
948 (home-page "https://github.com/Unidata/netcdf4-python")
949 (synopsis "Python/numpy interface to the netCDF library")
950 (description "Netcdf4-python is a Python interface to the netCDF C
951 library. netCDF version 4 has many features not found in earlier
952 versions of the library and is implemented on top of HDF5. This module
953 can read and write files in both the new netCDF 4 and the old netCDF 3
954 format, and can create files that are readable by HDF5 clients. The
955 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
956 to users of that module.")
957 ;; The software is mainly ISC, but includes some files covered
958 ;; by the Expat license.
959 (license (list license:isc license:expat))))
961 (define-public python-license-expression
963 (name "python-license-expression")
968 (uri (pypi-uri "license-expression" version))
970 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
971 (build-system python-build-system)
973 `(("python-boolean.py" ,python-boolean.py)))
974 (home-page "https://github.com/nexB/license-expression")
975 (synopsis "Apply boolean logic to license expressions")
977 "This Python module defines a tiny language to evaluate and compare
978 license expressions using boolean logic. Logical combinations of licenses can
979 be tested for equality, containment, and equivalence. They can be normalised
980 and simplified. It supports SPDX license expressions as well as other naming
981 conventions and aliases in the same expression.")
982 (license license:gpl2+)))
984 (define-public python-lockfile
986 (name "python-lockfile")
991 (uri (pypi-uri "lockfile" version))
994 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
995 (build-system python-build-system)
996 (arguments '(#:test-target "check"))
998 `(("python-pbr" ,python-pbr)))
999 (home-page "https://launchpad.net/pylockfile")
1000 (synopsis "Platform-independent file locking module")
1002 "The lockfile package exports a LockFile class which provides a simple
1003 API for locking files.")
1004 (license license:expat)))
1006 (define-public python2-lockfile
1007 (package-with-python2 python-lockfile))
1009 (define-public python-filelock
1011 (name "python-filelock")
1016 (uri (pypi-uri "filelock" version))
1019 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1020 (build-system python-build-system)
1022 "https://github.com/benediktschmitt/py-filelock")
1023 (synopsis "Platform independent file lock")
1024 (description "@code{filelock} contains a single module implementing
1025 a platform independent file lock in Python, which provides a simple way of
1026 inter-process communication.")
1027 (license license:unlicense)))
1029 (define-public python-semantic-version
1031 (name "python-semantic-version")
1036 (uri (pypi-uri "semantic_version" version))
1039 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1040 (build-system python-build-system)
1042 `(#:tests? #f)) ; PyPI tarball lacks tests
1043 (home-page "https://github.com/rbarrois/python-semanticversion")
1044 (synopsis "Semantic versioning module for Python")
1046 "The @code{semantic_version} class is a small library for handling
1047 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1049 It can compare versions, generate a new version that represents a bump in one of
1050 the version levels, and check whether any given string is a proper semantic
1051 version identifier.")
1052 (license license:bsd-3)))
1054 (define-public python2-semantic-version
1055 (package-with-python2 python-semantic-version))
1057 (define-public python-serpent
1059 (name "python-serpent")
1064 (uri (pypi-uri "serpent" version))
1066 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1067 (build-system python-build-system)
1069 `(("python-attrs" ,python-attrs)
1070 ("python-pytz" ,python-pytz)))
1071 (home-page "https://github.com/irmen/Serpent")
1072 (synopsis "Serializer for literal Python expressions")
1074 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1075 serialization. It serializes an object tree into bytes (an utf-8 encoded
1076 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1077 to rebuild the original object tree.
1079 Because only safe literals are encoded, it is safe to send serpent data to
1080 other machines, such as over the network.")
1081 (properties `((python2-variant . ,(delay python2-serpent))))
1082 (license license:expat)))
1084 (define-public python2-serpent
1085 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1089 `(("python-enum34" ,python2-enum34)
1090 ,@(package-propagated-inputs base))))))
1092 (define-public python-setuptools
1094 (name "python-setuptools")
1099 (uri (pypi-uri "setuptools" version ".zip"))
1102 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1103 (modules '((guix build utils)))
1106 ;; Remove included binaries which are used to build self-extracting
1107 ;; installers for Windows.
1108 ;; TODO: Find some way to build them ourself so we can include them.
1109 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1111 (build-system python-build-system)
1112 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1113 ;; One could bootstrap with an internal untested setuptools.
1116 (home-page "https://pypi.org/project/setuptools/")
1118 "Library designed to facilitate packaging Python projects")
1120 "Setuptools is a fully-featured, stable library designed to facilitate
1121 packaging Python projects, where packaging includes:
1122 Python package and module definitions,
1123 distribution package metadata,
1125 project installation,
1126 platform-specific details,
1128 ;; TODO: setuptools now bundles the following libraries:
1129 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1130 (license (list license:psfl ; setuptools itself
1131 license:expat ; six, appdirs, pyparsing
1132 license:asl2.0 ; packaging is dual ASL2/BSD-2
1135 (define-public python2-setuptools
1136 (package-with-python2 python-setuptools))
1138 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1139 (define-public python-setuptools-for-tensorflow
1142 (inherit python-setuptools)
1145 (inherit (package-source python-setuptools))
1146 (uri (pypi-uri "setuptools" version ".zip"))
1149 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1151 (define-public python-uniseg
1153 (name "python-uniseg")
1158 (uri (pypi-uri "uniseg" version ".zip"))
1161 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1162 (build-system python-build-system)
1164 '(#:tests? #f)) ; The test suite requires network access.
1166 `(("unzip" ,unzip)))
1168 "https://bitbucket.org/emptypage/uniseg-python")
1170 "Python library to determine Unicode text segmentations")
1172 "Uniseg is a Python package used to determine Unicode text segmentations.
1173 Supported segmentations include:
1175 @item @dfn{Code point} (any value in the Unicode codespace)
1176 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1177 multiple Unicode code points, e.g. \"G\" + acute-accent)
1179 @item Sentence break
1182 (license license:expat)))
1184 (define-public python2-uniseg
1185 (package-with-python2 python-uniseg))
1187 (define-public python-humanfriendly
1189 (name "python-humanfriendly")
1194 (uri (pypi-uri "humanfriendly" version))
1197 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1198 (build-system python-build-system)
1200 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1202 (home-page "https://humanfriendly.readthedocs.io")
1203 (synopsis "Human-friendly input and output in Python")
1205 "The functions and classes in @code{humanfriendly} can be used to make
1206 text interfaces more user-friendly. It includes tools to parse and format
1207 numbers, file sizes, and timespans, timers for long-running operations, menus
1208 to allow the user to choose from a list of options, and terminal interaction
1210 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1211 (license license:expat)))
1213 (define-public python2-humanfriendly
1214 (let ((base (package-with-python2
1215 (strip-python2-variant python-humanfriendly))))
1216 (package (inherit base)
1218 `(("python2-monotonic" ,python2-monotonic)
1219 ,@(package-propagated-inputs base))))))
1221 (define-public python-textparser
1223 (name "python-textparser")
1228 (uri (pypi-uri "textparser" version))
1231 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1232 (build-system python-build-system)
1233 (home-page "https://github.com/eerimoq/textparser")
1234 (synopsis "Fast text parser for Python")
1235 (description "This library provides a text parser written in the Python
1236 language. It aims to be fast.")
1237 (license license:expat)))
1239 (define-public python-aenum
1241 (name "python-aenum")
1246 (uri (pypi-uri "aenum" version))
1248 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1249 (build-system python-build-system)
1251 `(#:phases (modify-phases %standard-phases
1254 (format #t "current working dir ~s~%" (getcwd))
1255 (setenv "PYTHONPATH"
1256 (string-append ".:" (getenv "PYTHONPATH")))
1257 ;; We must run the test suite module directly, as it
1258 ;; fails to define the 'tempdir' variable in scope for
1259 ;; the tests otherwise
1260 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1261 ;; issues/32/running-tests-with-python-setuppy-test).
1262 (invoke "python3" "aenum/test.py")
1263 ;; This one fails with "NameError: name
1264 ;; 'test_pickle_dump_load' is not defined" (see:
1265 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1266 ;; /error-running-the-test_v3py-test-suite).
1267 ;; (invoke "python3" "aenum/test_v3.py")
1269 (home-page "https://bitbucket.org/stoneleaf/aenum")
1270 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1271 (description "The aenum library includes an @code{Enum} base class, a
1272 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1274 (license license:bsd-3)))
1276 (define-public python-can
1283 (uri (pypi-uri "python-can" version))
1286 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1287 (build-system python-build-system)
1289 `(#:phases (modify-phases %standard-phases
1290 (add-after 'unpack 'relax-version-requirements
1292 (substitute* "setup.py"
1293 (("mock~=2\\.0") "mock")
1294 (("coverage<5") "coverage")
1295 (("pytest~=4\\.3") "pytest")
1296 (("hypothesis~=4\\.56") "hypothesis"))
1298 (add-after 'unpack 'fix-broken-tests
1299 ;; The tests try to run two scripts it expects should be
1300 ;; in PATH, but they aren't at this time (see:
1301 ;; https://github.com/hardbyte/python-can/issues/805).
1303 (substitute* "test/test_scripts.py"
1304 (("\"can_logger\\.py --help\"") "")
1305 (("\"can_player\\.py --help\"") ""))
1308 `(("python-aenum" ,python-aenum)
1309 ("python-wrapt" ,python-wrapt)))
1311 `(("python-codecov" ,python-codecov)
1312 ("python-coverage" ,python-coverage)
1313 ("python-future" ,python-future)
1314 ("python-hypothesis" ,python-hypothesis)
1315 ("python-mock" ,python-mock)
1316 ("python-pyserial" ,python-pyserial)
1317 ("python-pytest" ,python-pytest)
1318 ("python-pytest-cov" ,python-pytest-cov)
1319 ("python-pytest-runner" ,python-pytest-runner)
1320 ("python-pytest-timeout" ,python-pytest-timeout)))
1321 (home-page "https://github.com/hardbyte/python-can")
1322 (synopsis "Controller Area Network (CAN) interface module for Python")
1323 (description "This package defines the @code{can} module, which provides
1324 controller area network (CAN) support for Python developers; providing common
1325 abstractions to different hardware devices, and a suite of utilities for
1326 sending and receiving messages on a CAN bus.")
1327 (license license:lgpl3+)))
1329 (define-public python-diskcache
1331 (name "python-diskcache")
1336 (uri (pypi-uri "diskcache" version))
1339 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1340 (build-system python-build-system)
1342 `(#:tests? #f)) ;test suite not included in the release
1343 (home-page "http://www.grantjenks.com/docs/diskcache/")
1344 (synopsis "Disk and file backed cache library")
1345 (description "DiskCache is a disk and file backed persistent cache.")
1346 (license license:asl2.0)))
1348 (define-public python-bitstruct
1350 (name "python-bitstruct")
1355 (uri (pypi-uri "bitstruct" version))
1358 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1359 (build-system python-build-system)
1360 (home-page "https://github.com/eerimoq/bitstruct")
1361 (synopsis "Python values to and C bit field structs converter")
1362 (description "This module performs conversions between Python values and C
1363 bit field structs represented as Python byte strings. It is intended to have
1364 a similar interface as the @code{struct} module from Python, but working on
1365 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1366 (license license:expat)))
1368 (define-public python-cantools
1370 (name "python-cantools")
1374 ;; We take the sources from the Git repository as the documentation is
1375 ;; not included with the PyPI archive.
1378 (url "https://github.com/eerimoq/cantools")
1380 (file-name (git-file-name name version))
1383 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1384 (build-system python-build-system)
1387 (modify-phases %standard-phases
1388 (add-after 'build 'build-doc
1390 ;; See: https://github.com/eerimoq/cantools/issues/190.
1391 (substitute* "README.rst"
1392 (("https://github.com/eerimoq/cantools/raw/master\
1395 (with-directory-excursion "docs"
1396 (invoke "make" "man" "info"))))
1397 (add-after 'install 'install-doc
1398 (lambda* (#:key outputs #:allow-other-keys)
1399 (let* ((out (assoc-ref outputs "out"))
1400 (info (string-append out "/share/info"))
1401 (man1 (string-append out "/share/man/man1")))
1402 (format #t "CWD: ~s~%" (getcwd))
1403 (install-file "docs/_build/texinfo/cantools.info" info)
1404 (install-file "docs/_build/man/cantools.1" man1)
1407 `(("sphinx" ,python-sphinx)
1408 ("texinfo" ,texinfo)))
1410 `(("python-bitstruct" ,python-bitstruct)
1411 ("python-can" ,python-can)
1412 ("python-diskcache" ,python-diskcache)
1413 ("python-textparser" ,python-textparser)))
1414 (home-page "https://github.com/eerimoq/cantools")
1415 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1416 (description "This package includes Controller Area Network (CAN) related
1417 tools that can be used to:
1419 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1420 @item encode and decode CAN messages
1421 @item multiplex simple and extended signals
1422 @item diagnose DID encoding and decoding
1423 @item dump the CAN decoder output
1424 @item test CAN nodes
1425 @item generate C source code
1426 @item monitor the CAN bus
1428 (license license:expat)))
1430 (define-public python-capturer
1432 (name "python-capturer")
1437 (uri (pypi-uri "capturer" version))
1440 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1441 (build-system python-build-system)
1445 `(("python-humanfriendly" ,python-humanfriendly)))
1446 (home-page "https://capturer.readthedocs.io")
1447 (synopsis "Capture stdout and stderr streams of the current process")
1449 "The capturer package makes it easy to capture the stdout and stderr
1450 streams of the current process and subprocesses. Output can be relayed
1451 to the terminal in real time but is also available to the Python program
1452 for additional processing.")
1453 (license license:expat)))
1455 (define-public python2-capturer
1456 (package-with-python2 python-capturer))
1458 (define-public python-case
1460 (name "python-case")
1465 (uri (pypi-uri "case" version))
1468 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1469 (build-system python-build-system)
1471 `(("python-mock" ,python-mock)
1472 ("python-nose" ,python-nose)
1473 ("python-six" ,python-six)
1474 ("python-unittest2" ,python-unittest2)))
1476 `(("python-coverage" ,python-coverage)))
1477 (home-page "https://github.com/celery/case")
1478 (synopsis "Unittest utilities and convenience methods")
1480 "The @code{case} package provides utilities on top of unittest, including
1481 some helpful Python 2 compatibility convenience methods.")
1482 (license license:bsd-3)))
1484 (define-public python-verboselogs
1486 (name "python-verboselogs")
1491 (uri (pypi-uri "verboselogs" version))
1494 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1495 (build-system python-build-system)
1498 (modify-phases %standard-phases
1501 ;; Do not run pylint plugin test, as astroid is an old
1502 ;; unsupported version.
1503 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1504 "verboselogs/tests.py"))))))
1506 `(("python-mock" ,python-mock)
1507 ("python-pytest" ,python-pytest)))
1508 (home-page "https://verboselogs.readthedocs.io")
1509 (synopsis "Verbose logging level for Python's logging module")
1511 "The @code{verboselogs} package extends Python's @code{logging} module to
1512 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1513 (license license:expat)))
1515 (define-public python2-verboselogs
1516 (package-with-python2 python-verboselogs))
1518 (define-public python-coloredlogs
1520 (name "python-coloredlogs")
1525 (uri (pypi-uri "coloredlogs" version))
1528 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1529 (build-system python-build-system)
1531 `(;Tests require some updated modules
1534 `(("python-capturer" ,python-capturer)))
1535 (home-page "https://coloredlogs.readthedocs.io")
1536 (synopsis "Colored stream handler for Python's logging module")
1538 "The @code{coloredlogs} package enables colored terminal output for
1539 Python's logging module. The @code{ColoredFormatter} class inherits from
1540 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1541 messages in color.")
1542 (license license:expat)))
1544 (define-public python2-coloredlogs
1545 (package-with-python2 python-coloredlogs))
1547 (define-public python-editorconfig
1549 (name "python-editorconfig")
1554 (uri (pypi-uri "EditorConfig" version))
1557 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1558 (build-system python-build-system)
1559 (home-page "https://editorconfig.org/")
1560 (synopsis "EditorConfig bindings for python")
1561 (description "The EditorConfig project consists of a file format for
1562 defining coding styles and a collection of text editor plugins that enable
1563 editors to read the file format and adhere to defined styles. EditorConfig
1564 files are easily readable and they work nicely with version control systems.")
1565 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1566 (license (list license:bsd-2 license:psfl))))
1568 (define-public dosage
1575 (uri (pypi-uri "dosage" version))
1578 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1579 (build-system python-build-system)
1581 `(("python2-backports-functools-lru-cache"
1582 ,python2-backports-functools-lru-cache)
1583 ("python2-backports-shutil-get-terminal-size"
1584 ,python2-backports-shutil-get-terminal-size)
1585 ("python-cached-property" ,python-cached-property)
1586 ("python-colorama" ,python-colorama)
1587 ("python-imagesize" ,python-imagesize)
1588 ("python-importlib-metadata" ,python-importlib-metadata)
1589 ("python-lxml" ,python-lxml)
1590 ("python-requests" ,python-requests)
1591 ("python-six" ,python-six)))
1593 `(("python-pytest-cov" ,python-pytest-cov)
1594 ("python-pytest-xdist" ,python-pytest-xdist)
1595 ("python-responses" ,python-responses)
1596 ("python-setuptools-scm" ,python-setuptools-scm)))
1597 (home-page "https://github.com/webcomics/dosage")
1598 (synopsis "Comic strip downloader and archiver")
1599 (description "Dosage is designed to keep a local copy of specific webcomics and other
1600 picture-based content such as Picture of the Day sites. With the @command{dosage}
1601 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1602 downloaded, or download a strip for a particular date or index, if possible.")
1603 (license license:expat)))
1605 (define-public python-et-xmlfile
1607 (name "python-et-xmlfile")
1612 (uri (pypi-uri "et_xmlfile" version))
1615 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1616 (build-system python-build-system)
1618 `(#:phases (modify-phases %standard-phases
1621 (invoke "pytest"))))))
1623 `(("python-pytest" ,python-pytest)
1624 ("python-lxml" ,python-lxml))) ;used for the tests
1625 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1626 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1627 (description "This Python library is based upon the @code{xmlfile} module
1628 from @code{lxml}. It aims to provide a low memory, compatible implementation
1629 of @code{xmlfile}.")
1630 (license license:expat)))
1632 (define-public python2-et-xmlfile
1633 (package-with-python2 python-et-xmlfile))
1635 (define-public python-openpyxl
1637 (name "python-openpyxl")
1641 ;; We use the upstream repository, as the tests are not included in the
1645 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1646 (changeset version)))
1647 (file-name (string-append name "-" version "-checkout"))
1649 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1650 (build-system python-build-system)
1652 `(#:phases (modify-phases %standard-phases
1655 (invoke "pytest"))))))
1657 ;; For the test suite.
1658 `(("python-lxml" ,python-lxml)
1659 ("python-pillow" ,python-pillow)
1660 ("python-pytest" ,python-pytest)))
1662 `(("python-et-xmlfile" ,python-et-xmlfile)
1663 ("python-jdcal" ,python-jdcal)))
1664 (home-page "https://openpyxl.readthedocs.io")
1665 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1666 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1667 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1669 (properties `((python2-variant . ,(delay python2-openpyxl))))
1670 (license license:expat)))
1672 (define-public python2-openpyxl
1673 (let ((base (package-with-python2
1674 (strip-python2-variant python-openpyxl))))
1677 ;; This is the latest version that has python2 support
1682 (uri (pypi-uri "openpyxl" version))
1685 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1686 (arguments '(#:tests? #f))))) ; No test suite.
1688 (define-public python-eventlet
1690 (name "python-eventlet")
1695 (uri (pypi-uri "eventlet" version))
1698 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1699 (build-system python-build-system)
1701 `(("python-greenlet" ,python-greenlet)))
1703 ;; TODO: Requires unpackaged 'enum-compat'.
1705 (home-page "https://eventlet.net")
1706 (synopsis "Concurrent networking library for Python")
1708 "Eventlet is a concurrent networking library for Python that
1709 allows you to change how you run your code, not how you write it.
1710 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1711 Coroutines ensure that the developer uses a blocking style of programming
1712 that is similar to threading, but provide the benefits of non-blocking I/O.
1713 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1714 from the Python interpreter, or as a small part of a larger application.")
1715 (license license:expat)))
1717 (define-public python2-eventlet
1718 (let ((base (package-with-python2
1719 (strip-python2-variant python-eventlet))))
1720 (package (inherit base)
1722 `(("python2-enum34" ,python2-enum34)
1723 ,@(package-propagated-inputs base))))))
1725 (define-public python-six
1732 (uri (pypi-uri "six" version))
1735 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1736 (build-system python-build-system)
1739 (modify-phases %standard-phases
1742 (invoke "py.test" "-v"))))))
1744 `(("python-pytest" ,python-pytest-bootstrap)))
1745 (home-page "https://pypi.org/project/six/")
1746 (synopsis "Python 2 and 3 compatibility utilities")
1748 "Six is a Python 2 and 3 compatibility library. It provides utility
1749 functions for smoothing over the differences between the Python versions with
1750 the goal of writing Python code that is compatible on both Python versions.
1751 Six supports every Python version since 2.5. It is contained in only one
1752 Python file, so it can be easily copied into your project.")
1753 (license license:x11)))
1755 (define-public python2-six
1756 (package-with-python2 python-six))
1758 (define-public python-six-bootstrap
1760 (inherit python-six)
1761 (name "python-six-bootstrap")
1763 (arguments `(#:tests? #f))))
1765 (define-public python2-six-bootstrap
1766 (package-with-python2 python-six-bootstrap))
1768 (define-public python-schedule
1770 (name "python-schedule")
1775 (uri (pypi-uri "schedule" version))
1778 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1779 (build-system python-build-system)
1781 `(("python-pytest" ,python-pytest)
1782 ("python-mock" ,python-mock)))
1783 (home-page "https://github.com/dbader/schedule")
1784 (synopsis "Schedule periodic function calls in Python")
1786 "Schedule is an in-process scheduler for periodic jobs that uses the
1787 builder pattern for configuration. Schedule lets you run Python functions (or
1788 any other callable) periodically at pre-determined intervals using a simple,
1789 human-friendly syntax.")
1790 (license license:expat)))
1792 (define-public python2-schedule
1793 (package-with-python2 python-schedule))
1795 (define-public python-scour
1797 (name "python-scour")
1804 (url "https://github.com/scour-project/scour")
1806 (string-append "v" version))))
1807 (file-name (git-file-name name version))
1809 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1811 `(("python-six" ,python-six)))
1812 (build-system python-build-system)
1813 (home-page "https://github.com/scour-project/scour")
1814 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1815 (description "The goal of Scour is to output a file that renderes
1816 identically at a fraction of the size by removing a lot of redundant
1817 information created by most SVG editors. Optimization options are typically
1818 lossless but can be tweaked for more agressive cleaning.")
1819 (license license:asl2.0)))
1821 (define-public python-mechanize
1823 (name "python-mechanize")
1828 (uri (pypi-uri "mechanize" version))
1831 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1832 (build-system python-build-system)
1834 `(("python-html5lib" ,python-html5lib)))
1835 (home-page "https://github.com/python-mechanize/mechanize")
1837 "Stateful programmatic web browsing in Python")
1839 "Mechanize implements stateful programmatic web browsing in Python,
1840 after Andy Lester’s Perl module WWW::Mechanize.")
1841 (license license:bsd-3)))
1843 (define-public python2-mechanize
1844 (package-with-python2 python-mechanize))
1846 (define-public python-simplejson
1848 (name "python-simplejson")
1853 (uri (pypi-uri "simplejson" version))
1856 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1857 (build-system python-build-system)
1858 (home-page "http://simplejson.readthedocs.org/en/latest/")
1860 "Json library for Python")
1862 "JSON (JavaScript Object Notation) is a subset of JavaScript
1863 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1866 Simplejson exposes an API familiar to users of the standard library marshal
1867 and pickle modules. It is the externally maintained version of the json
1868 library contained in Python 2.6, but maintains compatibility with Python 2.5
1869 and (currently) has significant performance advantages, even without using
1870 the optional C extension for speedups. Simplejson is also supported on
1872 (license license:x11)))
1874 (define-public python2-simplejson
1875 (package-with-python2 python-simplejson))
1878 (define-public python-pyicu
1880 (name "python-pyicu")
1885 (uri (pypi-uri "PyICU" version))
1888 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1889 (build-system python-build-system)
1891 `(("icu4c" ,icu4c)))
1893 `(("python-pytest" ,python-pytest)
1894 ("python-six" ,python-six)))
1895 (home-page "https://github.com/ovalhub/pyicu")
1896 (synopsis "Python extension wrapping the ICU C++ API")
1898 "PyICU is a python extension wrapping the ICU C++ API.")
1899 (license license:x11)))
1901 (define-public python2-pyicu
1902 (package-with-python2 python-pyicu))
1904 (define-public python-dogtail
1906 (name "python-dogtail")
1912 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1913 "dogtail-" version ".tar.gz"))
1916 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1917 (build-system python-build-system)
1919 `(#:tests? #f ; TODO Launching dbus for the tests
1922 (modify-phases %standard-phases
1924 (lambda* (#:key tests? #:allow-other-keys)
1926 (system "Xvfb :1 &")
1927 (setenv "DISPLAY" ":1")
1928 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1931 `(("python-pygobject" ,python-pygobject)
1932 ("python-pycairo" ,python-pycairo)
1933 ("python-pyatspi" ,python-pyatspi)))
1935 `(("python-nose" ,python-nose)
1937 ("xvfb" ,xorg-server)
1939 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1940 ("gobject-introspection" ,gobject-introspection)))
1941 (home-page "https://gitlab.com/dogtail/dogtail/")
1942 (synopsis "GUI test tool and automation framework written in Python")
1944 "Dogtail is a GUI test tool and automation framework written in Python.
1945 It uses Accessibility (a11y) technologies to communicate with desktop
1946 applications. dogtail scripts are written in Python and executed like any
1947 other Python program.")
1948 (license license:gpl2+)))
1950 (define-public python2-dogtail
1951 (package-with-python2 python-dogtail))
1953 (define-public python-empy
1955 (name "python-empy")
1959 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1963 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1964 (build-system python-build-system)
1966 `(#:tests? #f)) ; python2 only
1967 (home-page "http://www.alcyone.com/software/empy/")
1968 (synopsis "Templating system for Python")
1970 "EmPy is a system for embedding Python expressions and statements in
1971 template text; it takes an EmPy source file, processes it, and produces
1972 output. This is accomplished via expansions, which are special signals to the
1973 EmPy system and are set off by a special prefix (by default the at sign, @@).
1974 EmPy can expand arbitrary Python expressions and statements in this way, as
1975 well as a variety of special forms. Textual data not explicitly delimited in
1976 this way is sent unaffected to the output, allowing Python to be used in
1977 effect as a markup language. Also supported are callbacks via hooks,
1978 recording and playback via diversions, and dynamic, chainable filters. The
1979 system is highly configurable via command line options and embedded
1981 (license license:lgpl2.1+)))
1983 (define-public python2-empy
1984 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1987 (arguments `(,@(package-arguments base)
1990 (define-public python2-element-tree
1992 (name "python2-element-tree")
1997 "http://effbot.org/media/downloads/elementtree-"
1998 version "-20050316.tar.gz"))
2001 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2002 (build-system python-build-system)
2004 `(#:python ,python-2 ; seems to be part of Python 3
2005 #:tests? #f)) ; no 'test' sub-command
2006 (synopsis "Toolkit for XML processing in Python")
2008 "ElementTree is a Python library supporting lightweight XML processing.")
2009 (home-page "https://effbot.org/zone/element-index.htm")
2010 (license (license:x11-style
2011 "http://docs.python.org/2/license.html"
2012 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2014 (define-public python2-pybugz
2016 (name "python2-pybugz")
2021 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2025 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2026 (patches (search-patches "pybugz-stty.patch"
2027 "pybugz-encode-error.patch"))))
2028 (build-system python-build-system)
2030 `(#:python ,python-2 ; SyntaxError with Python 3
2031 #:tests? #f)) ; no 'test' sub-command
2033 `(("element-tree" ,python2-element-tree)))
2034 (synopsis "Python and command-line interface to Bugzilla")
2036 "PyBugz is a Python library and command-line tool to query the Bugzilla
2037 bug tracking system. It is meant as an aid to speed up interaction with the
2039 (home-page "http://www.liquidx.net/pybugz/")
2040 (license license:gpl2)))
2042 (define-public python2-enum
2044 (name "python2-enum")
2048 (uri (pypi-uri "enum" version))
2051 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2052 (build-system python-build-system)
2054 `(#:python ,python-2))
2055 (home-page "https://pypi.org/project/enum/")
2056 (synopsis "Robust enumerated type support in Python")
2058 "This provides a module for robust enumerations in Python. It has
2059 been superseded by the Python standard library and is provided only for
2061 ;; Choice of either license.
2062 (license (list license:gpl3+ license:psfl))))
2064 (define-public python-enum34
2066 (name "python-enum34")
2071 (uri (pypi-uri "enum34" version))
2074 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2075 (build-system python-build-system)
2076 (home-page "https://pypi.org/project/enum34/")
2077 (synopsis "Backported Python 3.4 Enum")
2079 "Enum34 is the new Python stdlib enum module available in Python 3.4
2080 backported for previous versions of Python from 2.4 to 3.3.")
2081 (license license:bsd-3)))
2083 (define-public python2-enum34
2084 (package-with-python2 python-enum34))
2086 (define-public python-parse-type
2088 (name "python-parse-type")
2093 (uri (pypi-uri "parse_type" version))
2096 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2097 (build-system python-build-system)
2099 `(("python-six" ,python-six)
2100 ("python-parse" ,python-parse)))
2102 `(("python-pytest" ,python-pytest)
2103 ("python-pytest-runner" ,python-pytest-runner)))
2104 (home-page "https://github.com/jenisys/parse_type")
2105 (synopsis "Extended parse module")
2107 "Parse_type extends the python parse module.")
2109 `((python2-variant . ,(delay python2-parse-type))))
2110 (license license:bsd-3)))
2112 (define-public python2-parse-type
2113 (let ((base (package-with-python2
2114 (strip-python2-variant python-parse-type))))
2115 (package (inherit base)
2117 `(("python2-enum34" ,python2-enum34)
2118 ,@(package-propagated-inputs base))))))
2120 (define-public python-parse
2122 (name "python-parse")
2127 (uri (pypi-uri "parse" version))
2130 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
2131 (build-system python-build-system)
2134 (modify-phases %standard-phases
2136 (lambda _ (invoke "python" "test_parse.py"))))))
2137 (home-page "https://github.com/r1chardj0n3s/parse")
2138 (synopsis "Parse strings")
2140 "Parse strings using a specification based on the Python @code{format()}
2142 (license license:x11)))
2144 (define-public python-polib
2146 (name "python-polib")
2150 (uri (pypi-uri "polib" version))
2153 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2154 (build-system python-build-system)
2155 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2156 (synopsis "Manipulate, create and modify gettext files")
2157 (description "Polib can manipulate any gettext format (po, pot and mo)
2158 files. It can be used to create po files from scratch or to modify
2160 (license license:expat)))
2162 (define-public python2-polib
2163 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2166 (arguments `(,@(package-arguments base)
2167 ;; Tests don't work with python2.
2170 (define-public python-poyo
2172 (name "python-poyo")
2177 (uri (pypi-uri "poyo" version))
2180 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2181 (build-system python-build-system)
2182 (home-page "https://github.com/hackebrot/poyo")
2183 (synopsis "Lightweight YAML Parser for Python")
2185 "This package provides a lightweight YAML Parser for Python. It supports
2186 only a chosen subset of the YAML format that is required to parse cookiecutter
2187 user configuration files. It does not have support for serializing into YAML
2188 and is not compatible with JSON.")
2189 (license license:expat)))
2191 (define-public scons
2198 (url "https://github.com/SCons/scons")
2200 (file-name (git-file-name name version))
2203 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2204 (build-system python-build-system)
2206 `(#:use-setuptools? #f ; still relies on distutils
2207 #:tests? #f ; no 'python setup.py test' command
2209 (modify-phases %standard-phases
2210 (add-before 'build 'bootstrap
2212 (substitute* "src/engine/SCons/compat/__init__.py"
2213 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2214 "sys.modules[new] = __import__(old)"))
2215 (substitute* "src/engine/SCons/Platform/__init__.py"
2216 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2217 "mod = __import__(full_name)"))
2218 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2219 (chdir "build/scons")
2221 (home-page "https://scons.org/")
2222 (synopsis "Software construction tool written in Python")
2224 "SCons is a software construction tool. Think of SCons as an improved,
2225 cross-platform substitute for the classic Make utility with integrated
2226 functionality similar to autoconf/automake and compiler caches such as ccache.
2227 In short, SCons is an easier, more reliable and faster way to build
2229 (license license:x11)))
2231 (define-public scons-python2
2233 (inherit (package-with-python2 scons))
2234 (name "scons-python2")))
2236 (define-public python-extras
2238 (name "python-extras")
2243 (uri (pypi-uri "extras" version))
2246 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2247 (build-system python-build-system)
2249 ;; FIXME: Circular dependency on testtools.
2251 (home-page "https://github.com/testing-cabal/extras")
2252 (synopsis "Useful extensions to the Python standard library")
2254 "Extras is a set of extensions to the Python standard library.")
2255 (license license:expat)))
2257 (define-public python2-extras
2258 (package-with-python2 python-extras))
2260 (define-public python-mimeparse
2262 (name "python-mimeparse")
2267 (uri (pypi-uri "python-mimeparse" version))
2270 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2271 (build-system python-build-system)
2274 (modify-phases %standard-phases
2277 (invoke "./mimeparse_test.py"))))))
2279 "https://github.com/dbtsai/python-mimeparse")
2280 (synopsis "Python library for parsing MIME types")
2282 "Mimeparse provides basic functions for parsing MIME type names and
2283 matching them against a list of media-ranges.")
2284 (license license:expat)))
2286 (define-public python2-mimeparse
2287 (package-with-python2 python-mimeparse))
2289 (define-public python-miniboa
2291 (name "python-miniboa")
2296 (uri (pypi-uri "miniboa" version))
2299 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2300 (build-system python-build-system)
2301 (home-page "https://github.com/shmup/miniboa")
2302 (synopsis "Simple, single-threaded Telnet server")
2304 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2306 (license license:asl2.0)))
2308 (define-public python2-miniboa
2309 (package-with-python2 python-miniboa))
2311 (define-public python-pafy
2313 (name "python-pafy")
2318 (uri (pypi-uri "pafy" version))
2321 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2322 (build-system python-build-system)
2324 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2326 ;; Youtube-dl is a python package which is imported in the file
2327 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2328 `(("youtube-dl" ,youtube-dl)))
2329 (home-page "https://np1.github.io/pafy/")
2330 (synopsis "Retrieve YouTube content and metadata")
2332 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2333 (license license:lgpl3+)))
2335 (define-public python2-funcsigs
2337 (name "python2-funcsigs")
2341 (uri (pypi-uri "funcsigs" version))
2344 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2345 (build-system python-build-system)
2347 `(#:python ,python-2))
2349 `(("python2-unittest2" ,python2-unittest2)))
2350 (home-page "http://funcsigs.readthedocs.org")
2351 (synopsis "Python function signatures from PEP362")
2353 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2354 (license license:asl2.0)))
2356 (define-public python2-funcsigs-bootstrap
2358 (inherit python2-funcsigs)
2359 (name "python2-funcsigs-bootstrap")
2363 ,@(package-arguments python2-funcsigs)))))
2365 (define-public python-py
2372 (uri (pypi-uri "py" version))
2375 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2376 (build-system python-build-system)
2378 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2379 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2380 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2381 ;; Is this module globally installed?"
2384 `(("python-setuptools-scm" ,python-setuptools-scm)))
2385 (home-page "https://github.com/pytest-dev/py")
2386 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2388 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2389 code introspection, and logging.")
2390 (license license:expat)))
2392 (define-public python2-py
2393 (package-with-python2 python-py))
2395 ;; Recent versions of python-fixtures and python-testrepository need
2396 ;; python-pbr for packaging, which itself needs these two packages for
2398 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2399 ;; same source, just without any test dependencies and with tests disabled.
2400 ;; python-pbr-minmal is then used to package python-fixtures and
2401 ;; python-testrepository.
2402 ;; Strictly speaking we currently could remove the test-requirements from the
2403 ;; normal python-pbr package (and save this package) since test are disabled
2404 ;; there anyway. But this may change in future.
2405 (define-public python-pbr-minimal
2407 (name "python-pbr-minimal")
2412 (uri (pypi-uri "pbr" version))
2415 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2416 (build-system python-build-system)
2419 (home-page "https://docs.openstack.org/pbr/latest/")
2420 (synopsis "Minimal build of python-pbr used for bootstrapping")
2422 "Used only for bootstrapping python2-pbr, you should not need this.")
2423 (license license:asl2.0)))
2425 (define-public python2-pbr-minimal
2426 (package-with-python2 python-pbr-minimal))
2428 (define-public python-pbr
2430 (inherit python-pbr-minimal)
2433 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2435 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2437 `(("python-fixtures" ,python-fixtures-bootstrap)
2438 ;; discover, coverage, hacking, subunit
2439 ("python-mock" ,python-mock)
2440 ("python-six" ,python-six)
2441 ("python-sphinx" ,python-sphinx)
2442 ("python-testrepository" ,python-testrepository-bootstrap)
2443 ("python-testresources" ,python-testresources-bootstrap)
2444 ("python-testscenarios" ,python-testscenarios-bootstrap)
2445 ("python-testtools" ,python-testtools-bootstrap)
2446 ("python-virtualenv" ,python-virtualenv)))
2447 (synopsis "Enhance the default behavior of Python’s setuptools")
2449 "Python Build Reasonableness (PBR) is a library that injects some useful
2450 and sensible default behaviors into your setuptools run. It will set
2451 versions, process requirements files and generate AUTHORS and ChangeLog file
2452 from git information.
2455 (define-public python2-pbr
2456 (package-with-python2 python-pbr))
2458 (define-public python-pyrsistent
2460 (name "python-pyrsistent")
2462 (home-page "https://github.com/tobgu/pyrsistent")
2465 (uri (pypi-uri "pyrsistent" version))
2468 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2469 (build-system python-build-system)
2471 '(#:phases (modify-phases %standard-phases
2472 ;; The package works fine with newer Pytest and Hypothesis, but
2473 ;; has pinned older versions to stay compatible with Python 2.
2474 (add-before 'check 'loosen-pytest-requirement
2476 (substitute* "setup.py"
2477 (("pytest<5") "pytest")
2478 (("hypothesis<5") "hypothesis"))
2481 `(("python-hypothesis" ,python-hypothesis)
2482 ("python-pytest" ,python-pytest)
2483 ("python-pytest-runner" ,python-pytest-runner)))
2485 `(("python-six" ,python-six)))
2486 (synopsis "Persistent data structures for Python")
2488 "Pyrsistent is a number of persistent collections (by some referred to as
2489 functional data structures). Persistent in the sense that they are immutable.
2491 All methods on a data structure that would normally mutate it instead return a
2492 new copy of the structure containing the requested updates. The original
2493 structure is left untouched.")
2494 (license license:expat)))
2496 (define-public python2-pyrsistent
2497 (package-with-python2 python-pyrsistent))
2499 (define-public python-exif-read
2501 (name "python-exif-read")
2505 (uri (pypi-uri "ExifRead" version))
2508 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2509 (build-system python-build-system)
2510 (arguments `(#:tests? #f)) ; no tests
2511 (home-page "https://github.com/ianare/exif-py")
2512 (synopsis "Python library to extract EXIF data from image files")
2514 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2516 (license license:bsd-3)))
2518 (define-public python2-exif-read
2519 (package-with-python2 python-exif-read))
2521 (define-public python-pyld
2523 (name "python-pyld")
2527 (uri (pypi-uri "PyLD" version))
2530 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2531 (build-system python-build-system)
2532 (home-page "https://github.com/digitalbazaar/pyld")
2533 (synopsis "Python implementation of the JSON-LD specification")
2535 "PyLD is an implementation of the JSON-LD specification.")
2536 (license license:bsd-3)))
2538 (define-public python2-pyld
2539 (package-with-python2 python-pyld))
2541 (define-public python-cli-helpers
2543 (name "python-cli-helpers")
2547 ;; There's no source tarball on PyPI.
2550 (url "https://github.com/dbcli/cli_helpers")
2551 (commit (string-append "v" version))))
2552 (file-name (git-file-name name version))
2554 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2555 (build-system python-build-system)
2557 `(("python-pytest" ,python-pytest)))
2559 `(("python-wcwidth" ,python-wcwidth)
2560 ("python-configobj" ,python-configobj)
2561 ("python-tabulate" ,python-tabulate)
2562 ("python-terminaltables" ,python-terminaltables)))
2563 (home-page "https://github.com/dbcli/cli_helpers")
2564 (synopsis "Helpers for building command-line apps")
2566 "CLI Helpers is a Python package that makes it easy to perform common
2567 tasks when building command-line apps. It's a helper library for command-line
2569 (license license:bsd-3)))
2571 (define-public python-click
2573 (name "python-click")
2578 (uri (pypi-uri "click" version))
2581 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2582 (build-system python-build-system)
2585 (modify-phases %standard-phases
2586 (add-after 'unpack 'fix-paths
2587 (lambda* (#:key inputs #:allow-other-keys)
2588 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2589 "cross-libc" "libc"))))
2590 (substitute* "src/click/_unicodefun.py"
2592 (string-append "'" glibc "/bin/locale'"))))
2596 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2597 (invoke "python" "-m" "pytest"))))))
2599 `(("python-pytest" ,python-pytest)))
2600 (home-page "https://palletsprojects.com/p/click/")
2601 (synopsis "Command line library for Python")
2603 "Click is a Python package for creating command line interfaces in a
2604 composable way with as little code as necessary. Its name stands for
2605 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2606 with sensible defaults out of the box.")
2607 (license license:bsd-3)))
2609 (define-public python2-click
2610 (package-with-python2 python-click))
2612 (define-public python-click-5
2613 (package (inherit python-click)
2614 (name "python-click")
2619 (uri (pypi-uri "click" version))
2621 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2624 (define-public python-wheel
2626 (name "python-wheel")
2631 (uri (pypi-uri "wheel" version))
2634 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2635 (build-system python-build-system)
2637 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2638 ;; fails to find the newly-built bdist_wheel library, even though it is
2639 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2641 (home-page "https://bitbucket.org/pypa/wheel/")
2642 (synopsis "Format for built Python packages")
2644 "A wheel is a ZIP-format archive with a specially formatted filename and
2645 the @code{.whl} extension. It is designed to contain all the files for a PEP
2646 376 compatible install in a way that is very close to the on-disk format. Many
2647 packages will be properly installed with only the @code{Unpack} step and the
2648 unpacked archive preserves enough information to @code{Spread} (copy data and
2649 scripts to their final locations) at any later time. Wheel files can be
2650 installed with a newer @code{pip} or with wheel's own command line utility.")
2651 (license license:expat)))
2653 (define-public python2-wheel
2654 (package-with-python2 python-wheel))
2656 (define-public python-vcversioner
2658 (name "python-vcversioner")
2659 (version "2.16.0.0")
2663 (uri (pypi-uri "vcversioner" version))
2666 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2667 (build-system python-build-system)
2668 (synopsis "Python library for version number discovery")
2669 (description "Vcversioner is a Python library that inspects tagging
2670 information in a variety of version control systems in order to discover
2672 (home-page "https://github.com/habnabit/vcversioner")
2673 (license license:isc)))
2675 (define-public python2-vcversioner
2676 (package-with-python2 python-vcversioner))
2678 (define-public python-jdcal
2680 (name "python-jdcal")
2685 (uri (pypi-uri "jdcal" version))
2688 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2689 (build-system python-build-system)
2691 `(#:phases (modify-phases %standard-phases
2694 (invoke "pytest"))))))
2696 `(("python-pytest" ,python-pytest)))
2697 (home-page "https://github.com/phn/jdcal")
2698 (synopsis "Functions to convert between Julian dates Gregorian dates")
2699 (description "This Python library provides functions for converting
2700 between Julian dates and Gregorian dates.")
2701 (license license:bsd-2)))
2703 (define-public python2-jdcal
2704 (package-with-python2 python-jdcal))
2706 (define-public python-jsondiff
2708 (name "python-jsondiff")
2713 (uri (pypi-uri "jsondiff" version))
2716 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2717 (build-system python-build-system)
2719 `(("python-nose" ,python-nose)
2720 ("python-nose-random" ,python-nose-random)))
2722 "https://github.com/fzumstein/jsondiff")
2723 (synopsis "Compare JSON and JSON-like structures in Python")
2724 (description "@code{jsondiff} is a Python library which lets you
2725 compare, diff, and patch JSON and JSON-like structures in Python.")
2726 (license license:expat)))
2728 (define-public python-jsonschema
2730 (name "python-jsonschema")
2734 (uri (pypi-uri "jsonschema" version))
2737 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2738 (build-system python-build-system)
2741 (modify-phases %standard-phases
2743 (lambda* (#:key inputs outputs #:allow-other-keys)
2744 (add-installed-pythonpath inputs outputs)
2745 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2746 (invoke "trial" "jsonschema"))))))
2748 `(("python-setuptools_scm" ,python-setuptools-scm)
2749 ("python-twisted" ,python-twisted)))
2751 `(("python-attrs" ,python-attrs)
2752 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2753 ("python-pyrsistent" ,python-pyrsistent)
2754 ("python-six" ,python-six)))
2755 (home-page "https://github.com/Julian/jsonschema")
2756 (synopsis "Implementation of JSON Schema for Python")
2758 "Jsonschema is an implementation of JSON Schema for Python.")
2759 (license license:expat)
2760 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2762 (define-public python2-jsonschema
2763 (let ((jsonschema (package-with-python2
2764 (strip-python2-variant python-jsonschema))))
2765 (package (inherit jsonschema)
2767 `(("python2-functools32" ,python2-functools32)
2768 ,@(package-propagated-inputs jsonschema))))))
2770 (define-public python-schema
2772 (name "python-schema")
2777 (uri (pypi-uri "schema" version))
2780 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2781 (build-system python-build-system)
2783 `(("python-pytest" ,python-pytest)))
2784 (home-page "https://github.com/keleshev/schema")
2785 (synopsis "Simple data validation library")
2787 "@code{python-schema} is a library for validating Python data
2788 structures, such as those obtained from config-files, forms, external
2789 services or command-line parsing, converted from JSON/YAML (or
2790 something else) to Python data-types.")
2791 (license license:psfl)))
2793 (define-public python2-schema
2794 (package-with-python2 python-schema))
2796 (define-public python-schema-0.5
2797 (package (inherit python-schema)
2802 (uri (pypi-uri "schema" version))
2805 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2807 (define-public python2-schema-0.5
2808 (package-with-python2 python-schema-0.5))
2810 (define-public python-kitchen
2812 (name "python-kitchen")
2817 (uri (pypi-uri "kitchen" version))
2820 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2821 (build-system python-build-system)
2823 `(("python-chardet" ,python-chardet)))
2824 (home-page "https://github.com/fedora-infra/kitchen")
2825 (synopsis "Python API for snippets")
2826 (description "@code{kitchen} module provides a python API for all sorts of
2827 little useful snippets of code that everybody ends up writing for their projects
2828 but never seem big enough to build an independent release. Use kitchen and stop
2829 cutting and pasting that code over and over.")
2830 (license (list license:lgpl2.1+
2831 ;; subprocess.py, test_subprocess.py,
2832 ;; kitchen/pycompat25/defaultdict.py:
2835 (define-public python2-kitchen
2836 (package-with-python2 python-kitchen))
2838 (define-public python-unidecode
2840 (name "python-unidecode")
2844 (uri (pypi-uri "Unidecode" version))
2847 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2848 (build-system python-build-system)
2849 (home-page "https://pypi.org/project/Unidecode/")
2850 (synopsis "ASCII transliterations of Unicode text")
2852 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2853 useful when integrating with legacy code that doesn't support Unicode, or for
2854 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2855 machine identifiers from human-readable Unicode strings that should still be
2856 somewhat intelligible.")
2857 (license license:gpl2+)))
2859 (define-public python2-unidecode
2860 (package-with-python2 python-unidecode))
2862 (define-public python-text-unidecode
2864 (name "python-text-unidecode")
2868 (uri (pypi-uri "text-unidecode" version))
2871 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2872 (build-system python-build-system)
2874 '(#:phases (modify-phases %standard-phases
2877 (setenv "PYTHONPATH"
2878 (string-append "./build/lib:"
2879 (getenv "PYTHONPATH")))
2880 (invoke "pytest" "-vv"))))))
2882 `(("python-pytest" ,python-pytest)))
2883 (home-page "https://github.com/kmike/text-unidecode/")
2884 (synopsis "Decode Unicode data")
2886 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2887 Perl library. It can create ASCII representations of Unicode data. In general
2888 users should prefer the @code{python-unidecode} package which offers better
2889 memory usage and transliteration quality.")
2890 ;; The user can choose either license.
2891 (license (list license:clarified-artistic license:gpl2+))))
2893 (define-public python2-text-unidecode
2894 (package-with-python2 python-text-unidecode))
2896 (define-public python-pyjwt
2898 (name "python-pyjwt")
2903 (uri (pypi-uri "PyJWT" version))
2906 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2907 (modules '((guix build utils)))
2910 (for-each delete-file-recursively
2911 (find-files "." "\\.pyc$"))
2913 (build-system python-build-system)
2915 '(#:phases (modify-phases %standard-phases
2918 ;; Mimic upstream commit 3a20892442b34c7 to get
2919 ;; rid of dependency on pytest-runner < 5.0.
2920 ;; Remove substitution for PyJWT > 1.7.1.
2921 (substitute* "setup.py"
2922 ((".*pytest-runner.*")
2924 (invoke "pytest" "-vv"))))))
2926 `(("python-pytest" ,python-pytest)
2927 ("python-pytest-cov" ,python-pytest-cov)))
2928 (home-page "https://github.com/progrium/pyjwt")
2929 (synopsis "JSON Web Token implementation in Python")
2931 "PyJWT is a JSON Web Token implementation written in Python.")
2932 (license license:expat)))
2934 (define-public python2-pyjwt
2935 (package-with-python2 python-pyjwt))
2937 (define-public python-pykka
2939 (name "python-pykka")
2944 (uri (pypi-uri "Pykka" version))
2947 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2948 (build-system python-build-system)
2950 `(("python-mock" ,python-mock)
2951 ("python-nose" ,python-nose)
2952 ("python-gevent" ,python-gevent)
2953 ("python-eventlet" ,python-eventlet)))
2954 (home-page "https://www.pykka.org/")
2955 (synopsis "Pykka is a Python implementation of the actor model")
2957 "Pykka is a Python implementation of the actor model.
2958 The actor model introduces some simple rules to control the sharing
2959 of state and cooperation between execution units, which makes it
2960 easier to build concurrent applications.")
2961 (license license:asl2.0)))
2963 (define-public python2-pykka
2964 (package-with-python2 python-pykka))
2966 (define-public python-pymsgbox
2968 (name "python-pymsgbox")
2974 ;; LICENSE.txt is not present on pypi
2975 (url "https://github.com/asweigart/PyMsgBox")
2976 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2977 (file-name (git-file-name name version))
2980 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2982 ;; Circular dependency to run tests:
2983 ;; Tests need pyautogui, which depends on pymsgbox.
2985 (build-system python-build-system)
2986 (home-page "https://github.com/asweigart/PyMsgBox")
2987 (synopsis "Python module for JavaScript-like message boxes")
2989 "PyMsgBox is a simple, cross-platform, pure Python module for
2990 JavaScript-like message boxes. Types of dialog boxes include:
2998 (license license:bsd-3)))
3000 (define-public python-pympler
3002 (name "python-pympler")
3003 (home-page "https://pythonhosted.org/Pympler/")
3007 (uri (pypi-uri "Pympler" version))
3010 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3011 (build-system python-build-system)
3013 `(#:phases (modify-phases %standard-phases
3015 (add-after 'install 'check
3016 (lambda* (#:key inputs outputs #:allow-other-keys)
3017 (add-installed-pythonpath inputs outputs)
3018 (invoke "python" "setup.py" "test"))))))
3019 (synopsis "Measure, monitor and analyze memory behavior")
3021 "Pympler is a development tool to measure, monitor and analyze
3022 the memory behavior of Python objects in a running Python application.
3024 By pympling a Python application, detailed insight in the size and the
3025 lifetime of Python objects can be obtained. Undesirable or unexpected
3026 runtime behavior like memory bloat and other @samp{pymples} can easily
3029 A web profiling frontend exposes process statistics, garbage
3030 visualisation and class tracker statistics.")
3031 (license license:asl2.0)))
3033 (define-public python2-pympler
3034 (package-with-python2 python-pympler))
3036 (define-public python-itsdangerous
3038 (name "python-itsdangerous")
3043 (uri (pypi-uri "itsdangerous" version))
3046 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3047 (build-system python-build-system)
3048 (home-page "https://palletsprojects.com/p/itsdangerous/")
3049 (synopsis "Python library for passing data to/from untrusted environments")
3051 "Itsdangerous provides various helpers to pass trusted data to untrusted
3052 environments and back.")
3053 (license license:bsd-3)))
3055 (define-public python2-itsdangerous
3056 (package-with-python2 python-itsdangerous))
3058 (define-public python-pyyaml
3060 (name "python-pyyaml")
3065 (uri (pypi-uri "PyYAML" version))
3068 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3069 (build-system python-build-system)
3071 `(("libyaml" ,libyaml)))
3072 (home-page "https://pyyaml.org")
3073 (synopsis "YAML parser and emitter for Python")
3075 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3076 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3077 API, and sensible error messages. PyYAML supports standard YAML tags and
3078 provides Python-specific tags that represent an arbitrary Python object.")
3079 (license license:expat)))
3081 (define-public python2-pyyaml
3082 (package-with-python2 python-pyyaml))
3084 (define-public python-vine
3086 (name "python-vine")
3091 (uri (pypi-uri "vine" version))
3094 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3095 (build-system python-build-system)
3097 `(("python-pytest" ,python-pytest)
3098 ("python-case" ,python-case)))
3099 (home-page "https://github.com/celery/vine")
3100 (synopsis "Promises for Python")
3102 "@code{vine} provides a special implementation of promises in that it can
3103 be used both for \"promise of a value\" and lazy evaluation. The biggest
3104 upside for this is that everything in a promise can also be a promise,
3105 e.g. filters, callbacks and errbacks can all be promises.")
3106 (license license:bsd-3)))
3108 (define-public python-virtualenv
3110 (name "python-virtualenv")
3115 (uri (pypi-uri "virtualenv" version))
3118 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
3119 (build-system python-build-system)
3121 `(("python-mock" ,python-mock)
3122 ("python-pytest" ,python-pytest)
3123 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3124 ;; be an input at all". However, removing the input makes the build error:
3125 ;; File "setup.py", line 4, in <module>
3126 ;; raise RuntimeError("setuptools >= 41 required to build")
3127 ("python-setuptools" ,python-setuptools)
3128 ("python-setuptools-scm" ,python-setuptools-scm)))
3130 `(("python-appdirs" ,python-appdirs)
3131 ("python-distlib" ,python-distlib)
3132 ("python-filelock" ,python-filelock)
3133 ("python-six" ,python-six)
3134 ("python-importlib-metadata" ,python-importlib-metadata)))
3135 (home-page "https://virtualenv.pypa.io/")
3136 (synopsis "Virtual Python environment builder")
3138 "Virtualenv is a tool to create isolated Python environments.")
3139 (properties `((python2-variant . ,(delay python2-virtualenv))))
3140 (license license:expat)))
3142 (define-public python2-virtualenv
3143 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3147 `(#:python ,python-2
3149 (modify-phases %standard-phases
3150 (add-after 'set-paths 'adjust-PYTHONPATH
3151 (lambda* (#:key inputs #:allow-other-keys)
3152 (let* ((python (assoc-ref inputs "python"))
3153 (python-sitedir (string-append python "/lib/python2.7"
3155 ;; XXX: 'python2' always comes first on PYTHONPATH
3156 ;; and shadows the 'setuptools' input. Move python2
3157 ;; last: this should be fixed in python-build-system
3158 ;; in a future rebuild cycle.
3159 (setenv "PYTHONPATH"
3160 (string-append (string-join (delete python-sitedir
3162 (getenv "PYTHONPATH")
3165 ":" python-sitedir))
3166 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3167 (getenv "PYTHONPATH"))
3170 `(("python-contextlib2" ,python2-contextlib2)
3171 ,@(package-propagated-inputs base))))))
3173 (define-public python-markupsafe
3175 (name "python-markupsafe")
3180 (uri (pypi-uri "MarkupSafe" version))
3183 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3184 (build-system python-build-system)
3186 `(#:modules ((ice-9 ftw)
3190 (guix build python-build-system))
3191 #:phases (modify-phases %standard-phases
3194 (let ((cwd (getcwd))
3195 (libdir (find (cut string-prefix? "lib." <>)
3196 (scandir "build"))))
3197 (setenv "PYTHONPATH"
3198 (string-append cwd "/build/" libdir ":"
3199 (getenv "PYTHONPATH")))
3200 (invoke "pytest" "-vv")))))))
3202 `(("python-pytest" ,python-pytest)))
3203 (home-page "https://github.com/mitsuhiko/markupsafe")
3204 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3206 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3208 (license license:bsd-3)))
3210 (define-public python2-markupsafe
3211 (package-with-python2 python-markupsafe))
3213 (define-public python-jinja2
3215 (name "python-jinja2")
3220 (uri (pypi-uri "Jinja2" version))
3223 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3224 (build-system python-build-system)
3226 '(#:phases (modify-phases %standard-phases
3228 (lambda* (#:key tests? #:allow-other-keys)
3231 (setenv "PYTHONPATH"
3232 (string-append "./build/lib:"
3233 (getenv "PYTHONPATH")))
3234 (invoke "pytest" "-vv"))
3235 (format #t "test suite not run~%"))
3238 `(("python-pytest" ,python-pytest)))
3240 `(("python-markupsafe" ,python-markupsafe)))
3241 (home-page "http://jinja.pocoo.org/")
3242 (synopsis "Python template engine")
3244 "Jinja2 is a small but fast and easy to use stand-alone template engine
3245 written in pure Python.")
3246 (license license:bsd-3)))
3248 (define-public python2-jinja2
3249 (package-with-python2 python-jinja2))
3251 (define-public python-jinja2-time
3253 (name "python-jinja2-time")
3258 (uri (pypi-uri "jinja2-time" version))
3261 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3262 (build-system python-build-system)
3264 `(("python-arrow" ,python-arrow)
3265 ("python-jinja2" ,python-jinja2)))
3267 "https://github.com/hackebrot/jinja2-time")
3268 (synopsis "Jinja2 Extension for Dates and Times")
3270 "This package provides an extension for the template engine Jinja2. It
3271 adds a 'now' tag providing a convenient access to the arrow.now() API from
3272 templates. A format string can be provided to control the output.")
3273 (license license:expat)))
3275 (define-public python-pystache
3277 (name "python-pystache")
3281 (uri (pypi-uri "pystache" version))
3284 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3285 (build-system python-build-system)
3287 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3288 (home-page "http://defunkt.io/pystache/")
3289 (synopsis "Python logic-less template engine")
3291 "Pystache is a Python implementation of the framework agnostic,
3292 logic-free templating system Mustache.")
3293 (license license:expat)
3294 (properties `((python2-variant . ,(delay python2-pystache))))))
3296 (define-public python2-pystache
3297 (package (inherit (package-with-python2
3298 (strip-python2-variant python-pystache)))
3300 `(#:python ,python-2
3302 (modify-phases %standard-phases
3305 (invoke "python" "test_pystache.py"))))))))
3307 (define-public python-joblib
3309 (name "python-joblib")
3313 (uri (pypi-uri "joblib" version))
3316 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3317 (build-system python-build-system)
3320 (modify-phases %standard-phases
3322 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3324 `(("python-pytest" ,python-pytest)))
3325 (home-page "https://joblib.readthedocs.io/")
3326 (synopsis "Using Python functions as pipeline jobs")
3328 "Joblib is a set of tools to provide lightweight pipelining in Python.
3329 In particular, joblib offers: transparent disk-caching of the output values
3330 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3331 logging and tracing of the execution.")
3332 (license license:bsd-3)))
3334 (define-public python2-joblib
3335 (package-with-python2 python-joblib))
3337 (define-public python-daemon
3339 (name "python-daemon")
3344 (uri (pypi-uri "python-daemon" version))
3347 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3348 (build-system python-build-system)
3351 (modify-phases %standard-phases
3352 (add-before 'check 'disable-tests
3354 ;; FIXME: Determine why test fails
3355 (substitute* "test/test_daemon.py"
3356 (("test_detaches_process_context")
3357 "skip_test_detaches_process_context"))
3360 `(("python-lockfile" ,python-lockfile)))
3362 `(("python-unittest2" ,python-unittest2)
3363 ("python-testtools" ,python-testtools)
3364 ("python-testscenarios" ,python-testscenarios)
3365 ("python-mock" ,python-mock)
3366 ("python-docutils" ,python-docutils)))
3367 (home-page "https://pagure.io/python-daemon/")
3368 (synopsis "Python library for making a Unix daemon process")
3369 (description "Python-daemon is a library that assists a Python program to
3370 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3372 This library provides a @code{DaemonContext} class that manages the following
3373 important tasks for becoming a daemon process:
3375 @item Detach the process into its own process group.
3376 @item Set process environment appropriate for running inside a chroot.
3377 @item Renounce suid and sgid privileges.
3378 @item Close all open file descriptors.
3379 @item Change the working directory, uid, gid, and umask.
3380 @item Set appropriate signal handlers.
3381 @item Open new file descriptors for stdin, stdout, and stderr.
3382 @item Manage a specified PID lock file.
3383 @item Register cleanup functions for at-exit processing.
3385 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3386 (license (list license:asl2.0 license:gpl3+))))
3388 (define-public python-anytree
3390 (name "python-anytree")
3394 (uri (pypi-uri "anytree" version))
3397 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3398 (build-system python-build-system)
3400 `(("python-six" ,python-six)))
3403 ("graphviz" ,graphviz) ;for 'dot'
3404 ("python-nose" ,python-nose)))
3405 (home-page "https://github.com/c0fec0de/anytree")
3406 (synopsis "Lightweight tree data library")
3408 "@code{anytree} is a simple, lightweight, and extensible tree data
3409 structure for Python.")
3410 (license license:asl2.0)))
3412 (define-public python-docutils
3414 (name "python-docutils")
3419 (uri (pypi-uri "docutils" version))
3422 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3423 (build-system python-build-system)
3425 '(#:phases (modify-phases %standard-phases
3427 (lambda* (#:key tests? #:allow-other-keys)
3429 (invoke "python" "test/alltests.py")
3430 (format #t "test suite not run~%"))
3432 (home-page "http://docutils.sourceforge.net/")
3433 (synopsis "Python Documentation Utilities")
3435 "Docutils is a modular system for processing documentation into useful
3436 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3438 ;; Most of the source code is public domain, but some source files are
3439 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3440 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3442 (define-public python2-docutils
3443 (package-with-python2 python-docutils))
3445 ;; python2-sphinx fails its test suite with newer versions.
3446 (define-public python2-docutils-0.14
3448 (inherit python2-docutils)
3452 (uri (pypi-uri "docutils" version))
3455 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3457 (define-public python-restructuredtext-lint
3459 (name "python-restructuredtext-lint")
3464 (uri (pypi-uri "restructuredtext-lint" version))
3467 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3468 (build-system python-build-system)
3471 (modify-phases %standard-phases
3473 (add-after 'install 'check
3474 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3476 (add-installed-pythonpath inputs outputs)
3477 (invoke "nosetests" "-v"))
3480 `(("python-docutils" ,python-docutils)))
3482 `(("python-nose" ,python-nose)))
3483 (home-page "https://github.com/twolfson/restructuredtext-lint")
3484 (synopsis "reStructuredText linter")
3485 (description "This package provides a linter for the reStructuredText
3487 (license license:unlicense)))
3489 (define-public python-doc8
3491 (name "python-doc8")
3496 (uri (pypi-uri "doc8" version))
3499 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3500 (build-system python-build-system)
3503 (modify-phases %standard-phases
3505 (add-after 'install 'check
3506 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3508 (add-installed-pythonpath inputs outputs)
3509 (invoke "pytest" "-v"))
3512 `(("python-chardet" ,python-chardet)
3513 ("python-docutils" ,python-docutils)
3514 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3515 ("python-six" ,python-six)
3516 ("python-stevedore" ,python-stevedore)))
3518 `(("python-testtools" ,python-testtools)
3519 ("python-pytest" ,python-pytest)))
3520 (home-page "https://launchpad.net/doc8")
3522 "Style checker for Sphinx (or other) RST documentation")
3524 "Doc8 is an opinionated style checker for reStructured Text and plain
3525 text styles of documentation.")
3526 (license license:asl2.0)))
3528 (define-public python-pygments
3530 (name "python-pygments")
3535 (uri (pypi-uri "Pygments" version))
3538 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
3539 (build-system python-build-system)
3541 ;; FIXME: Tests require sphinx, which depends on this.
3543 (home-page "https://pygments.org/")
3544 (synopsis "Syntax highlighting")
3546 "Pygments is a syntax highlighting package written in Python.")
3547 (license license:bsd-2)))
3549 (define-public python2-pygments
3550 (package-with-python2 python-pygments))
3552 (define-public python-bumpversion
3554 (name "python-bumpversion")
3559 (uri (pypi-uri "bumpversion" version))
3562 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3563 (build-system python-build-system)
3564 (home-page "https://github.com/peritus/bumpversion")
3565 (synopsis "Tool to bump software version")
3566 (description "This tool provides a command-line interface (CLI) to bump a
3567 software version simply.")
3568 (license license:expat)))
3570 (define-public python-deprecated
3572 (name "python-deprecated")
3578 (url "https://github.com/tantale/deprecated")
3579 (commit (string-append "v" version))))
3580 (file-name (git-file-name name version))
3583 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3584 (build-system python-build-system)
3586 `(#:phases (modify-phases %standard-phases
3589 (invoke "pytest"))))))
3591 `(("python-wrapt" ,python-wrapt)))
3593 `(("python-bumpversion" ,python-bumpversion)
3594 ("python-pytest" ,python-pytest)
3595 ("python-pytest-cov" ,python-pytest-cov)
3596 ("python-sphinx" ,python-sphinx)
3597 ("python-tox" ,python-tox)))
3598 (home-page "https://github.com/tantale/deprecated")
3599 (synopsis "Python decorator to deprecate classes, functions or methods")
3600 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3601 to deprecate classes, functions or methods.")
3602 (license license:expat)))
3604 (define-public python-pygithub
3606 (name "python-pygithub")
3609 ;; We fetch from the Git repo because there are no tests in the PyPI
3614 (url "https://github.com/PyGithub/PyGithub")
3615 (commit (string-append "v" version))))
3616 (file-name (git-file-name name version))
3618 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3619 (build-system python-build-system)
3621 `(#:phases (modify-phases %standard-phases
3622 ;; Some tests rely on the network.
3623 (add-after 'unpack 'disable-failing-tests
3625 (substitute* "tests/Issue142.py"
3626 (("testDecodeJson") "disabled_testDecodeJson"))
3628 (add-before 'check 'prepare-for-tests
3630 (for-each (lambda (f)
3632 (find-files "./tests"))
3633 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3634 (setenv "PYTHONPATH"
3635 (string-append "./tests:" (getenv "PYTHONPATH")))
3638 `(("python-deprecated" ,python-deprecated)
3639 ("python-pyjwt" ,python-pyjwt)
3640 ("python-requests" ,python-requests)))
3641 (native-inputs `(("python-httpretty" ,python-httpretty)))
3642 (home-page "https://pygithub.readthedocs.io/en/latest/")
3643 (synopsis "Python library for the GitHub API")
3644 (description "This library allows managing GitHub resources such as
3645 repositories, user profiles, and organizations in your Python applications,
3646 using version 3 of the GitHub application programming interface (API).")
3647 (license license:lgpl3+)))
3649 (define-public python-rellu
3651 (name "python-rellu")
3656 (uri (pypi-uri "rellu" version))
3659 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3660 (build-system python-build-system)
3662 `(("python-invoke" ,python-invoke)
3663 ("python-pygithub" ,python-pygithub)))
3664 (home-page "https://github.com/robotframework/rellu")
3665 (synopsis "Utilities to create PyPI releases")
3666 (description "This collection of utilities contains tooling and templates
3667 to assist in creating releases on GitHub and publishing them on PyPI. It is
3668 designed to be used by Robot Framework and tools and libraries in its
3669 ecosystem, but can naturally be used also by other projects.")
3670 (license license:asl2.0)))
3672 (define-public python-robotframework
3674 (name "python-robotframework")
3676 ;; There are no tests in the PyPI archive.
3681 (url "https://github.com/robotframework/robotframework")
3682 (commit (string-append "v" version))))
3683 (file-name (git-file-name name version))
3685 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3686 (patches (search-patches
3687 "python-robotframework-honor-source-date-epoch.patch"))))
3688 (build-system python-build-system)
3690 `(#:phases (modify-phases %standard-phases
3691 (add-before 'build 'build-and-install-doc
3692 (lambda* (#:key outputs #:allow-other-keys)
3693 (let* ((doc-output (assoc-ref outputs "doc"))
3694 (doc (string-append doc-output "/share/"
3695 ,name "-" ,version "/")))
3696 (invoke "invoke" "library-docs" "all")
3698 (copy-recursively "doc/libraries"
3699 (string-append doc "/libraries"))
3702 (lambda* (#:key inputs #:allow-other-keys)
3703 ;; Some tests require timezone data. Otherwise, they
3704 ;; look up /etc/localtime, which doesn't exist, and fail
3707 ;; OverflowError: mktime argument out of range
3709 (string-append (assoc-ref inputs "tzdata")
3711 (setenv "TZ" "Europe/Paris")
3713 (invoke "python" "utest/run.py"))))))
3715 `(("python-invoke" ,python-invoke)
3716 ("python-rellu" ,python-rellu)
3717 ("python:tk" ,python "tk") ;used when building the HTML doc
3718 ("tzdata" ,tzdata-for-tests)))
3719 (outputs '("out" "doc"))
3720 (home-page "https://robotframework.org")
3721 (synopsis "Generic automation framework")
3722 (description "Robot Framework is a generic automation framework for
3723 acceptance testing, acceptance test driven development (ATDD), and robotic
3724 process automation (RPA).")
3725 (license license:asl2.0)))
3727 (define-public python-robotframework-lint
3728 ;; There is no properly tagged release; the commit below seems to correspond
3729 ;; to the 0.9 stable release available from PyPI. The tests are not
3730 ;; included in the PyPI archive, so we fetch the sources from the upstream
3732 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3735 (name "python-robotframework-lint")
3736 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3742 (url "https://github.com/boakley/robotframework-lint")
3744 (file-name (git-file-name name version))
3747 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3748 (build-system python-build-system)
3751 (modify-phases %standard-phases
3754 (invoke "python" "-m" "robot" "-A"
3755 "tests/conf/default.args" "tests"))))))
3757 `(("python-robotframework" ,python-robotframework)))
3758 (home-page "https://github.com/boakley/robotframework-lint/")
3759 (synopsis "Static analysis tool (linter) for Robot Framework")
3760 (description "This package provides the @code{rflint} command-line
3761 utility, a static analysis tool (linter) for Robot Framework source files.")
3762 (license license:asl2.0))))
3764 (define-public python-robotframework-sshlibrary
3766 (name "python-robotframework-sshlibrary")
3768 ;; There are no tests in the PyPI archive.
3773 (url "https://github.com/robotframework/SSHLibrary")
3774 (commit (string-append "v" version))))
3775 (file-name (git-file-name name version))
3778 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3779 (build-system python-build-system)
3782 (modify-phases %standard-phases
3783 (add-before 'build 'build-and-install-doc
3784 (lambda* (#:key outputs #:allow-other-keys)
3785 (let* ((doc-output (assoc-ref outputs "doc"))
3786 (doc (string-append doc-output "/share/"
3787 ,name "-" ,version "/")))
3788 (invoke "chmod" "-R" "+w" "docs")
3789 (invoke "invoke" "kw-docs" "project-docs")
3791 (for-each delete-file (find-files "docs" "\\.rst"))
3792 (copy-recursively "docs" doc)
3796 ;; Some tests require an SSH server; we remove them.
3797 (delete-file "utest/test_client_api.py")
3798 (delete-file "utest/test_scp.py")
3799 (invoke "python" "utest/run.py"))))))
3801 `(("python-robotframework" ,python-robotframework)
3802 ("python-paramiko" ,python-paramiko)
3803 ("python-scp" ,python-scp)))
3805 `(("openssh" ,openssh)
3807 ;; To generate the documentation
3808 ("python-docutils" ,python-docutils)
3809 ("python-invoke" ,python-invoke)
3810 ("python-pygments" ,python-pygments)
3811 ("python-rellu" ,python-rellu)))
3812 (outputs '("out" "doc"))
3813 (home-page "https://github.com/robotframework/SSHLibrary")
3814 (synopsis "Robot Framework library for SSH and SFTP")
3815 (description "SSHLibrary is a Robot Framework library providing support
3816 for SSH and SFTP. It has the following main usages:
3818 @item Executing commands on the remote machine, either blocking or non-blocking.
3819 @item Writing and reading in an interactive shell.
3820 @item Transferring files and directories over SFTP.
3821 @item Ensuring that files and directories exist on the remote machine.
3823 (license license:asl2.0)))
3825 (define-public python-rstr
3827 (name "python-rstr")
3832 (uri (pypi-uri "rstr" version))
3835 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3836 (build-system python-build-system)
3838 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3839 (synopsis "Generate random strings in Python")
3840 (description "This package provides a python module for generating
3841 random strings of various types. It could be useful for fuzz testing,
3842 generating dummy data, or other applications. It has no dependencies
3843 outside the standard library.")
3844 (license license:bsd-3)))
3846 (define-public python-scp
3853 (uri (pypi-uri "scp" version))
3856 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3857 (build-system python-build-system)
3859 '(#:tests? #f)) ;tests require an SSH server
3861 `(("python-paramiko" ,python-paramiko)))
3862 (home-page "https://github.com/jbardin/scp.py")
3863 (synopsis "SCP protocol module for Python and Paramiko")
3864 (description "The scp module extends the Paramiko library to send and
3865 receive files via the SCP1 protocol, as implemented by the OpenSSH
3866 @command{scp} program.")
3867 (license license:gpl2+)))
3869 (define-public python-rst.linker
3871 (name "python-rst.linker")
3876 (uri (pypi-uri "rst.linker" version))
3878 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3879 (build-system python-build-system)
3881 `(("python-dateutil" ,python-dateutil)
3882 ("python-six" ,python-six)))
3884 `(("python-setuptools-scm" ,python-setuptools-scm)))
3885 ;; Test would require path.py, which would introduce a cyclic dependence.
3886 (arguments `(#:tests? #f))
3887 ;; Note: As of version 1.7 the documentation is not worth building.
3888 (home-page "https://github.com/jaraco/rst.linker")
3889 (synopsis "Sphinx plugin to add links and timestamps")
3890 (description "rst.linker automatically replaces text by a
3891 reStructuredText external reference or timestamps. It's primary purpose is to
3892 augment the changelog, but it can be used for other documents, too.")
3893 (license license:expat)))
3895 (define-public python2-rst.linker
3896 (package-with-python2 python-rst.linker))
3898 (define-public python-feedgenerator
3900 (name "python-feedgenerator")
3905 (uri (pypi-uri "feedgenerator" version))
3908 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3909 (modules '((guix build utils)))
3912 ;; Remove pre-compiled .pyc files from source.
3913 (for-each delete-file-recursively
3914 (find-files "." "__pycache__" #:directories? #t))
3915 (for-each delete-file (find-files "." "\\.pyc$"))
3917 (build-system python-build-system)
3919 `(("python-pytz" ,python-pytz)
3920 ("python-six" ,python-six)))
3921 (home-page "https://github.com/getpelican/feedgenerator")
3923 "Standalone version of Django's Atom/RSS feed generator")
3925 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3926 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3927 (license license:bsd-3)))
3929 (define-public python2-feedgenerator
3930 (package-with-python2 python-feedgenerator))
3932 (define-public python-toml
3934 (name "python-toml")
3939 (uri (pypi-uri "toml" version))
3942 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3943 (build-system python-build-system)
3945 `(#:tests? #f)) ;no tests suite in release
3946 (home-page "https://github.com/uiri/toml")
3947 (synopsis "Library for TOML")
3949 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3950 Language (TOML) configuration files.")
3951 (license license:expat)))
3953 (define-public python-jsonrpc-server
3955 (name "python-jsonrpc-server")
3960 (uri (pypi-uri "python-jsonrpc-server" version))
3963 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
3964 (build-system python-build-system)
3966 `(("python-mock" ,python-mock)
3967 ("python-pytest" ,python-pytest)
3968 ("python-ujson" ,python-ujson-1)))
3970 "https://github.com/palantir/python-jsonrpc-server")
3971 (synopsis "JSON RPC 2.0 server library")
3973 "This package provides a JSON RPC 2.0 server library for Python.")
3974 (license license:expat)))
3976 (define-public python-pydantic
3978 (name "python-pydantic")
3984 (url "https://github.com/samuelcolvin/pydantic")
3985 (commit (string-append "v" version))))
3986 (file-name (git-file-name name version))
3988 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
3989 (build-system python-build-system)
3992 (modify-phases %standard-phases
3993 ;; Reported upstream:
3994 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
3995 ;; Disable the faulty test as the fix is unclear.
3996 (add-before 'check 'disable-test
3998 (substitute* "tests/test_validators.py"
3999 (("test_assert_raises_validation_error")
4000 "_test_assert_raises_validation_error"))
4003 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4005 `(("python-pytest" ,python-pytest)))
4006 (home-page "https://github.com/samuelcolvin/pydantic")
4007 (synopsis "Python data validation and settings management")
4009 "Pydantic enforces type hints at runtime, and provides user friendly
4010 errors when data is invalid.")
4011 (license license:expat)))
4013 (define-public python-pydocstyle
4015 (name "python-pydocstyle")
4020 (uri (pypi-uri "pydocstyle" version))
4023 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4024 (build-system python-build-system)
4026 `(("python-six" ,python-six)
4027 ("python-snowballstemmer" ,python-snowballstemmer)))
4029 "https://github.com/PyCQA/pydocstyle/")
4030 (synopsis "Python docstring style checker")
4032 "This package provides a style checker for the Python Language
4034 (license license:expat)))
4036 (define-public python-language-server
4038 (name "python-language-server")
4043 (uri (pypi-uri "python-language-server" version))
4046 "0gfjjlj7yg2nf8wkbrshwaljkwlqja4n7s1x949f495anmkg8vxr"))))
4047 (build-system python-build-system)
4049 `(("python-pluggy" ,python-pluggy)
4050 ("python-jsonrpc-server" ,python-jsonrpc-server)
4051 ("python-jedi" ,python-jedi)
4052 ("python-yapf" ,python-yapf)
4053 ("python-pyflakes" ,python-pyflakes)
4054 ("python-pydocstyle" ,python-pydocstyle)
4055 ("python-pycodestyle" ,python-pycodestyle)
4056 ("python-mccabe" ,python-mccabe)
4057 ("python-rope" ,python-rope)
4058 ("python-autopep8" ,python-autopep8)
4059 ("python-flake8" ,python-flake8)
4060 ("python-pylint" ,python-pylint)))
4061 (home-page "https://github.com/palantir/python-language-server")
4062 (synopsis "Python implementation of the Language Server Protocol")
4064 "The Python Language Server (pyls) is an implementation of the Python 3
4065 language specification for the Language Server Protocol (LSP). This tool is
4066 used in text editing environments to provide a complete and integrated
4067 feature-set for programming Python effectively.")
4068 (license license:expat)))
4070 (define-public python-pathspec
4072 (name "python-pathspec")
4077 (uri (pypi-uri "pathspec" version))
4080 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4081 (build-system python-build-system)
4082 (home-page "https://github.com/cpburnz/python-path-specification")
4083 (synopsis "Utility library for gitignore style pattern matching of file paths")
4085 "This package provides a utility library for gitignore style pattern
4086 matching of file paths.")
4087 (license license:mpl2.0)))
4089 (define-public python-black
4091 (name "python-black")
4096 (uri (pypi-uri "black" version))
4099 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4100 (build-system python-build-system)
4103 (modify-phases %standard-phases
4104 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4106 (let ((python3 (which "python3")))
4107 (substitute* '("tests/data/fmtonoff.py"
4108 "tests/data/string_prefixes.py"
4109 "tests/data/function.py"
4110 "tests/data/python37.py")
4111 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4112 (string-append "#!" python3 (if (string? minor-version)
4116 (add-after 'unpack 'disable-broken-tests
4117 (lambda* (#:key outputs inputs #:allow-other-keys)
4118 ;; Make installed package available for running the tests
4119 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4120 ":" (getenv "PATH")))
4122 ;; These tests are supposed to be skipped when the blackd
4123 ;; dependencies are missing, but this doesn't quite work.
4124 (substitute* "tests/test_black.py"
4125 (("( *)class BlackDTestCase.*" match indent)
4126 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4127 indent "class BlackDTestCase(unittest.TestCase):\n"))
4128 (("web.Application") "False")
4129 (("@unittest_run_loop") ""))
4131 ;; Patching the above file breaks the self test
4132 (substitute* "tests/test_black.py"
4133 (("( *)def test_self" match indent)
4134 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4136 (substitute* "tests/test_black.py"
4137 (("( *)def test_python38" match indent)
4138 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4141 `(("python-click" ,python-click)
4142 ("python-attrs" ,python-attrs)
4143 ("python-appdirs" ,python-appdirs)
4144 ("python-pathspec" ,python-pathspec)
4145 ("python-mypy-extensions" ,python-mypy-extensions)
4146 ("python-regex" ,python-regex)
4147 ("python-toml" ,python-toml)
4148 ("python-typed-ast" ,python-typed-ast)
4149 ("python-typing-extensions" ,python-typing-extensions)))
4151 `(("python-setuptools-scm" ,python-setuptools-scm)))
4152 (home-page "https://github.com/ambv/black")
4153 (synopsis "The uncompromising code formatter")
4154 (description "Black is the uncompromising Python code formatter.")
4155 (license license:expat)))
4157 (define-public python-black-macchiato
4159 (name "python-black-macchiato")
4164 (uri (pypi-uri "black-macchiato" version))
4167 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4168 (build-system python-build-system)
4170 `(("python-black" ,python-black)))
4171 (home-page "https://github.com/wbolster/black-macchiato")
4172 (synopsis "Partial @code{python-black} formatting")
4174 "This package is built on top the @{python-black} code formatter to
4175 enable formatting of partial files.")
4176 (license license:bsd-3)))
4178 (define-public python-blinker
4180 (name "python-blinker")
4185 (uri (pypi-uri "blinker" version))
4188 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4189 (build-system python-build-system)
4190 (home-page "https://pythonhosted.org/blinker/")
4191 (synopsis "Fast, simple object-to-object and broadcast signaling")
4193 "Blinker provides a fast dispatching system that allows any number of
4194 interested parties to subscribe to events, or \"signals\".")
4195 (license license:expat)))
4197 (define-public python2-blinker
4198 (package-with-python2 python-blinker))
4200 (define-public pelican
4207 (uri (pypi-uri "pelican" version))
4210 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4211 (build-system python-build-system)
4213 `(("python-blinker" ,python-blinker)
4214 ("python-dateutil" ,python-dateutil)
4215 ("python-docutils" ,python-docutils)
4216 ("python-feedgenerator" ,python-feedgenerator)
4217 ("python-jinja2" ,python-jinja2)
4218 ("python-markdown" ,python-markdown)
4219 ("python-pygments" ,python-pygments)
4220 ("python-pytz" ,python-pytz)
4221 ("python-six" ,python-six)
4222 ("python-unidecode" ,python-unidecode)))
4223 (home-page "https://getpelican.com/")
4225 `(;; XXX Requires a lot more packages to do unit tests :P
4227 (synopsis "Python-based static site publishing system")
4229 "Pelican is a tool to generate a static blog from reStructuredText,
4230 Markdown input files, and more. Pelican uses Jinja2 for templating
4231 and is very extensible.")
4232 (license license:agpl3+)))
4234 (define-public mallard-ducktype
4236 (name "mallard-ducktype")
4241 ;; git-reference because tests are not included in pypi source tarball
4242 ;; https://issues.guix.gnu.org/issue/36755#2
4244 (url "https://github.com/projectmallard/mallard-ducktype")
4246 (file-name (git-file-name name version))
4249 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4250 (build-system python-build-system)
4253 (modify-phases %standard-phases
4256 (with-directory-excursion "tests"
4257 (invoke "sh" "runtests")))))))
4258 (home-page "http://projectmallard.org")
4259 (synopsis "Convert Ducktype to Mallard documentation markup")
4261 "Ducktype is a lightweight syntax that can represent all the semantics
4262 of the Mallard XML documentation system. Ducktype files can be converted to
4263 Mallard using the @command{ducktype} tool. The yelp-tools package
4264 provides additional functionality on the produced Mallard documents.")
4265 (license license:expat)))
4267 (define-public python-cython
4269 (name "python-cython")
4274 (uri (pypi-uri "Cython" version))
4277 "1wnaz40hdw4mg5acz5gqb6bhjhn4cvfxg0xdzfy7aa6qn665hqb3"))))
4278 (build-system python-build-system)
4279 ;; we need the full python package and not just the python-wrapper
4280 ;; because we need libpython3.3m.so
4282 `(("python" ,python)))
4285 (modify-phases %standard-phases
4286 (add-before 'check 'set-HOME
4287 ;; some tests require access to "$HOME/.cython"
4288 (lambda _ (setenv "HOME" "/tmp") #t))
4291 ;; Disable compiler optimizations to greatly reduce the running
4292 ;; time of the test suite.
4293 (setenv "CFLAGS" "-O0")
4295 (invoke "python" "runtests.py" "-vv"
4296 "-j" (number->string (parallel-job-count))
4297 ;; XXX: On 32-bit architectures, running the parallel tests
4298 ;; fails on many-core systems, see
4299 ;; <https://github.com/cython/cython/issues/2807>.
4300 ,@(if (not (target-64bit?))
4301 '("-x" "run.parallel")
4303 (home-page "https://cython.org/")
4304 (synopsis "C extensions for Python")
4305 (description "Cython is an optimising static compiler for both the Python
4306 programming language and the extended Cython programming language. It makes
4307 writing C extensions for Python as easy as Python itself.")
4308 (license license:asl2.0)
4309 (properties `((python2-variant . ,(delay python2-cython))))))
4311 (define-public python2-cython
4312 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4315 (name "python2-cython")
4317 `(("python-2" ,python-2))) ;this is not automatically changed
4319 (substitute-keyword-arguments (package-arguments base)
4321 `(modify-phases ,phases
4322 (add-before 'check 'adjust-test_embed
4324 (substitute* "runtests.py"
4325 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4326 ;; so it can give the right -L flag to GCC when embedding static
4327 ;; builds of Python. It is unaware that the Python "config"
4328 ;; directory (where the static library lives) was renamed in
4329 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4330 ;; which works fine, because that is where the shared library is.
4332 ;; It also appears to be unaware that the Makefile in Demos/embed
4333 ;; already unconditionally pass the static library location to GCC,
4334 ;; after checking sysconfig.get_config_var('LIBPL).
4336 ;; The effect is that the linker is unable to resolve libexpat
4337 ;; symbols when building for Python 2, because neither the Python 2
4338 ;; shared library nor Expat is available. To fix it, we can either
4339 ;; add Expat as an input and make it visible to the linker, or just
4340 ;; prevent it from overriding the Python shared library location.
4341 ;; The end result is identical, so we take the easy route.
4342 ((" or libname not in os\\.listdir\\(libdir\\)")
4346 ;; The RPython toolchain currently does not support Python 3.
4347 (define-public python2-rpython
4349 (name "python2-rpython")
4354 (uri (pypi-uri "rpython" version))
4357 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4358 (build-system python-build-system)
4359 (arguments `(#:python ,python-2))
4361 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4362 (home-page "https://rpython.readthedocs.org")
4363 (synopsis "Framework for implementing interpreters and virtual machines")
4364 (description "RPython is a translation and support framework for
4365 producing implementations of dynamic languages, emphasizing a clean separation
4366 between language specification and implementation aspects.")
4367 (license license:expat)))
4369 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4370 ;; python-scipy still build, as these three packages are often used together.
4371 (define-public python-numpy
4373 (name "python-numpy")
4379 "https://github.com/numpy/numpy/releases/download/v"
4380 version "/numpy-" version ".tar.gz"))
4383 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4384 (build-system python-build-system)
4386 `(("openblas" ,openblas)
4387 ("lapack" ,lapack)))
4389 `(("python-cython" ,python-cython)
4390 ("python-pytest" ,python-pytest)
4391 ("gfortran" ,gfortran)))
4394 (modify-phases %standard-phases
4395 (add-before 'build 'configure-blas-lapack
4396 (lambda* (#:key inputs #:allow-other-keys)
4397 (call-with-output-file "site.cfg"
4401 libraries = openblas
4402 library_dirs = ~a/lib
4403 include_dirs = ~a/include
4405 # backslash-n to make emacs happy
4407 lapack_libs = lapack
4408 library_dirs = ~a/lib
4409 include_dirs = ~a/include
4411 (assoc-ref inputs "openblas")
4412 (assoc-ref inputs "openblas")
4413 (assoc-ref inputs "lapack")
4414 (assoc-ref inputs "lapack"))))
4416 (add-before 'build 'fix-executable-paths
4417 (lambda* (#:key inputs #:allow-other-keys)
4418 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4419 ;; instead of /bin/sh.
4420 (substitute* "numpy/distutils/exec_command.py"
4421 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4422 (string-append match-start (assoc-ref inputs "bash") match-end)))
4423 ;; Use "gcc" executable, not "cc".
4424 (substitute* "numpy/distutils/system_info.py"
4425 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4426 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4428 ;; Tests can only be run after the library has been installed and not
4429 ;; within the source directory.
4431 (add-after 'install 'check
4432 (lambda* (#:key outputs inputs #:allow-other-keys)
4433 ;; Make installed package available for running the tests
4434 (add-installed-pythonpath inputs outputs)
4435 ;; Make sure "f2py" etc is found.
4436 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4437 ":" (getenv "PATH")))
4438 (with-directory-excursion "/tmp"
4439 (invoke "python" "-c"
4440 "import numpy; numpy.test(verbose=2)")))))))
4441 (home-page "https://numpy.org")
4442 (synopsis "Fundamental package for scientific computing with Python")
4443 (description "NumPy is the fundamental package for scientific computing
4444 with Python. It contains among other things: a powerful N-dimensional array
4445 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4446 and Fortran code, useful linear algebra, Fourier transform, and random number
4448 (properties `((python2-variant . ,(delay python2-numpy))))
4449 (license license:bsd-3)))
4451 ;; Numpy 1.16.x are the last versions that support Python 2.
4452 (define-public python2-numpy
4453 (let ((numpy (package-with-python2
4454 (strip-python2-variant python-numpy))))
4461 "https://github.com/numpy/numpy/releases/download/v"
4462 version "/numpy-" version ".tar.gz"))
4465 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4467 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4468 ;; interest only for legacy code going back to NumPy's predecessor
4470 (define-public python2-numpy-1.8
4471 (package (inherit python2-numpy)
4477 (url "https://github.com/numpy/numpy")
4478 (commit (string-append "v" version))))
4479 (file-name (git-file-name "numpy" version))
4482 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4484 (substitute-keyword-arguments (package-arguments python2-numpy)
4486 `(modify-phases ,phases
4487 (replace 'configure-blas-lapack
4488 (lambda* (#:key inputs #:allow-other-keys)
4489 (call-with-output-file "site.cfg"
4493 libraries = openblas,lapack
4494 library_dirs = ~a/lib:~a/lib
4495 include_dirs = ~a/include:~a/include
4497 (assoc-ref inputs "openblas")
4498 (assoc-ref inputs "lapack")
4499 (assoc-ref inputs "openblas")
4500 (assoc-ref inputs "lapack"))))
4503 `(("python2-nose" ,python2-nose)))
4504 (description "NumPy is the fundamental package for scientific computing
4505 with Python. It contains among other things: a powerful N-dimensional array
4506 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4507 and Fortran code, useful linear algebra, Fourier transform, and random number
4508 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4509 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4511 (license license:bsd-3)))
4513 (define-public python-munch
4515 (name "python-munch")
4520 (uri (pypi-uri "munch" version))
4523 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4524 (build-system python-build-system)
4525 (home-page "https://github.com/Infinidat/munch")
4526 (synopsis "Dot-accessible dictionary")
4527 (description "Munch is a dot-accessible dictionary similar to JavaScript
4529 (license license:expat)))
4531 (define-public python2-munch
4532 (package-with-python2 python-munch))
4534 (define-public python-colormath
4536 (name "python-colormath")
4541 (uri (pypi-uri "colormath" version))
4544 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4545 (build-system python-build-system)
4547 `(("python-networkx" ,python-networkx)
4548 ("python-numpy" ,python-numpy)))
4549 (home-page "https://github.com/gtaylor/python-colormath")
4550 (synopsis "Color math and conversion library")
4552 "This is a Python library for color math and conversions.")
4553 (license license:bsd-3)))
4555 (define-public python2-colormath
4556 (package-with-python2 python-colormath))
4558 (define-public python-spectra
4560 (name "python-spectra")
4565 (uri (pypi-uri "spectra" version))
4568 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4569 (build-system python-build-system)
4572 (modify-phases %standard-phases
4574 (lambda _ (invoke "nosetests" "-v"))))))
4576 `(("python-colormath" ,python-colormath)))
4578 `(("python-nose" ,python-nose)))
4579 (home-page "https://github.com/jsvine/spectra")
4580 (synopsis "Color scales and color conversion")
4582 "This package provides a Python library intended to make color math,
4583 color scales, and color space conversion easy. It has support for:
4588 @item Color blending
4589 @item Brightening/darkening colors
4590 @item Saturating/desaturating colors
4591 @item Conversion to/from multiple color spaces.
4593 (license license:expat)))
4595 (define-public python2-spectra
4596 (package-with-python2 python-spectra))
4598 (define-public python-numpy-documentation
4600 (name "python-numpy-documentation")
4601 (version (package-version python-numpy))
4602 (source (package-source python-numpy))
4603 (build-system python-build-system)
4605 `(("python-matplotlib" ,python-matplotlib)
4606 ("python-numpy" ,python-numpy)
4607 ("pkg-config" ,pkg-config)
4608 ("python-sphinx" ,python-sphinx)
4609 ("python-numpydoc" ,python-numpydoc)
4610 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4612 texlive-generic-ifxetex
4613 texlive-generic-pdftex
4615 texlive-latex-capt-of
4617 texlive-latex-environ
4618 texlive-latex-eqparbox
4619 texlive-latex-etoolbox
4620 texlive-latex-expdlist
4621 texlive-latex-fancyhdr
4622 texlive-latex-fancyvrb
4623 texlive-latex-fncychap
4625 texlive-latex-framed
4626 texlive-latex-geometry
4627 texlive-latex-graphics
4628 texlive-latex-hyperref
4629 texlive-latex-mdwtools
4630 texlive-latex-multirow
4631 texlive-latex-needspace
4632 texlive-latex-oberdiek
4633 texlive-latex-parskip
4634 texlive-latex-preview
4635 texlive-latex-tabulary
4636 texlive-latex-threeparttable
4637 texlive-latex-titlesec
4638 texlive-latex-trimspaces
4640 texlive-latex-upquote
4642 texlive-latex-varwidth
4643 texlive-latex-wrapfig)))
4644 ("texinfo" ,texinfo)
4646 ("scipy-sphinx-theme"
4647 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4650 (url "https://github.com/scipy/scipy-sphinx-theme")
4651 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4654 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4655 ,@(package-native-inputs python-numpy)))
4657 `(#:tests? #f ; we're only generating the documentation
4659 (modify-phases %standard-phases
4662 (lambda* (#:key inputs outputs #:allow-other-keys)
4663 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4665 data "/doc/" ,name "-"
4666 ,(package-version python-numpy)))
4667 (info-reader (string-append data "/info"))
4668 (html (string-append doc "/html"))
4669 (scipy-sphinx-theme "scipy-sphinx-theme")
4670 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4671 (pyver ,(string-append "PYVER=")))
4673 ;; FIXME: this is needed to for texlive-union to generate
4674 ;; fonts, which are not found.
4675 (setenv "HOME" "/tmp")
4677 (with-directory-excursion "doc"
4678 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4680 (invoke "make" "html" pyver)
4681 (invoke "make" "latex" "PAPER=a4" pyver)
4682 (invoke "make" "-C" "build/latex"
4683 "all-pdf" "PAPER=a4" pyver)
4684 ;; FIXME: Generation of the info file fails.
4685 ;; (invoke "make" "info" pyver)
4687 ;; (copy-file "build/texinfo/numpy.info"
4688 ;; (string-append info "/numpy.info"))
4689 (for-each (lambda (file)
4690 (copy-file (string-append "build/latex" file)
4691 (string-append doc file)))
4692 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4693 (with-directory-excursion "build/html"
4694 (for-each (lambda (file)
4695 (let* ((dir (dirname file))
4696 (tgt-dir (string-append html "/" dir)))
4697 (unless (equal? "." dir)
4699 (install-file file html)))
4700 (find-files "." ".*")))))
4702 (home-page (package-home-page python-numpy))
4703 (synopsis "Documentation for the python-numpy package")
4704 (description (package-description python-numpy))
4705 (license (package-license python-numpy))))
4707 (define-public python2-numpy-documentation
4708 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4710 (inherit numpy-documentation)
4711 (native-inputs `(("python2-functools32" ,python2-functools32)
4712 ,@(package-native-inputs numpy-documentation))))))
4714 (define-public python-pygit2
4716 (name "python-pygit2")
4721 (uri (pypi-uri "pygit2" version))
4723 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4724 (build-system python-build-system)
4726 '(#:tests? #f)) ; tests don't run correctly in our environment
4728 `(("python-cached-property" ,python-cached-property)
4729 ("python-cffi" ,python-cffi)
4730 ("libgit2" ,libgit2)))
4732 `(("python-pytest" ,python-pytest)))
4733 (home-page "https://github.com/libgit2/pygit2")
4734 (synopsis "Python bindings for libgit2")
4735 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4736 library, libgit2 implements Git plumbing.")
4737 ;; GPL2.0 only, with linking exception.
4738 (license license:gpl2)))
4740 (define-public python-patiencediff
4742 (name "python-patiencediff")
4747 (uri (pypi-uri "patiencediff" version))
4750 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4751 (build-system python-build-system)
4752 (home-page "https://www.breezy-vcs.org/")
4753 (synopsis "Python implementation of the patiencediff algorithm")
4755 "This package contains a Python implementation of the @code{patiencediff}
4756 algorithm. Patiencediff provides a good balance of performance, nice output for
4757 humans, and implementation simplicity.")
4758 (license license:gpl2)))
4760 (define-public python-pyparsing
4762 (name "python-pyparsing")
4767 (uri (pypi-uri "pyparsing" version))
4769 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4770 (build-system python-build-system)
4771 (outputs '("out" "doc"))
4773 `(#:tests? #f ; no test target
4775 (modify-phases %standard-phases
4776 (add-after 'install 'install-doc
4777 (lambda* (#:key outputs #:allow-other-keys)
4778 (let* ((doc (string-append (assoc-ref outputs "doc")
4779 "/share/doc/" ,name "-" ,version))
4780 (html-doc (string-append doc "/html"))
4781 (examples (string-append doc "/examples")))
4787 (install-file file tgt))
4788 (find-files dir ".*")))
4789 (list "docs" "htmldoc" "examples")
4790 (list doc html-doc examples))
4792 (home-page "https://github.com/pyparsing/pyparsing")
4793 (synopsis "Python parsing class library")
4795 "The pyparsing module is an alternative approach to creating and
4796 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4797 of regular expressions. The pyparsing module provides a library of classes
4798 that client code uses to construct the grammar directly in Python code.")
4799 (license license:expat)))
4801 (define-public python2-pyparsing
4802 (package-with-python2 python-pyparsing))
4804 (define-public python-pyparsing-2.4.7
4806 (inherit python-pyparsing)
4811 (uri (pypi-uri "pyparsing" version))
4813 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4815 (define-public python-numpydoc
4817 (name "python-numpydoc")
4822 (uri (pypi-uri "numpydoc" version))
4825 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4826 (build-system python-build-system)
4828 `(("python-sphinx" ,python-sphinx)))
4830 `(("python-nose" ,python-nose)))
4831 (home-page "https://pypi.org/project/numpydoc/")
4833 "Numpy's Sphinx extensions")
4835 "Sphinx extension to support docstrings in Numpy format.")
4836 (license license:bsd-2)))
4838 (define-public python2-numpydoc
4839 (package-with-python2 python-numpydoc))
4841 (define-public python-numexpr
4843 (name "python-numexpr")
4848 (uri (pypi-uri "numexpr" version))
4851 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4852 (build-system python-build-system)
4853 (arguments `(#:tests? #f)) ; no tests included
4855 `(("python-numpy" ,python-numpy)))
4856 (home-page "https://github.com/pydata/numexpr")
4857 (synopsis "Fast numerical expression evaluator for NumPy")
4859 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4860 expressions that operate on arrays are accelerated and use less memory than
4861 doing the same calculation in Python. In addition, its multi-threaded
4862 capabilities can make use of all your cores, which may accelerate
4863 computations, most specially if they are not memory-bounded (e.g. those using
4864 transcendental functions).")
4865 (license license:expat)))
4867 (define-public python2-numexpr
4868 (package-with-python2 python-numexpr))
4870 (define-public python-cycler
4872 (name "python-cycler")
4876 (uri (pypi-uri "cycler" version))
4879 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4880 (build-system python-build-system)
4882 ;; XXX: The current version requires 'coveralls' which we don't have.
4883 ;; Enable this for the next release which uses 'python-pytest'.
4886 `(("python-six" ,python-six)))
4887 (home-page "http://matplotlib.org/cycler/")
4888 (synopsis "Composable keyword argument iterator")
4890 "When using @code{matplotlib} and plotting more than one line, it is
4891 common to want to be able to want to be able to cycle over one or more artist
4892 styles; but the plotting logic can quickly become involved.
4893 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4894 @code{Cycler} class was developed.")
4895 (license license:bsd-3)))
4897 (define-public python2-cycler
4898 (package-with-python2 python-cycler))
4900 (define-public python-colorspacious
4902 (name "python-colorspacious")
4908 (url "https://github.com/njsmith/colorspacious")
4909 (commit (string-append "v" version))))
4910 (file-name (git-file-name name version))
4912 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4913 (build-system python-build-system)
4915 `(("python-numpy" ,python-numpy)))
4917 `(("python-nose" ,python-nose)))
4920 (modify-phases %standard-phases
4923 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4924 (home-page "https://github.com/njsmith/colorspacious")
4925 (synopsis "Python library for colorspace conversions")
4926 (description "@code{colorspacious} is a Python library that lets you
4927 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4928 (license license:expat)))
4930 (define-public python2-colorspacious
4931 (package-with-python2 python-colorspacious))
4933 (define-public python-matplotlib
4935 (name "python-matplotlib")
4940 (uri (pypi-uri "matplotlib" version))
4943 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4944 (build-system python-build-system)
4945 (propagated-inputs ; the following packages are all needed at run time
4946 `(("python-cycler" ,python-cycler)
4947 ("python-kiwisolver" ,python-kiwisolver)
4948 ("python-pyparsing" ,python-pyparsing)
4949 ("python-pygobject" ,python-pygobject)
4950 ("gobject-introspection" ,gobject-introspection)
4951 ("python-tkinter" ,python "tk")
4952 ("python-dateutil" ,python-dateutil)
4953 ("python-numpy" ,python-numpy)
4954 ("python-pillow" ,python-pillow)
4955 ("python-pytz" ,python-pytz)
4956 ("python-six" ,python-six)
4957 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4958 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4959 ;; object. For this reason we need to import both libraries.
4960 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4961 ("python-pycairo" ,python-pycairo)
4962 ("python-cairocffi" ,python-cairocffi)))
4964 `(("libpng" ,libpng)
4965 ("imagemagick" ,imagemagick)
4966 ("freetype" ,freetype)
4969 ;; FIXME: Add backends when available.
4970 ;("python-wxpython" ,python-wxpython)
4974 `(("pkg-config" ,pkg-config)
4975 ("python-pytest" ,python-pytest)
4976 ("python-mock" ,python-mock)
4981 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4984 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4987 (modify-phases %standard-phases
4988 ;; XXX We disable all image comparison tests because we're using a
4989 ;; newer version of FreeType than matplotlib expects. This leads to
4990 ;; minor differences throughout the tests.
4991 (add-after 'unpack 'fix-and-disable-failing-tests
4993 (substitute* (append (find-files "lib/matplotlib/tests/"
4995 (find-files "lib/mpl_toolkits/tests"
4997 (("^from matplotlib" match)
4998 (string-append "import pytest\n" match))
4999 (("( *)@image_comparison" match indent)
5000 (string-append indent
5001 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5003 (substitute* "lib/matplotlib/tests/test_animation.py"
5004 (("/bin/sh") (which "sh")))
5005 (for-each delete-file
5006 ;; test_normal_axes, test_get_tightbbox_polar
5007 '("lib/matplotlib/tests/test_axes.py"
5008 ;; We don't use the webagg backend and this test forces it.
5009 "lib/matplotlib/tests/test_backend_webagg.py"
5010 ;; test_outward_ticks
5011 "lib/matplotlib/tests/test_tightlayout.py"
5012 ;; test_hidden_axes fails with minor extent
5013 ;; differences, possibly due to the use of a
5014 ;; different version of FreeType.
5015 "lib/matplotlib/tests/test_constrainedlayout.py"
5016 ;; Fontconfig returns no fonts.
5017 "lib/matplotlib/tests/test_font_manager.py"))
5019 (add-before 'install 'install-jquery-ui
5020 (lambda* (#:key outputs inputs #:allow-other-keys)
5021 (let ((dir (string-append (assoc-ref outputs "out")
5022 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5025 (assoc-ref inputs "jquery-ui")
5029 (lambda* (#:key outputs inputs #:allow-other-keys)
5030 (add-installed-pythonpath inputs outputs)
5031 (invoke "python" "tests.py" "-v"
5032 "-m" "not network and not webagg")))
5033 (add-before 'build 'configure-environment
5034 (lambda* (#:key outputs inputs #:allow-other-keys)
5035 (let ((cairo (assoc-ref inputs "cairo")))
5036 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5038 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5039 (setenv "HOME" (getcwd))
5040 (call-with-output-file "setup.cfg"
5042 (format port "[directories]~%
5043 basedirlist = ~a,~a~%
5046 (assoc-ref inputs "tcl")
5047 (assoc-ref inputs "tk")))))
5049 (home-page "https://matplotlib.org/")
5050 (synopsis "2D plotting library for Python")
5052 "Matplotlib is a Python 2D plotting library which produces publication
5053 quality figures in a variety of hardcopy formats and interactive environments
5054 across platforms. Matplotlib can be used in Python scripts, the python and
5055 ipython shell, web application servers, and six graphical user interface
5057 (license license:psfl)
5058 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5060 (define-public python2-matplotlib
5061 (let ((matplotlib (package-with-python2
5062 (strip-python2-variant python-matplotlib))))
5063 (package (inherit matplotlib)
5068 (uri (pypi-uri "matplotlib" version))
5071 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5073 (substitute-keyword-arguments (package-arguments matplotlib)
5075 `(modify-phases ,phases
5076 (replace 'install-jquery-ui
5077 (lambda* (#:key outputs inputs #:allow-other-keys)
5078 (let ((dir (string-append (assoc-ref outputs "out")
5079 "/lib/python2.7/site-packages/"
5080 "matplotlib/backends/web_backend/")))
5083 (assoc-ref inputs "jquery-ui")
5086 (delete 'fix-and-disable-failing-tests)
5087 (delete 'check))))) ; These tests weren't run the the past.
5088 ;; Make sure to use special packages for Python 2 instead
5089 ;; of those automatically rewritten by package-with-python2.
5091 `(("python2-pycairo" ,python2-pycairo)
5092 ("python2-backports-functools-lru-cache"
5093 ,python2-backports-functools-lru-cache)
5094 ("python2-functools32" ,python2-functools32)
5095 ("python2-pygobject-2" ,python2-pygobject-2)
5096 ("python2-subprocess32" ,python2-subprocess32)
5097 ("python2-tkinter" ,python-2 "tk")
5098 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5099 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5101 (define-public python-matplotlib-documentation
5103 (name "python-matplotlib-documentation")
5104 (version (package-version python-matplotlib))
5105 (source (package-source python-matplotlib))
5106 (build-system python-build-system)
5108 `(("python-matplotlib" ,python-matplotlib)
5109 ("python-colorspacious" ,python-colorspacious)
5110 ("python-sphinx" ,python-sphinx)
5111 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5112 ("python-sphinx-gallery" ,python-sphinx-gallery)
5113 ("python-numpydoc" ,python-numpydoc)
5114 ("python-ipython" ,python-ipython)
5115 ("python-ipykernel" ,python-ipykernel)
5116 ("python-mock" ,python-mock)
5117 ("graphviz" ,graphviz)
5118 ("texlive" ,(texlive-union (list texlive-amsfonts
5119 texlive-latex-amsmath
5120 texlive-latex-enumitem
5121 texlive-latex-expdlist
5122 texlive-latex-geometry
5123 texlive-latex-preview
5124 texlive-latex-type1cm
5127 texlive-generic-pdftex
5130 texlive-fonts-adobe-times
5131 texlive-fonts-txfonts)))
5132 ("texinfo" ,texinfo)
5133 ,@(package-native-inputs python-matplotlib)))
5135 `(#:tests? #f ; we're only generating documentation
5137 (modify-phases %standard-phases
5138 ;; The tests in python-matplotlib are run after the install phase, so
5139 ;; we need to delete the extra phase here.
5144 (setenv "PYTHONPATH"
5145 (string-append (getenv "PYTHONPATH")
5146 ":" (getcwd) "/../examples/units"))
5147 (substitute* "conf.py"
5149 (("^SHA = check_output.*")
5150 (string-append "SHA = \"" ,version "\"\n"))
5151 ;; Don't fetch intersphinx files from the Internet
5152 (("^explicit_order_folders" m)
5153 (string-append "intersphinx_mapping = {}\n" m))
5154 (("'sphinx.ext.intersphinx',") "")
5155 ;; Disable URL embedding which requires internet access.
5156 (("'https://docs.scipy.org/doc/numpy'") "None")
5157 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5159 "SPHINXBUILD=sphinx-build"
5160 "SPHINXOPTS=" ; don't abort on warnings
5163 (lambda* (#:key inputs outputs #:allow-other-keys)
5164 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5165 (doc (string-append data "/doc/python-matplotlib-" ,version))
5166 (info (string-append data "/info"))
5167 (html (string-append doc "/html")))
5170 (copy-recursively "build/html" html)
5171 (symlink (string-append html "/_images")
5172 (string-append info "/matplotlib-figures"))
5173 (with-directory-excursion "build/texinfo"
5174 (substitute* "matplotlib.texi"
5175 (("@image\\{([^,]*)" all file)
5176 (string-append "@image{matplotlib-figures/" file)))
5177 (symlink (string-append html "/_images")
5178 "./matplotlib-figures")
5179 (invoke "makeinfo" "--no-split"
5180 "-o" "matplotlib.info" "matplotlib.texi"))
5181 (install-file "build/texinfo/matplotlib.info" info))
5183 (home-page (package-home-page python-matplotlib))
5184 (synopsis "Documentation for the python-matplotlib package")
5185 (description (package-description python-matplotlib))
5186 (license (package-license python-matplotlib))))
5188 (define-public python2-matplotlib-documentation
5189 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5193 (alist-delete "python-sphinx-copybutton"
5194 (package-native-inputs parent))))))
5196 (define-public python-matplotlib-venn
5198 (name "python-matplotlib-venn")
5203 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5206 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5207 (build-system python-build-system)
5208 (arguments '(#:tests? #f)) ; tests are not included
5210 `(("python-matplotlib" ,python-matplotlib)
5211 ("python-numpy" ,python-numpy)
5212 ("python-scipy" ,python-scipy)))
5214 `(("unzip" ,unzip)))
5215 (home-page "https://github.com/konstantint/matplotlib-venn")
5216 (synopsis "Plot area-proportional Venn diagrams")
5218 "This package provides tools for plotting area-proportional two- and
5219 three-way Venn diagrams in @code{matplotlib}.")
5220 (license license:expat)))
5222 (define-public python-pysnptools
5224 (name "python-pysnptools")
5229 (uri (pypi-uri "pysnptools" version))
5232 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5233 (build-system python-build-system)
5235 `(#:tests? #f ; no test data are included
5237 (modify-phases %standard-phases
5239 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5242 (add-installed-pythonpath inputs outputs)
5243 (invoke "python3" "pysnptools/test.py"))
5246 `(("python-dill" ,python-dill)
5247 ("python-h5py" ,python-h5py)
5248 ("python-numpy" ,python-numpy)
5249 ("python-pandas" ,python-pandas)
5250 ("python-psutil" ,python-psutil)
5251 ("python-scipy" ,python-scipy)))
5253 `(("python-cython" ,python-cython)))
5254 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5255 (synopsis "Library for reading and manipulating genetic data")
5257 "PySnpTools is a library for reading and manipulating genetic data. It
5258 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5259 those files. It can also efficiently manipulate ranges of integers using set
5260 operators such as union, intersection, and difference.")
5261 (license license:asl2.0)))
5263 (define-public python2-pysnptools
5264 (package-with-python2 python-pysnptools))
5266 (define-public python-wurlitzer
5268 (name "python-wurlitzer")
5273 (uri (pypi-uri "wurlitzer" version))
5275 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5276 (build-system python-build-system)
5279 (modify-phases %standard-phases
5282 (invoke "pytest" "-vv" "test.py"))))))
5284 `(("python-mock" ,python-mock)
5285 ("python-pytest" ,python-pytest)))
5286 (home-page "https://github.com/minrk/wurlitzer")
5287 (synopsis "Capture C-level output in context managers")
5289 "This library helps to redirect @code{sys.stdout} to a stream or a file
5290 while executing some piece of code, including C code running within a Python
5292 (license license:expat)))
5294 (define-public python-socksipy-branch
5296 (name "python-socksipy-branch")
5301 (uri (pypi-uri "SocksiPy-branch" version))
5304 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5305 (build-system python-build-system)
5307 `(#:tests? #f)) ; There are no tests
5308 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5309 (synopsis "Python SOCKS module")
5311 "SocksiPy - A Python SOCKS client module. It provides a
5312 socket-like interface that supports connections to any TCP
5313 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5314 The original version was developed by Dan Haim, this is a
5315 branch created by Mario Vilas to address some open issues,
5316 as the original project seems to have been abandoned circa 2007.")
5317 (license license:bsd-3)))
5319 (define-public python2-socksipy-branch
5320 (package-with-python2 python-socksipy-branch))
5322 (define-public python-socksipychain
5324 (name "python-socksipychain")
5330 (url "https://github.com/pagekite/PySocksipyChain")
5331 (commit (string-append "v" version))))
5332 (file-name (git-file-name name version))
5335 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5336 (build-system python-build-system)
5338 `(#:tests? #f)) ; Tests try to access the network.
5339 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5340 (synopsis "Python SOCKS module with chained proxies support")
5342 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5343 adds support for arbitrary chaining of proxy servers and various modes of
5344 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5345 a simple netcat replacement with chaining support.")
5346 (license license:bsd-3)))
5348 (define-public python-pycodestyle
5350 (name "python-pycodestyle")
5355 (uri (pypi-uri "pycodestyle" version))
5358 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5359 (build-system python-build-system)
5362 (modify-phases %standard-phases
5365 (invoke "pytest" "-vv"))))))
5367 `(("python-pytest" ,python-pytest)))
5368 (home-page "https://pycodestyle.readthedocs.io/")
5369 (synopsis "Python style guide checker")
5370 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5371 Python code against some of the style conventions in
5372 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5373 (license license:expat)))
5375 (define-public python2-pycodestyle
5376 (package-with-python2 python-pycodestyle))
5378 (define-public python-multidict
5380 (name "python-multidict")
5385 (uri (pypi-uri "multidict" version))
5388 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5389 (build-system python-build-system)
5391 '(#:modules ((ice-9 ftw)
5395 (guix build python-build-system))
5396 #:phases (modify-phases %standard-phases
5398 (lambda* (#:key tests? #:allow-other-keys)
5401 (let ((libdir (find (cut string-prefix? "lib." <>)
5402 (scandir "build"))))
5403 (setenv "PYTHONPATH"
5404 (string-append "./build/" libdir ":"
5405 (getenv "PYTHONPATH")))
5406 (invoke "pytest" "-vv")))
5407 (format #t "test suite not run~%"))
5410 `(("python-pytest" ,python-pytest)
5411 ("python-pytest-cov" ,python-pytest-cov)))
5412 (home-page "https://github.com/aio-libs/multidict/")
5413 (synopsis "Multidict implementation")
5414 (description "Multidict is dict-like collection of key-value pairs
5415 where key might be occurred more than once in the container.")
5416 (license license:asl2.0)))
5418 (define-public python-orderedmultidict
5420 (name "python-orderedmultidict")
5425 (uri (pypi-uri "orderedmultidict" version))
5428 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5429 (build-system python-build-system)
5432 (modify-phases %standard-phases
5433 (add-after 'unpack 'fix-tests
5435 ;; The package uses nosetest for running the tests.
5436 ;; Adding this initfile allows to run the test suite
5437 ;; without requiring nosetest.
5438 (with-output-to-file "tests/__init__.py" newline)
5441 `(("python-six" ,python-six)))
5443 `(("python-pycodestyle" ,python-pycodestyle)))
5444 (home-page "https://github.com/gruns/orderedmultidict")
5445 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5446 (description "This package contains a library for ordered multivalue
5447 dictionaries. A multivalue dictionary is a dictionary that can store
5448 multiple values for the same key. An ordered multivalue dictionary is a
5449 multivalue dictionary that retains the order of insertions and deletions.")
5450 (license license:unlicense)))
5452 (define-public python2-orderedmultidict
5453 (package-with-python2 python-orderedmultidict))
5455 (define-public python-autopep8
5457 (name "python-autopep8")
5462 (uri (pypi-uri "autopep8" version))
5465 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5466 (build-system python-build-system)
5468 `(("python-pycodestyle" ,python-pycodestyle)
5469 ("python-toml" ,python-toml)))
5470 (home-page "https://github.com/hhatto/autopep8")
5471 (synopsis "Format Python code according to the PEP 8 style guide")
5473 "@code{autopep8} automatically formats Python code to conform to
5474 the PEP 8 style guide. It uses the pycodestyle utility to determine
5475 what parts of the code needs to be formatted. @code{autopep8} is
5476 capable of fixing most of the formatting issues that can be reported
5478 (license (license:non-copyleft
5479 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5481 (define-public python2-autopep8
5482 (package-with-python2 python-autopep8))
5484 (define-public python-distlib
5486 (name "python-distlib")
5491 (uri (pypi-uri "distlib" version ".zip"))
5494 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5495 (build-system python-build-system)
5498 (modify-phases %standard-phases
5499 (add-before 'build 'no-/bin/sh
5501 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5502 (("/bin/sh") (which "sh")))
5504 (add-before 'check 'prepare-test-env
5506 (setenv "HOME" "/tmp")
5507 ;; NOTE: Any value works, the variable just has to be present.
5508 (setenv "SKIP_ONLINE" "1")
5510 (native-inputs `(("unzip" ,unzip)))
5511 (home-page "https://bitbucket.org/pypa/distlib")
5512 (synopsis "Distribution utilities")
5513 (description "Distlib is a library which implements low-level functions that
5514 relate to packaging and distribution of Python software. It is intended to be
5515 used as the basis for third-party packaging tools.")
5516 (license license:psfl)))
5518 (define-public python-distutils-extra
5520 (name "python-distutils-extra")
5525 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5526 version "/+download/python-distutils-extra-"
5530 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5531 (build-system python-build-system)
5532 (home-page "https://launchpad.net/python-distutils-extra/")
5533 (synopsis "Enhancements to Python's distutils")
5535 "The python-distutils-extra module enables you to easily integrate
5536 gettext support, themed icons, and scrollkeeper-based documentation into
5537 Python's distutils.")
5538 (license license:gpl2)))
5540 (define-public python2-distutils-extra
5541 (package-with-python2 python-distutils-extra))
5543 (define-public python2-elib.intl
5545 (name "python2-elib.intl")
5549 ;; This project doesn't tag releases or publish tarballs, so we take
5550 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5553 (url "https://github.com/dieterv/elib.intl")
5554 (commit "d09997cfef")))
5555 (file-name (string-append name "-" version "-checkout"))
5558 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5559 (build-system python-build-system)
5561 ;; incompatible with Python 3 (exception syntax)
5562 `(#:python ,python-2
5564 (home-page "https://github.com/dieterv/elib.intl")
5565 (synopsis "Enhanced internationalization for Python")
5567 "The elib.intl module provides enhanced internationalization (I18N)
5568 services for your Python modules and applications.")
5569 (license license:lgpl3+)))
5571 (define-public python-olefile
5573 (name "python-olefile")
5578 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5579 "download/v" version "/olefile-" version ".tar.gz"))
5580 (file-name (string-append name "-" version ".tar.gz"))
5583 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5584 (build-system python-build-system)
5585 (home-page "https://www.decalage.info/python/olefileio")
5586 (synopsis "Read and write Microsoft OLE2 files.")
5588 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5589 Storage or Compound Document, Microsoft Office). It is an improved version of
5590 the OleFileIO module from PIL, the Python Image Library.")
5591 (license license:bsd-3)))
5593 (define-public python2-olefile
5594 (package-with-python2 python-olefile))
5596 (define-public python-pillow
5598 (name "python-pillow")
5603 (uri (pypi-uri "Pillow" version))
5606 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5607 (build-system python-build-system)
5609 `(("python-pytest" ,python-pytest)))
5611 `(("freetype" ,freetype)
5613 ("libjpeg" ,libjpeg-turbo)
5614 ("libtiff" ,libtiff)
5615 ("libwebp" ,libwebp)
5616 ("openjpeg" ,openjpeg)
5619 `(("python-olefile" ,python-olefile)))
5622 (modify-phases %standard-phases
5623 (add-after 'unpack 'patch-ldconfig
5625 (substitute* "setup.py"
5626 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5628 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5631 (setenv "HOME" (getcwd))
5632 ;; Make installed package available for running the tests.
5633 (add-installed-pythonpath inputs outputs)
5634 (invoke "python" "selftest.py" "--installed")
5635 (invoke "python" "-m" "pytest" "-vv"))
5637 (home-page "https://python-pillow.org")
5638 (synopsis "Fork of the Python Imaging Library")
5640 "The Python Imaging Library adds image processing capabilities to your
5641 Python interpreter. This library provides extensive file format support, an
5642 efficient internal representation, and fairly powerful image processing
5643 capabilities. The core image library is designed for fast access to data
5644 stored in a few basic pixel formats. It should provide a solid foundation for
5645 a general image processing tool.")
5646 (license (license:x11-style
5647 "http://www.pythonware.com/products/pil/license.htm"
5648 "The PIL Software License"))))
5650 (define-public python2-pillow
5651 (package-with-python2 python-pillow))
5653 (define-public python-pillow-2.9
5655 (inherit python-pillow)
5660 (uri (pypi-uri "Pillow" version))
5663 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5665 (substitute-keyword-arguments (package-arguments python-pillow)
5666 ((#:tests? _ #f) #f)))
5667 (properties '((hidden? #t)))))
5669 (define-public python-roifile
5671 (name "python-roifile")
5672 (version "2020.5.28")
5676 (uri (pypi-uri "roifile" version))
5679 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5680 (build-system python-build-system)
5681 (arguments `(#:tests? #f)) ; there are none
5683 `(("python-numpy" ,python-numpy)))
5684 (home-page "https://www.lfd.uci.edu/~gohlke/")
5685 (synopsis "Read and write ImageJ ROI format")
5686 (description "Roifile is a Python library to read, write, create, and plot
5687 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5688 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5689 (license license:bsd-3)))
5691 (define-public python-tifffile
5693 (name "python-tifffile")
5694 (version "2020.6.3")
5698 (uri (pypi-uri "tifffile" version))
5701 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5702 (build-system python-build-system)
5703 ;; Tests require lfdfiles, which depends on tifffile
5704 (arguments `(#:tests? #f))
5706 `(("python-numpy" ,python-numpy)
5707 ;;("python-lfdfiles" ,python-lfdfiles)
5708 ("python-roifile" ,python-roifile)))
5709 (home-page "https://www.lfd.uci.edu/~gohlke/")
5710 (synopsis "Read and write TIFF(r) files")
5711 (description "This package lets you read image and metadata from many
5712 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5713 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5714 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5715 (license license:bsd-3)))
5717 (define-public python-lfdfiles
5719 (name "python-lfdfiles")
5720 (version "2020.1.1")
5724 (uri (pypi-uri "lfdfiles" version))
5727 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5728 (build-system python-build-system)
5730 `(("python-click" ,python-click)
5731 ("python-numpy" ,python-numpy)
5732 ("python-tifffile" ,python-tifffile)))
5733 (home-page "https://www.lfd.uci.edu/~gohlke/")
5734 (synopsis "Work with LFD data files")
5736 "Lfdfiles is a Python library and console script for reading, writing,
5737 converting, and viewing many of the proprietary file formats used to store
5738 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5739 (license license:bsd-3)))
5741 (define-public python-imageio
5743 (name "python-imageio")
5748 (uri (pypi-uri "imageio" version))
5751 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5752 (build-system python-build-system)
5754 `(#:tests? #f ; many tests require online data
5756 (modify-phases %standard-phases
5758 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5761 ;; Make installed package available for running the tests.
5762 (add-installed-pythonpath inputs outputs)
5763 (invoke "pytest" "-vv"))
5766 `(("python-numpy" ,python-numpy)
5767 ("python-pillow" ,python-pillow)
5768 ("python-psutil" ,python-psutil)))
5770 `(("python-pytest" ,python-pytest)))
5771 (home-page "https://imageio.github.io/")
5772 (synopsis "Library for reading and writing a wide range of image data")
5774 "Imageio is a Python library that provides an easy interface to read and
5775 write a wide range of image data, including animated images, video, volumetric
5776 data, and scientific formats.")
5777 (license license:bsd-2)))
5779 (define-public python-pycparser
5781 (name "python-pycparser")
5786 (uri (pypi-uri "pycparser" version))
5789 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5790 (outputs '("out" "doc"))
5791 (build-system python-build-system)
5793 `(("pkg-config" ,pkg-config)))
5796 (modify-phases %standard-phases
5799 (with-directory-excursion "tests"
5800 (invoke "python" "all_tests.py"))
5802 (add-after 'install 'install-doc
5803 (lambda* (#:key outputs #:allow-other-keys)
5804 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5805 (doc (string-append data "/doc/" ,name "-" ,version))
5806 (examples (string-append doc "/examples")))
5808 (for-each (lambda (file)
5809 (copy-file (string-append "." file)
5810 (string-append doc file)))
5811 '("/README.rst" "/CHANGES" "/LICENSE"))
5812 (copy-recursively "examples" examples)
5814 (home-page "https://github.com/eliben/pycparser")
5815 (synopsis "C parser in Python")
5817 "Pycparser is a complete parser of the C language, written in pure Python
5818 using the PLY parsing library. It parses C code into an AST and can serve as
5819 a front-end for C compilers or analysis tools.")
5820 (license license:bsd-3)))
5822 (define-public python2-pycparser
5823 (package-with-python2 python-pycparser))
5825 (define-public python-pywavelets
5827 (name "python-pywavelets")
5829 (home-page "https://github.com/PyWavelets/pywt")
5832 (uri (pypi-uri "PyWavelets" version))
5835 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5836 (build-system python-build-system)
5838 '(#:modules ((ice-9 ftw)
5842 (guix build python-build-system))
5844 (modify-phases %standard-phases
5847 (let ((cwd (getcwd))
5848 (libdir (find (cut string-prefix? "lib." <>)
5849 (scandir "build"))))
5850 (with-directory-excursion (string-append cwd "/build/" libdir)
5851 (invoke "pytest" "-vv"))))))))
5853 `(("python-matplotlib" ,python-matplotlib) ;for tests
5854 ("python-pytest" ,python-pytest)))
5856 `(("python-numpy" ,python-numpy)))
5857 (synopsis "Wavelet transforms in Python")
5859 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5860 mathematical basis functions that are localized in both time and frequency.
5861 Wavelet transforms are time-frequency transforms employing wavelets. They are
5862 similar to Fourier transforms, the difference being that Fourier transforms are
5863 localized only in frequency instead of in time and frequency.")
5864 (license license:expat)))
5866 (define-public python-pywinrm
5868 (name "python-pywinrm")
5873 (uri (pypi-uri "pywinrm" version))
5876 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5877 (build-system python-build-system)
5879 `(("python-six" ,python-six)
5880 ("python-requests_ntlm" ,python-requests_ntlm)
5881 ("python-xmltodict" ,python-xmltodict)
5882 ("python-kerberos" ,python-kerberos)))
5884 `(("python-mock" ,python-mock)
5885 ("python-pytest" ,python-pytest)))
5886 (home-page "https://github.com/diyan/pywinrm/")
5888 "Python library for Windows Remote Management (WinRM)")
5890 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5891 service. It allows you to invoke commands on target Windows machines from
5892 any machine that can run Python.")
5893 (license license:expat)))
5895 (define-public python-xcffib
5897 (name "python-xcffib")
5902 (uri (pypi-uri "xcffib" version))
5905 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5906 (build-system python-build-system)
5908 `(("libxcb" ,libxcb)))
5910 `(("python-cffi" ,python-cffi) ; used at run time
5911 ("python-six" ,python-six)))
5913 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5916 (modify-phases %standard-phases
5917 (add-after 'unpack 'fix-libxcb-path
5918 (lambda* (#:key inputs #:allow-other-keys)
5919 (let ((libxcb (assoc-ref inputs "libxcb")))
5920 (substitute* '("xcffib/__init__.py")
5921 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5923 (add-after 'install 'install-doc
5924 (lambda* (#:key outputs #:allow-other-keys)
5925 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5926 "/doc/" ,name "-" ,version)))
5928 (copy-file "README.md"
5929 (string-append doc "/README.md"))
5931 (home-page "https://github.com/tych0/xcffib")
5932 (synopsis "XCB Python bindings")
5934 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5935 support for Python 3 and PyPy. It is based on cffi.")
5936 (license license:expat)))
5938 (define-public python2-xcffib
5939 (package-with-python2 python-xcffib))
5941 (define-public python-cairocffi
5943 (name "python-cairocffi")
5948 (uri (pypi-uri "cairocffi" version))
5951 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5952 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5953 (build-system python-build-system)
5954 (outputs '("out" "doc"))
5958 ("gdk-pixbuf" ,gdk-pixbuf)
5962 `(("pkg-config" ,pkg-config)
5963 ("python-pytest" ,python-pytest)
5964 ("python-pytest-cov" ,python-pytest-cov)
5965 ("python-pytest-runner" ,python-pytest-runner)
5966 ("python-sphinx" ,python-sphinx)
5967 ("python-docutils" ,python-docutils)))
5969 `(("python-xcffib" ,python-xcffib))) ; used at run time
5972 (modify-phases %standard-phases
5973 (add-after 'unpack 'patch-paths
5974 (lambda* (#:key inputs outputs #:allow-other-keys)
5975 (substitute* (find-files "." "\\.py$")
5976 (("dlopen\\(ffi, 'cairo'")
5977 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5978 "/lib/libcairo.so.2'"))
5979 (("dlopen\\(ffi, 'gdk-3'")
5980 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5981 "/lib/libgtk-3.so.0'"))
5982 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5983 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5984 "/lib/libgdk_pixbuf-2.0.so.0'"))
5985 (("dlopen\\(ffi, 'glib-2.0'")
5986 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5987 "/lib/libglib-2.0.so.0'"))
5988 (("dlopen\\(ffi, 'gobject-2.0'")
5989 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5990 "/lib/libgobject-2.0.so.0'"))
5991 (("dlopen\\(ffi, 'pangocairo-1.0'")
5992 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5993 "/lib/libpangocairo-1.0.so.0'"))
5994 (("dlopen\\(ffi, 'pango-1.0'")
5995 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5996 "/lib/libpango-1.0.so.0'")))
5998 (add-after 'install 'install-doc
5999 (lambda* (#:key inputs outputs #:allow-other-keys)
6000 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6001 (doc (string-append data "/doc/" ,name "-" ,version))
6002 (html (string-append doc "/html")))
6003 (setenv "LD_LIBRARY_PATH"
6004 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6005 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6006 (setenv "LANG" "en_US.UTF-8")
6008 (for-each (lambda (file)
6009 (copy-file (string-append "." file)
6010 (string-append doc file)))
6011 '("/README.rst" "/CHANGES" "/LICENSE"))
6012 (system* "python" "setup.py" "build_sphinx")
6013 (copy-recursively "docs/_build/html" html)
6015 (home-page "https://github.com/Kozea/cairocffi")
6016 (synopsis "Python bindings and object-oriented API for Cairo")
6018 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6019 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6020 graphics library with support for multiple backends including image buffers,
6021 PNG, PostScript, PDF, and SVG file output.")
6022 (license license:bsd-3)))
6024 (define-public python2-cairocffi
6025 (package-with-python2 python-cairocffi))
6027 (define-public python-decorator
6029 (name "python-decorator")
6034 (uri (pypi-uri "decorator" version))
6036 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6037 (build-system python-build-system)
6038 (home-page "https://pypi.org/project/decorator/")
6039 (synopsis "Python module to simplify usage of decorators")
6041 "The aim of the decorator module is to simplify the usage of decorators
6042 for the average programmer, and to popularize decorators usage giving examples
6043 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6044 etc. The core of this module is a decorator factory.")
6045 (license license:expat)))
6047 (define-public python2-decorator
6048 (package-with-python2 python-decorator))
6050 (define-public python-drmaa
6052 (name "python-drmaa")
6057 (uri (pypi-uri "drmaa" version))
6059 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6060 (build-system python-build-system)
6061 ;; The test suite requires libdrmaa which is provided by the cluster
6062 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6063 ;; should be set to the path of the libdrmaa library.
6064 (arguments '(#:tests? #f))
6066 `(("python-nose" ,python-nose)))
6067 (home-page "https://pypi.org/project/drmaa/")
6068 (synopsis "Python bindings for the DRMAA library")
6070 "A Python package for Distributed Resource Management (DRM) job
6071 submission and control. This package is an implementation of the DRMAA 1.0
6072 Python language binding specification.")
6073 (license license:bsd-3)))
6075 (define-public python2-drmaa
6076 (package-with-python2 python-drmaa))
6078 (define-public python-grako
6080 (name "python-grako")
6086 (pypi-uri "grako" version ".zip"))
6089 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6090 (build-system python-build-system)
6091 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6094 ("python-pytest" ,python-pytest)
6095 ("python-pytest-runner" ,python-pytest-runner)))
6096 (home-page "https://bitbucket.org/neogeny/grako")
6097 (synopsis "EBNF parser generator")
6099 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6100 memoizing PEG/Packrat parser in Python.")
6101 (license license:bsd-3)))
6103 (define-public python2-grako
6104 (package-with-python2 python-grako))
6106 (define-public python-grandalf
6108 (name "python-grandalf")
6112 ;; There's no source tarball on PyPI.
6115 (url "https://github.com/bdcht/grandalf")
6116 (commit (string-append "v" version))))
6117 (file-name (git-file-name name version))
6120 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6121 (build-system python-build-system)
6124 (modify-phases %standard-phases
6127 (invoke "python" "setup.py" "pytest"))))))
6129 `(("python-pytest" ,python-pytest)
6130 ("python-pytest-runner" ,python-pytest-runner)))
6132 `(("python-numpy" ,python-numpy)
6133 ("python-ply" ,python-ply)))
6134 (home-page "https://github.com/bdcht/grandalf")
6135 (synopsis "Graph and drawing algorithms framework")
6137 "Grandalf is a Python package made for experimentations with graphs
6138 drawing algorithms. It is written in pure Python, and currently implements
6139 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6140 minimization approach. While not as fast or featured as graphviz or other
6141 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6142 than thousands of nodes, while keeping the source code simple enough to tweak
6143 and hack any part of it for experimental purpose. With a total of about 1500
6144 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6145 in less than 600 lines. The energy minimization approach is comprised of only
6148 Grandalf does only 2 not-so-simple things:
6150 @item computing the nodes (x,y) coordinates (based on provided nodes
6151 dimensions, and a chosen layout)
6152 @item routing the edges with lines or nurbs
6155 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6156 will help you find where to draw things like nodes and edges, but it’s up to
6157 you to actually draw things with your favorite toolkit.")
6158 ;; The user can choose either license.
6159 (license (list license:gpl2 license:epl1.0))))
6161 (define-public python-gridmap
6163 (name "python-gridmap")
6169 (url "https://github.com/pygridtools/gridmap")
6170 (commit (string-append "v" version))))
6171 (file-name (git-file-name name version))
6173 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6174 (build-system python-build-system)
6176 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6178 `(("python-psutil" ,python-psutil)
6179 ("python-drmaa" ,python-drmaa)
6180 ("python-pyzmq" ,python-pyzmq)))
6181 (home-page "https://github.com/pygridtools/gridmap")
6182 (synopsis "Create jobs on a cluster directly from Python")
6184 "Gridmap is a Python package to allow you to easily create jobs on the
6185 cluster directly from Python. You can directly map Python functions onto the
6186 cluster without needing to write any wrapper code yourself.")
6187 (license license:gpl3+)))
6189 (define-public python2-gridmap
6190 (package-with-python2 python-gridmap))
6192 (define-public python-honcho
6194 (name "python-honcho")
6200 (url "https://github.com/nickstenning/honcho")
6201 (commit (string-append "v" version))))
6202 (file-name (git-file-name name version))
6204 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6205 (build-system python-build-system)
6207 `(("python-pytest" ,python-pytest)
6208 ("python-mock" ,python-mock)
6209 ("python-tox" ,python-tox)
6210 ("which" ,which))) ;for tests
6212 `(("python-jinja2" ,python-jinja2)))
6215 (modify-phases %standard-phases
6217 (add-after 'install 'check
6218 (lambda* (#:key outputs inputs #:allow-other-keys)
6219 ;; fix honcho path in testsuite
6220 (substitute* "tests/conftest.py"
6221 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6222 "/bin/honcho" "'")))
6223 ;; It's easier to run tests after install.
6224 ;; Make installed package available for running the tests
6225 (add-installed-pythonpath inputs outputs)
6226 (invoke "py.test" "-v"))))))
6227 (home-page "https://github.com/nickstenning/honcho")
6228 (synopsis "Manage Procfile-based applications")
6230 "A Procfile is a file which describes how to run an application
6231 consisting of several processes. honcho starts all listed processes.
6232 The output of all running processes is collected by honcho and
6234 (license license:expat)))
6236 (define-public python2-honcho
6237 (package-with-python2 python-honcho))
6239 (define-public python-pexpect
6241 (name "python-pexpect")
6246 (uri (pypi-uri "pexpect" version))
6248 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6249 (build-system python-build-system)
6252 (modify-phases %standard-phases
6253 (add-before 'check 'prepare-tests
6255 (substitute* (find-files "tests")
6256 (("/bin/ls") (which "ls"))
6257 (("/bin/echo") (which "echo"))
6258 (("/bin/which") (which "which"))
6259 ;; Many tests try to use the /bin directory which
6260 ;; is not present in the build environment.
6261 ;; Use one that's non-empty and unlikely to change.
6263 ;; Disable failing test. See upstream bug report
6264 ;; https://github.com/pexpect/pexpect/issues/568
6265 (("def test_bash") "def _test_bash"))
6266 ;; XXX: Socket connection test gets "Connection reset by peer".
6267 ;; Why does it not work? Delete for now.
6268 (delete-file "tests/test_socket.py")
6270 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6272 `(("python-nose" ,python-nose)
6273 ("python-pytest" ,python-pytest)
6276 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6278 `(("python-ptyprocess" ,python-ptyprocess)))
6279 (home-page "http://pexpect.readthedocs.org/")
6280 (synopsis "Controlling interactive console applications")
6282 "Pexpect is a pure Python module for spawning child applications;
6283 controlling them; and responding to expected patterns in their output.
6284 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6285 child application and control it as if a human were typing commands.")
6286 (license license:isc)))
6288 (define-public python2-pexpect
6289 (package-with-python2 python-pexpect))
6291 (define-public python-setuptools-scm
6293 (name "python-setuptools-scm")
6297 (uri (pypi-uri "setuptools_scm" version))
6300 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6301 (build-system python-build-system)
6302 (home-page "https://github.com/pypa/setuptools_scm/")
6303 (synopsis "Manage Python package versions in SCM metadata")
6305 "Setuptools_scm handles managing your Python package versions in
6306 @dfn{software configuration management} (SCM) metadata instead of declaring
6307 them as the version argument or in a SCM managed file.")
6308 (license license:expat)))
6310 (define-public python2-setuptools-scm
6311 (package-with-python2 python-setuptools-scm))
6313 (define-public python-sexpdata
6315 (name "python-sexpdata")
6320 (uri (pypi-uri "sexpdata" version))
6323 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6324 (build-system python-build-system)
6325 (home-page "https://github.com/jd-boyd/sexpdata")
6326 (synopsis "S-expression parser for Python")
6328 "Sexpdata is an S-expression parser/serializer. It has load and dump
6329 functions like pickle, json or PyYAML module.")
6330 (license license:bsd-3)))
6332 (define-public python-pathlib2
6334 (name "python-pathlib2")
6339 (uri (pypi-uri "pathlib2" version))
6342 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6343 (build-system python-build-system)
6345 `(("python-scandir" ,python-scandir)
6346 ("python-six" ,python-six)))
6347 (home-page "https://pypi.org/project/pathlib2/")
6348 (synopsis "Object-oriented file system paths")
6349 (description "The goal of pathlib2 is to provide a backport of the
6350 standard @code{pathlib} module which tracks the standard library module, so
6351 all the newest features of the standard @code{pathlib} can be used also on
6352 older Python versions.")
6353 (license license:expat)))
6355 (define-public python-importlib-resources
6357 (name "python-importlib-resources")
6362 (uri (pypi-uri "importlib_resources" version))
6365 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6366 (build-system python-build-system)
6368 `(("python-setuptools-scm" ,python-setuptools-scm)
6369 ("python-toml" ,python-toml)))
6370 (home-page "http://importlib-resources.readthedocs.io/")
6371 (synopsis "Read resources from Python packages")
6373 "@code{importlib_resources} is a backport of Python 3's standard library
6374 @code{importlib.resources} module for Python 2.7, and Python 3.")
6375 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6376 (license license:asl2.0)))
6378 (define-public python2-importlib-resources
6380 (name "python2-importlib-resources")
6384 (uri (pypi-uri "importlib_resources" version))
6387 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6388 (build-system python-build-system)
6390 `(#:python ,python-2
6391 #:phases (modify-phases %standard-phases
6392 ;; The build system tests for python-wheel, but it is
6393 ;; not required for Guix nor the test suite. Just drop
6394 ;; it to make bootstrapping pytest easier.
6395 (add-after 'unpack 'drop-wheel-dependency
6397 (substitute* "setup.cfg"
6398 (("^[[:blank:]]+wheel")
6402 `(("python-pathlib2" ,python2-pathlib2)
6403 ("python-typing" ,python2-typing)))
6404 (home-page "https://gitlab.com/python-devs/importlib_resources")
6405 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6407 "This package provides an implementation of @code{importlib.resources}
6408 for older versions of Python.")
6409 (license license:asl2.0)))
6411 ;; For importlib-metadata-bootstrap below.
6412 (define-public python2-importlib-resources-bootstrap
6415 python2-importlib-resources
6416 (name "python2-importlib-resources-bootstrap")
6418 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6419 ("python-typing" ,python2-typing))))))
6421 (define-public python-importlib-metadata
6423 (name "python-importlib-metadata")
6428 (uri (pypi-uri "importlib_metadata" version))
6431 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6432 (build-system python-build-system)
6434 `(("python-zipp" ,python-zipp)))
6436 `(("python-setuptools-scm" ,python-setuptools-scm)
6437 ("python-pyfakefs" ,python-pyfakefs)
6438 ("python-packaging" ,python-packaging)))
6439 (home-page "https://importlib-metadata.readthedocs.io/")
6440 (synopsis "Read metadata from Python packages")
6442 "@code{importlib_metadata} is a library which provides an API for
6443 accessing an installed Python package's metadata, such as its entry points or
6444 its top-level name. This functionality intends to replace most uses of
6445 @code{pkg_resources} entry point API and metadata API. Along with
6446 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6447 need to use the older and less efficient @code{pkg_resources} package.")
6448 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6449 (license license:asl2.0)))
6451 (define-public python2-importlib-metadata
6452 (let ((base (package-with-python2 (strip-python2-variant
6453 python-importlib-metadata))))
6456 (name "python2-importlib-metadata")
6458 `(("python-setuptools-scm" ,python2-setuptools-scm)
6459 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6460 ("python-packaging" ,python2-packaging-bootstrap)))
6462 `(("python-configparser" ,python2-configparser)
6463 ("python-contextlib2" ,python2-contextlib2)
6464 ("python-importlib-resources" ,python2-importlib-resources)
6465 ("python-pathlib2" ,python2-pathlib2)
6466 ,@(package-propagated-inputs base))))))
6468 ;; This package is used by python2-pytest, and thus must not depend on it.
6469 (define-public python2-importlib-metadata-bootstrap
6472 python2-importlib-metadata
6473 (name "python2-importlib-metadata-bootstrap")
6476 ,@(package-arguments python2-importlib-metadata)))
6478 `(("python-zipp" ,python2-zipp-bootstrap)
6479 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6480 ("python-configparser" ,python2-configparser)
6481 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6482 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6484 (define-public python-importmagic
6486 (name "python-importmagic")
6491 (uri (pypi-uri "importmagic" version))
6494 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6495 (build-system python-build-system)
6496 (home-page "https://github.com/alecthomas/importmagic")
6497 (synopsis "Library for adding, removing and managing Python imports")
6499 "Importmagic is a Python library for automatically managing imports by
6500 finding unresolved symbols in Python code and their corresponding imports.")
6501 (license license:bsd-3)))
6503 (define-public python-jaraco-packaging
6505 (name "python-jaraco-packaging")
6510 (uri (pypi-uri "jaraco.packaging" version))
6513 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6514 (build-system python-build-system)
6516 `(("python-pytest" ,python-pytest)
6517 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6518 ("python-pytest-flake8" ,python-pytest-flake8)
6519 ("python-rst.linker" ,python-rst.linker)
6520 ("python-setuptools" ,python-setuptools)
6521 ("python-setuptools-scm" ,python-setuptools-scm)
6522 ("python-six" ,python-six)
6523 ("python-sphinx" ,python-sphinx)))
6524 (home-page "https://github.com/jaraco/jaraco.packaging")
6525 (synopsis "Tools to supplement packaging Python releases")
6527 "This package provides various tools to supplement packaging Python
6529 (license license:expat)))
6531 (define-public python-pathpy
6533 (name "python-pathpy")
6538 (uri (pypi-uri "path.py" version))
6540 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6541 (outputs '("out" "doc"))
6542 (build-system python-build-system)
6544 `(("python-appdirs" ,python-appdirs)
6545 ("python-importlib-metadata" ,python-importlib-metadata)))
6547 `(("python-setuptools-scm" ,python-setuptools-scm)
6548 ("python-sphinx" ,python-sphinx)
6549 ("python-rst.linker" ,python-rst.linker)
6550 ("python-pytest" ,python-pytest)
6551 ("python-pytest-runner" ,python-pytest-runner)
6552 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6555 (modify-phases %standard-phases
6556 (add-after 'build 'build-doc
6558 (setenv "LANG" "en_US.UTF-8")
6559 (invoke "python" "setup.py" "build_sphinx")))
6560 (add-after 'install 'install-doc
6561 (lambda* (#:key outputs #:allow-other-keys)
6562 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6563 (doc (string-append data "/doc/" ,name "-" ,version))
6564 (html (string-append doc "/html")))
6566 (for-each (lambda (file)
6567 (copy-file file (string-append doc "/" file)))
6568 '("README.rst" "CHANGES.rst"))
6569 (copy-recursively "build/sphinx/html" html)
6573 ;; The import time test aborts if an import takes longer than
6574 ;; 100ms. It may very well take a little longer than that.
6575 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6576 (home-page "https://github.com/jaraco/path.py")
6577 (synopsis "Python module wrapper for built-in os.path")
6579 "@code{path.py} implements path objects as first-class entities, allowing
6580 common operations on files to be invoked on those path objects directly.")
6581 (license license:expat)))
6583 (define-public python2-pathpy
6584 (package-with-python2 python-pathpy))
6586 (define-public python-simplegeneric
6588 (name "python-simplegeneric")
6593 (uri (pypi-uri "simplegeneric" version ".zip"))
6595 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6596 (build-system python-build-system)
6598 `(("unzip" ,unzip)))
6599 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6600 (synopsis "Python module for simple generic functions")
6602 "The simplegeneric module lets you define simple single-dispatch generic
6603 functions, akin to Python’s built-in generic functions like @code{len()},
6604 @code{iter()} and so on. However, instead of using specially-named methods,
6605 these generic functions use simple lookup tables, akin to those used by
6606 e.g. @code{pickle.dump()} and other generic functions found in the Python
6608 (license license:zpl2.1)))
6610 (define-public python2-simplegeneric
6611 (package-with-python2 python-simplegeneric))
6613 (define-public python-ipython-genutils
6614 ;; TODO: This package is retired, check if can be removed, see description.
6616 (name "python-ipython-genutils")
6621 (uri (pypi-uri "ipython_genutils" version))
6623 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6624 (build-system python-build-system)
6625 (arguments `(#:tests? #f)) ; no tests
6626 (home-page "https://ipython.org")
6627 (synopsis "Vestigial utilities from IPython")
6629 "This package provides retired utilities from IPython. No packages
6630 outside IPython/Jupyter should depend on it.
6632 This package shouldn't exist. It contains some common utilities shared by
6633 Jupyter and IPython projects during The Big Split. As soon as possible, those
6634 packages will remove their dependency on this, and this package will go
6636 (license license:bsd-3)))
6638 (define-public python2-ipython-genutils
6639 (package-with-python2 python-ipython-genutils))
6641 (define-public python-ipyparallel
6643 (name "python-ipyparallel")
6648 (uri (pypi-uri "ipyparallel" version))
6651 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6652 (build-system python-build-system)
6654 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6656 (modify-phases %standard-phases
6657 (add-before 'check 'prepare-for-tests
6659 (setenv "HOME" (getcwd))
6662 `(("python-dateutil" ,python-dateutil)
6663 ("python-decorator" ,python-decorator)
6664 ("python-ipykernel" ,python-ipykernel)
6665 ("python-ipython" ,python-ipython)
6666 ("python-ipython-genutils" ,python-ipython-genutils)
6667 ("python-jupyter-client" ,python-jupyter-client)
6668 ("python-pyzmq" ,python-pyzmq)
6669 ("python-tornado" ,python-tornado)
6670 ("python-traitlets" ,python-traitlets)))
6672 `(("python-ipython" ,python-ipython)
6673 ("python-mock" ,python-mock)
6674 ("python-nose" ,python-nose)
6675 ("python-pytest" ,python-pytest)
6676 ("python-pytest-cov" ,python-pytest-cov)
6677 ("python-testpath" ,python-testpath)))
6678 (home-page "https://ipython.org/")
6679 (synopsis "Interactive Parallel Computing with IPython")
6681 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6682 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6685 @item ipcluster - start/stop a cluster
6686 @item ipcontroller - start a scheduler
6687 @item ipengine - start an engine
6689 (license license:bsd-3)))
6691 (define-public python2-ipyparallel
6692 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6694 (inherit ipyparallel)
6696 `(("python2-futures" ,python2-futures)
6697 ,@(package-propagated-inputs ipyparallel))))))
6699 (define-public python-ipython-cluster-helper
6701 (name "python-ipython-cluster-helper")
6706 (uri (pypi-uri "ipython-cluster-helper" version))
6709 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6710 (modules '((guix build utils)))
6712 '(begin (substitute* "requirements.txt"
6713 (("ipython.*") "ipython\n"))
6715 (build-system python-build-system)
6717 `(#:tests? #f ; Test suite can't find IPython.
6719 (modify-phases %standard-phases
6721 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6724 (setenv "HOME" (getcwd))
6725 (add-installed-pythonpath inputs outputs)
6726 (invoke "python" "example/example.py" "--local"))
6729 `(("python-ipyparallel" ,python-ipyparallel)
6730 ("python-ipython" ,python-ipython)
6731 ("python-netifaces" ,python-netifaces)
6732 ("python-pyzmq" ,python-pyzmq)
6733 ("python-setuptools" ,python-setuptools)
6734 ("python-six" ,python-six)))
6735 (home-page "https://github.com/roryk/ipython-cluster-helper")
6737 "Simplify IPython cluster start up and use for multiple schedulers")
6739 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6740 profile, launches a cluster and returns a view. On program exit it shuts the
6741 cluster down and deletes the throwaway profile.")
6742 (license license:expat)))
6744 (define-public python2-ipython-cluster-helper
6745 (package-with-python2 python-ipython-cluster-helper))
6747 (define-public python-traitlets
6749 (name "python-traitlets")
6754 (uri (pypi-uri "traitlets" version))
6757 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6758 (build-system python-build-system)
6761 (modify-phases %standard-phases
6762 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6764 `(("python-ipython-genutils" ,python-ipython-genutils)
6765 ("python-decorator" ,python-decorator)))
6767 `(("python-pytest" ,python-pytest)))
6768 (properties `((python2-variant . ,(delay python2-traitlets))))
6769 (home-page "https://ipython.org")
6770 (synopsis "Configuration system for Python applications")
6772 "Traitlets is a framework that lets Python classes have attributes with
6773 type checking, dynamically calculated default values, and ‘on change’
6774 callbacks. The package also includes a mechanism to use traitlets for
6775 configuration, loading values from files or from command line arguments. This
6776 is a distinct layer on top of traitlets, so you can use traitlets in your code
6777 without using the configuration machinery.")
6778 (license license:bsd-3)))
6780 (define-public python2-traitlets
6781 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6785 `(("python2-enum34" ,python2-enum34)
6786 ,@(package-propagated-inputs traitlets))))))
6788 (define-public python-jupyter-core
6790 (name "python-jupyter-core")
6795 (uri (string-append (pypi-uri "jupyter_core" version)))
6798 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6799 (build-system python-build-system)
6800 ;; FIXME: not sure how to run the tests
6801 (arguments `(#:tests? #f))
6803 `(("python-traitlets" ,python-traitlets)))
6804 (home-page "http://jupyter.org/")
6805 (synopsis "Jupyter base package")
6807 "Jupyter core is the base package on which Jupyter projects rely.")
6808 (license license:bsd-3)))
6810 (define-public python2-jupyter-core
6811 (package-with-python2 python-jupyter-core))
6813 (define-public python-jupyter-client
6815 (name "python-jupyter-client")
6820 (uri (pypi-uri "jupyter_client" version))
6823 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6824 (build-system python-build-system)
6825 ;; Tests fail because of missing native python kernel which I assume is
6826 ;; provided by the ipython package, which we cannot use because it would
6827 ;; cause a dependency cycle.
6831 #:phases (modify-phases %standard-phases
6832 (add-after 'unpack 'set-tool-file-names
6833 (lambda* (#:key inputs #:allow-other-keys)
6834 (let ((iproute (assoc-ref inputs "iproute")))
6835 (substitute* "jupyter_client/localinterfaces.py"
6837 (string-append "'" iproute "/sbin/ip'")))
6840 `(("iproute" ,iproute)))
6842 `(("python-pyzmq" ,python-pyzmq)
6843 ("python-traitlets" ,python-traitlets)
6844 ("python-jupyter-core" ,python-jupyter-core)))
6845 (home-page "http://jupyter.org/")
6846 (synopsis "Jupyter protocol implementation and client libraries")
6848 "The @code{jupyter_client} package contains the reference implementation
6849 of the Jupyter protocol. It also provides client and kernel management APIs
6850 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6851 installing @code{kernelspec}s for use with Jupyter frontends.")
6852 (license license:bsd-3)))
6854 (define-public python2-jupyter-client
6855 (package-with-python2 python-jupyter-client))
6857 (define-public python-ipykernel
6859 (name "python-ipykernel")
6864 (uri (pypi-uri "ipykernel" version))
6866 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6867 (build-system python-build-system)
6870 (modify-phases %standard-phases
6873 (setenv "HOME" "/tmp")
6874 (invoke "pytest" "-v")
6876 (add-after 'install 'set-python-file-name
6877 (lambda* (#:key outputs #:allow-other-keys)
6878 ;; Record the absolute file name of the 'python' executable in
6880 (let ((out (assoc-ref outputs "out")))
6881 (substitute* (string-append out "/share/jupyter"
6882 "/kernels/python3/kernel.json")
6884 (string-append "\"" (which "python") "\"")))
6887 `(("python-ipython" ,python-ipython)
6888 ;; imported at runtime during connect
6889 ("python-jupyter-client" ,python-jupyter-client)))
6891 `(("python-flaky" ,python-flaky)
6892 ("python-nose" ,python-nose)
6893 ("python-pytest" ,python-pytest)))
6894 (home-page "https://ipython.org")
6895 (synopsis "IPython Kernel for Jupyter")
6897 "This package provides the IPython kernel for Jupyter.")
6898 (properties `((python2-variant . ,(delay python2-ipykernel))))
6899 (license license:bsd-3)))
6901 ;; Version 5.x and above no longer support Python 2.
6902 (define-public python2-ipykernel
6904 (name "python2-ipykernel")
6909 (uri (pypi-uri "ipykernel" version))
6911 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6912 (build-system python-build-system)
6914 `(#:python ,python-2))
6916 `(("python2-ipython" ,python2-ipython)
6917 ;; imported at runtime during connect
6918 ("python2-jupyter-client" ,python2-jupyter-client)
6919 ("python2-tornado" ,python2-tornado)
6920 ("python2-traitlets" ,python2-traitlets)))
6922 `(("python2-mock" ,python2-mock)
6923 ("python2-nose" ,python2-nose)
6924 ("python2-pytest" ,python2-pytest)
6925 ("python2-pytest-cov" ,python2-pytest-cov)))
6926 (home-page "https://ipython.org")
6927 (synopsis "IPython Kernel for Jupyter")
6929 "This package provides the IPython kernel for Jupyter.")
6930 (license license:bsd-3)))
6932 (define-public python-pari-jupyter
6934 (name "python-pari-jupyter")
6939 (uri (pypi-uri "pari_jupyter" version))
6942 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6943 (build-system python-build-system)
6945 `(("python-ipykernel" ,python-ipykernel)))
6947 `(("pari-gp" ,pari-gp)
6948 ("readline" ,readline)))
6950 `(#:tests? #f)) ; no test suite
6952 "https://github.com/jdemeyer/pari_jupyter")
6953 (synopsis "A Jupyter kernel for PARI/GP")
6954 (description "The package provides a PARI/GP kernel for Jupyter.")
6955 (license license:gpl3+)))
6957 (define-public python-backcall
6959 (name "python-backcall")
6964 (uri (pypi-uri "backcall" version))
6967 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
6968 (build-system python-build-system)
6969 (home-page "https://github.com/takluyver/backcall/")
6970 (synopsis "Specifications for callback functions passed in to an API")
6972 "If your code lets other people supply callback functions, it's important
6973 to specify the function signature you expect, and check that functions support
6974 that. Adding extra parameters later would break other peoples code unless
6975 you're careful. The @code{backcall} package provides a way of specifying the
6976 callback signature using a prototype function.")
6977 (license license:bsd-3)))
6979 (define-public python-ipython
6981 (name "python-ipython")
6986 (uri (pypi-uri "ipython" version ".tar.gz"))
6988 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
6989 (build-system python-build-system)
6991 `(("python-backcall" ,python-backcall)
6992 ("python-pyzmq" ,python-pyzmq)
6993 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
6994 ("python-terminado" ,python-terminado)
6995 ("python-matplotlib" ,python-matplotlib)
6996 ("python-numpy" ,python-numpy)
6997 ("python-numpydoc" ,python-numpydoc)
6998 ("python-jedi" ,python-jedi)
6999 ("python-jinja2" ,python-jinja2)
7000 ("python-mistune" ,python-mistune)
7001 ("python-pexpect" ,python-pexpect)
7002 ("python-pickleshare" ,python-pickleshare)
7003 ("python-simplegeneric" ,python-simplegeneric)
7004 ("python-jsonschema" ,python-jsonschema)
7005 ("python-traitlets" ,python-traitlets)
7006 ("python-nbformat" ,python-nbformat)
7007 ("python-pygments" ,python-pygments)))
7009 `(("readline" ,readline)
7012 `(("graphviz" ,graphviz)
7013 ("pkg-config" ,pkg-config)
7014 ("python-requests" ,python-requests) ;; for tests
7015 ("python-testpath" ,python-testpath)
7016 ("python-nose" ,python-nose)))
7019 (modify-phases %standard-phases
7020 (add-after 'unpack 'make-docs-reproducible
7022 (substitute* "IPython/sphinxext/ipython_directive.py"
7023 ((".*import datetime") "")
7024 ((".*datetime.datetime.now\\(\\)") "")
7025 (("%timeit") "# %timeit"))
7027 ;; Tests can only be run after the library has been installed and not
7028 ;; within the source directory.
7030 (add-after 'install 'check
7031 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7034 ;; Make installed package available for running the tests
7035 (add-installed-pythonpath inputs outputs)
7036 (setenv "HOME" "/tmp/") ;; required by a test
7037 ;; We only test the core because one of the other tests
7038 ;; tries to import ipykernel.
7039 (invoke "python" "IPython/testing/iptest.py"
7040 "-v" "IPython/core/tests"))
7042 (add-before 'check 'fix-tests
7043 (lambda* (#:key inputs #:allow-other-keys)
7044 (substitute* "./IPython/utils/_process_posix.py"
7045 (("/usr/bin/env', 'which") (which "which")))
7046 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7047 (("#!/usr/bin/env python")
7048 (string-append "#!" (which "python"))))
7049 ;; This test introduces a circular dependency on ipykernel
7050 ;; (which depends on ipython).
7051 (delete-file "IPython/core/tests/test_display.py")
7052 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7053 (delete-file "IPython/core/tests/test_interactiveshell.py")
7055 (home-page "https://ipython.org")
7056 (synopsis "IPython is a tool for interactive computing in Python")
7058 "IPython provides a rich architecture for interactive computing with:
7059 Powerful interactive shells, a browser-based notebook, support for interactive
7060 data visualization, embeddable interpreters and tools for parallel
7062 (properties `((python2-variant . ,(delay python2-ipython))))
7063 (license license:bsd-3)))
7065 ;; This is the latest release of the LTS version of ipython with support for
7066 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7067 ;; dropped support for Python 2.7.
7068 (define-public python2-ipython
7070 (name "python2-ipython")
7075 (uri (pypi-uri "ipython" version ".tar.gz"))
7077 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7078 (build-system python-build-system)
7080 `(("python2-backports-shutil-get-terminal-size"
7081 ,python2-backports-shutil-get-terminal-size)
7082 ("python2-pathlib2" ,python2-pathlib2)
7083 ("python2-pyzmq" ,python2-pyzmq)
7084 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7085 ("python2-terminado" ,python2-terminado)
7086 ("python2-matplotlib" ,python2-matplotlib)
7087 ("python2-numpy" ,python2-numpy)
7088 ("python2-numpydoc" ,python2-numpydoc)
7089 ("python2-jinja2" ,python2-jinja2)
7090 ("python2-mistune" ,python2-mistune)
7091 ("python2-pexpect" ,python2-pexpect)
7092 ("python2-pickleshare" ,python2-pickleshare)
7093 ("python2-simplegeneric" ,python2-simplegeneric)
7094 ("python2-jsonschema" ,python2-jsonschema)
7095 ("python2-traitlets" ,python2-traitlets)
7096 ("python2-nbformat" ,python2-nbformat)
7097 ("python2-pygments" ,python2-pygments)))
7099 `(("readline" ,readline)
7102 `(("graphviz" ,graphviz)
7103 ("pkg-config" ,pkg-config)
7104 ("python2-requests" ,python2-requests) ;; for tests
7105 ("python2-testpath" ,python2-testpath)
7106 ("python2-mock" ,python2-mock)
7107 ("python2-nose" ,python2-nose)))
7109 `(#:python ,python-2
7111 (modify-phases %standard-phases
7112 (add-before 'check 'delete-broken-tests
7113 (lambda* (#:key inputs #:allow-other-keys)
7114 ;; These tests throw errors for unknown reasons.
7115 (delete-file "IPython/core/tests/test_displayhook.py")
7116 (delete-file "IPython/core/tests/test_magic_terminal.py")
7117 (delete-file "IPython/core/tests/test_profile.py")
7119 (home-page "https://ipython.org")
7120 (synopsis "IPython is a tool for interactive computing in Python")
7122 "IPython provides a rich architecture for interactive computing with:
7123 Powerful interactive shells, a browser-based notebook, support for interactive
7124 data visualization, embeddable interpreters and tools for parallel
7126 (license license:bsd-3)))
7128 (define-public python-ipython-documentation
7130 (inherit python-ipython)
7131 (name "python-ipython-documentation")
7132 (version (package-version python-ipython))
7135 (modify-phases %standard-phases
7139 (lambda* (#:key outputs #:allow-other-keys)
7140 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7141 (doc (string-append data "/doc/" ,name "-" ,version))
7142 (html (string-append doc "/html"))
7143 (man1 (string-append data "/man/man1"))
7144 (info (string-append data "/info"))
7145 (examples (string-append doc "/examples"))
7146 (python-arg (string-append "PYTHON=" (which "python"))))
7147 (setenv "LANG" "en_US.utf8")
7148 (with-directory-excursion "docs"
7149 ;; FIXME: pdf fails to build
7150 ;;(system* "make" "pdf" "PAPER=a4")
7151 (system* "make" python-arg "html")
7152 ;; FIXME: the generated texi file contains ^@^@, which trips
7154 ;; (system* "make" python-arg "info")
7156 (copy-recursively "docs/man" man1)
7157 (copy-recursively "examples" examples)
7158 (copy-recursively "docs/build/html" html)
7159 ;; (copy-file "docs/build/latex/ipython.pdf"
7160 ;; (string-append doc "/ipython.pdf"))
7162 ;; (copy-file "docs/build/texinfo/ipython.info"
7163 ;; (string-append info "/ipython.info"))
7164 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7167 `(("python-ipython" ,python-ipython)
7168 ("python-ipykernel" ,python-ipykernel)))
7170 `(("python-sphinx" ,python-sphinx)
7171 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7172 ;; FIXME: It's possible that a smaller union would work just as well.
7173 ("texlive" ,(texlive-union (list texlive-amsfonts
7175 texlive-generic-ifxetex
7176 texlive-generic-pdftex
7177 texlive-latex-capt-of
7179 texlive-latex-environ
7180 texlive-latex-eqparbox
7181 texlive-latex-etoolbox
7182 texlive-latex-expdlist
7183 texlive-latex-fancyhdr
7184 texlive-latex-fancyvrb
7185 texlive-latex-fncychap
7187 texlive-latex-framed
7188 texlive-latex-geometry
7189 texlive-latex-graphics
7190 texlive-latex-hyperref
7191 texlive-latex-mdwtools
7192 texlive-latex-multirow
7193 texlive-latex-needspace
7194 texlive-latex-oberdiek
7195 texlive-latex-parskip
7196 texlive-latex-preview
7197 texlive-latex-tabulary
7198 texlive-latex-threeparttable
7199 texlive-latex-titlesec
7200 texlive-latex-trimspaces
7202 texlive-latex-upquote
7204 texlive-latex-varwidth
7205 texlive-latex-wrapfig)))
7206 ("texinfo" ,texinfo)))))
7208 (define-public python-urwid
7210 (name "python-urwid")
7215 (uri (pypi-uri "urwid" version))
7218 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7219 (build-system python-build-system)
7220 (home-page "http://urwid.org")
7221 (synopsis "Console user interface library for Python")
7223 "Urwid is a curses-based UI/widget library for Python. It includes many
7224 features useful for text console applications.")
7225 (license license:lgpl2.1+)))
7227 (define-public python2-urwid
7228 (package-with-python2 python-urwid))
7230 (define-public python-urwidtrees
7232 (name "python-urwidtrees")
7237 ;; package author intends on distributing via github rather than pypi:
7238 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7240 (url "https://github.com/pazz/urwidtrees")
7242 (file-name (git-file-name name version))
7245 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7246 (build-system python-build-system)
7248 '(#:use-setuptools? #f
7249 #:tests? #f)) ; no tests
7250 (propagated-inputs `(("python-urwid" ,python-urwid)))
7251 (home-page "https://github.com/pazz/urwidtrees")
7252 (synopsis "Tree widgets for urwid")
7253 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7254 toolkit. Use it to build trees of widgets.")
7255 (license license:gpl3+)))
7257 (define-public python2-urwidtrees
7258 (package-with-python2 python-urwidtrees))
7260 (define-public python-ua-parser
7262 (name "python-ua-parser")
7267 (uri (pypi-uri "ua-parser" version))
7270 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7271 (build-system python-build-system)
7273 `(#:tests? #f)) ;no test suite in release
7275 `(("python-pyyaml" ,python-pyyaml)))
7276 (home-page "https://github.com/ua-parser/uap-python")
7277 (synopsis "User agent parser")
7279 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7280 (license license:asl2.0)))
7282 (define-public python2-ua-parser
7283 (package-with-python2 python-ua-parser))
7285 (define-public python-user-agents
7287 (name "python-user-agents")
7292 (uri (pypi-uri "user-agents" version))
7295 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7296 (build-system python-build-system)
7298 `(#:tests? #f)) ;missing devices.json test file in release
7300 `(("python-ua-parser" ,python-ua-parser)))
7301 (home-page "https://github.com/selwin/python-user-agents")
7302 (synopsis "User Agent strings parsing library")
7304 "A library to identify devices (phones, tablets) and their capabilities by
7305 parsing (browser/HTTP) user agent strings.")
7306 (license license:expat)))
7308 (define-public python2-user-agents
7309 (package-with-python2 python-user-agents))
7311 (define-public python-dbus
7313 (name "python-dbus")
7318 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7319 "dbus-python-" version ".tar.gz"))
7321 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7322 (build-system gnu-build-system)
7324 `(("pkg-config" ,pkg-config)))
7326 `(("python" ,python-wrapper)
7327 ("dbus-glib" ,dbus-glib)))
7328 (synopsis "Python bindings for D-bus")
7329 (description "python-dbus provides bindings for libdbus, the reference
7330 implementation of D-Bus.")
7331 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7332 (license license:expat)))
7334 (define-public python2-dbus
7335 (package (inherit python-dbus)
7336 (name "python2-dbus")
7337 (inputs `(("python" ,python-2)
7338 ,@(alist-delete "python"
7339 (package-inputs python-dbus)
7342 (define-public python-notify2
7344 (name "python-notify2")
7349 (uri (pypi-uri "notify2" version))
7352 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7353 (build-system python-build-system)
7354 (arguments `(#:tests? #f)) ; tests depend on system state
7356 `(("python-dbus" ,python-dbus)))
7357 (home-page "https://bitbucket.org/takluyver/pynotify2")
7358 (synopsis "Python interface to D-Bus notifications")
7360 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7361 It is a reimplementation of pynotify in pure Python, and an alternative to
7362 the GObject Introspection bindings to libnotify for non-GTK applications.")
7363 (license (list license:bsd-2
7364 license:lgpl2.1+))))
7366 (define-public python2-notify2
7367 (package-with-python2 python-notify2))
7369 ;; beautifulsoup4 has a totally different namespace than 3.x,
7370 ;; and pypi seems to put it under its own name, so I guess we should too
7371 (define-public python-beautifulsoup4
7373 (name "python-beautifulsoup4")
7378 (uri (pypi-uri "beautifulsoup4" version))
7381 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7382 (build-system python-build-system)
7385 (modify-phases %standard-phases
7386 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7387 ;; must use this conversion script when building with Python 3. The
7388 ;; conversion script also runs the tests.
7389 ;; For more information, see the file 'convert-py3k' in the source
7392 (lambda _ (invoke "./convert-py3k"))))))
7394 `(("python-soupsieve" ,python-soupsieve)))
7396 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7398 "Python screen-scraping library")
7400 "Beautiful Soup is a Python library designed for rapidly setting up
7401 screen-scraping projects. It offers Pythonic idioms for navigating,
7402 searching, and modifying a parse tree, providing a toolkit for
7403 dissecting a document and extracting what you need. It automatically
7404 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7405 (license license:expat)
7406 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7408 (define-public python2-beautifulsoup4
7410 (inherit (package-with-python2
7411 (strip-python2-variant python-beautifulsoup4)))
7412 (arguments `(#:python ,python-2))))
7414 (define-public python-soupsieve
7416 (name "python-soupsieve")
7421 (uri (pypi-uri "soupsieve" version))
7424 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7425 (build-system python-build-system)
7426 (arguments `(#:tests? #f))
7427 ;;XXX: 2 tests fail currently despite claming they were to be
7428 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7429 ;;don't want to create a circular dependency.
7430 (home-page "https://github.com/facelessuser/soupsieve")
7431 (synopsis "CSS selector library")
7433 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7434 Soup 4. It aims to provide selecting, matching, and filtering using modern
7435 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7436 specifications up through the latest CSS level 4 drafts and beyond (though
7437 some are not yet implemented).")
7438 (properties `((python2-variant . ,(delay python2-soupsieve))))
7439 (license license:expat)))
7441 ;; This is the last version that supports python-2
7442 (define-public python2-soupsieve
7443 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7450 (uri (pypi-uri "soupsieve" version))
7453 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7455 `(("python2-backports-functools-lru-cache"
7456 ,python2-backports-functools-lru-cache)
7457 ,@(package-propagated-inputs base))))))
7459 (define-public python-netifaces
7461 (name "python-netifaces")
7466 (uri (pypi-uri "netifaces" version))
7469 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7470 (build-system python-build-system)
7471 (home-page "https://github.com/al45tair/netifaces")
7473 "Python module for portable network interface information")
7475 "Netifaces is a Python module providing information on network
7476 interfaces in an easy and portable manner.")
7477 (license license:expat)))
7479 (define-public python2-netifaces
7480 (package-with-python2 python-netifaces))
7482 (define-public python-networkx
7484 (name "python-networkx")
7489 (uri (pypi-uri "networkx" version))
7491 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7492 (build-system python-build-system)
7494 '(#:phases (modify-phases %standard-phases
7496 (lambda* (#:key tests? #:allow-other-keys)
7498 (invoke "pytest" "-vv" "--pyargs" "networkx")
7499 (format #t "test suite not run~%"))
7501 ;; python-decorator is needed at runtime.
7503 `(("python-decorator" ,python-decorator)))
7505 `(("python-pytest" ,python-pytest)))
7506 (home-page "https://networkx.github.io/")
7507 (synopsis "Python module for creating and manipulating graphs and networks")
7509 "NetworkX is a Python package for the creation, manipulation, and study
7510 of the structure, dynamics, and functions of complex networks.")
7511 (properties `((python2-variant . ,(delay python2-networkx))))
7512 (license license:bsd-3)))
7514 ;; NetworkX 2.2 is the last version with support for Python 2.
7515 (define-public python2-networkx
7516 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7522 (uri (pypi-uri "networkx" version ".zip"))
7525 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7527 `(#:python ,python-2))
7529 `(("python-nose" ,python2-nose)
7530 ("unzip" ,unzip))))))
7532 (define-public python-datrie
7534 (name "python-datrie")
7539 (uri (pypi-uri "datrie" version))
7542 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7543 (build-system python-build-system)
7545 `(("python-cython" ,python-cython)
7546 ("python-hypothesis" ,python-hypothesis)
7547 ("python-pytest" ,python-pytest)
7548 ("python-pytest-runner" ,python-pytest-runner)))
7549 (home-page "https://github.com/kmike/datrie")
7550 (synopsis "Fast, efficiently stored trie for Python")
7552 "This package provides a fast, efficiently stored trie implementation for
7554 (license license:lgpl2.1+)))
7556 (define-public snakemake
7563 (uri (pypi-uri "snakemake" version))
7565 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7566 (build-system python-build-system)
7568 ;; TODO: Package missing test dependencies.
7571 (modify-phases %standard-phases
7572 ;; For cluster execution Snakemake will call Python. Since there is
7573 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7574 ;; this by calling the snakemake wrapper instead.
7575 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7576 (lambda* (#:key outputs #:allow-other-keys)
7577 (substitute* "snakemake/executors.py"
7578 (("\\{sys.executable\\} -m snakemake")
7579 (string-append (assoc-ref outputs "out")
7583 `(("python-appdirs" ,python-appdirs)
7584 ("python-configargparse" ,python-configargparse)
7585 ("python-datrie" ,python-datrie)
7586 ("python-docutils" ,python-docutils)
7587 ("python-gitpython" ,python-gitpython)
7588 ("python-jinja2" ,python-jinja2)
7589 ("python-jsonschema" ,python-jsonschema)
7590 ("python-networkx" ,python-networkx)
7591 ("python-psutil" ,python-psutil)
7592 ("python-pyyaml" ,python-pyyaml)
7593 ("python-ratelimiter" ,python-ratelimiter)
7594 ("python-requests" ,python-requests)
7595 ("python-wrapt" ,python-wrapt)))
7596 (home-page "https://snakemake.readthedocs.io")
7597 (synopsis "Python-based execution environment for make-like workflows")
7599 "Snakemake aims to reduce the complexity of creating workflows by
7600 providing a clean and modern domain specific specification language (DSL) in
7601 Python style, together with a fast and comfortable execution environment.")
7602 (license license:expat)))
7604 (define-public python-pyqrcode
7606 (name "python-pyqrcode")
7611 (uri (pypi-uri "PyQRCode" version))
7614 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7615 (build-system python-build-system)
7617 "https://github.com/mnooner256/pyqrcode")
7618 (synopsis "QR code generator")
7620 "Pyqrcode is a QR code generator written purely in Python with
7621 SVG, EPS, PNG and terminal output.")
7622 (license license:bsd-3)))
7624 (define-public python-seaborn
7626 (name "python-seaborn")
7631 (uri (pypi-uri "seaborn" version))
7633 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7634 (build-system python-build-system)
7637 (modify-phases %standard-phases
7638 (add-before 'check 'start-xserver
7639 (lambda* (#:key inputs #:allow-other-keys)
7640 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7641 ;; There must be a running X server and make check doesn't
7642 ;; start one. Therefore we must do it.
7643 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7644 (setenv "DISPLAY" ":1")
7646 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7648 `(("python-pandas" ,python-pandas)
7649 ("python-matplotlib" ,python-matplotlib)
7650 ("python-numpy" ,python-numpy)
7651 ("python-scipy" ,python-scipy)))
7653 `(("python-pytest" ,python-pytest)
7654 ("xorg-server" ,xorg-server-for-tests)))
7655 (home-page "https://seaborn.pydata.org/")
7656 (synopsis "Statistical data visualization")
7658 "Seaborn is a library for making attractive and informative statistical
7659 graphics in Python. It is built on top of matplotlib and tightly integrated
7660 with the PyData stack, including support for numpy and pandas data structures
7661 and statistical routines from scipy and statsmodels.")
7662 (properties `((python2-variant . ,(delay python2-seaborn))))
7663 (license license:bsd-3)))
7665 ;; 0.9.1 is the last release with support for Python 2.
7666 (define-public python2-seaborn
7667 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7673 (uri (pypi-uri "seaborn" version))
7676 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7678 (define-public python-mpmath
7680 (name "python-mpmath")
7684 (uri (pypi-uri "mpmath" version))
7685 (file-name (git-file-name name version))
7688 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7689 (build-system python-build-system)
7691 `(("python-pytest" ,python-pytest)))
7694 (modify-phases %standard-phases
7697 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7698 (home-page "http://mpmath.org")
7699 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7701 "@code{mpmath} can be used as an arbitrary-precision substitute for
7702 Python's float/complex types and math/cmath modules, but also does much
7703 more advanced mathematics.")
7704 (license license:bsd-3)))
7706 (define-public python2-mpmath
7707 (package-with-python2 python-mpmath))
7709 (define-public python-bigfloat
7711 (name "python-bigfloat")
7716 (uri (pypi-uri "bigfloat" version))
7718 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7719 (build-system python-build-system)
7722 (home-page "https://github.com/mdickinson/bigfloat")
7723 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7725 "This package provides a Python interface to the MPFR library for
7726 multiprecision arithmetic.")
7727 (license license:lgpl3+)))
7729 (define-public python2-bigfloat
7730 (package-with-python2 python-bigfloat))
7732 (define-public python-sympy
7734 (name "python-sympy")
7739 (uri (pypi-uri "sympy" version))
7741 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7742 (build-system python-build-system)
7745 (modify-phases %standard-phases
7747 (lambda* (#:key outputs #:allow-other-keys)
7749 (or (which "python3") (which "python"))
7750 "-c" "import sympy; sympy.test(\"/core\")"))))))
7752 `(("python-mpmath" ,python-mpmath)))
7753 (home-page "https://www.sympy.org/")
7754 (synopsis "Python library for symbolic mathematics")
7756 "SymPy is a Python library for symbolic mathematics. It aims to become a
7757 full-featured computer algebra system (CAS) while keeping the code as simple
7758 as possible in order to be comprehensible and easily extensible.")
7759 (license license:bsd-3)))
7761 (define-public python2-sympy
7763 (inherit (package-with-python2 python-sympy))
7764 (version "1.5.1") ; last release for python2
7768 (uri (pypi-uri "sympy" version))
7770 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7772 (define-public python-q
7779 (uri (pypi-uri "q" version))
7782 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7783 (build-system python-build-system)
7784 (home-page "https://github.com/zestyping/q")
7785 (synopsis "Quick-and-dirty debugging output for tired programmers")
7787 "q is a Python module for \"print\" style of debugging Python code. It
7788 provides convenient short API for print out of values, tracebacks, and
7789 falling into the Python interpreter.")
7790 (license license:asl2.0)))
7792 (define-public python2-q
7793 (package-with-python2 python-q))
7795 (define-public python-xlib
7797 (name "python-xlib")
7803 (url "https://github.com/python-xlib/python-xlib")
7805 (file-name (git-file-name name version))
7807 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7808 (build-system python-build-system)
7811 (modify-phases %standard-phases
7812 (add-before 'check 'start-xserver
7813 (lambda* (#:key inputs #:allow-other-keys)
7814 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7815 ;; There must be a running X server and make check doesn't
7816 ;; start one. Therefore we must do it.
7817 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7818 (setenv "DISPLAY" ":1")
7821 `(("python-mock" ,python-mock)
7822 ("python-setuptools-scm" ,python-setuptools-scm)
7823 ("python-six" ,python-six)
7824 ("xorg-server" ,xorg-server)))
7825 (home-page "https://github.com/python-xlib/python-xlib")
7826 (synopsis "Python X11 client library")
7828 "The Python X Library is intended to be a fully functional
7829 X client library for Python programs. It is useful to implement
7830 low-level X clients. It is written entirely in Python.")
7831 (license license:gpl2+)))
7833 (define-public python2-xlib
7834 (package-with-python2 python-xlib))
7836 (define-public python-singledispatch
7838 (name "python-singledispatch")
7843 (uri (pypi-uri "singledispatch" version))
7846 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7847 (build-system python-build-system)
7849 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7851 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7852 (synopsis "Backport of singledispatch feature from Python 3.4")
7854 "This library brings functools.singledispatch from Python 3.4 to Python
7856 (license license:expat)))
7858 (define-public python2-singledispatch
7859 (package-with-python2 python-singledispatch))
7861 ;; the python- version can be removed with python-3.5
7862 (define-public python-backports-abc
7864 (name "python-backports-abc")
7869 (uri (pypi-uri "backports_abc" version))
7872 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7873 (build-system python-build-system)
7874 (home-page "https://github.com/cython/backports_abc")
7875 (synopsis "Backport of additions to the 'collections.abc' module")
7877 "Python-backports-abc provides a backport of additions to the
7878 @code{collections.abc} module in Python-3.5.")
7879 (license license:psfl)))
7881 (define-public python2-backports-abc
7882 (package-with-python2 python-backports-abc))
7884 (define-public python-backports-csv
7886 (name "python-backports-csv")
7891 (uri (pypi-uri "backports.csv" version))
7893 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7894 (build-system python-build-system)
7895 (home-page "https://github.com/ryanhiebert/backports.csv")
7896 (synopsis "Backport of Python 3's csv module for Python 2")
7898 "Provides a backport of Python 3's @code{csv} module for parsing
7899 comma separated values. The API of the @code{csv} module in Python 2
7900 is drastically different from the @code{csv} module in Python 3.
7901 This is due, for the most part, to the difference between str in
7902 Python 2 and Python 3.")
7903 (license license:psfl)))
7905 (define-public python2-backports-csv
7906 (package-with-python2 python-backports-csv))
7908 (define-public python2-backports-shutil-get-terminal-size
7910 (name "python2-backports-shutil-get-terminal-size")
7915 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7918 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7919 (build-system python-build-system)
7921 `(#:python ,python-2
7923 (modify-phases %standard-phases
7926 (setenv "PYTHONPATH" (string-append "./build/lib:"
7927 (getenv "PYTHONPATH")))
7928 (invoke "py.test" "-v"))))))
7930 `(("python2-pytest" ,python2-pytest)))
7931 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7932 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7934 "This package provides a backport of the @code{get_terminal_size
7935 function} from Python 3.3's @code{shutil}.
7936 Unlike the original version it is written in pure Python rather than C,
7937 so it might be a tiny bit slower.")
7938 (license license:expat)))
7940 (define-public python-waf
7946 (uri (string-append "https://waf.io/"
7947 "waf-" version ".tar.bz2"))
7950 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7951 (build-system python-build-system)
7954 (modify-phases %standard-phases
7957 ;; XXX: Find a way to add all extra tools.
7958 (let ((tools '("gccdeps"
7959 "clang_compilation_database")))
7960 (invoke "python" "waf-light" "configure" "build"
7961 (string-append "--tools="
7962 (string-join tools ","))))))
7965 (invoke "python" "waf" "--version")))
7967 (lambda* (#:key outputs #:allow-other-keys)
7968 (let ((out (assoc-ref outputs "out")))
7969 (install-file "waf" (string-append out "/bin")))
7971 ;; waf breaks when it is wrapped.
7973 (home-page "https://waf.io/")
7974 (synopsis "Python-based build system")
7976 "Waf is a Python-based framework for configuring, compiling and installing
7978 (license license:bsd-3)))
7980 (define-public python2-waf
7981 (package-with-python2 python-waf))
7983 (define-public python-pyzmq
7985 (name "python-pyzmq")
7990 (uri (pypi-uri "pyzmq" version))
7992 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
7993 (build-system python-build-system)
7996 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
7997 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
7998 ;; --inplace' for 'python setup.py test' to work.
8001 `(("zeromq" ,zeromq)))
8003 `(("pkg-config" ,pkg-config)
8004 ("python-nose" ,python-nose)))
8005 (home-page "https://github.com/zeromq/pyzmq")
8006 (synopsis "Python bindings for 0MQ")
8008 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8009 (license license:bsd-4)))
8011 (define-public python2-pyzmq
8012 (package-with-python2 python-pyzmq))
8014 (define-public python-pep8
8015 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8016 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8017 ;; some dependents' test suites, and nothing more.
8019 (name "python-pep8")
8024 (uri (pypi-uri "pep8" version))
8027 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8028 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8029 (build-system python-build-system)
8030 (home-page "https://pep8.readthedocs.org/")
8031 (synopsis "Python style guide checker")
8033 "This tools checks Python code against some of the style conventions in
8035 (license license:expat)))
8037 (define-public python2-pep8
8038 (package-with-python2 python-pep8))
8040 (define-public python-pep517
8042 (name "python-pep517")
8047 (uri (pypi-uri "pep517" version))
8050 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8051 (build-system python-build-system)
8054 (modify-phases %standard-phases
8056 (lambda* (#:key tests? #:allow-other-keys)
8057 (delete-file "pytest.ini")
8058 ;; This test tries to connect to the internet
8059 (delete-file "tests/test_meta.py")
8064 `(("python-mock" ,python-mock)
8065 ("python-pytest" ,python-pytest)
8066 ("python-testpath" ,python-testpath)))
8068 `(("python-toml" ,python-toml)
8069 ("python-wheel" ,python-wheel)))
8070 (home-page "https://github.com/pypa/pep517")
8071 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8073 "Wrappers to build Python packages using PEP 517 hooks.")
8074 (properties `((python2-variant . ,(delay python2-pep517))))
8075 (license license:expat)))
8077 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8078 (define-public python2-pep517
8079 (let ((base (package-with-python2
8080 (strip-python2-variant python-pep517))))
8083 (name "python2-pep517")
8086 ,@(package-arguments base)))
8087 (native-inputs `()))))
8089 (define-public python-pyflakes
8091 (name "python-pyflakes")
8096 (uri (pypi-uri "pyflakes" version))
8099 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8100 (build-system python-build-system)
8102 "https://github.com/pyflakes/pyflakes")
8103 (synopsis "Passive checker of Python programs")
8105 "Pyflakes statically checks Python source code for common errors.")
8106 (license license:expat)))
8108 (define-public python2-pyflakes
8109 (package-with-python2 python-pyflakes))
8111 ;; Flake8 2.6 requires an older version of pyflakes.
8112 ;; This should be removed ASAP.
8113 (define-public python-pyflakes-1.2
8114 (package (inherit python-pyflakes)
8119 (uri (pypi-uri "pyflakes" version))
8122 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
8125 (modify-phases %standard-phases
8126 ;; This one test fails.
8128 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
8130 `(("python-pytest" ,python-pytest)))))
8132 (define-public python-mccabe
8134 (name "python-mccabe")
8139 (uri (pypi-uri "mccabe" version))
8142 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8143 (build-system python-build-system)
8145 `(("python-pytest" ,python-pytest-bootstrap)
8146 ("python-pytest-runner" ,python-pytest-runner)))
8147 (home-page "https://github.com/flintwork/mccabe")
8148 (synopsis "McCabe checker, plugin for flake8")
8150 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8151 complexity of Python source code.")
8152 (license license:expat)))
8154 (define-public python2-mccabe
8155 (package-with-python2 python-mccabe))
8157 (define-public python-mccabe-0.2.1
8158 (package (inherit python-mccabe)
8163 (uri (pypi-uri "mccabe" version))
8166 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
8168 (define-public python2-mccabe-0.2.1
8169 (package-with-python2 python-mccabe-0.2.1))
8171 ;; Flake8 2.4.1 requires an older version of pep8.
8172 ;; This should be removed ASAP.
8173 (define-public python-pep8-1.5.7
8174 (package (inherit python-pep8)
8179 (uri (pypi-uri "pep8" version))
8182 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
8184 ;; XXX Tests not compatible with Python 3.5.
8187 (define-public python2-pep8-1.5.7
8188 (package-with-python2 python-pep8-1.5.7))
8190 (define-public python-flake8
8192 (name "python-flake8")
8196 (uri (pypi-uri "flake8" version))
8199 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8200 (build-system python-build-system)
8203 (modify-phases %standard-phases
8205 (add-after 'install 'check
8206 (lambda* (#:key inputs outputs #:allow-other-keys)
8207 (add-installed-pythonpath inputs outputs)
8208 (invoke "pytest" "-v")
8211 `(("python-pycodestyle" ,python-pycodestyle)
8212 ("python-entrypoints" ,python-entrypoints)
8213 ("python-pyflakes" ,python-pyflakes)
8214 ("python-mccabe" ,python-mccabe)))
8216 `(("python-mock" ,python-mock)
8217 ("python-pytest" ,python-pytest-bootstrap)))
8218 (home-page "https://gitlab.com/pycqa/flake8")
8220 "The modular source code checker: pep8, pyflakes and co")
8222 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8223 (properties `((python2-variant . ,(delay python2-flake8))))
8224 (license license:expat)))
8226 (define-public python2-flake8
8227 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8228 (package (inherit base)
8230 `(("python2-configparser" ,python2-configparser)
8231 ("python2-enum34" ,python2-enum34)
8232 ("python2-functools32" ,python2-functools32)
8233 ("python2-typing" ,python2-typing)
8234 ,@(package-propagated-inputs base))))))
8236 ;; python-hacking requires flake8 <2.7.0.
8237 (define-public python-flake8-2.6
8239 (inherit python-flake8)
8243 (uri (pypi-uri "flake8" version))
8246 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
8249 (modify-phases %standard-phases
8250 (add-after 'unpack 'use-later-pycodestyles
8252 (substitute* '("flake8.egg-info/requires.txt"
8254 (("pycodestyle >= 2.0, < 2.1")
8255 "pycodestyle >= 2.0"))
8258 (add-after 'install 'check
8259 (lambda* (#:key inputs outputs #:allow-other-keys)
8260 (add-installed-pythonpath inputs outputs)
8261 (invoke "pytest" "-v")
8264 `(("python-pep8" ,python-pep8)
8265 ("python-pycodestyle" ,python-pycodestyle)
8266 ("python-entrypoints" ,python-entrypoints)
8267 ("python-pyflakes" ,python-pyflakes-1.2)
8268 ("python-mccabe" ,python-mccabe)))))
8270 (define-public python-flake8-bugbear
8272 (name "python-flake8-bugbear")
8277 (uri (pypi-uri "flake8-bugbear" version))
8280 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8281 (build-system python-build-system)
8284 (modify-phases %standard-phases
8285 (add-before 'check 'disable-test
8287 ;; This test fails on slow computers.
8288 (substitute* "tests/test_bugbear.py"
8289 (("def test_does_not_crash_on_any_valid_code")
8290 "def _test_does_not_crash_on_any_valid_code")))))))
8292 `(("python-hypothesis" ,python-hypothesis)
8293 ("python-hypothesmith" ,python-hypothesmith)))
8295 `(("python-attrs" ,python-attrs)
8296 ("python-flake8" ,python-flake8)))
8297 (home-page "https://github.com/PyCQA/flake8-bugbear")
8299 "Flake8 plugin for finding likely bugs and design problems in your program")
8301 "This package contains a plugin for Flake8 finding likely bugs and
8302 design problems in your program. It contains warnings that don't belong
8303 in pyflakes and pycodestyle.")
8304 (license license:expat)))
8306 (define-public python-flake8-polyfill
8308 (name "python-flake8-polyfill")
8313 (uri (pypi-uri "flake8-polyfill" version))
8316 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8317 (build-system python-build-system)
8320 (modify-phases %standard-phases
8323 ;; Be compatible with Pytest 4:
8324 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8325 (substitute* "setup.cfg"
8329 (setenv "PYTHONPATH"
8330 (string-append (getcwd) "/build/lib:"
8331 (getenv "PYTHONPATH")))
8332 (invoke "py.test" "-v"))))))
8334 `(("python-flake8" ,python-flake8)
8335 ("python-mock" ,python-mock)
8336 ("python-pep8" ,python-pep8)
8337 ("python-pycodestyle" ,python-pycodestyle)
8338 ("python-pytest" ,python-pytest)))
8339 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8340 (synopsis "Polyfill package for Flake8 plugins")
8342 "This package that provides some compatibility helpers for Flake8
8343 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8344 (license license:expat)))
8346 (define-public python2-flake8-polyfill
8347 (package-with-python2 python-flake8-polyfill))
8349 (define-public python-flake8-pyi
8351 (name "python-flake8-pyi")
8356 (uri (pypi-uri "flake8-pyi" version))
8359 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8360 (build-system python-build-system)
8362 `(("python-attrs" ,python-attrs)
8363 ("python-flake8" ,python-flake8)
8364 ("python-pyflakes" ,python-pyflakes)))
8365 (home-page "https://github.com/ambv/flake8-pyi")
8367 "Flake8 plugin that provides specializations for type hinting stub files")
8369 "This package contains a plugin that provides specializations for
8370 type hinting stub files, especially interesting for linting typeshed. It
8371 adds the @file{.pyi} extension to the default value of the @code{--filename}
8372 command-line argument to Flake8. This means stubs are linted by default with
8373 this plugin enabled, without needing to explicitly list every file. It
8374 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8375 expressions after the entire file has been read. This enables support for
8376 first-class forward references that stub files use.")
8377 (license license:expat)))
8379 (define-public python-flake8-pie
8381 (name "python-flake8-pie")
8386 (uri (pypi-uri "flake8-pie" version))
8388 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8389 (build-system python-build-system)
8390 (home-page "https://github.com/sbdchd/flake8-pie")
8391 (synopsis "Flake8 extension that implements lints")
8393 "This package provides a flake8 extension that implements miscellaneous
8395 (license license:bsd-2)))
8397 (define-public python-autoflake
8399 (name "python-autoflake")
8404 (uri (pypi-uri "autoflake" version))
8406 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8407 (build-system python-build-system)
8409 `(("python-pyflakes" ,python-pyflakes)))
8410 (home-page "https://github.com/myint/autoflake")
8411 (synopsis "Removes unused imports and unused variables")
8413 "@code{autoflake} removes unused imports and unused variables from Python
8414 code as reported by @code{pyflakes}.
8416 By default, it only removes unused imports for modules that are part of the
8417 standard library. Removal of unused variables is also disabled by default.
8418 It also removes useless @code{pass} statements.")
8419 (license license:expat)))
8421 (define-public python-mistune
8423 (name "python-mistune")
8428 (uri (pypi-uri "mistune" version))
8431 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8432 (build-system python-build-system)
8434 `(("python-nose" ,python-nose)
8435 ("python-cython" ,python-cython)))
8436 (home-page "https://github.com/lepture/mistune")
8437 (synopsis "Markdown parser in pure Python")
8438 (description "This package provides a fast markdown parser in pure
8440 (license license:bsd-3)))
8442 (define-public python2-mistune
8443 (package-with-python2 python-mistune))
8445 (define-public python-markdown
8447 (name "python-markdown")
8452 (uri (pypi-uri "Markdown" version))
8455 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8456 (build-system python-build-system)
8458 `(("python-nose" ,python-nose)
8459 ("python-pyyaml" ,python-pyyaml)))
8460 (home-page "https://python-markdown.github.io/")
8461 (synopsis "Python implementation of Markdown")
8463 "This package provides a Python implementation of John Gruber's
8464 Markdown. The library features international input, various Markdown
8465 extensions, and several HTML output formats. A command line wrapper
8466 markdown_py is also provided to convert Markdown files to HTML.")
8467 (properties `((python2-variant . ,(delay python2-markdown))))
8468 (license license:bsd-3)))
8470 ;; Markdown 3.2 dropped support for Python 2.
8471 (define-public python2-markdown
8472 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8478 (uri (pypi-uri "Markdown" version))
8481 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8483 (define-public python-ptyprocess
8485 (name "python-ptyprocess")
8490 (uri (pypi-uri "ptyprocess" version))
8493 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8494 (build-system python-build-system)
8496 `(("python-nose" ,python-nose)))
8499 (modify-phases %standard-phases
8501 (lambda _ (invoke "nosetests"))))))
8502 (home-page "https://github.com/pexpect/ptyprocess")
8503 (synopsis "Run a subprocess in a pseudo terminal")
8505 "This package provides a Python library used to launch a subprocess in a
8506 pseudo terminal (pty), and interact with both the process and its pty.")
8507 (license license:isc)))
8509 (define-public python2-ptyprocess
8510 (package-with-python2 python-ptyprocess))
8512 (define-public python-cram
8514 (name "python-cram")
8516 (home-page "https://bitheap.org/cram/")
8519 (uri (list (string-append home-page "cram-"
8521 (pypi-uri "cram" version)))
8524 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8527 (modify-phases %standard-phases
8528 (add-after 'unpack 'patch-source
8530 (substitute* (find-files "cram" ".*\\.py$")
8531 ;; Replace default shell path.
8532 (("/bin/sh") (which "sh")))
8533 (substitute* (find-files "tests" ".*\\.t$")
8535 (("/bin/bash") (which "bash"))
8536 (("/bin/sh") (which "sh")))
8537 (substitute* "cram/_test.py"
8538 ;; This hack works around a bug triggered by substituting
8539 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8540 ;; "cram -h", which breaks the output at 80 characters. This
8541 ;; causes the line showing the default shell to break into two
8542 ;; lines, but the test expects a single line...
8543 (("env\\['COLUMNS'\\] = '80'")
8544 "env['COLUMNS'] = '160'"))
8546 (substitute* "Makefile"
8547 ;; Recent versions of python-coverage have caused the test
8548 ;; coverage to decrease (as of version 0.7). Allow that.
8549 (("--fail-under=100")
8554 ;; The test phase uses the built library and executable.
8555 (lambda* (#:key inputs outputs #:allow-other-keys)
8556 (add-installed-pythonpath inputs outputs)
8557 (setenv "PATH" (string-append (getenv "PATH") ":"
8558 (assoc-ref outputs "out") "/bin"))
8559 (invoke "make" "test"))))))
8560 (build-system python-build-system)
8562 `(("python-coverage" ,python-coverage)
8564 (synopsis "Simple testing framework for command line applications")
8566 "Cram is a functional testing framework for command line applications.
8567 Cram tests look like snippets of interactive shell sessions. Cram runs each
8568 command and compares the command output in the test with the command’s actual
8570 (license license:gpl2+)))
8572 (define-public python2-cram
8573 (package-with-python2 python-cram))
8575 (define-public python-crashtest
8577 (name "python-crashtest")
8582 (uri (pypi-uri "crashtest" version))
8584 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8585 (build-system python-build-system)
8586 (home-page "https://github.com/sdispater/crashtest")
8587 (synopsis "Manage Python errors with ease")
8589 "Python library that makes exceptions handling and inspection easier.")
8590 (license license:expat)))
8592 (define-public python-straight-plugin
8594 (name "python-straight-plugin")
8599 (uri (pypi-uri "straight.plugin" version))
8602 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8603 (build-system python-build-system)
8604 (home-page "https://github.com/ironfroggy/straight.plugin")
8605 (synopsis "Simple namespaced plugin facility")
8606 (description "Straight Plugin provides a type of plugin you can create from
8607 almost any existing Python modules, and an easy way for outside developers to
8608 add functionality and customization to your projects with their own plugins.")
8609 (license license:expat)))
8611 (define-public python2-straight-plugin
8612 (package-with-python2 python-straight-plugin))
8614 (define-public python-fonttools
8616 (name "python-fonttools")
8620 (uri (pypi-uri "fonttools" version ".zip"))
8623 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8624 (build-system python-build-system)
8627 ("python-pytest" ,python-pytest)
8628 ("python-pytest-runner" ,python-pytest-runner)))
8629 (home-page "https://github.com/fonttools/fonttools")
8630 (synopsis "Tools to manipulate font files")
8632 "FontTools/TTX is a library to manipulate font files from Python. It
8633 supports reading and writing of TrueType/OpenType fonts, reading and writing
8634 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8635 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8636 from an XML-based format.")
8637 (license license:expat)))
8639 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8640 (define-public python2-fonttools
8641 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8647 (uri (pypi-uri "fonttools" version ".zip"))
8650 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8652 (define-public python-ly
8659 (uri (pypi-uri name version))
8662 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8663 (build-system python-build-system)
8665 ;; FIXME: Some tests need network access.
8667 (synopsis "Tool and library for manipulating LilyPond files")
8668 (description "This package provides a Python library to parse, manipulate
8669 or create documents in LilyPond format. A command line program ly is also
8670 provided that can be used to do various manipulations with LilyPond files.")
8671 (home-page "https://pypi.org/project/python-ly/")
8672 (license license:gpl2+)))
8674 (define-public python-appdirs
8676 (name "python-appdirs")
8681 (uri (pypi-uri "appdirs" version))
8684 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8685 (build-system python-build-system)
8686 (home-page "https://github.com/ActiveState/appdirs")
8688 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8690 "This module provides a portable way of finding out where user data
8691 should be stored on various operating systems.")
8692 (license license:expat)))
8694 (define-public python2-appdirs
8695 (package-with-python2 python-appdirs))
8697 (define-public python-llfuse
8699 (name "python-llfuse")
8703 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8706 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8707 (build-system python-build-system)
8712 `(("pkg-config" ,pkg-config)))
8713 (synopsis "Python bindings for FUSE")
8715 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8716 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8717 (license license:lgpl2.0+)
8718 (properties `((python2-variant . ,(delay python2-llfuse))))))
8720 (define-public python2-llfuse
8721 (package (inherit (package-with-python2
8722 (strip-python2-variant python-llfuse)))
8723 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8726 (define-public python-llfuse-0.41
8727 (package (inherit python-llfuse)
8732 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8733 "llfuse-" version ".tar.bz2"))
8736 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8737 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8738 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8739 (license (list license:expat license:lgpl2.0+))))
8741 (define-public python-msgpack
8743 (name "python-msgpack")
8747 (uri (pypi-uri "msgpack" version))
8750 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8751 (build-system python-build-system)
8753 `(#:modules ((guix build utils)
8754 (guix build python-build-system)
8759 (modify-phases %standard-phases
8762 (let ((cwd (getcwd)))
8763 (setenv "PYTHONPATH"
8764 (string-append cwd "/build/"
8765 (find (cut string-prefix? "lib" <>)
8766 (scandir (string-append cwd "/build")))
8768 (getenv "PYTHONPATH")))
8769 (invoke "pytest" "-v" "test")))))))
8771 `(("python-pytest" ,python-pytest)))
8772 (synopsis "MessagePack (de)serializer")
8773 (description "MessagePack is a fast, compact binary serialization format,
8774 suitable for similar data to JSON. This package provides CPython bindings for
8775 reading and writing MessagePack data.")
8776 (home-page "https://pypi.org/project/msgpack/")
8777 (license license:asl2.0)))
8779 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8780 ;; release 0.5. Some packages like borg still call it by the old name for now.
8781 ;; <https://bugs.gnu.org/30662>
8782 (define-public python-msgpack-transitional
8784 (inherit python-msgpack)
8785 (name "python-msgpack-transitional")
8789 (uri (pypi-uri "msgpack" version))
8792 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8794 (substitute-keyword-arguments (package-arguments python-msgpack)
8796 `(modify-phases ,phases
8797 (add-after 'unpack 'configure-transitional
8799 ;; Keep using the old name.
8800 (substitute* "setup.py"
8801 (("TRANSITIONAL = False")
8802 "TRANSITIONAL = 1"))
8805 (define-public python2-msgpack
8806 (package-with-python2 python-msgpack))
8808 (define-public python-netaddr
8810 (name "python-netaddr")
8815 (uri (pypi-uri "netaddr" version))
8818 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8819 (build-system python-build-system)
8820 (arguments `(#:tests? #f)) ;; No tests.
8821 (home-page "https://github.com/drkjam/netaddr/")
8822 (synopsis "Pythonic manipulation of network addresses")
8824 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8825 and MAC network addresses.")
8826 (license license:bsd-3)))
8828 (define-public python2-netaddr
8829 (package-with-python2 python-netaddr))
8831 (define-public python2-pyroute2
8833 (name "python2-pyroute2")
8838 (uri (pypi-uri "pyroute2" version))
8841 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8842 (build-system python-build-system)
8844 `(#:python ,python-2)) ;Python 3.x is not supported
8845 (home-page "https://github.com/svinota/pyroute2")
8846 (synopsis "Python netlink library")
8848 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8849 Supported netlink families and protocols include:
8851 @item rtnl, network settings - addresses, routes, traffic controls
8852 @item nfnetlink - netfilter API: ipset, nftables, ...
8853 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8854 @item devlink - manage and monitor devlink-enabled hardware
8855 @item generic - generic netlink families
8857 @item nl80211 - wireless functions API (basic support)
8858 @item taskstats - extended process statistics
8859 @item acpi_events - ACPI events monitoring
8860 @item thermal_events - thermal events monitoring
8861 @item VFS_DQUOT - disk quota events monitoring
8864 (license license:gpl2+)))
8866 (define-public python-wrapt
8868 (name "python-wrapt")
8873 (uri (pypi-uri "wrapt" version))
8876 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8877 (build-system python-build-system)
8879 ;; Tests are not included in the tarball, they are only available in the
8882 (home-page "https://github.com/GrahamDumpleton/wrapt")
8883 (synopsis "Module for decorators, wrappers and monkey patching")
8885 "The aim of the wrapt module is to provide a transparent object proxy for
8886 Python, which can be used as the basis for the construction of function
8887 wrappers and decorator functions.")
8888 (license license:bsd-2)))
8890 (define-public python2-wrapt
8891 (package-with-python2 python-wrapt))
8893 (define-public python-xlrd
8895 (name "python-xlrd")
8899 (uri (pypi-uri "xlrd" version))
8902 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8903 (build-system python-build-system)
8906 (modify-phases %standard-phases
8907 ;; Some tests depend on writing a temporary file to the user's home
8909 (add-after 'unpack 'fix-tests
8911 (delete-file "tests/test_open_workbook.py")
8913 (home-page "http://www.python-excel.org/")
8914 (synopsis "Library for extracting data from Excel files")
8915 (description "This package provides a library to extract data from
8916 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8917 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8918 Unicode-aware. It is not intended as an end-user tool.")
8919 (license license:bsd-3)))
8921 (define-public python2-xlrd
8922 (package-with-python2 python-xlrd))
8924 (define-public python-immutables
8926 (name "python-immutables")
8931 (uri (pypi-uri "immutables" version))
8933 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
8934 (build-system python-build-system)
8935 (home-page "https://github.com/MagicStack/immutables")
8936 (synopsis "High-performance immutable mapping type for Python")
8938 "An immutable mapping type for Python. The underlying datastructure is a
8939 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
8940 functional languages.")
8941 (license license:asl2.0)))
8943 (define-public python-prettytable
8945 (name "python-prettytable")
8950 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8953 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8954 (build-system python-build-system)
8955 (home-page "https://code.google.com/archive/p/prettytable/")
8956 (synopsis "Display tabular data in an ASCII table format")
8958 "A library designed to represent tabular data in visually appealing ASCII
8959 tables. PrettyTable allows for selection of which columns are to be printed,
8960 independent alignment of columns (left or right justified or centred) and
8961 printing of sub-tables by specifying a row range.")
8962 (license license:bsd-3)))
8964 (define-public python2-prettytable
8965 (package-with-python2 python-prettytable))
8967 (define-public python-curio
8969 (name "python-curio")
8974 (uri (pypi-uri "curio" version))
8976 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
8977 (build-system python-build-system)
8980 (modify-phases %standard-phases
8982 (lambda* (#:key inputs outputs #:allow-other-keys)
8983 (add-installed-pythonpath inputs outputs)
8984 (invoke "pytest" "-vv" "-k"
8985 ;; Tries to open an outgoing connection.
8986 "not test_ssl_outgoing"))))))
8988 `(("python-pytest" ,python-pytest)))
8989 (home-page "https://github.com/dabeaz/curio")
8990 (synopsis "Coroutine-based library for concurrent Python")
8992 "Curio is a coroutine-based library for concurrent Python systems
8993 programming. It provides standard programming abstractions such as as
8994 tasks, sockets, files, locks, and queues.")
8995 (license license:bsd-3)))
8997 (define-public python-tables
8999 (name "python-tables")
9004 (uri (pypi-uri "tables" version))
9007 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9008 (modules '((guix build utils)))
9011 ;; Remove pre-compiled .pyc files from source.
9012 (for-each delete-file-recursively
9013 (find-files "." "__pycache__" #:directories? #t))
9014 (for-each delete-file (find-files "." "\\.pyc$"))
9016 (build-system python-build-system)
9018 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9019 ;; or "check", so we must override the build and check phases.
9021 (modify-phases %standard-phases
9022 (add-after 'unpack 'use-gcc
9024 (substitute* "setup.py"
9025 (("^( +)compiler = new_compiler\\(\\)" line indent)
9029 "compiler.set_executables(compiler='gcc',"
9030 "compiler_so='gcc',"
9032 "linker_so='gcc -shared')")))
9034 (add-after 'unpack 'disable-tuning
9036 (substitute* "setup.py"
9038 "cpu_flags = ['sse2']\n"))
9041 (lambda* (#:key inputs #:allow-other-keys)
9042 (invoke "python" "setup.py" "build"
9043 (string-append "--hdf5="
9044 (assoc-ref inputs "hdf5")))))
9046 (lambda* (#:key inputs #:allow-other-keys)
9047 (invoke "python" "setup.py" "check"
9048 (string-append "--hdf5="
9049 (assoc-ref inputs "hdf5"))))))))
9051 `(("python-numexpr" ,python-numexpr)
9052 ("python-numpy" ,python-numpy)))
9054 `(("python-cython" ,python-cython)
9055 ("pkg-config" ,pkg-config)))
9057 `(("hdf5" ,hdf5-1.10)
9060 (home-page "https://www.pytables.org/")
9061 (synopsis "Hierarchical datasets for Python")
9062 (description "PyTables is a package for managing hierarchical datasets and
9063 designed to efficiently cope with extremely large amounts of data.")
9064 (license license:bsd-3)))
9066 (define-public python2-tables
9067 (package-with-python2 python-tables))
9069 (define-public python-sniffio
9071 (name "python-sniffio")
9076 (uri (pypi-uri "sniffio" version))
9078 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9079 (build-system python-build-system)
9082 (modify-phases %standard-phases
9085 (invoke "pytest" "-vv"))))))
9087 `(("python-curio" ,python-curio)
9088 ("python-pytest" ,python-pytest)
9089 ("python-pytest-cov" ,python-pytest-cov)))
9090 (home-page "https://github.com/python-trio/sniffio")
9091 (synopsis "Detect which async library a program is running under")
9092 (description "This package detects which async library a program is
9093 running under. It supports multiple async I/O packages, like Trio, and
9095 ;; Either license applies.
9096 (license (list license:expat license:asl2.0))))
9098 (define-public python-pytest-black
9100 (name "python-pytest-black")
9105 (uri (pypi-uri "pytest-black" version))
9108 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9109 (build-system python-build-system)
9111 `(("python-pytest" ,python-pytest)
9112 ("python-black" ,python-black)
9113 ("python-toml" ,python-toml)))
9115 `(("python-setuptools-scm" ,python-setuptools-scm)))
9116 (home-page "https://github.com/shopkeep/pytest-black")
9117 (synopsis "Pytest plugin to enable format checking with black")
9119 "This package provides a pytest plugin to enable format checking with the
9120 Python code formatter \"black\".")
9121 (license license:expat)))
9123 (define-public python-get-version
9125 (name "python-get-version")
9130 (uri (pypi-uri "get_version" version))
9133 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9134 (build-system python-build-system)
9136 `(("python-pygments" ,python-pygments)
9137 ("python-pytest" ,python-pytest)
9138 ("python-pytest-black" ,python-pytest-black)
9139 ("python-pytest-cov" ,python-pytest-cov)
9140 ("python-setuptools" ,python-setuptools)
9141 ("python-testpath" ,python-testpath)))
9142 (home-page "https://github.com/flying-sheep/get_version")
9143 (synopsis "Version helper in the spirit of versioneer")
9145 "This package provides a version helper that lets you automatically use
9146 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9147 also supports getting the version from Python source distributions or, once
9148 your package is installed, via @code{pkg_resources} (part of
9149 @code{setuptools}).")
9150 (license license:gpl3+)))
9152 (define-public python-legacy-api-wrap
9154 (name "python-legacy-api-wrap")
9159 (uri (pypi-uri "legacy-api-wrap" version))
9162 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9163 (build-system python-build-system)
9165 `(("python-get-version" ,python-get-version)
9166 ("python-pytest" ,python-pytest)
9167 ("python-pytest-black" ,python-pytest-black)
9168 ("python-pytest-cov" ,python-pytest-cov)
9169 ("python-setuptools" ,python-setuptools)))
9170 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9171 (synopsis "Legacy API wrapper")
9172 (description "This module defines a decorator to wrap legacy APIs. The
9173 primary use case is APIs defined before keyword-only parameters existed.")
9174 (license license:gpl3+)))
9176 (define-public python-pyasn1
9178 (name "python-pyasn1")
9183 (uri (pypi-uri "pyasn1" version))
9186 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9187 (build-system python-build-system)
9188 (home-page "http://pyasn1.sourceforge.net/")
9189 (synopsis "ASN.1 types and codecs")
9191 "This is an implementation of ASN.1 types and codecs in Python. It is
9192 suitable for a wide range of protocols based on the ASN.1 specification.")
9193 (license license:bsd-2)))
9195 (define-public python2-pyasn1
9196 (package-with-python2 python-pyasn1))
9198 (define-public python-pyasn1-modules
9200 (name "python-pyasn1-modules")
9205 (uri (pypi-uri "pyasn1-modules" version))
9208 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9209 (build-system python-build-system)
9211 `(("python-pyasn1" ,python-pyasn1)))
9212 (home-page "https://sourceforge.net/projects/pyasn1/")
9213 (synopsis "ASN.1 codec implementations")
9215 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9216 implementations of ASN.1-based codecs and protocols.")
9217 (license license:bsd-3)))
9219 (define-public python2-pyasn1-modules
9220 (package-with-python2 python-pyasn1-modules))
9222 (define-public python-ipaddress
9224 (name "python-ipaddress")
9228 (uri (pypi-uri "ipaddress" version))
9231 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9232 (build-system python-build-system)
9233 (home-page "https://github.com/phihag/ipaddress")
9234 (synopsis "IP address manipulation library")
9236 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9237 in Python. This library is used to create, poke at, and manipulate IPv4 and
9238 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9239 module to older versions of Python.")
9240 (license license:psfl)))
9242 (define-public python2-ipaddress
9243 (package-with-python2 python-ipaddress))
9245 (define-public python2-ipaddr
9247 (name "python2-ipaddr")
9252 (uri (pypi-uri "ipaddr" version))
9254 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9255 (build-system python-build-system)
9257 `(#:python ,python-2 ;version 2 only
9259 (modify-phases %standard-phases
9261 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9262 (home-page "https://github.com/google/ipaddr-py")
9263 (synopsis "IP address manipulation library")
9265 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9266 IPv6 addresses and networks.
9268 For new implementations you may prefer to use the standard module
9269 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9270 versions of Python.")
9271 (license license:asl2.0)))
9273 (define-public python-idna
9275 (name "python-idna")
9280 (uri (pypi-uri "idna" version))
9283 "1jxp2pdi8y4asi7ka1zhx3yx09kv8kzj533f0ds7viz49b0x323m"))))
9284 (build-system python-build-system)
9285 (home-page "https://github.com/kjd/idna")
9286 (synopsis "Internationalized domain names in applications")
9288 "This is a library to support the Internationalised Domain Names in
9289 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9290 protocol is often referred to as “IDNA2008” and can produce different results
9291 from the earlier standard from 2003. The library is also intended to act as a
9292 suitable drop-in replacement for the “encodings.idna” module that comes with
9293 the Python standard library but currently only supports the older 2003
9295 (license license:bsd-4)))
9297 (define-public python-idna-2.7
9298 (package (inherit python-idna)
9302 (uri (pypi-uri "idna" version))
9305 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9308 (define-public python2-idna
9309 (package-with-python2 python-idna))
9311 (define-public python-libsass
9313 (name "python-libsass")
9317 ;; PyPI tarball is missing some test files.
9320 (url "https://github.com/sass/libsass-python")
9322 (file-name (git-file-name name version))
9324 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9325 (build-system python-build-system)
9328 (modify-phases %standard-phases
9329 ;; Use Guix package of libsass instead of compiling from a checkout.
9330 (add-before 'build 'set-libsass
9332 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9335 (lambda* (#:key inputs outputs #:allow-other-keys)
9336 (add-installed-pythonpath inputs outputs)
9337 (invoke "pytest" "sasstests.py"))))))
9339 `(("python-pytest" ,python-pytest)
9340 ("python-werkzeug" ,python-werkzeug)))
9342 `(("libsass" ,libsass)))
9344 `(("python-six" ,python-six)))
9345 (home-page "https://sass.github.io/libsass-python/")
9346 (synopsis "Straightforward binding of libsass for Python")
9348 "This package provides a simple Python extension module @code{sass} which
9349 is binding LibSass.")
9350 (license license:expat)))
9352 (define-public python-idna-ssl
9354 (name "python-idna-ssl")
9359 (uri (pypi-uri "idna-ssl" version))
9362 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9363 (build-system python-build-system)
9365 `(#:tests? #f)) ;circular dependency with python-aiohttp
9366 (home-page "https://github.com/aio-libs/idna-ssl")
9367 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9368 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9370 (license license:expat)))
9372 (define-public python-pretend
9374 (name "python-pretend")
9379 (uri (pypi-uri "pretend" version))
9382 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9383 (build-system python-build-system)
9384 (home-page "https://github.com/alex/pretend")
9385 (synopsis "Library for stubbing in Python")
9387 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9388 technique for writing tests. You may hear the term mixed up with mocks,
9389 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9390 responses, rather than doing any computation.")
9391 (license license:bsd-3)))
9393 (define-public python2-pretend
9394 (package-with-python2 python-pretend))
9396 (define-public python-pip
9403 (uri (pypi-uri "pip" version))
9406 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9407 (build-system python-build-system)
9409 '(#:tests? #f)) ; there are no tests in the pypi archive.
9410 (home-page "https://pip.pypa.io/")
9411 (synopsis "Package manager for Python software")
9413 "Pip is a package manager for Python software, that finds packages on the
9414 Python Package Index (PyPI).")
9415 (license license:expat)))
9417 (define-public python2-pip
9418 (package-with-python2 python-pip))
9420 (define-public python-tlsh
9422 (name "python-tlsh")
9424 (home-page "https://github.com/trendmicro/tlsh")
9429 (url "https://github.com/trendmicro/tlsh")
9430 (commit (string-append "v" version))))
9431 (file-name (git-file-name name version))
9433 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9434 (build-system cmake-build-system)
9436 '(#:out-of-source? #f
9437 #:phases (modify-phases %standard-phases
9440 (lambda* (#:key outputs #:allow-other-keys)
9441 ;; Build and install the Python bindings. The underlying
9442 ;; C++ library is apparently not meant to be installed.
9443 (let ((out (assoc-ref outputs "out")))
9444 (with-directory-excursion "py_ext"
9445 (and (system* "python" "setup.py" "build")
9446 (system* "python" "setup.py" "install"
9447 (string-append "--prefix=" out))))))))))
9448 (inputs `(("python" ,python-wrapper))) ;for the bindings
9449 (synopsis "Fuzzy matching library for Python")
9451 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9452 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9453 value which can be used for similarity comparisons. Similar objects have
9454 similar hash values, which allows for the detection of similar objects by
9455 comparing their hash values. The byte stream should have a sufficient amount
9456 of complexity; for example, a byte stream of identical bytes will not generate
9458 (license license:asl2.0)))
9460 (define-public python2-tlsh
9462 (inherit python-tlsh)
9463 (name "python2-tlsh")
9464 (inputs `(("python" ,python-2)))))
9466 (define-public python-termcolor
9468 (name "python-termcolor")
9473 (uri (pypi-uri "termcolor" version))
9476 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9477 (build-system python-build-system)
9479 ;; There are no tests.
9481 (home-page "https://pypi.org/project/termcolor/")
9482 (synopsis "ANSII Color formatting for terminal output")
9484 "This package provides ANSII Color formatting for output in terminals.")
9485 (license license:expat)))
9487 (define-public python2-termcolor
9488 (package-with-python2 python-termcolor))
9490 (define-public python-terminaltables
9492 (name "python-terminaltables")
9497 (uri (pypi-uri "terminaltables" version))
9500 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9501 (build-system python-build-system)
9502 (home-page "https://github.com/Robpol86/terminaltables")
9504 "Generate simple tables in terminals from a nested list of strings")
9506 "This package makes it easy to draw tables in terminal/console
9507 applications from a list of lists of strings. It supports multi-line rows.")
9508 (license license:expat)))
9510 (define-public python-libarchive-c
9512 (name "python-libarchive-c")
9516 (uri (pypi-uri "libarchive-c" version))
9519 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9520 (build-system python-build-system)
9522 '(#:phases (modify-phases %standard-phases
9524 'build 'reference-libarchive
9525 (lambda* (#:key inputs #:allow-other-keys)
9526 ;; Retain the absolute file name of libarchive.so.
9527 (let ((libarchive (assoc-ref inputs "libarchive")))
9528 (substitute* "libarchive/ffi.py"
9529 (("find_library\\('archive'\\)")
9530 (string-append "'" libarchive
9531 "/lib/libarchive.so'"))))))
9533 (lambda _ (invoke "pytest" "-vv"))))))
9535 `(("python-mock" ,python-mock)
9536 ("python-pytest" ,python-pytest)))
9538 `(("libarchive" ,libarchive)))
9539 (home-page "https://github.com/Changaco/python-libarchive-c")
9540 (synopsis "Python interface to libarchive")
9542 "This package provides Python bindings to libarchive, a C library to
9543 access possibly compressed archives in many different formats. It uses
9544 Python's @code{ctypes} foreign function interface (FFI).")
9545 (license license:lgpl2.0+)))
9547 (define-public python2-libarchive-c
9548 (package-with-python2 python-libarchive-c))
9550 (define-public python-file
9553 (name "python-file")
9554 (build-system python-build-system)
9556 '(#:tests? #f ;no tests
9557 #:configure-flags '("--single-version-externally-managed" "--root=/")
9558 #:phases (modify-phases %standard-phases
9559 (add-before 'build 'change-directory
9563 (add-before 'build 'set-library-file-name
9564 (lambda* (#:key inputs #:allow-other-keys)
9565 (let ((file (assoc-ref inputs "file")))
9566 (substitute* "magic.py"
9567 (("find_library\\('magic'\\)")
9568 (string-append "'" file "/lib/libmagic.so'")))
9570 (inputs `(("file" ,file)))
9571 (native-inputs (if (%current-target-system)
9572 `(("self" ,this-package))
9574 (synopsis "Python bindings to the libmagic file type guesser")
9575 (description "This package provides Python bindings to the libmagic file
9578 Note that this module and the @code{python-magic} module both provide a
9579 @file{magic.py} file; these two modules, which are different and were
9580 developed separately, both serve the same purpose: provide Python bindings for
9583 (define-public python2-file
9584 (package-with-python2 python-file))
9586 (define-public python-debian
9588 (name "python-debian")
9589 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9593 ;; Use git-fetch, as pypi doesn't include test suite.
9598 (file-name (git-file-name name version))
9601 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9602 (build-system python-build-system)
9604 `(#:phases (modify-phases %standard-phases
9605 (add-after 'unpack 'remove-debian-specific-tests
9606 ;; python-apt, apt and dpkg are not yet available in guix,
9607 ;; and these tests heavily depend on them.
9609 (delete-file "lib/debian/tests/test_deb822.py")
9610 (delete-file "lib/debian/tests/test_debfile.py")
9613 `(("python-six" ,python-six)
9614 ("python-chardet" ,python-chardet)))
9615 (synopsis "Debian package related modules")
9617 ;; XXX: Use @enumerate instead of @itemize to work around
9618 ;; <http://bugs.gnu.org/21772>.
9619 "This package provides Python modules that abstract many formats of
9620 Debian-related files, such as:
9623 @item Debtags information;
9624 @item @file{debian/changelog} files;
9625 @item packages files, pdiffs;
9626 @item control files of single or multiple RFC822-style paragraphs---e.g.
9627 @file{debian/control}, @file{.changes}, @file{.dsc};
9628 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9629 contained files and meta-information.
9632 ;; Modules are either GPLv2+ or GPLv3+.
9633 (license license:gpl3+)))
9635 (define-public python-nbformat
9637 (name "python-nbformat")
9642 (uri (pypi-uri "nbformat" version))
9645 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9646 (build-system python-build-system)
9647 (arguments `(#:tests? #f)) ; no test target
9649 `(("python-ipython-genutils" ,python-ipython-genutils)
9650 ("python-jsonschema" ,python-jsonschema)
9651 ("python-jupyter-core" ,python-jupyter-core)
9652 ("python-traitlets" ,python-traitlets)))
9653 (home-page "http://jupyter.org")
9654 (synopsis "Jupyter Notebook format")
9655 (description "This package provides the reference implementation of the
9656 Jupyter Notebook format and Python APIs for working with notebooks.")
9657 (license license:bsd-3)))
9659 (define-public python2-nbformat
9660 (package-with-python2 python-nbformat))
9662 (define-public python-bleach
9664 (name "python-bleach")
9669 (uri (pypi-uri "bleach" version))
9671 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9672 (build-system python-build-system)
9674 `(("python-webencodings" ,python-webencodings)
9675 ("python-six" ,python-six)))
9677 `(("python-datrie" ,python-datrie)
9678 ("python-genshi" ,python-genshi)
9679 ("python-lxml" ,python-lxml)
9680 ("python-pytest" ,python-pytest)))
9681 (home-page "https://github.com/mozilla/bleach")
9682 (synopsis "Whitelist-based HTML-sanitizing tool")
9683 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9684 (license license:asl2.0)))
9686 (define-public python2-bleach
9687 (package-with-python2 python-bleach))
9689 (define-public python-entrypoints
9691 (name "python-entrypoints")
9696 (uri (pypi-uri "entrypoints" version))
9699 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9700 (build-system python-build-system)
9701 ;; The package does not come with a setup.py file, so we have to generate
9706 (modify-phases %standard-phases
9707 (add-after 'unpack 'create-setup.py
9709 (call-with-output-file "setup.py"
9712 from setuptools import setup
9713 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9715 (home-page "https://github.com/takluyver/entrypoints")
9716 (synopsis "Discover and load entry points from installed Python packages")
9717 (description "Entry points are a way for Python packages to advertise
9718 objects with some common interface. The most common examples are
9719 @code{console_scripts} entry points, which define shell commands by
9720 identifying a Python function to run. The @code{entrypoints} module contains
9721 functions to find and load entry points.")
9722 (license license:expat)))
9724 (define-public python2-entrypoints
9725 (package-with-python2 python-entrypoints))
9727 (define-public python-epc
9734 (uri (pypi-uri "epc" version))
9737 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9738 (build-system python-build-system)
9740 `(("python-sexpdata" ,python-sexpdata)))
9742 `(("python-nose" ,python-nose)))
9743 (home-page "https://github.com/tkf/python-epc")
9744 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9746 "Python-EPC can call elisp functions from Python and Python functions
9748 (license license:gpl3)))
9750 (define-public python-forex-python
9752 (name "python-forex-python")
9757 (uri (pypi-uri "forex-python" version))
9759 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9760 (build-system python-build-system)
9762 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9763 ;; repository require online data.
9766 `(("python-requests" ,python-requests)
9767 ("python-simplejson" ,python-simplejson)))
9768 (home-page "https://github.com/MicroPyramid/forex-python")
9769 (synopsis "Foreign exchange rates and currency conversion")
9771 "@code{python-forex-python} can be used to manipulate foreign
9772 exchange rates and to operate currency conversions.
9776 @item List all currency rates.
9777 @item BitCoin price for all currencies.
9778 @item Converting amount to BitCoins.
9779 @item Get historical rates for any day since 1999.
9780 @item Conversion rate for one currency(ex; USD to INR).
9781 @item Convert amount from one currency to other.('USD 10$' to INR).
9782 @item Currency symbols.
9783 @item Currency names.
9785 (license license:expat)))
9787 (define-public python-simpleeval
9789 (name "python-simpleeval")
9794 (uri (pypi-uri "simpleeval" version))
9796 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9797 (build-system python-build-system)
9798 (home-page "https://github.com/danthedeckie/simpleeval")
9799 (synopsis "Simple, safe single expression evaluator library")
9801 "This package provides a quick single file library for easily adding
9802 evaluatable expressions into python projects. Say you want to allow a user
9803 to set an alarm volume, which could depend on the time of day, alarm level,
9804 how many previous alarms had gone off, and if there is music playing at the
9806 (license license:expat)))
9808 (define-public python-nbconvert
9810 (name "python-nbconvert")
9815 (uri (pypi-uri "nbconvert" version))
9818 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9819 (build-system python-build-system)
9821 `(;; The "bdist_egg" target is disabled by default, causing the installation
9823 #:configure-flags (list "bdist_egg")
9824 ;; FIXME: 5 failures, 40 errors.
9827 ;; (modify-phases %standard-phases
9830 ;; (zero? (system* "py.test" "-v")))))
9832 `(("python-pytest" ,python-pytest)))
9834 `(("python-bleach" ,python-bleach)
9835 ("python-entrypoints" ,python-entrypoints)
9836 ("python-jinja2" ,python-jinja2)
9837 ("python-jupyter-core" ,python-jupyter-core)
9838 ("python-mistune" ,python-mistune)
9839 ("python-nbformat" ,python-nbformat)
9840 ("python-pygments" ,python-pygments)
9841 ("python-traitlets" ,python-traitlets)))
9842 (home-page "http://jupyter.org")
9843 (synopsis "Converting Jupyter Notebooks")
9844 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9845 notebooks to various other formats via Jinja templates. It allows you to
9846 convert an @code{.ipynb} notebook file into various static formats including:
9854 @item ReStructured Text (rst)
9855 @item executable script
9857 (license license:bsd-3)))
9859 (define-public python2-nbconvert
9860 (package-with-python2 python-nbconvert))
9862 (define-public python-notebook
9864 (name "python-notebook")
9868 (uri (pypi-uri "notebook" version))
9871 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9872 (build-system python-build-system)
9875 (modify-phases %standard-phases
9878 ;; These tests require a browser
9879 (delete-file-recursively "notebook/tests/selenium")
9880 ;; Some tests need HOME
9881 (setenv "HOME" "/tmp")
9882 ;; This file contains "warningfilters", which are not supported
9883 ;; by this version of nose.
9884 (delete-file "setup.cfg")
9885 (with-directory-excursion "/tmp"
9886 (invoke "nosetests" "-v"))
9889 `(("python-jupyter-core" ,python-jupyter-core)
9890 ("python-nbformat" ,python-nbformat)
9891 ("python-nbconvert" ,python-nbconvert)
9892 ("python-prometheus-client" ,python-prometheus-client)
9893 ("python-send2trash" ,python-send2trash)
9894 ("python-terminado" ,python-terminado)))
9896 `(("python-nose" ,python-nose)
9897 ("python-sphinx" ,python-sphinx)
9898 ("python-requests" ,python-requests)))
9899 (home-page "http://jupyter.org/")
9900 (synopsis "Web-based notebook environment for interactive computing")
9902 "The Jupyter HTML notebook is a web-based notebook environment for
9903 interactive computing.")
9904 (properties `((python2-variant . ,(delay python2-notebook))))
9905 (license license:bsd-3)))
9907 (define-public python2-notebook
9908 (let ((base (package-with-python2
9909 (strip-python2-variant python-notebook))))
9910 (package (inherit base)
9912 `(("python2-mock" ,python2-mock)
9913 ,@(package-native-inputs base)))
9915 (substitute-keyword-arguments (package-arguments base)
9917 `(modify-phases ,phases
9918 (add-before 'check 'disable-test-case
9919 ;; The test requires network access to localhost. Curiously it
9920 ;; fails with Python 2 only. Simply make the test-case return
9924 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9925 (("formats = self.nbconvert_api") "return #")))))))))))
9927 (define-public python-widgetsnbextension
9929 (name "python-widgetsnbextension")
9934 (uri (pypi-uri "widgetsnbextension" version))
9937 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9938 (build-system python-build-system)
9940 `(("python-ipykernel" ,python-ipykernel)
9941 ("python-notebook" ,python-notebook)))
9943 `(("python-certifi" ,python-certifi)
9944 ("python-nose" ,python-nose)))
9945 (home-page "https://ipython.org")
9946 (synopsis "IPython HTML widgets for Jupyter")
9947 (description "This package provides interactive HTML widgets for Jupyter
9949 (license license:bsd-3)))
9951 (define-public python2-widgetsnbextension
9952 (package-with-python2 python-widgetsnbextension))
9954 (define-public python-ipywidgets
9956 (name "python-ipywidgets")
9961 (uri (pypi-uri "ipywidgets" version))
9964 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
9965 (build-system python-build-system)
9967 `(("python-ipython" ,python-ipython)
9968 ("python-traitlets" ,python-traitlets)
9969 ("python-widgetsnbextension" ,python-widgetsnbextension)))
9971 `(("python-nose" ,python-nose)
9972 ("python-pytest" ,python-pytest)))
9973 (home-page "https://ipython.org")
9974 (synopsis "IPython HTML widgets for Jupyter")
9975 (description "Ipywidgets are interactive HTML widgets for Jupyter
9976 notebooks and the IPython kernel. Notebooks come alive when interactive
9977 widgets are used. Users gain control of their data and can visualize changes
9979 (license license:bsd-3)))
9981 (define-public python2-ipywidgets
9982 (package-with-python2 python-ipywidgets))
9984 (define-public python-jupyter-console
9986 (name "python-jupyter-console")
9991 (uri (pypi-uri "jupyter_console" version))
9994 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
9995 (build-system python-build-system)
9997 `(("python-ipykernel" ,python-ipykernel)
9998 ("python-jupyter-client" ,python-jupyter-client)
9999 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10000 ("python-pygments" ,python-pygments)))
10002 `(("python-nose" ,python-nose)))
10003 (home-page "https://jupyter.org")
10004 (synopsis "Jupyter terminal console")
10005 (description "This package provides a terminal-based console frontend for
10006 Jupyter kernels. It also allows for console-based interaction with non-Python
10007 Jupyter kernels such as IJulia and IRKernel.")
10008 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10009 (license license:bsd-3)))
10011 (define-public python2-jupyter-console
10013 (name "python2-jupyter-console")
10018 (uri (pypi-uri "jupyter_console" version))
10021 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10022 (build-system python-build-system)
10024 `(#:python ,python-2
10025 #:tests? #f)) ; Tests only run in a TTY.
10027 `(("python2-ipykernel" ,python2-ipykernel)
10028 ("python2-jupyter-client" ,python2-jupyter-client)
10029 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10030 ("python2-pygments" ,python2-pygments)))
10032 `(("python2-nose" ,python2-nose)))
10033 (home-page "https://jupyter.org")
10034 (synopsis "Jupyter terminal console")
10035 (description "This package provides a terminal-based console frontend for
10036 Jupyter kernels. It also allows for console-based interaction with non-Python
10037 Jupyter kernels such as IJulia and IRKernel.")
10038 (license license:bsd-3)))
10040 ;; The python-ipython and python-jupyter-console require each other. To get
10041 ;; the functionality in both packages working, strip down the
10042 ;; python-jupyter-console package when using it as an input to python-ipython.
10043 (define python-jupyter-console-minimal
10045 (inherit python-jupyter-console)
10046 (name "python-jupyter-console-minimal")
10048 (substitute-keyword-arguments
10049 (package-arguments python-jupyter-console)
10051 `(modify-phases ,phases
10052 (add-after 'install 'delete-bin
10053 (lambda* (#:key outputs #:allow-other-keys)
10054 ;; Delete the bin files, to avoid conflicts in profiles
10055 ;; where python-ipython and python-jupyter-console are
10057 (delete-file-recursively
10059 (assoc-ref outputs "out") "/bin"))))))))
10060 ;; Remove the python-ipython propagated input, to avoid the cycle
10064 (package-propagated-inputs python-jupyter-console)))))
10066 (define-public python-qtconsole
10068 (name "python-qtconsole")
10073 (uri (pypi-uri "qtconsole" version))
10076 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10077 (build-system python-build-system)
10079 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10080 ;; but we only have the LTS version 5.x. This means that there might be
10081 ;; runtime errors, but since this is a dependency of the Jupyter package,
10082 ;; and Jupyter can be used without the qtconsole we can overlook this for
10086 (modify-phases %standard-phases
10087 (add-before 'check 'pre-check
10089 (setenv "QT_QPA_PLATFORM" "offscreen")
10092 `(("python-ipykernel" ,python-ipykernel)
10093 ("python-ipython" ,python-ipython)))
10095 `(("python-pytest" ,python-pytest)))
10096 (home-page "http://jupyter.org")
10097 (synopsis "Jupyter Qt console")
10098 (description "This package provides a Qt-based console for Jupyter with
10099 support for rich media output.")
10100 (license license:bsd-3)))
10102 (define-public python-jsbeautifier
10104 (name "python-jsbeautifier")
10106 (home-page "https://github.com/beautify-web/js-beautify")
10109 (uri (git-reference
10111 (commit (string-append "v" version))))
10112 (file-name (git-file-name name version))
10115 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10116 (build-system python-build-system)
10118 `(#:phases (modify-phases %standard-phases
10119 (add-after 'unpack 'chdir
10121 ;; The upstream Git repository contains all the code,
10122 ;; but this package only builds the python code.
10125 (add-after 'unpack 'patch-python-six-requirements
10127 (substitute* "python/setup.py"
10132 `(("python-editorconfig" ,python-editorconfig)
10133 ("python-six" ,python-six)))
10135 `(("python-pytest" ,python-pytest)))
10136 (synopsis "JavaScript unobfuscator and beautifier")
10137 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10138 popular online obfuscators.")
10139 (license license:expat)))
10141 (define-public jupyter
10148 (uri (pypi-uri "jupyter" version))
10151 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10152 (build-system python-build-system)
10153 (arguments '(#:tests? #f)) ; there are none.
10155 `(("python-ipykernel" ,python-ipykernel)
10156 ("python-ipywidgets" ,python-ipywidgets)
10157 ("python-jupyter-console" ,python-jupyter-console)
10158 ("python-nbconvert" ,python-nbconvert)
10159 ("python-notebook" ,python-notebook)
10160 ("python-qtconsole" ,python-qtconsole)))
10161 (native-search-paths
10162 (list (search-path-specification
10163 (variable "JUPYTER_PATH")
10164 (files '("share/jupyter")))))
10165 (home-page "https://jupyter.org")
10166 (synopsis "Web application for interactive documents")
10168 "The Jupyter Notebook is a web application that allows you to create and
10169 share documents that contain live code, equations, visualizations and
10170 explanatory text. Uses include: data cleaning and transformation, numerical
10171 simulation, statistical modeling, machine learning and much more.")
10172 (license license:bsd-3)))
10174 (define-public python-chardet
10176 (name "python-chardet")
10181 (uri (pypi-uri "chardet" version))
10184 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10186 `(("python-hypothesis" ,python-hypothesis)
10187 ("python-pytest" ,python-pytest)
10188 ("python-pytest-runner" ,python-pytest-runner)))
10189 (build-system python-build-system)
10190 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10191 (arguments `(#:tests? #f))
10192 (home-page "https://github.com/chardet/chardet")
10193 (synopsis "Universal encoding detector for Python 2 and 3")
10195 "This package provides @code{chardet}, a Python module that can
10196 automatically detect a wide range of file encodings.")
10197 (license license:lgpl2.1+)))
10199 (define-public python2-chardet
10200 (package-with-python2 python-chardet))
10202 (define-public python-docopt
10204 (name "python-docopt")
10209 ;; The release on PyPI does not include tests.
10210 (uri (git-reference
10211 (url "https://github.com/docopt/docopt")
10213 (file-name (git-file-name name version))
10216 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10217 (build-system python-build-system)
10219 `(("python-pytest" ,python-pytest)))
10222 (modify-phases %standard-phases
10224 (lambda _ (invoke "py.test"))))))
10225 (home-page "http://docopt.org")
10226 (synopsis "Command-line interface description language for Python")
10227 (description "This library allows the user to define a command-line
10228 interface from a program's help message rather than specifying it
10229 programmatically with command-line parsers like @code{getopt} and
10231 (license license:expat)))
10233 (define-public python2-docopt
10234 (package-with-python2 python-docopt))
10236 (define-public python-pythondialog
10238 (name "python-pythondialog")
10243 (uri (pypi-uri "pythondialog" version))
10246 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10247 (build-system python-build-system)
10250 (modify-phases %standard-phases
10251 (add-after 'unpack 'patch-path
10252 (lambda* (#:key inputs #:allow-other-keys)
10253 (let* ((dialog (assoc-ref inputs "dialog")))
10254 ;; Since this library really wants to grovel the search path, we
10255 ;; must hardcode dialog's store path into it.
10256 (substitute* "dialog.py"
10257 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10258 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10260 #:tests? #f)) ; no test suite
10262 `(("dialog" ,dialog)))
10263 (home-page "http://pythondialog.sourceforge.net/")
10264 (synopsis "Python interface to the UNIX dialog utility")
10265 (description "A Python wrapper for the dialog utility. Its purpose is to
10266 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10267 This allows one to make simple text-mode user interfaces on Unix-like systems")
10268 (license license:lgpl2.1)
10269 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10271 (define-public python2-pythondialog
10272 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10275 (version (package-version python-pythondialog))
10278 (uri (pypi-uri "python2-pythondialog" version))
10281 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10283 (define-public python-configobj
10285 (name "python-configobj")
10289 (uri (pypi-uri "configobj" version))
10292 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10293 ;; Patch setup.py so it looks for python-setuptools, which is
10294 ;; required to parse the keyword 'install_requires' in setup.py.
10295 (patches (search-patches "python-configobj-setuptools.patch"))))
10296 (build-system python-build-system)
10298 `(("python-six" ,python-six)))
10299 (synopsis "Config file reading, writing and validation")
10300 (description "ConfigObj is a simple but powerful config file reader and
10301 writer: an ini file round tripper. Its main feature is that it is very easy to
10302 use, with a straightforward programmer’s interface and a simple syntax for
10304 (home-page "https://github.com/DiffSK/configobj")
10305 (license license:bsd-3)))
10307 (define-public python2-configobj
10308 (package-with-python2 python-configobj))
10310 (define-public python-configargparse
10312 (name "python-configargparse")
10316 (uri (pypi-uri "ConfigArgParse" version))
10319 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10320 (build-system python-build-system)
10322 `(("python-pyyaml" ,python-pyyaml)))
10325 (modify-phases %standard-phases
10328 ;; Bypass setuptools-shim because one test relies on "setup.py"
10329 ;; being the first argument passed to the python call.
10331 ;; NOTE: Many tests do not run because they rely on Python's
10332 ;; built-in test.test_argparse, but we remove the unit tests from
10333 ;; our Python installation.
10334 (invoke "python" "setup.py" "test"))))))
10335 (synopsis "Replacement for argparse")
10336 (description "A drop-in replacement for argparse that allows options to also
10337 be set via config files and/or environment variables.")
10338 (home-page "https://github.com/bw2/ConfigArgParse")
10339 (license license:expat)))
10341 (define-public python2-configargparse
10342 (package-with-python2 python-configargparse))
10344 (define-public python-argparse-manpage
10346 (name "python-argparse-manpage")
10351 (uri (pypi-uri "argparse-manpage" version))
10354 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10355 (build-system python-build-system)
10356 (home-page "https://github.com/praiskup/argparse-manpage")
10357 (synopsis "Build manual page from Python's ArgumentParser object")
10359 "This package provides tools to build manual pages from Python's
10360 @code{ArgumentParser} object.")
10361 (license license:asl2.0)))
10363 (define-public python-contextlib2
10365 (name "python-contextlib2")
10366 (version "0.6.0.post1")
10370 (uri (pypi-uri "contextlib2" version))
10373 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10374 (build-system python-build-system)
10375 (home-page "https://contextlib2.readthedocs.org/")
10376 (synopsis "Tools for decorators and context managers")
10377 (description "This module is primarily a backport of the Python
10378 3.2 contextlib to earlier Python versions. Like contextlib, it
10379 provides utilities for common tasks involving decorators and context
10380 managers. It also contains additional features that are not part of
10381 the standard library.")
10382 (properties `((python2-variant . ,(delay python2-contextlib2))))
10383 (license license:psfl)))
10385 (define-public python2-contextlib2
10386 (let ((base (package-with-python2
10387 (strip-python2-variant python-contextlib2))))
10391 (substitute-keyword-arguments (package-arguments base)
10393 `(modify-phases ,phases
10395 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10397 `(("python2-unittest2" ,python2-unittest2))))))
10399 ;; This package is used by python2-pytest via python2-importlib-metadata,
10400 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10401 (define-public python2-contextlib2-bootstrap
10404 python2-contextlib2
10405 (name "python2-contextlib2-bootstrap")
10408 ,@(package-arguments python2-contextlib2)))
10409 (native-inputs '()))))
10411 (define-public python-texttable
10413 (name "python-texttable")
10418 (uri (pypi-uri "texttable" version))
10421 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10422 (build-system python-build-system)
10425 (modify-phases %standard-phases
10427 (lambda _ (invoke "pytest" "tests.py"))))))
10429 `(("python-pytest" ,python-pytest)))
10430 (home-page "https://github.com/foutaise/texttable/")
10431 (synopsis "Python module for creating simple ASCII tables")
10432 (description "Texttable is a Python module for creating simple ASCII
10434 (license license:expat)))
10436 (define-public python2-texttable
10437 (package-with-python2 python-texttable))
10439 (define-public python-atomicwrites
10441 (name "python-atomicwrites")
10445 (uri (pypi-uri "atomicwrites" version))
10448 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10449 (build-system python-build-system)
10450 (synopsis "Atomic file writes in Python")
10451 (description "Library for atomic file writes using platform dependent tools
10452 for atomic file system operations.")
10453 (home-page "https://github.com/untitaker/python-atomicwrites")
10454 (license license:expat)))
10456 (define-public python2-atomicwrites
10457 (package-with-python2 python-atomicwrites))
10459 (define-public python-click-threading
10461 (name "python-click-threading")
10465 (uri (pypi-uri "click-threading" version))
10468 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10469 (build-system python-build-system)
10471 `(("python-click" ,python-click)))
10472 (synopsis "Utilities for multithreading in Click")
10473 (description "This package provides utilities for multithreading in Click
10475 (home-page "https://github.com/click-contrib/click-threading")
10476 (license license:expat)))
10478 (define-public python-click-log
10480 (name "python-click-log")
10484 (uri (pypi-uri "click-log" version))
10487 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10488 (build-system python-build-system)
10490 `(("python-click" ,python-click)))
10491 (synopsis "Logging for click applications")
10492 (description "This package provides a Python library for logging Click
10494 (home-page "https://github.com/click-contrib/click-log")
10495 (license license:expat)))
10497 (define-public python-apipkg
10499 (name "python-apipkg")
10503 (uri (pypi-uri "apipkg" version))
10506 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10507 (build-system python-build-system)
10509 `(("python-pytest" ,python-pytest)
10510 ("python-setuptools-scm" ,python-setuptools-scm)))
10511 (synopsis "Namespace control and lazy-import mechanism")
10512 (description "With apipkg you can control the exported namespace of a Python
10513 package and greatly reduce the number of imports for your users. It is a small
10514 pure Python module that works on virtually all Python versions.")
10515 (home-page "https://github.com/pytest-dev/apipkg")
10516 (license license:expat)))
10518 (define-public python-execnet
10520 (name "python-execnet")
10524 (uri (pypi-uri "execnet" version))
10527 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10528 (build-system python-build-system)
10530 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10531 ;; The two test failures are caused by the lack of an `ssh` executable.
10532 ;; The test suite can be run with pytest after the 'install' phase.
10535 `(("python-pytest" ,python-pytest)
10536 ("python-setuptools-scm" ,python-setuptools-scm)))
10538 `(("python-apipkg" ,python-apipkg)))
10539 (synopsis "Rapid multi-Python deployment")
10540 (description "Execnet provides a share-nothing model with
10541 channel-send/receive communication for distributing execution across many
10542 Python interpreters across version, platform and network barriers. It has a
10543 minimal and fast API targeting the following uses:
10545 @item distribute tasks to (many) local or remote CPUs
10546 @item write and deploy hybrid multi-process applications
10547 @item write scripts to administer multiple environments
10549 (home-page "https://codespeak.net/execnet/")
10550 (license license:expat)))
10552 (define-public python2-execnet
10553 (package-with-python2 python-execnet))
10555 (define-public python-icalendar
10557 (name "python-icalendar")
10561 (uri (pypi-uri "icalendar" version))
10564 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10565 (build-system python-build-system)
10567 `(("python-dateutil" ,python-dateutil)
10568 ("python-pytz" ,python-pytz)))
10569 (synopsis "Python library for parsing iCalendar files")
10570 (description "The icalendar package is a parser/generator of iCalendar
10571 files for use with Python.")
10572 (home-page "https://github.com/collective/icalendar")
10573 (license license:bsd-2)))
10575 (define-public python-args
10577 (name "python-args")
10581 (uri (pypi-uri "args" version))
10584 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10585 (build-system python-build-system)
10586 (home-page "https://github.com/kennethreitz/args")
10587 (synopsis "Command-line argument parser")
10589 "This library provides a Python module to parse command-line arguments.")
10590 (license license:bsd-3)))
10592 (define-public python2-args
10593 (package-with-python2 python-args))
10595 (define-public python-clint
10597 (name "python-clint")
10601 (uri (pypi-uri "clint" version))
10604 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10605 (build-system python-build-system)
10608 (modify-phases %standard-phases
10610 (lambda _ (invoke "py.test" "-v"))))))
10612 `(("python-pytest" ,python-pytest)))
10614 `(("python-args" ,python-args)))
10615 (home-page "https://github.com/kennethreitz/clint")
10616 (synopsis "Command-line interface tools")
10618 "Clint is a Python module filled with a set of tools for developing
10619 command-line applications, including tools for colored and indented
10620 output, progress bar display, and pipes.")
10621 (license license:isc)))
10623 (define-public python2-clint
10624 (package-with-python2 python-clint))
10626 (define-public python-rply
10628 (name "python-rply")
10632 (uri (pypi-uri "rply" version))
10635 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10636 (build-system python-build-system)
10638 `(("python-appdirs" ,python-appdirs)))
10639 (home-page "https://github.com/alex/rply")
10640 (synopsis "Parser generator for Python")
10642 "This package provides a pure Python based parser generator, that also
10643 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10644 with a new public API, and RPython support.")
10645 (license license:bsd-3)))
10647 (define-public python2-rply
10648 (package-with-python2 python-rply))
10650 (define-public python-hy
10656 (uri (pypi-uri "hy" version))
10659 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10660 (build-system python-build-system)
10663 (modify-phases %standard-phases
10664 (add-before 'install 'set-HOME
10666 (setenv "HOME" "/tmp") #t))
10669 ;; Tests require write access to HOME.
10670 (setenv "HOME" "/tmp")
10671 (invoke "nosetests"))))))
10673 `(("python-coverage" ,python-coverage)
10674 ("python-nose" ,python-nose)))
10676 `(("python-astor" ,python-astor)
10677 ("python-colorama" ,python-colorama)
10678 ("python-rply" ,python-rply)
10679 ("python-funcparserlib"
10680 ,python-funcparserlib)))
10681 (home-page "http://hylang.org/")
10682 (synopsis "Lisp frontend to Python")
10684 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10685 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10686 Python at your fingertips, in Lisp form.")
10687 (license license:expat)))
10689 (define-public python2-functools32
10691 (name "python2-functools32")
10692 (version "3.2.3-2")
10696 (uri (pypi-uri "functools32" version))
10699 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10700 (build-system python-build-system)
10702 `(#:python ,python-2
10703 #:tests? #f)) ; no test target
10704 (home-page "https://github.com/MiCHiLU/python-functools32")
10706 "Backport of the functools module from Python 3.2.3")
10708 "This package is a backport of the @code{functools} module from Python
10709 3.2.3 for use with older versions of Python and PyPy.")
10710 (license license:expat)))
10712 (define-public python2-subprocess32
10714 (name "python2-subprocess32")
10718 (uri (pypi-uri "subprocess32" version))
10721 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10723 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10724 (build-system python-build-system)
10726 `(#:python ,python-2
10727 ;; The test suite fails with Python > 2.7.13:
10728 ;; import test.support
10729 ;; ImportError: No module named support
10732 (modify-phases %standard-phases
10733 (add-after 'unpack 'patch-/bin/sh
10735 (substitute* '("subprocess32.py"
10736 "test_subprocess32.py")
10737 (("/bin/sh") (which "sh")))
10739 (home-page "https://github.com/google/python-subprocess32")
10740 (synopsis "Backport of the subprocess module from Python 3.2")
10742 "This is a backport of the @code{subprocess} standard library module
10743 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10744 new features. On POSIX systems it is guaranteed to be reliable when used
10745 in threaded applications. It includes timeout support from Python 3.3 but
10746 otherwise matches 3.2’s API.")
10747 (license license:psfl)))
10749 (define-public python2-futures
10751 (name "python2-futures")
10756 (uri (pypi-uri "futures" version))
10759 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10760 (build-system python-build-system)
10762 `(#:python ,python-2
10764 (modify-phases %standard-phases
10767 (invoke "python" "test_futures.py")
10769 (home-page "https://github.com/agronholm/pythonfutures")
10771 "Backport of the concurrent.futures package from Python 3.2")
10773 "The concurrent.futures module provides a high-level interface for
10774 asynchronously executing callables. This package backports the
10775 concurrent.futures package from Python 3.2")
10776 (license license:bsd-3)))
10778 (define-public python-promise
10780 (name "python-promise")
10785 (uri (pypi-uri "promise" version))
10788 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10789 (build-system python-build-system)
10790 ;; Tests wants python-futures, which is a python2 only program, and
10791 ;; can't be found by python-promise at test time.
10792 (arguments `(#:tests? #f))
10793 (home-page "https://github.com/syrusakbary/promise")
10794 (synopsis "Promises/A+ implementation for Python")
10796 "Promises/A+ implementation for Python")
10797 (properties `((python2-variant . ,(delay python2-promise))))
10798 (license license:expat)))
10800 (define-public python2-promise
10801 (let ((promise (package-with-python2
10802 (strip-python2-variant python-promise))))
10803 (package (inherit promise)
10804 (arguments (substitute-keyword-arguments (package-arguments promise)
10805 ((#:tests? _) #t)))
10807 `(("python2-futures" ,python2-futures)
10808 ("python2-pytest" ,python2-pytest)
10809 ,@(package-native-inputs promise))))))
10811 (define-public python-progressbar2
10813 (name "python-progressbar2")
10818 (uri (pypi-uri "progressbar2" version))
10821 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10822 (build-system python-build-system)
10824 `(("python-six" ,python-six)
10825 ("python-utils" ,python-utils)))
10827 `(("python-flake8" ,python-flake8)
10828 ("python-freezegun" ,python-freezegun)
10829 ("python-pycodestyle" ,python-pycodestyle)
10830 ("python-pytest" ,python-pytest)
10831 ("python-pytest-cache" ,python-pytest-cache)
10832 ("python-pytest-cov" ,python-pytest-cov)
10833 ("python-pytest-flakes" ,python-pytest-flakes)
10834 ("python-pytest-pep8" ,python-pytest-pep8)
10835 ("python-sphinx" ,python-sphinx)))
10836 (home-page "https://github.com/WoLpH/python-progressbar")
10837 (synopsis "Text progress bar library for Python")
10839 "This package provides a Python progressbar library to provide
10840 visual (yet text based) progress to long running operations.")
10841 (license license:bsd-3)))
10843 (define-public python-progressbar33
10845 (name "python-progressbar33")
10850 (uri (pypi-uri "progressbar33" version))
10853 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10854 (build-system python-build-system)
10855 (home-page "https://github.com/germangh/python-progressbar")
10856 (synopsis "Text progress bar library for Python")
10858 "This package provides a text progress bar library for Python. This
10859 version only differs from the original @code{progressbar} package in that it
10860 uses relative package imports instead of absolute imports, which is necessary
10861 for the module to work under Python 3.3.")
10862 ;; Either or both of these licenses may be selected.
10863 (license (list license:lgpl2.1+ license:bsd-3))))
10865 (define-public python-colorama
10867 (name "python-colorama")
10872 (uri (pypi-uri "colorama" version))
10875 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
10876 (build-system python-build-system)
10877 (synopsis "Colored terminal text rendering for Python")
10878 (description "Colorama is a Python library for rendering colored terminal
10880 (home-page "https://pypi.org/project/colorama/")
10881 (license license:bsd-3)))
10883 (define-public python2-colorama
10884 (package-with-python2 python-colorama))
10886 (define-public python-rsa
10888 (name "python-rsa")
10893 (uri (pypi-uri "rsa" version))
10896 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10897 (build-system python-build-system)
10899 `(("python-pyasn1" ,python-pyasn1)))
10900 (synopsis "Pure-Python RSA implementation")
10901 (description "Python-RSA is a pure-Python RSA implementation. It supports
10902 encryption and decryption, signing and verifying signatures, and key
10903 generation according to PKCS#1 version 1.5. It can be used as a Python
10904 library as well as on the command line.")
10905 (home-page "https://stuvel.eu/rsa")
10906 (license license:asl2.0)))
10908 (define-public python2-rsa
10909 (package-with-python2 python-rsa))
10911 (define-public python-pluggy
10913 (name "python-pluggy")
10918 (uri (pypi-uri "pluggy" version))
10921 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
10922 (build-system python-build-system)
10924 `(("python-setuptools-scm" ,python-setuptools-scm)))
10925 (synopsis "Plugin and hook calling mechanism for Python")
10926 (description "Pluggy is an extraction of the plugin manager as used by
10927 Pytest but stripped of Pytest specific details.")
10928 (home-page "https://pypi.org/project/pluggy/")
10929 (properties `((python2-variant . ,(delay python2-pluggy))))
10930 (license license:expat)))
10932 (define-public python2-pluggy
10933 (let ((base (package-with-python2 (strip-python2-variant
10938 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
10940 ;; This package requires python2-importlib-metadata, but that package
10941 ;; ends up needing python2-pluggy via python2-pytest, so we need this
10942 ;; variant to solve the circular dependency.
10943 (define-public python2-pluggy-bootstrap
10947 (name "python2-pluggy-bootstrap")
10950 ,@(package-arguments python2-pluggy)))
10952 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10954 (define-public python-tox
10956 (name "python-tox")
10961 (uri (pypi-uri "tox" version))
10964 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
10965 (build-system python-build-system)
10967 ;; FIXME: Tests require pytest-timeout, which itself requires
10968 ;; pytest>=2.8.0 for installation.
10971 `(("python-filelock" ,python-filelock)
10972 ("python-packaging" ,python-packaging)
10973 ("python-pluggy" ,python-pluggy)
10974 ("python-py" ,python-py)
10975 ("python-six" ,python-six)
10976 ("python-toml" ,python-toml)
10977 ("python-virtualenv" ,python-virtualenv)))
10979 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
10980 ("python-pytest" ,python-pytest) ; >= 2.3.5
10981 ("python-setuptools-scm" ,python-setuptools-scm)))
10982 (home-page "https://tox.readthedocs.io")
10983 (synopsis "Virtualenv-based automation of test activities")
10984 (description "Tox is a generic virtualenv management and test command line
10985 tool. It can be used to check that a package installs correctly with
10986 different Python versions and interpreters, or run tests in each type of
10987 supported environment, or act as a frontend to continuous integration
10989 (license license:expat)))
10991 (define-public python2-tox
10992 (package-with-python2 python-tox))
10994 (define-public python-jmespath
10996 (name "python-jmespath")
11001 (uri (pypi-uri "jmespath" version))
11004 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11005 (build-system python-build-system)
11007 `(("python-nose" ,python-nose)))
11008 (synopsis "JSON Matching Expressions")
11009 (description "JMESPath (pronounced “james path”) is a Python library that
11010 allows one to declaratively specify how to extract elements from a JSON
11012 (home-page "https://github.com/jmespath/jmespath.py")
11013 (license license:expat)))
11015 (define-public python2-jmespath
11016 (package-with-python2 python-jmespath))
11018 (define-public python-symengine
11020 (name "python-symengine")
11025 (uri (pypi-uri "symengine" version))
11027 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11028 (build-system python-build-system)
11031 ("python-cython" ,python-cython)))
11033 `(("symengine" ,symengine)))
11034 (home-page "https://github.com/symengine/symengine.py")
11035 (synopsis "Python library providing wrappers to SymEngine")
11037 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11038 manipulation library.")
11039 (license license:expat)))
11041 (define-public python-botocore
11043 (name "python-botocore")
11044 (version "1.15.26")
11048 (uri (pypi-uri "botocore" version))
11051 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
11052 (build-system python-build-system)
11054 ;; FIXME: Many tests are failing.
11057 `(("python-dateutil" ,python-dateutil)
11058 ("python-docutils" ,python-docutils)
11059 ("python-jmespath" ,python-jmespath)))
11061 `(("python-mock" ,python-mock)
11062 ("python-nose" ,python-nose)
11064 ("python-tox" ,python-tox)
11065 ("python-urllib3" ,python-urllib3)
11066 ("python-wheel" ,python-wheel)))
11067 (home-page "https://github.com/boto/botocore")
11068 (synopsis "Low-level interface to AWS")
11069 (description "Botocore is a Python library that provides a low-level
11070 interface to the Amazon Web Services (AWS) API.")
11071 (license license:asl2.0)))
11073 (define-public python2-botocore
11074 (package-with-python2 python-botocore))
11076 (define-public python-pyfiglet
11078 (name "python-pyfiglet")
11079 (version "0.8.post1")
11083 (uri (pypi-uri "pyfiglet" version))
11086 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11087 (build-system python-build-system)
11088 (home-page "https://github.com/pwaller/pyfiglet")
11089 (synopsis "Draw ASCII art big letters in Python")
11090 (description "This module lets you draw large letter from ordinary characters
11092 (license license:expat)))
11094 (define-public python-xdo
11096 (name "python-xdo")
11100 (uri (string-append
11101 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11102 "python-xdo_" version ".orig.tar.gz"))
11105 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11106 (build-system python-build-system)
11109 (modify-phases %standard-phases
11110 (add-before 'install 'patch-libxdo-path
11111 ;; Hardcode the path of dynamically loaded libxdo library.
11112 (lambda* (#:key inputs #:allow-other-keys)
11113 (let ((libxdo (string-append
11114 (assoc-ref inputs "xdotool")
11115 "/lib/libxdo.so")))
11116 (substitute* "xdo/_xdo.py"
11117 (("find_library\\(\"xdo\"\\)")
11118 (simple-format #f "\"~a\"" libxdo)))
11120 #:tests? #f)) ; no tests provided
11122 `(("python-six" ,python-six)))
11124 `(("xdotool" ,xdotool)
11125 ("libX11" ,libx11)))
11126 (home-page "https://tracker.debian.org/pkg/python-xdo")
11127 (synopsis "Python library for simulating X11 keyboard/mouse input")
11128 (description "Provides bindings to libxdo for manipulating X11 via simulated
11129 input. (Note that this is mostly a legacy library; you may wish to look at
11130 python-xdo for newer bindings.)")
11131 (license license:bsd-3)))
11133 (define-public python2-xdo
11134 (package-with-python2 python-xdo))
11136 (define-public python-mako
11138 (name "python-mako")
11143 (uri (pypi-uri "Mako" version))
11146 "17bd6r9ynp4hyfckkia0bb8gpd98f42jfl5rmzdpbld59bbcaf9i"))))
11147 (build-system python-build-system)
11149 `(#:phases (modify-phases %standard-phases
11151 (lambda* (#:key tests? #:allow-other-keys)
11153 (invoke "nosetests" "-v")
11154 (format #t "test suite not run~%"))
11157 `(("python-markupsafe" ,python-markupsafe)))
11159 `(("python-mock" ,python-mock)
11160 ("python-nose" ,python-nose)))
11161 (home-page "https://www.makotemplates.org/")
11162 (synopsis "Templating language for Python")
11163 (description "Mako is a templating language for Python that compiles
11164 templates into Python modules.")
11165 (license license:expat)))
11167 (define-public python2-mako
11168 (package-with-python2 python-mako))
11170 (define-public python-waitress
11172 (name "python-waitress")
11177 (uri (pypi-uri "waitress" version))
11178 (patches (search-patches "python-waitress-fix-tests.patch"))
11181 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11182 (build-system python-build-system)
11183 (home-page "https://github.com/Pylons/waitress")
11184 (synopsis "Waitress WSGI server")
11185 (description "Waitress is meant to be a production-quality pure-Python WSGI
11186 server with very acceptable performance.")
11187 (license license:zpl2.1)))
11189 (define-public python2-waitress
11190 (package-with-python2 python-waitress))
11192 (define-public python-whichcraft
11194 (name "python-whichcraft")
11199 (uri (pypi-uri "whichcraft" version))
11202 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11203 (build-system python-build-system)
11205 `(("python-pytest" ,python-pytest)))
11206 (home-page "https://github.com/pydanny/whichcraft")
11207 (synopsis "Cross-platform cross-python shutil.which functionality")
11209 "This package provides a shim of the shutil.which function that's
11210 designed to work across multiple versions of Python.")
11211 (license license:bsd-3)))
11213 (define-public python-cookiecutter
11215 (name "python-cookiecutter")
11220 (uri (pypi-uri "cookiecutter" version))
11223 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11224 (build-system python-build-system)
11226 `(("python-freezegun" ,python-freezegun)
11227 ("python-pytest" ,python-pytest)
11228 ("python-pytest-catchlog" ,python-pytest-catchlog)
11229 ("python-pytest-cov" ,python-pytest-cov)
11230 ("python-pytest-mock" ,python-pytest-mock)))
11232 `(("python-binaryornot" ,python-binaryornot)
11233 ("python-click" ,python-click)
11234 ("python-future" ,python-future)
11235 ("python-jinja2" ,python-jinja2)
11236 ("python-jinja2-time" ,python-jinja2-time)
11237 ("python-poyo" ,python-poyo)
11238 ("python-requests" ,python-requests)
11239 ("python-slugify" ,python-slugify)
11240 ("python-text-unidecode" ,python-text-unidecode)
11241 ("python-whichcraft" ,python-whichcraft)))
11242 (home-page "https://github.com/cookiecutter/cookiecutter")
11244 "Command-line utility that creates projects from project templates")
11246 "This package provides a command-line utility that creates projects from
11247 project templates, e.g. creating a Python package project from a Python package
11248 project template.")
11249 (license license:bsd-3)))
11251 (define-public python-pyquery
11253 (name "python-pyquery")
11258 (uri (pypi-uri "pyquery" version))
11261 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11262 (build-system python-build-system)
11264 `(("python-webob" ,python-webob)
11265 ("python-webtest" ,python-webtest)))
11267 `(("python-lxml" ,python-lxml)
11268 ("python-cssselect" ,python-cssselect)))
11269 (home-page "https://github.com/gawel/pyquery")
11270 (synopsis "Make jQuery-like queries on xml documents")
11271 (description "pyquery allows you to make jQuery queries on xml documents.
11272 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11273 fast xml and html manipulation.")
11274 (license license:bsd-3)))
11276 (define-public python-anyjson
11278 (name "python-anyjson")
11283 (uri (pypi-uri "anyjson" version))
11286 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11287 (build-system python-build-system)
11289 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11290 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11291 ;; whatever) so this transformation needs to be done before the tests
11292 ;; can be run. Maybe we could add a build step to transform beforehand
11293 ;; but it could be annoying/difficult.
11294 ;; We can enable tests for the Python 2 version, though, and do below.
11296 (home-page "https://bitbucket.org/runeh/anyjson/")
11298 "Wraps best available JSON implementation in a common interface")
11300 "Anyjson loads whichever is the fastest JSON module installed
11301 and provides a uniform API regardless of which JSON implementation is used.")
11302 (license license:bsd-3)
11303 (properties `((python2-variant . ,(delay python2-anyjson))))))
11305 (define-public python2-anyjson
11306 (let ((anyjson (package-with-python2
11307 (strip-python2-variant python-anyjson))))
11310 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11312 ,@(package-arguments anyjson)))
11313 (native-inputs `(("python2-nose" ,python2-nose))))))
11315 (define-public python-amqp
11317 (name "python-amqp")
11322 (uri (pypi-uri "amqp" version))
11325 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11326 (build-system python-build-system)
11328 `(("python-case" ,python-case)
11329 ("python-pytest-sugar" ,python-pytest-sugar)
11330 ("python-mock" ,python-mock)))
11332 `(("python-vine" ,python-vine)))
11333 (home-page "https://github.com/celery/py-amqp")
11335 "Low-level AMQP client for Python (fork of amqplib)")
11337 "This is a fork of amqplib which was originally written by Barry Pederson.
11338 It is maintained by the Celery project, and used by kombu as a pure python
11339 alternative when librabbitmq is not available.")
11340 (license license:lgpl2.1+)
11341 (properties `((python2-variant . ,(delay python2-amqp))))))
11343 (define-public python2-amqp
11344 (let ((amqp (package-with-python2
11345 (strip-python2-variant python-amqp))))
11348 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11349 ;; unmaintained. Weirdly, does not do this on the python 3
11352 ,@(package-arguments amqp))))))
11354 (define-public python-txamqp
11356 (name "python-txamqp")
11361 (uri (pypi-uri "txAMQP" version))
11364 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11365 (build-system python-build-system)
11367 `(("python-six" ,python-six)
11368 ("python-twisted" ,python-twisted)))
11369 (home-page "https://github.com/txamqp/txamqp")
11370 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11372 "This package provides a Python library for communicating with AMQP peers
11373 and brokers using the asynchronous networking framework Twisted. It contains
11374 all the necessary code to connect, send and receive messages to/from an
11375 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11376 also includes support for using Thrift RPC over AMQP in Twisted
11378 (license license:asl2.0)))
11380 (define-public python2-txamqp
11381 (package-with-python2 python-txamqp))
11383 (define-public python-kombu
11385 (name "python-kombu")
11390 (uri (pypi-uri "kombu" version))
11393 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11394 (build-system python-build-system)
11396 `(("python-mock" ,python-mock)
11397 ("python-case" ,python-case)
11398 ("python-pyro4" ,python-pyro4)
11399 ("python-pytest-sugar" ,python-pytest-sugar)
11400 ("python-pytz" ,python-pytz)))
11402 `(("python-anyjson" ,python-anyjson)
11403 ("python-amqp" ,python-amqp)
11404 ("python-redis" ,python-redis)))
11405 (home-page "https://kombu.readthedocs.io")
11406 (synopsis "Message passing library for Python")
11407 (description "The aim of Kombu is to make messaging in Python as easy as
11408 possible by providing an idiomatic high-level interface for the AMQ protocol,
11409 and also provide proven and tested solutions to common messaging problems.
11410 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11411 message orientation, queuing, routing, reliability and security, for which the
11412 RabbitMQ messaging server is the most popular implementation.")
11413 (license license:bsd-3)
11414 (properties `((python2-variant . ,(delay python2-kombu))))))
11416 (define-public python2-kombu
11417 (let ((kombu (package-with-python2
11418 (strip-python2-variant python-kombu))))
11421 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11422 ;; It works fine on the python3 variant.
11424 ,@(package-arguments kombu)))
11425 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11426 ,@(package-native-inputs kombu))))))
11428 (define-public python-billiard
11430 (name "python-billiard")
11431 (version "3.5.0.5")
11435 (uri (pypi-uri "billiard" version))
11438 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11439 (build-system python-build-system)
11441 `(("python-case" ,python-case)
11442 ("python-pytest" ,python-pytest)))
11443 (home-page "https://github.com/celery/billiard")
11445 "Python multiprocessing fork with improvements and bugfixes")
11447 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11448 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11449 pyprocessing package. This standalone variant is intended to be compatible with
11450 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11451 (license license:bsd-3)
11452 (properties `((python2-variant . ,(delay python2-billiard))))))
11454 (define-public python2-billiard
11455 (let ((billiard (package-with-python2
11456 (strip-python2-variant python-billiard))))
11459 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11460 ("python2-mock" ,python2-mock)
11461 ,@(package-native-inputs billiard))))))
11463 (define-public python-celery
11465 (name "python-celery")
11470 (uri (pypi-uri "celery" version))
11473 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11474 (build-system python-build-system)
11476 '(;; TODO The tests fail with Python 3.7
11477 ;; https://github.com/celery/celery/issues/4849
11480 (modify-phases %standard-phases
11481 (add-after 'unpack 'patch-requirements
11483 (substitute* "requirements/test.txt"
11484 (("pytest>=3\\.0,<3\\.3")
11488 `(("python-case" ,python-case)
11489 ("python-pytest" ,python-pytest)))
11491 `(("python-pytz" ,python-pytz)
11492 ("python-billiard" ,python-billiard)
11493 ("python-kombu" ,python-kombu)))
11494 (home-page "https://celeryproject.org")
11495 (synopsis "Distributed Task Queue")
11496 (description "Celery is an asynchronous task queue/job queue based on
11497 distributed message passing. It is focused on real-time operation, but
11498 supports scheduling as well. The execution units, called tasks, are executed
11499 concurrently on a single or more worker servers using multiprocessing,
11500 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11501 synchronously (wait until ready).")
11502 (license license:bsd-3)
11503 (properties `((python2-variant . ,(delay python2-celery))))))
11505 (define-public python2-celery
11506 (let ((celery (package-with-python2
11507 (strip-python2-variant python-celery))))
11510 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11511 ("python2-mock" ,python2-mock)
11512 ,@(package-native-inputs celery))))))
11514 (define-public python-translitcodec
11516 (name "python-translitcodec")
11521 (uri (pypi-uri "translitcodec" version))
11524 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11525 (build-system python-build-system)
11527 `(#:tests? #f)) ; no tests provided
11529 "https://github.com/claudep/translitcodec")
11531 "Unicode to 8-bit charset transliteration codec")
11533 "This package contains codecs for transliterating ISO 10646 texts into
11534 best-effort representations using smaller coded character sets (ASCII,
11536 (license license:expat)))
11538 (define-public python2-translitcodec
11539 (package-with-python2 python-translitcodec))
11541 (define-public python-editor
11543 (name "python-editor")
11548 (uri (pypi-uri "python-editor" version))
11551 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11552 (build-system python-build-system)
11554 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11555 (home-page "https://github.com/fmoo/python-editor")
11556 (synopsis "Programmatically open an editor, capture the result")
11558 "python-editor is a library that provides the editor module for
11559 programmatically interfacing with your system's $EDITOR.")
11560 (license license:asl2.0)))
11562 (define-public python2-editor
11563 (package-with-python2 python-editor))
11565 (define-public python-vobject
11567 (name "python-vobject")
11568 (version "0.9.6.1")
11571 (uri (pypi-uri "vobject" version))
11574 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11575 (build-system python-build-system)
11577 '(;; The test suite relies on some non-portable Windows interfaces.
11580 `(("python-dateutil" ,python-dateutil)
11581 ("python-pyicu" ,python-pyicu)))
11582 (synopsis "Parse and generate vCard and vCalendar files")
11583 (description "Vobject is intended to be a full featured Python package for
11584 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11585 are supported and well tested. vCard 3.0 files are supported, and all data
11586 should be imported, but only a few components are understood in a sophisticated
11588 (home-page "https://eventable.github.io/vobject/")
11589 (license license:asl2.0)))
11591 (define-public python2-vobject
11592 (package-with-python2 python-vobject))
11594 (define-public python-munkres
11596 (name "python-munkres")
11600 (uri (pypi-uri "munkres" version))
11603 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11604 (build-system python-build-system)
11606 '(#:tests? #f)) ; no test suite
11607 (home-page "https://software.clapper.org/munkres/")
11608 (synopsis "Implementation of the Munkres algorithm")
11609 (description "The Munkres module provides an implementation of the Munkres
11610 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11611 useful for solving the Assignment Problem.")
11612 (license license:bsd-3)))
11614 (define-public python2-munkres
11615 (package-with-python2 python-munkres))
11617 (define-public python-whoosh
11619 (name "python-whoosh")
11624 (uri (pypi-uri "Whoosh" version))
11627 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11628 (build-system python-build-system)
11629 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11631 `(("python-pytest" ,python-pytest)))
11632 (home-page "https://bitbucket.org/mchaput/whoosh")
11633 (synopsis "Full text indexing, search, and spell checking library")
11635 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11636 checking library.")
11637 (license license:bsd-2)))
11639 (define-public python2-whoosh
11640 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11641 (package (inherit whoosh)
11643 `(("python2-backport-ssl-match-hostname"
11644 ,python2-backport-ssl-match-hostname)
11645 ,@(package-propagated-inputs whoosh))))))
11647 (define-public python-pathlib
11649 (name "python-pathlib")
11653 (uri (pypi-uri "pathlib" version))
11656 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11657 (build-system python-build-system)
11658 ;; The tests depend on the internal "test" module, which does not provide
11659 ;; a stable interface.
11660 (arguments `(#:tests? #f))
11661 (home-page "https://pathlib.readthedocs.org/")
11662 (synopsis "Object-oriented file system paths")
11663 (description "Pathlib offers a set of classes to handle file system paths.
11664 It offers the following advantages over using string objects:
11667 @item No more cumbersome use of os and os.path functions. Everything can
11668 be done easily through operators, attribute accesses, and method calls.
11669 @item Embodies the semantics of different path types. For example,
11670 comparing Windows paths ignores casing.
11671 @item Well-defined semantics, eliminating any inconsistencies or
11672 ambiguities (forward vs. backward slashes, etc.).
11675 Note: In Python 3.4, pathlib is now part of the standard library. For other
11676 Python versions please consider python-pathlib2 instead, which tracks the
11677 standard library module. This module (python-pathlib) isn't maintained
11679 (license license:expat)))
11681 (define-public python2-pathlib
11682 (package-with-python2 python-pathlib))
11684 (define-public python2-pathlib2
11686 (name "python2-pathlib2")
11690 (uri (pypi-uri "pathlib2" version))
11693 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11694 (build-system python-build-system)
11695 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11696 ;; version is 3.4 which already includes this package as part of the
11697 ;; standard library.
11699 `(#:python ,python-2))
11701 `(("python2-scandir" ,python2-scandir)
11702 ("python2-six" ,python2-six)))
11703 (home-page "https://pypi.org/project/pathlib2/")
11704 (synopsis "Object-oriented file system paths - backport of standard
11706 (description "The goal of pathlib2 is to provide a backport of standard
11707 pathlib module which tracks the standard library module, so all the newest
11708 features of the standard pathlib can be used also on older Python versions.
11710 Pathlib offers a set of classes to handle file system paths. It offers the
11711 following advantages over using string objects:
11714 @item No more cumbersome use of os and os.path functions. Everything can
11715 be done easily through operators, attribute accesses, and method calls.
11716 @item Embodies the semantics of different path types. For example,
11717 comparing Windows paths ignores casing.
11718 @item Well-defined semantics, eliminating any inconsistencies or
11719 ambiguities (forward vs. backward slashes, etc.).
11721 (license license:expat)))
11723 (define-public python2-pathlib2-bootstrap
11726 (inherit python2-pathlib2)
11727 (name "python2-pathlib2-bootstrap")
11729 `(("python2-scandir" ,python2-scandir)
11730 ("python2-six" ,python2-six-bootstrap))))))
11732 (define-public python-jellyfish
11734 (name "python-jellyfish")
11738 (uri (pypi-uri "jellyfish" version))
11741 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11742 (build-system python-build-system)
11744 `(("python-pytest" ,python-pytest)))
11745 (home-page "https://github.com/jamesturk/jellyfish")
11746 (synopsis "Approximate and phonetic matching of strings")
11747 (description "Jellyfish uses a variety of string comparison and phonetic
11748 encoding algorithms to do fuzzy string matching.")
11749 (license license:bsd-2)
11750 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11752 (define-public python2-jellyfish
11753 (let ((jellyfish (package-with-python2
11754 (strip-python2-variant python-jellyfish))))
11755 (package (inherit jellyfish)
11756 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11757 ,@(package-native-inputs jellyfish))))))
11759 (define-public python2-unicodecsv
11761 (name "python2-unicodecsv")
11765 ;; The test suite is not included in the PyPi release.
11766 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11767 (uri (git-reference
11768 (url "https://github.com/jdunck/python-unicodecsv")
11770 (file-name (git-file-name name version))
11773 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11774 (build-system python-build-system)
11776 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11777 #:python ,python-2))
11779 `(("python2-unittest2" ,python2-unittest2)))
11780 (home-page "https://github.com/jdunck/python-unicodecsv")
11781 (synopsis "Unicode CSV module for Python 2")
11782 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11783 module, adding support for Unicode strings.")
11784 (license license:bsd-2)))
11786 (define-public python-rarfile
11788 (name "python-rarfile")
11792 (uri (pypi-uri "rarfile" version))
11795 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11796 (build-system python-build-system)
11799 (modify-phases %standard-phases
11801 ;; Many tests fail, but the installation proceeds.
11802 (lambda _ (invoke "make" "-C" "test" "test"))))))
11804 `(("which" ,which))) ; required for tests
11806 `(("libarchive" ,libarchive)))
11807 (home-page "https://github.com/markokr/rarfile")
11808 (synopsis "RAR archive reader for Python")
11809 (description "This is Python module for RAR archive reading. The interface
11810 is made as zipfile like as possible.")
11811 (license license:isc)))
11813 (define-public python2-rarfile
11814 (package-with-python2 python-rarfile))
11816 (define-public python-magic
11818 (name "python-magic")
11823 (uri (pypi-uri "python-magic" version))
11826 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11827 (file-name (string-append name "-" version "-checkout"))))
11828 (build-system python-build-system)
11830 ;; The tests are unreliable, so don't run them. The tests fail
11831 ;; under Python3 because they were written for Python2 and
11832 ;; contain import statements that do not work in Python3. One of
11833 ;; the tests fails under Python2 because its assertions are
11834 ;; overly stringent; it relies on comparing output strings which
11835 ;; are brittle and can change depending on the version of
11836 ;; libmagic being used and the system on which the test is
11837 ;; running. In my case, under GuixSD 0.10.0, only one test
11838 ;; failed, and it seems to have failed only because the version
11839 ;; of libmagic that is packaged in Guix outputs a slightly
11840 ;; different (but not wrong) string than the one that the test
11843 #:phases (modify-phases %standard-phases
11844 ;; Replace a specific method call with a hard-coded
11845 ;; path to the necessary libmagic.so file in the
11846 ;; store. If we don't do this, then the method call
11847 ;; will fail to find the libmagic.so file, which in
11848 ;; turn will cause any application using
11849 ;; python-magic to fail.
11850 (add-before 'build 'hard-code-path-to-libmagic
11851 (lambda* (#:key inputs #:allow-other-keys)
11852 (let ((file (assoc-ref inputs "file")))
11853 (substitute* "magic.py"
11854 (("ctypes.util.find_library\\('magic'\\)")
11855 (string-append "'" file "/lib/libmagic.so'")))
11857 (add-before 'install 'disable-egg-compression
11859 (let ((port (open-file "setup.cfg" "a")))
11860 (display "\n[easy_install]\nzip_ok = 0\n"
11865 ;; python-magic needs to be able to find libmagic.so.
11868 "https://github.com/ahupp/python-magic")
11870 "File type identification using libmagic")
11872 "This module uses ctypes to access the libmagic file type
11873 identification library. It makes use of the local magic database and
11874 supports both textual and MIME-type output. Note that this module and
11875 the python-file module both provide a \"magic.py\" file; these two
11876 modules, which are different and were developed separately, both serve
11877 the same purpose: to provide Python bindings for libmagic.")
11878 (license license:expat)))
11880 (define-public python2-magic
11881 (package-with-python2 python-magic))
11883 (define-public python2-s3cmd
11885 (name "python2-s3cmd")
11890 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11891 "s3cmd-" version ".tar.gz"))
11894 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11895 (build-system python-build-system)
11897 ;; s3cmd is written for python2 only and contains no tests.
11898 `(#:python ,python-2
11901 `(("python2-dateutil" ,python2-dateutil)
11902 ;; The python-file package also provides a magic.py module.
11903 ;; This is an unfortunate state of affairs; however, s3cmd
11904 ;; fails to install if it cannot find specifically the
11905 ;; python-magic package. Thus we include it, instead of using
11906 ;; python-file. Ironically, s3cmd sometimes works better
11907 ;; without libmagic bindings at all:
11908 ;; https://github.com/s3tools/s3cmd/issues/198
11909 ("python2-magic" ,python2-magic)))
11910 (home-page "https://s3tools.org/s3cmd")
11911 (synopsis "Command line tool for S3-compatible storage services")
11913 "S3cmd is a command line tool for uploading, retrieving and managing data
11914 in storage services that are compatible with the Amazon Simple Storage
11915 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11916 GnuPG encryption, and more. It also supports management of Amazon's
11917 CloudFront content delivery network.")
11918 (license license:gpl2+)))
11920 (define-public python-pkgconfig
11922 (name "python-pkgconfig")
11927 (uri (pypi-uri "pkgconfig" version))
11930 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
11931 (build-system python-build-system)
11933 `(("python-nose" ,python-nose)))
11935 `(("pkg-config" ,pkg-config)))
11938 (modify-phases %standard-phases
11939 (add-before 'build 'patch
11940 ;; Hard-code the path to pkg-config.
11942 (substitute* "pkgconfig/pkgconfig.py"
11943 (("cmd = 'pkg-config")
11944 (string-append "cmd = '" (which "pkg-config"))))
11948 (invoke "nosetests" "test.py"))))))
11949 (home-page "https://github.com/matze/pkgconfig")
11950 (synopsis "Python interface for pkg-config")
11951 (description "This module provides a Python interface to pkg-config. It
11952 can be used to find all pkg-config packages, check if a package exists,
11953 check if a package meets certain version requirements, query CFLAGS and
11954 LDFLAGS and parse the output to build extensions with setup.py.")
11955 (license license:expat)))
11957 (define-public python2-pkgconfig
11958 (package-with-python2 python-pkgconfig))
11960 (define-public python-bz2file
11962 (name "python-bz2file")
11967 (uri (pypi-uri "bz2file" version))
11970 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11971 (build-system python-build-system)
11973 `(#:tests? #f)) ; Tests use deprecated python modules.
11974 (home-page "https://github.com/nvawda/bz2file")
11975 (synopsis "Read and write bzip2-compressed files")
11977 "Bz2file is a Python library for reading and writing bzip2-compressed
11978 files. It contains a drop-in replacement for the I/O interface in the
11979 standard library's @code{bz2} module, including features from the latest
11980 development version of CPython that are not available in older releases.")
11981 (license license:asl2.0)))
11983 (define-public python2-bz2file
11984 (package-with-python2 python-bz2file))
11986 (define-public python-future
11988 (name "python-future")
11993 (uri (pypi-uri "future" version))
11996 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
11997 (build-system python-build-system)
11998 ;; Many tests connect to the network or are otherwise flawed.
11999 ;; https://github.com/PythonCharmers/python-future/issues/210
12002 (home-page "https://python-future.org")
12003 (synopsis "Single-source support for Python 3 and 2")
12005 "@code{python-future} is the missing compatibility layer between Python 2 and
12006 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12007 to support both Python 2 and Python 3 with minimal overhead.")
12008 (license license:expat)))
12010 (define-public python2-future
12011 (package-with-python2 python-future))
12013 (define-public python-cysignals
12015 (name "python-cysignals")
12020 (uri (pypi-uri "cysignals" version))
12023 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12024 (build-system python-build-system)
12026 `(("python-cython" ,python-cython)
12027 ("python-sphinx" ,python-sphinx)))
12029 `(("pari-gp" ,pari-gp)))
12031 `(#:modules ((guix build python-build-system)
12032 ((guix build gnu-build-system) #:prefix gnu:)
12033 (guix build utils))
12034 ;; FIXME: Tests are executed after installation and currently fail
12035 ;; when not installing into standard locations; the author is working
12039 (modify-phases %standard-phases
12042 (assoc-ref gnu:%standard-phases 'configure)))))
12044 "https://github.com/sagemath/cysignals")
12046 "Handling of interrupts and signals for Cython")
12048 "The cysignals package provides mechanisms to handle interrupts (and
12049 other signals and errors) in Cython code, using two related approaches,
12050 for mixed Cython/Python code or external C libraries and pure Cython code,
12052 (license license:lgpl3+)))
12054 (define-public python2-cysignals
12055 (package-with-python2 python-cysignals))
12057 (define-public python2-shedskin
12059 (name "python2-shedskin")
12064 (uri (string-append "https://github.com/shedskin/shedskin/"
12065 "releases/download/v" version
12066 "/shedskin-" version ".tgz"))
12069 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12070 (build-system python-build-system)
12072 `(#:python ,python-2
12073 #:phases (modify-phases %standard-phases
12074 (add-after 'unpack 'fix-resulting-include-libs
12075 (lambda* (#:key inputs #:allow-other-keys)
12076 (let ((libgc (assoc-ref inputs "libgc"))
12077 (pcre (assoc-ref inputs "pcre")))
12078 (substitute* "shedskin/makefile.py"
12079 (("variable == 'CCFLAGS':[ ]*")
12080 (string-append "variable == 'CCFLAGS':\n"
12081 " line += ' -I " pcre "/include"
12082 " -I " libgc "/include'"))
12083 (("variable == 'LFLAGS':[ ]*")
12084 (string-append "variable == 'LFLAGS':\n"
12085 " line += ' -L" pcre "/lib"
12086 " -L " libgc "/lib'")))
12088 (inputs `(("pcre" ,pcre)
12090 (home-page "https://shedskin.github.io/")
12091 (synopsis "Experimental Python-2 to C++ Compiler")
12092 (description (string-append "This is an experimental compiler for a subset of
12093 Python. It generates C++ code and a Makefile."))
12094 (license (list license:gpl3 license:bsd-3 license:expat))))
12096 (define-public python2-rope
12098 (name "python2-rope")
12103 (uri (pypi-uri "rope" version))
12106 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12108 ;; Rope has only partial python3 support, see `python-rope'
12109 `(#:python ,python-2))
12110 (build-system python-build-system)
12112 `(("python2-unittest2" ,python2-unittest2)))
12113 (home-page "https://github.com/python-rope/rope")
12114 (synopsis "Refactoring library for Python")
12115 (description "Rope is a refactoring library for Python. It facilitates
12116 the renaming, moving and extracting of attributes, functions, modules, fields
12117 and parameters in Python 2 source code. These refactorings can also be applied
12118 to occurrences in strings and comments.")
12119 (license license:gpl2)))
12121 (define-public python-rope
12123 (inherit python2-rope)
12124 (name "python-rope")
12125 (arguments `(#:python ,python-wrapper
12126 ;; XXX: Only partial python3 support, results in some failing
12127 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12129 (properties `((python2-variant . ,(delay python2-rope))))))
12131 (define-public python-py3status
12133 (name "python-py3status")
12138 (uri (pypi-uri "py3status" version))
12140 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12141 (build-system python-build-system)
12146 (modify-phases %standard-phases
12147 ;; 'file' is used for detection of configuration file encoding
12148 ;; let's make link the dependency to particular input
12149 (add-before 'build 'patch-file-path
12150 (lambda* (#:key inputs #:allow-other-keys)
12151 (let ((file-path (assoc-ref inputs "file")))
12152 (substitute* "py3status/parse_config.py"
12153 (("\\[\"file\", \"-b\"")
12154 (string-append "['" file-path "/bin/file', '-b'")))
12156 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12157 (home-page "https://github.com/ultrabug/py3status")
12158 (synopsis "Extensible i3status wrapper written in Python")
12159 (description "py3status is an i3status wrapper which extends i3status
12160 functionality in a modular way, allowing you to extend your panel with your
12161 own code, responding to click events and updating clock every second.")
12162 (license license:bsd-3)))
12164 (define-public python2-selectors2
12166 (name "python2-selectors2")
12170 (uri (pypi-uri "selectors2" version))
12173 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12174 (build-system python-build-system)
12176 `(#:python ,python-2))
12178 `(("python2-mock" ,python2-mock)
12179 ("python2-psutil" ,python2-psutil)))
12180 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12181 (synopsis "Backport of the selectors module from Python 3.5+")
12183 "This package provides a drop-in replacement for the @code{selectors}
12184 module in Python 3.5 and later.")
12185 (license license:expat)))
12187 (define-public python-tblib
12189 (name "python-tblib")
12193 (uri (pypi-uri "tblib" version))
12196 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12197 (build-system python-build-system)
12200 (modify-phases %standard-phases
12203 ;; Upstream runs tests after installation and the package itself
12204 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12206 (setenv "PYTHONPATH"
12207 (string-append (getcwd) "/build/lib:"
12208 (getenv "PYTHONPATH")))
12209 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12211 `(("python-pytest" ,python-pytest)
12212 ("python-six" ,python-six)))
12213 (home-page "https://github.com/ionelmc/python-tblib")
12214 (synopsis "Traceback serialization library")
12216 "Traceback serialization allows you to:
12219 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12220 different processes. This allows better error handling when running code over
12221 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12223 @item Parse traceback strings and raise with the parsed tracebacks.
12225 (license license:bsd-3)))
12227 (define-public python2-tblib
12228 (package-with-python2 python-tblib))
12230 (define-public python-greenlet
12232 (name "python-greenlet")
12236 (uri (pypi-uri "greenlet" version))
12239 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12240 (build-system python-build-system)
12241 (home-page "https://greenlet.readthedocs.io/")
12242 (synopsis "Lightweight in-process concurrent programming")
12244 "Greenlet package is a spin-off of Stackless, a version of CPython
12245 that supports micro-threads called \"tasklets\". Tasklets run
12246 pseudo-concurrently (typically in a single or a few OS-level threads) and
12247 are synchronized with data exchanges on \"channels\".")
12248 (license (list license:psfl license:expat))))
12250 (define-public python2-greenlet
12251 (package-with-python2 python-greenlet))
12253 (define-public python-objgraph
12255 (name "python-objgraph")
12260 (uri (pypi-uri "objgraph" version))
12263 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12264 (build-system python-build-system)
12266 `(("python-graphviz" ,python-graphviz)))
12268 `(("python-mock" ,python-mock)
12269 ("graphviz" ,graphviz)))
12270 (home-page "https://mg.pov.lt/objgraph/")
12271 (synopsis "Draw Python object reference graphs with graphviz")
12273 "This package provides tools to draw Python object reference graphs with
12275 (license license:expat)))
12277 (define-public python2-objgraph
12278 (package-with-python2 python-objgraph))
12280 (define-public python-gevent
12282 (name "python-gevent")
12286 (uri (pypi-uri "gevent" version))
12289 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12290 (modules '((guix build utils)))
12293 ;; unbunding libev and c-ares
12294 (delete-file-recursively "deps")
12296 (build-system python-build-system)
12298 `(#:modules ((ice-9 ftw)
12302 (guix build python-build-system))
12303 #:phases (modify-phases %standard-phases
12304 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12306 (substitute* "src/gevent/subprocess.py"
12307 (("/bin/sh") (which "sh")))
12308 (for-each (lambda (file)
12310 (("/bin/sh") (which "sh"))
12311 (("/bin/true") (which "true"))))
12312 (find-files "src/greentest" "\\.py$"))
12314 (add-before 'build 'do-not-use-bundled-sources
12316 (setenv "GEVENTSETUP_EMBED" "0")
12318 ;; Prevent building bundled libev.
12319 (substitute* "setup.py"
12320 (("run_make=_BUILDING")
12323 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12324 (lambda* (#:key inputs #:allow-other-keys)
12325 (let ((greenlet (string-append
12326 (assoc-ref inputs "python-greenlet")
12328 (match (scandir greenlet
12330 (string-prefix? "python" item)))
12332 (setenv "C_INCLUDE_PATH"
12333 (string-append greenlet "/" python ":"
12334 (or (getenv "C_INCLUDE_PATH")
12337 (add-before 'check 'pretend-to-be-CI
12339 ;; A few tests are skipped due to network constraints or
12340 ;; get longer timeouts when running in a CI environment.
12341 ;; Piggy-back on that, as we need the same adjustments.
12342 (setenv "TRAVIS" "1")
12343 (setenv "APPVEYOR" "1")
12345 (add-before 'check 'adjust-tests
12347 (let ((disabled-tests
12348 '(;; These tests rely on networking which is not
12349 ;; available in the build container.
12350 "test_urllib2net.py"
12352 "test__server_pywsgi.py"
12355 "test__socket_ssl.py"
12356 "test__socket_dns.py"
12357 "test__socket_dns6.py"
12358 "test___example_servers.py"
12359 "test__getaddrinfo_import.py"
12360 "test__examples.py"
12363 "test_urllib2_localnet.py"
12366 ;; XXX: These tests borrow functionality from the
12367 ;; Python builtin 'test' module, but it is not
12368 ;; installed with the Guix Python distribution.
12373 "test_threading.py"
12374 "test__threading_2.py"
12375 ;; These tests rely on KeyboardInterrupts which do not
12376 ;; work inside the build container for some reason
12377 ;; (lack of controlling terminal?).
12378 "test_subprocess.py"
12379 "test__issues461_471.py"
12380 ;; TODO: Patch out the tests that use getprotobyname, etc
12381 ;; instead of disabling all the tests from these files.
12382 "test__resolver_dnspython.py"
12383 "test__doctests.py"
12386 "test__execmodules.py")))
12387 (call-with-output-file "skipped_tests.txt"
12389 (format port "~a~%"
12390 (string-join disabled-tests "\n"))))
12394 ;; Make sure the build directory is on PYTHONPATH.
12395 (setenv "PYTHONPATH"
12397 (getenv "PYTHONPATH") ":"
12399 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12401 ;; Use the build daemons configured number of workers.
12402 (setenv "NWORKERS" (number->string (parallel-job-count)))
12404 (invoke "python" "-m" "gevent.tests" "--config"
12405 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12407 `(("python-greenlet" ,python-greenlet)
12408 ("python-objgraph" ,python-objgraph)
12409 ("python-zope.event" ,python-zope-event)
12410 ("python-zope.interface" ,python-zope-interface)))
12412 `(("python-six" ,python-six)
12415 ("python-dnspython" ,python-dnspython)
12416 ("python-psutil" ,python-psutil)))
12418 `(("c-ares" ,c-ares)
12420 (home-page "http://www.gevent.org/")
12421 (synopsis "Coroutine-based network library")
12423 "gevent is a coroutine-based Python networking library that uses greenlet
12424 to provide a high-level synchronous API on top of the libev event loop.")
12425 (license license:expat)
12426 (properties `((python2-variant . ,(delay python2-gevent))))))
12428 (define-public python2-gevent
12429 (let ((base (package-with-python2
12430 (strip-python2-variant python-gevent))))
12433 (native-inputs `(,@(package-native-inputs base)
12434 ("python-mock" ,python2-mock)
12435 ("python2-selectors2" ,python2-selectors2))))))
12437 (define-public python-fastimport
12439 (name "python-fastimport")
12444 (uri (pypi-uri "fastimport" version))
12446 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12447 (build-system python-build-system)
12448 (home-page "https://github.com/jelmer/python-fastimport")
12449 (synopsis "VCS fastimport parser and generator in Python")
12450 (description "This package provides a parser for and generator of the Git
12451 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12453 (license license:gpl2+)))
12455 (define-public python2-fastimport
12456 (package-with-python2 python-fastimport))
12458 (define-public python-twisted
12460 (name "python-twisted")
12464 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12467 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12468 (build-system python-build-system)
12470 '(#:tests? #f)) ; FIXME: some tests fail
12472 `(("python-zope-interface" ,python-zope-interface)
12473 ("python-pyhamcrest" ,python-pyhamcrest)
12474 ("python-incremental" ,python-incremental)
12475 ("python-hyperlink" ,python-hyperlink)
12476 ("python-constantly" ,python-constantly)
12477 ("python-automat" ,python-automat)))
12478 (home-page "https://twistedmatrix.com/")
12479 (synopsis "Asynchronous networking framework written in Python")
12481 "Twisted is an extensible framework for Python programming, with special
12482 focus on event-based network programming and multiprotocol integration.")
12483 (license license:expat)))
12485 (define-public python2-twisted
12486 (package-with-python2 python-twisted))
12488 (define-public python-pika
12490 (name "python-pika")
12495 (uri (pypi-uri "pika" version))
12498 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12499 (build-system python-build-system)
12501 `(("python-pyev" ,python-pyev)
12502 ("python-tornado" ,python-tornado)
12503 ("python-twisted" ,python-twisted)))
12504 (home-page "https://pika.readthedocs.org")
12505 (synopsis "Pure Python AMQP Client Library")
12507 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12508 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12509 network support library.")
12510 (license license:bsd-3)))
12512 (define-public python2-pika
12513 (package-with-python2 python-pika))
12515 (define-public python-ply
12517 (name "python-ply")
12522 (uri (pypi-uri "ply" version))
12525 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12526 (build-system python-build-system)
12527 (home-page "http://www.dabeaz.com/ply/")
12528 (synopsis "Python Lex & Yacc")
12529 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12530 It uses LR parsing and does extensive error checking.")
12531 (license license:bsd-3)))
12533 (define-public python-tabulate
12535 (name "python-tabulate")
12539 (uri (pypi-uri "tabulate" version))
12542 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12543 (build-system python-build-system)
12545 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12546 ;; and the latest release is not tagged in the upstream repository.
12548 (home-page "https://bitbucket.org/astanin/python-tabulate")
12549 (synopsis "Pretty-print tabular data")
12551 "Tabulate is a library and command-line utility to pretty-print tabular
12553 (license license:expat)))
12555 (define-public python2-tabulate
12556 (package-with-python2 python-tabulate))
12558 (define-public python-kazoo
12560 (name "python-kazoo")
12565 (uri (pypi-uri "kazoo" version))
12568 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12569 (build-system python-build-system)
12570 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12572 `(("python-six" ,python-six)))
12573 (home-page "https://kazoo.readthedocs.org")
12574 (synopsis "High-level Zookeeper client library")
12576 "Kazoo is a Python client library for the Apache Zookeeper distributed
12577 application service. It is designed to be easy to use and to avoid common
12578 programming errors.")
12579 (license license:asl2.0)))
12581 (define-public python2-kazoo
12582 (package-with-python2 python-kazoo))
12584 (define-public python-pykafka
12586 (name "python-pykafka")
12590 (uri (pypi-uri "pykafka" version))
12593 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12594 (build-system python-build-system)
12595 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12597 `(("python-gevent" ,python-gevent)
12598 ("python-kazoo" ,python-kazoo)
12599 ("python-tabulate" ,python-tabulate)))
12601 `(("librdkafka" ,librdkafka)))
12602 (home-page "https://pykafka.readthedocs.io/")
12603 (synopsis "Apache Kafka client for Python")
12605 "PyKafka is a client for the Apache Kafka distributed messaging system.
12606 It includes Python implementations of Kafka producers and consumers, which
12607 are optionally backed by a C extension built on librdkafka.")
12608 (license license:asl2.0)))
12610 (define-public python2-pykafka
12611 (package-with-python2 python-pykafka))
12613 (define-public python-wcwidth
12615 (name "python-wcwidth")
12619 (uri (pypi-uri "wcwidth" version))
12622 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12623 (build-system python-build-system)
12624 (home-page "https://github.com/jquast/wcwidth")
12625 (synopsis "Measure number of terminal column cells of wide-character codes")
12626 (description "Wcwidth measures the number of terminal column cells of
12627 wide-character codes. It is useful for those implementing a terminal emulator,
12628 or programs that carefully produce output to be interpreted by one. It is a
12629 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12630 specified in POSIX.1-2001 and POSIX.1-2008.")
12631 (license license:expat)))
12633 (define-public python2-wcwidth
12634 (package-with-python2 python-wcwidth))
12636 (define-public python2-jsonrpclib
12638 (name "python2-jsonrpclib")
12642 (uri (pypi-uri "jsonrpclib" version))
12645 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12646 (build-system python-build-system)
12649 #:python ,python-2))
12650 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12651 (synopsis "Implementation of JSON-RPC specification for Python")
12653 "This library is an implementation of the JSON-RPC specification.
12654 It supports both the original 1.0 specification, as well as the
12655 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12657 (license license:asl2.0)))
12659 (define-public python-chai
12661 (name "python-chai")
12665 (uri (pypi-uri "chai" version))
12668 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12669 (build-system python-build-system)
12670 (home-page "https://github.com/agoragames/chai")
12671 (synopsis "Mocking framework for Python")
12673 "Chai provides an api for mocking, stubbing and spying your python
12674 objects, patterned after the Mocha library for Ruby.")
12675 (license license:bsd-3)))
12677 (define-public python2-chai
12678 (package-with-python2 python-chai))
12680 (define-public python-inflection
12682 (name "python-inflection")
12685 (origin (method url-fetch)
12686 (uri (pypi-uri "inflection" version))
12689 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12690 (build-system python-build-system)
12692 `(("python-pytest" ,python-pytest)))
12693 (home-page "https://github.com/jpvanhal/inflection")
12694 (synopsis "Python string transformation library")
12696 "Inflection is a string transformation library. It singularizes
12697 and pluralizes English words, and transforms strings from CamelCase to
12698 underscored string.")
12699 (license license:expat)))
12701 (define-public python2-inflection
12702 (package-with-python2 python-inflection))
12704 (define-public python-pylev
12706 (name "python-pylev")
12710 (uri (pypi-uri "pylev" version))
12713 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12714 (build-system python-build-system)
12715 (home-page "https://github.com/toastdriven/pylev")
12716 (synopsis "Levenshtein distance implementation in Python")
12717 (description "Pure Python Levenshtein implementation, based off the
12718 Wikipedia code samples at
12719 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12720 (license license:bsd-3)))
12722 (define-public python2-pylev
12723 (package-with-python2 python-pylev))
12725 (define-public python-cleo
12727 (name "python-cleo")
12731 (uri (pypi-uri "cleo" version))
12734 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12735 (build-system python-build-system)
12738 ("python-mock" ,python-mock)
12739 ("python-pytest-mock" ,python-pytest-mock)
12740 ("python-pytest" ,python-pytest)))
12742 `(("python-backpack" ,python-backpack)
12743 ("python-clikit" ,python-clikit)
12744 ("python-pastel" ,python-pastel)
12745 ("python-pylev" ,python-pylev)))
12746 (home-page "https://github.com/sdispater/cleo")
12747 (synopsis "Command-line arguments library for Python")
12749 "Cleo allows you to create command-line commands with signature in
12750 docstring and colored output.")
12751 (license license:expat)))
12753 (define-public python2-cleo
12754 (package-with-python2 python-cleo))
12756 (define-public python-tomlkit
12758 (name "python-tomlkit")
12763 (uri (pypi-uri "tomlkit" version))
12765 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12766 (build-system python-build-system)
12768 `(("python-pytest" ,python-pytest)))
12769 (home-page "https://github.com/sdispater/tomlkit")
12770 (synopsis "Style-preserving TOML library")
12772 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
12773 preserves all comments, indentations, whitespace and internal element ordering,
12774 and makes them accessible and editable via an intuitive API. It can also
12775 create new TOML documents from scratch using the provided helpers. Part of the
12776 implementation has been adapted, improved, and fixed from Molten.")
12777 (license license:expat)))
12779 (define-public python-shellingham
12781 (name "python-shellingham")
12786 (uri (pypi-uri "shellingham" version))
12788 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12789 (build-system python-build-system)
12792 (modify-phases %standard-phases
12793 (add-after 'unpack 'restore-setup.py
12794 ;; setup.py will return in the next release.
12795 ;; <https://github.com/sarugaku/shellingham/issues/33>
12797 (with-output-to-file "setup.py"
12799 (display "from setuptools import setup\nsetup()\n")))
12801 (home-page "https://github.com/sarugaku/shellingham")
12802 (synopsis "Tool to detect surrounding shell")
12804 "Shellingham detects what shell the current Python executable is
12806 (license license:isc)))
12808 (define-public python-memcached
12810 (name "python-memcached")
12815 (uri (pypi-uri "python-memcached" version))
12818 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
12819 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
12820 (build-system python-build-system)
12821 (propagated-inputs `(("python-six" ,python-six)))
12823 "https://github.com/linsomniac/python-memcached")
12824 (synopsis "Pure python memcached client")
12826 "This software is a pure Python interface to the memcached memory cache
12827 daemon. It is the client side software which allows storing values in one or
12828 more, possibly remote, memcached servers.")
12829 (license license:psfl)))
12831 (define-public python-clikit
12833 (name "python-clikit")
12838 (uri (pypi-uri "clikit" version))
12841 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
12842 (build-system python-build-system)
12843 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
12845 `(("python-crashtest" ,python-crashtest)
12846 ("python-pastel" ,python-pastel)
12847 ("python-pylev" ,python-pylev)))
12848 (home-page "https://github.com/sdispater/clikit")
12849 (synopsis "Group of utilities to build command line interfaces")
12851 "CliKit is a group of utilities to build testable command line
12853 (properties `((python2-variant . ,(delay python2-clikit))))
12854 (license license:expat)))
12856 (define-public python2-clikit
12857 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12861 `(("python-enum34" ,python2-enum34)
12862 ("python-typing" ,python2-typing)
12863 ,@(package-propagated-inputs base))))))
12865 (define-public python-msgpack-python
12867 (name "python-msgpack-python")
12872 (uri (pypi-uri "msgpack-python" version))
12875 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
12876 (build-system python-build-system)
12877 (home-page "http://msgpack.org/")
12878 (synopsis "Package to deserialize messages in MessagePack binary format")
12880 "MessagePack is an efficient binary serialization format. It lets you
12881 exchange data among multiple languages like JSON. But it's faster and
12882 smaller. Small integers are encoded into a single byte, and typical short
12883 strings require only one extra byte in addition to the strings themselves.")
12884 (license license:asl2.0)))
12886 (define-public python-cachy
12888 (name "python-cachy")
12893 (uri (pypi-uri "cachy" version))
12896 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
12897 (build-system python-build-system)
12900 (modify-phases %standard-phases
12902 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
12905 `(("memcached" ,memcached)
12906 ("python-fakeredis" ,python-fakeredis)
12907 ("python-flexmock" ,python-flexmock)
12908 ("python-pifpaf" ,python-pifpaf)
12909 ("python-pytest" ,python-pytest)))
12911 `(("python-memcached" ,python-memcached)
12912 ("python-msgpack-python" ,python-msgpack-python)
12913 ("python-redis" ,python-redis)))
12914 (home-page "https://github.com/sdispater/cachy")
12915 (synopsis "Simple yet effective caching library")
12917 "Cachy provides a simple yet effective caching library. A simple but
12918 powerful API: thread-safety; decorator syntax; support for memcached, redis,
12919 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
12920 (license license:expat)))
12922 (define-public poetry
12926 ;; Poetry can only be built from source with Poetry.
12930 (uri (pypi-uri "poetry" version))
12933 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
12934 (build-system python-build-system)
12936 `(#:tests? #f ;; Pypi does not have tests.
12938 (modify-phases %standard-phases
12939 (add-before 'build 'patch-setup-py
12941 (substitute* "setup.py"
12942 ;; poetry won't update version as 21.0.0 relies on python > 3.6
12943 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
12944 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
12945 ;; Reported upstream:
12946 ;; <https://github.com/python-poetry/poetry/issues/2752>.
12947 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
12948 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
12949 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
12952 `(("python-cachecontrol" ,python-cachecontrol)
12953 ("python-cachy" ,python-cachy)
12954 ("python-cleo" ,python-cleo)
12955 ("python-clikit" ,python-clikit)
12956 ("python-html5lib" ,python-html5lib)
12957 ("python-jsonschema" ,python-jsonschema)
12958 ("python-keyring" ,python-keyring)
12959 ("python-msgpack-transitional" ,python-msgpack-transitional)
12960 ("python-pexpect" ,python-pexpect)
12961 ("python-pkginfo" ,python-pkginfo)
12962 ("python-pyparsing" ,python-pyparsing)
12963 ("python-pyrsistent" ,python-pyrsistent)
12964 ("python-requests" ,python-requests)
12965 ("python-requests-toolbelt" ,python-requests-toolbelt)
12966 ("python-shellingham" ,python-shellingham)
12967 ("python-tomlkit" ,python-tomlkit)
12968 ("python-virtualenv" ,python-virtualenv)))
12969 (home-page "https://python-poetry.org")
12970 (synopsis "Python dependency management and packaging made easy")
12971 (description "Poetry is a tool for dependency management and packaging
12972 in Python. It allows you to declare the libraries your project depends on and
12973 it will manage (install/update) them for you.")
12974 (license license:expat)))
12976 (define-public python-lark-parser
12978 (name "python-lark-parser")
12982 (uri (pypi-uri "lark-parser" version))
12985 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
12986 (build-system python-build-system)
12987 (home-page "https://github.com/lark-parser/lark")
12988 (synopsis "Multi-language parser for Python")
12990 "Lark is a parser built with a focus on ergonomics, performance and
12991 resilience. Lark can parse all context-free languages. That means it is
12992 capable of parsing almost any programming language out there, and to
12993 some degree most natural languages too.")
12994 (license license:expat)))
12996 (define-public python-libcst
12998 (name "python-libcst")
13002 (uri (pypi-uri "libcst" version))
13005 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13006 (build-system python-build-system)
13009 (modify-phases %standard-phases
13010 (add-after 'unpack 'remove-failing-tests
13012 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13013 (delete-file "libcst/tests/test_fuzz.py")
13014 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13015 (delete-file "libcst/tests/test_pyre_integration.py")
13016 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13017 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13018 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13020 (add-before 'check 'generate-test-data
13022 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13023 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13024 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13027 (invoke "python" "-m" "unittest")
13030 `(("python-black" ,python-black)
13031 ("python-isort" ,python-isort)))
13033 `(("python-typing-extensions" ,python-typing-extensions)
13034 ("python-typing-inspect" ,python-typing-inspect)
13035 ("python-pyyaml" ,python-pyyaml)))
13036 (home-page "https://github.com/Instagram/LibCST")
13037 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13039 "LibCST parses Python source code as a CST tree that keeps all
13040 formatting details (comments, whitespaces, parentheses, etc). It's useful
13041 for building automated refactoring (codemod) applications and linters.
13042 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13043 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13044 naming node types and fields, LibCST creates a lossless CST that looks and
13045 feels like an AST.")
13046 (license (list license:expat
13047 ;; Some files unde libcst/_parser/ are under Python Software
13048 ;; Foundation license (see LICENSE file for details)
13050 ;; libcst/_add_slots.py
13053 (define-public python-typing-inspect
13055 (name "python-typing-inspect")
13059 (uri (pypi-uri "typing_inspect" version))
13062 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13063 (build-system python-build-system)
13065 `(("python-mypy-extensions" ,python-mypy-extensions)
13066 ("python-typing-extensions" ,python-typing-extensions)))
13067 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13068 (synopsis "API for inspection of types in the Python @code{typing} module")
13070 "The @code{typing_inspect} module defines experimental API for runtime
13071 inspection of types defined in the Python standard typing module.")
13072 (license license:expat)))
13074 (define-public python-lazy-object-proxy
13076 (name "python-lazy-object-proxy")
13080 (uri (pypi-uri "lazy-object-proxy" version))
13083 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13085 `(("python-setuptools-scm" ,python-setuptools-scm)))
13086 (build-system python-build-system)
13087 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13088 (synopsis "Lazy object proxy for python")
13090 "Lazy object proxy is an object that wraps a callable but defers the call
13091 until the object is actually required, and caches the result of said call.")
13092 (license license:bsd-2)))
13094 (define-public python2-lazy-object-proxy
13095 (package-with-python2 python-lazy-object-proxy))
13097 (define-public python-dnspython
13099 (name "python-dnspython")
13103 (uri (string-append "http://www.dnspython.org/kits/"
13104 version "/dnspython-" version ".tar.gz"))
13107 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13108 (build-system python-build-system)
13109 (arguments '(#:tests? #f)) ; XXX: requires internet access
13110 (home-page "http://www.dnspython.org")
13111 (synopsis "DNS toolkit for Python")
13113 "dnspython is a DNS toolkit for Python. It supports almost all record
13114 types. It can be used for queries, zone transfers, and dynamic updates.
13115 It supports TSIG authenticated messages and EDNS0.")
13116 (license license:expat)))
13118 (define-public python2-dnspython
13119 (package-with-python2 python-dnspython))
13121 (define-public python-py3dns
13123 (name "python-py3dns")
13128 (uri (pypi-uri "py3dns" version))
13131 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13132 (build-system python-build-system)
13133 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13134 ;; removing functionality so we copy from Nix and "just don't build it".
13137 (modify-phases %standard-phases
13138 (add-after 'unpack 'patch-source
13140 (substitute* "setup.py"
13141 (("import DNS") "")
13142 (("DNS.__version__") (string-append "\"" ,version "\"")))
13144 #:tests? #f)) ; Also skip the tests.
13145 (home-page "https://launchpad.net/py3dns")
13146 (synopsis "Python 3 DNS library")
13147 (description "This Python 3 module provides a DNS API for looking up DNS
13148 entries from within Python 3 modules and applications. This module is a
13149 simple, lightweight implementation.")
13150 (license license:psfl)))
13152 (define-public python-email-validator
13154 (name "python-email-validator")
13157 (origin (method url-fetch)
13158 (uri (pypi-uri "email_validator" version))
13161 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13162 (build-system python-build-system)
13165 (modify-phases %standard-phases
13166 (add-before 'build 'use-dnspython
13168 (substitute* "setup.py"
13169 (("dnspython3") "dnspython"))
13172 `(("python-dnspython" ,python-dnspython)
13173 ("python-idna" ,python-idna)))
13174 (home-page "https://github.com/JoshData/python-email-validator")
13175 (synopsis "Email address validation library for Python")
13177 "This library validates email address syntax and deliverability.")
13178 (license license:cc0)))
13180 (define-public python2-email-validator
13181 (package-with-python2 python-email-validator))
13183 (define-public python-ukpostcodeparser
13185 (name "python-ukpostcodeparser")
13189 (uri (pypi-uri "UkPostcodeParser" version))
13192 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13193 (build-system python-build-system)
13194 (home-page "https://github.com/hamstah/ukpostcodeparser")
13195 (synopsis "UK Postcode parser for Python")
13197 "This library provides the @code{parse_uk_postcode} function for
13198 parsing UK postcodes.")
13199 (license license:expat)))
13201 (define-public python2-ukpostcodeparser
13202 (package-with-python2 python-ukpostcodeparser))
13204 (define-public python-faker
13206 (name "python-faker")
13210 (uri (pypi-uri "Faker" version))
13213 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13214 (build-system python-build-system)
13217 (modify-phases %standard-phases
13219 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13222 ("python-freezegun" ,python-freezegun)
13223 ("python-pytest" ,python-pytest)
13224 ("python-random2" ,python-random2)
13225 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13226 ("python-validators" ,python-validators)))
13228 `(("python-dateutil" ,python-dateutil)
13229 ("python-text-unidecode" ,python-text-unidecode)))
13230 (home-page "https://github.com/joke2k/faker")
13231 (synopsis "Python package that generates fake data")
13233 "Faker is a Python package that generates fake data such as names,
13234 addresses, and phone numbers.")
13235 (license license:expat)
13236 (properties `((python2-variant . ,(delay python2-faker))))))
13238 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13239 (define-public python2-faker
13240 (let ((base (package-with-python2 (strip-python2-variant
13247 (uri (pypi-uri "Faker" version))
13250 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13252 `(("python-mock" ,python2-mock)
13253 ,@(package-native-inputs base)))
13255 `(("python2-ipaddress" ,python2-ipaddress)
13256 ("python2-six" ,python2-six)
13257 ,@(package-propagated-inputs base))))))
13259 (define-public python-pyaml
13261 (name "python-pyaml")
13262 (version "18.11.0")
13265 (uri (pypi-uri "pyaml" version))
13268 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13269 (build-system python-build-system)
13271 `(("python-unidecode" ,python-unidecode)))
13273 `(("python-pyyaml" ,python-pyyaml)))
13274 (home-page "https://github.com/mk-fg/pretty-yaml")
13275 (synopsis "YAML pretty-print library for Python")
13277 "pyaml is a PyYAML based python module to produce pretty and readable
13278 YAML-serialized data.")
13279 (license license:wtfpl2)))
13281 (define-public python2-pyaml
13282 (package-with-python2 python-pyaml))
13284 (define-public python-backpack
13286 (name "python-backpack")
13291 (uri (pypi-uri "backpack" version))
13294 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13295 (build-system python-build-system)
13297 `(("python-pytest" ,python-pytest)
13298 ("python-nose" ,python-nose)))
13300 `(("python-simplejson" ,python-simplejson)))
13301 (home-page "https://github.com/sdispater/backpack")
13302 (synopsis "Utilities for working with Python collections")
13303 (description "Backpack provides some useful utilities for working with
13304 collections of data.")
13305 (license license:expat)))
13307 (define-public python2-backpack
13308 (package-with-python2 python-backpack))
13310 (define-public python-prompt-toolkit
13312 (name "python-prompt-toolkit")
13317 (uri (pypi-uri "prompt_toolkit" version))
13319 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13320 (build-system python-build-system)
13323 (modify-phases %standard-phases
13325 (add-after 'install 'post-install-check
13326 (lambda* (#:key inputs outputs #:allow-other-keys)
13327 ;; HOME is needed for the test
13328 ;; "test_pathcompleter_can_expanduser".
13329 (setenv "HOME" "/tmp")
13330 (add-installed-pythonpath inputs outputs)
13331 (invoke "py.test"))))))
13333 `(("python-wcwidth" ,python-wcwidth)))
13335 `(("python-pytest" ,python-pytest)))
13337 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13338 (synopsis "Library for building command line interfaces in Python")
13340 "Prompt-Toolkit is a library for building interactive command line
13341 interfaces in Python. It's like GNU Readline but it also features syntax
13342 highlighting while typing, out-of-the-box multi-line input editing, advanced
13343 code completion, incremental search, support for Chinese double-width
13344 characters, mouse support, and auto suggestions.")
13345 (license license:bsd-3)
13346 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13348 (define-public python-prompt-toolkit-2
13349 (package (inherit python-prompt-toolkit)
13350 (name "python-prompt-toolkit")
13355 (uri (pypi-uri "prompt_toolkit" version))
13358 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13360 `(("python-wcwidth" ,python-wcwidth)
13361 ("python-six" ,python-six)
13362 ("python-pygments" ,python-pygments)))
13365 (define-public python2-prompt-toolkit
13366 (package-with-python2 python-prompt-toolkit-2))
13368 (define-public python-prompt-toolkit-1
13369 (package (inherit python-prompt-toolkit-2)
13374 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13377 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13379 (define-public python2-prompt-toolkit-1
13380 (package-with-python2 python-prompt-toolkit-1))
13382 (define-public python-jedi
13384 (name "python-jedi")
13389 (uri (pypi-uri "jedi" version))
13391 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13392 (build-system python-build-system)
13395 (modify-phases %standard-phases
13398 (setenv "HOME" "/tmp")
13399 (invoke "python" "-m" "pytest" "-vv"))))))
13401 `(("python-pytest" ,python-pytest)
13402 ("python-docopt" ,python-docopt)))
13404 `(("python-parso" ,python-parso)))
13405 (home-page "https://github.com/davidhalter/jedi")
13406 (synopsis "Autocompletion and static analysis library for Python")
13408 "Jedi is a static analysis tool for Python that can be used in Integrated
13409 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13410 on a deeper level than many other static analysis frameworks for Python.
13412 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13414 (license license:expat)))
13416 (define-public python2-jedi
13417 (package-with-python2 python-jedi))
13419 (define-public ptpython
13425 (uri (pypi-uri "ptpython" version))
13428 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13429 (build-system python-build-system)
13431 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13433 `(("python-appdirs" ,python-appdirs)
13434 ("python-jedi" ,python-jedi)
13435 ("python-prompt-toolkit" ,python-prompt-toolkit)
13436 ("python-pygments" ,python-pygments)))
13437 (home-page "https://github.com/jonathanslenders/ptpython")
13438 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13440 "ptpython is a Python read-eval-print loop with IDE-like features.
13441 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13442 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13444 (license license:bsd-3)
13445 (properties `((python2-variant . ,(delay ptpython-2))))))
13447 (define-public ptpython-2
13448 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13451 (name "ptpython2"))))
13453 (define-public python-stem
13455 (name "python-stem")
13460 (uri (pypi-uri "stem" version))
13463 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13464 (build-system python-build-system)
13467 (modify-phases %standard-phases
13470 (invoke "./run_tests.py" "--unit")
13473 `(("python-mock" ,python-mock)
13474 ("python-pycodestyle" ,python-pycodestyle)
13475 ("python-pyflakes" ,python-pyflakes)))
13476 (home-page "https://stem.torproject.org/")
13478 "Python controller library that allows applications to interact with Tor")
13480 "Stem is a Python controller library for Tor. With it you can use Tor's
13481 control protocol to script against the Tor process and read descriptor data
13482 relays publish about themselves.")
13483 (license license:lgpl3)))
13485 (define-public python2-stem
13486 (package-with-python2 python-stem))
13488 (define-public python-pyserial
13490 (name "python-pyserial")
13495 (uri (pypi-uri "pyserial" version))
13498 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13499 (build-system python-build-system)
13501 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13503 ;; (modify-phases %standard-phases
13506 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13508 "https://github.com/pyserial/pyserial")
13509 (synopsis "Python Serial Port Bindings")
13510 (description "@code{pyserial} provide serial port bindings for Python. It
13511 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13512 and/or Xon/Xoff. The port is accessed in RAW mode.")
13513 (license license:bsd-3)))
13515 (define-public python2-pyserial
13516 (package-with-python2 python-pyserial))
13518 (define-public python-kivy
13520 (name "python-kivy")
13525 (uri (pypi-uri "Kivy" version))
13526 (file-name (string-append name "-" version ".tar.gz"))
13529 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13530 (build-system python-build-system)
13532 `(#:tests? #f ; Tests require many optional packages
13534 (modify-phases %standard-phases
13535 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13536 (lambda* (#:key inputs #:allow-other-keys)
13537 (setenv "KIVY_SDL2_PATH"
13538 (string-append (assoc-ref inputs "sdl-union")
13542 `(("pkg-config" ,pkg-config)
13543 ("python-cython" ,python-cython)))
13545 `(("gstreamer" ,gstreamer)
13548 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13549 (home-page "https://kivy.org")
13551 "Multitouch application framework")
13553 "A software library for rapid development of
13554 hardware-accelerated multitouch applications.")
13555 (license license:expat)))
13557 (define-public python2-kivy
13558 (package-with-python2 python-kivy))
13560 (define-public python-binaryornot
13562 (name "python-binaryornot")
13566 (uri (pypi-uri "binaryornot" version))
13569 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13570 (build-system python-build-system)
13573 (modify-phases %standard-phases
13574 (add-after 'unpack 'patch-tests
13576 ;; TypeError: binary() got an unexpected keyword argument
13578 (substitute* "tests/test_check.py"
13579 (("average_size=512") ""))
13582 `(("python-chardet" ,python-chardet)
13583 ("python-hypothesis" ,python-hypothesis)))
13584 (home-page "https://github.com/audreyr/binaryornot")
13585 (synopsis "Package to check if a file is binary or text")
13586 (description "Ultra-lightweight pure Python package to check if a file is
13588 (license license:bsd-3)
13589 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13591 (define-public python2-binaryornot
13592 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13593 (package (inherit base)
13595 `(("python2-enum34" ,python2-enum34)
13596 ,@(package-propagated-inputs base))))))
13598 (define-public python-binwalk
13600 (name "python-binwalk")
13605 (uri (git-reference
13606 (url "https://github.com/ReFirmLabs/binwalk")
13607 (commit (string-append "v" version))))
13608 (file-name (git-file-name name version))
13611 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13612 (build-system python-build-system)
13615 (modify-phases %standard-phases
13616 (add-before 'check 'set-pythonpath
13618 (setenv "PYTHONPATH"
13621 ":" (getenv "PYTHONPATH")))
13625 `(("python-coverage" ,python-coverage)
13626 ("python-nose" ,python-nose)))
13627 (home-page "https://github.com/ReFirmLabs/binwalk")
13628 (synopsis "Firmware analysis tool")
13629 (description "Binwalk is a tool for analyzing, reverse engineering, and
13630 extracting firmware images")
13631 (license license:expat)))
13633 (define-public python-nltk
13635 (name "python-nltk")
13639 (uri (pypi-uri "nltk" version))
13642 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13643 (build-system python-build-system)
13645 '(;; The tests require some extra resources to be downloaded.
13646 ;; TODO Try packaging these resources.
13648 (home-page "http://nltk.org/")
13649 (synopsis "Natural Language Toolkit")
13650 (description "It provides interfaces to over 50 corpora and lexical
13651 resources such as WordNet, along with a suite of text processing libraries
13652 for classification, tokenization, stemming, tagging, parsing, and semantic
13653 reasoning, wrappers for natural language processing libraries.")
13654 (license license:asl2.0)))
13656 (define-public python2-nltk
13657 (package-with-python2 python-nltk))
13659 (define-public python-pymongo
13661 (name "python-pymongo")
13665 (uri (pypi-uri "pymongo" version))
13668 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13669 (build-system python-build-system)
13671 `(("python-certifi" ,python-certifi)))
13672 (home-page "https://github.com/mongodb/mongo-python-driver")
13673 (synopsis "Python driver for MongoDB")
13674 (description "Python driver for MongoDB.")
13675 (license license:asl2.0)))
13677 (define-public python2-pymongo
13678 (package-with-python2 python-pymongo))
13680 (define-public python-consul
13682 (name "python-consul")
13687 (uri (pypi-uri "python-consul" version))
13690 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13691 (build-system python-build-system)
13693 '(#:tests? #f)) ; The tests are not distributed
13695 `(("python-requests" ,python-requests)
13696 ("python-six" ,python-six)))
13697 (home-page "https://github.com/cablehead/python-consul")
13698 (synopsis "Python client for Consul")
13700 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13701 discovery, monitoring and configuration.")
13702 (license license:expat)))
13704 (define-public python2-consul
13705 (package-with-python2 python-consul))
13707 (define-public python-schematics
13709 (name "python-schematics")
13714 (uri (git-reference
13715 (url "https://github.com/schematics/schematics")
13716 (commit (string-append "v" version))))
13717 (file-name (git-file-name name version))
13719 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13720 (build-system python-build-system)
13722 `(("python-six" ,python-six)))
13724 ;; The tests require a bunch of not very nice packages with fixed
13725 ;; version requirements (e.g. python-coveralls).
13727 (home-page "https://github.com/schematics/schematics")
13728 (synopsis "Python Data Structures for Humans")
13729 (description "Python Data Structures for Humans.")
13730 (license license:bsd-3)))
13732 (define-public python2-schematics
13733 (package-with-python2 python-schematics))
13735 (define-public python-odfpy
13737 (name "python-odfpy")
13741 (uri (pypi-uri "odfpy" version))
13744 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13747 (modify-phases %standard-phases
13750 (setenv "PYTHONPATH" (string-append "./build/lib:"
13751 (getenv "PYTHONPATH")))
13752 (invoke "pytest" "-vv"))))))
13753 (build-system python-build-system)
13755 `(("python-pytest" ,python-pytest)))
13757 `(("python-defusedxml" ,python-defusedxml)))
13758 (home-page "https://github.com/eea/odfpy")
13759 (synopsis "Python API and tools to manipulate OpenDocument files")
13760 (description "Collection of libraries and utility programs written in
13761 Python to manipulate OpenDocument 1.2 files.")
13763 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13764 ;; number of files with other licenses.
13765 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13767 (define-public python2-odfpy
13768 (package-with-python2 python-odfpy))
13770 (define-public python-natsort
13772 (name "python-natsort")
13776 (uri (pypi-uri "natsort" version))
13779 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13780 (build-system python-build-system)
13782 `(#:modules ((guix build utils)
13783 (guix build python-build-system)
13788 (modify-phases %standard-phases
13789 (add-before 'check 'set-cachedir
13790 ;; Tests require write access to $HOME by default
13791 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
13794 (let ((cwd (getcwd)))
13795 (setenv "PYTHONPATH"
13798 (find (cut string-prefix? "lib" <>)
13799 (scandir (string-append cwd "/build")))
13801 (getenv "PYTHONPATH")))
13802 (invoke "pytest" "-v")))))))
13804 `(("python-hypothesis" ,python-hypothesis)
13805 ("python-pytest-cov" ,python-pytest-cov)
13806 ("python-pytest-mock" ,python-pytest-mock)
13807 ("python-pytest" ,python-pytest)))
13808 (propagated-inputs ; TODO: Add python-fastnumbers.
13809 `(("python-pyicu" ,python-pyicu)))
13810 (home-page "https://github.com/SethMMorton/natsort")
13811 (synopsis "Natural sorting for python and shell")
13813 "Natsort lets you apply natural sorting on lists instead of
13814 lexicographical. If you use the built-in @code{sorted} method in python
13815 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
13816 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
13817 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
13818 identifies numbers and sorts them separately from strings. It can also sort
13819 version numbers, real numbers, mixed types and more, and comes with a shell
13820 command @command{natsort} that exposes this functionality in the command line.")
13821 (license license:expat)
13822 (properties `((python2-variant . ,(delay python2-natsort))))))
13824 ;; Natsort 6.x are the last versions with support for Python 2.
13825 (define-public python2-natsort
13826 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13827 (package (inherit base)
13831 (uri (pypi-uri "natsort" version))
13834 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
13836 `(("python2-pathlib" ,python2-pathlib)
13837 ,@(package-native-inputs base))))))
13839 (define-public glances
13846 (uri (pypi-uri "Glances" version))
13848 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
13849 (modules '((guix build utils)))
13852 ;; Glances phones PyPI for weekly update checks by default.
13853 ;; Disable these. The user can re-enable them if desired.
13854 (substitute* "glances/outdated.py"
13855 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
13856 (string-append indentation
13857 "self.args.disable_check_update = True\n"
13860 (build-system python-build-system)
13862 `(("python-future" ,python-future)
13863 ("python-psutil" ,python-psutil)))
13864 (home-page "https://github.com/nicolargo/glances")
13865 (synopsis "Cross-platform curses-based monitoring tool")
13867 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13868 Glances uses the PsUtil library to get information from your system. It
13869 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13870 (license license:lgpl3+)))
13872 (define-public python-glances
13873 (deprecated-package "python-glances" glances))
13875 (define-public python-graphql-core
13877 (name "python-graphql-core")
13882 (uri (pypi-uri "graphql-core" version))
13885 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13886 (build-system python-build-system)
13888 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13890 (modify-phases %standard-phases
13891 (add-after 'unpack 'patch-hardcoded-version
13892 (lambda _ (substitute*
13894 (("'gevent==1.1rc1'") "'gevent'"))
13897 `(("python-gevent" ,python-gevent)
13898 ("python-mock" ,python-mock)
13899 ("python-pytest-mock" ,python-pytest-mock)))
13901 `(("python-promise" ,python-promise)
13902 ("python-six" ,python-six)))
13903 (home-page "https://github.com/graphql-python/graphql-core")
13904 (synopsis "GraphQL implementation for Python")
13906 "GraphQL implementation for Python. GraphQL is a data query language and
13907 runtime designed and used to request and deliver data to mobile and web apps.
13908 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13910 (license license:expat)))
13912 (define-public python2-graphql-core
13913 (package-with-python2 python-graphql-core))
13915 (define-public python-graphql-relay
13917 (name "python-graphql-relay")
13922 (uri (pypi-uri "graphql-relay" version))
13925 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13926 (build-system python-build-system)
13928 '(#:tests? #f)) ; The tests are not distributed
13930 `(("python-graphql-core" ,python-graphql-core)
13931 ("python-promise" ,python-promise)
13932 ("python-six" ,python-six)))
13933 (home-page "https://github.com/graphql-python/graphql-relay-py")
13934 (synopsis "Relay implementation for Python")
13936 "This is a library to allow the easy creation of Relay-compliant servers
13937 using the GraphQL Python reference implementation of a GraphQL server. It
13938 should be noted that the code is a exact port of the original
13939 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13941 (license license:expat)))
13943 (define-public python2-graphql-relay
13944 (package-with-python2 python-graphql-relay))
13946 (define-public python-graphene
13948 (name "python-graphene")
13953 (uri (pypi-uri "graphene" version))
13956 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13957 (build-system python-build-system)
13959 `(("python-graphql-core" ,python-graphql-core)
13960 ("python-graphql-relay" ,python-graphql-relay)
13961 ("python-iso8601" ,python-iso8601)
13962 ("python-promise" ,python-promise)
13963 ("python-six" ,python-six)))
13965 `(#:tests? #f)) ; no tests/ in the PyPI tarball
13966 (home-page "https://graphene-python.org/")
13967 (synopsis "GraphQL Framework for Python")
13969 "Graphene is a Python library for building GraphQL schemas/types.
13970 A GraphQL schema describes your data model, and provides a GraphQL server
13971 with an associated set of resolve methods that know how to fetch data.")
13972 (properties `((python2-variant . ,(delay python2-graphene))))
13973 (license license:expat)))
13975 (define-public python2-graphene
13976 (let ((base (package-with-python2
13977 (strip-python2-variant python-graphene))))
13978 (package (inherit base)
13980 `(("python2-sqlalchemy" ,python2-sqlalchemy)
13981 ,@(package-native-inputs base))))))
13983 (define-public python-nautilus
13985 (name "python-nautilus")
13990 (uri (pypi-uri "nautilus" version))
13993 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13994 (build-system python-build-system)
13995 (arguments `(#:tests? #f)) ; fails to import test modules
13997 `(("python-bcrypt" ,python-bcrypt)
13998 ("python-click" ,python-click)
13999 ("python-consul" ,python-consul)
14000 ("python-graphene" ,python-graphene)
14001 ("python-jinja2" ,python-jinja2)
14002 ("python-peewee" ,python-peewee)
14003 ("python-pika" ,python-pika)
14004 ("python-tornado" ,python-tornado)
14005 ("python-wtforms" ,python-wtforms)))
14007 `(("python-nose2" ,python-nose2)))
14008 (home-page "https://github.com/AlecAivazis/nautilus")
14009 (synopsis "Library for creating microservice applications")
14011 "Nautilus is a framework for flux based microservices that looks to
14012 provide extendible implementations of common aspects of a cloud so that you can
14013 focus on building massively scalable web applications.")
14014 (license license:expat)))
14016 (define-public python-random2
14018 (name "python-random2")
14022 (uri (pypi-uri "random2" version ".zip"))
14025 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14026 (build-system python-build-system)
14027 (native-inputs `(("unzip" ,unzip)))
14028 (home-page "http://pypi.python.org/pypi/random2")
14029 (synopsis "Python 3 version of the Python 2 @code{random} module")
14031 "This package provides a Python 3 ported version of Python 2.7’s
14032 @code{random} module. It has also been back-ported to work in Python 2.6.
14034 In Python 3, the implementation of @code{randrange()} was changed, so that
14035 even with the same seed you get different sequences in Python 2 and 3.
14037 This package closes that gap, allowing stable random number generation
14038 between the different Python versions.")
14039 (license license:psfl)))
14041 (define-public python2-random2
14042 (package-with-python2 python-random2))
14044 (define-public python-snowballstemmer
14046 (name "python-snowballstemmer")
14050 (uri (pypi-uri "snowballstemmer" version))
14053 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14054 (build-system python-build-system)
14056 `(;; No tests exist
14058 (home-page "https://github.com/shibukawa/snowball_py")
14059 (synopsis "Snowball stemming library collection for Python")
14060 (description "This package provides 16 word stemmer algorithms generated
14061 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14063 (license license:bsd-3)))
14065 (define-public python2-snowballstemmer
14066 (package-with-python2 python-snowballstemmer))
14068 (define-public python-setproctitle
14070 (name "python-setproctitle")
14075 (uri (pypi-uri "setproctitle" version))
14078 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14079 (build-system python-build-system)
14082 (modify-phases %standard-phases
14083 (add-before 'check 'patch-Makefile
14084 ;; Stricly this is only required for the python2 variant.
14085 ;; But adding a phase in an inherited package seems to be
14086 ;; cumbersum. So we patch even for python3.
14088 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14090 (substitute* "Makefile"
14091 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14092 (string-append nose "/bin/nosetests "))))
14096 (setenv "PYTHON" (or (which "python3") (which "python")))
14097 (setenv "PYCONFIG" (if (which "python3-config")
14098 "python3-config --embed"
14100 (setenv "CC" "gcc")
14101 ;; No need to extend PYTHONPATH to find the built package, since
14102 ;; the Makefile will build anyway
14103 (invoke "make" "check"))))))
14105 `(("procps" ,procps))) ; required for tests
14106 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14108 "Setproctitle implementation for Python to customize the process title")
14109 (description "The library allows a process to change its title (as displayed
14110 by system tools such as ps and top).
14112 Changing the title is mostly useful in multi-process systems, for
14113 example when a master process is forked: changing the children's title
14114 allows identifying the task each process is busy with. The technique
14115 is used by PostgreSQL and the OpenSSH Server for example.")
14116 (license license:bsd-3)
14117 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14119 (define-public python2-setproctitle
14120 (let ((base (package-with-python2
14121 (strip-python2-variant python-setproctitle))))
14124 (native-inputs `(("python2-nose" ,python2-nose)
14125 ,@(package-native-inputs base))))))
14127 (define-public python-validictory
14129 (name "python-validictory")
14134 (uri (pypi-uri "validictory" version))
14137 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14138 (build-system python-build-system)
14141 (modify-phases %standard-phases
14142 (add-after 'unpack 'bootstrap
14143 ;; Move the tests out of the package directory to avoid
14146 (rename-file "validictory/tests" "tests")
14147 (delete-file "tests/__init__.py")))
14150 ;; Extend PYTHONPATH so the built package will be found.
14151 (setenv "PYTHONPATH"
14152 (string-append (getcwd) "/build/lib:"
14153 (getenv "PYTHONPATH")))
14154 (invoke "py.test" "-vv" ))))))
14156 `(("python-pytest" ,python-pytest)))
14158 "https://github.com/jamesturk/validictory")
14159 (synopsis "General purpose Python data validator")
14160 (description "It allows validation of arbitrary Python data structures.
14162 The schema format is based on the JSON Schema
14163 proposal (http://json-schema.org), so combined with json the library is also
14164 useful as a validator for JSON data.")
14165 (license license:expat)))
14167 (define-public python2-validictory
14168 (package-with-python2 python-validictory))
14170 (define-public python-pyelftools
14172 (name "python-pyelftools")
14177 (uri (pypi-uri "pyelftools" version))
14180 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14181 (build-system python-build-system)
14184 (modify-phases %standard-phases
14185 (add-before 'check 'set-pythonpath
14187 (setenv "PYTHONPATH"
14190 ":" (getenv "PYTHONPATH")))
14193 "https://github.com/eliben/pyelftools")
14195 "Analyze binary and library file information")
14196 (description "This Python library provides interfaces for parsing and
14197 analyzing two binary and library file formats; the Executable and Linking
14198 Format (ELF), and debugging information in the Debugging With Attributed
14199 Record Format (DWARF).")
14200 (license license:public-domain)))
14202 (define-public python-pyev
14204 (name "python-pyev")
14209 (uri (pypi-uri "pyev" version))
14212 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14213 (build-system python-build-system)
14215 `(#:tests? #f ; no test suite
14217 (modify-phases %standard-phases
14218 (add-after 'unpack 'patch
14219 (lambda* (#:key inputs #:allow-other-keys)
14220 (let ((libev (string-append (assoc-ref inputs "libev")
14221 "/lib/libev.so.4")))
14222 (substitute* "setup.py"
14223 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14224 (string-append "libev_dll_name = \"" libev "\"")))))))))
14226 `(("libev" ,libev)))
14227 (home-page "http://pythonhosted.org/pyev/")
14228 (synopsis "Python libev interface")
14229 (description "Pyev provides a Python interface to libev.")
14230 (license license:gpl3)))
14232 (define-public python2-pyev
14233 (package-with-python2 python-pyev))
14235 (define-public python-imagesize
14237 (name "python-imagesize")
14242 (uri (pypi-uri "imagesize" version))
14245 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14246 (build-system python-build-system)
14247 (home-page "https://github.com/shibukawa/imagesize_py")
14248 (synopsis "Gets image size of files in various formats in Python")
14250 "This package allows determination of image size from
14251 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14252 (license license:expat)))
14254 (define-public python2-imagesize
14255 (package-with-python2 python-imagesize))
14257 (define-public python-termstyle
14259 (name "python-termstyle")
14264 (uri (pypi-uri "termstyle" version))
14267 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14268 (build-system python-build-system)
14271 (modify-phases %standard-phases
14274 (invoke "python" "test3.py"))))))
14275 (home-page "https://github.com/gfxmonk/termstyle")
14276 (synopsis "Console text coloring for Python")
14277 (description "This package provides console text coloring for Python.")
14278 (license license:bsd-3)))
14280 (define-public python-argcomplete
14282 (name "python-argcomplete")
14287 (uri (pypi-uri "argcomplete" version))
14290 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14291 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14292 (build-system python-build-system)
14294 `(("python-coverage" ,python-coverage)
14295 ("python-flake8" ,python-flake8)
14296 ("python-pexpect" ,python-pexpect)
14297 ("python-wheel" ,python-wheel)
14300 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14301 (home-page "https://github.com/kislyuk/argcomplete")
14302 (synopsis "Shell tab completion for Python argparse")
14303 (description "argcomplete provides extensible command line tab completion
14304 of arguments and options for Python scripts using @code{argparse}. It's
14305 particularly useful for programs with many options or sub-parsers that can
14306 dynamically suggest completions; for example, when browsing resources over the
14308 (license license:asl2.0)))
14310 (define-public python2-argcomplete
14311 (package-with-python2 python-argcomplete))
14313 (define-public python-csscompressor
14315 (name "python-csscompressor")
14320 (uri (pypi-uri "csscompressor" version))
14323 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14324 (build-system python-build-system)
14327 (modify-phases %standard-phases
14330 (invoke "py.test"))))))
14332 `(("python-pytest" ,python-pytest)))
14333 (home-page "https://github.com/sprymix/csscompressor")
14334 (synopsis "Python port of YUI CSS Compressor")
14336 "This package provides a python port of YUI CSS Compressor.")
14337 (license license:bsd-3)))
14339 (define-public python-rcssmin
14341 (name "python-rcssmin")
14346 (uri (pypi-uri "rcssmin" version))
14349 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14350 (build-system python-build-system)
14353 (modify-phases %standard-phases
14356 (invoke "python" "run_tests.py" "tests"))))))
14357 (home-page "http://opensource.perlig.de/rcssmin/")
14358 (synopsis "CSS Minifier")
14359 (description "The minifier is based on the semantics of the YUI compressor,
14360 which itself is based on the rule list by Isaac Schlueter.")
14361 (license license:asl2.0)))
14363 (define-public python-rjsmin
14365 (name "python-rjsmin")
14370 (uri (pypi-uri "rjsmin" version))
14373 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14374 (modules '((guix build utils)))
14377 (for-each delete-file (find-files "bench" "\\.js$"))
14379 (build-system python-build-system)
14381 '(#:tests? #f ; Not all test files included.
14383 (modify-phases %standard-phases
14385 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14386 (add-installed-pythonpath inputs outputs)
14388 (invoke "py.test" "-vv" "tests")
14391 `(("python-pytest" ,python-pytest)))
14392 (home-page "http://opensource.perlig.de/rjsmin/")
14393 (synopsis "Javascript Minifier")
14394 (description "@code{rJSmin} is a javascript minifier written in Python. The
14395 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14396 is a re-implementation aiming for speed, so it can be used at runtime (rather
14397 than during a preprocessing step).")
14398 (license license:asl2.0)))
14400 (define-public python-xopen
14402 (name "python-xopen")
14407 (uri (pypi-uri "xopen" version))
14410 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14411 (build-system python-build-system)
14413 `(("python-setuptools-scm" ,python-setuptools-scm)))
14414 (home-page "https://github.com/marcelm/xopen/")
14415 (synopsis "Open compressed files transparently")
14416 (description "This module provides an @code{xopen} function that works like
14417 Python's built-in @code{open} function, but can also deal with compressed files.
14418 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14419 recognized by their file extensions. The focus is on being as efficient as
14420 possible on all supported Python versions.")
14421 (license license:expat)))
14423 (define-public python2-xopen
14424 (let ((base (package-with-python2
14425 (strip-python2-variant python-xopen))))
14428 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14429 ,@(package-propagated-inputs base))))))
14431 (define-public python-cheetah
14433 (name "python-cheetah")
14438 (uri (pypi-uri "Cheetah3" version))
14441 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14442 (build-system python-build-system)
14444 `(#:modules ((guix build utils)
14445 (guix build python-build-system)
14449 #:phases (modify-phases %standard-phases
14450 (add-after 'unpack 'use-absolute-python
14452 (substitute* "Cheetah/CheetahWrapper.py"
14453 (("#!/usr/bin/env python")
14454 (string-append "#!" (which "python"))))
14456 (add-after 'unpack 'fix-tests
14458 (substitute* "Cheetah/Tests/ImportHooks.py"
14459 (("os.path.dirname\\(__file__\\)")
14460 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14464 (let ((cwd (getcwd)))
14465 (setenv "PYTHONPATH"
14468 (find (cut string-prefix? "lib" <>)
14469 (scandir (string-append cwd "/build")))
14470 ":" (getenv "PYTHONPATH")))
14472 (string-append (getenv "PATH")
14474 (setenv "TMPDIR" "/tmp")
14476 (substitute* "Cheetah/Tests/Test.py"
14477 (("unittest.TextTestRunner\\(\\)")
14478 "unittest.TextTestRunner(verbosity=2)"))
14480 (invoke "python" "Cheetah/Tests/Test.py")))))))
14482 `(("python-markdown" ,python-markdown))) ;optional
14483 (home-page "https://cheetahtemplate.org/")
14484 (synopsis "Template engine")
14485 (description "Cheetah is a text-based template engine and Python code
14488 Cheetah can be used as a standalone templating utility or referenced as
14489 a library from other Python applications. It has many potential uses,
14490 but web developers looking for a viable alternative to ASP, JSP, PHP and
14491 PSP are expected to be its principle user group.
14495 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14497 @item Cleanly separates content, graphic design, and program code.
14498 @item Blends the power and flexibility of Python with a simple template language
14499 that non-programmers can understand.
14500 @item Gives template writers full access to any Python data structure, module,
14501 function, object, or method in their templates.
14502 @item Makes code reuse easy by providing an object-orientated interface to
14503 templates that is accessible from Python code or other Cheetah templates.
14504 One template can subclass another and selectively reimplement sections of it.
14505 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14506 improve the performance of a dynamic website.
14507 @item Compiles templates into optimized, yet readable, Python code.
14509 (license (license:x11-style "file://LICENSE"))))
14511 (define-public python2-cheetah
14512 (package-with-python2 python-cheetah))
14514 (define-public python-dulwich
14516 (name "python-dulwich")
14517 (version "0.19.16")
14521 (uri (list (string-append "https://www.dulwich.io/releases/"
14522 "dulwich-" version ".tar.gz")
14523 (pypi-uri "dulwich" version)))
14526 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14527 (build-system python-build-system)
14530 (modify-phases %standard-phases
14531 (add-before 'check 'fix-tests
14532 (lambda* (#:key inputs #:allow-other-keys)
14533 ;; The tests use Popen with a custom environment which doesn't
14535 (substitute* "dulwich/tests/compat/utils.py"
14536 (("'git'") (string-append "'"
14539 (substitute* '("dulwich/tests/test_repository.py"
14540 "dulwich/tests/test_hooks.py")
14541 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14542 (setenv "TEST_RUNNER" "unittest")
14543 (setenv "PYTHONHASHSEED" "random")
14546 `(("python-fastimport" ,python-fastimport)
14547 ("python-urllib3" ,python-urllib3)))
14549 `(("python-mock" ,python-mock)
14550 ("python-geventhttpclient" ,python-geventhttpclient)
14552 (home-page "https://www.dulwich.io/")
14553 (synopsis "Git implementation in Python")
14554 (description "Dulwich is an implementation of the Git file formats and
14555 protocols written in pure Python.")
14556 ;; Can be used with either license.
14557 (license (list license:asl2.0 license:gpl2+))))
14559 (define-public python2-dulwich
14560 (package-with-python2 python-dulwich))
14562 (define-public python-pbkdf2
14564 (name "python-pbkdf2")
14569 (uri (pypi-uri "pbkdf2" version))
14572 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14573 (build-system python-build-system)
14576 (modify-phases %standard-phases
14579 (setenv "PYTHONPATH"
14580 (string-append (getcwd) "/build/lib:"
14581 (getenv "PYTHONPATH")))
14582 (invoke "python" "test/test_pbkdf2.py"))))))
14584 `(("python-pycrypto" ,python-pycrypto))) ; optional
14585 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14586 (synopsis "Password-based key derivation")
14587 (description "This module implements the password-based key derivation
14588 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14590 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14591 is part of the RSA Public Key Cryptography Standards series. The provided
14592 implementation takes a password or a passphrase and a salt value (and
14593 optionally a iteration count, a digest module, and a MAC module) and provides
14594 a file-like object from which an arbitrarily-sized key can be read.")
14595 (license license:expat)))
14597 (define-public python2-pbkdf2
14598 (package-with-python2 python-pbkdf2))
14600 (define-public python-qrcode
14602 (name "python-qrcode")
14607 (uri (pypi-uri "qrcode" version))
14609 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14610 (build-system python-build-system)
14612 ;; FIXME: Tests require packaging 'pymaging'.
14615 `(("python-lxml" ,python-lxml) ; for SVG output
14616 ("python-pillow" ,python-pillow) ; for PNG output
14617 ("python-six" ,python-six)))
14618 (home-page "https://github.com/lincolnloop/python-qrcode")
14619 (synopsis "QR Code image generator")
14620 (description "This package provides a pure Python QR Code generator
14621 module. It uses the Python Imaging Library (PIL) to allow for the generation
14624 In addition this package provides a command line tool to generate QR codes and
14625 either write these QR codes to a file or do the output as ascii art at the
14627 (license license:bsd-3)))
14629 (define-public python2-qrcode
14630 (package-with-python2 python-qrcode))
14632 (define-public python-rst2ansi
14634 (name "python-rst2ansi")
14639 (uri (pypi-uri "rst2ansi" version))
14642 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14643 (build-system python-build-system)
14645 `(("python-docutils" ,python-docutils)))
14646 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14647 (synopsis "Convert RST to ANSI-decorated console output")
14649 "Python module dedicated to rendering RST (reStructuredText) documents
14650 to ansi-escaped strings suitable for display in a terminal.")
14651 (license license:expat)))
14653 (define-public python-ansi2html
14655 (name "python-ansi2html")
14660 (uri (pypi-uri "ansi2html" version))
14663 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14664 (build-system python-build-system)
14666 `(("python-mock" ,python-mock)
14667 ("python-nose" ,python-nose)))
14669 `(("python-six" ,python-six)))
14670 (home-page "https://github.com/ralphbean/ansi2html")
14671 (synopsis "Convert ANSI-decorated console output to HTML")
14673 "@command{ansi2html} is a Python library and command line utility for
14674 converting text with ANSI color codes to HTML or LaTeX.")
14675 (license license:gpl3+)))
14677 (define-public python2-ansi2html
14678 (package-with-python2 python-ansi2html))
14680 (define-public python-ddt
14682 (name "python-ddt")
14687 (uri (pypi-uri "ddt" version))
14690 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
14691 (build-system python-build-system)
14693 `(("python-mock" ,python-mock)
14694 ("python-nose" ,python-nose)))
14696 `(("python-six" ,python-six)
14697 ("python-pyyaml" ,python-pyyaml)))
14698 (home-page "https://github.com/txels/ddt")
14699 (synopsis "Data-Driven Tests")
14701 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14702 running it with different test data, and make it appear as multiple test
14704 (license license:expat)))
14706 (define-public python2-ddt
14707 (package-with-python2 python-ddt))
14709 (define-public python-pycountry
14711 (name "python-pycountry")
14712 (version "18.5.26")
14716 (uri (pypi-uri "pycountry" version))
14719 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14720 (build-system python-build-system)
14721 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14722 (synopsis "ISO databases for languages, countries, currencies, etc.")
14724 "@code{pycountry} provides the ISO databases for the standards:
14726 @item 639-3 (Languages)
14727 @item 3166 (Countries)
14728 @item 3166-3 (Deleted Countries)
14729 @item 3166-2 (Subdivisions of countries)
14730 @item 4217 (Currencies)
14731 @item 15924 (Scripts)
14733 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14734 through a Python API.")
14735 (license license:lgpl2.1+)))
14737 (define-public python2-pycountry
14738 (package-with-python2 python-pycountry))
14740 (define-public python-pycosat
14742 (name "python-pycosat")
14747 (uri (pypi-uri "pycosat" version ".zip"))
14750 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14751 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14752 (build-system python-build-system)
14754 `(("unzip" ,unzip)))
14755 (home-page "https://github.com/ContinuumIO/pycosat")
14756 (synopsis "Bindings to picosat (a SAT solver)")
14758 "This package provides efficient Python bindings to @code{picosat} on
14759 the C level. When importing pycosat, the @code{picosat} solver becomes part
14760 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14761 Problem} (SAT) solver.")
14762 (license license:expat)))
14764 (define-public python2-pycosat
14765 (package-with-python2 python-pycosat))
14767 (define-public python2-ruamel.ordereddict
14769 (name "python2-ruamel.ordereddict")
14774 (uri (pypi-uri "ruamel.ordereddict" version))
14777 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14778 (build-system python-build-system)
14780 `(#:python ,python-2
14782 (modify-phases %standard-phases
14784 (add-after 'install 'check
14785 (lambda* (#:key inputs outputs #:allow-other-keys)
14786 (add-installed-pythonpath inputs outputs)
14787 (invoke "python" "test/testordereddict.py"))))))
14788 (home-page "https://bitbucket.org/ruamel/ordereddict")
14789 (synopsis "Version of dict that keeps keys in insertion order")
14791 "This is an implementation of an ordered dictionary with @dfn{Key
14792 Insertion Order} (KIO: updates of values do not affect the position of the
14793 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14794 removed and put at the back). The standard library module @code{OrderedDict},
14795 implemented later, implements a subset of @code{ordereddict} functionality.
14796 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14797 Order} (KSO, no sorting function can be specified, but a transform can be
14798 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14799 (license license:expat)))
14801 (define-public python-pypeg2
14803 (name "python-pypeg2")
14808 (uri (pypi-uri "pyPEG2" version))
14811 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14812 (build-system python-build-system)
14813 (propagated-inputs `(("python-lxml" ,python-lxml)))
14815 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14817 (home-page "https://fdik.org/pyPEG/")
14818 (synopsis "Parsering Expression Grammars in Python")
14819 (description "PyPEG is an intrinsic parser interpreter framework for
14820 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14821 parse many formal languages.")
14822 (license license:gpl2)))
14824 (define-public python-incremental
14826 (name "python-incremental")
14831 (uri (pypi-uri "incremental" version))
14834 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14835 (build-system python-build-system)
14836 (home-page "https://github.com/hawkowl/incremental")
14837 (synopsis "Library for versioning Python projects")
14838 (description "Incremental is a small library that versions your Python
14840 (license license:expat)))
14842 (define-public python2-incremental
14843 (package-with-python2 python-incremental))
14845 (define-public python-invoke
14847 (name "python-invoke")
14848 (home-page "https://www.pyinvoke.org/")
14852 (uri (pypi-uri "invoke" version))
14855 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
14856 (build-system python-build-system)
14858 ;; XXX: Requires many dependencies that are not yet in Guix.
14860 (synopsis "Pythonic task execution")
14862 "Invoke is a Python task execution tool and library, drawing inspiration
14863 from various sources to arrive at a powerful and clean feature set. It is
14864 evolved from the Fabric project, but focuses on local and abstract concerns
14865 instead of servers and network commands.")
14866 (license license:bsd-3)))
14868 (define-public python2-invoke
14869 (package-with-python2 python-invoke))
14871 (define-public python-automat
14873 (name "python-automat")
14877 (uri (pypi-uri "Automat" version))
14880 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
14881 (build-system python-build-system)
14882 ;; We disable the tests because they require python-twisted, while
14883 ;; python-twisted depends on python-automat. Twisted is optional, but the
14884 ;; tests fail if it is not available. Also see
14885 ;; <https://github.com/glyph/automat/issues/71>.
14886 (arguments '(#:tests? #f))
14888 `(("python-m2r" ,python-m2r)
14889 ("python-setuptools-scm" ,python-setuptools-scm)
14890 ("python-graphviz" ,python-graphviz)))
14892 `(("python-six" ,python-six)
14893 ("python-attrs" ,python-attrs)))
14894 (home-page "https://github.com/glyph/Automat")
14895 (synopsis "Self-service finite-state machines")
14896 (description "Automat is a library for concise, idiomatic Python
14897 expression of finite-state automata (particularly deterministic finite-state
14899 (license license:expat)))
14901 (define-public python2-automat
14902 (package-with-python2 python-automat))
14904 (define-public python-m2r
14906 (name "python-m2r")
14910 (uri (pypi-uri "m2r" version))
14913 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
14914 (build-system python-build-system)
14916 `(("python-docutils" ,python-docutils)
14917 ("python-mistune" ,python-mistune)))
14919 `(("python-pygments" ,python-pygments)
14920 ("python-mock" ,python-mock)))
14921 (home-page "https://github.com/miyakogi/m2r")
14922 (synopsis "Markdown to reStructuredText converter")
14923 (description "M2R converts a markdown file including reST markups to valid
14925 (license license:expat)))
14927 (define-public python2-m2r
14928 (package-with-python2 python-m2r))
14930 (define-public python-constantly
14932 (name "python-constantly")
14936 (uri (pypi-uri "constantly" version))
14939 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
14940 (build-system python-build-system)
14941 (home-page "https://github.com/twisted/constantly")
14942 (synopsis "Symbolic constants in Python")
14943 (description "Constantly is a Python library that provides symbolic
14944 constant support. It includes collections and constants with text, numeric,
14945 and bit flag values.")
14946 (license license:expat)))
14948 (define-public python2-constantly
14949 (package-with-python2 python-constantly))
14951 (define-public python-attrs
14953 (name "python-attrs")
14957 (uri (pypi-uri "attrs" version))
14960 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
14961 (build-system python-build-system)
14963 `(#:modules ((guix build utils)
14964 (guix build python-build-system)
14968 #:phases (modify-phases %standard-phases
14971 (let ((cwd (getcwd)))
14972 (setenv "PYTHONPATH"
14975 (find (cut string-prefix? "lib" <>)
14976 (scandir (string-append cwd "/build")))
14978 (getenv "PYTHONPATH")))
14979 (invoke "python" "-m" "pytest")))))))
14981 `(("python-coverage" ,python-coverage)
14982 ("python-hypothesis" ,python-hypothesis)
14983 ("python-pympler" ,python-pympler)
14984 ("python-pytest" ,python-pytest)
14985 ("python-six" ,python-six)
14986 ("python-sphinx" ,python-sphinx)
14987 ("python-zope-interface" ,python-zope-interface)))
14988 (home-page "https://github.com/python-attrs/attrs/")
14989 (synopsis "Attributes without boilerplate")
14990 (description "@code{attrs} is a Python package with class decorators that
14991 ease the chores of implementing the most common attribute-related object
14993 (license license:expat)))
14995 (define-public python2-attrs
14996 (package-with-python2 python-attrs))
14998 (define-public python-attrs-bootstrap
15000 (inherit python-attrs)
15001 (name "python-attrs-bootstrap")
15002 (native-inputs `())
15003 (arguments `(#:tests? #f))))
15005 (define-public python2-attrs-bootstrap
15006 (package-with-python2 python-attrs-bootstrap))
15008 (define-public python2-cliapp
15010 (name "python2-cliapp")
15011 (version "1.20180812.1")
15015 (uri (string-append
15016 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15017 version ".tar.gz"))
15020 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15021 (build-system python-build-system)
15023 `(#:python ,python-2
15025 (modify-phases %standard-phases
15026 ;; check phase needs to be run before the build phase. If not,
15027 ;; coverage-test-runner looks for tests for the built source files,
15030 (add-before 'build 'check
15032 ;; Disable python3 tests
15033 (substitute* "check"
15034 (("python3") "# python3"))
15035 (invoke "./check"))))))
15037 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15038 ("python2-pep8" ,python2-pep8)))
15040 `(("python2-pyaml" ,python2-pyaml)))
15041 (home-page "https://liw.fi/cliapp/")
15042 (synopsis "Python framework for command line programs")
15043 (description "@code{python2-cliapp} is a python framework for
15044 command line programs. It contains the typical stuff such programs
15045 need to do, such as parsing the command line for options, and
15046 iterating over input files.")
15047 (license license:gpl2+)))
15049 (define-public python2-ttystatus
15051 (name "python2-ttystatus")
15056 (uri (git-reference
15057 (url "http://git.liw.fi/ttystatus")
15058 ;; There are no tags after ttystatus-0.36.
15059 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15061 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15062 (file-name (git-file-name name version))))
15063 (build-system python-build-system)
15065 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15066 ("python2-pep8" ,python2-pep8)))
15068 `(#:python ,python-2
15070 (modify-phases %standard-phases
15071 ;; check phase needs to be run before the build phase. If not,
15072 ;; coverage-test-runner looks for tests for the built source files,
15075 (add-before 'build 'check
15076 (lambda _ (invoke "make" "check"))))))
15077 (home-page "https://liw.fi/ttystatus/")
15078 (synopsis "Python library for showing progress reporting and
15079 status updates on terminals")
15080 (description "@code{python2-ttystatus} is a python library for
15081 showing progress reporting and status updates on terminals, for
15082 command line programs. Output is automatically adapted to the width
15083 of the terminal: truncated if it does not fit, and resized if the
15084 terminal size changes.")
15085 (license license:gpl3+)))
15087 (define-public python2-tracing
15089 (name "python2-tracing")
15094 (uri (string-append
15095 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15096 version ".tar.gz"))
15099 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15100 (build-system python-build-system)
15102 `(#:python ,python-2))
15103 (home-page "https://liw.fi/tracing/")
15104 (synopsis "Python debug logging helper")
15105 (description "@code{python2-tracing} is a python library for
15106 logging debug messages. It provides a way to turn debugging messages
15107 on and off, based on the filename they occur in. It is much faster
15108 than using @code{logging.Filter} to accomplish the same thing, which
15109 matters when code is run in production mode. The actual logging still
15110 happens using the @code{logging} library.")
15111 (license license:gpl3+)))
15113 (define-public python2-larch
15115 (name "python2-larch")
15116 (version "1.20151025")
15120 (uri (string-append
15121 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15122 version ".tar.gz"))
15123 (patches (search-patches
15124 "python2-larch-coverage-4.0a6-compatibility.patch"))
15127 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15128 (build-system python-build-system)
15130 `(#:python ,python-2
15132 (modify-phases %standard-phases
15133 ;; check phase needs to be run before the build phase. If not,
15134 ;; coverage-test-runner looks for tests for the built source files,
15137 (add-before 'build 'check
15138 (lambda _ (invoke "make" "check"))))))
15140 `(("cmdtest" ,cmdtest)
15141 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15143 `(("python2-tracing" ,python2-tracing)))
15144 (home-page "https://liw.fi/larch/")
15145 (synopsis "Python copy-on-write B-tree library")
15146 (description "@code{python2-larch} is an implementation of
15147 particular kind of B-tree, based on research by Ohad Rodeh. See
15148 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15149 on the data structure.
15151 The distinctive feature of this B-tree is that a node is never
15152 (conceptually) modified. Instead, all updates are done by
15153 copy-on-write. This makes it easy to clone a tree, and modify only the
15154 clone, while other processes access the original tree.")
15155 (license license:gpl3+)))
15157 (define-public python-astroid
15159 (name "python-astroid")
15164 (uri (pypi-uri "astroid" version))
15166 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15167 (modules '((guix build utils)))
15170 ;; Check to see if the version pinning has been removed.
15171 (substitute* "astroid/__pkginfo__.py"
15172 (("==1\\.4\\.\\*") ">=1.4.0"))
15174 (build-system python-build-system)
15176 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15177 ("python-six" ,python-six)
15178 ("python-wrapt" ,python-wrapt)))
15180 `(("python-dateutil" ,python-dateutil)
15181 ("python-pytest" ,python-pytest)
15182 ("python-pytest-runner" ,python-pytest-runner)))
15183 (home-page "https://github.com/PyCQA/astroid")
15184 (synopsis "Common base representation of python source code for pylint and
15186 (description "@code{python-astroid} provides a common base representation
15187 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15189 It provides a compatible representation which comes from the _ast module. It
15190 rebuilds the tree generated by the builtin _ast module by recursively walking
15191 down the AST and building an extended ast. The new node classes have
15192 additional methods and attributes for different usages. They include some
15193 support for static inference and local name scopes. Furthermore, astroid
15194 builds partial trees by inspecting living objects.")
15195 (license license:lgpl2.1+)
15196 (properties `((python2-variant . ,(delay python2-astroid))))))
15198 (define-public python2-astroid
15199 (let ((base (package-with-python2
15200 (strip-python2-variant python-astroid))))
15201 (package (inherit base)
15202 ;; Version 2.x removes python2 support.
15207 (uri (pypi-uri "astroid" version))
15210 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15212 (substitute-keyword-arguments (package-arguments base)
15214 `(modify-phases ,phases
15215 (add-after 'unpack 'remove-spurious-test
15217 ;; https://github.com/PyCQA/astroid/issues/276
15218 (delete-file "astroid/tests/unittest_brain.py")
15222 (invoke"python" "-m" "unittest" "discover"
15223 "-p" "unittest*.py")))))))
15224 (native-inputs `())
15226 `(("python2-backports-functools-lru-cache"
15227 ,python2-backports-functools-lru-cache)
15228 ("python2-enum34" ,python2-enum34)
15229 ("python2-singledispatch" ,python2-singledispatch)
15230 ,@(alist-delete "python-typed-ast"
15231 (package-propagated-inputs base)))))))
15233 (define-public python-isbnlib
15235 (name "python-isbnlib")
15240 (uri (pypi-uri "isbnlib" version))
15243 "07qhykv0x60d5rsx5pj6s4q15ri4znczscll3xmpf6gyclac1592"))))
15244 (build-system python-build-system)
15245 (arguments '(#:tests? #f)) ; No test
15246 (home-page "https://github.com/xlcnd/isbnlib")
15247 (synopsis "Python library to work with ISBN strings")
15248 (description "@code{python-isbnlib} is a (pure) python library that provides
15249 several useful methods and functions to validate, clean, transform, hyphenate and
15250 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15251 version, is suitable to be include as a dependency in other projects.")
15252 (license license:lgpl3+)))
15254 (define-public python-isort
15256 (name "python-isort")
15261 (uri (git-reference
15262 ;; Tests pass only from the Github sources
15263 (url "https://github.com/timothycrosley/isort")
15265 (file-name (git-file-name name version))
15268 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15269 (build-system python-build-system)
15271 `(("python-mock" ,python-mock)
15272 ("python-pytest" ,python-pytest)))
15273 (home-page "https://github.com/timothycrosley/isort")
15274 (synopsis "Python utility/library to sort python imports")
15275 (description "@code{python-isort} is a python utility/library to sort
15276 imports alphabetically, and automatically separated into sections. It
15277 provides a command line utility, a python library and plugins for various
15279 (license license:expat)
15280 (properties `((python2-variant . ,(delay python2-isort))))))
15282 (define-public python2-isort
15283 (let ((base (package-with-python2
15284 (strip-python2-variant python-isort))))
15285 (package (inherit base)
15287 `(("python2-futures" ,python2-futures)
15288 ,@(package-native-inputs base))))))
15290 (define-public python2-backports-functools-lru-cache
15292 (name "python2-backports-functools-lru-cache")
15297 ;; only the pypi tarballs contain the necessary metadata
15298 (uri (pypi-uri "backports.functools_lru_cache" version))
15301 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15302 (build-system python-build-system)
15304 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15306 `(#:python ,python-2))
15307 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15308 (synopsis "Backport of functools.lru_cache from Python 3.3")
15309 (description "@code{python2-backports-functools-lru-cache} is a backport
15310 of @code{functools.lru_cache} from python 3.3.")
15311 (license license:expat)))
15313 (define-public python-configparser
15315 (name "python-configparser")
15320 (uri (pypi-uri "configparser" version))
15323 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15325 `(("python-setuptools_scm" ,python-setuptools-scm)))
15326 (build-system python-build-system)
15327 (home-page "https://github.com/jaraco/configparser/")
15328 (synopsis "Backport of configparser from python 3.5")
15329 (description "@code{python-configparser} is a backport of
15330 @code{configparser} from Python 3.5 so that it can be used directly
15331 in other versions.")
15332 (license license:expat)))
15334 (define-public python2-configparser
15335 (package-with-python2 python-configparser))
15337 (define-public python-mamba
15339 (name "python-mamba")
15343 (uri (pypi-uri "mamba" version))
15346 "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr"))))
15347 (build-system python-build-system)
15348 (arguments `(#:tests? #f)) ; No test
15350 `(("python-clint" ,python-clint)
15351 ("python-coverage" ,python-coverage)))
15352 (home-page "https://nestorsalceda.com/mamba/")
15353 (synopsis "Test runner for Python")
15355 "Mamba is a Behaviour-Driven Development tool for Python developers.
15356 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15357 (license license:expat)))
15359 (define-public python-mando
15361 (name "python-mando")
15365 (uri (pypi-uri "mando" version))
15368 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15369 (build-system python-build-system)
15371 `(("python-rst2ansi" ,python-rst2ansi)
15372 ("python-six" ,python-six)))
15374 `(("python-pytest" ,python-pytest)))
15375 (home-page "https://mando.readthedocs.org/")
15377 "Wrapper around argparse, allowing creation of complete CLI applications")
15379 "This package is a wrapper around argparse, allowing you to write complete CLI
15380 applications in seconds while maintaining all the flexibility.")
15381 (license license:expat)))
15383 (define-public python2-mando
15384 (package-with-python2 python-mando))
15386 (define-public python2-argparse
15388 (name "python2-argparse")
15393 (uri (pypi-uri "argparse" version))
15396 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15397 (build-system python-build-system)
15399 `(#:python ,python-2))
15400 (home-page "https://github.com/ThomasWaldmann/argparse/")
15401 (synopsis "Python command-line parsing library")
15403 "This package is mostly for people who want to have @code{argparse} on
15404 older Pythons because it was not part of the standard library back then.")
15405 (license license:psfl)))
15407 (define-public python-fudge
15409 (name "python-fudge")
15410 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15411 ;; package, which is currently the only use of this package.
15416 (uri (pypi-uri "fudge" version))
15419 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15420 (build-system python-build-system)
15422 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15423 (home-page "https://github.com/fudge-py/fudge")
15424 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15426 "Fudge is a Python module for using fake objects (mocks and stubs) to
15429 In readable Python code, you declare the methods available on your fake object
15430 and how they should be called. Then you inject that into your application and
15431 start testing. This declarative approach means you don’t have to record and
15432 playback actions and you don’t have to inspect your fakes after running code.
15433 If the fake object was used incorrectly then you’ll see an informative
15434 exception message with a traceback that points to the culprit.")
15435 (license license:expat)))
15437 (define-public python2-fudge
15438 (package-with-python2 python-fudge))
15440 (define-public python-mwclient
15442 (name "python-mwclient")
15447 ;; The PyPI version wouldn't contain tests.
15448 (uri (git-reference
15449 (url "https://github.com/mwclient/mwclient")
15450 (commit (string-append "v" version))))
15451 (file-name (git-file-name name version))
15453 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15454 (build-system python-build-system)
15456 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15457 ("python-six" ,python-six)))
15459 `(("python-mock" ,python-mock)
15460 ("python-pytest" ,python-pytest)
15461 ("python-pytest-cov" ,python-pytest-cov)
15462 ("python-pytest-runner" ,python-pytest-runner)
15463 ("python-responses" ,python-responses)))
15464 (home-page "https://github.com/btongminh/mwclient")
15465 (synopsis "MediaWiki API client")
15466 (description "This package provides a MediaWiki API client.")
15467 (license license:expat)))
15469 (define-public python2-mwclient
15470 (package-with-python2 python-mwclient))
15472 (define-public python-utils
15474 (name "python-utils")
15478 (uri (pypi-uri "python-utils" version))
15481 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15482 (build-system python-build-system)
15485 (modify-phases %standard-phases
15487 (lambda* (#:key inputs outputs #:allow-other-keys)
15488 (add-installed-pythonpath inputs outputs)
15489 (delete-file "pytest.ini")
15490 (invoke "pytest" "-vv"))))))
15492 `(("pytest-runner" ,python-pytest-runner)
15493 ("pytest" ,python-pytest)
15494 ("six" ,python-six)))
15495 (home-page "https://github.com/WoLpH/python-utils")
15496 (synopsis "Convenient utilities not included with the standard Python install")
15498 "Python Utils is a collection of small Python functions and classes which
15499 make common patterns shorter and easier.")
15500 (license license:bsd-2)))
15502 (define-public python2-utils
15503 (package-with-python2 python-utils))
15505 (define-public python-diff-match-patch
15507 (name "python-diff-match-patch")
15508 (version "20121119")
15512 (uri (pypi-uri "diff-match-patch" version))
15515 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15516 (build-system python-build-system)
15517 (home-page "https://code.google.com/p/google-diff-match-patch")
15518 (synopsis "Synchronize plain text")
15519 (description "Diff Match and Patch libraries offer robust algorithms to
15520 perform the operations required for synchronizing plain text.")
15521 (license license:asl2.0)))
15523 (define-public python2-diff-match-patch
15524 (package-with-python2 python-diff-match-patch))
15526 (define-public python-dirsync
15528 (name "python-dirsync")
15533 (uri (pypi-uri "dirsync" version))
15536 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15537 (build-system python-build-system)
15539 `(("six" ,python-six)))
15540 (home-page "https://github.com/tkhyn/dirsync")
15541 (synopsis "Advanced directory tree synchronisation tool")
15542 (description "Advanced directory tree synchronisation tool.")
15543 (license license:expat)))
15545 (define-public python2-dirsync
15546 (package-with-python2 python-dirsync))
15548 (define-public python-levenshtein
15550 (name "python-levenshtein")
15555 (uri (pypi-uri "python-Levenshtein" version))
15558 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15559 (build-system python-build-system)
15560 (home-page "https://github.com/ztane/python-Levenshtein")
15561 (synopsis "Fast computation of Levenshtein distance and string similarity")
15563 "The Levenshtein Python C extension module contains functions for fast computation of
15565 @item Levenshtein (edit) distance, and edit operations
15566 @item string similarity
15567 @item approximate median strings, and generally string averaging
15568 @item string sequence and set similarity
15570 It supports both normal and Unicode strings.")
15571 (license license:gpl2+)))
15573 (define-public python2-levenshtein
15574 (package-with-python2 python-levenshtein))
15576 (define-public python-scandir
15578 (name "python-scandir")
15583 (uri (pypi-uri "scandir" version))
15585 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15586 (build-system python-build-system)
15588 `(#:phases (modify-phases %standard-phases
15591 (invoke "python" "test/run_tests.py"))))))
15592 (home-page "https://github.com/benhoyt/scandir")
15593 (synopsis "Directory iteration function")
15595 "Directory iteration function like os.listdir(), except that instead of
15596 returning a list of bare filenames, it yields DirEntry objects that include
15597 file type and stat information along with the name. Using scandir() increases
15598 the speed of os.walk() by 2-20 times (depending on the platform and file
15599 system) by avoiding unnecessary calls to os.stat() in most cases.
15601 This package is part of the Python standard library since version 3.5.")
15602 (license license:bsd-3)))
15604 (define-public python2-scandir
15605 (package-with-python2 python-scandir))
15607 (define-public python2-stemming
15609 (name "python2-stemming")
15614 (uri (pypi-uri "stemming" version))
15616 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15617 (build-system python-build-system)
15619 `(#:python ,python-2))
15620 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15621 (synopsis "Python implementations of various stemming algorithms")
15623 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15624 stemming algorithms for English. These implementations are straightforward and
15625 efficient, unlike some Python versions of the same algorithms available on the
15626 Web. This package is an extraction of the stemming code included in the Whoosh
15628 (license license:public-domain)))
15630 (define-public python-factory-boy
15632 (name "python-factory-boy")
15637 (uri (pypi-uri "factory_boy" version))
15639 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15640 (build-system python-build-system)
15642 ;; Tests are not included in the tarball.
15645 `(("faker" ,python-faker)))
15646 (home-page "https://github.com/benhoyt/scandir")
15647 (synopsis "Versatile test fixtures replacement")
15649 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15651 As a fixtures replacement tool, it aims to replace static, hard to maintain
15652 fixtures with easy-to-use factories for complex object.
15654 Instead of building an exhaustive test setup with every possible combination
15655 of corner cases, factory_boy allows you to use objects customized for the
15656 current test, while only declaring the test-specific fields")
15657 (license license:expat)))
15659 (define-public python2-factory-boy
15660 (package-with-python2 python-factory-boy))
15662 (define-public python-translate-toolkit
15664 (name "python-translate-toolkit")
15669 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15671 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15672 (build-system python-build-system)
15674 `(("python-pytest" ,python-pytest)
15675 ("python-sphinx" ,python-sphinx)))
15677 `(("python-babel" ,python-babel)
15678 ("python-beautifulsoup4" ,python-beautifulsoup4)
15679 ("python-chardet" ,python-chardet)
15680 ("python-diff-match-patch" ,python-diff-match-patch)
15681 ("python-levenshtein" ,python-levenshtein)
15682 ("python-lxml" ,python-lxml)
15683 ("python-six" ,python-six)
15684 ("python-vobject" ,python-vobject)
15685 ("python-pyyaml" ,python-pyyaml)))
15687 ;; TODO: tests are not run, because they end with
15688 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15690 ;; during test setup.
15692 (home-page "https://toolkit.translatehouse.org")
15693 (synopsis "Tools and API for translation and localization engineering")
15695 "Tools and API for translation and localization engineering. It contains
15696 several utilities, as well as an API for building localization tools.")
15697 (license license:gpl2+)))
15699 (define-public python2-translate-toolkit
15700 (package-with-python2 python-translate-toolkit))
15702 (define-public python-packaging
15704 (name "python-packaging")
15709 (uri (pypi-uri "packaging" version))
15710 ;; XXX: The URL in the patch file is wrong, it should be
15711 ;; <https://github.com/pypa/packaging/pull/256>.
15712 (patches (search-patches "python-packaging-test-arch.patch"))
15715 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15716 (build-system python-build-system)
15718 `(#:phases (modify-phases %standard-phases
15720 (lambda* (#:key tests? #:allow-other-keys)
15722 (invoke "py.test" "-vv")
15723 (format #t "test suite not run~%"))
15726 `(("python-pretend" ,python-pretend)
15727 ("python-pytest" ,python-pytest)))
15729 `(("python-pyparsing" ,python-pyparsing)
15730 ("python-six" ,python-six)))
15731 (home-page "https://github.com/pypa/packaging")
15732 (synopsis "Core utilities for Python packages")
15733 (description "Packaging is a Python module for dealing with Python packages.
15734 It offers an interface for working with package versions, names, and dependency
15736 ;; From 'LICENSE': This software is made available under the terms of
15737 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15738 ;; Contributions to this software is made under the terms of *both* these
15740 (license (list license:asl2.0 license:bsd-2))))
15742 (define-public python2-packaging
15743 (package-with-python2 python-packaging))
15745 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15746 (define-public python-packaging-bootstrap
15750 (name "python-packaging-bootstrap")
15751 (native-inputs '())
15753 `(("python-pyparsing" ,python-pyparsing)))
15754 (arguments '(#:tests? #f)))))
15756 (define-public python2-packaging-bootstrap
15760 (name "python2-packaging-bootstrap")
15761 (native-inputs '())
15763 `(("python-pyparsing" ,python2-pyparsing)))
15766 ,@(package-arguments python2-packaging))))))
15768 (define-public python-relatorio
15770 (name "python-relatorio")
15775 (uri (pypi-uri "relatorio" version))
15778 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15779 (build-system python-build-system)
15781 `(("python-lxml" ,python-lxml)
15782 ("python-genshi" ,python-genshi)))
15784 `(("python-magic" ,python-magic)))
15785 (home-page "https://relatorio.tryton.org/")
15786 (synopsis "Templating library able to output ODT and PDF files")
15787 (description "Relatorio is a templating library which provides a way to
15788 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15789 for more filetypes can be easily added by creating plugins for them.")
15790 (license license:gpl3+)))
15792 (define-public python2-relatorio
15793 (package-with-python2 python-relatorio))
15795 (define-public python-radon
15797 (name "python-radon")
15802 (uri (pypi-uri "radon" version))
15805 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15806 (build-system python-build-system)
15808 `(#:phases (modify-phases %standard-phases
15811 (invoke "python" "radon/tests/run.py"))))))
15813 `(("python-colorama" ,python-colorama)
15814 ("python-flake8-polyfill" ,python-flake8-polyfill)
15815 ("python-mando" ,python-mando)))
15817 `(("python-pytest" ,python-pytest)
15818 ("python-pytest-mock" ,python-pytest-mock)))
15819 (home-page "https://radon.readthedocs.org/")
15820 (synopsis "Code Metrics in Python")
15821 (description "Radon is a Python tool which computes various code metrics.
15822 Supported metrics are:
15824 @item raw metrics: SLOC, comment lines, blank lines, &c.
15825 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15826 @item Halstead metrics (all of them)
15827 @item the Maintainability Index (a Visual Studio metric)
15829 (properties `((python2-variant . ,(delay python2-radon))))
15830 (license license:expat)))
15832 (define-public python2-radon
15833 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
15837 `(("python-configparser" ,python2-configparser)
15838 ("python-future" ,python2-future)
15839 ,@(package-propagated-inputs base))))))
15841 (define-public python-sure
15843 (name "python-sure")
15848 (uri (pypi-uri "sure" version))
15851 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
15852 (build-system python-build-system)
15854 `(("python-mock" ,python-mock)
15855 ("python-six" ,python-six)))
15857 `(("python-nose" ,python-nose)))
15858 (home-page "https://github.com/gabrielfalcao/sure")
15859 (synopsis "Automated testing library in python for python")
15861 "Sure is a python library that leverages a DSL for writing assertions.
15862 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15863 (license license:gpl3+)))
15865 (define-public python2-sure
15866 (package-with-python2 python-sure))
15868 (define-public python2-couleur
15869 ;; This package does not seem to support python3 at all, hence,
15870 ;; only the python2 variant definition is provided.
15872 (name "python2-couleur")
15877 (uri (pypi-uri "couleur" version))
15880 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15881 (build-system python-build-system)
15883 `(#:python ,python-2))
15884 (home-page "https://github.com/gabrielfalcao/couleur")
15886 "ANSI terminal tool for python, colored shell and other handy fancy features")
15888 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15889 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15890 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15891 ;; https://github.com/gabrielfalcao/couleur/issues/11
15892 (license license:lgpl3+)))
15894 (define-public python-misaka
15896 (name "python-misaka")
15901 (uri (pypi-uri "misaka" version))
15904 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
15905 (build-system python-build-system)
15907 `(;; Line 37 of setup.py calls self.run_command('develop')
15908 ;; in the 'check' phase. This command seems to be trying
15910 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15911 ;; for which it does not have the permission to write.
15914 `(("python-cffi" ,python-cffi)))
15915 (home-page "https://github.com/FSX/misaka")
15916 (synopsis "Python binding for Hoedown")
15918 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15919 library written in C. It features a fast HTML renderer and functionality to make custom
15920 renderers (e.g. man pages or LaTeX).")
15921 (license license:expat)))
15923 (define-public python2-misaka
15924 (package-with-python2 python-misaka))
15926 (define-public python2-steadymark
15927 ;; This is forced into being a python2 only variant
15928 ;; due to its dependence on couleur that has no support
15931 (name "python2-steadymark")
15936 (uri (pypi-uri "steadymark" version))
15939 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15940 (build-system python-build-system)
15942 `(("python-couleur" ,python2-couleur)
15943 ("python-sure" ,python2-sure)
15944 ("python-misaka" ,python2-misaka)))
15946 `(#:python ,python-2
15948 (modify-phases %standard-phases
15949 (add-before 'build 'patch-setup-py
15951 ;; Update requirements from dependency==version
15952 ;; to dependency>=version
15953 (substitute* "setup.py"
15956 (home-page "https://github.com/gabrielfalcao/steadymark")
15957 (synopsis "Markdown-based test runner for python")
15959 "@code{Steadymark} allows documentation to be written in github-flavoured
15960 markdown. The documentation may contain snippets of code surrounded by python
15961 code blocks and @code{Steadymark} will find these snippets and run them, making
15962 sure that there are no old malfunctional examples in the documentation examples.")
15963 (license license:expat)))
15965 (define-public python-jsonpointer
15967 (name "python-jsonpointer")
15972 (uri (pypi-uri "jsonpointer" version))
15975 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15976 (build-system python-build-system)
15977 (home-page "https://github.com/stefankoegl/python-json-pointer")
15978 (synopsis "Identify specific nodes in a JSON document")
15979 (description "@code{jsonpointer} allows you to access specific nodes
15980 by path in a JSON document (see RFC 6901).")
15981 (license license:bsd-3)))
15983 (define-public python2-jsonpointer
15984 (package-with-python2 python-jsonpointer))
15986 (define-public python-jsonpatch
15988 (name "python-jsonpatch")
15993 ;; pypi version lacks tests.js
15994 (uri (git-reference
15995 (url "https://github.com/stefankoegl/python-json-patch")
15996 (commit (string-append "v" version))))
15997 (file-name (git-file-name name version))
16000 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16001 (build-system python-build-system)
16003 `(("python-jsonpointer" ,python-jsonpointer)))
16004 (home-page "https://github.com/stefankoegl/python-json-patch")
16005 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16006 (description "@code{jsonpatch} is a library and program that allows
16007 applying JSON Patches according to RFC 6902.")
16008 (license license:bsd-3)))
16010 (define-public python2-jsonpatch
16011 (package-with-python2 python-jsonpatch))
16013 (define-public python-jsonpatch-0.4
16014 (package (inherit python-jsonpatch)
16015 (name "python-jsonpatch")
16020 (uri (git-reference
16021 (url "https://github.com/stefankoegl/python-json-patch")
16022 (commit (string-append "v" version))))
16023 (file-name (git-file-name name version))
16026 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16028 (define-public python2-jsonpatch-0.4
16029 (package-with-python2 python-jsonpatch-0.4))
16031 (define-public python-rfc3986
16033 (name "python-rfc3986")
16037 (uri (pypi-uri "rfc3986" version))
16040 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16041 (build-system python-build-system)
16043 `(#:modules ((guix build utils)
16044 (guix build python-build-system)
16049 (modify-phases %standard-phases
16052 (let ((cwd (getcwd)))
16053 (setenv "PYTHONPATH"
16054 (string-append cwd "/build/"
16055 (find (cut string-prefix? "lib" <>)
16056 (scandir (string-append cwd "/build")))
16058 (getenv "PYTHONPATH")))
16059 (invoke "pytest" "-v")))))))
16061 `(("python-pytest" ,python-pytest)))
16062 (home-page "https://rfc3986.readthedocs.io/")
16063 (synopsis "Parse and validate URI references")
16065 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16066 validation and authority parsing. This module also supports RFC@tie{}6874
16067 which adds support for zone identifiers to IPv6 addresses.")
16068 (license license:asl2.0)))
16070 (define-public python2-rfc3986
16071 (package-with-python2 python-rfc3986))
16073 (define-public python-rfc3987
16075 (name "python-rfc3987")
16080 (uri (pypi-uri "rfc3987" version))
16083 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16084 (build-system python-build-system)
16085 (home-page "https://pypi.org/project/rfc3987/")
16086 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16087 (description "@code{rfc3987} provides routines for parsing and
16088 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16089 (license license:gpl3+)))
16091 (define-public python2-rfc3987
16092 (package-with-python2 python-rfc3987))
16094 ;; The latest commit contains fixes for building with both python3 and python2.
16095 (define-public python-rfc6555
16096 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16099 (name "python-rfc6555")
16100 (version (git-version "0.0.0" revision commit))
16103 (uri (git-reference
16104 (url "https://github.com/sethmlarson/rfc6555")
16106 (file-name (git-file-name name version))
16109 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16110 (build-system python-build-system)
16113 (modify-phases %standard-phases
16115 (lambda* (#:key tests? #:allow-other-keys)
16117 ;; Other tests require network access.
16118 (invoke "pytest" "tests/test_ipv6.py")
16121 `(("python-pytest" ,python-pytest)))
16122 (home-page "https://pypi.org/project/rfc6555/")
16123 (synopsis "Python implementation of RFC 6555")
16125 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16126 6555. Provided with a single file and dead-simple API to allow easy vendoring
16127 and integration into other projects.")
16128 (properties `((python2-variant . ,(delay python2-rfc6555))))
16129 (license license:asl2.0))))
16131 (define-public python2-rfc6555
16132 (let ((base (package-with-python2
16133 (strip-python2-variant python-rfc6555))))
16137 `(("python2-selectors2" ,python2-selectors2))))))
16139 (define-public python-validators
16141 (name "python-validators")
16145 (uri (pypi-uri "validators" version))
16148 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16149 (build-system python-build-system)
16151 '(#:phases (modify-phases %standard-phases
16154 (invoke "pytest" "-vv"))))))
16156 `(("python-decorator" ,python-decorator)
16157 ("python-six" ,python-six)))
16159 `(("python-flake8" ,python-flake8)
16160 ("python-isort" ,python-isort)
16161 ("python-pytest" ,python-pytest)))
16162 (home-page "https://github.com/kvesteri/validators")
16163 (synopsis "Data validation library")
16165 "This package contains validators for different things such as email
16166 addresses, IP addresses, URLs, hashes and more. It has been designed to
16167 be easy to use and not require defining a schema or form just to validate
16169 (license license:expat)))
16171 (define-public python2-validators
16172 (package-with-python2 python-validators))
16174 (define-public python-validate-email
16176 (name "python-validate-email")
16181 (uri (pypi-uri "validate_email" version))
16184 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16185 (build-system python-build-system)
16186 (home-page "https://github.com/syrusakbary/validate_email")
16187 (synopsis "Verifies if an email address is valid and really exists")
16188 (description "@code{validate_email} can be used to verify if an email
16189 address is valid and really exists.")
16190 (license license:lgpl3+)))
16192 (define-public python2-validate-email
16193 (package-with-python2 python-validate-email))
16195 (define-public python-flex
16197 (name "python-flex")
16202 (uri (pypi-uri "flex" version))
16205 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16206 (build-system python-build-system)
16208 `(("python-click" ,python-click)
16209 ("python-iso8601" ,python-iso8601)
16210 ("python-jsonpointer" ,python-jsonpointer)
16211 ("python-pyyaml" ,python-pyyaml)
16212 ("python-requests" ,python-requests)
16213 ("python-rfc3987" ,python-rfc3987)
16214 ("python-six" ,python-six)
16215 ("python-validate-email" ,python-validate-email)))
16216 (home-page "https://github.com/pipermerriam/flex")
16217 (synopsis "Validates Swagger schemata")
16218 (description "@code{flex} can be used to validate Swagger schemata.")
16219 (license license:bsd-3)))
16221 (define-public python2-flex
16222 (package-with-python2 python-flex))
16224 (define-public python-marshmallow
16226 (name "python-marshmallow")
16227 (version "3.0.0b14")
16231 (uri (pypi-uri "marshmallow" version))
16234 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
16235 (build-system python-build-system)
16237 `(("python-dateutil" ,python-dateutil)
16238 ("python-simplejson" ,python-simplejson)))
16240 `(("python-pytest" ,python-pytest)
16241 ("python-pytz" ,python-pytz)))
16242 (home-page "https://github.com/marshmallow-code/marshmallow")
16243 (synopsis "Convert complex datatypes to and from native
16244 Python datatypes.")
16245 (description "@code{marshmallow} provides a library for converting
16246 complex datatypes to and from native Python datatypes.")
16247 (license license:expat)))
16249 (define-public python2-marshmallow
16250 (package-with-python2 python-marshmallow))
16252 (define-public python-apispec
16254 (name "python-apispec")
16259 (uri (pypi-uri "apispec" version))
16262 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16263 (build-system python-build-system)
16265 `(("python-pyyaml" ,python-pyyaml)))
16267 `(("python-pytest" ,python-pytest)
16268 ("python-flask" ,python-flask)
16269 ("python-marshmallow" ,python-marshmallow)
16270 ("python-tornado" ,python-tornado)
16271 ("python-bottle" ,python-bottle)
16272 ("python-mock" ,python-mock)))
16273 (home-page "https://github.com/marshmallow-code/apispec")
16274 (synopsis "Swagger 2.0 API specification generator")
16275 (description "@code{python-apispec} is a pluggable API specification
16276 generator. Currently supports the OpenAPI specification (f.k.a.
16278 (license license:expat)))
16280 (define-public python2-apispec
16281 (package-with-python2 python-apispec))
16283 (define-public python-flasgger
16285 (name "python-flasgger")
16290 (uri (git-reference
16291 (url "https://github.com/rochacbruno/flasgger")
16293 (file-name (git-file-name name version))
16295 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16296 (build-system python-build-system)
16299 (modify-phases %standard-phases
16301 (lambda* (#:key inputs outputs #:allow-other-keys)
16302 (substitute* "Makefile"
16303 (("flake8 flasgger --ignore=F403")
16304 "flake8 flasgger --ignore=E731,F403"))
16305 (setenv "PYTHONPATH" (string-append (getcwd)
16307 (getenv "PYTHONPATH")))
16308 (invoke "py.test"))))))
16310 `(("python-flask" ,python-flask)
16311 ("python-pyyaml" ,python-pyyaml)
16312 ("python-jsonschema" ,python-jsonschema)
16313 ("python-mistune" ,python-mistune)
16314 ("python-six" ,python-six)))
16316 `(("python-decorator" ,python-decorator)
16317 ("python-flake8" ,python-flake8)
16318 ("python-flask-restful" ,python-flask-restful)
16319 ("python-flex" ,python-flex)
16320 ("python-pytest" ,python-pytest)
16321 ("python-pytest-cov" ,python-pytest-cov)
16322 ("python-marshmallow" ,python-marshmallow)
16323 ("python-apispec" ,python-apispec)))
16324 (home-page "https://github.com/rochacbruno/flasgger/")
16325 (synopsis "Extract Swagger specs from your Flask project")
16326 (description "@code{python-flasgger} allows extracting Swagger specs
16327 from your Flask project. It is a fork of Flask-Swagger.")
16328 (license license:expat)))
16330 (define-public python2-flasgger
16331 (package-with-python2 python-flasgger))
16333 (define-public python-swagger-spec-validator
16335 (name "python-swagger-spec-validator")
16340 (uri (pypi-uri "swagger-spec-validator" version))
16343 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16344 (build-system python-build-system)
16346 `(("python-jsonschema" ,python-jsonschema)
16347 ("python-pyyaml" ,python-pyyaml)
16348 ("python-six" ,python-six)))
16350 "https://github.com/Yelp/swagger_spec_validator")
16351 (synopsis "Validation of Swagger specifications")
16352 (description "@code{swagger_spec_validator} provides a library for
16353 validating Swagger API specifications.")
16354 (license license:asl2.0)))
16356 (define-public python2-swagger-spec-validator
16357 (package-with-python2 python-swagger-spec-validator))
16359 (define-public python-apache-libcloud
16361 (name "python-apache-libcloud")
16366 (uri (pypi-uri "apache-libcloud" version))
16369 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16370 (build-system python-build-system)
16373 (modify-phases %standard-phases
16374 (add-after 'unpack 'patch-ssh
16375 (lambda* (#:key inputs #:allow-other-keys)
16376 (substitute* "libcloud/compute/ssh.py"
16377 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16380 (add-after 'unpack 'patch-tests
16382 (substitute* "libcloud/test/compute/test_ssh_client.py"
16383 (("class ShellOutSSHClientTests")
16384 "@unittest.skip(\"Guix container doesn't have ssh service\")
16385 class ShellOutSSHClientTests"))
16387 (add-before 'check 'copy-secret
16389 (copy-file "libcloud/test/secrets.py-dist"
16390 "libcloud/test/secrets.py")
16393 `(("openssh" ,openssh)))
16395 `(("python-paramiko" ,python-paramiko)
16396 ("python-requests" ,python-requests)))
16398 `(("python-lockfile" ,python-lockfile)
16399 ("python-mock" ,python-mock)
16400 ("python-pytest" ,python-pytest)
16401 ("python-pytest-runner" ,python-pytest-runner)
16402 ("python-requests-mock" ,python-requests-mock)))
16403 (home-page "https://libcloud.apache.org/")
16404 (synopsis "Unified Cloud API")
16405 (description "@code{libcloud} is a Python library for interacting with
16406 many of the popular cloud service providers using a unified API.")
16407 (license license:asl2.0)))
16409 (define-public python2-apache-libcloud
16410 (package-with-python2 python-apache-libcloud))
16412 (define-public python-smmap
16414 (name "python-smmap")
16419 (uri (pypi-uri "smmap" version))
16421 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16422 (build-system python-build-system)
16424 `(("python-nosexcover" ,python-nosexcover)))
16425 (home-page "https://github.com/Byron/smmap")
16426 (synopsis "Python sliding window memory map manager")
16427 (description "@code{smmap} is a pure Python implementation of a sliding
16428 window memory map manager.")
16429 (license license:bsd-3)))
16431 (define-public python-smmap2
16432 (deprecated-package "python-smmap2" python-smmap))
16434 (define-public python2-smmap
16435 (package-with-python2 python-smmap))
16437 (define-public python2-smmap2
16438 (deprecated-package "python2-smmap2" python2-smmap))
16440 (define-public python-regex
16442 (name "python-regex")
16443 (version "2020.6.8")
16446 (uri (pypi-uri "regex" version))
16449 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16450 (build-system python-build-system)
16453 (modify-phases %standard-phases
16455 (lambda* (#:key inputs outputs #:allow-other-keys)
16456 (add-installed-pythonpath inputs outputs)
16457 (invoke "python" "-c"
16458 "from regex.test_regex import test_main; test_main()"))))))
16459 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16460 (synopsis "Alternative regular expression module")
16461 (description "This regular expression implementation is backwards-
16462 compatible with the standard @code{re} module, but offers additional
16463 functionality like full case-folding for case-insensitive matches in Unicode.")
16464 (license license:psfl)))
16466 (define-public python2-regex
16467 (package-with-python2 python-regex))
16469 (define-public python-pyopengl
16471 (name "python-pyopengl")
16476 (uri (pypi-uri "PyOpenGL" version))
16479 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16480 (build-system python-build-system)
16483 ("freeglut" ,freeglut)
16486 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16487 ;attribute 'OSMesa'
16489 (modify-phases %standard-phases
16490 (add-before 'build 'fix-paths
16491 (lambda* (#:key inputs outputs #:allow-other-keys)
16492 (substitute* '("OpenGL/platform/ctypesloader.py")
16493 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16494 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16496 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16498 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16500 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16502 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16504 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16505 ;; Not providing libgle. It seems to be very old.
16507 (home-page "http://pyopengl.sourceforge.net")
16508 (synopsis "Standard OpenGL bindings for Python")
16510 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16511 related APIs. The binding is created using the standard @code{ctypes}
16513 (license license:bsd-3)))
16515 (define-public python-pyopengl-accelerate
16517 (inherit python-pyopengl)
16518 (name "python-pyopengl-accelerate")
16523 (uri (pypi-uri "PyOpenGL-accelerate" version))
16526 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16529 ("python-numpy" ,python-numpy))) ; for cython module
16530 ; numpy_formathandler, thus not propagated
16534 (modify-phases %standard-phases
16535 (delete 'fix-paths))))
16536 (synopsis "Acceleration code for PyOpenGL")
16538 "This is the Cython-coded accelerator module for PyOpenGL.")))
16540 (define-public python-rencode
16542 (name "python-rencode")
16547 (uri (pypi-uri "rencode" version))
16550 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16551 (build-system python-build-system)
16554 (modify-phases %standard-phases
16555 (add-before 'check 'delete-bogus-test
16556 ;; This test requires /home/aresch/Downloads, which is not provided by
16557 ;; the build environment.
16559 (delete-file "rencode/t.py")
16561 (native-inputs `(("pkg-config" ,pkg-config)
16562 ("python-cython" ,python-cython)))
16563 (home-page "https://github.com/aresch/rencode")
16564 (synopsis "Serialization of heterogeneous data structures")
16566 "The @code{rencode} module is a data structure serialization library,
16567 similar to @code{bencode} from the BitTorrent project. For complex,
16568 heterogeneous data structures with many small elements, r-encoding stake up
16569 significantly less space than b-encodings. This version of rencode is a
16570 complete rewrite in Cython to attempt to increase the performance over the
16571 pure Python module.")
16572 (license license:bsd-3)))
16574 (define-public python2-rencode
16575 (package-with-python2 python-rencode))
16577 (define-public python-xenon
16579 (name "python-xenon")
16584 (uri (pypi-uri "xenon" version))
16587 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16588 (build-system python-build-system)
16590 `(("python-pyyaml" ,python-pyyaml)
16591 ("python-radon" ,python-radon)
16592 ("python-requests" ,python-requests)
16593 ("python-flake8" ,python-flake8)
16594 ("python-tox" ,python-tox)))
16596 `(#:tests? #f ;test suite not shipped with the PyPI archive
16598 (modify-phases %standard-phases
16599 (add-before 'build 'patch-test-requirements
16601 ;; Remove httpretty dependency for tests.
16602 (substitute* "setup.py"
16603 (("httpretty") ""))
16605 (home-page "https://xenon.readthedocs.org/")
16606 (synopsis "Monitor code metrics for Python on your CI server")
16608 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16609 Ideally, @code{xenon} is run every time code is committed. Through command
16610 line options, various thresholds can be set for the complexity of code. It
16611 will fail (i.e. it will exit with a non-zero exit code) when any of these
16612 requirements is not met.")
16613 (license license:expat)))
16615 (define-public python2-xenon
16616 (package-with-python2 python-xenon))
16618 (define-public python-pysocks
16620 (name "python-pysocks")
16625 (uri (pypi-uri "PySocks" version))
16628 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
16629 (build-system python-build-system)
16630 (arguments `(#:tests? #f))
16631 (home-page "https://github.com/Anorov/PySocks")
16632 (synopsis "SOCKS client module")
16633 (description "@code{pysocks} is an updated and semi-actively maintained
16634 version of @code{SocksiPy} with bug fixes and extra features.")
16635 (license license:bsd-3)))
16637 (define-public python2-pysocks
16638 (package-with-python2 python-pysocks))
16640 (define-public python-pydiff
16642 (name "python-pydiff")
16647 (uri (pypi-uri "pydiff" version))
16650 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16651 (build-system python-build-system)
16652 (home-page "https://github.com/myint/pydiff")
16653 (synopsis "Library to diff two Python files at the bytecode level")
16655 "@code{pydiff} makes it easy to look for actual code changes while
16656 ignoring formatting changes.")
16657 (license license:expat)))
16659 (define-public python2-pydiff
16660 (package-with-python2 python-pydiff))
16662 (define-public python-tqdm
16664 (name "python-tqdm")
16669 (uri (pypi-uri "tqdm" version))
16672 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
16673 (build-system python-build-system)
16675 '(#:phases (modify-phases %standard-phases
16677 (lambda* (#:key inputs outputs #:allow-other-keys)
16678 (add-installed-pythonpath inputs outputs)
16679 ;; This invokation is taken from tox.ini.
16680 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
16681 "-d" "-v" "tqdm/"))))))
16683 `(("python-nose" ,python-nose)))
16684 (home-page "https://github.com/tqdm/tqdm")
16685 (synopsis "Fast, extensible progress meter")
16687 "Make loops show a progress bar on the console by just wrapping any
16688 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16689 design and layout.")
16690 (license (list license:mpl2.0 license:expat))))
16692 (define-public python2-tqdm
16693 (package-with-python2 python-tqdm))
16695 (define-public python-pkginfo
16697 (name "python-pkginfo")
16702 (uri (pypi-uri "pkginfo" version))
16705 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
16706 (build-system python-build-system)
16708 ;; The tests are broken upstream.
16711 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16713 "Query metadatdata from sdists, bdists, and installed packages")
16715 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16716 source distriubtion (an sdist) or a binary distribution (e.g., created by
16717 running bdist_egg). It can also query the EGG-INFO directory of an installed
16718 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16719 created by running @code{python setup.py develop}).")
16720 (license license:expat)))
16722 (define-public python2-pkginfo
16723 (package-with-python2 python-pkginfo))
16725 (define-public python-twine
16727 (name "python-twine")
16732 (uri (pypi-uri "twine" version))
16734 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
16735 (build-system python-build-system)
16737 `(("python-tqdm" ,python-tqdm)
16738 ("python-packaging" ,python-packaging)
16739 ("python-pkginfo" ,python-pkginfo)
16740 ("python-readme-renderer" ,python-readme-renderer)
16741 ("python-requests" ,python-requests)
16742 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16743 (home-page "https://github.com/pypa/twine")
16744 (synopsis "Collection of utilities for interacting with PyPI")
16746 "@code{twine} currently supports registering projects and uploading
16747 distributions. It authenticates the user over HTTPS, allows them to pre-sign
16748 their files and supports any packaging format (including wheels).")
16749 (license license:asl2.0)))
16751 (define-public python2-twine
16752 (package-with-python2 python-twine))
16754 (define-public python-linecache2
16756 (name "python-linecache2")
16761 (uri (pypi-uri "linecache2" version))
16764 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16765 (build-system python-build-system)
16767 `(;; The tests depend on unittest2, and our version is a bit too old.
16770 `(("python-pbr" ,python-pbr-minimal)))
16772 "https://github.com/testing-cabal/linecache2")
16773 (synopsis "Backports of the linecache module")
16775 "The linecache module allows one to get any line from any file, while
16776 attempting to optimize internally, using a cache, the common case where many
16777 lines are read from a single file.")
16778 (license license:psfl)))
16780 (define-public python2-linecache2
16781 (package-with-python2 python-linecache2))
16783 (define-public python-traceback2
16785 (name "python-traceback2")
16790 (uri (pypi-uri "traceback2" version))
16793 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16794 (build-system python-build-system)
16796 `(;; python-traceback2 and python-unittest2 depend on one another.
16799 `(("python-pbr" ,python-pbr-minimal)))
16801 `(("python-linecache2" ,python-linecache2)))
16803 "https://github.com/testing-cabal/traceback2")
16804 (synopsis "Backports of the traceback module")
16806 "This module provides a standard interface to extract, format and print
16807 stack traces of Python programs. It exactly mimics the behavior of the Python
16808 interpreter when it prints a stack trace.")
16809 (license license:psfl)))
16811 (define-public python2-traceback2
16812 (package-with-python2 python-traceback2))
16814 (define-public python-ratelimiter
16816 (name "python-ratelimiter")
16821 (uri (pypi-uri "ratelimiter" version))
16824 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
16825 (build-system python-build-system)
16827 '(#:tests? #f)) ; There are no tests in the pypi archive.
16828 (home-page "https://github.com/RazerM/ratelimiter")
16829 (synopsis "Simple rate limiting object")
16831 "The @code{ratelimiter} module ensures that an operation will not be
16832 executed more than a given number of times during a given period.")
16833 (license license:asl2.0)))
16835 (define-public python2-ratelimiter
16836 (package-with-python2 python-ratelimiter))
16838 (define-public python-dukpy
16840 (name "python-dukpy")
16845 (uri (git-reference
16846 (url "https://github.com/kovidgoyal/dukpy")
16847 (commit (string-append "v" version))))
16848 (file-name (git-file-name name version))
16850 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
16851 (build-system python-build-system)
16852 (home-page "https://github.com/kovidgoyal/dukpy")
16853 (synopsis "Run JavaScript in python")
16855 "dukpy is a JavaScript runtime environment for Python using the duktape
16856 embeddable JavaScript engine.")
16857 ;; Dukpy is licensed under MIT like the embedded duktape library,
16858 ;; with 'errors.c' as GPL3.
16859 (license (list license:expat license:gpl3))))
16861 (define-public python2-dukpy
16862 (package-with-python2 python-dukpy))
16864 (define-public python-jsonrpclib-pelix
16866 (name "python-jsonrpclib-pelix")
16871 (uri (pypi-uri "jsonrpclib-pelix" version))
16874 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
16875 (build-system python-build-system)
16877 `(#:tests? #f)) ; no tests in PyPI tarball
16878 (home-page "https://github.com/tcalmant/jsonrpclib/")
16879 (synopsis "JSON-RPC 2.0 client library for Python")
16881 "This library implements the JSON-RPC v2.0
16882 specification (backwards-compatible) as a client library for Python. This
16883 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
16885 (license license:asl2.0)))
16887 (define-public python2-jsonrpclib-pelix
16888 (package-with-python2 python-jsonrpclib-pelix))
16890 (define-public python-setuptools-scm-git-archive
16892 (name "python-setuptools-scm-git-archive")
16897 (uri (pypi-uri "setuptools_scm_git_archive" version))
16900 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
16901 (build-system python-build-system)
16903 `(("python-pytest" ,python-pytest)))
16905 `(("python-setuptools-scm" ,python-setuptools-scm)))
16906 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
16907 (synopsis "Setuptools_scm plugin for git archives")
16909 "The setuptools_scm_git_archive package is a plugin to
16910 setuptools_scm, which supports obtaining versions from git archives that
16911 belong to tagged versions.")
16912 (license license:expat)))
16914 (define-public python2-setuptools-scm-git-archive
16915 (package-with-python2 python-setuptools-scm-git-archive))
16917 (define-public python-setuptools-git
16919 (name "python-setuptools-git")
16924 (uri (pypi-uri "setuptools-git" version))
16927 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
16928 (build-system python-build-system)
16931 (modify-phases %standard-phases
16932 ;; This is needed for tests.
16933 (add-after 'unpack 'configure-git
16935 (setenv "HOME" "/tmp")
16936 (invoke "git" "config" "--global" "user.email" "guix")
16937 (invoke "git" "config" "--global" "user.name" "guix")
16940 `(("git" ,git-minimal)))
16941 (home-page "https://github.com/msabramo/setuptools-git")
16942 (synopsis "Setuptools revision control system plugin for Git")
16944 "This package provides a plugin for Setuptools for revision control with
16946 (license license:bsd-3)))
16948 (define-public python-pyclipper
16950 (name "python-pyclipper")
16951 (version "1.1.0.post3")
16955 (uri (pypi-uri "pyclipper" version ".zip"))
16957 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
16958 (modules '((guix build utils)))
16961 ;; This file is generated by Cython.
16962 (delete-file "pyclipper/pyclipper.cpp") #t))))
16963 (build-system python-build-system)
16966 (modify-phases %standard-phases
16967 (add-before 'build 'cythonize-sources
16969 (with-directory-excursion "pyclipper"
16970 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
16972 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
16974 `(("python-cython" ,python-cython)
16975 ("python-pytest" ,python-pytest)
16976 ("python-pytest-runner" ,python-pytest-runner)
16977 ("python-unittest2" ,python-unittest2)
16979 (home-page "https://github.com/greginvm/pyclipper")
16980 (synopsis "Wrapper for Angus Johnson's Clipper library")
16982 "Pyclipper is a Cython wrapper for the C++ translation of the
16983 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
16984 (license license:expat)))
16986 (define-public python2-pyclipper
16987 (package-with-python2 python-pyclipper))
16989 (define-public python2-booleanoperations
16991 (name "python2-booleanoperations")
16996 (uri (pypi-uri "booleanOperations" version ".zip"))
16999 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17000 (build-system python-build-system)
17002 `(#:python ,python-2))
17005 ("python2-pytest" ,python2-pytest)
17006 ("python2-pytest-runner" ,python2-pytest-runner)))
17008 `(("python-fonttools" ,python2-fonttools)
17009 ("python-pyclipper" ,python2-pyclipper)
17010 ("python-ufolib" ,python2-ufolib)))
17011 (home-page "https://github.com/typemytype/booleanOperations")
17012 (synopsis "Boolean operations on paths")
17014 "BooleanOperations provides a Python library that enables
17015 boolean operations on paths.")
17016 (license license:expat)))
17018 (define-public python-tempdir
17020 (name "python-tempdir")
17025 (uri (pypi-uri "tempdir" version))
17028 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17029 (build-system python-build-system)
17030 (home-page "https://pypi.org/project/tempdir/")
17032 ;; the package has no tests
17034 (synopsis "Python library for managing temporary directories")
17036 "This library manages temporary directories that are automatically
17037 deleted with all their contents when they are no longer needed. It is
17038 particularly convenient for use in tests.")
17039 (license license:expat)))
17041 (define-public python2-tempdir
17042 (package-with-python2 python-tempdir))
17044 (define-public python-activepapers
17046 (name "python-activepapers")
17051 (uri (pypi-uri "ActivePapers.Py" version))
17054 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17055 (build-system python-build-system)
17057 `(#:modules ((ice-9 ftw)
17060 (guix build python-build-system))
17063 (modify-phases %standard-phases
17064 (add-after 'unpack 'delete-python2-code
17066 (for-each delete-file
17067 '("lib/activepapers/builtins2.py"
17068 "lib/activepapers/standardlib2.py"
17069 "lib/activepapers/utility2.py"))))
17072 ;; Deactivate the test cases that download files
17073 (setenv "NO_NETWORK_ACCESS" "1")
17074 ;; For some strange reason, some tests fail if nosetests runs all
17075 ;; test modules in a single execution. They pass if each test
17076 ;; module is run individually.
17077 (for-each (lambda (filename)
17078 (invoke "nosetests"
17079 (string-append "tests/" filename)))
17082 (string-suffix? ".py" filename)))))))))
17084 `(("python-tempdir" ,python-tempdir)
17085 ("python-nose" ,python-nose)))
17087 `(("python-h5py" ,python-h5py)))
17088 (home-page "https://www.activepapers.org/")
17089 (synopsis "Executable papers for scientific computing")
17091 "ActivePapers is a tool for working with executable papers, which
17092 combine data, code, and documentation in single-file packages,
17093 suitable for publication as supplementary material or on repositories
17094 such as figshare or Zenodo.")
17095 (properties `((python2-variant . ,(delay python2-activepapers))))
17096 (license license:bsd-3)))
17098 (define-public python2-activepapers
17099 (let ((base (package-with-python2
17100 (strip-python2-variant python-activepapers))))
17104 (substitute-keyword-arguments (package-arguments base)
17106 `(modify-phases ,phases
17107 (delete 'delete-python2-code)
17108 (add-after 'unpack 'delete-python3-code
17110 (for-each delete-file
17111 '("lib/activepapers/builtins3.py"
17112 "lib/activepapers/standardlib3.py"
17113 "lib/activepapers/utility3.py")))))))))))
17115 (define-public python-semver
17117 (name "python-semver")
17122 (uri (pypi-uri "semver" version))
17125 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17126 (build-system python-build-system)
17128 `(("python-appdirs" ,python-appdirs)
17129 ("python-distlib" ,python-distlib)
17130 ("python-importlib-metadata" ,python-importlib-metadata)
17131 ("python-filelock" ,python-filelock)
17132 ("python-six" ,python-six)
17133 ("python-tox" ,python-tox)
17134 ("python-virtualenv" ,python-virtualenv)))
17135 (home-page "https://github.com/k-bx/python-semver")
17136 (synopsis "Python helper for Semantic Versioning")
17137 (description "This package provides a Python library for
17138 @url{Semantic Versioning, http://semver.org/}.")
17139 (license license:bsd-3)))
17141 (define-public python2-semver
17142 (package-with-python2 python-semver))
17144 (define-public python-pyro4
17146 (name "python-pyro4")
17151 (uri (pypi-uri "Pyro4" version))
17153 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17154 (build-system python-build-system)
17156 '(#:tests? #f)) ;FIXME: Some tests require network access.
17158 `(("python-cloudpickle" ,python-cloudpickle)
17159 ("python-dill" ,python-dill)
17160 ("python-msgpack" ,python-msgpack)))
17162 `(("python-serpent" ,python-serpent)))
17163 (home-page "https://pyro4.readthedocs.io")
17164 (synopsis "Distributed object middleware for Python")
17166 "Pyro enables you to build applications in which objects can talk to each
17167 other over the network. You can just use normal Python method calls to call
17168 objects on other machines, also known as remote procedure calls (RPC).")
17169 (license license:expat)))
17171 (define-public python2-pyro
17173 (name "python2-pyro")
17178 (uri (pypi-uri "Pyro" version))
17179 (file-name (string-append "Pyro-" version ".tar.gz"))
17182 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17183 (build-system python-build-system)
17185 ;; Pyro is not compatible with Python 3
17186 `(#:python ,python-2
17187 ;; Pyro has no test cases for automatic execution
17189 (home-page "https://pythonhosted.org/Pyro/")
17190 (synopsis "Distributed object manager for Python")
17191 (description "Pyro is a Distributed Object Technology system
17192 written in Python that is designed to be easy to use. It resembles
17193 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17194 which is a system and language independent Distributed Object Technology
17195 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17196 longer maintained. New projects should use Pyro4 instead, which
17197 is the new Pyro version that is actively developed.")
17198 (license license:expat)))
17200 (define-public python2-scientific
17202 (name "python2-scientific")
17207 (uri (git-reference
17208 (url "https://github.com/khinsen/ScientificPython")
17209 (commit (string-append "rel" version))))
17210 (file-name (git-file-name name version))
17213 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17214 (build-system python-build-system)
17216 `(("netcdf" ,netcdf)))
17218 `(("python-numpy" ,python2-numpy-1.8)
17219 ("python-pyro" ,python2-pyro)))
17221 ;; ScientificPython is not compatible with Python 3
17222 `(#:python ,python-2
17223 #:tests? #f ; No test suite
17225 (modify-phases %standard-phases
17227 (lambda* (#:key inputs #:allow-other-keys)
17228 (invoke "python" "setup.py" "build"
17229 (string-append "--netcdf_prefix="
17230 (assoc-ref inputs "netcdf"))))))))
17231 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17232 (synopsis "Python modules for scientific computing")
17233 (description "ScientificPython is a collection of Python modules that are
17234 useful for scientific computing. Most modules are rather general (Geometry,
17235 physical units, automatic derivatives, ...) whereas others are more
17236 domain-specific (e.g. netCDF and PDB support). The library is currently
17237 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17238 (license license:cecill-c)))
17240 (define-public python2-mmtk
17242 (name "python2-mmtk")
17247 (uri (git-reference
17248 (url "https://github.com/khinsen/MMTK")
17249 (commit (string-append "rel" version))))
17250 (file-name (git-file-name name version))
17253 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17254 (build-system python-build-system)
17256 `(("netcdf" ,netcdf)))
17258 `(("python-scientific" ,python2-scientific)
17259 ("python-tkinter" ,python-2 "tk")))
17261 `(#:python ,python-2
17264 (modify-phases %standard-phases
17265 (add-before 'build 'includes-from-scientific
17266 (lambda* (#:key inputs #:allow-other-keys)
17267 (mkdir-p "Include/Scientific")
17270 (assoc-ref inputs "python-scientific")
17271 "/include/python2.7/Scientific")
17272 "Include/Scientific"))))))
17273 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17274 (synopsis "Python library for molecular simulation")
17275 (description "MMTK is a library for molecular simulations with an emphasis
17276 on biomolecules. It provides widely used methods such as Molecular Dynamics
17277 and normal mode analysis, but also basic routines for implementing new methods
17278 for simulation and analysis. The library is currently not actively maintained
17279 and works only with Python 2 and NumPy < 1.9.")
17280 (license license:cecill-c)))
17282 (define-public python-phonenumbers
17284 (name "python-phonenumbers")
17289 (uri (pypi-uri "phonenumbers" version))
17292 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17293 (build-system python-build-system)
17295 "https://github.com/daviddrysdale/python-phonenumbers")
17297 "Python library for dealing with international phone numbers")
17299 "This package provides a Python port of Google's libphonenumber library.")
17300 (license license:asl2.0)))
17302 (define-public python2-phonenumbers
17303 (package-with-python2 python-phonenumbers))
17305 (define-public python-send2trash
17307 (name "python-send2trash")
17310 (origin (method git-fetch)
17311 ;; Source tarball on PyPI doesn't include tests.
17312 (uri (git-reference
17313 (url "https://github.com/hsoft/send2trash")
17315 (file-name (git-file-name name version))
17318 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17319 (build-system python-build-system)
17322 (modify-phases %standard-phases
17323 (add-before 'check 'pre-check
17325 (mkdir-p "/tmp/foo")
17326 (setenv "HOME" "/tmp/foo")
17328 (home-page "https://github.com/hsoft/send2trash")
17329 (synopsis "Send files to the user's @file{~/Trash} directory")
17330 (description "This package provides a Python library to send files to the
17331 user's @file{~/Trash} directory.")
17332 (properties `((python2-variant . ,(delay python2-send2trash))))
17333 (license license:bsd-3)))
17335 (define-public python2-send2trash
17337 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17339 (substitute-keyword-arguments (package-arguments python-send2trash)
17341 `(modify-phases ,phases
17342 (add-before 'check 'setenv
17344 (setenv "PYTHONPATH"
17345 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17348 (define-public python-pyfavicon
17350 (name "python-pyfavicon")
17355 (uri (pypi-uri "pyfavicon" version))
17357 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17358 (build-system python-build-system)
17360 ;; There are no tests in the PyPI tarball and the tests from the
17361 ;; repository require online data.
17364 `(("python-aiohttp" ,python-aiohttp)
17365 ("python-beautifulsoup4" ,python-beautifulsoup4)
17366 ("python-pillow" ,python-pillow)))
17367 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17368 (synopsis "Async favicon fetcher")
17370 "@code{pyfavicon} is an async favicon fetcher.")
17371 (license license:expat)))
17373 (define-public python-yapf
17375 (name "python-yapf")
17380 (uri (pypi-uri "yapf" version))
17383 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17384 (build-system python-build-system)
17385 (home-page "https://github.com/google/yapf")
17386 (synopsis "Formatter for Python code")
17387 (description "YAPF is a formatter for Python code. It's based off of
17388 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17389 takes the code and reformats it to the best formatting that conforms to the
17390 style guide, even if the original code didn't violate the style guide.")
17391 (license license:asl2.0)))
17393 (define-public python2-yapf
17394 (package-with-python2 python-yapf))
17396 (define-public python-yq
17403 (uri (pypi-uri "yq" version))
17406 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17407 (build-system python-build-system)
17410 (modify-phases %standard-phases
17411 (add-after 'unpack 'patch
17412 (lambda* (#:key inputs #:allow-other-keys)
17413 (substitute* "yq/__init__.py"
17414 (("Popen\\(\\[\"jq")
17417 (assoc-ref inputs "jq")
17421 `(("python-argcomplete" ,python-argcomplete)
17422 ("python-pyyaml" ,python-pyyaml)
17423 ("python-xmltodict" ,python-xmltodict)
17426 `(("python-coverage" ,python-coverage)
17427 ("python-flake8" ,python-flake8)
17428 ("python-wheel" ,python-wheel)))
17429 (home-page "https://github.com/kislyuk/yq")
17430 (synopsis "Command-line YAML/XML processor")
17432 "This package provides @command{yq} and @command{xq} for processing YAML
17433 and XML respectively. The processing is done through @{jq}, @command{jq}
17434 filters can be used to process the data as it passes through.")
17435 (license license:asl2.0)))
17437 (define-public python-gyp
17438 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17441 (name "python-gyp")
17442 ;; Google does not release versions,
17443 ;; based on second most recent commit date.
17444 (version (git-version "0.0.0" revision commit))
17447 ;; Google does not release tarballs,
17448 ;; git checkout is needed.
17450 (uri (git-reference
17451 (url "https://chromium.googlesource.com/external/gyp")
17453 (file-name (git-file-name name version))
17456 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17457 (build-system python-build-system)
17458 (home-page "https://gyp.gsrc.io/")
17459 (synopsis "GYP is a Meta-Build system")
17461 "GYP builds build systems for large, cross platform applications.
17462 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17463 files, and Makefiles.")
17464 (license license:bsd-3))))
17466 (define-public python2-gyp
17467 (package-with-python2 python-gyp))
17469 (define-public python-whatever
17471 (name "python-whatever")
17476 (uri (git-reference
17477 (url "https://github.com/Suor/whatever")
17479 (file-name (git-file-name name version))
17481 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17482 (build-system python-build-system)
17485 (modify-phases %standard-phases
17488 (invoke "py.test"))))))
17490 `(("python-pytest" ,python-pytest)))
17491 (home-page "https://github.com/Suor/whatever")
17492 (synopsis "Make anonymous functions by partial application of operators")
17493 (description "@code{whatever} provides an easy way to make anonymous
17494 functions by partial application of operators.")
17495 (license license:bsd-3)))
17497 (define-public python2-whatever
17498 (package-with-python2 python-whatever))
17500 (define-public python-funcy
17502 (name "python-funcy")
17507 (uri (git-reference
17508 (url "https://github.com/Suor/funcy")
17511 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17512 (file-name (git-file-name name version))))
17513 (build-system python-build-system)
17516 (modify-phases %standard-phases
17519 (invoke "py.test"))))))
17521 `(("python-pytest" ,python-pytest)
17522 ("python-whatever" ,python-whatever)))
17523 (home-page "https://github.com/Suor/funcy")
17524 (synopsis "Functional tools")
17525 (description "@code{funcy} is a library that provides functional tools.
17528 @item merge - Merges collections of the same type
17529 @item walk - Type-preserving map
17530 @item select - Selects a part of a collection
17531 @item take - Takes the first n items of a collection
17532 @item first - Takes the first item of a collection
17533 @item remove - Predicated-removes items of a collection
17534 @item concat - Concatenates two collections
17535 @item flatten - Flattens a collection with subcollections
17536 @item distinct - Returns only distinct items
17537 @item split - Predicated-splits a collection
17538 @item split_at - Splits a collection at a given item
17539 @item group_by - Groups items by group
17540 @item pairwise - Pairs off adjacent items
17541 @item partial - Partially-applies a function
17542 @item curry - Curries a function
17543 @item compose - Composes functions
17544 @item complement - Complements a predicate
17545 @item all_fn - \"all\" with predicate
17547 (license license:bsd-3)))
17549 (define-public python2-funcy
17550 (package-with-python2 python-funcy))
17552 (define-public python-isoweek
17554 (name "python-isoweek")
17559 (uri (pypi-uri "isoweek" version))
17562 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17563 (build-system python-build-system)
17564 (home-page "https://github.com/gisle/isoweek")
17565 (synopsis "Objects representing a week")
17566 (description "The @code{isoweek} module provide the class Week that
17567 implements the week definition of ISO 8601. This standard also defines
17568 a notation for identifying weeks; yyyyWww (where the W is a literal).
17569 Week instances stringify to this form.")
17570 (license license:bsd-3)))
17572 (define-public python2-isoweek
17573 (package-with-python2 python-isoweek))
17575 (define-public python-pyzbar
17577 (name "python-pyzbar")
17581 ;; There's no source tarball on PyPI.
17583 (uri (git-reference
17584 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
17585 (commit (string-append "v" version))))
17586 (file-name (git-file-name name version))
17588 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
17589 (build-system python-build-system)
17592 (modify-phases %standard-phases
17593 (add-after 'unpack 'remove-failing-test
17595 ;; This tests if find_library was called once, but we remove
17596 ;; the call in the stage below to make the library find libzbar.
17597 (delete-file "pyzbar/tests/test_zbar_library.py")
17599 (add-before 'build 'set-library-file-name
17600 (lambda* (#:key inputs #:allow-other-keys)
17601 (let ((libzbar (assoc-ref inputs "zbar")))
17602 (substitute* "pyzbar/zbar_library.py"
17603 (("find_library\\('zbar'\\)")
17604 (string-append "'" libzbar "/lib/libzbar.so.0'")))
17607 `(("pkg-config" ,pkg-config)
17608 ("python-numpy" ,python-numpy)
17609 ("python-pillow" ,python-pillow)))
17612 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
17613 (synopsis "Read one-dimensional barcodes and QR codes")
17615 "Read one-dimensional barcodes and QR codes using the zbar library.
17621 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
17622 @item Decodes locations of barcodes
17623 @item No dependencies, other than the zbar library itself
17625 (license license:expat)))
17627 (define-public python-tokenize-rt
17629 (name "python-tokenize-rt")
17634 (uri (pypi-uri "tokenize-rt" version))
17637 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
17638 (build-system python-build-system)
17639 (home-page "https://github.com/asottile/tokenize-rt")
17640 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
17642 "This Python library is a wrapper around @code{tokenize} from the Python
17643 standard library. It provides two additional tokens @code{ESCAPED_NL} and
17644 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
17645 and @code{tokens_to_src} to roundtrip.")
17646 (license license:expat)))
17648 (define-public python-future-fstrings
17650 (name "python-future-fstrings")
17655 (uri (pypi-uri "future_fstrings" version))
17658 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
17659 (build-system python-build-system)
17661 `(("python-tokenize-rt" ,python-tokenize-rt)))
17662 (home-page "https://github.com/asottile/future-fstrings")
17663 (synopsis "Backport of fstrings to Python < 3.6")
17665 "This package provides a UTF-8 compatible encoding
17666 @code{future_fstrings}, which performs source manipulation. It decodes the
17667 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
17668 @code{f} strings.")
17669 (license license:expat)))
17671 (define-public python-typed-ast
17673 (name "python-typed-ast")
17678 (uri (git-reference
17679 (url "https://github.com/python/typed_ast")
17682 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
17683 (file-name (git-file-name name version))))
17684 (build-system python-build-system)
17686 `(#:modules ((guix build utils)
17687 (guix build python-build-system)
17692 (modify-phases %standard-phases
17695 (let ((cwd (getcwd)))
17696 (setenv "PYTHONPATH"
17697 (string-append cwd "/build/"
17698 (find (cut string-prefix? "lib" <>)
17699 (scandir (string-append cwd "/build")))
17701 (getenv "PYTHONPATH"))))
17704 (native-inputs `(("python-pytest" ,python-pytest)))
17705 (home-page "https://github.com/python/typed_ast")
17706 (synopsis "Fork of Python @code{ast} modules with type comment support")
17707 (description "This package provides a parser similar to the standard
17708 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
17709 include PEP 484 type comments and are independent of the version of Python
17710 under which they are run. The @code{typed_ast} parsers produce the standard
17711 Python AST (plus type comments), and are both fast and correct, as they are
17712 based on the CPython 2.7 and 3.7 parsers.")
17713 ;; See the file "LICENSE" for the details.
17714 (license (list license:psfl
17716 license:expat)))) ;ast27/Parser/spark.py
17718 (define-public python-typing
17720 (name "python-typing")
17721 (version "3.7.4.3")
17725 (uri (pypi-uri "typing" version))
17727 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
17728 (build-system python-build-system)
17729 (home-page "https://docs.python.org/3/library/typing.html")
17730 (synopsis "Type hints for Python")
17731 (description "This is a backport of the standard library @code{typing}
17732 module to Python versions older than 3.5. Typing defines a standard notation
17733 for Python function and variable type annotations. The notation can be used
17734 for documenting code in a concise, standard format, and it has been designed
17735 to also be used by static and runtime type checkers, static analyzers, IDEs
17737 (license license:psfl)))
17739 (define-public python2-typing
17740 (package-with-python2 python-typing))
17742 (define-public python-typing-extensions
17744 (name "python-typing-extensions")
17745 (version "3.7.4.2")
17749 (uri (pypi-uri "typing_extensions" version))
17752 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
17753 (build-system python-build-system)
17755 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
17756 (synopsis "Experimental type hints for Python")
17758 "The typing_extensions module contains additional @code{typing} hints not
17759 yet present in the of the @code{typing} standard library.
17760 Included are implementations of:
17763 @item ContextManager
17774 @item TYPE_CHECKING
17775 @item AsyncGenerator
17777 (license license:psfl)))
17779 (define-public bpython
17786 (uri (pypi-uri "bpython" version))
17788 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
17789 (build-system python-build-system)
17792 (modify-phases %standard-phases
17793 (add-after 'unpack 'remove-failing-test
17795 ;; Remove failing test. FIXME: make it pass
17796 (delete-file "bpython/test/test_args.py")
17798 (add-after 'wrap 'add-aliases
17799 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
17800 (lambda* (#:key outputs #:allow-other-keys)
17801 (let ((out (assoc-ref outputs "out")))
17804 (symlink old (string-append out "/bin/" new)))
17805 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
17806 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
17809 `(("python-pygments" ,python-pygments)
17810 ("python-requests" ,python-requests)
17811 ("python-babel" ,python-babel) ; optional, for internationalization
17812 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
17813 ("python-greenlet" ,python-greenlet)
17814 ("python-urwid" ,python-urwid) ; for bpython-urwid only
17815 ("python-six" ,python-six)))
17817 `(("python-sphinx" ,python-sphinx)
17818 ("python-mock" ,python-mock)))
17819 (home-page "https://bpython-interpreter.org/")
17820 (synopsis "Fancy interface to the Python interpreter")
17821 (description "Bpython is a fancy interface to the Python
17822 interpreter. bpython's main features are
17825 @item in-line syntax highlighting,
17826 @item readline-like autocomplete with suggestions displayed as you type,
17827 @item expected parameter list for any Python function,
17828 @item \"rewind\" function to pop the last line of code from memory and
17830 @item send the code you've entered off to a pastebin,
17831 @item save the code you've entered to a file, and
17832 @item auto-indentation.
17834 (license license:expat)))
17836 (define-public bpython2
17837 (let ((base (package-with-python2
17838 (strip-python2-variant bpython))))
17839 (package (inherit base)
17842 `(#:python ,python-2
17844 (modify-phases %standard-phases
17845 (add-after 'unpack 'remove-failing-test
17847 ;; Remove failing test. FIXME: make it pass
17848 (delete-file "bpython/test/test_args.py")
17849 ;; Disable failing test-cases (renaming inhibits they are
17851 (substitute* "bpython/test/test_curtsies_repl.py"
17852 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
17853 (string-append a "xxx_off_" b))
17854 (("^(\\s*def )(test_complex\\W)" _ a b)
17855 (string-append a "xxx_off_" b)))
17857 (add-before 'build 'rename-scripts
17858 ;; rename the scripts to bypthon2, bpdb2, etc.
17860 (substitute* "setup.py"
17861 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
17862 (string-append name "2" rest "\n"))
17863 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
17864 (string-append name "2" (or sub "") rest "\n")))
17867 (define-public python-pyinotify
17869 (name "python-pyinotify")
17873 (uri (pypi-uri "pyinotify" version))
17876 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
17877 (build-system python-build-system)
17878 (arguments `(#:tests? #f)) ;no tests
17879 (home-page "https://github.com/seb-m/pyinotify")
17880 (synopsis "Python library for monitoring inotify events")
17882 "@code{pyinotify} provides a Python interface for monitoring
17883 file system events on Linux.")
17884 (license license:expat)))
17886 (define-public python2-pyinotify
17887 (package-with-python2 python-pyinotify))
17889 ;; Ada parser uses this version.
17890 (define-public python2-quex-0.67.3
17892 (name "python2-quex")
17897 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
17898 (version-major+minor version)
17899 "/quex-" version ".zip"))
17902 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
17903 (build-system python-build-system)
17905 `(("unzip" ,unzip)))
17907 `(#:python ,python-2
17910 (modify-phases %standard-phases
17911 (delete 'configure)
17914 (lambda* (#:key outputs #:allow-other-keys)
17915 (let* ((out (assoc-ref outputs "out"))
17916 (share/quex (string-append out "/share/quex"))
17917 (bin (string-append out "/bin")))
17918 (copy-recursively "." share/quex)
17920 (symlink (string-append share/quex "/quex-exe.py")
17921 (string-append bin "/quex"))
17923 (native-search-paths
17924 (list (search-path-specification
17925 (variable "QUEX_PATH")
17926 (files '("share/quex")))))
17927 (home-page "http://quex.sourceforge.net/")
17928 (synopsis "Lexical analyzer generator in Python")
17929 (description "@code{quex} is a lexical analyzer generator in Python.")
17930 (license license:lgpl2.1+))) ; Non-military
17932 (define-public python2-quex
17933 (package (inherit python2-quex-0.67.3)
17934 (name "python2-quex")
17939 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
17942 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
17943 (file-name (string-append name "-" version ".tar.gz"))))))
17945 (define-public python-more-itertools
17947 (name "python-more-itertools")
17952 (uri (pypi-uri "more-itertools" version))
17955 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
17956 (build-system python-build-system)
17957 (home-page "https://github.com/erikrose/more-itertools")
17958 (synopsis "More routines for operating on iterables, beyond itertools")
17959 (description "Python's built-in @code{itertools} module implements a
17960 number of iterator building blocks inspired by constructs from APL, Haskell,
17961 and SML. @code{more-itertools} includes additional building blocks for
17962 working with iterables.")
17963 (properties `((python2-variant . ,(delay python2-more-itertools))))
17964 (license license:expat)))
17966 ;; The 5.x series are the last versions supporting Python 2.7.
17967 (define-public python2-more-itertools
17969 (inherit python-more-itertools)
17970 (name "python2-more-itertools")
17974 (uri (pypi-uri "more-itertools" version))
17977 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
17979 `(#:python ,python-2))
17981 `(("python2-six" ,python2-six-bootstrap)))))
17983 (define-public python-latexcodec
17985 (name "python-latexcodec")
17990 (uri (pypi-uri "latexcodec" version))
17992 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
17993 (build-system python-build-system)
17995 `(("python-six" ,python-six)))
17996 (home-page "https://readthedocs.org/projects/latexcodec/")
17997 (synopsis "Work with LaTeX code in Python")
17998 (description "Lexer and codec to work with LaTeX code in Python.")
17999 (license license:expat)))
18001 (define-public python-pybtex
18003 (name "python-pybtex")
18008 (uri (pypi-uri "pybtex" version))
18010 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18011 (build-system python-build-system)
18013 `(("python-nose" ,python-nose)))
18015 `(("python-latexcodec" ,python-latexcodec)
18016 ("python-pyyaml" ,python-pyyaml)
18017 ("python-six" ,python-six)))
18019 `(#:test-target "nosetests"))
18020 (home-page "https://pybtex.org/")
18021 (synopsis "BibTeX-compatible bibliography processor")
18022 (description "Pybtex is a BibTeX-compatible bibliography processor written
18023 in Python. You can simply type pybtex instead of bibtex.")
18024 (license license:expat)))
18026 (define-public python-onetimepass
18028 (name "python-onetimepass")
18033 (uri (pypi-uri "onetimepass" version))
18035 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18036 (build-system python-build-system)
18037 (propagated-inputs `(("python-six" ,python-six)))
18038 (home-page "https://github.com/tadeck/onetimepass/")
18039 (synopsis "One-time password library")
18040 (description "Python one-time password library for HMAC-based (HOTP) and
18041 time-based (TOTP) passwords.")
18042 (license license:expat)))
18044 (define-public python-parso
18046 (name "python-parso")
18051 (uri (pypi-uri "parso" version))
18053 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18055 `(("python-pytest" ,python-pytest)))
18056 (build-system python-build-system)
18058 `(#:phases (modify-phases %standard-phases
18060 (lambda _ (invoke "pytest" "-vv"))))))
18061 (home-page "https://github.com/davidhalter/parso")
18062 (synopsis "Python Parser")
18063 (description "Parso is a Python parser that supports error recovery and
18064 round-trip parsing for different Python versions (in multiple Python versions).
18065 Parso is also able to list multiple syntax errors in your Python file.")
18066 (license license:expat)))
18068 (define-public python2-parso
18069 (package-with-python2 python-parso))
18071 (define-public python-async-generator
18073 (name "python-async-generator")
18078 (uri (pypi-uri "async_generator" version))
18081 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18082 (build-system python-build-system)
18084 `(("python-pytest" ,python-pytest)))
18085 (home-page "https://github.com/python-trio/async_generator")
18086 (synopsis "Async generators and context managers for Python 3.5+")
18087 (description "@code{async_generator} back-ports Python 3.6's native async
18088 generators and Python 3.7's context managers into Python 3.5.")
18090 (license (list license:expat license:asl2.0))))
18092 (define-public python-async-timeout
18094 (name "python-async-timeout")
18099 (uri (pypi-uri "async-timeout" version))
18102 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18103 (build-system python-build-system)
18104 (home-page "https://github.com/aio-libs/async_timeout/")
18105 (synopsis "Timeout context manager for asyncio programs")
18106 (description "@code{async-timeout} provides a timeout timeout context
18107 manager compatible with @code{asyncio}.")
18108 (license license:asl2.0)))
18110 (define-public python-glob2
18112 (name "python-glob2")
18117 (uri (git-reference
18118 (url "https://github.com/miracle2k/python-glob2")
18119 (commit (string-append "v" version))))
18120 (file-name (git-file-name name version))
18122 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18123 (build-system python-build-system)
18124 (home-page "https://github.com/miracle2k/python-glob2/")
18125 (synopsis "Extended Version of the python buildin glob module")
18126 (description "This is an extended version of the Python
18127 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18131 @item The ability to capture the text matched by glob patterns, and return
18132 those matches alongside the file names.
18133 @item A recursive @code{**} globbing syntax, akin for example to the
18134 @code{globstar} option of Bash.
18135 @item The ability to replace the file system functions used, in order to glob
18136 on virtual file systems.
18137 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18140 Glob2 currently based on the glob code from Python 3.3.1.")
18141 (license license:bsd-2)))
18143 (define-public python2-glob2
18144 (package-with-python2 python-glob2))
18146 (define-public python-gipc
18148 (name "python-gipc")
18153 (uri (pypi-uri "gipc" version ".zip"))
18156 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18157 (build-system python-build-system)
18159 `(("unzip" ,unzip)))
18161 `(("python-gevent" ,python-gevent)))
18162 (home-page "https://gehrcke.de/gipc/")
18163 (synopsis "Child process management in the context of gevent")
18164 (description "Usage of Python's multiprocessing package in a
18165 gevent-powered application may raise problems. With @code{gipc},
18166 process-based child processes can safely be created anywhere within a
18167 gevent-powered application.")
18168 (license license:expat)))
18170 (define-public python2-gipc
18171 (package-with-python2 python-gipc))
18173 (define-public python-fusepy
18175 (name "python-fusepy")
18180 (uri (pypi-uri "fusepy" version))
18183 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18184 (build-system python-build-system)
18187 (modify-phases %standard-phases
18188 (add-before 'build 'set-library-file-name
18189 (lambda* (#:key inputs #:allow-other-keys)
18190 (let ((fuse (assoc-ref inputs "fuse")))
18191 (substitute* "fuse.py"
18192 (("find_library\\('fuse'\\)")
18193 (string-append "'" fuse "/lib/libfuse.so'")))
18197 (home-page "https://github.com/fusepy/fusepy")
18198 (synopsis "Simple ctypes bindings for FUSE")
18199 (description "Python module that provides a simple interface to FUSE and
18200 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18201 (license license:isc)))
18203 (define-public python2-fusepy
18204 (package-with-python2 python-fusepy))
18206 (define-public python-fusepyng
18208 (name "python-fusepyng")
18213 (uri (pypi-uri "fusepyng" version))
18216 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18217 (build-system python-build-system)
18220 (modify-phases %standard-phases
18221 (add-after 'unpack 'set-libfuse-path
18222 (lambda* (#:key inputs #:allow-other-keys)
18223 (let ((fuse (assoc-ref inputs "fuse")))
18224 (substitute* "fusepyng.py"
18225 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18226 (string-append "\"" fuse "/lib/libfuse.so\""))))
18231 `(("python-paramiko" ,python-paramiko)))
18232 (home-page "https://github.com/rianhunter/fusepyng")
18233 (synopsis "Simple ctypes bindings for FUSE")
18234 (description "@code{fusepyng} is a Python module that provides a simple
18235 interface to FUSE on various operating systems. It's just one file and is
18236 implemented using @code{ctypes}.")
18237 (license license:isc)))
18239 (define-public python2-gdrivefs
18241 (name "python2-gdrivefs")
18246 (uri (pypi-uri "gdrivefs" version))
18249 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18250 (build-system python-build-system)
18252 `(#:python ,python-2
18254 (modify-phases %standard-phases
18255 (add-before 'build 'patch-setup-py
18257 ;; Update requirements from dependency==version
18258 ;; to dependency>=version
18259 (substitute* "gdrivefs/resources/requirements.txt"
18263 `(("python2-gipc" ,python2-gipc)
18264 ("python2-gevent" ,python2-gevent)
18265 ("python2-greenlet" ,python2-greenlet)
18266 ("python2-httplib2" ,python2-httplib2)
18267 ("python2-uritemplate" ,python2-uritemplate)
18268 ("python2-oauth2client" ,python2-oauth2client)
18269 ("python2-six" ,python2-six)))
18271 `(("python2-dateutil" ,python2-dateutil)
18272 ("python2-fusepy" ,python2-fusepy)
18273 ("python2-google-api-client" ,python2-google-api-client)))
18274 (home-page "https://github.com/dsoprea/GDriveFS")
18275 (synopsis "Mount Google Drive as a local file system")
18276 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18277 under Python 2.7.")
18278 (license license:gpl2)))
18280 (define-public python-userspacefs
18282 (name "python-userspacefs")
18287 (uri (pypi-uri "userspacefs" version))
18290 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18291 (build-system python-build-system)
18293 `(("python-fusepyng" ,python-fusepyng)))
18294 (home-page "https://github.com/rianhunter/userspacefs")
18295 (synopsis "User-space file systems for Python")
18297 "@code{userspacefs} is a library that allows you to easily write
18298 user-space file systems in Python.")
18299 (license license:gpl3+)))
18301 (define-public pybind11
18307 (uri (git-reference
18308 (url "https://github.com/pybind/pybind11")
18309 (commit (string-append "v" version))))
18312 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18313 (file-name (git-file-name name version))))
18314 (build-system cmake-build-system)
18316 `(("python" ,python-wrapper)
18318 ;; The following dependencies are used for tests.
18319 ("python-pytest" ,python-pytest)
18320 ("catch" ,catch-framework2-1)
18323 `(#:configure-flags
18324 (list (string-append "-DCATCH_INCLUDE_DIR="
18325 (assoc-ref %build-inputs "catch")
18328 #:phases (modify-phases %standard-phases
18329 (add-after 'install 'install-python
18330 (lambda* (#:key outputs #:allow-other-keys)
18331 (let ((out (assoc-ref outputs "out")))
18332 (with-directory-excursion "../source"
18333 (setenv "PYBIND11_USE_CMAKE" "yes")
18334 (invoke "python" "setup.py" "install"
18335 "--single-version-externally-managed"
18337 (string-append "--prefix=" out)))))))
18339 #:test-target "check"))
18340 (home-page "https://github.com/pybind/pybind11/")
18341 (synopsis "Seamless operability between C++11 and Python")
18343 "@code{pybind11} is a lightweight header-only library that exposes C++
18344 types in Python and vice versa, mainly to create Python bindings of existing
18345 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18346 library: to minimize boilerplate code in traditional extension modules by
18347 inferring type information using compile-time introspection.")
18348 (license license:bsd-3)))
18350 (define-public python-fasteners
18352 (name "python-fasteners")
18357 (uri (pypi-uri "fasteners" version))
18360 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18361 (build-system python-build-system)
18363 `(("python-monotonic" ,python-monotonic)
18364 ("python-six" ,python-six)))
18366 `(("python-testtools" ,python-testtools)))
18367 (home-page "https://github.com/harlowja/fasteners")
18368 (synopsis "Python package that provides useful locks")
18370 "This package provides a Python program that provides following locks:
18373 @item Locking decorator
18374 @item Reader-writer locks
18375 @item Inter-process locks
18376 @item Generic helpers
18378 (properties `((python2-variant . ,(delay python2-fasteners))))
18379 (license license:asl2.0)))
18381 (define-public python2-fasteners
18382 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18386 `(("python2-futures" ,python2-futures)
18387 ,@(package-propagated-inputs base))))))
18389 (define-public python-requests-file
18391 (name "python-requests-file")
18396 (uri (pypi-uri "requests-file" version))
18399 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18400 (build-system python-build-system)
18402 `(("python-requests" ,python-requests)
18403 ("python-six" ,python-six)))
18405 "https://github.com/dashea/requests-file")
18406 (synopsis "File transport adapter for Requests")
18408 "Requests-File is a transport adapter for use with the Requests Python
18409 library to allow local file system access via @code{file://} URLs.")
18410 (license license:asl2.0)))
18412 (define-public python2-requests-file
18413 (package-with-python2 python-requests-file))
18415 (define-public python-identify
18417 (name "python-identify")
18421 ;; There are no tests in the PyPI tarball.
18423 (uri (git-reference
18424 (url "https://github.com/chriskuehl/identify")
18425 (commit (string-append "v" version))))
18426 (file-name (git-file-name name version))
18428 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18429 (build-system python-build-system)
18432 (modify-phases %standard-phases
18435 (invoke "pytest" "-vv"))))))
18437 `(("python-coverage" ,python-coverage)
18438 ("python-pytest" ,python-pytest)))
18440 `(("python-editdistance" ,python-editdistance)))
18441 (home-page "https://github.com/chriskuehl/identify")
18442 (synopsis "File identification library for Python")
18444 "@code{identify} is a file identification library for Python. Given
18445 a file (or some information about a file), return a set of standardized tags
18446 identifying what the file is.")
18447 (license license:expat)))
18449 (define-public python-tldextract
18451 (name "python-tldextract")
18456 (uri (pypi-uri "tldextract" version))
18459 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18460 (build-system python-build-system)
18462 `(("python-pytest" ,python-pytest)
18463 ("python-responses" ,python-responses)))
18465 `(("python-idna" ,python-idna)
18466 ("python-requests" ,python-requests)
18467 ("python-requests-file" ,python-requests-file)))
18469 "https://github.com/john-kurkowski/tldextract")
18471 "Separate the TLD from the registered domain and subdomains of a URL")
18473 "TLDExtract accurately separates the TLD from the registered domain and
18474 subdomains of a URL, using the Public Suffix List. By default, this includes
18475 the public ICANN TLDs and their exceptions. It can optionally support the
18476 Public Suffix List's private domains as well.")
18477 (license license:bsd-3)))
18479 (define-public python2-tldextract
18480 (package-with-python2 python-tldextract))
18482 (define-public python-nodeenv
18484 (name "python-nodeenv")
18488 ;; There's no tarball in PyPI.
18490 (uri (git-reference
18491 (url "https://github.com/ekalinin/nodeenv")
18493 (file-name (git-file-name name version))
18495 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18496 (build-system python-build-system)
18499 (modify-phases %standard-phases
18502 ;; This test fails. It tries to open a network socket.
18503 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18505 `(("python-coverage" ,python-coverage)
18506 ("python-mock" ,python-mock)
18507 ("python-pytest" ,python-pytest)))
18508 (home-page "https://ekalinin.github.io/nodeenv/")
18509 (synopsis "Create isolated node.js environments")
18511 "Nodeenv (node.js virtual environment) is a tool to create isolated
18512 node.js environments. It creates an environment that has its own installation
18513 directories, that doesn't share libraries with other node.js virtual
18515 (license license:bsd-3)))
18517 (define-public python-pynamecheap
18519 (name "python-pynamecheap")
18524 (uri (pypi-uri "PyNamecheap" version))
18527 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18528 (build-system python-build-system)
18530 `(("python-requests" ,python-requests)))
18532 "https://github.com/Bemmu/PyNamecheap")
18534 "Namecheap API client in Python")
18536 "PyNamecheap is a Namecheap API client in Python.")
18537 (license license:expat)))
18539 (define-public python2-pynamecheap
18540 (package-with-python2 python-pynamecheap))
18542 (define-public python-dns-lexicon
18544 (name "python-dns-lexicon")
18549 (uri (pypi-uri "dns-lexicon" version))
18552 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18553 (build-system python-build-system)
18555 `(#:tests? #f)) ;requires internet access
18557 `(("python-future" ,python-future)
18558 ("python-pynamecheap" ,python-pynamecheap)
18559 ("python-requests" ,python-requests)
18560 ("python-tldextract" ,python-tldextract)
18561 ("python-urllib3" ,python-urllib3)))
18562 (home-page "https://github.com/AnalogJ/lexicon")
18564 "Manipulate DNS records on various DNS providers")
18566 "Lexicon provides a way to manipulate DNS records on multiple DNS
18567 providers in a standardized way. It has a CLI but it can also be used as a
18568 Python library. It was designed to be used in automation, specifically with
18570 (license license:expat)))
18572 (define-public python2-dns-lexicon
18573 (package-with-python2 python-dns-lexicon))
18575 (define-public python-cfgv
18577 (name "python-cfgv")
18581 ;; There are no tests in the PyPI tarball.
18583 (uri (git-reference
18584 (url "https://github.com/asottile/cfgv")
18585 (commit (string-append "v" version))))
18586 (file-name (git-file-name name version))
18588 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
18589 (build-system python-build-system)
18592 (modify-phases %standard-phases
18595 (invoke "pytest" "-vv"))))))
18597 `(("python-covdefaults" ,python-covdefaults)
18598 ("python-coverage" ,python-coverage)
18599 ("python-pytest" ,python-pytest)))
18600 (home-page "https://github.com/asottile/cfgv")
18601 (synopsis "Configuration validation library")
18603 "This library helps to validate configuration files and produce human
18604 readable error messages.")
18605 (license license:expat)))
18607 (define-public python-commandlines
18609 (name "python-commandlines")
18614 (uri (pypi-uri "commandlines" version))
18617 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
18618 (build-system python-build-system)
18619 (home-page "https://github.com/chrissimpkins/commandlines")
18620 (synopsis "Command line argument to object parsing library")
18622 "@code{Commandlines} is a Python library for command line application
18623 development that supports command line argument parsing, command string
18624 validation testing and application logic.")
18625 (license license:expat)))
18627 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
18628 ;; python-numba. They have a very unflexible relationship.
18629 (define-public python-numba
18631 (name "python-numba")
18636 (uri (pypi-uri "numba" version))
18639 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
18640 (build-system python-build-system)
18642 `(#:modules ((guix build utils)
18643 (guix build python-build-system)
18648 (modify-phases %standard-phases
18649 (add-after 'unpack 'disable-proprietary-features
18651 (setenv "NUMBA_DISABLE_HSA" "1")
18652 (setenv "NUMBA_DISABLE_CUDA" "1")
18654 (add-after 'unpack 'remove-failing-tests
18656 ;; FIXME: These tests fail for unknown reasons:
18657 ;; test_non_writable_pycache, test_non_creatable_pycache, and
18658 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
18659 (substitute* "numba/tests/test_dispatcher.py"
18660 (("def test(_non_writable_pycache)" _ m)
18661 (string-append "def guix_skip" m))
18662 (("def test(_non_creatable_pycache)" _ m)
18663 (string-append "def guix_skip" m))
18664 (("def test(_frozen)" _ m)
18665 (string-append "def guix_skip" m)))
18667 ;; These tests fail because we don't run the tests from the build
18668 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
18669 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
18670 (substitute* "numba/tests/test_pycc.py"
18671 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
18672 (string-append "def guix_skip" m)))
18674 ;; These tests fail because our version of Python does not have
18675 ;; a recognizable front-end for the Numba distribution to use
18676 ;; to check against.
18677 (substitute* "numba/tests/test_entrypoints.py"
18678 (("def test(_init_entrypoint)" _ m)
18679 (string-append "def guix_skip" m)))
18680 (substitute* "numba/tests/test_jitclasses.py"
18681 (("def test(_jitclass_longlabel_not_truncated)" _ m)
18682 (string-append "def guix_skip" m)))
18686 (let ((cwd (getcwd)))
18687 (setenv "PYTHONPATH"
18688 (string-append cwd "/build/"
18689 (find (cut string-prefix? "lib" <>)
18690 (scandir (string-append cwd "/build")))
18692 (getenv "PYTHONPATH")))
18693 ;; Something is wrong with the PYTHONPATH when running the
18694 ;; tests from the build directory, as it complains about not being
18695 ;; able to import certain modules.
18696 (with-directory-excursion "/tmp"
18697 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
18700 `(("python-llvmlite" ,python-llvmlite)
18701 ("python-numpy" ,python-numpy)
18702 ("python-singledispatch" ,python-singledispatch)))
18703 ;; Needed for tests.
18705 `(("python-jinja2" ,python-jinja2)
18706 ("python-pygments" ,python-pygments)))
18707 (home-page "https://numba.pydata.org")
18708 (synopsis "Compile Python code using LLVM")
18709 (description "Numba gives you the power to speed up your applications with
18710 high performance functions written directly in Python. With a few
18711 annotations, array-oriented and math-heavy Python code can be just-in-time
18712 compiled to native machine instructions, similar in performance to C, C++ and
18713 Fortran, without having to switch languages or Python interpreters.
18715 Numba works by generating optimized machine code using the LLVM compiler
18716 infrastructure at import time, runtime, or statically (using the included pycc
18718 (license license:bsd-3)))
18720 (define-public python-numcodecs
18722 (name "python-numcodecs")
18727 (uri (pypi-uri "numcodecs" version))
18730 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
18731 (build-system python-build-system)
18733 `(("python-numpy" ,python-numpy)
18734 ("python-msgpack" ,python-msgpack)))
18736 `(("python-pytest" ,python-pytest)
18737 ("python-setuptools-scm" ,python-setuptools-scm)))
18738 (home-page "https://github.com/zarr-developers/numcodecs")
18739 (synopsis "Buffer compression and transformation codecs")
18741 "This Python package provides buffer compression and transformation
18742 codecs for use in data storage and communication applications.")
18743 (license license:expat)))
18745 (define-public python-asciitree
18747 (name "python-asciitree")
18752 (uri (pypi-uri "asciitree" version))
18755 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
18756 (build-system python-build-system)
18757 (home-page "https://github.com/mbr/asciitree")
18758 (synopsis "Draws ASCII trees")
18759 (description "This package draws tree structures using characters.")
18760 (license license:expat)))
18762 (define-public python-zarr
18764 (name "python-zarr")
18769 (uri (pypi-uri "zarr" version))
18772 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
18773 (build-system python-build-system)
18776 (modify-phases %standard-phases
18777 (add-after 'unpack 'disable-service-tests
18779 (setenv "ZARR_TEST_ABS" "0")
18780 (setenv "ZARR_TEST_MONGO" "0")
18781 (setenv "ZARR_TEST_REDIS" "0")
18785 (invoke "pytest" "-vv" "-k" "not lmdb")
18788 `(("python-asciitree" ,python-asciitree)
18789 ("python-fasteners" ,python-fasteners)
18790 ("python-numcodecs" ,python-numcodecs)
18791 ("python-numpy" ,python-numpy)))
18793 `(("python-pytest" ,python-pytest)
18794 ("python-setuptools-scm" ,python-setuptools-scm)))
18795 (home-page "https://github.com/zarr-developers/zarr-python")
18796 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
18798 "This package provides an implementation of chunked, compressed,
18799 N-dimensional arrays for Python.")
18800 (license license:expat)))
18802 (define-public python-anndata
18804 (name "python-anndata")
18809 (uri (pypi-uri "anndata" version))
18812 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
18813 (build-system python-build-system)
18816 (modify-phases %standard-phases
18817 (add-after 'unpack 'delete-inconvenient-tests
18819 ;; This test depends on python-scikit-learn.
18820 (delete-file "anndata/tests/test_inplace_subset.py")
18823 (add-after 'install 'check
18824 (lambda* (#:key inputs outputs #:allow-other-keys)
18825 (add-installed-pythonpath inputs outputs)
18826 (invoke "pytest" "-vv"))))))
18828 `(("python-h5py" ,python-h5py)
18829 ("python-importlib-metadata" ,python-importlib-metadata)
18830 ("python-natsort" ,python-natsort)
18831 ("python-numcodecs" ,python-numcodecs)
18832 ("python-packaging" ,python-packaging)
18833 ("python-pandas" ,python-pandas)
18834 ("python-scipy" ,python-scipy)
18835 ("python-zarr" ,python-zarr)))
18837 `(("python-joblib" ,python-joblib)
18838 ("python-pytest" ,python-pytest)
18839 ("python-setuptools-scm" ,python-setuptools-scm)))
18840 (home-page "https://github.com/theislab/anndata")
18841 (synopsis "Annotated data for data analysis pipelines")
18842 (description "Anndata is a package for simple (functional) high-level APIs
18843 for data analysis pipelines. In this context, it provides an efficient,
18844 scalable way of keeping track of data together with learned annotations and
18845 reduces the code overhead typically encountered when using a mostly
18846 object-oriented library such as @code{scikit-learn}.")
18847 (license license:bsd-3)))
18849 (define-public python-dill
18851 (name "python-dill")
18852 (version "0.3.1.1")
18856 (uri (pypi-uri "dill" version))
18858 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
18859 (build-system python-build-system)
18862 (modify-phases %standard-phases
18865 (with-directory-excursion "/tmp"
18866 (invoke "nosetests" "-v"))
18869 `(("python-nose" ,python-nose)))
18870 (home-page "https://pypi.org/project/dill/")
18871 (synopsis "Serialize all of Python")
18872 (description "Dill extends Python's @code{pickle} module for serializing
18873 and de-serializing Python objects to the majority of the built-in Python
18874 types. Dill provides the user the same interface as the @code{pickle} module,
18875 and also includes some additional features. In addition to pickling Python
18876 objects, @code{dill} provides the ability to save the state of an interpreter
18877 session in a single command. Hence, it would be feasible to save a
18878 interpreter session, close the interpreter, ship the pickled file to another
18879 computer, open a new interpreter, unpickle the session and thus continue from
18880 the saved state of the original interpreter session.")
18881 (license license:bsd-3)))
18883 (define-public python-multiprocess
18885 (name "python-multiprocess")
18890 (uri (pypi-uri "multiprocess" version))
18893 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
18894 (build-system python-build-system)
18897 (modify-phases %standard-phases
18898 (add-after 'unpack 'disable-broken-tests
18900 ;; This test is broken as there is no keyboard interrupt.
18901 (substitute* "py3.7/multiprocess/tests/__init__.py"
18902 (("^(.*)def test_wait_result"
18904 (string-append indent
18905 "@unittest.skip(\"Disabled by Guix\")\n"
18908 ;; Tests must be run after installation.
18910 (add-after 'install 'check
18911 (lambda* (#:key inputs outputs #:allow-other-keys)
18912 (add-installed-pythonpath inputs outputs)
18913 (invoke "python" "-m" "multiprocess.tests")
18916 `(("python-dill" ,python-dill)))
18917 (home-page "https://pypi.org/project/multiprocess/")
18918 (synopsis "Multiprocessing and multithreading in Python")
18920 "This package is a fork of the multiprocessing Python package, a package
18921 which supports the spawning of processes using the API of the standard
18922 library's @code{threading} module.")
18923 (license license:bsd-3)))
18925 (define-public python-toolz
18927 (name "python-toolz")
18932 (uri (pypi-uri "toolz" version))
18935 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
18936 (build-system python-build-system)
18937 ;; FIXME: tests cannot be computed: "Can't perform this operation for
18938 ;; unregistered loader type"
18939 (arguments '(#:tests? #f))
18940 (home-page "https://github.com/pytoolz/toolz/")
18941 (synopsis "List processing tools and functional utilities")
18943 "This package provides a set of utility functions for iterators,
18944 functions, and dictionaries.")
18945 (license license:bsd-3)))
18947 (define-public python2-toolz
18948 (package-with-python2 python-toolz))
18950 (define-public python-cytoolz
18952 (name "python-cytoolz")
18953 (version "0.9.0.1")
18957 (uri (pypi-uri "cytoolz" version))
18960 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
18961 (build-system python-build-system)
18962 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
18964 (arguments '(#:tests? #f))
18966 `(("python-toolz" ,python-toolz)))
18968 `(("python-cython" ,python-cython)))
18969 (home-page "https://github.com/pytoolz/cytoolz")
18970 (synopsis "High performance functional utilities")
18972 "The cytoolz package implements the same API as provided by toolz. The
18973 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
18974 that is accessible to other projects developed in Cython.")
18975 (license license:bsd-3)))
18977 (define-public python-sortedcontainers
18979 (name "python-sortedcontainers")
18984 (uri (pypi-uri "sortedcontainers" version))
18987 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
18988 (build-system python-build-system)
18990 ;; FIXME: Tests require many extra dependencies, and would introduce
18991 ;; a circular dependency on hypothesis, which uses this package.
18994 `(("python-appdirs" ,python-appdirs)
18995 ("python-distlib" ,python-distlib)
18996 ("python-filelock" ,python-filelock)
18997 ("python-six" ,python-six-bootstrap)))
18998 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
18999 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19001 "This package provides a sorted collections library, written in
19003 (license license:asl2.0)))
19005 (define-public python2-sortedcontainers
19006 (package-with-python2 python-sortedcontainers))
19008 (define-public python-cloudpickle
19010 (name "python-cloudpickle")
19015 (uri (pypi-uri "cloudpickle" version))
19018 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19019 (build-system python-build-system)
19021 '(#:phases (modify-phases %standard-phases
19022 (add-before 'check 'do-not-override-PYTHONPATH
19024 ;; Append to PYTHONPATH instead of overriding it so
19025 ;; that dependencies from Guix can be found.
19026 (substitute* "tests/testutils.py"
19027 (("env\\['PYTHONPATH'\\] = pythonpath")
19028 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19031 (lambda* (#:key tests? #:allow-other-keys)
19033 (invoke "pytest" "-s" "-vv")
19034 (format #t "test suite not run~%"))
19038 ("python-psutil" ,python-psutil)
19039 ("python-pytest" ,python-pytest)
19040 ("python-tornado" ,python-tornado)))
19041 (home-page "https://github.com/cloudpipe/cloudpickle")
19042 (synopsis "Extended pickling support for Python objects")
19044 "Cloudpickle makes it possible to serialize Python constructs not
19045 supported by the default pickle module from the Python standard library. It
19046 is especially useful for cluster computing where Python expressions are
19047 shipped over the network to execute on remote hosts, possibly close to the
19049 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19050 (license license:bsd-3)))
19052 (define-public python2-cloudpickle
19053 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19057 `(("python-mock" ,python2-mock)
19058 ,@(package-native-inputs base)))
19060 `(("python-futures" ,python2-futures)
19061 ,@(package-propagated-inputs base))))))
19063 (define-public python-locket
19065 (name "python-locket")
19070 (uri (pypi-uri "locket" version))
19073 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19074 (build-system python-build-system)
19075 (home-page "https://github.com/mwilliamson/locket.py")
19076 (synopsis "File-based locks for Python")
19078 "Locket implements a lock that can be used by multiple processes provided
19079 they use the same path.")
19080 (license license:bsd-2)))
19082 (define-public python2-locket
19083 (package-with-python2 python-locket))
19085 (define-public python-blosc
19087 (name "python-blosc")
19092 (uri (pypi-uri "blosc" version))
19095 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19096 (build-system python-build-system)
19097 ;; FIXME: all tests pass, but then this error is printed:
19098 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19099 (arguments '(#:tests? #f))
19101 `(("python-numpy" ,python-numpy)))
19102 (home-page "https://github.com/blosc/python-blosc")
19103 (synopsis "Python wrapper for the Blosc data compressor library")
19104 (description "Blosc is a high performance compressor optimized for binary
19105 data. It has been designed to transmit data to the processor cache faster
19106 than the traditional, non-compressed, direct memory fetch approach via a
19107 @code{memcpy()} system call.
19109 Blosc works well for compressing numerical arrays that contains data with
19110 relatively low entropy, like sparse data, time series, grids with
19111 regular-spaced values, etc.
19113 This Python package wraps the Blosc library.")
19114 (license license:bsd-3)))
19116 (define-public python2-blosc
19117 (package-with-python2 python-blosc))
19119 (define-public python-partd
19121 (name "python-partd")
19126 (uri (pypi-uri "partd" version))
19129 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19130 (build-system python-build-system)
19132 `(("python-blosc" ,python-blosc)
19133 ("python-locket" ,python-locket)
19134 ("python-numpy" ,python-numpy)
19135 ("python-pandas" ,python-pandas)
19136 ("python-pyzmq" ,python-pyzmq)
19137 ("python-toolz" ,python-toolz)))
19138 (home-page "https://github.com/dask/partd/")
19139 (synopsis "Appendable key-value storage")
19140 (description "Partd stores key-value pairs. Values are raw bytes. We
19141 append on old values. Partd excels at shuffling operations.")
19142 (license license:bsd-3)))
19144 (define-public python2-partd
19145 (package-with-python2 python-partd))
19147 (define-public python-fsspec
19149 (name "python-fsspec")
19154 (uri (pypi-uri "fsspec" version))
19157 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19158 (build-system python-build-system)
19159 (arguments '(#:tests? #f)) ; there are none
19160 (home-page "https://github.com/intake/filesystem_spec")
19161 (synopsis "File-system specification")
19162 (description "The purpose of this package is to produce a template or
19163 specification for a file-system interface, that specific implementations
19164 should follow, so that applications making use of them can rely on a common
19165 behavior and not have to worry about the specific internal implementation
19166 decisions with any given backend.")
19167 (license license:bsd-3)))
19169 (define-public python-dask
19171 (name "python-dask")
19176 (uri (pypi-uri "dask" version))
19178 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19179 (build-system python-build-system)
19182 (modify-phases %standard-phases
19183 (add-after 'unpack 'disable-broken-tests
19185 ;; This test is marked as xfail when pytest-xdist is used.
19186 (substitute* "dask/tests/test_threaded.py"
19187 (("def test_interrupt\\(\\)" m)
19188 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19190 ;; This one fails with a type error:
19191 ;; TypeError: Already tz-aware, use tz_convert to convert.
19192 (substitute* "dask/dataframe/tests/test_shuffle.py"
19193 (("def test_set_index_timestamp\\(\\)" m)
19194 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19198 (lambda _ (invoke "pytest" "-vv"))))))
19200 `(("python-cloudpickle" ,python-cloudpickle)
19201 ("python-fsspec" ,python-fsspec)
19202 ("python-numpy" ,python-numpy)
19203 ("python-packaging" ,python-packaging)
19204 ("python-pandas" ,python-pandas)
19205 ("python-partd" ,python-partd)
19206 ("python-toolz" ,python-toolz)
19207 ("python-pyyaml" ,python-pyyaml)))
19209 `(("python-pytest" ,python-pytest)
19210 ("python-pytest-runner" ,python-pytest-runner)))
19211 (home-page "https://github.com/dask/dask/")
19212 (synopsis "Parallel computing with task scheduling")
19214 "Dask is a flexible parallel computing library for analytics. It
19215 consists of two components: dynamic task scheduling optimized for computation,
19216 and large data collections like parallel arrays, dataframes, and lists that
19217 extend common interfaces like NumPy, Pandas, or Python iterators to
19218 larger-than-memory or distributed environments. These parallel collections
19219 run on top of the dynamic task schedulers. ")
19220 (license license:bsd-3)))
19222 (define-public python-ilinkedlist
19224 (name "python-ilinkedlist")
19229 (uri (pypi-uri "ilinkedlist" version))
19232 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19233 (build-system python-build-system)
19234 (native-inputs `(("python-pytest" ,python-pytest)))
19235 (inputs `(("python" ,python)))
19236 (home-page "https://github.com/luther9/ilinkedlist-py")
19237 (synopsis "Immutable linked list library")
19239 "This is a implementation of immutable linked lists for Python. It
19240 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19241 Since a linked list is treated as immutable, it is hashable, and its length
19242 can be retrieved in constant time. Some of the terminology is inspired by
19243 LISP. It is possible to create an improper list by creating a @code{Pair}
19244 with a non-list @code{cdr}.")
19245 (license license:gpl3+)))
19247 (define-public python-readlike
19249 (name "python-readlike")
19254 (uri (pypi-uri "readlike" version))
19256 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19257 (build-system python-build-system)
19258 (home-page "https://github.com/jangler/readlike")
19259 (synopsis "GNU Readline-like line editing module")
19261 "This Python module provides line editing functions similar to the default
19262 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19263 @code{readline} package, this one allows access to those capabilities in settings
19264 outside of a standard command-line interface. It is especially well-suited to
19265 interfacing with Urwid, due to a shared syntax for describing key inputs.
19267 Currently, all stateless Readline commands are implemented. Yanking and history
19268 are not supported.")
19269 (license license:expat)))
19271 (define-public python2-readlike
19272 (package-with-python2 python-readlike))
19274 (define-public python-reparser
19276 (name "python-reparser")
19281 (uri (pypi-uri "ReParser" version))
19283 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19284 (build-system python-build-system)
19285 (home-page "https://github.com/xmikos/reparser")
19286 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19288 "This Python library provides a simple lexer/parser for inline markup based
19289 on regular expressions.")
19290 (license license:expat)))
19292 (define-public python2-reparser
19293 (let ((reparser (package-with-python2
19294 (strip-python2-variant python-reparser))))
19295 (package (inherit reparser)
19297 `(("python2-enum34" ,python2-enum34)
19298 ,@(package-propagated-inputs reparser))))))
19300 (define-public python-retrying
19302 (name "python-retrying")
19307 (uri (git-reference
19308 (url "https://github.com/rholder/retrying")
19309 (commit (string-append "v" version))))
19310 (file-name (git-file-name name version))
19313 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19314 (build-system python-build-system)
19316 `(("python-six" ,python-six)))
19317 (home-page "https://github.com/rholder/retrying")
19318 (synopsis "Library for adding retry behavior")
19319 (description "Retrying is a general-purpose retrying library to simplify
19320 the task of adding retry behavior to just about anything.
19325 @item Generic Decorator API.
19326 @item Specify stop condition (i.e. limit by number of attempts).
19327 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19328 @item Customize retrying on Exceptions.
19329 @item Customize retrying on expected returned result.
19331 (license license:asl2.0)))
19333 (define-public python-precis-i18n
19335 (name "python-precis-i18n")
19340 (uri (pypi-uri "precis_i18n" version))
19343 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19344 (build-system python-build-system)
19345 (home-page "https://github.com/byllyfish/precis_i18n")
19346 (synopsis "Implementation of the PRECIS framework")
19348 "This module implements the PRECIS Framework as described in RFC 8264,
19349 RFC 8265 and RFC 8266.")
19350 (license license:expat)))
19352 (define-public python-absl-py
19354 (name "python-absl-py")
19359 (uri (pypi-uri "absl-py" version))
19362 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19363 (build-system python-build-system)
19365 `(("python-six" ,python-six)))
19366 (home-page "https://github.com/abseil/abseil-py")
19367 (synopsis "Abseil Python common libraries")
19369 "This package provides the Abseil Python Common Libraries, a collection
19370 of Python libraries for building Python applications.")
19371 (license license:asl2.0)))
19373 (define-public python-astor
19375 (name "python-astor")
19380 (uri (pypi-uri "astor" version))
19383 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19384 (build-system python-build-system)
19385 ;; FIXME: There are two errors and two test failures.
19386 (arguments `(#:tests? #f))
19387 (home-page "https://github.com/berkerpeksag/astor")
19388 (synopsis "Read and write Python ASTs")
19389 (description "Astor is designed to allow easy manipulation of Python
19390 source via the Abstract Syntax Tree.")
19391 (license license:bsd-3)))
19393 (define-public python2-astor
19394 (package-with-python2 python-astor))
19396 (define-public python-astunparse
19398 (name "python-astunparse")
19403 (uri (pypi-uri "astunparse" version))
19405 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19406 (build-system python-build-system)
19407 (arguments '(#:tests? #f)) ; there are none
19409 `(("python-six" ,python-six)
19410 ("python-wheel" ,python-wheel)))
19411 (home-page "https://github.com/simonpercivall/astunparse")
19412 (synopsis "AST unparser for Python")
19413 (description "This package provides an AST unparser for Python. It is a
19414 factored out version of @code{unparse} found in the Python source
19416 (license license:bsd-3)))
19418 (define-public python-gast
19420 (name "python-gast")
19425 (uri (pypi-uri "gast" version))
19427 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19428 (build-system python-build-system)
19430 `(("python-astunparse" ,python-astunparse)))
19431 (home-page "https://pypi.org/project/gast/")
19432 (synopsis "Generic Python AST that abstracts the underlying Python version")
19434 "GAST provides a compatibility layer between the AST of various Python
19435 versions, as produced by @code{ast.parse} from the standard @code{ast}
19437 (license license:bsd-3)))
19439 (define-public python-wikidata
19441 (name "python-wikidata")
19446 (uri (pypi-uri "Wikidata" version))
19449 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19450 (build-system python-build-system)
19452 `(("python-babel" ,python-babel)))
19453 (home-page "https://github.com/dahlia/wikidata")
19454 (synopsis "Wikidata client library")
19456 "This package provides a Python interface to
19457 @url{https://www.wikidata.org/, Wikidata}.")
19458 (properties '((upstream-name . "Wikidata")))
19459 (license license:gpl3+)))
19461 (define-public python-doctest-ignore-unicode
19463 (name "python-doctest-ignore-unicode")
19468 (uri (pypi-uri "doctest-ignore-unicode" version))
19471 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19472 (build-system python-build-system)
19474 `(("python-nose" ,python-nose)))
19475 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19476 (synopsis "Ignore Unicode literal prefixes in doctests")
19478 "This package adds support for a flag to ignore Unicode literal prefixes
19480 (license license:asl2.0)))
19482 (define-public python-attr
19484 (name "python-attr")
19489 (uri (pypi-uri "attr" version))
19492 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19493 (build-system python-build-system)
19494 (home-page "https://github.com/denis-ryzhkov/attr")
19495 (synopsis "Decorator for attributes of target function or class")
19496 (description "Simple decorator to set attributes of target function or
19497 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19498 (license license:expat)))
19500 (define-public python-construct
19502 (name "python-construct")
19503 (version "2.10.56")
19507 (uri (pypi-uri "construct" version))
19510 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19511 (build-system python-build-system)
19513 `(#:tests? #f)) ; No tests exist.
19515 `(("python-extras" ,python-extras)
19516 ("python-arrow" ,python-arrow)
19517 ("python-numpy" ,python-numpy)
19518 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19519 (home-page "https://construct.readthedocs.io")
19520 (synopsis "Declarative and symmetrical parser and builder for binary data")
19522 "This package provides both simple, atomic constructs (such as
19523 integers of various sizes), as well as composite ones which allow you
19524 form hierarchical and sequential structures of increasing complexity.
19525 It features bit and byte granularity, easy debugging and testing, an
19526 easy-to-extend subclass system, and lots of primitive constructs to
19527 make your work easier.")
19528 (license license:expat)))
19530 (define-public python-outcome
19532 (name "python-outcome")
19537 (uri (pypi-uri "outcome" version))
19539 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19540 (build-system python-build-system)
19543 (modify-phases %standard-phases
19545 (lambda* (#:key inputs outputs #:allow-other-keys)
19546 (add-installed-pythonpath inputs outputs)
19547 (invoke "pytest" "-vv"))))))
19549 `(("python-pytest" ,python-pytest)
19550 ("python-pytest-cov" ,python-pytest-cov)
19551 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19553 `(("python-async-generator" ,python-async-generator)
19554 ("python-attrs" ,python-attrs)))
19555 (home-page "https://github.com/python-trio/outcome")
19556 (synopsis "Capture the outcome of Python function calls")
19558 "Capture the outcome of Python function calls. Extracted from the Trio
19560 ;; Either license applies.
19561 (license (list license:expat license:asl2.0))))
19563 (define-public python-trio
19565 (name "python-trio")
19570 (uri (pypi-uri "trio" version))
19572 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
19573 (build-system python-build-system)
19576 (modify-phases %standard-phases
19577 (add-before 'check 'change-home
19579 ;; Tests require a writable home.
19580 (setenv "HOME" "/tmp")
19584 (invoke "pytest" "-vv" "-k"
19586 ;; This test times out.
19587 "not test_ki_protection_works"
19588 ;; Assertion errors.
19589 " and not test_guest_mode_ki"
19590 " and not test_run_in_trio_thread_ki"
19591 ;; These try to raise KeyboardInterrupt which does not work
19592 ;; in the build environment.
19593 " and not test_ki_self"
19594 " and not test_ki_wakes_us_up"
19595 ;; Failure in name resolution.
19596 " and not test_getnameinfo"
19597 " and not test_SocketType_resolve"
19598 ;; OSError: protocol not found.
19599 " and not test_getprotobyname")))))))
19601 `(("python-astor" ,python-astor)
19602 ("python-ipython" ,python-ipython)
19603 ("python-jedi" ,python-jedi)
19604 ("python-pylint" ,python-pylint)
19605 ("python-pyopenssl" ,python-pyopenssl)
19606 ("python-pytest" ,python-pytest)
19607 ("python-pytest-cov" ,python-pytest-cov)
19608 ("python-trustme" ,python-trustme)))
19610 `(("python-attrs" ,python-attrs)
19611 ("python-idna" ,python-idna)
19612 ("python-outcome" ,python-outcome)
19613 ("python-sniffio" ,python-sniffio)
19614 ("python-sortedcontainers"
19615 ,python-sortedcontainers)))
19616 (home-page "https://github.com/python-trio/trio")
19617 (synopsis "Friendly Python library for async concurrency and I/O")
19619 "Trio strives to be a production-quality, async/await-native I/O library
19620 for Python. Like all async libraries, its main purpose is to help you write
19621 programs that do multiple things at the same time with parallelized I/O.")
19622 ;; Either license applies.
19623 (license (list license:expat license:asl2.0))))
19625 (define-public python-trio-typing
19627 (name "python-trio-typing")
19632 (uri (pypi-uri "trio-typing" version))
19634 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
19635 (build-system python-build-system)
19638 (modify-phases %standard-phases
19641 (invoke "pytest" "-vv"))))))
19643 `(("python-attrs" ,python-attrs)
19644 ("python-pytest" ,python-pytest)))
19646 `(("python-mypy" ,python-mypy)
19647 ("python-mypy-extensions"
19648 ,python-mypy-extensions)
19649 ("python-trio" ,python-trio)
19650 ("python-typing-extensions"
19651 ,python-typing-extensions)))
19652 (home-page "https://github.com/python-trio/trio-typing")
19653 (synopsis "Static type checking support for Trio and related projects")
19655 "This package provides:
19658 @item PEP 561 typing stubs packages for the Trio project packages:
19661 @item trio (@code{trio-stubs})
19662 @item outcome (@code{outcome-stubs})
19663 @item async_generator (@code{async_generator-stubs})
19666 @item A package @code{trio_typing} containing types that Trio programs often
19667 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
19668 a mypy plugin that smooths over some limitations in the basic type hints.
19670 ;; Either license applies.
19671 (license (list license:expat license:asl2.0))))
19673 (define-public python-humanize
19675 (name "python-humanize")
19680 (uri (pypi-uri "humanize" version))
19683 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
19685 '(#:tests? #f)) ; tests not in pypi archive
19686 (build-system python-build-system)
19687 (home-page "https://github.com/jmoiron/humanize")
19688 (synopsis "Print numerical information in a human-readable form")
19689 (description "This package provides a Python module that displays numbers
19690 and dates in \"human readable\" forms. For example, it would display
19691 \"12345591313\" as \"12.3 billion\".")
19692 (license license:expat)))
19694 (define-public python-txaio
19696 (name "python-txaio")
19701 (uri (pypi-uri "txaio" version))
19704 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
19705 (build-system python-build-system)
19707 `(("python-twisted" ,python-twisted)
19708 ("python-six" ,python-six)))
19709 (home-page "https://github.com/crossbario/txaio")
19710 (synopsis "Compatibility layer between Python asyncio and Twisted")
19711 (description "Txaio provides a compatibility layer between the Python
19712 @code{asyncio} module and @code{Twisted}.")
19713 (license license:expat)))
19715 (define-public python-toolshed
19717 (name "python-toolshed")
19722 (uri (pypi-uri "toolshed" version))
19725 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
19726 (build-system python-build-system)
19728 `(("python-nose" ,python-nose)))
19729 (home-page "https://github.com/brentp/toolshed/")
19730 (synopsis "Collection of modules and functions for working with data")
19731 (description "This is a collection of well-tested, simple modules and
19732 functions that aim to reduce boilerplate when working with data.")
19733 (license license:bsd-2)))
19735 (define-public python-annoy
19737 (name "python-annoy")
19742 (uri (pypi-uri "annoy" version))
19745 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
19746 (build-system python-build-system)
19748 `(("python-nose" ,python-nose)))
19749 (home-page "https://github.com/spotify/annoy/")
19750 (synopsis "Approximate nearest neighbors library")
19752 "Annoy is a C++ library with Python bindings to search for points in
19753 space that are close to a given query point. It also creates large read-only
19754 file-based data structures that are @code{mmap}ped into memory so that many
19755 processes may share the same data.")
19756 (license license:asl2.0)))
19758 (define-public python-croniter
19760 (name "python-croniter")
19764 (uri (pypi-uri "croniter" version))
19767 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
19768 (build-system python-build-system)
19770 `(("python-dateutil" ,python-dateutil)
19771 ("python-natsort" ,python-natsort)))
19772 (home-page "https://github.com/kiorky/croniter")
19773 (synopsis "Iterate datetime objects with cron-like syntax")
19775 "@code{croniter} provides iteration for datetime object with cron-like
19777 (license license:expat)))
19779 (define-public python-pylzma
19781 (name "python-pylzma")
19786 (uri (pypi-uri "pylzma" version))
19789 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
19790 (build-system python-build-system)
19791 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
19792 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
19793 (description "This package provides Python bindings for the LZMA library
19795 (license license:lgpl2.1+)))
19797 (define-public python2-pylzma
19798 (package-with-python2 python-pylzma))
19800 (define-public python2-zeroconf
19802 (name "python2-zeroconf")
19804 ;; This is the last version that supports Python 2.x.
19809 (uri (pypi-uri "zeroconf" version))
19812 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
19813 (build-system python-build-system)
19815 `(#:python ,python-2
19817 (modify-phases %standard-phases
19818 (add-after 'unpack 'patch-requires
19819 (lambda* (#:key inputs #:allow-other-keys)
19820 (substitute* "setup.py"
19825 `(("python2-six" ,python2-six)
19826 ("python2-enum32" ,python2-enum34)
19827 ("python2-netifaces" ,python2-netifaces)
19828 ("python2-typing" ,python2-typing)))
19829 (home-page "https://github.com/jstasiak/python-zeroconf")
19830 (synopsis "Pure Python mDNS service discovery")
19832 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
19834 (license license:lgpl2.1+)))
19836 (define-public python-bsddb3
19838 (name "python-bsddb3")
19843 (uri (pypi-uri "bsddb3" version))
19846 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
19847 (build-system python-build-system)
19852 (modify-phases %standard-phases
19853 (add-after 'unpack 'configure-locations
19854 (lambda* (#:key inputs #:allow-other-keys)
19855 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
19856 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
19860 (invoke "python3" "test3.py" "-v"))))))
19861 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
19862 (synopsis "Python bindings for Oracle Berkeley DB")
19864 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
19865 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
19866 Transaction objects, and each of these is exposed as a Python type in the
19867 bsddb3.db module. The database objects can use various access methods: btree,
19868 hash, recno, and queue. Complete support of Berkeley DB distributed
19869 transactions. Complete support for Berkeley DB Replication Manager.
19870 Complete support for Berkeley DB Base Replication. Support for RPC.")
19871 (license license:bsd-3)))
19873 (define-public python-dbfread
19875 (name "python-dbfread")
19879 (uri (pypi-uri "dbfread" version))
19882 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
19883 (build-system python-build-system)
19885 `(("python-pytest" ,python-pytest)))
19886 (home-page "https://dbfread.readthedocs.io")
19887 (synopsis "Read DBF Files with Python")
19889 "This library reads DBF files and returns the data as native Python data
19890 types for further processing. It is primarily intended for batch jobs and
19892 (license license:expat)))
19894 (define-public python-cached-property
19896 (name "python-cached-property")
19901 (uri (pypi-uri "cached-property" version))
19904 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
19905 (build-system python-build-system)
19908 (modify-phases %standard-phases
19909 ;; https://github.com/pydanny/cached-property/issues/131
19910 ;; recent versions of freezegun break one test
19911 (add-after 'unpack 'disable-broken-test
19913 (substitute* "tests/test_cached_property.py"
19914 (("def test_threads_ttl_expiry\\(self\\)" m)
19915 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
19919 `(("python-freezegun" ,python-freezegun)))
19921 "https://github.com/pydanny/cached-property")
19923 "Decorator for caching properties in classes")
19925 "This package provides a decorator which makes caching
19926 time-or-computationally-expensive properties quick and easy and works in Python
19928 (license license:bsd-3)))
19930 (define-public python-folium
19932 (name "python-folium")
19937 (uri (pypi-uri "folium" version))
19939 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
19940 (build-system python-build-system)
19942 `(("python-branca" ,python-branca)
19943 ("python-jinja2" ,python-jinja2)
19944 ("python-numpy" ,python-numpy)
19945 ("python-requests" ,python-requests)))
19947 `(("python-pytest" ,python-pytest)))
19948 (home-page "https://github.com/python-visualization/folium")
19949 (synopsis "Make beautiful maps with Leaflet.js & Python")
19950 (description "@code{folium} makes it easy to visualize data that’s been
19951 manipulated in Python on an interactive leaflet map. It enables both the
19952 binding of data to a map for @code{choropleth} visualizations as well as
19953 passing rich vector/raster/HTML visualizations as markers on the map.
19955 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
19956 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
19957 supports Image, Video, GeoJSON and TopoJSON overlays.")
19958 (license license:expat)))
19960 (define-public jube
19962 ;; This is a command-line tool, so no "python-" prefix.
19967 (uri (string-append
19968 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
19972 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
19973 (file-name (string-append "jube-" version ".tar.gz"))))
19974 (build-system python-build-system)
19975 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
19976 (synopsis "Benchmarking environment")
19978 "JUBE helps perform and analyze benchmarks in a systematic way. For each
19979 benchmarked application, benchmark data is stored in a format that allows JUBE
19980 to deduct the desired information. This data can be parsed by automatic pre-
19981 and post-processing scripts that draw information and store it more densely
19982 for manual interpretation.")
19983 (license license:gpl3+)))
19985 (define-public python-pyroutelib3
19987 (name "python-pyroutelib3")
19988 (version "1.3.post1")
19992 (uri (pypi-uri "pyroutelib3" version))
19995 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
19996 (build-system python-build-system)
19998 `(("python-dateutil" ,python-dateutil)))
19999 (home-page "https://github.com/MKuranowski/pyroutelib3")
20000 (synopsis "Library for simple routing on OSM data")
20001 (description "Library for simple routing on OSM data")
20002 (license license:gpl3+)))
20004 (define-public python-bibtexparser
20006 (name "python-bibtexparser")
20011 (uri (pypi-uri "bibtexparser" version))
20014 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20015 (build-system python-build-system)
20017 `(("python-pyparsing" ,python-pyparsing)))
20019 `(("python-future" ,python-future)))
20020 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20021 (synopsis "Python library to parse BibTeX files")
20022 (description "BibtexParser is a Python library to parse BibTeX files.")
20023 (license (list license:bsd-3 license:lgpl3))))
20025 (define-public python-distro
20027 (name "python-distro")
20032 (uri (pypi-uri "distro" version))
20035 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20036 (build-system python-build-system)
20038 `(("python-pytest" ,python-pytest)))
20039 (home-page "https://github.com/nir0s/distro")
20041 "OS platform information API")
20043 "@code{distro} provides information about the OS distribution it runs on,
20044 such as a reliable machine-readable ID, or version information.
20046 It is the recommended replacement for Python's original
20047 `platform.linux_distribution` function (which will be removed in Python 3.8).
20048 @code{distro} also provides a command-line interface to output the platform
20049 information in various formats.")
20050 (license license:asl2.0)))
20052 (define-public python-cairosvg
20054 (name "python-cairosvg")
20059 (uri (pypi-uri "CairoSVG" version))
20061 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
20062 (build-system python-build-system)
20065 (modify-phases %standard-phases
20067 (lambda _ (invoke "pytest"))))))
20069 `(("python-cairocffi" ,python-cairocffi)
20070 ("python-cssselect2" ,python-cssselect2)
20071 ("python-defusedxml" ,python-defusedxml)
20072 ("python-pillow" ,python-pillow)
20073 ("python-tinycss2" ,python-tinycss2)))
20075 `(("python-pytest-flake8" ,python-pytest-flake8)
20076 ("python-pytest-isort" ,python-pytest-isort)
20077 ("python-pytest-runner" ,python-pytest-runner)))
20078 (home-page "https://cairosvg.org/")
20079 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20080 (description "CairoSVG is a SVG converter based on Cairo. It can export
20081 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20082 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20083 parsed, the result is drawn to a Cairo surface that can be exported to
20084 qvarious formats: PDF, PostScript, PNG and even SVG.")
20085 (license license:lgpl3+)))
20087 (define-public python-pyphen
20089 (name "python-pyphen")
20094 (uri (pypi-uri "Pyphen" version))
20096 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
20097 (build-system python-build-system)
20098 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20099 ;; embedded set provided by upstream - like Debian does.
20100 (home-page "https://github.com/Kozea/Pyphen")
20101 (synopsis "Pure Python module to hyphenate text")
20102 (description "Pyphen is a pure Python module to hyphenate text using
20103 existing Hunspell hyphenation dictionaries.")
20104 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20106 (define-public python-intelhex
20108 (name "python-intelhex")
20113 (uri (pypi-uri "intelhex" version))
20116 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20117 (build-system python-build-system)
20118 (arguments '(#:tests? #f)) ;issue with version
20119 (home-page "https://pypi.org/project/IntelHex/")
20120 (synopsis "Python library for Intel HEX files manipulations")
20121 (description "The Intel HEX file format is widely used in microprocessors
20122 and microcontrollers area (embedded systems etc.) as the de facto standard for
20123 representation of code to be programmed into microelectronic devices. This
20124 package provides an intelhex Python library to read, write, create from
20125 scratch and manipulate data from Intel HEX file format. It also includes
20126 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20127 converters and more, those based on the library itself.")
20128 (license license:bsd-3)))
20130 (define-public python-pykwalify
20132 (name "python-pykwalify")
20137 (uri (pypi-uri "pykwalify" version))
20140 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20141 (build-system python-build-system)
20142 (arguments '(#:tests? #f)) ;missing dependencies
20144 `(("python-dateutil" ,python-dateutil)
20145 ("python-docopt" ,python-docopt)
20146 ("python-pyyaml" ,python-pyyaml)))
20147 (home-page "https://github.com/grokzen/pykwalify")
20149 "Python lib/cli for JSON/YAML schema validation")
20151 "This package provides a parser, schema validator, and data binding tool
20152 for YAML and JSON.")
20153 (license license:expat)))
20155 (define-public python-dbusmock
20157 (name "python-dbusmock")
20162 (uri (pypi-uri "python-dbusmock" version))
20165 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20166 (build-system python-build-system)
20169 (modify-phases %standard-phases
20170 (add-after 'unpack 'patch-shell-path
20172 (substitute* "tests/test_code.py"
20173 (("/bin/bash") (which "bash")))
20177 ("dbus" ,dbus) ; for dbus-daemon
20178 ("python-nose" ,python-nose)
20181 `(("python-dbus" ,python-dbus)
20182 ("python-pygobject" ,python-pygobject)))
20183 (home-page "https://github.com/martinpitt/python-dbusmock")
20184 (synopsis "Python library for mock D-Bus objects")
20185 (description "python-dbusmock allows for the easy creation of mock objects on
20186 D-Bus. This is useful for writing tests for software which talks to D-Bus
20187 services such as upower, systemd, logind, gnome-session or others, and it is
20188 hard (or impossible without root privileges) to set the state of the real
20189 services to what you expect in your tests.")
20190 (license license:lgpl3+)))
20192 (define-public python-jsonplus
20194 (name "python-jsonplus")
20196 (home-page "https://github.com/randomir/jsonplus")
20199 (uri (pypi-uri "jsonplus" version))
20202 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20203 (build-system python-build-system)
20204 ;; XXX: No tests on PyPI, and the repository has no tags.
20205 (arguments '(#:tests? #f))
20207 `(("python-dateutil" ,python-dateutil)
20208 ("python-simplejson" ,python-simplejson)
20209 ("python-sortedcontainers" ,python-sortedcontainers)))
20210 (synopsis "Serialize Python types to/from JSON")
20212 "This package provides functionality to serialize arbitrary data types
20213 to and from JSON. Common data types are implemented and it is easy to
20214 register custom encoders and decoders.")
20215 (license license:expat)))
20217 (define-public python-ujson
20219 (name "python-ujson")
20224 (uri (pypi-uri "ujson" version))
20227 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
20228 (modules '((guix build utils)))
20230 '(begin (delete-file-recursively "deps") #t))))
20231 (build-system python-build-system)
20234 (modify-phases %standard-phases
20235 (add-after 'unpack 'link-to-system-double-conversion
20236 (lambda* (#:key inputs #:allow-other-keys)
20237 (let ((d-c (assoc-ref inputs "double-conversion")))
20238 (substitute* "setup.py"
20239 (("./deps/double-conversion/double-conversion\"")
20240 (string-append d-c "/include/double-conversion\""))
20242 (string-append "-L" d-c "/lib\","
20243 " \"-ldouble-conversion\","
20247 (lambda* (#:key inputs outputs #:allow-other-keys)
20248 (add-installed-pythonpath inputs outputs)
20249 (invoke "pytest"))))))
20251 `(("double-conversion" ,double-conversion)
20252 ("python-setuptools-scm" ,python-setuptools-scm)
20253 ("python-pytest" ,python-pytest)))
20254 (home-page "https://github.com/ultrajson/ultrajson")
20255 (synopsis "Ultra fast JSON encoder and decoder for Python")
20257 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20258 bindings for Python 3.")
20259 (license license:bsd-3)))
20261 (define-public python-ujson-1
20263 (inherit python-ujson)
20268 (uri (pypi-uri "ujson" version))
20271 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
20273 '(#:phases %standard-phases))
20274 (native-inputs '())
20275 (home-page "http://www.esn.me")
20277 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20278 bindings for Python 2.5+ and 3.")))
20280 (define-public python2-ujson-1
20281 (package-with-python2 python-ujson-1))
20283 (define-public python-iocapture
20284 ;; The latest release is more than a year older than this commit.
20285 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20288 (name "python-iocapture")
20293 (uri (git-reference
20294 (url "https://github.com/oinume/iocapture")
20296 (file-name (git-file-name name version))
20299 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20300 (build-system python-build-system)
20303 (modify-phases %standard-phases
20305 (add-after 'install 'check
20306 (lambda* (#:key inputs outputs #:allow-other-keys)
20307 (add-installed-pythonpath inputs outputs)
20308 (invoke "py.test" "-v" "tests")
20311 `(("python-flexmock" ,python-flexmock)
20312 ("python-pytest" ,python-pytest)
20313 ("python-pytest-cov" ,python-pytest-cov)
20314 ("python-six" ,python-six)))
20315 (home-page "https://github.com/oinume/iocapture")
20316 (synopsis "Python capturing tool for stdout and stderr")
20318 "This package helps you to capture the standard out (stdout) and the
20319 standard error channel (stderr) in your program.")
20320 (license license:expat))))
20322 (define-public python-argh
20323 ;; There are 21 commits since the latest release containing important
20325 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20328 (name "python-argh")
20329 (version (git-version "0.26.2" revision commit))
20333 (uri (git-reference
20334 (url "https://github.com/neithere/argh")
20336 (file-name (git-file-name name version))
20339 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20340 (build-system python-build-system)
20342 `(("python-iocapture" ,python-iocapture)
20343 ("python-mock" ,python-mock)
20344 ("python-pytest" ,python-pytest)
20345 ("python-pytest-cov" ,python-pytest-cov)
20346 ("python-pytest-xdist" ,python-pytest-xdist)
20347 ("python-tox" ,python-tox)))
20348 (home-page "https://github.com/neithere/argh/")
20349 (synopsis "Argparse wrapper with natural syntax")
20351 "python-argh is a small library that provides several layers of
20352 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20353 always possible to declare a command with the highest possible (and least
20354 flexible) layer and then tune the behaviour with any of the lower layers
20355 including the native API of @code{python-argparse}.")
20356 (license license:lgpl3+))))
20358 (define-public python-ppft
20360 (name "python-ppft")
20361 (version "1.6.6.1")
20365 (uri (pypi-uri "ppft" version))
20368 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20369 (build-system python-build-system)
20370 (arguments '(#:tests? #f)) ; there are none
20372 `(("python-six" ,python-six)))
20373 (home-page "https://pypi.org/project/ppft/")
20374 (synopsis "Fork of Parallel Python")
20376 "This package is a fork of Parallel Python. The Parallel Python
20377 module (@code{pp}) provides an easy and efficient way to create
20378 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20379 computers and clusters. It features cross-platform portability and dynamic
20381 (license license:bsd-3)))
20383 (define-public python-pox
20385 (name "python-pox")
20390 (uri (pypi-uri "pox" version))
20393 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20394 (build-system python-build-system)
20397 (modify-phases %standard-phases
20400 (mkdir-p "/tmp/guix")
20401 (setenv "SHELL" "bash")
20402 (setenv "USERNAME" "guix")
20403 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20404 (invoke "py.test" "-vv")
20407 `(("python-pytest" ,python-pytest)
20409 (home-page "https://pypi.org/project/pox/")
20410 (synopsis "Python utilities for file system exploration and automated builds")
20412 "Pox provides a collection of utilities for navigating and manipulating
20413 file systems. This module is designed to facilitate some of the low-level
20414 operating system interactions that are useful when exploring a file system on a
20415 remote host. Pox provides Python equivalents of several shell commands such
20416 as @command{which} and @command{find}. These commands allow automated
20417 discovery of what has been installed on an operating system, and where the
20418 essential tools are located.")
20419 (license license:bsd-3)))
20421 (define-public python-pathos
20423 (name "python-pathos")
20428 (uri (pypi-uri "pathos" version))
20431 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20432 (build-system python-build-system)
20435 (modify-phases %standard-phases
20438 (setenv "PYTHONPATH"
20439 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20440 (invoke "python" "./tests/__main__.py"))))))
20442 `(("python-dill" ,python-dill)
20443 ("python-multiprocess" ,python-multiprocess)
20444 ("python-pox" ,python-pox)
20445 ("python-ppft" ,python-ppft)))
20447 `(("python-pytest" ,python-pytest)))
20448 (home-page "https://pypi.org/project/pathos/")
20450 "Parallel graph management and execution in heterogeneous computing")
20452 "Python-pathos is a framework for heterogeneous computing. It provides a
20453 consistent high-level interface for configuring and launching parallel
20454 computations across heterogeneous resources. Python-pathos provides configurable
20455 launchers for parallel and distributed computing, where each launcher contains
20456 the syntactic logic to configure and launch jobs in an execution environment.")
20457 (license license:bsd-3)))
20459 (define-public python-flit
20461 (name "python-flit")
20466 (uri (pypi-uri "flit" version))
20469 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
20470 (build-system python-build-system)
20472 `(#:tests? #f)) ; XXX: Check requires network access.
20473 (home-page "https://flit.readthedocs.io/")
20475 "Simple packaging tool for simple packages")
20477 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20478 packages a single importable module or package at a time, using the import
20479 name as the name on PyPI. All subpackages and data files within a package
20480 are included automatically.")
20481 (license license:bsd-3)))
20483 (define-public python-pathtools
20485 (name "python-pathtools")
20490 (uri (pypi-uri "pathtools" version))
20493 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20494 (build-system python-build-system)
20496 "https://github.com/gorakhargosh/pathtools")
20497 (synopsis "Path utilities for Python")
20498 (description "Pattern matching and various utilities for file systems
20500 (license license:expat)))
20502 (define-public python-fastentrypoints
20504 (name "python-fastentrypoints")
20509 (uri (pypi-uri "fastentrypoints" version))
20512 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20513 (build-system python-build-system)
20515 "https://github.com/ninjaaron/fast-entry_points")
20517 "Makes entry_points specified in setup.py load more quickly")
20519 "Using entry_points in your setup.py makes scripts that start really
20520 slowly because it imports pkg_resources. This package allows such setup
20521 scripts to load entry points more quickly.")
20522 (license license:bsd-3)))
20524 (define-public python-funcparserlib
20526 (name "python-funcparserlib")
20531 (uri (pypi-uri "funcparserlib" version))
20534 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20536 `(("python-tox" ,python-tox)))
20539 (modify-phases %standard-phases
20542 (invoke "tox"))))))
20543 (build-system python-build-system)
20545 "https://github.com/vlasovskikh/funcparserlib")
20547 "Recursive descent parsing library based on functional combinators")
20549 "This package is a recursive descent parsing library for Python based on
20550 functional combinators. Parser combinators are just higher-order functions
20551 that take parsers as their arguments and return them as result values.")
20552 (license license:expat)))
20554 (define-public python-speg
20556 (name "python-speg")
20561 (uri (pypi-uri "speg" version ".zip"))
20563 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20565 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20567 `(("unzip" ,unzip)))
20568 (build-system python-build-system)
20569 (home-page "https://github.com/avakar/speg")
20570 (synopsis "PEG-based parser interpreter with memoization")
20571 (description "This package is a PEG-based parser and interpreter with
20573 (license license:expat)))
20575 (define-public python-cson
20577 (name "python-cson")
20582 (uri (pypi-uri "cson" version))
20584 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20585 (build-system python-build-system)
20587 `(("python-speg" ,python-speg)))
20588 (home-page "https://github.com/avakar/pycson")
20589 (synopsis "Parser for Coffeescript Object Notation (CSON)")
20590 (description "This package is a parser for Coffeescript Object
20592 (license license:expat)))
20594 (define-public python-asynctest
20596 (name "python-asynctest")
20601 (uri (pypi-uri "asynctest" version))
20604 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20605 (build-system python-build-system)
20608 (modify-phases %standard-phases
20611 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20612 (add-after 'unpack 'disable-tests
20614 ;; XXX: 7 tests fail out of 220. Disable them for now.
20615 (substitute* (list "test/test_selector.py"
20616 "test/test_mock.py")
20617 (("def test_events_watched_outside_test_are_ignored")
20618 "@unittest.skip('disabled by guix')
20619 def test_events_watched_outside_test_are_ignored")
20620 (("def test_awaited_from_autospec_mock.*" line)
20621 (string-append line " return True\n"))
20622 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
20623 (string-append line " return True\n"))
20624 (("def test_patch_coroutine_with_multiple_scopes.*" line)
20625 (string-append line " return True\n"))
20626 (("def test_multiple_patches_on_coroutine.*" line)
20627 (string-append line " return True\n"))
20628 (("def test_patch_coroutine_only_when_running.*" line)
20629 (string-append line " return True\n")))
20631 (home-page "https://github.com/Martiusweb/asynctest")
20632 (synopsis "Extension of unittest for testing asyncio libraries")
20634 "The package asynctest is built on top of the standard unittest module
20635 and cuts down boilerplate code when testing libraries for asyncio.")
20636 (license license:asl2.0)))
20638 (define-public python-aionotify
20640 (name "python-aionotify")
20644 ;; Source tarball on PyPi lacks tests
20646 (uri (git-reference
20647 (url "https://github.com/rbarrois/aionotify")
20648 (commit (string-append "v" version))))
20649 (file-name (git-file-name name version))
20651 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
20652 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
20653 (build-system python-build-system)
20654 (home-page "https://github.com/rbarrois/aionotify")
20655 (synopsis "Asyncio-powered inotify library")
20657 "@code{aionotify} is a simple, asyncio-based inotify library.")
20658 (license license:bsd-3)))
20660 (define-public python-forbiddenfruit
20662 (name "python-forbiddenfruit")
20666 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
20668 (uri (git-reference
20669 (url "https://github.com/clarete/forbiddenfruit")
20671 (file-name (git-file-name name version))
20673 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
20674 (build-system python-build-system)
20677 (modify-phases %standard-phases
20680 (invoke "make" "SKIP_DEPS=1"))))))
20682 `(("python-nose" ,python-nose)
20683 ("python-coverage" ,python-coverage)))
20684 (home-page "https://github.com/clarete/forbiddenfruit")
20685 (synopsis "Patch python built-in objects")
20686 (description "This project allows Python code to extend built-in types.")
20687 (license (list license:gpl3+ license:expat))))
20689 (define-public python-shouldbe
20691 (name "python-shouldbe")
20696 (uri (pypi-uri "shouldbe" version))
20699 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
20700 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
20701 (build-system python-build-system)
20703 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
20705 `(("python-nose" ,python-nose)))
20706 (home-page "https://github.com/directxman12/should_be")
20707 (synopsis "Python Assertion Helpers inspired by Shouldly")
20709 "Python Assertion Helpers inspired by Shouldly.")
20710 (license license:isc)))
20712 (define-public python-k5test
20714 (name "python-k5test")
20719 (uri (pypi-uri "k5test" version))
20722 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
20723 (build-system python-build-system)
20725 `(("python-six" ,python-six)
20726 ;; `which`, `kadmin.local` binaries called inside library
20728 ("mit-krb5" ,mit-krb5)))
20729 (native-inputs `(("mit-krb5" ,mit-krb5)))
20732 (modify-phases %standard-phases
20733 (add-after 'unpack 'patch-paths
20735 (substitute* "k5test/realm.py"
20736 (("'kadmin_local'") "'kadmin.local'")))))))
20737 (home-page "https://github.com/pythongssapi/k5test")
20738 (synopsis "Library for setting up self-contained Kerberos 5 environments")
20740 "@code{k5test} is a library for setting up self-contained Kerberos 5
20741 environments, and running Python unit tests inside those environments. It is
20742 based on the file of the same name found alongside the MIT Kerberos 5 unit
20744 (license license:isc)))
20746 (define-public python-gssapi
20748 (name "python-gssapi")
20753 (uri (pypi-uri "gssapi" version))
20756 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
20757 (build-system python-build-system)
20760 (modify-phases %standard-phases
20762 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
20763 (add-before 'check 'disable-failing-tests
20765 (let ((reason "Disabled failing test (see: \
20766 https://github.com/pythongssapi/python-gssapi/issues/220)."))
20767 (substitute* "gssapi/tests/test_high_level.py"
20768 ((".*def test_add_with_impersonate.*" all)
20769 (string-append all " self.skipTest('" reason "')\n")))
20770 (substitute* "gssapi/tests/test_raw.py"
20771 ((".*def test_.*impersonate_name.*" all)
20772 (string-append all " self.skipTest('" reason "')\n")))
20775 `(("python-decorator" ,python-decorator)
20776 ("python-six" ,python-six)))
20778 `(("mit-krb5" ,mit-krb5)))
20781 `(("python-shouldbe" ,python-shouldbe)
20782 ("python-parameterized" ,python-parameterized)
20783 ("python-k5test" ,python-k5test)
20784 ("python-nose" ,python-nose)))
20785 (home-page "https://github.com/pythongssapi/python-gssapi")
20786 (synopsis "Python GSSAPI Wrapper")
20788 "Python-GSSAPI provides both low-level and high level wrappers around the
20789 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
20790 also be usable with other GSSAPI mechanisms.")
20791 (license license:isc)))
20793 (define-public python-check-manifest
20795 (name "python-check-manifest")
20800 (uri (pypi-uri "check-manifest" version))
20803 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
20804 (build-system python-build-system)
20806 `(("python-mock" ,python-mock)
20808 (home-page "https://github.com/mgedmin/check-manifest")
20809 (synopsis "Check MANIFEST.in in a Python source package for completeness")
20810 (description "Python package can include a MANIFEST.in file to help with
20811 sending package files to the Python Package Index. This package checks that
20812 file to ensure it completely and accurately describes your project.")
20813 (license license:expat)))
20815 (define-public python-android-stringslib
20817 (name "python-android-stringslib")
20822 (uri (git-reference
20823 (url "https://framagit.org/tyreunom/python-android-strings-lib")
20824 (commit (string-append "v" version))))
20825 (file-name (git-file-name name version))
20828 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
20829 (build-system python-build-system)
20832 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
20833 (synopsis "Android strings.xml support")
20834 (description "Android Strings Lib provides support for android's strings.xml
20835 files. These files are used to translate strings in android apps.")
20836 (license license:expat)))
20838 (define-public python-watchdog
20840 (name "python-watchdog")
20845 (uri (pypi-uri "watchdog" version))
20848 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
20849 (build-system python-build-system)
20852 (modify-phases %standard-phases
20853 (add-before 'check 'remove-failing
20855 (delete-file "tests/test_inotify_buffer.py")
20856 (delete-file "tests/test_snapshot_diff.py")
20859 `(("python-argh" ,python-argh)
20860 ("python-pathtools" ,python-pathtools)
20861 ("python-pyyaml" ,python-pyyaml)))
20863 `(("python-pytest-cov" ,python-pytest-cov)
20864 ("python-pytest-timeout" ,python-pytest-timeout)))
20865 (home-page "https://github.com/gorakhargosh/watchdog")
20866 (synopsis "File system events monitoring")
20867 (description "This package provides a way to monitor file system events
20868 such as a file modification and trigger an action. This is similar to inotify,
20870 (license license:asl2.0)))
20872 (define-public python-watchgod
20874 (name "python-watchgod")
20878 ;; There are no tests in the PyPI tarball.
20880 (uri (git-reference
20881 (url "https://github.com/samuelcolvin/watchgod")
20882 (commit (string-append "v" version))))
20883 (file-name (git-file-name name version))
20885 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
20886 (build-system python-build-system)
20889 (modify-phases %standard-phases
20892 (invoke "pytest" "-vv"))))))
20894 `(("python-coverage" ,python-coverage)
20895 ("python-docutils" ,python-docutils)
20896 ("python-flake8" ,python-flake8)
20897 ("python-isort" ,python-isort)
20898 ("python-pycodestyle" ,python-pycodestyle)
20899 ("python-pyflakes" ,python-pyflakes)
20900 ("python-pygments" ,python-pygments)
20901 ("python-pytest" ,python-pytest)
20902 ("python-pytest-cov" ,python-pytest-cov)
20903 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
20904 ("python-pytest-mock" ,python-pytest-mock)
20905 ("python-pytest-sugar" ,python-pytest-sugar)
20906 ("python-pytest-toolbox" ,python-pytest-toolbox)))
20907 (home-page "https://github.com/samuelcolvin/watchgod")
20908 (synopsis "Simple, modern file watching and code reload in Python")
20910 "Simple, modern file watching and code reload in Python inspired by
20911 @code{watchdog}. Among the differences are a unified approach for each
20912 operating systems and an elegant approach to concurrency using threading.")
20913 (license license:expat)))
20915 (define-public python-wget
20917 (name "python-wget")
20922 (uri (pypi-uri "wget" version ".zip"))
20925 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
20926 (build-system python-build-system)
20927 (native-inputs `(("unzip" ,unzip)))
20928 (home-page "https://bitbucket.org/techtonik/python-wget/")
20929 (synopsis "Pure Python download utility")
20930 (description "The python-wget library provides an API to download files
20931 with features similar to the @command{wget} utility.")
20932 (license license:unlicense)))
20934 (define-public offlate
20941 (uri (git-reference
20942 (url "https://framagit.org/tyreunom/offlate")
20944 (file-name (git-file-name name version))
20947 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
20948 (build-system python-build-system)
20953 `(("python-android-stringslib" ,python-android-stringslib)
20954 ("python-dateutil" ,python-dateutil)
20955 ("python-gitlab" ,python-gitlab)
20956 ("python-lxml" ,python-lxml)
20957 ("python-polib" ,python-polib)
20958 ("python-pyenchant" ,python-pyenchant)
20959 ("python-pygit2" ,python-pygit2)
20960 ("python-pygithub" ,python-pygithub)
20961 ("python-pyqt" ,python-pyqt)
20962 ("python-requests" ,python-requests)
20963 ("python-ruamel.yaml" ,python-ruamel.yaml)
20964 ("python-translation-finder" ,python-translation-finder)
20965 ("python-watchdog" ,python-watchdog)))
20967 `(("qttools" ,qttools)))
20968 (home-page "https://framagit.org/tyreunom/offlate")
20969 (synopsis "Offline translation interface for online translation tools")
20970 (description "Offlate offers a unified interface for different translation
20971 file formats, as well as many different online translation platforms. You can
20972 use it to get work from online platforms, specialized such as the Translation
20973 Project, or not such a gitlab instance when your upstream doesn't use any
20974 dedicated platform. The tool proposes a unified interface for any format and
20975 an upload option to send your work back to the platform.")
20976 (license license:gpl3+)))
20978 (define-public python-titlecase
20980 (name "python-titlecase")
20985 (uri (pypi-uri "titlecase" version))
20988 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
20989 (build-system python-build-system)
20991 `(("python-nose" ,python-nose)))
20992 (home-page "https://github.com/ppannuto/python-titlecase")
20993 (synopsis "Capitalize strings similar to book titles")
20995 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
20996 It capitalizes (predominantly English) strings in a way that is similar to
20997 book titles, using the New York Times Manual of Style to leave certain words
20999 (license license:expat)))
21001 (define-public python-pypng
21003 (name "python-pypng")
21008 (uri (pypi-uri "pypng" version))
21010 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21011 (build-system python-build-system)
21012 (home-page "https://github.com/drj11/pypng")
21013 (synopsis "Pure Python PNG image encoder/decoder")
21015 "The PyPNG module implements support for PNG images. It reads and writes
21016 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21017 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21018 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21019 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21020 A number of optional chunks can be specified (when writing) and
21021 understood (when reading): tRNS, bKGD, gAMA.
21023 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21024 aim at being a replacement or competitor. Its strength lies in fine-grained
21025 extensive support of PNG features. It can also read and write Netpbm PAM
21026 files, with a focus on its use as an intermediate format for implementing
21027 custom PNG processing.")
21028 (license license:expat)))
21030 (define-public python-fuzzywuzzy
21032 (name "python-fuzzywuzzy")
21037 (uri (pypi-uri "fuzzywuzzy" version))
21040 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21041 (build-system python-build-system)
21043 `(("python-hypothesis" ,python-hypothesis)
21044 ("python-pycodestyle" ,python-pycodestyle)
21045 ("python-pytest" ,python-pytest)))
21047 `(("python-levenshtein" ,python-levenshtein)))
21048 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21049 (synopsis "Fuzzy string matching in Python")
21050 (description "Approximate string matching using
21051 @emph{Levenshtein Distance} to calculate the differences between
21053 (license license:gpl2)))
21055 (define-public python2-fuzzywuzzy
21056 (package-with-python2 python-fuzzywuzzy))
21058 (define-public python-block-tracing
21060 (name "python-block-tracing")
21065 (uri (pypi-uri "block_tracing" version))
21068 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21069 (build-system python-build-system)
21070 (arguments '(#:tests? #f)) ; no tests
21071 (home-page "https://github.com/rianhunter/block_tracing")
21072 (synopsis "Protect process memory")
21074 "@code{block_tracing} is a tiny Python library that can be used to
21075 prevent debuggers and other applications from inspecting the memory within
21077 (license license:expat)))
21079 (define-public python-gcovr
21081 (name "python-gcovr")
21086 (uri (pypi-uri "gcovr" version))
21089 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21090 (build-system python-build-system)
21092 `(("python-lxml" ,python-lxml)
21093 ("python-jinja2" ,python-jinja2)))
21094 (home-page "https://gcovr.com/")
21095 (synopsis "Utility for generating code coverage results")
21097 "Gcovr provides a utility for managing the use of the GNU gcov
21098 utility and generating summarized code coverage results. It is inspired
21099 by the Python coverage.py package, which provides a similar utility for
21101 (license license:bsd-3)))
21103 (define-public python-owslib
21105 (name "python-owslib")
21110 (uri (pypi-uri "OWSLib" version))
21112 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21113 (build-system python-build-system)
21115 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21116 (synopsis "Interface for Open Geospatial Consortium web service")
21118 "OWSLib is a Python package for client programming with Open Geospatial
21119 Consortium (OGC) web service (hence OWS) interface standards, and their related
21121 (home-page "https://geopython.github.io/OWSLib/")
21122 (license license:bsd-3)))
21124 (define-public python-docusign-esign
21126 (name "python-docusign-esign")
21130 (uri (pypi-uri "docusign_esign" version))
21133 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21134 (build-system python-build-system)
21135 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21136 (arguments `(#:tests? #f))
21138 `(("python-certifi" ,python-certifi)
21139 ("python-six" ,python-six)
21140 ("python-dateutil" ,python-dateutil)
21141 ("python-urllib3" ,python-urllib3)
21142 ("python-pyjwt" ,python-pyjwt)
21143 ("python-cryptography" ,python-cryptography)
21144 ("python-nose" ,python-nose)))
21145 (synopsis "DocuSign Python Client")
21146 (description "The Official DocuSign Python Client Library used to interact
21147 with the eSign REST API. Send, sign, and approve documents using this client.")
21148 (home-page "https://www.docusign.com/devcenter")
21149 (license license:expat)))
21151 (define-public python-xattr
21153 (name "python-xattr")
21158 (uri (pypi-uri "xattr" version))
21161 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21162 (build-system python-build-system)
21164 `(("python-cffi" ,python-cffi)))
21165 (home-page "https://github.com/xattr/xattr")
21167 "Python wrapper for extended file system attributes")
21168 (description "This package provides a Python wrapper for using extended
21169 file system attributes. Extended attributes extend the basic attributes of files
21170 and directories in the file system. They are stored as name:data pairs
21171 associated with file system objects (files, directories, symlinks, etc).")
21172 (license license:expat)))
21174 (define-public python-json-logger
21176 (name "python-json-logger")
21181 (uri (pypi-uri "python-json-logger" version))
21184 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21185 (build-system python-build-system)
21187 "https://github.com/madzak/python-json-logger")
21188 (synopsis "JSON log formatter in Python")
21189 (description "This library allows standard Python logging to output log data
21190 as JSON objects. With JSON we can make our logs more readable by machines and
21191 we can stop writing custom parsers for syslog-type records.")
21192 (license license:bsd-3)))
21194 (define-public python-daiquiri
21196 (name "python-daiquiri")
21201 (uri (pypi-uri "daiquiri" version))
21204 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21205 (build-system python-build-system)
21207 `(("python-json-logger" ,python-json-logger)))
21209 `(("python-mock" ,python-mock)
21210 ("python-pytest" ,python-pytest)
21211 ("python-setuptools-scm" ,python-setuptools-scm)
21212 ("python-six" ,python-six)))
21213 (home-page "https://github.com/jd/daiquiri")
21215 "Library to configure Python logging easily")
21216 (description "The daiquiri library provides an easy way to configure
21217 logging in Python. It also provides some custom formatters and handlers.")
21218 (license license:asl2.0)))
21220 (define-public python-pifpaf
21222 (name "python-pifpaf")
21227 (uri (pypi-uri "pifpaf" version))
21230 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21231 (build-system python-build-system)
21234 (modify-phases %standard-phases
21237 (invoke "python" "setup.py" "testr" "--slowest"
21238 "--testr-args=until-failure"))))))
21240 `(("python-click" ,python-click)
21241 ("python-daiquiri" ,python-daiquiri)
21242 ("python-fixtures" ,python-fixtures)
21243 ("python-jinja2" ,python-jinja2)
21244 ("python-pbr" ,python-pbr)
21245 ("python-psutil" ,python-psutil)
21246 ("python-six" ,python-six)
21247 ("python-xattr" ,python-xattr)))
21249 `(("python-mock" ,python-mock)
21250 ("python-os-testr" ,python-os-testr)
21251 ("python-requests" ,python-requests)
21252 ("python-testrepository" ,python-testrepository)
21253 ("python-testtools" ,python-testtools)))
21254 (home-page "https://github.com/jd/pifpaf")
21255 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21256 (description "Pifpaf is a suite of fixtures and a command-line tool that
21257 starts and stops daemons for a quick throw-away usage. This is typically
21258 useful when needing these daemons to run integration testing. It originally
21259 evolved from its precursor @code{overtest}.")
21260 (license license:asl2.0)))
21262 (define-public python-pytest-check-links
21264 (name "python-pytest-check-links")
21269 ;; URI uses underscores
21270 (uri (pypi-uri "pytest_check_links" version))
21273 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21274 (build-system python-build-system)
21276 `(("python-docutils" ,python-docutils)
21277 ("python-html5lib" ,python-html5lib)
21278 ("python-nbconvert" ,python-nbconvert)
21279 ("python-nbformat" ,python-nbformat)
21280 ("python-pytest" ,python-pytest)
21281 ("python-six" ,python-six)))
21283 `(("python-pbr-minimal" ,python-pbr-minimal)))
21284 (home-page "https://github.com/minrk/pytest-check-links")
21285 (synopsis "Check links in files")
21286 (description "This package provides a pytest plugin that checks URLs for
21287 HTML-containing files.")
21288 (license license:bsd-3)))
21290 (define-public python-json5
21292 (name "python-json5")
21296 ;; sample.json5 is missing from PyPi source tarball
21298 (uri (git-reference
21299 (url "https://github.com/dpranke/pyjson5")
21300 (commit (string-append "v" version))))
21301 (file-name (git-file-name name version))
21303 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21304 (build-system python-build-system)
21305 (home-page "https://github.com/dpranke/pyjson5")
21307 "Python implementation of the JSON5 data format")
21309 "JSON5 extends the JSON data interchange format to make it slightly more
21310 usable as a configuration language. This Python package implements parsing and
21311 dumping of JSON5 data structures.")
21312 (license license:asl2.0)))
21314 (define-public python-frozendict
21316 (name "python-frozendict")
21321 (uri (pypi-uri "frozendict" version))
21323 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21324 (build-system python-build-system)
21325 (home-page "https://github.com/slezica/python-frozendict")
21326 (synopsis "Simple immutable mapping for Python")
21328 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21329 implements the complete mapping interface. It can be used as a drop-in
21330 replacement for dictionaries where immutability is desired.")
21331 (license license:expat)))
21333 (define-public python-unpaddedbase64
21335 (name "python-unpaddedbase64")
21340 (uri (git-reference
21341 (url "https://github.com/matrix-org/python-unpaddedbase64")
21342 (commit (string-append "v" version))))
21343 (file-name (git-file-name name version))
21346 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21347 (build-system python-build-system)
21348 (home-page "https://pypi.org/project/unpaddedbase64/")
21349 (synopsis "Encode and decode Base64 without “=” padding")
21351 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21352 using “=” characters. However this conveys no benefit so many protocols
21353 choose to use Base64 without the “=” padding.")
21354 (license license:asl2.0)))
21356 (define-public python-py-cpuinfo
21358 (name "python-py-cpuinfo")
21363 (uri (pypi-uri "py-cpuinfo" version))
21366 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21367 (build-system python-build-system)
21368 (home-page "https://github.com/workhorsy/py-cpuinfo")
21369 (synopsis "Get CPU info with Python")
21371 "This Python module returns the CPU info by using the best sources of
21372 information for your operating system.")
21373 (license license:expat)))
21375 (define-public python-canonicaljson
21377 (name "python-canonicaljson")
21382 (uri (pypi-uri "canonicaljson" version))
21384 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
21385 (build-system python-build-system)
21387 `(("python-six" ,python-six)
21388 ("python-frozendict" ,python-frozendict)
21389 ("python-simplejson" ,python-simplejson)))
21390 (home-page "https://github.com/matrix-org/python-canonicaljson")
21391 (synopsis "Canonical JSON")
21393 "Deterministically encode JSON.
21396 @item Encodes objects and arrays as RFC 7159 JSON.
21397 @item Sorts object keys so that you get the same result each time.
21398 @item Has no insignificant whitespace to make the output as small as possible.
21399 @item Escapes only the characters that must be escaped, U+0000 to
21400 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21401 @item Uses the shortest escape sequence for each escaped character.
21402 @item Encodes the JSON as UTF-8.
21403 @item Can encode frozendict immutable dictionaries.
21405 (license license:asl2.0)))
21407 (define-public python-signedjson
21409 (name "python-signedjson")
21414 (uri (pypi-uri "signedjson" version))
21416 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21417 (build-system python-build-system)
21419 `(("python-canonicaljson" ,python-canonicaljson)
21420 ("python-importlib-metadata" ,python-importlib-metadata)
21421 ("python-pynacl" ,python-pynacl)
21422 ("python-typing-extensions" ,python-typing-extensions)
21423 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21425 `(("python-setuptools-scm" ,python-setuptools-scm)))
21426 (home-page "https://github.com/matrix-org/python-signedjson")
21427 (synopsis "Sign JSON objects with ED25519 signatures")
21429 "Sign JSON objects with ED25519 signatures.
21432 @item More than one entity can sign the same object.
21433 @item Each entity can sign the object with more than one key making it easier to
21435 @item ED25519 can be replaced with a different algorithm.
21436 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21439 (license license:asl2.0)))
21441 (define-public python-daemonize
21443 (name "python-daemonize")
21448 (uri (pypi-uri "daemonize" version))
21450 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21451 (build-system python-build-system)
21452 (home-page "https://github.com/thesharp/daemonize")
21453 (synopsis "Library for writing system daemons in Python")
21454 (description "Daemonize is a library for writing system daemons in Python.")
21455 (license license:expat)))
21457 (define-public python-pymacaroons
21459 (name "python-pymacaroons")
21464 (uri (pypi-uri "pymacaroons" version))
21466 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21467 (build-system python-build-system)
21469 `(("python-six" ,python-six)
21470 ("python-pynacl" ,python-pynacl)))
21471 (home-page "https://github.com/ecordell/pymacaroons")
21472 (synopsis "Python Macaroon Library")
21474 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21475 tokens, macaroons embed caveats that define specific authorization
21476 requirements for the target service, the service that issued the root macaroon
21477 and which is capable of verifying the integrity of macaroons it receives.
21479 Macaroons allow for delegation and attenuation of authorization. They are
21480 simple and fast to verify, and decouple authorization policy from the
21481 enforcement of that policy.")
21482 (license license:expat)))
21484 (define-public python-ldap3
21486 (name "python-ldap3")
21488 (home-page "https://github.com/cannatag/ldap3")
21492 (uri (git-reference (url home-page)
21493 (commit (string-append "v" version))))
21494 (file-name (git-file-name name version))
21496 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21497 (build-system python-build-system)
21499 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21500 #:phases (modify-phases %standard-phases
21502 (lambda* (#:key tests? #:allow-other-keys)
21504 (invoke "nosetests" "-s" "test"))
21507 `(("python-nose" ,python-nose)))
21509 `(("python-gssapi" ,python-gssapi)
21510 ("python-pyasn1" ,python-pyasn1)))
21511 (synopsis "Python LDAP client")
21513 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21515 (license license:lgpl3+)))
21517 (define-public python-boltons
21519 (name "python-boltons")
21524 (uri (pypi-uri "boltons" version))
21527 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21528 (build-system python-build-system)
21529 (home-page "https://github.com/mahmoud/boltons")
21530 (synopsis "Extensions to the Python standard library")
21532 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21533 as — and yet conspicuously missing from — the standard library, including:
21536 @item Atomic file saving, bolted on with fileutils
21537 @item A highly-optimized OrderedMultiDict, in dictutils
21538 @item Two types of PriorityQueue, in queueutils
21539 @item Chunked and windowed iteration, in iterutils
21540 @item Recursive data structure iteration and merging, with iterutils.remap
21541 @item Exponential backoff functionality, including jitter, through
21543 @item A full-featured TracebackInfo type, for representing stack traces, in
21546 (license license:bsd-3)))
21548 (define-public python-eliot
21550 (name "python-eliot")
21555 (uri (pypi-uri "eliot" version))
21557 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21558 (build-system python-build-system)
21561 (modify-phases %standard-phases
21562 (add-after 'unpack 'remove-journald-support
21564 (for-each delete-file
21565 '("eliot/tests/test_journald.py"
21566 "eliot/journald.py"))
21568 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
21569 ;; remove command-line tool's tests. TODO eliot-prettyprint should
21570 ;; be installed and these tests should pass.
21572 (delete-file "eliot/tests/test_prettyprint.py")
21575 `(("python-boltons" ,python-boltons)
21576 ("python-pyrsistent" ,python-pyrsistent)
21577 ("python-six" ,python-six)
21578 ("python-zope-interface" ,python-zope-interface)))
21580 `(("python-black" ,python-black)
21581 ("python-coverage" ,python-coverage)
21582 ("python-dask" ,python-dask)
21583 ("python-flake8" ,python-flake8)
21584 ("python-hypothesis" ,python-hypothesis)
21585 ("python-pytest" ,python-pytest)
21586 ("python-setuptools" ,python-setuptools)
21587 ("python-sphinx" ,python-sphinx)
21588 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21589 ("python-testtools" ,python-testtools)
21590 ("python-twine" ,python-twine)
21591 ("python-twisted" ,python-twisted)))
21592 (home-page "https://github.com/itamarst/eliot/")
21593 (synopsis "Eliot: the logging system that tells you why it happened")
21595 "@dfn{eliot} is a Python logging system that outputs causal chains of
21596 actions: actions can spawn other actions, and eventually they either succeed
21597 or fail. The resulting logs tell you the story of what your software did: what
21598 happened, and what caused it.")
21599 (license license:asl2.0)))
21601 (define-public python-pem
21603 (name "python-pem")
21608 (uri (pypi-uri "pem" version))
21611 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
21612 (build-system python-build-system)
21614 `(("python-certifi" ,python-certifi)
21615 ("python-coverage" ,python-coverage)
21616 ("python-pretend" ,python-pretend)
21617 ("python-pyopenssl" ,python-pyopenssl)
21618 ("python-pytest" ,python-pytest)
21619 ("python-sphinx" ,python-sphinx)
21620 ("python-twisted" ,python-twisted)))
21621 (home-page "https://pem.readthedocs.io/")
21622 (synopsis "Easy PEM file parsing in Python")
21624 "This package provides a Python module for parsing and splitting PEM files.")
21625 (license license:expat)))
21627 (define-public python-txsni
21628 ;; We need a few commits on top of 0.1.9 for compatibility with newer
21629 ;; Python and OpenSSL.
21630 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
21633 (name "python-txsni")
21634 (version (git-version "0.1.9" revision commit))
21635 (home-page "https://github.com/glyph/txsni")
21639 (uri (git-reference (url home-page) (commit commit)))
21640 (file-name (git-file-name name version))
21643 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
21644 (build-system python-build-system)
21646 `(("python-pyopenssl" ,python-pyopenssl)
21647 ("python-service-identity" ,python-service-identity)
21648 ("python-twisted" ,python-twisted)))
21649 (synopsis "Run TLS servers with Twisted")
21651 "This package provides an easy-to-use SNI endpoint for use
21652 with the Twisted web framework.")
21653 (license license:expat))))
21655 (define-public python-txacme
21657 (name "python-txacme")
21662 (uri (pypi-uri "txacme" version))
21664 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
21665 (build-system python-build-system)
21667 `(("python-acme" ,python-acme)
21668 ("python-attrs" ,python-attrs)
21669 ("python-eliot" ,python-eliot)
21670 ("python-josepy" ,python-josepy)
21671 ("python-pem" ,python-pem)
21672 ("python-treq" ,python-treq)
21673 ("python-twisted" ,python-twisted)
21674 ("python-txsni" ,python-txsni)))
21676 `(("python-fixtures" ,python-fixtures)
21677 ("python-hypothesis" ,python-hypothesis)
21678 ("python-mock" ,python-mock)
21679 ("python-service-identity"
21680 ,python-service-identity)
21681 ("python-testrepository" ,python-testrepository)
21682 ("python-testscenarios" ,python-testscenarios)
21683 ("python-testtools" ,python-testtools)))
21684 (home-page "https://github.com/twisted/txacme")
21685 (synopsis "Twisted implexmentation of the ACME protocol")
21687 "ACME is Automatic Certificate Management Environment, a protocol that
21688 allows clients and certificate authorities to automate verification and
21689 certificate issuance. The ACME protocol is used by the free Let's Encrypt
21690 Certificate Authority.
21692 txacme is an implementation of the protocol for Twisted, the event-driven
21693 networking engine for Python.")
21694 (license license:expat)))
21696 (define-public python-pysaml2
21698 (name "python-pysaml2")
21703 (uri (pypi-uri "pysaml2" version))
21706 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
21707 (build-system python-build-system)
21709 `(("python-cryptography" ,python-cryptography)
21710 ("python-dateutil" ,python-dateutil)
21711 ("python-defusedxml" ,python-defusedxml)
21712 ("python-pyopenssl" ,python-pyopenssl)
21713 ("python-pytz" ,python-pytz)
21714 ("python-requests" ,python-requests)
21715 ("python-six" ,python-six)))
21716 (home-page "https://idpy.org")
21717 (synopsis "Python implementation of SAML Version 2 Standard")
21719 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
21720 It contains all necessary pieces for building a SAML2 service provider or
21721 an identity provider. The distribution contains examples of both.
21723 This package was originally written to work in a WSGI environment, but
21724 there are extensions that allow you to use it with other frameworks.")
21725 (license license:asl2.0)))
21727 (define-public python-click-plugins
21729 (name "python-click-plugins")
21734 (uri (pypi-uri "click-plugins" version))
21736 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
21737 (build-system python-build-system)
21739 `(("python-pytest" ,python-pytest)))
21741 `(("python-click" ,python-click)))
21742 (synopsis "Extension for Click to register external CLI commands")
21743 (description "This package provides n extension module for Click to
21744 register external CLI commands via setuptools entry-points.")
21745 (home-page "https://github.com/click-contrib/click-plugins")
21746 (license license:bsd-3)))
21748 (define-public python-diceware
21750 (name "python-diceware")
21755 (uri (pypi-uri "diceware" version))
21758 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
21759 (build-system python-build-system)
21761 `(("python-coverage" ,python-coverage)
21762 ("python-pytest" ,python-pytest)
21763 ("python-pytest-runner" ,python-pytest-runner)))
21764 (home-page "https://github.com/ulif/diceware/")
21765 (synopsis "Generates memorable passphrases")
21766 (description "This package generates passphrases by concatenating words
21767 randomly picked from wordlists. It supports several sources of
21768 randomness (including real life dice) and different wordlists (including
21769 cryptographically signed ones).")
21770 (license license:gpl3+)))
21772 (define-public python-dictdiffer
21774 (name "python-dictdiffer")
21778 (uri (pypi-uri "dictdiffer" version))
21781 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
21782 (build-system python-build-system)
21784 `(("python-check-manifest" ,python-check-manifest)
21785 ("python-coverage" ,python-coverage)
21786 ("python-isort" ,python-isort)
21787 ("python-mock" ,python-mock)
21788 ("python-pydoctstyle" ,python-pydocstyle)
21789 ("python-pytest-cache" ,python-pytest-cache)
21790 ("python-pytest-cov" ,python-pytest-cov)
21791 ("python-pytest-pep8" ,python-pytest-pep8)
21792 ("python-pytest-runner" ,python-pytest-runner)
21793 ("python-pytest" ,python-pytest)
21794 ("python-setuptools-scm" ,python-setuptools-scm)
21795 ("python-tox" ,python-tox)))
21796 (home-page "https://github.com/inveniosoftware/dictdiffer")
21797 (synopsis "Diff and patch Python dictionary objects")
21799 "Dictdiffer is a Python module that helps you to diff and patch
21801 (license license:expat)))
21803 (define-public pyzo
21810 (uri (pypi-uri "pyzo" version))
21812 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
21813 (build-system python-build-system)
21816 (modify-phases %standard-phases
21817 (add-before 'check 'fix-home-directory
21819 ;; Tests fail with "Permission denied: '/homeless-shelter'".
21820 (setenv "HOME" "/tmp")
21822 ;; Tests fail with "Uncaught Python exception: invalid literal for
21823 ;; int() with base 10: 'test'".
21826 `(("python-pyqt" ,python-pyqt)))
21827 (home-page "https://pyzo.org")
21829 "Python IDE for scientific computing")
21831 "Pyzo is a Python IDE focused on interactivity and introspection,
21832 which makes it very suitable for scientific computing. Its practical
21833 design is aimed at simplicity and efficiency.
21835 It consists of two main components, the editor and the shell, and uses
21836 a set of pluggable tools to help the programmer in various ways. Some
21837 example tools are source structure, project manager, interactive help,
21839 (license license:bsd-2)))
21841 (define-public python-osc
21843 (name "python-osc")
21848 (uri (pypi-uri "python-osc" version))
21851 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
21852 (build-system python-build-system)
21853 (home-page "https://github.com/attwad/python-osc")
21854 (synopsis "Open Sound Control server and client implementations")
21856 "@code{python-osc} is a pure Python library with no external
21857 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
21858 Open Sound Control 1.0} specification.")
21859 (license license:unlicense)))
21861 (define-public python-voluptuous
21863 (name "python-voluptuous")
21868 (uri (pypi-uri "voluptuous" version))
21871 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
21872 (build-system python-build-system)
21874 `(("python-nose" ,python-nose)))
21875 (home-page "https://github.com/alecthomas/voluptuous")
21876 (synopsis "Python data validation library")
21878 "Voluptuous is a Python data validation library. It is primarily
21879 intended for validating data coming into Python as JSON, YAML, etc.")
21880 (license license:bsd-3)))
21882 (define-public python-cmd2
21884 (name "python-cmd2")
21889 (uri (pypi-uri "cmd2" version))
21892 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
21893 (build-system python-build-system)
21895 `(("python-attrs" ,python-attrs)
21896 ("python-colorama" ,python-colorama)
21897 ("python-pyperclip" ,python-pyperclip)
21898 ("python-wcwidth" ,python-wcwidth)))
21900 `(("python-codecov" ,python-codecov)
21901 ("python-coverage" ,python-coverage)
21902 ("python-doc8" ,python-doc8)
21903 ("python-flake8" ,python-flake8)
21904 ("python-invoke" ,python-invoke)
21905 ("python-mock" ,python-mock)
21906 ("python-pytest" ,python-pytest)
21907 ("python-pytest-cov" ,python-pytest-cov)
21908 ("python-pytest-mock" ,python-pytest-mock)
21909 ("python-setuptools-scm" ,python-setuptools-scm)
21910 ("python-sphinx" ,python-sphinx)
21911 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
21912 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21913 ("python-tox" ,python-tox)
21914 ("python-twine" ,python-twine)
21916 (home-page "https://github.com/python-cmd2/cmd2")
21917 (synopsis "Tool for building interactive command line applications")
21919 "Cmd2 is a tool for building interactive command line applications in
21920 Python. Its goal is to make it quick and easy for developers to build
21921 feature-rich and user-friendly interactive command line applications. It
21922 provides a simple API which is an extension of Python's built-in @code{cmd}
21923 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
21924 make your life easier and eliminates much of the boilerplate code which would
21925 be necessary when using @code{cmd}.")
21926 (license license:expat)))
21928 (define-public python-pytidylib
21930 (name "python-pytidylib")
21934 (uri (pypi-uri "pytidylib" version))
21937 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
21938 (build-system python-build-system)
21941 (modify-phases %standard-phases
21942 (add-before 'build 'qualify-libtidy
21943 (lambda* (#:key inputs #:allow-other-keys)
21944 (let ((libtidy (string-append (assoc-ref inputs "tidy")
21945 "/lib/libtidy.so")))
21946 (substitute* "tidylib/tidy.py"
21947 (("ctypes\\.util\\.find_library\\('tidy'\\)")
21948 (format #f "'~a'" libtidy)))
21950 (inputs `(("tidy" ,tidy)))
21951 (home-page "https://github.com/countergram/pytidylib")
21952 (synopsis "Python wrapper for HTML Tidy library")
21954 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
21955 allows you, from Python code, to “fix” invalid (X)HTML markup.")
21956 (license license:expat)))
21958 (define-public python2-pytidylib
21959 (package-with-python2 python-pytidylib))
21961 (define-public python-mujson
21963 (name "python-mujson")
21968 (uri (pypi-uri "mujson" version))
21971 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
21972 (build-system python-build-system)
21973 (home-page "https://github.com/mattgiles/mujson")
21974 (synopsis "Use the fastest JSON functions available at import time")
21975 (description "This packages selects the fastest JSON functions available
21977 (license license:expat)))
21979 (define-public python-bashlex
21981 (name "python-bashlex")
21986 (uri (pypi-uri "bashlex" version))
21989 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
21990 (build-system python-build-system)
21993 (modify-phases %standard-phases
21994 (add-before 'build 'pregenerate-yacc-tables
21996 ;; parser.py caches tables, which attempts to write to site lib
21997 ;; see https://github.com/idank/bashlex/issues/51
21998 (invoke "python" "-c" "import bashlex"))))))
22000 "https://github.com/idank/bashlex")
22001 (synopsis "Python parser for bash")
22002 (description "@code{bashlex} is a Python port of the parser used
22003 internally by GNU bash.
22005 For the most part it's transliterated from C, the major differences are:
22008 @item it does not execute anything
22009 @item it is reentrant
22010 @item it generates a complete AST
22013 (license license:gpl3+)))
22015 (define-public python-jinxed
22017 (name "python-jinxed")
22022 (uri (pypi-uri "jinxed" version))
22025 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22026 (build-system python-build-system)
22029 (modify-phases %standard-phases
22030 (add-before 'check 'set-environment-variables
22031 (lambda* (#:key inputs #:allow-other-keys)
22032 (let ((ncurses (assoc-ref inputs "ncurses")))
22033 (setenv "TERM" "LINUX")
22034 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22036 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22038 `(("ncurses" ,ncurses)))
22039 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22040 (synopsis "Jinxed Terminal Library")
22042 "Jinxed is an implementation of a subset of the Python curses library.")
22043 (license license:mpl2.0)))
22045 (define-public python-blessed
22047 (name "python-blessed")
22052 (uri (pypi-uri "blessed" version))
22055 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22056 (modules '((guix build utils)))
22059 ;; Don't get hung up on Windows test failures.
22060 (delete-file "blessed/win_terminal.py") #t))))
22061 (build-system python-build-system)
22063 `(("python-jinxed" ,python-jinxed)
22064 ("python-six" ,python-six)
22065 ("python-wcwidth" ,python-wcwidth)))
22067 `(("python-mock" ,python-mock)
22068 ("python-pytest" ,python-pytest)))
22069 (home-page "https://github.com/jquast/blessed")
22070 (synopsis "Wrapper around terminal capabilities")
22072 "Blessed is a thin, practical wrapper around terminal styling, screen
22073 positioning, and keyboard input.")
22074 (license license:expat)))
22076 (define-public python-readme-renderer
22078 (name "python-readme-renderer")
22083 (uri (pypi-uri "readme_renderer" version))
22086 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22087 (build-system python-build-system)
22089 `(("python-bleach" ,python-bleach)
22090 ("python-docutils" ,python-docutils)
22091 ("python-pygments" ,python-pygments)
22092 ("python-six" ,python-six)))
22094 `(("python-mock" ,python-mock)
22095 ("python-pytest" ,python-pytest)))
22096 (home-page "https://github.com/pypa/readme_renderer")
22097 (synopsis "Render README files in Warehouse")
22099 "Readme Renderer is a library that will safely render arbitrary README
22100 files into HTML. It is designed to be used in Warehouse to render the
22101 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22103 (license license:asl2.0)))
22105 (define-public python-lazr-delegates
22107 (name "python-lazr-delegates")
22112 (uri (pypi-uri "lazr.delegates" version))
22115 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22116 (build-system python-build-system)
22119 (modify-phases %standard-phases
22122 (invoke "python" "setup.py" "nosetests"))))))
22124 `(("python-nose" ,python-nose)))
22126 `(("python-zope-interface" ,python-zope-interface)))
22127 (home-page "https://launchpad.net/lazr.delegates")
22128 (synopsis "Easily write objects that delegate behavior")
22130 "The @code{lazr.delegates} package makes it easy to write objects that
22131 delegate behavior to another object. The new object adds some property or
22132 behavior on to the other object, while still providing the underlying interface,
22133 and delegating behavior.")
22134 (license license:lgpl3)))
22136 (define-public python-lazr-config
22138 (name "python-lazr-config")
22143 (uri (pypi-uri "lazr.config" version))
22146 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22147 (build-system python-build-system)
22150 (modify-phases %standard-phases
22153 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22155 `(("python-nose" ,python-nose)))
22157 `(("python-lazr-delegates" ,python-lazr-delegates)
22158 ("python-zope-interface" ,python-zope-interface)))
22159 (home-page "https://launchpad.net/lazr.config")
22160 (synopsis "Create configuration schemas and process and validate configurations")
22162 "The LAZR config system is typically used to manage process configuration.
22163 Process configuration is for saying how things change when we run systems on
22164 different machines, or under different circumstances. This system uses ini-like
22165 file format of section, keys, and values. The config file supports inheritance
22166 to minimize duplication of information across files. The format supports schema
22168 (license license:lgpl3)))
22170 (define-public python-flufl-bounce
22172 (name "python-flufl-bounce")
22177 (uri (pypi-uri "flufl.bounce" version))
22180 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22181 (build-system python-build-system)
22183 `(("python-atpublic" ,python-atpublic)
22184 ("python-zope-interface" ,python-zope-interface)))
22186 `(("python-nose2" ,python-nose2)))
22187 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22188 (synopsis "Email bounce detectors")
22189 (description "The @code{flufl.bounce} library provides a set of heuristics
22190 and an API for detecting the original bouncing email addresses from a bounce
22191 message. Many formats found in the wild are supported, as are VERP and
22193 (license (list license:asl2.0
22194 license:lgpl3)))) ; only for setup_headers.py
22196 (define-public python-flufl-i18n
22198 (name "python-flufl-i18n")
22203 (uri (pypi-uri "flufl.i18n" version))
22206 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22207 (build-system python-build-system)
22209 `(("python-atpublic" ,python-atpublic)))
22210 (home-page "https://flufli18n.readthedocs.io")
22211 (synopsis "API for Python internationalization")
22213 "This package provides a high-level, convenient API for managing
22214 internationalization/translation contexts in Python applications. There is a
22215 simple API for single-context applications, such as command line scripts which
22216 only need to translate into one language during the entire course of their
22217 execution. There is a more flexible, but still convenient API for multi-context
22218 applications, such as servers, which may need to switch language contexts for
22220 (license license:asl2.0)))
22222 (define-public python-flufl-lock
22224 (name "python-flufl-lock")
22229 (uri (pypi-uri "flufl.lock" version))
22232 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22233 (build-system python-build-system)
22235 `(("python-atpublic" ,python-atpublic)
22236 ("python-psutil" ,python-psutil)))
22237 (home-page "https://flufllock.readthedocs.io")
22238 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22240 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22241 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22242 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22243 and have a maximum lifetime built-in.")
22244 (license (list license:asl2.0
22245 license:lgpl3)))) ; only for setup_helpers.py
22247 (define-public python-flufl-testing
22249 (name "python-flufl-testing")
22254 (uri (pypi-uri "flufl.testing" version))
22257 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22258 (build-system python-build-system)
22260 `(("python-nose2" ,python-nose2)))
22261 (home-page "https://gitlab.com/warsaw/flufl.testing")
22262 (synopsis "Collection of test tool plugins")
22264 "This package contains a small collection of test tool plugins for
22265 @code{nose2} and @code{flake8}.")
22266 (license license:asl2.0)))
22268 (define-public python-devtools
22270 (name "python-devtools")
22275 (uri (git-reference
22276 (url "https://github.com/samuelcolvin/python-devtools")
22277 (commit (string-append "v" version))))
22278 (file-name (git-file-name name version))
22280 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22281 (build-system python-build-system)
22283 `(("python-pytest" ,python-pytest)
22284 ("python-pytest-mock" ,python-pytest-mock)))
22286 `(("python-pygments" ,python-pygments)))
22288 `(#:phases (modify-phases %standard-phases
22293 (home-page "https://github.com/samuelcolvin/python-devtools")
22294 (synopsis "Debug command and development tools")
22296 "This package provides a debug print command and other development tools.
22297 It adds a simple and readable way to print stuff during development.")
22298 (license license:expat)))
22300 (define-public python-dateparser
22302 (name "python-dateparser")
22307 (uri (pypi-uri "dateparser" version))
22310 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22311 (build-system python-build-system)
22313 `(("tzdata" ,tzdata)))
22315 `(("python-dateutil" ,python-dateutil)
22316 ("python-pytz" ,python-pytz)
22317 ("python-regex" ,python-regex)
22318 ("python-ruamel.yaml" ,python-ruamel.yaml)
22319 ("python-tzlocal" ,python-tzlocal)))
22321 `(("python-mock" ,python-mock)
22322 ("python-parameterized" ,python-parameterized)))
22324 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22327 (modify-phases %standard-phases
22328 (add-before 'check 'set-check-environment
22329 (lambda* (#:key inputs #:allow-other-keys)
22330 (setenv "TZ" "UTC")
22332 (string-append (assoc-ref inputs "tzdata")
22333 "/share/zoneinfo"))
22335 (home-page "https://github.com/scrapinghub/dateparser")
22337 "Date parsing library designed to parse dates from HTML pages")
22339 "@code{python-dateparser} provides modules to easily parse localized
22340 dates in almost any string formats commonly found on web pages.")
22341 (license license:bsd-3)))
22343 (define-public python-dparse
22345 (name "python-dparse")
22350 (uri (pypi-uri "dparse" version))
22353 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22354 (build-system python-build-system)
22356 `(("python-pytest" ,python-pytest)))
22358 `(("python-packaging" ,python-packaging)
22359 ("python-pyyaml" ,python-pyyaml)
22360 ("python-toml" ,python-toml)))
22361 (home-page "https://github.com/pyupio/dparse")
22362 (synopsis "Parser for Python dependency files")
22363 (description "This package provides a parser for Python dependency files.")
22364 (license license:expat)))
22366 (define-public python-dpath
22368 (name "python-dpath")
22373 (uri (pypi-uri "dpath" version))
22376 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22377 (build-system python-build-system)
22379 `(("python-hypothesis" ,python-hypothesis)
22380 ("python-mock" ,python-mock)
22381 ("python-nose" ,python-nose)))
22384 (modify-phases %standard-phases
22386 (lambda* (#:key inputs outputs #:allow-other-keys)
22387 (add-installed-pythonpath inputs outputs)
22388 ;; This invokation is taken from tox.ini.
22389 (invoke "nosetests" "-d" "-v" "tests/"))))))
22390 (home-page "https://github.com/akesterson/dpath-python")
22391 (synopsis "Filesystem-like pathing and searching for dictionaries")
22393 "@code{python-dpath} is a library for accessing and searching
22394 dictionaries via /slashed/paths ala xpath.
22396 Basically it lets you glob over a dictionary as if it were a filesystem. It
22397 allows you to specify globs (ala the bash eglob syntax, through some advanced
22398 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22399 facility for filtering those results.")
22400 (license license:expat)))
22402 (define-public python-safety
22404 (name "python-safety")
22409 (uri (pypi-uri "safety" version))
22412 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22413 (build-system python-build-system)
22416 (modify-phases %standard-phases
22417 (add-after 'unpack 'disable-tests
22419 (substitute* "tests/test_safety.py"
22420 ;; requires network
22421 (("def test_check_live") "def _test_check_live"))
22424 `(("python-click" ,python-click)
22425 ("python-dparse" ,python-dparse)
22426 ("python-packaging" ,python-packaging)
22427 ("python-requests" ,python-requests)))
22428 (home-page "https://github.com/pyupio/safety")
22429 (synopsis "Check installed dependencies for known vulnerabilities")
22430 (description "Safety checks installed dependencies for known vulnerabilities.
22431 By default it uses the open Python vulnerability database Safety DB.")
22432 (license license:expat)))
22434 (define-public python-pypandoc
22436 (name "python-pypandoc")
22441 (uri (pypi-uri "pypandoc" version))
22444 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22445 (build-system python-build-system)
22447 `(("pandoc" ,pandoc)
22448 ("pandoc-citeproc" ,pandoc-citeproc)))
22450 `(("wheel" ,python-wheel)))
22452 `(("texlive" ,(texlive-union (list texlive-amsfonts
22454 texlive-latex-hyperref
22455 texlive-latex-oberdiek
22457 texlive-xcolor)))))
22460 (modify-phases %standard-phases
22461 (add-before 'check 'disable-tests
22463 ;; Disable test requiring network access
22464 (substitute* "tests.py"
22465 (("test_basic_conversion_from_http_url")
22466 "skip_test_basic_conversion_from_http_url"))
22467 ;; Needed by texlive-union to generate fonts
22468 (setenv "HOME" "/tmp")
22470 (home-page "https://github.com/bebraw/pypandoc")
22471 (synopsis "Python wrapper for pandoc")
22472 (description "pypandoc is a thin Python wrapper around pandoc
22473 and pandoc-citeproc.")
22474 (license license:expat)))
22476 (define-public python-rnc2rng
22478 (name "python-rnc2rng")
22483 (uri (pypi-uri "rnc2rng" version))
22486 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22487 (build-system python-build-system)
22489 `(("python-rply" ,python-rply)))
22491 `(#:phases (modify-phases %standard-phases
22494 (invoke "python" "test.py"))))))
22495 (home-page "https://github.com/djc/rnc2rng")
22496 (synopsis "Convert RELAX NG Compact to regular syntax")
22498 "This package provides the @command{rnc2rng} command-line tool as well as
22499 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22500 equivalent schemata in the XML-based default RELAX NG syntax.")
22501 (license license:expat)))
22503 (define-public python-citeproc-py
22505 (name "python-citeproc-py")
22510 (uri (pypi-uri "citeproc-py" version))
22513 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22514 (build-system python-build-system)
22516 `(("python-lxml" ,python-lxml)
22517 ("python-rnc2rng" ,python-rnc2rng)))
22519 "https://github.com/brechtm/citeproc-py")
22520 (synopsis "Citations and bibliography formatter")
22522 "Citeproc-py is a CSL processor for Python. It aims to implement the
22523 CSL 1.0.1 specification. citeproc-py can output styled citations and
22524 bibliographies in a number of different output formats. Currently supported
22525 are plain text, reStructuredText and HTML.")
22526 (license license:bsd-2)))
22528 (define-public python-inform
22530 (name "python-inform")
22535 (uri (pypi-uri "inform" version))
22538 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
22539 (build-system python-build-system)
22541 `(#:tests? #f)) ; PyPI tarball lacks tests
22543 `(("python-hypothesis" ,python-hypothesis)
22544 ("python-pytest-cov" ,python-pytest-cov)
22545 ("python-pytest-runner" ,python-pytest-runner)))
22547 `(("python-arrow" ,python-arrow)
22548 ("python-six" ,python-six)))
22549 (home-page "https://inform.readthedocs.io")
22550 (synopsis "Print & logging utilities for communicating with user")
22552 "Inform is designed to display messages from programs that are typically run from
22553 a console. It provides a collection of ‘print’ functions that allow you to simply and
22554 cleanly print different types of messages.")
22555 (license license:gpl3+)))
22557 (define-public python-nestedtext
22559 (name "python-nestedtext")
22564 (uri (pypi-uri "nestedtext" version))
22567 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
22568 (build-system python-build-system)
22570 `(#:tests? #f)) ; PyPI tarball lacks tests
22572 `(("python-inform" ,python-inform)))
22573 (home-page "https://nestedtext.org")
22574 (synopsis "Human readable and writable data interchange format")
22576 "NestedText is a file format for holding data that is to be entered, edited, or
22577 viewed by people. It allows data to be organized into a nested collection of
22578 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
22579 without the complexity and risk of YAML and without the syntatic clutter of JSON.
22580 NestedText is both simple and natural. Only a small number of concepts and rules must
22581 be kept in mind when creating it. It is easily created, modified, or viewed with
22582 a text editor and easily understood and used by both programmers and non-programmers.")
22583 (license license:expat))) ; MIT license
22585 (define-public python-parallel
22587 (name "python-parallel")
22588 (version "1.6.4.4")
22592 (uri (string-append
22593 "https://www.parallelpython.com/downloads/pp/pp-"
22597 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
22599 `(("unzip" ,unzip)))
22600 (build-system python-build-system)
22601 (arguments '(#:tests? #f)) ; No test suite.
22602 (home-page "https://www.parallelpython.com")
22603 (synopsis "Parallel and distributed programming for Python")
22604 (description "Parallel Python module (PP) provides an easy and efficient
22605 way to create parallel-enabled applications for SMP computers and clusters.
22606 PP module features cross-platform portability and dynamic load balancing.
22607 Thus applications written with PP will parallelize efficiently even on
22608 heterogeneous and multi-platform clusters (including clusters running other
22609 applications with variable CPU loads).")
22610 (license license:bsd-3)))
22612 (define-public python2-parallel
22613 (package-with-python2 python-parallel))