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 aggressive 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-simpleaudio
1848 (name "python-simpleaudio")
1853 (uri (pypi-uri "simpleaudio" version))
1856 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1857 (build-system python-build-system)
1861 `(("alsa-lib" ,alsa-lib)))
1863 "https://github.com/hamiltron/py-simple-audio")
1864 (synopsis "Simple, asynchronous audio playback for Python 3")
1866 "The @code{simplaudio} package provides cross-platform, dependency-free
1867 audio playback capability for Python 3 on OSX, Windows, and Linux.")
1868 (license license:expat))) ; MIT license
1870 (define-public python-simplejson
1872 (name "python-simplejson")
1877 (uri (pypi-uri "simplejson" version))
1880 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1881 (build-system python-build-system)
1882 (home-page "http://simplejson.readthedocs.org/en/latest/")
1884 "Json library for Python")
1886 "JSON (JavaScript Object Notation) is a subset of JavaScript
1887 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1890 Simplejson exposes an API familiar to users of the standard library marshal
1891 and pickle modules. It is the externally maintained version of the json
1892 library contained in Python 2.6, but maintains compatibility with Python 2.5
1893 and (currently) has significant performance advantages, even without using
1894 the optional C extension for speedups. Simplejson is also supported on
1896 (license license:x11)))
1898 (define-public python2-simplejson
1899 (package-with-python2 python-simplejson))
1902 (define-public python-pyicu
1904 (name "python-pyicu")
1909 (uri (pypi-uri "PyICU" version))
1912 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1913 (build-system python-build-system)
1915 `(("icu4c" ,icu4c)))
1917 `(("python-pytest" ,python-pytest)
1918 ("python-six" ,python-six)))
1919 (home-page "https://github.com/ovalhub/pyicu")
1920 (synopsis "Python extension wrapping the ICU C++ API")
1922 "PyICU is a python extension wrapping the ICU C++ API.")
1923 (license license:x11)))
1925 (define-public python2-pyicu
1926 (package-with-python2 python-pyicu))
1928 (define-public python-dogtail
1930 (name "python-dogtail")
1936 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1937 "dogtail-" version ".tar.gz"))
1940 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1941 (build-system python-build-system)
1943 `(#:tests? #f ; TODO Launching dbus for the tests
1946 (modify-phases %standard-phases
1948 (lambda* (#:key tests? #:allow-other-keys)
1950 (system "Xvfb :1 &")
1951 (setenv "DISPLAY" ":1")
1952 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1955 `(("python-pygobject" ,python-pygobject)
1956 ("python-pycairo" ,python-pycairo)
1957 ("python-pyatspi" ,python-pyatspi)))
1959 `(("python-nose" ,python-nose)
1961 ("xvfb" ,xorg-server)
1963 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1964 ("gobject-introspection" ,gobject-introspection)))
1965 (home-page "https://gitlab.com/dogtail/dogtail/")
1966 (synopsis "GUI test tool and automation framework written in Python")
1968 "Dogtail is a GUI test tool and automation framework written in Python.
1969 It uses Accessibility (a11y) technologies to communicate with desktop
1970 applications. dogtail scripts are written in Python and executed like any
1971 other Python program.")
1972 (license license:gpl2+)))
1974 (define-public python2-dogtail
1975 (package-with-python2 python-dogtail))
1977 (define-public python-empy
1979 (name "python-empy")
1983 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1987 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1988 (build-system python-build-system)
1990 `(#:tests? #f)) ; python2 only
1991 (home-page "http://www.alcyone.com/software/empy/")
1992 (synopsis "Templating system for Python")
1994 "EmPy is a system for embedding Python expressions and statements in
1995 template text; it takes an EmPy source file, processes it, and produces
1996 output. This is accomplished via expansions, which are special signals to the
1997 EmPy system and are set off by a special prefix (by default the at sign, @@).
1998 EmPy can expand arbitrary Python expressions and statements in this way, as
1999 well as a variety of special forms. Textual data not explicitly delimited in
2000 this way is sent unaffected to the output, allowing Python to be used in
2001 effect as a markup language. Also supported are callbacks via hooks,
2002 recording and playback via diversions, and dynamic, chainable filters. The
2003 system is highly configurable via command line options and embedded
2005 (license license:lgpl2.1+)))
2007 (define-public python2-empy
2008 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2011 (arguments `(,@(package-arguments base)
2014 (define-public python2-element-tree
2016 (name "python2-element-tree")
2021 "http://effbot.org/media/downloads/elementtree-"
2022 version "-20050316.tar.gz"))
2025 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2026 (build-system python-build-system)
2028 `(#:python ,python-2 ; seems to be part of Python 3
2029 #:tests? #f)) ; no 'test' sub-command
2030 (synopsis "Toolkit for XML processing in Python")
2032 "ElementTree is a Python library supporting lightweight XML processing.")
2033 (home-page "https://effbot.org/zone/element-index.htm")
2034 (license (license:x11-style
2035 "http://docs.python.org/2/license.html"
2036 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2038 (define-public python2-pybugz
2040 (name "python2-pybugz")
2045 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2049 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2050 (patches (search-patches "pybugz-stty.patch"
2051 "pybugz-encode-error.patch"))))
2052 (build-system python-build-system)
2054 `(#:python ,python-2 ; SyntaxError with Python 3
2055 #:tests? #f)) ; no 'test' sub-command
2057 `(("element-tree" ,python2-element-tree)))
2058 (synopsis "Python and command-line interface to Bugzilla")
2060 "PyBugz is a Python library and command-line tool to query the Bugzilla
2061 bug tracking system. It is meant as an aid to speed up interaction with the
2063 (home-page "http://www.liquidx.net/pybugz/")
2064 (license license:gpl2)))
2066 (define-public python2-enum
2068 (name "python2-enum")
2072 (uri (pypi-uri "enum" version))
2075 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2076 (build-system python-build-system)
2078 `(#:python ,python-2))
2079 (home-page "https://pypi.org/project/enum/")
2080 (synopsis "Robust enumerated type support in Python")
2082 "This provides a module for robust enumerations in Python. It has
2083 been superseded by the Python standard library and is provided only for
2085 ;; Choice of either license.
2086 (license (list license:gpl3+ license:psfl))))
2088 (define-public python-enum34
2090 (name "python-enum34")
2095 (uri (pypi-uri "enum34" version))
2098 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2099 (build-system python-build-system)
2100 (home-page "https://pypi.org/project/enum34/")
2101 (synopsis "Backported Python 3.4 Enum")
2103 "Enum34 is the new Python stdlib enum module available in Python 3.4
2104 backported for previous versions of Python from 2.4 to 3.3.")
2105 (license license:bsd-3)))
2107 (define-public python2-enum34
2108 (package-with-python2 python-enum34))
2110 (define-public python-parse-type
2112 (name "python-parse-type")
2117 (uri (pypi-uri "parse_type" version))
2120 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2121 (build-system python-build-system)
2123 `(("python-six" ,python-six)
2124 ("python-parse" ,python-parse)))
2126 `(("python-pytest" ,python-pytest)
2127 ("python-pytest-runner" ,python-pytest-runner)))
2128 (home-page "https://github.com/jenisys/parse_type")
2129 (synopsis "Extended parse module")
2131 "Parse_type extends the python parse module.")
2133 `((python2-variant . ,(delay python2-parse-type))))
2134 (license license:bsd-3)))
2136 (define-public python2-parse-type
2137 (let ((base (package-with-python2
2138 (strip-python2-variant python-parse-type))))
2139 (package (inherit base)
2141 `(("python2-enum34" ,python2-enum34)
2142 ,@(package-propagated-inputs base))))))
2144 (define-public python-parse
2146 (name "python-parse")
2151 (uri (pypi-uri "parse" version))
2154 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
2155 (build-system python-build-system)
2158 (modify-phases %standard-phases
2160 (lambda _ (invoke "python" "test_parse.py"))))))
2161 (home-page "https://github.com/r1chardj0n3s/parse")
2162 (synopsis "Parse strings")
2164 "Parse strings using a specification based on the Python @code{format()}
2166 (license license:x11)))
2168 (define-public python-polib
2170 (name "python-polib")
2174 (uri (pypi-uri "polib" version))
2177 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2178 (build-system python-build-system)
2179 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2180 (synopsis "Manipulate, create and modify gettext files")
2181 (description "Polib can manipulate any gettext format (po, pot and mo)
2182 files. It can be used to create po files from scratch or to modify
2184 (license license:expat)))
2186 (define-public python2-polib
2187 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2190 (arguments `(,@(package-arguments base)
2191 ;; Tests don't work with python2.
2194 (define-public python-poyo
2196 (name "python-poyo")
2201 (uri (pypi-uri "poyo" version))
2204 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2205 (build-system python-build-system)
2206 (home-page "https://github.com/hackebrot/poyo")
2207 (synopsis "Lightweight YAML Parser for Python")
2209 "This package provides a lightweight YAML Parser for Python. It supports
2210 only a chosen subset of the YAML format that is required to parse cookiecutter
2211 user configuration files. It does not have support for serializing into YAML
2212 and is not compatible with JSON.")
2213 (license license:expat)))
2215 (define-public scons
2222 (url "https://github.com/SCons/scons")
2224 (file-name (git-file-name name version))
2227 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2228 (build-system python-build-system)
2230 `(#:use-setuptools? #f ; still relies on distutils
2231 #:tests? #f ; no 'python setup.py test' command
2233 (modify-phases %standard-phases
2234 (add-before 'build 'bootstrap
2236 (substitute* "src/engine/SCons/compat/__init__.py"
2237 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2238 "sys.modules[new] = __import__(old)"))
2239 (substitute* "src/engine/SCons/Platform/__init__.py"
2240 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2241 "mod = __import__(full_name)"))
2242 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2243 (chdir "build/scons")
2245 (home-page "https://scons.org/")
2246 (synopsis "Software construction tool written in Python")
2248 "SCons is a software construction tool. Think of SCons as an improved,
2249 cross-platform substitute for the classic Make utility with integrated
2250 functionality similar to autoconf/automake and compiler caches such as ccache.
2251 In short, SCons is an easier, more reliable and faster way to build
2253 (license license:x11)))
2255 (define-public scons-python2
2257 (inherit (package-with-python2 scons))
2258 (name "scons-python2")))
2260 (define-public python-extras
2262 (name "python-extras")
2267 (uri (pypi-uri "extras" version))
2270 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2271 (build-system python-build-system)
2273 ;; FIXME: Circular dependency on testtools.
2275 (home-page "https://github.com/testing-cabal/extras")
2276 (synopsis "Useful extensions to the Python standard library")
2278 "Extras is a set of extensions to the Python standard library.")
2279 (license license:expat)))
2281 (define-public python2-extras
2282 (package-with-python2 python-extras))
2284 (define-public python-mimeparse
2286 (name "python-mimeparse")
2291 (uri (pypi-uri "python-mimeparse" version))
2294 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2295 (build-system python-build-system)
2298 (modify-phases %standard-phases
2301 (invoke "./mimeparse_test.py"))))))
2303 "https://github.com/dbtsai/python-mimeparse")
2304 (synopsis "Python library for parsing MIME types")
2306 "Mimeparse provides basic functions for parsing MIME type names and
2307 matching them against a list of media-ranges.")
2308 (license license:expat)))
2310 (define-public python2-mimeparse
2311 (package-with-python2 python-mimeparse))
2313 (define-public python-miniboa
2315 (name "python-miniboa")
2320 (uri (pypi-uri "miniboa" version))
2323 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2324 (build-system python-build-system)
2325 (home-page "https://github.com/shmup/miniboa")
2326 (synopsis "Simple, single-threaded Telnet server")
2328 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2330 (license license:asl2.0)))
2332 (define-public python2-miniboa
2333 (package-with-python2 python-miniboa))
2335 (define-public python-pafy
2337 (name "python-pafy")
2342 (uri (pypi-uri "pafy" version))
2345 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2346 (build-system python-build-system)
2348 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2350 ;; Youtube-dl is a python package which is imported in the file
2351 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2352 `(("youtube-dl" ,youtube-dl)))
2353 (home-page "https://np1.github.io/pafy/")
2354 (synopsis "Retrieve YouTube content and metadata")
2356 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2357 (license license:lgpl3+)))
2359 (define-public python2-funcsigs
2361 (name "python2-funcsigs")
2365 (uri (pypi-uri "funcsigs" version))
2368 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2369 (build-system python-build-system)
2371 `(#:python ,python-2))
2373 `(("python2-unittest2" ,python2-unittest2)))
2374 (home-page "http://funcsigs.readthedocs.org")
2375 (synopsis "Python function signatures from PEP362")
2377 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2378 (license license:asl2.0)))
2380 (define-public python2-funcsigs-bootstrap
2382 (inherit python2-funcsigs)
2383 (name "python2-funcsigs-bootstrap")
2387 ,@(package-arguments python2-funcsigs)))))
2389 (define-public python-py
2396 (uri (pypi-uri "py" version))
2399 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2400 (build-system python-build-system)
2402 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2403 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2404 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2405 ;; Is this module globally installed?"
2408 `(("python-setuptools-scm" ,python-setuptools-scm)))
2409 (home-page "https://github.com/pytest-dev/py")
2410 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2412 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2413 code introspection, and logging.")
2414 (license license:expat)))
2416 (define-public python2-py
2417 (package-with-python2 python-py))
2419 ;; Recent versions of python-fixtures and python-testrepository need
2420 ;; python-pbr for packaging, which itself needs these two packages for
2422 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2423 ;; same source, just without any test dependencies and with tests disabled.
2424 ;; python-pbr-minmal is then used to package python-fixtures and
2425 ;; python-testrepository.
2426 ;; Strictly speaking we currently could remove the test-requirements from the
2427 ;; normal python-pbr package (and save this package) since test are disabled
2428 ;; there anyway. But this may change in future.
2429 (define-public python-pbr-minimal
2431 (name "python-pbr-minimal")
2436 (uri (pypi-uri "pbr" version))
2439 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2440 (build-system python-build-system)
2443 (home-page "https://docs.openstack.org/pbr/latest/")
2444 (synopsis "Minimal build of python-pbr used for bootstrapping")
2446 "Used only for bootstrapping python2-pbr, you should not need this.")
2447 (license license:asl2.0)))
2449 (define-public python2-pbr-minimal
2450 (package-with-python2 python-pbr-minimal))
2452 (define-public python-pbr
2454 (inherit python-pbr-minimal)
2457 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2459 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2461 `(("python-fixtures" ,python-fixtures-bootstrap)
2462 ;; discover, coverage, hacking, subunit
2463 ("python-mock" ,python-mock)
2464 ("python-six" ,python-six)
2465 ("python-sphinx" ,python-sphinx)
2466 ("python-testrepository" ,python-testrepository-bootstrap)
2467 ("python-testresources" ,python-testresources-bootstrap)
2468 ("python-testscenarios" ,python-testscenarios-bootstrap)
2469 ("python-testtools" ,python-testtools-bootstrap)
2470 ("python-virtualenv" ,python-virtualenv)))
2471 (synopsis "Enhance the default behavior of Python’s setuptools")
2473 "Python Build Reasonableness (PBR) is a library that injects some useful
2474 and sensible default behaviors into your setuptools run. It will set
2475 versions, process requirements files and generate AUTHORS and ChangeLog file
2476 from git information.
2479 (define-public python2-pbr
2480 (package-with-python2 python-pbr))
2482 (define-public python-pyrsistent
2484 (name "python-pyrsistent")
2486 (home-page "https://github.com/tobgu/pyrsistent")
2489 (uri (pypi-uri "pyrsistent" version))
2492 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2493 (build-system python-build-system)
2495 '(#:phases (modify-phases %standard-phases
2496 ;; The package works fine with newer Pytest and Hypothesis, but
2497 ;; has pinned older versions to stay compatible with Python 2.
2498 (add-before 'check 'loosen-pytest-requirement
2500 (substitute* "setup.py"
2501 (("pytest<5") "pytest")
2502 (("hypothesis<5") "hypothesis"))
2505 `(("python-hypothesis" ,python-hypothesis)
2506 ("python-pytest" ,python-pytest)
2507 ("python-pytest-runner" ,python-pytest-runner)))
2509 `(("python-six" ,python-six)))
2510 (synopsis "Persistent data structures for Python")
2512 "Pyrsistent is a number of persistent collections (by some referred to as
2513 functional data structures). Persistent in the sense that they are immutable.
2515 All methods on a data structure that would normally mutate it instead return a
2516 new copy of the structure containing the requested updates. The original
2517 structure is left untouched.")
2518 (license license:expat)))
2520 (define-public python2-pyrsistent
2521 (package-with-python2 python-pyrsistent))
2523 (define-public python-exif-read
2525 (name "python-exif-read")
2529 (uri (pypi-uri "ExifRead" version))
2532 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2533 (build-system python-build-system)
2534 (arguments `(#:tests? #f)) ; no tests
2535 (home-page "https://github.com/ianare/exif-py")
2536 (synopsis "Python library to extract EXIF data from image files")
2538 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2540 (license license:bsd-3)))
2542 (define-public python2-exif-read
2543 (package-with-python2 python-exif-read))
2545 (define-public python-pyld
2547 (name "python-pyld")
2551 (uri (pypi-uri "PyLD" version))
2554 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2555 (build-system python-build-system)
2556 (home-page "https://github.com/digitalbazaar/pyld")
2557 (synopsis "Python implementation of the JSON-LD specification")
2559 "PyLD is an implementation of the JSON-LD specification.")
2560 (license license:bsd-3)))
2562 (define-public python2-pyld
2563 (package-with-python2 python-pyld))
2565 (define-public python-cli-helpers
2567 (name "python-cli-helpers")
2571 ;; There's no source tarball on PyPI.
2574 (url "https://github.com/dbcli/cli_helpers")
2575 (commit (string-append "v" version))))
2576 (file-name (git-file-name name version))
2578 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2579 (build-system python-build-system)
2581 `(("python-pytest" ,python-pytest)))
2583 `(("python-wcwidth" ,python-wcwidth)
2584 ("python-configobj" ,python-configobj)
2585 ("python-tabulate" ,python-tabulate)
2586 ("python-terminaltables" ,python-terminaltables)))
2587 (home-page "https://github.com/dbcli/cli_helpers")
2588 (synopsis "Helpers for building command-line apps")
2590 "CLI Helpers is a Python package that makes it easy to perform common
2591 tasks when building command-line apps. It's a helper library for command-line
2593 (license license:bsd-3)))
2595 (define-public python-click
2597 (name "python-click")
2602 (uri (pypi-uri "click" version))
2605 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2606 (build-system python-build-system)
2609 (modify-phases %standard-phases
2610 (add-after 'unpack 'fix-paths
2611 (lambda* (#:key inputs #:allow-other-keys)
2612 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2613 "cross-libc" "libc"))))
2614 (substitute* "src/click/_unicodefun.py"
2616 (string-append "'" glibc "/bin/locale'"))))
2620 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2621 (invoke "python" "-m" "pytest"))))))
2623 `(("python-pytest" ,python-pytest)))
2624 (home-page "https://palletsprojects.com/p/click/")
2625 (synopsis "Command line library for Python")
2627 "Click is a Python package for creating command line interfaces in a
2628 composable way with as little code as necessary. Its name stands for
2629 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2630 with sensible defaults out of the box.")
2631 (license license:bsd-3)))
2633 (define-public python2-click
2634 (package-with-python2 python-click))
2636 (define-public python-click-5
2637 (package (inherit python-click)
2638 (name "python-click")
2643 (uri (pypi-uri "click" version))
2645 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2648 (define-public python-wheel
2650 (name "python-wheel")
2655 (uri (pypi-uri "wheel" version))
2658 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2659 (build-system python-build-system)
2661 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2662 ;; fails to find the newly-built bdist_wheel library, even though it is
2663 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2665 (home-page "https://bitbucket.org/pypa/wheel/")
2666 (synopsis "Format for built Python packages")
2668 "A wheel is a ZIP-format archive with a specially formatted filename and
2669 the @code{.whl} extension. It is designed to contain all the files for a PEP
2670 376 compatible install in a way that is very close to the on-disk format. Many
2671 packages will be properly installed with only the @code{Unpack} step and the
2672 unpacked archive preserves enough information to @code{Spread} (copy data and
2673 scripts to their final locations) at any later time. Wheel files can be
2674 installed with a newer @code{pip} or with wheel's own command line utility.")
2675 (license license:expat)))
2677 (define-public python2-wheel
2678 (package-with-python2 python-wheel))
2680 (define-public python-vcversioner
2682 (name "python-vcversioner")
2683 (version "2.16.0.0")
2687 (uri (pypi-uri "vcversioner" version))
2690 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2691 (build-system python-build-system)
2692 (synopsis "Python library for version number discovery")
2693 (description "Vcversioner is a Python library that inspects tagging
2694 information in a variety of version control systems in order to discover
2696 (home-page "https://github.com/habnabit/vcversioner")
2697 (license license:isc)))
2699 (define-public python2-vcversioner
2700 (package-with-python2 python-vcversioner))
2702 (define-public python-jdcal
2704 (name "python-jdcal")
2709 (uri (pypi-uri "jdcal" version))
2712 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2713 (build-system python-build-system)
2715 `(#:phases (modify-phases %standard-phases
2718 (invoke "pytest"))))))
2720 `(("python-pytest" ,python-pytest)))
2721 (home-page "https://github.com/phn/jdcal")
2722 (synopsis "Functions to convert between Julian dates Gregorian dates")
2723 (description "This Python library provides functions for converting
2724 between Julian dates and Gregorian dates.")
2725 (license license:bsd-2)))
2727 (define-public python2-jdcal
2728 (package-with-python2 python-jdcal))
2730 (define-public python-jsondiff
2732 (name "python-jsondiff")
2737 (uri (pypi-uri "jsondiff" version))
2740 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2741 (build-system python-build-system)
2743 `(("python-nose" ,python-nose)
2744 ("python-nose-random" ,python-nose-random)))
2746 "https://github.com/fzumstein/jsondiff")
2747 (synopsis "Compare JSON and JSON-like structures in Python")
2748 (description "@code{jsondiff} is a Python library which lets you
2749 compare, diff, and patch JSON and JSON-like structures in Python.")
2750 (license license:expat)))
2752 (define-public python-jsonschema
2754 (name "python-jsonschema")
2758 (uri (pypi-uri "jsonschema" version))
2761 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2762 (build-system python-build-system)
2765 (modify-phases %standard-phases
2767 (lambda* (#:key inputs outputs #:allow-other-keys)
2768 (add-installed-pythonpath inputs outputs)
2769 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2770 (invoke "trial" "jsonschema"))))))
2772 `(("python-setuptools_scm" ,python-setuptools-scm)
2773 ("python-twisted" ,python-twisted)))
2775 `(("python-attrs" ,python-attrs)
2776 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2777 ("python-pyrsistent" ,python-pyrsistent)
2778 ("python-six" ,python-six)))
2779 (home-page "https://github.com/Julian/jsonschema")
2780 (synopsis "Implementation of JSON Schema for Python")
2782 "Jsonschema is an implementation of JSON Schema for Python.")
2783 (license license:expat)
2784 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2786 (define-public python2-jsonschema
2787 (let ((jsonschema (package-with-python2
2788 (strip-python2-variant python-jsonschema))))
2789 (package (inherit jsonschema)
2791 `(("python2-functools32" ,python2-functools32)
2792 ,@(package-propagated-inputs jsonschema))))))
2794 (define-public python-schema
2796 (name "python-schema")
2801 (uri (pypi-uri "schema" version))
2804 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2805 (build-system python-build-system)
2807 `(("python-pytest" ,python-pytest)))
2808 (home-page "https://github.com/keleshev/schema")
2809 (synopsis "Simple data validation library")
2811 "@code{python-schema} is a library for validating Python data
2812 structures, such as those obtained from config-files, forms, external
2813 services or command-line parsing, converted from JSON/YAML (or
2814 something else) to Python data-types.")
2815 (license license:psfl)))
2817 (define-public python2-schema
2818 (package-with-python2 python-schema))
2820 (define-public python-schema-0.5
2821 (package (inherit python-schema)
2826 (uri (pypi-uri "schema" version))
2829 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2831 (define-public python2-schema-0.5
2832 (package-with-python2 python-schema-0.5))
2834 (define-public python-kitchen
2836 (name "python-kitchen")
2841 (uri (pypi-uri "kitchen" version))
2844 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2845 (build-system python-build-system)
2847 `(("python-chardet" ,python-chardet)))
2848 (home-page "https://github.com/fedora-infra/kitchen")
2849 (synopsis "Python API for snippets")
2850 (description "@code{kitchen} module provides a python API for all sorts of
2851 little useful snippets of code that everybody ends up writing for their projects
2852 but never seem big enough to build an independent release. Use kitchen and stop
2853 cutting and pasting that code over and over.")
2854 (license (list license:lgpl2.1+
2855 ;; subprocess.py, test_subprocess.py,
2856 ;; kitchen/pycompat25/defaultdict.py:
2859 (define-public python2-kitchen
2860 (package-with-python2 python-kitchen))
2862 (define-public python-unidecode
2864 (name "python-unidecode")
2868 (uri (pypi-uri "Unidecode" version))
2871 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2872 (build-system python-build-system)
2873 (home-page "https://pypi.org/project/Unidecode/")
2874 (synopsis "ASCII transliterations of Unicode text")
2876 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2877 useful when integrating with legacy code that doesn't support Unicode, or for
2878 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2879 machine identifiers from human-readable Unicode strings that should still be
2880 somewhat intelligible.")
2881 (license license:gpl2+)))
2883 (define-public python2-unidecode
2884 (package-with-python2 python-unidecode))
2886 (define-public python-text-unidecode
2888 (name "python-text-unidecode")
2892 (uri (pypi-uri "text-unidecode" version))
2895 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2896 (build-system python-build-system)
2898 '(#:phases (modify-phases %standard-phases
2901 (setenv "PYTHONPATH"
2902 (string-append "./build/lib:"
2903 (getenv "PYTHONPATH")))
2904 (invoke "pytest" "-vv"))))))
2906 `(("python-pytest" ,python-pytest)))
2907 (home-page "https://github.com/kmike/text-unidecode/")
2908 (synopsis "Decode Unicode data")
2910 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2911 Perl library. It can create ASCII representations of Unicode data. In general
2912 users should prefer the @code{python-unidecode} package which offers better
2913 memory usage and transliteration quality.")
2914 ;; The user can choose either license.
2915 (license (list license:clarified-artistic license:gpl2+))))
2917 (define-public python2-text-unidecode
2918 (package-with-python2 python-text-unidecode))
2920 (define-public python-pyjwt
2922 (name "python-pyjwt")
2927 (uri (pypi-uri "PyJWT" version))
2930 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2931 (modules '((guix build utils)))
2934 (for-each delete-file-recursively
2935 (find-files "." "\\.pyc$"))
2937 (build-system python-build-system)
2939 '(#:phases (modify-phases %standard-phases
2942 ;; Mimic upstream commit 3a20892442b34c7 to get
2943 ;; rid of dependency on pytest-runner < 5.0.
2944 ;; Remove substitution for PyJWT > 1.7.1.
2945 (substitute* "setup.py"
2946 ((".*pytest-runner.*")
2948 (invoke "pytest" "-vv"))))))
2950 `(("python-pytest" ,python-pytest)
2951 ("python-pytest-cov" ,python-pytest-cov)))
2952 (home-page "https://github.com/progrium/pyjwt")
2953 (synopsis "JSON Web Token implementation in Python")
2955 "PyJWT is a JSON Web Token implementation written in Python.")
2956 (license license:expat)))
2958 (define-public python2-pyjwt
2959 (package-with-python2 python-pyjwt))
2961 (define-public python-pykka
2963 (name "python-pykka")
2968 (uri (pypi-uri "Pykka" version))
2971 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2972 (build-system python-build-system)
2974 `(("python-mock" ,python-mock)
2975 ("python-nose" ,python-nose)
2976 ("python-gevent" ,python-gevent)
2977 ("python-eventlet" ,python-eventlet)))
2978 (home-page "https://www.pykka.org/")
2979 (synopsis "Pykka is a Python implementation of the actor model")
2981 "Pykka is a Python implementation of the actor model.
2982 The actor model introduces some simple rules to control the sharing
2983 of state and cooperation between execution units, which makes it
2984 easier to build concurrent applications.")
2985 (license license:asl2.0)))
2987 (define-public python2-pykka
2988 (package-with-python2 python-pykka))
2990 (define-public python-pymsgbox
2992 (name "python-pymsgbox")
2998 ;; LICENSE.txt is not present on pypi
2999 (url "https://github.com/asweigart/PyMsgBox")
3000 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3001 (file-name (git-file-name name version))
3004 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3006 ;; Circular dependency to run tests:
3007 ;; Tests need pyautogui, which depends on pymsgbox.
3009 (build-system python-build-system)
3010 (home-page "https://github.com/asweigart/PyMsgBox")
3011 (synopsis "Python module for JavaScript-like message boxes")
3013 "PyMsgBox is a simple, cross-platform, pure Python module for
3014 JavaScript-like message boxes. Types of dialog boxes include:
3022 (license license:bsd-3)))
3024 (define-public python-pympler
3026 (name "python-pympler")
3027 (home-page "https://pythonhosted.org/Pympler/")
3031 (uri (pypi-uri "Pympler" version))
3034 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3035 (build-system python-build-system)
3037 `(#:phases (modify-phases %standard-phases
3039 (add-after 'install 'check
3040 (lambda* (#:key inputs outputs #:allow-other-keys)
3041 (add-installed-pythonpath inputs outputs)
3042 (invoke "python" "setup.py" "test"))))))
3043 (synopsis "Measure, monitor and analyze memory behavior")
3045 "Pympler is a development tool to measure, monitor and analyze
3046 the memory behavior of Python objects in a running Python application.
3048 By pympling a Python application, detailed insight in the size and the
3049 lifetime of Python objects can be obtained. Undesirable or unexpected
3050 runtime behavior like memory bloat and other @samp{pymples} can easily
3053 A web profiling frontend exposes process statistics, garbage
3054 visualisation and class tracker statistics.")
3055 (license license:asl2.0)))
3057 (define-public python2-pympler
3058 (package-with-python2 python-pympler))
3060 (define-public python-itsdangerous
3062 (name "python-itsdangerous")
3067 (uri (pypi-uri "itsdangerous" version))
3070 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3071 (build-system python-build-system)
3072 (home-page "https://palletsprojects.com/p/itsdangerous/")
3073 (synopsis "Python library for passing data to/from untrusted environments")
3075 "Itsdangerous provides various helpers to pass trusted data to untrusted
3076 environments and back.")
3077 (license license:bsd-3)))
3079 (define-public python2-itsdangerous
3080 (package-with-python2 python-itsdangerous))
3082 (define-public python-pyyaml
3084 (name "python-pyyaml")
3089 (uri (pypi-uri "PyYAML" version))
3092 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3093 (build-system python-build-system)
3095 `(("libyaml" ,libyaml)))
3096 (home-page "https://pyyaml.org")
3097 (synopsis "YAML parser and emitter for Python")
3099 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3100 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3101 API, and sensible error messages. PyYAML supports standard YAML tags and
3102 provides Python-specific tags that represent an arbitrary Python object.")
3103 (license license:expat)))
3105 (define-public python2-pyyaml
3106 (package-with-python2 python-pyyaml))
3108 (define-public python-vine
3110 (name "python-vine")
3115 (uri (pypi-uri "vine" version))
3118 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3119 (build-system python-build-system)
3121 `(("python-pytest" ,python-pytest)
3122 ("python-case" ,python-case)))
3123 (home-page "https://github.com/celery/vine")
3124 (synopsis "Promises for Python")
3126 "@code{vine} provides a special implementation of promises in that it can
3127 be used both for \"promise of a value\" and lazy evaluation. The biggest
3128 upside for this is that everything in a promise can also be a promise,
3129 e.g. filters, callbacks and errbacks can all be promises.")
3130 (license license:bsd-3)))
3132 (define-public python-virtualenv
3134 (name "python-virtualenv")
3139 (uri (pypi-uri "virtualenv" version))
3142 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
3143 (build-system python-build-system)
3145 `(("python-mock" ,python-mock)
3146 ("python-pytest" ,python-pytest)
3147 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3148 ;; be an input at all". However, removing the input makes the build error:
3149 ;; File "setup.py", line 4, in <module>
3150 ;; raise RuntimeError("setuptools >= 41 required to build")
3151 ("python-setuptools" ,python-setuptools)
3152 ("python-setuptools-scm" ,python-setuptools-scm)))
3154 `(("python-appdirs" ,python-appdirs)
3155 ("python-distlib" ,python-distlib)
3156 ("python-filelock" ,python-filelock)
3157 ("python-six" ,python-six)
3158 ("python-importlib-metadata" ,python-importlib-metadata)))
3159 (home-page "https://virtualenv.pypa.io/")
3160 (synopsis "Virtual Python environment builder")
3162 "Virtualenv is a tool to create isolated Python environments.")
3163 (properties `((python2-variant . ,(delay python2-virtualenv))))
3164 (license license:expat)))
3166 (define-public python2-virtualenv
3167 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3171 `(#:python ,python-2
3173 (modify-phases %standard-phases
3174 (add-after 'set-paths 'adjust-PYTHONPATH
3175 (lambda* (#:key inputs #:allow-other-keys)
3176 (let* ((python (assoc-ref inputs "python"))
3177 (python-sitedir (string-append python "/lib/python2.7"
3179 ;; XXX: 'python2' always comes first on PYTHONPATH
3180 ;; and shadows the 'setuptools' input. Move python2
3181 ;; last: this should be fixed in python-build-system
3182 ;; in a future rebuild cycle.
3183 (setenv "PYTHONPATH"
3184 (string-append (string-join (delete python-sitedir
3186 (getenv "PYTHONPATH")
3189 ":" python-sitedir))
3190 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3191 (getenv "PYTHONPATH"))
3194 `(("python-contextlib2" ,python2-contextlib2)
3195 ,@(package-propagated-inputs base))))))
3197 (define-public python-markupsafe
3199 (name "python-markupsafe")
3204 (uri (pypi-uri "MarkupSafe" version))
3207 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3208 (build-system python-build-system)
3210 `(#:modules ((ice-9 ftw)
3214 (guix build python-build-system))
3215 #:phases (modify-phases %standard-phases
3218 (let ((cwd (getcwd))
3219 (libdir (find (cut string-prefix? "lib." <>)
3220 (scandir "build"))))
3221 (setenv "PYTHONPATH"
3222 (string-append cwd "/build/" libdir ":"
3223 (getenv "PYTHONPATH")))
3224 (invoke "pytest" "-vv")))))))
3226 `(("python-pytest" ,python-pytest)))
3227 (home-page "https://github.com/mitsuhiko/markupsafe")
3228 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3230 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3232 (license license:bsd-3)))
3234 (define-public python2-markupsafe
3235 (package-with-python2 python-markupsafe))
3237 (define-public python-jinja2
3239 (name "python-jinja2")
3244 (uri (pypi-uri "Jinja2" version))
3247 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3248 (build-system python-build-system)
3250 '(#:phases (modify-phases %standard-phases
3252 (lambda* (#:key tests? #:allow-other-keys)
3255 (setenv "PYTHONPATH"
3256 (string-append "./build/lib:"
3257 (getenv "PYTHONPATH")))
3258 (invoke "pytest" "-vv"))
3259 (format #t "test suite not run~%"))
3262 `(("python-pytest" ,python-pytest)))
3264 `(("python-markupsafe" ,python-markupsafe)))
3265 (home-page "http://jinja.pocoo.org/")
3266 (synopsis "Python template engine")
3268 "Jinja2 is a small but fast and easy to use stand-alone template engine
3269 written in pure Python.")
3270 (license license:bsd-3)))
3272 (define-public python2-jinja2
3273 (package-with-python2 python-jinja2))
3275 (define-public python-jinja2-time
3277 (name "python-jinja2-time")
3282 (uri (pypi-uri "jinja2-time" version))
3285 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3286 (build-system python-build-system)
3288 `(("python-arrow" ,python-arrow)
3289 ("python-jinja2" ,python-jinja2)))
3291 "https://github.com/hackebrot/jinja2-time")
3292 (synopsis "Jinja2 Extension for Dates and Times")
3294 "This package provides an extension for the template engine Jinja2. It
3295 adds a 'now' tag providing a convenient access to the arrow.now() API from
3296 templates. A format string can be provided to control the output.")
3297 (license license:expat)))
3299 (define-public python-pystache
3301 (name "python-pystache")
3305 (uri (pypi-uri "pystache" version))
3308 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3309 (build-system python-build-system)
3311 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3312 (home-page "http://defunkt.io/pystache/")
3313 (synopsis "Python logic-less template engine")
3315 "Pystache is a Python implementation of the framework agnostic,
3316 logic-free templating system Mustache.")
3317 (license license:expat)
3318 (properties `((python2-variant . ,(delay python2-pystache))))))
3320 (define-public python2-pystache
3321 (package (inherit (package-with-python2
3322 (strip-python2-variant python-pystache)))
3324 `(#:python ,python-2
3326 (modify-phases %standard-phases
3329 (invoke "python" "test_pystache.py"))))))))
3331 (define-public python-joblib
3333 (name "python-joblib")
3337 (uri (pypi-uri "joblib" version))
3340 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3341 (build-system python-build-system)
3344 (modify-phases %standard-phases
3346 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3348 `(("python-pytest" ,python-pytest)))
3349 (home-page "https://joblib.readthedocs.io/")
3350 (synopsis "Using Python functions as pipeline jobs")
3352 "Joblib is a set of tools to provide lightweight pipelining in Python.
3353 In particular, joblib offers: transparent disk-caching of the output values
3354 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3355 logging and tracing of the execution.")
3356 (license license:bsd-3)))
3358 (define-public python2-joblib
3359 (package-with-python2 python-joblib))
3361 (define-public python-daemon
3363 (name "python-daemon")
3368 (uri (pypi-uri "python-daemon" version))
3371 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3372 (build-system python-build-system)
3375 (modify-phases %standard-phases
3376 (add-before 'check 'disable-tests
3378 ;; FIXME: Determine why test fails
3379 (substitute* "test/test_daemon.py"
3380 (("test_detaches_process_context")
3381 "skip_test_detaches_process_context"))
3384 `(("python-lockfile" ,python-lockfile)))
3386 `(("python-unittest2" ,python-unittest2)
3387 ("python-testtools" ,python-testtools)
3388 ("python-testscenarios" ,python-testscenarios)
3389 ("python-mock" ,python-mock)
3390 ("python-docutils" ,python-docutils)))
3391 (home-page "https://pagure.io/python-daemon/")
3392 (synopsis "Python library for making a Unix daemon process")
3393 (description "Python-daemon is a library that assists a Python program to
3394 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3396 This library provides a @code{DaemonContext} class that manages the following
3397 important tasks for becoming a daemon process:
3399 @item Detach the process into its own process group.
3400 @item Set process environment appropriate for running inside a chroot.
3401 @item Renounce suid and sgid privileges.
3402 @item Close all open file descriptors.
3403 @item Change the working directory, uid, gid, and umask.
3404 @item Set appropriate signal handlers.
3405 @item Open new file descriptors for stdin, stdout, and stderr.
3406 @item Manage a specified PID lock file.
3407 @item Register cleanup functions for at-exit processing.
3409 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3410 (license (list license:asl2.0 license:gpl3+))))
3412 (define-public python-anytree
3414 (name "python-anytree")
3418 (uri (pypi-uri "anytree" version))
3421 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3422 (build-system python-build-system)
3424 `(("python-six" ,python-six)))
3427 ("graphviz" ,graphviz) ;for 'dot'
3428 ("python-nose" ,python-nose)))
3429 (home-page "https://github.com/c0fec0de/anytree")
3430 (synopsis "Lightweight tree data library")
3432 "@code{anytree} is a simple, lightweight, and extensible tree data
3433 structure for Python.")
3434 (license license:asl2.0)))
3436 (define-public python-docutils
3438 (name "python-docutils")
3443 (uri (pypi-uri "docutils" version))
3446 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3447 (build-system python-build-system)
3449 '(#:phases (modify-phases %standard-phases
3451 (lambda* (#:key tests? #:allow-other-keys)
3453 (invoke "python" "test/alltests.py")
3454 (format #t "test suite not run~%"))
3456 (home-page "http://docutils.sourceforge.net/")
3457 (synopsis "Python Documentation Utilities")
3459 "Docutils is a modular system for processing documentation into useful
3460 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3462 ;; Most of the source code is public domain, but some source files are
3463 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3464 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3466 (define-public python2-docutils
3467 (package-with-python2 python-docutils))
3469 ;; python2-sphinx fails its test suite with newer versions.
3470 (define-public python2-docutils-0.14
3472 (inherit python2-docutils)
3476 (uri (pypi-uri "docutils" version))
3479 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3481 (define-public python-restructuredtext-lint
3483 (name "python-restructuredtext-lint")
3488 (uri (pypi-uri "restructuredtext-lint" version))
3491 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3492 (build-system python-build-system)
3495 (modify-phases %standard-phases
3497 (add-after 'install 'check
3498 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3500 (add-installed-pythonpath inputs outputs)
3501 (invoke "nosetests" "-v"))
3504 `(("python-docutils" ,python-docutils)))
3506 `(("python-nose" ,python-nose)))
3507 (home-page "https://github.com/twolfson/restructuredtext-lint")
3508 (synopsis "reStructuredText linter")
3509 (description "This package provides a linter for the reStructuredText
3511 (license license:unlicense)))
3513 (define-public python-doc8
3515 (name "python-doc8")
3520 (uri (pypi-uri "doc8" version))
3523 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3524 (build-system python-build-system)
3527 (modify-phases %standard-phases
3529 (add-after 'install 'check
3530 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3532 (add-installed-pythonpath inputs outputs)
3533 (invoke "pytest" "-v"))
3536 `(("python-chardet" ,python-chardet)
3537 ("python-docutils" ,python-docutils)
3538 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3539 ("python-six" ,python-six)
3540 ("python-stevedore" ,python-stevedore)))
3542 `(("python-testtools" ,python-testtools)
3543 ("python-pytest" ,python-pytest)))
3544 (home-page "https://launchpad.net/doc8")
3546 "Style checker for Sphinx (or other) RST documentation")
3548 "Doc8 is an opinionated style checker for reStructured Text and plain
3549 text styles of documentation.")
3550 (license license:asl2.0)))
3552 (define-public python-pygments
3554 (name "python-pygments")
3559 (uri (pypi-uri "Pygments" version))
3562 "0i4gnd4q0mgkq0dp5wymn7ca8zjd8fgp63139svs6jf2c6h48wv4"))))
3563 (build-system python-build-system)
3565 ;; FIXME: Tests require sphinx, which depends on this.
3567 (home-page "https://pygments.org/")
3568 (synopsis "Syntax highlighting")
3570 "Pygments is a syntax highlighting package written in Python.")
3571 (license license:bsd-2)
3572 (properties `((python2-variant . ,(delay python2-pygments))))))
3574 ;; Pygments 2.6 and later does not support Python 2.
3575 (define-public python2-pygments
3576 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3582 (uri (pypi-uri "Pygments" version))
3585 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3587 (define-public python-bumpversion
3589 (name "python-bumpversion")
3594 (uri (pypi-uri "bumpversion" version))
3597 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3598 (build-system python-build-system)
3599 (home-page "https://github.com/peritus/bumpversion")
3600 (synopsis "Tool to bump software version")
3601 (description "This tool provides a command-line interface (CLI) to bump a
3602 software version simply.")
3603 (license license:expat)))
3605 (define-public python-deprecated
3607 (name "python-deprecated")
3613 (url "https://github.com/tantale/deprecated")
3614 (commit (string-append "v" version))))
3615 (file-name (git-file-name name version))
3618 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3619 (build-system python-build-system)
3621 `(#:phases (modify-phases %standard-phases
3624 (invoke "pytest"))))))
3626 `(("python-wrapt" ,python-wrapt)))
3628 `(("python-bumpversion" ,python-bumpversion)
3629 ("python-pytest" ,python-pytest)
3630 ("python-pytest-cov" ,python-pytest-cov)
3631 ("python-sphinx" ,python-sphinx)
3632 ("python-tox" ,python-tox)))
3633 (home-page "https://github.com/tantale/deprecated")
3634 (synopsis "Python decorator to deprecate classes, functions or methods")
3635 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3636 to deprecate classes, functions or methods.")
3637 (license license:expat)))
3639 (define-public python-pygithub
3641 (name "python-pygithub")
3644 ;; We fetch from the Git repo because there are no tests in the PyPI
3649 (url "https://github.com/PyGithub/PyGithub")
3650 (commit (string-append "v" version))))
3651 (file-name (git-file-name name version))
3653 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3654 (build-system python-build-system)
3656 `(#:phases (modify-phases %standard-phases
3657 ;; Some tests rely on the network.
3658 (add-after 'unpack 'disable-failing-tests
3660 (substitute* "tests/Issue142.py"
3661 (("testDecodeJson") "disabled_testDecodeJson"))
3663 (add-before 'check 'prepare-for-tests
3665 (for-each (lambda (f)
3667 (find-files "./tests"))
3668 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3669 (setenv "PYTHONPATH"
3670 (string-append "./tests:" (getenv "PYTHONPATH")))
3673 `(("python-deprecated" ,python-deprecated)
3674 ("python-pyjwt" ,python-pyjwt)
3675 ("python-requests" ,python-requests)))
3676 (native-inputs `(("python-httpretty" ,python-httpretty)))
3677 (home-page "https://pygithub.readthedocs.io/en/latest/")
3678 (synopsis "Python library for the GitHub API")
3679 (description "This library allows managing GitHub resources such as
3680 repositories, user profiles, and organizations in your Python applications,
3681 using version 3 of the GitHub application programming interface (API).")
3682 (license license:lgpl3+)))
3684 (define-public python-rellu
3686 (name "python-rellu")
3691 (uri (pypi-uri "rellu" version))
3694 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3695 (build-system python-build-system)
3697 `(("python-invoke" ,python-invoke)
3698 ("python-pygithub" ,python-pygithub)))
3699 (home-page "https://github.com/robotframework/rellu")
3700 (synopsis "Utilities to create PyPI releases")
3701 (description "This collection of utilities contains tooling and templates
3702 to assist in creating releases on GitHub and publishing them on PyPI. It is
3703 designed to be used by Robot Framework and tools and libraries in its
3704 ecosystem, but can naturally be used also by other projects.")
3705 (license license:asl2.0)))
3707 (define-public python-robotframework
3709 (name "python-robotframework")
3711 ;; There are no tests in the PyPI archive.
3716 (url "https://github.com/robotframework/robotframework")
3717 (commit (string-append "v" version))))
3718 (file-name (git-file-name name version))
3720 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3721 (patches (search-patches
3722 "python-robotframework-source-date-epoch.patch"))))
3723 (build-system python-build-system)
3725 `(#:phases (modify-phases %standard-phases
3726 (add-before 'build 'build-and-install-doc
3727 (lambda* (#:key outputs #:allow-other-keys)
3728 (let* ((doc-output (assoc-ref outputs "doc"))
3729 (doc (string-append doc-output "/share/"
3730 ,name "-" ,version "/")))
3731 (invoke "invoke" "library-docs" "all")
3733 (copy-recursively "doc/libraries"
3734 (string-append doc "/libraries"))
3737 (lambda* (#:key inputs #:allow-other-keys)
3738 ;; Some tests require timezone data. Otherwise, they
3739 ;; look up /etc/localtime, which doesn't exist, and fail
3742 ;; OverflowError: mktime argument out of range
3744 (string-append (assoc-ref inputs "tzdata")
3746 (setenv "TZ" "Europe/Paris")
3748 (invoke "python" "utest/run.py"))))))
3750 `(("python-invoke" ,python-invoke)
3751 ("python-rellu" ,python-rellu)
3752 ("python:tk" ,python "tk") ;used when building the HTML doc
3753 ("tzdata" ,tzdata-for-tests)))
3754 (outputs '("out" "doc"))
3755 (home-page "https://robotframework.org")
3756 (synopsis "Generic automation framework")
3757 (description "Robot Framework is a generic automation framework for
3758 acceptance testing, acceptance test driven development (ATDD), and robotic
3759 process automation (RPA).")
3760 (license license:asl2.0)))
3762 (define-public python-robotframework-lint
3763 ;; There is no properly tagged release; the commit below seems to correspond
3764 ;; to the 0.9 stable release available from PyPI. The tests are not
3765 ;; included in the PyPI archive, so we fetch the sources from the upstream
3767 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3770 (name "python-robotframework-lint")
3771 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3777 (url "https://github.com/boakley/robotframework-lint")
3779 (file-name (git-file-name name version))
3782 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3783 (build-system python-build-system)
3786 (modify-phases %standard-phases
3789 (invoke "python" "-m" "robot" "-A"
3790 "tests/conf/default.args" "tests"))))))
3792 `(("python-robotframework" ,python-robotframework)))
3793 (home-page "https://github.com/boakley/robotframework-lint/")
3794 (synopsis "Static analysis tool (linter) for Robot Framework")
3795 (description "This package provides the @code{rflint} command-line
3796 utility, a static analysis tool (linter) for Robot Framework source files.")
3797 (license license:asl2.0))))
3799 (define-public python-robotframework-sshlibrary
3801 (name "python-robotframework-sshlibrary")
3803 ;; There are no tests in the PyPI archive.
3808 (url "https://github.com/robotframework/SSHLibrary")
3809 (commit (string-append "v" version))))
3810 (file-name (git-file-name name version))
3813 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3814 (build-system python-build-system)
3817 (modify-phases %standard-phases
3818 (add-before 'build 'build-and-install-doc
3819 (lambda* (#:key outputs #:allow-other-keys)
3820 (let* ((doc-output (assoc-ref outputs "doc"))
3821 (doc (string-append doc-output "/share/"
3822 ,name "-" ,version "/")))
3823 (invoke "chmod" "-R" "+w" "docs")
3824 (invoke "invoke" "kw-docs" "project-docs")
3826 (for-each delete-file (find-files "docs" "\\.rst"))
3827 (copy-recursively "docs" doc)
3831 ;; Some tests require an SSH server; we remove them.
3832 (delete-file "utest/test_client_api.py")
3833 (delete-file "utest/test_scp.py")
3834 (invoke "python" "utest/run.py"))))))
3836 `(("python-robotframework" ,python-robotframework)
3837 ("python-paramiko" ,python-paramiko)
3838 ("python-scp" ,python-scp)))
3840 `(("openssh" ,openssh)
3842 ;; To generate the documentation
3843 ("python-docutils" ,python-docutils)
3844 ("python-invoke" ,python-invoke)
3845 ("python-pygments" ,python-pygments)
3846 ("python-rellu" ,python-rellu)))
3847 (outputs '("out" "doc"))
3848 (home-page "https://github.com/robotframework/SSHLibrary")
3849 (synopsis "Robot Framework library for SSH and SFTP")
3850 (description "SSHLibrary is a Robot Framework library providing support
3851 for SSH and SFTP. It has the following main usages:
3853 @item Executing commands on the remote machine, either blocking or non-blocking.
3854 @item Writing and reading in an interactive shell.
3855 @item Transferring files and directories over SFTP.
3856 @item Ensuring that files and directories exist on the remote machine.
3858 (license license:asl2.0)))
3860 (define-public python-rstr
3862 (name "python-rstr")
3867 (uri (pypi-uri "rstr" version))
3870 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3871 (build-system python-build-system)
3873 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3874 (synopsis "Generate random strings in Python")
3875 (description "This package provides a python module for generating
3876 random strings of various types. It could be useful for fuzz testing,
3877 generating dummy data, or other applications. It has no dependencies
3878 outside the standard library.")
3879 (license license:bsd-3)))
3881 (define-public python-scp
3888 (uri (pypi-uri "scp" version))
3891 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3892 (build-system python-build-system)
3894 '(#:tests? #f)) ;tests require an SSH server
3896 `(("python-paramiko" ,python-paramiko)))
3897 (home-page "https://github.com/jbardin/scp.py")
3898 (synopsis "SCP protocol module for Python and Paramiko")
3899 (description "The scp module extends the Paramiko library to send and
3900 receive files via the SCP1 protocol, as implemented by the OpenSSH
3901 @command{scp} program.")
3902 (license license:gpl2+)))
3904 (define-public python-rst.linker
3906 (name "python-rst.linker")
3911 (uri (pypi-uri "rst.linker" version))
3913 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3914 (build-system python-build-system)
3916 `(("python-dateutil" ,python-dateutil)
3917 ("python-six" ,python-six)))
3919 `(("python-setuptools-scm" ,python-setuptools-scm)))
3920 ;; Test would require path.py, which would introduce a cyclic dependence.
3921 (arguments `(#:tests? #f))
3922 ;; Note: As of version 1.7 the documentation is not worth building.
3923 (home-page "https://github.com/jaraco/rst.linker")
3924 (synopsis "Sphinx plugin to add links and timestamps")
3925 (description "rst.linker automatically replaces text by a
3926 reStructuredText external reference or timestamps. It's primary purpose is to
3927 augment the changelog, but it can be used for other documents, too.")
3928 (license license:expat)))
3930 (define-public python2-rst.linker
3931 (package-with-python2 python-rst.linker))
3933 (define-public python-feedgenerator
3935 (name "python-feedgenerator")
3940 (uri (pypi-uri "feedgenerator" version))
3943 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3944 (modules '((guix build utils)))
3947 ;; Remove pre-compiled .pyc files from source.
3948 (for-each delete-file-recursively
3949 (find-files "." "__pycache__" #:directories? #t))
3950 (for-each delete-file (find-files "." "\\.pyc$"))
3952 (build-system python-build-system)
3954 `(("python-pytz" ,python-pytz)
3955 ("python-six" ,python-six)))
3956 (home-page "https://github.com/getpelican/feedgenerator")
3958 "Standalone version of Django's Atom/RSS feed generator")
3960 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3961 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3962 (license license:bsd-3)))
3964 (define-public python2-feedgenerator
3965 (package-with-python2 python-feedgenerator))
3967 (define-public python-toml
3969 (name "python-toml")
3974 (uri (pypi-uri "toml" version))
3977 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3978 (build-system python-build-system)
3980 `(#:tests? #f)) ;no tests suite in release
3981 (home-page "https://github.com/uiri/toml")
3982 (synopsis "Library for TOML")
3984 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3985 Language (TOML) configuration files.")
3986 (license license:expat)))
3988 (define-public python-jsonrpc-server
3990 (name "python-jsonrpc-server")
3995 (uri (pypi-uri "python-jsonrpc-server" version))
3998 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
3999 (build-system python-build-system)
4001 `(("python-mock" ,python-mock)
4002 ("python-pytest" ,python-pytest)
4003 ("python-ujson" ,python-ujson-1)))
4005 "https://github.com/palantir/python-jsonrpc-server")
4006 (synopsis "JSON RPC 2.0 server library")
4008 "This package provides a JSON RPC 2.0 server library for Python.")
4009 (license license:expat)))
4011 (define-public python-pydantic
4013 (name "python-pydantic")
4019 (url "https://github.com/samuelcolvin/pydantic")
4020 (commit (string-append "v" version))))
4021 (file-name (git-file-name name version))
4023 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4024 (build-system python-build-system)
4027 (modify-phases %standard-phases
4028 ;; Reported upstream:
4029 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4030 ;; Disable the faulty test as the fix is unclear.
4031 (add-before 'check 'disable-test
4033 (substitute* "tests/test_validators.py"
4034 (("test_assert_raises_validation_error")
4035 "_test_assert_raises_validation_error"))
4038 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4040 `(("python-pytest" ,python-pytest)))
4041 (home-page "https://github.com/samuelcolvin/pydantic")
4042 (synopsis "Python data validation and settings management")
4044 "Pydantic enforces type hints at runtime, and provides user friendly
4045 errors when data is invalid.")
4046 (license license:expat)))
4048 (define-public python-pydocstyle
4050 (name "python-pydocstyle")
4055 (uri (pypi-uri "pydocstyle" version))
4058 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4059 (build-system python-build-system)
4061 `(("python-six" ,python-six)
4062 ("python-snowballstemmer" ,python-snowballstemmer)))
4064 "https://github.com/PyCQA/pydocstyle/")
4065 (synopsis "Python docstring style checker")
4067 "This package provides a style checker for the Python Language
4069 (license license:expat)))
4071 (define-public python-language-server
4073 (name "python-language-server")
4078 (uri (pypi-uri "python-language-server" version))
4081 "0gfjjlj7yg2nf8wkbrshwaljkwlqja4n7s1x949f495anmkg8vxr"))))
4082 (build-system python-build-system)
4084 `(("python-pluggy" ,python-pluggy)
4085 ("python-jsonrpc-server" ,python-jsonrpc-server)
4086 ("python-jedi" ,python-jedi)
4087 ("python-yapf" ,python-yapf)
4088 ("python-pyflakes" ,python-pyflakes)
4089 ("python-pydocstyle" ,python-pydocstyle)
4090 ("python-pycodestyle" ,python-pycodestyle)
4091 ("python-mccabe" ,python-mccabe)
4092 ("python-rope" ,python-rope)
4093 ("python-autopep8" ,python-autopep8)
4094 ("python-flake8" ,python-flake8)
4095 ("python-pylint" ,python-pylint)))
4096 (home-page "https://github.com/palantir/python-language-server")
4097 (synopsis "Python implementation of the Language Server Protocol")
4099 "The Python Language Server (pyls) is an implementation of the Python 3
4100 language specification for the Language Server Protocol (LSP). This tool is
4101 used in text editing environments to provide a complete and integrated
4102 feature-set for programming Python effectively.")
4103 (license license:expat)))
4105 (define-public python-pathspec
4107 (name "python-pathspec")
4112 (uri (pypi-uri "pathspec" version))
4115 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4116 (build-system python-build-system)
4117 (home-page "https://github.com/cpburnz/python-path-specification")
4118 (synopsis "Utility library for gitignore style pattern matching of file paths")
4120 "This package provides a utility library for gitignore style pattern
4121 matching of file paths.")
4122 (license license:mpl2.0)))
4124 (define-public python-black
4126 (name "python-black")
4131 (uri (pypi-uri "black" version))
4134 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4135 (build-system python-build-system)
4138 (modify-phases %standard-phases
4139 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4141 (let ((python3 (which "python3")))
4142 (substitute* '("tests/data/fmtonoff.py"
4143 "tests/data/string_prefixes.py"
4144 "tests/data/function.py"
4145 "tests/data/python37.py")
4146 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4147 (string-append "#!" python3 (if (string? minor-version)
4151 (add-after 'unpack 'disable-broken-tests
4152 (lambda* (#:key outputs inputs #:allow-other-keys)
4153 ;; Make installed package available for running the tests
4154 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4155 ":" (getenv "PATH")))
4157 ;; These tests are supposed to be skipped when the blackd
4158 ;; dependencies are missing, but this doesn't quite work.
4159 (substitute* "tests/test_black.py"
4160 (("( *)class BlackDTestCase.*" match indent)
4161 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4162 indent "class BlackDTestCase(unittest.TestCase):\n"))
4163 (("web.Application") "False")
4164 (("@unittest_run_loop") ""))
4166 ;; Patching the above file breaks the self test
4167 (substitute* "tests/test_black.py"
4168 (("( *)def test_self" match indent)
4169 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4171 (substitute* "tests/test_black.py"
4172 (("( *)def test_python38" match indent)
4173 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4176 `(("python-click" ,python-click)
4177 ("python-attrs" ,python-attrs)
4178 ("python-appdirs" ,python-appdirs)
4179 ("python-pathspec" ,python-pathspec)
4180 ("python-mypy-extensions" ,python-mypy-extensions)
4181 ("python-regex" ,python-regex)
4182 ("python-toml" ,python-toml)
4183 ("python-typed-ast" ,python-typed-ast)
4184 ("python-typing-extensions" ,python-typing-extensions)))
4186 `(("python-setuptools-scm" ,python-setuptools-scm)))
4187 (home-page "https://github.com/ambv/black")
4188 (synopsis "The uncompromising code formatter")
4189 (description "Black is the uncompromising Python code formatter.")
4190 (license license:expat)))
4192 (define-public python-black-macchiato
4194 (name "python-black-macchiato")
4199 (uri (pypi-uri "black-macchiato" version))
4202 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4203 (build-system python-build-system)
4205 `(("python-black" ,python-black)))
4206 (home-page "https://github.com/wbolster/black-macchiato")
4207 (synopsis "Partial @code{python-black} formatting")
4209 "This package is built on top the @{python-black} code formatter to
4210 enable formatting of partial files.")
4211 (license license:bsd-3)))
4213 (define-public python-blinker
4215 (name "python-blinker")
4220 (uri (pypi-uri "blinker" version))
4223 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4224 (build-system python-build-system)
4225 (home-page "https://pythonhosted.org/blinker/")
4226 (synopsis "Fast, simple object-to-object and broadcast signaling")
4228 "Blinker provides a fast dispatching system that allows any number of
4229 interested parties to subscribe to events, or \"signals\".")
4230 (license license:expat)))
4232 (define-public python2-blinker
4233 (package-with-python2 python-blinker))
4235 (define-public pelican
4242 (uri (pypi-uri "pelican" version))
4245 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4246 (build-system python-build-system)
4248 `(("python-blinker" ,python-blinker)
4249 ("python-dateutil" ,python-dateutil)
4250 ("python-docutils" ,python-docutils)
4251 ("python-feedgenerator" ,python-feedgenerator)
4252 ("python-jinja2" ,python-jinja2)
4253 ("python-markdown" ,python-markdown)
4254 ("python-pygments" ,python-pygments)
4255 ("python-pytz" ,python-pytz)
4256 ("python-six" ,python-six)
4257 ("python-unidecode" ,python-unidecode)))
4258 (home-page "https://getpelican.com/")
4260 `(;; XXX Requires a lot more packages to do unit tests :P
4262 (synopsis "Python-based static site publishing system")
4264 "Pelican is a tool to generate a static blog from reStructuredText,
4265 Markdown input files, and more. Pelican uses Jinja2 for templating
4266 and is very extensible.")
4267 (license license:agpl3+)))
4269 (define-public mallard-ducktype
4271 (name "mallard-ducktype")
4276 ;; git-reference because tests are not included in pypi source tarball
4277 ;; https://issues.guix.gnu.org/issue/36755#2
4279 (url "https://github.com/projectmallard/mallard-ducktype")
4281 (file-name (git-file-name name version))
4284 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4285 (build-system python-build-system)
4288 (modify-phases %standard-phases
4291 (with-directory-excursion "tests"
4292 (invoke "sh" "runtests")))))))
4293 (home-page "http://projectmallard.org")
4294 (synopsis "Convert Ducktype to Mallard documentation markup")
4296 "Ducktype is a lightweight syntax that can represent all the semantics
4297 of the Mallard XML documentation system. Ducktype files can be converted to
4298 Mallard using the @command{ducktype} tool. The yelp-tools package
4299 provides additional functionality on the produced Mallard documents.")
4300 (license license:expat)))
4302 (define-public python-cython
4304 (name "python-cython")
4309 (uri (pypi-uri "Cython" version))
4312 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4313 (build-system python-build-system)
4314 ;; we need the full python package and not just the python-wrapper
4315 ;; because we need libpython3.3m.so
4317 `(("python" ,python)))
4320 (modify-phases %standard-phases
4321 (add-before 'check 'set-HOME
4322 ;; some tests require access to "$HOME/.cython"
4323 (lambda _ (setenv "HOME" "/tmp") #t))
4326 ;; Disable compiler optimizations to greatly reduce the running
4327 ;; time of the test suite.
4328 (setenv "CFLAGS" "-O0")
4330 (invoke "python" "runtests.py" "-vv"
4331 "-j" (number->string (parallel-job-count))
4332 ;; XXX: On 32-bit architectures, running the parallel tests
4333 ;; fails on many-core systems, see
4334 ;; <https://github.com/cython/cython/issues/2807>.
4335 ,@(if (not (target-64bit?))
4336 '("-x" "run.parallel")
4338 (home-page "https://cython.org/")
4339 (synopsis "C extensions for Python")
4340 (description "Cython is an optimising static compiler for both the Python
4341 programming language and the extended Cython programming language. It makes
4342 writing C extensions for Python as easy as Python itself.")
4343 (license license:asl2.0)
4344 (properties `((python2-variant . ,(delay python2-cython))))))
4346 (define-public python2-cython
4347 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4350 (name "python2-cython")
4352 `(("python-2" ,python-2))) ;this is not automatically changed
4354 (substitute-keyword-arguments (package-arguments base)
4356 `(modify-phases ,phases
4357 (add-before 'check 'adjust-test_embed
4359 (substitute* "runtests.py"
4360 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4361 ;; so it can give the right -L flag to GCC when embedding static
4362 ;; builds of Python. It is unaware that the Python "config"
4363 ;; directory (where the static library lives) was renamed in
4364 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4365 ;; which works fine, because that is where the shared library is.
4367 ;; It also appears to be unaware that the Makefile in Demos/embed
4368 ;; already unconditionally pass the static library location to GCC,
4369 ;; after checking sysconfig.get_config_var('LIBPL).
4371 ;; The effect is that the linker is unable to resolve libexpat
4372 ;; symbols when building for Python 2, because neither the Python 2
4373 ;; shared library nor Expat is available. To fix it, we can either
4374 ;; add Expat as an input and make it visible to the linker, or just
4375 ;; prevent it from overriding the Python shared library location.
4376 ;; The end result is identical, so we take the easy route.
4377 ((" or libname not in os\\.listdir\\(libdir\\)")
4381 ;; The RPython toolchain currently does not support Python 3.
4382 (define-public python2-rpython
4384 (name "python2-rpython")
4389 (uri (pypi-uri "rpython" version))
4392 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4393 (build-system python-build-system)
4394 (arguments `(#:python ,python-2))
4396 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4397 (home-page "https://rpython.readthedocs.org")
4398 (synopsis "Framework for implementing interpreters and virtual machines")
4399 (description "RPython is a translation and support framework for
4400 producing implementations of dynamic languages, emphasizing a clean separation
4401 between language specification and implementation aspects.")
4402 (license license:expat)))
4404 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4405 ;; python-scipy still build, as these three packages are often used together.
4406 (define-public python-numpy
4408 (name "python-numpy")
4414 "https://github.com/numpy/numpy/releases/download/v"
4415 version "/numpy-" version ".tar.gz"))
4418 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4419 (build-system python-build-system)
4421 `(("openblas" ,openblas)
4422 ("lapack" ,lapack)))
4424 `(("python-cython" ,python-cython)
4425 ("python-pytest" ,python-pytest)
4426 ("gfortran" ,gfortran)))
4429 (modify-phases %standard-phases
4430 (add-before 'build 'configure-blas-lapack
4431 (lambda* (#:key inputs #:allow-other-keys)
4432 (call-with-output-file "site.cfg"
4436 libraries = openblas
4437 library_dirs = ~a/lib
4438 include_dirs = ~a/include
4440 # backslash-n to make emacs happy
4442 lapack_libs = lapack
4443 library_dirs = ~a/lib
4444 include_dirs = ~a/include
4446 (assoc-ref inputs "openblas")
4447 (assoc-ref inputs "openblas")
4448 (assoc-ref inputs "lapack")
4449 (assoc-ref inputs "lapack"))))
4451 (add-before 'build 'fix-executable-paths
4452 (lambda* (#:key inputs #:allow-other-keys)
4453 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4454 ;; instead of /bin/sh.
4455 (substitute* "numpy/distutils/exec_command.py"
4456 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4457 (string-append match-start (assoc-ref inputs "bash") match-end)))
4458 ;; Use "gcc" executable, not "cc".
4459 (substitute* "numpy/distutils/system_info.py"
4460 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4461 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4463 ;; Tests can only be run after the library has been installed and not
4464 ;; within the source directory.
4466 (add-after 'install 'check
4467 (lambda* (#:key outputs inputs #:allow-other-keys)
4468 ;; Make installed package available for running the tests
4469 (add-installed-pythonpath inputs outputs)
4470 ;; Make sure "f2py" etc is found.
4471 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4472 ":" (getenv "PATH")))
4473 (with-directory-excursion "/tmp"
4474 (invoke "python" "-c"
4475 "import numpy; numpy.test(verbose=2)")))))))
4476 (home-page "https://numpy.org")
4477 (synopsis "Fundamental package for scientific computing with Python")
4478 (description "NumPy is the fundamental package for scientific computing
4479 with Python. It contains among other things: a powerful N-dimensional array
4480 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4481 and Fortran code, useful linear algebra, Fourier transform, and random number
4483 (properties `((python2-variant . ,(delay python2-numpy))))
4484 (license license:bsd-3)))
4486 ;; Numpy 1.16.x are the last versions that support Python 2.
4487 (define-public python2-numpy
4488 (let ((numpy (package-with-python2
4489 (strip-python2-variant python-numpy))))
4496 "https://github.com/numpy/numpy/releases/download/v"
4497 version "/numpy-" version ".tar.gz"))
4500 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4502 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4503 ;; interest only for legacy code going back to NumPy's predecessor
4505 (define-public python2-numpy-1.8
4506 (package (inherit python2-numpy)
4512 (url "https://github.com/numpy/numpy")
4513 (commit (string-append "v" version))))
4514 (file-name (git-file-name "numpy" version))
4517 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4519 (substitute-keyword-arguments (package-arguments python2-numpy)
4521 `(modify-phases ,phases
4522 (replace 'configure-blas-lapack
4523 (lambda* (#:key inputs #:allow-other-keys)
4524 (call-with-output-file "site.cfg"
4528 libraries = openblas,lapack
4529 library_dirs = ~a/lib:~a/lib
4530 include_dirs = ~a/include:~a/include
4532 (assoc-ref inputs "openblas")
4533 (assoc-ref inputs "lapack")
4534 (assoc-ref inputs "openblas")
4535 (assoc-ref inputs "lapack"))))
4538 `(("python2-nose" ,python2-nose)))
4539 (description "NumPy is the fundamental package for scientific computing
4540 with Python. It contains among other things: a powerful N-dimensional array
4541 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4542 and Fortran code, useful linear algebra, Fourier transform, and random number
4543 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4544 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4546 (license license:bsd-3)))
4548 (define-public python-munch
4550 (name "python-munch")
4555 (uri (pypi-uri "munch" version))
4558 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4559 (build-system python-build-system)
4560 (home-page "https://github.com/Infinidat/munch")
4561 (synopsis "Dot-accessible dictionary")
4562 (description "Munch is a dot-accessible dictionary similar to JavaScript
4564 (license license:expat)))
4566 (define-public python2-munch
4567 (package-with-python2 python-munch))
4569 (define-public python-colormath
4571 (name "python-colormath")
4576 (uri (pypi-uri "colormath" version))
4579 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4580 (build-system python-build-system)
4582 `(("python-networkx" ,python-networkx)
4583 ("python-numpy" ,python-numpy)))
4584 (home-page "https://github.com/gtaylor/python-colormath")
4585 (synopsis "Color math and conversion library")
4587 "This is a Python library for color math and conversions.")
4588 (license license:bsd-3)))
4590 (define-public python2-colormath
4591 (package-with-python2 python-colormath))
4593 (define-public python-spectra
4595 (name "python-spectra")
4600 (uri (pypi-uri "spectra" version))
4603 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4604 (build-system python-build-system)
4607 (modify-phases %standard-phases
4609 (lambda _ (invoke "nosetests" "-v"))))))
4611 `(("python-colormath" ,python-colormath)))
4613 `(("python-nose" ,python-nose)))
4614 (home-page "https://github.com/jsvine/spectra")
4615 (synopsis "Color scales and color conversion")
4617 "This package provides a Python library intended to make color math,
4618 color scales, and color space conversion easy. It has support for:
4623 @item Color blending
4624 @item Brightening/darkening colors
4625 @item Saturating/desaturating colors
4626 @item Conversion to/from multiple color spaces.
4628 (license license:expat)))
4630 (define-public python2-spectra
4631 (package-with-python2 python-spectra))
4633 (define-public python-numpy-documentation
4635 (name "python-numpy-documentation")
4636 (version (package-version python-numpy))
4637 (source (package-source python-numpy))
4638 (build-system python-build-system)
4640 `(("python-matplotlib" ,python-matplotlib)
4641 ("python-numpy" ,python-numpy)
4642 ("pkg-config" ,pkg-config)
4643 ("python-sphinx" ,python-sphinx)
4644 ("python-numpydoc" ,python-numpydoc)
4645 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4647 texlive-generic-ifxetex
4648 texlive-generic-pdftex
4650 texlive-latex-capt-of
4652 texlive-latex-environ
4653 texlive-latex-eqparbox
4654 texlive-latex-etoolbox
4655 texlive-latex-expdlist
4656 texlive-latex-fancyhdr
4657 texlive-latex-fancyvrb
4658 texlive-latex-fncychap
4660 texlive-latex-framed
4661 texlive-latex-geometry
4662 texlive-latex-graphics
4663 texlive-latex-hyperref
4664 texlive-latex-mdwtools
4665 texlive-latex-multirow
4666 texlive-latex-needspace
4667 texlive-latex-oberdiek
4668 texlive-latex-parskip
4669 texlive-latex-preview
4670 texlive-latex-tabulary
4671 texlive-latex-threeparttable
4672 texlive-latex-titlesec
4673 texlive-latex-trimspaces
4675 texlive-latex-upquote
4677 texlive-latex-varwidth
4678 texlive-latex-wrapfig)))
4679 ("texinfo" ,texinfo)
4681 ("scipy-sphinx-theme"
4682 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4685 (url "https://github.com/scipy/scipy-sphinx-theme")
4686 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4689 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4690 ,@(package-native-inputs python-numpy)))
4692 `(#:tests? #f ; we're only generating the documentation
4694 (modify-phases %standard-phases
4697 (lambda* (#:key inputs outputs #:allow-other-keys)
4698 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4700 data "/doc/" ,name "-"
4701 ,(package-version python-numpy)))
4702 (info-reader (string-append data "/info"))
4703 (html (string-append doc "/html"))
4704 (scipy-sphinx-theme "scipy-sphinx-theme")
4705 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4706 (pyver ,(string-append "PYVER=")))
4708 ;; FIXME: this is needed to for texlive-union to generate
4709 ;; fonts, which are not found.
4710 (setenv "HOME" "/tmp")
4712 (with-directory-excursion "doc"
4713 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4715 (invoke "make" "html" pyver)
4716 (invoke "make" "latex" "PAPER=a4" pyver)
4717 (invoke "make" "-C" "build/latex"
4718 "all-pdf" "PAPER=a4" pyver)
4719 ;; FIXME: Generation of the info file fails.
4720 ;; (invoke "make" "info" pyver)
4722 ;; (copy-file "build/texinfo/numpy.info"
4723 ;; (string-append info "/numpy.info"))
4724 (for-each (lambda (file)
4725 (copy-file (string-append "build/latex" file)
4726 (string-append doc file)))
4727 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4728 (with-directory-excursion "build/html"
4729 (for-each (lambda (file)
4730 (let* ((dir (dirname file))
4731 (tgt-dir (string-append html "/" dir)))
4732 (unless (equal? "." dir)
4734 (install-file file html)))
4735 (find-files "." ".*")))))
4737 (home-page (package-home-page python-numpy))
4738 (synopsis "Documentation for the python-numpy package")
4739 (description (package-description python-numpy))
4740 (license (package-license python-numpy))))
4742 (define-public python2-numpy-documentation
4743 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4745 (inherit numpy-documentation)
4746 (native-inputs `(("python2-functools32" ,python2-functools32)
4747 ,@(package-native-inputs numpy-documentation))))))
4749 (define-public python-pygit2
4751 (name "python-pygit2")
4756 (uri (pypi-uri "pygit2" version))
4758 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4759 (build-system python-build-system)
4761 '(#:tests? #f)) ; tests don't run correctly in our environment
4763 `(("python-cached-property" ,python-cached-property)
4764 ("python-cffi" ,python-cffi)
4765 ("libgit2" ,libgit2)))
4767 `(("python-pytest" ,python-pytest)))
4768 (home-page "https://github.com/libgit2/pygit2")
4769 (synopsis "Python bindings for libgit2")
4770 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4771 library, libgit2 implements Git plumbing.")
4772 ;; GPL2.0 only, with linking exception.
4773 (license license:gpl2)))
4775 (define-public python-patiencediff
4777 (name "python-patiencediff")
4782 (uri (pypi-uri "patiencediff" version))
4785 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4786 (build-system python-build-system)
4787 (home-page "https://www.breezy-vcs.org/")
4788 (synopsis "Python implementation of the patiencediff algorithm")
4790 "This package contains a Python implementation of the @code{patiencediff}
4791 algorithm. Patiencediff provides a good balance of performance, nice output for
4792 humans, and implementation simplicity.")
4793 (license license:gpl2)))
4795 (define-public python-pyparsing
4797 (name "python-pyparsing")
4802 (uri (pypi-uri "pyparsing" version))
4804 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4805 (build-system python-build-system)
4806 (outputs '("out" "doc"))
4808 `(#:tests? #f ; no test target
4810 (modify-phases %standard-phases
4811 (add-after 'install 'install-doc
4812 (lambda* (#:key outputs #:allow-other-keys)
4813 (let* ((doc (string-append (assoc-ref outputs "doc")
4814 "/share/doc/" ,name "-" ,version))
4815 (html-doc (string-append doc "/html"))
4816 (examples (string-append doc "/examples")))
4822 (install-file file tgt))
4823 (find-files dir ".*")))
4824 (list "docs" "htmldoc" "examples")
4825 (list doc html-doc examples))
4827 (home-page "https://github.com/pyparsing/pyparsing")
4828 (synopsis "Python parsing class library")
4830 "The pyparsing module is an alternative approach to creating and
4831 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4832 of regular expressions. The pyparsing module provides a library of classes
4833 that client code uses to construct the grammar directly in Python code.")
4834 (license license:expat)))
4836 (define-public python2-pyparsing
4837 (package-with-python2 python-pyparsing))
4839 (define-public python-pyparsing-2.4.7
4841 (inherit python-pyparsing)
4846 (uri (pypi-uri "pyparsing" version))
4848 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4850 (define-public python-numpydoc
4852 (name "python-numpydoc")
4857 (uri (pypi-uri "numpydoc" version))
4860 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4861 (build-system python-build-system)
4863 `(("python-sphinx" ,python-sphinx)))
4865 `(("python-nose" ,python-nose)))
4866 (home-page "https://pypi.org/project/numpydoc/")
4868 "Numpy's Sphinx extensions")
4870 "Sphinx extension to support docstrings in Numpy format.")
4871 (license license:bsd-2)))
4873 (define-public python2-numpydoc
4874 (package-with-python2 python-numpydoc))
4876 (define-public python-numexpr
4878 (name "python-numexpr")
4883 (uri (pypi-uri "numexpr" version))
4886 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4887 (build-system python-build-system)
4888 (arguments `(#:tests? #f)) ; no tests included
4890 `(("python-numpy" ,python-numpy)))
4891 (home-page "https://github.com/pydata/numexpr")
4892 (synopsis "Fast numerical expression evaluator for NumPy")
4894 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4895 expressions that operate on arrays are accelerated and use less memory than
4896 doing the same calculation in Python. In addition, its multi-threaded
4897 capabilities can make use of all your cores, which may accelerate
4898 computations, most specially if they are not memory-bounded (e.g. those using
4899 transcendental functions).")
4900 (license license:expat)))
4902 (define-public python2-numexpr
4903 (package-with-python2 python-numexpr))
4905 (define-public python-cycler
4907 (name "python-cycler")
4911 (uri (pypi-uri "cycler" version))
4914 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4915 (build-system python-build-system)
4917 ;; XXX: The current version requires 'coveralls' which we don't have.
4918 ;; Enable this for the next release which uses 'python-pytest'.
4921 `(("python-six" ,python-six)))
4922 (home-page "http://matplotlib.org/cycler/")
4923 (synopsis "Composable keyword argument iterator")
4925 "When using @code{matplotlib} and plotting more than one line, it is
4926 common to want to be able to want to be able to cycle over one or more artist
4927 styles; but the plotting logic can quickly become involved.
4928 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4929 @code{Cycler} class was developed.")
4930 (license license:bsd-3)))
4932 (define-public python2-cycler
4933 (package-with-python2 python-cycler))
4935 (define-public python-colorspacious
4937 (name "python-colorspacious")
4943 (url "https://github.com/njsmith/colorspacious")
4944 (commit (string-append "v" version))))
4945 (file-name (git-file-name name version))
4947 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4948 (build-system python-build-system)
4950 `(("python-numpy" ,python-numpy)))
4952 `(("python-nose" ,python-nose)))
4955 (modify-phases %standard-phases
4958 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4959 (home-page "https://github.com/njsmith/colorspacious")
4960 (synopsis "Python library for colorspace conversions")
4961 (description "@code{colorspacious} is a Python library that lets you
4962 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4963 (license license:expat)))
4965 (define-public python2-colorspacious
4966 (package-with-python2 python-colorspacious))
4968 (define-public python-matplotlib
4970 (name "python-matplotlib")
4975 (uri (pypi-uri "matplotlib" version))
4978 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4979 (build-system python-build-system)
4980 (propagated-inputs ; the following packages are all needed at run time
4981 `(("python-cycler" ,python-cycler)
4982 ("python-kiwisolver" ,python-kiwisolver)
4983 ("python-pyparsing" ,python-pyparsing)
4984 ("python-pygobject" ,python-pygobject)
4985 ("gobject-introspection" ,gobject-introspection)
4986 ("python-tkinter" ,python "tk")
4987 ("python-dateutil" ,python-dateutil)
4988 ("python-numpy" ,python-numpy)
4989 ("python-pillow" ,python-pillow)
4990 ("python-pytz" ,python-pytz)
4991 ("python-six" ,python-six)
4992 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4993 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4994 ;; object. For this reason we need to import both libraries.
4995 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4996 ("python-pycairo" ,python-pycairo)
4997 ("python-cairocffi" ,python-cairocffi)))
4999 `(("libpng" ,libpng)
5000 ("imagemagick" ,imagemagick)
5001 ("freetype" ,freetype)
5004 ;; FIXME: Add backends when available.
5005 ;("python-wxpython" ,python-wxpython)
5009 `(("pkg-config" ,pkg-config)
5010 ("python-pytest" ,python-pytest)
5011 ("python-mock" ,python-mock)
5016 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5019 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5022 (modify-phases %standard-phases
5023 ;; XXX We disable all image comparison tests because we're using a
5024 ;; newer version of FreeType than matplotlib expects. This leads to
5025 ;; minor differences throughout the tests.
5026 (add-after 'unpack 'fix-and-disable-failing-tests
5028 (substitute* (append (find-files "lib/matplotlib/tests/"
5030 (find-files "lib/mpl_toolkits/tests"
5032 (("^from matplotlib" match)
5033 (string-append "import pytest\n" match))
5034 (("( *)@image_comparison" match indent)
5035 (string-append indent
5036 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5038 (substitute* "lib/matplotlib/tests/test_animation.py"
5039 (("/bin/sh") (which "sh")))
5040 (for-each delete-file
5041 ;; test_normal_axes, test_get_tightbbox_polar
5042 '("lib/matplotlib/tests/test_axes.py"
5043 ;; We don't use the webagg backend and this test forces it.
5044 "lib/matplotlib/tests/test_backend_webagg.py"
5045 ;; test_outward_ticks
5046 "lib/matplotlib/tests/test_tightlayout.py"
5047 ;; test_hidden_axes fails with minor extent
5048 ;; differences, possibly due to the use of a
5049 ;; different version of FreeType.
5050 "lib/matplotlib/tests/test_constrainedlayout.py"
5051 ;; Fontconfig returns no fonts.
5052 "lib/matplotlib/tests/test_font_manager.py"))
5054 (add-before 'install 'install-jquery-ui
5055 (lambda* (#:key outputs inputs #:allow-other-keys)
5056 (let ((dir (string-append (assoc-ref outputs "out")
5057 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5060 (assoc-ref inputs "jquery-ui")
5064 (lambda* (#:key outputs inputs #:allow-other-keys)
5065 (add-installed-pythonpath inputs outputs)
5066 (invoke "python" "tests.py" "-v"
5067 "-m" "not network and not webagg")))
5068 (add-before 'build 'configure-environment
5069 (lambda* (#:key outputs inputs #:allow-other-keys)
5070 (let ((cairo (assoc-ref inputs "cairo")))
5071 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5073 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5074 (setenv "HOME" (getcwd))
5075 (call-with-output-file "setup.cfg"
5077 (format port "[directories]~%
5078 basedirlist = ~a,~a~%
5081 (assoc-ref inputs "tcl")
5082 (assoc-ref inputs "tk")))))
5084 (home-page "https://matplotlib.org/")
5085 (synopsis "2D plotting library for Python")
5087 "Matplotlib is a Python 2D plotting library which produces publication
5088 quality figures in a variety of hardcopy formats and interactive environments
5089 across platforms. Matplotlib can be used in Python scripts, the python and
5090 ipython shell, web application servers, and six graphical user interface
5092 (license license:psfl)
5093 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5095 (define-public python2-matplotlib
5096 (let ((matplotlib (package-with-python2
5097 (strip-python2-variant python-matplotlib))))
5098 (package (inherit matplotlib)
5103 (uri (pypi-uri "matplotlib" version))
5106 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5108 (substitute-keyword-arguments (package-arguments matplotlib)
5110 `(modify-phases ,phases
5111 (replace 'install-jquery-ui
5112 (lambda* (#:key outputs inputs #:allow-other-keys)
5113 (let ((dir (string-append (assoc-ref outputs "out")
5114 "/lib/python2.7/site-packages/"
5115 "matplotlib/backends/web_backend/")))
5118 (assoc-ref inputs "jquery-ui")
5121 (delete 'fix-and-disable-failing-tests)
5122 (delete 'check))))) ; These tests weren't run the the past.
5123 ;; Make sure to use special packages for Python 2 instead
5124 ;; of those automatically rewritten by package-with-python2.
5126 `(("python2-pycairo" ,python2-pycairo)
5127 ("python2-backports-functools-lru-cache"
5128 ,python2-backports-functools-lru-cache)
5129 ("python2-functools32" ,python2-functools32)
5130 ("python2-pygobject-2" ,python2-pygobject-2)
5131 ("python2-subprocess32" ,python2-subprocess32)
5132 ("python2-tkinter" ,python-2 "tk")
5133 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5134 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5136 (define-public python-matplotlib-documentation
5138 (name "python-matplotlib-documentation")
5139 (version (package-version python-matplotlib))
5140 (source (package-source python-matplotlib))
5141 (build-system python-build-system)
5143 `(("python-matplotlib" ,python-matplotlib)
5144 ("python-colorspacious" ,python-colorspacious)
5145 ("python-sphinx" ,python-sphinx)
5146 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5147 ("python-sphinx-gallery" ,python-sphinx-gallery)
5148 ("python-numpydoc" ,python-numpydoc)
5149 ("python-ipython" ,python-ipython)
5150 ("python-ipykernel" ,python-ipykernel)
5151 ("python-mock" ,python-mock)
5152 ("graphviz" ,graphviz)
5153 ("texlive" ,(texlive-union (list texlive-amsfonts
5154 texlive-latex-amsmath
5155 texlive-latex-enumitem
5156 texlive-latex-expdlist
5157 texlive-latex-geometry
5158 texlive-latex-preview
5159 texlive-latex-type1cm
5162 texlive-generic-pdftex
5165 texlive-fonts-adobe-times
5166 texlive-fonts-txfonts)))
5167 ("texinfo" ,texinfo)
5168 ,@(package-native-inputs python-matplotlib)))
5170 `(#:tests? #f ; we're only generating documentation
5172 (modify-phases %standard-phases
5173 ;; The tests in python-matplotlib are run after the install phase, so
5174 ;; we need to delete the extra phase here.
5179 (setenv "PYTHONPATH"
5180 (string-append (getenv "PYTHONPATH")
5181 ":" (getcwd) "/../examples/units"))
5182 (substitute* "conf.py"
5184 (("^SHA = check_output.*")
5185 (string-append "SHA = \"" ,version "\"\n"))
5186 ;; Don't fetch intersphinx files from the Internet
5187 (("^explicit_order_folders" m)
5188 (string-append "intersphinx_mapping = {}\n" m))
5189 (("'sphinx.ext.intersphinx',") "")
5190 ;; Disable URL embedding which requires internet access.
5191 (("'https://docs.scipy.org/doc/numpy'") "None")
5192 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5194 "SPHINXBUILD=sphinx-build"
5195 "SPHINXOPTS=" ; don't abort on warnings
5198 (lambda* (#:key inputs outputs #:allow-other-keys)
5199 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5200 (doc (string-append data "/doc/python-matplotlib-" ,version))
5201 (info (string-append data "/info"))
5202 (html (string-append doc "/html")))
5205 (copy-recursively "build/html" html)
5206 (symlink (string-append html "/_images")
5207 (string-append info "/matplotlib-figures"))
5208 (with-directory-excursion "build/texinfo"
5209 (substitute* "matplotlib.texi"
5210 (("@image\\{([^,]*)" all file)
5211 (string-append "@image{matplotlib-figures/" file)))
5212 (symlink (string-append html "/_images")
5213 "./matplotlib-figures")
5214 (invoke "makeinfo" "--no-split"
5215 "-o" "matplotlib.info" "matplotlib.texi"))
5216 (install-file "build/texinfo/matplotlib.info" info))
5218 (home-page (package-home-page python-matplotlib))
5219 (synopsis "Documentation for the python-matplotlib package")
5220 (description (package-description python-matplotlib))
5221 (license (package-license python-matplotlib))))
5223 (define-public python2-matplotlib-documentation
5224 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5228 (alist-delete "python-sphinx-copybutton"
5229 (package-native-inputs parent))))))
5231 (define-public python-matplotlib-venn
5233 (name "python-matplotlib-venn")
5238 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5241 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5242 (build-system python-build-system)
5243 (arguments '(#:tests? #f)) ; tests are not included
5245 `(("python-matplotlib" ,python-matplotlib)
5246 ("python-numpy" ,python-numpy)
5247 ("python-scipy" ,python-scipy)))
5249 `(("unzip" ,unzip)))
5250 (home-page "https://github.com/konstantint/matplotlib-venn")
5251 (synopsis "Plot area-proportional Venn diagrams")
5253 "This package provides tools for plotting area-proportional two- and
5254 three-way Venn diagrams in @code{matplotlib}.")
5255 (license license:expat)))
5257 (define-public python-pysnptools
5259 (name "python-pysnptools")
5264 (uri (pypi-uri "pysnptools" version))
5267 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5268 (build-system python-build-system)
5270 `(#:tests? #f ; no test data are included
5272 (modify-phases %standard-phases
5274 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5277 (add-installed-pythonpath inputs outputs)
5278 (invoke "python3" "pysnptools/test.py"))
5281 `(("python-dill" ,python-dill)
5282 ("python-h5py" ,python-h5py)
5283 ("python-numpy" ,python-numpy)
5284 ("python-pandas" ,python-pandas)
5285 ("python-psutil" ,python-psutil)
5286 ("python-scipy" ,python-scipy)))
5288 `(("python-cython" ,python-cython)))
5289 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5290 (synopsis "Library for reading and manipulating genetic data")
5292 "PySnpTools is a library for reading and manipulating genetic data. It
5293 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5294 those files. It can also efficiently manipulate ranges of integers using set
5295 operators such as union, intersection, and difference.")
5296 (license license:asl2.0)))
5298 (define-public python2-pysnptools
5299 (package-with-python2 python-pysnptools))
5301 (define-public python-wurlitzer
5303 (name "python-wurlitzer")
5308 (uri (pypi-uri "wurlitzer" version))
5310 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5311 (build-system python-build-system)
5314 (modify-phases %standard-phases
5317 (invoke "pytest" "-vv" "test.py"))))))
5319 `(("python-mock" ,python-mock)
5320 ("python-pytest" ,python-pytest)))
5321 (home-page "https://github.com/minrk/wurlitzer")
5322 (synopsis "Capture C-level output in context managers")
5324 "This library helps to redirect @code{sys.stdout} to a stream or a file
5325 while executing some piece of code, including C code running within a Python
5327 (license license:expat)))
5329 (define-public python-socksipy-branch
5331 (name "python-socksipy-branch")
5336 (uri (pypi-uri "SocksiPy-branch" version))
5339 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5340 (build-system python-build-system)
5342 `(#:tests? #f)) ; There are no tests
5343 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5344 (synopsis "Python SOCKS module")
5346 "SocksiPy - A Python SOCKS client module. It provides a
5347 socket-like interface that supports connections to any TCP
5348 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5349 The original version was developed by Dan Haim, this is a
5350 branch created by Mario Vilas to address some open issues,
5351 as the original project seems to have been abandoned circa 2007.")
5352 (license license:bsd-3)))
5354 (define-public python2-socksipy-branch
5355 (package-with-python2 python-socksipy-branch))
5357 (define-public python-socksipychain
5359 (name "python-socksipychain")
5365 (url "https://github.com/pagekite/PySocksipyChain")
5366 (commit (string-append "v" version))))
5367 (file-name (git-file-name name version))
5370 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5371 (build-system python-build-system)
5373 `(#:tests? #f)) ; Tests try to access the network.
5374 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5375 (synopsis "Python SOCKS module with chained proxies support")
5377 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5378 adds support for arbitrary chaining of proxy servers and various modes of
5379 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5380 a simple netcat replacement with chaining support.")
5381 (license license:bsd-3)))
5383 (define-public python-pycodestyle
5385 (name "python-pycodestyle")
5390 (uri (pypi-uri "pycodestyle" version))
5393 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5394 (build-system python-build-system)
5397 (modify-phases %standard-phases
5400 (invoke "pytest" "-vv"))))))
5402 `(("python-pytest" ,python-pytest)))
5403 (home-page "https://pycodestyle.readthedocs.io/")
5404 (synopsis "Python style guide checker")
5405 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5406 Python code against some of the style conventions in
5407 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5408 (license license:expat)))
5410 (define-public python2-pycodestyle
5411 (package-with-python2 python-pycodestyle))
5413 (define-public python-multidict
5415 (name "python-multidict")
5420 (uri (pypi-uri "multidict" version))
5423 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5424 (build-system python-build-system)
5426 '(#:modules ((ice-9 ftw)
5430 (guix build python-build-system))
5431 #:phases (modify-phases %standard-phases
5433 (lambda* (#:key tests? #:allow-other-keys)
5436 (let ((libdir (find (cut string-prefix? "lib." <>)
5437 (scandir "build"))))
5438 (setenv "PYTHONPATH"
5439 (string-append "./build/" libdir ":"
5440 (getenv "PYTHONPATH")))
5441 (invoke "pytest" "-vv")))
5442 (format #t "test suite not run~%"))
5445 `(("python-pytest" ,python-pytest)
5446 ("python-pytest-cov" ,python-pytest-cov)))
5447 (home-page "https://github.com/aio-libs/multidict/")
5448 (synopsis "Multidict implementation")
5449 (description "Multidict is dict-like collection of key-value pairs
5450 where key might be occurred more than once in the container.")
5451 (license license:asl2.0)))
5453 (define-public python-orderedmultidict
5455 (name "python-orderedmultidict")
5460 (uri (pypi-uri "orderedmultidict" version))
5463 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5464 (build-system python-build-system)
5467 (modify-phases %standard-phases
5468 (add-after 'unpack 'fix-tests
5470 ;; The package uses nosetest for running the tests.
5471 ;; Adding this initfile allows to run the test suite
5472 ;; without requiring nosetest.
5473 (with-output-to-file "tests/__init__.py" newline)
5476 `(("python-six" ,python-six)))
5478 `(("python-pycodestyle" ,python-pycodestyle)))
5479 (home-page "https://github.com/gruns/orderedmultidict")
5480 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5481 (description "This package contains a library for ordered multivalue
5482 dictionaries. A multivalue dictionary is a dictionary that can store
5483 multiple values for the same key. An ordered multivalue dictionary is a
5484 multivalue dictionary that retains the order of insertions and deletions.")
5485 (license license:unlicense)))
5487 (define-public python2-orderedmultidict
5488 (package-with-python2 python-orderedmultidict))
5490 (define-public python-autopep8
5492 (name "python-autopep8")
5497 (uri (pypi-uri "autopep8" version))
5500 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5501 (build-system python-build-system)
5503 `(("python-pycodestyle" ,python-pycodestyle)
5504 ("python-toml" ,python-toml)))
5505 (home-page "https://github.com/hhatto/autopep8")
5506 (synopsis "Format Python code according to the PEP 8 style guide")
5508 "@code{autopep8} automatically formats Python code to conform to
5509 the PEP 8 style guide. It uses the pycodestyle utility to determine
5510 what parts of the code needs to be formatted. @code{autopep8} is
5511 capable of fixing most of the formatting issues that can be reported
5513 (license (license:non-copyleft
5514 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5516 (define-public python2-autopep8
5517 (package-with-python2 python-autopep8))
5519 (define-public python-distlib
5521 (name "python-distlib")
5526 (uri (pypi-uri "distlib" version ".zip"))
5529 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5530 (build-system python-build-system)
5533 (modify-phases %standard-phases
5534 (add-before 'build 'no-/bin/sh
5536 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5537 (("/bin/sh") (which "sh")))
5539 (add-before 'check 'prepare-test-env
5541 (setenv "HOME" "/tmp")
5542 ;; NOTE: Any value works, the variable just has to be present.
5543 (setenv "SKIP_ONLINE" "1")
5545 (native-inputs `(("unzip" ,unzip)))
5546 (home-page "https://bitbucket.org/pypa/distlib")
5547 (synopsis "Distribution utilities")
5548 (description "Distlib is a library which implements low-level functions that
5549 relate to packaging and distribution of Python software. It is intended to be
5550 used as the basis for third-party packaging tools.")
5551 (license license:psfl)))
5553 (define-public python-distutils-extra
5555 (name "python-distutils-extra")
5560 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5561 version "/+download/python-distutils-extra-"
5565 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5566 (build-system python-build-system)
5567 (home-page "https://launchpad.net/python-distutils-extra/")
5568 (synopsis "Enhancements to Python's distutils")
5570 "The python-distutils-extra module enables you to easily integrate
5571 gettext support, themed icons, and scrollkeeper-based documentation into
5572 Python's distutils.")
5573 (license license:gpl2)))
5575 (define-public python2-distutils-extra
5576 (package-with-python2 python-distutils-extra))
5578 (define-public python2-elib.intl
5580 (name "python2-elib.intl")
5584 ;; This project doesn't tag releases or publish tarballs, so we take
5585 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5588 (url "https://github.com/dieterv/elib.intl")
5589 (commit "d09997cfef")))
5590 (file-name (string-append name "-" version "-checkout"))
5593 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5594 (build-system python-build-system)
5596 ;; incompatible with Python 3 (exception syntax)
5597 `(#:python ,python-2
5599 (home-page "https://github.com/dieterv/elib.intl")
5600 (synopsis "Enhanced internationalization for Python")
5602 "The elib.intl module provides enhanced internationalization (I18N)
5603 services for your Python modules and applications.")
5604 (license license:lgpl3+)))
5606 (define-public python-olefile
5608 (name "python-olefile")
5613 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5614 "download/v" version "/olefile-" version ".tar.gz"))
5615 (file-name (string-append name "-" version ".tar.gz"))
5618 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5619 (build-system python-build-system)
5620 (home-page "https://www.decalage.info/python/olefileio")
5621 (synopsis "Read and write Microsoft OLE2 files.")
5623 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5624 Storage or Compound Document, Microsoft Office). It is an improved version of
5625 the OleFileIO module from PIL, the Python Image Library.")
5626 (license license:bsd-3)))
5628 (define-public python2-olefile
5629 (package-with-python2 python-olefile))
5631 (define-public python-pillow
5633 (name "python-pillow")
5638 (uri (pypi-uri "Pillow" version))
5641 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5642 (build-system python-build-system)
5644 `(("python-pytest" ,python-pytest)))
5646 `(("freetype" ,freetype)
5648 ("libjpeg" ,libjpeg-turbo)
5649 ("libtiff" ,libtiff)
5650 ("libwebp" ,libwebp)
5651 ("openjpeg" ,openjpeg)
5654 `(("python-olefile" ,python-olefile)))
5657 (modify-phases %standard-phases
5658 (add-after 'unpack 'patch-ldconfig
5660 (substitute* "setup.py"
5661 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5663 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5666 (setenv "HOME" (getcwd))
5667 ;; Make installed package available for running the tests.
5668 (add-installed-pythonpath inputs outputs)
5669 (invoke "python" "selftest.py" "--installed")
5670 (invoke "python" "-m" "pytest" "-vv"))
5672 (home-page "https://python-pillow.org")
5673 (synopsis "Fork of the Python Imaging Library")
5675 "The Python Imaging Library adds image processing capabilities to your
5676 Python interpreter. This library provides extensive file format support, an
5677 efficient internal representation, and fairly powerful image processing
5678 capabilities. The core image library is designed for fast access to data
5679 stored in a few basic pixel formats. It should provide a solid foundation for
5680 a general image processing tool.")
5681 (license (license:x11-style
5682 "http://www.pythonware.com/products/pil/license.htm"
5683 "The PIL Software License"))))
5685 (define-public python2-pillow
5686 (package-with-python2 python-pillow))
5688 (define-public python-pillow-2.9
5690 (inherit python-pillow)
5695 (uri (pypi-uri "Pillow" version))
5698 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5700 (substitute-keyword-arguments (package-arguments python-pillow)
5701 ((#:tests? _ #f) #f)))
5702 (properties '((hidden? #t)))))
5704 (define-public python-roifile
5706 (name "python-roifile")
5707 (version "2020.5.28")
5711 (uri (pypi-uri "roifile" version))
5714 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5715 (build-system python-build-system)
5716 (arguments `(#:tests? #f)) ; there are none
5718 `(("python-numpy" ,python-numpy)))
5719 (home-page "https://www.lfd.uci.edu/~gohlke/")
5720 (synopsis "Read and write ImageJ ROI format")
5721 (description "Roifile is a Python library to read, write, create, and plot
5722 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5723 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5724 (license license:bsd-3)))
5726 (define-public python-tifffile
5728 (name "python-tifffile")
5729 (version "2020.6.3")
5733 (uri (pypi-uri "tifffile" version))
5736 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5737 (build-system python-build-system)
5738 ;; Tests require lfdfiles, which depends on tifffile
5739 (arguments `(#:tests? #f))
5741 `(("python-numpy" ,python-numpy)
5742 ;;("python-lfdfiles" ,python-lfdfiles)
5743 ("python-roifile" ,python-roifile)))
5744 (home-page "https://www.lfd.uci.edu/~gohlke/")
5745 (synopsis "Read and write TIFF(r) files")
5746 (description "This package lets you read image and metadata from many
5747 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5748 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5749 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5750 (license license:bsd-3)))
5752 (define-public python-lfdfiles
5754 (name "python-lfdfiles")
5755 (version "2020.1.1")
5759 (uri (pypi-uri "lfdfiles" version))
5762 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5763 (build-system python-build-system)
5765 `(("python-click" ,python-click)
5766 ("python-numpy" ,python-numpy)
5767 ("python-tifffile" ,python-tifffile)))
5768 (home-page "https://www.lfd.uci.edu/~gohlke/")
5769 (synopsis "Work with LFD data files")
5771 "Lfdfiles is a Python library and console script for reading, writing,
5772 converting, and viewing many of the proprietary file formats used to store
5773 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5774 (license license:bsd-3)))
5776 (define-public python-imageio
5778 (name "python-imageio")
5783 (uri (pypi-uri "imageio" version))
5786 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5787 (build-system python-build-system)
5789 `(#:tests? #f ; many tests require online data
5791 (modify-phases %standard-phases
5793 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5796 ;; Make installed package available for running the tests.
5797 (add-installed-pythonpath inputs outputs)
5798 (invoke "pytest" "-vv"))
5801 `(("python-numpy" ,python-numpy)
5802 ("python-pillow" ,python-pillow)
5803 ("python-psutil" ,python-psutil)))
5805 `(("python-pytest" ,python-pytest)))
5806 (home-page "https://imageio.github.io/")
5807 (synopsis "Library for reading and writing a wide range of image data")
5809 "Imageio is a Python library that provides an easy interface to read and
5810 write a wide range of image data, including animated images, video, volumetric
5811 data, and scientific formats.")
5812 (license license:bsd-2)))
5814 (define-public python-pycparser
5816 (name "python-pycparser")
5821 (uri (pypi-uri "pycparser" version))
5824 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5825 (outputs '("out" "doc"))
5826 (build-system python-build-system)
5828 `(("pkg-config" ,pkg-config)))
5831 (modify-phases %standard-phases
5834 (with-directory-excursion "tests"
5835 (invoke "python" "all_tests.py"))
5837 (add-after 'install 'install-doc
5838 (lambda* (#:key outputs #:allow-other-keys)
5839 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5840 (doc (string-append data "/doc/" ,name "-" ,version))
5841 (examples (string-append doc "/examples")))
5843 (for-each (lambda (file)
5844 (copy-file (string-append "." file)
5845 (string-append doc file)))
5846 '("/README.rst" "/CHANGES" "/LICENSE"))
5847 (copy-recursively "examples" examples)
5849 (home-page "https://github.com/eliben/pycparser")
5850 (synopsis "C parser in Python")
5852 "Pycparser is a complete parser of the C language, written in pure Python
5853 using the PLY parsing library. It parses C code into an AST and can serve as
5854 a front-end for C compilers or analysis tools.")
5855 (license license:bsd-3)))
5857 (define-public python2-pycparser
5858 (package-with-python2 python-pycparser))
5860 (define-public python-pywavelets
5862 (name "python-pywavelets")
5864 (home-page "https://github.com/PyWavelets/pywt")
5867 (uri (pypi-uri "PyWavelets" version))
5870 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5871 (build-system python-build-system)
5873 '(#:modules ((ice-9 ftw)
5877 (guix build python-build-system))
5879 (modify-phases %standard-phases
5882 (let ((cwd (getcwd))
5883 (libdir (find (cut string-prefix? "lib." <>)
5884 (scandir "build"))))
5885 (with-directory-excursion (string-append cwd "/build/" libdir)
5886 (invoke "pytest" "-vv"))))))))
5888 `(("python-matplotlib" ,python-matplotlib) ;for tests
5889 ("python-pytest" ,python-pytest)))
5891 `(("python-numpy" ,python-numpy)))
5892 (synopsis "Wavelet transforms in Python")
5894 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5895 mathematical basis functions that are localized in both time and frequency.
5896 Wavelet transforms are time-frequency transforms employing wavelets. They are
5897 similar to Fourier transforms, the difference being that Fourier transforms are
5898 localized only in frequency instead of in time and frequency.")
5899 (license license:expat)))
5901 (define-public python-pywinrm
5903 (name "python-pywinrm")
5908 (uri (pypi-uri "pywinrm" version))
5911 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5912 (build-system python-build-system)
5914 `(("python-six" ,python-six)
5915 ("python-requests_ntlm" ,python-requests_ntlm)
5916 ("python-xmltodict" ,python-xmltodict)
5917 ("python-kerberos" ,python-kerberos)))
5919 `(("python-mock" ,python-mock)
5920 ("python-pytest" ,python-pytest)))
5921 (home-page "https://github.com/diyan/pywinrm/")
5923 "Python library for Windows Remote Management (WinRM)")
5925 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5926 service. It allows you to invoke commands on target Windows machines from
5927 any machine that can run Python.")
5928 (license license:expat)))
5930 (define-public python-xcffib
5932 (name "python-xcffib")
5937 (uri (pypi-uri "xcffib" version))
5940 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5941 (build-system python-build-system)
5943 `(("libxcb" ,libxcb)))
5945 `(("python-cffi" ,python-cffi) ; used at run time
5946 ("python-six" ,python-six)))
5948 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5951 (modify-phases %standard-phases
5952 (add-after 'unpack 'fix-libxcb-path
5953 (lambda* (#:key inputs #:allow-other-keys)
5954 (let ((libxcb (assoc-ref inputs "libxcb")))
5955 (substitute* '("xcffib/__init__.py")
5956 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5958 (add-after 'install 'install-doc
5959 (lambda* (#:key outputs #:allow-other-keys)
5960 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5961 "/doc/" ,name "-" ,version)))
5963 (copy-file "README.md"
5964 (string-append doc "/README.md"))
5966 (home-page "https://github.com/tych0/xcffib")
5967 (synopsis "XCB Python bindings")
5969 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5970 support for Python 3 and PyPy. It is based on cffi.")
5971 (license license:expat)))
5973 (define-public python2-xcffib
5974 (package-with-python2 python-xcffib))
5976 (define-public python-cairocffi
5978 (name "python-cairocffi")
5983 (uri (pypi-uri "cairocffi" version))
5986 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5987 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5988 (build-system python-build-system)
5989 (outputs '("out" "doc"))
5993 ("gdk-pixbuf" ,gdk-pixbuf)
5997 `(("pkg-config" ,pkg-config)
5998 ("python-pytest" ,python-pytest)
5999 ("python-pytest-cov" ,python-pytest-cov)
6000 ("python-pytest-runner" ,python-pytest-runner)
6001 ("python-sphinx" ,python-sphinx)
6002 ("python-docutils" ,python-docutils)))
6004 `(("python-xcffib" ,python-xcffib))) ; used at run time
6007 (modify-phases %standard-phases
6008 (add-after 'unpack 'patch-paths
6009 (lambda* (#:key inputs outputs #:allow-other-keys)
6010 (substitute* (find-files "." "\\.py$")
6011 (("dlopen\\(ffi, 'cairo'")
6012 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
6013 "/lib/libcairo.so.2'"))
6014 (("dlopen\\(ffi, 'gdk-3'")
6015 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
6016 "/lib/libgtk-3.so.0'"))
6017 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
6018 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
6019 "/lib/libgdk_pixbuf-2.0.so.0'"))
6020 (("dlopen\\(ffi, 'glib-2.0'")
6021 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6022 "/lib/libglib-2.0.so.0'"))
6023 (("dlopen\\(ffi, 'gobject-2.0'")
6024 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6025 "/lib/libgobject-2.0.so.0'"))
6026 (("dlopen\\(ffi, 'pangocairo-1.0'")
6027 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6028 "/lib/libpangocairo-1.0.so.0'"))
6029 (("dlopen\\(ffi, 'pango-1.0'")
6030 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6031 "/lib/libpango-1.0.so.0'")))
6033 (add-after 'install 'install-doc
6034 (lambda* (#:key inputs outputs #:allow-other-keys)
6035 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6036 (doc (string-append data "/doc/" ,name "-" ,version))
6037 (html (string-append doc "/html")))
6038 (setenv "LD_LIBRARY_PATH"
6039 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6040 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6041 (setenv "LANG" "en_US.UTF-8")
6043 (for-each (lambda (file)
6044 (copy-file (string-append "." file)
6045 (string-append doc file)))
6046 '("/README.rst" "/CHANGES" "/LICENSE"))
6047 (system* "python" "setup.py" "build_sphinx")
6048 (copy-recursively "docs/_build/html" html)
6050 (home-page "https://github.com/Kozea/cairocffi")
6051 (synopsis "Python bindings and object-oriented API for Cairo")
6053 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6054 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6055 graphics library with support for multiple backends including image buffers,
6056 PNG, PostScript, PDF, and SVG file output.")
6057 (license license:bsd-3)))
6059 (define-public python2-cairocffi
6060 (package-with-python2 python-cairocffi))
6062 (define-public python-decorator
6064 (name "python-decorator")
6069 (uri (pypi-uri "decorator" version))
6071 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6072 (build-system python-build-system)
6073 (home-page "https://pypi.org/project/decorator/")
6074 (synopsis "Python module to simplify usage of decorators")
6076 "The aim of the decorator module is to simplify the usage of decorators
6077 for the average programmer, and to popularize decorators usage giving examples
6078 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6079 etc. The core of this module is a decorator factory.")
6080 (license license:expat)))
6082 (define-public python2-decorator
6083 (package-with-python2 python-decorator))
6085 (define-public python-drmaa
6087 (name "python-drmaa")
6092 (uri (pypi-uri "drmaa" version))
6094 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6095 (build-system python-build-system)
6096 ;; The test suite requires libdrmaa which is provided by the cluster
6097 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6098 ;; should be set to the path of the libdrmaa library.
6099 (arguments '(#:tests? #f))
6101 `(("python-nose" ,python-nose)))
6102 (home-page "https://pypi.org/project/drmaa/")
6103 (synopsis "Python bindings for the DRMAA library")
6105 "A Python package for Distributed Resource Management (DRM) job
6106 submission and control. This package is an implementation of the DRMAA 1.0
6107 Python language binding specification.")
6108 (license license:bsd-3)))
6110 (define-public python2-drmaa
6111 (package-with-python2 python-drmaa))
6113 (define-public python-grako
6115 (name "python-grako")
6121 (pypi-uri "grako" version ".zip"))
6124 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6125 (build-system python-build-system)
6126 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6129 ("python-pytest" ,python-pytest)
6130 ("python-pytest-runner" ,python-pytest-runner)))
6131 (home-page "https://bitbucket.org/neogeny/grako")
6132 (synopsis "EBNF parser generator")
6134 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6135 memoizing PEG/Packrat parser in Python.")
6136 (license license:bsd-3)))
6138 (define-public python2-grako
6139 (package-with-python2 python-grako))
6141 (define-public python-grandalf
6143 (name "python-grandalf")
6147 ;; There's no source tarball on PyPI.
6150 (url "https://github.com/bdcht/grandalf")
6151 (commit (string-append "v" version))))
6152 (file-name (git-file-name name version))
6155 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6156 (build-system python-build-system)
6159 (modify-phases %standard-phases
6162 (invoke "python" "setup.py" "pytest"))))))
6164 `(("python-pytest" ,python-pytest)
6165 ("python-pytest-runner" ,python-pytest-runner)))
6167 `(("python-numpy" ,python-numpy)
6168 ("python-ply" ,python-ply)))
6169 (home-page "https://github.com/bdcht/grandalf")
6170 (synopsis "Graph and drawing algorithms framework")
6172 "Grandalf is a Python package made for experimentations with graphs
6173 drawing algorithms. It is written in pure Python, and currently implements
6174 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6175 minimization approach. While not as fast or featured as graphviz or other
6176 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6177 than thousands of nodes, while keeping the source code simple enough to tweak
6178 and hack any part of it for experimental purpose. With a total of about 1500
6179 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6180 in less than 600 lines. The energy minimization approach is comprised of only
6183 Grandalf does only 2 not-so-simple things:
6185 @item computing the nodes (x,y) coordinates (based on provided nodes
6186 dimensions, and a chosen layout)
6187 @item routing the edges with lines or nurbs
6190 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6191 will help you find where to draw things like nodes and edges, but it’s up to
6192 you to actually draw things with your favorite toolkit.")
6193 ;; The user can choose either license.
6194 (license (list license:gpl2 license:epl1.0))))
6196 (define-public python-gridmap
6198 (name "python-gridmap")
6204 (url "https://github.com/pygridtools/gridmap")
6205 (commit (string-append "v" version))))
6206 (file-name (git-file-name name version))
6208 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6209 (build-system python-build-system)
6211 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6213 `(("python-psutil" ,python-psutil)
6214 ("python-drmaa" ,python-drmaa)
6215 ("python-pyzmq" ,python-pyzmq)))
6216 (home-page "https://github.com/pygridtools/gridmap")
6217 (synopsis "Create jobs on a cluster directly from Python")
6219 "Gridmap is a Python package to allow you to easily create jobs on the
6220 cluster directly from Python. You can directly map Python functions onto the
6221 cluster without needing to write any wrapper code yourself.")
6222 (license license:gpl3+)))
6224 (define-public python2-gridmap
6225 (package-with-python2 python-gridmap))
6227 (define-public python-honcho
6229 (name "python-honcho")
6235 (url "https://github.com/nickstenning/honcho")
6236 (commit (string-append "v" version))))
6237 (file-name (git-file-name name version))
6239 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6240 (build-system python-build-system)
6242 `(("python-pytest" ,python-pytest)
6243 ("python-mock" ,python-mock)
6244 ("python-tox" ,python-tox)
6245 ("which" ,which))) ;for tests
6247 `(("python-jinja2" ,python-jinja2)))
6250 (modify-phases %standard-phases
6252 (add-after 'install 'check
6253 (lambda* (#:key outputs inputs #:allow-other-keys)
6254 ;; fix honcho path in testsuite
6255 (substitute* "tests/conftest.py"
6256 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6257 "/bin/honcho" "'")))
6258 ;; It's easier to run tests after install.
6259 ;; Make installed package available for running the tests
6260 (add-installed-pythonpath inputs outputs)
6261 (invoke "py.test" "-v"))))))
6262 (home-page "https://github.com/nickstenning/honcho")
6263 (synopsis "Manage Procfile-based applications")
6265 "A Procfile is a file which describes how to run an application
6266 consisting of several processes. honcho starts all listed processes.
6267 The output of all running processes is collected by honcho and
6269 (license license:expat)))
6271 (define-public python2-honcho
6272 (package-with-python2 python-honcho))
6274 (define-public python-pexpect
6276 (name "python-pexpect")
6281 (uri (pypi-uri "pexpect" version))
6283 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6284 (build-system python-build-system)
6287 (modify-phases %standard-phases
6288 (add-before 'check 'prepare-tests
6290 (substitute* (find-files "tests")
6291 (("/bin/ls") (which "ls"))
6292 (("/bin/echo") (which "echo"))
6293 (("/bin/which") (which "which"))
6294 ;; Many tests try to use the /bin directory which
6295 ;; is not present in the build environment.
6296 ;; Use one that's non-empty and unlikely to change.
6298 ;; Disable failing test. See upstream bug report
6299 ;; https://github.com/pexpect/pexpect/issues/568
6300 (("def test_bash") "def _test_bash"))
6301 ;; XXX: Socket connection test gets "Connection reset by peer".
6302 ;; Why does it not work? Delete for now.
6303 (delete-file "tests/test_socket.py")
6305 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6307 `(("python-nose" ,python-nose)
6308 ("python-pytest" ,python-pytest)
6311 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6313 `(("python-ptyprocess" ,python-ptyprocess)))
6314 (home-page "http://pexpect.readthedocs.org/")
6315 (synopsis "Controlling interactive console applications")
6317 "Pexpect is a pure Python module for spawning child applications;
6318 controlling them; and responding to expected patterns in their output.
6319 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6320 child application and control it as if a human were typing commands.")
6321 (license license:isc)))
6323 (define-public python2-pexpect
6324 (package-with-python2 python-pexpect))
6326 (define-public python-setuptools-scm
6328 (name "python-setuptools-scm")
6332 (uri (pypi-uri "setuptools_scm" version))
6335 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6336 (build-system python-build-system)
6337 (home-page "https://github.com/pypa/setuptools_scm/")
6338 (synopsis "Manage Python package versions in SCM metadata")
6340 "Setuptools_scm handles managing your Python package versions in
6341 @dfn{software configuration management} (SCM) metadata instead of declaring
6342 them as the version argument or in a SCM managed file.")
6343 (license license:expat)))
6345 (define-public python2-setuptools-scm
6346 (package-with-python2 python-setuptools-scm))
6348 (define-public python-sexpdata
6350 (name "python-sexpdata")
6355 (uri (pypi-uri "sexpdata" version))
6358 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6359 (build-system python-build-system)
6360 (home-page "https://github.com/jd-boyd/sexpdata")
6361 (synopsis "S-expression parser for Python")
6363 "Sexpdata is an S-expression parser/serializer. It has load and dump
6364 functions like pickle, json or PyYAML module.")
6365 (license license:bsd-3)))
6367 (define-public python-pathlib2
6369 (name "python-pathlib2")
6374 (uri (pypi-uri "pathlib2" version))
6377 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6378 (build-system python-build-system)
6380 `(("python-scandir" ,python-scandir)
6381 ("python-six" ,python-six)))
6382 (home-page "https://pypi.org/project/pathlib2/")
6383 (synopsis "Object-oriented file system paths")
6384 (description "The goal of pathlib2 is to provide a backport of the
6385 standard @code{pathlib} module which tracks the standard library module, so
6386 all the newest features of the standard @code{pathlib} can be used also on
6387 older Python versions.")
6388 (license license:expat)))
6390 (define-public python-importlib-resources
6392 (name "python-importlib-resources")
6397 (uri (pypi-uri "importlib_resources" version))
6400 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6401 (build-system python-build-system)
6403 `(("python-setuptools-scm" ,python-setuptools-scm)
6404 ("python-toml" ,python-toml)))
6405 (home-page "http://importlib-resources.readthedocs.io/")
6406 (synopsis "Read resources from Python packages")
6408 "@code{importlib_resources} is a backport of Python 3's standard library
6409 @code{importlib.resources} module for Python 2.7, and Python 3.")
6410 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6411 (license license:asl2.0)))
6413 (define-public python2-importlib-resources
6415 (name "python2-importlib-resources")
6419 (uri (pypi-uri "importlib_resources" version))
6422 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6423 (build-system python-build-system)
6425 `(#:python ,python-2
6426 #:phases (modify-phases %standard-phases
6427 ;; The build system tests for python-wheel, but it is
6428 ;; not required for Guix nor the test suite. Just drop
6429 ;; it to make bootstrapping pytest easier.
6430 (add-after 'unpack 'drop-wheel-dependency
6432 (substitute* "setup.cfg"
6433 (("^[[:blank:]]+wheel")
6437 `(("python-pathlib2" ,python2-pathlib2)
6438 ("python-typing" ,python2-typing)))
6439 (home-page "https://gitlab.com/python-devs/importlib_resources")
6440 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6442 "This package provides an implementation of @code{importlib.resources}
6443 for older versions of Python.")
6444 (license license:asl2.0)))
6446 ;; For importlib-metadata-bootstrap below.
6447 (define-public python2-importlib-resources-bootstrap
6450 python2-importlib-resources
6451 (name "python2-importlib-resources-bootstrap")
6453 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6454 ("python-typing" ,python2-typing))))))
6456 (define-public python-importlib-metadata
6458 (name "python-importlib-metadata")
6463 (uri (pypi-uri "importlib_metadata" version))
6466 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6467 (build-system python-build-system)
6469 `(("python-zipp" ,python-zipp)))
6471 `(("python-setuptools-scm" ,python-setuptools-scm)
6472 ("python-pyfakefs" ,python-pyfakefs)
6473 ("python-packaging" ,python-packaging)))
6474 (home-page "https://importlib-metadata.readthedocs.io/")
6475 (synopsis "Read metadata from Python packages")
6477 "@code{importlib_metadata} is a library which provides an API for
6478 accessing an installed Python package's metadata, such as its entry points or
6479 its top-level name. This functionality intends to replace most uses of
6480 @code{pkg_resources} entry point API and metadata API. Along with
6481 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6482 need to use the older and less efficient @code{pkg_resources} package.")
6483 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6484 (license license:asl2.0)))
6486 (define-public python2-importlib-metadata
6487 (let ((base (package-with-python2 (strip-python2-variant
6488 python-importlib-metadata))))
6491 (name "python2-importlib-metadata")
6493 `(("python-setuptools-scm" ,python2-setuptools-scm)
6494 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6495 ("python-packaging" ,python2-packaging-bootstrap)))
6497 `(("python-configparser" ,python2-configparser)
6498 ("python-contextlib2" ,python2-contextlib2)
6499 ("python-importlib-resources" ,python2-importlib-resources)
6500 ("python-pathlib2" ,python2-pathlib2)
6501 ,@(package-propagated-inputs base))))))
6503 ;; This package is used by python2-pytest, and thus must not depend on it.
6504 (define-public python2-importlib-metadata-bootstrap
6507 python2-importlib-metadata
6508 (name "python2-importlib-metadata-bootstrap")
6511 ,@(package-arguments python2-importlib-metadata)))
6513 `(("python-zipp" ,python2-zipp-bootstrap)
6514 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6515 ("python-configparser" ,python2-configparser)
6516 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6517 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6519 (define-public python-importmagic
6521 (name "python-importmagic")
6526 (uri (pypi-uri "importmagic" version))
6529 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6530 (build-system python-build-system)
6531 (home-page "https://github.com/alecthomas/importmagic")
6532 (synopsis "Library for adding, removing and managing Python imports")
6534 "Importmagic is a Python library for automatically managing imports by
6535 finding unresolved symbols in Python code and their corresponding imports.")
6536 (license license:bsd-3)))
6538 (define-public python-jaraco-packaging
6540 (name "python-jaraco-packaging")
6545 (uri (pypi-uri "jaraco.packaging" version))
6548 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6549 (build-system python-build-system)
6551 `(("python-pytest" ,python-pytest)
6552 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6553 ("python-pytest-flake8" ,python-pytest-flake8)
6554 ("python-rst.linker" ,python-rst.linker)
6555 ("python-setuptools" ,python-setuptools)
6556 ("python-setuptools-scm" ,python-setuptools-scm)
6557 ("python-six" ,python-six)
6558 ("python-sphinx" ,python-sphinx)))
6559 (home-page "https://github.com/jaraco/jaraco.packaging")
6560 (synopsis "Tools to supplement packaging Python releases")
6562 "This package provides various tools to supplement packaging Python
6564 (license license:expat)))
6566 (define-public python-pathpy
6568 (name "python-pathpy")
6573 (uri (pypi-uri "path.py" version))
6575 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6576 (outputs '("out" "doc"))
6577 (build-system python-build-system)
6579 `(("python-appdirs" ,python-appdirs)
6580 ("python-importlib-metadata" ,python-importlib-metadata)))
6582 `(("python-setuptools-scm" ,python-setuptools-scm)
6583 ("python-sphinx" ,python-sphinx)
6584 ("python-rst.linker" ,python-rst.linker)
6585 ("python-pytest" ,python-pytest)
6586 ("python-pytest-runner" ,python-pytest-runner)
6587 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6590 (modify-phases %standard-phases
6591 (add-after 'build 'build-doc
6593 (setenv "LANG" "en_US.UTF-8")
6594 (invoke "python" "setup.py" "build_sphinx")))
6595 (add-after 'install 'install-doc
6596 (lambda* (#:key outputs #:allow-other-keys)
6597 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6598 (doc (string-append data "/doc/" ,name "-" ,version))
6599 (html (string-append doc "/html")))
6601 (for-each (lambda (file)
6602 (copy-file file (string-append doc "/" file)))
6603 '("README.rst" "CHANGES.rst"))
6604 (copy-recursively "build/sphinx/html" html)
6608 ;; The import time test aborts if an import takes longer than
6609 ;; 100ms. It may very well take a little longer than that.
6610 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6611 (home-page "https://github.com/jaraco/path.py")
6612 (synopsis "Python module wrapper for built-in os.path")
6614 "@code{path.py} implements path objects as first-class entities, allowing
6615 common operations on files to be invoked on those path objects directly.")
6616 (license license:expat)))
6618 (define-public python2-pathpy
6619 (package-with-python2 python-pathpy))
6621 (define-public python-simplegeneric
6623 (name "python-simplegeneric")
6628 (uri (pypi-uri "simplegeneric" version ".zip"))
6630 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6631 (build-system python-build-system)
6633 `(("unzip" ,unzip)))
6634 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6635 (synopsis "Python module for simple generic functions")
6637 "The simplegeneric module lets you define simple single-dispatch generic
6638 functions, akin to Python’s built-in generic functions like @code{len()},
6639 @code{iter()} and so on. However, instead of using specially-named methods,
6640 these generic functions use simple lookup tables, akin to those used by
6641 e.g. @code{pickle.dump()} and other generic functions found in the Python
6643 (license license:zpl2.1)))
6645 (define-public python2-simplegeneric
6646 (package-with-python2 python-simplegeneric))
6648 (define-public python-ipython-genutils
6649 ;; TODO: This package is retired, check if can be removed, see description.
6651 (name "python-ipython-genutils")
6656 (uri (pypi-uri "ipython_genutils" version))
6658 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6659 (build-system python-build-system)
6660 (arguments `(#:tests? #f)) ; no tests
6661 (home-page "https://ipython.org")
6662 (synopsis "Vestigial utilities from IPython")
6664 "This package provides retired utilities from IPython. No packages
6665 outside IPython/Jupyter should depend on it.
6667 This package shouldn't exist. It contains some common utilities shared by
6668 Jupyter and IPython projects during The Big Split. As soon as possible, those
6669 packages will remove their dependency on this, and this package will go
6671 (license license:bsd-3)))
6673 (define-public python2-ipython-genutils
6674 (package-with-python2 python-ipython-genutils))
6676 (define-public python-ipyparallel
6678 (name "python-ipyparallel")
6683 (uri (pypi-uri "ipyparallel" version))
6686 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6687 (build-system python-build-system)
6689 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6691 (modify-phases %standard-phases
6692 (add-before 'check 'prepare-for-tests
6694 (setenv "HOME" (getcwd))
6697 `(("python-dateutil" ,python-dateutil)
6698 ("python-decorator" ,python-decorator)
6699 ("python-ipykernel" ,python-ipykernel)
6700 ("python-ipython" ,python-ipython)
6701 ("python-ipython-genutils" ,python-ipython-genutils)
6702 ("python-jupyter-client" ,python-jupyter-client)
6703 ("python-pyzmq" ,python-pyzmq)
6704 ("python-tornado" ,python-tornado)
6705 ("python-traitlets" ,python-traitlets)))
6707 `(("python-ipython" ,python-ipython)
6708 ("python-mock" ,python-mock)
6709 ("python-nose" ,python-nose)
6710 ("python-pytest" ,python-pytest)
6711 ("python-pytest-cov" ,python-pytest-cov)
6712 ("python-testpath" ,python-testpath)))
6713 (home-page "https://ipython.org/")
6714 (synopsis "Interactive Parallel Computing with IPython")
6716 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6717 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6720 @item ipcluster - start/stop a cluster
6721 @item ipcontroller - start a scheduler
6722 @item ipengine - start an engine
6724 (license license:bsd-3)))
6726 (define-public python2-ipyparallel
6727 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6729 (inherit ipyparallel)
6731 `(("python2-futures" ,python2-futures)
6732 ,@(package-propagated-inputs ipyparallel))))))
6734 (define-public python-ipython-cluster-helper
6736 (name "python-ipython-cluster-helper")
6741 (uri (pypi-uri "ipython-cluster-helper" version))
6744 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6745 (modules '((guix build utils)))
6747 '(begin (substitute* "requirements.txt"
6748 (("ipython.*") "ipython\n"))
6750 (build-system python-build-system)
6752 `(#:tests? #f ; Test suite can't find IPython.
6754 (modify-phases %standard-phases
6756 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6759 (setenv "HOME" (getcwd))
6760 (add-installed-pythonpath inputs outputs)
6761 (invoke "python" "example/example.py" "--local"))
6764 `(("python-ipyparallel" ,python-ipyparallel)
6765 ("python-ipython" ,python-ipython)
6766 ("python-netifaces" ,python-netifaces)
6767 ("python-pyzmq" ,python-pyzmq)
6768 ("python-setuptools" ,python-setuptools)
6769 ("python-six" ,python-six)))
6770 (home-page "https://github.com/roryk/ipython-cluster-helper")
6772 "Simplify IPython cluster start up and use for multiple schedulers")
6774 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6775 profile, launches a cluster and returns a view. On program exit it shuts the
6776 cluster down and deletes the throwaway profile.")
6777 (license license:expat)))
6779 (define-public python2-ipython-cluster-helper
6780 (package-with-python2 python-ipython-cluster-helper))
6782 (define-public python-traitlets
6784 (name "python-traitlets")
6789 (uri (pypi-uri "traitlets" version))
6792 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6793 (build-system python-build-system)
6796 (modify-phases %standard-phases
6797 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6799 `(("python-ipython-genutils" ,python-ipython-genutils)
6800 ("python-decorator" ,python-decorator)))
6802 `(("python-pytest" ,python-pytest)))
6803 (properties `((python2-variant . ,(delay python2-traitlets))))
6804 (home-page "https://ipython.org")
6805 (synopsis "Configuration system for Python applications")
6807 "Traitlets is a framework that lets Python classes have attributes with
6808 type checking, dynamically calculated default values, and ‘on change’
6809 callbacks. The package also includes a mechanism to use traitlets for
6810 configuration, loading values from files or from command line arguments. This
6811 is a distinct layer on top of traitlets, so you can use traitlets in your code
6812 without using the configuration machinery.")
6813 (license license:bsd-3)))
6815 (define-public python2-traitlets
6816 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6820 `(("python2-enum34" ,python2-enum34)
6821 ,@(package-propagated-inputs traitlets))))))
6823 (define-public python-jupyter-core
6825 (name "python-jupyter-core")
6830 (uri (string-append (pypi-uri "jupyter_core" version)))
6833 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6834 (build-system python-build-system)
6835 ;; FIXME: not sure how to run the tests
6836 (arguments `(#:tests? #f))
6838 `(("python-traitlets" ,python-traitlets)))
6839 (home-page "http://jupyter.org/")
6840 (synopsis "Jupyter base package")
6842 "Jupyter core is the base package on which Jupyter projects rely.")
6843 (license license:bsd-3)))
6845 (define-public python2-jupyter-core
6846 (package-with-python2 python-jupyter-core))
6848 (define-public python-jupyter-client
6850 (name "python-jupyter-client")
6855 (uri (pypi-uri "jupyter_client" version))
6858 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6859 (build-system python-build-system)
6860 ;; Tests fail because of missing native python kernel which I assume is
6861 ;; provided by the ipython package, which we cannot use because it would
6862 ;; cause a dependency cycle.
6866 #:phases (modify-phases %standard-phases
6867 (add-after 'unpack 'set-tool-file-names
6868 (lambda* (#:key inputs #:allow-other-keys)
6869 (let ((iproute (assoc-ref inputs "iproute")))
6870 (substitute* "jupyter_client/localinterfaces.py"
6872 (string-append "'" iproute "/sbin/ip'")))
6875 `(("iproute" ,iproute)))
6877 `(("python-pyzmq" ,python-pyzmq)
6878 ("python-traitlets" ,python-traitlets)
6879 ("python-jupyter-core" ,python-jupyter-core)))
6880 (home-page "http://jupyter.org/")
6881 (synopsis "Jupyter protocol implementation and client libraries")
6883 "The @code{jupyter_client} package contains the reference implementation
6884 of the Jupyter protocol. It also provides client and kernel management APIs
6885 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6886 installing @code{kernelspec}s for use with Jupyter frontends.")
6887 (license license:bsd-3)))
6889 (define-public python2-jupyter-client
6890 (package-with-python2 python-jupyter-client))
6892 (define-public python-ipykernel
6894 (name "python-ipykernel")
6899 (uri (pypi-uri "ipykernel" version))
6901 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6902 (build-system python-build-system)
6905 (modify-phases %standard-phases
6908 (setenv "HOME" "/tmp")
6909 (invoke "pytest" "-v")
6911 (add-after 'install 'set-python-file-name
6912 (lambda* (#:key outputs #:allow-other-keys)
6913 ;; Record the absolute file name of the 'python' executable in
6915 (let ((out (assoc-ref outputs "out")))
6916 (substitute* (string-append out "/share/jupyter"
6917 "/kernels/python3/kernel.json")
6919 (string-append "\"" (which "python") "\"")))
6922 `(("python-ipython" ,python-ipython)
6923 ;; imported at runtime during connect
6924 ("python-jupyter-client" ,python-jupyter-client)))
6926 `(("python-flaky" ,python-flaky)
6927 ("python-nose" ,python-nose)
6928 ("python-pytest" ,python-pytest)))
6929 (home-page "https://ipython.org")
6930 (synopsis "IPython Kernel for Jupyter")
6932 "This package provides the IPython kernel for Jupyter.")
6933 (properties `((python2-variant . ,(delay python2-ipykernel))))
6934 (license license:bsd-3)))
6936 ;; Version 5.x and above no longer support Python 2.
6937 (define-public python2-ipykernel
6939 (name "python2-ipykernel")
6944 (uri (pypi-uri "ipykernel" version))
6946 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6947 (build-system python-build-system)
6949 `(#:python ,python-2))
6951 `(("python2-ipython" ,python2-ipython)
6952 ;; imported at runtime during connect
6953 ("python2-jupyter-client" ,python2-jupyter-client)
6954 ("python2-tornado" ,python2-tornado)
6955 ("python2-traitlets" ,python2-traitlets)))
6957 `(("python2-mock" ,python2-mock)
6958 ("python2-nose" ,python2-nose)
6959 ("python2-pytest" ,python2-pytest)
6960 ("python2-pytest-cov" ,python2-pytest-cov)))
6961 (home-page "https://ipython.org")
6962 (synopsis "IPython Kernel for Jupyter")
6964 "This package provides the IPython kernel for Jupyter.")
6965 (license license:bsd-3)))
6967 (define-public python-pari-jupyter
6969 (name "python-pari-jupyter")
6974 (uri (pypi-uri "pari_jupyter" version))
6977 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6978 (build-system python-build-system)
6980 `(("python-ipykernel" ,python-ipykernel)))
6982 `(("pari-gp" ,pari-gp)
6983 ("readline" ,readline)))
6985 `(#:tests? #f)) ; no test suite
6987 "https://github.com/jdemeyer/pari_jupyter")
6988 (synopsis "A Jupyter kernel for PARI/GP")
6989 (description "The package provides a PARI/GP kernel for Jupyter.")
6990 (license license:gpl3+)))
6992 (define-public python-backcall
6994 (name "python-backcall")
6999 (uri (pypi-uri "backcall" version))
7002 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7003 (build-system python-build-system)
7004 (home-page "https://github.com/takluyver/backcall/")
7005 (synopsis "Specifications for callback functions passed in to an API")
7007 "If your code lets other people supply callback functions, it's important
7008 to specify the function signature you expect, and check that functions support
7009 that. Adding extra parameters later would break other peoples code unless
7010 you're careful. The @code{backcall} package provides a way of specifying the
7011 callback signature using a prototype function.")
7012 (license license:bsd-3)))
7014 (define-public python-ipython
7016 (name "python-ipython")
7021 (uri (pypi-uri "ipython" version ".tar.gz"))
7023 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7024 (build-system python-build-system)
7026 `(("python-backcall" ,python-backcall)
7027 ("python-pyzmq" ,python-pyzmq)
7028 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7029 ("python-terminado" ,python-terminado)
7030 ("python-matplotlib" ,python-matplotlib)
7031 ("python-numpy" ,python-numpy)
7032 ("python-numpydoc" ,python-numpydoc)
7033 ("python-jedi" ,python-jedi)
7034 ("python-jinja2" ,python-jinja2)
7035 ("python-mistune" ,python-mistune)
7036 ("python-pexpect" ,python-pexpect)
7037 ("python-pickleshare" ,python-pickleshare)
7038 ("python-simplegeneric" ,python-simplegeneric)
7039 ("python-jsonschema" ,python-jsonschema)
7040 ("python-traitlets" ,python-traitlets)
7041 ("python-nbformat" ,python-nbformat)
7042 ("python-pygments" ,python-pygments)))
7044 `(("readline" ,readline)
7047 `(("graphviz" ,graphviz)
7048 ("pkg-config" ,pkg-config)
7049 ("python-requests" ,python-requests) ;; for tests
7050 ("python-testpath" ,python-testpath)
7051 ("python-nose" ,python-nose)))
7054 (modify-phases %standard-phases
7055 (add-after 'unpack 'make-docs-reproducible
7057 (substitute* "IPython/sphinxext/ipython_directive.py"
7058 ((".*import datetime") "")
7059 ((".*datetime.datetime.now\\(\\)") "")
7060 (("%timeit") "# %timeit"))
7062 ;; Tests can only be run after the library has been installed and not
7063 ;; within the source directory.
7065 (add-after 'install 'check
7066 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7069 ;; Make installed package available for running the tests
7070 (add-installed-pythonpath inputs outputs)
7071 (setenv "HOME" "/tmp/") ;; required by a test
7072 ;; We only test the core because one of the other tests
7073 ;; tries to import ipykernel.
7074 (invoke "python" "IPython/testing/iptest.py"
7075 "-v" "IPython/core/tests"))
7077 (add-before 'check 'fix-tests
7078 (lambda* (#:key inputs #:allow-other-keys)
7079 (substitute* "./IPython/utils/_process_posix.py"
7080 (("/usr/bin/env', 'which") (which "which")))
7081 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7082 (("#!/usr/bin/env python")
7083 (string-append "#!" (which "python"))))
7084 ;; This test introduces a circular dependency on ipykernel
7085 ;; (which depends on ipython).
7086 (delete-file "IPython/core/tests/test_display.py")
7087 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7088 (delete-file "IPython/core/tests/test_interactiveshell.py")
7090 (home-page "https://ipython.org")
7091 (synopsis "IPython is a tool for interactive computing in Python")
7093 "IPython provides a rich architecture for interactive computing with:
7094 Powerful interactive shells, a browser-based notebook, support for interactive
7095 data visualization, embeddable interpreters and tools for parallel
7097 (properties `((python2-variant . ,(delay python2-ipython))))
7098 (license license:bsd-3)))
7100 ;; This is the latest release of the LTS version of ipython with support for
7101 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7102 ;; dropped support for Python 2.7.
7103 (define-public python2-ipython
7105 (name "python2-ipython")
7110 (uri (pypi-uri "ipython" version ".tar.gz"))
7112 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7113 (build-system python-build-system)
7115 `(("python2-backports-shutil-get-terminal-size"
7116 ,python2-backports-shutil-get-terminal-size)
7117 ("python2-pathlib2" ,python2-pathlib2)
7118 ("python2-pyzmq" ,python2-pyzmq)
7119 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7120 ("python2-terminado" ,python2-terminado)
7121 ("python2-matplotlib" ,python2-matplotlib)
7122 ("python2-numpy" ,python2-numpy)
7123 ("python2-numpydoc" ,python2-numpydoc)
7124 ("python2-jinja2" ,python2-jinja2)
7125 ("python2-mistune" ,python2-mistune)
7126 ("python2-pexpect" ,python2-pexpect)
7127 ("python2-pickleshare" ,python2-pickleshare)
7128 ("python2-simplegeneric" ,python2-simplegeneric)
7129 ("python2-jsonschema" ,python2-jsonschema)
7130 ("python2-traitlets" ,python2-traitlets)
7131 ("python2-nbformat" ,python2-nbformat)
7132 ("python2-pygments" ,python2-pygments)))
7134 `(("readline" ,readline)
7137 `(("graphviz" ,graphviz)
7138 ("pkg-config" ,pkg-config)
7139 ("python2-requests" ,python2-requests) ;; for tests
7140 ("python2-testpath" ,python2-testpath)
7141 ("python2-mock" ,python2-mock)
7142 ("python2-nose" ,python2-nose)))
7144 `(#:python ,python-2
7146 (modify-phases %standard-phases
7147 (add-before 'check 'delete-broken-tests
7148 (lambda* (#:key inputs #:allow-other-keys)
7149 ;; These tests throw errors for unknown reasons.
7150 (delete-file "IPython/core/tests/test_displayhook.py")
7151 (delete-file "IPython/core/tests/test_magic_terminal.py")
7152 (delete-file "IPython/core/tests/test_profile.py")
7154 (home-page "https://ipython.org")
7155 (synopsis "IPython is a tool for interactive computing in Python")
7157 "IPython provides a rich architecture for interactive computing with:
7158 Powerful interactive shells, a browser-based notebook, support for interactive
7159 data visualization, embeddable interpreters and tools for parallel
7161 (license license:bsd-3)))
7163 (define-public python-ipython-documentation
7165 (inherit python-ipython)
7166 (name "python-ipython-documentation")
7167 (version (package-version python-ipython))
7170 (modify-phases %standard-phases
7174 (lambda* (#:key outputs #:allow-other-keys)
7175 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7176 (doc (string-append data "/doc/" ,name "-" ,version))
7177 (html (string-append doc "/html"))
7178 (man1 (string-append data "/man/man1"))
7179 (info (string-append data "/info"))
7180 (examples (string-append doc "/examples"))
7181 (python-arg (string-append "PYTHON=" (which "python"))))
7182 (setenv "LANG" "en_US.utf8")
7183 (with-directory-excursion "docs"
7184 ;; FIXME: pdf fails to build
7185 ;;(system* "make" "pdf" "PAPER=a4")
7186 (system* "make" python-arg "html")
7187 ;; FIXME: the generated texi file contains ^@^@, which trips
7189 ;; (system* "make" python-arg "info")
7191 (copy-recursively "docs/man" man1)
7192 (copy-recursively "examples" examples)
7193 (copy-recursively "docs/build/html" html)
7194 ;; (copy-file "docs/build/latex/ipython.pdf"
7195 ;; (string-append doc "/ipython.pdf"))
7197 ;; (copy-file "docs/build/texinfo/ipython.info"
7198 ;; (string-append info "/ipython.info"))
7199 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7202 `(("python-ipython" ,python-ipython)
7203 ("python-ipykernel" ,python-ipykernel)))
7205 `(("python-sphinx" ,python-sphinx)
7206 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7207 ;; FIXME: It's possible that a smaller union would work just as well.
7208 ("texlive" ,(texlive-union (list texlive-amsfonts
7210 texlive-generic-ifxetex
7211 texlive-generic-pdftex
7212 texlive-latex-capt-of
7214 texlive-latex-environ
7215 texlive-latex-eqparbox
7216 texlive-latex-etoolbox
7217 texlive-latex-expdlist
7218 texlive-latex-fancyhdr
7219 texlive-latex-fancyvrb
7220 texlive-latex-fncychap
7222 texlive-latex-framed
7223 texlive-latex-geometry
7224 texlive-latex-graphics
7225 texlive-latex-hyperref
7226 texlive-latex-mdwtools
7227 texlive-latex-multirow
7228 texlive-latex-needspace
7229 texlive-latex-oberdiek
7230 texlive-latex-parskip
7231 texlive-latex-preview
7232 texlive-latex-tabulary
7233 texlive-latex-threeparttable
7234 texlive-latex-titlesec
7235 texlive-latex-trimspaces
7237 texlive-latex-upquote
7239 texlive-latex-varwidth
7240 texlive-latex-wrapfig)))
7241 ("texinfo" ,texinfo)))))
7243 (define-public python-urwid
7245 (name "python-urwid")
7250 (uri (pypi-uri "urwid" version))
7253 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7254 (build-system python-build-system)
7255 (home-page "http://urwid.org")
7256 (synopsis "Console user interface library for Python")
7258 "Urwid is a curses-based UI/widget library for Python. It includes many
7259 features useful for text console applications.")
7260 (license license:lgpl2.1+)))
7262 (define-public python2-urwid
7263 (package-with-python2 python-urwid))
7265 (define-public python-urwidtrees
7267 (name "python-urwidtrees")
7272 ;; package author intends on distributing via github rather than pypi:
7273 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7275 (url "https://github.com/pazz/urwidtrees")
7277 (file-name (git-file-name name version))
7280 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7281 (build-system python-build-system)
7283 '(#:use-setuptools? #f
7284 #:tests? #f)) ; no tests
7285 (propagated-inputs `(("python-urwid" ,python-urwid)))
7286 (home-page "https://github.com/pazz/urwidtrees")
7287 (synopsis "Tree widgets for urwid")
7288 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7289 toolkit. Use it to build trees of widgets.")
7290 (license license:gpl3+)))
7292 (define-public python2-urwidtrees
7293 (package-with-python2 python-urwidtrees))
7295 (define-public python-ua-parser
7297 (name "python-ua-parser")
7302 (uri (pypi-uri "ua-parser" version))
7305 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7306 (build-system python-build-system)
7308 `(#:tests? #f)) ;no test suite in release
7310 `(("python-pyyaml" ,python-pyyaml)))
7311 (home-page "https://github.com/ua-parser/uap-python")
7312 (synopsis "User agent parser")
7314 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7315 (license license:asl2.0)))
7317 (define-public python2-ua-parser
7318 (package-with-python2 python-ua-parser))
7320 (define-public python-user-agents
7322 (name "python-user-agents")
7327 (uri (pypi-uri "user-agents" version))
7330 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7331 (build-system python-build-system)
7333 `(#:tests? #f)) ;missing devices.json test file in release
7335 `(("python-ua-parser" ,python-ua-parser)))
7336 (home-page "https://github.com/selwin/python-user-agents")
7337 (synopsis "User Agent strings parsing library")
7339 "A library to identify devices (phones, tablets) and their capabilities by
7340 parsing (browser/HTTP) user agent strings.")
7341 (license license:expat)))
7343 (define-public python2-user-agents
7344 (package-with-python2 python-user-agents))
7346 (define-public python-dbus
7348 (name "python-dbus")
7353 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7354 "dbus-python-" version ".tar.gz"))
7356 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7357 (build-system gnu-build-system)
7359 `(("pkg-config" ,pkg-config)))
7361 `(("python" ,python-wrapper)
7362 ("dbus-glib" ,dbus-glib)))
7363 (synopsis "Python bindings for D-bus")
7364 (description "python-dbus provides bindings for libdbus, the reference
7365 implementation of D-Bus.")
7366 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7367 (license license:expat)))
7369 (define-public python2-dbus
7370 (package (inherit python-dbus)
7371 (name "python2-dbus")
7372 (inputs `(("python" ,python-2)
7373 ,@(alist-delete "python"
7374 (package-inputs python-dbus)
7377 (define-public python-notify2
7379 (name "python-notify2")
7384 (uri (pypi-uri "notify2" version))
7387 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7388 (build-system python-build-system)
7389 (arguments `(#:tests? #f)) ; tests depend on system state
7391 `(("python-dbus" ,python-dbus)))
7392 (home-page "https://bitbucket.org/takluyver/pynotify2")
7393 (synopsis "Python interface to D-Bus notifications")
7395 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7396 It is a reimplementation of pynotify in pure Python, and an alternative to
7397 the GObject Introspection bindings to libnotify for non-GTK applications.")
7398 (license (list license:bsd-2
7399 license:lgpl2.1+))))
7401 (define-public python2-notify2
7402 (package-with-python2 python-notify2))
7404 ;; beautifulsoup4 has a totally different namespace than 3.x,
7405 ;; and pypi seems to put it under its own name, so I guess we should too
7406 (define-public python-beautifulsoup4
7408 (name "python-beautifulsoup4")
7413 (uri (pypi-uri "beautifulsoup4" version))
7416 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7417 (build-system python-build-system)
7420 (modify-phases %standard-phases
7421 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7422 ;; must use this conversion script when building with Python 3. The
7423 ;; conversion script also runs the tests.
7424 ;; For more information, see the file 'convert-py3k' in the source
7427 (lambda _ (invoke "./convert-py3k"))))))
7429 `(("python-soupsieve" ,python-soupsieve)))
7431 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7433 "Python screen-scraping library")
7435 "Beautiful Soup is a Python library designed for rapidly setting up
7436 screen-scraping projects. It offers Pythonic idioms for navigating,
7437 searching, and modifying a parse tree, providing a toolkit for
7438 dissecting a document and extracting what you need. It automatically
7439 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7440 (license license:expat)
7441 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7443 (define-public python2-beautifulsoup4
7445 (inherit (package-with-python2
7446 (strip-python2-variant python-beautifulsoup4)))
7447 (arguments `(#:python ,python-2))))
7449 (define-public python-soupsieve
7451 (name "python-soupsieve")
7456 (uri (pypi-uri "soupsieve" version))
7459 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7460 (build-system python-build-system)
7461 (arguments `(#:tests? #f))
7462 ;;XXX: 2 tests fail currently despite claming they were to be
7463 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7464 ;;don't want to create a circular dependency.
7465 (home-page "https://github.com/facelessuser/soupsieve")
7466 (synopsis "CSS selector library")
7468 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7469 Soup 4. It aims to provide selecting, matching, and filtering using modern
7470 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7471 specifications up through the latest CSS level 4 drafts and beyond (though
7472 some are not yet implemented).")
7473 (properties `((python2-variant . ,(delay python2-soupsieve))))
7474 (license license:expat)))
7476 ;; This is the last version that supports python-2
7477 (define-public python2-soupsieve
7478 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7485 (uri (pypi-uri "soupsieve" version))
7488 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7490 `(("python2-backports-functools-lru-cache"
7491 ,python2-backports-functools-lru-cache)
7492 ,@(package-propagated-inputs base))))))
7494 (define-public python-netifaces
7496 (name "python-netifaces")
7501 (uri (pypi-uri "netifaces" version))
7504 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7505 (build-system python-build-system)
7506 (home-page "https://github.com/al45tair/netifaces")
7508 "Python module for portable network interface information")
7510 "Netifaces is a Python module providing information on network
7511 interfaces in an easy and portable manner.")
7512 (license license:expat)))
7514 (define-public python2-netifaces
7515 (package-with-python2 python-netifaces))
7517 (define-public python-networkx
7519 (name "python-networkx")
7524 (uri (pypi-uri "networkx" version))
7526 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7527 (build-system python-build-system)
7529 '(#:phases (modify-phases %standard-phases
7531 (lambda* (#:key tests? #:allow-other-keys)
7533 (invoke "pytest" "-vv" "--pyargs" "networkx")
7534 (format #t "test suite not run~%"))
7536 ;; python-decorator is needed at runtime.
7538 `(("python-decorator" ,python-decorator)))
7540 `(("python-pytest" ,python-pytest)))
7541 (home-page "https://networkx.github.io/")
7542 (synopsis "Python module for creating and manipulating graphs and networks")
7544 "NetworkX is a Python package for the creation, manipulation, and study
7545 of the structure, dynamics, and functions of complex networks.")
7546 (properties `((python2-variant . ,(delay python2-networkx))))
7547 (license license:bsd-3)))
7549 ;; NetworkX 2.2 is the last version with support for Python 2.
7550 (define-public python2-networkx
7551 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7557 (uri (pypi-uri "networkx" version ".zip"))
7560 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7562 `(#:python ,python-2))
7564 `(("python-nose" ,python2-nose)
7565 ("unzip" ,unzip))))))
7567 (define-public python-datrie
7569 (name "python-datrie")
7574 (uri (pypi-uri "datrie" version))
7577 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7578 (build-system python-build-system)
7580 `(("python-cython" ,python-cython)
7581 ("python-hypothesis" ,python-hypothesis)
7582 ("python-pytest" ,python-pytest)
7583 ("python-pytest-runner" ,python-pytest-runner)))
7584 (home-page "https://github.com/kmike/datrie")
7585 (synopsis "Fast, efficiently stored trie for Python")
7587 "This package provides a fast, efficiently stored trie implementation for
7589 (license license:lgpl2.1+)))
7591 (define-public snakemake
7598 (uri (pypi-uri "snakemake" version))
7600 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7601 (build-system python-build-system)
7603 ;; TODO: Package missing test dependencies.
7606 (modify-phases %standard-phases
7607 ;; For cluster execution Snakemake will call Python. Since there is
7608 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7609 ;; this by calling the snakemake wrapper instead.
7610 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7611 (lambda* (#:key outputs #:allow-other-keys)
7612 (substitute* "snakemake/executors.py"
7613 (("\\{sys.executable\\} -m snakemake")
7614 (string-append (assoc-ref outputs "out")
7618 `(("python-appdirs" ,python-appdirs)
7619 ("python-configargparse" ,python-configargparse)
7620 ("python-datrie" ,python-datrie)
7621 ("python-docutils" ,python-docutils)
7622 ("python-gitpython" ,python-gitpython)
7623 ("python-jinja2" ,python-jinja2)
7624 ("python-jsonschema" ,python-jsonschema)
7625 ("python-networkx" ,python-networkx)
7626 ("python-psutil" ,python-psutil)
7627 ("python-pyyaml" ,python-pyyaml)
7628 ("python-ratelimiter" ,python-ratelimiter)
7629 ("python-requests" ,python-requests)
7630 ("python-wrapt" ,python-wrapt)))
7631 (home-page "https://snakemake.readthedocs.io")
7632 (synopsis "Python-based execution environment for make-like workflows")
7634 "Snakemake aims to reduce the complexity of creating workflows by
7635 providing a clean and modern domain specific specification language (DSL) in
7636 Python style, together with a fast and comfortable execution environment.")
7637 (license license:expat)))
7639 (define-public python-pyqrcode
7641 (name "python-pyqrcode")
7646 (uri (pypi-uri "PyQRCode" version))
7649 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7650 (build-system python-build-system)
7652 "https://github.com/mnooner256/pyqrcode")
7653 (synopsis "QR code generator")
7655 "Pyqrcode is a QR code generator written purely in Python with
7656 SVG, EPS, PNG and terminal output.")
7657 (license license:bsd-3)))
7659 (define-public python-seaborn
7661 (name "python-seaborn")
7666 (uri (pypi-uri "seaborn" version))
7668 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7669 (build-system python-build-system)
7672 (modify-phases %standard-phases
7673 (add-before 'check 'start-xserver
7674 (lambda* (#:key inputs #:allow-other-keys)
7675 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7676 ;; There must be a running X server and make check doesn't
7677 ;; start one. Therefore we must do it.
7678 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7679 (setenv "DISPLAY" ":1")
7681 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7683 `(("python-pandas" ,python-pandas)
7684 ("python-matplotlib" ,python-matplotlib)
7685 ("python-numpy" ,python-numpy)
7686 ("python-scipy" ,python-scipy)))
7688 `(("python-pytest" ,python-pytest)
7689 ("xorg-server" ,xorg-server-for-tests)))
7690 (home-page "https://seaborn.pydata.org/")
7691 (synopsis "Statistical data visualization")
7693 "Seaborn is a library for making attractive and informative statistical
7694 graphics in Python. It is built on top of matplotlib and tightly integrated
7695 with the PyData stack, including support for numpy and pandas data structures
7696 and statistical routines from scipy and statsmodels.")
7697 (properties `((python2-variant . ,(delay python2-seaborn))))
7698 (license license:bsd-3)))
7700 ;; 0.9.1 is the last release with support for Python 2.
7701 (define-public python2-seaborn
7702 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7708 (uri (pypi-uri "seaborn" version))
7711 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7713 (define-public python-mpmath
7715 (name "python-mpmath")
7719 (uri (pypi-uri "mpmath" version))
7720 (file-name (git-file-name name version))
7723 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7724 (build-system python-build-system)
7726 `(("python-pytest" ,python-pytest)))
7729 (modify-phases %standard-phases
7732 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7733 (home-page "http://mpmath.org")
7734 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7736 "@code{mpmath} can be used as an arbitrary-precision substitute for
7737 Python's float/complex types and math/cmath modules, but also does much
7738 more advanced mathematics.")
7739 (license license:bsd-3)))
7741 (define-public python2-mpmath
7742 (package-with-python2 python-mpmath))
7744 (define-public python-bigfloat
7746 (name "python-bigfloat")
7751 (uri (pypi-uri "bigfloat" version))
7753 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7754 (build-system python-build-system)
7757 (home-page "https://github.com/mdickinson/bigfloat")
7758 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7760 "This package provides a Python interface to the MPFR library for
7761 multiprecision arithmetic.")
7762 (license license:lgpl3+)))
7764 (define-public python2-bigfloat
7765 (package-with-python2 python-bigfloat))
7767 (define-public python-sympy
7769 (name "python-sympy")
7774 (uri (pypi-uri "sympy" version))
7776 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7777 (build-system python-build-system)
7780 (modify-phases %standard-phases
7782 (lambda* (#:key outputs #:allow-other-keys)
7784 (or (which "python3") (which "python"))
7785 "-c" "import sympy; sympy.test(\"/core\")"))))))
7787 `(("python-mpmath" ,python-mpmath)))
7788 (home-page "https://www.sympy.org/")
7789 (synopsis "Python library for symbolic mathematics")
7791 "SymPy is a Python library for symbolic mathematics. It aims to become a
7792 full-featured computer algebra system (CAS) while keeping the code as simple
7793 as possible in order to be comprehensible and easily extensible.")
7794 (license license:bsd-3)))
7796 (define-public python2-sympy
7798 (inherit (package-with-python2 python-sympy))
7799 (version "1.5.1") ; last release for python2
7803 (uri (pypi-uri "sympy" version))
7805 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7807 (define-public python-q
7814 (uri (pypi-uri "q" version))
7817 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7818 (build-system python-build-system)
7819 (home-page "https://github.com/zestyping/q")
7820 (synopsis "Quick-and-dirty debugging output for tired programmers")
7822 "q is a Python module for \"print\" style of debugging Python code. It
7823 provides convenient short API for print out of values, tracebacks, and
7824 falling into the Python interpreter.")
7825 (license license:asl2.0)))
7827 (define-public python2-q
7828 (package-with-python2 python-q))
7830 (define-public python-xlib
7832 (name "python-xlib")
7838 (url "https://github.com/python-xlib/python-xlib")
7840 (file-name (git-file-name name version))
7842 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7843 (build-system python-build-system)
7846 (modify-phases %standard-phases
7847 (add-before 'check 'start-xserver
7848 (lambda* (#:key inputs #:allow-other-keys)
7849 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7850 ;; There must be a running X server and make check doesn't
7851 ;; start one. Therefore we must do it.
7852 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7853 (setenv "DISPLAY" ":1")
7856 `(("python-mock" ,python-mock)
7857 ("python-setuptools-scm" ,python-setuptools-scm)
7858 ("python-six" ,python-six)
7859 ("xorg-server" ,xorg-server)))
7860 (home-page "https://github.com/python-xlib/python-xlib")
7861 (synopsis "Python X11 client library")
7863 "The Python X Library is intended to be a fully functional
7864 X client library for Python programs. It is useful to implement
7865 low-level X clients. It is written entirely in Python.")
7866 (license license:gpl2+)))
7868 (define-public python2-xlib
7869 (package-with-python2 python-xlib))
7871 (define-public python-singledispatch
7873 (name "python-singledispatch")
7878 (uri (pypi-uri "singledispatch" version))
7881 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7882 (build-system python-build-system)
7884 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7886 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7887 (synopsis "Backport of singledispatch feature from Python 3.4")
7889 "This library brings functools.singledispatch from Python 3.4 to Python
7891 (license license:expat)))
7893 (define-public python2-singledispatch
7894 (package-with-python2 python-singledispatch))
7896 ;; the python- version can be removed with python-3.5
7897 (define-public python-backports-abc
7899 (name "python-backports-abc")
7904 (uri (pypi-uri "backports_abc" version))
7907 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7908 (build-system python-build-system)
7909 (home-page "https://github.com/cython/backports_abc")
7910 (synopsis "Backport of additions to the 'collections.abc' module")
7912 "Python-backports-abc provides a backport of additions to the
7913 @code{collections.abc} module in Python-3.5.")
7914 (license license:psfl)))
7916 (define-public python2-backports-abc
7917 (package-with-python2 python-backports-abc))
7919 (define-public python-backports-csv
7921 (name "python-backports-csv")
7926 (uri (pypi-uri "backports.csv" version))
7928 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7929 (build-system python-build-system)
7930 (home-page "https://github.com/ryanhiebert/backports.csv")
7931 (synopsis "Backport of Python 3's csv module for Python 2")
7933 "Provides a backport of Python 3's @code{csv} module for parsing
7934 comma separated values. The API of the @code{csv} module in Python 2
7935 is drastically different from the @code{csv} module in Python 3.
7936 This is due, for the most part, to the difference between str in
7937 Python 2 and Python 3.")
7938 (license license:psfl)))
7940 (define-public python2-backports-csv
7941 (package-with-python2 python-backports-csv))
7943 (define-public python2-backports-shutil-get-terminal-size
7945 (name "python2-backports-shutil-get-terminal-size")
7950 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7953 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7954 (build-system python-build-system)
7956 `(#:python ,python-2
7958 (modify-phases %standard-phases
7961 (setenv "PYTHONPATH" (string-append "./build/lib:"
7962 (getenv "PYTHONPATH")))
7963 (invoke "py.test" "-v"))))))
7965 `(("python2-pytest" ,python2-pytest)))
7966 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7967 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7969 "This package provides a backport of the @code{get_terminal_size
7970 function} from Python 3.3's @code{shutil}.
7971 Unlike the original version it is written in pure Python rather than C,
7972 so it might be a tiny bit slower.")
7973 (license license:expat)))
7975 (define-public python-waf
7981 (uri (string-append "https://waf.io/"
7982 "waf-" version ".tar.bz2"))
7985 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7986 (build-system python-build-system)
7989 (modify-phases %standard-phases
7992 ;; XXX: Find a way to add all extra tools.
7993 (let ((tools '("gccdeps"
7994 "clang_compilation_database")))
7995 (invoke "python" "waf-light" "configure" "build"
7996 (string-append "--tools="
7997 (string-join tools ","))))))
8000 (invoke "python" "waf" "--version")))
8002 (lambda* (#:key outputs #:allow-other-keys)
8003 (let ((out (assoc-ref outputs "out")))
8004 (install-file "waf" (string-append out "/bin")))
8006 ;; waf breaks when it is wrapped.
8008 (home-page "https://waf.io/")
8009 (synopsis "Python-based build system")
8011 "Waf is a Python-based framework for configuring, compiling and installing
8013 (license license:bsd-3)))
8015 (define-public python2-waf
8016 (package-with-python2 python-waf))
8018 (define-public python-pyzmq
8020 (name "python-pyzmq")
8025 (uri (pypi-uri "pyzmq" version))
8027 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8028 (build-system python-build-system)
8031 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8032 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8033 ;; --inplace' for 'python setup.py test' to work.
8036 `(("zeromq" ,zeromq)))
8038 `(("pkg-config" ,pkg-config)
8039 ("python-nose" ,python-nose)))
8040 (home-page "https://github.com/zeromq/pyzmq")
8041 (synopsis "Python bindings for 0MQ")
8043 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8044 (license license:bsd-4)))
8046 (define-public python2-pyzmq
8047 (package-with-python2 python-pyzmq))
8049 (define-public python-pep8
8050 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8051 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8052 ;; some dependents' test suites, and nothing more.
8054 (name "python-pep8")
8059 (uri (pypi-uri "pep8" version))
8062 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8063 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8064 (build-system python-build-system)
8065 (home-page "https://pep8.readthedocs.org/")
8066 (synopsis "Python style guide checker")
8068 "This tools checks Python code against some of the style conventions in
8070 (license license:expat)))
8072 (define-public python2-pep8
8073 (package-with-python2 python-pep8))
8075 (define-public python-pep517
8077 (name "python-pep517")
8082 (uri (pypi-uri "pep517" version))
8085 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8086 (build-system python-build-system)
8089 (modify-phases %standard-phases
8091 (lambda* (#:key tests? #:allow-other-keys)
8092 (delete-file "pytest.ini")
8093 ;; This test tries to connect to the internet
8094 (delete-file "tests/test_meta.py")
8099 `(("python-mock" ,python-mock)
8100 ("python-pytest" ,python-pytest)
8101 ("python-testpath" ,python-testpath)))
8103 `(("python-toml" ,python-toml)
8104 ("python-wheel" ,python-wheel)))
8105 (home-page "https://github.com/pypa/pep517")
8106 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8108 "Wrappers to build Python packages using PEP 517 hooks.")
8109 (properties `((python2-variant . ,(delay python2-pep517))))
8110 (license license:expat)))
8112 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8113 (define-public python2-pep517
8114 (let ((base (package-with-python2
8115 (strip-python2-variant python-pep517))))
8118 (name "python2-pep517")
8121 ,@(package-arguments base)))
8122 (native-inputs `()))))
8124 (define-public python-pyflakes
8126 (name "python-pyflakes")
8131 (uri (pypi-uri "pyflakes" version))
8134 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8135 (build-system python-build-system)
8137 "https://github.com/pyflakes/pyflakes")
8138 (synopsis "Passive checker of Python programs")
8140 "Pyflakes statically checks Python source code for common errors.")
8141 (license license:expat)))
8143 (define-public python2-pyflakes
8144 (package-with-python2 python-pyflakes))
8146 ;; Flake8 2.6 requires an older version of pyflakes.
8147 ;; This should be removed ASAP.
8148 (define-public python-pyflakes-1.2
8149 (package (inherit python-pyflakes)
8154 (uri (pypi-uri "pyflakes" version))
8157 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
8160 (modify-phases %standard-phases
8161 ;; This one test fails.
8163 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
8165 `(("python-pytest" ,python-pytest)))))
8167 (define-public python-mccabe
8169 (name "python-mccabe")
8174 (uri (pypi-uri "mccabe" version))
8177 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8178 (build-system python-build-system)
8180 `(("python-pytest" ,python-pytest-bootstrap)
8181 ("python-pytest-runner" ,python-pytest-runner)))
8182 (home-page "https://github.com/flintwork/mccabe")
8183 (synopsis "McCabe checker, plugin for flake8")
8185 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8186 complexity of Python source code.")
8187 (license license:expat)))
8189 (define-public python2-mccabe
8190 (package-with-python2 python-mccabe))
8192 (define-public python-mccabe-0.2.1
8193 (package (inherit python-mccabe)
8198 (uri (pypi-uri "mccabe" version))
8201 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
8203 (define-public python2-mccabe-0.2.1
8204 (package-with-python2 python-mccabe-0.2.1))
8206 ;; Flake8 2.4.1 requires an older version of pep8.
8207 ;; This should be removed ASAP.
8208 (define-public python-pep8-1.5.7
8209 (package (inherit python-pep8)
8214 (uri (pypi-uri "pep8" version))
8217 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
8219 ;; XXX Tests not compatible with Python 3.5.
8222 (define-public python2-pep8-1.5.7
8223 (package-with-python2 python-pep8-1.5.7))
8225 (define-public python-flake8
8227 (name "python-flake8")
8231 (uri (pypi-uri "flake8" version))
8234 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8235 (build-system python-build-system)
8238 (modify-phases %standard-phases
8240 (add-after 'install 'check
8241 (lambda* (#:key inputs outputs #:allow-other-keys)
8242 (add-installed-pythonpath inputs outputs)
8243 (invoke "pytest" "-v")
8246 `(("python-pycodestyle" ,python-pycodestyle)
8247 ("python-entrypoints" ,python-entrypoints)
8248 ("python-pyflakes" ,python-pyflakes)
8249 ("python-mccabe" ,python-mccabe)))
8251 `(("python-mock" ,python-mock)
8252 ("python-pytest" ,python-pytest-bootstrap)))
8253 (home-page "https://gitlab.com/pycqa/flake8")
8255 "The modular source code checker: pep8, pyflakes and co")
8257 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8258 (properties `((python2-variant . ,(delay python2-flake8))))
8259 (license license:expat)))
8261 (define-public python2-flake8
8262 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8263 (package (inherit base)
8265 `(("python2-configparser" ,python2-configparser)
8266 ("python2-enum34" ,python2-enum34)
8267 ("python2-functools32" ,python2-functools32)
8268 ("python2-typing" ,python2-typing)
8269 ,@(package-propagated-inputs base))))))
8271 ;; python-hacking requires flake8 <2.7.0.
8272 (define-public python-flake8-2.6
8274 (inherit python-flake8)
8278 (uri (pypi-uri "flake8" version))
8281 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
8284 (modify-phases %standard-phases
8285 (add-after 'unpack 'use-later-pycodestyles
8287 (substitute* '("flake8.egg-info/requires.txt"
8289 (("pycodestyle >= 2.0, < 2.1")
8290 "pycodestyle >= 2.0"))
8293 (add-after 'install 'check
8294 (lambda* (#:key inputs outputs #:allow-other-keys)
8295 (add-installed-pythonpath inputs outputs)
8296 (invoke "pytest" "-v")
8299 `(("python-pep8" ,python-pep8)
8300 ("python-pycodestyle" ,python-pycodestyle)
8301 ("python-entrypoints" ,python-entrypoints)
8302 ("python-pyflakes" ,python-pyflakes-1.2)
8303 ("python-mccabe" ,python-mccabe)))))
8305 (define-public python-flake8-bugbear
8307 (name "python-flake8-bugbear")
8312 (uri (pypi-uri "flake8-bugbear" version))
8315 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8316 (build-system python-build-system)
8319 (modify-phases %standard-phases
8320 (add-before 'check 'disable-test
8322 ;; This test fails on slow computers.
8323 (substitute* "tests/test_bugbear.py"
8324 (("def test_does_not_crash_on_any_valid_code")
8325 "def _test_does_not_crash_on_any_valid_code")))))))
8327 `(("python-hypothesis" ,python-hypothesis)
8328 ("python-hypothesmith" ,python-hypothesmith)))
8330 `(("python-attrs" ,python-attrs)
8331 ("python-flake8" ,python-flake8)))
8332 (home-page "https://github.com/PyCQA/flake8-bugbear")
8334 "Flake8 plugin for finding likely bugs and design problems in your program")
8336 "This package contains a plugin for Flake8 finding likely bugs and
8337 design problems in your program. It contains warnings that don't belong
8338 in pyflakes and pycodestyle.")
8339 (license license:expat)))
8341 (define-public python-flake8-polyfill
8343 (name "python-flake8-polyfill")
8348 (uri (pypi-uri "flake8-polyfill" version))
8351 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8352 (build-system python-build-system)
8355 (modify-phases %standard-phases
8358 ;; Be compatible with Pytest 4:
8359 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8360 (substitute* "setup.cfg"
8364 (setenv "PYTHONPATH"
8365 (string-append (getcwd) "/build/lib:"
8366 (getenv "PYTHONPATH")))
8367 (invoke "py.test" "-v"))))))
8369 `(("python-flake8" ,python-flake8)
8370 ("python-mock" ,python-mock)
8371 ("python-pep8" ,python-pep8)
8372 ("python-pycodestyle" ,python-pycodestyle)
8373 ("python-pytest" ,python-pytest)))
8374 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8375 (synopsis "Polyfill package for Flake8 plugins")
8377 "This package that provides some compatibility helpers for Flake8
8378 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8379 (license license:expat)))
8381 (define-public python2-flake8-polyfill
8382 (package-with-python2 python-flake8-polyfill))
8384 (define-public python-flake8-pyi
8386 (name "python-flake8-pyi")
8391 (uri (pypi-uri "flake8-pyi" version))
8394 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8395 (build-system python-build-system)
8397 `(("python-attrs" ,python-attrs)
8398 ("python-flake8" ,python-flake8)
8399 ("python-pyflakes" ,python-pyflakes)))
8400 (home-page "https://github.com/ambv/flake8-pyi")
8402 "Flake8 plugin that provides specializations for type hinting stub files")
8404 "This package contains a plugin that provides specializations for
8405 type hinting stub files, especially interesting for linting typeshed. It
8406 adds the @file{.pyi} extension to the default value of the @code{--filename}
8407 command-line argument to Flake8. This means stubs are linted by default with
8408 this plugin enabled, without needing to explicitly list every file. It
8409 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8410 expressions after the entire file has been read. This enables support for
8411 first-class forward references that stub files use.")
8412 (license license:expat)))
8414 (define-public python-flake8-pie
8416 (name "python-flake8-pie")
8421 (uri (pypi-uri "flake8-pie" version))
8423 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8424 (build-system python-build-system)
8425 (home-page "https://github.com/sbdchd/flake8-pie")
8426 (synopsis "Flake8 extension that implements lints")
8428 "This package provides a flake8 extension that implements miscellaneous
8430 (license license:bsd-2)))
8432 (define-public python-autoflake
8434 (name "python-autoflake")
8439 (uri (pypi-uri "autoflake" version))
8441 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8442 (build-system python-build-system)
8444 `(("python-pyflakes" ,python-pyflakes)))
8445 (home-page "https://github.com/myint/autoflake")
8446 (synopsis "Removes unused imports and unused variables")
8448 "@code{autoflake} removes unused imports and unused variables from Python
8449 code as reported by @code{pyflakes}.
8451 By default, it only removes unused imports for modules that are part of the
8452 standard library. Removal of unused variables is also disabled by default.
8453 It also removes useless @code{pass} statements.")
8454 (license license:expat)))
8456 (define-public python-mistune
8458 (name "python-mistune")
8463 (uri (pypi-uri "mistune" version))
8466 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8467 (build-system python-build-system)
8469 `(("python-nose" ,python-nose)
8470 ("python-cython" ,python-cython)))
8471 (home-page "https://github.com/lepture/mistune")
8472 (synopsis "Markdown parser in pure Python")
8473 (description "This package provides a fast markdown parser in pure
8475 (license license:bsd-3)))
8477 (define-public python2-mistune
8478 (package-with-python2 python-mistune))
8480 (define-public python-markdown
8482 (name "python-markdown")
8487 (uri (pypi-uri "Markdown" version))
8490 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8491 (build-system python-build-system)
8493 `(("python-nose" ,python-nose)
8494 ("python-pyyaml" ,python-pyyaml)))
8495 (home-page "https://python-markdown.github.io/")
8496 (synopsis "Python implementation of Markdown")
8498 "This package provides a Python implementation of John Gruber's
8499 Markdown. The library features international input, various Markdown
8500 extensions, and several HTML output formats. A command line wrapper
8501 markdown_py is also provided to convert Markdown files to HTML.")
8502 (properties `((python2-variant . ,(delay python2-markdown))))
8503 (license license:bsd-3)))
8505 ;; Markdown 3.2 dropped support for Python 2.
8506 (define-public python2-markdown
8507 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8513 (uri (pypi-uri "Markdown" version))
8516 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8518 (define-public python-ptyprocess
8520 (name "python-ptyprocess")
8525 (uri (pypi-uri "ptyprocess" version))
8528 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8529 (build-system python-build-system)
8531 `(("python-nose" ,python-nose)))
8534 (modify-phases %standard-phases
8536 (lambda _ (invoke "nosetests"))))))
8537 (home-page "https://github.com/pexpect/ptyprocess")
8538 (synopsis "Run a subprocess in a pseudo terminal")
8540 "This package provides a Python library used to launch a subprocess in a
8541 pseudo terminal (pty), and interact with both the process and its pty.")
8542 (license license:isc)))
8544 (define-public python2-ptyprocess
8545 (package-with-python2 python-ptyprocess))
8547 (define-public python-cram
8549 (name "python-cram")
8551 (home-page "https://bitheap.org/cram/")
8554 (uri (list (string-append home-page "cram-"
8556 (pypi-uri "cram" version)))
8559 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8562 (modify-phases %standard-phases
8563 (add-after 'unpack 'patch-source
8565 (substitute* (find-files "cram" ".*\\.py$")
8566 ;; Replace default shell path.
8567 (("/bin/sh") (which "sh")))
8568 (substitute* (find-files "tests" ".*\\.t$")
8570 (("/bin/bash") (which "bash"))
8571 (("/bin/sh") (which "sh")))
8572 (substitute* "cram/_test.py"
8573 ;; This hack works around a bug triggered by substituting
8574 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8575 ;; "cram -h", which breaks the output at 80 characters. This
8576 ;; causes the line showing the default shell to break into two
8577 ;; lines, but the test expects a single line...
8578 (("env\\['COLUMNS'\\] = '80'")
8579 "env['COLUMNS'] = '160'"))
8581 (substitute* "Makefile"
8582 ;; Recent versions of python-coverage have caused the test
8583 ;; coverage to decrease (as of version 0.7). Allow that.
8584 (("--fail-under=100")
8589 ;; The test phase uses the built library and executable.
8590 (lambda* (#:key inputs outputs #:allow-other-keys)
8591 (add-installed-pythonpath inputs outputs)
8592 (setenv "PATH" (string-append (getenv "PATH") ":"
8593 (assoc-ref outputs "out") "/bin"))
8594 (invoke "make" "test"))))))
8595 (build-system python-build-system)
8597 `(("python-coverage" ,python-coverage)
8599 (synopsis "Simple testing framework for command line applications")
8601 "Cram is a functional testing framework for command line applications.
8602 Cram tests look like snippets of interactive shell sessions. Cram runs each
8603 command and compares the command output in the test with the command’s actual
8605 (license license:gpl2+)))
8607 (define-public python2-cram
8608 (package-with-python2 python-cram))
8610 (define-public python-crashtest
8612 (name "python-crashtest")
8617 (uri (pypi-uri "crashtest" version))
8619 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8620 (build-system python-build-system)
8621 (home-page "https://github.com/sdispater/crashtest")
8622 (synopsis "Manage Python errors with ease")
8624 "Python library that makes exceptions handling and inspection easier.")
8625 (license license:expat)))
8627 (define-public python-straight-plugin
8629 (name "python-straight-plugin")
8634 (uri (pypi-uri "straight.plugin" version))
8637 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8638 (build-system python-build-system)
8639 (home-page "https://github.com/ironfroggy/straight.plugin")
8640 (synopsis "Simple namespaced plugin facility")
8641 (description "Straight Plugin provides a type of plugin you can create from
8642 almost any existing Python modules, and an easy way for outside developers to
8643 add functionality and customization to your projects with their own plugins.")
8644 (license license:expat)))
8646 (define-public python2-straight-plugin
8647 (package-with-python2 python-straight-plugin))
8649 (define-public python-fonttools
8651 (name "python-fonttools")
8655 (uri (pypi-uri "fonttools" version ".zip"))
8658 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8659 (build-system python-build-system)
8662 ("python-pytest" ,python-pytest)
8663 ("python-pytest-runner" ,python-pytest-runner)))
8664 (home-page "https://github.com/fonttools/fonttools")
8665 (synopsis "Tools to manipulate font files")
8667 "FontTools/TTX is a library to manipulate font files from Python. It
8668 supports reading and writing of TrueType/OpenType fonts, reading and writing
8669 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8670 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8671 from an XML-based format.")
8672 (license license:expat)))
8674 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8675 (define-public python2-fonttools
8676 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8682 (uri (pypi-uri "fonttools" version ".zip"))
8685 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8687 (define-public python-ly
8694 (uri (pypi-uri name version))
8697 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8698 (build-system python-build-system)
8700 ;; FIXME: Some tests need network access.
8702 (synopsis "Tool and library for manipulating LilyPond files")
8703 (description "This package provides a Python library to parse, manipulate
8704 or create documents in LilyPond format. A command line program ly is also
8705 provided that can be used to do various manipulations with LilyPond files.")
8706 (home-page "https://pypi.org/project/python-ly/")
8707 (license license:gpl2+)))
8709 (define-public python-appdirs
8711 (name "python-appdirs")
8716 (uri (pypi-uri "appdirs" version))
8719 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8720 (build-system python-build-system)
8721 (home-page "https://github.com/ActiveState/appdirs")
8723 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8725 "This module provides a portable way of finding out where user data
8726 should be stored on various operating systems.")
8727 (license license:expat)))
8729 (define-public python2-appdirs
8730 (package-with-python2 python-appdirs))
8732 (define-public python-llfuse
8734 (name "python-llfuse")
8738 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8741 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8742 (build-system python-build-system)
8747 `(("pkg-config" ,pkg-config)))
8748 (synopsis "Python bindings for FUSE")
8750 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8751 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8752 (license license:lgpl2.0+)
8753 (properties `((python2-variant . ,(delay python2-llfuse))))))
8755 (define-public python2-llfuse
8756 (package (inherit (package-with-python2
8757 (strip-python2-variant python-llfuse)))
8758 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8761 (define-public python-llfuse-0.41
8762 (package (inherit python-llfuse)
8767 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8768 "llfuse-" version ".tar.bz2"))
8771 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8772 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8773 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8774 (license (list license:expat license:lgpl2.0+))))
8776 (define-public python-msgpack
8778 (name "python-msgpack")
8782 (uri (pypi-uri "msgpack" version))
8785 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8786 (build-system python-build-system)
8788 `(#:modules ((guix build utils)
8789 (guix build python-build-system)
8794 (modify-phases %standard-phases
8797 (let ((cwd (getcwd)))
8798 (setenv "PYTHONPATH"
8799 (string-append cwd "/build/"
8800 (find (cut string-prefix? "lib" <>)
8801 (scandir (string-append cwd "/build")))
8803 (getenv "PYTHONPATH")))
8804 (invoke "pytest" "-v" "test")))))))
8806 `(("python-pytest" ,python-pytest)))
8807 (synopsis "MessagePack (de)serializer")
8808 (description "MessagePack is a fast, compact binary serialization format,
8809 suitable for similar data to JSON. This package provides CPython bindings for
8810 reading and writing MessagePack data.")
8811 (home-page "https://pypi.org/project/msgpack/")
8812 (license license:asl2.0)))
8814 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8815 ;; release 0.5. Some packages like borg still call it by the old name for now.
8816 ;; <https://bugs.gnu.org/30662>
8817 (define-public python-msgpack-transitional
8819 (inherit python-msgpack)
8820 (name "python-msgpack-transitional")
8824 (uri (pypi-uri "msgpack" version))
8827 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8829 (substitute-keyword-arguments (package-arguments python-msgpack)
8831 `(modify-phases ,phases
8832 (add-after 'unpack 'configure-transitional
8834 ;; Keep using the old name.
8835 (substitute* "setup.py"
8836 (("TRANSITIONAL = False")
8837 "TRANSITIONAL = 1"))
8840 (define-public python2-msgpack
8841 (package-with-python2 python-msgpack))
8843 (define-public python-netaddr
8845 (name "python-netaddr")
8850 (uri (pypi-uri "netaddr" version))
8853 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8854 (build-system python-build-system)
8855 (arguments `(#:tests? #f)) ;; No tests.
8856 (home-page "https://github.com/drkjam/netaddr/")
8857 (synopsis "Pythonic manipulation of network addresses")
8859 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8860 and MAC network addresses.")
8861 (license license:bsd-3)))
8863 (define-public python2-netaddr
8864 (package-with-python2 python-netaddr))
8866 (define-public python2-pyroute2
8868 (name "python2-pyroute2")
8873 (uri (pypi-uri "pyroute2" version))
8876 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8877 (build-system python-build-system)
8879 `(#:python ,python-2)) ;Python 3.x is not supported
8880 (home-page "https://github.com/svinota/pyroute2")
8881 (synopsis "Python netlink library")
8883 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8884 Supported netlink families and protocols include:
8886 @item rtnl, network settings - addresses, routes, traffic controls
8887 @item nfnetlink - netfilter API: ipset, nftables, ...
8888 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8889 @item devlink - manage and monitor devlink-enabled hardware
8890 @item generic - generic netlink families
8892 @item nl80211 - wireless functions API (basic support)
8893 @item taskstats - extended process statistics
8894 @item acpi_events - ACPI events monitoring
8895 @item thermal_events - thermal events monitoring
8896 @item VFS_DQUOT - disk quota events monitoring
8899 (license license:gpl2+)))
8901 (define-public python-wrapt
8903 (name "python-wrapt")
8908 (uri (pypi-uri "wrapt" version))
8911 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8912 (build-system python-build-system)
8914 ;; Tests are not included in the tarball, they are only available in the
8917 (home-page "https://github.com/GrahamDumpleton/wrapt")
8918 (synopsis "Module for decorators, wrappers and monkey patching")
8920 "The aim of the wrapt module is to provide a transparent object proxy for
8921 Python, which can be used as the basis for the construction of function
8922 wrappers and decorator functions.")
8923 (license license:bsd-2)))
8925 (define-public python2-wrapt
8926 (package-with-python2 python-wrapt))
8928 (define-public python-xlrd
8930 (name "python-xlrd")
8934 (uri (pypi-uri "xlrd" version))
8937 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8938 (build-system python-build-system)
8941 (modify-phases %standard-phases
8942 ;; Some tests depend on writing a temporary file to the user's home
8944 (add-after 'unpack 'fix-tests
8946 (delete-file "tests/test_open_workbook.py")
8948 (home-page "http://www.python-excel.org/")
8949 (synopsis "Library for extracting data from Excel files")
8950 (description "This package provides a library to extract data from
8951 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8952 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8953 Unicode-aware. It is not intended as an end-user tool.")
8954 (license license:bsd-3)))
8956 (define-public python2-xlrd
8957 (package-with-python2 python-xlrd))
8959 (define-public python-immutables
8961 (name "python-immutables")
8966 (uri (pypi-uri "immutables" version))
8968 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
8969 (build-system python-build-system)
8970 (home-page "https://github.com/MagicStack/immutables")
8971 (synopsis "High-performance immutable mapping type for Python")
8973 "An immutable mapping type for Python. The underlying datastructure is a
8974 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
8975 functional languages.")
8976 (license license:asl2.0)))
8978 (define-public python-prettytable
8980 (name "python-prettytable")
8985 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8988 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8989 (build-system python-build-system)
8990 (home-page "https://code.google.com/archive/p/prettytable/")
8991 (synopsis "Display tabular data in an ASCII table format")
8993 "A library designed to represent tabular data in visually appealing ASCII
8994 tables. PrettyTable allows for selection of which columns are to be printed,
8995 independent alignment of columns (left or right justified or centred) and
8996 printing of sub-tables by specifying a row range.")
8997 (license license:bsd-3)))
8999 (define-public python2-prettytable
9000 (package-with-python2 python-prettytable))
9002 (define-public python-curio
9004 (name "python-curio")
9009 (uri (pypi-uri "curio" version))
9011 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9012 (build-system python-build-system)
9015 (modify-phases %standard-phases
9017 (lambda* (#:key inputs outputs #:allow-other-keys)
9018 (add-installed-pythonpath inputs outputs)
9019 (invoke "pytest" "-vv" "-k"
9020 ;; Tries to open an outgoing connection.
9021 "not test_ssl_outgoing"))))))
9023 `(("python-pytest" ,python-pytest)))
9024 (home-page "https://github.com/dabeaz/curio")
9025 (synopsis "Coroutine-based library for concurrent Python")
9027 "Curio is a coroutine-based library for concurrent Python systems
9028 programming. It provides standard programming abstractions such as as
9029 tasks, sockets, files, locks, and queues.")
9030 (license license:bsd-3)))
9032 (define-public python-tables
9034 (name "python-tables")
9039 (uri (pypi-uri "tables" version))
9042 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9043 (modules '((guix build utils)))
9046 ;; Remove pre-compiled .pyc files from source.
9047 (for-each delete-file-recursively
9048 (find-files "." "__pycache__" #:directories? #t))
9049 (for-each delete-file (find-files "." "\\.pyc$"))
9051 (build-system python-build-system)
9053 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9054 ;; or "check", so we must override the build and check phases.
9056 (modify-phases %standard-phases
9057 (add-after 'unpack 'use-gcc
9059 (substitute* "setup.py"
9060 (("^( +)compiler = new_compiler\\(\\)" line indent)
9064 "compiler.set_executables(compiler='gcc',"
9065 "compiler_so='gcc',"
9067 "linker_so='gcc -shared')")))
9069 (add-after 'unpack 'disable-tuning
9071 (substitute* "setup.py"
9073 "cpu_flags = ['sse2']\n"))
9076 (lambda* (#:key inputs #:allow-other-keys)
9077 (invoke "python" "setup.py" "build"
9078 (string-append "--hdf5="
9079 (assoc-ref inputs "hdf5")))))
9081 (lambda* (#:key inputs #:allow-other-keys)
9082 (invoke "python" "setup.py" "check"
9083 (string-append "--hdf5="
9084 (assoc-ref inputs "hdf5"))))))))
9086 `(("python-numexpr" ,python-numexpr)
9087 ("python-numpy" ,python-numpy)))
9089 `(("python-cython" ,python-cython)
9090 ("pkg-config" ,pkg-config)))
9092 `(("hdf5" ,hdf5-1.10)
9095 (home-page "https://www.pytables.org/")
9096 (synopsis "Hierarchical datasets for Python")
9097 (description "PyTables is a package for managing hierarchical datasets and
9098 designed to efficiently cope with extremely large amounts of data.")
9099 (license license:bsd-3)))
9101 (define-public python2-tables
9102 (package-with-python2 python-tables))
9104 (define-public python-sniffio
9106 (name "python-sniffio")
9111 (uri (pypi-uri "sniffio" version))
9113 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9114 (build-system python-build-system)
9117 (modify-phases %standard-phases
9120 (invoke "pytest" "-vv"))))))
9122 `(("python-curio" ,python-curio)
9123 ("python-pytest" ,python-pytest)
9124 ("python-pytest-cov" ,python-pytest-cov)))
9125 (home-page "https://github.com/python-trio/sniffio")
9126 (synopsis "Detect which async library a program is running under")
9127 (description "This package detects which async library a program is
9128 running under. It supports multiple async I/O packages, like Trio, and
9130 ;; Either license applies.
9131 (license (list license:expat license:asl2.0))))
9133 (define-public python-pytest-black
9135 (name "python-pytest-black")
9140 (uri (pypi-uri "pytest-black" version))
9143 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9144 (build-system python-build-system)
9146 `(("python-pytest" ,python-pytest)
9147 ("python-black" ,python-black)
9148 ("python-toml" ,python-toml)))
9150 `(("python-setuptools-scm" ,python-setuptools-scm)))
9151 (home-page "https://github.com/shopkeep/pytest-black")
9152 (synopsis "Pytest plugin to enable format checking with black")
9154 "This package provides a pytest plugin to enable format checking with the
9155 Python code formatter \"black\".")
9156 (license license:expat)))
9158 (define-public python-get-version
9160 (name "python-get-version")
9165 (uri (pypi-uri "get_version" version))
9168 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9169 (build-system python-build-system)
9171 `(("python-pygments" ,python-pygments)
9172 ("python-pytest" ,python-pytest)
9173 ("python-pytest-black" ,python-pytest-black)
9174 ("python-pytest-cov" ,python-pytest-cov)
9175 ("python-setuptools" ,python-setuptools)
9176 ("python-testpath" ,python-testpath)))
9177 (home-page "https://github.com/flying-sheep/get_version")
9178 (synopsis "Version helper in the spirit of versioneer")
9180 "This package provides a version helper that lets you automatically use
9181 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9182 also supports getting the version from Python source distributions or, once
9183 your package is installed, via @code{pkg_resources} (part of
9184 @code{setuptools}).")
9185 (license license:gpl3+)))
9187 (define-public python-legacy-api-wrap
9189 (name "python-legacy-api-wrap")
9194 (uri (pypi-uri "legacy-api-wrap" version))
9197 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9198 (build-system python-build-system)
9200 `(("python-get-version" ,python-get-version)
9201 ("python-pytest" ,python-pytest)
9202 ("python-pytest-black" ,python-pytest-black)
9203 ("python-pytest-cov" ,python-pytest-cov)
9204 ("python-setuptools" ,python-setuptools)))
9205 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9206 (synopsis "Legacy API wrapper")
9207 (description "This module defines a decorator to wrap legacy APIs. The
9208 primary use case is APIs defined before keyword-only parameters existed.")
9209 (license license:gpl3+)))
9211 (define-public python-pyasn1
9213 (name "python-pyasn1")
9218 (uri (pypi-uri "pyasn1" version))
9221 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9222 (build-system python-build-system)
9223 (home-page "http://pyasn1.sourceforge.net/")
9224 (synopsis "ASN.1 types and codecs")
9226 "This is an implementation of ASN.1 types and codecs in Python. It is
9227 suitable for a wide range of protocols based on the ASN.1 specification.")
9228 (license license:bsd-2)))
9230 (define-public python2-pyasn1
9231 (package-with-python2 python-pyasn1))
9233 (define-public python-pyasn1-modules
9235 (name "python-pyasn1-modules")
9240 (uri (pypi-uri "pyasn1-modules" version))
9243 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9244 (build-system python-build-system)
9246 `(("python-pyasn1" ,python-pyasn1)))
9247 (home-page "https://sourceforge.net/projects/pyasn1/")
9248 (synopsis "ASN.1 codec implementations")
9250 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9251 implementations of ASN.1-based codecs and protocols.")
9252 (license license:bsd-3)))
9254 (define-public python2-pyasn1-modules
9255 (package-with-python2 python-pyasn1-modules))
9257 (define-public python-ipaddress
9259 (name "python-ipaddress")
9263 (uri (pypi-uri "ipaddress" version))
9266 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9267 (build-system python-build-system)
9268 (home-page "https://github.com/phihag/ipaddress")
9269 (synopsis "IP address manipulation library")
9271 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9272 in Python. This library is used to create, poke at, and manipulate IPv4 and
9273 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9274 module to older versions of Python.")
9275 (license license:psfl)))
9277 (define-public python2-ipaddress
9278 (package-with-python2 python-ipaddress))
9280 (define-public python2-ipaddr
9282 (name "python2-ipaddr")
9287 (uri (pypi-uri "ipaddr" version))
9289 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9290 (build-system python-build-system)
9292 `(#:python ,python-2 ;version 2 only
9294 (modify-phases %standard-phases
9296 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9297 (home-page "https://github.com/google/ipaddr-py")
9298 (synopsis "IP address manipulation library")
9300 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9301 IPv6 addresses and networks.
9303 For new implementations you may prefer to use the standard module
9304 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9305 versions of Python.")
9306 (license license:asl2.0)))
9308 (define-public python-idna
9310 (name "python-idna")
9315 (uri (pypi-uri "idna" version))
9318 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9319 (build-system python-build-system)
9320 (home-page "https://github.com/kjd/idna")
9321 (synopsis "Internationalized domain names in applications")
9323 "This is a library to support the Internationalised Domain Names in
9324 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9325 protocol is often referred to as “IDNA2008” and can produce different results
9326 from the earlier standard from 2003. The library is also intended to act as a
9327 suitable drop-in replacement for the “encodings.idna” module that comes with
9328 the Python standard library but currently only supports the older 2003
9330 (license license:bsd-4)))
9332 (define-public python-idna-2.7
9333 (package (inherit python-idna)
9337 (uri (pypi-uri "idna" version))
9340 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9343 (define-public python2-idna
9344 (package-with-python2 python-idna))
9346 (define-public python-libsass
9348 (name "python-libsass")
9352 ;; PyPI tarball is missing some test files.
9355 (url "https://github.com/sass/libsass-python")
9357 (file-name (git-file-name name version))
9359 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9360 (build-system python-build-system)
9363 (modify-phases %standard-phases
9364 ;; Use Guix package of libsass instead of compiling from a checkout.
9365 (add-before 'build 'set-libsass
9367 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9370 (lambda* (#:key inputs outputs #:allow-other-keys)
9371 (add-installed-pythonpath inputs outputs)
9372 (invoke "pytest" "sasstests.py"))))))
9374 `(("python-pytest" ,python-pytest)
9375 ("python-werkzeug" ,python-werkzeug)))
9377 `(("libsass" ,libsass)))
9379 `(("python-six" ,python-six)))
9380 (home-page "https://sass.github.io/libsass-python/")
9381 (synopsis "Straightforward binding of libsass for Python")
9383 "This package provides a simple Python extension module @code{sass} which
9384 is binding LibSass.")
9385 (license license:expat)))
9387 (define-public python-idna-ssl
9389 (name "python-idna-ssl")
9394 (uri (pypi-uri "idna-ssl" version))
9397 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9398 (build-system python-build-system)
9400 `(#:tests? #f)) ;circular dependency with python-aiohttp
9401 (home-page "https://github.com/aio-libs/idna-ssl")
9402 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9403 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9405 (license license:expat)))
9407 (define-public python-pretend
9409 (name "python-pretend")
9414 (uri (pypi-uri "pretend" version))
9417 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9418 (build-system python-build-system)
9419 (home-page "https://github.com/alex/pretend")
9420 (synopsis "Library for stubbing in Python")
9422 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9423 technique for writing tests. You may hear the term mixed up with mocks,
9424 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9425 responses, rather than doing any computation.")
9426 (license license:bsd-3)))
9428 (define-public python2-pretend
9429 (package-with-python2 python-pretend))
9431 (define-public python-pip
9438 (uri (pypi-uri "pip" version))
9441 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9442 (build-system python-build-system)
9444 '(#:tests? #f)) ; there are no tests in the pypi archive.
9445 (home-page "https://pip.pypa.io/")
9446 (synopsis "Package manager for Python software")
9448 "Pip is a package manager for Python software, that finds packages on the
9449 Python Package Index (PyPI).")
9450 (license license:expat)))
9452 (define-public python2-pip
9453 (package-with-python2 python-pip))
9455 (define-public python-tlsh
9457 (name "python-tlsh")
9459 (home-page "https://github.com/trendmicro/tlsh")
9464 (url "https://github.com/trendmicro/tlsh")
9465 (commit (string-append "v" version))))
9466 (file-name (git-file-name name version))
9468 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9469 (build-system cmake-build-system)
9471 '(#:out-of-source? #f
9472 #:phases (modify-phases %standard-phases
9475 (lambda* (#:key outputs #:allow-other-keys)
9476 ;; Build and install the Python bindings. The underlying
9477 ;; C++ library is apparently not meant to be installed.
9478 (let ((out (assoc-ref outputs "out")))
9479 (with-directory-excursion "py_ext"
9480 (and (system* "python" "setup.py" "build")
9481 (system* "python" "setup.py" "install"
9482 (string-append "--prefix=" out))))))))))
9483 (inputs `(("python" ,python-wrapper))) ;for the bindings
9484 (synopsis "Fuzzy matching library for Python")
9486 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9487 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9488 value which can be used for similarity comparisons. Similar objects have
9489 similar hash values, which allows for the detection of similar objects by
9490 comparing their hash values. The byte stream should have a sufficient amount
9491 of complexity; for example, a byte stream of identical bytes will not generate
9493 (license license:asl2.0)))
9495 (define-public python2-tlsh
9497 (inherit python-tlsh)
9498 (name "python2-tlsh")
9499 (inputs `(("python" ,python-2)))))
9501 (define-public python-termcolor
9503 (name "python-termcolor")
9508 (uri (pypi-uri "termcolor" version))
9511 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9512 (build-system python-build-system)
9514 ;; There are no tests.
9516 (home-page "https://pypi.org/project/termcolor/")
9517 (synopsis "ANSII Color formatting for terminal output")
9519 "This package provides ANSII Color formatting for output in terminals.")
9520 (license license:expat)))
9522 (define-public python2-termcolor
9523 (package-with-python2 python-termcolor))
9525 (define-public python-terminaltables
9527 (name "python-terminaltables")
9532 (uri (pypi-uri "terminaltables" version))
9535 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9536 (build-system python-build-system)
9537 (home-page "https://github.com/Robpol86/terminaltables")
9539 "Generate simple tables in terminals from a nested list of strings")
9541 "This package makes it easy to draw tables in terminal/console
9542 applications from a list of lists of strings. It supports multi-line rows.")
9543 (license license:expat)))
9545 (define-public python-libarchive-c
9547 (name "python-libarchive-c")
9551 (uri (pypi-uri "libarchive-c" version))
9554 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9555 (build-system python-build-system)
9557 '(#:phases (modify-phases %standard-phases
9559 'build 'reference-libarchive
9560 (lambda* (#:key inputs #:allow-other-keys)
9561 ;; Retain the absolute file name of libarchive.so.
9562 (let ((libarchive (assoc-ref inputs "libarchive")))
9563 (substitute* "libarchive/ffi.py"
9564 (("find_library\\('archive'\\)")
9565 (string-append "'" libarchive
9566 "/lib/libarchive.so'"))))))
9568 (lambda _ (invoke "pytest" "-vv"))))))
9570 `(("python-mock" ,python-mock)
9571 ("python-pytest" ,python-pytest)))
9573 `(("libarchive" ,libarchive)))
9574 (home-page "https://github.com/Changaco/python-libarchive-c")
9575 (synopsis "Python interface to libarchive")
9577 "This package provides Python bindings to libarchive, a C library to
9578 access possibly compressed archives in many different formats. It uses
9579 Python's @code{ctypes} foreign function interface (FFI).")
9580 (license license:lgpl2.0+)))
9582 (define-public python2-libarchive-c
9583 (package-with-python2 python-libarchive-c))
9585 (define-public python-file
9588 (name "python-file")
9589 (build-system python-build-system)
9591 '(#:tests? #f ;no tests
9592 #:configure-flags '("--single-version-externally-managed" "--root=/")
9593 #:phases (modify-phases %standard-phases
9594 (add-before 'build 'change-directory
9598 (add-before 'build 'set-library-file-name
9599 (lambda* (#:key inputs #:allow-other-keys)
9600 (let ((file (assoc-ref inputs "file")))
9601 (substitute* "magic.py"
9602 (("find_library\\('magic'\\)")
9603 (string-append "'" file "/lib/libmagic.so'")))
9605 (inputs `(("file" ,file)))
9606 (native-inputs (if (%current-target-system)
9607 `(("self" ,this-package))
9609 (synopsis "Python bindings to the libmagic file type guesser")
9610 (description "This package provides Python bindings to the libmagic file
9613 Note that this module and the @code{python-magic} module both provide a
9614 @file{magic.py} file; these two modules, which are different and were
9615 developed separately, both serve the same purpose: provide Python bindings for
9618 (define-public python2-file
9619 (package-with-python2 python-file))
9621 (define-public python-debian
9623 (name "python-debian")
9624 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9628 ;; Use git-fetch, as pypi doesn't include test suite.
9633 (file-name (git-file-name name version))
9636 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9637 (build-system python-build-system)
9639 `(#:phases (modify-phases %standard-phases
9640 (add-after 'unpack 'remove-debian-specific-tests
9641 ;; python-apt, apt and dpkg are not yet available in guix,
9642 ;; and these tests heavily depend on them.
9644 (delete-file "lib/debian/tests/test_deb822.py")
9645 (delete-file "lib/debian/tests/test_debfile.py")
9648 `(("python-six" ,python-six)
9649 ("python-chardet" ,python-chardet)))
9650 (synopsis "Debian package related modules")
9652 ;; XXX: Use @enumerate instead of @itemize to work around
9653 ;; <http://bugs.gnu.org/21772>.
9654 "This package provides Python modules that abstract many formats of
9655 Debian-related files, such as:
9658 @item Debtags information;
9659 @item @file{debian/changelog} files;
9660 @item packages files, pdiffs;
9661 @item control files of single or multiple RFC822-style paragraphs---e.g.
9662 @file{debian/control}, @file{.changes}, @file{.dsc};
9663 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9664 contained files and meta-information.
9667 ;; Modules are either GPLv2+ or GPLv3+.
9668 (license license:gpl3+)))
9670 (define-public python-nbformat
9672 (name "python-nbformat")
9677 (uri (pypi-uri "nbformat" version))
9680 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9681 (build-system python-build-system)
9682 (arguments `(#:tests? #f)) ; no test target
9684 `(("python-ipython-genutils" ,python-ipython-genutils)
9685 ("python-jsonschema" ,python-jsonschema)
9686 ("python-jupyter-core" ,python-jupyter-core)
9687 ("python-traitlets" ,python-traitlets)))
9688 (home-page "http://jupyter.org")
9689 (synopsis "Jupyter Notebook format")
9690 (description "This package provides the reference implementation of the
9691 Jupyter Notebook format and Python APIs for working with notebooks.")
9692 (license license:bsd-3)))
9694 (define-public python2-nbformat
9695 (package-with-python2 python-nbformat))
9697 (define-public python-bleach
9699 (name "python-bleach")
9704 (uri (pypi-uri "bleach" version))
9706 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9707 (build-system python-build-system)
9709 `(("python-webencodings" ,python-webencodings)
9710 ("python-six" ,python-six)))
9712 `(("python-datrie" ,python-datrie)
9713 ("python-genshi" ,python-genshi)
9714 ("python-lxml" ,python-lxml)
9715 ("python-pytest" ,python-pytest)))
9716 (home-page "https://github.com/mozilla/bleach")
9717 (synopsis "Whitelist-based HTML-sanitizing tool")
9718 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9719 (license license:asl2.0)))
9721 (define-public python2-bleach
9722 (package-with-python2 python-bleach))
9724 (define-public python-entrypoints
9726 (name "python-entrypoints")
9731 (uri (pypi-uri "entrypoints" version))
9734 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9735 (build-system python-build-system)
9736 ;; The package does not come with a setup.py file, so we have to generate
9741 (modify-phases %standard-phases
9742 (add-after 'unpack 'create-setup.py
9744 (call-with-output-file "setup.py"
9747 from setuptools import setup
9748 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9750 (home-page "https://github.com/takluyver/entrypoints")
9751 (synopsis "Discover and load entry points from installed Python packages")
9752 (description "Entry points are a way for Python packages to advertise
9753 objects with some common interface. The most common examples are
9754 @code{console_scripts} entry points, which define shell commands by
9755 identifying a Python function to run. The @code{entrypoints} module contains
9756 functions to find and load entry points.")
9757 (license license:expat)))
9759 (define-public python2-entrypoints
9760 (package-with-python2 python-entrypoints))
9762 (define-public python-epc
9769 (uri (pypi-uri "epc" version))
9772 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9773 (build-system python-build-system)
9775 `(("python-sexpdata" ,python-sexpdata)))
9777 `(("python-nose" ,python-nose)))
9778 (home-page "https://github.com/tkf/python-epc")
9779 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9781 "Python-EPC can call elisp functions from Python and Python functions
9783 (license license:gpl3)))
9785 (define-public python-forex-python
9787 (name "python-forex-python")
9792 (uri (pypi-uri "forex-python" version))
9794 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9795 (build-system python-build-system)
9797 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9798 ;; repository require online data.
9801 `(("python-requests" ,python-requests)
9802 ("python-simplejson" ,python-simplejson)))
9803 (home-page "https://github.com/MicroPyramid/forex-python")
9804 (synopsis "Foreign exchange rates and currency conversion")
9806 "@code{python-forex-python} can be used to manipulate foreign
9807 exchange rates and to operate currency conversions.
9811 @item List all currency rates.
9812 @item BitCoin price for all currencies.
9813 @item Converting amount to BitCoins.
9814 @item Get historical rates for any day since 1999.
9815 @item Conversion rate for one currency(ex; USD to INR).
9816 @item Convert amount from one currency to other.('USD 10$' to INR).
9817 @item Currency symbols.
9818 @item Currency names.
9820 (license license:expat)))
9822 (define-public python-simpleeval
9824 (name "python-simpleeval")
9829 (uri (pypi-uri "simpleeval" version))
9831 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9832 (build-system python-build-system)
9833 (home-page "https://github.com/danthedeckie/simpleeval")
9834 (synopsis "Simple, safe single expression evaluator library")
9836 "This package provides a quick single file library for easily adding
9837 evaluatable expressions into python projects. Say you want to allow a user
9838 to set an alarm volume, which could depend on the time of day, alarm level,
9839 how many previous alarms had gone off, and if there is music playing at the
9841 (license license:expat)))
9843 (define-public python-nbconvert
9845 (name "python-nbconvert")
9850 (uri (pypi-uri "nbconvert" version))
9853 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9854 (build-system python-build-system)
9856 `(;; The "bdist_egg" target is disabled by default, causing the installation
9858 #:configure-flags (list "bdist_egg")
9859 ;; FIXME: 5 failures, 40 errors.
9862 ;; (modify-phases %standard-phases
9865 ;; (zero? (system* "py.test" "-v")))))
9867 `(("python-pytest" ,python-pytest)))
9869 `(("python-bleach" ,python-bleach)
9870 ("python-entrypoints" ,python-entrypoints)
9871 ("python-jinja2" ,python-jinja2)
9872 ("python-jupyter-core" ,python-jupyter-core)
9873 ("python-mistune" ,python-mistune)
9874 ("python-nbformat" ,python-nbformat)
9875 ("python-pygments" ,python-pygments)
9876 ("python-traitlets" ,python-traitlets)))
9877 (home-page "http://jupyter.org")
9878 (synopsis "Converting Jupyter Notebooks")
9879 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9880 notebooks to various other formats via Jinja templates. It allows you to
9881 convert an @code{.ipynb} notebook file into various static formats including:
9889 @item ReStructured Text (rst)
9890 @item executable script
9892 (license license:bsd-3)))
9894 (define-public python2-nbconvert
9895 (package-with-python2 python-nbconvert))
9897 (define-public python-notebook
9899 (name "python-notebook")
9903 (uri (pypi-uri "notebook" version))
9906 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9907 (build-system python-build-system)
9910 (modify-phases %standard-phases
9913 ;; These tests require a browser
9914 (delete-file-recursively "notebook/tests/selenium")
9915 ;; Some tests need HOME
9916 (setenv "HOME" "/tmp")
9917 ;; This file contains "warningfilters", which are not supported
9918 ;; by this version of nose.
9919 (delete-file "setup.cfg")
9920 (with-directory-excursion "/tmp"
9921 (invoke "nosetests" "-v"))
9924 `(("python-jupyter-core" ,python-jupyter-core)
9925 ("python-nbformat" ,python-nbformat)
9926 ("python-nbconvert" ,python-nbconvert)
9927 ("python-prometheus-client" ,python-prometheus-client)
9928 ("python-send2trash" ,python-send2trash)
9929 ("python-terminado" ,python-terminado)))
9931 `(("python-nose" ,python-nose)
9932 ("python-sphinx" ,python-sphinx)
9933 ("python-requests" ,python-requests)))
9934 (home-page "http://jupyter.org/")
9935 (synopsis "Web-based notebook environment for interactive computing")
9937 "The Jupyter HTML notebook is a web-based notebook environment for
9938 interactive computing.")
9939 (properties `((python2-variant . ,(delay python2-notebook))))
9940 (license license:bsd-3)))
9942 (define-public python2-notebook
9943 (let ((base (package-with-python2
9944 (strip-python2-variant python-notebook))))
9945 (package (inherit base)
9947 `(("python2-mock" ,python2-mock)
9948 ,@(package-native-inputs base)))
9950 (substitute-keyword-arguments (package-arguments base)
9952 `(modify-phases ,phases
9953 (add-before 'check 'disable-test-case
9954 ;; The test requires network access to localhost. Curiously it
9955 ;; fails with Python 2 only. Simply make the test-case return
9959 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9960 (("formats = self.nbconvert_api") "return #")))))))))))
9962 (define-public python-widgetsnbextension
9964 (name "python-widgetsnbextension")
9969 (uri (pypi-uri "widgetsnbextension" version))
9972 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9973 (build-system python-build-system)
9975 `(("python-ipykernel" ,python-ipykernel)
9976 ("python-notebook" ,python-notebook)))
9978 `(("python-certifi" ,python-certifi)
9979 ("python-nose" ,python-nose)))
9980 (home-page "https://ipython.org")
9981 (synopsis "IPython HTML widgets for Jupyter")
9982 (description "This package provides interactive HTML widgets for Jupyter
9984 (license license:bsd-3)))
9986 (define-public python2-widgetsnbextension
9987 (package-with-python2 python-widgetsnbextension))
9989 (define-public python-ipywidgets
9991 (name "python-ipywidgets")
9996 (uri (pypi-uri "ipywidgets" version))
9999 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10000 (build-system python-build-system)
10002 `(("python-ipython" ,python-ipython)
10003 ("python-traitlets" ,python-traitlets)
10004 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10006 `(("python-nose" ,python-nose)
10007 ("python-pytest" ,python-pytest)))
10008 (home-page "https://ipython.org")
10009 (synopsis "IPython HTML widgets for Jupyter")
10010 (description "Ipywidgets are interactive HTML widgets for Jupyter
10011 notebooks and the IPython kernel. Notebooks come alive when interactive
10012 widgets are used. Users gain control of their data and can visualize changes
10014 (license license:bsd-3)))
10016 (define-public python2-ipywidgets
10017 (package-with-python2 python-ipywidgets))
10019 (define-public python-jupyter-console
10021 (name "python-jupyter-console")
10026 (uri (pypi-uri "jupyter_console" version))
10029 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10030 (build-system python-build-system)
10032 `(("python-ipykernel" ,python-ipykernel)
10033 ("python-jupyter-client" ,python-jupyter-client)
10034 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10035 ("python-pygments" ,python-pygments)))
10037 `(("python-nose" ,python-nose)))
10038 (home-page "https://jupyter.org")
10039 (synopsis "Jupyter terminal console")
10040 (description "This package provides a terminal-based console frontend for
10041 Jupyter kernels. It also allows for console-based interaction with non-Python
10042 Jupyter kernels such as IJulia and IRKernel.")
10043 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10044 (license license:bsd-3)))
10046 (define-public python2-jupyter-console
10048 (name "python2-jupyter-console")
10053 (uri (pypi-uri "jupyter_console" version))
10056 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10057 (build-system python-build-system)
10059 `(#:python ,python-2
10060 #:tests? #f)) ; Tests only run in a TTY.
10062 `(("python2-ipykernel" ,python2-ipykernel)
10063 ("python2-jupyter-client" ,python2-jupyter-client)
10064 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10065 ("python2-pygments" ,python2-pygments)))
10067 `(("python2-nose" ,python2-nose)))
10068 (home-page "https://jupyter.org")
10069 (synopsis "Jupyter terminal console")
10070 (description "This package provides a terminal-based console frontend for
10071 Jupyter kernels. It also allows for console-based interaction with non-Python
10072 Jupyter kernels such as IJulia and IRKernel.")
10073 (license license:bsd-3)))
10075 ;; The python-ipython and python-jupyter-console require each other. To get
10076 ;; the functionality in both packages working, strip down the
10077 ;; python-jupyter-console package when using it as an input to python-ipython.
10078 (define python-jupyter-console-minimal
10080 (inherit python-jupyter-console)
10081 (name "python-jupyter-console-minimal")
10083 (substitute-keyword-arguments
10084 (package-arguments python-jupyter-console)
10086 `(modify-phases ,phases
10087 (add-after 'install 'delete-bin
10088 (lambda* (#:key outputs #:allow-other-keys)
10089 ;; Delete the bin files, to avoid conflicts in profiles
10090 ;; where python-ipython and python-jupyter-console are
10092 (delete-file-recursively
10094 (assoc-ref outputs "out") "/bin"))))))))
10095 ;; Remove the python-ipython propagated input, to avoid the cycle
10099 (package-propagated-inputs python-jupyter-console)))))
10101 (define-public python-qtconsole
10103 (name "python-qtconsole")
10108 (uri (pypi-uri "qtconsole" version))
10111 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10112 (build-system python-build-system)
10114 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10115 ;; but we only have the LTS version 5.x. This means that there might be
10116 ;; runtime errors, but since this is a dependency of the Jupyter package,
10117 ;; and Jupyter can be used without the qtconsole we can overlook this for
10121 (modify-phases %standard-phases
10122 (add-before 'check 'pre-check
10124 (setenv "QT_QPA_PLATFORM" "offscreen")
10127 `(("python-ipykernel" ,python-ipykernel)
10128 ("python-ipython" ,python-ipython)))
10130 `(("python-pytest" ,python-pytest)))
10131 (home-page "http://jupyter.org")
10132 (synopsis "Jupyter Qt console")
10133 (description "This package provides a Qt-based console for Jupyter with
10134 support for rich media output.")
10135 (license license:bsd-3)))
10137 (define-public python-jsbeautifier
10139 (name "python-jsbeautifier")
10141 (home-page "https://github.com/beautify-web/js-beautify")
10144 (uri (git-reference
10146 (commit (string-append "v" version))))
10147 (file-name (git-file-name name version))
10150 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10151 (build-system python-build-system)
10153 `(#:phases (modify-phases %standard-phases
10154 (add-after 'unpack 'chdir
10156 ;; The upstream Git repository contains all the code,
10157 ;; but this package only builds the python code.
10160 (add-after 'unpack 'patch-python-six-requirements
10162 (substitute* "python/setup.py"
10167 `(("python-editorconfig" ,python-editorconfig)
10168 ("python-six" ,python-six)))
10170 `(("python-pytest" ,python-pytest)))
10171 (synopsis "JavaScript unobfuscator and beautifier")
10172 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10173 popular online obfuscators.")
10174 (license license:expat)))
10176 (define-public jupyter
10183 (uri (pypi-uri "jupyter" version))
10186 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10187 (build-system python-build-system)
10188 (arguments '(#:tests? #f)) ; there are none.
10190 `(("python-ipykernel" ,python-ipykernel)
10191 ("python-ipywidgets" ,python-ipywidgets)
10192 ("python-jupyter-console" ,python-jupyter-console)
10193 ("python-nbconvert" ,python-nbconvert)
10194 ("python-notebook" ,python-notebook)
10195 ("python-qtconsole" ,python-qtconsole)))
10196 (native-search-paths
10197 (list (search-path-specification
10198 (variable "JUPYTER_PATH")
10199 (files '("share/jupyter")))))
10200 (home-page "https://jupyter.org")
10201 (synopsis "Web application for interactive documents")
10203 "The Jupyter Notebook is a web application that allows you to create and
10204 share documents that contain live code, equations, visualizations and
10205 explanatory text. Uses include: data cleaning and transformation, numerical
10206 simulation, statistical modeling, machine learning and much more.")
10207 (license license:bsd-3)))
10209 (define-public python-chardet
10211 (name "python-chardet")
10216 (uri (pypi-uri "chardet" version))
10219 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10221 `(("python-hypothesis" ,python-hypothesis)
10222 ("python-pytest" ,python-pytest)
10223 ("python-pytest-runner" ,python-pytest-runner)))
10224 (build-system python-build-system)
10225 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10226 (arguments `(#:tests? #f))
10227 (home-page "https://github.com/chardet/chardet")
10228 (synopsis "Universal encoding detector for Python 2 and 3")
10230 "This package provides @code{chardet}, a Python module that can
10231 automatically detect a wide range of file encodings.")
10232 (license license:lgpl2.1+)))
10234 (define-public python2-chardet
10235 (package-with-python2 python-chardet))
10237 (define-public python-docopt
10239 (name "python-docopt")
10244 ;; The release on PyPI does not include tests.
10245 (uri (git-reference
10246 (url "https://github.com/docopt/docopt")
10248 (file-name (git-file-name name version))
10251 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10252 (build-system python-build-system)
10254 `(("python-pytest" ,python-pytest)))
10257 (modify-phases %standard-phases
10259 (lambda _ (invoke "py.test"))))))
10260 (home-page "http://docopt.org")
10261 (synopsis "Command-line interface description language for Python")
10262 (description "This library allows the user to define a command-line
10263 interface from a program's help message rather than specifying it
10264 programmatically with command-line parsers like @code{getopt} and
10266 (license license:expat)))
10268 (define-public python2-docopt
10269 (package-with-python2 python-docopt))
10271 (define-public python-pythondialog
10273 (name "python-pythondialog")
10278 (uri (pypi-uri "pythondialog" version))
10281 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10282 (build-system python-build-system)
10285 (modify-phases %standard-phases
10286 (add-after 'unpack 'patch-path
10287 (lambda* (#:key inputs #:allow-other-keys)
10288 (let* ((dialog (assoc-ref inputs "dialog")))
10289 ;; Since this library really wants to grovel the search path, we
10290 ;; must hardcode dialog's store path into it.
10291 (substitute* "dialog.py"
10292 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10293 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10295 #:tests? #f)) ; no test suite
10297 `(("dialog" ,dialog)))
10298 (home-page "http://pythondialog.sourceforge.net/")
10299 (synopsis "Python interface to the UNIX dialog utility")
10300 (description "A Python wrapper for the dialog utility. Its purpose is to
10301 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10302 This allows one to make simple text-mode user interfaces on Unix-like systems")
10303 (license license:lgpl2.1)
10304 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10306 (define-public python2-pythondialog
10307 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10310 (version (package-version python-pythondialog))
10313 (uri (pypi-uri "python2-pythondialog" version))
10316 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10318 (define-public python-configobj
10320 (name "python-configobj")
10324 (uri (pypi-uri "configobj" version))
10327 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10328 ;; Patch setup.py so it looks for python-setuptools, which is
10329 ;; required to parse the keyword 'install_requires' in setup.py.
10330 (patches (search-patches "python-configobj-setuptools.patch"))))
10331 (build-system python-build-system)
10333 `(("python-six" ,python-six)))
10334 (synopsis "Config file reading, writing and validation")
10335 (description "ConfigObj is a simple but powerful config file reader and
10336 writer: an ini file round tripper. Its main feature is that it is very easy to
10337 use, with a straightforward programmer’s interface and a simple syntax for
10339 (home-page "https://github.com/DiffSK/configobj")
10340 (license license:bsd-3)))
10342 (define-public python2-configobj
10343 (package-with-python2 python-configobj))
10345 (define-public python-configargparse
10347 (name "python-configargparse")
10351 (uri (pypi-uri "ConfigArgParse" version))
10354 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10355 (build-system python-build-system)
10357 `(("python-pyyaml" ,python-pyyaml)))
10360 (modify-phases %standard-phases
10363 ;; Bypass setuptools-shim because one test relies on "setup.py"
10364 ;; being the first argument passed to the python call.
10366 ;; NOTE: Many tests do not run because they rely on Python's
10367 ;; built-in test.test_argparse, but we remove the unit tests from
10368 ;; our Python installation.
10369 (invoke "python" "setup.py" "test"))))))
10370 (synopsis "Replacement for argparse")
10371 (description "A drop-in replacement for argparse that allows options to also
10372 be set via config files and/or environment variables.")
10373 (home-page "https://github.com/bw2/ConfigArgParse")
10374 (license license:expat)))
10376 (define-public python2-configargparse
10377 (package-with-python2 python-configargparse))
10379 (define-public python-argparse-manpage
10381 (name "python-argparse-manpage")
10386 (uri (pypi-uri "argparse-manpage" version))
10389 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10390 (build-system python-build-system)
10391 (home-page "https://github.com/praiskup/argparse-manpage")
10392 (synopsis "Build manual page from Python's ArgumentParser object")
10394 "This package provides tools to build manual pages from Python's
10395 @code{ArgumentParser} object.")
10396 (license license:asl2.0)))
10398 (define-public python-contextlib2
10400 (name "python-contextlib2")
10401 (version "0.6.0.post1")
10405 (uri (pypi-uri "contextlib2" version))
10408 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10409 (build-system python-build-system)
10410 (home-page "https://contextlib2.readthedocs.org/")
10411 (synopsis "Tools for decorators and context managers")
10412 (description "This module is primarily a backport of the Python
10413 3.2 contextlib to earlier Python versions. Like contextlib, it
10414 provides utilities for common tasks involving decorators and context
10415 managers. It also contains additional features that are not part of
10416 the standard library.")
10417 (properties `((python2-variant . ,(delay python2-contextlib2))))
10418 (license license:psfl)))
10420 (define-public python2-contextlib2
10421 (let ((base (package-with-python2
10422 (strip-python2-variant python-contextlib2))))
10426 (substitute-keyword-arguments (package-arguments base)
10428 `(modify-phases ,phases
10430 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10432 `(("python2-unittest2" ,python2-unittest2))))))
10434 ;; This package is used by python2-pytest via python2-importlib-metadata,
10435 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10436 (define-public python2-contextlib2-bootstrap
10439 python2-contextlib2
10440 (name "python2-contextlib2-bootstrap")
10443 ,@(package-arguments python2-contextlib2)))
10444 (native-inputs '()))))
10446 (define-public python-texttable
10448 (name "python-texttable")
10453 (uri (pypi-uri "texttable" version))
10456 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10457 (build-system python-build-system)
10460 (modify-phases %standard-phases
10462 (lambda _ (invoke "pytest" "tests.py"))))))
10464 `(("python-pytest" ,python-pytest)))
10465 (home-page "https://github.com/foutaise/texttable/")
10466 (synopsis "Python module for creating simple ASCII tables")
10467 (description "Texttable is a Python module for creating simple ASCII
10469 (license license:expat)))
10471 (define-public python2-texttable
10472 (package-with-python2 python-texttable))
10474 (define-public python-atomicwrites
10476 (name "python-atomicwrites")
10480 (uri (pypi-uri "atomicwrites" version))
10483 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10484 (build-system python-build-system)
10485 (synopsis "Atomic file writes in Python")
10486 (description "Library for atomic file writes using platform dependent tools
10487 for atomic file system operations.")
10488 (home-page "https://github.com/untitaker/python-atomicwrites")
10489 (license license:expat)))
10491 (define-public python2-atomicwrites
10492 (package-with-python2 python-atomicwrites))
10494 (define-public python-click-threading
10496 (name "python-click-threading")
10500 (uri (pypi-uri "click-threading" version))
10503 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10504 (build-system python-build-system)
10506 `(("python-click" ,python-click)))
10507 (synopsis "Utilities for multithreading in Click")
10508 (description "This package provides utilities for multithreading in Click
10510 (home-page "https://github.com/click-contrib/click-threading")
10511 (license license:expat)))
10513 (define-public python-click-log
10515 (name "python-click-log")
10519 (uri (pypi-uri "click-log" version))
10522 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10523 (build-system python-build-system)
10525 `(("python-click" ,python-click)))
10526 (synopsis "Logging for click applications")
10527 (description "This package provides a Python library for logging Click
10529 (home-page "https://github.com/click-contrib/click-log")
10530 (license license:expat)))
10532 (define-public python-apipkg
10534 (name "python-apipkg")
10538 (uri (pypi-uri "apipkg" version))
10541 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10542 (build-system python-build-system)
10544 `(("python-pytest" ,python-pytest)
10545 ("python-setuptools-scm" ,python-setuptools-scm)))
10546 (synopsis "Namespace control and lazy-import mechanism")
10547 (description "With apipkg you can control the exported namespace of a Python
10548 package and greatly reduce the number of imports for your users. It is a small
10549 pure Python module that works on virtually all Python versions.")
10550 (home-page "https://github.com/pytest-dev/apipkg")
10551 (license license:expat)))
10553 (define-public python-execnet
10555 (name "python-execnet")
10559 (uri (pypi-uri "execnet" version))
10562 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10563 (build-system python-build-system)
10565 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10566 ;; The two test failures are caused by the lack of an `ssh` executable.
10567 ;; The test suite can be run with pytest after the 'install' phase.
10570 `(("python-pytest" ,python-pytest)
10571 ("python-setuptools-scm" ,python-setuptools-scm)))
10573 `(("python-apipkg" ,python-apipkg)))
10574 (synopsis "Rapid multi-Python deployment")
10575 (description "Execnet provides a share-nothing model with
10576 channel-send/receive communication for distributing execution across many
10577 Python interpreters across version, platform and network barriers. It has a
10578 minimal and fast API targeting the following uses:
10580 @item distribute tasks to (many) local or remote CPUs
10581 @item write and deploy hybrid multi-process applications
10582 @item write scripts to administer multiple environments
10584 (home-page "https://codespeak.net/execnet/")
10585 (license license:expat)))
10587 (define-public python2-execnet
10588 (package-with-python2 python-execnet))
10590 (define-public python-icalendar
10592 (name "python-icalendar")
10596 (uri (pypi-uri "icalendar" version))
10599 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10600 (build-system python-build-system)
10602 `(("python-dateutil" ,python-dateutil)
10603 ("python-pytz" ,python-pytz)))
10604 (synopsis "Python library for parsing iCalendar files")
10605 (description "The icalendar package is a parser/generator of iCalendar
10606 files for use with Python.")
10607 (home-page "https://github.com/collective/icalendar")
10608 (license license:bsd-2)))
10610 (define-public python-args
10612 (name "python-args")
10616 (uri (pypi-uri "args" version))
10619 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10620 (build-system python-build-system)
10621 (home-page "https://github.com/kennethreitz/args")
10622 (synopsis "Command-line argument parser")
10624 "This library provides a Python module to parse command-line arguments.")
10625 (license license:bsd-3)))
10627 (define-public python2-args
10628 (package-with-python2 python-args))
10630 (define-public python-clint
10632 (name "python-clint")
10636 (uri (pypi-uri "clint" version))
10639 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10640 (build-system python-build-system)
10643 (modify-phases %standard-phases
10645 (lambda _ (invoke "py.test" "-v"))))))
10647 `(("python-pytest" ,python-pytest)))
10649 `(("python-args" ,python-args)))
10650 (home-page "https://github.com/kennethreitz/clint")
10651 (synopsis "Command-line interface tools")
10653 "Clint is a Python module filled with a set of tools for developing
10654 command-line applications, including tools for colored and indented
10655 output, progress bar display, and pipes.")
10656 (license license:isc)))
10658 (define-public python2-clint
10659 (package-with-python2 python-clint))
10661 (define-public python-rply
10663 (name "python-rply")
10667 (uri (pypi-uri "rply" version))
10670 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10671 (build-system python-build-system)
10673 `(("python-appdirs" ,python-appdirs)))
10674 (home-page "https://github.com/alex/rply")
10675 (synopsis "Parser generator for Python")
10677 "This package provides a pure Python based parser generator, that also
10678 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10679 with a new public API, and RPython support.")
10680 (license license:bsd-3)))
10682 (define-public python2-rply
10683 (package-with-python2 python-rply))
10685 (define-public python-hy
10691 (uri (pypi-uri "hy" version))
10694 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10695 (build-system python-build-system)
10698 (modify-phases %standard-phases
10699 (add-before 'install 'set-HOME
10701 (setenv "HOME" "/tmp") #t))
10704 ;; Tests require write access to HOME.
10705 (setenv "HOME" "/tmp")
10706 (invoke "nosetests"))))))
10708 `(("python-coverage" ,python-coverage)
10709 ("python-nose" ,python-nose)))
10711 `(("python-astor" ,python-astor)
10712 ("python-colorama" ,python-colorama)
10713 ("python-rply" ,python-rply)
10714 ("python-funcparserlib"
10715 ,python-funcparserlib)))
10716 (home-page "http://hylang.org/")
10717 (synopsis "Lisp frontend to Python")
10719 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10720 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10721 Python at your fingertips, in Lisp form.")
10722 (license license:expat)))
10724 (define-public python2-functools32
10726 (name "python2-functools32")
10727 (version "3.2.3-2")
10731 (uri (pypi-uri "functools32" version))
10734 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10735 (build-system python-build-system)
10737 `(#:python ,python-2
10738 #:tests? #f)) ; no test target
10739 (home-page "https://github.com/MiCHiLU/python-functools32")
10741 "Backport of the functools module from Python 3.2.3")
10743 "This package is a backport of the @code{functools} module from Python
10744 3.2.3 for use with older versions of Python and PyPy.")
10745 (license license:expat)))
10747 (define-public python2-subprocess32
10749 (name "python2-subprocess32")
10753 (uri (pypi-uri "subprocess32" version))
10756 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10758 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10759 (build-system python-build-system)
10761 `(#:python ,python-2
10762 ;; The test suite fails with Python > 2.7.13:
10763 ;; import test.support
10764 ;; ImportError: No module named support
10767 (modify-phases %standard-phases
10768 (add-after 'unpack 'patch-/bin/sh
10770 (substitute* '("subprocess32.py"
10771 "test_subprocess32.py")
10772 (("/bin/sh") (which "sh")))
10774 (home-page "https://github.com/google/python-subprocess32")
10775 (synopsis "Backport of the subprocess module from Python 3.2")
10777 "This is a backport of the @code{subprocess} standard library module
10778 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10779 new features. On POSIX systems it is guaranteed to be reliable when used
10780 in threaded applications. It includes timeout support from Python 3.3 but
10781 otherwise matches 3.2’s API.")
10782 (license license:psfl)))
10784 (define-public python2-futures
10786 (name "python2-futures")
10791 (uri (pypi-uri "futures" version))
10794 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10795 (build-system python-build-system)
10797 `(#:python ,python-2
10799 (modify-phases %standard-phases
10802 (invoke "python" "test_futures.py")
10804 (home-page "https://github.com/agronholm/pythonfutures")
10806 "Backport of the concurrent.futures package from Python 3.2")
10808 "The concurrent.futures module provides a high-level interface for
10809 asynchronously executing callables. This package backports the
10810 concurrent.futures package from Python 3.2")
10811 (license license:bsd-3)))
10813 (define-public python-promise
10815 (name "python-promise")
10820 (uri (pypi-uri "promise" version))
10823 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10824 (build-system python-build-system)
10825 ;; Tests wants python-futures, which is a python2 only program, and
10826 ;; can't be found by python-promise at test time.
10827 (arguments `(#:tests? #f))
10828 (home-page "https://github.com/syrusakbary/promise")
10829 (synopsis "Promises/A+ implementation for Python")
10831 "Promises/A+ implementation for Python")
10832 (properties `((python2-variant . ,(delay python2-promise))))
10833 (license license:expat)))
10835 (define-public python2-promise
10836 (let ((promise (package-with-python2
10837 (strip-python2-variant python-promise))))
10838 (package (inherit promise)
10839 (arguments (substitute-keyword-arguments (package-arguments promise)
10840 ((#:tests? _) #t)))
10842 `(("python2-futures" ,python2-futures)
10843 ("python2-pytest" ,python2-pytest)
10844 ,@(package-native-inputs promise))))))
10846 (define-public python-progressbar2
10848 (name "python-progressbar2")
10853 (uri (pypi-uri "progressbar2" version))
10856 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10857 (build-system python-build-system)
10859 `(("python-six" ,python-six)
10860 ("python-utils" ,python-utils)))
10862 `(("python-flake8" ,python-flake8)
10863 ("python-freezegun" ,python-freezegun)
10864 ("python-pycodestyle" ,python-pycodestyle)
10865 ("python-pytest" ,python-pytest)
10866 ("python-pytest-cache" ,python-pytest-cache)
10867 ("python-pytest-cov" ,python-pytest-cov)
10868 ("python-pytest-flakes" ,python-pytest-flakes)
10869 ("python-pytest-pep8" ,python-pytest-pep8)
10870 ("python-sphinx" ,python-sphinx)))
10871 (home-page "https://github.com/WoLpH/python-progressbar")
10872 (synopsis "Text progress bar library for Python")
10874 "This package provides a Python progressbar library to provide
10875 visual (yet text based) progress to long running operations.")
10876 (license license:bsd-3)))
10878 (define-public python-progressbar33
10880 (name "python-progressbar33")
10885 (uri (pypi-uri "progressbar33" version))
10888 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10889 (build-system python-build-system)
10890 (home-page "https://github.com/germangh/python-progressbar")
10891 (synopsis "Text progress bar library for Python")
10893 "This package provides a text progress bar library for Python. This
10894 version only differs from the original @code{progressbar} package in that it
10895 uses relative package imports instead of absolute imports, which is necessary
10896 for the module to work under Python 3.3.")
10897 ;; Either or both of these licenses may be selected.
10898 (license (list license:lgpl2.1+ license:bsd-3))))
10900 (define-public python-colorama
10902 (name "python-colorama")
10907 (uri (pypi-uri "colorama" version))
10910 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
10911 (build-system python-build-system)
10912 (synopsis "Colored terminal text rendering for Python")
10913 (description "Colorama is a Python library for rendering colored terminal
10915 (home-page "https://pypi.org/project/colorama/")
10916 (license license:bsd-3)))
10918 (define-public python2-colorama
10919 (package-with-python2 python-colorama))
10921 (define-public python-rsa
10923 (name "python-rsa")
10928 (uri (pypi-uri "rsa" version))
10931 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10932 (build-system python-build-system)
10934 `(("python-pyasn1" ,python-pyasn1)))
10935 (synopsis "Pure-Python RSA implementation")
10936 (description "Python-RSA is a pure-Python RSA implementation. It supports
10937 encryption and decryption, signing and verifying signatures, and key
10938 generation according to PKCS#1 version 1.5. It can be used as a Python
10939 library as well as on the command line.")
10940 (home-page "https://stuvel.eu/rsa")
10941 (license license:asl2.0)))
10943 (define-public python2-rsa
10944 (package-with-python2 python-rsa))
10946 (define-public python-pluggy
10948 (name "python-pluggy")
10953 (uri (pypi-uri "pluggy" version))
10956 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
10957 (build-system python-build-system)
10959 `(("python-setuptools-scm" ,python-setuptools-scm)))
10960 (synopsis "Plugin and hook calling mechanism for Python")
10961 (description "Pluggy is an extraction of the plugin manager as used by
10962 Pytest but stripped of Pytest specific details.")
10963 (home-page "https://pypi.org/project/pluggy/")
10964 (properties `((python2-variant . ,(delay python2-pluggy))))
10965 (license license:expat)))
10967 (define-public python2-pluggy
10968 (let ((base (package-with-python2 (strip-python2-variant
10973 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
10975 ;; This package requires python2-importlib-metadata, but that package
10976 ;; ends up needing python2-pluggy via python2-pytest, so we need this
10977 ;; variant to solve the circular dependency.
10978 (define-public python2-pluggy-bootstrap
10982 (name "python2-pluggy-bootstrap")
10985 ,@(package-arguments python2-pluggy)))
10987 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10989 (define-public python-tox
10991 (name "python-tox")
10996 (uri (pypi-uri "tox" version))
10999 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11000 (build-system python-build-system)
11002 ;; FIXME: Tests require pytest-timeout, which itself requires
11003 ;; pytest>=2.8.0 for installation.
11006 `(("python-filelock" ,python-filelock)
11007 ("python-packaging" ,python-packaging)
11008 ("python-pluggy" ,python-pluggy)
11009 ("python-py" ,python-py)
11010 ("python-six" ,python-six)
11011 ("python-toml" ,python-toml)
11012 ("python-virtualenv" ,python-virtualenv)))
11014 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11015 ("python-pytest" ,python-pytest) ; >= 2.3.5
11016 ("python-setuptools-scm" ,python-setuptools-scm)))
11017 (home-page "https://tox.readthedocs.io")
11018 (synopsis "Virtualenv-based automation of test activities")
11019 (description "Tox is a generic virtualenv management and test command line
11020 tool. It can be used to check that a package installs correctly with
11021 different Python versions and interpreters, or run tests in each type of
11022 supported environment, or act as a frontend to continuous integration
11024 (license license:expat)))
11026 (define-public python2-tox
11027 (package-with-python2 python-tox))
11029 (define-public python-jmespath
11031 (name "python-jmespath")
11036 (uri (pypi-uri "jmespath" version))
11039 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11040 (build-system python-build-system)
11042 `(("python-nose" ,python-nose)))
11043 (synopsis "JSON Matching Expressions")
11044 (description "JMESPath (pronounced “james path”) is a Python library that
11045 allows one to declaratively specify how to extract elements from a JSON
11047 (home-page "https://github.com/jmespath/jmespath.py")
11048 (license license:expat)))
11050 (define-public python2-jmespath
11051 (package-with-python2 python-jmespath))
11053 (define-public python-symengine
11055 (name "python-symengine")
11060 (uri (pypi-uri "symengine" version))
11062 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11063 (build-system python-build-system)
11066 ("python-cython" ,python-cython)))
11068 `(("symengine" ,symengine)))
11069 (home-page "https://github.com/symengine/symengine.py")
11070 (synopsis "Python library providing wrappers to SymEngine")
11072 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11073 manipulation library.")
11074 (license license:expat)))
11076 (define-public python-botocore
11078 (name "python-botocore")
11079 (version "1.15.26")
11083 (uri (pypi-uri "botocore" version))
11086 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
11087 (build-system python-build-system)
11089 ;; FIXME: Many tests are failing.
11092 `(("python-dateutil" ,python-dateutil)
11093 ("python-docutils" ,python-docutils)
11094 ("python-jmespath" ,python-jmespath)))
11096 `(("python-mock" ,python-mock)
11097 ("python-nose" ,python-nose)
11099 ("python-tox" ,python-tox)
11100 ("python-urllib3" ,python-urllib3)
11101 ("python-wheel" ,python-wheel)))
11102 (home-page "https://github.com/boto/botocore")
11103 (synopsis "Low-level interface to AWS")
11104 (description "Botocore is a Python library that provides a low-level
11105 interface to the Amazon Web Services (AWS) API.")
11106 (license license:asl2.0)))
11108 (define-public python2-botocore
11109 (package-with-python2 python-botocore))
11111 (define-public python-pyfiglet
11113 (name "python-pyfiglet")
11114 (version "0.8.post1")
11118 (uri (pypi-uri "pyfiglet" version))
11121 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11122 (build-system python-build-system)
11123 (home-page "https://github.com/pwaller/pyfiglet")
11124 (synopsis "Draw ASCII art big letters in Python")
11125 (description "This module lets you draw large letter from ordinary characters
11127 (license license:expat)))
11129 (define-public python-xdo
11131 (name "python-xdo")
11135 (uri (string-append
11136 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11137 "python-xdo_" version ".orig.tar.gz"))
11140 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11141 (build-system python-build-system)
11144 (modify-phases %standard-phases
11145 (add-before 'install 'patch-libxdo-path
11146 ;; Hardcode the path of dynamically loaded libxdo library.
11147 (lambda* (#:key inputs #:allow-other-keys)
11148 (let ((libxdo (string-append
11149 (assoc-ref inputs "xdotool")
11150 "/lib/libxdo.so")))
11151 (substitute* "xdo/_xdo.py"
11152 (("find_library\\(\"xdo\"\\)")
11153 (simple-format #f "\"~a\"" libxdo)))
11155 #:tests? #f)) ; no tests provided
11157 `(("python-six" ,python-six)))
11159 `(("xdotool" ,xdotool)
11160 ("libX11" ,libx11)))
11161 (home-page "https://tracker.debian.org/pkg/python-xdo")
11162 (synopsis "Python library for simulating X11 keyboard/mouse input")
11163 (description "Provides bindings to libxdo for manipulating X11 via simulated
11164 input. (Note that this is mostly a legacy library; you may wish to look at
11165 python-xdo for newer bindings.)")
11166 (license license:bsd-3)))
11168 (define-public python2-xdo
11169 (package-with-python2 python-xdo))
11171 (define-public python-mako
11173 (name "python-mako")
11178 (uri (pypi-uri "Mako" version))
11181 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11182 (build-system python-build-system)
11184 `(#:phases (modify-phases %standard-phases
11186 (lambda* (#:key tests? #:allow-other-keys)
11188 (invoke "nosetests" "-v")
11189 (format #t "test suite not run~%"))
11192 `(("python-markupsafe" ,python-markupsafe)))
11194 `(("python-mock" ,python-mock)
11195 ("python-nose" ,python-nose)))
11196 (home-page "https://www.makotemplates.org/")
11197 (synopsis "Templating language for Python")
11198 (description "Mako is a templating language for Python that compiles
11199 templates into Python modules.")
11200 (license license:expat)))
11202 (define-public python2-mako
11203 (package-with-python2 python-mako))
11205 (define-public python-waitress
11207 (name "python-waitress")
11212 (uri (pypi-uri "waitress" version))
11213 (patches (search-patches "python-waitress-fix-tests.patch"))
11216 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11217 (build-system python-build-system)
11218 (home-page "https://github.com/Pylons/waitress")
11219 (synopsis "Waitress WSGI server")
11220 (description "Waitress is meant to be a production-quality pure-Python WSGI
11221 server with very acceptable performance.")
11222 (license license:zpl2.1)))
11224 (define-public python2-waitress
11225 (package-with-python2 python-waitress))
11227 (define-public python-whichcraft
11229 (name "python-whichcraft")
11234 (uri (pypi-uri "whichcraft" version))
11237 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11238 (build-system python-build-system)
11240 `(("python-pytest" ,python-pytest)))
11241 (home-page "https://github.com/pydanny/whichcraft")
11242 (synopsis "Cross-platform cross-python shutil.which functionality")
11244 "This package provides a shim of the shutil.which function that's
11245 designed to work across multiple versions of Python.")
11246 (license license:bsd-3)))
11248 (define-public python-cookiecutter
11250 (name "python-cookiecutter")
11255 (uri (pypi-uri "cookiecutter" version))
11258 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11259 (build-system python-build-system)
11261 `(("python-freezegun" ,python-freezegun)
11262 ("python-pytest" ,python-pytest)
11263 ("python-pytest-catchlog" ,python-pytest-catchlog)
11264 ("python-pytest-cov" ,python-pytest-cov)
11265 ("python-pytest-mock" ,python-pytest-mock)))
11267 `(("python-binaryornot" ,python-binaryornot)
11268 ("python-click" ,python-click)
11269 ("python-future" ,python-future)
11270 ("python-jinja2" ,python-jinja2)
11271 ("python-jinja2-time" ,python-jinja2-time)
11272 ("python-poyo" ,python-poyo)
11273 ("python-requests" ,python-requests)
11274 ("python-slugify" ,python-slugify)
11275 ("python-text-unidecode" ,python-text-unidecode)
11276 ("python-whichcraft" ,python-whichcraft)))
11277 (home-page "https://github.com/cookiecutter/cookiecutter")
11279 "Command-line utility that creates projects from project templates")
11281 "This package provides a command-line utility that creates projects from
11282 project templates, e.g. creating a Python package project from a Python package
11283 project template.")
11284 (license license:bsd-3)))
11286 (define-public python-pyquery
11288 (name "python-pyquery")
11293 (uri (pypi-uri "pyquery" version))
11296 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11297 (build-system python-build-system)
11299 `(("python-webob" ,python-webob)
11300 ("python-webtest" ,python-webtest)))
11302 `(("python-lxml" ,python-lxml)
11303 ("python-cssselect" ,python-cssselect)))
11304 (home-page "https://github.com/gawel/pyquery")
11305 (synopsis "Make jQuery-like queries on xml documents")
11306 (description "pyquery allows you to make jQuery queries on xml documents.
11307 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11308 fast xml and html manipulation.")
11309 (license license:bsd-3)))
11311 (define-public python-anyjson
11313 (name "python-anyjson")
11318 (uri (pypi-uri "anyjson" version))
11321 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11322 (build-system python-build-system)
11324 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11325 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11326 ;; whatever) so this transformation needs to be done before the tests
11327 ;; can be run. Maybe we could add a build step to transform beforehand
11328 ;; but it could be annoying/difficult.
11329 ;; We can enable tests for the Python 2 version, though, and do below.
11331 (home-page "https://bitbucket.org/runeh/anyjson/")
11333 "Wraps best available JSON implementation in a common interface")
11335 "Anyjson loads whichever is the fastest JSON module installed
11336 and provides a uniform API regardless of which JSON implementation is used.")
11337 (license license:bsd-3)
11338 (properties `((python2-variant . ,(delay python2-anyjson))))))
11340 (define-public python2-anyjson
11341 (let ((anyjson (package-with-python2
11342 (strip-python2-variant python-anyjson))))
11345 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11347 ,@(package-arguments anyjson)))
11348 (native-inputs `(("python2-nose" ,python2-nose))))))
11350 (define-public python-amqp
11352 (name "python-amqp")
11357 (uri (pypi-uri "amqp" version))
11360 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11361 (build-system python-build-system)
11363 `(("python-case" ,python-case)
11364 ("python-pytest-sugar" ,python-pytest-sugar)
11365 ("python-mock" ,python-mock)))
11367 `(("python-vine" ,python-vine)))
11368 (home-page "https://github.com/celery/py-amqp")
11370 "Low-level AMQP client for Python (fork of amqplib)")
11372 "This is a fork of amqplib which was originally written by Barry Pederson.
11373 It is maintained by the Celery project, and used by kombu as a pure python
11374 alternative when librabbitmq is not available.")
11375 (license license:lgpl2.1+)
11376 (properties `((python2-variant . ,(delay python2-amqp))))))
11378 (define-public python2-amqp
11379 (let ((amqp (package-with-python2
11380 (strip-python2-variant python-amqp))))
11383 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11384 ;; unmaintained. Weirdly, does not do this on the python 3
11387 ,@(package-arguments amqp))))))
11389 (define-public python-txamqp
11391 (name "python-txamqp")
11396 (uri (pypi-uri "txAMQP" version))
11399 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11400 (build-system python-build-system)
11402 `(("python-six" ,python-six)
11403 ("python-twisted" ,python-twisted)))
11404 (home-page "https://github.com/txamqp/txamqp")
11405 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11407 "This package provides a Python library for communicating with AMQP peers
11408 and brokers using the asynchronous networking framework Twisted. It contains
11409 all the necessary code to connect, send and receive messages to/from an
11410 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11411 also includes support for using Thrift RPC over AMQP in Twisted
11413 (license license:asl2.0)))
11415 (define-public python2-txamqp
11416 (package-with-python2 python-txamqp))
11418 (define-public python-kombu
11420 (name "python-kombu")
11425 (uri (pypi-uri "kombu" version))
11428 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11429 (build-system python-build-system)
11431 `(("python-mock" ,python-mock)
11432 ("python-case" ,python-case)
11433 ("python-pyro4" ,python-pyro4)
11434 ("python-pytest-sugar" ,python-pytest-sugar)
11435 ("python-pytz" ,python-pytz)))
11437 `(("python-anyjson" ,python-anyjson)
11438 ("python-amqp" ,python-amqp)
11439 ("python-redis" ,python-redis)))
11440 (home-page "https://kombu.readthedocs.io")
11441 (synopsis "Message passing library for Python")
11442 (description "The aim of Kombu is to make messaging in Python as easy as
11443 possible by providing an idiomatic high-level interface for the AMQ protocol,
11444 and also provide proven and tested solutions to common messaging problems.
11445 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11446 message orientation, queuing, routing, reliability and security, for which the
11447 RabbitMQ messaging server is the most popular implementation.")
11448 (license license:bsd-3)
11449 (properties `((python2-variant . ,(delay python2-kombu))))))
11451 (define-public python2-kombu
11452 (let ((kombu (package-with-python2
11453 (strip-python2-variant python-kombu))))
11456 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11457 ;; It works fine on the python3 variant.
11459 ,@(package-arguments kombu)))
11460 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11461 ,@(package-native-inputs kombu))))))
11463 (define-public python-billiard
11465 (name "python-billiard")
11466 (version "3.5.0.5")
11470 (uri (pypi-uri "billiard" version))
11473 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11474 (build-system python-build-system)
11476 `(("python-case" ,python-case)
11477 ("python-pytest" ,python-pytest)))
11478 (home-page "https://github.com/celery/billiard")
11480 "Python multiprocessing fork with improvements and bugfixes")
11482 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11483 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11484 pyprocessing package. This standalone variant is intended to be compatible with
11485 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11486 (license license:bsd-3)
11487 (properties `((python2-variant . ,(delay python2-billiard))))))
11489 (define-public python2-billiard
11490 (let ((billiard (package-with-python2
11491 (strip-python2-variant python-billiard))))
11494 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11495 ("python2-mock" ,python2-mock)
11496 ,@(package-native-inputs billiard))))))
11498 (define-public python-celery
11500 (name "python-celery")
11505 (uri (pypi-uri "celery" version))
11508 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11509 (build-system python-build-system)
11511 '(;; TODO The tests fail with Python 3.7
11512 ;; https://github.com/celery/celery/issues/4849
11515 (modify-phases %standard-phases
11516 (add-after 'unpack 'patch-requirements
11518 (substitute* "requirements/test.txt"
11519 (("pytest>=3\\.0,<3\\.3")
11523 `(("python-case" ,python-case)
11524 ("python-pytest" ,python-pytest)))
11526 `(("python-pytz" ,python-pytz)
11527 ("python-billiard" ,python-billiard)
11528 ("python-kombu" ,python-kombu)))
11529 (home-page "https://celeryproject.org")
11530 (synopsis "Distributed Task Queue")
11531 (description "Celery is an asynchronous task queue/job queue based on
11532 distributed message passing. It is focused on real-time operation, but
11533 supports scheduling as well. The execution units, called tasks, are executed
11534 concurrently on a single or more worker servers using multiprocessing,
11535 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11536 synchronously (wait until ready).")
11537 (license license:bsd-3)
11538 (properties `((python2-variant . ,(delay python2-celery))))))
11540 (define-public python2-celery
11541 (let ((celery (package-with-python2
11542 (strip-python2-variant python-celery))))
11545 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11546 ("python2-mock" ,python2-mock)
11547 ,@(package-native-inputs celery))))))
11549 (define-public python-translitcodec
11551 (name "python-translitcodec")
11556 (uri (pypi-uri "translitcodec" version))
11559 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11560 (build-system python-build-system)
11562 `(#:tests? #f)) ; no tests provided
11564 "https://github.com/claudep/translitcodec")
11566 "Unicode to 8-bit charset transliteration codec")
11568 "This package contains codecs for transliterating ISO 10646 texts into
11569 best-effort representations using smaller coded character sets (ASCII,
11571 (license license:expat)))
11573 (define-public python2-translitcodec
11574 (package-with-python2 python-translitcodec))
11576 (define-public python-editor
11578 (name "python-editor")
11583 (uri (pypi-uri "python-editor" version))
11586 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11587 (build-system python-build-system)
11589 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11590 (home-page "https://github.com/fmoo/python-editor")
11591 (synopsis "Programmatically open an editor, capture the result")
11593 "python-editor is a library that provides the editor module for
11594 programmatically interfacing with your system's $EDITOR.")
11595 (license license:asl2.0)))
11597 (define-public python2-editor
11598 (package-with-python2 python-editor))
11600 (define-public python-vobject
11602 (name "python-vobject")
11603 (version "0.9.6.1")
11606 (uri (pypi-uri "vobject" version))
11609 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11610 (build-system python-build-system)
11612 '(;; The test suite relies on some non-portable Windows interfaces.
11615 `(("python-dateutil" ,python-dateutil)
11616 ("python-pyicu" ,python-pyicu)))
11617 (synopsis "Parse and generate vCard and vCalendar files")
11618 (description "Vobject is intended to be a full featured Python package for
11619 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11620 are supported and well tested. vCard 3.0 files are supported, and all data
11621 should be imported, but only a few components are understood in a sophisticated
11623 (home-page "https://eventable.github.io/vobject/")
11624 (license license:asl2.0)))
11626 (define-public python2-vobject
11627 (package-with-python2 python-vobject))
11629 (define-public python-munkres
11631 (name "python-munkres")
11635 (uri (pypi-uri "munkres" version))
11638 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11639 (build-system python-build-system)
11641 '(#:tests? #f)) ; no test suite
11642 (home-page "https://software.clapper.org/munkres/")
11643 (synopsis "Implementation of the Munkres algorithm")
11644 (description "The Munkres module provides an implementation of the Munkres
11645 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11646 useful for solving the Assignment Problem.")
11647 (license license:bsd-3)))
11649 (define-public python2-munkres
11650 (package-with-python2 python-munkres))
11652 (define-public python-whoosh
11654 (name "python-whoosh")
11659 (uri (pypi-uri "Whoosh" version))
11662 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11663 (build-system python-build-system)
11664 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11666 `(("python-pytest" ,python-pytest)))
11667 (home-page "https://bitbucket.org/mchaput/whoosh")
11668 (synopsis "Full text indexing, search, and spell checking library")
11670 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11671 checking library.")
11672 (license license:bsd-2)))
11674 (define-public python2-whoosh
11675 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11676 (package (inherit whoosh)
11678 `(("python2-backport-ssl-match-hostname"
11679 ,python2-backport-ssl-match-hostname)
11680 ,@(package-propagated-inputs whoosh))))))
11682 (define-public python-pathlib
11684 (name "python-pathlib")
11688 (uri (pypi-uri "pathlib" version))
11691 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11692 (build-system python-build-system)
11693 ;; The tests depend on the internal "test" module, which does not provide
11694 ;; a stable interface.
11695 (arguments `(#:tests? #f))
11696 (home-page "https://pathlib.readthedocs.org/")
11697 (synopsis "Object-oriented file system paths")
11698 (description "Pathlib offers a set of classes to handle file system paths.
11699 It offers the following advantages over using string objects:
11702 @item No more cumbersome use of os and os.path functions. Everything can
11703 be done easily through operators, attribute accesses, and method calls.
11704 @item Embodies the semantics of different path types. For example,
11705 comparing Windows paths ignores casing.
11706 @item Well-defined semantics, eliminating any inconsistencies or
11707 ambiguities (forward vs. backward slashes, etc.).
11710 Note: In Python 3.4, pathlib is now part of the standard library. For other
11711 Python versions please consider python-pathlib2 instead, which tracks the
11712 standard library module. This module (python-pathlib) isn't maintained
11714 (license license:expat)))
11716 (define-public python2-pathlib
11717 (package-with-python2 python-pathlib))
11719 (define-public python2-pathlib2
11721 (name "python2-pathlib2")
11725 (uri (pypi-uri "pathlib2" version))
11728 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11729 (build-system python-build-system)
11730 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11731 ;; version is 3.4 which already includes this package as part of the
11732 ;; standard library.
11734 `(#:python ,python-2))
11736 `(("python2-scandir" ,python2-scandir)
11737 ("python2-six" ,python2-six)))
11738 (home-page "https://pypi.org/project/pathlib2/")
11739 (synopsis "Object-oriented file system paths - backport of standard
11741 (description "The goal of pathlib2 is to provide a backport of standard
11742 pathlib module which tracks the standard library module, so all the newest
11743 features of the standard pathlib can be used also on older Python versions.
11745 Pathlib offers a set of classes to handle file system paths. It offers the
11746 following advantages over using string objects:
11749 @item No more cumbersome use of os and os.path functions. Everything can
11750 be done easily through operators, attribute accesses, and method calls.
11751 @item Embodies the semantics of different path types. For example,
11752 comparing Windows paths ignores casing.
11753 @item Well-defined semantics, eliminating any inconsistencies or
11754 ambiguities (forward vs. backward slashes, etc.).
11756 (license license:expat)))
11758 (define-public python2-pathlib2-bootstrap
11761 (inherit python2-pathlib2)
11762 (name "python2-pathlib2-bootstrap")
11764 `(("python2-scandir" ,python2-scandir)
11765 ("python2-six" ,python2-six-bootstrap))))))
11767 (define-public python-jellyfish
11769 (name "python-jellyfish")
11773 (uri (pypi-uri "jellyfish" version))
11776 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11777 (build-system python-build-system)
11779 `(("python-pytest" ,python-pytest)))
11780 (home-page "https://github.com/jamesturk/jellyfish")
11781 (synopsis "Approximate and phonetic matching of strings")
11782 (description "Jellyfish uses a variety of string comparison and phonetic
11783 encoding algorithms to do fuzzy string matching.")
11784 (license license:bsd-2)
11785 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11787 (define-public python2-jellyfish
11788 (let ((jellyfish (package-with-python2
11789 (strip-python2-variant python-jellyfish))))
11790 (package (inherit jellyfish)
11791 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11792 ,@(package-native-inputs jellyfish))))))
11794 (define-public python2-unicodecsv
11796 (name "python2-unicodecsv")
11800 ;; The test suite is not included in the PyPi release.
11801 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11802 (uri (git-reference
11803 (url "https://github.com/jdunck/python-unicodecsv")
11805 (file-name (git-file-name name version))
11808 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11809 (build-system python-build-system)
11811 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11812 #:python ,python-2))
11814 `(("python2-unittest2" ,python2-unittest2)))
11815 (home-page "https://github.com/jdunck/python-unicodecsv")
11816 (synopsis "Unicode CSV module for Python 2")
11817 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11818 module, adding support for Unicode strings.")
11819 (license license:bsd-2)))
11821 (define-public python-rarfile
11823 (name "python-rarfile")
11827 (uri (pypi-uri "rarfile" version))
11830 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11831 (build-system python-build-system)
11834 (modify-phases %standard-phases
11836 ;; Many tests fail, but the installation proceeds.
11837 (lambda _ (invoke "make" "-C" "test" "test"))))))
11839 `(("which" ,which))) ; required for tests
11841 `(("libarchive" ,libarchive)))
11842 (home-page "https://github.com/markokr/rarfile")
11843 (synopsis "RAR archive reader for Python")
11844 (description "This is Python module for RAR archive reading. The interface
11845 is made as zipfile like as possible.")
11846 (license license:isc)))
11848 (define-public python2-rarfile
11849 (package-with-python2 python-rarfile))
11851 (define-public python-magic
11853 (name "python-magic")
11858 (uri (pypi-uri "python-magic" version))
11861 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11862 (file-name (string-append name "-" version "-checkout"))))
11863 (build-system python-build-system)
11865 ;; The tests are unreliable, so don't run them. The tests fail
11866 ;; under Python3 because they were written for Python2 and
11867 ;; contain import statements that do not work in Python3. One of
11868 ;; the tests fails under Python2 because its assertions are
11869 ;; overly stringent; it relies on comparing output strings which
11870 ;; are brittle and can change depending on the version of
11871 ;; libmagic being used and the system on which the test is
11872 ;; running. In my case, under GuixSD 0.10.0, only one test
11873 ;; failed, and it seems to have failed only because the version
11874 ;; of libmagic that is packaged in Guix outputs a slightly
11875 ;; different (but not wrong) string than the one that the test
11878 #:phases (modify-phases %standard-phases
11879 ;; Replace a specific method call with a hard-coded
11880 ;; path to the necessary libmagic.so file in the
11881 ;; store. If we don't do this, then the method call
11882 ;; will fail to find the libmagic.so file, which in
11883 ;; turn will cause any application using
11884 ;; python-magic to fail.
11885 (add-before 'build 'hard-code-path-to-libmagic
11886 (lambda* (#:key inputs #:allow-other-keys)
11887 (let ((file (assoc-ref inputs "file")))
11888 (substitute* "magic.py"
11889 (("ctypes.util.find_library\\('magic'\\)")
11890 (string-append "'" file "/lib/libmagic.so'")))
11892 (add-before 'install 'disable-egg-compression
11894 (let ((port (open-file "setup.cfg" "a")))
11895 (display "\n[easy_install]\nzip_ok = 0\n"
11900 ;; python-magic needs to be able to find libmagic.so.
11903 "https://github.com/ahupp/python-magic")
11905 "File type identification using libmagic")
11907 "This module uses ctypes to access the libmagic file type
11908 identification library. It makes use of the local magic database and
11909 supports both textual and MIME-type output. Note that this module and
11910 the python-file module both provide a \"magic.py\" file; these two
11911 modules, which are different and were developed separately, both serve
11912 the same purpose: to provide Python bindings for libmagic.")
11913 (license license:expat)))
11915 (define-public python2-magic
11916 (package-with-python2 python-magic))
11918 (define-public python2-s3cmd
11920 (name "python2-s3cmd")
11925 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11926 "s3cmd-" version ".tar.gz"))
11929 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11930 (build-system python-build-system)
11932 ;; s3cmd is written for python2 only and contains no tests.
11933 `(#:python ,python-2
11936 `(("python2-dateutil" ,python2-dateutil)
11937 ;; The python-file package also provides a magic.py module.
11938 ;; This is an unfortunate state of affairs; however, s3cmd
11939 ;; fails to install if it cannot find specifically the
11940 ;; python-magic package. Thus we include it, instead of using
11941 ;; python-file. Ironically, s3cmd sometimes works better
11942 ;; without libmagic bindings at all:
11943 ;; https://github.com/s3tools/s3cmd/issues/198
11944 ("python2-magic" ,python2-magic)))
11945 (home-page "https://s3tools.org/s3cmd")
11946 (synopsis "Command line tool for S3-compatible storage services")
11948 "S3cmd is a command line tool for uploading, retrieving and managing data
11949 in storage services that are compatible with the Amazon Simple Storage
11950 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11951 GnuPG encryption, and more. It also supports management of Amazon's
11952 CloudFront content delivery network.")
11953 (license license:gpl2+)))
11955 (define-public python-pkgconfig
11957 (name "python-pkgconfig")
11962 (uri (pypi-uri "pkgconfig" version))
11965 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
11966 (build-system python-build-system)
11968 `(("python-nose" ,python-nose)))
11970 `(("pkg-config" ,pkg-config)))
11973 (modify-phases %standard-phases
11974 (add-before 'build 'patch
11975 ;; Hard-code the path to pkg-config.
11977 (substitute* "pkgconfig/pkgconfig.py"
11978 (("cmd = 'pkg-config")
11979 (string-append "cmd = '" (which "pkg-config"))))
11983 (invoke "nosetests" "test.py"))))))
11984 (home-page "https://github.com/matze/pkgconfig")
11985 (synopsis "Python interface for pkg-config")
11986 (description "This module provides a Python interface to pkg-config. It
11987 can be used to find all pkg-config packages, check if a package exists,
11988 check if a package meets certain version requirements, query CFLAGS and
11989 LDFLAGS and parse the output to build extensions with setup.py.")
11990 (license license:expat)))
11992 (define-public python2-pkgconfig
11993 (package-with-python2 python-pkgconfig))
11995 (define-public python-bz2file
11997 (name "python-bz2file")
12002 (uri (pypi-uri "bz2file" version))
12005 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12006 (build-system python-build-system)
12008 `(#:tests? #f)) ; Tests use deprecated python modules.
12009 (home-page "https://github.com/nvawda/bz2file")
12010 (synopsis "Read and write bzip2-compressed files")
12012 "Bz2file is a Python library for reading and writing bzip2-compressed
12013 files. It contains a drop-in replacement for the I/O interface in the
12014 standard library's @code{bz2} module, including features from the latest
12015 development version of CPython that are not available in older releases.")
12016 (license license:asl2.0)))
12018 (define-public python2-bz2file
12019 (package-with-python2 python-bz2file))
12021 (define-public python-future
12023 (name "python-future")
12028 (uri (pypi-uri "future" version))
12031 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12032 (build-system python-build-system)
12033 ;; Many tests connect to the network or are otherwise flawed.
12034 ;; https://github.com/PythonCharmers/python-future/issues/210
12037 (home-page "https://python-future.org")
12038 (synopsis "Single-source support for Python 3 and 2")
12040 "@code{python-future} is the missing compatibility layer between Python 2 and
12041 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12042 to support both Python 2 and Python 3 with minimal overhead.")
12043 (license license:expat)))
12045 (define-public python2-future
12046 (package-with-python2 python-future))
12048 (define-public python-cysignals
12050 (name "python-cysignals")
12055 (uri (pypi-uri "cysignals" version))
12058 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12059 (build-system python-build-system)
12061 `(("python-cython" ,python-cython)
12062 ("python-sphinx" ,python-sphinx)))
12064 `(("pari-gp" ,pari-gp)))
12066 `(#:modules ((guix build python-build-system)
12067 ((guix build gnu-build-system) #:prefix gnu:)
12068 (guix build utils))
12069 ;; FIXME: Tests are executed after installation and currently fail
12070 ;; when not installing into standard locations; the author is working
12074 (modify-phases %standard-phases
12077 (assoc-ref gnu:%standard-phases 'configure)))))
12079 "https://github.com/sagemath/cysignals")
12081 "Handling of interrupts and signals for Cython")
12083 "The cysignals package provides mechanisms to handle interrupts (and
12084 other signals and errors) in Cython code, using two related approaches,
12085 for mixed Cython/Python code or external C libraries and pure Cython code,
12087 (license license:lgpl3+)))
12089 (define-public python2-cysignals
12090 (package-with-python2 python-cysignals))
12092 (define-public python2-shedskin
12094 (name "python2-shedskin")
12099 (uri (string-append "https://github.com/shedskin/shedskin/"
12100 "releases/download/v" version
12101 "/shedskin-" version ".tgz"))
12104 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12105 (build-system python-build-system)
12107 `(#:python ,python-2
12108 #:phases (modify-phases %standard-phases
12109 (add-after 'unpack 'fix-resulting-include-libs
12110 (lambda* (#:key inputs #:allow-other-keys)
12111 (let ((libgc (assoc-ref inputs "libgc"))
12112 (pcre (assoc-ref inputs "pcre")))
12113 (substitute* "shedskin/makefile.py"
12114 (("variable == 'CCFLAGS':[ ]*")
12115 (string-append "variable == 'CCFLAGS':\n"
12116 " line += ' -I " pcre "/include"
12117 " -I " libgc "/include'"))
12118 (("variable == 'LFLAGS':[ ]*")
12119 (string-append "variable == 'LFLAGS':\n"
12120 " line += ' -L" pcre "/lib"
12121 " -L " libgc "/lib'")))
12123 (inputs `(("pcre" ,pcre)
12125 (home-page "https://shedskin.github.io/")
12126 (synopsis "Experimental Python-2 to C++ Compiler")
12127 (description (string-append "This is an experimental compiler for a subset of
12128 Python. It generates C++ code and a Makefile."))
12129 (license (list license:gpl3 license:bsd-3 license:expat))))
12131 (define-public python2-rope
12133 (name "python2-rope")
12138 (uri (pypi-uri "rope" version))
12141 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12143 ;; Rope has only partial python3 support, see `python-rope'
12144 `(#:python ,python-2))
12145 (build-system python-build-system)
12147 `(("python2-unittest2" ,python2-unittest2)))
12148 (home-page "https://github.com/python-rope/rope")
12149 (synopsis "Refactoring library for Python")
12150 (description "Rope is a refactoring library for Python. It facilitates
12151 the renaming, moving and extracting of attributes, functions, modules, fields
12152 and parameters in Python 2 source code. These refactorings can also be applied
12153 to occurrences in strings and comments.")
12154 (license license:gpl2)))
12156 (define-public python-rope
12158 (inherit python2-rope)
12159 (name "python-rope")
12160 (arguments `(#:python ,python-wrapper
12161 ;; XXX: Only partial python3 support, results in some failing
12162 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12164 (properties `((python2-variant . ,(delay python2-rope))))))
12166 (define-public python-py3status
12168 (name "python-py3status")
12173 (uri (pypi-uri "py3status" version))
12175 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12176 (build-system python-build-system)
12181 (modify-phases %standard-phases
12182 ;; 'file' is used for detection of configuration file encoding
12183 ;; let's make link the dependency to particular input
12184 (add-before 'build 'patch-file-path
12185 (lambda* (#:key inputs #:allow-other-keys)
12186 (let ((file-path (assoc-ref inputs "file")))
12187 (substitute* "py3status/parse_config.py"
12188 (("\\[\"file\", \"-b\"")
12189 (string-append "['" file-path "/bin/file', '-b'")))
12191 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12192 (home-page "https://github.com/ultrabug/py3status")
12193 (synopsis "Extensible i3status wrapper written in Python")
12194 (description "py3status is an i3status wrapper which extends i3status
12195 functionality in a modular way, allowing you to extend your panel with your
12196 own code, responding to click events and updating clock every second.")
12197 (license license:bsd-3)))
12199 (define-public python2-selectors2
12201 (name "python2-selectors2")
12205 (uri (pypi-uri "selectors2" version))
12208 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12209 (build-system python-build-system)
12211 `(#:python ,python-2))
12213 `(("python2-mock" ,python2-mock)
12214 ("python2-psutil" ,python2-psutil)))
12215 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12216 (synopsis "Backport of the selectors module from Python 3.5+")
12218 "This package provides a drop-in replacement for the @code{selectors}
12219 module in Python 3.5 and later.")
12220 (license license:expat)))
12222 (define-public python-tblib
12224 (name "python-tblib")
12228 (uri (pypi-uri "tblib" version))
12231 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12232 (build-system python-build-system)
12235 (modify-phases %standard-phases
12238 ;; Upstream runs tests after installation and the package itself
12239 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12241 (setenv "PYTHONPATH"
12242 (string-append (getcwd) "/build/lib:"
12243 (getenv "PYTHONPATH")))
12244 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12246 `(("python-pytest" ,python-pytest)
12247 ("python-six" ,python-six)))
12248 (home-page "https://github.com/ionelmc/python-tblib")
12249 (synopsis "Traceback serialization library")
12251 "Traceback serialization allows you to:
12254 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12255 different processes. This allows better error handling when running code over
12256 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12258 @item Parse traceback strings and raise with the parsed tracebacks.
12260 (license license:bsd-3)))
12262 (define-public python2-tblib
12263 (package-with-python2 python-tblib))
12265 (define-public python-greenlet
12267 (name "python-greenlet")
12271 (uri (pypi-uri "greenlet" version))
12274 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12275 (build-system python-build-system)
12276 (home-page "https://greenlet.readthedocs.io/")
12277 (synopsis "Lightweight in-process concurrent programming")
12279 "Greenlet package is a spin-off of Stackless, a version of CPython
12280 that supports micro-threads called \"tasklets\". Tasklets run
12281 pseudo-concurrently (typically in a single or a few OS-level threads) and
12282 are synchronized with data exchanges on \"channels\".")
12283 (license (list license:psfl license:expat))))
12285 (define-public python2-greenlet
12286 (package-with-python2 python-greenlet))
12288 (define-public python-objgraph
12290 (name "python-objgraph")
12295 (uri (pypi-uri "objgraph" version))
12298 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12299 (build-system python-build-system)
12301 `(("python-graphviz" ,python-graphviz)))
12303 `(("python-mock" ,python-mock)
12304 ("graphviz" ,graphviz)))
12305 (home-page "https://mg.pov.lt/objgraph/")
12306 (synopsis "Draw Python object reference graphs with graphviz")
12308 "This package provides tools to draw Python object reference graphs with
12310 (license license:expat)))
12312 (define-public python2-objgraph
12313 (package-with-python2 python-objgraph))
12315 (define-public python-gevent
12317 (name "python-gevent")
12321 (uri (pypi-uri "gevent" version))
12324 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12325 (modules '((guix build utils)))
12328 ;; unbunding libev and c-ares
12329 (delete-file-recursively "deps")
12331 (build-system python-build-system)
12333 `(#:modules ((ice-9 ftw)
12337 (guix build python-build-system))
12338 #:phases (modify-phases %standard-phases
12339 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12341 (substitute* "src/gevent/subprocess.py"
12342 (("/bin/sh") (which "sh")))
12343 (for-each (lambda (file)
12345 (("/bin/sh") (which "sh"))
12346 (("/bin/true") (which "true"))))
12347 (find-files "src/greentest" "\\.py$"))
12349 (add-before 'build 'do-not-use-bundled-sources
12351 (setenv "GEVENTSETUP_EMBED" "0")
12353 ;; Prevent building bundled libev.
12354 (substitute* "setup.py"
12355 (("run_make=_BUILDING")
12358 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12359 (lambda* (#:key inputs #:allow-other-keys)
12360 (let ((greenlet (string-append
12361 (assoc-ref inputs "python-greenlet")
12363 (match (scandir greenlet
12365 (string-prefix? "python" item)))
12367 (setenv "C_INCLUDE_PATH"
12368 (string-append greenlet "/" python ":"
12369 (or (getenv "C_INCLUDE_PATH")
12372 (add-before 'check 'pretend-to-be-CI
12374 ;; A few tests are skipped due to network constraints or
12375 ;; get longer timeouts when running in a CI environment.
12376 ;; Piggy-back on that, as we need the same adjustments.
12377 (setenv "TRAVIS" "1")
12378 (setenv "APPVEYOR" "1")
12380 (add-before 'check 'adjust-tests
12382 (let ((disabled-tests
12383 '(;; These tests rely on networking which is not
12384 ;; available in the build container.
12385 "test_urllib2net.py"
12387 "test__server_pywsgi.py"
12390 "test__socket_ssl.py"
12391 "test__socket_dns.py"
12392 "test__socket_dns6.py"
12393 "test___example_servers.py"
12394 "test__getaddrinfo_import.py"
12395 "test__examples.py"
12398 "test_urllib2_localnet.py"
12401 ;; XXX: These tests borrow functionality from the
12402 ;; Python builtin 'test' module, but it is not
12403 ;; installed with the Guix Python distribution.
12408 "test_threading.py"
12409 "test__threading_2.py"
12410 ;; These tests rely on KeyboardInterrupts which do not
12411 ;; work inside the build container for some reason
12412 ;; (lack of controlling terminal?).
12413 "test_subprocess.py"
12414 "test__issues461_471.py"
12415 ;; TODO: Patch out the tests that use getprotobyname, etc
12416 ;; instead of disabling all the tests from these files.
12417 "test__resolver_dnspython.py"
12418 "test__doctests.py"
12421 "test__execmodules.py")))
12422 (call-with-output-file "skipped_tests.txt"
12424 (format port "~a~%"
12425 (string-join disabled-tests "\n"))))
12429 ;; Make sure the build directory is on PYTHONPATH.
12430 (setenv "PYTHONPATH"
12432 (getenv "PYTHONPATH") ":"
12434 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12436 ;; Use the build daemons configured number of workers.
12437 (setenv "NWORKERS" (number->string (parallel-job-count)))
12439 (invoke "python" "-m" "gevent.tests" "--config"
12440 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12442 `(("python-greenlet" ,python-greenlet)
12443 ("python-objgraph" ,python-objgraph)
12444 ("python-zope.event" ,python-zope-event)
12445 ("python-zope.interface" ,python-zope-interface)))
12447 `(("python-six" ,python-six)
12450 ("python-dnspython" ,python-dnspython)
12451 ("python-psutil" ,python-psutil)))
12453 `(("c-ares" ,c-ares)
12455 (home-page "http://www.gevent.org/")
12456 (synopsis "Coroutine-based network library")
12458 "gevent is a coroutine-based Python networking library that uses greenlet
12459 to provide a high-level synchronous API on top of the libev event loop.")
12460 (license license:expat)
12461 (properties `((python2-variant . ,(delay python2-gevent))))))
12463 (define-public python2-gevent
12464 (let ((base (package-with-python2
12465 (strip-python2-variant python-gevent))))
12468 (native-inputs `(,@(package-native-inputs base)
12469 ("python-mock" ,python2-mock)
12470 ("python2-selectors2" ,python2-selectors2))))))
12472 (define-public python-fastimport
12474 (name "python-fastimport")
12479 (uri (pypi-uri "fastimport" version))
12481 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12482 (build-system python-build-system)
12483 (home-page "https://github.com/jelmer/python-fastimport")
12484 (synopsis "VCS fastimport parser and generator in Python")
12485 (description "This package provides a parser for and generator of the Git
12486 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12488 (license license:gpl2+)))
12490 (define-public python2-fastimport
12491 (package-with-python2 python-fastimport))
12493 (define-public python-twisted
12495 (name "python-twisted")
12499 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12502 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12503 (build-system python-build-system)
12505 '(#:tests? #f)) ; FIXME: some tests fail
12507 `(("python-zope-interface" ,python-zope-interface)
12508 ("python-pyhamcrest" ,python-pyhamcrest)
12509 ("python-incremental" ,python-incremental)
12510 ("python-hyperlink" ,python-hyperlink)
12511 ("python-constantly" ,python-constantly)
12512 ("python-automat" ,python-automat)))
12513 (home-page "https://twistedmatrix.com/")
12514 (synopsis "Asynchronous networking framework written in Python")
12516 "Twisted is an extensible framework for Python programming, with special
12517 focus on event-based network programming and multiprotocol integration.")
12518 (license license:expat)))
12520 (define-public python2-twisted
12521 (package-with-python2 python-twisted))
12523 (define-public python-pika
12525 (name "python-pika")
12530 (uri (pypi-uri "pika" version))
12533 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12534 (build-system python-build-system)
12536 `(("python-pyev" ,python-pyev)
12537 ("python-tornado" ,python-tornado)
12538 ("python-twisted" ,python-twisted)))
12539 (home-page "https://pika.readthedocs.org")
12540 (synopsis "Pure Python AMQP Client Library")
12542 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12543 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12544 network support library.")
12545 (license license:bsd-3)))
12547 (define-public python2-pika
12548 (package-with-python2 python-pika))
12550 (define-public python-ply
12552 (name "python-ply")
12557 (uri (pypi-uri "ply" version))
12560 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12561 (build-system python-build-system)
12562 (home-page "http://www.dabeaz.com/ply/")
12563 (synopsis "Python Lex & Yacc")
12564 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12565 It uses LR parsing and does extensive error checking.")
12566 (license license:bsd-3)))
12568 (define-public python-tabulate
12570 (name "python-tabulate")
12574 (uri (pypi-uri "tabulate" version))
12577 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12578 (build-system python-build-system)
12580 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12581 ;; and the latest release is not tagged in the upstream repository.
12583 (home-page "https://bitbucket.org/astanin/python-tabulate")
12584 (synopsis "Pretty-print tabular data")
12586 "Tabulate is a library and command-line utility to pretty-print tabular
12588 (license license:expat)))
12590 (define-public python2-tabulate
12591 (package-with-python2 python-tabulate))
12593 (define-public python-kazoo
12595 (name "python-kazoo")
12600 (uri (pypi-uri "kazoo" version))
12603 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12604 (build-system python-build-system)
12605 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12607 `(("python-six" ,python-six)))
12608 (home-page "https://kazoo.readthedocs.org")
12609 (synopsis "High-level Zookeeper client library")
12611 "Kazoo is a Python client library for the Apache Zookeeper distributed
12612 application service. It is designed to be easy to use and to avoid common
12613 programming errors.")
12614 (license license:asl2.0)))
12616 (define-public python2-kazoo
12617 (package-with-python2 python-kazoo))
12619 (define-public python-pykafka
12621 (name "python-pykafka")
12625 (uri (pypi-uri "pykafka" version))
12628 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12629 (build-system python-build-system)
12630 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12632 `(("python-gevent" ,python-gevent)
12633 ("python-kazoo" ,python-kazoo)
12634 ("python-tabulate" ,python-tabulate)))
12636 `(("librdkafka" ,librdkafka)))
12637 (home-page "https://pykafka.readthedocs.io/")
12638 (synopsis "Apache Kafka client for Python")
12640 "PyKafka is a client for the Apache Kafka distributed messaging system.
12641 It includes Python implementations of Kafka producers and consumers, which
12642 are optionally backed by a C extension built on librdkafka.")
12643 (license license:asl2.0)))
12645 (define-public python2-pykafka
12646 (package-with-python2 python-pykafka))
12648 (define-public python-wcwidth
12650 (name "python-wcwidth")
12654 (uri (pypi-uri "wcwidth" version))
12657 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12658 (build-system python-build-system)
12659 (home-page "https://github.com/jquast/wcwidth")
12660 (synopsis "Measure number of terminal column cells of wide-character codes")
12661 (description "Wcwidth measures the number of terminal column cells of
12662 wide-character codes. It is useful for those implementing a terminal emulator,
12663 or programs that carefully produce output to be interpreted by one. It is a
12664 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12665 specified in POSIX.1-2001 and POSIX.1-2008.")
12666 (license license:expat)))
12668 (define-public python2-wcwidth
12669 (package-with-python2 python-wcwidth))
12671 (define-public python2-jsonrpclib
12673 (name "python2-jsonrpclib")
12677 (uri (pypi-uri "jsonrpclib" version))
12680 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12681 (build-system python-build-system)
12684 #:python ,python-2))
12685 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12686 (synopsis "Implementation of JSON-RPC specification for Python")
12688 "This library is an implementation of the JSON-RPC specification.
12689 It supports both the original 1.0 specification, as well as the
12690 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12692 (license license:asl2.0)))
12694 (define-public python-chai
12696 (name "python-chai")
12700 (uri (pypi-uri "chai" version))
12703 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12704 (build-system python-build-system)
12705 (home-page "https://github.com/agoragames/chai")
12706 (synopsis "Mocking framework for Python")
12708 "Chai provides an api for mocking, stubbing and spying your python
12709 objects, patterned after the Mocha library for Ruby.")
12710 (license license:bsd-3)))
12712 (define-public python2-chai
12713 (package-with-python2 python-chai))
12715 (define-public python-inflection
12717 (name "python-inflection")
12720 (origin (method url-fetch)
12721 (uri (pypi-uri "inflection" version))
12724 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12725 (build-system python-build-system)
12727 `(("python-pytest" ,python-pytest)))
12728 (home-page "https://github.com/jpvanhal/inflection")
12729 (synopsis "Python string transformation library")
12731 "Inflection is a string transformation library. It singularizes
12732 and pluralizes English words, and transforms strings from CamelCase to
12733 underscored string.")
12734 (license license:expat)))
12736 (define-public python2-inflection
12737 (package-with-python2 python-inflection))
12739 (define-public python-pylev
12741 (name "python-pylev")
12745 (uri (pypi-uri "pylev" version))
12748 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12749 (build-system python-build-system)
12750 (home-page "https://github.com/toastdriven/pylev")
12751 (synopsis "Levenshtein distance implementation in Python")
12752 (description "Pure Python Levenshtein implementation, based off the
12753 Wikipedia code samples at
12754 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12755 (license license:bsd-3)))
12757 (define-public python2-pylev
12758 (package-with-python2 python-pylev))
12760 (define-public python-cleo
12762 (name "python-cleo")
12766 (uri (pypi-uri "cleo" version))
12769 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12770 (build-system python-build-system)
12773 ("python-mock" ,python-mock)
12774 ("python-pytest-mock" ,python-pytest-mock)
12775 ("python-pytest" ,python-pytest)))
12777 `(("python-backpack" ,python-backpack)
12778 ("python-clikit" ,python-clikit)
12779 ("python-pastel" ,python-pastel)
12780 ("python-pylev" ,python-pylev)))
12781 (home-page "https://github.com/sdispater/cleo")
12782 (synopsis "Command-line arguments library for Python")
12784 "Cleo allows you to create command-line commands with signature in
12785 docstring and colored output.")
12786 (license license:expat)))
12788 (define-public python2-cleo
12789 (package-with-python2 python-cleo))
12791 (define-public python-tomlkit
12793 (name "python-tomlkit")
12798 (uri (pypi-uri "tomlkit" version))
12800 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12801 (build-system python-build-system)
12803 `(("python-pytest" ,python-pytest)))
12804 (home-page "https://github.com/sdispater/tomlkit")
12805 (synopsis "Style-preserving TOML library")
12807 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
12808 preserves all comments, indentations, whitespace and internal element ordering,
12809 and makes them accessible and editable via an intuitive API. It can also
12810 create new TOML documents from scratch using the provided helpers. Part of the
12811 implementation has been adapted, improved, and fixed from Molten.")
12812 (license license:expat)))
12814 (define-public python-shellingham
12816 (name "python-shellingham")
12821 (uri (pypi-uri "shellingham" version))
12823 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12824 (build-system python-build-system)
12827 (modify-phases %standard-phases
12828 (add-after 'unpack 'restore-setup.py
12829 ;; setup.py will return in the next release.
12830 ;; <https://github.com/sarugaku/shellingham/issues/33>
12832 (with-output-to-file "setup.py"
12834 (display "from setuptools import setup\nsetup()\n")))
12836 (home-page "https://github.com/sarugaku/shellingham")
12837 (synopsis "Tool to detect surrounding shell")
12839 "Shellingham detects what shell the current Python executable is
12841 (license license:isc)))
12843 (define-public python-memcached
12845 (name "python-memcached")
12850 (uri (pypi-uri "python-memcached" version))
12853 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
12854 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
12855 (build-system python-build-system)
12856 (propagated-inputs `(("python-six" ,python-six)))
12858 "https://github.com/linsomniac/python-memcached")
12859 (synopsis "Pure python memcached client")
12861 "This software is a pure Python interface to the memcached memory cache
12862 daemon. It is the client side software which allows storing values in one or
12863 more, possibly remote, memcached servers.")
12864 (license license:psfl)))
12866 (define-public python-clikit
12868 (name "python-clikit")
12873 (uri (pypi-uri "clikit" version))
12876 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
12877 (build-system python-build-system)
12878 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
12880 `(("python-crashtest" ,python-crashtest)
12881 ("python-pastel" ,python-pastel)
12882 ("python-pylev" ,python-pylev)))
12883 (home-page "https://github.com/sdispater/clikit")
12884 (synopsis "Group of utilities to build command line interfaces")
12886 "CliKit is a group of utilities to build testable command line
12888 (properties `((python2-variant . ,(delay python2-clikit))))
12889 (license license:expat)))
12891 (define-public python2-clikit
12892 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12896 `(("python-enum34" ,python2-enum34)
12897 ("python-typing" ,python2-typing)
12898 ,@(package-propagated-inputs base))))))
12900 (define-public python-msgpack-python
12902 (name "python-msgpack-python")
12907 (uri (pypi-uri "msgpack-python" version))
12910 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
12911 (build-system python-build-system)
12912 (home-page "http://msgpack.org/")
12913 (synopsis "Package to deserialize messages in MessagePack binary format")
12915 "MessagePack is an efficient binary serialization format. It lets you
12916 exchange data among multiple languages like JSON. But it's faster and
12917 smaller. Small integers are encoded into a single byte, and typical short
12918 strings require only one extra byte in addition to the strings themselves.")
12919 (license license:asl2.0)))
12921 (define-public python-cachy
12923 (name "python-cachy")
12928 (uri (pypi-uri "cachy" version))
12931 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
12932 (build-system python-build-system)
12935 (modify-phases %standard-phases
12937 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
12940 `(("memcached" ,memcached)
12941 ("python-fakeredis" ,python-fakeredis)
12942 ("python-flexmock" ,python-flexmock)
12943 ("python-pifpaf" ,python-pifpaf)
12944 ("python-pytest" ,python-pytest)))
12946 `(("python-memcached" ,python-memcached)
12947 ("python-msgpack-python" ,python-msgpack-python)
12948 ("python-redis" ,python-redis)))
12949 (home-page "https://github.com/sdispater/cachy")
12950 (synopsis "Simple yet effective caching library")
12952 "Cachy provides a simple yet effective caching library. A simple but
12953 powerful API: thread-safety; decorator syntax; support for memcached, redis,
12954 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
12955 (license license:expat)))
12957 (define-public poetry
12961 ;; Poetry can only be built from source with Poetry.
12965 (uri (pypi-uri "poetry" version))
12968 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
12969 (build-system python-build-system)
12971 `(#:tests? #f ;; Pypi does not have tests.
12973 (modify-phases %standard-phases
12974 (add-before 'build 'patch-setup-py
12976 (substitute* "setup.py"
12977 ;; poetry won't update version as 21.0.0 relies on python > 3.6
12978 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
12979 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
12980 ;; Reported upstream:
12981 ;; <https://github.com/python-poetry/poetry/issues/2752>.
12982 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
12983 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
12984 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
12987 `(("python-cachecontrol" ,python-cachecontrol)
12988 ("python-cachy" ,python-cachy)
12989 ("python-cleo" ,python-cleo)
12990 ("python-clikit" ,python-clikit)
12991 ("python-html5lib" ,python-html5lib)
12992 ("python-jsonschema" ,python-jsonschema)
12993 ("python-keyring" ,python-keyring)
12994 ("python-msgpack-transitional" ,python-msgpack-transitional)
12995 ("python-pexpect" ,python-pexpect)
12996 ("python-pkginfo" ,python-pkginfo)
12997 ("python-pyparsing" ,python-pyparsing)
12998 ("python-pyrsistent" ,python-pyrsistent)
12999 ("python-requests" ,python-requests)
13000 ("python-requests-toolbelt" ,python-requests-toolbelt)
13001 ("python-shellingham" ,python-shellingham)
13002 ("python-tomlkit" ,python-tomlkit)
13003 ("python-virtualenv" ,python-virtualenv)))
13004 (home-page "https://python-poetry.org")
13005 (synopsis "Python dependency management and packaging made easy")
13006 (description "Poetry is a tool for dependency management and packaging
13007 in Python. It allows you to declare the libraries your project depends on and
13008 it will manage (install/update) them for you.")
13009 (license license:expat)))
13011 (define-public python-lark-parser
13013 (name "python-lark-parser")
13017 (uri (pypi-uri "lark-parser" version))
13020 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13021 (build-system python-build-system)
13022 (home-page "https://github.com/lark-parser/lark")
13023 (synopsis "Multi-language parser for Python")
13025 "Lark is a parser built with a focus on ergonomics, performance and
13026 resilience. Lark can parse all context-free languages. That means it is
13027 capable of parsing almost any programming language out there, and to
13028 some degree most natural languages too.")
13029 (license license:expat)))
13031 (define-public python-libcst
13033 (name "python-libcst")
13037 (uri (pypi-uri "libcst" version))
13040 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13041 (build-system python-build-system)
13044 (modify-phases %standard-phases
13045 (add-after 'unpack 'remove-failing-tests
13047 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13048 (delete-file "libcst/tests/test_fuzz.py")
13049 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13050 (delete-file "libcst/tests/test_pyre_integration.py")
13051 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13052 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13053 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13055 (add-before 'check 'generate-test-data
13057 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13058 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13059 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13062 (invoke "python" "-m" "unittest")
13065 `(("python-black" ,python-black)
13066 ("python-isort" ,python-isort)))
13068 `(("python-typing-extensions" ,python-typing-extensions)
13069 ("python-typing-inspect" ,python-typing-inspect)
13070 ("python-pyyaml" ,python-pyyaml)))
13071 (home-page "https://github.com/Instagram/LibCST")
13072 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13074 "LibCST parses Python source code as a CST tree that keeps all
13075 formatting details (comments, whitespaces, parentheses, etc). It's useful
13076 for building automated refactoring (codemod) applications and linters.
13077 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13078 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13079 naming node types and fields, LibCST creates a lossless CST that looks and
13080 feels like an AST.")
13081 (license (list license:expat
13082 ;; Some files unde libcst/_parser/ are under Python Software
13083 ;; Foundation license (see LICENSE file for details)
13085 ;; libcst/_add_slots.py
13088 (define-public python-typing-inspect
13090 (name "python-typing-inspect")
13094 (uri (pypi-uri "typing_inspect" version))
13097 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13098 (build-system python-build-system)
13100 `(("python-mypy-extensions" ,python-mypy-extensions)
13101 ("python-typing-extensions" ,python-typing-extensions)))
13102 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13103 (synopsis "API for inspection of types in the Python @code{typing} module")
13105 "The @code{typing_inspect} module defines experimental API for runtime
13106 inspection of types defined in the Python standard typing module.")
13107 (license license:expat)))
13109 (define-public python-lazy-object-proxy
13111 (name "python-lazy-object-proxy")
13115 (uri (pypi-uri "lazy-object-proxy" version))
13118 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13120 `(("python-setuptools-scm" ,python-setuptools-scm)))
13121 (build-system python-build-system)
13122 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13123 (synopsis "Lazy object proxy for python")
13125 "Lazy object proxy is an object that wraps a callable but defers the call
13126 until the object is actually required, and caches the result of said call.")
13127 (license license:bsd-2)))
13129 (define-public python2-lazy-object-proxy
13130 (package-with-python2 python-lazy-object-proxy))
13132 (define-public python-dnspython
13134 (name "python-dnspython")
13138 (uri (string-append "http://www.dnspython.org/kits/"
13139 version "/dnspython-" version ".tar.gz"))
13142 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13143 (build-system python-build-system)
13144 (arguments '(#:tests? #f)) ; XXX: requires internet access
13145 (home-page "http://www.dnspython.org")
13146 (synopsis "DNS toolkit for Python")
13148 "dnspython is a DNS toolkit for Python. It supports almost all record
13149 types. It can be used for queries, zone transfers, and dynamic updates.
13150 It supports TSIG authenticated messages and EDNS0.")
13151 (license license:expat)))
13153 (define-public python2-dnspython
13154 (package-with-python2 python-dnspython))
13156 (define-public python-py3dns
13158 (name "python-py3dns")
13163 (uri (pypi-uri "py3dns" version))
13166 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13167 (build-system python-build-system)
13168 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13169 ;; removing functionality so we copy from Nix and "just don't build it".
13172 (modify-phases %standard-phases
13173 (add-after 'unpack 'patch-source
13175 (substitute* "setup.py"
13176 (("import DNS") "")
13177 (("DNS.__version__") (string-append "\"" ,version "\"")))
13179 #:tests? #f)) ; Also skip the tests.
13180 (home-page "https://launchpad.net/py3dns")
13181 (synopsis "Python 3 DNS library")
13182 (description "This Python 3 module provides a DNS API for looking up DNS
13183 entries from within Python 3 modules and applications. This module is a
13184 simple, lightweight implementation.")
13185 (license license:psfl)))
13187 (define-public python-email-validator
13189 (name "python-email-validator")
13192 (origin (method url-fetch)
13193 (uri (pypi-uri "email_validator" version))
13196 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13197 (build-system python-build-system)
13200 (modify-phases %standard-phases
13201 (add-before 'build 'use-dnspython
13203 (substitute* "setup.py"
13204 (("dnspython3") "dnspython"))
13207 `(("python-dnspython" ,python-dnspython)
13208 ("python-idna" ,python-idna)))
13209 (home-page "https://github.com/JoshData/python-email-validator")
13210 (synopsis "Email address validation library for Python")
13212 "This library validates email address syntax and deliverability.")
13213 (license license:cc0)))
13215 (define-public python2-email-validator
13216 (package-with-python2 python-email-validator))
13218 (define-public python-ukpostcodeparser
13220 (name "python-ukpostcodeparser")
13224 (uri (pypi-uri "UkPostcodeParser" version))
13227 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13228 (build-system python-build-system)
13229 (home-page "https://github.com/hamstah/ukpostcodeparser")
13230 (synopsis "UK Postcode parser for Python")
13232 "This library provides the @code{parse_uk_postcode} function for
13233 parsing UK postcodes.")
13234 (license license:expat)))
13236 (define-public python2-ukpostcodeparser
13237 (package-with-python2 python-ukpostcodeparser))
13239 (define-public python-faker
13241 (name "python-faker")
13245 (uri (pypi-uri "Faker" version))
13248 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13249 (build-system python-build-system)
13252 (modify-phases %standard-phases
13254 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13257 ("python-freezegun" ,python-freezegun)
13258 ("python-pytest" ,python-pytest)
13259 ("python-random2" ,python-random2)
13260 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13261 ("python-validators" ,python-validators)))
13263 `(("python-dateutil" ,python-dateutil)
13264 ("python-text-unidecode" ,python-text-unidecode)))
13265 (home-page "https://github.com/joke2k/faker")
13266 (synopsis "Python package that generates fake data")
13268 "Faker is a Python package that generates fake data such as names,
13269 addresses, and phone numbers.")
13270 (license license:expat)
13271 (properties `((python2-variant . ,(delay python2-faker))))))
13273 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13274 (define-public python2-faker
13275 (let ((base (package-with-python2 (strip-python2-variant
13282 (uri (pypi-uri "Faker" version))
13285 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13287 `(("python-mock" ,python2-mock)
13288 ,@(package-native-inputs base)))
13290 `(("python2-ipaddress" ,python2-ipaddress)
13291 ("python2-six" ,python2-six)
13292 ,@(package-propagated-inputs base))))))
13294 (define-public python-pyaml
13296 (name "python-pyaml")
13297 (version "18.11.0")
13300 (uri (pypi-uri "pyaml" version))
13303 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13304 (build-system python-build-system)
13306 `(("python-unidecode" ,python-unidecode)))
13308 `(("python-pyyaml" ,python-pyyaml)))
13309 (home-page "https://github.com/mk-fg/pretty-yaml")
13310 (synopsis "YAML pretty-print library for Python")
13312 "pyaml is a PyYAML based python module to produce pretty and readable
13313 YAML-serialized data.")
13314 (license license:wtfpl2)))
13316 (define-public python2-pyaml
13317 (package-with-python2 python-pyaml))
13319 (define-public python-backpack
13321 (name "python-backpack")
13326 (uri (pypi-uri "backpack" version))
13329 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13330 (build-system python-build-system)
13332 `(("python-pytest" ,python-pytest)
13333 ("python-nose" ,python-nose)))
13335 `(("python-simplejson" ,python-simplejson)))
13336 (home-page "https://github.com/sdispater/backpack")
13337 (synopsis "Utilities for working with Python collections")
13338 (description "Backpack provides some useful utilities for working with
13339 collections of data.")
13340 (license license:expat)))
13342 (define-public python2-backpack
13343 (package-with-python2 python-backpack))
13345 (define-public python-prompt-toolkit
13347 (name "python-prompt-toolkit")
13352 (uri (pypi-uri "prompt_toolkit" version))
13354 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13355 (build-system python-build-system)
13358 (modify-phases %standard-phases
13360 (add-after 'install 'post-install-check
13361 (lambda* (#:key inputs outputs #:allow-other-keys)
13362 ;; HOME is needed for the test
13363 ;; "test_pathcompleter_can_expanduser".
13364 (setenv "HOME" "/tmp")
13365 (add-installed-pythonpath inputs outputs)
13366 (invoke "py.test"))))))
13368 `(("python-wcwidth" ,python-wcwidth)))
13370 `(("python-pytest" ,python-pytest)))
13372 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13373 (synopsis "Library for building command line interfaces in Python")
13375 "Prompt-Toolkit is a library for building interactive command line
13376 interfaces in Python. It's like GNU Readline but it also features syntax
13377 highlighting while typing, out-of-the-box multi-line input editing, advanced
13378 code completion, incremental search, support for Chinese double-width
13379 characters, mouse support, and auto suggestions.")
13380 (license license:bsd-3)
13381 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13383 (define-public python-prompt-toolkit-2
13384 (package (inherit python-prompt-toolkit)
13385 (name "python-prompt-toolkit")
13390 (uri (pypi-uri "prompt_toolkit" version))
13393 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13395 `(("python-wcwidth" ,python-wcwidth)
13396 ("python-six" ,python-six)
13397 ("python-pygments" ,python-pygments)))
13400 (define-public python2-prompt-toolkit
13401 (package-with-python2 python-prompt-toolkit-2))
13403 (define-public python-prompt-toolkit-1
13404 (package (inherit python-prompt-toolkit-2)
13409 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13412 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13414 (define-public python2-prompt-toolkit-1
13415 (package-with-python2 python-prompt-toolkit-1))
13417 (define-public python-jedi
13419 (name "python-jedi")
13424 (uri (pypi-uri "jedi" version))
13426 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13427 (build-system python-build-system)
13430 (modify-phases %standard-phases
13433 (setenv "HOME" "/tmp")
13434 (invoke "python" "-m" "pytest" "-vv"))))))
13436 `(("python-pytest" ,python-pytest)
13437 ("python-docopt" ,python-docopt)))
13439 `(("python-parso" ,python-parso)))
13440 (home-page "https://github.com/davidhalter/jedi")
13441 (synopsis "Autocompletion and static analysis library for Python")
13443 "Jedi is a static analysis tool for Python that can be used in Integrated
13444 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13445 on a deeper level than many other static analysis frameworks for Python.
13447 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13449 (license license:expat)))
13451 (define-public python2-jedi
13452 (package-with-python2 python-jedi))
13454 (define-public ptpython
13460 (uri (pypi-uri "ptpython" version))
13463 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13464 (build-system python-build-system)
13466 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13468 `(("python-appdirs" ,python-appdirs)
13469 ("python-jedi" ,python-jedi)
13470 ("python-prompt-toolkit" ,python-prompt-toolkit)
13471 ("python-pygments" ,python-pygments)))
13472 (home-page "https://github.com/jonathanslenders/ptpython")
13473 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13475 "ptpython is a Python read-eval-print loop with IDE-like features.
13476 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13477 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13479 (license license:bsd-3)
13480 (properties `((python2-variant . ,(delay ptpython-2))))))
13482 (define-public ptpython-2
13483 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13486 (name "ptpython2"))))
13488 (define-public python-stem
13490 (name "python-stem")
13495 (uri (pypi-uri "stem" version))
13498 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13499 (build-system python-build-system)
13502 (modify-phases %standard-phases
13505 (invoke "./run_tests.py" "--unit")
13508 `(("python-mock" ,python-mock)
13509 ("python-pycodestyle" ,python-pycodestyle)
13510 ("python-pyflakes" ,python-pyflakes)))
13511 (home-page "https://stem.torproject.org/")
13513 "Python controller library that allows applications to interact with Tor")
13515 "Stem is a Python controller library for Tor. With it you can use Tor's
13516 control protocol to script against the Tor process and read descriptor data
13517 relays publish about themselves.")
13518 (license license:lgpl3)))
13520 (define-public python2-stem
13521 (package-with-python2 python-stem))
13523 (define-public python-pyserial
13525 (name "python-pyserial")
13530 (uri (pypi-uri "pyserial" version))
13533 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13534 (build-system python-build-system)
13536 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13538 ;; (modify-phases %standard-phases
13541 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13543 "https://github.com/pyserial/pyserial")
13544 (synopsis "Python Serial Port Bindings")
13545 (description "@code{pyserial} provide serial port bindings for Python. It
13546 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13547 and/or Xon/Xoff. The port is accessed in RAW mode.")
13548 (license license:bsd-3)))
13550 (define-public python2-pyserial
13551 (package-with-python2 python-pyserial))
13553 (define-public python-kivy
13555 (name "python-kivy")
13560 (uri (pypi-uri "Kivy" version))
13561 (file-name (string-append name "-" version ".tar.gz"))
13564 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13565 (build-system python-build-system)
13567 `(#:tests? #f ; Tests require many optional packages
13569 (modify-phases %standard-phases
13570 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13571 (lambda* (#:key inputs #:allow-other-keys)
13572 (setenv "KIVY_SDL2_PATH"
13573 (string-append (assoc-ref inputs "sdl-union")
13577 `(("pkg-config" ,pkg-config)
13578 ("python-cython" ,python-cython)))
13580 `(("gstreamer" ,gstreamer)
13583 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13584 (home-page "https://kivy.org")
13586 "Multitouch application framework")
13588 "A software library for rapid development of
13589 hardware-accelerated multitouch applications.")
13590 (license license:expat)))
13592 (define-public python2-kivy
13593 (package-with-python2 python-kivy))
13595 (define-public python-binaryornot
13597 (name "python-binaryornot")
13601 (uri (pypi-uri "binaryornot" version))
13604 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13605 (build-system python-build-system)
13608 (modify-phases %standard-phases
13609 (add-after 'unpack 'patch-tests
13611 ;; TypeError: binary() got an unexpected keyword argument
13613 (substitute* "tests/test_check.py"
13614 (("average_size=512") ""))
13617 `(("python-chardet" ,python-chardet)
13618 ("python-hypothesis" ,python-hypothesis)))
13619 (home-page "https://github.com/audreyr/binaryornot")
13620 (synopsis "Package to check if a file is binary or text")
13621 (description "Ultra-lightweight pure Python package to check if a file is
13623 (license license:bsd-3)
13624 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13626 (define-public python2-binaryornot
13627 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13628 (package (inherit base)
13630 `(("python2-enum34" ,python2-enum34)
13631 ,@(package-propagated-inputs base))))))
13633 (define-public python-binwalk
13635 (name "python-binwalk")
13640 (uri (git-reference
13641 (url "https://github.com/ReFirmLabs/binwalk")
13642 (commit (string-append "v" version))))
13643 (file-name (git-file-name name version))
13646 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13647 (build-system python-build-system)
13650 (modify-phases %standard-phases
13651 (add-before 'check 'set-pythonpath
13653 (setenv "PYTHONPATH"
13656 ":" (getenv "PYTHONPATH")))
13660 `(("python-coverage" ,python-coverage)
13661 ("python-nose" ,python-nose)))
13662 (home-page "https://github.com/ReFirmLabs/binwalk")
13663 (synopsis "Firmware analysis tool")
13664 (description "Binwalk is a tool for analyzing, reverse engineering, and
13665 extracting firmware images")
13666 (license license:expat)))
13668 (define-public python-nltk
13670 (name "python-nltk")
13674 (uri (pypi-uri "nltk" version))
13677 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13678 (build-system python-build-system)
13680 '(;; The tests require some extra resources to be downloaded.
13681 ;; TODO Try packaging these resources.
13683 (home-page "http://nltk.org/")
13684 (synopsis "Natural Language Toolkit")
13685 (description "It provides interfaces to over 50 corpora and lexical
13686 resources such as WordNet, along with a suite of text processing libraries
13687 for classification, tokenization, stemming, tagging, parsing, and semantic
13688 reasoning, wrappers for natural language processing libraries.")
13689 (license license:asl2.0)))
13691 (define-public python2-nltk
13692 (package-with-python2 python-nltk))
13694 (define-public python-pymongo
13696 (name "python-pymongo")
13700 (uri (pypi-uri "pymongo" version))
13703 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13704 (build-system python-build-system)
13706 `(("python-certifi" ,python-certifi)))
13707 (home-page "https://github.com/mongodb/mongo-python-driver")
13708 (synopsis "Python driver for MongoDB")
13709 (description "Python driver for MongoDB.")
13710 (license license:asl2.0)))
13712 (define-public python2-pymongo
13713 (package-with-python2 python-pymongo))
13715 (define-public python-consul
13717 (name "python-consul")
13722 (uri (pypi-uri "python-consul" version))
13725 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13726 (build-system python-build-system)
13728 '(#:tests? #f)) ; The tests are not distributed
13730 `(("python-requests" ,python-requests)
13731 ("python-six" ,python-six)))
13732 (home-page "https://github.com/cablehead/python-consul")
13733 (synopsis "Python client for Consul")
13735 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13736 discovery, monitoring and configuration.")
13737 (license license:expat)))
13739 (define-public python2-consul
13740 (package-with-python2 python-consul))
13742 (define-public python-schematics
13744 (name "python-schematics")
13749 (uri (git-reference
13750 (url "https://github.com/schematics/schematics")
13751 (commit (string-append "v" version))))
13752 (file-name (git-file-name name version))
13754 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13755 (build-system python-build-system)
13757 `(("python-six" ,python-six)))
13759 ;; The tests require a bunch of not very nice packages with fixed
13760 ;; version requirements (e.g. python-coveralls).
13762 (home-page "https://github.com/schematics/schematics")
13763 (synopsis "Python Data Structures for Humans")
13764 (description "Python Data Structures for Humans.")
13765 (license license:bsd-3)))
13767 (define-public python2-schematics
13768 (package-with-python2 python-schematics))
13770 (define-public python-odfpy
13772 (name "python-odfpy")
13776 (uri (pypi-uri "odfpy" version))
13779 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13782 (modify-phases %standard-phases
13785 (setenv "PYTHONPATH" (string-append "./build/lib:"
13786 (getenv "PYTHONPATH")))
13787 (invoke "pytest" "-vv"))))))
13788 (build-system python-build-system)
13790 `(("python-pytest" ,python-pytest)))
13792 `(("python-defusedxml" ,python-defusedxml)))
13793 (home-page "https://github.com/eea/odfpy")
13794 (synopsis "Python API and tools to manipulate OpenDocument files")
13795 (description "Collection of libraries and utility programs written in
13796 Python to manipulate OpenDocument 1.2 files.")
13798 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13799 ;; number of files with other licenses.
13800 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13802 (define-public python2-odfpy
13803 (package-with-python2 python-odfpy))
13805 (define-public python-natsort
13807 (name "python-natsort")
13811 (uri (pypi-uri "natsort" version))
13814 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13815 (build-system python-build-system)
13817 `(#:modules ((guix build utils)
13818 (guix build python-build-system)
13823 (modify-phases %standard-phases
13824 (add-before 'check 'set-cachedir
13825 ;; Tests require write access to $HOME by default
13826 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
13829 (let ((cwd (getcwd)))
13830 (setenv "PYTHONPATH"
13833 (find (cut string-prefix? "lib" <>)
13834 (scandir (string-append cwd "/build")))
13836 (getenv "PYTHONPATH")))
13837 (invoke "pytest" "-v")))))))
13839 `(("python-hypothesis" ,python-hypothesis)
13840 ("python-pytest-cov" ,python-pytest-cov)
13841 ("python-pytest-mock" ,python-pytest-mock)
13842 ("python-pytest" ,python-pytest)))
13843 (propagated-inputs ; TODO: Add python-fastnumbers.
13844 `(("python-pyicu" ,python-pyicu)))
13845 (home-page "https://github.com/SethMMorton/natsort")
13846 (synopsis "Natural sorting for python and shell")
13848 "Natsort lets you apply natural sorting on lists instead of
13849 lexicographical. If you use the built-in @code{sorted} method in python
13850 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
13851 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
13852 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
13853 identifies numbers and sorts them separately from strings. It can also sort
13854 version numbers, real numbers, mixed types and more, and comes with a shell
13855 command @command{natsort} that exposes this functionality in the command line.")
13856 (license license:expat)
13857 (properties `((python2-variant . ,(delay python2-natsort))))))
13859 ;; Natsort 6.x are the last versions with support for Python 2.
13860 (define-public python2-natsort
13861 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13862 (package (inherit base)
13866 (uri (pypi-uri "natsort" version))
13869 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
13871 `(("python2-pathlib" ,python2-pathlib)
13872 ,@(package-native-inputs base))))))
13874 (define-public glances
13881 (uri (pypi-uri "Glances" version))
13883 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
13884 (modules '((guix build utils)))
13887 ;; Glances phones PyPI for weekly update checks by default.
13888 ;; Disable these. The user can re-enable them if desired.
13889 (substitute* "glances/outdated.py"
13890 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
13891 (string-append indentation
13892 "self.args.disable_check_update = True\n"
13895 (build-system python-build-system)
13897 `(("python-future" ,python-future)
13898 ("python-psutil" ,python-psutil)))
13899 (home-page "https://github.com/nicolargo/glances")
13900 (synopsis "Cross-platform curses-based monitoring tool")
13902 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13903 Glances uses the PsUtil library to get information from your system. It
13904 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13905 (license license:lgpl3+)))
13907 (define-public python-glances
13908 (deprecated-package "python-glances" glances))
13910 (define-public python-graphql-core
13912 (name "python-graphql-core")
13917 (uri (pypi-uri "graphql-core" version))
13920 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13921 (build-system python-build-system)
13923 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13925 (modify-phases %standard-phases
13926 (add-after 'unpack 'patch-hardcoded-version
13927 (lambda _ (substitute*
13929 (("'gevent==1.1rc1'") "'gevent'"))
13932 `(("python-gevent" ,python-gevent)
13933 ("python-mock" ,python-mock)
13934 ("python-pytest-mock" ,python-pytest-mock)))
13936 `(("python-promise" ,python-promise)
13937 ("python-six" ,python-six)))
13938 (home-page "https://github.com/graphql-python/graphql-core")
13939 (synopsis "GraphQL implementation for Python")
13941 "GraphQL implementation for Python. GraphQL is a data query language and
13942 runtime designed and used to request and deliver data to mobile and web apps.
13943 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13945 (license license:expat)))
13947 (define-public python2-graphql-core
13948 (package-with-python2 python-graphql-core))
13950 (define-public python-graphql-relay
13952 (name "python-graphql-relay")
13957 (uri (pypi-uri "graphql-relay" version))
13960 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13961 (build-system python-build-system)
13963 '(#:tests? #f)) ; The tests are not distributed
13965 `(("python-graphql-core" ,python-graphql-core)
13966 ("python-promise" ,python-promise)
13967 ("python-six" ,python-six)))
13968 (home-page "https://github.com/graphql-python/graphql-relay-py")
13969 (synopsis "Relay implementation for Python")
13971 "This is a library to allow the easy creation of Relay-compliant servers
13972 using the GraphQL Python reference implementation of a GraphQL server. It
13973 should be noted that the code is a exact port of the original
13974 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13976 (license license:expat)))
13978 (define-public python2-graphql-relay
13979 (package-with-python2 python-graphql-relay))
13981 (define-public python-graphene
13983 (name "python-graphene")
13988 (uri (pypi-uri "graphene" version))
13991 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13992 (build-system python-build-system)
13994 `(("python-graphql-core" ,python-graphql-core)
13995 ("python-graphql-relay" ,python-graphql-relay)
13996 ("python-iso8601" ,python-iso8601)
13997 ("python-promise" ,python-promise)
13998 ("python-six" ,python-six)))
14000 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14001 (home-page "https://graphene-python.org/")
14002 (synopsis "GraphQL Framework for Python")
14004 "Graphene is a Python library for building GraphQL schemas/types.
14005 A GraphQL schema describes your data model, and provides a GraphQL server
14006 with an associated set of resolve methods that know how to fetch data.")
14007 (properties `((python2-variant . ,(delay python2-graphene))))
14008 (license license:expat)))
14010 (define-public python2-graphene
14011 (let ((base (package-with-python2
14012 (strip-python2-variant python-graphene))))
14013 (package (inherit base)
14015 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14016 ,@(package-native-inputs base))))))
14018 (define-public python-nautilus
14020 (name "python-nautilus")
14025 (uri (pypi-uri "nautilus" version))
14028 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14029 (build-system python-build-system)
14030 (arguments `(#:tests? #f)) ; fails to import test modules
14032 `(("python-bcrypt" ,python-bcrypt)
14033 ("python-click" ,python-click)
14034 ("python-consul" ,python-consul)
14035 ("python-graphene" ,python-graphene)
14036 ("python-jinja2" ,python-jinja2)
14037 ("python-peewee" ,python-peewee)
14038 ("python-pika" ,python-pika)
14039 ("python-tornado" ,python-tornado)
14040 ("python-wtforms" ,python-wtforms)))
14042 `(("python-nose2" ,python-nose2)))
14043 (home-page "https://github.com/AlecAivazis/nautilus")
14044 (synopsis "Library for creating microservice applications")
14046 "Nautilus is a framework for flux based microservices that looks to
14047 provide extendible implementations of common aspects of a cloud so that you can
14048 focus on building massively scalable web applications.")
14049 (license license:expat)))
14051 (define-public python-random2
14053 (name "python-random2")
14057 (uri (pypi-uri "random2" version ".zip"))
14060 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14061 (build-system python-build-system)
14062 (native-inputs `(("unzip" ,unzip)))
14063 (home-page "http://pypi.python.org/pypi/random2")
14064 (synopsis "Python 3 version of the Python 2 @code{random} module")
14066 "This package provides a Python 3 ported version of Python 2.7’s
14067 @code{random} module. It has also been back-ported to work in Python 2.6.
14069 In Python 3, the implementation of @code{randrange()} was changed, so that
14070 even with the same seed you get different sequences in Python 2 and 3.
14072 This package closes that gap, allowing stable random number generation
14073 between the different Python versions.")
14074 (license license:psfl)))
14076 (define-public python2-random2
14077 (package-with-python2 python-random2))
14079 (define-public python-snowballstemmer
14081 (name "python-snowballstemmer")
14085 (uri (pypi-uri "snowballstemmer" version))
14088 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14089 (build-system python-build-system)
14091 `(;; No tests exist
14093 (home-page "https://github.com/shibukawa/snowball_py")
14094 (synopsis "Snowball stemming library collection for Python")
14095 (description "This package provides 16 word stemmer algorithms generated
14096 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14098 (license license:bsd-3)))
14100 (define-public python2-snowballstemmer
14101 (package-with-python2 python-snowballstemmer))
14103 (define-public python-setproctitle
14105 (name "python-setproctitle")
14110 (uri (pypi-uri "setproctitle" version))
14113 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14114 (build-system python-build-system)
14117 (modify-phases %standard-phases
14118 (add-before 'check 'patch-Makefile
14119 ;; Stricly this is only required for the python2 variant.
14120 ;; But adding a phase in an inherited package seems to be
14121 ;; cumbersum. So we patch even for python3.
14123 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14125 (substitute* "Makefile"
14126 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14127 (string-append nose "/bin/nosetests "))))
14131 (setenv "PYTHON" (or (which "python3") (which "python")))
14132 (setenv "PYCONFIG" (if (which "python3-config")
14133 "python3-config --embed"
14135 (setenv "CC" "gcc")
14136 ;; No need to extend PYTHONPATH to find the built package, since
14137 ;; the Makefile will build anyway
14138 (invoke "make" "check"))))))
14140 `(("procps" ,procps))) ; required for tests
14141 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14143 "Setproctitle implementation for Python to customize the process title")
14144 (description "The library allows a process to change its title (as displayed
14145 by system tools such as ps and top).
14147 Changing the title is mostly useful in multi-process systems, for
14148 example when a master process is forked: changing the children's title
14149 allows identifying the task each process is busy with. The technique
14150 is used by PostgreSQL and the OpenSSH Server for example.")
14151 (license license:bsd-3)
14152 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14154 (define-public python2-setproctitle
14155 (let ((base (package-with-python2
14156 (strip-python2-variant python-setproctitle))))
14159 (native-inputs `(("python2-nose" ,python2-nose)
14160 ,@(package-native-inputs base))))))
14162 (define-public python-validictory
14164 (name "python-validictory")
14169 (uri (pypi-uri "validictory" version))
14172 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14173 (build-system python-build-system)
14176 (modify-phases %standard-phases
14177 (add-after 'unpack 'bootstrap
14178 ;; Move the tests out of the package directory to avoid
14181 (rename-file "validictory/tests" "tests")
14182 (delete-file "tests/__init__.py")))
14185 ;; Extend PYTHONPATH so the built package will be found.
14186 (setenv "PYTHONPATH"
14187 (string-append (getcwd) "/build/lib:"
14188 (getenv "PYTHONPATH")))
14189 (invoke "py.test" "-vv" ))))))
14191 `(("python-pytest" ,python-pytest)))
14193 "https://github.com/jamesturk/validictory")
14194 (synopsis "General purpose Python data validator")
14195 (description "It allows validation of arbitrary Python data structures.
14197 The schema format is based on the JSON Schema
14198 proposal (http://json-schema.org), so combined with json the library is also
14199 useful as a validator for JSON data.")
14200 (license license:expat)))
14202 (define-public python2-validictory
14203 (package-with-python2 python-validictory))
14205 (define-public python-pyelftools
14207 (name "python-pyelftools")
14212 (uri (pypi-uri "pyelftools" version))
14215 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14216 (build-system python-build-system)
14219 (modify-phases %standard-phases
14220 (add-before 'check 'set-pythonpath
14222 (setenv "PYTHONPATH"
14225 ":" (getenv "PYTHONPATH")))
14228 "https://github.com/eliben/pyelftools")
14230 "Analyze binary and library file information")
14231 (description "This Python library provides interfaces for parsing and
14232 analyzing two binary and library file formats; the Executable and Linking
14233 Format (ELF), and debugging information in the Debugging With Attributed
14234 Record Format (DWARF).")
14235 (license license:public-domain)))
14237 (define-public python-pyev
14239 (name "python-pyev")
14244 (uri (pypi-uri "pyev" version))
14247 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14248 (build-system python-build-system)
14250 `(#:tests? #f ; no test suite
14252 (modify-phases %standard-phases
14253 (add-after 'unpack 'patch
14254 (lambda* (#:key inputs #:allow-other-keys)
14255 (let ((libev (string-append (assoc-ref inputs "libev")
14256 "/lib/libev.so.4")))
14257 (substitute* "setup.py"
14258 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14259 (string-append "libev_dll_name = \"" libev "\"")))))))))
14261 `(("libev" ,libev)))
14262 (home-page "http://pythonhosted.org/pyev/")
14263 (synopsis "Python libev interface")
14264 (description "Pyev provides a Python interface to libev.")
14265 (license license:gpl3)))
14267 (define-public python2-pyev
14268 (package-with-python2 python-pyev))
14270 (define-public python-imagesize
14272 (name "python-imagesize")
14277 (uri (pypi-uri "imagesize" version))
14280 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14281 (build-system python-build-system)
14282 (home-page "https://github.com/shibukawa/imagesize_py")
14283 (synopsis "Gets image size of files in various formats in Python")
14285 "This package allows determination of image size from
14286 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14287 (license license:expat)))
14289 (define-public python2-imagesize
14290 (package-with-python2 python-imagesize))
14292 (define-public python-termstyle
14294 (name "python-termstyle")
14299 (uri (pypi-uri "termstyle" version))
14302 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14303 (build-system python-build-system)
14306 (modify-phases %standard-phases
14309 (invoke "python" "test3.py"))))))
14310 (home-page "https://github.com/gfxmonk/termstyle")
14311 (synopsis "Console text coloring for Python")
14312 (description "This package provides console text coloring for Python.")
14313 (license license:bsd-3)))
14315 (define-public python-argcomplete
14317 (name "python-argcomplete")
14322 (uri (pypi-uri "argcomplete" version))
14325 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14326 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14327 (build-system python-build-system)
14329 `(("python-coverage" ,python-coverage)
14330 ("python-flake8" ,python-flake8)
14331 ("python-pexpect" ,python-pexpect)
14332 ("python-wheel" ,python-wheel)
14335 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14336 (home-page "https://github.com/kislyuk/argcomplete")
14337 (synopsis "Shell tab completion for Python argparse")
14338 (description "argcomplete provides extensible command line tab completion
14339 of arguments and options for Python scripts using @code{argparse}. It's
14340 particularly useful for programs with many options or sub-parsers that can
14341 dynamically suggest completions; for example, when browsing resources over the
14343 (license license:asl2.0)))
14345 (define-public python2-argcomplete
14346 (package-with-python2 python-argcomplete))
14348 (define-public python-csscompressor
14350 (name "python-csscompressor")
14355 (uri (pypi-uri "csscompressor" version))
14358 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14359 (build-system python-build-system)
14362 (modify-phases %standard-phases
14365 (invoke "py.test"))))))
14367 `(("python-pytest" ,python-pytest)))
14368 (home-page "https://github.com/sprymix/csscompressor")
14369 (synopsis "Python port of YUI CSS Compressor")
14371 "This package provides a python port of YUI CSS Compressor.")
14372 (license license:bsd-3)))
14374 (define-public python-rcssmin
14376 (name "python-rcssmin")
14381 (uri (pypi-uri "rcssmin" version))
14384 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14385 (build-system python-build-system)
14388 (modify-phases %standard-phases
14391 (invoke "python" "run_tests.py" "tests"))))))
14392 (home-page "http://opensource.perlig.de/rcssmin/")
14393 (synopsis "CSS Minifier")
14394 (description "The minifier is based on the semantics of the YUI compressor,
14395 which itself is based on the rule list by Isaac Schlueter.")
14396 (license license:asl2.0)))
14398 (define-public python-rjsmin
14400 (name "python-rjsmin")
14405 (uri (pypi-uri "rjsmin" version))
14408 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14409 (modules '((guix build utils)))
14412 (for-each delete-file (find-files "bench" "\\.js$"))
14414 (build-system python-build-system)
14416 '(#:tests? #f ; Not all test files included.
14418 (modify-phases %standard-phases
14420 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14421 (add-installed-pythonpath inputs outputs)
14423 (invoke "py.test" "-vv" "tests")
14426 `(("python-pytest" ,python-pytest)))
14427 (home-page "http://opensource.perlig.de/rjsmin/")
14428 (synopsis "Javascript Minifier")
14429 (description "@code{rJSmin} is a javascript minifier written in Python. The
14430 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14431 is a re-implementation aiming for speed, so it can be used at runtime (rather
14432 than during a preprocessing step).")
14433 (license license:asl2.0)))
14435 (define-public python-xopen
14437 (name "python-xopen")
14442 (uri (pypi-uri "xopen" version))
14445 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14446 (build-system python-build-system)
14448 `(("python-setuptools-scm" ,python-setuptools-scm)))
14449 (home-page "https://github.com/marcelm/xopen/")
14450 (synopsis "Open compressed files transparently")
14451 (description "This module provides an @code{xopen} function that works like
14452 Python's built-in @code{open} function, but can also deal with compressed files.
14453 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14454 recognized by their file extensions. The focus is on being as efficient as
14455 possible on all supported Python versions.")
14456 (license license:expat)))
14458 (define-public python2-xopen
14459 (let ((base (package-with-python2
14460 (strip-python2-variant python-xopen))))
14463 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14464 ,@(package-propagated-inputs base))))))
14466 (define-public python-cheetah
14468 (name "python-cheetah")
14473 (uri (pypi-uri "Cheetah3" version))
14476 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14477 (build-system python-build-system)
14479 `(#:modules ((guix build utils)
14480 (guix build python-build-system)
14484 #:phases (modify-phases %standard-phases
14485 (add-after 'unpack 'use-absolute-python
14487 (substitute* "Cheetah/CheetahWrapper.py"
14488 (("#!/usr/bin/env python")
14489 (string-append "#!" (which "python"))))
14491 (add-after 'unpack 'fix-tests
14493 (substitute* "Cheetah/Tests/ImportHooks.py"
14494 (("os.path.dirname\\(__file__\\)")
14495 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14499 (let ((cwd (getcwd)))
14500 (setenv "PYTHONPATH"
14503 (find (cut string-prefix? "lib" <>)
14504 (scandir (string-append cwd "/build")))
14505 ":" (getenv "PYTHONPATH")))
14507 (string-append (getenv "PATH")
14509 (setenv "TMPDIR" "/tmp")
14511 (substitute* "Cheetah/Tests/Test.py"
14512 (("unittest.TextTestRunner\\(\\)")
14513 "unittest.TextTestRunner(verbosity=2)"))
14515 (invoke "python" "Cheetah/Tests/Test.py")))))))
14517 `(("python-markdown" ,python-markdown))) ;optional
14518 (home-page "https://cheetahtemplate.org/")
14519 (synopsis "Template engine")
14520 (description "Cheetah is a text-based template engine and Python code
14523 Cheetah can be used as a standalone templating utility or referenced as
14524 a library from other Python applications. It has many potential uses,
14525 but web developers looking for a viable alternative to ASP, JSP, PHP and
14526 PSP are expected to be its principle user group.
14530 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14532 @item Cleanly separates content, graphic design, and program code.
14533 @item Blends the power and flexibility of Python with a simple template language
14534 that non-programmers can understand.
14535 @item Gives template writers full access to any Python data structure, module,
14536 function, object, or method in their templates.
14537 @item Makes code reuse easy by providing an object-orientated interface to
14538 templates that is accessible from Python code or other Cheetah templates.
14539 One template can subclass another and selectively reimplement sections of it.
14540 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14541 improve the performance of a dynamic website.
14542 @item Compiles templates into optimized, yet readable, Python code.
14544 (license (license:x11-style "file://LICENSE"))))
14546 (define-public python2-cheetah
14547 (package-with-python2 python-cheetah))
14549 (define-public python-dulwich
14551 (name "python-dulwich")
14552 (version "0.19.16")
14556 (uri (list (string-append "https://www.dulwich.io/releases/"
14557 "dulwich-" version ".tar.gz")
14558 (pypi-uri "dulwich" version)))
14561 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14562 (build-system python-build-system)
14565 (modify-phases %standard-phases
14566 (add-before 'check 'fix-tests
14567 (lambda* (#:key inputs #:allow-other-keys)
14568 ;; The tests use Popen with a custom environment which doesn't
14570 (substitute* "dulwich/tests/compat/utils.py"
14571 (("'git'") (string-append "'"
14574 (substitute* '("dulwich/tests/test_repository.py"
14575 "dulwich/tests/test_hooks.py")
14576 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14577 (setenv "TEST_RUNNER" "unittest")
14578 (setenv "PYTHONHASHSEED" "random")
14581 `(("python-fastimport" ,python-fastimport)
14582 ("python-urllib3" ,python-urllib3)))
14584 `(("python-mock" ,python-mock)
14585 ("python-geventhttpclient" ,python-geventhttpclient)
14587 (home-page "https://www.dulwich.io/")
14588 (synopsis "Git implementation in Python")
14589 (description "Dulwich is an implementation of the Git file formats and
14590 protocols written in pure Python.")
14591 ;; Can be used with either license.
14592 (license (list license:asl2.0 license:gpl2+))))
14594 (define-public python2-dulwich
14595 (package-with-python2 python-dulwich))
14597 (define-public python-pbkdf2
14599 (name "python-pbkdf2")
14604 (uri (pypi-uri "pbkdf2" version))
14607 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14608 (build-system python-build-system)
14611 (modify-phases %standard-phases
14614 (setenv "PYTHONPATH"
14615 (string-append (getcwd) "/build/lib:"
14616 (getenv "PYTHONPATH")))
14617 (invoke "python" "test/test_pbkdf2.py"))))))
14619 `(("python-pycrypto" ,python-pycrypto))) ; optional
14620 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14621 (synopsis "Password-based key derivation")
14622 (description "This module implements the password-based key derivation
14623 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14625 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14626 is part of the RSA Public Key Cryptography Standards series. The provided
14627 implementation takes a password or a passphrase and a salt value (and
14628 optionally a iteration count, a digest module, and a MAC module) and provides
14629 a file-like object from which an arbitrarily-sized key can be read.")
14630 (license license:expat)))
14632 (define-public python2-pbkdf2
14633 (package-with-python2 python-pbkdf2))
14635 (define-public python-qrcode
14637 (name "python-qrcode")
14642 (uri (pypi-uri "qrcode" version))
14644 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14645 (build-system python-build-system)
14647 ;; FIXME: Tests require packaging 'pymaging'.
14650 `(("python-lxml" ,python-lxml) ; for SVG output
14651 ("python-pillow" ,python-pillow) ; for PNG output
14652 ("python-six" ,python-six)))
14653 (home-page "https://github.com/lincolnloop/python-qrcode")
14654 (synopsis "QR Code image generator")
14655 (description "This package provides a pure Python QR Code generator
14656 module. It uses the Python Imaging Library (PIL) to allow for the generation
14659 In addition this package provides a command line tool to generate QR codes and
14660 either write these QR codes to a file or do the output as ascii art at the
14662 (license license:bsd-3)))
14664 (define-public python2-qrcode
14665 (package-with-python2 python-qrcode))
14667 (define-public python-rst2ansi
14669 (name "python-rst2ansi")
14674 (uri (pypi-uri "rst2ansi" version))
14677 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14678 (build-system python-build-system)
14680 `(("python-docutils" ,python-docutils)))
14681 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14682 (synopsis "Convert RST to ANSI-decorated console output")
14684 "Python module dedicated to rendering RST (reStructuredText) documents
14685 to ansi-escaped strings suitable for display in a terminal.")
14686 (license license:expat)))
14688 (define-public python-ansi2html
14690 (name "python-ansi2html")
14695 (uri (pypi-uri "ansi2html" version))
14698 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14699 (build-system python-build-system)
14701 `(("python-mock" ,python-mock)
14702 ("python-nose" ,python-nose)))
14704 `(("python-six" ,python-six)))
14705 (home-page "https://github.com/ralphbean/ansi2html")
14706 (synopsis "Convert ANSI-decorated console output to HTML")
14708 "@command{ansi2html} is a Python library and command line utility for
14709 converting text with ANSI color codes to HTML or LaTeX.")
14710 (license license:gpl3+)))
14712 (define-public python2-ansi2html
14713 (package-with-python2 python-ansi2html))
14715 (define-public python-ddt
14717 (name "python-ddt")
14722 (uri (pypi-uri "ddt" version))
14725 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
14726 (build-system python-build-system)
14728 `(("python-mock" ,python-mock)
14729 ("python-nose" ,python-nose)))
14731 `(("python-six" ,python-six)
14732 ("python-pyyaml" ,python-pyyaml)))
14733 (home-page "https://github.com/txels/ddt")
14734 (synopsis "Data-Driven Tests")
14736 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14737 running it with different test data, and make it appear as multiple test
14739 (license license:expat)))
14741 (define-public python2-ddt
14742 (package-with-python2 python-ddt))
14744 (define-public python-pycountry
14746 (name "python-pycountry")
14747 (version "18.5.26")
14751 (uri (pypi-uri "pycountry" version))
14754 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14755 (build-system python-build-system)
14756 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14757 (synopsis "ISO databases for languages, countries, currencies, etc.")
14759 "@code{pycountry} provides the ISO databases for the standards:
14761 @item 639-3 (Languages)
14762 @item 3166 (Countries)
14763 @item 3166-3 (Deleted Countries)
14764 @item 3166-2 (Subdivisions of countries)
14765 @item 4217 (Currencies)
14766 @item 15924 (Scripts)
14768 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14769 through a Python API.")
14770 (license license:lgpl2.1+)))
14772 (define-public python2-pycountry
14773 (package-with-python2 python-pycountry))
14775 (define-public python-pycosat
14777 (name "python-pycosat")
14782 (uri (pypi-uri "pycosat" version ".zip"))
14785 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14786 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14787 (build-system python-build-system)
14789 `(("unzip" ,unzip)))
14790 (home-page "https://github.com/ContinuumIO/pycosat")
14791 (synopsis "Bindings to picosat (a SAT solver)")
14793 "This package provides efficient Python bindings to @code{picosat} on
14794 the C level. When importing pycosat, the @code{picosat} solver becomes part
14795 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14796 Problem} (SAT) solver.")
14797 (license license:expat)))
14799 (define-public python2-pycosat
14800 (package-with-python2 python-pycosat))
14802 (define-public python2-ruamel.ordereddict
14804 (name "python2-ruamel.ordereddict")
14809 (uri (pypi-uri "ruamel.ordereddict" version))
14812 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14813 (build-system python-build-system)
14815 `(#:python ,python-2
14817 (modify-phases %standard-phases
14819 (add-after 'install 'check
14820 (lambda* (#:key inputs outputs #:allow-other-keys)
14821 (add-installed-pythonpath inputs outputs)
14822 (invoke "python" "test/testordereddict.py"))))))
14823 (home-page "https://bitbucket.org/ruamel/ordereddict")
14824 (synopsis "Version of dict that keeps keys in insertion order")
14826 "This is an implementation of an ordered dictionary with @dfn{Key
14827 Insertion Order} (KIO: updates of values do not affect the position of the
14828 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14829 removed and put at the back). The standard library module @code{OrderedDict},
14830 implemented later, implements a subset of @code{ordereddict} functionality.
14831 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14832 Order} (KSO, no sorting function can be specified, but a transform can be
14833 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14834 (license license:expat)))
14836 (define-public python-pypeg2
14838 (name "python-pypeg2")
14843 (uri (pypi-uri "pyPEG2" version))
14846 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14847 (build-system python-build-system)
14848 (propagated-inputs `(("python-lxml" ,python-lxml)))
14850 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14852 (home-page "https://fdik.org/pyPEG/")
14853 (synopsis "Parsering Expression Grammars in Python")
14854 (description "PyPEG is an intrinsic parser interpreter framework for
14855 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14856 parse many formal languages.")
14857 (license license:gpl2)))
14859 (define-public python-incremental
14861 (name "python-incremental")
14866 (uri (pypi-uri "incremental" version))
14869 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14870 (build-system python-build-system)
14871 (home-page "https://github.com/hawkowl/incremental")
14872 (synopsis "Library for versioning Python projects")
14873 (description "Incremental is a small library that versions your Python
14875 (license license:expat)))
14877 (define-public python2-incremental
14878 (package-with-python2 python-incremental))
14880 (define-public python-invoke
14882 (name "python-invoke")
14883 (home-page "https://www.pyinvoke.org/")
14887 (uri (pypi-uri "invoke" version))
14890 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
14891 (build-system python-build-system)
14893 ;; XXX: Requires many dependencies that are not yet in Guix.
14895 (synopsis "Pythonic task execution")
14897 "Invoke is a Python task execution tool and library, drawing inspiration
14898 from various sources to arrive at a powerful and clean feature set. It is
14899 evolved from the Fabric project, but focuses on local and abstract concerns
14900 instead of servers and network commands.")
14901 (license license:bsd-3)))
14903 (define-public python2-invoke
14904 (package-with-python2 python-invoke))
14906 (define-public python-automat
14908 (name "python-automat")
14912 (uri (pypi-uri "Automat" version))
14915 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
14916 (build-system python-build-system)
14917 ;; We disable the tests because they require python-twisted, while
14918 ;; python-twisted depends on python-automat. Twisted is optional, but the
14919 ;; tests fail if it is not available. Also see
14920 ;; <https://github.com/glyph/automat/issues/71>.
14921 (arguments '(#:tests? #f))
14923 `(("python-m2r" ,python-m2r)
14924 ("python-setuptools-scm" ,python-setuptools-scm)
14925 ("python-graphviz" ,python-graphviz)))
14927 `(("python-six" ,python-six)
14928 ("python-attrs" ,python-attrs)))
14929 (home-page "https://github.com/glyph/Automat")
14930 (synopsis "Self-service finite-state machines")
14931 (description "Automat is a library for concise, idiomatic Python
14932 expression of finite-state automata (particularly deterministic finite-state
14934 (license license:expat)))
14936 (define-public python2-automat
14937 (package-with-python2 python-automat))
14939 (define-public python-m2r
14941 (name "python-m2r")
14945 (uri (pypi-uri "m2r" version))
14948 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
14949 (build-system python-build-system)
14951 `(("python-docutils" ,python-docutils)
14952 ("python-mistune" ,python-mistune)))
14954 `(("python-pygments" ,python-pygments)
14955 ("python-mock" ,python-mock)))
14956 (home-page "https://github.com/miyakogi/m2r")
14957 (synopsis "Markdown to reStructuredText converter")
14958 (description "M2R converts a markdown file including reST markups to valid
14960 (license license:expat)))
14962 (define-public python2-m2r
14963 (package-with-python2 python-m2r))
14965 (define-public python-constantly
14967 (name "python-constantly")
14971 (uri (pypi-uri "constantly" version))
14974 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
14975 (build-system python-build-system)
14976 (home-page "https://github.com/twisted/constantly")
14977 (synopsis "Symbolic constants in Python")
14978 (description "Constantly is a Python library that provides symbolic
14979 constant support. It includes collections and constants with text, numeric,
14980 and bit flag values.")
14981 (license license:expat)))
14983 (define-public python2-constantly
14984 (package-with-python2 python-constantly))
14986 (define-public python-attrs
14988 (name "python-attrs")
14992 (uri (pypi-uri "attrs" version))
14995 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
14996 (build-system python-build-system)
14998 `(#:modules ((guix build utils)
14999 (guix build python-build-system)
15003 #:phases (modify-phases %standard-phases
15006 (let ((cwd (getcwd)))
15007 (setenv "PYTHONPATH"
15010 (find (cut string-prefix? "lib" <>)
15011 (scandir (string-append cwd "/build")))
15013 (getenv "PYTHONPATH")))
15014 (invoke "python" "-m" "pytest")))))))
15016 `(("python-coverage" ,python-coverage)
15017 ("python-hypothesis" ,python-hypothesis)
15018 ("python-pympler" ,python-pympler)
15019 ("python-pytest" ,python-pytest)
15020 ("python-six" ,python-six)
15021 ("python-sphinx" ,python-sphinx)
15022 ("python-zope-interface" ,python-zope-interface)))
15023 (home-page "https://github.com/python-attrs/attrs/")
15024 (synopsis "Attributes without boilerplate")
15025 (description "@code{attrs} is a Python package with class decorators that
15026 ease the chores of implementing the most common attribute-related object
15028 (license license:expat)))
15030 (define-public python2-attrs
15031 (package-with-python2 python-attrs))
15033 (define-public python-attrs-bootstrap
15035 (inherit python-attrs)
15036 (name "python-attrs-bootstrap")
15037 (native-inputs `())
15038 (arguments `(#:tests? #f))))
15040 (define-public python2-attrs-bootstrap
15041 (package-with-python2 python-attrs-bootstrap))
15043 (define-public python2-cliapp
15045 (name "python2-cliapp")
15046 (version "1.20180812.1")
15050 (uri (string-append
15051 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15052 version ".tar.gz"))
15055 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15056 (build-system python-build-system)
15058 `(#:python ,python-2
15060 (modify-phases %standard-phases
15061 ;; check phase needs to be run before the build phase. If not,
15062 ;; coverage-test-runner looks for tests for the built source files,
15065 (add-before 'build 'check
15067 ;; Disable python3 tests
15068 (substitute* "check"
15069 (("python3") "# python3"))
15070 (invoke "./check"))))))
15072 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15073 ("python2-pep8" ,python2-pep8)))
15075 `(("python2-pyaml" ,python2-pyaml)))
15076 (home-page "https://liw.fi/cliapp/")
15077 (synopsis "Python framework for command line programs")
15078 (description "@code{python2-cliapp} is a python framework for
15079 command line programs. It contains the typical stuff such programs
15080 need to do, such as parsing the command line for options, and
15081 iterating over input files.")
15082 (license license:gpl2+)))
15084 (define-public python2-ttystatus
15086 (name "python2-ttystatus")
15091 (uri (git-reference
15092 (url "http://git.liw.fi/ttystatus")
15093 ;; There are no tags after ttystatus-0.36.
15094 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15096 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15097 (file-name (git-file-name name version))))
15098 (build-system python-build-system)
15100 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15101 ("python2-pep8" ,python2-pep8)))
15103 `(#:python ,python-2
15105 (modify-phases %standard-phases
15106 ;; check phase needs to be run before the build phase. If not,
15107 ;; coverage-test-runner looks for tests for the built source files,
15110 (add-before 'build 'check
15111 (lambda _ (invoke "make" "check"))))))
15112 (home-page "https://liw.fi/ttystatus/")
15113 (synopsis "Python library for showing progress reporting and
15114 status updates on terminals")
15115 (description "@code{python2-ttystatus} is a python library for
15116 showing progress reporting and status updates on terminals, for
15117 command line programs. Output is automatically adapted to the width
15118 of the terminal: truncated if it does not fit, and resized if the
15119 terminal size changes.")
15120 (license license:gpl3+)))
15122 (define-public python2-tracing
15124 (name "python2-tracing")
15129 (uri (string-append
15130 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15131 version ".tar.gz"))
15134 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15135 (build-system python-build-system)
15137 `(#:python ,python-2))
15138 (home-page "https://liw.fi/tracing/")
15139 (synopsis "Python debug logging helper")
15140 (description "@code{python2-tracing} is a python library for
15141 logging debug messages. It provides a way to turn debugging messages
15142 on and off, based on the filename they occur in. It is much faster
15143 than using @code{logging.Filter} to accomplish the same thing, which
15144 matters when code is run in production mode. The actual logging still
15145 happens using the @code{logging} library.")
15146 (license license:gpl3+)))
15148 (define-public python2-larch
15150 (name "python2-larch")
15151 (version "1.20151025")
15155 (uri (string-append
15156 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15157 version ".tar.gz"))
15158 (patches (search-patches
15159 "python2-larch-coverage-4.0a6-compatibility.patch"))
15162 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15163 (build-system python-build-system)
15165 `(#:python ,python-2
15167 (modify-phases %standard-phases
15168 ;; check phase needs to be run before the build phase. If not,
15169 ;; coverage-test-runner looks for tests for the built source files,
15172 (add-before 'build 'check
15173 (lambda _ (invoke "make" "check"))))))
15175 `(("cmdtest" ,cmdtest)
15176 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15178 `(("python2-tracing" ,python2-tracing)))
15179 (home-page "https://liw.fi/larch/")
15180 (synopsis "Python copy-on-write B-tree library")
15181 (description "@code{python2-larch} is an implementation of
15182 particular kind of B-tree, based on research by Ohad Rodeh. See
15183 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15184 on the data structure.
15186 The distinctive feature of this B-tree is that a node is never
15187 (conceptually) modified. Instead, all updates are done by
15188 copy-on-write. This makes it easy to clone a tree, and modify only the
15189 clone, while other processes access the original tree.")
15190 (license license:gpl3+)))
15192 (define-public python-astroid
15194 (name "python-astroid")
15199 (uri (pypi-uri "astroid" version))
15201 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15202 (modules '((guix build utils)))
15205 ;; Check to see if the version pinning has been removed.
15206 (substitute* "astroid/__pkginfo__.py"
15207 (("==1\\.4\\.\\*") ">=1.4.0"))
15209 (build-system python-build-system)
15211 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15212 ("python-six" ,python-six)
15213 ("python-wrapt" ,python-wrapt)))
15215 `(("python-dateutil" ,python-dateutil)
15216 ("python-pytest" ,python-pytest)
15217 ("python-pytest-runner" ,python-pytest-runner)))
15218 (home-page "https://github.com/PyCQA/astroid")
15219 (synopsis "Common base representation of python source code for pylint and
15221 (description "@code{python-astroid} provides a common base representation
15222 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15224 It provides a compatible representation which comes from the _ast module. It
15225 rebuilds the tree generated by the builtin _ast module by recursively walking
15226 down the AST and building an extended ast. The new node classes have
15227 additional methods and attributes for different usages. They include some
15228 support for static inference and local name scopes. Furthermore, astroid
15229 builds partial trees by inspecting living objects.")
15230 (license license:lgpl2.1+)
15231 (properties `((python2-variant . ,(delay python2-astroid))))))
15233 (define-public python2-astroid
15234 (let ((base (package-with-python2
15235 (strip-python2-variant python-astroid))))
15236 (package (inherit base)
15237 ;; Version 2.x removes python2 support.
15242 (uri (pypi-uri "astroid" version))
15245 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15247 (substitute-keyword-arguments (package-arguments base)
15249 `(modify-phases ,phases
15250 (add-after 'unpack 'remove-spurious-test
15252 ;; https://github.com/PyCQA/astroid/issues/276
15253 (delete-file "astroid/tests/unittest_brain.py")
15257 (invoke"python" "-m" "unittest" "discover"
15258 "-p" "unittest*.py")))))))
15259 (native-inputs `())
15261 `(("python2-backports-functools-lru-cache"
15262 ,python2-backports-functools-lru-cache)
15263 ("python2-enum34" ,python2-enum34)
15264 ("python2-singledispatch" ,python2-singledispatch)
15265 ,@(alist-delete "python-typed-ast"
15266 (package-propagated-inputs base)))))))
15268 (define-public python-isbnlib
15270 (name "python-isbnlib")
15275 (uri (pypi-uri "isbnlib" version))
15278 "07qhykv0x60d5rsx5pj6s4q15ri4znczscll3xmpf6gyclac1592"))))
15279 (build-system python-build-system)
15280 (arguments '(#:tests? #f)) ; No test
15281 (home-page "https://github.com/xlcnd/isbnlib")
15282 (synopsis "Python library to work with ISBN strings")
15283 (description "@code{python-isbnlib} is a (pure) python library that provides
15284 several useful methods and functions to validate, clean, transform, hyphenate and
15285 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15286 version, is suitable to be include as a dependency in other projects.")
15287 (license license:lgpl3+)))
15289 (define-public python-isort
15291 (name "python-isort")
15296 (uri (git-reference
15297 ;; Tests pass only from the Github sources
15298 (url "https://github.com/timothycrosley/isort")
15300 (file-name (git-file-name name version))
15303 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15304 (build-system python-build-system)
15306 `(("python-mock" ,python-mock)
15307 ("python-pytest" ,python-pytest)))
15308 (home-page "https://github.com/timothycrosley/isort")
15309 (synopsis "Python utility/library to sort python imports")
15310 (description "@code{python-isort} is a python utility/library to sort
15311 imports alphabetically, and automatically separated into sections. It
15312 provides a command line utility, a python library and plugins for various
15314 (license license:expat)
15315 (properties `((python2-variant . ,(delay python2-isort))))))
15317 (define-public python2-isort
15318 (let ((base (package-with-python2
15319 (strip-python2-variant python-isort))))
15320 (package (inherit base)
15322 `(("python2-futures" ,python2-futures)
15323 ,@(package-native-inputs base))))))
15325 (define-public python2-backports-functools-lru-cache
15327 (name "python2-backports-functools-lru-cache")
15332 ;; only the pypi tarballs contain the necessary metadata
15333 (uri (pypi-uri "backports.functools_lru_cache" version))
15336 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15337 (build-system python-build-system)
15339 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15341 `(#:python ,python-2))
15342 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15343 (synopsis "Backport of functools.lru_cache from Python 3.3")
15344 (description "@code{python2-backports-functools-lru-cache} is a backport
15345 of @code{functools.lru_cache} from python 3.3.")
15346 (license license:expat)))
15348 (define-public python-configparser
15350 (name "python-configparser")
15355 (uri (pypi-uri "configparser" version))
15358 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15360 `(("python-setuptools_scm" ,python-setuptools-scm)))
15361 (build-system python-build-system)
15362 (home-page "https://github.com/jaraco/configparser/")
15363 (synopsis "Backport of configparser from python 3.5")
15364 (description "@code{python-configparser} is a backport of
15365 @code{configparser} from Python 3.5 so that it can be used directly
15366 in other versions.")
15367 (license license:expat)))
15369 (define-public python2-configparser
15370 (package-with-python2 python-configparser))
15372 (define-public python-mamba
15374 (name "python-mamba")
15378 (uri (pypi-uri "mamba" version))
15381 "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr"))))
15382 (build-system python-build-system)
15383 (arguments `(#:tests? #f)) ; No test
15385 `(("python-clint" ,python-clint)
15386 ("python-coverage" ,python-coverage)))
15387 (home-page "https://nestorsalceda.com/mamba/")
15388 (synopsis "Test runner for Python")
15390 "Mamba is a Behaviour-Driven Development tool for Python developers.
15391 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15392 (license license:expat)))
15394 (define-public python-mando
15396 (name "python-mando")
15400 (uri (pypi-uri "mando" version))
15403 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15404 (build-system python-build-system)
15406 `(("python-rst2ansi" ,python-rst2ansi)
15407 ("python-six" ,python-six)))
15409 `(("python-pytest" ,python-pytest)))
15410 (home-page "https://mando.readthedocs.org/")
15412 "Wrapper around argparse, allowing creation of complete CLI applications")
15414 "This package is a wrapper around argparse, allowing you to write complete CLI
15415 applications in seconds while maintaining all the flexibility.")
15416 (license license:expat)))
15418 (define-public python2-mando
15419 (package-with-python2 python-mando))
15421 (define-public python2-argparse
15423 (name "python2-argparse")
15428 (uri (pypi-uri "argparse" version))
15431 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15432 (build-system python-build-system)
15434 `(#:python ,python-2))
15435 (home-page "https://github.com/ThomasWaldmann/argparse/")
15436 (synopsis "Python command-line parsing library")
15438 "This package is mostly for people who want to have @code{argparse} on
15439 older Pythons because it was not part of the standard library back then.")
15440 (license license:psfl)))
15442 (define-public python-fudge
15444 (name "python-fudge")
15445 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15446 ;; package, which is currently the only use of this package.
15451 (uri (pypi-uri "fudge" version))
15454 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15455 (build-system python-build-system)
15457 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15458 (home-page "https://github.com/fudge-py/fudge")
15459 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15461 "Fudge is a Python module for using fake objects (mocks and stubs) to
15464 In readable Python code, you declare the methods available on your fake object
15465 and how they should be called. Then you inject that into your application and
15466 start testing. This declarative approach means you don’t have to record and
15467 playback actions and you don’t have to inspect your fakes after running code.
15468 If the fake object was used incorrectly then you’ll see an informative
15469 exception message with a traceback that points to the culprit.")
15470 (license license:expat)))
15472 (define-public python2-fudge
15473 (package-with-python2 python-fudge))
15475 (define-public python-mwclient
15477 (name "python-mwclient")
15482 ;; The PyPI version wouldn't contain tests.
15483 (uri (git-reference
15484 (url "https://github.com/mwclient/mwclient")
15485 (commit (string-append "v" version))))
15486 (file-name (git-file-name name version))
15488 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15489 (build-system python-build-system)
15491 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15492 ("python-six" ,python-six)))
15494 `(("python-mock" ,python-mock)
15495 ("python-pytest" ,python-pytest)
15496 ("python-pytest-cov" ,python-pytest-cov)
15497 ("python-pytest-runner" ,python-pytest-runner)
15498 ("python-responses" ,python-responses)))
15499 (home-page "https://github.com/btongminh/mwclient")
15500 (synopsis "MediaWiki API client")
15501 (description "This package provides a MediaWiki API client.")
15502 (license license:expat)))
15504 (define-public python2-mwclient
15505 (package-with-python2 python-mwclient))
15507 (define-public python-utils
15509 (name "python-utils")
15513 (uri (pypi-uri "python-utils" version))
15516 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15517 (build-system python-build-system)
15520 (modify-phases %standard-phases
15522 (lambda* (#:key inputs outputs #:allow-other-keys)
15523 (add-installed-pythonpath inputs outputs)
15524 (delete-file "pytest.ini")
15525 (invoke "pytest" "-vv"))))))
15527 `(("pytest-runner" ,python-pytest-runner)
15528 ("pytest" ,python-pytest)
15529 ("six" ,python-six)))
15530 (home-page "https://github.com/WoLpH/python-utils")
15531 (synopsis "Convenient utilities not included with the standard Python install")
15533 "Python Utils is a collection of small Python functions and classes which
15534 make common patterns shorter and easier.")
15535 (license license:bsd-2)))
15537 (define-public python2-utils
15538 (package-with-python2 python-utils))
15540 (define-public python-diff-match-patch
15542 (name "python-diff-match-patch")
15543 (version "20121119")
15547 (uri (pypi-uri "diff-match-patch" version))
15550 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15551 (build-system python-build-system)
15552 (home-page "https://code.google.com/p/google-diff-match-patch")
15553 (synopsis "Synchronize plain text")
15554 (description "Diff Match and Patch libraries offer robust algorithms to
15555 perform the operations required for synchronizing plain text.")
15556 (license license:asl2.0)))
15558 (define-public python2-diff-match-patch
15559 (package-with-python2 python-diff-match-patch))
15561 (define-public python-dirsync
15563 (name "python-dirsync")
15568 (uri (pypi-uri "dirsync" version))
15571 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15572 (build-system python-build-system)
15574 `(("six" ,python-six)))
15575 (home-page "https://github.com/tkhyn/dirsync")
15576 (synopsis "Advanced directory tree synchronisation tool")
15577 (description "Advanced directory tree synchronisation tool.")
15578 (license license:expat)))
15580 (define-public python2-dirsync
15581 (package-with-python2 python-dirsync))
15583 (define-public python-levenshtein
15585 (name "python-levenshtein")
15590 (uri (pypi-uri "python-Levenshtein" version))
15593 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15594 (build-system python-build-system)
15595 (home-page "https://github.com/ztane/python-Levenshtein")
15596 (synopsis "Fast computation of Levenshtein distance and string similarity")
15598 "The Levenshtein Python C extension module contains functions for fast computation of
15600 @item Levenshtein (edit) distance, and edit operations
15601 @item string similarity
15602 @item approximate median strings, and generally string averaging
15603 @item string sequence and set similarity
15605 It supports both normal and Unicode strings.")
15606 (license license:gpl2+)))
15608 (define-public python2-levenshtein
15609 (package-with-python2 python-levenshtein))
15611 (define-public python-scandir
15613 (name "python-scandir")
15618 (uri (pypi-uri "scandir" version))
15620 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15621 (build-system python-build-system)
15623 `(#:phases (modify-phases %standard-phases
15626 (invoke "python" "test/run_tests.py"))))))
15627 (home-page "https://github.com/benhoyt/scandir")
15628 (synopsis "Directory iteration function")
15630 "Directory iteration function like os.listdir(), except that instead of
15631 returning a list of bare filenames, it yields DirEntry objects that include
15632 file type and stat information along with the name. Using scandir() increases
15633 the speed of os.walk() by 2-20 times (depending on the platform and file
15634 system) by avoiding unnecessary calls to os.stat() in most cases.
15636 This package is part of the Python standard library since version 3.5.")
15637 (license license:bsd-3)))
15639 (define-public python2-scandir
15640 (package-with-python2 python-scandir))
15642 (define-public python2-stemming
15644 (name "python2-stemming")
15649 (uri (pypi-uri "stemming" version))
15651 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15652 (build-system python-build-system)
15654 `(#:python ,python-2))
15655 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15656 (synopsis "Python implementations of various stemming algorithms")
15658 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15659 stemming algorithms for English. These implementations are straightforward and
15660 efficient, unlike some Python versions of the same algorithms available on the
15661 Web. This package is an extraction of the stemming code included in the Whoosh
15663 (license license:public-domain)))
15665 (define-public python-factory-boy
15667 (name "python-factory-boy")
15672 (uri (pypi-uri "factory_boy" version))
15674 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15675 (build-system python-build-system)
15677 ;; Tests are not included in the tarball.
15680 `(("faker" ,python-faker)))
15681 (home-page "https://github.com/benhoyt/scandir")
15682 (synopsis "Versatile test fixtures replacement")
15684 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15686 As a fixtures replacement tool, it aims to replace static, hard to maintain
15687 fixtures with easy-to-use factories for complex object.
15689 Instead of building an exhaustive test setup with every possible combination
15690 of corner cases, factory_boy allows you to use objects customized for the
15691 current test, while only declaring the test-specific fields")
15692 (license license:expat)))
15694 (define-public python2-factory-boy
15695 (package-with-python2 python-factory-boy))
15697 (define-public python-translate-toolkit
15699 (name "python-translate-toolkit")
15704 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15706 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15707 (build-system python-build-system)
15709 `(("python-pytest" ,python-pytest)
15710 ("python-sphinx" ,python-sphinx)))
15712 `(("python-babel" ,python-babel)
15713 ("python-beautifulsoup4" ,python-beautifulsoup4)
15714 ("python-chardet" ,python-chardet)
15715 ("python-diff-match-patch" ,python-diff-match-patch)
15716 ("python-levenshtein" ,python-levenshtein)
15717 ("python-lxml" ,python-lxml)
15718 ("python-six" ,python-six)
15719 ("python-vobject" ,python-vobject)
15720 ("python-pyyaml" ,python-pyyaml)))
15722 ;; TODO: tests are not run, because they end with
15723 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15725 ;; during test setup.
15727 (home-page "https://toolkit.translatehouse.org")
15728 (synopsis "Tools and API for translation and localization engineering")
15730 "Tools and API for translation and localization engineering. It contains
15731 several utilities, as well as an API for building localization tools.")
15732 (license license:gpl2+)))
15734 (define-public python2-translate-toolkit
15735 (package-with-python2 python-translate-toolkit))
15737 (define-public python-packaging
15739 (name "python-packaging")
15744 (uri (pypi-uri "packaging" version))
15745 ;; XXX: The URL in the patch file is wrong, it should be
15746 ;; <https://github.com/pypa/packaging/pull/256>.
15747 (patches (search-patches "python-packaging-test-arch.patch"))
15750 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15751 (build-system python-build-system)
15753 `(#:phases (modify-phases %standard-phases
15755 (lambda* (#:key tests? #:allow-other-keys)
15757 (invoke "py.test" "-vv")
15758 (format #t "test suite not run~%"))
15761 `(("python-pretend" ,python-pretend)
15762 ("python-pytest" ,python-pytest)))
15764 `(("python-pyparsing" ,python-pyparsing)
15765 ("python-six" ,python-six)))
15766 (home-page "https://github.com/pypa/packaging")
15767 (synopsis "Core utilities for Python packages")
15768 (description "Packaging is a Python module for dealing with Python packages.
15769 It offers an interface for working with package versions, names, and dependency
15771 ;; From 'LICENSE': This software is made available under the terms of
15772 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15773 ;; Contributions to this software is made under the terms of *both* these
15775 (license (list license:asl2.0 license:bsd-2))))
15777 (define-public python2-packaging
15778 (package-with-python2 python-packaging))
15780 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15781 (define-public python-packaging-bootstrap
15785 (name "python-packaging-bootstrap")
15786 (native-inputs '())
15788 `(("python-pyparsing" ,python-pyparsing)))
15789 (arguments '(#:tests? #f)))))
15791 (define-public python2-packaging-bootstrap
15795 (name "python2-packaging-bootstrap")
15796 (native-inputs '())
15798 `(("python-pyparsing" ,python2-pyparsing)))
15801 ,@(package-arguments python2-packaging))))))
15803 (define-public python-relatorio
15805 (name "python-relatorio")
15810 (uri (pypi-uri "relatorio" version))
15813 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15814 (build-system python-build-system)
15816 `(("python-lxml" ,python-lxml)
15817 ("python-genshi" ,python-genshi)))
15819 `(("python-magic" ,python-magic)))
15820 (home-page "https://relatorio.tryton.org/")
15821 (synopsis "Templating library able to output ODT and PDF files")
15822 (description "Relatorio is a templating library which provides a way to
15823 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15824 for more filetypes can be easily added by creating plugins for them.")
15825 (license license:gpl3+)))
15827 (define-public python2-relatorio
15828 (package-with-python2 python-relatorio))
15830 (define-public python-radon
15832 (name "python-radon")
15837 (uri (pypi-uri "radon" version))
15840 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15841 (build-system python-build-system)
15843 `(#:phases (modify-phases %standard-phases
15846 (invoke "python" "radon/tests/run.py"))))))
15848 `(("python-colorama" ,python-colorama)
15849 ("python-flake8-polyfill" ,python-flake8-polyfill)
15850 ("python-mando" ,python-mando)))
15852 `(("python-pytest" ,python-pytest)
15853 ("python-pytest-mock" ,python-pytest-mock)))
15854 (home-page "https://radon.readthedocs.org/")
15855 (synopsis "Code Metrics in Python")
15856 (description "Radon is a Python tool which computes various code metrics.
15857 Supported metrics are:
15859 @item raw metrics: SLOC, comment lines, blank lines, &c.
15860 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15861 @item Halstead metrics (all of them)
15862 @item the Maintainability Index (a Visual Studio metric)
15864 (properties `((python2-variant . ,(delay python2-radon))))
15865 (license license:expat)))
15867 (define-public python2-radon
15868 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
15872 `(("python-configparser" ,python2-configparser)
15873 ("python-future" ,python2-future)
15874 ,@(package-propagated-inputs base))))))
15876 (define-public python-sure
15878 (name "python-sure")
15883 (uri (pypi-uri "sure" version))
15886 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
15887 (build-system python-build-system)
15889 `(("python-mock" ,python-mock)
15890 ("python-six" ,python-six)))
15892 `(("python-nose" ,python-nose)))
15893 (home-page "https://github.com/gabrielfalcao/sure")
15894 (synopsis "Automated testing library in python for python")
15896 "Sure is a python library that leverages a DSL for writing assertions.
15897 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15898 (license license:gpl3+)))
15900 (define-public python2-sure
15901 (package-with-python2 python-sure))
15903 (define-public python2-couleur
15904 ;; This package does not seem to support python3 at all, hence,
15905 ;; only the python2 variant definition is provided.
15907 (name "python2-couleur")
15912 (uri (pypi-uri "couleur" version))
15915 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15916 (build-system python-build-system)
15918 `(#:python ,python-2))
15919 (home-page "https://github.com/gabrielfalcao/couleur")
15921 "ANSI terminal tool for python, colored shell and other handy fancy features")
15923 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15924 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15925 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15926 ;; https://github.com/gabrielfalcao/couleur/issues/11
15927 (license license:lgpl3+)))
15929 (define-public python-misaka
15931 (name "python-misaka")
15936 (uri (pypi-uri "misaka" version))
15939 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
15940 (build-system python-build-system)
15942 `(;; Line 37 of setup.py calls self.run_command('develop')
15943 ;; in the 'check' phase. This command seems to be trying
15945 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15946 ;; for which it does not have the permission to write.
15949 `(("python-cffi" ,python-cffi)))
15950 (home-page "https://github.com/FSX/misaka")
15951 (synopsis "Python binding for Hoedown")
15953 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15954 library written in C. It features a fast HTML renderer and functionality to make custom
15955 renderers (e.g. man pages or LaTeX).")
15956 (license license:expat)))
15958 (define-public python2-misaka
15959 (package-with-python2 python-misaka))
15961 (define-public python2-steadymark
15962 ;; This is forced into being a python2 only variant
15963 ;; due to its dependence on couleur that has no support
15966 (name "python2-steadymark")
15971 (uri (pypi-uri "steadymark" version))
15974 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15975 (build-system python-build-system)
15977 `(("python-couleur" ,python2-couleur)
15978 ("python-sure" ,python2-sure)
15979 ("python-misaka" ,python2-misaka)))
15981 `(#:python ,python-2
15983 (modify-phases %standard-phases
15984 (add-before 'build 'patch-setup-py
15986 ;; Update requirements from dependency==version
15987 ;; to dependency>=version
15988 (substitute* "setup.py"
15991 (home-page "https://github.com/gabrielfalcao/steadymark")
15992 (synopsis "Markdown-based test runner for python")
15994 "@code{Steadymark} allows documentation to be written in github-flavoured
15995 markdown. The documentation may contain snippets of code surrounded by python
15996 code blocks and @code{Steadymark} will find these snippets and run them, making
15997 sure that there are no old malfunctional examples in the documentation examples.")
15998 (license license:expat)))
16000 (define-public python-jsonpointer
16002 (name "python-jsonpointer")
16007 (uri (pypi-uri "jsonpointer" version))
16010 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16011 (build-system python-build-system)
16012 (home-page "https://github.com/stefankoegl/python-json-pointer")
16013 (synopsis "Identify specific nodes in a JSON document")
16014 (description "@code{jsonpointer} allows you to access specific nodes
16015 by path in a JSON document (see RFC 6901).")
16016 (license license:bsd-3)))
16018 (define-public python2-jsonpointer
16019 (package-with-python2 python-jsonpointer))
16021 (define-public python-jsonpatch
16023 (name "python-jsonpatch")
16028 ;; pypi version lacks tests.js
16029 (uri (git-reference
16030 (url "https://github.com/stefankoegl/python-json-patch")
16031 (commit (string-append "v" version))))
16032 (file-name (git-file-name name version))
16035 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16036 (build-system python-build-system)
16038 `(("python-jsonpointer" ,python-jsonpointer)))
16039 (home-page "https://github.com/stefankoegl/python-json-patch")
16040 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16041 (description "@code{jsonpatch} is a library and program that allows
16042 applying JSON Patches according to RFC 6902.")
16043 (license license:bsd-3)))
16045 (define-public python2-jsonpatch
16046 (package-with-python2 python-jsonpatch))
16048 (define-public python-jsonpatch-0.4
16049 (package (inherit python-jsonpatch)
16050 (name "python-jsonpatch")
16055 (uri (git-reference
16056 (url "https://github.com/stefankoegl/python-json-patch")
16057 (commit (string-append "v" version))))
16058 (file-name (git-file-name name version))
16061 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16063 (define-public python2-jsonpatch-0.4
16064 (package-with-python2 python-jsonpatch-0.4))
16066 (define-public python-rfc3986
16068 (name "python-rfc3986")
16072 (uri (pypi-uri "rfc3986" version))
16075 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16076 (build-system python-build-system)
16078 `(#:modules ((guix build utils)
16079 (guix build python-build-system)
16084 (modify-phases %standard-phases
16087 (let ((cwd (getcwd)))
16088 (setenv "PYTHONPATH"
16089 (string-append cwd "/build/"
16090 (find (cut string-prefix? "lib" <>)
16091 (scandir (string-append cwd "/build")))
16093 (getenv "PYTHONPATH")))
16094 (invoke "pytest" "-v")))))))
16096 `(("python-pytest" ,python-pytest)))
16097 (home-page "https://rfc3986.readthedocs.io/")
16098 (synopsis "Parse and validate URI references")
16100 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16101 validation and authority parsing. This module also supports RFC@tie{}6874
16102 which adds support for zone identifiers to IPv6 addresses.")
16103 (license license:asl2.0)))
16105 (define-public python2-rfc3986
16106 (package-with-python2 python-rfc3986))
16108 (define-public python-rfc3987
16110 (name "python-rfc3987")
16115 (uri (pypi-uri "rfc3987" version))
16118 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16119 (build-system python-build-system)
16120 (home-page "https://pypi.org/project/rfc3987/")
16121 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16122 (description "@code{rfc3987} provides routines for parsing and
16123 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16124 (license license:gpl3+)))
16126 (define-public python2-rfc3987
16127 (package-with-python2 python-rfc3987))
16129 ;; The latest commit contains fixes for building with both python3 and python2.
16130 (define-public python-rfc6555
16131 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16134 (name "python-rfc6555")
16135 (version (git-version "0.0.0" revision commit))
16138 (uri (git-reference
16139 (url "https://github.com/sethmlarson/rfc6555")
16141 (file-name (git-file-name name version))
16144 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16145 (build-system python-build-system)
16148 (modify-phases %standard-phases
16150 (lambda* (#:key tests? #:allow-other-keys)
16152 ;; Other tests require network access.
16153 (invoke "pytest" "tests/test_ipv6.py")
16156 `(("python-pytest" ,python-pytest)))
16157 (home-page "https://pypi.org/project/rfc6555/")
16158 (synopsis "Python implementation of RFC 6555")
16160 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16161 6555. Provided with a single file and dead-simple API to allow easy vendoring
16162 and integration into other projects.")
16163 (properties `((python2-variant . ,(delay python2-rfc6555))))
16164 (license license:asl2.0))))
16166 (define-public python2-rfc6555
16167 (let ((base (package-with-python2
16168 (strip-python2-variant python-rfc6555))))
16172 `(("python2-selectors2" ,python2-selectors2))))))
16174 (define-public python-validators
16176 (name "python-validators")
16180 (uri (pypi-uri "validators" version))
16183 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16184 (build-system python-build-system)
16186 '(#:phases (modify-phases %standard-phases
16189 (invoke "pytest" "-vv"))))))
16191 `(("python-decorator" ,python-decorator)
16192 ("python-six" ,python-six)))
16194 `(("python-flake8" ,python-flake8)
16195 ("python-isort" ,python-isort)
16196 ("python-pytest" ,python-pytest)))
16197 (home-page "https://github.com/kvesteri/validators")
16198 (synopsis "Data validation library")
16200 "This package contains validators for different things such as email
16201 addresses, IP addresses, URLs, hashes and more. It has been designed to
16202 be easy to use and not require defining a schema or form just to validate
16204 (license license:expat)))
16206 (define-public python2-validators
16207 (package-with-python2 python-validators))
16209 (define-public python-validate-email
16211 (name "python-validate-email")
16216 (uri (pypi-uri "validate_email" version))
16219 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16220 (build-system python-build-system)
16221 (home-page "https://github.com/syrusakbary/validate_email")
16222 (synopsis "Verifies if an email address is valid and really exists")
16223 (description "@code{validate_email} can be used to verify if an email
16224 address is valid and really exists.")
16225 (license license:lgpl3+)))
16227 (define-public python2-validate-email
16228 (package-with-python2 python-validate-email))
16230 (define-public python-flex
16232 (name "python-flex")
16237 (uri (pypi-uri "flex" version))
16240 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16241 (build-system python-build-system)
16243 `(("python-click" ,python-click)
16244 ("python-iso8601" ,python-iso8601)
16245 ("python-jsonpointer" ,python-jsonpointer)
16246 ("python-pyyaml" ,python-pyyaml)
16247 ("python-requests" ,python-requests)
16248 ("python-rfc3987" ,python-rfc3987)
16249 ("python-six" ,python-six)
16250 ("python-validate-email" ,python-validate-email)))
16251 (home-page "https://github.com/pipermerriam/flex")
16252 (synopsis "Validates Swagger schemata")
16253 (description "@code{flex} can be used to validate Swagger schemata.")
16254 (license license:bsd-3)))
16256 (define-public python2-flex
16257 (package-with-python2 python-flex))
16259 (define-public python-marshmallow
16261 (name "python-marshmallow")
16262 (version "3.0.0b14")
16266 (uri (pypi-uri "marshmallow" version))
16269 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
16270 (build-system python-build-system)
16272 `(("python-dateutil" ,python-dateutil)
16273 ("python-simplejson" ,python-simplejson)))
16275 `(("python-pytest" ,python-pytest)
16276 ("python-pytz" ,python-pytz)))
16277 (home-page "https://github.com/marshmallow-code/marshmallow")
16278 (synopsis "Convert complex datatypes to and from native
16279 Python datatypes.")
16280 (description "@code{marshmallow} provides a library for converting
16281 complex datatypes to and from native Python datatypes.")
16282 (license license:expat)))
16284 (define-public python2-marshmallow
16285 (package-with-python2 python-marshmallow))
16287 (define-public python-apispec
16289 (name "python-apispec")
16294 (uri (pypi-uri "apispec" version))
16297 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16298 (build-system python-build-system)
16300 `(("python-pyyaml" ,python-pyyaml)))
16302 `(("python-pytest" ,python-pytest)
16303 ("python-flask" ,python-flask)
16304 ("python-marshmallow" ,python-marshmallow)
16305 ("python-tornado" ,python-tornado)
16306 ("python-bottle" ,python-bottle)
16307 ("python-mock" ,python-mock)))
16308 (home-page "https://github.com/marshmallow-code/apispec")
16309 (synopsis "Swagger 2.0 API specification generator")
16310 (description "@code{python-apispec} is a pluggable API specification
16311 generator. Currently supports the OpenAPI specification (f.k.a.
16313 (license license:expat)))
16315 (define-public python2-apispec
16316 (package-with-python2 python-apispec))
16318 (define-public python-flasgger
16320 (name "python-flasgger")
16325 (uri (git-reference
16326 (url "https://github.com/rochacbruno/flasgger")
16328 (file-name (git-file-name name version))
16330 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16331 (build-system python-build-system)
16334 (modify-phases %standard-phases
16336 (lambda* (#:key inputs outputs #:allow-other-keys)
16337 (substitute* "Makefile"
16338 (("flake8 flasgger --ignore=F403")
16339 "flake8 flasgger --ignore=E731,F403"))
16340 (setenv "PYTHONPATH" (string-append (getcwd)
16342 (getenv "PYTHONPATH")))
16343 (invoke "py.test"))))))
16345 `(("python-flask" ,python-flask)
16346 ("python-pyyaml" ,python-pyyaml)
16347 ("python-jsonschema" ,python-jsonschema)
16348 ("python-mistune" ,python-mistune)
16349 ("python-six" ,python-six)))
16351 `(("python-decorator" ,python-decorator)
16352 ("python-flake8" ,python-flake8)
16353 ("python-flask-restful" ,python-flask-restful)
16354 ("python-flex" ,python-flex)
16355 ("python-pytest" ,python-pytest)
16356 ("python-pytest-cov" ,python-pytest-cov)
16357 ("python-marshmallow" ,python-marshmallow)
16358 ("python-apispec" ,python-apispec)))
16359 (home-page "https://github.com/rochacbruno/flasgger/")
16360 (synopsis "Extract Swagger specs from your Flask project")
16361 (description "@code{python-flasgger} allows extracting Swagger specs
16362 from your Flask project. It is a fork of Flask-Swagger.")
16363 (license license:expat)))
16365 (define-public python2-flasgger
16366 (package-with-python2 python-flasgger))
16368 (define-public python-swagger-spec-validator
16370 (name "python-swagger-spec-validator")
16375 (uri (pypi-uri "swagger-spec-validator" version))
16378 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16379 (build-system python-build-system)
16381 `(("python-jsonschema" ,python-jsonschema)
16382 ("python-pyyaml" ,python-pyyaml)
16383 ("python-six" ,python-six)))
16385 "https://github.com/Yelp/swagger_spec_validator")
16386 (synopsis "Validation of Swagger specifications")
16387 (description "@code{swagger_spec_validator} provides a library for
16388 validating Swagger API specifications.")
16389 (license license:asl2.0)))
16391 (define-public python2-swagger-spec-validator
16392 (package-with-python2 python-swagger-spec-validator))
16394 (define-public python-apache-libcloud
16396 (name "python-apache-libcloud")
16401 (uri (pypi-uri "apache-libcloud" version))
16404 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16405 (build-system python-build-system)
16408 (modify-phases %standard-phases
16409 (add-after 'unpack 'patch-ssh
16410 (lambda* (#:key inputs #:allow-other-keys)
16411 (substitute* "libcloud/compute/ssh.py"
16412 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16415 (add-after 'unpack 'patch-tests
16417 (substitute* "libcloud/test/compute/test_ssh_client.py"
16418 (("class ShellOutSSHClientTests")
16419 "@unittest.skip(\"Guix container doesn't have ssh service\")
16420 class ShellOutSSHClientTests"))
16422 (add-before 'check 'copy-secret
16424 (copy-file "libcloud/test/secrets.py-dist"
16425 "libcloud/test/secrets.py")
16428 `(("openssh" ,openssh)))
16430 `(("python-paramiko" ,python-paramiko)
16431 ("python-requests" ,python-requests)))
16433 `(("python-lockfile" ,python-lockfile)
16434 ("python-mock" ,python-mock)
16435 ("python-pytest" ,python-pytest)
16436 ("python-pytest-runner" ,python-pytest-runner)
16437 ("python-requests-mock" ,python-requests-mock)))
16438 (home-page "https://libcloud.apache.org/")
16439 (synopsis "Unified Cloud API")
16440 (description "@code{libcloud} is a Python library for interacting with
16441 many of the popular cloud service providers using a unified API.")
16442 (license license:asl2.0)))
16444 (define-public python2-apache-libcloud
16445 (package-with-python2 python-apache-libcloud))
16447 (define-public python-smmap
16449 (name "python-smmap")
16454 (uri (pypi-uri "smmap" version))
16456 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16457 (build-system python-build-system)
16459 `(("python-nosexcover" ,python-nosexcover)))
16460 (home-page "https://github.com/Byron/smmap")
16461 (synopsis "Python sliding window memory map manager")
16462 (description "@code{smmap} is a pure Python implementation of a sliding
16463 window memory map manager.")
16464 (license license:bsd-3)))
16466 (define-public python-smmap2
16467 (deprecated-package "python-smmap2" python-smmap))
16469 (define-public python2-smmap
16470 (package-with-python2 python-smmap))
16472 (define-public python2-smmap2
16473 (deprecated-package "python2-smmap2" python2-smmap))
16475 (define-public python-regex
16477 (name "python-regex")
16478 (version "2020.6.8")
16481 (uri (pypi-uri "regex" version))
16484 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16485 (build-system python-build-system)
16488 (modify-phases %standard-phases
16490 (lambda* (#:key inputs outputs #:allow-other-keys)
16491 (add-installed-pythonpath inputs outputs)
16492 (invoke "python" "-c"
16493 "from regex.test_regex import test_main; test_main()"))))))
16494 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16495 (synopsis "Alternative regular expression module")
16496 (description "This regular expression implementation is backwards-
16497 compatible with the standard @code{re} module, but offers additional
16498 functionality like full case-folding for case-insensitive matches in Unicode.")
16499 (license license:psfl)))
16501 (define-public python2-regex
16502 (package-with-python2 python-regex))
16504 (define-public python-pyopengl
16506 (name "python-pyopengl")
16511 (uri (pypi-uri "PyOpenGL" version))
16514 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16515 (build-system python-build-system)
16518 ("freeglut" ,freeglut)
16521 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16522 ;attribute 'OSMesa'
16524 (modify-phases %standard-phases
16525 (add-before 'build 'fix-paths
16526 (lambda* (#:key inputs outputs #:allow-other-keys)
16527 (substitute* '("OpenGL/platform/ctypesloader.py")
16528 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16529 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16531 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16533 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16535 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16537 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16539 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16540 ;; Not providing libgle. It seems to be very old.
16542 (home-page "http://pyopengl.sourceforge.net")
16543 (synopsis "Standard OpenGL bindings for Python")
16545 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16546 related APIs. The binding is created using the standard @code{ctypes}
16548 (license license:bsd-3)))
16550 (define-public python-pyopengl-accelerate
16552 (inherit python-pyopengl)
16553 (name "python-pyopengl-accelerate")
16558 (uri (pypi-uri "PyOpenGL-accelerate" version))
16561 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16564 ("python-numpy" ,python-numpy))) ; for cython module
16565 ; numpy_formathandler, thus not propagated
16569 (modify-phases %standard-phases
16570 (delete 'fix-paths))))
16571 (synopsis "Acceleration code for PyOpenGL")
16573 "This is the Cython-coded accelerator module for PyOpenGL.")))
16575 (define-public python-rencode
16577 (name "python-rencode")
16582 (uri (pypi-uri "rencode" version))
16585 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16586 (build-system python-build-system)
16589 (modify-phases %standard-phases
16590 (add-before 'check 'delete-bogus-test
16591 ;; This test requires /home/aresch/Downloads, which is not provided by
16592 ;; the build environment.
16594 (delete-file "rencode/t.py")
16596 (native-inputs `(("pkg-config" ,pkg-config)
16597 ("python-cython" ,python-cython)))
16598 (home-page "https://github.com/aresch/rencode")
16599 (synopsis "Serialization of heterogeneous data structures")
16601 "The @code{rencode} module is a data structure serialization library,
16602 similar to @code{bencode} from the BitTorrent project. For complex,
16603 heterogeneous data structures with many small elements, r-encoding stake up
16604 significantly less space than b-encodings. This version of rencode is a
16605 complete rewrite in Cython to attempt to increase the performance over the
16606 pure Python module.")
16607 (license license:bsd-3)))
16609 (define-public python2-rencode
16610 (package-with-python2 python-rencode))
16612 (define-public python-xenon
16614 (name "python-xenon")
16619 (uri (pypi-uri "xenon" version))
16622 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16623 (build-system python-build-system)
16625 `(("python-pyyaml" ,python-pyyaml)
16626 ("python-radon" ,python-radon)
16627 ("python-requests" ,python-requests)
16628 ("python-flake8" ,python-flake8)
16629 ("python-tox" ,python-tox)))
16631 `(#:tests? #f ;test suite not shipped with the PyPI archive
16633 (modify-phases %standard-phases
16634 (add-before 'build 'patch-test-requirements
16636 ;; Remove httpretty dependency for tests.
16637 (substitute* "setup.py"
16638 (("httpretty") ""))
16640 (home-page "https://xenon.readthedocs.org/")
16641 (synopsis "Monitor code metrics for Python on your CI server")
16643 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16644 Ideally, @code{xenon} is run every time code is committed. Through command
16645 line options, various thresholds can be set for the complexity of code. It
16646 will fail (i.e. it will exit with a non-zero exit code) when any of these
16647 requirements is not met.")
16648 (license license:expat)))
16650 (define-public python2-xenon
16651 (package-with-python2 python-xenon))
16653 (define-public python-pysocks
16655 (name "python-pysocks")
16660 (uri (pypi-uri "PySocks" version))
16663 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
16664 (build-system python-build-system)
16665 (arguments `(#:tests? #f))
16666 (home-page "https://github.com/Anorov/PySocks")
16667 (synopsis "SOCKS client module")
16668 (description "@code{pysocks} is an updated and semi-actively maintained
16669 version of @code{SocksiPy} with bug fixes and extra features.")
16670 (license license:bsd-3)))
16672 (define-public python2-pysocks
16673 (package-with-python2 python-pysocks))
16675 (define-public python-pydiff
16677 (name "python-pydiff")
16682 (uri (pypi-uri "pydiff" version))
16685 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16686 (build-system python-build-system)
16687 (home-page "https://github.com/myint/pydiff")
16688 (synopsis "Library to diff two Python files at the bytecode level")
16690 "@code{pydiff} makes it easy to look for actual code changes while
16691 ignoring formatting changes.")
16692 (license license:expat)))
16694 (define-public python2-pydiff
16695 (package-with-python2 python-pydiff))
16697 (define-public python-pydub
16699 (name "python-pydub")
16704 (uri (pypi-uri "pydub" version))
16707 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
16708 (build-system python-build-system)
16711 (modify-phases %standard-phases
16712 (add-after 'unpack 'fix-ffmpeg-path
16713 (lambda* (#:key inputs #:allow-other-keys)
16714 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
16715 (substitute* '("pydub/utils.py")
16716 (("return \"ffmpeg\"")
16717 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
16718 (("return \"ffplay\"")
16719 (string-append "return \"" ffmpeg "/bin/ffplay\""))
16720 (("return \"ffprobe\"")
16721 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
16722 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
16724 (home-page "https://pydub.com")
16726 `(("ffmpeg" ,ffmpeg)))
16728 `(("python-scipy" ,python-scipy)))
16729 (synopsis "Manipulate audio with a high level interface in Python")
16731 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
16732 @code{ffmpeg} to open various audio formats.")
16733 (license license:expat))) ; MIT license
16735 (define-public python-tqdm
16737 (name "python-tqdm")
16742 (uri (pypi-uri "tqdm" version))
16745 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
16746 (build-system python-build-system)
16748 '(#:phases (modify-phases %standard-phases
16750 (lambda* (#:key inputs outputs #:allow-other-keys)
16751 (add-installed-pythonpath inputs outputs)
16752 ;; This invokation is taken from tox.ini.
16753 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
16754 "-d" "-v" "tqdm/"))))))
16756 `(("python-nose" ,python-nose)))
16757 (home-page "https://github.com/tqdm/tqdm")
16758 (synopsis "Fast, extensible progress meter")
16760 "Make loops show a progress bar on the console by just wrapping any
16761 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16762 design and layout.")
16763 (license (list license:mpl2.0 license:expat))))
16765 (define-public python2-tqdm
16766 (package-with-python2 python-tqdm))
16768 (define-public python-pkginfo
16770 (name "python-pkginfo")
16775 (uri (pypi-uri "pkginfo" version))
16778 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
16779 (build-system python-build-system)
16781 ;; The tests are broken upstream.
16784 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16786 "Query metadatdata from sdists, bdists, and installed packages")
16788 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16789 source distriubtion (an sdist) or a binary distribution (e.g., created by
16790 running bdist_egg). It can also query the EGG-INFO directory of an installed
16791 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16792 created by running @code{python setup.py develop}).")
16793 (license license:expat)))
16795 (define-public python2-pkginfo
16796 (package-with-python2 python-pkginfo))
16798 (define-public python-twine
16800 (name "python-twine")
16805 (uri (pypi-uri "twine" version))
16807 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
16808 (build-system python-build-system)
16810 `(("python-tqdm" ,python-tqdm)
16811 ("python-packaging" ,python-packaging)
16812 ("python-pkginfo" ,python-pkginfo)
16813 ("python-readme-renderer" ,python-readme-renderer)
16814 ("python-requests" ,python-requests)
16815 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16816 (home-page "https://github.com/pypa/twine")
16817 (synopsis "Collection of utilities for interacting with PyPI")
16819 "@code{twine} currently supports registering projects and uploading
16820 distributions. It authenticates the user over HTTPS, allows them to pre-sign
16821 their files and supports any packaging format (including wheels).")
16822 (license license:asl2.0)))
16824 (define-public python2-twine
16825 (package-with-python2 python-twine))
16827 (define-public python-linecache2
16829 (name "python-linecache2")
16834 (uri (pypi-uri "linecache2" version))
16837 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16838 (build-system python-build-system)
16840 `(;; The tests depend on unittest2, and our version is a bit too old.
16843 `(("python-pbr" ,python-pbr-minimal)))
16845 "https://github.com/testing-cabal/linecache2")
16846 (synopsis "Backports of the linecache module")
16848 "The linecache module allows one to get any line from any file, while
16849 attempting to optimize internally, using a cache, the common case where many
16850 lines are read from a single file.")
16851 (license license:psfl)))
16853 (define-public python2-linecache2
16854 (package-with-python2 python-linecache2))
16856 (define-public python-traceback2
16858 (name "python-traceback2")
16863 (uri (pypi-uri "traceback2" version))
16866 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16867 (build-system python-build-system)
16869 `(;; python-traceback2 and python-unittest2 depend on one another.
16872 `(("python-pbr" ,python-pbr-minimal)))
16874 `(("python-linecache2" ,python-linecache2)))
16876 "https://github.com/testing-cabal/traceback2")
16877 (synopsis "Backports of the traceback module")
16879 "This module provides a standard interface to extract, format and print
16880 stack traces of Python programs. It exactly mimics the behavior of the Python
16881 interpreter when it prints a stack trace.")
16882 (license license:psfl)))
16884 (define-public python2-traceback2
16885 (package-with-python2 python-traceback2))
16887 (define-public python-ratelimiter
16889 (name "python-ratelimiter")
16894 (uri (pypi-uri "ratelimiter" version))
16897 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
16898 (build-system python-build-system)
16900 '(#:tests? #f)) ; There are no tests in the pypi archive.
16901 (home-page "https://github.com/RazerM/ratelimiter")
16902 (synopsis "Simple rate limiting object")
16904 "The @code{ratelimiter} module ensures that an operation will not be
16905 executed more than a given number of times during a given period.")
16906 (license license:asl2.0)))
16908 (define-public python2-ratelimiter
16909 (package-with-python2 python-ratelimiter))
16911 (define-public python-dukpy
16913 (name "python-dukpy")
16918 (uri (git-reference
16919 (url "https://github.com/kovidgoyal/dukpy")
16920 (commit (string-append "v" version))))
16921 (file-name (git-file-name name version))
16923 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
16924 (build-system python-build-system)
16925 (home-page "https://github.com/kovidgoyal/dukpy")
16926 (synopsis "Run JavaScript in python")
16928 "dukpy is a JavaScript runtime environment for Python using the duktape
16929 embeddable JavaScript engine.")
16930 ;; Dukpy is licensed under MIT like the embedded duktape library,
16931 ;; with 'errors.c' as GPL3.
16932 (license (list license:expat license:gpl3))))
16934 (define-public python2-dukpy
16935 (package-with-python2 python-dukpy))
16937 (define-public python-jsonrpclib-pelix
16939 (name "python-jsonrpclib-pelix")
16944 (uri (pypi-uri "jsonrpclib-pelix" version))
16947 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
16948 (build-system python-build-system)
16950 `(#:tests? #f)) ; no tests in PyPI tarball
16951 (home-page "https://github.com/tcalmant/jsonrpclib/")
16952 (synopsis "JSON-RPC 2.0 client library for Python")
16954 "This library implements the JSON-RPC v2.0
16955 specification (backwards-compatible) as a client library for Python. This
16956 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
16958 (license license:asl2.0)))
16960 (define-public python2-jsonrpclib-pelix
16961 (package-with-python2 python-jsonrpclib-pelix))
16963 (define-public python-setuptools-scm-git-archive
16965 (name "python-setuptools-scm-git-archive")
16970 (uri (pypi-uri "setuptools_scm_git_archive" version))
16973 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
16974 (build-system python-build-system)
16976 `(("python-pytest" ,python-pytest)))
16978 `(("python-setuptools-scm" ,python-setuptools-scm)))
16979 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
16980 (synopsis "Setuptools_scm plugin for git archives")
16982 "The setuptools_scm_git_archive package is a plugin to
16983 setuptools_scm, which supports obtaining versions from git archives that
16984 belong to tagged versions.")
16985 (license license:expat)))
16987 (define-public python2-setuptools-scm-git-archive
16988 (package-with-python2 python-setuptools-scm-git-archive))
16990 (define-public python-setuptools-git
16992 (name "python-setuptools-git")
16997 (uri (pypi-uri "setuptools-git" version))
17000 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17001 (build-system python-build-system)
17004 (modify-phases %standard-phases
17005 ;; This is needed for tests.
17006 (add-after 'unpack 'configure-git
17008 (setenv "HOME" "/tmp")
17009 (invoke "git" "config" "--global" "user.email" "guix")
17010 (invoke "git" "config" "--global" "user.name" "guix")
17013 `(("git" ,git-minimal)))
17014 (home-page "https://github.com/msabramo/setuptools-git")
17015 (synopsis "Setuptools revision control system plugin for Git")
17017 "This package provides a plugin for Setuptools for revision control with
17019 (license license:bsd-3)))
17021 (define-public python-pyclipper
17023 (name "python-pyclipper")
17024 (version "1.1.0.post3")
17028 (uri (pypi-uri "pyclipper" version ".zip"))
17030 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17031 (modules '((guix build utils)))
17034 ;; This file is generated by Cython.
17035 (delete-file "pyclipper/pyclipper.cpp") #t))))
17036 (build-system python-build-system)
17039 (modify-phases %standard-phases
17040 (add-before 'build 'cythonize-sources
17042 (with-directory-excursion "pyclipper"
17043 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17045 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17047 `(("python-cython" ,python-cython)
17048 ("python-pytest" ,python-pytest)
17049 ("python-pytest-runner" ,python-pytest-runner)
17050 ("python-unittest2" ,python-unittest2)
17052 (home-page "https://github.com/greginvm/pyclipper")
17053 (synopsis "Wrapper for Angus Johnson's Clipper library")
17055 "Pyclipper is a Cython wrapper for the C++ translation of the
17056 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17057 (license license:expat)))
17059 (define-public python2-pyclipper
17060 (package-with-python2 python-pyclipper))
17062 (define-public python2-booleanoperations
17064 (name "python2-booleanoperations")
17069 (uri (pypi-uri "booleanOperations" version ".zip"))
17072 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17073 (build-system python-build-system)
17075 `(#:python ,python-2))
17078 ("python2-pytest" ,python2-pytest)
17079 ("python2-pytest-runner" ,python2-pytest-runner)))
17081 `(("python-fonttools" ,python2-fonttools)
17082 ("python-pyclipper" ,python2-pyclipper)
17083 ("python-ufolib" ,python2-ufolib)))
17084 (home-page "https://github.com/typemytype/booleanOperations")
17085 (synopsis "Boolean operations on paths")
17087 "BooleanOperations provides a Python library that enables
17088 boolean operations on paths.")
17089 (license license:expat)))
17091 (define-public python-tempdir
17093 (name "python-tempdir")
17098 (uri (pypi-uri "tempdir" version))
17101 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17102 (build-system python-build-system)
17103 (home-page "https://pypi.org/project/tempdir/")
17105 ;; the package has no tests
17107 (synopsis "Python library for managing temporary directories")
17109 "This library manages temporary directories that are automatically
17110 deleted with all their contents when they are no longer needed. It is
17111 particularly convenient for use in tests.")
17112 (license license:expat)))
17114 (define-public python2-tempdir
17115 (package-with-python2 python-tempdir))
17117 (define-public python-activepapers
17119 (name "python-activepapers")
17124 (uri (pypi-uri "ActivePapers.Py" version))
17127 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17128 (build-system python-build-system)
17130 `(#:modules ((ice-9 ftw)
17133 (guix build python-build-system))
17136 (modify-phases %standard-phases
17137 (add-after 'unpack 'delete-python2-code
17139 (for-each delete-file
17140 '("lib/activepapers/builtins2.py"
17141 "lib/activepapers/standardlib2.py"
17142 "lib/activepapers/utility2.py"))))
17145 ;; Deactivate the test cases that download files
17146 (setenv "NO_NETWORK_ACCESS" "1")
17147 ;; For some strange reason, some tests fail if nosetests runs all
17148 ;; test modules in a single execution. They pass if each test
17149 ;; module is run individually.
17150 (for-each (lambda (filename)
17151 (invoke "nosetests"
17152 (string-append "tests/" filename)))
17155 (string-suffix? ".py" filename)))))))))
17157 `(("python-tempdir" ,python-tempdir)
17158 ("python-nose" ,python-nose)))
17160 `(("python-h5py" ,python-h5py)))
17161 (home-page "https://www.activepapers.org/")
17162 (synopsis "Executable papers for scientific computing")
17164 "ActivePapers is a tool for working with executable papers, which
17165 combine data, code, and documentation in single-file packages,
17166 suitable for publication as supplementary material or on repositories
17167 such as figshare or Zenodo.")
17168 (properties `((python2-variant . ,(delay python2-activepapers))))
17169 (license license:bsd-3)))
17171 (define-public python2-activepapers
17172 (let ((base (package-with-python2
17173 (strip-python2-variant python-activepapers))))
17177 (substitute-keyword-arguments (package-arguments base)
17179 `(modify-phases ,phases
17180 (delete 'delete-python2-code)
17181 (add-after 'unpack 'delete-python3-code
17183 (for-each delete-file
17184 '("lib/activepapers/builtins3.py"
17185 "lib/activepapers/standardlib3.py"
17186 "lib/activepapers/utility3.py")))))))))))
17188 (define-public python-semver
17190 (name "python-semver")
17195 (uri (pypi-uri "semver" version))
17198 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17199 (build-system python-build-system)
17201 `(("python-appdirs" ,python-appdirs)
17202 ("python-distlib" ,python-distlib)
17203 ("python-importlib-metadata" ,python-importlib-metadata)
17204 ("python-filelock" ,python-filelock)
17205 ("python-six" ,python-six)
17206 ("python-tox" ,python-tox)
17207 ("python-virtualenv" ,python-virtualenv)))
17208 (home-page "https://github.com/k-bx/python-semver")
17209 (synopsis "Python helper for Semantic Versioning")
17210 (description "This package provides a Python library for
17211 @url{Semantic Versioning, http://semver.org/}.")
17212 (license license:bsd-3)))
17214 (define-public python2-semver
17215 (package-with-python2 python-semver))
17217 (define-public python-pyro4
17219 (name "python-pyro4")
17224 (uri (pypi-uri "Pyro4" version))
17226 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17227 (build-system python-build-system)
17229 '(#:tests? #f)) ;FIXME: Some tests require network access.
17231 `(("python-cloudpickle" ,python-cloudpickle)
17232 ("python-dill" ,python-dill)
17233 ("python-msgpack" ,python-msgpack)))
17235 `(("python-serpent" ,python-serpent)))
17236 (home-page "https://pyro4.readthedocs.io")
17237 (synopsis "Distributed object middleware for Python")
17239 "Pyro enables you to build applications in which objects can talk to each
17240 other over the network. You can just use normal Python method calls to call
17241 objects on other machines, also known as remote procedure calls (RPC).")
17242 (license license:expat)))
17244 (define-public python2-pyro
17246 (name "python2-pyro")
17251 (uri (pypi-uri "Pyro" version))
17252 (file-name (string-append "Pyro-" version ".tar.gz"))
17255 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17256 (build-system python-build-system)
17258 ;; Pyro is not compatible with Python 3
17259 `(#:python ,python-2
17260 ;; Pyro has no test cases for automatic execution
17262 (home-page "https://pythonhosted.org/Pyro/")
17263 (synopsis "Distributed object manager for Python")
17264 (description "Pyro is a Distributed Object Technology system
17265 written in Python that is designed to be easy to use. It resembles
17266 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17267 which is a system and language independent Distributed Object Technology
17268 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17269 longer maintained. New projects should use Pyro4 instead, which
17270 is the new Pyro version that is actively developed.")
17271 (license license:expat)))
17273 (define-public python2-scientific
17275 (name "python2-scientific")
17280 (uri (git-reference
17281 (url "https://github.com/khinsen/ScientificPython")
17282 (commit (string-append "rel" version))))
17283 (file-name (git-file-name name version))
17286 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17287 (build-system python-build-system)
17289 `(("netcdf" ,netcdf)))
17291 `(("python-numpy" ,python2-numpy-1.8)
17292 ("python-pyro" ,python2-pyro)))
17294 ;; ScientificPython is not compatible with Python 3
17295 `(#:python ,python-2
17296 #:tests? #f ; No test suite
17298 (modify-phases %standard-phases
17300 (lambda* (#:key inputs #:allow-other-keys)
17301 (invoke "python" "setup.py" "build"
17302 (string-append "--netcdf_prefix="
17303 (assoc-ref inputs "netcdf"))))))))
17304 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17305 (synopsis "Python modules for scientific computing")
17306 (description "ScientificPython is a collection of Python modules that are
17307 useful for scientific computing. Most modules are rather general (Geometry,
17308 physical units, automatic derivatives, ...) whereas others are more
17309 domain-specific (e.g. netCDF and PDB support). The library is currently
17310 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17311 (license license:cecill-c)))
17313 (define-public python2-mmtk
17315 (name "python2-mmtk")
17320 (uri (git-reference
17321 (url "https://github.com/khinsen/MMTK")
17322 (commit (string-append "rel" version))))
17323 (file-name (git-file-name name version))
17326 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17327 (build-system python-build-system)
17329 `(("netcdf" ,netcdf)))
17331 `(("python-scientific" ,python2-scientific)
17332 ("python-tkinter" ,python-2 "tk")))
17334 `(#:python ,python-2
17337 (modify-phases %standard-phases
17338 (add-before 'build 'includes-from-scientific
17339 (lambda* (#:key inputs #:allow-other-keys)
17340 (mkdir-p "Include/Scientific")
17343 (assoc-ref inputs "python-scientific")
17344 "/include/python2.7/Scientific")
17345 "Include/Scientific"))))))
17346 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17347 (synopsis "Python library for molecular simulation")
17348 (description "MMTK is a library for molecular simulations with an emphasis
17349 on biomolecules. It provides widely used methods such as Molecular Dynamics
17350 and normal mode analysis, but also basic routines for implementing new methods
17351 for simulation and analysis. The library is currently not actively maintained
17352 and works only with Python 2 and NumPy < 1.9.")
17353 (license license:cecill-c)))
17355 (define-public python-phonenumbers
17357 (name "python-phonenumbers")
17362 (uri (pypi-uri "phonenumbers" version))
17365 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17366 (build-system python-build-system)
17368 "https://github.com/daviddrysdale/python-phonenumbers")
17370 "Python library for dealing with international phone numbers")
17372 "This package provides a Python port of Google's libphonenumber library.")
17373 (license license:asl2.0)))
17375 (define-public python2-phonenumbers
17376 (package-with-python2 python-phonenumbers))
17378 (define-public python-send2trash
17380 (name "python-send2trash")
17383 (origin (method git-fetch)
17384 ;; Source tarball on PyPI doesn't include tests.
17385 (uri (git-reference
17386 (url "https://github.com/hsoft/send2trash")
17388 (file-name (git-file-name name version))
17391 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17392 (build-system python-build-system)
17395 (modify-phases %standard-phases
17396 (add-before 'check 'pre-check
17398 (mkdir-p "/tmp/foo")
17399 (setenv "HOME" "/tmp/foo")
17401 (home-page "https://github.com/hsoft/send2trash")
17402 (synopsis "Send files to the user's @file{~/Trash} directory")
17403 (description "This package provides a Python library to send files to the
17404 user's @file{~/Trash} directory.")
17405 (properties `((python2-variant . ,(delay python2-send2trash))))
17406 (license license:bsd-3)))
17408 (define-public python2-send2trash
17410 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17412 (substitute-keyword-arguments (package-arguments python-send2trash)
17414 `(modify-phases ,phases
17415 (add-before 'check 'setenv
17417 (setenv "PYTHONPATH"
17418 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17421 (define-public python-pyfavicon
17423 (name "python-pyfavicon")
17428 (uri (pypi-uri "pyfavicon" version))
17430 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17431 (build-system python-build-system)
17433 ;; There are no tests in the PyPI tarball and the tests from the
17434 ;; repository require online data.
17437 `(("python-aiohttp" ,python-aiohttp)
17438 ("python-beautifulsoup4" ,python-beautifulsoup4)
17439 ("python-pillow" ,python-pillow)))
17440 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17441 (synopsis "Async favicon fetcher")
17443 "@code{pyfavicon} is an async favicon fetcher.")
17444 (license license:expat)))
17446 (define-public python-yapf
17448 (name "python-yapf")
17453 (uri (pypi-uri "yapf" version))
17456 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17457 (build-system python-build-system)
17458 (home-page "https://github.com/google/yapf")
17459 (synopsis "Formatter for Python code")
17460 (description "YAPF is a formatter for Python code. It's based off of
17461 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17462 takes the code and reformats it to the best formatting that conforms to the
17463 style guide, even if the original code didn't violate the style guide.")
17464 (license license:asl2.0)))
17466 (define-public python2-yapf
17467 (package-with-python2 python-yapf))
17469 (define-public python-yq
17476 (uri (pypi-uri "yq" version))
17479 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17480 (build-system python-build-system)
17483 (modify-phases %standard-phases
17484 (add-after 'unpack 'patch
17485 (lambda* (#:key inputs #:allow-other-keys)
17486 (substitute* "yq/__init__.py"
17487 (("Popen\\(\\[\"jq")
17490 (assoc-ref inputs "jq")
17494 `(("python-argcomplete" ,python-argcomplete)
17495 ("python-pyyaml" ,python-pyyaml)
17496 ("python-xmltodict" ,python-xmltodict)
17499 `(("python-coverage" ,python-coverage)
17500 ("python-flake8" ,python-flake8)
17501 ("python-wheel" ,python-wheel)))
17502 (home-page "https://github.com/kislyuk/yq")
17503 (synopsis "Command-line YAML/XML processor")
17505 "This package provides @command{yq} and @command{xq} for processing YAML
17506 and XML respectively. The processing is done through @{jq}, @command{jq}
17507 filters can be used to process the data as it passes through.")
17508 (license license:asl2.0)))
17510 (define-public python-gyp
17511 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17514 (name "python-gyp")
17515 ;; Google does not release versions,
17516 ;; based on second most recent commit date.
17517 (version (git-version "0.0.0" revision commit))
17520 ;; Google does not release tarballs,
17521 ;; git checkout is needed.
17523 (uri (git-reference
17524 (url "https://chromium.googlesource.com/external/gyp")
17526 (file-name (git-file-name name version))
17529 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17530 (build-system python-build-system)
17531 (home-page "https://gyp.gsrc.io/")
17532 (synopsis "GYP is a Meta-Build system")
17534 "GYP builds build systems for large, cross platform applications.
17535 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17536 files, and Makefiles.")
17537 (license license:bsd-3))))
17539 (define-public python2-gyp
17540 (package-with-python2 python-gyp))
17542 (define-public python-whatever
17544 (name "python-whatever")
17549 (uri (git-reference
17550 (url "https://github.com/Suor/whatever")
17552 (file-name (git-file-name name version))
17554 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17555 (build-system python-build-system)
17558 (modify-phases %standard-phases
17561 (invoke "py.test"))))))
17563 `(("python-pytest" ,python-pytest)))
17564 (home-page "https://github.com/Suor/whatever")
17565 (synopsis "Make anonymous functions by partial application of operators")
17566 (description "@code{whatever} provides an easy way to make anonymous
17567 functions by partial application of operators.")
17568 (license license:bsd-3)))
17570 (define-public python2-whatever
17571 (package-with-python2 python-whatever))
17573 (define-public python-funcy
17575 (name "python-funcy")
17580 (uri (git-reference
17581 (url "https://github.com/Suor/funcy")
17584 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17585 (file-name (git-file-name name version))))
17586 (build-system python-build-system)
17589 (modify-phases %standard-phases
17592 (invoke "py.test"))))))
17594 `(("python-pytest" ,python-pytest)
17595 ("python-whatever" ,python-whatever)))
17596 (home-page "https://github.com/Suor/funcy")
17597 (synopsis "Functional tools")
17598 (description "@code{funcy} is a library that provides functional tools.
17601 @item merge - Merges collections of the same type
17602 @item walk - Type-preserving map
17603 @item select - Selects a part of a collection
17604 @item take - Takes the first n items of a collection
17605 @item first - Takes the first item of a collection
17606 @item remove - Predicated-removes items of a collection
17607 @item concat - Concatenates two collections
17608 @item flatten - Flattens a collection with subcollections
17609 @item distinct - Returns only distinct items
17610 @item split - Predicated-splits a collection
17611 @item split_at - Splits a collection at a given item
17612 @item group_by - Groups items by group
17613 @item pairwise - Pairs off adjacent items
17614 @item partial - Partially-applies a function
17615 @item curry - Curries a function
17616 @item compose - Composes functions
17617 @item complement - Complements a predicate
17618 @item all_fn - \"all\" with predicate
17620 (license license:bsd-3)))
17622 (define-public python2-funcy
17623 (package-with-python2 python-funcy))
17625 (define-public python-isoweek
17627 (name "python-isoweek")
17632 (uri (pypi-uri "isoweek" version))
17635 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17636 (build-system python-build-system)
17637 (home-page "https://github.com/gisle/isoweek")
17638 (synopsis "Objects representing a week")
17639 (description "The @code{isoweek} module provide the class Week that
17640 implements the week definition of ISO 8601. This standard also defines
17641 a notation for identifying weeks; yyyyWww (where the W is a literal).
17642 Week instances stringify to this form.")
17643 (license license:bsd-3)))
17645 (define-public python2-isoweek
17646 (package-with-python2 python-isoweek))
17648 (define-public python-pyzbar
17650 (name "python-pyzbar")
17654 ;; There's no source tarball on PyPI.
17656 (uri (git-reference
17657 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
17658 (commit (string-append "v" version))))
17659 (file-name (git-file-name name version))
17661 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
17662 (build-system python-build-system)
17665 (modify-phases %standard-phases
17666 (add-after 'unpack 'remove-failing-test
17668 ;; This tests if find_library was called once, but we remove
17669 ;; the call in the stage below to make the library find libzbar.
17670 (delete-file "pyzbar/tests/test_zbar_library.py")
17672 (add-before 'build 'set-library-file-name
17673 (lambda* (#:key inputs #:allow-other-keys)
17674 (let ((libzbar (assoc-ref inputs "zbar")))
17675 (substitute* "pyzbar/zbar_library.py"
17676 (("find_library\\('zbar'\\)")
17677 (string-append "'" libzbar "/lib/libzbar.so.0'")))
17680 `(("pkg-config" ,pkg-config)
17681 ("python-numpy" ,python-numpy)
17682 ("python-pillow" ,python-pillow)))
17685 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
17686 (synopsis "Read one-dimensional barcodes and QR codes")
17688 "Read one-dimensional barcodes and QR codes using the zbar library.
17694 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
17695 @item Decodes locations of barcodes
17696 @item No dependencies, other than the zbar library itself
17698 (license license:expat)))
17700 (define-public python-tokenize-rt
17702 (name "python-tokenize-rt")
17707 (uri (pypi-uri "tokenize-rt" version))
17710 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
17711 (build-system python-build-system)
17712 (home-page "https://github.com/asottile/tokenize-rt")
17713 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
17715 "This Python library is a wrapper around @code{tokenize} from the Python
17716 standard library. It provides two additional tokens @code{ESCAPED_NL} and
17717 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
17718 and @code{tokens_to_src} to roundtrip.")
17719 (license license:expat)))
17721 (define-public python-future-fstrings
17723 (name "python-future-fstrings")
17728 (uri (pypi-uri "future_fstrings" version))
17731 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
17732 (build-system python-build-system)
17734 `(("python-tokenize-rt" ,python-tokenize-rt)))
17735 (home-page "https://github.com/asottile/future-fstrings")
17736 (synopsis "Backport of fstrings to Python < 3.6")
17738 "This package provides a UTF-8 compatible encoding
17739 @code{future_fstrings}, which performs source manipulation. It decodes the
17740 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
17741 @code{f} strings.")
17742 (license license:expat)))
17744 (define-public python-typed-ast
17746 (name "python-typed-ast")
17751 (uri (git-reference
17752 (url "https://github.com/python/typed_ast")
17755 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
17756 (file-name (git-file-name name version))))
17757 (build-system python-build-system)
17759 `(#:modules ((guix build utils)
17760 (guix build python-build-system)
17765 (modify-phases %standard-phases
17768 (let ((cwd (getcwd)))
17769 (setenv "PYTHONPATH"
17770 (string-append cwd "/build/"
17771 (find (cut string-prefix? "lib" <>)
17772 (scandir (string-append cwd "/build")))
17774 (getenv "PYTHONPATH"))))
17777 (native-inputs `(("python-pytest" ,python-pytest)))
17778 (home-page "https://github.com/python/typed_ast")
17779 (synopsis "Fork of Python @code{ast} modules with type comment support")
17780 (description "This package provides a parser similar to the standard
17781 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
17782 include PEP 484 type comments and are independent of the version of Python
17783 under which they are run. The @code{typed_ast} parsers produce the standard
17784 Python AST (plus type comments), and are both fast and correct, as they are
17785 based on the CPython 2.7 and 3.7 parsers.")
17786 ;; See the file "LICENSE" for the details.
17787 (license (list license:psfl
17789 license:expat)))) ;ast27/Parser/spark.py
17791 (define-public python-typing
17793 (name "python-typing")
17794 (version "3.7.4.3")
17798 (uri (pypi-uri "typing" version))
17800 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
17801 (build-system python-build-system)
17802 (home-page "https://docs.python.org/3/library/typing.html")
17803 (synopsis "Type hints for Python")
17804 (description "This is a backport of the standard library @code{typing}
17805 module to Python versions older than 3.5. Typing defines a standard notation
17806 for Python function and variable type annotations. The notation can be used
17807 for documenting code in a concise, standard format, and it has been designed
17808 to also be used by static and runtime type checkers, static analyzers, IDEs
17810 (license license:psfl)))
17812 (define-public python2-typing
17813 (package-with-python2 python-typing))
17815 (define-public python-typing-extensions
17817 (name "python-typing-extensions")
17818 (version "3.7.4.2")
17822 (uri (pypi-uri "typing_extensions" version))
17825 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
17826 (build-system python-build-system)
17828 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
17829 (synopsis "Experimental type hints for Python")
17831 "The typing_extensions module contains additional @code{typing} hints not
17832 yet present in the of the @code{typing} standard library.
17833 Included are implementations of:
17836 @item ContextManager
17847 @item TYPE_CHECKING
17848 @item AsyncGenerator
17850 (license license:psfl)))
17852 (define-public bpython
17859 (uri (pypi-uri "bpython" version))
17861 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
17862 (build-system python-build-system)
17865 (modify-phases %standard-phases
17866 (add-after 'unpack 'remove-failing-test
17868 ;; Remove failing test. FIXME: make it pass
17869 (delete-file "bpython/test/test_args.py")
17871 (add-after 'wrap 'add-aliases
17872 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
17873 (lambda* (#:key outputs #:allow-other-keys)
17874 (let ((out (assoc-ref outputs "out")))
17877 (symlink old (string-append out "/bin/" new)))
17878 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
17879 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
17882 `(("python-pygments" ,python-pygments)
17883 ("python-requests" ,python-requests)
17884 ("python-babel" ,python-babel) ; optional, for internationalization
17885 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
17886 ("python-greenlet" ,python-greenlet)
17887 ("python-urwid" ,python-urwid) ; for bpython-urwid only
17888 ("python-six" ,python-six)))
17890 `(("python-sphinx" ,python-sphinx)
17891 ("python-mock" ,python-mock)))
17892 (home-page "https://bpython-interpreter.org/")
17893 (synopsis "Fancy interface to the Python interpreter")
17894 (description "Bpython is a fancy interface to the Python
17895 interpreter. bpython's main features are
17898 @item in-line syntax highlighting,
17899 @item readline-like autocomplete with suggestions displayed as you type,
17900 @item expected parameter list for any Python function,
17901 @item \"rewind\" function to pop the last line of code from memory and
17903 @item send the code you've entered off to a pastebin,
17904 @item save the code you've entered to a file, and
17905 @item auto-indentation.
17907 (license license:expat)))
17909 (define-public bpython2
17910 (let ((base (package-with-python2
17911 (strip-python2-variant bpython))))
17912 (package (inherit base)
17915 `(#:python ,python-2
17917 (modify-phases %standard-phases
17918 (add-after 'unpack 'remove-failing-test
17920 ;; Remove failing test. FIXME: make it pass
17921 (delete-file "bpython/test/test_args.py")
17922 ;; Disable failing test-cases (renaming inhibits they are
17924 (substitute* "bpython/test/test_curtsies_repl.py"
17925 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
17926 (string-append a "xxx_off_" b))
17927 (("^(\\s*def )(test_complex\\W)" _ a b)
17928 (string-append a "xxx_off_" b)))
17930 (add-before 'build 'rename-scripts
17931 ;; rename the scripts to bypthon2, bpdb2, etc.
17933 (substitute* "setup.py"
17934 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
17935 (string-append name "2" rest "\n"))
17936 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
17937 (string-append name "2" (or sub "") rest "\n")))
17940 (define-public python-pyinotify
17942 (name "python-pyinotify")
17946 (uri (pypi-uri "pyinotify" version))
17949 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
17950 (build-system python-build-system)
17951 (arguments `(#:tests? #f)) ;no tests
17952 (home-page "https://github.com/seb-m/pyinotify")
17953 (synopsis "Python library for monitoring inotify events")
17955 "@code{pyinotify} provides a Python interface for monitoring
17956 file system events on Linux.")
17957 (license license:expat)))
17959 (define-public python2-pyinotify
17960 (package-with-python2 python-pyinotify))
17962 ;; Ada parser uses this version.
17963 (define-public python2-quex-0.67.3
17965 (name "python2-quex")
17970 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
17971 (version-major+minor version)
17972 "/quex-" version ".zip"))
17975 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
17976 (build-system python-build-system)
17978 `(("unzip" ,unzip)))
17980 `(#:python ,python-2
17983 (modify-phases %standard-phases
17984 (delete 'configure)
17987 (lambda* (#:key outputs #:allow-other-keys)
17988 (let* ((out (assoc-ref outputs "out"))
17989 (share/quex (string-append out "/share/quex"))
17990 (bin (string-append out "/bin")))
17991 (copy-recursively "." share/quex)
17993 (symlink (string-append share/quex "/quex-exe.py")
17994 (string-append bin "/quex"))
17996 (native-search-paths
17997 (list (search-path-specification
17998 (variable "QUEX_PATH")
17999 (files '("share/quex")))))
18000 (home-page "http://quex.sourceforge.net/")
18001 (synopsis "Lexical analyzer generator in Python")
18002 (description "@code{quex} is a lexical analyzer generator in Python.")
18003 (license license:lgpl2.1+))) ; Non-military
18005 (define-public python2-quex
18006 (package (inherit python2-quex-0.67.3)
18007 (name "python2-quex")
18012 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18015 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18016 (file-name (string-append name "-" version ".tar.gz"))))))
18018 (define-public python-more-itertools
18020 (name "python-more-itertools")
18025 (uri (pypi-uri "more-itertools" version))
18028 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18029 (build-system python-build-system)
18030 (home-page "https://github.com/erikrose/more-itertools")
18031 (synopsis "More routines for operating on iterables, beyond itertools")
18032 (description "Python's built-in @code{itertools} module implements a
18033 number of iterator building blocks inspired by constructs from APL, Haskell,
18034 and SML. @code{more-itertools} includes additional building blocks for
18035 working with iterables.")
18036 (properties `((python2-variant . ,(delay python2-more-itertools))))
18037 (license license:expat)))
18039 ;; The 5.x series are the last versions supporting Python 2.7.
18040 (define-public python2-more-itertools
18042 (inherit python-more-itertools)
18043 (name "python2-more-itertools")
18047 (uri (pypi-uri "more-itertools" version))
18050 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18052 `(#:python ,python-2))
18054 `(("python2-six" ,python2-six-bootstrap)))))
18056 (define-public python-latexcodec
18058 (name "python-latexcodec")
18063 (uri (pypi-uri "latexcodec" version))
18065 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18066 (build-system python-build-system)
18068 `(("python-six" ,python-six)))
18069 (home-page "https://readthedocs.org/projects/latexcodec/")
18070 (synopsis "Work with LaTeX code in Python")
18071 (description "Lexer and codec to work with LaTeX code in Python.")
18072 (license license:expat)))
18074 (define-public python-pybtex
18076 (name "python-pybtex")
18081 (uri (pypi-uri "pybtex" version))
18083 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18084 (build-system python-build-system)
18086 `(("python-nose" ,python-nose)))
18088 `(("python-latexcodec" ,python-latexcodec)
18089 ("python-pyyaml" ,python-pyyaml)
18090 ("python-six" ,python-six)))
18092 `(#:test-target "nosetests"))
18093 (home-page "https://pybtex.org/")
18094 (synopsis "BibTeX-compatible bibliography processor")
18095 (description "Pybtex is a BibTeX-compatible bibliography processor written
18096 in Python. You can simply type pybtex instead of bibtex.")
18097 (license license:expat)))
18099 (define-public python-onetimepass
18101 (name "python-onetimepass")
18106 (uri (pypi-uri "onetimepass" version))
18108 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18109 (build-system python-build-system)
18110 (propagated-inputs `(("python-six" ,python-six)))
18111 (home-page "https://github.com/tadeck/onetimepass/")
18112 (synopsis "One-time password library")
18113 (description "Python one-time password library for HMAC-based (HOTP) and
18114 time-based (TOTP) passwords.")
18115 (license license:expat)))
18117 (define-public python-parso
18119 (name "python-parso")
18124 (uri (pypi-uri "parso" version))
18126 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18128 `(("python-pytest" ,python-pytest)))
18129 (build-system python-build-system)
18131 `(#:phases (modify-phases %standard-phases
18133 (lambda _ (invoke "pytest" "-vv"))))))
18134 (home-page "https://github.com/davidhalter/parso")
18135 (synopsis "Python Parser")
18136 (description "Parso is a Python parser that supports error recovery and
18137 round-trip parsing for different Python versions (in multiple Python versions).
18138 Parso is also able to list multiple syntax errors in your Python file.")
18139 (license license:expat)))
18141 (define-public python2-parso
18142 (package-with-python2 python-parso))
18144 (define-public python-async-generator
18146 (name "python-async-generator")
18151 (uri (pypi-uri "async_generator" version))
18154 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18155 (build-system python-build-system)
18157 `(("python-pytest" ,python-pytest)))
18158 (home-page "https://github.com/python-trio/async_generator")
18159 (synopsis "Async generators and context managers for Python 3.5+")
18160 (description "@code{async_generator} back-ports Python 3.6's native async
18161 generators and Python 3.7's context managers into Python 3.5.")
18163 (license (list license:expat license:asl2.0))))
18165 (define-public python-async-timeout
18167 (name "python-async-timeout")
18172 (uri (pypi-uri "async-timeout" version))
18175 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18176 (build-system python-build-system)
18177 (home-page "https://github.com/aio-libs/async_timeout/")
18178 (synopsis "Timeout context manager for asyncio programs")
18179 (description "@code{async-timeout} provides a timeout timeout context
18180 manager compatible with @code{asyncio}.")
18181 (license license:asl2.0)))
18183 (define-public python-glob2
18185 (name "python-glob2")
18190 (uri (git-reference
18191 (url "https://github.com/miracle2k/python-glob2")
18192 (commit (string-append "v" version))))
18193 (file-name (git-file-name name version))
18195 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18196 (build-system python-build-system)
18197 (home-page "https://github.com/miracle2k/python-glob2/")
18198 (synopsis "Extended Version of the python buildin glob module")
18199 (description "This is an extended version of the Python
18200 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18204 @item The ability to capture the text matched by glob patterns, and return
18205 those matches alongside the file names.
18206 @item A recursive @code{**} globbing syntax, akin for example to the
18207 @code{globstar} option of Bash.
18208 @item The ability to replace the file system functions used, in order to glob
18209 on virtual file systems.
18210 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18213 Glob2 currently based on the glob code from Python 3.3.1.")
18214 (license license:bsd-2)))
18216 (define-public python2-glob2
18217 (package-with-python2 python-glob2))
18219 (define-public python-gipc
18221 (name "python-gipc")
18226 (uri (pypi-uri "gipc" version ".zip"))
18229 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18230 (build-system python-build-system)
18232 `(("unzip" ,unzip)))
18234 `(("python-gevent" ,python-gevent)))
18235 (home-page "https://gehrcke.de/gipc/")
18236 (synopsis "Child process management in the context of gevent")
18237 (description "Usage of Python's multiprocessing package in a
18238 gevent-powered application may raise problems. With @code{gipc},
18239 process-based child processes can safely be created anywhere within a
18240 gevent-powered application.")
18241 (license license:expat)))
18243 (define-public python2-gipc
18244 (package-with-python2 python-gipc))
18246 (define-public python-fusepy
18248 (name "python-fusepy")
18253 (uri (pypi-uri "fusepy" version))
18256 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18257 (build-system python-build-system)
18260 (modify-phases %standard-phases
18261 (add-before 'build 'set-library-file-name
18262 (lambda* (#:key inputs #:allow-other-keys)
18263 (let ((fuse (assoc-ref inputs "fuse")))
18264 (substitute* "fuse.py"
18265 (("find_library\\('fuse'\\)")
18266 (string-append "'" fuse "/lib/libfuse.so'")))
18270 (home-page "https://github.com/fusepy/fusepy")
18271 (synopsis "Simple ctypes bindings for FUSE")
18272 (description "Python module that provides a simple interface to FUSE and
18273 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18274 (license license:isc)))
18276 (define-public python2-fusepy
18277 (package-with-python2 python-fusepy))
18279 (define-public python-fusepyng
18281 (name "python-fusepyng")
18286 (uri (pypi-uri "fusepyng" version))
18289 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18290 (build-system python-build-system)
18293 (modify-phases %standard-phases
18294 (add-after 'unpack 'set-libfuse-path
18295 (lambda* (#:key inputs #:allow-other-keys)
18296 (let ((fuse (assoc-ref inputs "fuse")))
18297 (substitute* "fusepyng.py"
18298 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18299 (string-append "\"" fuse "/lib/libfuse.so\""))))
18304 `(("python-paramiko" ,python-paramiko)))
18305 (home-page "https://github.com/rianhunter/fusepyng")
18306 (synopsis "Simple ctypes bindings for FUSE")
18307 (description "@code{fusepyng} is a Python module that provides a simple
18308 interface to FUSE on various operating systems. It's just one file and is
18309 implemented using @code{ctypes}.")
18310 (license license:isc)))
18312 (define-public python2-gdrivefs
18314 (name "python2-gdrivefs")
18319 (uri (pypi-uri "gdrivefs" version))
18322 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18323 (build-system python-build-system)
18325 `(#:python ,python-2
18327 (modify-phases %standard-phases
18328 (add-before 'build 'patch-setup-py
18330 ;; Update requirements from dependency==version
18331 ;; to dependency>=version
18332 (substitute* "gdrivefs/resources/requirements.txt"
18336 `(("python2-gipc" ,python2-gipc)
18337 ("python2-gevent" ,python2-gevent)
18338 ("python2-greenlet" ,python2-greenlet)
18339 ("python2-httplib2" ,python2-httplib2)
18340 ("python2-uritemplate" ,python2-uritemplate)
18341 ("python2-oauth2client" ,python2-oauth2client)
18342 ("python2-six" ,python2-six)))
18344 `(("python2-dateutil" ,python2-dateutil)
18345 ("python2-fusepy" ,python2-fusepy)
18346 ("python2-google-api-client" ,python2-google-api-client)))
18347 (home-page "https://github.com/dsoprea/GDriveFS")
18348 (synopsis "Mount Google Drive as a local file system")
18349 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18350 under Python 2.7.")
18351 (license license:gpl2)))
18353 (define-public python-userspacefs
18355 (name "python-userspacefs")
18360 (uri (pypi-uri "userspacefs" version))
18363 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18364 (build-system python-build-system)
18366 `(("python-fusepyng" ,python-fusepyng)))
18367 (home-page "https://github.com/rianhunter/userspacefs")
18368 (synopsis "User-space file systems for Python")
18370 "@code{userspacefs} is a library that allows you to easily write
18371 user-space file systems in Python.")
18372 (license license:gpl3+)))
18374 (define-public pybind11
18380 (uri (git-reference
18381 (url "https://github.com/pybind/pybind11")
18382 (commit (string-append "v" version))))
18385 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18386 (file-name (git-file-name name version))))
18387 (build-system cmake-build-system)
18389 `(("python" ,python-wrapper)
18391 ;; The following dependencies are used for tests.
18392 ("python-pytest" ,python-pytest)
18393 ("catch" ,catch-framework2-1)
18396 `(#:configure-flags
18397 (list (string-append "-DCATCH_INCLUDE_DIR="
18398 (assoc-ref %build-inputs "catch")
18401 #:phases (modify-phases %standard-phases
18402 (add-after 'install 'install-python
18403 (lambda* (#:key outputs #:allow-other-keys)
18404 (let ((out (assoc-ref outputs "out")))
18405 (with-directory-excursion "../source"
18406 (setenv "PYBIND11_USE_CMAKE" "yes")
18407 (invoke "python" "setup.py" "install"
18408 "--single-version-externally-managed"
18410 (string-append "--prefix=" out)))))))
18412 #:test-target "check"))
18413 (home-page "https://github.com/pybind/pybind11/")
18414 (synopsis "Seamless operability between C++11 and Python")
18416 "@code{pybind11} is a lightweight header-only library that exposes C++
18417 types in Python and vice versa, mainly to create Python bindings of existing
18418 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18419 library: to minimize boilerplate code in traditional extension modules by
18420 inferring type information using compile-time introspection.")
18421 (license license:bsd-3)))
18423 (define-public python-fasteners
18425 (name "python-fasteners")
18430 (uri (pypi-uri "fasteners" version))
18433 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18434 (build-system python-build-system)
18436 `(("python-monotonic" ,python-monotonic)
18437 ("python-six" ,python-six)))
18439 `(("python-testtools" ,python-testtools)))
18440 (home-page "https://github.com/harlowja/fasteners")
18441 (synopsis "Python package that provides useful locks")
18443 "This package provides a Python program that provides following locks:
18446 @item Locking decorator
18447 @item Reader-writer locks
18448 @item Inter-process locks
18449 @item Generic helpers
18451 (properties `((python2-variant . ,(delay python2-fasteners))))
18452 (license license:asl2.0)))
18454 (define-public python2-fasteners
18455 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18459 `(("python2-futures" ,python2-futures)
18460 ,@(package-propagated-inputs base))))))
18462 (define-public python-requests-file
18464 (name "python-requests-file")
18469 (uri (pypi-uri "requests-file" version))
18472 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18473 (build-system python-build-system)
18475 `(("python-requests" ,python-requests)
18476 ("python-six" ,python-six)))
18478 "https://github.com/dashea/requests-file")
18479 (synopsis "File transport adapter for Requests")
18481 "Requests-File is a transport adapter for use with the Requests Python
18482 library to allow local file system access via @code{file://} URLs.")
18483 (license license:asl2.0)))
18485 (define-public python2-requests-file
18486 (package-with-python2 python-requests-file))
18488 (define-public python-identify
18490 (name "python-identify")
18494 ;; There are no tests in the PyPI tarball.
18496 (uri (git-reference
18497 (url "https://github.com/chriskuehl/identify")
18498 (commit (string-append "v" version))))
18499 (file-name (git-file-name name version))
18501 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18502 (build-system python-build-system)
18505 (modify-phases %standard-phases
18508 (invoke "pytest" "-vv"))))))
18510 `(("python-coverage" ,python-coverage)
18511 ("python-pytest" ,python-pytest)))
18513 `(("python-editdistance" ,python-editdistance)))
18514 (home-page "https://github.com/chriskuehl/identify")
18515 (synopsis "File identification library for Python")
18517 "@code{identify} is a file identification library for Python. Given
18518 a file (or some information about a file), return a set of standardized tags
18519 identifying what the file is.")
18520 (license license:expat)))
18522 (define-public python-tldextract
18524 (name "python-tldextract")
18529 (uri (pypi-uri "tldextract" version))
18532 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18533 (build-system python-build-system)
18535 `(("python-pytest" ,python-pytest)
18536 ("python-responses" ,python-responses)))
18538 `(("python-idna" ,python-idna)
18539 ("python-requests" ,python-requests)
18540 ("python-requests-file" ,python-requests-file)))
18542 "https://github.com/john-kurkowski/tldextract")
18544 "Separate the TLD from the registered domain and subdomains of a URL")
18546 "TLDExtract accurately separates the TLD from the registered domain and
18547 subdomains of a URL, using the Public Suffix List. By default, this includes
18548 the public ICANN TLDs and their exceptions. It can optionally support the
18549 Public Suffix List's private domains as well.")
18550 (license license:bsd-3)))
18552 (define-public python2-tldextract
18553 (package-with-python2 python-tldextract))
18555 (define-public python-nodeenv
18557 (name "python-nodeenv")
18561 ;; There's no tarball in PyPI.
18563 (uri (git-reference
18564 (url "https://github.com/ekalinin/nodeenv")
18566 (file-name (git-file-name name version))
18568 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18569 (build-system python-build-system)
18572 (modify-phases %standard-phases
18575 ;; This test fails. It tries to open a network socket.
18576 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18578 `(("python-coverage" ,python-coverage)
18579 ("python-mock" ,python-mock)
18580 ("python-pytest" ,python-pytest)))
18581 (home-page "https://ekalinin.github.io/nodeenv/")
18582 (synopsis "Create isolated node.js environments")
18584 "Nodeenv (node.js virtual environment) is a tool to create isolated
18585 node.js environments. It creates an environment that has its own installation
18586 directories, that doesn't share libraries with other node.js virtual
18588 (license license:bsd-3)))
18590 (define-public python-pynamecheap
18592 (name "python-pynamecheap")
18597 (uri (pypi-uri "PyNamecheap" version))
18600 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18601 (build-system python-build-system)
18603 `(("python-requests" ,python-requests)))
18605 "https://github.com/Bemmu/PyNamecheap")
18607 "Namecheap API client in Python")
18609 "PyNamecheap is a Namecheap API client in Python.")
18610 (license license:expat)))
18612 (define-public python2-pynamecheap
18613 (package-with-python2 python-pynamecheap))
18615 (define-public python-dns-lexicon
18617 (name "python-dns-lexicon")
18622 (uri (pypi-uri "dns-lexicon" version))
18625 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18626 (build-system python-build-system)
18628 `(#:tests? #f)) ;requires internet access
18630 `(("python-future" ,python-future)
18631 ("python-pynamecheap" ,python-pynamecheap)
18632 ("python-requests" ,python-requests)
18633 ("python-tldextract" ,python-tldextract)
18634 ("python-urllib3" ,python-urllib3)))
18635 (home-page "https://github.com/AnalogJ/lexicon")
18637 "Manipulate DNS records on various DNS providers")
18639 "Lexicon provides a way to manipulate DNS records on multiple DNS
18640 providers in a standardized way. It has a CLI but it can also be used as a
18641 Python library. It was designed to be used in automation, specifically with
18643 (license license:expat)))
18645 (define-public python2-dns-lexicon
18646 (package-with-python2 python-dns-lexicon))
18648 (define-public python-cfgv
18650 (name "python-cfgv")
18654 ;; There are no tests in the PyPI tarball.
18656 (uri (git-reference
18657 (url "https://github.com/asottile/cfgv")
18658 (commit (string-append "v" version))))
18659 (file-name (git-file-name name version))
18661 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
18662 (build-system python-build-system)
18665 (modify-phases %standard-phases
18668 (invoke "pytest" "-vv"))))))
18670 `(("python-covdefaults" ,python-covdefaults)
18671 ("python-coverage" ,python-coverage)
18672 ("python-pytest" ,python-pytest)))
18673 (home-page "https://github.com/asottile/cfgv")
18674 (synopsis "Configuration validation library")
18676 "This library helps to validate configuration files and produce human
18677 readable error messages.")
18678 (license license:expat)))
18680 (define-public python-commandlines
18682 (name "python-commandlines")
18687 (uri (pypi-uri "commandlines" version))
18690 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
18691 (build-system python-build-system)
18692 (home-page "https://github.com/chrissimpkins/commandlines")
18693 (synopsis "Command line argument to object parsing library")
18695 "@code{Commandlines} is a Python library for command line application
18696 development that supports command line argument parsing, command string
18697 validation testing and application logic.")
18698 (license license:expat)))
18700 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
18701 ;; python-numba. They have a very unflexible relationship.
18702 (define-public python-numba
18704 (name "python-numba")
18709 (uri (pypi-uri "numba" version))
18712 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
18713 (build-system python-build-system)
18715 `(#:modules ((guix build utils)
18716 (guix build python-build-system)
18721 (modify-phases %standard-phases
18722 (add-after 'unpack 'disable-proprietary-features
18724 (setenv "NUMBA_DISABLE_HSA" "1")
18725 (setenv "NUMBA_DISABLE_CUDA" "1")
18727 (add-after 'unpack 'remove-failing-tests
18729 ;; FIXME: These tests fail for unknown reasons:
18730 ;; test_non_writable_pycache, test_non_creatable_pycache, and
18731 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
18732 (substitute* "numba/tests/test_dispatcher.py"
18733 (("def test(_non_writable_pycache)" _ m)
18734 (string-append "def guix_skip" m))
18735 (("def test(_non_creatable_pycache)" _ m)
18736 (string-append "def guix_skip" m))
18737 (("def test(_frozen)" _ m)
18738 (string-append "def guix_skip" m)))
18740 ;; These tests fail because we don't run the tests from the build
18741 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
18742 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
18743 (substitute* "numba/tests/test_pycc.py"
18744 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
18745 (string-append "def guix_skip" m)))
18747 ;; These tests fail because our version of Python does not have
18748 ;; a recognizable front-end for the Numba distribution to use
18749 ;; to check against.
18750 (substitute* "numba/tests/test_entrypoints.py"
18751 (("def test(_init_entrypoint)" _ m)
18752 (string-append "def guix_skip" m)))
18753 (substitute* "numba/tests/test_jitclasses.py"
18754 (("def test(_jitclass_longlabel_not_truncated)" _ m)
18755 (string-append "def guix_skip" m)))
18759 (let ((cwd (getcwd)))
18760 (setenv "PYTHONPATH"
18761 (string-append cwd "/build/"
18762 (find (cut string-prefix? "lib" <>)
18763 (scandir (string-append cwd "/build")))
18765 (getenv "PYTHONPATH")))
18766 ;; Something is wrong with the PYTHONPATH when running the
18767 ;; tests from the build directory, as it complains about not being
18768 ;; able to import certain modules.
18769 (with-directory-excursion "/tmp"
18770 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
18773 `(("python-llvmlite" ,python-llvmlite)
18774 ("python-numpy" ,python-numpy)
18775 ("python-singledispatch" ,python-singledispatch)))
18776 ;; Needed for tests.
18778 `(("python-jinja2" ,python-jinja2)
18779 ("python-pygments" ,python-pygments)))
18780 (home-page "https://numba.pydata.org")
18781 (synopsis "Compile Python code using LLVM")
18782 (description "Numba gives you the power to speed up your applications with
18783 high performance functions written directly in Python. With a few
18784 annotations, array-oriented and math-heavy Python code can be just-in-time
18785 compiled to native machine instructions, similar in performance to C, C++ and
18786 Fortran, without having to switch languages or Python interpreters.
18788 Numba works by generating optimized machine code using the LLVM compiler
18789 infrastructure at import time, runtime, or statically (using the included pycc
18791 (license license:bsd-3)))
18793 (define-public python-numcodecs
18795 (name "python-numcodecs")
18800 (uri (pypi-uri "numcodecs" version))
18803 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
18804 (build-system python-build-system)
18806 `(("python-numpy" ,python-numpy)
18807 ("python-msgpack" ,python-msgpack)))
18809 `(("python-pytest" ,python-pytest)
18810 ("python-setuptools-scm" ,python-setuptools-scm)))
18811 (home-page "https://github.com/zarr-developers/numcodecs")
18812 (synopsis "Buffer compression and transformation codecs")
18814 "This Python package provides buffer compression and transformation
18815 codecs for use in data storage and communication applications.")
18816 (license license:expat)))
18818 (define-public python-asciitree
18820 (name "python-asciitree")
18825 (uri (pypi-uri "asciitree" version))
18828 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
18829 (build-system python-build-system)
18830 (home-page "https://github.com/mbr/asciitree")
18831 (synopsis "Draws ASCII trees")
18832 (description "This package draws tree structures using characters.")
18833 (license license:expat)))
18835 (define-public python-zarr
18837 (name "python-zarr")
18842 (uri (pypi-uri "zarr" version))
18845 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
18846 (build-system python-build-system)
18849 (modify-phases %standard-phases
18850 (add-after 'unpack 'disable-service-tests
18852 (setenv "ZARR_TEST_ABS" "0")
18853 (setenv "ZARR_TEST_MONGO" "0")
18854 (setenv "ZARR_TEST_REDIS" "0")
18858 (invoke "pytest" "-vv" "-k" "not lmdb")
18861 `(("python-asciitree" ,python-asciitree)
18862 ("python-fasteners" ,python-fasteners)
18863 ("python-numcodecs" ,python-numcodecs)
18864 ("python-numpy" ,python-numpy)))
18866 `(("python-pytest" ,python-pytest)
18867 ("python-setuptools-scm" ,python-setuptools-scm)))
18868 (home-page "https://github.com/zarr-developers/zarr-python")
18869 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
18871 "This package provides an implementation of chunked, compressed,
18872 N-dimensional arrays for Python.")
18873 (license license:expat)))
18875 (define-public python-anndata
18877 (name "python-anndata")
18882 (uri (pypi-uri "anndata" version))
18885 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
18886 (build-system python-build-system)
18889 (modify-phases %standard-phases
18890 (add-after 'unpack 'delete-inconvenient-tests
18892 ;; This test depends on python-scikit-learn.
18893 (delete-file "anndata/tests/test_inplace_subset.py")
18896 (add-after 'install 'check
18897 (lambda* (#:key inputs outputs #:allow-other-keys)
18898 (add-installed-pythonpath inputs outputs)
18899 (invoke "pytest" "-vv"))))))
18901 `(("python-h5py" ,python-h5py)
18902 ("python-importlib-metadata" ,python-importlib-metadata)
18903 ("python-natsort" ,python-natsort)
18904 ("python-numcodecs" ,python-numcodecs)
18905 ("python-packaging" ,python-packaging)
18906 ("python-pandas" ,python-pandas)
18907 ("python-scipy" ,python-scipy)
18908 ("python-zarr" ,python-zarr)))
18910 `(("python-joblib" ,python-joblib)
18911 ("python-pytest" ,python-pytest)
18912 ("python-setuptools-scm" ,python-setuptools-scm)))
18913 (home-page "https://github.com/theislab/anndata")
18914 (synopsis "Annotated data for data analysis pipelines")
18915 (description "Anndata is a package for simple (functional) high-level APIs
18916 for data analysis pipelines. In this context, it provides an efficient,
18917 scalable way of keeping track of data together with learned annotations and
18918 reduces the code overhead typically encountered when using a mostly
18919 object-oriented library such as @code{scikit-learn}.")
18920 (license license:bsd-3)))
18922 (define-public python-dill
18924 (name "python-dill")
18925 (version "0.3.1.1")
18929 (uri (pypi-uri "dill" version))
18931 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
18932 (build-system python-build-system)
18935 (modify-phases %standard-phases
18938 (with-directory-excursion "/tmp"
18939 (invoke "nosetests" "-v"))
18942 `(("python-nose" ,python-nose)))
18943 (home-page "https://pypi.org/project/dill/")
18944 (synopsis "Serialize all of Python")
18945 (description "Dill extends Python's @code{pickle} module for serializing
18946 and de-serializing Python objects to the majority of the built-in Python
18947 types. Dill provides the user the same interface as the @code{pickle} module,
18948 and also includes some additional features. In addition to pickling Python
18949 objects, @code{dill} provides the ability to save the state of an interpreter
18950 session in a single command. Hence, it would be feasible to save a
18951 interpreter session, close the interpreter, ship the pickled file to another
18952 computer, open a new interpreter, unpickle the session and thus continue from
18953 the saved state of the original interpreter session.")
18954 (license license:bsd-3)))
18956 (define-public python-multiprocess
18958 (name "python-multiprocess")
18963 (uri (pypi-uri "multiprocess" version))
18966 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
18967 (build-system python-build-system)
18970 (modify-phases %standard-phases
18971 (add-after 'unpack 'disable-broken-tests
18973 ;; This test is broken as there is no keyboard interrupt.
18974 (substitute* "py3.7/multiprocess/tests/__init__.py"
18975 (("^(.*)def test_wait_result"
18977 (string-append indent
18978 "@unittest.skip(\"Disabled by Guix\")\n"
18981 ;; Tests must be run after installation.
18983 (add-after 'install 'check
18984 (lambda* (#:key inputs outputs #:allow-other-keys)
18985 (add-installed-pythonpath inputs outputs)
18986 (invoke "python" "-m" "multiprocess.tests")
18989 `(("python-dill" ,python-dill)))
18990 (home-page "https://pypi.org/project/multiprocess/")
18991 (synopsis "Multiprocessing and multithreading in Python")
18993 "This package is a fork of the multiprocessing Python package, a package
18994 which supports the spawning of processes using the API of the standard
18995 library's @code{threading} module.")
18996 (license license:bsd-3)))
18998 (define-public python-toolz
19000 (name "python-toolz")
19005 (uri (pypi-uri "toolz" version))
19008 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19009 (build-system python-build-system)
19010 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19011 ;; unregistered loader type"
19012 (arguments '(#:tests? #f))
19013 (home-page "https://github.com/pytoolz/toolz/")
19014 (synopsis "List processing tools and functional utilities")
19016 "This package provides a set of utility functions for iterators,
19017 functions, and dictionaries.")
19018 (license license:bsd-3)))
19020 (define-public python2-toolz
19021 (package-with-python2 python-toolz))
19023 (define-public python-cytoolz
19025 (name "python-cytoolz")
19026 (version "0.9.0.1")
19030 (uri (pypi-uri "cytoolz" version))
19033 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19034 (build-system python-build-system)
19035 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19037 (arguments '(#:tests? #f))
19039 `(("python-toolz" ,python-toolz)))
19041 `(("python-cython" ,python-cython)))
19042 (home-page "https://github.com/pytoolz/cytoolz")
19043 (synopsis "High performance functional utilities")
19045 "The cytoolz package implements the same API as provided by toolz. The
19046 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19047 that is accessible to other projects developed in Cython.")
19048 (license license:bsd-3)))
19050 (define-public python-sortedcontainers
19052 (name "python-sortedcontainers")
19057 (uri (pypi-uri "sortedcontainers" version))
19060 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19061 (build-system python-build-system)
19063 ;; FIXME: Tests require many extra dependencies, and would introduce
19064 ;; a circular dependency on hypothesis, which uses this package.
19067 `(("python-appdirs" ,python-appdirs)
19068 ("python-distlib" ,python-distlib)
19069 ("python-filelock" ,python-filelock)
19070 ("python-six" ,python-six-bootstrap)))
19071 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19072 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19074 "This package provides a sorted collections library, written in
19076 (license license:asl2.0)))
19078 (define-public python2-sortedcontainers
19079 (package-with-python2 python-sortedcontainers))
19081 (define-public python-cloudpickle
19083 (name "python-cloudpickle")
19088 (uri (pypi-uri "cloudpickle" version))
19091 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19092 (build-system python-build-system)
19094 '(#:phases (modify-phases %standard-phases
19095 (add-before 'check 'do-not-override-PYTHONPATH
19097 ;; Append to PYTHONPATH instead of overriding it so
19098 ;; that dependencies from Guix can be found.
19099 (substitute* "tests/testutils.py"
19100 (("env\\['PYTHONPATH'\\] = pythonpath")
19101 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19104 (lambda* (#:key tests? #:allow-other-keys)
19106 (invoke "pytest" "-s" "-vv")
19107 (format #t "test suite not run~%"))
19111 ("python-psutil" ,python-psutil)
19112 ("python-pytest" ,python-pytest)
19113 ("python-tornado" ,python-tornado)))
19114 (home-page "https://github.com/cloudpipe/cloudpickle")
19115 (synopsis "Extended pickling support for Python objects")
19117 "Cloudpickle makes it possible to serialize Python constructs not
19118 supported by the default pickle module from the Python standard library. It
19119 is especially useful for cluster computing where Python expressions are
19120 shipped over the network to execute on remote hosts, possibly close to the
19122 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19123 (license license:bsd-3)))
19125 (define-public python2-cloudpickle
19126 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19130 `(("python-mock" ,python2-mock)
19131 ,@(package-native-inputs base)))
19133 `(("python-futures" ,python2-futures)
19134 ,@(package-propagated-inputs base))))))
19136 (define-public python-locket
19138 (name "python-locket")
19143 (uri (pypi-uri "locket" version))
19146 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19147 (build-system python-build-system)
19148 (home-page "https://github.com/mwilliamson/locket.py")
19149 (synopsis "File-based locks for Python")
19151 "Locket implements a lock that can be used by multiple processes provided
19152 they use the same path.")
19153 (license license:bsd-2)))
19155 (define-public python2-locket
19156 (package-with-python2 python-locket))
19158 (define-public python-blosc
19160 (name "python-blosc")
19165 (uri (pypi-uri "blosc" version))
19168 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19169 (build-system python-build-system)
19170 ;; FIXME: all tests pass, but then this error is printed:
19171 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19172 (arguments '(#:tests? #f))
19174 `(("python-numpy" ,python-numpy)))
19175 (home-page "https://github.com/blosc/python-blosc")
19176 (synopsis "Python wrapper for the Blosc data compressor library")
19177 (description "Blosc is a high performance compressor optimized for binary
19178 data. It has been designed to transmit data to the processor cache faster
19179 than the traditional, non-compressed, direct memory fetch approach via a
19180 @code{memcpy()} system call.
19182 Blosc works well for compressing numerical arrays that contains data with
19183 relatively low entropy, like sparse data, time series, grids with
19184 regular-spaced values, etc.
19186 This Python package wraps the Blosc library.")
19187 (license license:bsd-3)))
19189 (define-public python2-blosc
19190 (package-with-python2 python-blosc))
19192 (define-public python-partd
19194 (name "python-partd")
19199 (uri (pypi-uri "partd" version))
19202 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19203 (build-system python-build-system)
19205 `(("python-blosc" ,python-blosc)
19206 ("python-locket" ,python-locket)
19207 ("python-numpy" ,python-numpy)
19208 ("python-pandas" ,python-pandas)
19209 ("python-pyzmq" ,python-pyzmq)
19210 ("python-toolz" ,python-toolz)))
19211 (home-page "https://github.com/dask/partd/")
19212 (synopsis "Appendable key-value storage")
19213 (description "Partd stores key-value pairs. Values are raw bytes. We
19214 append on old values. Partd excels at shuffling operations.")
19215 (license license:bsd-3)))
19217 (define-public python2-partd
19218 (package-with-python2 python-partd))
19220 (define-public python-fsspec
19222 (name "python-fsspec")
19227 (uri (pypi-uri "fsspec" version))
19230 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19231 (build-system python-build-system)
19232 (arguments '(#:tests? #f)) ; there are none
19233 (home-page "https://github.com/intake/filesystem_spec")
19234 (synopsis "File-system specification")
19235 (description "The purpose of this package is to produce a template or
19236 specification for a file-system interface, that specific implementations
19237 should follow, so that applications making use of them can rely on a common
19238 behavior and not have to worry about the specific internal implementation
19239 decisions with any given backend.")
19240 (license license:bsd-3)))
19242 (define-public python-dask
19244 (name "python-dask")
19249 (uri (pypi-uri "dask" version))
19251 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19252 (build-system python-build-system)
19255 (modify-phases %standard-phases
19256 (add-after 'unpack 'disable-broken-tests
19258 ;; This test is marked as xfail when pytest-xdist is used.
19259 (substitute* "dask/tests/test_threaded.py"
19260 (("def test_interrupt\\(\\)" m)
19261 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19263 ;; This one fails with a type error:
19264 ;; TypeError: Already tz-aware, use tz_convert to convert.
19265 (substitute* "dask/dataframe/tests/test_shuffle.py"
19266 (("def test_set_index_timestamp\\(\\)" m)
19267 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19271 (lambda _ (invoke "pytest" "-vv"))))))
19273 `(("python-cloudpickle" ,python-cloudpickle)
19274 ("python-fsspec" ,python-fsspec)
19275 ("python-numpy" ,python-numpy)
19276 ("python-packaging" ,python-packaging)
19277 ("python-pandas" ,python-pandas)
19278 ("python-partd" ,python-partd)
19279 ("python-toolz" ,python-toolz)
19280 ("python-pyyaml" ,python-pyyaml)))
19282 `(("python-pytest" ,python-pytest)
19283 ("python-pytest-runner" ,python-pytest-runner)))
19284 (home-page "https://github.com/dask/dask/")
19285 (synopsis "Parallel computing with task scheduling")
19287 "Dask is a flexible parallel computing library for analytics. It
19288 consists of two components: dynamic task scheduling optimized for computation,
19289 and large data collections like parallel arrays, dataframes, and lists that
19290 extend common interfaces like NumPy, Pandas, or Python iterators to
19291 larger-than-memory or distributed environments. These parallel collections
19292 run on top of the dynamic task schedulers. ")
19293 (license license:bsd-3)))
19295 (define-public python-ilinkedlist
19297 (name "python-ilinkedlist")
19302 (uri (pypi-uri "ilinkedlist" version))
19305 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19306 (build-system python-build-system)
19307 (native-inputs `(("python-pytest" ,python-pytest)))
19308 (inputs `(("python" ,python)))
19309 (home-page "https://github.com/luther9/ilinkedlist-py")
19310 (synopsis "Immutable linked list library")
19312 "This is a implementation of immutable linked lists for Python. It
19313 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19314 Since a linked list is treated as immutable, it is hashable, and its length
19315 can be retrieved in constant time. Some of the terminology is inspired by
19316 LISP. It is possible to create an improper list by creating a @code{Pair}
19317 with a non-list @code{cdr}.")
19318 (license license:gpl3+)))
19320 (define-public python-readlike
19322 (name "python-readlike")
19327 (uri (pypi-uri "readlike" version))
19329 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19330 (build-system python-build-system)
19331 (home-page "https://github.com/jangler/readlike")
19332 (synopsis "GNU Readline-like line editing module")
19334 "This Python module provides line editing functions similar to the default
19335 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19336 @code{readline} package, this one allows access to those capabilities in settings
19337 outside of a standard command-line interface. It is especially well-suited to
19338 interfacing with Urwid, due to a shared syntax for describing key inputs.
19340 Currently, all stateless Readline commands are implemented. Yanking and history
19341 are not supported.")
19342 (license license:expat)))
19344 (define-public python2-readlike
19345 (package-with-python2 python-readlike))
19347 (define-public python-reparser
19349 (name "python-reparser")
19354 (uri (pypi-uri "ReParser" version))
19356 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19357 (build-system python-build-system)
19358 (home-page "https://github.com/xmikos/reparser")
19359 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19361 "This Python library provides a simple lexer/parser for inline markup based
19362 on regular expressions.")
19363 (license license:expat)))
19365 (define-public python2-reparser
19366 (let ((reparser (package-with-python2
19367 (strip-python2-variant python-reparser))))
19368 (package (inherit reparser)
19370 `(("python2-enum34" ,python2-enum34)
19371 ,@(package-propagated-inputs reparser))))))
19373 (define-public python-retrying
19375 (name "python-retrying")
19380 (uri (git-reference
19381 (url "https://github.com/rholder/retrying")
19382 (commit (string-append "v" version))))
19383 (file-name (git-file-name name version))
19386 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19387 (build-system python-build-system)
19389 `(("python-six" ,python-six)))
19390 (home-page "https://github.com/rholder/retrying")
19391 (synopsis "Library for adding retry behavior")
19392 (description "Retrying is a general-purpose retrying library to simplify
19393 the task of adding retry behavior to just about anything.
19398 @item Generic Decorator API.
19399 @item Specify stop condition (i.e. limit by number of attempts).
19400 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19401 @item Customize retrying on Exceptions.
19402 @item Customize retrying on expected returned result.
19404 (license license:asl2.0)))
19406 (define-public python-precis-i18n
19408 (name "python-precis-i18n")
19413 (uri (pypi-uri "precis_i18n" version))
19416 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19417 (build-system python-build-system)
19418 (home-page "https://github.com/byllyfish/precis_i18n")
19419 (synopsis "Implementation of the PRECIS framework")
19421 "This module implements the PRECIS Framework as described in RFC 8264,
19422 RFC 8265 and RFC 8266.")
19423 (license license:expat)))
19425 (define-public python-absl-py
19427 (name "python-absl-py")
19432 (uri (pypi-uri "absl-py" version))
19435 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19436 (build-system python-build-system)
19438 `(("python-six" ,python-six)))
19439 (home-page "https://github.com/abseil/abseil-py")
19440 (synopsis "Abseil Python common libraries")
19442 "This package provides the Abseil Python Common Libraries, a collection
19443 of Python libraries for building Python applications.")
19444 (license license:asl2.0)))
19446 (define-public python-astor
19448 (name "python-astor")
19453 (uri (pypi-uri "astor" version))
19456 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19457 (build-system python-build-system)
19458 ;; FIXME: There are two errors and two test failures.
19459 (arguments `(#:tests? #f))
19460 (home-page "https://github.com/berkerpeksag/astor")
19461 (synopsis "Read and write Python ASTs")
19462 (description "Astor is designed to allow easy manipulation of Python
19463 source via the Abstract Syntax Tree.")
19464 (license license:bsd-3)))
19466 (define-public python2-astor
19467 (package-with-python2 python-astor))
19469 (define-public python-astunparse
19471 (name "python-astunparse")
19476 (uri (pypi-uri "astunparse" version))
19478 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19479 (build-system python-build-system)
19480 (arguments '(#:tests? #f)) ; there are none
19482 `(("python-six" ,python-six)
19483 ("python-wheel" ,python-wheel)))
19484 (home-page "https://github.com/simonpercivall/astunparse")
19485 (synopsis "AST unparser for Python")
19486 (description "This package provides an AST unparser for Python. It is a
19487 factored out version of @code{unparse} found in the Python source
19489 (license license:bsd-3)))
19491 (define-public python-gast
19493 (name "python-gast")
19498 (uri (pypi-uri "gast" version))
19500 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19501 (build-system python-build-system)
19503 `(("python-astunparse" ,python-astunparse)))
19504 (home-page "https://pypi.org/project/gast/")
19505 (synopsis "Generic Python AST that abstracts the underlying Python version")
19507 "GAST provides a compatibility layer between the AST of various Python
19508 versions, as produced by @code{ast.parse} from the standard @code{ast}
19510 (license license:bsd-3)))
19512 (define-public python-wikidata
19514 (name "python-wikidata")
19519 (uri (pypi-uri "Wikidata" version))
19522 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19523 (build-system python-build-system)
19525 `(("python-babel" ,python-babel)))
19526 (home-page "https://github.com/dahlia/wikidata")
19527 (synopsis "Wikidata client library")
19529 "This package provides a Python interface to
19530 @url{https://www.wikidata.org/, Wikidata}.")
19531 (properties '((upstream-name . "Wikidata")))
19532 (license license:gpl3+)))
19534 (define-public python-doctest-ignore-unicode
19536 (name "python-doctest-ignore-unicode")
19541 (uri (pypi-uri "doctest-ignore-unicode" version))
19544 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19545 (build-system python-build-system)
19547 `(("python-nose" ,python-nose)))
19548 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19549 (synopsis "Ignore Unicode literal prefixes in doctests")
19551 "This package adds support for a flag to ignore Unicode literal prefixes
19553 (license license:asl2.0)))
19555 (define-public python-attr
19557 (name "python-attr")
19562 (uri (pypi-uri "attr" version))
19565 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19566 (build-system python-build-system)
19567 (home-page "https://github.com/denis-ryzhkov/attr")
19568 (synopsis "Decorator for attributes of target function or class")
19569 (description "Simple decorator to set attributes of target function or
19570 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19571 (license license:expat)))
19573 (define-public python-construct
19575 (name "python-construct")
19576 (version "2.10.56")
19580 (uri (pypi-uri "construct" version))
19583 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19584 (build-system python-build-system)
19586 `(#:tests? #f)) ; No tests exist.
19588 `(("python-extras" ,python-extras)
19589 ("python-arrow" ,python-arrow)
19590 ("python-numpy" ,python-numpy)
19591 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19592 (home-page "https://construct.readthedocs.io")
19593 (synopsis "Declarative and symmetrical parser and builder for binary data")
19595 "This package provides both simple, atomic constructs (such as
19596 integers of various sizes), as well as composite ones which allow you
19597 form hierarchical and sequential structures of increasing complexity.
19598 It features bit and byte granularity, easy debugging and testing, an
19599 easy-to-extend subclass system, and lots of primitive constructs to
19600 make your work easier.")
19601 (license license:expat)))
19603 (define-public python-outcome
19605 (name "python-outcome")
19610 (uri (pypi-uri "outcome" version))
19612 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19613 (build-system python-build-system)
19616 (modify-phases %standard-phases
19618 (lambda* (#:key inputs outputs #:allow-other-keys)
19619 (add-installed-pythonpath inputs outputs)
19620 (invoke "pytest" "-vv"))))))
19622 `(("python-pytest" ,python-pytest)
19623 ("python-pytest-cov" ,python-pytest-cov)
19624 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19626 `(("python-async-generator" ,python-async-generator)
19627 ("python-attrs" ,python-attrs)))
19628 (home-page "https://github.com/python-trio/outcome")
19629 (synopsis "Capture the outcome of Python function calls")
19631 "Capture the outcome of Python function calls. Extracted from the Trio
19633 ;; Either license applies.
19634 (license (list license:expat license:asl2.0))))
19636 (define-public python-trio
19638 (name "python-trio")
19643 (uri (pypi-uri "trio" version))
19645 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
19646 (build-system python-build-system)
19649 (modify-phases %standard-phases
19650 (add-before 'check 'change-home
19652 ;; Tests require a writable home.
19653 (setenv "HOME" "/tmp")
19657 (invoke "pytest" "-vv" "-k"
19659 ;; This test times out.
19660 "not test_ki_protection_works"
19661 ;; Assertion errors.
19662 " and not test_guest_mode_ki"
19663 " and not test_run_in_trio_thread_ki"
19664 ;; These try to raise KeyboardInterrupt which does not work
19665 ;; in the build environment.
19666 " and not test_ki_self"
19667 " and not test_ki_wakes_us_up"
19668 ;; Failure in name resolution.
19669 " and not test_getnameinfo"
19670 " and not test_SocketType_resolve"
19671 ;; OSError: protocol not found.
19672 " and not test_getprotobyname")))))))
19674 `(("python-astor" ,python-astor)
19675 ("python-ipython" ,python-ipython)
19676 ("python-jedi" ,python-jedi)
19677 ("python-pylint" ,python-pylint)
19678 ("python-pyopenssl" ,python-pyopenssl)
19679 ("python-pytest" ,python-pytest)
19680 ("python-pytest-cov" ,python-pytest-cov)
19681 ("python-trustme" ,python-trustme)))
19683 `(("python-attrs" ,python-attrs)
19684 ("python-idna" ,python-idna)
19685 ("python-outcome" ,python-outcome)
19686 ("python-sniffio" ,python-sniffio)
19687 ("python-sortedcontainers"
19688 ,python-sortedcontainers)))
19689 (home-page "https://github.com/python-trio/trio")
19690 (synopsis "Friendly Python library for async concurrency and I/O")
19692 "Trio strives to be a production-quality, async/await-native I/O library
19693 for Python. Like all async libraries, its main purpose is to help you write
19694 programs that do multiple things at the same time with parallelized I/O.")
19695 ;; Either license applies.
19696 (license (list license:expat license:asl2.0))))
19698 (define-public python-trio-typing
19700 (name "python-trio-typing")
19705 (uri (pypi-uri "trio-typing" version))
19707 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
19708 (build-system python-build-system)
19711 (modify-phases %standard-phases
19714 (invoke "pytest" "-vv"))))))
19716 `(("python-attrs" ,python-attrs)
19717 ("python-pytest" ,python-pytest)))
19719 `(("python-mypy" ,python-mypy)
19720 ("python-mypy-extensions"
19721 ,python-mypy-extensions)
19722 ("python-trio" ,python-trio)
19723 ("python-typing-extensions"
19724 ,python-typing-extensions)))
19725 (home-page "https://github.com/python-trio/trio-typing")
19726 (synopsis "Static type checking support for Trio and related projects")
19728 "This package provides:
19731 @item PEP 561 typing stubs packages for the Trio project packages:
19734 @item trio (@code{trio-stubs})
19735 @item outcome (@code{outcome-stubs})
19736 @item async_generator (@code{async_generator-stubs})
19739 @item A package @code{trio_typing} containing types that Trio programs often
19740 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
19741 a mypy plugin that smooths over some limitations in the basic type hints.
19743 ;; Either license applies.
19744 (license (list license:expat license:asl2.0))))
19746 (define-public python-humanize
19748 (name "python-humanize")
19753 (uri (pypi-uri "humanize" version))
19756 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
19758 '(#:tests? #f)) ; tests not in pypi archive
19759 (build-system python-build-system)
19760 (home-page "https://github.com/jmoiron/humanize")
19761 (synopsis "Print numerical information in a human-readable form")
19762 (description "This package provides a Python module that displays numbers
19763 and dates in \"human readable\" forms. For example, it would display
19764 \"12345591313\" as \"12.3 billion\".")
19765 (license license:expat)))
19767 (define-public python-txaio
19769 (name "python-txaio")
19774 (uri (pypi-uri "txaio" version))
19777 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
19778 (build-system python-build-system)
19780 `(("python-twisted" ,python-twisted)
19781 ("python-six" ,python-six)))
19782 (home-page "https://github.com/crossbario/txaio")
19783 (synopsis "Compatibility layer between Python asyncio and Twisted")
19784 (description "Txaio provides a compatibility layer between the Python
19785 @code{asyncio} module and @code{Twisted}.")
19786 (license license:expat)))
19788 (define-public python-toolshed
19790 (name "python-toolshed")
19795 (uri (pypi-uri "toolshed" version))
19798 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
19799 (build-system python-build-system)
19801 `(("python-nose" ,python-nose)))
19802 (home-page "https://github.com/brentp/toolshed/")
19803 (synopsis "Collection of modules and functions for working with data")
19804 (description "This is a collection of well-tested, simple modules and
19805 functions that aim to reduce boilerplate when working with data.")
19806 (license license:bsd-2)))
19808 (define-public python-annoy
19810 (name "python-annoy")
19815 (uri (pypi-uri "annoy" version))
19818 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
19819 (build-system python-build-system)
19821 `(("python-nose" ,python-nose)))
19822 (home-page "https://github.com/spotify/annoy/")
19823 (synopsis "Approximate nearest neighbors library")
19825 "Annoy is a C++ library with Python bindings to search for points in
19826 space that are close to a given query point. It also creates large read-only
19827 file-based data structures that are @code{mmap}ped into memory so that many
19828 processes may share the same data.")
19829 (license license:asl2.0)))
19831 (define-public python-croniter
19833 (name "python-croniter")
19837 (uri (pypi-uri "croniter" version))
19840 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
19841 (build-system python-build-system)
19843 `(("python-dateutil" ,python-dateutil)
19844 ("python-natsort" ,python-natsort)))
19845 (home-page "https://github.com/kiorky/croniter")
19846 (synopsis "Iterate datetime objects with cron-like syntax")
19848 "@code{croniter} provides iteration for datetime object with cron-like
19850 (license license:expat)))
19852 (define-public python-pylzma
19854 (name "python-pylzma")
19859 (uri (pypi-uri "pylzma" version))
19862 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
19863 (build-system python-build-system)
19864 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
19865 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
19866 (description "This package provides Python bindings for the LZMA library
19868 (license license:lgpl2.1+)))
19870 (define-public python2-pylzma
19871 (package-with-python2 python-pylzma))
19873 (define-public python2-zeroconf
19875 (name "python2-zeroconf")
19877 ;; This is the last version that supports Python 2.x.
19882 (uri (pypi-uri "zeroconf" version))
19885 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
19886 (build-system python-build-system)
19888 `(#:python ,python-2
19890 (modify-phases %standard-phases
19891 (add-after 'unpack 'patch-requires
19892 (lambda* (#:key inputs #:allow-other-keys)
19893 (substitute* "setup.py"
19898 `(("python2-six" ,python2-six)
19899 ("python2-enum32" ,python2-enum34)
19900 ("python2-netifaces" ,python2-netifaces)
19901 ("python2-typing" ,python2-typing)))
19902 (home-page "https://github.com/jstasiak/python-zeroconf")
19903 (synopsis "Pure Python mDNS service discovery")
19905 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
19907 (license license:lgpl2.1+)))
19909 (define-public python-bsddb3
19911 (name "python-bsddb3")
19916 (uri (pypi-uri "bsddb3" version))
19919 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
19920 (build-system python-build-system)
19925 (modify-phases %standard-phases
19926 (add-after 'unpack 'configure-locations
19927 (lambda* (#:key inputs #:allow-other-keys)
19928 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
19929 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
19933 (invoke "python3" "test3.py" "-v"))))))
19934 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
19935 (synopsis "Python bindings for Oracle Berkeley DB")
19937 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
19938 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
19939 Transaction objects, and each of these is exposed as a Python type in the
19940 bsddb3.db module. The database objects can use various access methods: btree,
19941 hash, recno, and queue. Complete support of Berkeley DB distributed
19942 transactions. Complete support for Berkeley DB Replication Manager.
19943 Complete support for Berkeley DB Base Replication. Support for RPC.")
19944 (license license:bsd-3)))
19946 (define-public python-dbfread
19948 (name "python-dbfread")
19952 (uri (pypi-uri "dbfread" version))
19955 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
19956 (build-system python-build-system)
19958 `(("python-pytest" ,python-pytest)))
19959 (home-page "https://dbfread.readthedocs.io")
19960 (synopsis "Read DBF Files with Python")
19962 "This library reads DBF files and returns the data as native Python data
19963 types for further processing. It is primarily intended for batch jobs and
19965 (license license:expat)))
19967 (define-public python-cached-property
19969 (name "python-cached-property")
19974 (uri (pypi-uri "cached-property" version))
19977 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
19978 (build-system python-build-system)
19981 (modify-phases %standard-phases
19982 ;; https://github.com/pydanny/cached-property/issues/131
19983 ;; recent versions of freezegun break one test
19984 (add-after 'unpack 'disable-broken-test
19986 (substitute* "tests/test_cached_property.py"
19987 (("def test_threads_ttl_expiry\\(self\\)" m)
19988 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
19992 `(("python-freezegun" ,python-freezegun)))
19994 "https://github.com/pydanny/cached-property")
19996 "Decorator for caching properties in classes")
19998 "This package provides a decorator which makes caching
19999 time-or-computationally-expensive properties quick and easy and works in Python
20001 (license license:bsd-3)))
20003 (define-public python-folium
20005 (name "python-folium")
20010 (uri (pypi-uri "folium" version))
20012 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20013 (build-system python-build-system)
20015 `(("python-branca" ,python-branca)
20016 ("python-jinja2" ,python-jinja2)
20017 ("python-numpy" ,python-numpy)
20018 ("python-requests" ,python-requests)))
20020 `(("python-pytest" ,python-pytest)))
20021 (home-page "https://github.com/python-visualization/folium")
20022 (synopsis "Make beautiful maps with Leaflet.js & Python")
20023 (description "@code{folium} makes it easy to visualize data that’s been
20024 manipulated in Python on an interactive leaflet map. It enables both the
20025 binding of data to a map for @code{choropleth} visualizations as well as
20026 passing rich vector/raster/HTML visualizations as markers on the map.
20028 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20029 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20030 supports Image, Video, GeoJSON and TopoJSON overlays.")
20031 (license license:expat)))
20033 (define-public jube
20035 ;; This is a command-line tool, so no "python-" prefix.
20040 (uri (string-append
20041 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20045 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20046 (file-name (string-append "jube-" version ".tar.gz"))))
20047 (build-system python-build-system)
20048 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20049 (synopsis "Benchmarking environment")
20051 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20052 benchmarked application, benchmark data is stored in a format that allows JUBE
20053 to deduct the desired information. This data can be parsed by automatic pre-
20054 and post-processing scripts that draw information and store it more densely
20055 for manual interpretation.")
20056 (license license:gpl3+)))
20058 (define-public python-pyroutelib3
20060 (name "python-pyroutelib3")
20061 (version "1.3.post1")
20065 (uri (pypi-uri "pyroutelib3" version))
20068 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20069 (build-system python-build-system)
20071 `(("python-dateutil" ,python-dateutil)))
20072 (home-page "https://github.com/MKuranowski/pyroutelib3")
20073 (synopsis "Library for simple routing on OSM data")
20074 (description "Library for simple routing on OSM data")
20075 (license license:gpl3+)))
20077 (define-public python-bibtexparser
20079 (name "python-bibtexparser")
20084 (uri (pypi-uri "bibtexparser" version))
20087 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20088 (build-system python-build-system)
20090 `(("python-pyparsing" ,python-pyparsing)))
20092 `(("python-future" ,python-future)))
20093 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20094 (synopsis "Python library to parse BibTeX files")
20095 (description "BibtexParser is a Python library to parse BibTeX files.")
20096 (license (list license:bsd-3 license:lgpl3))))
20098 (define-public python-distro
20100 (name "python-distro")
20105 (uri (pypi-uri "distro" version))
20108 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20109 (build-system python-build-system)
20111 `(("python-pytest" ,python-pytest)))
20112 (home-page "https://github.com/nir0s/distro")
20114 "OS platform information API")
20116 "@code{distro} provides information about the OS distribution it runs on,
20117 such as a reliable machine-readable ID, or version information.
20119 It is the recommended replacement for Python's original
20120 `platform.linux_distribution` function (which will be removed in Python 3.8).
20121 @code{distro} also provides a command-line interface to output the platform
20122 information in various formats.")
20123 (license license:asl2.0)))
20125 (define-public python-cairosvg
20127 (name "python-cairosvg")
20132 (uri (pypi-uri "CairoSVG" version))
20134 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
20135 (build-system python-build-system)
20138 (modify-phases %standard-phases
20140 (lambda _ (invoke "pytest"))))))
20142 `(("python-cairocffi" ,python-cairocffi)
20143 ("python-cssselect2" ,python-cssselect2)
20144 ("python-defusedxml" ,python-defusedxml)
20145 ("python-pillow" ,python-pillow)
20146 ("python-tinycss2" ,python-tinycss2)))
20148 `(("python-pytest-flake8" ,python-pytest-flake8)
20149 ("python-pytest-isort" ,python-pytest-isort)
20150 ("python-pytest-runner" ,python-pytest-runner)))
20151 (home-page "https://cairosvg.org/")
20152 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20153 (description "CairoSVG is a SVG converter based on Cairo. It can export
20154 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20155 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20156 parsed, the result is drawn to a Cairo surface that can be exported to
20157 qvarious formats: PDF, PostScript, PNG and even SVG.")
20158 (license license:lgpl3+)))
20160 (define-public python-pyphen
20162 (name "python-pyphen")
20167 (uri (pypi-uri "Pyphen" version))
20169 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
20170 (build-system python-build-system)
20171 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20172 ;; embedded set provided by upstream - like Debian does.
20173 (home-page "https://github.com/Kozea/Pyphen")
20174 (synopsis "Pure Python module to hyphenate text")
20175 (description "Pyphen is a pure Python module to hyphenate text using
20176 existing Hunspell hyphenation dictionaries.")
20177 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20179 (define-public python-intelhex
20181 (name "python-intelhex")
20186 (uri (pypi-uri "intelhex" version))
20189 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20190 (build-system python-build-system)
20191 (arguments '(#:tests? #f)) ;issue with version
20192 (home-page "https://pypi.org/project/IntelHex/")
20193 (synopsis "Python library for Intel HEX files manipulations")
20194 (description "The Intel HEX file format is widely used in microprocessors
20195 and microcontrollers area (embedded systems etc.) as the de facto standard for
20196 representation of code to be programmed into microelectronic devices. This
20197 package provides an intelhex Python library to read, write, create from
20198 scratch and manipulate data from Intel HEX file format. It also includes
20199 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20200 converters and more, those based on the library itself.")
20201 (license license:bsd-3)))
20203 (define-public python-pykwalify
20205 (name "python-pykwalify")
20210 (uri (pypi-uri "pykwalify" version))
20213 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20214 (build-system python-build-system)
20215 (arguments '(#:tests? #f)) ;missing dependencies
20217 `(("python-dateutil" ,python-dateutil)
20218 ("python-docopt" ,python-docopt)
20219 ("python-pyyaml" ,python-pyyaml)))
20220 (home-page "https://github.com/grokzen/pykwalify")
20222 "Python lib/cli for JSON/YAML schema validation")
20224 "This package provides a parser, schema validator, and data binding tool
20225 for YAML and JSON.")
20226 (license license:expat)))
20228 (define-public python-dbusmock
20230 (name "python-dbusmock")
20235 (uri (pypi-uri "python-dbusmock" version))
20238 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20239 (build-system python-build-system)
20242 (modify-phases %standard-phases
20243 (add-after 'unpack 'patch-shell-path
20245 (substitute* "tests/test_code.py"
20246 (("/bin/bash") (which "bash")))
20250 ("dbus" ,dbus) ; for dbus-daemon
20251 ("python-nose" ,python-nose)
20254 `(("python-dbus" ,python-dbus)
20255 ("python-pygobject" ,python-pygobject)))
20256 (home-page "https://github.com/martinpitt/python-dbusmock")
20257 (synopsis "Python library for mock D-Bus objects")
20258 (description "python-dbusmock allows for the easy creation of mock objects on
20259 D-Bus. This is useful for writing tests for software which talks to D-Bus
20260 services such as upower, systemd, logind, gnome-session or others, and it is
20261 hard (or impossible without root privileges) to set the state of the real
20262 services to what you expect in your tests.")
20263 (license license:lgpl3+)))
20265 (define-public python-jsonplus
20267 (name "python-jsonplus")
20269 (home-page "https://github.com/randomir/jsonplus")
20272 (uri (pypi-uri "jsonplus" version))
20275 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20276 (build-system python-build-system)
20277 ;; XXX: No tests on PyPI, and the repository has no tags.
20278 (arguments '(#:tests? #f))
20280 `(("python-dateutil" ,python-dateutil)
20281 ("python-simplejson" ,python-simplejson)
20282 ("python-sortedcontainers" ,python-sortedcontainers)))
20283 (synopsis "Serialize Python types to/from JSON")
20285 "This package provides functionality to serialize arbitrary data types
20286 to and from JSON. Common data types are implemented and it is easy to
20287 register custom encoders and decoders.")
20288 (license license:expat)))
20290 (define-public python-ujson
20292 (name "python-ujson")
20297 (uri (pypi-uri "ujson" version))
20300 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
20301 (modules '((guix build utils)))
20303 '(begin (delete-file-recursively "deps") #t))))
20304 (build-system python-build-system)
20307 (modify-phases %standard-phases
20308 (add-after 'unpack 'link-to-system-double-conversion
20309 (lambda* (#:key inputs #:allow-other-keys)
20310 (let ((d-c (assoc-ref inputs "double-conversion")))
20311 (substitute* "setup.py"
20312 (("./deps/double-conversion/double-conversion\"")
20313 (string-append d-c "/include/double-conversion\""))
20315 (string-append "-L" d-c "/lib\","
20316 " \"-ldouble-conversion\","
20320 (lambda* (#:key inputs outputs #:allow-other-keys)
20321 (add-installed-pythonpath inputs outputs)
20322 (invoke "pytest"))))))
20324 `(("double-conversion" ,double-conversion)
20325 ("python-setuptools-scm" ,python-setuptools-scm)
20326 ("python-pytest" ,python-pytest)))
20327 (home-page "https://github.com/ultrajson/ultrajson")
20328 (synopsis "Ultra fast JSON encoder and decoder for Python")
20330 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20331 bindings for Python 3.")
20332 (license license:bsd-3)))
20334 (define-public python-ujson-1
20336 (inherit python-ujson)
20341 (uri (pypi-uri "ujson" version))
20344 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
20346 '(#:phases %standard-phases))
20347 (native-inputs '())
20348 (home-page "http://www.esn.me")
20350 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20351 bindings for Python 2.5+ and 3.")))
20353 (define-public python2-ujson-1
20354 (package-with-python2 python-ujson-1))
20356 (define-public python-iocapture
20357 ;; The latest release is more than a year older than this commit.
20358 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20361 (name "python-iocapture")
20366 (uri (git-reference
20367 (url "https://github.com/oinume/iocapture")
20369 (file-name (git-file-name name version))
20372 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20373 (build-system python-build-system)
20376 (modify-phases %standard-phases
20378 (add-after 'install 'check
20379 (lambda* (#:key inputs outputs #:allow-other-keys)
20380 (add-installed-pythonpath inputs outputs)
20381 (invoke "py.test" "-v" "tests")
20384 `(("python-flexmock" ,python-flexmock)
20385 ("python-pytest" ,python-pytest)
20386 ("python-pytest-cov" ,python-pytest-cov)
20387 ("python-six" ,python-six)))
20388 (home-page "https://github.com/oinume/iocapture")
20389 (synopsis "Python capturing tool for stdout and stderr")
20391 "This package helps you to capture the standard out (stdout) and the
20392 standard error channel (stderr) in your program.")
20393 (license license:expat))))
20395 (define-public python-argh
20396 ;; There are 21 commits since the latest release containing important
20398 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20401 (name "python-argh")
20402 (version (git-version "0.26.2" revision commit))
20406 (uri (git-reference
20407 (url "https://github.com/neithere/argh")
20409 (file-name (git-file-name name version))
20412 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20413 (build-system python-build-system)
20415 `(("python-iocapture" ,python-iocapture)
20416 ("python-mock" ,python-mock)
20417 ("python-pytest" ,python-pytest)
20418 ("python-pytest-cov" ,python-pytest-cov)
20419 ("python-pytest-xdist" ,python-pytest-xdist)
20420 ("python-tox" ,python-tox)))
20421 (home-page "https://github.com/neithere/argh/")
20422 (synopsis "Argparse wrapper with natural syntax")
20424 "python-argh is a small library that provides several layers of
20425 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20426 always possible to declare a command with the highest possible (and least
20427 flexible) layer and then tune the behaviour with any of the lower layers
20428 including the native API of @code{python-argparse}.")
20429 (license license:lgpl3+))))
20431 (define-public python-ppft
20433 (name "python-ppft")
20434 (version "1.6.6.1")
20438 (uri (pypi-uri "ppft" version))
20441 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20442 (build-system python-build-system)
20443 (arguments '(#:tests? #f)) ; there are none
20445 `(("python-six" ,python-six)))
20446 (home-page "https://pypi.org/project/ppft/")
20447 (synopsis "Fork of Parallel Python")
20449 "This package is a fork of Parallel Python. The Parallel Python
20450 module (@code{pp}) provides an easy and efficient way to create
20451 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20452 computers and clusters. It features cross-platform portability and dynamic
20454 (license license:bsd-3)))
20456 (define-public python-pox
20458 (name "python-pox")
20463 (uri (pypi-uri "pox" version))
20466 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20467 (build-system python-build-system)
20470 (modify-phases %standard-phases
20473 (mkdir-p "/tmp/guix")
20474 (setenv "SHELL" "bash")
20475 (setenv "USERNAME" "guix")
20476 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20477 (invoke "py.test" "-vv")
20480 `(("python-pytest" ,python-pytest)
20482 (home-page "https://pypi.org/project/pox/")
20483 (synopsis "Python utilities for file system exploration and automated builds")
20485 "Pox provides a collection of utilities for navigating and manipulating
20486 file systems. This module is designed to facilitate some of the low-level
20487 operating system interactions that are useful when exploring a file system on a
20488 remote host. Pox provides Python equivalents of several shell commands such
20489 as @command{which} and @command{find}. These commands allow automated
20490 discovery of what has been installed on an operating system, and where the
20491 essential tools are located.")
20492 (license license:bsd-3)))
20494 (define-public python-pathos
20496 (name "python-pathos")
20501 (uri (pypi-uri "pathos" version))
20504 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20505 (build-system python-build-system)
20508 (modify-phases %standard-phases
20511 (setenv "PYTHONPATH"
20512 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20513 (invoke "python" "./tests/__main__.py"))))))
20515 `(("python-dill" ,python-dill)
20516 ("python-multiprocess" ,python-multiprocess)
20517 ("python-pox" ,python-pox)
20518 ("python-ppft" ,python-ppft)))
20520 `(("python-pytest" ,python-pytest)))
20521 (home-page "https://pypi.org/project/pathos/")
20523 "Parallel graph management and execution in heterogeneous computing")
20525 "Python-pathos is a framework for heterogeneous computing. It provides a
20526 consistent high-level interface for configuring and launching parallel
20527 computations across heterogeneous resources. Python-pathos provides configurable
20528 launchers for parallel and distributed computing, where each launcher contains
20529 the syntactic logic to configure and launch jobs in an execution environment.")
20530 (license license:bsd-3)))
20532 (define-public python-flit
20534 (name "python-flit")
20539 (uri (pypi-uri "flit" version))
20542 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
20543 (build-system python-build-system)
20545 `(#:tests? #f)) ; XXX: Check requires network access.
20546 (home-page "https://flit.readthedocs.io/")
20548 "Simple packaging tool for simple packages")
20550 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20551 packages a single importable module or package at a time, using the import
20552 name as the name on PyPI. All subpackages and data files within a package
20553 are included automatically.")
20554 (license license:bsd-3)))
20556 (define-public python-pathtools
20558 (name "python-pathtools")
20563 (uri (pypi-uri "pathtools" version))
20566 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20567 (build-system python-build-system)
20569 "https://github.com/gorakhargosh/pathtools")
20570 (synopsis "Path utilities for Python")
20571 (description "Pattern matching and various utilities for file systems
20573 (license license:expat)))
20575 (define-public python-fastentrypoints
20577 (name "python-fastentrypoints")
20582 (uri (pypi-uri "fastentrypoints" version))
20585 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20586 (build-system python-build-system)
20588 "https://github.com/ninjaaron/fast-entry_points")
20590 "Makes entry_points specified in setup.py load more quickly")
20592 "Using entry_points in your setup.py makes scripts that start really
20593 slowly because it imports pkg_resources. This package allows such setup
20594 scripts to load entry points more quickly.")
20595 (license license:bsd-3)))
20597 (define-public python-funcparserlib
20599 (name "python-funcparserlib")
20604 (uri (pypi-uri "funcparserlib" version))
20607 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20609 `(("python-tox" ,python-tox)))
20612 (modify-phases %standard-phases
20615 (invoke "tox"))))))
20616 (build-system python-build-system)
20618 "https://github.com/vlasovskikh/funcparserlib")
20620 "Recursive descent parsing library based on functional combinators")
20622 "This package is a recursive descent parsing library for Python based on
20623 functional combinators. Parser combinators are just higher-order functions
20624 that take parsers as their arguments and return them as result values.")
20625 (license license:expat)))
20627 (define-public python-speg
20629 (name "python-speg")
20634 (uri (pypi-uri "speg" version ".zip"))
20636 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20638 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20640 `(("unzip" ,unzip)))
20641 (build-system python-build-system)
20642 (home-page "https://github.com/avakar/speg")
20643 (synopsis "PEG-based parser interpreter with memoization")
20644 (description "This package is a PEG-based parser and interpreter with
20646 (license license:expat)))
20648 (define-public python-cson
20650 (name "python-cson")
20655 (uri (pypi-uri "cson" version))
20657 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20658 (build-system python-build-system)
20660 `(("python-speg" ,python-speg)))
20661 (home-page "https://github.com/avakar/pycson")
20662 (synopsis "Parser for Coffeescript Object Notation (CSON)")
20663 (description "This package is a parser for Coffeescript Object
20665 (license license:expat)))
20667 (define-public python-asynctest
20669 (name "python-asynctest")
20674 (uri (pypi-uri "asynctest" version))
20677 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20678 (build-system python-build-system)
20681 (modify-phases %standard-phases
20684 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20685 (add-after 'unpack 'disable-tests
20687 ;; XXX: 7 tests fail out of 220. Disable them for now.
20688 (substitute* (list "test/test_selector.py"
20689 "test/test_mock.py")
20690 (("def test_events_watched_outside_test_are_ignored")
20691 "@unittest.skip('disabled by guix')
20692 def test_events_watched_outside_test_are_ignored")
20693 (("def test_awaited_from_autospec_mock.*" line)
20694 (string-append line " return True\n"))
20695 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
20696 (string-append line " return True\n"))
20697 (("def test_patch_coroutine_with_multiple_scopes.*" line)
20698 (string-append line " return True\n"))
20699 (("def test_multiple_patches_on_coroutine.*" line)
20700 (string-append line " return True\n"))
20701 (("def test_patch_coroutine_only_when_running.*" line)
20702 (string-append line " return True\n")))
20704 (home-page "https://github.com/Martiusweb/asynctest")
20705 (synopsis "Extension of unittest for testing asyncio libraries")
20707 "The package asynctest is built on top of the standard unittest module
20708 and cuts down boilerplate code when testing libraries for asyncio.")
20709 (license license:asl2.0)))
20711 (define-public python-aionotify
20713 (name "python-aionotify")
20717 ;; Source tarball on PyPi lacks tests
20719 (uri (git-reference
20720 (url "https://github.com/rbarrois/aionotify")
20721 (commit (string-append "v" version))))
20722 (file-name (git-file-name name version))
20724 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
20725 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
20726 (build-system python-build-system)
20727 (home-page "https://github.com/rbarrois/aionotify")
20728 (synopsis "Asyncio-powered inotify library")
20730 "@code{aionotify} is a simple, asyncio-based inotify library.")
20731 (license license:bsd-3)))
20733 (define-public python-forbiddenfruit
20735 (name "python-forbiddenfruit")
20739 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
20741 (uri (git-reference
20742 (url "https://github.com/clarete/forbiddenfruit")
20744 (file-name (git-file-name name version))
20746 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
20747 (build-system python-build-system)
20750 (modify-phases %standard-phases
20753 (invoke "make" "SKIP_DEPS=1"))))))
20755 `(("python-nose" ,python-nose)
20756 ("python-coverage" ,python-coverage)))
20757 (home-page "https://github.com/clarete/forbiddenfruit")
20758 (synopsis "Patch python built-in objects")
20759 (description "This project allows Python code to extend built-in types.")
20760 (license (list license:gpl3+ license:expat))))
20762 (define-public python-shouldbe
20764 (name "python-shouldbe")
20769 (uri (pypi-uri "shouldbe" version))
20772 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
20773 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
20774 (build-system python-build-system)
20776 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
20778 `(("python-nose" ,python-nose)))
20779 (home-page "https://github.com/directxman12/should_be")
20780 (synopsis "Python Assertion Helpers inspired by Shouldly")
20782 "Python Assertion Helpers inspired by Shouldly.")
20783 (license license:isc)))
20785 (define-public python-k5test
20787 (name "python-k5test")
20792 (uri (pypi-uri "k5test" version))
20795 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
20796 (build-system python-build-system)
20798 `(("python-six" ,python-six)
20799 ;; `which`, `kadmin.local` binaries called inside library
20801 ("mit-krb5" ,mit-krb5)))
20802 (native-inputs `(("mit-krb5" ,mit-krb5)))
20805 (modify-phases %standard-phases
20806 (add-after 'unpack 'patch-paths
20808 (substitute* "k5test/realm.py"
20809 (("'kadmin_local'") "'kadmin.local'")))))))
20810 (home-page "https://github.com/pythongssapi/k5test")
20811 (synopsis "Library for setting up self-contained Kerberos 5 environments")
20813 "@code{k5test} is a library for setting up self-contained Kerberos 5
20814 environments, and running Python unit tests inside those environments. It is
20815 based on the file of the same name found alongside the MIT Kerberos 5 unit
20817 (license license:isc)))
20819 (define-public python-gssapi
20821 (name "python-gssapi")
20826 (uri (pypi-uri "gssapi" version))
20829 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
20830 (build-system python-build-system)
20833 (modify-phases %standard-phases
20835 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
20836 (add-before 'check 'disable-failing-tests
20838 (let ((reason "Disabled failing test (see: \
20839 https://github.com/pythongssapi/python-gssapi/issues/220)."))
20840 (substitute* "gssapi/tests/test_high_level.py"
20841 ((".*def test_add_with_impersonate.*" all)
20842 (string-append all " self.skipTest('" reason "')\n")))
20843 (substitute* "gssapi/tests/test_raw.py"
20844 ((".*def test_.*impersonate_name.*" all)
20845 (string-append all " self.skipTest('" reason "')\n")))
20848 `(("python-decorator" ,python-decorator)
20849 ("python-six" ,python-six)))
20851 `(("mit-krb5" ,mit-krb5)))
20854 `(("python-shouldbe" ,python-shouldbe)
20855 ("python-parameterized" ,python-parameterized)
20856 ("python-k5test" ,python-k5test)
20857 ("python-nose" ,python-nose)))
20858 (home-page "https://github.com/pythongssapi/python-gssapi")
20859 (synopsis "Python GSSAPI Wrapper")
20861 "Python-GSSAPI provides both low-level and high level wrappers around the
20862 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
20863 also be usable with other GSSAPI mechanisms.")
20864 (license license:isc)))
20866 (define-public python-check-manifest
20868 (name "python-check-manifest")
20873 (uri (pypi-uri "check-manifest" version))
20876 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
20877 (build-system python-build-system)
20879 `(("python-mock" ,python-mock)
20881 (home-page "https://github.com/mgedmin/check-manifest")
20882 (synopsis "Check MANIFEST.in in a Python source package for completeness")
20883 (description "Python package can include a MANIFEST.in file to help with
20884 sending package files to the Python Package Index. This package checks that
20885 file to ensure it completely and accurately describes your project.")
20886 (license license:expat)))
20888 (define-public python-android-stringslib
20890 (name "python-android-stringslib")
20895 (uri (git-reference
20896 (url "https://framagit.org/tyreunom/python-android-strings-lib")
20897 (commit (string-append "v" version))))
20898 (file-name (git-file-name name version))
20901 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
20902 (build-system python-build-system)
20905 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
20906 (synopsis "Android strings.xml support")
20907 (description "Android Strings Lib provides support for android's strings.xml
20908 files. These files are used to translate strings in android apps.")
20909 (license license:expat)))
20911 (define-public python-watchdog
20913 (name "python-watchdog")
20918 (uri (pypi-uri "watchdog" version))
20921 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
20922 (build-system python-build-system)
20925 (modify-phases %standard-phases
20926 (add-before 'check 'remove-failing
20928 (delete-file "tests/test_inotify_buffer.py")
20929 (delete-file "tests/test_snapshot_diff.py")
20932 `(("python-argh" ,python-argh)
20933 ("python-pathtools" ,python-pathtools)
20934 ("python-pyyaml" ,python-pyyaml)))
20936 `(("python-pytest-cov" ,python-pytest-cov)
20937 ("python-pytest-timeout" ,python-pytest-timeout)))
20938 (home-page "https://github.com/gorakhargosh/watchdog")
20939 (synopsis "File system events monitoring")
20940 (description "This package provides a way to monitor file system events
20941 such as a file modification and trigger an action. This is similar to inotify,
20943 (license license:asl2.0)))
20945 (define-public python-watchgod
20947 (name "python-watchgod")
20951 ;; There are no tests in the PyPI tarball.
20953 (uri (git-reference
20954 (url "https://github.com/samuelcolvin/watchgod")
20955 (commit (string-append "v" version))))
20956 (file-name (git-file-name name version))
20958 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
20959 (build-system python-build-system)
20962 (modify-phases %standard-phases
20965 (invoke "pytest" "-vv"))))))
20967 `(("python-coverage" ,python-coverage)
20968 ("python-docutils" ,python-docutils)
20969 ("python-flake8" ,python-flake8)
20970 ("python-isort" ,python-isort)
20971 ("python-pycodestyle" ,python-pycodestyle)
20972 ("python-pyflakes" ,python-pyflakes)
20973 ("python-pygments" ,python-pygments)
20974 ("python-pytest" ,python-pytest)
20975 ("python-pytest-cov" ,python-pytest-cov)
20976 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
20977 ("python-pytest-mock" ,python-pytest-mock)
20978 ("python-pytest-sugar" ,python-pytest-sugar)
20979 ("python-pytest-toolbox" ,python-pytest-toolbox)))
20980 (home-page "https://github.com/samuelcolvin/watchgod")
20981 (synopsis "Simple, modern file watching and code reload in Python")
20983 "Simple, modern file watching and code reload in Python inspired by
20984 @code{watchdog}. Among the differences are a unified approach for each
20985 operating systems and an elegant approach to concurrency using threading.")
20986 (license license:expat)))
20988 (define-public python-wget
20990 (name "python-wget")
20995 (uri (pypi-uri "wget" version ".zip"))
20998 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
20999 (build-system python-build-system)
21000 (native-inputs `(("unzip" ,unzip)))
21001 (home-page "https://bitbucket.org/techtonik/python-wget/")
21002 (synopsis "Pure Python download utility")
21003 (description "The python-wget library provides an API to download files
21004 with features similar to the @command{wget} utility.")
21005 (license license:unlicense)))
21007 (define-public offlate
21014 (uri (git-reference
21015 (url "https://framagit.org/tyreunom/offlate")
21017 (file-name (git-file-name name version))
21020 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21021 (build-system python-build-system)
21026 `(("python-android-stringslib" ,python-android-stringslib)
21027 ("python-dateutil" ,python-dateutil)
21028 ("python-gitlab" ,python-gitlab)
21029 ("python-lxml" ,python-lxml)
21030 ("python-polib" ,python-polib)
21031 ("python-pyenchant" ,python-pyenchant)
21032 ("python-pygit2" ,python-pygit2)
21033 ("python-pygithub" ,python-pygithub)
21034 ("python-pyqt" ,python-pyqt)
21035 ("python-requests" ,python-requests)
21036 ("python-ruamel.yaml" ,python-ruamel.yaml)
21037 ("python-translation-finder" ,python-translation-finder)
21038 ("python-watchdog" ,python-watchdog)))
21040 `(("qttools" ,qttools)))
21041 (home-page "https://framagit.org/tyreunom/offlate")
21042 (synopsis "Offline translation interface for online translation tools")
21043 (description "Offlate offers a unified interface for different translation
21044 file formats, as well as many different online translation platforms. You can
21045 use it to get work from online platforms, specialized such as the Translation
21046 Project, or not such a gitlab instance when your upstream doesn't use any
21047 dedicated platform. The tool proposes a unified interface for any format and
21048 an upload option to send your work back to the platform.")
21049 (license license:gpl3+)))
21051 (define-public python-titlecase
21053 (name "python-titlecase")
21058 (uri (pypi-uri "titlecase" version))
21061 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21062 (build-system python-build-system)
21064 `(("python-nose" ,python-nose)))
21065 (home-page "https://github.com/ppannuto/python-titlecase")
21066 (synopsis "Capitalize strings similar to book titles")
21068 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21069 It capitalizes (predominantly English) strings in a way that is similar to
21070 book titles, using the New York Times Manual of Style to leave certain words
21072 (license license:expat)))
21074 (define-public python-pypng
21076 (name "python-pypng")
21081 (uri (pypi-uri "pypng" version))
21083 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21084 (build-system python-build-system)
21085 (home-page "https://github.com/drj11/pypng")
21086 (synopsis "Pure Python PNG image encoder/decoder")
21088 "The PyPNG module implements support for PNG images. It reads and writes
21089 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21090 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21091 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21092 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21093 A number of optional chunks can be specified (when writing) and
21094 understood (when reading): tRNS, bKGD, gAMA.
21096 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21097 aim at being a replacement or competitor. Its strength lies in fine-grained
21098 extensive support of PNG features. It can also read and write Netpbm PAM
21099 files, with a focus on its use as an intermediate format for implementing
21100 custom PNG processing.")
21101 (license license:expat)))
21103 (define-public python-fuzzywuzzy
21105 (name "python-fuzzywuzzy")
21110 (uri (pypi-uri "fuzzywuzzy" version))
21113 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21114 (build-system python-build-system)
21116 `(("python-hypothesis" ,python-hypothesis)
21117 ("python-pycodestyle" ,python-pycodestyle)
21118 ("python-pytest" ,python-pytest)))
21120 `(("python-levenshtein" ,python-levenshtein)))
21121 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21122 (synopsis "Fuzzy string matching in Python")
21123 (description "Approximate string matching using
21124 @emph{Levenshtein Distance} to calculate the differences between
21126 (license license:gpl2)))
21128 (define-public python2-fuzzywuzzy
21129 (package-with-python2 python-fuzzywuzzy))
21131 (define-public python-block-tracing
21133 (name "python-block-tracing")
21138 (uri (pypi-uri "block_tracing" version))
21141 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21142 (build-system python-build-system)
21143 (arguments '(#:tests? #f)) ; no tests
21144 (home-page "https://github.com/rianhunter/block_tracing")
21145 (synopsis "Protect process memory")
21147 "@code{block_tracing} is a tiny Python library that can be used to
21148 prevent debuggers and other applications from inspecting the memory within
21150 (license license:expat)))
21152 (define-public python-gcovr
21154 (name "python-gcovr")
21159 (uri (pypi-uri "gcovr" version))
21162 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21163 (build-system python-build-system)
21165 `(("python-lxml" ,python-lxml)
21166 ("python-jinja2" ,python-jinja2)))
21167 (home-page "https://gcovr.com/")
21168 (synopsis "Utility for generating code coverage results")
21170 "Gcovr provides a utility for managing the use of the GNU gcov
21171 utility and generating summarized code coverage results. It is inspired
21172 by the Python coverage.py package, which provides a similar utility for
21174 (license license:bsd-3)))
21176 (define-public python-owslib
21178 (name "python-owslib")
21183 (uri (pypi-uri "OWSLib" version))
21185 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21186 (build-system python-build-system)
21188 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21189 (synopsis "Interface for Open Geospatial Consortium web service")
21191 "OWSLib is a Python package for client programming with Open Geospatial
21192 Consortium (OGC) web service (hence OWS) interface standards, and their related
21194 (home-page "https://geopython.github.io/OWSLib/")
21195 (license license:bsd-3)))
21197 (define-public python-docusign-esign
21199 (name "python-docusign-esign")
21203 (uri (pypi-uri "docusign_esign" version))
21206 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21207 (build-system python-build-system)
21208 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21209 (arguments `(#:tests? #f))
21211 `(("python-certifi" ,python-certifi)
21212 ("python-six" ,python-six)
21213 ("python-dateutil" ,python-dateutil)
21214 ("python-urllib3" ,python-urllib3)
21215 ("python-pyjwt" ,python-pyjwt)
21216 ("python-cryptography" ,python-cryptography)
21217 ("python-nose" ,python-nose)))
21218 (synopsis "DocuSign Python Client")
21219 (description "The Official DocuSign Python Client Library used to interact
21220 with the eSign REST API. Send, sign, and approve documents using this client.")
21221 (home-page "https://www.docusign.com/devcenter")
21222 (license license:expat)))
21224 (define-public python-xattr
21226 (name "python-xattr")
21231 (uri (pypi-uri "xattr" version))
21234 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21235 (build-system python-build-system)
21237 `(("python-cffi" ,python-cffi)))
21238 (home-page "https://github.com/xattr/xattr")
21240 "Python wrapper for extended file system attributes")
21241 (description "This package provides a Python wrapper for using extended
21242 file system attributes. Extended attributes extend the basic attributes of files
21243 and directories in the file system. They are stored as name:data pairs
21244 associated with file system objects (files, directories, symlinks, etc).")
21245 (license license:expat)))
21247 (define-public python-json-logger
21249 (name "python-json-logger")
21254 (uri (pypi-uri "python-json-logger" version))
21257 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21258 (build-system python-build-system)
21260 "https://github.com/madzak/python-json-logger")
21261 (synopsis "JSON log formatter in Python")
21262 (description "This library allows standard Python logging to output log data
21263 as JSON objects. With JSON we can make our logs more readable by machines and
21264 we can stop writing custom parsers for syslog-type records.")
21265 (license license:bsd-3)))
21267 (define-public python-daiquiri
21269 (name "python-daiquiri")
21274 (uri (pypi-uri "daiquiri" version))
21277 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21278 (build-system python-build-system)
21280 `(("python-json-logger" ,python-json-logger)))
21282 `(("python-mock" ,python-mock)
21283 ("python-pytest" ,python-pytest)
21284 ("python-setuptools-scm" ,python-setuptools-scm)
21285 ("python-six" ,python-six)))
21286 (home-page "https://github.com/jd/daiquiri")
21288 "Library to configure Python logging easily")
21289 (description "The daiquiri library provides an easy way to configure
21290 logging in Python. It also provides some custom formatters and handlers.")
21291 (license license:asl2.0)))
21293 (define-public python-pifpaf
21295 (name "python-pifpaf")
21300 (uri (pypi-uri "pifpaf" version))
21303 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21304 (build-system python-build-system)
21307 (modify-phases %standard-phases
21310 (invoke "python" "setup.py" "testr" "--slowest"
21311 "--testr-args=until-failure"))))))
21313 `(("python-click" ,python-click)
21314 ("python-daiquiri" ,python-daiquiri)
21315 ("python-fixtures" ,python-fixtures)
21316 ("python-jinja2" ,python-jinja2)
21317 ("python-pbr" ,python-pbr)
21318 ("python-psutil" ,python-psutil)
21319 ("python-six" ,python-six)
21320 ("python-xattr" ,python-xattr)))
21322 `(("python-mock" ,python-mock)
21323 ("python-os-testr" ,python-os-testr)
21324 ("python-requests" ,python-requests)
21325 ("python-testrepository" ,python-testrepository)
21326 ("python-testtools" ,python-testtools)))
21327 (home-page "https://github.com/jd/pifpaf")
21328 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21329 (description "Pifpaf is a suite of fixtures and a command-line tool that
21330 starts and stops daemons for a quick throw-away usage. This is typically
21331 useful when needing these daemons to run integration testing. It originally
21332 evolved from its precursor @code{overtest}.")
21333 (license license:asl2.0)))
21335 (define-public python-pytest-check-links
21337 (name "python-pytest-check-links")
21342 ;; URI uses underscores
21343 (uri (pypi-uri "pytest_check_links" version))
21346 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21347 (build-system python-build-system)
21349 `(("python-docutils" ,python-docutils)
21350 ("python-html5lib" ,python-html5lib)
21351 ("python-nbconvert" ,python-nbconvert)
21352 ("python-nbformat" ,python-nbformat)
21353 ("python-pytest" ,python-pytest)
21354 ("python-six" ,python-six)))
21356 `(("python-pbr-minimal" ,python-pbr-minimal)))
21357 (home-page "https://github.com/minrk/pytest-check-links")
21358 (synopsis "Check links in files")
21359 (description "This package provides a pytest plugin that checks URLs for
21360 HTML-containing files.")
21361 (license license:bsd-3)))
21363 (define-public python-json5
21365 (name "python-json5")
21369 ;; sample.json5 is missing from PyPi source tarball
21371 (uri (git-reference
21372 (url "https://github.com/dpranke/pyjson5")
21373 (commit (string-append "v" version))))
21374 (file-name (git-file-name name version))
21376 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21377 (build-system python-build-system)
21378 (home-page "https://github.com/dpranke/pyjson5")
21380 "Python implementation of the JSON5 data format")
21382 "JSON5 extends the JSON data interchange format to make it slightly more
21383 usable as a configuration language. This Python package implements parsing and
21384 dumping of JSON5 data structures.")
21385 (license license:asl2.0)))
21387 (define-public python-frozendict
21389 (name "python-frozendict")
21394 (uri (pypi-uri "frozendict" version))
21396 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21397 (build-system python-build-system)
21398 (home-page "https://github.com/slezica/python-frozendict")
21399 (synopsis "Simple immutable mapping for Python")
21401 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21402 implements the complete mapping interface. It can be used as a drop-in
21403 replacement for dictionaries where immutability is desired.")
21404 (license license:expat)))
21406 (define-public python-unpaddedbase64
21408 (name "python-unpaddedbase64")
21413 (uri (git-reference
21414 (url "https://github.com/matrix-org/python-unpaddedbase64")
21415 (commit (string-append "v" version))))
21416 (file-name (git-file-name name version))
21419 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21420 (build-system python-build-system)
21421 (home-page "https://pypi.org/project/unpaddedbase64/")
21422 (synopsis "Encode and decode Base64 without “=” padding")
21424 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21425 using “=” characters. However this conveys no benefit so many protocols
21426 choose to use Base64 without the “=” padding.")
21427 (license license:asl2.0)))
21429 (define-public python-py-cpuinfo
21431 (name "python-py-cpuinfo")
21436 (uri (pypi-uri "py-cpuinfo" version))
21439 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21440 (build-system python-build-system)
21441 (home-page "https://github.com/workhorsy/py-cpuinfo")
21442 (synopsis "Get CPU info with Python")
21444 "This Python module returns the CPU info by using the best sources of
21445 information for your operating system.")
21446 (license license:expat)))
21448 (define-public python-canonicaljson
21450 (name "python-canonicaljson")
21455 (uri (pypi-uri "canonicaljson" version))
21457 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
21458 (build-system python-build-system)
21460 `(("python-six" ,python-six)
21461 ("python-frozendict" ,python-frozendict)
21462 ("python-simplejson" ,python-simplejson)))
21463 (home-page "https://github.com/matrix-org/python-canonicaljson")
21464 (synopsis "Canonical JSON")
21466 "Deterministically encode JSON.
21469 @item Encodes objects and arrays as RFC 7159 JSON.
21470 @item Sorts object keys so that you get the same result each time.
21471 @item Has no insignificant whitespace to make the output as small as possible.
21472 @item Escapes only the characters that must be escaped, U+0000 to
21473 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21474 @item Uses the shortest escape sequence for each escaped character.
21475 @item Encodes the JSON as UTF-8.
21476 @item Can encode frozendict immutable dictionaries.
21478 (license license:asl2.0)))
21480 (define-public python-signedjson
21482 (name "python-signedjson")
21487 (uri (pypi-uri "signedjson" version))
21489 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21490 (build-system python-build-system)
21492 `(("python-canonicaljson" ,python-canonicaljson)
21493 ("python-importlib-metadata" ,python-importlib-metadata)
21494 ("python-pynacl" ,python-pynacl)
21495 ("python-typing-extensions" ,python-typing-extensions)
21496 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21498 `(("python-setuptools-scm" ,python-setuptools-scm)))
21499 (home-page "https://github.com/matrix-org/python-signedjson")
21500 (synopsis "Sign JSON objects with ED25519 signatures")
21502 "Sign JSON objects with ED25519 signatures.
21505 @item More than one entity can sign the same object.
21506 @item Each entity can sign the object with more than one key making it easier to
21508 @item ED25519 can be replaced with a different algorithm.
21509 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21512 (license license:asl2.0)))
21514 (define-public python-daemonize
21516 (name "python-daemonize")
21521 (uri (pypi-uri "daemonize" version))
21523 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21524 (build-system python-build-system)
21525 (home-page "https://github.com/thesharp/daemonize")
21526 (synopsis "Library for writing system daemons in Python")
21527 (description "Daemonize is a library for writing system daemons in Python.")
21528 (license license:expat)))
21530 (define-public python-pymacaroons
21532 (name "python-pymacaroons")
21537 (uri (pypi-uri "pymacaroons" version))
21539 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21540 (build-system python-build-system)
21542 `(("python-six" ,python-six)
21543 ("python-pynacl" ,python-pynacl)))
21544 (home-page "https://github.com/ecordell/pymacaroons")
21545 (synopsis "Python Macaroon Library")
21547 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21548 tokens, macaroons embed caveats that define specific authorization
21549 requirements for the target service, the service that issued the root macaroon
21550 and which is capable of verifying the integrity of macaroons it receives.
21552 Macaroons allow for delegation and attenuation of authorization. They are
21553 simple and fast to verify, and decouple authorization policy from the
21554 enforcement of that policy.")
21555 (license license:expat)))
21557 (define-public python-ldap3
21559 (name "python-ldap3")
21561 (home-page "https://github.com/cannatag/ldap3")
21565 (uri (git-reference (url home-page)
21566 (commit (string-append "v" version))))
21567 (file-name (git-file-name name version))
21569 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21570 (build-system python-build-system)
21572 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21573 #:phases (modify-phases %standard-phases
21575 (lambda* (#:key tests? #:allow-other-keys)
21577 (invoke "nosetests" "-s" "test"))
21580 `(("python-nose" ,python-nose)))
21582 `(("python-gssapi" ,python-gssapi)
21583 ("python-pyasn1" ,python-pyasn1)))
21584 (synopsis "Python LDAP client")
21586 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21588 (license license:lgpl3+)))
21590 (define-public python-boltons
21592 (name "python-boltons")
21597 (uri (pypi-uri "boltons" version))
21600 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21601 (build-system python-build-system)
21602 (home-page "https://github.com/mahmoud/boltons")
21603 (synopsis "Extensions to the Python standard library")
21605 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21606 as — and yet conspicuously missing from — the standard library, including:
21609 @item Atomic file saving, bolted on with fileutils
21610 @item A highly-optimized OrderedMultiDict, in dictutils
21611 @item Two types of PriorityQueue, in queueutils
21612 @item Chunked and windowed iteration, in iterutils
21613 @item Recursive data structure iteration and merging, with iterutils.remap
21614 @item Exponential backoff functionality, including jitter, through
21616 @item A full-featured TracebackInfo type, for representing stack traces, in
21619 (license license:bsd-3)))
21621 (define-public python-eliot
21623 (name "python-eliot")
21628 (uri (pypi-uri "eliot" version))
21630 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21631 (build-system python-build-system)
21634 (modify-phases %standard-phases
21635 (add-after 'unpack 'remove-journald-support
21637 (for-each delete-file
21638 '("eliot/tests/test_journald.py"
21639 "eliot/journald.py"))
21641 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
21642 ;; remove command-line tool's tests. TODO eliot-prettyprint should
21643 ;; be installed and these tests should pass.
21645 (delete-file "eliot/tests/test_prettyprint.py")
21648 `(("python-boltons" ,python-boltons)
21649 ("python-pyrsistent" ,python-pyrsistent)
21650 ("python-six" ,python-six)
21651 ("python-zope-interface" ,python-zope-interface)))
21653 `(("python-black" ,python-black)
21654 ("python-coverage" ,python-coverage)
21655 ("python-dask" ,python-dask)
21656 ("python-flake8" ,python-flake8)
21657 ("python-hypothesis" ,python-hypothesis)
21658 ("python-pytest" ,python-pytest)
21659 ("python-setuptools" ,python-setuptools)
21660 ("python-sphinx" ,python-sphinx)
21661 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21662 ("python-testtools" ,python-testtools)
21663 ("python-twine" ,python-twine)
21664 ("python-twisted" ,python-twisted)))
21665 (home-page "https://github.com/itamarst/eliot/")
21666 (synopsis "Eliot: the logging system that tells you why it happened")
21668 "@dfn{eliot} is a Python logging system that outputs causal chains of
21669 actions: actions can spawn other actions, and eventually they either succeed
21670 or fail. The resulting logs tell you the story of what your software did: what
21671 happened, and what caused it.")
21672 (license license:asl2.0)))
21674 (define-public python-pem
21676 (name "python-pem")
21681 (uri (pypi-uri "pem" version))
21684 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
21685 (build-system python-build-system)
21687 `(("python-certifi" ,python-certifi)
21688 ("python-coverage" ,python-coverage)
21689 ("python-pretend" ,python-pretend)
21690 ("python-pyopenssl" ,python-pyopenssl)
21691 ("python-pytest" ,python-pytest)
21692 ("python-sphinx" ,python-sphinx)
21693 ("python-twisted" ,python-twisted)))
21694 (home-page "https://pem.readthedocs.io/")
21695 (synopsis "Easy PEM file parsing in Python")
21697 "This package provides a Python module for parsing and splitting PEM files.")
21698 (license license:expat)))
21700 (define-public python-txsni
21701 ;; We need a few commits on top of 0.1.9 for compatibility with newer
21702 ;; Python and OpenSSL.
21703 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
21706 (name "python-txsni")
21707 (version (git-version "0.1.9" revision commit))
21708 (home-page "https://github.com/glyph/txsni")
21712 (uri (git-reference (url home-page) (commit commit)))
21713 (file-name (git-file-name name version))
21716 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
21717 (build-system python-build-system)
21719 `(("python-pyopenssl" ,python-pyopenssl)
21720 ("python-service-identity" ,python-service-identity)
21721 ("python-twisted" ,python-twisted)))
21722 (synopsis "Run TLS servers with Twisted")
21724 "This package provides an easy-to-use SNI endpoint for use
21725 with the Twisted web framework.")
21726 (license license:expat))))
21728 (define-public python-txacme
21730 (name "python-txacme")
21735 (uri (pypi-uri "txacme" version))
21737 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
21738 (build-system python-build-system)
21740 `(("python-acme" ,python-acme)
21741 ("python-attrs" ,python-attrs)
21742 ("python-eliot" ,python-eliot)
21743 ("python-josepy" ,python-josepy)
21744 ("python-pem" ,python-pem)
21745 ("python-treq" ,python-treq)
21746 ("python-twisted" ,python-twisted)
21747 ("python-txsni" ,python-txsni)))
21749 `(("python-fixtures" ,python-fixtures)
21750 ("python-hypothesis" ,python-hypothesis)
21751 ("python-mock" ,python-mock)
21752 ("python-service-identity"
21753 ,python-service-identity)
21754 ("python-testrepository" ,python-testrepository)
21755 ("python-testscenarios" ,python-testscenarios)
21756 ("python-testtools" ,python-testtools)))
21757 (home-page "https://github.com/twisted/txacme")
21758 (synopsis "Twisted implexmentation of the ACME protocol")
21760 "ACME is Automatic Certificate Management Environment, a protocol that
21761 allows clients and certificate authorities to automate verification and
21762 certificate issuance. The ACME protocol is used by the free Let's Encrypt
21763 Certificate Authority.
21765 txacme is an implementation of the protocol for Twisted, the event-driven
21766 networking engine for Python.")
21767 (license license:expat)))
21769 (define-public python-pysaml2
21771 (name "python-pysaml2")
21776 (uri (pypi-uri "pysaml2" version))
21779 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
21780 (build-system python-build-system)
21782 `(("python-cryptography" ,python-cryptography)
21783 ("python-dateutil" ,python-dateutil)
21784 ("python-defusedxml" ,python-defusedxml)
21785 ("python-pyopenssl" ,python-pyopenssl)
21786 ("python-pytz" ,python-pytz)
21787 ("python-requests" ,python-requests)
21788 ("python-six" ,python-six)))
21789 (home-page "https://idpy.org")
21790 (synopsis "Python implementation of SAML Version 2 Standard")
21792 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
21793 It contains all necessary pieces for building a SAML2 service provider or
21794 an identity provider. The distribution contains examples of both.
21796 This package was originally written to work in a WSGI environment, but
21797 there are extensions that allow you to use it with other frameworks.")
21798 (license license:asl2.0)))
21800 (define-public python-click-plugins
21802 (name "python-click-plugins")
21807 (uri (pypi-uri "click-plugins" version))
21809 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
21810 (build-system python-build-system)
21812 `(("python-pytest" ,python-pytest)))
21814 `(("python-click" ,python-click)))
21815 (synopsis "Extension for Click to register external CLI commands")
21816 (description "This package provides n extension module for Click to
21817 register external CLI commands via setuptools entry-points.")
21818 (home-page "https://github.com/click-contrib/click-plugins")
21819 (license license:bsd-3)))
21821 (define-public python-diceware
21823 (name "python-diceware")
21828 (uri (pypi-uri "diceware" version))
21831 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
21832 (build-system python-build-system)
21834 `(("python-coverage" ,python-coverage)
21835 ("python-pytest" ,python-pytest)
21836 ("python-pytest-runner" ,python-pytest-runner)))
21837 (home-page "https://github.com/ulif/diceware/")
21838 (synopsis "Generates memorable passphrases")
21839 (description "This package generates passphrases by concatenating words
21840 randomly picked from wordlists. It supports several sources of
21841 randomness (including real life dice) and different wordlists (including
21842 cryptographically signed ones).")
21843 (license license:gpl3+)))
21845 (define-public python-dictdiffer
21847 (name "python-dictdiffer")
21851 (uri (pypi-uri "dictdiffer" version))
21854 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
21855 (build-system python-build-system)
21857 `(("python-check-manifest" ,python-check-manifest)
21858 ("python-coverage" ,python-coverage)
21859 ("python-isort" ,python-isort)
21860 ("python-mock" ,python-mock)
21861 ("python-pydoctstyle" ,python-pydocstyle)
21862 ("python-pytest-cache" ,python-pytest-cache)
21863 ("python-pytest-cov" ,python-pytest-cov)
21864 ("python-pytest-pep8" ,python-pytest-pep8)
21865 ("python-pytest-runner" ,python-pytest-runner)
21866 ("python-pytest" ,python-pytest)
21867 ("python-setuptools-scm" ,python-setuptools-scm)
21868 ("python-tox" ,python-tox)))
21869 (home-page "https://github.com/inveniosoftware/dictdiffer")
21870 (synopsis "Diff and patch Python dictionary objects")
21872 "Dictdiffer is a Python module that helps you to diff and patch
21874 (license license:expat)))
21876 (define-public pyzo
21883 (uri (pypi-uri "pyzo" version))
21885 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
21886 (build-system python-build-system)
21889 (modify-phases %standard-phases
21890 (add-before 'check 'fix-home-directory
21892 ;; Tests fail with "Permission denied: '/homeless-shelter'".
21893 (setenv "HOME" "/tmp")
21895 ;; Tests fail with "Uncaught Python exception: invalid literal for
21896 ;; int() with base 10: 'test'".
21899 `(("python-pyqt" ,python-pyqt)))
21900 (home-page "https://pyzo.org")
21902 "Python IDE for scientific computing")
21904 "Pyzo is a Python IDE focused on interactivity and introspection,
21905 which makes it very suitable for scientific computing. Its practical
21906 design is aimed at simplicity and efficiency.
21908 It consists of two main components, the editor and the shell, and uses
21909 a set of pluggable tools to help the programmer in various ways. Some
21910 example tools are source structure, project manager, interactive help,
21912 (license license:bsd-2)))
21914 (define-public python-osc
21916 (name "python-osc")
21921 (uri (pypi-uri "python-osc" version))
21924 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
21925 (build-system python-build-system)
21926 (home-page "https://github.com/attwad/python-osc")
21927 (synopsis "Open Sound Control server and client implementations")
21929 "@code{python-osc} is a pure Python library with no external
21930 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
21931 Open Sound Control 1.0} specification.")
21932 (license license:unlicense)))
21934 (define-public python-voluptuous
21936 (name "python-voluptuous")
21941 (uri (pypi-uri "voluptuous" version))
21944 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
21945 (build-system python-build-system)
21947 `(("python-nose" ,python-nose)))
21948 (home-page "https://github.com/alecthomas/voluptuous")
21949 (synopsis "Python data validation library")
21951 "Voluptuous is a Python data validation library. It is primarily
21952 intended for validating data coming into Python as JSON, YAML, etc.")
21953 (license license:bsd-3)))
21955 (define-public python-cmd2
21957 (name "python-cmd2")
21962 (uri (pypi-uri "cmd2" version))
21965 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
21966 (build-system python-build-system)
21968 `(("python-attrs" ,python-attrs)
21969 ("python-colorama" ,python-colorama)
21970 ("python-pyperclip" ,python-pyperclip)
21971 ("python-wcwidth" ,python-wcwidth)))
21973 `(("python-codecov" ,python-codecov)
21974 ("python-coverage" ,python-coverage)
21975 ("python-doc8" ,python-doc8)
21976 ("python-flake8" ,python-flake8)
21977 ("python-invoke" ,python-invoke)
21978 ("python-mock" ,python-mock)
21979 ("python-pytest" ,python-pytest)
21980 ("python-pytest-cov" ,python-pytest-cov)
21981 ("python-pytest-mock" ,python-pytest-mock)
21982 ("python-setuptools-scm" ,python-setuptools-scm)
21983 ("python-sphinx" ,python-sphinx)
21984 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
21985 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21986 ("python-tox" ,python-tox)
21987 ("python-twine" ,python-twine)
21989 (home-page "https://github.com/python-cmd2/cmd2")
21990 (synopsis "Tool for building interactive command line applications")
21992 "Cmd2 is a tool for building interactive command line applications in
21993 Python. Its goal is to make it quick and easy for developers to build
21994 feature-rich and user-friendly interactive command line applications. It
21995 provides a simple API which is an extension of Python's built-in @code{cmd}
21996 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
21997 make your life easier and eliminates much of the boilerplate code which would
21998 be necessary when using @code{cmd}.")
21999 (license license:expat)))
22001 (define-public python-pytidylib
22003 (name "python-pytidylib")
22007 (uri (pypi-uri "pytidylib" version))
22010 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22011 (build-system python-build-system)
22014 (modify-phases %standard-phases
22015 (add-before 'build 'qualify-libtidy
22016 (lambda* (#:key inputs #:allow-other-keys)
22017 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22018 "/lib/libtidy.so")))
22019 (substitute* "tidylib/tidy.py"
22020 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22021 (format #f "'~a'" libtidy)))
22023 (inputs `(("tidy" ,tidy)))
22024 (home-page "https://github.com/countergram/pytidylib")
22025 (synopsis "Python wrapper for HTML Tidy library")
22027 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22028 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22029 (license license:expat)))
22031 (define-public python2-pytidylib
22032 (package-with-python2 python-pytidylib))
22034 (define-public python-mujson
22036 (name "python-mujson")
22041 (uri (pypi-uri "mujson" version))
22044 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22045 (build-system python-build-system)
22046 (home-page "https://github.com/mattgiles/mujson")
22047 (synopsis "Use the fastest JSON functions available at import time")
22048 (description "This package selects the fastest JSON functions available
22050 (license license:expat)))
22052 (define-public python-bashlex
22054 (name "python-bashlex")
22059 (uri (pypi-uri "bashlex" version))
22062 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22063 (build-system python-build-system)
22066 (modify-phases %standard-phases
22067 (add-before 'build 'pregenerate-yacc-tables
22069 ;; parser.py caches tables, which attempts to write to site lib
22070 ;; see https://github.com/idank/bashlex/issues/51
22071 (invoke "python" "-c" "import bashlex"))))))
22073 "https://github.com/idank/bashlex")
22074 (synopsis "Python parser for bash")
22075 (description "@code{bashlex} is a Python port of the parser used
22076 internally by GNU bash.
22078 For the most part it's transliterated from C, the major differences are:
22081 @item it does not execute anything
22082 @item it is reentrant
22083 @item it generates a complete AST
22086 (license license:gpl3+)))
22088 (define-public python-jinxed
22090 (name "python-jinxed")
22095 (uri (pypi-uri "jinxed" version))
22098 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22099 (build-system python-build-system)
22102 (modify-phases %standard-phases
22103 (add-before 'check 'set-environment-variables
22104 (lambda* (#:key inputs #:allow-other-keys)
22105 (let ((ncurses (assoc-ref inputs "ncurses")))
22106 (setenv "TERM" "LINUX")
22107 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22109 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22111 `(("ncurses" ,ncurses)))
22112 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22113 (synopsis "Jinxed Terminal Library")
22115 "Jinxed is an implementation of a subset of the Python curses library.")
22116 (license license:mpl2.0)))
22118 (define-public python-blessed
22120 (name "python-blessed")
22125 (uri (pypi-uri "blessed" version))
22128 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22129 (modules '((guix build utils)))
22132 ;; Don't get hung up on Windows test failures.
22133 (delete-file "blessed/win_terminal.py") #t))))
22134 (build-system python-build-system)
22136 `(("python-jinxed" ,python-jinxed)
22137 ("python-six" ,python-six)
22138 ("python-wcwidth" ,python-wcwidth)))
22140 `(("python-mock" ,python-mock)
22141 ("python-pytest" ,python-pytest)))
22142 (home-page "https://github.com/jquast/blessed")
22143 (synopsis "Wrapper around terminal capabilities")
22145 "Blessed is a thin, practical wrapper around terminal styling, screen
22146 positioning, and keyboard input.")
22147 (license license:expat)))
22149 (define-public python-readme-renderer
22151 (name "python-readme-renderer")
22156 (uri (pypi-uri "readme_renderer" version))
22159 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22160 (build-system python-build-system)
22162 `(("python-bleach" ,python-bleach)
22163 ("python-docutils" ,python-docutils)
22164 ("python-pygments" ,python-pygments)
22165 ("python-six" ,python-six)))
22167 `(("python-mock" ,python-mock)
22168 ("python-pytest" ,python-pytest)))
22169 (home-page "https://github.com/pypa/readme_renderer")
22170 (synopsis "Render README files in Warehouse")
22172 "Readme Renderer is a library that will safely render arbitrary README
22173 files into HTML. It is designed to be used in Warehouse to render the
22174 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22176 (license license:asl2.0)))
22178 (define-public python-lazr-delegates
22180 (name "python-lazr-delegates")
22185 (uri (pypi-uri "lazr.delegates" version))
22188 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22189 (build-system python-build-system)
22192 (modify-phases %standard-phases
22195 (invoke "python" "setup.py" "nosetests"))))))
22197 `(("python-nose" ,python-nose)))
22199 `(("python-zope-interface" ,python-zope-interface)))
22200 (home-page "https://launchpad.net/lazr.delegates")
22201 (synopsis "Easily write objects that delegate behavior")
22203 "The @code{lazr.delegates} package makes it easy to write objects that
22204 delegate behavior to another object. The new object adds some property or
22205 behavior on to the other object, while still providing the underlying interface,
22206 and delegating behavior.")
22207 (license license:lgpl3)))
22209 (define-public python-lazr-config
22211 (name "python-lazr-config")
22216 (uri (pypi-uri "lazr.config" version))
22219 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22220 (build-system python-build-system)
22223 (modify-phases %standard-phases
22226 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22228 `(("python-nose" ,python-nose)))
22230 `(("python-lazr-delegates" ,python-lazr-delegates)
22231 ("python-zope-interface" ,python-zope-interface)))
22232 (home-page "https://launchpad.net/lazr.config")
22233 (synopsis "Create configuration schemas and process and validate configurations")
22235 "The LAZR config system is typically used to manage process configuration.
22236 Process configuration is for saying how things change when we run systems on
22237 different machines, or under different circumstances. This system uses ini-like
22238 file format of section, keys, and values. The config file supports inheritance
22239 to minimize duplication of information across files. The format supports schema
22241 (license license:lgpl3)))
22243 (define-public python-flufl-bounce
22245 (name "python-flufl-bounce")
22250 (uri (pypi-uri "flufl.bounce" version))
22253 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22254 (build-system python-build-system)
22256 `(("python-atpublic" ,python-atpublic)
22257 ("python-zope-interface" ,python-zope-interface)))
22259 `(("python-nose2" ,python-nose2)))
22260 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22261 (synopsis "Email bounce detectors")
22262 (description "The @code{flufl.bounce} library provides a set of heuristics
22263 and an API for detecting the original bouncing email addresses from a bounce
22264 message. Many formats found in the wild are supported, as are VERP and
22266 (license (list license:asl2.0
22267 license:lgpl3)))) ; only for setup_headers.py
22269 (define-public python-flufl-i18n
22271 (name "python-flufl-i18n")
22276 (uri (pypi-uri "flufl.i18n" version))
22279 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22280 (build-system python-build-system)
22282 `(("python-atpublic" ,python-atpublic)))
22283 (home-page "https://flufli18n.readthedocs.io")
22284 (synopsis "API for Python internationalization")
22286 "This package provides a high-level, convenient API for managing
22287 internationalization/translation contexts in Python applications. There is a
22288 simple API for single-context applications, such as command line scripts which
22289 only need to translate into one language during the entire course of their
22290 execution. There is a more flexible, but still convenient API for multi-context
22291 applications, such as servers, which may need to switch language contexts for
22293 (license license:asl2.0)))
22295 (define-public python-flufl-lock
22297 (name "python-flufl-lock")
22302 (uri (pypi-uri "flufl.lock" version))
22305 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22306 (build-system python-build-system)
22308 `(("python-atpublic" ,python-atpublic)
22309 ("python-psutil" ,python-psutil)))
22310 (home-page "https://flufllock.readthedocs.io")
22311 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22313 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22314 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22315 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22316 and have a maximum lifetime built-in.")
22317 (license (list license:asl2.0
22318 license:lgpl3)))) ; only for setup_helpers.py
22320 (define-public python-flufl-testing
22322 (name "python-flufl-testing")
22327 (uri (pypi-uri "flufl.testing" version))
22330 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22331 (build-system python-build-system)
22333 `(("python-nose2" ,python-nose2)))
22334 (home-page "https://gitlab.com/warsaw/flufl.testing")
22335 (synopsis "Collection of test tool plugins")
22337 "This package contains a small collection of test tool plugins for
22338 @code{nose2} and @code{flake8}.")
22339 (license license:asl2.0)))
22341 (define-public python-devtools
22343 (name "python-devtools")
22348 (uri (git-reference
22349 (url "https://github.com/samuelcolvin/python-devtools")
22350 (commit (string-append "v" version))))
22351 (file-name (git-file-name name version))
22353 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22354 (build-system python-build-system)
22356 `(("python-pytest" ,python-pytest)
22357 ("python-pytest-mock" ,python-pytest-mock)))
22359 `(("python-pygments" ,python-pygments)))
22361 `(#:phases (modify-phases %standard-phases
22366 (home-page "https://github.com/samuelcolvin/python-devtools")
22367 (synopsis "Debug command and development tools")
22369 "This package provides a debug print command and other development tools.
22370 It adds a simple and readable way to print stuff during development.")
22371 (license license:expat)))
22373 (define-public python-dateparser
22375 (name "python-dateparser")
22380 (uri (pypi-uri "dateparser" version))
22383 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22384 (build-system python-build-system)
22386 `(("python-dateutil" ,python-dateutil)
22387 ("python-pytz" ,python-pytz)
22388 ("python-regex" ,python-regex)
22389 ("python-ruamel.yaml" ,python-ruamel.yaml)
22390 ("python-tzlocal" ,python-tzlocal)))
22392 `(("python-mock" ,python-mock)
22393 ("python-parameterized" ,python-parameterized)
22394 ("tzdata" ,tzdata-for-tests)))
22396 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22399 (modify-phases %standard-phases
22400 (add-before 'check 'set-check-environment
22401 (lambda* (#:key inputs #:allow-other-keys)
22402 (setenv "TZ" "UTC")
22404 (string-append (assoc-ref inputs "tzdata")
22405 "/share/zoneinfo"))
22407 (home-page "https://github.com/scrapinghub/dateparser")
22409 "Date parsing library designed to parse dates from HTML pages")
22411 "@code{python-dateparser} provides modules to easily parse localized
22412 dates in almost any string formats commonly found on web pages.")
22413 (license license:bsd-3)))
22415 (define-public python-dparse
22417 (name "python-dparse")
22422 (uri (pypi-uri "dparse" version))
22425 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22426 (build-system python-build-system)
22428 `(("python-pytest" ,python-pytest)))
22430 `(("python-packaging" ,python-packaging)
22431 ("python-pyyaml" ,python-pyyaml)
22432 ("python-toml" ,python-toml)))
22433 (home-page "https://github.com/pyupio/dparse")
22434 (synopsis "Parser for Python dependency files")
22435 (description "This package provides a parser for Python dependency files.")
22436 (license license:expat)))
22438 (define-public python-dpath
22440 (name "python-dpath")
22445 (uri (pypi-uri "dpath" version))
22448 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22449 (build-system python-build-system)
22451 `(("python-hypothesis" ,python-hypothesis)
22452 ("python-mock" ,python-mock)
22453 ("python-nose" ,python-nose)))
22456 (modify-phases %standard-phases
22458 (lambda* (#:key inputs outputs #:allow-other-keys)
22459 (add-installed-pythonpath inputs outputs)
22460 ;; This invokation is taken from tox.ini.
22461 (invoke "nosetests" "-d" "-v" "tests/"))))))
22462 (home-page "https://github.com/akesterson/dpath-python")
22463 (synopsis "Filesystem-like pathing and searching for dictionaries")
22465 "@code{python-dpath} is a library for accessing and searching
22466 dictionaries via /slashed/paths ala xpath.
22468 Basically it lets you glob over a dictionary as if it were a filesystem. It
22469 allows you to specify globs (ala the bash eglob syntax, through some advanced
22470 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22471 facility for filtering those results.")
22472 (license license:expat)))
22474 (define-public python-safety
22476 (name "python-safety")
22481 (uri (pypi-uri "safety" version))
22484 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22485 (build-system python-build-system)
22488 (modify-phases %standard-phases
22489 (add-after 'unpack 'disable-tests
22491 (substitute* "tests/test_safety.py"
22492 ;; requires network
22493 (("def test_check_live") "def _test_check_live"))
22496 `(("python-click" ,python-click)
22497 ("python-dparse" ,python-dparse)
22498 ("python-packaging" ,python-packaging)
22499 ("python-requests" ,python-requests)))
22500 (home-page "https://github.com/pyupio/safety")
22501 (synopsis "Check installed dependencies for known vulnerabilities")
22502 (description "Safety checks installed dependencies for known vulnerabilities.
22503 By default it uses the open Python vulnerability database Safety DB.")
22504 (license license:expat)))
22506 (define-public python-pypandoc
22508 (name "python-pypandoc")
22513 (uri (pypi-uri "pypandoc" version))
22516 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22517 (build-system python-build-system)
22519 `(("pandoc" ,pandoc)
22520 ("pandoc-citeproc" ,pandoc-citeproc)))
22522 `(("wheel" ,python-wheel)))
22524 `(("texlive" ,(texlive-union (list texlive-amsfonts
22526 texlive-latex-hyperref
22527 texlive-latex-oberdiek
22529 texlive-xcolor)))))
22532 (modify-phases %standard-phases
22533 (add-before 'check 'disable-tests
22535 ;; Disable test requiring network access
22536 (substitute* "tests.py"
22537 (("test_basic_conversion_from_http_url")
22538 "skip_test_basic_conversion_from_http_url"))
22539 ;; Needed by texlive-union to generate fonts
22540 (setenv "HOME" "/tmp")
22542 (home-page "https://github.com/bebraw/pypandoc")
22543 (synopsis "Python wrapper for pandoc")
22544 (description "pypandoc is a thin Python wrapper around pandoc
22545 and pandoc-citeproc.")
22546 (license license:expat)))
22548 (define-public python-rnc2rng
22550 (name "python-rnc2rng")
22555 (uri (pypi-uri "rnc2rng" version))
22558 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22559 (build-system python-build-system)
22561 `(("python-rply" ,python-rply)))
22563 `(#:phases (modify-phases %standard-phases
22566 (invoke "python" "test.py"))))))
22567 (home-page "https://github.com/djc/rnc2rng")
22568 (synopsis "Convert RELAX NG Compact to regular syntax")
22570 "This package provides the @command{rnc2rng} command-line tool as well as
22571 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22572 equivalent schemata in the XML-based default RELAX NG syntax.")
22573 (license license:expat)))
22575 (define-public python-citeproc-py
22577 (name "python-citeproc-py")
22582 (uri (pypi-uri "citeproc-py" version))
22585 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22586 (build-system python-build-system)
22588 `(("python-lxml" ,python-lxml)
22589 ("python-rnc2rng" ,python-rnc2rng)))
22591 "https://github.com/brechtm/citeproc-py")
22592 (synopsis "Citations and bibliography formatter")
22594 "Citeproc-py is a CSL processor for Python. It aims to implement the
22595 CSL 1.0.1 specification. citeproc-py can output styled citations and
22596 bibliographies in a number of different output formats. Currently supported
22597 are plain text, reStructuredText and HTML.")
22598 (license license:bsd-2)))
22600 (define-public python-inform
22602 (name "python-inform")
22607 (uri (pypi-uri "inform" version))
22610 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
22611 (build-system python-build-system)
22613 `(#:tests? #f)) ; PyPI tarball lacks tests
22615 `(("python-hypothesis" ,python-hypothesis)
22616 ("python-pytest-cov" ,python-pytest-cov)
22617 ("python-pytest-runner" ,python-pytest-runner)))
22619 `(("python-arrow" ,python-arrow)
22620 ("python-six" ,python-six)))
22621 (home-page "https://inform.readthedocs.io")
22622 (synopsis "Print & logging utilities for communicating with user")
22624 "Inform is designed to display messages from programs that are typically run from
22625 a console. It provides a collection of ‘print’ functions that allow you to simply and
22626 cleanly print different types of messages.")
22627 (license license:gpl3+)))
22629 (define-public python-nestedtext
22631 (name "python-nestedtext")
22636 (uri (pypi-uri "nestedtext" version))
22639 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
22640 (build-system python-build-system)
22642 `(#:tests? #f)) ; PyPI tarball lacks tests
22644 `(("python-inform" ,python-inform)))
22645 (home-page "https://nestedtext.org")
22646 (synopsis "Human readable and writable data interchange format")
22648 "NestedText is a file format for holding data that is to be entered, edited, or
22649 viewed by people. It allows data to be organized into a nested collection of
22650 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
22651 without the complexity and risk of YAML and without the syntatic clutter of JSON.
22652 NestedText is both simple and natural. Only a small number of concepts and rules must
22653 be kept in mind when creating it. It is easily created, modified, or viewed with
22654 a text editor and easily understood and used by both programmers and non-programmers.")
22655 (license license:expat))) ; MIT license
22657 (define-public python-parallel
22659 (name "python-parallel")
22660 (version "1.6.4.4")
22664 (uri (string-append
22665 "https://www.parallelpython.com/downloads/pp/pp-"
22669 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
22671 `(("unzip" ,unzip)))
22672 (build-system python-build-system)
22673 (arguments '(#:tests? #f)) ; No test suite.
22674 (home-page "https://www.parallelpython.com")
22675 (synopsis "Parallel and distributed programming for Python")
22676 (description "Parallel Python module (PP) provides an easy and efficient
22677 way to create parallel-enabled applications for SMP computers and clusters.
22678 PP module features cross-platform portability and dynamic load balancing.
22679 Thus applications written with PP will parallelize efficiently even on
22680 heterogeneous and multi-platform clusters (including clusters running other
22681 applications with variable CPU loads).")
22682 (license license:bsd-3)))
22684 (define-public python2-parallel
22685 (package-with-python2 python-parallel))