Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
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>
92 ;;;
93 ;;; This file is part of GNU Guix.
94 ;;;
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.
99 ;;;
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.
104 ;;;
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/>.
107
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))
199
200 (define-public python-slixmpp
201 (package
202 (name "python-slixmpp")
203 (version "1.5.2")
204 (source
205 (origin
206 (method git-fetch)
207 (uri
208 (git-reference
209 (url "https://lab.louiz.org/poezio/slixmpp.git")
210 (commit
211 (string-append "slix-" version))))
212 (file-name
213 (git-file-name name version))
214 (sha256
215 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
216 (build-system python-build-system)
217 (arguments
218 `(#:phases
219 (modify-phases %standard-phases
220 (add-after 'unpack 'patch
221 (lambda _
222 (substitute* "setup.py"
223 (("'CC', 'cc'")
224 "'CC', 'gcc'"))
225 #t)))))
226 (native-inputs
227 `(("cython" ,python-cython)
228 ("gnupg" ,gnupg)
229 ("pkg-config" ,pkg-config)))
230 (propagated-inputs
231 `(("python-aiodns" ,python-aiodns)
232 ("python-aiohttp" ,python-aiohttp)
233 ("python-pyasn1" ,python-pyasn1)
234 ("python-pyasn1-modules" ,python-pyasn1-modules)))
235 (inputs
236 `(("libidn" ,libidn)
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
242 threads.")
243 (home-page "https://lab.louiz.org/poezio/slixmpp")
244 (license license:expat)))
245
246 (define-public python-tenacity
247 (package
248 (name "python-tenacity")
249 (version "6.1.0")
250 (source (origin
251 (method url-fetch)
252 (uri (pypi-uri "tenacity" version))
253 (sha256
254 (base32
255 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
256 (build-system python-build-system)
257 (native-inputs
258 `(("python-setuptools-scm" ,python-setuptools-scm)
259 ("python-sphinx" ,python-sphinx)
260 ("python-tornado" ,python-tornado)
261 ("python-pytest" ,python-pytest)))
262 (propagated-inputs
263 `(("python-six" ,python-six)))
264 (arguments
265 `(#:phases (modify-phases %standard-phases
266 (replace 'check
267 (lambda _
268 (invoke "pytest")
269 #t)))))
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)))
275
276 (define-public python-colorlog
277 (package
278 (name "python-colorlog")
279 (version "4.1.0")
280 (source (origin
281 (method url-fetch)
282 (uri (pypi-uri "colorlog" version))
283 (sha256
284 (base32
285 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
286 (build-system python-build-system)
287 (native-inputs
288 `(("python-pytest" ,python-pytest)))
289 (arguments
290 `(#:phases (modify-phases %standard-phases
291 (replace 'check
292 (lambda _
293 ;; Extend PYTHONPATH so the built package will be found.
294 (setenv "PYTHONPATH"
295 (string-append (getcwd) "/build/lib:"
296 (getenv "PYTHONPATH")))
297 (invoke "pytest" "-p" "no:logging")
298 #t)))))
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)))
304
305 (define-public python-pyprind
306 (package
307 (name "python-pyprind")
308 (version "2.11.2")
309 (source (origin
310 (method url-fetch)
311 (uri (pypi-uri "PyPrind" version))
312 (sha256
313 (base32
314 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
315 (build-system python-build-system)
316 (propagated-inputs
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)))
324
325 (define-public python-gphoto2
326 (package
327 (name "python-gphoto2")
328 (version "2.2.1")
329 (source (origin
330 (method url-fetch)
331 (uri (pypi-uri "gphoto2" version))
332 (sha256
333 (base32
334 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
335 (build-system python-build-system)
336 (native-inputs
337 `(("pkg-config" ,pkg-config)))
338 (inputs
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+)))
346
347 (define-public python-colour
348 (package
349 (name "python-colour")
350 (version "0.1.5")
351 (source (origin
352 (method url-fetch)
353 (uri (pypi-uri "colour" version))
354 (sha256
355 (base32
356 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
357 (build-system python-build-system)
358 (native-inputs
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,
363 web, X11, ...).")
364 (license license:expat)))
365
366 (define-public python-d2to1
367 (package
368 (name "python-d2to1")
369 (version "0.2.12.post1")
370 (source (origin
371 (method url-fetch)
372 (uri (pypi-uri "d2to1" version))
373 (sha256
374 (base32
375 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
376 (build-system python-build-system)
377 (native-inputs
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
381 in python")
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)))
386
387 (define-public python-rawkit
388 (package
389 (name "python-rawkit")
390 (version "0.6.0")
391 (source (origin
392 (method url-fetch)
393 (uri (pypi-uri "rawkit" version))
394 (sha256
395 (base32
396 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
397 (build-system python-build-system)
398 (native-inputs
399 `(("python-pytest" ,python-pytest)
400 ("python-mock" ,python-mock)))
401 (inputs
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)))
410
411 (define-public python-easygui
412 (package
413 (name "python-easygui")
414 (version "0.98.1")
415 (source (origin
416 (method url-fetch)
417 (uri (pypi-uri "easygui" version))
418 (sha256
419 (base32
420 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
421 (build-system python-build-system)
422 (propagated-inputs
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)))
431
432 (define-public python-pymediainfo
433 (package
434 (name "python-pymediainfo")
435 (version "4.1")
436 (source
437 (origin
438 (method url-fetch)
439 (uri (pypi-uri "pymediainfo" version))
440 (sha256
441 (base32
442 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
443 (build-system python-build-system)
444 (native-inputs
445 `(("python-setuptools-scm" ,python-setuptools-scm)
446 ("python-pytest" ,python-pytest)))
447 (inputs
448 `(("libmediainfo" ,libmediainfo)))
449 (arguments
450 `(#:phases
451 (modify-phases %standard-phases
452 (add-after 'unpack 'patch-libmediainfo
453 (lambda _
454 (substitute* "pymediainfo/__init__.py"
455 (("libmediainfo.so.0")
456 (string-append (assoc-ref %build-inputs "libmediainfo")
457 "/lib/libmediainfo.so.0")))
458 #t))
459 (replace 'check
460 (lambda _
461 ;; Extend PYTHONPATH so the built package will be found.
462 (setenv "PYTHONPATH"
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")
467 #t)))))
468 (home-page
469 "https://github.com/sbraz/pymediainfo")
470 (synopsis
471 "Python wrapper for the mediainfo library")
472 (description
473 "Python wrapper for the mediainfo library to access the technical and tag
474 data for video and audio files.")
475 (license license:expat)))
476
477 (define-public python-psutil
478 (package
479 (name "python-psutil")
480 (version "5.7.2")
481 (source
482 (origin
483 (method url-fetch)
484 (uri (pypi-uri "psutil" version))
485 (sha256
486 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
487 (build-system python-build-system)
488 (arguments
489 ;; FIXME: some tests do not return and time out. Some tests fail because
490 ;; some processes survive kill().
491 '(#:tests? #f))
492 (home-page "https://www.github.com/giampaolo/psutil")
493 (synopsis "Library for retrieving information on running processes")
494 (description
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)))
504
505 (define-public python2-psutil
506 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
507 (package
508 (inherit base)
509 (propagated-inputs
510 `(("python2-enum34" ,python2-enum34) ;optional
511 ,@(package-propagated-inputs base))))))
512
513 (define-public python-shapely
514 (package
515 (name "python-shapely")
516 (version "1.7.1")
517 (source
518 (origin
519 (method url-fetch)
520 (uri (pypi-uri "Shapely" version))
521 (sha256
522 (base32
523 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
524 (modules '((guix build utils)))
525 (snippet
526 '(begin
527 (delete-file "shapely/speedups/_speedups.c")
528 (delete-file "shapely/vectorized/_vectorized.c")
529 #t))))
530 (build-system python-build-system)
531 (native-inputs
532 `(("python-cython" ,python-cython)
533 ("python-matplotlib" ,python-matplotlib)
534 ("python-pytest" ,python-pytest)
535 ("python-pytest-cov" ,python-pytest-cov)))
536 (inputs
537 `(("geos" ,geos)))
538 (propagated-inputs
539 `(("python-numpy" ,python-numpy)))
540 (arguments
541 `(#:phases
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"))))
558 #t)))))
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)))
564
565 (define-public python-shortuuid
566 (package
567 (name "python-shortuuid")
568 (version "0.5.0")
569 (source
570 (origin
571 (method url-fetch)
572 (uri (pypi-uri "shortuuid" version))
573 (sha256
574 (base32
575 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
576 (build-system python-build-system)
577 (native-inputs
578 `(("python-pep8" ,python-pep8)))
579 (home-page "https://github.com/skorokithakis/shortuuid")
580 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
581 (description
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)))
586
587 (define-public python-logwrap
588 (package
589 (name "python-logwrap")
590 (version "3.2.1")
591 (source
592 (origin
593 (method url-fetch)
594 (uri (pypi-uri "logwrap" version ".zip"))
595 (sha256
596 (base32
597 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
598 (build-system python-build-system)
599 (propagated-inputs
600 `(("python-six" ,python-six)
601 ("python-typing" ,python-typing)))
602 (native-inputs
603 `(("unzip" ,unzip)
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)))
613
614 (define-public python2-shapely
615 (package-with-python2 python-shapely))
616
617 (define-public python-clyent
618 (package
619 (name "python-clyent")
620 (version "1.2.1")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "clyent" version))
625 (sha256
626 (base32
627 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
628 (build-system python-build-system)
629 (native-inputs
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)))
636
637 (define-public python2-clyent
638 (package-with-python2 python-clyent))
639
640 (define-public python-babel
641 (package
642 (name "python-babel")
643 (version "2.8.0")
644 (source
645 (origin
646 (method url-fetch)
647 (uri (pypi-uri "Babel" version))
648 (sha256
649 (base32
650 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
651 (build-system python-build-system)
652 (native-inputs
653 `(("python-freezegun" ,python-freezegun)
654 ("python-pytest" ,python-pytest)))
655 (propagated-inputs
656 `(("python-pytz" ,python-pytz)))
657 (arguments
658 `(#:phases (modify-phases %standard-phases
659 (replace 'check
660 (lambda _
661 (invoke "pytest" "-vv" "-k"
662 (string-append
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/")
669 (synopsis
670 "Tools for internationalizing Python applications")
671 (description
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,
676 etc. ")
677 (license license:bsd-3)))
678
679 (define-public python2-babel
680 (package-with-python2 python-babel))
681
682 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
683 (define-public python2-babel-2.6
684 (package
685 (inherit python2-babel)
686 (version "2.6.0")
687 (source (origin
688 (method url-fetch)
689 (uri (pypi-uri "Babel" version))
690 (sha256
691 (base32
692 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
693
694 (define-public python2-backport-ssl-match-hostname
695 (package
696 (name "python2-backport-ssl-match-hostname")
697 (version "3.5.0.1")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "backports.ssl_match_hostname" version))
702 (sha256
703 (base32
704 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
705 (build-system python-build-system)
706 (arguments
707 `(#:python ,python-2
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")
711 (description
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)))
717
718 (define-public python-bitarray
719 (package
720 (name "python-bitarray")
721 (version "1.4.0")
722 (source (origin
723 (method url-fetch)
724 (uri (pypi-uri "bitarray" version))
725 (sha256
726 (base32
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)))
741
742 (define-public python-boolean.py
743 (package
744 (name "python-boolean.py")
745 (version "3.6")
746 (source
747 (origin
748 ;; There's no source tarball on PyPI.
749 (method git-fetch)
750 (uri (git-reference
751 (url "https://github.com/bastikr/boolean.py")
752 (commit (string-append "v" version))))
753 (file-name (git-file-name name version))
754 (sha256
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")
759 (description
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)))
767
768 (define-public python-hdf4
769 (package
770 (name "python-hdf4")
771 (version "0.9")
772 (source
773 (origin
774 (method url-fetch)
775 (uri (pypi-uri name version))
776 (sha256
777 (base32
778 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
779 (build-system python-build-system)
780 (native-inputs `(("nose" ,python-nose)))
781 (propagated-inputs `(("numpy" ,python-numpy)))
782 (inputs
783 `(("hdf4" ,hdf4)
784 ("libjpeg" ,libjpeg-turbo)
785 ("zlib" ,zlib)))
786 (arguments
787 `(#:phases
788 (modify-phases %standard-phases
789 (replace 'check
790 (lambda _
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=.*") ""))
796 (setenv "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")
803 (description
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)))
809
810 (define-public python2-hdf4
811 (package-with-python2 python-hdf4))
812
813 (define-public python-h5py
814 (package
815 (name "python-h5py")
816 (version "2.10.0")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (pypi-uri "h5py" version))
821 (sha256
822 (base32
823 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
824 (build-system python-build-system)
825 (arguments
826 `(#:tests? #f ; no test target
827 #:phases
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" "']")))
840 #t))))))
841 (propagated-inputs
842 `(("python-six" ,python-six)
843 ("python-numpy" ,python-numpy)))
844 (inputs
845 `(("hdf5" ,hdf5-1.10)))
846 (native-inputs
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")
852 (description
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
857 concepts.")
858 (license license:bsd-3)))
859
860 (define-public python2-h5py
861 (package-with-python2 python-h5py))
862
863 (define-public python-sh
864 (package
865 (name "python-sh")
866 (version "1.12.14")
867 (source
868 (origin
869 (method url-fetch)
870 (uri (pypi-uri "sh" version))
871 (sha256
872 (base32
873 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
874 (build-system python-build-system)
875 (arguments
876 '(#:phases
877 (modify-phases %standard-phases
878 (replace 'check
879 (lambda _
880 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
881 (setenv "HOME" "/tmp")
882 (invoke "python" "sh.py" "test"))))))
883 (native-inputs
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)))
890
891 (define-public python2-sh
892 (package-with-python2 python-sh))
893
894 (define-public python-cftime
895 (package
896 (name "python-cftime")
897 (version "1.0.4.2")
898 (source
899 (origin
900 (method url-fetch)
901 (uri (pypi-uri "cftime" version))
902 (sha256
903 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
904 (build-system python-build-system)
905 (propagated-inputs
906 `(("python-numpy" ,python-numpy)))
907 (native-inputs
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")
913 (description
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
917 ;; under ISC.
918 (license (list license:isc license:gpl3+))))
919
920 (define-public python-netcdf4
921 (package
922 (name "python-netcdf4")
923 (version "1.5.3")
924 (source
925 (origin
926 (method url-fetch)
927 (uri (pypi-uri "netCDF4" version))
928 (sha256
929 (base32
930 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
931 (build-system python-build-system)
932 (arguments
933 '(#:phases
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"))
938 #t)))))
939 (native-inputs
940 `(("python-cython" ,python-cython)))
941 (propagated-inputs
942 `(("python-numpy" ,python-numpy)
943 ("python-cftime" ,python-cftime)))
944 (inputs
945 `(("netcdf" ,netcdf)
946 ("hdf4" ,hdf4)
947 ("hdf5" ,hdf5)))
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))))
960
961 (define-public python-license-expression
962 (package
963 (name "python-license-expression")
964 (version "0.999")
965 (source
966 (origin
967 (method url-fetch)
968 (uri (pypi-uri "license-expression" version))
969 (sha256
970 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
971 (build-system python-build-system)
972 (propagated-inputs
973 `(("python-boolean.py" ,python-boolean.py)))
974 (home-page "https://github.com/nexB/license-expression")
975 (synopsis "Apply boolean logic to license expressions")
976 (description
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+)))
983
984 (define-public python-lockfile
985 (package
986 (name "python-lockfile")
987 (version "0.12.2")
988 (source
989 (origin
990 (method url-fetch)
991 (uri (pypi-uri "lockfile" version))
992 (sha256
993 (base32
994 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
995 (build-system python-build-system)
996 (arguments '(#:test-target "check"))
997 (native-inputs
998 `(("python-pbr" ,python-pbr)))
999 (home-page "https://launchpad.net/pylockfile")
1000 (synopsis "Platform-independent file locking module")
1001 (description
1002 "The lockfile package exports a LockFile class which provides a simple
1003 API for locking files.")
1004 (license license:expat)))
1005
1006 (define-public python2-lockfile
1007 (package-with-python2 python-lockfile))
1008
1009 (define-public python-filelock
1010 (package
1011 (name "python-filelock")
1012 (version "3.0.12")
1013 (source
1014 (origin
1015 (method url-fetch)
1016 (uri (pypi-uri "filelock" version))
1017 (sha256
1018 (base32
1019 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1020 (build-system python-build-system)
1021 (home-page
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)))
1028
1029 (define-public python-semantic-version
1030 (package
1031 (name "python-semantic-version")
1032 (version "2.6.0")
1033 (source
1034 (origin
1035 (method url-fetch)
1036 (uri (pypi-uri "semantic_version" version))
1037 (sha256
1038 (base32
1039 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1040 (build-system python-build-system)
1041 (arguments
1042 `(#:tests? #f)) ; PyPI tarball lacks tests
1043 (home-page "https://github.com/rbarrois/python-semanticversion")
1044 (synopsis "Semantic versioning module for Python")
1045 (description
1046 "The @code{semantic_version} class is a small library for handling
1047 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1048
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)))
1053
1054 (define-public python2-semantic-version
1055 (package-with-python2 python-semantic-version))
1056
1057 (define-public python-serpent
1058 (package
1059 (name "python-serpent")
1060 (version "1.28")
1061 (source
1062 (origin
1063 (method url-fetch)
1064 (uri (pypi-uri "serpent" version))
1065 (sha256
1066 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1067 (build-system python-build-system)
1068 (native-inputs
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")
1073 (description
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.
1078
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)))
1083
1084 (define-public python2-serpent
1085 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1086 (package
1087 (inherit base)
1088 (propagated-inputs
1089 `(("python-enum34" ,python2-enum34)
1090 ,@(package-propagated-inputs base))))))
1091
1092 (define-public python-setuptools
1093 (package
1094 (name "python-setuptools")
1095 (version "41.0.1")
1096 (source
1097 (origin
1098 (method url-fetch)
1099 (uri (pypi-uri "setuptools" version ".zip"))
1100 (sha256
1101 (base32
1102 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1103 (modules '((guix build utils)))
1104 (snippet
1105 '(begin
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$"))
1110 #t))))
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.
1114 (arguments
1115 `(#:tests? #f))
1116 (home-page "https://pypi.org/project/setuptools/")
1117 (synopsis
1118 "Library designed to facilitate packaging Python projects")
1119 (description
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,
1124 test hooks,
1125 project installation,
1126 platform-specific details,
1127 Python 3 support.")
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
1133 license:bsd-2))))
1134
1135 (define-public python2-setuptools
1136 (package-with-python2 python-setuptools))
1137
1138 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1139 (define-public python-setuptools-for-tensorflow
1140 (hidden-package
1141 (package
1142 (inherit python-setuptools)
1143 (version "39.1.0")
1144 (source (origin
1145 (inherit (package-source python-setuptools))
1146 (uri (pypi-uri "setuptools" version ".zip"))
1147 (sha256
1148 (base32
1149 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1150
1151 (define-public python-uniseg
1152 (package
1153 (name "python-uniseg")
1154 (version "0.7.1")
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (pypi-uri "uniseg" version ".zip"))
1159 (sha256
1160 (base32
1161 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1162 (build-system python-build-system)
1163 (arguments
1164 '(#:tests? #f)) ; The test suite requires network access.
1165 (native-inputs
1166 `(("unzip" ,unzip)))
1167 (home-page
1168 "https://bitbucket.org/emptypage/uniseg-python")
1169 (synopsis
1170 "Python library to determine Unicode text segmentations")
1171 (description
1172 "Uniseg is a Python package used to determine Unicode text segmentations.
1173 Supported segmentations include:
1174 @enumerate
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)
1178 @item Word break
1179 @item Sentence break
1180 @item Line break
1181 @end enumerate")
1182 (license license:expat)))
1183
1184 (define-public python2-uniseg
1185 (package-with-python2 python-uniseg))
1186
1187 (define-public python-humanfriendly
1188 (package
1189 (name "python-humanfriendly")
1190 (version "8.2")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (pypi-uri "humanfriendly" version))
1195 (sha256
1196 (base32
1197 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1198 (build-system python-build-system)
1199 (arguments
1200 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1201 #:tests? #f))
1202 (home-page "https://humanfriendly.readthedocs.io")
1203 (synopsis "Human-friendly input and output in Python")
1204 (description
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
1209 helpers.")
1210 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1211 (license license:expat)))
1212
1213 (define-public python2-humanfriendly
1214 (let ((base (package-with-python2
1215 (strip-python2-variant python-humanfriendly))))
1216 (package (inherit base)
1217 (propagated-inputs
1218 `(("python2-monotonic" ,python2-monotonic)
1219 ,@(package-propagated-inputs base))))))
1220
1221 (define-public python-textparser
1222 (package
1223 (name "python-textparser")
1224 (version "0.23.0")
1225 (source
1226 (origin
1227 (method url-fetch)
1228 (uri (pypi-uri "textparser" version))
1229 (sha256
1230 (base32
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)))
1238
1239 (define-public python-aenum
1240 (package
1241 (name "python-aenum")
1242 (version "2.2.4")
1243 (source
1244 (origin
1245 (method url-fetch)
1246 (uri (pypi-uri "aenum" version))
1247 (sha256
1248 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1249 (build-system python-build-system)
1250 (arguments
1251 `(#:phases (modify-phases %standard-phases
1252 (replace 'check
1253 (lambda _
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")
1268 #t)))))
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}
1273 class.")
1274 (license license:bsd-3)))
1275
1276 (define-public python-can
1277 (package
1278 (name "python-can")
1279 (version "3.3.3")
1280 (source
1281 (origin
1282 (method url-fetch)
1283 (uri (pypi-uri "python-can" version))
1284 (sha256
1285 (base32
1286 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1287 (build-system python-build-system)
1288 (arguments
1289 `(#:phases (modify-phases %standard-phases
1290 (add-after 'unpack 'relax-version-requirements
1291 (lambda _
1292 (substitute* "setup.py"
1293 (("mock~=2\\.0") "mock")
1294 (("coverage<5") "coverage")
1295 (("pytest~=4\\.3") "pytest")
1296 (("hypothesis~=4\\.56") "hypothesis"))
1297 #t))
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).
1302 (lambda _
1303 (substitute* "test/test_scripts.py"
1304 (("\"can_logger\\.py --help\"") "")
1305 (("\"can_player\\.py --help\"") ""))
1306 #t)))))
1307 (propagated-inputs
1308 `(("python-aenum" ,python-aenum)
1309 ("python-wrapt" ,python-wrapt)))
1310 (native-inputs
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+)))
1328
1329 (define-public python-diskcache
1330 (package
1331 (name "python-diskcache")
1332 (version "4.1.0")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (pypi-uri "diskcache" version))
1337 (sha256
1338 (base32
1339 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1340 (build-system python-build-system)
1341 (arguments
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)))
1347
1348 (define-public python-bitstruct
1349 (package
1350 (name "python-bitstruct")
1351 (version "8.9.0")
1352 (source
1353 (origin
1354 (method url-fetch)
1355 (uri (pypi-uri "bitstruct" version))
1356 (sha256
1357 (base32
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)))
1367
1368 (define-public python-cantools
1369 (package
1370 (name "python-cantools")
1371 (version "33.1.1")
1372 (source
1373 (origin
1374 ;; We take the sources from the Git repository as the documentation is
1375 ;; not included with the PyPI archive.
1376 (method git-fetch)
1377 (uri (git-reference
1378 (url "https://github.com/eerimoq/cantools")
1379 (commit version)))
1380 (file-name (git-file-name name version))
1381 (sha256
1382 (base32
1383 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1384 (build-system python-build-system)
1385 (arguments
1386 `(#:phases
1387 (modify-phases %standard-phases
1388 (add-after 'build 'build-doc
1389 (lambda _
1390 ;; See: https://github.com/eerimoq/cantools/issues/190.
1391 (substitute* "README.rst"
1392 (("https://github.com/eerimoq/cantools/raw/master\
1393 /docs/monitor.png")
1394 "monitor.png"))
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)
1405 #t))))))
1406 (native-inputs
1407 `(("sphinx" ,python-sphinx)
1408 ("texinfo" ,texinfo)))
1409 (propagated-inputs
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:
1418 @itemize
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
1427 @end itemize")
1428 (license license:expat)))
1429
1430 (define-public python-capturer
1431 (package
1432 (name "python-capturer")
1433 (version "2.4")
1434 (source
1435 (origin
1436 (method url-fetch)
1437 (uri (pypi-uri "capturer" version))
1438 (sha256
1439 (base32
1440 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1441 (build-system python-build-system)
1442 (arguments
1443 `(#:tests? #f))
1444 (propagated-inputs
1445 `(("python-humanfriendly" ,python-humanfriendly)))
1446 (home-page "https://capturer.readthedocs.io")
1447 (synopsis "Capture stdout and stderr streams of the current process")
1448 (description
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)))
1454
1455 (define-public python2-capturer
1456 (package-with-python2 python-capturer))
1457
1458 (define-public python-case
1459 (package
1460 (name "python-case")
1461 (version "1.5.3")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "case" version))
1466 (sha256
1467 (base32
1468 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1469 (build-system python-build-system)
1470 (propagated-inputs
1471 `(("python-mock" ,python-mock)
1472 ("python-nose" ,python-nose)
1473 ("python-six" ,python-six)
1474 ("python-unittest2" ,python-unittest2)))
1475 (native-inputs
1476 `(("python-coverage" ,python-coverage)))
1477 (home-page "https://github.com/celery/case")
1478 (synopsis "Unittest utilities and convenience methods")
1479 (description
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)))
1483
1484 (define-public python-verboselogs
1485 (package
1486 (name "python-verboselogs")
1487 (version "1.7")
1488 (source
1489 (origin
1490 (method url-fetch)
1491 (uri (pypi-uri "verboselogs" version))
1492 (sha256
1493 (base32
1494 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1495 (build-system python-build-system)
1496 (arguments
1497 `(#:phases
1498 (modify-phases %standard-phases
1499 (replace 'check
1500 (lambda _
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"))))))
1505 (native-inputs
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")
1510 (description
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)))
1514
1515 (define-public python2-verboselogs
1516 (package-with-python2 python-verboselogs))
1517
1518 (define-public python-coloredlogs
1519 (package
1520 (name "python-coloredlogs")
1521 (version "10.0")
1522 (source
1523 (origin
1524 (method url-fetch)
1525 (uri (pypi-uri "coloredlogs" version))
1526 (sha256
1527 (base32
1528 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1529 (build-system python-build-system)
1530 (arguments
1531 `(;Tests require some updated modules
1532 #:tests? #f))
1533 (propagated-inputs
1534 `(("python-capturer" ,python-capturer)))
1535 (home-page "https://coloredlogs.readthedocs.io")
1536 (synopsis "Colored stream handler for Python's logging module")
1537 (description
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)))
1543
1544 (define-public python2-coloredlogs
1545 (package-with-python2 python-coloredlogs))
1546
1547 (define-public python-editorconfig
1548 (package
1549 (name "python-editorconfig")
1550 (version "0.12.2")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (pypi-uri "EditorConfig" version))
1555 (sha256
1556 (base32
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))))
1567
1568 (define-public dosage
1569 (package
1570 (name "dosage")
1571 (version "2.17")
1572 (source
1573 (origin
1574 (method url-fetch)
1575 (uri (pypi-uri "dosage" version))
1576 (sha256
1577 (base32
1578 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1579 (build-system python-build-system)
1580 (propagated-inputs
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)))
1592 (native-inputs
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)))
1604
1605 (define-public python-et-xmlfile
1606 (package
1607 (name "python-et-xmlfile")
1608 (version "1.0.1")
1609 (source
1610 (origin
1611 (method url-fetch)
1612 (uri (pypi-uri "et_xmlfile" version))
1613 (sha256
1614 (base32
1615 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1616 (build-system python-build-system)
1617 (arguments
1618 `(#:phases (modify-phases %standard-phases
1619 (replace 'check
1620 (lambda _
1621 (invoke "pytest"))))))
1622 (native-inputs
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)))
1631
1632 (define-public python2-et-xmlfile
1633 (package-with-python2 python-et-xmlfile))
1634
1635 (define-public python-openpyxl
1636 (package
1637 (name "python-openpyxl")
1638 (version "3.0.5")
1639 (source
1640 (origin
1641 ;; We use the upstream repository, as the tests are not included in the
1642 ;; PyPI releases.
1643 (method hg-fetch)
1644 (uri (hg-reference
1645 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1646 (changeset version)))
1647 (file-name (string-append name "-" version "-checkout"))
1648 (sha256
1649 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1650 (build-system python-build-system)
1651 (arguments
1652 `(#:phases (modify-phases %standard-phases
1653 (replace 'check
1654 (lambda _
1655 (invoke "pytest"))))))
1656 (native-inputs
1657 ;; For the test suite.
1658 `(("python-lxml" ,python-lxml)
1659 ("python-pillow" ,python-pillow)
1660 ("python-pytest" ,python-pytest)))
1661 (propagated-inputs
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)
1668 standard.")
1669 (properties `((python2-variant . ,(delay python2-openpyxl))))
1670 (license license:expat)))
1671
1672 (define-public python2-openpyxl
1673 (let ((base (package-with-python2
1674 (strip-python2-variant python-openpyxl))))
1675 (package
1676 (inherit base)
1677 ;; This is the latest version that has python2 support
1678 (version "2.6.4")
1679 (source
1680 (origin
1681 (method url-fetch)
1682 (uri (pypi-uri "openpyxl" version))
1683 (sha256
1684 (base32
1685 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1686 (arguments '(#:tests? #f))))) ; No test suite.
1687
1688 (define-public python-eventlet
1689 (package
1690 (name "python-eventlet")
1691 (version "0.25.1")
1692 (source
1693 (origin
1694 (method url-fetch)
1695 (uri (pypi-uri "eventlet" version))
1696 (sha256
1697 (base32
1698 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1699 (build-system python-build-system)
1700 (propagated-inputs
1701 `(("python-greenlet" ,python-greenlet)))
1702 (arguments
1703 ;; TODO: Requires unpackaged 'enum-compat'.
1704 '(#:tests? #f))
1705 (home-page "https://eventlet.net")
1706 (synopsis "Concurrent networking library for Python")
1707 (description
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)))
1716
1717 (define-public python2-eventlet
1718 (let ((base (package-with-python2
1719 (strip-python2-variant python-eventlet))))
1720 (package (inherit base)
1721 (propagated-inputs
1722 `(("python2-enum34" ,python2-enum34)
1723 ,@(package-propagated-inputs base))))))
1724
1725 (define-public python-six
1726 (package
1727 (name "python-six")
1728 (version "1.14.0")
1729 (source
1730 (origin
1731 (method url-fetch)
1732 (uri (pypi-uri "six" version))
1733 (sha256
1734 (base32
1735 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1736 (build-system python-build-system)
1737 (arguments
1738 `(#:phases
1739 (modify-phases %standard-phases
1740 (replace 'check
1741 (lambda _
1742 (invoke "py.test" "-v"))))))
1743 (native-inputs
1744 `(("python-pytest" ,python-pytest-bootstrap)))
1745 (home-page "https://pypi.org/project/six/")
1746 (synopsis "Python 2 and 3 compatibility utilities")
1747 (description
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)))
1754
1755 (define-public python2-six
1756 (package-with-python2 python-six))
1757
1758 (define-public python-six-bootstrap
1759 (package
1760 (inherit python-six)
1761 (name "python-six-bootstrap")
1762 (native-inputs `())
1763 (arguments `(#:tests? #f))))
1764
1765 (define-public python2-six-bootstrap
1766 (package-with-python2 python-six-bootstrap))
1767
1768 (define-public python-schedule
1769 (package
1770 (name "python-schedule")
1771 (version "0.4.3")
1772 (source
1773 (origin
1774 (method url-fetch)
1775 (uri (pypi-uri "schedule" version))
1776 (sha256
1777 (base32
1778 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1779 (build-system python-build-system)
1780 (native-inputs
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")
1785 (description
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)))
1791
1792 (define-public python2-schedule
1793 (package-with-python2 python-schedule))
1794
1795 (define-public python-scour
1796 (package
1797 (name "python-scour")
1798 (version "038.1")
1799 (source
1800 (origin
1801 (method git-fetch)
1802 (uri
1803 (git-reference
1804 (url "https://github.com/scour-project/scour")
1805 (commit
1806 (string-append "v" version))))
1807 (file-name (git-file-name name version))
1808 (sha256
1809 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1810 (propagated-inputs
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)))
1820
1821 (define-public python-mechanize
1822 (package
1823 (name "python-mechanize")
1824 (version "0.4.5")
1825 (source
1826 (origin
1827 (method url-fetch)
1828 (uri (pypi-uri "mechanize" version))
1829 (sha256
1830 (base32
1831 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1832 (build-system python-build-system)
1833 (propagated-inputs
1834 `(("python-html5lib" ,python-html5lib)))
1835 (home-page "https://github.com/python-mechanize/mechanize")
1836 (synopsis
1837 "Stateful programmatic web browsing in Python")
1838 (description
1839 "Mechanize implements stateful programmatic web browsing in Python,
1840 after Andy Lester’s Perl module WWW::Mechanize.")
1841 (license license:bsd-3)))
1842
1843 (define-public python2-mechanize
1844 (package-with-python2 python-mechanize))
1845
1846 (define-public python-simpleaudio
1847 (package
1848 (name "python-simpleaudio")
1849 (version "1.0.4")
1850 (source
1851 (origin
1852 (method url-fetch)
1853 (uri (pypi-uri "simpleaudio" version))
1854 (sha256
1855 (base32
1856 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1857 (build-system python-build-system)
1858 (arguments
1859 `(#:tests? #f))
1860 (inputs
1861 `(("alsa-lib" ,alsa-lib)))
1862 (home-page
1863 "https://github.com/hamiltron/py-simple-audio")
1864 (synopsis "Simple, asynchronous audio playback for Python 3")
1865 (description
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
1869
1870 (define-public python-simplejson
1871 (package
1872 (name "python-simplejson")
1873 (version "3.17.0")
1874 (source
1875 (origin
1876 (method url-fetch)
1877 (uri (pypi-uri "simplejson" version))
1878 (sha256
1879 (base32
1880 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1881 (build-system python-build-system)
1882 (home-page "http://simplejson.readthedocs.org/en/latest/")
1883 (synopsis
1884 "Json library for Python")
1885 (description
1886 "JSON (JavaScript Object Notation) is a subset of JavaScript
1887 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1888 format.
1889
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
1895 Python 3.3+.")
1896 (license license:x11)))
1897
1898 (define-public python2-simplejson
1899 (package-with-python2 python-simplejson))
1900
1901
1902 (define-public python-pyicu
1903 (package
1904 (name "python-pyicu")
1905 (version "2.4.3")
1906 (source
1907 (origin
1908 (method url-fetch)
1909 (uri (pypi-uri "PyICU" version))
1910 (sha256
1911 (base32
1912 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1913 (build-system python-build-system)
1914 (inputs
1915 `(("icu4c" ,icu4c)))
1916 (native-inputs
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")
1921 (description
1922 "PyICU is a python extension wrapping the ICU C++ API.")
1923 (license license:x11)))
1924
1925 (define-public python2-pyicu
1926 (package-with-python2 python-pyicu))
1927
1928 (define-public python-dogtail
1929 (package
1930 (name "python-dogtail")
1931 (version "0.9.11")
1932 (source (origin
1933 (method url-fetch)
1934 (uri
1935 (string-append
1936 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1937 "dogtail-" version ".tar.gz"))
1938 (sha256
1939 (base32
1940 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1941 (build-system python-build-system)
1942 (arguments
1943 `(#:tests? #f ; TODO Launching dbus for the tests
1944 ; fails
1945 #:phases
1946 (modify-phases %standard-phases
1947 (replace 'check
1948 (lambda* (#:key tests? #:allow-other-keys)
1949 (when tests?
1950 (system "Xvfb :1 &")
1951 (setenv "DISPLAY" ":1")
1952 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1953 #t)))))
1954 (propagated-inputs
1955 `(("python-pygobject" ,python-pygobject)
1956 ("python-pycairo" ,python-pycairo)
1957 ("python-pyatspi" ,python-pyatspi)))
1958 (native-inputs
1959 `(("python-nose" ,python-nose)
1960 ("gtk+" ,gtk+)
1961 ("xvfb" ,xorg-server)
1962 ("dbus" ,dbus)
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")
1967 (description
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+)))
1973
1974 (define-public python2-dogtail
1975 (package-with-python2 python-dogtail))
1976
1977 (define-public python-empy
1978 (package
1979 (name "python-empy")
1980 (version "3.3.3")
1981 (source (origin
1982 (method url-fetch)
1983 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1984 version ".tar.gz"))
1985 (sha256
1986 (base32
1987 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1988 (build-system python-build-system)
1989 (arguments
1990 `(#:tests? #f)) ; python2 only
1991 (home-page "http://www.alcyone.com/software/empy/")
1992 (synopsis "Templating system for Python")
1993 (description
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
2004 commands.")
2005 (license license:lgpl2.1+)))
2006
2007 (define-public python2-empy
2008 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2009 (package
2010 (inherit base)
2011 (arguments `(,@(package-arguments base)
2012 #:tests? #t)))))
2013
2014 (define-public python2-element-tree
2015 (package
2016 (name "python2-element-tree")
2017 (version "1.2.6")
2018 (source (origin
2019 (method url-fetch)
2020 (uri (string-append
2021 "http://effbot.org/media/downloads/elementtree-"
2022 version "-20050316.tar.gz"))
2023 (sha256
2024 (base32
2025 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2026 (build-system python-build-system)
2027 (arguments
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")
2031 (description
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\"."))))
2037
2038 (define-public python2-pybugz
2039 (package
2040 (name "python2-pybugz")
2041 (version "0.6.11")
2042 (source (origin
2043 (method url-fetch)
2044 (uri (string-append
2045 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2046 version ".tar.gz"))
2047 (sha256
2048 (base32
2049 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2050 (patches (search-patches "pybugz-stty.patch"
2051 "pybugz-encode-error.patch"))))
2052 (build-system python-build-system)
2053 (arguments
2054 `(#:python ,python-2 ; SyntaxError with Python 3
2055 #:tests? #f)) ; no 'test' sub-command
2056 (propagated-inputs
2057 `(("element-tree" ,python2-element-tree)))
2058 (synopsis "Python and command-line interface to Bugzilla")
2059 (description
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
2062 bug tracker.")
2063 (home-page "http://www.liquidx.net/pybugz/")
2064 (license license:gpl2)))
2065
2066 (define-public python2-enum
2067 (package
2068 (name "python2-enum")
2069 (version "0.4.6")
2070 (source (origin
2071 (method url-fetch)
2072 (uri (pypi-uri "enum" version))
2073 (sha256
2074 (base32
2075 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2076 (build-system python-build-system)
2077 (arguments
2078 `(#:python ,python-2))
2079 (home-page "https://pypi.org/project/enum/")
2080 (synopsis "Robust enumerated type support in Python")
2081 (description
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
2084 compatibility.")
2085 ;; Choice of either license.
2086 (license (list license:gpl3+ license:psfl))))
2087
2088 (define-public python-enum34
2089 (package
2090 (name "python-enum34")
2091 (version "1.1.6")
2092 (source
2093 (origin
2094 (method url-fetch)
2095 (uri (pypi-uri "enum34" version))
2096 (sha256
2097 (base32
2098 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2099 (build-system python-build-system)
2100 (home-page "https://pypi.org/project/enum34/")
2101 (synopsis "Backported Python 3.4 Enum")
2102 (description
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)))
2106
2107 (define-public python2-enum34
2108 (package-with-python2 python-enum34))
2109
2110 (define-public python-parse-type
2111 (package
2112 (name "python-parse-type")
2113 (version "0.4.2")
2114 (source
2115 (origin
2116 (method url-fetch)
2117 (uri (pypi-uri "parse_type" version))
2118 (sha256
2119 (base32
2120 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2121 (build-system python-build-system)
2122 (propagated-inputs
2123 `(("python-six" ,python-six)
2124 ("python-parse" ,python-parse)))
2125 (native-inputs
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")
2130 (description
2131 "Parse_type extends the python parse module.")
2132 (properties
2133 `((python2-variant . ,(delay python2-parse-type))))
2134 (license license:bsd-3)))
2135
2136 (define-public python2-parse-type
2137 (let ((base (package-with-python2
2138 (strip-python2-variant python-parse-type))))
2139 (package (inherit base)
2140 (propagated-inputs
2141 `(("python2-enum34" ,python2-enum34)
2142 ,@(package-propagated-inputs base))))))
2143
2144 (define-public python-parse
2145 (package
2146 (name "python-parse")
2147 (version "1.8.4")
2148 (source
2149 (origin
2150 (method url-fetch)
2151 (uri (pypi-uri "parse" version))
2152 (sha256
2153 (base32
2154 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
2155 (build-system python-build-system)
2156 (arguments
2157 `(#:phases
2158 (modify-phases %standard-phases
2159 (replace 'check
2160 (lambda _ (invoke "python" "test_parse.py"))))))
2161 (home-page "https://github.com/r1chardj0n3s/parse")
2162 (synopsis "Parse strings")
2163 (description
2164 "Parse strings using a specification based on the Python @code{format()}
2165 syntax.")
2166 (license license:x11)))
2167
2168 (define-public python-polib
2169 (package
2170 (name "python-polib")
2171 (version "1.0.8")
2172 (source (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "polib" version))
2175 (sha256
2176 (base32
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
2183 existing ones.")
2184 (license license:expat)))
2185
2186 (define-public python2-polib
2187 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2188 (package
2189 (inherit base)
2190 (arguments `(,@(package-arguments base)
2191 ;; Tests don't work with python2.
2192 #:tests? #f)))))
2193
2194 (define-public python-poyo
2195 (package
2196 (name "python-poyo")
2197 (version "0.5.0")
2198 (source
2199 (origin
2200 (method url-fetch)
2201 (uri (pypi-uri "poyo" version))
2202 (sha256
2203 (base32
2204 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2205 (build-system python-build-system)
2206 (home-page "https://github.com/hackebrot/poyo")
2207 (synopsis "Lightweight YAML Parser for Python")
2208 (description
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)))
2214
2215 (define-public scons
2216 (package
2217 (name "scons")
2218 (version "3.0.4")
2219 (source (origin
2220 (method git-fetch)
2221 (uri (git-reference
2222 (url "https://github.com/SCons/scons")
2223 (commit version)))
2224 (file-name (git-file-name name version))
2225 (sha256
2226 (base32
2227 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2228 (build-system python-build-system)
2229 (arguments
2230 `(#:use-setuptools? #f ; still relies on distutils
2231 #:tests? #f ; no 'python setup.py test' command
2232 #:phases
2233 (modify-phases %standard-phases
2234 (add-before 'build 'bootstrap
2235 (lambda _
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")
2244 #t)))))
2245 (home-page "https://scons.org/")
2246 (synopsis "Software construction tool written in Python")
2247 (description
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
2252 software.")
2253 (license license:x11)))
2254
2255 (define-public scons-python2
2256 (package
2257 (inherit (package-with-python2 scons))
2258 (name "scons-python2")))
2259
2260 (define-public python-extras
2261 (package
2262 (name "python-extras")
2263 (version "1.0.0")
2264 (source
2265 (origin
2266 (method url-fetch)
2267 (uri (pypi-uri "extras" version))
2268 (sha256
2269 (base32
2270 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2271 (build-system python-build-system)
2272 (arguments
2273 ;; FIXME: Circular dependency on testtools.
2274 '(#:tests? #f))
2275 (home-page "https://github.com/testing-cabal/extras")
2276 (synopsis "Useful extensions to the Python standard library")
2277 (description
2278 "Extras is a set of extensions to the Python standard library.")
2279 (license license:expat)))
2280
2281 (define-public python2-extras
2282 (package-with-python2 python-extras))
2283
2284 (define-public python-mimeparse
2285 (package
2286 (name "python-mimeparse")
2287 (version "1.6.0")
2288 (source
2289 (origin
2290 (method url-fetch)
2291 (uri (pypi-uri "python-mimeparse" version))
2292 (sha256
2293 (base32
2294 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2295 (build-system python-build-system)
2296 (arguments
2297 '(#:phases
2298 (modify-phases %standard-phases
2299 (replace 'check
2300 (lambda _
2301 (invoke "./mimeparse_test.py"))))))
2302 (home-page
2303 "https://github.com/dbtsai/python-mimeparse")
2304 (synopsis "Python library for parsing MIME types")
2305 (description
2306 "Mimeparse provides basic functions for parsing MIME type names and
2307 matching them against a list of media-ranges.")
2308 (license license:expat)))
2309
2310 (define-public python2-mimeparse
2311 (package-with-python2 python-mimeparse))
2312
2313 (define-public python-miniboa
2314 (package
2315 (name "python-miniboa")
2316 (version "1.0.7")
2317 (source
2318 (origin
2319 (method url-fetch)
2320 (uri (pypi-uri "miniboa" version))
2321 (sha256
2322 (base32
2323 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2324 (build-system python-build-system)
2325 (home-page "https://github.com/shmup/miniboa")
2326 (synopsis "Simple, single-threaded Telnet server")
2327 (description
2328 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2329 server.")
2330 (license license:asl2.0)))
2331
2332 (define-public python2-miniboa
2333 (package-with-python2 python-miniboa))
2334
2335 (define-public python-pafy
2336 (package
2337 (name "python-pafy")
2338 (version "0.5.3.1")
2339 (source
2340 (origin
2341 (method url-fetch)
2342 (uri (pypi-uri "pafy" version))
2343 (sha256
2344 (base32
2345 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2346 (build-system python-build-system)
2347 (arguments
2348 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2349 (propagated-inputs
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")
2355 (description
2356 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2357 (license license:lgpl3+)))
2358
2359 (define-public python2-funcsigs
2360 (package
2361 (name "python2-funcsigs")
2362 (version "1.0.2")
2363 (source (origin
2364 (method url-fetch)
2365 (uri (pypi-uri "funcsigs" version))
2366 (sha256
2367 (base32
2368 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2369 (build-system python-build-system)
2370 (arguments
2371 `(#:python ,python-2))
2372 (native-inputs
2373 `(("python2-unittest2" ,python2-unittest2)))
2374 (home-page "http://funcsigs.readthedocs.org")
2375 (synopsis "Python function signatures from PEP362")
2376 (description
2377 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2378 (license license:asl2.0)))
2379
2380 (define-public python2-funcsigs-bootstrap
2381 (package
2382 (inherit python2-funcsigs)
2383 (name "python2-funcsigs-bootstrap")
2384 (native-inputs `())
2385 (arguments
2386 `(#:tests? #f
2387 ,@(package-arguments python2-funcsigs)))))
2388
2389 (define-public python-py
2390 (package
2391 (name "python-py")
2392 (version "1.8.1")
2393 (source
2394 (origin
2395 (method url-fetch)
2396 (uri (pypi-uri "py" version))
2397 (sha256
2398 (base32
2399 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2400 (build-system python-build-system)
2401 (arguments
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?"
2406 '(#:tests? #f))
2407 (native-inputs
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")
2411 (description
2412 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2413 code introspection, and logging.")
2414 (license license:expat)))
2415
2416 (define-public python2-py
2417 (package-with-python2 python-py))
2418
2419 ;; Recent versions of python-fixtures and python-testrepository need
2420 ;; python-pbr for packaging, which itself needs these two packages for
2421 ;; testing.
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
2430 (package
2431 (name "python-pbr-minimal")
2432 (version "3.0.1")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (pypi-uri "pbr" version))
2437 (sha256
2438 (base32
2439 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2440 (build-system python-build-system)
2441 (arguments
2442 `(#:tests? #f))
2443 (home-page "https://docs.openstack.org/pbr/latest/")
2444 (synopsis "Minimal build of python-pbr used for bootstrapping")
2445 (description
2446 "Used only for bootstrapping python2-pbr, you should not need this.")
2447 (license license:asl2.0)))
2448
2449 (define-public python2-pbr-minimal
2450 (package-with-python2 python-pbr-minimal))
2451
2452 (define-public python-pbr
2453 (package
2454 (inherit python-pbr-minimal)
2455 (name "python-pbr")
2456 (arguments
2457 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2458 (propagated-inputs
2459 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2460 (native-inputs
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")
2472 (description
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.
2477 ")))
2478
2479 (define-public python2-pbr
2480 (package-with-python2 python-pbr))
2481
2482 (define-public python-pyrsistent
2483 (package
2484 (name "python-pyrsistent")
2485 (version "0.16.0")
2486 (home-page "https://github.com/tobgu/pyrsistent")
2487 (source (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "pyrsistent" version))
2490 (sha256
2491 (base32
2492 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2493 (build-system python-build-system)
2494 (arguments
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
2499 (lambda _
2500 (substitute* "setup.py"
2501 (("pytest<5") "pytest")
2502 (("hypothesis<5") "hypothesis"))
2503 #t)))))
2504 (native-inputs
2505 `(("python-hypothesis" ,python-hypothesis)
2506 ("python-pytest" ,python-pytest)
2507 ("python-pytest-runner" ,python-pytest-runner)))
2508 (propagated-inputs
2509 `(("python-six" ,python-six)))
2510 (synopsis "Persistent data structures for Python")
2511 (description
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.
2514
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)))
2519
2520 (define-public python2-pyrsistent
2521 (package-with-python2 python-pyrsistent))
2522
2523 (define-public python-exif-read
2524 (package
2525 (name "python-exif-read")
2526 (version "2.1.2")
2527 (source (origin
2528 (method url-fetch)
2529 (uri (pypi-uri "ExifRead" version))
2530 (sha256
2531 (base32
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")
2537 (description
2538 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2539 files.")
2540 (license license:bsd-3)))
2541
2542 (define-public python2-exif-read
2543 (package-with-python2 python-exif-read))
2544
2545 (define-public python-pyld
2546 (package
2547 (name "python-pyld")
2548 (version "1.0.5")
2549 (source (origin
2550 (method url-fetch)
2551 (uri (pypi-uri "PyLD" version))
2552 (sha256
2553 (base32
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")
2558 (description
2559 "PyLD is an implementation of the JSON-LD specification.")
2560 (license license:bsd-3)))
2561
2562 (define-public python2-pyld
2563 (package-with-python2 python-pyld))
2564
2565 (define-public python-cli-helpers
2566 (package
2567 (name "python-cli-helpers")
2568 (version "2.0.1")
2569 (source
2570 (origin
2571 ;; There's no source tarball on PyPI.
2572 (method git-fetch)
2573 (uri (git-reference
2574 (url "https://github.com/dbcli/cli_helpers")
2575 (commit (string-append "v" version))))
2576 (file-name (git-file-name name version))
2577 (sha256
2578 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2579 (build-system python-build-system)
2580 (native-inputs
2581 `(("python-pytest" ,python-pytest)))
2582 (propagated-inputs
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")
2589 (description
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
2592 interfaces.")
2593 (license license:bsd-3)))
2594
2595 (define-public python-click
2596 (package
2597 (name "python-click")
2598 (version "7.1.2")
2599 (source
2600 (origin
2601 (method url-fetch)
2602 (uri (pypi-uri "click" version))
2603 (sha256
2604 (base32
2605 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2606 (build-system python-build-system)
2607 (arguments
2608 `(#:phases
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"
2615 (("'locale'")
2616 (string-append "'" glibc "/bin/locale'"))))
2617 #t))
2618 (replace 'check
2619 (lambda _
2620 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2621 (invoke "python" "-m" "pytest"))))))
2622 (native-inputs
2623 `(("python-pytest" ,python-pytest)))
2624 (home-page "https://palletsprojects.com/p/click/")
2625 (synopsis "Command line library for Python")
2626 (description
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)))
2632
2633 (define-public python2-click
2634 (package-with-python2 python-click))
2635
2636 (define-public python-click-5
2637 (package (inherit python-click)
2638 (name "python-click")
2639 (version "5.1")
2640 (source
2641 (origin
2642 (method url-fetch)
2643 (uri (pypi-uri "click" version))
2644 (sha256
2645 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2646 (arguments `())))
2647
2648 (define-public python-wheel
2649 (package
2650 (name "python-wheel")
2651 (version "0.33.6")
2652 (source
2653 (origin
2654 (method url-fetch)
2655 (uri (pypi-uri "wheel" version))
2656 (sha256
2657 (base32
2658 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2659 (build-system python-build-system)
2660 (arguments
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?
2664 '(#:tests? #f))
2665 (home-page "https://bitbucket.org/pypa/wheel/")
2666 (synopsis "Format for built Python packages")
2667 (description
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)))
2676
2677 (define-public python2-wheel
2678 (package-with-python2 python-wheel))
2679
2680 (define-public python-vcversioner
2681 (package
2682 (name "python-vcversioner")
2683 (version "2.16.0.0")
2684 (source
2685 (origin
2686 (method url-fetch)
2687 (uri (pypi-uri "vcversioner" version))
2688 (sha256
2689 (base32
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
2695 version numbers.")
2696 (home-page "https://github.com/habnabit/vcversioner")
2697 (license license:isc)))
2698
2699 (define-public python2-vcversioner
2700 (package-with-python2 python-vcversioner))
2701
2702 (define-public python-jdcal
2703 (package
2704 (name "python-jdcal")
2705 (version "1.4")
2706 (source
2707 (origin
2708 (method url-fetch)
2709 (uri (pypi-uri "jdcal" version))
2710 (sha256
2711 (base32
2712 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2713 (build-system python-build-system)
2714 (arguments
2715 `(#:phases (modify-phases %standard-phases
2716 (replace 'check
2717 (lambda _
2718 (invoke "pytest"))))))
2719 (native-inputs
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)))
2726
2727 (define-public python2-jdcal
2728 (package-with-python2 python-jdcal))
2729
2730 (define-public python-jsondiff
2731 (package
2732 (name "python-jsondiff")
2733 (version "1.2.0")
2734 (source
2735 (origin
2736 (method url-fetch)
2737 (uri (pypi-uri "jsondiff" version))
2738 (sha256
2739 (base32
2740 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2741 (build-system python-build-system)
2742 (native-inputs
2743 `(("python-nose" ,python-nose)
2744 ("python-nose-random" ,python-nose-random)))
2745 (home-page
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)))
2751
2752 (define-public python-jsonschema
2753 (package
2754 (name "python-jsonschema")
2755 (version "3.2.0")
2756 (source (origin
2757 (method url-fetch)
2758 (uri (pypi-uri "jsonschema" version))
2759 (sha256
2760 (base32
2761 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2762 (build-system python-build-system)
2763 (arguments
2764 '(#:phases
2765 (modify-phases %standard-phases
2766 (replace 'check
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"))))))
2771 (native-inputs
2772 `(("python-setuptools_scm" ,python-setuptools-scm)
2773 ("python-twisted" ,python-twisted)))
2774 (propagated-inputs
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")
2781 (description
2782 "Jsonschema is an implementation of JSON Schema for Python.")
2783 (license license:expat)
2784 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2785
2786 (define-public python2-jsonschema
2787 (let ((jsonschema (package-with-python2
2788 (strip-python2-variant python-jsonschema))))
2789 (package (inherit jsonschema)
2790 (propagated-inputs
2791 `(("python2-functools32" ,python2-functools32)
2792 ,@(package-propagated-inputs jsonschema))))))
2793
2794 (define-public python-schema
2795 (package
2796 (name "python-schema")
2797 (version "0.6.6")
2798 (source
2799 (origin
2800 (method url-fetch)
2801 (uri (pypi-uri "schema" version))
2802 (sha256
2803 (base32
2804 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2805 (build-system python-build-system)
2806 (native-inputs
2807 `(("python-pytest" ,python-pytest)))
2808 (home-page "https://github.com/keleshev/schema")
2809 (synopsis "Simple data validation library")
2810 (description
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)))
2816
2817 (define-public python2-schema
2818 (package-with-python2 python-schema))
2819
2820 (define-public python-schema-0.5
2821 (package (inherit python-schema)
2822 (version "0.5.0")
2823 (source
2824 (origin
2825 (method url-fetch)
2826 (uri (pypi-uri "schema" version))
2827 (sha256
2828 (base32
2829 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2830
2831 (define-public python2-schema-0.5
2832 (package-with-python2 python-schema-0.5))
2833
2834 (define-public python-kitchen
2835 (package
2836 (name "python-kitchen")
2837 (version "1.2.5")
2838 (source
2839 (origin
2840 (method url-fetch)
2841 (uri (pypi-uri "kitchen" version))
2842 (sha256
2843 (base32
2844 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2845 (build-system python-build-system)
2846 (propagated-inputs
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:
2857 license:psfl))))
2858
2859 (define-public python2-kitchen
2860 (package-with-python2 python-kitchen))
2861
2862 (define-public python-unidecode
2863 (package
2864 (name "python-unidecode")
2865 (version "1.1.1")
2866 (source (origin
2867 (method url-fetch)
2868 (uri (pypi-uri "Unidecode" version))
2869 (sha256
2870 (base32
2871 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2872 (build-system python-build-system)
2873 (home-page "https://pypi.org/project/Unidecode/")
2874 (synopsis "ASCII transliterations of Unicode text")
2875 (description
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+)))
2882
2883 (define-public python2-unidecode
2884 (package-with-python2 python-unidecode))
2885
2886 (define-public python-text-unidecode
2887 (package
2888 (name "python-text-unidecode")
2889 (version "1.3")
2890 (source (origin
2891 (method url-fetch)
2892 (uri (pypi-uri "text-unidecode" version))
2893 (sha256
2894 (base32
2895 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2896 (build-system python-build-system)
2897 (arguments
2898 '(#:phases (modify-phases %standard-phases
2899 (replace 'check
2900 (lambda _
2901 (setenv "PYTHONPATH"
2902 (string-append "./build/lib:"
2903 (getenv "PYTHONPATH")))
2904 (invoke "pytest" "-vv"))))))
2905 (native-inputs
2906 `(("python-pytest" ,python-pytest)))
2907 (home-page "https://github.com/kmike/text-unidecode/")
2908 (synopsis "Decode Unicode data")
2909 (description
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+))))
2916
2917 (define-public python2-text-unidecode
2918 (package-with-python2 python-text-unidecode))
2919
2920 (define-public python-pyjwt
2921 (package
2922 (name "python-pyjwt")
2923 (version "1.7.1")
2924 (source
2925 (origin
2926 (method url-fetch)
2927 (uri (pypi-uri "PyJWT" version))
2928 (sha256
2929 (base32
2930 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2931 (modules '((guix build utils)))
2932 (snippet
2933 '(begin
2934 (for-each delete-file-recursively
2935 (find-files "." "\\.pyc$"))
2936 #t))))
2937 (build-system python-build-system)
2938 (arguments
2939 '(#:phases (modify-phases %standard-phases
2940 (replace 'check
2941 (lambda _
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.*")
2947 ""))
2948 (invoke "pytest" "-vv"))))))
2949 (native-inputs
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")
2954 (description
2955 "PyJWT is a JSON Web Token implementation written in Python.")
2956 (license license:expat)))
2957
2958 (define-public python2-pyjwt
2959 (package-with-python2 python-pyjwt))
2960
2961 (define-public python-pykka
2962 (package
2963 (name "python-pykka")
2964 (version "1.2.1")
2965 (source
2966 (origin
2967 (method url-fetch)
2968 (uri (pypi-uri "Pykka" version))
2969 (sha256
2970 (base32
2971 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2972 (build-system python-build-system)
2973 (native-inputs
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")
2980 (description
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)))
2986
2987 (define-public python2-pykka
2988 (package-with-python2 python-pykka))
2989
2990 (define-public python-pymsgbox
2991 (package
2992 (name "python-pymsgbox")
2993 (version "1.0.6")
2994 (source
2995 (origin
2996 (method git-fetch)
2997 (uri (git-reference
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))
3002 (sha256
3003 (base32
3004 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3005 (arguments
3006 ;; Circular dependency to run tests:
3007 ;; Tests need pyautogui, which depends on pymsgbox.
3008 '(#:tests? #f))
3009 (build-system python-build-system)
3010 (home-page "https://github.com/asweigart/PyMsgBox")
3011 (synopsis "Python module for JavaScript-like message boxes")
3012 (description
3013 "PyMsgBox is a simple, cross-platform, pure Python module for
3014 JavaScript-like message boxes. Types of dialog boxes include:
3015 @enumerate
3016 @item alert
3017 @item confirm
3018 @item prompt
3019 @item password
3020 @end enumerate
3021 ")
3022 (license license:bsd-3)))
3023
3024 (define-public python-pympler
3025 (package
3026 (name "python-pympler")
3027 (home-page "https://pythonhosted.org/Pympler/")
3028 (version "0.8")
3029 (source (origin
3030 (method url-fetch)
3031 (uri (pypi-uri "Pympler" version))
3032 (sha256
3033 (base32
3034 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3035 (build-system python-build-system)
3036 (arguments
3037 `(#:phases (modify-phases %standard-phases
3038 (delete 'check)
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")
3044 (description
3045 "Pympler is a development tool to measure, monitor and analyze
3046 the memory behavior of Python objects in a running Python application.
3047
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
3051 be identified.
3052
3053 A web profiling frontend exposes process statistics, garbage
3054 visualisation and class tracker statistics.")
3055 (license license:asl2.0)))
3056
3057 (define-public python2-pympler
3058 (package-with-python2 python-pympler))
3059
3060 (define-public python-itsdangerous
3061 (package
3062 (name "python-itsdangerous")
3063 (version "1.1.0")
3064 (source
3065 (origin
3066 (method url-fetch)
3067 (uri (pypi-uri "itsdangerous" version))
3068 (sha256
3069 (base32
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")
3074 (description
3075 "Itsdangerous provides various helpers to pass trusted data to untrusted
3076 environments and back.")
3077 (license license:bsd-3)))
3078
3079 (define-public python2-itsdangerous
3080 (package-with-python2 python-itsdangerous))
3081
3082 (define-public python-pyyaml
3083 (package
3084 (name "python-pyyaml")
3085 (version "5.3.1")
3086 (source
3087 (origin
3088 (method url-fetch)
3089 (uri (pypi-uri "PyYAML" version))
3090 (sha256
3091 (base32
3092 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3093 (build-system python-build-system)
3094 (inputs
3095 `(("libyaml" ,libyaml)))
3096 (home-page "https://pyyaml.org")
3097 (synopsis "YAML parser and emitter for Python")
3098 (description
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)))
3104
3105 (define-public python2-pyyaml
3106 (package-with-python2 python-pyyaml))
3107
3108 (define-public python-vine
3109 (package
3110 (name "python-vine")
3111 (version "1.1.4")
3112 (source
3113 (origin
3114 (method url-fetch)
3115 (uri (pypi-uri "vine" version))
3116 (sha256
3117 (base32
3118 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3119 (build-system python-build-system)
3120 (native-inputs
3121 `(("python-pytest" ,python-pytest)
3122 ("python-case" ,python-case)))
3123 (home-page "https://github.com/celery/vine")
3124 (synopsis "Promises for Python")
3125 (description
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)))
3131
3132 (define-public python-virtualenv
3133 (package
3134 (name "python-virtualenv")
3135 (version "20.0.10")
3136 (source
3137 (origin
3138 (method url-fetch)
3139 (uri (pypi-uri "virtualenv" version))
3140 (sha256
3141 (base32
3142 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
3143 (build-system python-build-system)
3144 (native-inputs
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)))
3153 (propagated-inputs
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")
3161 (description
3162 "Virtualenv is a tool to create isolated Python environments.")
3163 (properties `((python2-variant . ,(delay python2-virtualenv))))
3164 (license license:expat)))
3165
3166 (define-public python2-virtualenv
3167 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3168 (package
3169 (inherit base)
3170 (arguments
3171 `(#:python ,python-2
3172 #:phases
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"
3178 "/site-packages")))
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
3185 (string-split
3186 (getenv "PYTHONPATH")
3187 #\:))
3188 ":")
3189 ":" python-sitedir))
3190 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3191 (getenv "PYTHONPATH"))
3192 #t))))))
3193 (propagated-inputs
3194 `(("python-contextlib2" ,python2-contextlib2)
3195 ,@(package-propagated-inputs base))))))
3196
3197 (define-public python-markupsafe
3198 (package
3199 (name "python-markupsafe")
3200 (version "1.1.1")
3201 (source
3202 (origin
3203 (method url-fetch)
3204 (uri (pypi-uri "MarkupSafe" version))
3205 (sha256
3206 (base32
3207 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3208 (build-system python-build-system)
3209 (arguments
3210 `(#:modules ((ice-9 ftw)
3211 (srfi srfi-1)
3212 (srfi srfi-26)
3213 (guix build utils)
3214 (guix build python-build-system))
3215 #:phases (modify-phases %standard-phases
3216 (replace 'check
3217 (lambda _
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")))))))
3225 (native-inputs
3226 `(("python-pytest" ,python-pytest)))
3227 (home-page "https://github.com/mitsuhiko/markupsafe")
3228 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3229 (description
3230 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3231 for Python.")
3232 (license license:bsd-3)))
3233
3234 (define-public python2-markupsafe
3235 (package-with-python2 python-markupsafe))
3236
3237 (define-public python-jinja2
3238 (package
3239 (name "python-jinja2")
3240 (version "2.11.2")
3241 (source
3242 (origin
3243 (method url-fetch)
3244 (uri (pypi-uri "Jinja2" version))
3245 (sha256
3246 (base32
3247 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3248 (build-system python-build-system)
3249 (arguments
3250 '(#:phases (modify-phases %standard-phases
3251 (replace 'check
3252 (lambda* (#:key tests? #:allow-other-keys)
3253 (if tests?
3254 (begin
3255 (setenv "PYTHONPATH"
3256 (string-append "./build/lib:"
3257 (getenv "PYTHONPATH")))
3258 (invoke "pytest" "-vv"))
3259 (format #t "test suite not run~%"))
3260 #t)))))
3261 (native-inputs
3262 `(("python-pytest" ,python-pytest)))
3263 (propagated-inputs
3264 `(("python-markupsafe" ,python-markupsafe)))
3265 (home-page "http://jinja.pocoo.org/")
3266 (synopsis "Python template engine")
3267 (description
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)))
3271
3272 (define-public python2-jinja2
3273 (package-with-python2 python-jinja2))
3274
3275 (define-public python-jinja2-time
3276 (package
3277 (name "python-jinja2-time")
3278 (version "0.2.0")
3279 (source
3280 (origin
3281 (method url-fetch)
3282 (uri (pypi-uri "jinja2-time" version))
3283 (sha256
3284 (base32
3285 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3286 (build-system python-build-system)
3287 (propagated-inputs
3288 `(("python-arrow" ,python-arrow)
3289 ("python-jinja2" ,python-jinja2)))
3290 (home-page
3291 "https://github.com/hackebrot/jinja2-time")
3292 (synopsis "Jinja2 Extension for Dates and Times")
3293 (description
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)))
3298
3299 (define-public python-pystache
3300 (package
3301 (name "python-pystache")
3302 (version "0.5.4")
3303 (source (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "pystache" version))
3306 (sha256
3307 (base32
3308 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3309 (build-system python-build-system)
3310 (arguments
3311 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3312 (home-page "http://defunkt.io/pystache/")
3313 (synopsis "Python logic-less template engine")
3314 (description
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))))))
3319
3320 (define-public python2-pystache
3321 (package (inherit (package-with-python2
3322 (strip-python2-variant python-pystache)))
3323 (arguments
3324 `(#:python ,python-2
3325 #:phases
3326 (modify-phases %standard-phases
3327 (replace 'check
3328 (lambda _
3329 (invoke "python" "test_pystache.py"))))))))
3330
3331 (define-public python-joblib
3332 (package
3333 (name "python-joblib")
3334 (version "0.14.1")
3335 (source (origin
3336 (method url-fetch)
3337 (uri (pypi-uri "joblib" version))
3338 (sha256
3339 (base32
3340 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3341 (build-system python-build-system)
3342 (arguments
3343 `(#:phases
3344 (modify-phases %standard-phases
3345 (replace 'check
3346 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3347 (native-inputs
3348 `(("python-pytest" ,python-pytest)))
3349 (home-page "https://joblib.readthedocs.io/")
3350 (synopsis "Using Python functions as pipeline jobs")
3351 (description
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)))
3357
3358 (define-public python2-joblib
3359 (package-with-python2 python-joblib))
3360
3361 (define-public python-daemon
3362 (package
3363 (name "python-daemon")
3364 (version "2.2.3")
3365 (source
3366 (origin
3367 (method url-fetch)
3368 (uri (pypi-uri "python-daemon" version))
3369 (sha256
3370 (base32
3371 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3372 (build-system python-build-system)
3373 (arguments
3374 `(#:phases
3375 (modify-phases %standard-phases
3376 (add-before 'check 'disable-tests
3377 (lambda _
3378 ;; FIXME: Determine why test fails
3379 (substitute* "test/test_daemon.py"
3380 (("test_detaches_process_context")
3381 "skip_test_detaches_process_context"))
3382 #t)))))
3383 (propagated-inputs
3384 `(("python-lockfile" ,python-lockfile)))
3385 (native-inputs
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.
3395
3396 This library provides a @code{DaemonContext} class that manages the following
3397 important tasks for becoming a daemon process:
3398 @enumerate
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.
3408 @end enumerate")
3409 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3410 (license (list license:asl2.0 license:gpl3+))))
3411
3412 (define-public python-anytree
3413 (package
3414 (name "python-anytree")
3415 (version "2.8.0")
3416 (source (origin
3417 (method url-fetch)
3418 (uri (pypi-uri "anytree" version))
3419 (sha256
3420 (base32
3421 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3422 (build-system python-build-system)
3423 (propagated-inputs
3424 `(("python-six" ,python-six)))
3425 (native-inputs
3426 `(;; For tests.
3427 ("graphviz" ,graphviz) ;for 'dot'
3428 ("python-nose" ,python-nose)))
3429 (home-page "https://github.com/c0fec0de/anytree")
3430 (synopsis "Lightweight tree data library")
3431 (description
3432 "@code{anytree} is a simple, lightweight, and extensible tree data
3433 structure for Python.")
3434 (license license:asl2.0)))
3435
3436 (define-public python-docutils
3437 (package
3438 (name "python-docutils")
3439 (version "0.16")
3440 (source
3441 (origin
3442 (method url-fetch)
3443 (uri (pypi-uri "docutils" version))
3444 (sha256
3445 (base32
3446 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3447 (build-system python-build-system)
3448 (arguments
3449 '(#:phases (modify-phases %standard-phases
3450 (replace 'check
3451 (lambda* (#:key tests? #:allow-other-keys)
3452 (if tests?
3453 (invoke "python" "test/alltests.py")
3454 (format #t "test suite not run~%"))
3455 #t)))))
3456 (home-page "http://docutils.sourceforge.net/")
3457 (synopsis "Python Documentation Utilities")
3458 (description
3459 "Docutils is a modular system for processing documentation into useful
3460 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3461 reStructuredText.")
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+))))
3465
3466 (define-public python2-docutils
3467 (package-with-python2 python-docutils))
3468
3469 ;; python2-sphinx fails its test suite with newer versions.
3470 (define-public python2-docutils-0.14
3471 (package
3472 (inherit python2-docutils)
3473 (version "0.14")
3474 (source (origin
3475 (method url-fetch)
3476 (uri (pypi-uri "docutils" version))
3477 (sha256
3478 (base32
3479 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3480
3481 (define-public python-restructuredtext-lint
3482 (package
3483 (name "python-restructuredtext-lint")
3484 (version "1.3.0")
3485 (source
3486 (origin
3487 (method url-fetch)
3488 (uri (pypi-uri "restructuredtext-lint" version))
3489 (sha256
3490 (base32
3491 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3492 (build-system python-build-system)
3493 (arguments
3494 `(#:phases
3495 (modify-phases %standard-phases
3496 (delete 'check)
3497 (add-after 'install 'check
3498 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3499 (when tests?
3500 (add-installed-pythonpath inputs outputs)
3501 (invoke "nosetests" "-v"))
3502 #t)))))
3503 (propagated-inputs
3504 `(("python-docutils" ,python-docutils)))
3505 (native-inputs
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
3510 format.")
3511 (license license:unlicense)))
3512
3513 (define-public python-doc8
3514 (package
3515 (name "python-doc8")
3516 (version "0.8.0")
3517 (source
3518 (origin
3519 (method url-fetch)
3520 (uri (pypi-uri "doc8" version))
3521 (sha256
3522 (base32
3523 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3524 (build-system python-build-system)
3525 (arguments
3526 `(#:phases
3527 (modify-phases %standard-phases
3528 (delete 'check)
3529 (add-after 'install 'check
3530 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3531 (when tests?
3532 (add-installed-pythonpath inputs outputs)
3533 (invoke "pytest" "-v"))
3534 #t)))))
3535 (propagated-inputs
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)))
3541 (native-inputs
3542 `(("python-testtools" ,python-testtools)
3543 ("python-pytest" ,python-pytest)))
3544 (home-page "https://launchpad.net/doc8")
3545 (synopsis
3546 "Style checker for Sphinx (or other) RST documentation")
3547 (description
3548 "Doc8 is an opinionated style checker for reStructured Text and plain
3549 text styles of documentation.")
3550 (license license:asl2.0)))
3551
3552 (define-public python-pygments
3553 (package
3554 (name "python-pygments")
3555 (version "2.6.1")
3556 (source
3557 (origin
3558 (method url-fetch)
3559 (uri (pypi-uri "Pygments" version))
3560 (sha256
3561 (base32
3562 "0i4gnd4q0mgkq0dp5wymn7ca8zjd8fgp63139svs6jf2c6h48wv4"))))
3563 (build-system python-build-system)
3564 (arguments
3565 ;; FIXME: Tests require sphinx, which depends on this.
3566 '(#:tests? #f))
3567 (home-page "https://pygments.org/")
3568 (synopsis "Syntax highlighting")
3569 (description
3570 "Pygments is a syntax highlighting package written in Python.")
3571 (license license:bsd-2)
3572 (properties `((python2-variant . ,(delay python2-pygments))))))
3573
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))))
3577 (package
3578 (inherit base)
3579 (version "2.5.2")
3580 (source (origin
3581 (method url-fetch)
3582 (uri (pypi-uri "Pygments" version))
3583 (sha256
3584 (base32
3585 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3586
3587 (define-public python-bumpversion
3588 (package
3589 (name "python-bumpversion")
3590 (version "0.5.3")
3591 (source
3592 (origin
3593 (method url-fetch)
3594 (uri (pypi-uri "bumpversion" version))
3595 (sha256
3596 (base32
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)))
3604
3605 (define-public python-deprecated
3606 (package
3607 (name "python-deprecated")
3608 (version "1.2.5")
3609 (source
3610 (origin
3611 (method git-fetch)
3612 (uri (git-reference
3613 (url "https://github.com/tantale/deprecated")
3614 (commit (string-append "v" version))))
3615 (file-name (git-file-name name version))
3616 (sha256
3617 (base32
3618 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3619 (build-system python-build-system)
3620 (arguments
3621 `(#:phases (modify-phases %standard-phases
3622 (replace 'check
3623 (lambda _
3624 (invoke "pytest"))))))
3625 (propagated-inputs
3626 `(("python-wrapt" ,python-wrapt)))
3627 (native-inputs
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)))
3638
3639 (define-public python-pygithub
3640 (package
3641 (name "python-pygithub")
3642 (version "1.43.8")
3643 (source
3644 ;; We fetch from the Git repo because there are no tests in the PyPI
3645 ;; archive.
3646 (origin
3647 (method git-fetch)
3648 (uri (git-reference
3649 (url "https://github.com/PyGithub/PyGithub")
3650 (commit (string-append "v" version))))
3651 (file-name (git-file-name name version))
3652 (sha256
3653 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3654 (build-system python-build-system)
3655 (arguments
3656 `(#:phases (modify-phases %standard-phases
3657 ;; Some tests rely on the network.
3658 (add-after 'unpack 'disable-failing-tests
3659 (lambda _
3660 (substitute* "tests/Issue142.py"
3661 (("testDecodeJson") "disabled_testDecodeJson"))
3662 #t))
3663 (add-before 'check 'prepare-for-tests
3664 (lambda _
3665 (for-each (lambda (f)
3666 (chmod f #o666))
3667 (find-files "./tests"))
3668 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3669 (setenv "PYTHONPATH"
3670 (string-append "./tests:" (getenv "PYTHONPATH")))
3671 #t)))))
3672 (propagated-inputs
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+)))
3683
3684 (define-public python-rellu
3685 (package
3686 (name "python-rellu")
3687 (version "0.7")
3688 (source
3689 (origin
3690 (method url-fetch)
3691 (uri (pypi-uri "rellu" version))
3692 (sha256
3693 (base32
3694 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3695 (build-system python-build-system)
3696 (propagated-inputs
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)))
3706
3707 (define-public python-robotframework
3708 (package
3709 (name "python-robotframework")
3710 (version "3.2.2")
3711 ;; There are no tests in the PyPI archive.
3712 (source
3713 (origin
3714 (method git-fetch)
3715 (uri (git-reference
3716 (url "https://github.com/robotframework/robotframework")
3717 (commit (string-append "v" version))))
3718 (file-name (git-file-name name version))
3719 (sha256
3720 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3721 (patches (search-patches
3722 "python-robotframework-source-date-epoch.patch"))))
3723 (build-system python-build-system)
3724 (arguments
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")
3732 (mkdir-p doc)
3733 (copy-recursively "doc/libraries"
3734 (string-append doc "/libraries"))
3735 #t)))
3736 (replace 'check
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
3740 ;; with:
3741 ;;
3742 ;; OverflowError: mktime argument out of range
3743 (setenv "TZDIR"
3744 (string-append (assoc-ref inputs "tzdata")
3745 "/share/zoneinfo"))
3746 (setenv "TZ" "Europe/Paris")
3747
3748 (invoke "python" "utest/run.py"))))))
3749 (native-inputs
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)))
3761
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
3766 ;; Git repo.
3767 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3768 (revision "0"))
3769 (package
3770 (name "python-robotframework-lint")
3771 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3772 revision commit))
3773 (source
3774 (origin
3775 (method git-fetch)
3776 (uri (git-reference
3777 (url "https://github.com/boakley/robotframework-lint")
3778 (commit commit)))
3779 (file-name (git-file-name name version))
3780 (sha256
3781 (base32
3782 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3783 (build-system python-build-system)
3784 (arguments
3785 `(#:phases
3786 (modify-phases %standard-phases
3787 (replace 'check
3788 (lambda _
3789 (invoke "python" "-m" "robot" "-A"
3790 "tests/conf/default.args" "tests"))))))
3791 (propagated-inputs
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))))
3798
3799 (define-public python-robotframework-sshlibrary
3800 (package
3801 (name "python-robotframework-sshlibrary")
3802 (version "3.3.0")
3803 ;; There are no tests in the PyPI archive.
3804 (source
3805 (origin
3806 (method git-fetch)
3807 (uri (git-reference
3808 (url "https://github.com/robotframework/SSHLibrary")
3809 (commit (string-append "v" version))))
3810 (file-name (git-file-name name version))
3811 (sha256
3812 (base32
3813 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3814 (build-system python-build-system)
3815 (arguments
3816 `(#:phases
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")
3825 (mkdir-p doc)
3826 (for-each delete-file (find-files "docs" "\\.rst"))
3827 (copy-recursively "docs" doc)
3828 #t)))
3829 (replace 'check
3830 (lambda _
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"))))))
3835 (propagated-inputs
3836 `(("python-robotframework" ,python-robotframework)
3837 ("python-paramiko" ,python-paramiko)
3838 ("python-scp" ,python-scp)))
3839 (native-inputs
3840 `(("openssh" ,openssh)
3841 ("which" ,which)
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:
3852 @itemize @bullet
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.
3857 @end itemize")
3858 (license license:asl2.0)))
3859
3860 (define-public python-rstr
3861 (package
3862 (name "python-rstr")
3863 (version "2.2.6")
3864 (source
3865 (origin
3866 (method url-fetch)
3867 (uri (pypi-uri "rstr" version))
3868 (sha256
3869 (base32
3870 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3871 (build-system python-build-system)
3872 (home-page
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)))
3880
3881 (define-public python-scp
3882 (package
3883 (name "python-scp")
3884 (version "0.13.2")
3885 (source
3886 (origin
3887 (method url-fetch)
3888 (uri (pypi-uri "scp" version))
3889 (sha256
3890 (base32
3891 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3892 (build-system python-build-system)
3893 (arguments
3894 '(#:tests? #f)) ;tests require an SSH server
3895 (propagated-inputs
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+)))
3903
3904 (define-public python-rst.linker
3905 (package
3906 (name "python-rst.linker")
3907 (version "1.11")
3908 (source
3909 (origin
3910 (method url-fetch)
3911 (uri (pypi-uri "rst.linker" version))
3912 (sha256
3913 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3914 (build-system python-build-system)
3915 (propagated-inputs
3916 `(("python-dateutil" ,python-dateutil)
3917 ("python-six" ,python-six)))
3918 (native-inputs
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)))
3929
3930 (define-public python2-rst.linker
3931 (package-with-python2 python-rst.linker))
3932
3933 (define-public python-feedgenerator
3934 (package
3935 (name "python-feedgenerator")
3936 (version "1.9")
3937 (source
3938 (origin
3939 (method url-fetch)
3940 (uri (pypi-uri "feedgenerator" version))
3941 (sha256
3942 (base32
3943 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3944 (modules '((guix build utils)))
3945 (snippet
3946 '(begin
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$"))
3951 #t))))
3952 (build-system python-build-system)
3953 (propagated-inputs
3954 `(("python-pytz" ,python-pytz)
3955 ("python-six" ,python-six)))
3956 (home-page "https://github.com/getpelican/feedgenerator")
3957 (synopsis
3958 "Standalone version of Django's Atom/RSS feed generator")
3959 (description
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)))
3963
3964 (define-public python2-feedgenerator
3965 (package-with-python2 python-feedgenerator))
3966
3967 (define-public python-toml
3968 (package
3969 (name "python-toml")
3970 (version "0.10.1")
3971 (source
3972 (origin
3973 (method url-fetch)
3974 (uri (pypi-uri "toml" version))
3975 (sha256
3976 (base32
3977 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3978 (build-system python-build-system)
3979 (arguments
3980 `(#:tests? #f)) ;no tests suite in release
3981 (home-page "https://github.com/uiri/toml")
3982 (synopsis "Library for TOML")
3983 (description
3984 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3985 Language (TOML) configuration files.")
3986 (license license:expat)))
3987
3988 (define-public python-jsonrpc-server
3989 (package
3990 (name "python-jsonrpc-server")
3991 (version "0.3.4")
3992 (source
3993 (origin
3994 (method url-fetch)
3995 (uri (pypi-uri "python-jsonrpc-server" version))
3996 (sha256
3997 (base32
3998 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
3999 (build-system python-build-system)
4000 (propagated-inputs
4001 `(("python-mock" ,python-mock)
4002 ("python-pytest" ,python-pytest)
4003 ("python-ujson" ,python-ujson-1)))
4004 (home-page
4005 "https://github.com/palantir/python-jsonrpc-server")
4006 (synopsis "JSON RPC 2.0 server library")
4007 (description
4008 "This package provides a JSON RPC 2.0 server library for Python.")
4009 (license license:expat)))
4010
4011 (define-public python-pydantic
4012 (package
4013 (name "python-pydantic")
4014 (version "1.6.1")
4015 (source
4016 (origin
4017 (method git-fetch)
4018 (uri (git-reference
4019 (url "https://github.com/samuelcolvin/pydantic")
4020 (commit (string-append "v" version))))
4021 (file-name (git-file-name name version))
4022 (sha256
4023 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4024 (build-system python-build-system)
4025 (arguments
4026 '(#:phases
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
4032 (lambda _
4033 (substitute* "tests/test_validators.py"
4034 (("test_assert_raises_validation_error")
4035 "_test_assert_raises_validation_error"))
4036 #t))
4037 (replace 'check
4038 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4039 (native-inputs
4040 `(("python-pytest" ,python-pytest)))
4041 (home-page "https://github.com/samuelcolvin/pydantic")
4042 (synopsis "Python data validation and settings management")
4043 (description
4044 "Pydantic enforces type hints at runtime, and provides user friendly
4045 errors when data is invalid.")
4046 (license license:expat)))
4047
4048 (define-public python-pydocstyle
4049 (package
4050 (name "python-pydocstyle")
4051 (version "3.0.0")
4052 (source
4053 (origin
4054 (method url-fetch)
4055 (uri (pypi-uri "pydocstyle" version))
4056 (sha256
4057 (base32
4058 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4059 (build-system python-build-system)
4060 (propagated-inputs
4061 `(("python-six" ,python-six)
4062 ("python-snowballstemmer" ,python-snowballstemmer)))
4063 (home-page
4064 "https://github.com/PyCQA/pydocstyle/")
4065 (synopsis "Python docstring style checker")
4066 (description
4067 "This package provides a style checker for the Python Language
4068 Server (PLS).")
4069 (license license:expat)))
4070
4071 (define-public python-language-server
4072 (package
4073 (name "python-language-server")
4074 (version "0.34.1")
4075 (source
4076 (origin
4077 (method url-fetch)
4078 (uri (pypi-uri "python-language-server" version))
4079 (sha256
4080 (base32
4081 "0gfjjlj7yg2nf8wkbrshwaljkwlqja4n7s1x949f495anmkg8vxr"))))
4082 (build-system python-build-system)
4083 (propagated-inputs
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")
4098 (description
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)))
4104
4105 (define-public python-pathspec
4106 (package
4107 (name "python-pathspec")
4108 (version "0.7.0")
4109 (source
4110 (origin
4111 (method url-fetch)
4112 (uri (pypi-uri "pathspec" version))
4113 (sha256
4114 (base32
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")
4119 (description
4120 "This package provides a utility library for gitignore style pattern
4121 matching of file paths.")
4122 (license license:mpl2.0)))
4123
4124 (define-public python-black
4125 (package
4126 (name "python-black")
4127 (version "20.8b1")
4128 (source
4129 (origin
4130 (method url-fetch)
4131 (uri (pypi-uri "black" version))
4132 (sha256
4133 (base32
4134 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4135 (build-system python-build-system)
4136 (arguments
4137 `(#:phases
4138 (modify-phases %standard-phases
4139 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4140 (lambda _
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)
4148 minor-version
4149 "")))))
4150 #t))
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")))
4156
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") ""))
4165
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)))
4170
4171 (substitute* "tests/test_black.py"
4172 (("( *)def test_python38" match indent)
4173 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4174 #t)))))
4175 (propagated-inputs
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)))
4185 (native-inputs
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)))
4191
4192 (define-public python-black-macchiato
4193 (package
4194 (name "python-black-macchiato")
4195 (version "1.3.0")
4196 (source
4197 (origin
4198 (method url-fetch)
4199 (uri (pypi-uri "black-macchiato" version))
4200 (sha256
4201 (base32
4202 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4203 (build-system python-build-system)
4204 (propagated-inputs
4205 `(("python-black" ,python-black)))
4206 (home-page "https://github.com/wbolster/black-macchiato")
4207 (synopsis "Partial @code{python-black} formatting")
4208 (description
4209 "This package is built on top the @{python-black} code formatter to
4210 enable formatting of partial files.")
4211 (license license:bsd-3)))
4212
4213 (define-public python-blinker
4214 (package
4215 (name "python-blinker")
4216 (version "1.4")
4217 (source
4218 (origin
4219 (method url-fetch)
4220 (uri (pypi-uri "blinker" version))
4221 (sha256
4222 (base32
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")
4227 (description
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)))
4231
4232 (define-public python2-blinker
4233 (package-with-python2 python-blinker))
4234
4235 (define-public pelican
4236 (package
4237 (name "pelican")
4238 (version "4.2.0")
4239 (source
4240 (origin
4241 (method url-fetch)
4242 (uri (pypi-uri "pelican" version))
4243 (sha256
4244 (base32
4245 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4246 (build-system python-build-system)
4247 (propagated-inputs
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/")
4259 (arguments
4260 `(;; XXX Requires a lot more packages to do unit tests :P
4261 #:tests? #f))
4262 (synopsis "Python-based static site publishing system")
4263 (description
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+)))
4268
4269 (define-public mallard-ducktype
4270 (package
4271 (name "mallard-ducktype")
4272 (version "1.0.2")
4273 (source
4274 (origin
4275 (method git-fetch)
4276 ;; git-reference because tests are not included in pypi source tarball
4277 ;; https://issues.guix.gnu.org/issue/36755#2
4278 (uri (git-reference
4279 (url "https://github.com/projectmallard/mallard-ducktype")
4280 (commit version)))
4281 (file-name (git-file-name name version))
4282 (sha256
4283 (base32
4284 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4285 (build-system python-build-system)
4286 (arguments
4287 '(#:phases
4288 (modify-phases %standard-phases
4289 (replace 'check
4290 (lambda _
4291 (with-directory-excursion "tests"
4292 (invoke "sh" "runtests")))))))
4293 (home-page "http://projectmallard.org")
4294 (synopsis "Convert Ducktype to Mallard documentation markup")
4295 (description
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)))
4301
4302 (define-public python-cython
4303 (package
4304 (name "python-cython")
4305 (version "0.29.21")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 (uri (pypi-uri "Cython" version))
4310 (sha256
4311 (base32
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
4316 (inputs
4317 `(("python" ,python)))
4318 (arguments
4319 `(#:phases
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))
4324 (replace 'check
4325 (lambda _
4326 ;; Disable compiler optimizations to greatly reduce the running
4327 ;; time of the test suite.
4328 (setenv "CFLAGS" "-O0")
4329
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")
4337 '())))))))
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))))))
4345
4346 (define-public python2-cython
4347 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4348 (package
4349 (inherit base)
4350 (name "python2-cython")
4351 (inputs
4352 `(("python-2" ,python-2))) ;this is not automatically changed
4353 (arguments
4354 (substitute-keyword-arguments (package-arguments base)
4355 ((#:phases phases)
4356 `(modify-phases ,phases
4357 (add-before 'check 'adjust-test_embed
4358 (lambda _
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.
4366 ;;
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).
4370 ;;
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\\)")
4378 ""))
4379 #t)))))))))
4380
4381 ;; The RPython toolchain currently does not support Python 3.
4382 (define-public python2-rpython
4383 (package
4384 (name "python2-rpython")
4385 (version "0.2.1")
4386 (source
4387 (origin
4388 (method url-fetch)
4389 (uri (pypi-uri "rpython" version))
4390 (sha256
4391 (base32
4392 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4393 (build-system python-build-system)
4394 (arguments `(#:python ,python-2))
4395 (native-inputs
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)))
4403
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
4407 (package
4408 (name "python-numpy")
4409 (version "1.17.3")
4410 (source
4411 (origin
4412 (method url-fetch)
4413 (uri (string-append
4414 "https://github.com/numpy/numpy/releases/download/v"
4415 version "/numpy-" version ".tar.gz"))
4416 (sha256
4417 (base32
4418 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4419 (build-system python-build-system)
4420 (inputs
4421 `(("openblas" ,openblas)
4422 ("lapack" ,lapack)))
4423 (native-inputs
4424 `(("python-cython" ,python-cython)
4425 ("python-pytest" ,python-pytest)
4426 ("gfortran" ,gfortran)))
4427 (arguments
4428 `(#:phases
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"
4433 (lambda (port)
4434 (format port
4435 "[openblas]
4436 libraries = openblas
4437 library_dirs = ~a/lib
4438 include_dirs = ~a/include
4439
4440 # backslash-n to make emacs happy
4441 \n[lapack]
4442 lapack_libs = lapack
4443 library_dirs = ~a/lib
4444 include_dirs = ~a/include
4445 "
4446 (assoc-ref inputs "openblas")
4447 (assoc-ref inputs "openblas")
4448 (assoc-ref inputs "lapack")
4449 (assoc-ref inputs "lapack"))))
4450 #t))
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')"))
4462 #t))
4463 ;; Tests can only be run after the library has been installed and not
4464 ;; within the source directory.
4465 (delete 'check)
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
4482 capabilities.")
4483 (properties `((python2-variant . ,(delay python2-numpy))))
4484 (license license:bsd-3)))
4485
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))))
4490 (package/inherit
4491 numpy
4492 (version "1.16.5")
4493 (source (origin
4494 (method url-fetch)
4495 (uri (string-append
4496 "https://github.com/numpy/numpy/releases/download/v"
4497 version "/numpy-" version ".tar.gz"))
4498 (sha256
4499 (base32
4500 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4501
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
4504 ;; Numeric.
4505 (define-public python2-numpy-1.8
4506 (package (inherit python2-numpy)
4507 (version "1.8.2")
4508 (source
4509 (origin
4510 (method git-fetch)
4511 (uri (git-reference
4512 (url "https://github.com/numpy/numpy")
4513 (commit (string-append "v" version))))
4514 (file-name (git-file-name "numpy" version))
4515 (sha256
4516 (base32
4517 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4518 (arguments
4519 (substitute-keyword-arguments (package-arguments python2-numpy)
4520 ((#:phases phases)
4521 `(modify-phases ,phases
4522 (replace 'configure-blas-lapack
4523 (lambda* (#:key inputs #:allow-other-keys)
4524 (call-with-output-file "site.cfg"
4525 (lambda (port)
4526 (format port
4527 "[openblas]
4528 libraries = openblas,lapack
4529 library_dirs = ~a/lib:~a/lib
4530 include_dirs = ~a/include:~a/include
4531 "
4532 (assoc-ref inputs "openblas")
4533 (assoc-ref inputs "lapack")
4534 (assoc-ref inputs "openblas")
4535 (assoc-ref inputs "lapack"))))
4536 #t))))))
4537 (native-inputs
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
4545 Numeric.")
4546 (license license:bsd-3)))
4547
4548 (define-public python-munch
4549 (package
4550 (name "python-munch")
4551 (version "2.0.4")
4552 (source
4553 (origin
4554 (method url-fetch)
4555 (uri (pypi-uri "munch" version))
4556 (sha256
4557 (base32
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
4563 objects.")
4564 (license license:expat)))
4565
4566 (define-public python2-munch
4567 (package-with-python2 python-munch))
4568
4569 (define-public python-colormath
4570 (package
4571 (name "python-colormath")
4572 (version "3.0.0")
4573 (source
4574 (origin
4575 (method url-fetch)
4576 (uri (pypi-uri "colormath" version))
4577 (sha256
4578 (base32
4579 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4580 (build-system python-build-system)
4581 (propagated-inputs
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")
4586 (description
4587 "This is a Python library for color math and conversions.")
4588 (license license:bsd-3)))
4589
4590 (define-public python2-colormath
4591 (package-with-python2 python-colormath))
4592
4593 (define-public python-spectra
4594 (package
4595 (name "python-spectra")
4596 (version "0.0.11")
4597 (source
4598 (origin
4599 (method url-fetch)
4600 (uri (pypi-uri "spectra" version))
4601 (sha256
4602 (base32
4603 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4604 (build-system python-build-system)
4605 (arguments
4606 `(#:phases
4607 (modify-phases %standard-phases
4608 (replace 'check
4609 (lambda _ (invoke "nosetests" "-v"))))))
4610 (propagated-inputs
4611 `(("python-colormath" ,python-colormath)))
4612 (native-inputs
4613 `(("python-nose" ,python-nose)))
4614 (home-page "https://github.com/jsvine/spectra")
4615 (synopsis "Color scales and color conversion")
4616 (description
4617 "This package provides a Python library intended to make color math,
4618 color scales, and color space conversion easy. It has support for:
4619
4620 @enumerate
4621 @item Color scales
4622 @item Color ranges
4623 @item Color blending
4624 @item Brightening/darkening colors
4625 @item Saturating/desaturating colors
4626 @item Conversion to/from multiple color spaces.
4627 @end enumerate\n")
4628 (license license:expat)))
4629
4630 (define-public python2-spectra
4631 (package-with-python2 python-spectra))
4632
4633 (define-public python-numpy-documentation
4634 (package
4635 (name "python-numpy-documentation")
4636 (version (package-version python-numpy))
4637 (source (package-source python-numpy))
4638 (build-system python-build-system)
4639 (native-inputs
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
4646 texlive-fonts-ec
4647 texlive-generic-ifxetex
4648 texlive-generic-pdftex
4649 texlive-amsfonts
4650 texlive-latex-capt-of
4651 texlive-latex-cmap
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
4659 texlive-latex-float
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
4674 texlive-latex-ucs
4675 texlive-latex-upquote
4676 texlive-latex-url
4677 texlive-latex-varwidth
4678 texlive-latex-wrapfig)))
4679 ("texinfo" ,texinfo)
4680 ("perl" ,perl)
4681 ("scipy-sphinx-theme"
4682 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4683 (method git-fetch)
4684 (uri (git-reference
4685 (url "https://github.com/scipy/scipy-sphinx-theme")
4686 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4687 (sha256
4688 (base32
4689 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4690 ,@(package-native-inputs python-numpy)))
4691 (arguments
4692 `(#:tests? #f ; we're only generating the documentation
4693 #:phases
4694 (modify-phases %standard-phases
4695 (delete 'build)
4696 (replace 'install
4697 (lambda* (#:key inputs outputs #:allow-other-keys)
4698 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4699 (doc (string-append
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=")))
4707
4708 ;; FIXME: this is needed to for texlive-union to generate
4709 ;; fonts, which are not found.
4710 (setenv "HOME" "/tmp")
4711
4712 (with-directory-excursion "doc"
4713 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4714 (mkdir-p html)
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)
4721 ;; (mkdir-p info)
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)
4733 (mkdir-p tgt-dir))
4734 (install-file file html)))
4735 (find-files "." ".*")))))
4736 #t)))))
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))))
4741
4742 (define-public python2-numpy-documentation
4743 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4744 (package
4745 (inherit numpy-documentation)
4746 (native-inputs `(("python2-functools32" ,python2-functools32)
4747 ,@(package-native-inputs numpy-documentation))))))
4748
4749 (define-public python-pygit2
4750 (package
4751 (name "python-pygit2")
4752 (version "1.1.0")
4753 (source
4754 (origin
4755 (method url-fetch)
4756 (uri (pypi-uri "pygit2" version))
4757 (sha256
4758 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4759 (build-system python-build-system)
4760 (arguments
4761 '(#:tests? #f)) ; tests don't run correctly in our environment
4762 (propagated-inputs
4763 `(("python-cached-property" ,python-cached-property)
4764 ("python-cffi" ,python-cffi)
4765 ("libgit2" ,libgit2)))
4766 (native-inputs
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)))
4774
4775 (define-public python-patiencediff
4776 (package
4777 (name "python-patiencediff")
4778 (version "0.2.0")
4779 (source
4780 (origin
4781 (method url-fetch)
4782 (uri (pypi-uri "patiencediff" version))
4783 (sha256
4784 (base32
4785 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4786 (build-system python-build-system)
4787 (home-page "https://www.breezy-vcs.org/")
4788 (synopsis "Python implementation of the patiencediff algorithm")
4789 (description
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)))
4794
4795 (define-public python-pyparsing
4796 (package
4797 (name "python-pyparsing")
4798 (version "2.4.6")
4799 (source
4800 (origin
4801 (method url-fetch)
4802 (uri (pypi-uri "pyparsing" version))
4803 (sha256
4804 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4805 (build-system python-build-system)
4806 (outputs '("out" "doc"))
4807 (arguments
4808 `(#:tests? #f ; no test target
4809 #:phases
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")))
4817 (mkdir-p html-doc)
4818 (mkdir-p examples)
4819 (for-each
4820 (lambda (dir tgt)
4821 (map (lambda (file)
4822 (install-file file tgt))
4823 (find-files dir ".*")))
4824 (list "docs" "htmldoc" "examples")
4825 (list doc html-doc examples))
4826 #t))))))
4827 (home-page "https://github.com/pyparsing/pyparsing")
4828 (synopsis "Python parsing class library")
4829 (description
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)))
4835
4836 (define-public python2-pyparsing
4837 (package-with-python2 python-pyparsing))
4838
4839 (define-public python-pyparsing-2.4.7
4840 (package
4841 (inherit python-pyparsing)
4842 (version "2.4.7")
4843 (source
4844 (origin
4845 (method url-fetch)
4846 (uri (pypi-uri "pyparsing" version))
4847 (sha256
4848 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4849
4850 (define-public python-numpydoc
4851 (package
4852 (name "python-numpydoc")
4853 (version "0.8.0")
4854 (source
4855 (origin
4856 (method url-fetch)
4857 (uri (pypi-uri "numpydoc" version))
4858 (sha256
4859 (base32
4860 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4861 (build-system python-build-system)
4862 (propagated-inputs
4863 `(("python-sphinx" ,python-sphinx)))
4864 (native-inputs
4865 `(("python-nose" ,python-nose)))
4866 (home-page "https://pypi.org/project/numpydoc/")
4867 (synopsis
4868 "Numpy's Sphinx extensions")
4869 (description
4870 "Sphinx extension to support docstrings in Numpy format.")
4871 (license license:bsd-2)))
4872
4873 (define-public python2-numpydoc
4874 (package-with-python2 python-numpydoc))
4875
4876 (define-public python-numexpr
4877 (package
4878 (name "python-numexpr")
4879 (version "2.6.5")
4880 (source
4881 (origin
4882 (method url-fetch)
4883 (uri (pypi-uri "numexpr" version))
4884 (sha256
4885 (base32
4886 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4887 (build-system python-build-system)
4888 (arguments `(#:tests? #f)) ; no tests included
4889 (propagated-inputs
4890 `(("python-numpy" ,python-numpy)))
4891 (home-page "https://github.com/pydata/numexpr")
4892 (synopsis "Fast numerical expression evaluator for NumPy")
4893 (description
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)))
4901
4902 (define-public python2-numexpr
4903 (package-with-python2 python-numexpr))
4904
4905 (define-public python-cycler
4906 (package
4907 (name "python-cycler")
4908 (version "0.10.0")
4909 (source (origin
4910 (method url-fetch)
4911 (uri (pypi-uri "cycler" version))
4912 (sha256
4913 (base32
4914 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4915 (build-system python-build-system)
4916 (arguments
4917 ;; XXX: The current version requires 'coveralls' which we don't have.
4918 ;; Enable this for the next release which uses 'python-pytest'.
4919 '(#:tests? #f))
4920 (propagated-inputs
4921 `(("python-six" ,python-six)))
4922 (home-page "http://matplotlib.org/cycler/")
4923 (synopsis "Composable keyword argument iterator")
4924 (description
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)))
4931
4932 (define-public python2-cycler
4933 (package-with-python2 python-cycler))
4934
4935 (define-public python-colorspacious
4936 (package
4937 (name "python-colorspacious")
4938 (version "1.1.2")
4939 (source
4940 (origin
4941 (method git-fetch)
4942 (uri (git-reference
4943 (url "https://github.com/njsmith/colorspacious")
4944 (commit (string-append "v" version))))
4945 (file-name (git-file-name name version))
4946 (sha256
4947 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4948 (build-system python-build-system)
4949 (propagated-inputs
4950 `(("python-numpy" ,python-numpy)))
4951 (native-inputs
4952 `(("python-nose" ,python-nose)))
4953 (arguments
4954 `(#:phases
4955 (modify-phases %standard-phases
4956 (replace 'check
4957 (lambda _
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)))
4964
4965 (define-public python2-colorspacious
4966 (package-with-python2 python-colorspacious))
4967
4968 (define-public python-matplotlib
4969 (package
4970 (name "python-matplotlib")
4971 (version "3.1.2")
4972 (source
4973 (origin
4974 (method url-fetch)
4975 (uri (pypi-uri "matplotlib" version))
4976 (sha256
4977 (base32
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)))
4998 (inputs
4999 `(("libpng" ,libpng)
5000 ("imagemagick" ,imagemagick)
5001 ("freetype" ,freetype)
5002 ("cairo" ,cairo)
5003 ("glib" ,glib)
5004 ;; FIXME: Add backends when available.
5005 ;("python-wxpython" ,python-wxpython)
5006 ("tcl" ,tcl)
5007 ("tk" ,tk)))
5008 (native-inputs
5009 `(("pkg-config" ,pkg-config)
5010 ("python-pytest" ,python-pytest)
5011 ("python-mock" ,python-mock)
5012 ("unzip" ,unzip)
5013 ("jquery-ui"
5014 ,(origin
5015 (method url-fetch)
5016 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5017 (sha256
5018 (base32
5019 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5020 (arguments
5021 `(#:phases
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
5027 (lambda _
5028 (substitute* (append (find-files "lib/matplotlib/tests/"
5029 "test_.*\\.py$")
5030 (find-files "lib/mpl_toolkits/tests"
5031 "test_.*\\.py$"))
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"
5037 match)))
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"))
5053 #t))
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/")))
5058 (mkdir-p dir)
5059 (invoke "unzip"
5060 (assoc-ref inputs "jquery-ui")
5061 "-d" dir))
5062 #t))
5063 (replace 'check
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'
5072 ;; has not effect.
5073 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5074 (setenv "HOME" (getcwd))
5075 (call-with-output-file "setup.cfg"
5076 (lambda (port)
5077 (format port "[directories]~%
5078 basedirlist = ~a,~a~%
5079 [packages]~%
5080 tests = True~%"
5081 (assoc-ref inputs "tcl")
5082 (assoc-ref inputs "tk")))))
5083 #t)))))
5084 (home-page "https://matplotlib.org/")
5085 (synopsis "2D plotting library for Python")
5086 (description
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
5091 toolkits.")
5092 (license license:psfl)
5093 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5094
5095 (define-public python2-matplotlib
5096 (let ((matplotlib (package-with-python2
5097 (strip-python2-variant python-matplotlib))))
5098 (package (inherit matplotlib)
5099 (version "2.2.4")
5100 (source
5101 (origin
5102 (method url-fetch)
5103 (uri (pypi-uri "matplotlib" version))
5104 (sha256
5105 (base32
5106 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5107 (arguments
5108 (substitute-keyword-arguments (package-arguments matplotlib)
5109 ((#:phases phases)
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/")))
5116 (mkdir-p dir)
5117 (invoke "unzip"
5118 (assoc-ref inputs "jquery-ui")
5119 "-d" dir))
5120 #t))
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.
5125 (propagated-inputs
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")))))))
5135
5136 (define-public python-matplotlib-documentation
5137 (package
5138 (name "python-matplotlib-documentation")
5139 (version (package-version python-matplotlib))
5140 (source (package-source python-matplotlib))
5141 (build-system python-build-system)
5142 (native-inputs
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
5160 texlive-latex-ucs
5161
5162 texlive-generic-pdftex
5163
5164 texlive-fonts-ec
5165 texlive-fonts-adobe-times
5166 texlive-fonts-txfonts)))
5167 ("texinfo" ,texinfo)
5168 ,@(package-native-inputs python-matplotlib)))
5169 (arguments
5170 `(#:tests? #f ; we're only generating documentation
5171 #:phases
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.
5175 (delete 'check)
5176 (replace 'build
5177 (lambda _
5178 (chdir "doc")
5179 (setenv "PYTHONPATH"
5180 (string-append (getenv "PYTHONPATH")
5181 ":" (getcwd) "/../examples/units"))
5182 (substitute* "conf.py"
5183 ;; Don't use git.
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"))
5193 (invoke "make"
5194 "SPHINXBUILD=sphinx-build"
5195 "SPHINXOPTS=" ; don't abort on warnings
5196 "html" "texinfo")))
5197 (replace 'install
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")))
5203 (mkdir-p html)
5204 (mkdir-p info)
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))
5217 #t)))))
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))))
5222
5223 (define-public python2-matplotlib-documentation
5224 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5225 (package
5226 (inherit parent)
5227 (native-inputs
5228 (alist-delete "python-sphinx-copybutton"
5229 (package-native-inputs parent))))))
5230
5231 (define-public python-matplotlib-venn
5232 (package
5233 (name "python-matplotlib-venn")
5234 (version "0.11.5")
5235 (source
5236 (origin
5237 (method url-fetch)
5238 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5239 (sha256
5240 (base32
5241 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5242 (build-system python-build-system)
5243 (arguments '(#:tests? #f)) ; tests are not included
5244 (propagated-inputs
5245 `(("python-matplotlib" ,python-matplotlib)
5246 ("python-numpy" ,python-numpy)
5247 ("python-scipy" ,python-scipy)))
5248 (native-inputs
5249 `(("unzip" ,unzip)))
5250 (home-page "https://github.com/konstantint/matplotlib-venn")
5251 (synopsis "Plot area-proportional Venn diagrams")
5252 (description
5253 "This package provides tools for plotting area-proportional two- and
5254 three-way Venn diagrams in @code{matplotlib}.")
5255 (license license:expat)))
5256
5257 (define-public python-pysnptools
5258 (package
5259 (name "python-pysnptools")
5260 (version "0.4.11")
5261 (source
5262 (origin
5263 (method url-fetch)
5264 (uri (pypi-uri "pysnptools" version))
5265 (sha256
5266 (base32
5267 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5268 (build-system python-build-system)
5269 (arguments
5270 `(#:tests? #f ; no test data are included
5271 #:phases
5272 (modify-phases %standard-phases
5273 (replace 'check
5274 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5275 (if tests?
5276 (begin
5277 (add-installed-pythonpath inputs outputs)
5278 (invoke "python3" "pysnptools/test.py"))
5279 #t))))))
5280 (propagated-inputs
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)))
5287 (native-inputs
5288 `(("python-cython" ,python-cython)))
5289 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5290 (synopsis "Library for reading and manipulating genetic data")
5291 (description
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)))
5297
5298 (define-public python2-pysnptools
5299 (package-with-python2 python-pysnptools))
5300
5301 (define-public python-wurlitzer
5302 (package
5303 (name "python-wurlitzer")
5304 (version "2.0.1")
5305 (source
5306 (origin
5307 (method url-fetch)
5308 (uri (pypi-uri "wurlitzer" version))
5309 (sha256
5310 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5311 (build-system python-build-system)
5312 (arguments
5313 '(#:phases
5314 (modify-phases %standard-phases
5315 (replace 'check
5316 (lambda _
5317 (invoke "pytest" "-vv" "test.py"))))))
5318 (native-inputs
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")
5323 (description
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
5326 process.")
5327 (license license:expat)))
5328
5329 (define-public python-socksipy-branch
5330 (package
5331 (name "python-socksipy-branch")
5332 (version "1.01")
5333 (source
5334 (origin
5335 (method url-fetch)
5336 (uri (pypi-uri "SocksiPy-branch" version))
5337 (sha256
5338 (base32
5339 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5340 (build-system python-build-system)
5341 (arguments
5342 `(#:tests? #f)) ; There are no tests
5343 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5344 (synopsis "Python SOCKS module")
5345 (description
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)))
5353
5354 (define-public python2-socksipy-branch
5355 (package-with-python2 python-socksipy-branch))
5356
5357 (define-public python-socksipychain
5358 (package
5359 (name "python-socksipychain")
5360 (version "2.1.2")
5361 (source
5362 (origin
5363 (method git-fetch)
5364 (uri (git-reference
5365 (url "https://github.com/pagekite/PySocksipyChain")
5366 (commit (string-append "v" version))))
5367 (file-name (git-file-name name version))
5368 (sha256
5369 (base32
5370 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5371 (build-system python-build-system)
5372 (arguments
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")
5376 (description
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)))
5382
5383 (define-public python-pycodestyle
5384 (package
5385 (name "python-pycodestyle")
5386 (version "2.6.0")
5387 (source
5388 (origin
5389 (method url-fetch)
5390 (uri (pypi-uri "pycodestyle" version))
5391 (sha256
5392 (base32
5393 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5394 (build-system python-build-system)
5395 (arguments
5396 `(#:phases
5397 (modify-phases %standard-phases
5398 (replace 'check
5399 (lambda _
5400 (invoke "pytest" "-vv"))))))
5401 (native-inputs
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)))
5409
5410 (define-public python2-pycodestyle
5411 (package-with-python2 python-pycodestyle))
5412
5413 (define-public python-multidict
5414 (package
5415 (name "python-multidict")
5416 (version "4.7.5")
5417 (source
5418 (origin
5419 (method url-fetch)
5420 (uri (pypi-uri "multidict" version))
5421 (sha256
5422 (base32
5423 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5424 (build-system python-build-system)
5425 (arguments
5426 '(#:modules ((ice-9 ftw)
5427 (srfi srfi-1)
5428 (srfi srfi-26)
5429 (guix build utils)
5430 (guix build python-build-system))
5431 #:phases (modify-phases %standard-phases
5432 (replace 'check
5433 (lambda* (#:key tests? #:allow-other-keys)
5434 (if tests?
5435 (begin
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~%"))
5443 #t)))))
5444 (native-inputs
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)))
5452
5453 (define-public python-orderedmultidict
5454 (package
5455 (name "python-orderedmultidict")
5456 (version "1.0")
5457 (source
5458 (origin
5459 (method url-fetch)
5460 (uri (pypi-uri "orderedmultidict" version))
5461 (sha256
5462 (base32
5463 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5464 (build-system python-build-system)
5465 (arguments
5466 `(#:phases
5467 (modify-phases %standard-phases
5468 (add-after 'unpack 'fix-tests
5469 (lambda _
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)
5474 #t)))))
5475 (propagated-inputs
5476 `(("python-six" ,python-six)))
5477 (native-inputs
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)))
5486
5487 (define-public python2-orderedmultidict
5488 (package-with-python2 python-orderedmultidict))
5489
5490 (define-public python-autopep8
5491 (package
5492 (name "python-autopep8")
5493 (version "1.5.3")
5494 (source
5495 (origin
5496 (method url-fetch)
5497 (uri (pypi-uri "autopep8" version))
5498 (sha256
5499 (base32
5500 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5501 (build-system python-build-system)
5502 (propagated-inputs
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")
5507 (description
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
5512 by pycodestyle.")
5513 (license (license:non-copyleft
5514 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5515
5516 (define-public python2-autopep8
5517 (package-with-python2 python-autopep8))
5518
5519 (define-public python-distlib
5520 (package
5521 (name "python-distlib")
5522 (version "0.3.0")
5523 (source
5524 (origin
5525 (method url-fetch)
5526 (uri (pypi-uri "distlib" version ".zip"))
5527 (sha256
5528 (base32
5529 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5530 (build-system python-build-system)
5531 (arguments
5532 `(#:phases
5533 (modify-phases %standard-phases
5534 (add-before 'build 'no-/bin/sh
5535 (lambda _
5536 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5537 (("/bin/sh") (which "sh")))
5538 #t))
5539 (add-before 'check 'prepare-test-env
5540 (lambda _
5541 (setenv "HOME" "/tmp")
5542 ;; NOTE: Any value works, the variable just has to be present.
5543 (setenv "SKIP_ONLINE" "1")
5544 #t)))))
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)))
5552
5553 (define-public python-distutils-extra
5554 (package
5555 (name "python-distutils-extra")
5556 (version "2.38")
5557 (source
5558 (origin
5559 (method url-fetch)
5560 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5561 version "/+download/python-distutils-extra-"
5562 version ".tar.gz"))
5563 (sha256
5564 (base32
5565 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5566 (build-system python-build-system)
5567 (home-page "https://launchpad.net/python-distutils-extra/")
5568 (synopsis "Enhancements to Python's distutils")
5569 (description
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)))
5574
5575 (define-public python2-distutils-extra
5576 (package-with-python2 python-distutils-extra))
5577
5578 (define-public python2-elib.intl
5579 (package
5580 (name "python2-elib.intl")
5581 (version "0.0.3")
5582 (source
5583 (origin
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.
5586 (method git-fetch)
5587 (uri (git-reference
5588 (url "https://github.com/dieterv/elib.intl")
5589 (commit "d09997cfef")))
5590 (file-name (string-append name "-" version "-checkout"))
5591 (sha256
5592 (base32
5593 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5594 (build-system python-build-system)
5595 (arguments
5596 ;; incompatible with Python 3 (exception syntax)
5597 `(#:python ,python-2
5598 #:tests? #f))
5599 (home-page "https://github.com/dieterv/elib.intl")
5600 (synopsis "Enhanced internationalization for Python")
5601 (description
5602 "The elib.intl module provides enhanced internationalization (I18N)
5603 services for your Python modules and applications.")
5604 (license license:lgpl3+)))
5605
5606 (define-public python-olefile
5607 (package
5608 (name "python-olefile")
5609 (version "0.46")
5610 (source
5611 (origin
5612 (method url-fetch)
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"))
5616 (sha256
5617 (base32
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.")
5622 (description
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)))
5627
5628 (define-public python2-olefile
5629 (package-with-python2 python-olefile))
5630
5631 (define-public python-pillow
5632 (package
5633 (name "python-pillow")
5634 (version "6.2.1")
5635 (source
5636 (origin
5637 (method url-fetch)
5638 (uri (pypi-uri "Pillow" version))
5639 (sha256
5640 (base32
5641 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5642 (build-system python-build-system)
5643 (native-inputs
5644 `(("python-pytest" ,python-pytest)))
5645 (inputs
5646 `(("freetype" ,freetype)
5647 ("lcms" ,lcms)
5648 ("libjpeg" ,libjpeg-turbo)
5649 ("libtiff" ,libtiff)
5650 ("libwebp" ,libwebp)
5651 ("openjpeg" ,openjpeg)
5652 ("zlib" ,zlib)))
5653 (propagated-inputs
5654 `(("python-olefile" ,python-olefile)))
5655 (arguments
5656 `(#:phases
5657 (modify-phases %standard-phases
5658 (add-after 'unpack 'patch-ldconfig
5659 (lambda _
5660 (substitute* "setup.py"
5661 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5662 (replace 'check
5663 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5664 (if tests?
5665 (begin
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"))
5671 #t))))))
5672 (home-page "https://python-pillow.org")
5673 (synopsis "Fork of the Python Imaging Library")
5674 (description
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"))))
5684
5685 (define-public python2-pillow
5686 (package-with-python2 python-pillow))
5687
5688 (define-public python-pillow-2.9
5689 (package
5690 (inherit python-pillow)
5691 (version "2.9.0")
5692 (source
5693 (origin
5694 (method url-fetch)
5695 (uri (pypi-uri "Pillow" version))
5696 (sha256
5697 (base32
5698 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5699 (arguments
5700 (substitute-keyword-arguments (package-arguments python-pillow)
5701 ((#:tests? _ #f) #f)))
5702 (properties '((hidden? #t)))))
5703
5704 (define-public python-roifile
5705 (package
5706 (name "python-roifile")
5707 (version "2020.5.28")
5708 (source
5709 (origin
5710 (method url-fetch)
5711 (uri (pypi-uri "roifile" version))
5712 (sha256
5713 (base32
5714 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5715 (build-system python-build-system)
5716 (arguments `(#:tests? #f)) ; there are none
5717 (propagated-inputs
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)))
5725
5726 (define-public python-tifffile
5727 (package
5728 (name "python-tifffile")
5729 (version "2020.6.3")
5730 (source
5731 (origin
5732 (method url-fetch)
5733 (uri (pypi-uri "tifffile" version))
5734 (sha256
5735 (base32
5736 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5737 (build-system python-build-system)
5738 ;; Tests require lfdfiles, which depends on tifffile
5739 (arguments `(#:tests? #f))
5740 (propagated-inputs
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)))
5751
5752 (define-public python-lfdfiles
5753 (package
5754 (name "python-lfdfiles")
5755 (version "2020.1.1")
5756 (source
5757 (origin
5758 (method url-fetch)
5759 (uri (pypi-uri "lfdfiles" version))
5760 (sha256
5761 (base32
5762 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5763 (build-system python-build-system)
5764 (propagated-inputs
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")
5770 (description
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)))
5775
5776 (define-public python-imageio
5777 (package
5778 (name "python-imageio")
5779 (version "2.8.0")
5780 (source
5781 (origin
5782 (method url-fetch)
5783 (uri (pypi-uri "imageio" version))
5784 (sha256
5785 (base32
5786 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5787 (build-system python-build-system)
5788 (arguments
5789 `(#:tests? #f ; many tests require online data
5790 #:phases
5791 (modify-phases %standard-phases
5792 (replace 'check
5793 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5794 (if tests?
5795 (begin
5796 ;; Make installed package available for running the tests.
5797 (add-installed-pythonpath inputs outputs)
5798 (invoke "pytest" "-vv"))
5799 #t))))))
5800 (propagated-inputs
5801 `(("python-numpy" ,python-numpy)
5802 ("python-pillow" ,python-pillow)
5803 ("python-psutil" ,python-psutil)))
5804 (native-inputs
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")
5808 (description
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)))
5813
5814 (define-public python-pycparser
5815 (package
5816 (name "python-pycparser")
5817 (version "2.20")
5818 (source
5819 (origin
5820 (method url-fetch)
5821 (uri (pypi-uri "pycparser" version))
5822 (sha256
5823 (base32
5824 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5825 (outputs '("out" "doc"))
5826 (build-system python-build-system)
5827 (native-inputs
5828 `(("pkg-config" ,pkg-config)))
5829 (arguments
5830 `(#:phases
5831 (modify-phases %standard-phases
5832 (replace 'check
5833 (lambda _
5834 (with-directory-excursion "tests"
5835 (invoke "python" "all_tests.py"))
5836 #t))
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")))
5842 (mkdir-p 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)
5848 #t))))))
5849 (home-page "https://github.com/eliben/pycparser")
5850 (synopsis "C parser in Python")
5851 (description
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)))
5856
5857 (define-public python2-pycparser
5858 (package-with-python2 python-pycparser))
5859
5860 (define-public python-pywavelets
5861 (package
5862 (name "python-pywavelets")
5863 (version "1.1.1")
5864 (home-page "https://github.com/PyWavelets/pywt")
5865 (source (origin
5866 (method url-fetch)
5867 (uri (pypi-uri "PyWavelets" version))
5868 (sha256
5869 (base32
5870 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5871 (build-system python-build-system)
5872 (arguments
5873 '(#:modules ((ice-9 ftw)
5874 (srfi srfi-1)
5875 (srfi srfi-26)
5876 (guix build utils)
5877 (guix build python-build-system))
5878 #:phases
5879 (modify-phases %standard-phases
5880 (replace 'check
5881 (lambda _
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"))))))))
5887 (native-inputs
5888 `(("python-matplotlib" ,python-matplotlib) ;for tests
5889 ("python-pytest" ,python-pytest)))
5890 (propagated-inputs
5891 `(("python-numpy" ,python-numpy)))
5892 (synopsis "Wavelet transforms in Python")
5893 (description
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)))
5900
5901 (define-public python-pywinrm
5902 (package
5903 (name "python-pywinrm")
5904 (version "0.4.1")
5905 (source
5906 (origin
5907 (method url-fetch)
5908 (uri (pypi-uri "pywinrm" version))
5909 (sha256
5910 (base32
5911 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5912 (build-system python-build-system)
5913 (propagated-inputs
5914 `(("python-six" ,python-six)
5915 ("python-requests_ntlm" ,python-requests_ntlm)
5916 ("python-xmltodict" ,python-xmltodict)
5917 ("python-kerberos" ,python-kerberos)))
5918 (native-inputs
5919 `(("python-mock" ,python-mock)
5920 ("python-pytest" ,python-pytest)))
5921 (home-page "https://github.com/diyan/pywinrm/")
5922 (synopsis
5923 "Python library for Windows Remote Management (WinRM)")
5924 (description
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)))
5929
5930 (define-public python-xcffib
5931 (package
5932 (name "python-xcffib")
5933 (version "0.6.0")
5934 (source
5935 (origin
5936 (method url-fetch)
5937 (uri (pypi-uri "xcffib" version))
5938 (sha256
5939 (base32
5940 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5941 (build-system python-build-system)
5942 (inputs
5943 `(("libxcb" ,libxcb)))
5944 (propagated-inputs
5945 `(("python-cffi" ,python-cffi) ; used at run time
5946 ("python-six" ,python-six)))
5947 (arguments
5948 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5949 #:tests? #f
5950 #:phases
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/")))
5957 #t)))
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)))
5962 (mkdir-p doc)
5963 (copy-file "README.md"
5964 (string-append doc "/README.md"))
5965 #t))))))
5966 (home-page "https://github.com/tych0/xcffib")
5967 (synopsis "XCB Python bindings")
5968 (description
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)))
5972
5973 (define-public python2-xcffib
5974 (package-with-python2 python-xcffib))
5975
5976 (define-public python-cairocffi
5977 (package
5978 (name "python-cairocffi")
5979 (version "0.9.0")
5980 (source
5981 (origin
5982 (method url-fetch)
5983 (uri (pypi-uri "cairocffi" version))
5984 (sha256
5985 (base32
5986 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5987 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5988 (build-system python-build-system)
5989 (outputs '("out" "doc"))
5990 (inputs
5991 `(("glib" ,glib)
5992 ("gtk+" ,gtk+)
5993 ("gdk-pixbuf" ,gdk-pixbuf)
5994 ("cairo" ,cairo)
5995 ("pango" ,pango)))
5996 (native-inputs
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)))
6003 (propagated-inputs
6004 `(("python-xcffib" ,python-xcffib))) ; used at run time
6005 (arguments
6006 `(#:phases
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'")))
6032 #t))
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")
6042 (mkdir-p html)
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)
6049 #t))))))
6050 (home-page "https://github.com/Kozea/cairocffi")
6051 (synopsis "Python bindings and object-oriented API for Cairo")
6052 (description
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)))
6058
6059 (define-public python2-cairocffi
6060 (package-with-python2 python-cairocffi))
6061
6062 (define-public python-decorator
6063 (package
6064 (name "python-decorator")
6065 (version "4.3.0")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (pypi-uri "decorator" version))
6070 (sha256
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")
6075 (description
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)))
6081
6082 (define-public python2-decorator
6083 (package-with-python2 python-decorator))
6084
6085 (define-public python-drmaa
6086 (package
6087 (name "python-drmaa")
6088 (version "0.7.7")
6089 (source
6090 (origin
6091 (method url-fetch)
6092 (uri (pypi-uri "drmaa" version))
6093 (sha256
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))
6100 (native-inputs
6101 `(("python-nose" ,python-nose)))
6102 (home-page "https://pypi.org/project/drmaa/")
6103 (synopsis "Python bindings for the DRMAA library")
6104 (description
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)))
6109
6110 (define-public python2-drmaa
6111 (package-with-python2 python-drmaa))
6112
6113 (define-public python-grako
6114 (package
6115 (name "python-grako")
6116 (version "3.99.9")
6117 (source
6118 (origin
6119 (method url-fetch)
6120 (uri
6121 (pypi-uri "grako" version ".zip"))
6122 (sha256
6123 (base32
6124 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6125 (build-system python-build-system)
6126 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6127 (native-inputs
6128 `(("unzip" ,unzip)
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")
6133 (description
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)))
6137
6138 (define-public python2-grako
6139 (package-with-python2 python-grako))
6140
6141 (define-public python-grandalf
6142 (package
6143 (name "python-grandalf")
6144 (version "0.7")
6145 (source
6146 (origin
6147 ;; There's no source tarball on PyPI.
6148 (method git-fetch)
6149 (uri (git-reference
6150 (url "https://github.com/bdcht/grandalf")
6151 (commit (string-append "v" version))))
6152 (file-name (git-file-name name version))
6153 (sha256
6154 (base32
6155 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6156 (build-system python-build-system)
6157 (arguments
6158 '(#:phases
6159 (modify-phases %standard-phases
6160 (replace 'check
6161 (lambda _
6162 (invoke "python" "setup.py" "pytest"))))))
6163 (native-inputs
6164 `(("python-pytest" ,python-pytest)
6165 ("python-pytest-runner" ,python-pytest-runner)))
6166 (propagated-inputs
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")
6171 (description
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
6181 250 lines!
6182
6183 Grandalf does only 2 not-so-simple things:
6184 @itemize
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
6188 @end itemize
6189
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))))
6195
6196 (define-public python-gridmap
6197 (package
6198 (name "python-gridmap")
6199 (version "0.14.0")
6200 (source
6201 (origin
6202 (method git-fetch)
6203 (uri (git-reference
6204 (url "https://github.com/pygridtools/gridmap")
6205 (commit (string-append "v" version))))
6206 (file-name (git-file-name name version))
6207 (sha256
6208 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6209 (build-system python-build-system)
6210 (arguments
6211 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6212 (propagated-inputs
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")
6218 (description
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+)))
6223
6224 (define-public python2-gridmap
6225 (package-with-python2 python-gridmap))
6226
6227 (define-public python-honcho
6228 (package
6229 (name "python-honcho")
6230 (version "1.0.1")
6231 (source
6232 (origin
6233 (method git-fetch)
6234 (uri (git-reference
6235 (url "https://github.com/nickstenning/honcho")
6236 (commit (string-append "v" version))))
6237 (file-name (git-file-name name version))
6238 (sha256
6239 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6240 (build-system python-build-system)
6241 (native-inputs
6242 `(("python-pytest" ,python-pytest)
6243 ("python-mock" ,python-mock)
6244 ("python-tox" ,python-tox)
6245 ("which" ,which))) ;for tests
6246 (propagated-inputs
6247 `(("python-jinja2" ,python-jinja2)))
6248 (arguments
6249 `(#:phases
6250 (modify-phases %standard-phases
6251 (delete 'check)
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")
6264 (description
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
6268 displayed.")
6269 (license license:expat)))
6270
6271 (define-public python2-honcho
6272 (package-with-python2 python-honcho))
6273
6274 (define-public python-pexpect
6275 (package
6276 (name "python-pexpect")
6277 (version "4.8.0")
6278 (source
6279 (origin
6280 (method url-fetch)
6281 (uri (pypi-uri "pexpect" version))
6282 (sha256
6283 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6284 (build-system python-build-system)
6285 (arguments
6286 `(#:phases
6287 (modify-phases %standard-phases
6288 (add-before 'check 'prepare-tests
6289 (lambda _
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.
6297 (("/bin'") "/dev'")
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")
6304 #t))
6305 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6306 (native-inputs
6307 `(("python-nose" ,python-nose)
6308 ("python-pytest" ,python-pytest)
6309 ("man-db" ,man-db)
6310 ("which" ,which)
6311 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6312 (propagated-inputs
6313 `(("python-ptyprocess" ,python-ptyprocess)))
6314 (home-page "http://pexpect.readthedocs.org/")
6315 (synopsis "Controlling interactive console applications")
6316 (description
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)))
6322
6323 (define-public python2-pexpect
6324 (package-with-python2 python-pexpect))
6325
6326 (define-public python-setuptools-scm
6327 (package
6328 (name "python-setuptools-scm")
6329 (version "3.4.3")
6330 (source (origin
6331 (method url-fetch)
6332 (uri (pypi-uri "setuptools_scm" version))
6333 (sha256
6334 (base32
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")
6339 (description
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)))
6344
6345 (define-public python2-setuptools-scm
6346 (package-with-python2 python-setuptools-scm))
6347
6348 (define-public python-sexpdata
6349 (package
6350 (name "python-sexpdata")
6351 (version "0.0.3")
6352 (source
6353 (origin
6354 (method url-fetch)
6355 (uri (pypi-uri "sexpdata" version))
6356 (sha256
6357 (base32
6358 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6359 (build-system python-build-system)
6360 (home-page "https://github.com/jd-boyd/sexpdata")
6361 (synopsis "S-expression parser for Python")
6362 (description
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)))
6366
6367 (define-public python-pathlib2
6368 (package
6369 (name "python-pathlib2")
6370 (version "2.3.3")
6371 (source
6372 (origin
6373 (method url-fetch)
6374 (uri (pypi-uri "pathlib2" version))
6375 (sha256
6376 (base32
6377 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6378 (build-system python-build-system)
6379 (propagated-inputs
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)))
6389
6390 (define-public python-importlib-resources
6391 (package
6392 (name "python-importlib-resources")
6393 (version "3.0.0")
6394 (source
6395 (origin
6396 (method url-fetch)
6397 (uri (pypi-uri "importlib_resources" version))
6398 (sha256
6399 (base32
6400 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6401 (build-system python-build-system)
6402 (native-inputs
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")
6407 (description
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)))
6412
6413 (define-public python2-importlib-resources
6414 (package
6415 (name "python2-importlib-resources")
6416 (version "1.0.2")
6417 (source (origin
6418 (method url-fetch)
6419 (uri (pypi-uri "importlib_resources" version))
6420 (sha256
6421 (base32
6422 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6423 (build-system python-build-system)
6424 (arguments
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
6431 (lambda _
6432 (substitute* "setup.cfg"
6433 (("^[[:blank:]]+wheel")
6434 ""))
6435 #t)))))
6436 (propagated-inputs
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")
6441 (description
6442 "This package provides an implementation of @code{importlib.resources}
6443 for older versions of Python.")
6444 (license license:asl2.0)))
6445
6446 ;; For importlib-metadata-bootstrap below.
6447 (define-public python2-importlib-resources-bootstrap
6448 (hidden-package
6449 (package/inherit
6450 python2-importlib-resources
6451 (name "python2-importlib-resources-bootstrap")
6452 (propagated-inputs
6453 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6454 ("python-typing" ,python2-typing))))))
6455
6456 (define-public python-importlib-metadata
6457 (package
6458 (name "python-importlib-metadata")
6459 (version "1.5.0")
6460 (source
6461 (origin
6462 (method url-fetch)
6463 (uri (pypi-uri "importlib_metadata" version))
6464 (sha256
6465 (base32
6466 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6467 (build-system python-build-system)
6468 (propagated-inputs
6469 `(("python-zipp" ,python-zipp)))
6470 (native-inputs
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")
6476 (description
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)))
6485
6486 (define-public python2-importlib-metadata
6487 (let ((base (package-with-python2 (strip-python2-variant
6488 python-importlib-metadata))))
6489 (package/inherit
6490 base
6491 (name "python2-importlib-metadata")
6492 (native-inputs
6493 `(("python-setuptools-scm" ,python2-setuptools-scm)
6494 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6495 ("python-packaging" ,python2-packaging-bootstrap)))
6496 (propagated-inputs
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))))))
6502
6503 ;; This package is used by python2-pytest, and thus must not depend on it.
6504 (define-public python2-importlib-metadata-bootstrap
6505 (hidden-package
6506 (package/inherit
6507 python2-importlib-metadata
6508 (name "python2-importlib-metadata-bootstrap")
6509 (arguments
6510 `(#:tests? #f
6511 ,@(package-arguments python2-importlib-metadata)))
6512 (propagated-inputs
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))))))
6518
6519 (define-public python-importmagic
6520 (package
6521 (name "python-importmagic")
6522 (version "0.1.7")
6523 (source
6524 (origin
6525 (method url-fetch)
6526 (uri (pypi-uri "importmagic" version))
6527 (sha256
6528 (base32
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")
6533 (description
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)))
6537
6538 (define-public python-jaraco-packaging
6539 (package
6540 (name "python-jaraco-packaging")
6541 (version "6.1")
6542 (source
6543 (origin
6544 (method url-fetch)
6545 (uri (pypi-uri "jaraco.packaging" version))
6546 (sha256
6547 (base32
6548 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6549 (build-system python-build-system)
6550 (propagated-inputs
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")
6561 (description
6562 "This package provides various tools to supplement packaging Python
6563 releases.")
6564 (license license:expat)))
6565
6566 (define-public python-pathpy
6567 (package
6568 (name "python-pathpy")
6569 (version "11.5.1")
6570 (source
6571 (origin
6572 (method url-fetch)
6573 (uri (pypi-uri "path.py" version))
6574 (sha256
6575 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6576 (outputs '("out" "doc"))
6577 (build-system python-build-system)
6578 (propagated-inputs
6579 `(("python-appdirs" ,python-appdirs)
6580 ("python-importlib-metadata" ,python-importlib-metadata)))
6581 (native-inputs
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)))
6588 (arguments
6589 `(#:phases
6590 (modify-phases %standard-phases
6591 (add-after 'build 'build-doc
6592 (lambda _
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")))
6600 (mkdir-p 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)
6605 #t)))
6606 (replace 'check
6607 (lambda _
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")
6613 (description
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)))
6617
6618 (define-public python2-pathpy
6619 (package-with-python2 python-pathpy))
6620
6621 (define-public python-simplegeneric
6622 (package
6623 (name "python-simplegeneric")
6624 (version "0.8.1")
6625 (source
6626 (origin
6627 (method url-fetch)
6628 (uri (pypi-uri "simplegeneric" version ".zip"))
6629 (sha256
6630 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6631 (build-system python-build-system)
6632 (native-inputs
6633 `(("unzip" ,unzip)))
6634 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6635 (synopsis "Python module for simple generic functions")
6636 (description
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
6642 standard library.")
6643 (license license:zpl2.1)))
6644
6645 (define-public python2-simplegeneric
6646 (package-with-python2 python-simplegeneric))
6647
6648 (define-public python-ipython-genutils
6649 ;; TODO: This package is retired, check if can be removed, see description.
6650 (package
6651 (name "python-ipython-genutils")
6652 (version "0.1.0")
6653 (source
6654 (origin
6655 (method url-fetch)
6656 (uri (pypi-uri "ipython_genutils" version))
6657 (sha256
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")
6663 (description
6664 "This package provides retired utilities from IPython. No packages
6665 outside IPython/Jupyter should depend on it.
6666
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
6670 away.")
6671 (license license:bsd-3)))
6672
6673 (define-public python2-ipython-genutils
6674 (package-with-python2 python-ipython-genutils))
6675
6676 (define-public python-ipyparallel
6677 (package
6678 (name "python-ipyparallel")
6679 (version "6.2.4")
6680 (source
6681 (origin
6682 (method url-fetch)
6683 (uri (pypi-uri "ipyparallel" version))
6684 (sha256
6685 (base32
6686 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6687 (build-system python-build-system)
6688 (arguments
6689 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6690 #:phases
6691 (modify-phases %standard-phases
6692 (add-before 'check 'prepare-for-tests
6693 (lambda _
6694 (setenv "HOME" (getcwd))
6695 #t)))))
6696 (propagated-inputs
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)))
6706 (native-inputs
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")
6715 (description
6716 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6717 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6718 CLI scripts:
6719 @enumerate
6720 @item ipcluster - start/stop a cluster
6721 @item ipcontroller - start a scheduler
6722 @item ipengine - start an engine
6723 @end enumerate")
6724 (license license:bsd-3)))
6725
6726 (define-public python2-ipyparallel
6727 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6728 (package
6729 (inherit ipyparallel)
6730 (propagated-inputs
6731 `(("python2-futures" ,python2-futures)
6732 ,@(package-propagated-inputs ipyparallel))))))
6733
6734 (define-public python-ipython-cluster-helper
6735 (package
6736 (name "python-ipython-cluster-helper")
6737 (version "0.6.4")
6738 (source
6739 (origin
6740 (method url-fetch)
6741 (uri (pypi-uri "ipython-cluster-helper" version))
6742 (sha256
6743 (base32
6744 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6745 (modules '((guix build utils)))
6746 (snippet
6747 '(begin (substitute* "requirements.txt"
6748 (("ipython.*") "ipython\n"))
6749 #t))))
6750 (build-system python-build-system)
6751 (arguments
6752 `(#:tests? #f ; Test suite can't find IPython.
6753 #:phases
6754 (modify-phases %standard-phases
6755 (replace 'check
6756 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6757 (if tests?
6758 (begin
6759 (setenv "HOME" (getcwd))
6760 (add-installed-pythonpath inputs outputs)
6761 (invoke "python" "example/example.py" "--local"))
6762 #t))))))
6763 (propagated-inputs
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")
6771 (synopsis
6772 "Simplify IPython cluster start up and use for multiple schedulers")
6773 (description
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)))
6778
6779 (define-public python2-ipython-cluster-helper
6780 (package-with-python2 python-ipython-cluster-helper))
6781
6782 (define-public python-traitlets
6783 (package
6784 (name "python-traitlets")
6785 (version "4.3.3")
6786 (source
6787 (origin
6788 (method url-fetch)
6789 (uri (pypi-uri "traitlets" version))
6790 (sha256
6791 (base32
6792 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6793 (build-system python-build-system)
6794 (arguments
6795 `(#:phases
6796 (modify-phases %standard-phases
6797 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6798 (propagated-inputs
6799 `(("python-ipython-genutils" ,python-ipython-genutils)
6800 ("python-decorator" ,python-decorator)))
6801 (native-inputs
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")
6806 (description
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)))
6814
6815 (define-public python2-traitlets
6816 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6817 (package
6818 (inherit traitlets)
6819 (propagated-inputs
6820 `(("python2-enum34" ,python2-enum34)
6821 ,@(package-propagated-inputs traitlets))))))
6822
6823 (define-public python-jupyter-core
6824 (package
6825 (name "python-jupyter-core")
6826 (version "4.4.0")
6827 (source
6828 (origin
6829 (method url-fetch)
6830 (uri (string-append (pypi-uri "jupyter_core" version)))
6831 (sha256
6832 (base32
6833 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6834 (build-system python-build-system)
6835 ;; FIXME: not sure how to run the tests
6836 (arguments `(#:tests? #f))
6837 (propagated-inputs
6838 `(("python-traitlets" ,python-traitlets)))
6839 (home-page "http://jupyter.org/")
6840 (synopsis "Jupyter base package")
6841 (description
6842 "Jupyter core is the base package on which Jupyter projects rely.")
6843 (license license:bsd-3)))
6844
6845 (define-public python2-jupyter-core
6846 (package-with-python2 python-jupyter-core))
6847
6848 (define-public python-jupyter-client
6849 (package
6850 (name "python-jupyter-client")
6851 (version "5.2.4")
6852 (source
6853 (origin
6854 (method url-fetch)
6855 (uri (pypi-uri "jupyter_client" version))
6856 (sha256
6857 (base32
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.
6863 (arguments
6864 `(#:tests? #f
6865
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"
6871 (("'ip'")
6872 (string-append "'" iproute "/sbin/ip'")))
6873 #t))))))
6874 (inputs
6875 `(("iproute" ,iproute)))
6876 (propagated-inputs
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")
6882 (description
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)))
6888
6889 (define-public python2-jupyter-client
6890 (package-with-python2 python-jupyter-client))
6891
6892 (define-public python-ipykernel
6893 (package
6894 (name "python-ipykernel")
6895 (version "5.1.3")
6896 (source
6897 (origin
6898 (method url-fetch)
6899 (uri (pypi-uri "ipykernel" version))
6900 (sha256
6901 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6902 (build-system python-build-system)
6903 (arguments
6904 `(#:phases
6905 (modify-phases %standard-phases
6906 (replace 'check
6907 (lambda _
6908 (setenv "HOME" "/tmp")
6909 (invoke "pytest" "-v")
6910 #t))
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
6914 ;; 'kernel.json'.
6915 (let ((out (assoc-ref outputs "out")))
6916 (substitute* (string-append out "/share/jupyter"
6917 "/kernels/python3/kernel.json")
6918 (("\"python\"")
6919 (string-append "\"" (which "python") "\"")))
6920 #t))))))
6921 (propagated-inputs
6922 `(("python-ipython" ,python-ipython)
6923 ;; imported at runtime during connect
6924 ("python-jupyter-client" ,python-jupyter-client)))
6925 (native-inputs
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")
6931 (description
6932 "This package provides the IPython kernel for Jupyter.")
6933 (properties `((python2-variant . ,(delay python2-ipykernel))))
6934 (license license:bsd-3)))
6935
6936 ;; Version 5.x and above no longer support Python 2.
6937 (define-public python2-ipykernel
6938 (package
6939 (name "python2-ipykernel")
6940 (version "4.10.1")
6941 (source
6942 (origin
6943 (method url-fetch)
6944 (uri (pypi-uri "ipykernel" version))
6945 (sha256
6946 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6947 (build-system python-build-system)
6948 (arguments
6949 `(#:python ,python-2))
6950 (propagated-inputs
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)))
6956 (native-inputs
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")
6963 (description
6964 "This package provides the IPython kernel for Jupyter.")
6965 (license license:bsd-3)))
6966
6967 (define-public python-pari-jupyter
6968 (package
6969 (name "python-pari-jupyter")
6970 (version "1.3.2")
6971 (source
6972 (origin
6973 (method url-fetch)
6974 (uri (pypi-uri "pari_jupyter" version))
6975 (sha256
6976 (base32
6977 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6978 (build-system python-build-system)
6979 (propagated-inputs
6980 `(("python-ipykernel" ,python-ipykernel)))
6981 (inputs
6982 `(("pari-gp" ,pari-gp)
6983 ("readline" ,readline)))
6984 (arguments
6985 `(#:tests? #f)) ; no test suite
6986 (home-page
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+)))
6991
6992 (define-public python-backcall
6993 (package
6994 (name "python-backcall")
6995 (version "0.1.0")
6996 (source
6997 (origin
6998 (method url-fetch)
6999 (uri (pypi-uri "backcall" version))
7000 (sha256
7001 (base32
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")
7006 (description
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)))
7013
7014 (define-public python-ipython
7015 (package
7016 (name "python-ipython")
7017 (version "7.9.0")
7018 (source
7019 (origin
7020 (method url-fetch)
7021 (uri (pypi-uri "ipython" version ".tar.gz"))
7022 (sha256
7023 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7024 (build-system python-build-system)
7025 (propagated-inputs
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)))
7043 (inputs
7044 `(("readline" ,readline)
7045 ("which" ,which)))
7046 (native-inputs
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)))
7052 (arguments
7053 `(#:phases
7054 (modify-phases %standard-phases
7055 (add-after 'unpack 'make-docs-reproducible
7056 (lambda _
7057 (substitute* "IPython/sphinxext/ipython_directive.py"
7058 ((".*import datetime") "")
7059 ((".*datetime.datetime.now\\(\\)") "")
7060 (("%timeit") "# %timeit"))
7061 #t))
7062 ;; Tests can only be run after the library has been installed and not
7063 ;; within the source directory.
7064 (delete 'check)
7065 (add-after 'install 'check
7066 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7067 (if tests?
7068 (begin
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"))
7076 #t)))
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")
7089 #t)))))
7090 (home-page "https://ipython.org")
7091 (synopsis "IPython is a tool for interactive computing in Python")
7092 (description
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
7096 computing.")
7097 (properties `((python2-variant . ,(delay python2-ipython))))
7098 (license license:bsd-3)))
7099
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
7104 (package
7105 (name "python2-ipython")
7106 (version "5.8.0")
7107 (source
7108 (origin
7109 (method url-fetch)
7110 (uri (pypi-uri "ipython" version ".tar.gz"))
7111 (sha256
7112 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7113 (build-system python-build-system)
7114 (propagated-inputs
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)))
7133 (inputs
7134 `(("readline" ,readline)
7135 ("which" ,which)))
7136 (native-inputs
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)))
7143 (arguments
7144 `(#:python ,python-2
7145 #:phases
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")
7153 #t)))))
7154 (home-page "https://ipython.org")
7155 (synopsis "IPython is a tool for interactive computing in Python")
7156 (description
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
7160 computing.")
7161 (license license:bsd-3)))
7162
7163 (define-public python-ipython-documentation
7164 (package
7165 (inherit python-ipython)
7166 (name "python-ipython-documentation")
7167 (version (package-version python-ipython))
7168 (arguments
7169 `(#:phases
7170 (modify-phases %standard-phases
7171 (delete 'build)
7172 (delete 'check)
7173 (replace 'install
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
7188 ;; up the parser.
7189 ;; (system* "make" python-arg "info")
7190 )
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"))
7196 (mkdir-p info)
7197 ;; (copy-file "docs/build/texinfo/ipython.info"
7198 ;; (string-append info "/ipython.info"))
7199 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7200 #t)))))
7201 (inputs
7202 `(("python-ipython" ,python-ipython)
7203 ("python-ipykernel" ,python-ipykernel)))
7204 (native-inputs
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
7209 texlive-fonts-ec
7210 texlive-generic-ifxetex
7211 texlive-generic-pdftex
7212 texlive-latex-capt-of
7213 texlive-latex-cmap
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
7221 texlive-latex-float
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
7236 texlive-latex-ucs
7237 texlive-latex-upquote
7238 texlive-latex-url
7239 texlive-latex-varwidth
7240 texlive-latex-wrapfig)))
7241 ("texinfo" ,texinfo)))))
7242
7243 (define-public python-urwid
7244 (package
7245 (name "python-urwid")
7246 (version "2.1.0")
7247 (source
7248 (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "urwid" version))
7251 (sha256
7252 (base32
7253 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7254 (build-system python-build-system)
7255 (home-page "http://urwid.org")
7256 (synopsis "Console user interface library for Python")
7257 (description
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+)))
7261
7262 (define-public python2-urwid
7263 (package-with-python2 python-urwid))
7264
7265 (define-public python-urwidtrees
7266 (package
7267 (name "python-urwidtrees")
7268 (version "1.0.2")
7269 (source
7270 (origin
7271 (method git-fetch)
7272 ;; package author intends on distributing via github rather than pypi:
7273 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7274 (uri (git-reference
7275 (url "https://github.com/pazz/urwidtrees")
7276 (commit version)))
7277 (file-name (git-file-name name version))
7278 (sha256
7279 (base32
7280 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7281 (build-system python-build-system)
7282 (arguments
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+)))
7291
7292 (define-public python2-urwidtrees
7293 (package-with-python2 python-urwidtrees))
7294
7295 (define-public python-ua-parser
7296 (package
7297 (name "python-ua-parser")
7298 (version "0.8.0")
7299 (source
7300 (origin
7301 (method url-fetch)
7302 (uri (pypi-uri "ua-parser" version))
7303 (sha256
7304 (base32
7305 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7306 (build-system python-build-system)
7307 (arguments
7308 `(#:tests? #f)) ;no test suite in release
7309 (native-inputs
7310 `(("python-pyyaml" ,python-pyyaml)))
7311 (home-page "https://github.com/ua-parser/uap-python")
7312 (synopsis "User agent parser")
7313 (description
7314 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7315 (license license:asl2.0)))
7316
7317 (define-public python2-ua-parser
7318 (package-with-python2 python-ua-parser))
7319
7320 (define-public python-user-agents
7321 (package
7322 (name "python-user-agents")
7323 (version "1.1.0")
7324 (source
7325 (origin
7326 (method url-fetch)
7327 (uri (pypi-uri "user-agents" version))
7328 (sha256
7329 (base32
7330 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7331 (build-system python-build-system)
7332 (arguments
7333 `(#:tests? #f)) ;missing devices.json test file in release
7334 (propagated-inputs
7335 `(("python-ua-parser" ,python-ua-parser)))
7336 (home-page "https://github.com/selwin/python-user-agents")
7337 (synopsis "User Agent strings parsing library")
7338 (description
7339 "A library to identify devices (phones, tablets) and their capabilities by
7340 parsing (browser/HTTP) user agent strings.")
7341 (license license:expat)))
7342
7343 (define-public python2-user-agents
7344 (package-with-python2 python-user-agents))
7345
7346 (define-public python-dbus
7347 (package
7348 (name "python-dbus")
7349 (version "1.2.16")
7350 (source
7351 (origin
7352 (method url-fetch)
7353 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7354 "dbus-python-" version ".tar.gz"))
7355 (sha256
7356 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7357 (build-system gnu-build-system)
7358 (native-inputs
7359 `(("pkg-config" ,pkg-config)))
7360 (inputs
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)))
7368
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)
7375 equal?)))))
7376
7377 (define-public python-notify2
7378 (package
7379 (name "python-notify2")
7380 (version "0.3.1")
7381 (source
7382 (origin
7383 (method url-fetch)
7384 (uri (pypi-uri "notify2" version))
7385 (sha256
7386 (base32
7387 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7388 (build-system python-build-system)
7389 (arguments `(#:tests? #f)) ; tests depend on system state
7390 (native-inputs
7391 `(("python-dbus" ,python-dbus)))
7392 (home-page "https://bitbucket.org/takluyver/pynotify2")
7393 (synopsis "Python interface to D-Bus notifications")
7394 (description
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+))))
7400
7401 (define-public python2-notify2
7402 (package-with-python2 python-notify2))
7403
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
7407 (package
7408 (name "python-beautifulsoup4")
7409 (version "4.9.1")
7410 (source
7411 (origin
7412 (method url-fetch)
7413 (uri (pypi-uri "beautifulsoup4" version))
7414 (sha256
7415 (base32
7416 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7417 (build-system python-build-system)
7418 (arguments
7419 `(#:phases
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
7425 ;; distribution.
7426 (replace 'check
7427 (lambda _ (invoke "./convert-py3k"))))))
7428 (propagated-inputs
7429 `(("python-soupsieve" ,python-soupsieve)))
7430 (home-page
7431 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7432 (synopsis
7433 "Python screen-scraping library")
7434 (description
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))))))
7442
7443 (define-public python2-beautifulsoup4
7444 (package
7445 (inherit (package-with-python2
7446 (strip-python2-variant python-beautifulsoup4)))
7447 (arguments `(#:python ,python-2))))
7448
7449 (define-public python-soupsieve
7450 (package
7451 (name "python-soupsieve")
7452 (version "2.0.1")
7453 (source
7454 (origin
7455 (method url-fetch)
7456 (uri (pypi-uri "soupsieve" version))
7457 (sha256
7458 (base32
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")
7467 (description
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)))
7475
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))))
7479 (package
7480 (inherit base)
7481 (version "1.9.6")
7482 (source
7483 (origin
7484 (method url-fetch)
7485 (uri (pypi-uri "soupsieve" version))
7486 (sha256
7487 (base32
7488 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7489 (propagated-inputs
7490 `(("python2-backports-functools-lru-cache"
7491 ,python2-backports-functools-lru-cache)
7492 ,@(package-propagated-inputs base))))))
7493
7494 (define-public python-netifaces
7495 (package
7496 (name "python-netifaces")
7497 (version "0.10.9")
7498 (source
7499 (origin
7500 (method url-fetch)
7501 (uri (pypi-uri "netifaces" version))
7502 (sha256
7503 (base32
7504 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7505 (build-system python-build-system)
7506 (home-page "https://github.com/al45tair/netifaces")
7507 (synopsis
7508 "Python module for portable network interface information")
7509 (description
7510 "Netifaces is a Python module providing information on network
7511 interfaces in an easy and portable manner.")
7512 (license license:expat)))
7513
7514 (define-public python2-netifaces
7515 (package-with-python2 python-netifaces))
7516
7517 (define-public python-networkx
7518 (package
7519 (name "python-networkx")
7520 (version "2.5")
7521 (source
7522 (origin
7523 (method url-fetch)
7524 (uri (pypi-uri "networkx" version))
7525 (sha256
7526 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7527 (build-system python-build-system)
7528 (arguments
7529 '(#:phases (modify-phases %standard-phases
7530 (replace 'check
7531 (lambda* (#:key tests? #:allow-other-keys)
7532 (if tests?
7533 (invoke "pytest" "-vv" "--pyargs" "networkx")
7534 (format #t "test suite not run~%"))
7535 #t)))))
7536 ;; python-decorator is needed at runtime.
7537 (propagated-inputs
7538 `(("python-decorator" ,python-decorator)))
7539 (native-inputs
7540 `(("python-pytest" ,python-pytest)))
7541 (home-page "https://networkx.github.io/")
7542 (synopsis "Python module for creating and manipulating graphs and networks")
7543 (description
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)))
7548
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))))
7552 (package
7553 (inherit base)
7554 (version "2.2")
7555 (source (origin
7556 (method url-fetch)
7557 (uri (pypi-uri "networkx" version ".zip"))
7558 (sha256
7559 (base32
7560 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7561 (arguments
7562 `(#:python ,python-2))
7563 (native-inputs
7564 `(("python-nose" ,python2-nose)
7565 ("unzip" ,unzip))))))
7566
7567 (define-public python-datrie
7568 (package
7569 (name "python-datrie")
7570 (version "0.8.2")
7571 (source
7572 (origin
7573 (method url-fetch)
7574 (uri (pypi-uri "datrie" version))
7575 (sha256
7576 (base32
7577 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7578 (build-system python-build-system)
7579 (native-inputs
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")
7586 (description
7587 "This package provides a fast, efficiently stored trie implementation for
7588 Python.")
7589 (license license:lgpl2.1+)))
7590
7591 (define-public snakemake
7592 (package
7593 (name "snakemake")
7594 (version "5.7.1")
7595 (source
7596 (origin
7597 (method url-fetch)
7598 (uri (pypi-uri "snakemake" version))
7599 (sha256
7600 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7601 (build-system python-build-system)
7602 (arguments
7603 ;; TODO: Package missing test dependencies.
7604 '(#:tests? #f
7605 #:phases
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")
7615 "/bin/snakemake")))
7616 #t)))))
7617 (propagated-inputs
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")
7633 (description
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)))
7638
7639 (define-public python-pyqrcode
7640 (package
7641 (name "python-pyqrcode")
7642 (version "1.2.1")
7643 (source
7644 (origin
7645 (method url-fetch)
7646 (uri (pypi-uri "PyQRCode" version))
7647 (sha256
7648 (base32
7649 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7650 (build-system python-build-system)
7651 (home-page
7652 "https://github.com/mnooner256/pyqrcode")
7653 (synopsis "QR code generator")
7654 (description
7655 "Pyqrcode is a QR code generator written purely in Python with
7656 SVG, EPS, PNG and terminal output.")
7657 (license license:bsd-3)))
7658
7659 (define-public python-seaborn
7660 (package
7661 (name "python-seaborn")
7662 (version "0.10.0")
7663 (source
7664 (origin
7665 (method url-fetch)
7666 (uri (pypi-uri "seaborn" version))
7667 (sha256
7668 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7669 (build-system python-build-system)
7670 (arguments
7671 `(#:phases
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")
7680 #t)))
7681 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7682 (propagated-inputs
7683 `(("python-pandas" ,python-pandas)
7684 ("python-matplotlib" ,python-matplotlib)
7685 ("python-numpy" ,python-numpy)
7686 ("python-scipy" ,python-scipy)))
7687 (native-inputs
7688 `(("python-pytest" ,python-pytest)
7689 ("xorg-server" ,xorg-server-for-tests)))
7690 (home-page "https://seaborn.pydata.org/")
7691 (synopsis "Statistical data visualization")
7692 (description
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)))
7699
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))))
7703 (package
7704 (inherit base)
7705 (version "0.9.1")
7706 (source (origin
7707 (method url-fetch)
7708 (uri (pypi-uri "seaborn" version))
7709 (sha256
7710 (base32
7711 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7712
7713 (define-public python-mpmath
7714 (package
7715 (name "python-mpmath")
7716 (version "1.1.0")
7717 (source (origin
7718 (method url-fetch)
7719 (uri (pypi-uri "mpmath" version))
7720 (file-name (git-file-name name version))
7721 (sha256
7722 (base32
7723 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7724 (build-system python-build-system)
7725 (native-inputs
7726 `(("python-pytest" ,python-pytest)))
7727 (arguments
7728 '(#:phases
7729 (modify-phases %standard-phases
7730 (replace 'check
7731 (lambda _
7732 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7733 (home-page "http://mpmath.org")
7734 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7735 (description
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)))
7740
7741 (define-public python2-mpmath
7742 (package-with-python2 python-mpmath))
7743
7744 (define-public python-bigfloat
7745 (package
7746 (name "python-bigfloat")
7747 (version "0.3.0")
7748 (source
7749 (origin
7750 (method url-fetch)
7751 (uri (pypi-uri "bigfloat" version))
7752 (sha256
7753 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7754 (build-system python-build-system)
7755 (inputs
7756 `(("mpfr" ,mpfr)))
7757 (home-page "https://github.com/mdickinson/bigfloat")
7758 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7759 (description
7760 "This package provides a Python interface to the MPFR library for
7761 multiprecision arithmetic.")
7762 (license license:lgpl3+)))
7763
7764 (define-public python2-bigfloat
7765 (package-with-python2 python-bigfloat))
7766
7767 (define-public python-sympy
7768 (package
7769 (name "python-sympy")
7770 (version "1.6.2")
7771 (source
7772 (origin
7773 (method url-fetch)
7774 (uri (pypi-uri "sympy" version))
7775 (sha256
7776 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7777 (build-system python-build-system)
7778 (arguments
7779 `(#:phases
7780 (modify-phases %standard-phases
7781 (replace 'check
7782 (lambda* (#:key outputs #:allow-other-keys)
7783 (invoke
7784 (or (which "python3") (which "python"))
7785 "-c" "import sympy; sympy.test(\"/core\")"))))))
7786 (propagated-inputs
7787 `(("python-mpmath" ,python-mpmath)))
7788 (home-page "https://www.sympy.org/")
7789 (synopsis "Python library for symbolic mathematics")
7790 (description
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)))
7795
7796 (define-public python2-sympy
7797 (package
7798 (inherit (package-with-python2 python-sympy))
7799 (version "1.5.1") ; last release for python2
7800 (source
7801 (origin
7802 (method url-fetch)
7803 (uri (pypi-uri "sympy" version))
7804 (sha256
7805 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7806
7807 (define-public python-q
7808 (package
7809 (name "python-q")
7810 (version "2.6")
7811 (source
7812 (origin
7813 (method url-fetch)
7814 (uri (pypi-uri "q" version))
7815 (sha256
7816 (base32
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")
7821 (description
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)))
7826
7827 (define-public python2-q
7828 (package-with-python2 python-q))
7829
7830 (define-public python-xlib
7831 (package
7832 (name "python-xlib")
7833 (version "0.27")
7834 (source
7835 (origin
7836 (method git-fetch)
7837 (uri (git-reference
7838 (url "https://github.com/python-xlib/python-xlib")
7839 (commit version)))
7840 (file-name (git-file-name name version))
7841 (sha256
7842 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7843 (build-system python-build-system)
7844 (arguments
7845 `(#:phases
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")
7854 #t))))))
7855 (native-inputs
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")
7862 (description
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+)))
7867
7868 (define-public python2-xlib
7869 (package-with-python2 python-xlib))
7870
7871 (define-public python-singledispatch
7872 (package
7873 (name "python-singledispatch")
7874 (version "3.4.0.3")
7875 (source
7876 (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "singledispatch" version))
7879 (sha256
7880 (base32
7881 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7882 (build-system python-build-system)
7883 (native-inputs
7884 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7885 (home-page
7886 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7887 (synopsis "Backport of singledispatch feature from Python 3.4")
7888 (description
7889 "This library brings functools.singledispatch from Python 3.4 to Python
7890 2.6-3.3.")
7891 (license license:expat)))
7892
7893 (define-public python2-singledispatch
7894 (package-with-python2 python-singledispatch))
7895
7896 ;; the python- version can be removed with python-3.5
7897 (define-public python-backports-abc
7898 (package
7899 (name "python-backports-abc")
7900 (version "0.5")
7901 (source
7902 (origin
7903 (method url-fetch)
7904 (uri (pypi-uri "backports_abc" version))
7905 (sha256
7906 (base32
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")
7911 (description
7912 "Python-backports-abc provides a backport of additions to the
7913 @code{collections.abc} module in Python-3.5.")
7914 (license license:psfl)))
7915
7916 (define-public python2-backports-abc
7917 (package-with-python2 python-backports-abc))
7918
7919 (define-public python-backports-csv
7920 (package
7921 (name "python-backports-csv")
7922 (version "1.0.7")
7923 (source
7924 (origin
7925 (method url-fetch)
7926 (uri (pypi-uri "backports.csv" version))
7927 (sha256
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")
7932 (description
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)))
7939
7940 (define-public python2-backports-csv
7941 (package-with-python2 python-backports-csv))
7942
7943 (define-public python2-backports-shutil-get-terminal-size
7944 (package
7945 (name "python2-backports-shutil-get-terminal-size")
7946 (version "1.0.0")
7947 (source
7948 (origin
7949 (method url-fetch)
7950 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7951 (sha256
7952 (base32
7953 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7954 (build-system python-build-system)
7955 (arguments
7956 `(#:python ,python-2
7957 #:phases
7958 (modify-phases %standard-phases
7959 (replace 'check
7960 (lambda _
7961 (setenv "PYTHONPATH" (string-append "./build/lib:"
7962 (getenv "PYTHONPATH")))
7963 (invoke "py.test" "-v"))))))
7964 (native-inputs
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}")
7968 (description
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)))
7974
7975 (define-public python-waf
7976 (package
7977 (name "python-waf")
7978 (version "2.0.19")
7979 (source (origin
7980 (method url-fetch)
7981 (uri (string-append "https://waf.io/"
7982 "waf-" version ".tar.bz2"))
7983 (sha256
7984 (base32
7985 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7986 (build-system python-build-system)
7987 (arguments
7988 '(#:phases
7989 (modify-phases %standard-phases
7990 (replace 'build
7991 (lambda _
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 ","))))))
7998 (replace 'check
7999 (lambda _
8000 (invoke "python" "waf" "--version")))
8001 (replace 'install
8002 (lambda* (#:key outputs #:allow-other-keys)
8003 (let ((out (assoc-ref outputs "out")))
8004 (install-file "waf" (string-append out "/bin")))
8005 #t))
8006 ;; waf breaks when it is wrapped.
8007 (delete 'wrap))))
8008 (home-page "https://waf.io/")
8009 (synopsis "Python-based build system")
8010 (description
8011 "Waf is a Python-based framework for configuring, compiling and installing
8012 applications.")
8013 (license license:bsd-3)))
8014
8015 (define-public python2-waf
8016 (package-with-python2 python-waf))
8017
8018 (define-public python-pyzmq
8019 (package
8020 (name "python-pyzmq")
8021 (version "17.1.2")
8022 (source
8023 (origin
8024 (method url-fetch)
8025 (uri (pypi-uri "pyzmq" version))
8026 (sha256
8027 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8028 (build-system python-build-system)
8029 (arguments
8030 `(#:configure-flags
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.
8034 #:tests? #f))
8035 (inputs
8036 `(("zeromq" ,zeromq)))
8037 (native-inputs
8038 `(("pkg-config" ,pkg-config)
8039 ("python-nose" ,python-nose)))
8040 (home-page "https://github.com/zeromq/pyzmq")
8041 (synopsis "Python bindings for 0MQ")
8042 (description
8043 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8044 (license license:bsd-4)))
8045
8046 (define-public python2-pyzmq
8047 (package-with-python2 python-pyzmq))
8048
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.
8053 (package
8054 (name "python-pep8")
8055 (version "1.7.0")
8056 (source
8057 (origin
8058 (method url-fetch)
8059 (uri (pypi-uri "pep8" version))
8060 (sha256
8061 (base32
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")
8067 (description
8068 "This tools checks Python code against some of the style conventions in
8069 PEP 8.")
8070 (license license:expat)))
8071
8072 (define-public python2-pep8
8073 (package-with-python2 python-pep8))
8074
8075 (define-public python-pep517
8076 (package
8077 (name "python-pep517")
8078 (version "0.8.2")
8079 (source
8080 (origin
8081 (method url-fetch)
8082 (uri (pypi-uri "pep517" version))
8083 (sha256
8084 (base32
8085 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8086 (build-system python-build-system)
8087 (arguments
8088 '(#:phases
8089 (modify-phases %standard-phases
8090 (replace 'check
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")
8095 (if tests?
8096 (invoke "pytest")
8097 #t))))))
8098 (native-inputs
8099 `(("python-mock" ,python-mock)
8100 ("python-pytest" ,python-pytest)
8101 ("python-testpath" ,python-testpath)))
8102 (propagated-inputs
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")
8107 (description
8108 "Wrappers to build Python packages using PEP 517 hooks.")
8109 (properties `((python2-variant . ,(delay python2-pep517))))
8110 (license license:expat)))
8111
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))))
8116 (package
8117 (inherit base)
8118 (name "python2-pep517")
8119 (arguments
8120 `(#:tests? #f
8121 ,@(package-arguments base)))
8122 (native-inputs `()))))
8123
8124 (define-public python-pyflakes
8125 (package
8126 (name "python-pyflakes")
8127 (version "2.2.0")
8128 (source
8129 (origin
8130 (method url-fetch)
8131 (uri (pypi-uri "pyflakes" version))
8132 (sha256
8133 (base32
8134 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8135 (build-system python-build-system)
8136 (home-page
8137 "https://github.com/pyflakes/pyflakes")
8138 (synopsis "Passive checker of Python programs")
8139 (description
8140 "Pyflakes statically checks Python source code for common errors.")
8141 (license license:expat)))
8142
8143 (define-public python2-pyflakes
8144 (package-with-python2 python-pyflakes))
8145
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)
8150 (version "1.2.3")
8151 (source
8152 (origin
8153 (method url-fetch)
8154 (uri (pypi-uri "pyflakes" version))
8155 (sha256
8156 (base32
8157 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
8158 (arguments
8159 '(#:phases
8160 (modify-phases %standard-phases
8161 ;; This one test fails.
8162 (replace 'check
8163 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
8164 (native-inputs
8165 `(("python-pytest" ,python-pytest)))))
8166
8167 (define-public python-mccabe
8168 (package
8169 (name "python-mccabe")
8170 (version "0.6.1")
8171 (source
8172 (origin
8173 (method url-fetch)
8174 (uri (pypi-uri "mccabe" version))
8175 (sha256
8176 (base32
8177 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8178 (build-system python-build-system)
8179 (native-inputs
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")
8184 (description
8185 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8186 complexity of Python source code.")
8187 (license license:expat)))
8188
8189 (define-public python2-mccabe
8190 (package-with-python2 python-mccabe))
8191
8192 (define-public python-mccabe-0.2.1
8193 (package (inherit python-mccabe)
8194 (version "0.2.1")
8195 (source
8196 (origin
8197 (method url-fetch)
8198 (uri (pypi-uri "mccabe" version))
8199 (sha256
8200 (base32
8201 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
8202
8203 (define-public python2-mccabe-0.2.1
8204 (package-with-python2 python-mccabe-0.2.1))
8205
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)
8210 (version "1.5.7")
8211 (source
8212 (origin
8213 (method url-fetch)
8214 (uri (pypi-uri "pep8" version))
8215 (sha256
8216 (base32
8217 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
8218 (arguments
8219 ;; XXX Tests not compatible with Python 3.5.
8220 '(#:tests? #f))))
8221
8222 (define-public python2-pep8-1.5.7
8223 (package-with-python2 python-pep8-1.5.7))
8224
8225 (define-public python-flake8
8226 (package
8227 (name "python-flake8")
8228 (version "3.8.4")
8229 (source (origin
8230 (method url-fetch)
8231 (uri (pypi-uri "flake8" version))
8232 (sha256
8233 (base32
8234 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8235 (build-system python-build-system)
8236 (arguments
8237 `(#:phases
8238 (modify-phases %standard-phases
8239 (delete 'check)
8240 (add-after 'install 'check
8241 (lambda* (#:key inputs outputs #:allow-other-keys)
8242 (add-installed-pythonpath inputs outputs)
8243 (invoke "pytest" "-v")
8244 #t)))))
8245 (propagated-inputs
8246 `(("python-pycodestyle" ,python-pycodestyle)
8247 ("python-entrypoints" ,python-entrypoints)
8248 ("python-pyflakes" ,python-pyflakes)
8249 ("python-mccabe" ,python-mccabe)))
8250 (native-inputs
8251 `(("python-mock" ,python-mock)
8252 ("python-pytest" ,python-pytest-bootstrap)))
8253 (home-page "https://gitlab.com/pycqa/flake8")
8254 (synopsis
8255 "The modular source code checker: pep8, pyflakes and co")
8256 (description
8257 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8258 (properties `((python2-variant . ,(delay python2-flake8))))
8259 (license license:expat)))
8260
8261 (define-public python2-flake8
8262 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8263 (package (inherit base)
8264 (propagated-inputs
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))))))
8270
8271 ;; python-hacking requires flake8 <2.7.0.
8272 (define-public python-flake8-2.6
8273 (package
8274 (inherit python-flake8)
8275 (version "2.6.2")
8276 (source (origin
8277 (method url-fetch)
8278 (uri (pypi-uri "flake8" version))
8279 (sha256
8280 (base32
8281 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
8282 (arguments
8283 `(#:phases
8284 (modify-phases %standard-phases
8285 (add-after 'unpack 'use-later-pycodestyles
8286 (lambda __
8287 (substitute* '("flake8.egg-info/requires.txt"
8288 "setup.py")
8289 (("pycodestyle >= 2.0, < 2.1")
8290 "pycodestyle >= 2.0"))
8291 #t))
8292 (delete 'check)
8293 (add-after 'install 'check
8294 (lambda* (#:key inputs outputs #:allow-other-keys)
8295 (add-installed-pythonpath inputs outputs)
8296 (invoke "pytest" "-v")
8297 #t)))))
8298 (propagated-inputs
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)))))
8304
8305 (define-public python-flake8-bugbear
8306 (package
8307 (name "python-flake8-bugbear")
8308 (version "20.1.4")
8309 (source
8310 (origin
8311 (method url-fetch)
8312 (uri (pypi-uri "flake8-bugbear" version))
8313 (sha256
8314 (base32
8315 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8316 (build-system python-build-system)
8317 (arguments
8318 '(#:phases
8319 (modify-phases %standard-phases
8320 (add-before 'check 'disable-test
8321 (lambda _
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")))))))
8326 (native-inputs
8327 `(("python-hypothesis" ,python-hypothesis)
8328 ("python-hypothesmith" ,python-hypothesmith)))
8329 (propagated-inputs
8330 `(("python-attrs" ,python-attrs)
8331 ("python-flake8" ,python-flake8)))
8332 (home-page "https://github.com/PyCQA/flake8-bugbear")
8333 (synopsis
8334 "Flake8 plugin for finding likely bugs and design problems in your program")
8335 (description
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)))
8340
8341 (define-public python-flake8-polyfill
8342 (package
8343 (name "python-flake8-polyfill")
8344 (version "1.0.2")
8345 (source
8346 (origin
8347 (method url-fetch)
8348 (uri (pypi-uri "flake8-polyfill" version))
8349 (sha256
8350 (base32
8351 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8352 (build-system python-build-system)
8353 (arguments
8354 '(#:phases
8355 (modify-phases %standard-phases
8356 (replace 'check
8357 (lambda _
8358 ;; Be compatible with Pytest 4:
8359 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8360 (substitute* "setup.cfg"
8361 (("\\[pytest\\]")
8362 "[tool:pytest]"))
8363
8364 (setenv "PYTHONPATH"
8365 (string-append (getcwd) "/build/lib:"
8366 (getenv "PYTHONPATH")))
8367 (invoke "py.test" "-v"))))))
8368 (native-inputs
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")
8376 (description
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)))
8380
8381 (define-public python2-flake8-polyfill
8382 (package-with-python2 python-flake8-polyfill))
8383
8384 (define-public python-flake8-pyi
8385 (package
8386 (name "python-flake8-pyi")
8387 (version "20.5.0")
8388 (source
8389 (origin
8390 (method url-fetch)
8391 (uri (pypi-uri "flake8-pyi" version))
8392 (sha256
8393 (base32
8394 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8395 (build-system python-build-system)
8396 (propagated-inputs
8397 `(("python-attrs" ,python-attrs)
8398 ("python-flake8" ,python-flake8)
8399 ("python-pyflakes" ,python-pyflakes)))
8400 (home-page "https://github.com/ambv/flake8-pyi")
8401 (synopsis
8402 "Flake8 plugin that provides specializations for type hinting stub files")
8403 (description
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)))
8413
8414 (define-public python-flake8-pie
8415 (package
8416 (name "python-flake8-pie")
8417 (version "0.5.0")
8418 (source
8419 (origin
8420 (method url-fetch)
8421 (uri (pypi-uri "flake8-pie" version))
8422 (sha256
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")
8427 (description
8428 "This package provides a flake8 extension that implements miscellaneous
8429 lints.")
8430 (license license:bsd-2)))
8431
8432 (define-public python-autoflake
8433 (package
8434 (name "python-autoflake")
8435 (version "1.3.1")
8436 (source
8437 (origin
8438 (method url-fetch)
8439 (uri (pypi-uri "autoflake" version))
8440 (sha256
8441 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8442 (build-system python-build-system)
8443 (propagated-inputs
8444 `(("python-pyflakes" ,python-pyflakes)))
8445 (home-page "https://github.com/myint/autoflake")
8446 (synopsis "Removes unused imports and unused variables")
8447 (description
8448 "@code{autoflake} removes unused imports and unused variables from Python
8449 code as reported by @code{pyflakes}.
8450
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)))
8455
8456 (define-public python-mistune
8457 (package
8458 (name "python-mistune")
8459 (version "0.8.4")
8460 (source
8461 (origin
8462 (method url-fetch)
8463 (uri (pypi-uri "mistune" version))
8464 (sha256
8465 (base32
8466 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8467 (build-system python-build-system)
8468 (native-inputs
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
8474 Python.")
8475 (license license:bsd-3)))
8476
8477 (define-public python2-mistune
8478 (package-with-python2 python-mistune))
8479
8480 (define-public python-markdown
8481 (package
8482 (name "python-markdown")
8483 (version "3.2.1")
8484 (source
8485 (origin
8486 (method url-fetch)
8487 (uri (pypi-uri "Markdown" version))
8488 (sha256
8489 (base32
8490 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8491 (build-system python-build-system)
8492 (native-inputs
8493 `(("python-nose" ,python-nose)
8494 ("python-pyyaml" ,python-pyyaml)))
8495 (home-page "https://python-markdown.github.io/")
8496 (synopsis "Python implementation of Markdown")
8497 (description
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)))
8504
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))))
8508 (package/inherit
8509 base
8510 (version "3.1.1")
8511 (source (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "Markdown" version))
8514 (sha256
8515 (base32
8516 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8517
8518 (define-public python-ptyprocess
8519 (package
8520 (name "python-ptyprocess")
8521 (version "0.5.2")
8522 (source
8523 (origin
8524 (method url-fetch)
8525 (uri (pypi-uri "ptyprocess" version))
8526 (sha256
8527 (base32
8528 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8529 (build-system python-build-system)
8530 (native-inputs
8531 `(("python-nose" ,python-nose)))
8532 (arguments
8533 `(#:phases
8534 (modify-phases %standard-phases
8535 (replace 'check
8536 (lambda _ (invoke "nosetests"))))))
8537 (home-page "https://github.com/pexpect/ptyprocess")
8538 (synopsis "Run a subprocess in a pseudo terminal")
8539 (description
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)))
8543
8544 (define-public python2-ptyprocess
8545 (package-with-python2 python-ptyprocess))
8546
8547 (define-public python-cram
8548 (package
8549 (name "python-cram")
8550 (version "0.7")
8551 (home-page "https://bitheap.org/cram/")
8552 (source (origin
8553 (method url-fetch)
8554 (uri (list (string-append home-page "cram-"
8555 version ".tar.gz")
8556 (pypi-uri "cram" version)))
8557 (sha256
8558 (base32
8559 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8560 (arguments
8561 '(#:phases
8562 (modify-phases %standard-phases
8563 (add-after 'unpack 'patch-source
8564 (lambda _
8565 (substitute* (find-files "cram" ".*\\.py$")
8566 ;; Replace default shell path.
8567 (("/bin/sh") (which "sh")))
8568 (substitute* (find-files "tests" ".*\\.t$")
8569 (("md5") "md5sum")
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'"))
8580
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")
8585 "--fail-under=90"))
8586
8587 #t))
8588 (replace 'check
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)
8596 (native-inputs
8597 `(("python-coverage" ,python-coverage)
8598 ("which" ,which)))
8599 (synopsis "Simple testing framework for command line applications")
8600 (description
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
8604 output.")
8605 (license license:gpl2+)))
8606
8607 (define-public python2-cram
8608 (package-with-python2 python-cram))
8609
8610 (define-public python-crashtest
8611 (package
8612 (name "python-crashtest")
8613 (version "0.3.1")
8614 (source
8615 (origin
8616 (method url-fetch)
8617 (uri (pypi-uri "crashtest" version))
8618 (sha256
8619 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8620 (build-system python-build-system)
8621 (home-page "https://github.com/sdispater/crashtest")
8622 (synopsis "Manage Python errors with ease")
8623 (description
8624 "Python library that makes exceptions handling and inspection easier.")
8625 (license license:expat)))
8626
8627 (define-public python-straight-plugin
8628 (package
8629 (name "python-straight-plugin")
8630 (version "1.4.1")
8631 (source
8632 (origin
8633 (method url-fetch)
8634 (uri (pypi-uri "straight.plugin" version))
8635 (sha256
8636 (base32
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)))
8645
8646 (define-public python2-straight-plugin
8647 (package-with-python2 python-straight-plugin))
8648
8649 (define-public python-fonttools
8650 (package
8651 (name "python-fonttools")
8652 (version "4.6.0")
8653 (source (origin
8654 (method url-fetch)
8655 (uri (pypi-uri "fonttools" version ".zip"))
8656 (sha256
8657 (base32
8658 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8659 (build-system python-build-system)
8660 (native-inputs
8661 `(("unzip" ,unzip)
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")
8666 (description
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)))
8673
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))))
8677 (package/inherit
8678 base
8679 (version "3.44.0")
8680 (source (origin
8681 (method url-fetch)
8682 (uri (pypi-uri "fonttools" version ".zip"))
8683 (sha256
8684 (base32
8685 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8686
8687 (define-public python-ly
8688 (package
8689 (name "python-ly")
8690 (version "0.9.5")
8691 (source
8692 (origin
8693 (method url-fetch)
8694 (uri (pypi-uri name version))
8695 (sha256
8696 (base32
8697 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8698 (build-system python-build-system)
8699 (arguments
8700 ;; FIXME: Some tests need network access.
8701 '(#:tests? #f))
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+)))
8708
8709 (define-public python-appdirs
8710 (package
8711 (name "python-appdirs")
8712 (version "1.4.3")
8713 (source
8714 (origin
8715 (method url-fetch)
8716 (uri (pypi-uri "appdirs" version))
8717 (sha256
8718 (base32
8719 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8720 (build-system python-build-system)
8721 (home-page "https://github.com/ActiveState/appdirs")
8722 (synopsis
8723 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8724 (description
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)))
8728
8729 (define-public python2-appdirs
8730 (package-with-python2 python-appdirs))
8731
8732 (define-public python-llfuse
8733 (package
8734 (name "python-llfuse")
8735 (version "1.3.6")
8736 (source (origin
8737 (method url-fetch)
8738 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8739 (sha256
8740 (base32
8741 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8742 (build-system python-build-system)
8743 (inputs
8744 `(("fuse" ,fuse)
8745 ("attr" ,attr)))
8746 (native-inputs
8747 `(("pkg-config" ,pkg-config)))
8748 (synopsis "Python bindings for FUSE")
8749 (description
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))))))
8754
8755 (define-public python2-llfuse
8756 (package (inherit (package-with-python2
8757 (strip-python2-variant python-llfuse)))
8758 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8759
8760 ;; For attic-0.16
8761 (define-public python-llfuse-0.41
8762 (package (inherit python-llfuse)
8763 (version "0.41.1")
8764 (source (origin
8765 (method url-fetch)
8766 (uri (string-append
8767 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8768 "llfuse-" version ".tar.bz2"))
8769 (sha256
8770 (base32
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+))))
8775
8776 (define-public python-msgpack
8777 (package
8778 (name "python-msgpack")
8779 (version "1.0.0")
8780 (source (origin
8781 (method url-fetch)
8782 (uri (pypi-uri "msgpack" version))
8783 (sha256
8784 (base32
8785 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8786 (build-system python-build-system)
8787 (arguments
8788 `(#:modules ((guix build utils)
8789 (guix build python-build-system)
8790 (ice-9 ftw)
8791 (srfi srfi-1)
8792 (srfi srfi-26))
8793 #:phases
8794 (modify-phases %standard-phases
8795 (replace 'check
8796 (lambda _
8797 (let ((cwd (getcwd)))
8798 (setenv "PYTHONPATH"
8799 (string-append cwd "/build/"
8800 (find (cut string-prefix? "lib" <>)
8801 (scandir (string-append cwd "/build")))
8802 ":"
8803 (getenv "PYTHONPATH")))
8804 (invoke "pytest" "-v" "test")))))))
8805 (native-inputs
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)))
8813
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
8818 (package
8819 (inherit python-msgpack)
8820 (name "python-msgpack-transitional")
8821 (version "0.5.6")
8822 (source (origin
8823 (method url-fetch)
8824 (uri (pypi-uri "msgpack" version))
8825 (sha256
8826 (base32
8827 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8828 (arguments
8829 (substitute-keyword-arguments (package-arguments python-msgpack)
8830 ((#:phases phases)
8831 `(modify-phases ,phases
8832 (add-after 'unpack 'configure-transitional
8833 (lambda _
8834 ;; Keep using the old name.
8835 (substitute* "setup.py"
8836 (("TRANSITIONAL = False")
8837 "TRANSITIONAL = 1"))
8838 #t))))))))
8839
8840 (define-public python2-msgpack
8841 (package-with-python2 python-msgpack))
8842
8843 (define-public python-netaddr
8844 (package
8845 (name "python-netaddr")
8846 (version "0.7.19")
8847 (source
8848 (origin
8849 (method url-fetch)
8850 (uri (pypi-uri "netaddr" version))
8851 (sha256
8852 (base32
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")
8858 (description
8859 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8860 and MAC network addresses.")
8861 (license license:bsd-3)))
8862
8863 (define-public python2-netaddr
8864 (package-with-python2 python-netaddr))
8865
8866 (define-public python2-pyroute2
8867 (package
8868 (name "python2-pyroute2")
8869 (version "0.5.6")
8870 (source
8871 (origin
8872 (method url-fetch)
8873 (uri (pypi-uri "pyroute2" version))
8874 (sha256
8875 (base32
8876 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8877 (build-system python-build-system)
8878 (arguments
8879 `(#:python ,python-2)) ;Python 3.x is not supported
8880 (home-page "https://github.com/svinota/pyroute2")
8881 (synopsis "Python netlink library")
8882 (description
8883 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8884 Supported netlink families and protocols include:
8885 @itemize
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
8891 @itemize
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
8897 @end itemize
8898 @end itemize")
8899 (license license:gpl2+)))
8900
8901 (define-public python-wrapt
8902 (package
8903 (name "python-wrapt")
8904 (version "1.11.2")
8905 (source
8906 (origin
8907 (method url-fetch)
8908 (uri (pypi-uri "wrapt" version))
8909 (sha256
8910 (base32
8911 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8912 (build-system python-build-system)
8913 (arguments
8914 ;; Tests are not included in the tarball, they are only available in the
8915 ;; git repository.
8916 `(#:tests? #f))
8917 (home-page "https://github.com/GrahamDumpleton/wrapt")
8918 (synopsis "Module for decorators, wrappers and monkey patching")
8919 (description
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)))
8924
8925 (define-public python2-wrapt
8926 (package-with-python2 python-wrapt))
8927
8928 (define-public python-xlrd
8929 (package
8930 (name "python-xlrd")
8931 (version "1.2.0")
8932 (source (origin
8933 (method url-fetch)
8934 (uri (pypi-uri "xlrd" version))
8935 (sha256
8936 (base32
8937 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8938 (build-system python-build-system)
8939 (arguments
8940 `(#:phases
8941 (modify-phases %standard-phases
8942 ;; Some tests depend on writing a temporary file to the user's home
8943 ;; directory.
8944 (add-after 'unpack 'fix-tests
8945 (lambda _
8946 (delete-file "tests/test_open_workbook.py")
8947 #t)))))
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)))
8955
8956 (define-public python2-xlrd
8957 (package-with-python2 python-xlrd))
8958
8959 (define-public python-immutables
8960 (package
8961 (name "python-immutables")
8962 (version "0.14")
8963 (source
8964 (origin
8965 (method url-fetch)
8966 (uri (pypi-uri "immutables" version))
8967 (sha256
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")
8972 (description
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)))
8977
8978 (define-public python-prettytable
8979 (package
8980 (name "python-prettytable")
8981 (version "0.7.2")
8982 (source
8983 (origin
8984 (method url-fetch)
8985 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8986 (sha256
8987 (base32
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")
8992 (description
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)))
8998
8999 (define-public python2-prettytable
9000 (package-with-python2 python-prettytable))
9001
9002 (define-public python-curio
9003 (package
9004 (name "python-curio")
9005 (version "1.2")
9006 (source
9007 (origin
9008 (method url-fetch)
9009 (uri (pypi-uri "curio" version))
9010 (sha256
9011 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9012 (build-system python-build-system)
9013 (arguments
9014 `(#:phases
9015 (modify-phases %standard-phases
9016 (replace 'check
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"))))))
9022 (native-inputs
9023 `(("python-pytest" ,python-pytest)))
9024 (home-page "https://github.com/dabeaz/curio")
9025 (synopsis "Coroutine-based library for concurrent Python")
9026 (description
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)))
9031
9032 (define-public python-tables
9033 (package
9034 (name "python-tables")
9035 (version "3.6.1")
9036 (source
9037 (origin
9038 (method url-fetch)
9039 (uri (pypi-uri "tables" version))
9040 (sha256
9041 (base32
9042 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9043 (modules '((guix build utils)))
9044 (snippet
9045 '(begin
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$"))
9050 #t))))
9051 (build-system python-build-system)
9052 (arguments
9053 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9054 ;; or "check", so we must override the build and check phases.
9055 #:phases
9056 (modify-phases %standard-phases
9057 (add-after 'unpack 'use-gcc
9058 (lambda _
9059 (substitute* "setup.py"
9060 (("^( +)compiler = new_compiler\\(\\)" line indent)
9061 (string-append line
9062 "\n"
9063 indent
9064 "compiler.set_executables(compiler='gcc',"
9065 "compiler_so='gcc',"
9066 "linker_exe='gcc',"
9067 "linker_so='gcc -shared')")))
9068 #t))
9069 (add-after 'unpack 'disable-tuning
9070 (lambda _
9071 (substitute* "setup.py"
9072 (("cpu_flags = .*")
9073 "cpu_flags = ['sse2']\n"))
9074 #t))
9075 (replace 'build
9076 (lambda* (#:key inputs #:allow-other-keys)
9077 (invoke "python" "setup.py" "build"
9078 (string-append "--hdf5="
9079 (assoc-ref inputs "hdf5")))))
9080 (replace 'check
9081 (lambda* (#:key inputs #:allow-other-keys)
9082 (invoke "python" "setup.py" "check"
9083 (string-append "--hdf5="
9084 (assoc-ref inputs "hdf5"))))))))
9085 (propagated-inputs
9086 `(("python-numexpr" ,python-numexpr)
9087 ("python-numpy" ,python-numpy)))
9088 (native-inputs
9089 `(("python-cython" ,python-cython)
9090 ("pkg-config" ,pkg-config)))
9091 (inputs
9092 `(("hdf5" ,hdf5-1.10)
9093 ("bzip2" ,bzip2)
9094 ("zlib" ,zlib)))
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)))
9100
9101 (define-public python2-tables
9102 (package-with-python2 python-tables))
9103
9104 (define-public python-sniffio
9105 (package
9106 (name "python-sniffio")
9107 (version "1.1.0")
9108 (source
9109 (origin
9110 (method url-fetch)
9111 (uri (pypi-uri "sniffio" version))
9112 (sha256
9113 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9114 (build-system python-build-system)
9115 (arguments
9116 `(#:phases
9117 (modify-phases %standard-phases
9118 (replace 'check
9119 (lambda _
9120 (invoke "pytest" "-vv"))))))
9121 (native-inputs
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
9129 asyncio.")
9130 ;; Either license applies.
9131 (license (list license:expat license:asl2.0))))
9132
9133 (define-public python-pytest-black
9134 (package
9135 (name "python-pytest-black")
9136 (version "0.3.8")
9137 (source
9138 (origin
9139 (method url-fetch)
9140 (uri (pypi-uri "pytest-black" version))
9141 (sha256
9142 (base32
9143 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9144 (build-system python-build-system)
9145 (propagated-inputs
9146 `(("python-pytest" ,python-pytest)
9147 ("python-black" ,python-black)
9148 ("python-toml" ,python-toml)))
9149 (native-inputs
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")
9153 (description
9154 "This package provides a pytest plugin to enable format checking with the
9155 Python code formatter \"black\".")
9156 (license license:expat)))
9157
9158 (define-public python-get-version
9159 (package
9160 (name "python-get-version")
9161 (version "2.1")
9162 (source
9163 (origin
9164 (method url-fetch)
9165 (uri (pypi-uri "get_version" version))
9166 (sha256
9167 (base32
9168 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9169 (build-system python-build-system)
9170 (propagated-inputs
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")
9179 (description
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+)))
9186
9187 (define-public python-legacy-api-wrap
9188 (package
9189 (name "python-legacy-api-wrap")
9190 (version "1.2")
9191 (source
9192 (origin
9193 (method url-fetch)
9194 (uri (pypi-uri "legacy-api-wrap" version))
9195 (sha256
9196 (base32
9197 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9198 (build-system python-build-system)
9199 (propagated-inputs
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+)))
9210
9211 (define-public python-pyasn1
9212 (package
9213 (name "python-pyasn1")
9214 (version "0.4.8")
9215 (source
9216 (origin
9217 (method url-fetch)
9218 (uri (pypi-uri "pyasn1" version))
9219 (sha256
9220 (base32
9221 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9222 (build-system python-build-system)
9223 (home-page "http://pyasn1.sourceforge.net/")
9224 (synopsis "ASN.1 types and codecs")
9225 (description
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)))
9229
9230 (define-public python2-pyasn1
9231 (package-with-python2 python-pyasn1))
9232
9233 (define-public python-pyasn1-modules
9234 (package
9235 (name "python-pyasn1-modules")
9236 (version "0.2.2")
9237 (source
9238 (origin
9239 (method url-fetch)
9240 (uri (pypi-uri "pyasn1-modules" version))
9241 (sha256
9242 (base32
9243 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9244 (build-system python-build-system)
9245 (propagated-inputs
9246 `(("python-pyasn1" ,python-pyasn1)))
9247 (home-page "https://sourceforge.net/projects/pyasn1/")
9248 (synopsis "ASN.1 codec implementations")
9249 (description
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)))
9253
9254 (define-public python2-pyasn1-modules
9255 (package-with-python2 python-pyasn1-modules))
9256
9257 (define-public python-ipaddress
9258 (package
9259 (name "python-ipaddress")
9260 (version "1.0.22")
9261 (source (origin
9262 (method url-fetch)
9263 (uri (pypi-uri "ipaddress" version))
9264 (sha256
9265 (base32
9266 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9267 (build-system python-build-system)
9268 (home-page "https://github.com/phihag/ipaddress")
9269 (synopsis "IP address manipulation library")
9270 (description
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)))
9276
9277 (define-public python2-ipaddress
9278 (package-with-python2 python-ipaddress))
9279
9280 (define-public python2-ipaddr
9281 (package
9282 (name "python2-ipaddr")
9283 (version "2.1.11")
9284 (source
9285 (origin
9286 (method url-fetch)
9287 (uri (pypi-uri "ipaddr" version))
9288 (sha256
9289 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9290 (build-system python-build-system)
9291 (arguments
9292 `(#:python ,python-2 ;version 2 only
9293 #:phases
9294 (modify-phases %standard-phases
9295 (replace 'check
9296 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9297 (home-page "https://github.com/google/ipaddr-py")
9298 (synopsis "IP address manipulation library")
9299 (description
9300 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9301 IPv6 addresses and networks.
9302
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)))
9307
9308 (define-public python-idna
9309 (package
9310 (name "python-idna")
9311 (version "2.10")
9312 (source
9313 (origin
9314 (method url-fetch)
9315 (uri (pypi-uri "idna" version))
9316 (sha256
9317 (base32
9318 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9319 (build-system python-build-system)
9320 (home-page "https://github.com/kjd/idna")
9321 (synopsis "Internationalized domain names in applications")
9322 (description
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
9329 specification.")
9330 (license license:bsd-4)))
9331
9332 (define-public python-idna-2.7
9333 (package (inherit python-idna)
9334 (version "2.7")
9335 (source (origin
9336 (method url-fetch)
9337 (uri (pypi-uri "idna" version))
9338 (sha256
9339 (base32
9340 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9341
9342
9343 (define-public python2-idna
9344 (package-with-python2 python-idna))
9345
9346 (define-public python-libsass
9347 (package
9348 (name "python-libsass")
9349 (version "0.20.1")
9350 (source
9351 (origin
9352 ;; PyPI tarball is missing some test files.
9353 (method git-fetch)
9354 (uri (git-reference
9355 (url "https://github.com/sass/libsass-python")
9356 (commit version)))
9357 (file-name (git-file-name name version))
9358 (sha256
9359 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9360 (build-system python-build-system)
9361 (arguments
9362 `(#:phases
9363 (modify-phases %standard-phases
9364 ;; Use Guix package of libsass instead of compiling from a checkout.
9365 (add-before 'build 'set-libsass
9366 (lambda _
9367 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9368 #t))
9369 (replace 'check
9370 (lambda* (#:key inputs outputs #:allow-other-keys)
9371 (add-installed-pythonpath inputs outputs)
9372 (invoke "pytest" "sasstests.py"))))))
9373 (native-inputs
9374 `(("python-pytest" ,python-pytest)
9375 ("python-werkzeug" ,python-werkzeug)))
9376 (inputs
9377 `(("libsass" ,libsass)))
9378 (propagated-inputs
9379 `(("python-six" ,python-six)))
9380 (home-page "https://sass.github.io/libsass-python/")
9381 (synopsis "Straightforward binding of libsass for Python")
9382 (description
9383 "This package provides a simple Python extension module @code{sass} which
9384 is binding LibSass.")
9385 (license license:expat)))
9386
9387 (define-public python-idna-ssl
9388 (package
9389 (name "python-idna-ssl")
9390 (version "1.0.1")
9391 (source
9392 (origin
9393 (method url-fetch)
9394 (uri (pypi-uri "idna-ssl" version))
9395 (sha256
9396 (base32
9397 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9398 (build-system python-build-system)
9399 (arguments
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)
9404 domains support.")
9405 (license license:expat)))
9406
9407 (define-public python-pretend
9408 (package
9409 (name "python-pretend")
9410 (version "1.0.9")
9411 (source
9412 (origin
9413 (method url-fetch)
9414 (uri (pypi-uri "pretend" version))
9415 (sha256
9416 (base32
9417 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9418 (build-system python-build-system)
9419 (home-page "https://github.com/alex/pretend")
9420 (synopsis "Library for stubbing in Python")
9421 (description
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)))
9427
9428 (define-public python2-pretend
9429 (package-with-python2 python-pretend))
9430
9431 (define-public python-pip
9432 (package
9433 (name "python-pip")
9434 (version "20.0.2")
9435 (source
9436 (origin
9437 (method url-fetch)
9438 (uri (pypi-uri "pip" version))
9439 (sha256
9440 (base32
9441 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9442 (build-system python-build-system)
9443 (arguments
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")
9447 (description
9448 "Pip is a package manager for Python software, that finds packages on the
9449 Python Package Index (PyPI).")
9450 (license license:expat)))
9451
9452 (define-public python2-pip
9453 (package-with-python2 python-pip))
9454
9455 (define-public python-tlsh
9456 (package
9457 (name "python-tlsh")
9458 (version "3.4.5")
9459 (home-page "https://github.com/trendmicro/tlsh")
9460 (source
9461 (origin
9462 (method git-fetch)
9463 (uri (git-reference
9464 (url "https://github.com/trendmicro/tlsh")
9465 (commit (string-append "v" version))))
9466 (file-name (git-file-name name version))
9467 (sha256
9468 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9469 (build-system cmake-build-system)
9470 (arguments
9471 '(#:out-of-source? #f
9472 #:phases (modify-phases %standard-phases
9473 (replace
9474 'install
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")
9485 (description
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
9492 a hash value.")
9493 (license license:asl2.0)))
9494
9495 (define-public python2-tlsh
9496 (package
9497 (inherit python-tlsh)
9498 (name "python2-tlsh")
9499 (inputs `(("python" ,python-2)))))
9500
9501 (define-public python-termcolor
9502 (package
9503 (name "python-termcolor")
9504 (version "1.1.0")
9505 (source
9506 (origin
9507 (method url-fetch)
9508 (uri (pypi-uri "termcolor" version))
9509 (sha256
9510 (base32
9511 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9512 (build-system python-build-system)
9513 (arguments
9514 ;; There are no tests.
9515 `(#:tests? #f))
9516 (home-page "https://pypi.org/project/termcolor/")
9517 (synopsis "ANSII Color formatting for terminal output")
9518 (description
9519 "This package provides ANSII Color formatting for output in terminals.")
9520 (license license:expat)))
9521
9522 (define-public python2-termcolor
9523 (package-with-python2 python-termcolor))
9524
9525 (define-public python-terminaltables
9526 (package
9527 (name "python-terminaltables")
9528 (version "3.1.0")
9529 (source
9530 (origin
9531 (method url-fetch)
9532 (uri (pypi-uri "terminaltables" version))
9533 (sha256
9534 (base32
9535 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9536 (build-system python-build-system)
9537 (home-page "https://github.com/Robpol86/terminaltables")
9538 (synopsis
9539 "Generate simple tables in terminals from a nested list of strings")
9540 (description
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)))
9544
9545 (define-public python-libarchive-c
9546 (package
9547 (name "python-libarchive-c")
9548 (version "2.9")
9549 (source (origin
9550 (method url-fetch)
9551 (uri (pypi-uri "libarchive-c" version))
9552 (sha256
9553 (base32
9554 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9555 (build-system python-build-system)
9556 (arguments
9557 '(#:phases (modify-phases %standard-phases
9558 (add-before
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'"))))))
9567 (replace 'check
9568 (lambda _ (invoke "pytest" "-vv"))))))
9569 (native-inputs
9570 `(("python-mock" ,python-mock)
9571 ("python-pytest" ,python-pytest)))
9572 (inputs
9573 `(("libarchive" ,libarchive)))
9574 (home-page "https://github.com/Changaco/python-libarchive-c")
9575 (synopsis "Python interface to libarchive")
9576 (description
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+)))
9581
9582 (define-public python2-libarchive-c
9583 (package-with-python2 python-libarchive-c))
9584
9585 (define-public python-file
9586 (package
9587 (inherit file)
9588 (name "python-file")
9589 (build-system python-build-system)
9590 (arguments
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
9595 (lambda _
9596 (chdir "python")
9597 #t))
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'")))
9604 #t))))))
9605 (inputs `(("file" ,file)))
9606 (native-inputs (if (%current-target-system)
9607 `(("self" ,this-package))
9608 '()))
9609 (synopsis "Python bindings to the libmagic file type guesser")
9610 (description "This package provides Python bindings to the libmagic file
9611 type guesser.
9612
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
9616 libmagic.")))
9617
9618 (define-public python2-file
9619 (package-with-python2 python-file))
9620
9621 (define-public python-debian
9622 (package
9623 (name "python-debian")
9624 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9625 (version "0.1.36")
9626 (source
9627 (origin
9628 ;; Use git-fetch, as pypi doesn't include test suite.
9629 (method git-fetch)
9630 (uri (git-reference
9631 (url home-page)
9632 (commit version)))
9633 (file-name (git-file-name name version))
9634 (sha256
9635 (base32
9636 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9637 (build-system python-build-system)
9638 (arguments
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.
9643 (lambda _
9644 (delete-file "lib/debian/tests/test_deb822.py")
9645 (delete-file "lib/debian/tests/test_debfile.py")
9646 #t)))))
9647 (propagated-inputs
9648 `(("python-six" ,python-six)
9649 ("python-chardet" ,python-chardet)))
9650 (synopsis "Debian package related modules")
9651 (description
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:
9656
9657 @enumerate
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.
9665 @end enumerate\n")
9666
9667 ;; Modules are either GPLv2+ or GPLv3+.
9668 (license license:gpl3+)))
9669
9670 (define-public python-nbformat
9671 (package
9672 (name "python-nbformat")
9673 (version "4.4.0")
9674 (source
9675 (origin
9676 (method url-fetch)
9677 (uri (pypi-uri "nbformat" version))
9678 (sha256
9679 (base32
9680 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9681 (build-system python-build-system)
9682 (arguments `(#:tests? #f)) ; no test target
9683 (propagated-inputs
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)))
9693
9694 (define-public python2-nbformat
9695 (package-with-python2 python-nbformat))
9696
9697 (define-public python-bleach
9698 (package
9699 (name "python-bleach")
9700 (version "3.1.5")
9701 (source
9702 (origin
9703 (method url-fetch)
9704 (uri (pypi-uri "bleach" version))
9705 (sha256
9706 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9707 (build-system python-build-system)
9708 (propagated-inputs
9709 `(("python-webencodings" ,python-webencodings)
9710 ("python-six" ,python-six)))
9711 (native-inputs
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)))
9720
9721 (define-public python2-bleach
9722 (package-with-python2 python-bleach))
9723
9724 (define-public python-entrypoints
9725 (package
9726 (name "python-entrypoints")
9727 (version "0.3")
9728 (source
9729 (origin
9730 (method url-fetch)
9731 (uri (pypi-uri "entrypoints" version))
9732 (sha256
9733 (base32
9734 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9735 (build-system python-build-system)
9736 ;; The package does not come with a setup.py file, so we have to generate
9737 ;; one ourselves.
9738 (arguments
9739 `(#:tests? #f
9740 #:phases
9741 (modify-phases %standard-phases
9742 (add-after 'unpack 'create-setup.py
9743 (lambda _
9744 (call-with-output-file "setup.py"
9745 (lambda (port)
9746 (format port "\
9747 from setuptools import setup
9748 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9749 " ,version))))))))
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)))
9758
9759 (define-public python2-entrypoints
9760 (package-with-python2 python-entrypoints))
9761
9762 (define-public python-epc
9763 (package
9764 (name "python-epc")
9765 (version "0.0.5")
9766 (source
9767 (origin
9768 (method url-fetch)
9769 (uri (pypi-uri "epc" version))
9770 (sha256
9771 (base32
9772 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9773 (build-system python-build-system)
9774 (propagated-inputs
9775 `(("python-sexpdata" ,python-sexpdata)))
9776 (native-inputs
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")
9780 (description
9781 "Python-EPC can call elisp functions from Python and Python functions
9782 from elisp.")
9783 (license license:gpl3)))
9784
9785 (define-public python-forex-python
9786 (package
9787 (name "python-forex-python")
9788 (version "1.5")
9789 (source
9790 (origin
9791 (method url-fetch)
9792 (uri (pypi-uri "forex-python" version))
9793 (sha256
9794 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9795 (build-system python-build-system)
9796 (arguments
9797 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9798 ;; repository require online data.
9799 `(#:tests? #f))
9800 (propagated-inputs
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")
9805 (description
9806 "@code{python-forex-python} can be used to manipulate foreign
9807 exchange rates and to operate currency conversions.
9808
9809 Features:
9810 @itemize
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.
9819 @end itemize")
9820 (license license:expat)))
9821
9822 (define-public python-simpleeval
9823 (package
9824 (name "python-simpleeval")
9825 (version "0.9.10")
9826 (source
9827 (origin
9828 (method url-fetch)
9829 (uri (pypi-uri "simpleeval" version))
9830 (sha256
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")
9835 (description
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
9840 time.")
9841 (license license:expat)))
9842
9843 (define-public python-nbconvert
9844 (package
9845 (name "python-nbconvert")
9846 (version "5.0.0b1")
9847 (source
9848 (origin
9849 (method url-fetch)
9850 (uri (pypi-uri "nbconvert" version))
9851 (sha256
9852 (base32
9853 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9854 (build-system python-build-system)
9855 (arguments
9856 `(;; The "bdist_egg" target is disabled by default, causing the installation
9857 ;; to fail.
9858 #:configure-flags (list "bdist_egg")
9859 ;; FIXME: 5 failures, 40 errors.
9860 #:tests? #f))
9861 ;; #:phases
9862 ;; (modify-phases %standard-phases
9863 ;; (replace 'check
9864 ;; (lambda _
9865 ;; (zero? (system* "py.test" "-v")))))
9866 (native-inputs
9867 `(("python-pytest" ,python-pytest)))
9868 (propagated-inputs
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:
9882
9883 @enumerate
9884 @item HTML
9885 @item LaTeX
9886 @item PDF
9887 @item Reveal JS
9888 @item Markdown (md)
9889 @item ReStructured Text (rst)
9890 @item executable script
9891 @end enumerate\n")
9892 (license license:bsd-3)))
9893
9894 (define-public python2-nbconvert
9895 (package-with-python2 python-nbconvert))
9896
9897 (define-public python-notebook
9898 (package
9899 (name "python-notebook")
9900 (version "5.7.4")
9901 (source (origin
9902 (method url-fetch)
9903 (uri (pypi-uri "notebook" version))
9904 (sha256
9905 (base32
9906 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9907 (build-system python-build-system)
9908 (arguments
9909 `(#:phases
9910 (modify-phases %standard-phases
9911 (replace 'check
9912 (lambda _
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"))
9922 #t)))))
9923 (propagated-inputs
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)))
9930 (native-inputs
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")
9936 (description
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)))
9941
9942 (define-public python2-notebook
9943 (let ((base (package-with-python2
9944 (strip-python2-variant python-notebook))))
9945 (package (inherit base)
9946 (native-inputs
9947 `(("python2-mock" ,python2-mock)
9948 ,@(package-native-inputs base)))
9949 (arguments
9950 (substitute-keyword-arguments (package-arguments base)
9951 ((#:phases phases)
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
9956 ;; immediately.
9957 (lambda _
9958 (substitute*
9959 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9960 (("formats = self.nbconvert_api") "return #")))))))))))
9961
9962 (define-public python-widgetsnbextension
9963 (package
9964 (name "python-widgetsnbextension")
9965 (version "3.5.1")
9966 (source
9967 (origin
9968 (method url-fetch)
9969 (uri (pypi-uri "widgetsnbextension" version))
9970 (sha256
9971 (base32
9972 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9973 (build-system python-build-system)
9974 (propagated-inputs
9975 `(("python-ipykernel" ,python-ipykernel)
9976 ("python-notebook" ,python-notebook)))
9977 (native-inputs
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
9983 notebooks.")
9984 (license license:bsd-3)))
9985
9986 (define-public python2-widgetsnbextension
9987 (package-with-python2 python-widgetsnbextension))
9988
9989 (define-public python-ipywidgets
9990 (package
9991 (name "python-ipywidgets")
9992 (version "7.5.1")
9993 (source
9994 (origin
9995 (method url-fetch)
9996 (uri (pypi-uri "ipywidgets" version))
9997 (sha256
9998 (base32
9999 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10000 (build-system python-build-system)
10001 (propagated-inputs
10002 `(("python-ipython" ,python-ipython)
10003 ("python-traitlets" ,python-traitlets)
10004 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10005 (native-inputs
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
10013 in the data.")
10014 (license license:bsd-3)))
10015
10016 (define-public python2-ipywidgets
10017 (package-with-python2 python-ipywidgets))
10018
10019 (define-public python-jupyter-console
10020 (package
10021 (name "python-jupyter-console")
10022 (version "6.1.0")
10023 (source
10024 (origin
10025 (method url-fetch)
10026 (uri (pypi-uri "jupyter_console" version))
10027 (sha256
10028 (base32
10029 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10030 (build-system python-build-system)
10031 (propagated-inputs
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)))
10036 (native-inputs
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)))
10045
10046 (define-public python2-jupyter-console
10047 (package
10048 (name "python2-jupyter-console")
10049 (version "5.2.0")
10050 (source
10051 (origin
10052 (method url-fetch)
10053 (uri (pypi-uri "jupyter_console" version))
10054 (sha256
10055 (base32
10056 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10057 (build-system python-build-system)
10058 (arguments
10059 `(#:python ,python-2
10060 #:tests? #f)) ; Tests only run in a TTY.
10061 (propagated-inputs
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)))
10066 (native-inputs
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)))
10074
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
10079 (package
10080 (inherit python-jupyter-console)
10081 (name "python-jupyter-console-minimal")
10082 (arguments
10083 (substitute-keyword-arguments
10084 (package-arguments python-jupyter-console)
10085 ((#:phases phases)
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
10091 ;; both present.
10092 (delete-file-recursively
10093 (string-append
10094 (assoc-ref outputs "out") "/bin"))))))))
10095 ;; Remove the python-ipython propagated input, to avoid the cycle
10096 (propagated-inputs
10097 (alist-delete
10098 "python-ipython"
10099 (package-propagated-inputs python-jupyter-console)))))
10100
10101 (define-public python-qtconsole
10102 (package
10103 (name "python-qtconsole")
10104 (version "4.4.3")
10105 (source
10106 (origin
10107 (method url-fetch)
10108 (uri (pypi-uri "qtconsole" version))
10109 (sha256
10110 (base32
10111 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10112 (build-system python-build-system)
10113 (arguments
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
10118 ;; now.
10119 `(#:tests? #f
10120 #:phases
10121 (modify-phases %standard-phases
10122 (add-before 'check 'pre-check
10123 (lambda _
10124 (setenv "QT_QPA_PLATFORM" "offscreen")
10125 #t)))))
10126 (propagated-inputs
10127 `(("python-ipykernel" ,python-ipykernel)
10128 ("python-ipython" ,python-ipython)))
10129 (native-inputs
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)))
10136
10137 (define-public python-jsbeautifier
10138 (package
10139 (name "python-jsbeautifier")
10140 (version "1.10.2")
10141 (home-page "https://github.com/beautify-web/js-beautify")
10142 (source (origin
10143 (method git-fetch)
10144 (uri (git-reference
10145 (url home-page)
10146 (commit (string-append "v" version))))
10147 (file-name (git-file-name name version))
10148 (sha256
10149 (base32
10150 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10151 (build-system python-build-system)
10152 (arguments
10153 `(#:phases (modify-phases %standard-phases
10154 (add-after 'unpack 'chdir
10155 (lambda _
10156 ;; The upstream Git repository contains all the code,
10157 ;; but this package only builds the python code.
10158 (chdir "python")
10159 #t))
10160 (add-after 'unpack 'patch-python-six-requirements
10161 (lambda _
10162 (substitute* "python/setup.py"
10163 (("six>=1.12.0")
10164 "six>=1.11.0"))
10165 #t)))))
10166 (propagated-inputs
10167 `(("python-editorconfig" ,python-editorconfig)
10168 ("python-six" ,python-six)))
10169 (native-inputs
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)))
10175
10176 (define-public jupyter
10177 (package
10178 (name "jupyter")
10179 (version "1.0.0")
10180 (source
10181 (origin
10182 (method url-fetch)
10183 (uri (pypi-uri "jupyter" version))
10184 (sha256
10185 (base32
10186 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10187 (build-system python-build-system)
10188 (arguments '(#:tests? #f)) ; there are none.
10189 (propagated-inputs
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")
10202 (description
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)))
10208
10209 (define-public python-chardet
10210 (package
10211 (name "python-chardet")
10212 (version "3.0.4")
10213 (source
10214 (origin
10215 (method url-fetch)
10216 (uri (pypi-uri "chardet" version))
10217 (sha256
10218 (base32
10219 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10220 (native-inputs
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")
10229 (description
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+)))
10233
10234 (define-public python2-chardet
10235 (package-with-python2 python-chardet))
10236
10237 (define-public python-docopt
10238 (package
10239 (name "python-docopt")
10240 (version "0.6.2")
10241 (source
10242 (origin
10243 (method git-fetch)
10244 ;; The release on PyPI does not include tests.
10245 (uri (git-reference
10246 (url "https://github.com/docopt/docopt")
10247 (commit version)))
10248 (file-name (git-file-name name version))
10249 (sha256
10250 (base32
10251 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10252 (build-system python-build-system)
10253 (native-inputs
10254 `(("python-pytest" ,python-pytest)))
10255 (arguments
10256 `(#:phases
10257 (modify-phases %standard-phases
10258 (replace 'check
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
10265 @code{argparse}.")
10266 (license license:expat)))
10267
10268 (define-public python2-docopt
10269 (package-with-python2 python-docopt))
10270
10271 (define-public python-pythondialog
10272 (package
10273 (name "python-pythondialog")
10274 (version "3.4.0")
10275 (source
10276 (origin
10277 (method url-fetch)
10278 (uri (pypi-uri "pythondialog" version))
10279 (sha256
10280 (base32
10281 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10282 (build-system python-build-system)
10283 (arguments
10284 `(#:phases
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\"")))
10294 #t))))
10295 #:tests? #f)) ; no test suite
10296 (propagated-inputs
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))))))
10305
10306 (define-public python2-pythondialog
10307 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10308 (package
10309 (inherit base)
10310 (version (package-version python-pythondialog))
10311 (source (origin
10312 (method url-fetch)
10313 (uri (pypi-uri "python2-pythondialog" version))
10314 (sha256
10315 (base32
10316 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10317
10318 (define-public python-configobj
10319 (package
10320 (name "python-configobj")
10321 (version "5.0.6")
10322 (source (origin
10323 (method url-fetch)
10324 (uri (pypi-uri "configobj" version))
10325 (sha256
10326 (base32
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)
10332 (propagated-inputs
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
10338 config files.")
10339 (home-page "https://github.com/DiffSK/configobj")
10340 (license license:bsd-3)))
10341
10342 (define-public python2-configobj
10343 (package-with-python2 python-configobj))
10344
10345 (define-public python-configargparse
10346 (package
10347 (name "python-configargparse")
10348 (version "0.14.0")
10349 (source (origin
10350 (method url-fetch)
10351 (uri (pypi-uri "ConfigArgParse" version))
10352 (sha256
10353 (base32
10354 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10355 (build-system python-build-system)
10356 (native-inputs
10357 `(("python-pyyaml" ,python-pyyaml)))
10358 (arguments
10359 `(#:phases
10360 (modify-phases %standard-phases
10361 (replace 'check
10362 (lambda _
10363 ;; Bypass setuptools-shim because one test relies on "setup.py"
10364 ;; being the first argument passed to the python call.
10365 ;;
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)))
10375
10376 (define-public python2-configargparse
10377 (package-with-python2 python-configargparse))
10378
10379 (define-public python-argparse-manpage
10380 (package
10381 (name "python-argparse-manpage")
10382 (version "1.1")
10383 (source
10384 (origin
10385 (method url-fetch)
10386 (uri (pypi-uri "argparse-manpage" version))
10387 (sha256
10388 (base32
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")
10393 (description
10394 "This package provides tools to build manual pages from Python's
10395 @code{ArgumentParser} object.")
10396 (license license:asl2.0)))
10397
10398 (define-public python-contextlib2
10399 (package
10400 (name "python-contextlib2")
10401 (version "0.6.0.post1")
10402 (source
10403 (origin
10404 (method url-fetch)
10405 (uri (pypi-uri "contextlib2" version))
10406 (sha256
10407 (base32
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)))
10419
10420 (define-public python2-contextlib2
10421 (let ((base (package-with-python2
10422 (strip-python2-variant python-contextlib2))))
10423 (package
10424 (inherit base)
10425 (arguments
10426 (substitute-keyword-arguments (package-arguments base)
10427 ((#:phases phases)
10428 `(modify-phases ,phases
10429 (replace 'check
10430 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10431 (native-inputs
10432 `(("python2-unittest2" ,python2-unittest2))))))
10433
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
10437 (hidden-package
10438 (package/inherit
10439 python2-contextlib2
10440 (name "python2-contextlib2-bootstrap")
10441 (arguments
10442 `(#:tests? #f
10443 ,@(package-arguments python2-contextlib2)))
10444 (native-inputs '()))))
10445
10446 (define-public python-texttable
10447 (package
10448 (name "python-texttable")
10449 (version "1.6.2")
10450 (source
10451 (origin
10452 (method url-fetch)
10453 (uri (pypi-uri "texttable" version))
10454 (sha256
10455 (base32
10456 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10457 (build-system python-build-system)
10458 (arguments
10459 `(#:phases
10460 (modify-phases %standard-phases
10461 (replace 'check
10462 (lambda _ (invoke "pytest" "tests.py"))))))
10463 (native-inputs
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
10468 tables.")
10469 (license license:expat)))
10470
10471 (define-public python2-texttable
10472 (package-with-python2 python-texttable))
10473
10474 (define-public python-atomicwrites
10475 (package
10476 (name "python-atomicwrites")
10477 (version "1.3.0")
10478 (source (origin
10479 (method url-fetch)
10480 (uri (pypi-uri "atomicwrites" version))
10481 (sha256
10482 (base32
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)))
10490
10491 (define-public python2-atomicwrites
10492 (package-with-python2 python-atomicwrites))
10493
10494 (define-public python-click-threading
10495 (package
10496 (name "python-click-threading")
10497 (version "0.4.4")
10498 (source (origin
10499 (method url-fetch)
10500 (uri (pypi-uri "click-threading" version))
10501 (sha256
10502 (base32
10503 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10504 (build-system python-build-system)
10505 (propagated-inputs
10506 `(("python-click" ,python-click)))
10507 (synopsis "Utilities for multithreading in Click")
10508 (description "This package provides utilities for multithreading in Click
10509 applications.")
10510 (home-page "https://github.com/click-contrib/click-threading")
10511 (license license:expat)))
10512
10513 (define-public python-click-log
10514 (package
10515 (name "python-click-log")
10516 (version "0.3.2")
10517 (source (origin
10518 (method url-fetch)
10519 (uri (pypi-uri "click-log" version))
10520 (sha256
10521 (base32
10522 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10523 (build-system python-build-system)
10524 (propagated-inputs
10525 `(("python-click" ,python-click)))
10526 (synopsis "Logging for click applications")
10527 (description "This package provides a Python library for logging Click
10528 applications.")
10529 (home-page "https://github.com/click-contrib/click-log")
10530 (license license:expat)))
10531
10532 (define-public python-apipkg
10533 (package
10534 (name "python-apipkg")
10535 (version "1.5")
10536 (source (origin
10537 (method url-fetch)
10538 (uri (pypi-uri "apipkg" version))
10539 (sha256
10540 (base32
10541 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10542 (build-system python-build-system)
10543 (native-inputs
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)))
10552
10553 (define-public python-execnet
10554 (package
10555 (name "python-execnet")
10556 (version "1.4.1")
10557 (source (origin
10558 (method url-fetch)
10559 (uri (pypi-uri "execnet" version))
10560 (sha256
10561 (base32
10562 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10563 (build-system python-build-system)
10564 (arguments
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.
10568 #:tests? #f))
10569 (native-inputs
10570 `(("python-pytest" ,python-pytest)
10571 ("python-setuptools-scm" ,python-setuptools-scm)))
10572 (propagated-inputs
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:
10579 @enumerate
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
10583 @end enumerate")
10584 (home-page "https://codespeak.net/execnet/")
10585 (license license:expat)))
10586
10587 (define-public python2-execnet
10588 (package-with-python2 python-execnet))
10589
10590 (define-public python-icalendar
10591 (package
10592 (name "python-icalendar")
10593 (version "4.0.5")
10594 (source (origin
10595 (method url-fetch)
10596 (uri (pypi-uri "icalendar" version))
10597 (sha256
10598 (base32
10599 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10600 (build-system python-build-system)
10601 (propagated-inputs
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)))
10609
10610 (define-public python-args
10611 (package
10612 (name "python-args")
10613 (version "0.1.0")
10614 (source (origin
10615 (method url-fetch)
10616 (uri (pypi-uri "args" version))
10617 (sha256
10618 (base32
10619 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10620 (build-system python-build-system)
10621 (home-page "https://github.com/kennethreitz/args")
10622 (synopsis "Command-line argument parser")
10623 (description
10624 "This library provides a Python module to parse command-line arguments.")
10625 (license license:bsd-3)))
10626
10627 (define-public python2-args
10628 (package-with-python2 python-args))
10629
10630 (define-public python-clint
10631 (package
10632 (name "python-clint")
10633 (version "0.5.1")
10634 (source (origin
10635 (method url-fetch)
10636 (uri (pypi-uri "clint" version))
10637 (sha256
10638 (base32
10639 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10640 (build-system python-build-system)
10641 (arguments
10642 '(#:phases
10643 (modify-phases %standard-phases
10644 (replace 'check
10645 (lambda _ (invoke "py.test" "-v"))))))
10646 (native-inputs
10647 `(("python-pytest" ,python-pytest)))
10648 (propagated-inputs
10649 `(("python-args" ,python-args)))
10650 (home-page "https://github.com/kennethreitz/clint")
10651 (synopsis "Command-line interface tools")
10652 (description
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)))
10657
10658 (define-public python2-clint
10659 (package-with-python2 python-clint))
10660
10661 (define-public python-rply
10662 (package
10663 (name "python-rply")
10664 (version "0.7.5")
10665 (source (origin
10666 (method url-fetch)
10667 (uri (pypi-uri "rply" version))
10668 (sha256
10669 (base32
10670 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10671 (build-system python-build-system)
10672 (propagated-inputs
10673 `(("python-appdirs" ,python-appdirs)))
10674 (home-page "https://github.com/alex/rply")
10675 (synopsis "Parser generator for Python")
10676 (description
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)))
10681
10682 (define-public python2-rply
10683 (package-with-python2 python-rply))
10684
10685 (define-public python-hy
10686 (package
10687 (name "python-hy")
10688 (version "0.18.0")
10689 (source (origin
10690 (method url-fetch)
10691 (uri (pypi-uri "hy" version))
10692 (sha256
10693 (base32
10694 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10695 (build-system python-build-system)
10696 (arguments
10697 '(#:phases
10698 (modify-phases %standard-phases
10699 (add-before 'install 'set-HOME
10700 (lambda _
10701 (setenv "HOME" "/tmp") #t))
10702 (replace 'check
10703 (lambda _
10704 ;; Tests require write access to HOME.
10705 (setenv "HOME" "/tmp")
10706 (invoke "nosetests"))))))
10707 (native-inputs
10708 `(("python-coverage" ,python-coverage)
10709 ("python-nose" ,python-nose)))
10710 (propagated-inputs
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")
10718 (description
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)))
10723
10724 (define-public python2-functools32
10725 (package
10726 (name "python2-functools32")
10727 (version "3.2.3-2")
10728 (source
10729 (origin
10730 (method url-fetch)
10731 (uri (pypi-uri "functools32" version))
10732 (sha256
10733 (base32
10734 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10735 (build-system python-build-system)
10736 (arguments
10737 `(#:python ,python-2
10738 #:tests? #f)) ; no test target
10739 (home-page "https://github.com/MiCHiLU/python-functools32")
10740 (synopsis
10741 "Backport of the functools module from Python 3.2.3")
10742 (description
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)))
10746
10747 (define-public python2-subprocess32
10748 (package
10749 (name "python2-subprocess32")
10750 (version "3.2.7")
10751 (source (origin
10752 (method url-fetch)
10753 (uri (pypi-uri "subprocess32" version))
10754 (sha256
10755 (base32
10756 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10757 (patches
10758 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10759 (build-system python-build-system)
10760 (arguments
10761 `(#:python ,python-2
10762 ;; The test suite fails with Python > 2.7.13:
10763 ;; import test.support
10764 ;; ImportError: No module named support
10765 #:tests? #f
10766 #:phases
10767 (modify-phases %standard-phases
10768 (add-after 'unpack 'patch-/bin/sh
10769 (lambda _
10770 (substitute* '("subprocess32.py"
10771 "test_subprocess32.py")
10772 (("/bin/sh") (which "sh")))
10773 #t)))))
10774 (home-page "https://github.com/google/python-subprocess32")
10775 (synopsis "Backport of the subprocess module from Python 3.2")
10776 (description
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)))
10783
10784 (define-public python2-futures
10785 (package
10786 (name "python2-futures")
10787 (version "3.2.0")
10788 (source
10789 (origin
10790 (method url-fetch)
10791 (uri (pypi-uri "futures" version))
10792 (sha256
10793 (base32
10794 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10795 (build-system python-build-system)
10796 (arguments
10797 `(#:python ,python-2
10798 #:phases
10799 (modify-phases %standard-phases
10800 (replace 'check
10801 (lambda _
10802 (invoke "python" "test_futures.py")
10803 #t)))))
10804 (home-page "https://github.com/agronholm/pythonfutures")
10805 (synopsis
10806 "Backport of the concurrent.futures package from Python 3.2")
10807 (description
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)))
10812
10813 (define-public python-promise
10814 (package
10815 (name "python-promise")
10816 (version "0.4.2")
10817 (source
10818 (origin
10819 (method url-fetch)
10820 (uri (pypi-uri "promise" version))
10821 (sha256
10822 (base32
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")
10830 (description
10831 "Promises/A+ implementation for Python")
10832 (properties `((python2-variant . ,(delay python2-promise))))
10833 (license license:expat)))
10834
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)))
10841 (native-inputs
10842 `(("python2-futures" ,python2-futures)
10843 ("python2-pytest" ,python2-pytest)
10844 ,@(package-native-inputs promise))))))
10845
10846 (define-public python-progressbar2
10847 (package
10848 (name "python-progressbar2")
10849 (version "3.51.3")
10850 (source
10851 (origin
10852 (method url-fetch)
10853 (uri (pypi-uri "progressbar2" version))
10854 (sha256
10855 (base32
10856 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10857 (build-system python-build-system)
10858 (propagated-inputs
10859 `(("python-six" ,python-six)
10860 ("python-utils" ,python-utils)))
10861 (native-inputs
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")
10873 (description
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)))
10877
10878 (define-public python-progressbar33
10879 (package
10880 (name "python-progressbar33")
10881 (version "2.4")
10882 (source
10883 (origin
10884 (method url-fetch)
10885 (uri (pypi-uri "progressbar33" version))
10886 (sha256
10887 (base32
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")
10892 (description
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))))
10899
10900 (define-public python-colorama
10901 (package
10902 (name "python-colorama")
10903 (version "0.4.3")
10904 (source
10905 (origin
10906 (method url-fetch)
10907 (uri (pypi-uri "colorama" version))
10908 (sha256
10909 (base32
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
10914 text.")
10915 (home-page "https://pypi.org/project/colorama/")
10916 (license license:bsd-3)))
10917
10918 (define-public python2-colorama
10919 (package-with-python2 python-colorama))
10920
10921 (define-public python-rsa
10922 (package
10923 (name "python-rsa")
10924 (version "3.4.2")
10925 (source
10926 (origin
10927 (method url-fetch)
10928 (uri (pypi-uri "rsa" version))
10929 (sha256
10930 (base32
10931 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10932 (build-system python-build-system)
10933 (propagated-inputs
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)))
10942
10943 (define-public python2-rsa
10944 (package-with-python2 python-rsa))
10945
10946 (define-public python-pluggy
10947 (package
10948 (name "python-pluggy")
10949 (version "0.13.1")
10950 (source
10951 (origin
10952 (method url-fetch)
10953 (uri (pypi-uri "pluggy" version))
10954 (sha256
10955 (base32
10956 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
10957 (build-system python-build-system)
10958 (native-inputs
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)))
10966
10967 (define-public python2-pluggy
10968 (let ((base (package-with-python2 (strip-python2-variant
10969 python-pluggy))))
10970 (package/inherit
10971 base
10972 (propagated-inputs
10973 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
10974
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
10979 (hidden-package
10980 (package/inherit
10981 python2-pluggy
10982 (name "python2-pluggy-bootstrap")
10983 (arguments
10984 `(#:tests? #f
10985 ,@(package-arguments python2-pluggy)))
10986 (propagated-inputs
10987 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10988
10989 (define-public python-tox
10990 (package
10991 (name "python-tox")
10992 (version "3.20.0")
10993 (source
10994 (origin
10995 (method url-fetch)
10996 (uri (pypi-uri "tox" version))
10997 (sha256
10998 (base32
10999 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11000 (build-system python-build-system)
11001 (arguments
11002 ;; FIXME: Tests require pytest-timeout, which itself requires
11003 ;; pytest>=2.8.0 for installation.
11004 '(#:tests? #f))
11005 (propagated-inputs
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)))
11013 (native-inputs
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
11023 servers.")
11024 (license license:expat)))
11025
11026 (define-public python2-tox
11027 (package-with-python2 python-tox))
11028
11029 (define-public python-jmespath
11030 (package
11031 (name "python-jmespath")
11032 (version "0.9.4")
11033 (source
11034 (origin
11035 (method url-fetch)
11036 (uri (pypi-uri "jmespath" version))
11037 (sha256
11038 (base32
11039 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11040 (build-system python-build-system)
11041 (native-inputs
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
11046 document.")
11047 (home-page "https://github.com/jmespath/jmespath.py")
11048 (license license:expat)))
11049
11050 (define-public python2-jmespath
11051 (package-with-python2 python-jmespath))
11052
11053 (define-public python-symengine
11054 (package
11055 (name "python-symengine")
11056 (version "0.6.1")
11057 (source
11058 (origin
11059 (method url-fetch)
11060 (uri (pypi-uri "symengine" version))
11061 (sha256
11062 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11063 (build-system python-build-system)
11064 (native-inputs
11065 `(("cmake" ,cmake)
11066 ("python-cython" ,python-cython)))
11067 (inputs
11068 `(("symengine" ,symengine)))
11069 (home-page "https://github.com/symengine/symengine.py")
11070 (synopsis "Python library providing wrappers to SymEngine")
11071 (description
11072 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11073 manipulation library.")
11074 (license license:expat)))
11075
11076 (define-public python-botocore
11077 (package
11078 (name "python-botocore")
11079 (version "1.15.26")
11080 (source
11081 (origin
11082 (method url-fetch)
11083 (uri (pypi-uri "botocore" version))
11084 (sha256
11085 (base32
11086 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
11087 (build-system python-build-system)
11088 (arguments
11089 ;; FIXME: Many tests are failing.
11090 '(#:tests? #f))
11091 (propagated-inputs
11092 `(("python-dateutil" ,python-dateutil)
11093 ("python-docutils" ,python-docutils)
11094 ("python-jmespath" ,python-jmespath)))
11095 (native-inputs
11096 `(("python-mock" ,python-mock)
11097 ("python-nose" ,python-nose)
11098 ("behave" ,behave)
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)))
11107
11108 (define-public python2-botocore
11109 (package-with-python2 python-botocore))
11110
11111 (define-public python-pyfiglet
11112 (package
11113 (name "python-pyfiglet")
11114 (version "0.8.post1")
11115 (source
11116 (origin
11117 (method url-fetch)
11118 (uri (pypi-uri "pyfiglet" version))
11119 (sha256
11120 (base32
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
11126 in pure Python.")
11127 (license license:expat)))
11128
11129 (define-public python-xdo
11130 (package
11131 (name "python-xdo")
11132 (version "0.3")
11133 (source (origin
11134 (method url-fetch)
11135 (uri (string-append
11136 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11137 "python-xdo_" version ".orig.tar.gz"))
11138 (sha256
11139 (base32
11140 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11141 (build-system python-build-system)
11142 (arguments
11143 '(#:phases
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)))
11154 #t))))
11155 #:tests? #f)) ; no tests provided
11156 (propagated-inputs
11157 `(("python-six" ,python-six)))
11158 (inputs
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)))
11167
11168 (define-public python2-xdo
11169 (package-with-python2 python-xdo))
11170
11171 (define-public python-mako
11172 (package
11173 (name "python-mako")
11174 (version "1.1.3")
11175 (source
11176 (origin
11177 (method url-fetch)
11178 (uri (pypi-uri "Mako" version))
11179 (sha256
11180 (base32
11181 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11182 (build-system python-build-system)
11183 (arguments
11184 `(#:phases (modify-phases %standard-phases
11185 (replace 'check
11186 (lambda* (#:key tests? #:allow-other-keys)
11187 (if tests?
11188 (invoke "nosetests" "-v")
11189 (format #t "test suite not run~%"))
11190 #t)))))
11191 (propagated-inputs
11192 `(("python-markupsafe" ,python-markupsafe)))
11193 (native-inputs
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)))
11201
11202 (define-public python2-mako
11203 (package-with-python2 python-mako))
11204
11205 (define-public python-waitress
11206 (package
11207 (name "python-waitress")
11208 (version "1.1.0")
11209 (source
11210 (origin
11211 (method url-fetch)
11212 (uri (pypi-uri "waitress" version))
11213 (patches (search-patches "python-waitress-fix-tests.patch"))
11214 (sha256
11215 (base32
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)))
11223
11224 (define-public python2-waitress
11225 (package-with-python2 python-waitress))
11226
11227 (define-public python-whichcraft
11228 (package
11229 (name "python-whichcraft")
11230 (version "0.6.1")
11231 (source
11232 (origin
11233 (method url-fetch)
11234 (uri (pypi-uri "whichcraft" version))
11235 (sha256
11236 (base32
11237 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11238 (build-system python-build-system)
11239 (native-inputs
11240 `(("python-pytest" ,python-pytest)))
11241 (home-page "https://github.com/pydanny/whichcraft")
11242 (synopsis "Cross-platform cross-python shutil.which functionality")
11243 (description
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)))
11247
11248 (define-public python-cookiecutter
11249 (package
11250 (name "python-cookiecutter")
11251 (version "1.7.2")
11252 (source
11253 (origin
11254 (method url-fetch)
11255 (uri (pypi-uri "cookiecutter" version))
11256 (sha256
11257 (base32
11258 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11259 (build-system python-build-system)
11260 (native-inputs
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)))
11266 (propagated-inputs
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")
11278 (synopsis
11279 "Command-line utility that creates projects from project templates")
11280 (description
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)))
11285
11286 (define-public python-pyquery
11287 (package
11288 (name "python-pyquery")
11289 (version "1.2.17")
11290 (source
11291 (origin
11292 (method url-fetch)
11293 (uri (pypi-uri "pyquery" version))
11294 (sha256
11295 (base32
11296 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11297 (build-system python-build-system)
11298 (native-inputs
11299 `(("python-webob" ,python-webob)
11300 ("python-webtest" ,python-webtest)))
11301 (propagated-inputs
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)))
11310
11311 (define-public python-anyjson
11312 (package
11313 (name "python-anyjson")
11314 (version "0.3.3")
11315 (source
11316 (origin
11317 (method url-fetch)
11318 (uri (pypi-uri "anyjson" version))
11319 (sha256
11320 (base32
11321 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11322 (build-system python-build-system)
11323 (arguments
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.
11330 #:tests? #f))
11331 (home-page "https://bitbucket.org/runeh/anyjson/")
11332 (synopsis
11333 "Wraps best available JSON implementation in a common interface")
11334 (description
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))))))
11339
11340 (define-public python2-anyjson
11341 (let ((anyjson (package-with-python2
11342 (strip-python2-variant python-anyjson))))
11343 (package
11344 (inherit anyjson)
11345 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11346 #:tests? #t
11347 ,@(package-arguments anyjson)))
11348 (native-inputs `(("python2-nose" ,python2-nose))))))
11349
11350 (define-public python-amqp
11351 (package
11352 (name "python-amqp")
11353 (version "2.3.2")
11354 (source
11355 (origin
11356 (method url-fetch)
11357 (uri (pypi-uri "amqp" version))
11358 (sha256
11359 (base32
11360 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11361 (build-system python-build-system)
11362 (native-inputs
11363 `(("python-case" ,python-case)
11364 ("python-pytest-sugar" ,python-pytest-sugar)
11365 ("python-mock" ,python-mock)))
11366 (propagated-inputs
11367 `(("python-vine" ,python-vine)))
11368 (home-page "https://github.com/celery/py-amqp")
11369 (synopsis
11370 "Low-level AMQP client for Python (fork of amqplib)")
11371 (description
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))))))
11377
11378 (define-public python2-amqp
11379 (let ((amqp (package-with-python2
11380 (strip-python2-variant python-amqp))))
11381 (package
11382 (inherit amqp)
11383 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11384 ;; unmaintained. Weirdly, does not do this on the python 3
11385 ;; version?
11386 #:tests? #f
11387 ,@(package-arguments amqp))))))
11388
11389 (define-public python-txamqp
11390 (package
11391 (name "python-txamqp")
11392 (version "0.8.2")
11393 (source
11394 (origin
11395 (method url-fetch)
11396 (uri (pypi-uri "txAMQP" version))
11397 (sha256
11398 (base32
11399 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11400 (build-system python-build-system)
11401 (propagated-inputs
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")
11406 (description
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
11412 applications.")
11413 (license license:asl2.0)))
11414
11415 (define-public python2-txamqp
11416 (package-with-python2 python-txamqp))
11417
11418 (define-public python-kombu
11419 (package
11420 (name "python-kombu")
11421 (version "4.2.2")
11422 (source
11423 (origin
11424 (method url-fetch)
11425 (uri (pypi-uri "kombu" version))
11426 (sha256
11427 (base32
11428 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11429 (build-system python-build-system)
11430 (native-inputs
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)))
11436 (propagated-inputs
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))))))
11450
11451 (define-public python2-kombu
11452 (let ((kombu (package-with-python2
11453 (strip-python2-variant python-kombu))))
11454 (package
11455 (inherit kombu)
11456 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11457 ;; It works fine on the python3 variant.
11458 #:tests? #f
11459 ,@(package-arguments kombu)))
11460 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11461 ,@(package-native-inputs kombu))))))
11462
11463 (define-public python-billiard
11464 (package
11465 (name "python-billiard")
11466 (version "3.5.0.5")
11467 (source
11468 (origin
11469 (method url-fetch)
11470 (uri (pypi-uri "billiard" version))
11471 (sha256
11472 (base32
11473 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11474 (build-system python-build-system)
11475 (native-inputs
11476 `(("python-case" ,python-case)
11477 ("python-pytest" ,python-pytest)))
11478 (home-page "https://github.com/celery/billiard")
11479 (synopsis
11480 "Python multiprocessing fork with improvements and bugfixes")
11481 (description
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))))))
11488
11489 (define-public python2-billiard
11490 (let ((billiard (package-with-python2
11491 (strip-python2-variant python-billiard))))
11492 (package
11493 (inherit billiard)
11494 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11495 ("python2-mock" ,python2-mock)
11496 ,@(package-native-inputs billiard))))))
11497
11498 (define-public python-celery
11499 (package
11500 (name "python-celery")
11501 (version "4.2.1")
11502 (source
11503 (origin
11504 (method url-fetch)
11505 (uri (pypi-uri "celery" version))
11506 (sha256
11507 (base32
11508 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11509 (build-system python-build-system)
11510 (arguments
11511 '(;; TODO The tests fail with Python 3.7
11512 ;; https://github.com/celery/celery/issues/4849
11513 #:tests? #f
11514 #:phases
11515 (modify-phases %standard-phases
11516 (add-after 'unpack 'patch-requirements
11517 (lambda _
11518 (substitute* "requirements/test.txt"
11519 (("pytest>=3\\.0,<3\\.3")
11520 "pytest>=3.0"))
11521 #t)))))
11522 (native-inputs
11523 `(("python-case" ,python-case)
11524 ("python-pytest" ,python-pytest)))
11525 (propagated-inputs
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))))))
11539
11540 (define-public python2-celery
11541 (let ((celery (package-with-python2
11542 (strip-python2-variant python-celery))))
11543 (package
11544 (inherit celery)
11545 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11546 ("python2-mock" ,python2-mock)
11547 ,@(package-native-inputs celery))))))
11548
11549 (define-public python-translitcodec
11550 (package
11551 (name "python-translitcodec")
11552 (version "0.4.0")
11553 (source
11554 (origin
11555 (method url-fetch)
11556 (uri (pypi-uri "translitcodec" version))
11557 (sha256
11558 (base32
11559 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11560 (build-system python-build-system)
11561 (arguments
11562 `(#:tests? #f)) ; no tests provided
11563 (home-page
11564 "https://github.com/claudep/translitcodec")
11565 (synopsis
11566 "Unicode to 8-bit charset transliteration codec")
11567 (description
11568 "This package contains codecs for transliterating ISO 10646 texts into
11569 best-effort representations using smaller coded character sets (ASCII,
11570 ISO 8859, etc.).")
11571 (license license:expat)))
11572
11573 (define-public python2-translitcodec
11574 (package-with-python2 python-translitcodec))
11575
11576 (define-public python-editor
11577 (package
11578 (name "python-editor")
11579 (version "1.0.4")
11580 (source
11581 (origin
11582 (method url-fetch)
11583 (uri (pypi-uri "python-editor" version))
11584 (sha256
11585 (base32
11586 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11587 (build-system python-build-system)
11588 (arguments
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")
11592 (description
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)))
11596
11597 (define-public python2-editor
11598 (package-with-python2 python-editor))
11599
11600 (define-public python-vobject
11601 (package
11602 (name "python-vobject")
11603 (version "0.9.6.1")
11604 (source (origin
11605 (method url-fetch)
11606 (uri (pypi-uri "vobject" version))
11607 (sha256
11608 (base32
11609 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11610 (build-system python-build-system)
11611 (arguments
11612 '(;; The test suite relies on some non-portable Windows interfaces.
11613 #:tests? #f))
11614 (propagated-inputs
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
11622 way.")
11623 (home-page "https://eventable.github.io/vobject/")
11624 (license license:asl2.0)))
11625
11626 (define-public python2-vobject
11627 (package-with-python2 python-vobject))
11628
11629 (define-public python-munkres
11630 (package
11631 (name "python-munkres")
11632 (version "1.0.8")
11633 (source (origin
11634 (method url-fetch)
11635 (uri (pypi-uri "munkres" version))
11636 (sha256
11637 (base32
11638 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11639 (build-system python-build-system)
11640 (arguments
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)))
11648
11649 (define-public python2-munkres
11650 (package-with-python2 python-munkres))
11651
11652 (define-public python-whoosh
11653 (package
11654 (name "python-whoosh")
11655 (version "2.7.4")
11656 (source
11657 (origin
11658 (method url-fetch)
11659 (uri (pypi-uri "Whoosh" version))
11660 (sha256
11661 (base32
11662 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11663 (build-system python-build-system)
11664 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11665 (native-inputs
11666 `(("python-pytest" ,python-pytest)))
11667 (home-page "https://bitbucket.org/mchaput/whoosh")
11668 (synopsis "Full text indexing, search, and spell checking library")
11669 (description
11670 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11671 checking library.")
11672 (license license:bsd-2)))
11673
11674 (define-public python2-whoosh
11675 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11676 (package (inherit whoosh)
11677 (propagated-inputs
11678 `(("python2-backport-ssl-match-hostname"
11679 ,python2-backport-ssl-match-hostname)
11680 ,@(package-propagated-inputs whoosh))))))
11681
11682 (define-public python-pathlib
11683 (package
11684 (name "python-pathlib")
11685 (version "1.0.1")
11686 (source (origin
11687 (method url-fetch)
11688 (uri (pypi-uri "pathlib" version))
11689 (sha256
11690 (base32
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:
11700
11701 @enumerate
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.).
11708 @end enumerate
11709
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
11713 anymore.")
11714 (license license:expat)))
11715
11716 (define-public python2-pathlib
11717 (package-with-python2 python-pathlib))
11718
11719 (define-public python2-pathlib2
11720 (package
11721 (name "python2-pathlib2")
11722 (version "2.3.5")
11723 (source (origin
11724 (method url-fetch)
11725 (uri (pypi-uri "pathlib2" version))
11726 (sha256
11727 (base32
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.
11733 (arguments
11734 `(#:python ,python-2))
11735 (propagated-inputs
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
11740 pathlib module")
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.
11744
11745 Pathlib offers a set of classes to handle file system paths. It offers the
11746 following advantages over using string objects:
11747
11748 @enumerate
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.).
11755 @end enumerate")
11756 (license license:expat)))
11757
11758 (define-public python2-pathlib2-bootstrap
11759 (hidden-package
11760 (package
11761 (inherit python2-pathlib2)
11762 (name "python2-pathlib2-bootstrap")
11763 (propagated-inputs
11764 `(("python2-scandir" ,python2-scandir)
11765 ("python2-six" ,python2-six-bootstrap))))))
11766
11767 (define-public python-jellyfish
11768 (package
11769 (name "python-jellyfish")
11770 (version "0.5.6")
11771 (source (origin
11772 (method url-fetch)
11773 (uri (pypi-uri "jellyfish" version))
11774 (sha256
11775 (base32
11776 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11777 (build-system python-build-system)
11778 (native-inputs
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))))))
11786
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))))))
11793
11794 (define-public python2-unicodecsv
11795 (package
11796 (name "python2-unicodecsv")
11797 (version "0.14.1")
11798 (source (origin
11799 (method git-fetch)
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")
11804 (commit version)))
11805 (file-name (git-file-name name version))
11806 (sha256
11807 (base32
11808 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11809 (build-system python-build-system)
11810 (arguments
11811 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11812 #:python ,python-2))
11813 (native-inputs
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)))
11820
11821 (define-public python-rarfile
11822 (package
11823 (name "python-rarfile")
11824 (version "2.8")
11825 (source (origin
11826 (method url-fetch)
11827 (uri (pypi-uri "rarfile" version))
11828 (sha256
11829 (base32
11830 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11831 (build-system python-build-system)
11832 (arguments
11833 '(#:phases
11834 (modify-phases %standard-phases
11835 (replace 'check
11836 ;; Many tests fail, but the installation proceeds.
11837 (lambda _ (invoke "make" "-C" "test" "test"))))))
11838 (native-inputs
11839 `(("which" ,which))) ; required for tests
11840 (propagated-inputs
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)))
11847
11848 (define-public python2-rarfile
11849 (package-with-python2 python-rarfile))
11850
11851 (define-public python-magic
11852 (package
11853 (name "python-magic")
11854 (version "0.4.15")
11855 (source
11856 (origin
11857 (method url-fetch)
11858 (uri (pypi-uri "python-magic" version))
11859 (sha256
11860 (base32
11861 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11862 (file-name (string-append name "-" version "-checkout"))))
11863 (build-system python-build-system)
11864 (arguments
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
11876 ;; expected.
11877 '(#:tests? #f
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'")))
11891 #t)))
11892 (add-before 'install 'disable-egg-compression
11893 (lambda _
11894 (let ((port (open-file "setup.cfg" "a")))
11895 (display "\n[easy_install]\nzip_ok = 0\n"
11896 port)
11897 (close-port port)
11898 #t))))))
11899 (inputs
11900 ;; python-magic needs to be able to find libmagic.so.
11901 `(("file" ,file)))
11902 (home-page
11903 "https://github.com/ahupp/python-magic")
11904 (synopsis
11905 "File type identification using libmagic")
11906 (description
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)))
11914
11915 (define-public python2-magic
11916 (package-with-python2 python-magic))
11917
11918 (define-public python2-s3cmd
11919 (package
11920 (name "python2-s3cmd")
11921 (version "1.6.1")
11922 (source
11923 (origin
11924 (method url-fetch)
11925 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11926 "s3cmd-" version ".tar.gz"))
11927 (sha256
11928 (base32
11929 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11930 (build-system python-build-system)
11931 (arguments
11932 ;; s3cmd is written for python2 only and contains no tests.
11933 `(#:python ,python-2
11934 #:tests? #f))
11935 (propagated-inputs
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")
11947 (description
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+)))
11954
11955 (define-public python-pkgconfig
11956 (package
11957 (name "python-pkgconfig")
11958 (version "1.3.1")
11959 (source
11960 (origin
11961 (method url-fetch)
11962 (uri (pypi-uri "pkgconfig" version))
11963 (sha256
11964 (base32
11965 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
11966 (build-system python-build-system)
11967 (native-inputs
11968 `(("python-nose" ,python-nose)))
11969 (inputs
11970 `(("pkg-config" ,pkg-config)))
11971 (arguments
11972 `(#:phases
11973 (modify-phases %standard-phases
11974 (add-before 'build 'patch
11975 ;; Hard-code the path to pkg-config.
11976 (lambda _
11977 (substitute* "pkgconfig/pkgconfig.py"
11978 (("cmd = 'pkg-config")
11979 (string-append "cmd = '" (which "pkg-config"))))
11980 #t))
11981 (replace 'check
11982 (lambda _
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)))
11991
11992 (define-public python2-pkgconfig
11993 (package-with-python2 python-pkgconfig))
11994
11995 (define-public python-bz2file
11996 (package
11997 (name "python-bz2file")
11998 (version "0.98")
11999 (source
12000 (origin
12001 (method url-fetch)
12002 (uri (pypi-uri "bz2file" version))
12003 (sha256
12004 (base32
12005 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12006 (build-system python-build-system)
12007 (arguments
12008 `(#:tests? #f)) ; Tests use deprecated python modules.
12009 (home-page "https://github.com/nvawda/bz2file")
12010 (synopsis "Read and write bzip2-compressed files")
12011 (description
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)))
12017
12018 (define-public python2-bz2file
12019 (package-with-python2 python-bz2file))
12020
12021 (define-public python-future
12022 (package
12023 (name "python-future")
12024 (version "0.17.1")
12025 (source
12026 (origin
12027 (method url-fetch)
12028 (uri (pypi-uri "future" version))
12029 (sha256
12030 (base32
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
12035 (arguments
12036 `(#:tests? #f))
12037 (home-page "https://python-future.org")
12038 (synopsis "Single-source support for Python 3 and 2")
12039 (description
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)))
12044
12045 (define-public python2-future
12046 (package-with-python2 python-future))
12047
12048 (define-public python-cysignals
12049 (package
12050 (name "python-cysignals")
12051 (version "1.9.0")
12052 (source
12053 (origin
12054 (method url-fetch)
12055 (uri (pypi-uri "cysignals" version))
12056 (sha256
12057 (base32
12058 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12059 (build-system python-build-system)
12060 (native-inputs
12061 `(("python-cython" ,python-cython)
12062 ("python-sphinx" ,python-sphinx)))
12063 (inputs
12064 `(("pari-gp" ,pari-gp)))
12065 (arguments
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
12071 ;; on a fix.
12072 #:tests? #f
12073 #:phases
12074 (modify-phases %standard-phases
12075 (add-before
12076 'build 'configure
12077 (assoc-ref gnu:%standard-phases 'configure)))))
12078 (home-page
12079 "https://github.com/sagemath/cysignals")
12080 (synopsis
12081 "Handling of interrupts and signals for Cython")
12082 (description
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,
12086 respectively.")
12087 (license license:lgpl3+)))
12088
12089 (define-public python2-cysignals
12090 (package-with-python2 python-cysignals))
12091
12092 (define-public python2-shedskin
12093 (package
12094 (name "python2-shedskin")
12095 (version "0.9.4")
12096 (source
12097 (origin
12098 (method url-fetch)
12099 (uri (string-append "https://github.com/shedskin/shedskin/"
12100 "releases/download/v" version
12101 "/shedskin-" version ".tgz"))
12102 (sha256
12103 (base32
12104 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12105 (build-system python-build-system)
12106 (arguments
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'")))
12122 #t))))))
12123 (inputs `(("pcre" ,pcre)
12124 ("libgc" ,libgc)))
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))))
12130
12131 (define-public python2-rope
12132 (package
12133 (name "python2-rope")
12134 (version "0.11.0")
12135 (source
12136 (origin
12137 (method url-fetch)
12138 (uri (pypi-uri "rope" version))
12139 (sha256
12140 (base32
12141 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12142 (arguments
12143 ;; Rope has only partial python3 support, see `python-rope'
12144 `(#:python ,python-2))
12145 (build-system python-build-system)
12146 (native-inputs
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)))
12155
12156 (define-public python-rope
12157 (package
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>.
12163 #:tests? #f))
12164 (properties `((python2-variant . ,(delay python2-rope))))))
12165
12166 (define-public python-py3status
12167 (package
12168 (name "python-py3status")
12169 (version "3.21")
12170 (source
12171 (origin
12172 (method url-fetch)
12173 (uri (pypi-uri "py3status" version))
12174 (sha256
12175 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12176 (build-system python-build-system)
12177 (inputs
12178 `(("file" ,file)))
12179 (arguments
12180 '(#:phases
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'")))
12190 #t))))
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)))
12198
12199 (define-public python2-selectors2
12200 (package
12201 (name "python2-selectors2")
12202 (version "2.0.1")
12203 (source (origin
12204 (method url-fetch)
12205 (uri (pypi-uri "selectors2" version))
12206 (sha256
12207 (base32
12208 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12209 (build-system python-build-system)
12210 (arguments
12211 `(#:python ,python-2))
12212 (native-inputs
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+")
12217 (description
12218 "This package provides a drop-in replacement for the @code{selectors}
12219 module in Python 3.5 and later.")
12220 (license license:expat)))
12221
12222 (define-public python-tblib
12223 (package
12224 (name "python-tblib")
12225 (version "1.6.0")
12226 (source (origin
12227 (method url-fetch)
12228 (uri (pypi-uri "tblib" version))
12229 (sha256
12230 (base32
12231 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12232 (build-system python-build-system)
12233 (arguments
12234 `(#:phases
12235 (modify-phases %standard-phases
12236 (replace 'check
12237 (lambda _
12238 ;; Upstream runs tests after installation and the package itself
12239 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12240 ;; found.
12241 (setenv "PYTHONPATH"
12242 (string-append (getcwd) "/build/lib:"
12243 (getenv "PYTHONPATH")))
12244 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12245 (native-inputs
12246 `(("python-pytest" ,python-pytest)
12247 ("python-six" ,python-six)))
12248 (home-page "https://github.com/ionelmc/python-tblib")
12249 (synopsis "Traceback serialization library")
12250 (description
12251 "Traceback serialization allows you to:
12252
12253 @enumerate
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).
12257
12258 @item Parse traceback strings and raise with the parsed tracebacks.
12259 @end enumerate\n")
12260 (license license:bsd-3)))
12261
12262 (define-public python2-tblib
12263 (package-with-python2 python-tblib))
12264
12265 (define-public python-greenlet
12266 (package
12267 (name "python-greenlet")
12268 (version "0.4.16")
12269 (source (origin
12270 (method url-fetch)
12271 (uri (pypi-uri "greenlet" version))
12272 (sha256
12273 (base32
12274 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12275 (build-system python-build-system)
12276 (home-page "https://greenlet.readthedocs.io/")
12277 (synopsis "Lightweight in-process concurrent programming")
12278 (description
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))))
12284
12285 (define-public python2-greenlet
12286 (package-with-python2 python-greenlet))
12287
12288 (define-public python-objgraph
12289 (package
12290 (name "python-objgraph")
12291 (version "3.4.1")
12292 (source
12293 (origin
12294 (method url-fetch)
12295 (uri (pypi-uri "objgraph" version))
12296 (sha256
12297 (base32
12298 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12299 (build-system python-build-system)
12300 (propagated-inputs
12301 `(("python-graphviz" ,python-graphviz)))
12302 (native-inputs
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")
12307 (description
12308 "This package provides tools to draw Python object reference graphs with
12309 graphviz.")
12310 (license license:expat)))
12311
12312 (define-public python2-objgraph
12313 (package-with-python2 python-objgraph))
12314
12315 (define-public python-gevent
12316 (package
12317 (name "python-gevent")
12318 (version "20.6.2")
12319 (source (origin
12320 (method url-fetch)
12321 (uri (pypi-uri "gevent" version))
12322 (sha256
12323 (base32
12324 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12325 (modules '((guix build utils)))
12326 (snippet
12327 '(begin
12328 ;; unbunding libev and c-ares
12329 (delete-file-recursively "deps")
12330 #t))))
12331 (build-system python-build-system)
12332 (arguments
12333 `(#:modules ((ice-9 ftw)
12334 (ice-9 match)
12335 (srfi srfi-26)
12336 (guix build utils)
12337 (guix build python-build-system))
12338 #:phases (modify-phases %standard-phases
12339 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12340 (lambda _
12341 (substitute* "src/gevent/subprocess.py"
12342 (("/bin/sh") (which "sh")))
12343 (for-each (lambda (file)
12344 (substitute* file
12345 (("/bin/sh") (which "sh"))
12346 (("/bin/true") (which "true"))))
12347 (find-files "src/greentest" "\\.py$"))
12348 #t))
12349 (add-before 'build 'do-not-use-bundled-sources
12350 (lambda _
12351 (setenv "GEVENTSETUP_EMBED" "0")
12352
12353 ;; Prevent building bundled libev.
12354 (substitute* "setup.py"
12355 (("run_make=_BUILDING")
12356 "run_make=False"))
12357 #t))
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")
12362 "/include")))
12363 (match (scandir greenlet
12364 (lambda (item)
12365 (string-prefix? "python" item)))
12366 ((python)
12367 (setenv "C_INCLUDE_PATH"
12368 (string-append greenlet "/" python ":"
12369 (or (getenv "C_INCLUDE_PATH")
12370 ""))))))
12371 #t))
12372 (add-before 'check 'pretend-to-be-CI
12373 (lambda _
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")
12379 #t))
12380 (add-before 'check 'adjust-tests
12381 (lambda _
12382 (let ((disabled-tests
12383 '(;; These tests rely on networking which is not
12384 ;; available in the build container.
12385 "test_urllib2net.py"
12386 "test__server.py"
12387 "test__server_pywsgi.py"
12388 "test_socket.py"
12389 "test__socket.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"
12396 "test_httplib.py"
12397 "test_https.py"
12398 "test_urllib2_localnet.py"
12399 "test_ssl.py"
12400 "test__ssl.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.
12404 "test_smtpd.py"
12405 "test_wsgiref.py"
12406 "test_urllib2.py"
12407 "test_thread.py"
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"
12419 "test__all__.py"
12420 "test___config.py"
12421 "test__execmodules.py")))
12422 (call-with-output-file "skipped_tests.txt"
12423 (lambda (port)
12424 (format port "~a~%"
12425 (string-join disabled-tests "\n"))))
12426 #t)))
12427 (replace 'check
12428 (lambda _
12429 ;; Make sure the build directory is on PYTHONPATH.
12430 (setenv "PYTHONPATH"
12431 (string-append
12432 (getenv "PYTHONPATH") ":"
12433 (getcwd) "/build/"
12434 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12435
12436 ;; Use the build daemons configured number of workers.
12437 (setenv "NWORKERS" (number->string (parallel-job-count)))
12438
12439 (invoke "python" "-m" "gevent.tests" "--config"
12440 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12441 (propagated-inputs
12442 `(("python-greenlet" ,python-greenlet)
12443 ("python-objgraph" ,python-objgraph)
12444 ("python-zope.event" ,python-zope-event)
12445 ("python-zope.interface" ,python-zope-interface)))
12446 (native-inputs
12447 `(("python-six" ,python-six)
12448
12449 ;; For tests.
12450 ("python-dnspython" ,python-dnspython)
12451 ("python-psutil" ,python-psutil)))
12452 (inputs
12453 `(("c-ares" ,c-ares)
12454 ("libev" ,libev)))
12455 (home-page "http://www.gevent.org/")
12456 (synopsis "Coroutine-based network library")
12457 (description
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))))))
12462
12463 (define-public python2-gevent
12464 (let ((base (package-with-python2
12465 (strip-python2-variant python-gevent))))
12466 (package
12467 (inherit base)
12468 (native-inputs `(,@(package-native-inputs base)
12469 ("python-mock" ,python2-mock)
12470 ("python2-selectors2" ,python2-selectors2))))))
12471
12472 (define-public python-fastimport
12473 (package
12474 (name "python-fastimport")
12475 (version "0.9.8")
12476 (source
12477 (origin
12478 (method url-fetch)
12479 (uri (pypi-uri "fastimport" version))
12480 (sha256
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}
12487 format.")
12488 (license license:gpl2+)))
12489
12490 (define-public python2-fastimport
12491 (package-with-python2 python-fastimport))
12492
12493 (define-public python-twisted
12494 (package
12495 (name "python-twisted")
12496 (version "19.7.0")
12497 (source (origin
12498 (method url-fetch)
12499 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12500 (sha256
12501 (base32
12502 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12503 (build-system python-build-system)
12504 (arguments
12505 '(#:tests? #f)) ; FIXME: some tests fail
12506 (propagated-inputs
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")
12515 (description
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)))
12519
12520 (define-public python2-twisted
12521 (package-with-python2 python-twisted))
12522
12523 (define-public python-pika
12524 (package
12525 (name "python-pika")
12526 (version "0.12.0")
12527 (source
12528 (origin
12529 (method url-fetch)
12530 (uri (pypi-uri "pika" version))
12531 (sha256
12532 (base32
12533 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12534 (build-system python-build-system)
12535 (native-inputs
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")
12541 (description
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)))
12546
12547 (define-public python2-pika
12548 (package-with-python2 python-pika))
12549
12550 (define-public python-ply
12551 (package
12552 (name "python-ply")
12553 (version "3.11")
12554 (source
12555 (origin
12556 (method url-fetch)
12557 (uri (pypi-uri "ply" version))
12558 (sha256
12559 (base32
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)))
12567
12568 (define-public python-tabulate
12569 (package
12570 (name "python-tabulate")
12571 (version "0.8.7")
12572 (source (origin
12573 (method url-fetch)
12574 (uri (pypi-uri "tabulate" version))
12575 (sha256
12576 (base32
12577 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12578 (build-system python-build-system)
12579 (arguments
12580 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12581 ;; and the latest release is not tagged in the upstream repository.
12582 '(#:tests? #f))
12583 (home-page "https://bitbucket.org/astanin/python-tabulate")
12584 (synopsis "Pretty-print tabular data")
12585 (description
12586 "Tabulate is a library and command-line utility to pretty-print tabular
12587 data in Python.")
12588 (license license:expat)))
12589
12590 (define-public python2-tabulate
12591 (package-with-python2 python-tabulate))
12592
12593 (define-public python-kazoo
12594 (package
12595 (name "python-kazoo")
12596 (version "2.4.0")
12597 (source
12598 (origin
12599 (method url-fetch)
12600 (uri (pypi-uri "kazoo" version))
12601 (sha256
12602 (base32
12603 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12604 (build-system python-build-system)
12605 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12606 (propagated-inputs
12607 `(("python-six" ,python-six)))
12608 (home-page "https://kazoo.readthedocs.org")
12609 (synopsis "High-level Zookeeper client library")
12610 (description
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)))
12615
12616 (define-public python2-kazoo
12617 (package-with-python2 python-kazoo))
12618
12619 (define-public python-pykafka
12620 (package
12621 (name "python-pykafka")
12622 (version "2.4.0")
12623 (source (origin
12624 (method url-fetch)
12625 (uri (pypi-uri "pykafka" version))
12626 (sha256
12627 (base32
12628 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12629 (build-system python-build-system)
12630 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12631 (propagated-inputs
12632 `(("python-gevent" ,python-gevent)
12633 ("python-kazoo" ,python-kazoo)
12634 ("python-tabulate" ,python-tabulate)))
12635 (inputs
12636 `(("librdkafka" ,librdkafka)))
12637 (home-page "https://pykafka.readthedocs.io/")
12638 (synopsis "Apache Kafka client for Python")
12639 (description
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)))
12644
12645 (define-public python2-pykafka
12646 (package-with-python2 python-pykafka))
12647
12648 (define-public python-wcwidth
12649 (package
12650 (name "python-wcwidth")
12651 (version "0.1.8")
12652 (source (origin
12653 (method url-fetch)
12654 (uri (pypi-uri "wcwidth" version))
12655 (sha256
12656 (base32
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)))
12667
12668 (define-public python2-wcwidth
12669 (package-with-python2 python-wcwidth))
12670
12671 (define-public python2-jsonrpclib
12672 (package
12673 (name "python2-jsonrpclib")
12674 (version "0.1.7")
12675 (source (origin
12676 (method url-fetch)
12677 (uri (pypi-uri "jsonrpclib" version))
12678 (sha256
12679 (base32
12680 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12681 (build-system python-build-system)
12682 (arguments
12683 `(#:tests? #f
12684 #:python ,python-2))
12685 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12686 (synopsis "Implementation of JSON-RPC specification for Python")
12687 (description
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,
12691 etc.")
12692 (license license:asl2.0)))
12693
12694 (define-public python-chai
12695 (package
12696 (name "python-chai")
12697 (version "1.1.2")
12698 (source (origin
12699 (method url-fetch)
12700 (uri (pypi-uri "chai" version))
12701 (sha256
12702 (base32
12703 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12704 (build-system python-build-system)
12705 (home-page "https://github.com/agoragames/chai")
12706 (synopsis "Mocking framework for Python")
12707 (description
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)))
12711
12712 (define-public python2-chai
12713 (package-with-python2 python-chai))
12714
12715 (define-public python-inflection
12716 (package
12717 (name "python-inflection")
12718 (version "0.3.1")
12719 (source
12720 (origin (method url-fetch)
12721 (uri (pypi-uri "inflection" version))
12722 (sha256
12723 (base32
12724 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12725 (build-system python-build-system)
12726 (native-inputs
12727 `(("python-pytest" ,python-pytest)))
12728 (home-page "https://github.com/jpvanhal/inflection")
12729 (synopsis "Python string transformation library")
12730 (description
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)))
12735
12736 (define-public python2-inflection
12737 (package-with-python2 python-inflection))
12738
12739 (define-public python-pylev
12740 (package
12741 (name "python-pylev")
12742 (version "1.3.0")
12743 (source (origin
12744 (method url-fetch)
12745 (uri (pypi-uri "pylev" version))
12746 (sha256
12747 (base32
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)))
12756
12757 (define-public python2-pylev
12758 (package-with-python2 python-pylev))
12759
12760 (define-public python-cleo
12761 (package
12762 (name "python-cleo")
12763 (version "0.8.1")
12764 (source (origin
12765 (method url-fetch)
12766 (uri (pypi-uri "cleo" version))
12767 (sha256
12768 (base32
12769 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12770 (build-system python-build-system)
12771 (native-inputs
12772 `( ;; For testing
12773 ("python-mock" ,python-mock)
12774 ("python-pytest-mock" ,python-pytest-mock)
12775 ("python-pytest" ,python-pytest)))
12776 (propagated-inputs
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")
12783 (description
12784 "Cleo allows you to create command-line commands with signature in
12785 docstring and colored output.")
12786 (license license:expat)))
12787
12788 (define-public python2-cleo
12789 (package-with-python2 python-cleo))
12790
12791 (define-public python-tomlkit
12792 (package
12793 (name "python-tomlkit")
12794 (version "0.6.0")
12795 (source
12796 (origin
12797 (method url-fetch)
12798 (uri (pypi-uri "tomlkit" version))
12799 (sha256
12800 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12801 (build-system python-build-system)
12802 (native-inputs
12803 `(("python-pytest" ,python-pytest)))
12804 (home-page "https://github.com/sdispater/tomlkit")
12805 (synopsis "Style-preserving TOML library")
12806 (description
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)))
12813
12814 (define-public python-shellingham
12815 (package
12816 (name "python-shellingham")
12817 (version "1.3.2")
12818 (source
12819 (origin
12820 (method url-fetch)
12821 (uri (pypi-uri "shellingham" version))
12822 (sha256
12823 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12824 (build-system python-build-system)
12825 (arguments
12826 `(#:phases
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>
12831 (lambda _
12832 (with-output-to-file "setup.py"
12833 (lambda _
12834 (display "from setuptools import setup\nsetup()\n")))
12835 #t)))))
12836 (home-page "https://github.com/sarugaku/shellingham")
12837 (synopsis "Tool to detect surrounding shell")
12838 (description
12839 "Shellingham detects what shell the current Python executable is
12840 running in.")
12841 (license license:isc)))
12842
12843 (define-public python-memcached
12844 (package
12845 (name "python-memcached")
12846 (version "1.59")
12847 (source
12848 (origin
12849 (method url-fetch)
12850 (uri (pypi-uri "python-memcached" version))
12851 (sha256
12852 (base32
12853 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
12854 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
12855 (build-system python-build-system)
12856 (propagated-inputs `(("python-six" ,python-six)))
12857 (home-page
12858 "https://github.com/linsomniac/python-memcached")
12859 (synopsis "Pure python memcached client")
12860 (description
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)))
12865
12866 (define-public python-clikit
12867 (package
12868 (name "python-clikit")
12869 (version "0.6.2")
12870 (source
12871 (origin
12872 (method url-fetch)
12873 (uri (pypi-uri "clikit" version))
12874 (sha256
12875 (base32
12876 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
12877 (build-system python-build-system)
12878 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
12879 (propagated-inputs
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")
12885 (description
12886 "CliKit is a group of utilities to build testable command line
12887 interfaces.")
12888 (properties `((python2-variant . ,(delay python2-clikit))))
12889 (license license:expat)))
12890
12891 (define-public python2-clikit
12892 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12893 (package/inherit
12894 base
12895 (propagated-inputs
12896 `(("python-enum34" ,python2-enum34)
12897 ("python-typing" ,python2-typing)
12898 ,@(package-propagated-inputs base))))))
12899
12900 (define-public python-msgpack-python
12901 (package
12902 (name "python-msgpack-python")
12903 (version "0.5.6")
12904 (source
12905 (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "msgpack-python" version))
12908 (sha256
12909 (base32
12910 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
12911 (build-system python-build-system)
12912 (home-page "http://msgpack.org/")
12913 (synopsis "Package to deserialize messages in MessagePack binary format")
12914 (description
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)))
12920
12921 (define-public python-cachy
12922 (package
12923 (name "python-cachy")
12924 (version "0.3.0")
12925 (source
12926 (origin
12927 (method url-fetch)
12928 (uri (pypi-uri "cachy" version))
12929 (sha256
12930 (base32
12931 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
12932 (build-system python-build-system)
12933 (arguments
12934 '(#:phases
12935 (modify-phases %standard-phases
12936 (replace 'check
12937 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
12938 "pytest"))))))
12939 (native-inputs
12940 `(("memcached" ,memcached)
12941 ("python-fakeredis" ,python-fakeredis)
12942 ("python-flexmock" ,python-flexmock)
12943 ("python-pifpaf" ,python-pifpaf)
12944 ("python-pytest" ,python-pytest)))
12945 (propagated-inputs
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")
12951 (description
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)))
12956
12957 (define-public poetry
12958 (package
12959 (name "poetry")
12960 (version "1.0.10")
12961 ;; Poetry can only be built from source with Poetry.
12962 (source
12963 (origin
12964 (method url-fetch)
12965 (uri (pypi-uri "poetry" version))
12966 (sha256
12967 (base32
12968 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
12969 (build-system python-build-system)
12970 (arguments
12971 `(#:tests? #f ;; Pypi does not have tests.
12972 #:phases
12973 (modify-phases %standard-phases
12974 (add-before 'build 'patch-setup-py
12975 (lambda _
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"))
12985 #t)))))
12986 (propagated-inputs
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)))
13010
13011 (define-public python-lark-parser
13012 (package
13013 (name "python-lark-parser")
13014 (version "0.9.0")
13015 (source (origin
13016 (method url-fetch)
13017 (uri (pypi-uri "lark-parser" version))
13018 (sha256
13019 (base32
13020 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13021 (build-system python-build-system)
13022 (home-page "https://github.com/lark-parser/lark")
13023 (synopsis "Multi-language parser for Python")
13024 (description
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)))
13030
13031 (define-public python-libcst
13032 (package
13033 (name "python-libcst")
13034 (version "0.3.8")
13035 (source (origin
13036 (method url-fetch)
13037 (uri (pypi-uri "libcst" version))
13038 (sha256
13039 (base32
13040 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13041 (build-system python-build-system)
13042 (arguments
13043 `(#:phases
13044 (modify-phases %standard-phases
13045 (add-after 'unpack 'remove-failing-tests
13046 (lambda _
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")
13054 #t))
13055 (add-before 'check 'generate-test-data
13056 (lambda _
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")))
13060 (replace 'check
13061 (lambda _
13062 (invoke "python" "-m" "unittest")
13063 #t)))))
13064 (native-inputs
13065 `(("python-black" ,python-black)
13066 ("python-isort" ,python-isort)))
13067 (propagated-inputs
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")
13073 (description
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)
13084 license:psfl
13085 ;; libcst/_add_slots.py
13086 license:asl2.0))))
13087
13088 (define-public python-typing-inspect
13089 (package
13090 (name "python-typing-inspect")
13091 (version "0.6.0")
13092 (source (origin
13093 (method url-fetch)
13094 (uri (pypi-uri "typing_inspect" version))
13095 (sha256
13096 (base32
13097 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13098 (build-system python-build-system)
13099 (propagated-inputs
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")
13104 (description
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)))
13108
13109 (define-public python-lazy-object-proxy
13110 (package
13111 (name "python-lazy-object-proxy")
13112 (version "1.5.1")
13113 (source (origin
13114 (method url-fetch)
13115 (uri (pypi-uri "lazy-object-proxy" version))
13116 (sha256
13117 (base32
13118 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13119 (native-inputs
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")
13124 (description
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)))
13128
13129 (define-public python2-lazy-object-proxy
13130 (package-with-python2 python-lazy-object-proxy))
13131
13132 (define-public python-dnspython
13133 (package
13134 (name "python-dnspython")
13135 (version "1.16.0")
13136 (source (origin
13137 (method url-fetch)
13138 (uri (string-append "http://www.dnspython.org/kits/"
13139 version "/dnspython-" version ".tar.gz"))
13140 (sha256
13141 (base32
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")
13147 (description
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)))
13152
13153 (define-public python2-dnspython
13154 (package-with-python2 python-dnspython))
13155
13156 (define-public python-py3dns
13157 (package
13158 (name "python-py3dns")
13159 (version "3.2.1")
13160 (source
13161 (origin
13162 (method url-fetch)
13163 (uri (pypi-uri "py3dns" version))
13164 (sha256
13165 (base32
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".
13170 (arguments
13171 `(#:phases
13172 (modify-phases %standard-phases
13173 (add-after 'unpack 'patch-source
13174 (lambda _
13175 (substitute* "setup.py"
13176 (("import DNS") "")
13177 (("DNS.__version__") (string-append "\"" ,version "\"")))
13178 #t)))
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)))
13186
13187 (define-public python-email-validator
13188 (package
13189 (name "python-email-validator")
13190 (version "1.0.2")
13191 (source
13192 (origin (method url-fetch)
13193 (uri (pypi-uri "email_validator" version))
13194 (sha256
13195 (base32
13196 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13197 (build-system python-build-system)
13198 (arguments
13199 '(#:phases
13200 (modify-phases %standard-phases
13201 (add-before 'build 'use-dnspython
13202 (lambda _
13203 (substitute* "setup.py"
13204 (("dnspython3") "dnspython"))
13205 #t)))))
13206 (propagated-inputs
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")
13211 (description
13212 "This library validates email address syntax and deliverability.")
13213 (license license:cc0)))
13214
13215 (define-public python2-email-validator
13216 (package-with-python2 python-email-validator))
13217
13218 (define-public python-ukpostcodeparser
13219 (package
13220 (name "python-ukpostcodeparser")
13221 (version "1.0.3")
13222 (source (origin
13223 (method url-fetch)
13224 (uri (pypi-uri "UkPostcodeParser" version))
13225 (sha256
13226 (base32
13227 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13228 (build-system python-build-system)
13229 (home-page "https://github.com/hamstah/ukpostcodeparser")
13230 (synopsis "UK Postcode parser for Python")
13231 (description
13232 "This library provides the @code{parse_uk_postcode} function for
13233 parsing UK postcodes.")
13234 (license license:expat)))
13235
13236 (define-public python2-ukpostcodeparser
13237 (package-with-python2 python-ukpostcodeparser))
13238
13239 (define-public python-faker
13240 (package
13241 (name "python-faker")
13242 (version "4.0.2")
13243 (source (origin
13244 (method url-fetch)
13245 (uri (pypi-uri "Faker" version))
13246 (sha256
13247 (base32
13248 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13249 (build-system python-build-system)
13250 (arguments
13251 '(#:phases
13252 (modify-phases %standard-phases
13253 (replace 'check
13254 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13255 (native-inputs
13256 `(;; For testing
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)))
13262 (propagated-inputs
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")
13267 (description
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))))))
13272
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
13276 python-faker))))
13277 (package
13278 (inherit base)
13279 (version "3.0.1")
13280 (source (origin
13281 (method url-fetch)
13282 (uri (pypi-uri "Faker" version))
13283 (sha256
13284 (base32
13285 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13286 (native-inputs
13287 `(("python-mock" ,python2-mock)
13288 ,@(package-native-inputs base)))
13289 (propagated-inputs
13290 `(("python2-ipaddress" ,python2-ipaddress)
13291 ("python2-six" ,python2-six)
13292 ,@(package-propagated-inputs base))))))
13293
13294 (define-public python-pyaml
13295 (package
13296 (name "python-pyaml")
13297 (version "18.11.0")
13298 (source (origin
13299 (method url-fetch)
13300 (uri (pypi-uri "pyaml" version))
13301 (sha256
13302 (base32
13303 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13304 (build-system python-build-system)
13305 (native-inputs
13306 `(("python-unidecode" ,python-unidecode)))
13307 (propagated-inputs
13308 `(("python-pyyaml" ,python-pyyaml)))
13309 (home-page "https://github.com/mk-fg/pretty-yaml")
13310 (synopsis "YAML pretty-print library for Python")
13311 (description
13312 "pyaml is a PyYAML based python module to produce pretty and readable
13313 YAML-serialized data.")
13314 (license license:wtfpl2)))
13315
13316 (define-public python2-pyaml
13317 (package-with-python2 python-pyaml))
13318
13319 (define-public python-backpack
13320 (package
13321 (name "python-backpack")
13322 (version "0.1")
13323 (source
13324 (origin
13325 (method url-fetch)
13326 (uri (pypi-uri "backpack" version))
13327 (sha256
13328 (base32
13329 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13330 (build-system python-build-system)
13331 (native-inputs
13332 `(("python-pytest" ,python-pytest)
13333 ("python-nose" ,python-nose)))
13334 (propagated-inputs
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)))
13341
13342 (define-public python2-backpack
13343 (package-with-python2 python-backpack))
13344
13345 (define-public python-prompt-toolkit
13346 (package
13347 (name "python-prompt-toolkit")
13348 (version "3.0.7")
13349 (source
13350 (origin
13351 (method url-fetch)
13352 (uri (pypi-uri "prompt_toolkit" version))
13353 (sha256
13354 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13355 (build-system python-build-system)
13356 (arguments
13357 `(#:phases
13358 (modify-phases %standard-phases
13359 (delete 'check)
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"))))))
13367 (propagated-inputs
13368 `(("python-wcwidth" ,python-wcwidth)))
13369 (native-inputs
13370 `(("python-pytest" ,python-pytest)))
13371 (home-page
13372 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13373 (synopsis "Library for building command line interfaces in Python")
13374 (description
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))))))
13382
13383 (define-public python-prompt-toolkit-2
13384 (package (inherit python-prompt-toolkit)
13385 (name "python-prompt-toolkit")
13386 (version "2.0.7")
13387 (source
13388 (origin
13389 (method url-fetch)
13390 (uri (pypi-uri "prompt_toolkit" version))
13391 (sha256
13392 (base32
13393 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13394 (propagated-inputs
13395 `(("python-wcwidth" ,python-wcwidth)
13396 ("python-six" ,python-six)
13397 ("python-pygments" ,python-pygments)))
13398 (properties '())))
13399
13400 (define-public python2-prompt-toolkit
13401 (package-with-python2 python-prompt-toolkit-2))
13402
13403 (define-public python-prompt-toolkit-1
13404 (package (inherit python-prompt-toolkit-2)
13405 (version "1.0.15")
13406 (source
13407 (origin
13408 (method url-fetch)
13409 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13410 (sha256
13411 (base32
13412 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13413
13414 (define-public python2-prompt-toolkit-1
13415 (package-with-python2 python-prompt-toolkit-1))
13416
13417 (define-public python-jedi
13418 (package
13419 (name "python-jedi")
13420 (version "0.17.2")
13421 (source
13422 (origin
13423 (method url-fetch)
13424 (uri (pypi-uri "jedi" version))
13425 (sha256
13426 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13427 (build-system python-build-system)
13428 (arguments
13429 `(#:phases
13430 (modify-phases %standard-phases
13431 (replace 'check
13432 (lambda _
13433 (setenv "HOME" "/tmp")
13434 (invoke "python" "-m" "pytest" "-vv"))))))
13435 (native-inputs
13436 `(("python-pytest" ,python-pytest)
13437 ("python-docopt" ,python-docopt)))
13438 (propagated-inputs
13439 `(("python-parso" ,python-parso)))
13440 (home-page "https://github.com/davidhalter/jedi")
13441 (synopsis "Autocompletion and static analysis library for Python")
13442 (description
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.
13446
13447 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13448 well.")
13449 (license license:expat)))
13450
13451 (define-public python2-jedi
13452 (package-with-python2 python-jedi))
13453
13454 (define-public ptpython
13455 (package
13456 (name "ptpython")
13457 (version "3.0.5")
13458 (source (origin
13459 (method url-fetch)
13460 (uri (pypi-uri "ptpython" version))
13461 (sha256
13462 (base32
13463 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13464 (build-system python-build-system)
13465 (arguments
13466 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13467 (propagated-inputs
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")
13474 (description
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
13478 etc.")
13479 (license license:bsd-3)
13480 (properties `((python2-variant . ,(delay ptpython-2))))))
13481
13482 (define-public ptpython-2
13483 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13484 (package
13485 (inherit base)
13486 (name "ptpython2"))))
13487
13488 (define-public python-stem
13489 (package
13490 (name "python-stem")
13491 (version "1.8.0")
13492 (source
13493 (origin
13494 (method url-fetch)
13495 (uri (pypi-uri "stem" version))
13496 (sha256
13497 (base32
13498 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13499 (build-system python-build-system)
13500 (arguments
13501 `(#:phases
13502 (modify-phases %standard-phases
13503 (replace 'check
13504 (lambda _
13505 (invoke "./run_tests.py" "--unit")
13506 #t)))))
13507 (native-inputs
13508 `(("python-mock" ,python-mock)
13509 ("python-pycodestyle" ,python-pycodestyle)
13510 ("python-pyflakes" ,python-pyflakes)))
13511 (home-page "https://stem.torproject.org/")
13512 (synopsis
13513 "Python controller library that allows applications to interact with Tor")
13514 (description
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)))
13519
13520 (define-public python2-stem
13521 (package-with-python2 python-stem))
13522
13523 (define-public python-pyserial
13524 (package
13525 (name "python-pyserial")
13526 (version "3.4")
13527 (source
13528 (origin
13529 (method url-fetch)
13530 (uri (pypi-uri "pyserial" version))
13531 (sha256
13532 (base32
13533 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13534 (build-system python-build-system)
13535 (arguments
13536 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13537 ;; #:phases
13538 ;; (modify-phases %standard-phases
13539 ;; (replace 'check
13540 ;; (lambda _
13541 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13542 (home-page
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)))
13549
13550 (define-public python2-pyserial
13551 (package-with-python2 python-pyserial))
13552
13553 (define-public python-kivy
13554 (package
13555 (name "python-kivy")
13556 (version "1.10.1")
13557 (source
13558 (origin
13559 (method url-fetch)
13560 (uri (pypi-uri "Kivy" version))
13561 (file-name (string-append name "-" version ".tar.gz"))
13562 (sha256
13563 (base32
13564 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13565 (build-system python-build-system)
13566 (arguments
13567 `(#:tests? #f ; Tests require many optional packages
13568 #:phases
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")
13574 "/include/SDL2"))
13575 #t)))))
13576 (native-inputs
13577 `(("pkg-config" ,pkg-config)
13578 ("python-cython" ,python-cython)))
13579 (inputs
13580 `(("gstreamer" ,gstreamer)
13581 ("mesa" ,mesa)
13582 ("sdl-union"
13583 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13584 (home-page "https://kivy.org")
13585 (synopsis
13586 "Multitouch application framework")
13587 (description
13588 "A software library for rapid development of
13589 hardware-accelerated multitouch applications.")
13590 (license license:expat)))
13591
13592 (define-public python2-kivy
13593 (package-with-python2 python-kivy))
13594
13595 (define-public python-binaryornot
13596 (package
13597 (name "python-binaryornot")
13598 (version "0.4.4")
13599 (source (origin
13600 (method url-fetch)
13601 (uri (pypi-uri "binaryornot" version))
13602 (sha256
13603 (base32
13604 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13605 (build-system python-build-system)
13606 (arguments
13607 `(#:phases
13608 (modify-phases %standard-phases
13609 (add-after 'unpack 'patch-tests
13610 (lambda _
13611 ;; TypeError: binary() got an unexpected keyword argument
13612 ;; 'average_size'.
13613 (substitute* "tests/test_check.py"
13614 (("average_size=512") ""))
13615 #t)))))
13616 (propagated-inputs
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
13622 binary or text.")
13623 (license license:bsd-3)
13624 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13625
13626 (define-public python2-binaryornot
13627 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13628 (package (inherit base)
13629 (propagated-inputs
13630 `(("python2-enum34" ,python2-enum34)
13631 ,@(package-propagated-inputs base))))))
13632
13633 (define-public python-binwalk
13634 (package
13635 (name "python-binwalk")
13636 (version "2.2.0")
13637 (source
13638 (origin
13639 (method git-fetch)
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))
13644 (sha256
13645 (base32
13646 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13647 (build-system python-build-system)
13648 (arguments
13649 `(#:phases
13650 (modify-phases %standard-phases
13651 (add-before 'check 'set-pythonpath
13652 (lambda _
13653 (setenv "PYTHONPATH"
13654 (string-append
13655 (getcwd) "/src/"
13656 ":" (getenv "PYTHONPATH")))
13657 (setenv "HOME" "")
13658 #t)))))
13659 (native-inputs
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)))
13667
13668 (define-public python-nltk
13669 (package
13670 (name "python-nltk")
13671 (version "3.2.1")
13672 (source (origin
13673 (method url-fetch)
13674 (uri (pypi-uri "nltk" version))
13675 (sha256
13676 (base32
13677 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13678 (build-system python-build-system)
13679 (arguments
13680 '(;; The tests require some extra resources to be downloaded.
13681 ;; TODO Try packaging these resources.
13682 #:tests? #f))
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)))
13690
13691 (define-public python2-nltk
13692 (package-with-python2 python-nltk))
13693
13694 (define-public python-pymongo
13695 (package
13696 (name "python-pymongo")
13697 (version "3.7.2")
13698 (source (origin
13699 (method url-fetch)
13700 (uri (pypi-uri "pymongo" version))
13701 (sha256
13702 (base32
13703 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13704 (build-system python-build-system)
13705 (propagated-inputs
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)))
13711
13712 (define-public python2-pymongo
13713 (package-with-python2 python-pymongo))
13714
13715 (define-public python-consul
13716 (package
13717 (name "python-consul")
13718 (version "0.6.1")
13719 (source
13720 (origin
13721 (method url-fetch)
13722 (uri (pypi-uri "python-consul" version))
13723 (sha256
13724 (base32
13725 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13726 (build-system python-build-system)
13727 (arguments
13728 '(#:tests? #f)) ; The tests are not distributed
13729 (propagated-inputs
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")
13734 (description
13735 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13736 discovery, monitoring and configuration.")
13737 (license license:expat)))
13738
13739 (define-public python2-consul
13740 (package-with-python2 python-consul))
13741
13742 (define-public python-schematics
13743 (package
13744 (name "python-schematics")
13745 (version "1.1.1")
13746 (source
13747 (origin
13748 (method git-fetch)
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))
13753 (sha256
13754 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13755 (build-system python-build-system)
13756 (propagated-inputs
13757 `(("python-six" ,python-six)))
13758 (arguments
13759 ;; The tests require a bunch of not very nice packages with fixed
13760 ;; version requirements (e.g. python-coveralls).
13761 `(#:tests? #f))
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)))
13766
13767 (define-public python2-schematics
13768 (package-with-python2 python-schematics))
13769
13770 (define-public python-odfpy
13771 (package
13772 (name "python-odfpy")
13773 (version "1.4.1")
13774 (source (origin
13775 (method url-fetch)
13776 (uri (pypi-uri "odfpy" version))
13777 (sha256
13778 (base32
13779 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13780 (arguments
13781 `(#:phases
13782 (modify-phases %standard-phases
13783 (replace 'check
13784 (lambda _
13785 (setenv "PYTHONPATH" (string-append "./build/lib:"
13786 (getenv "PYTHONPATH")))
13787 (invoke "pytest" "-vv"))))))
13788 (build-system python-build-system)
13789 (native-inputs
13790 `(("python-pytest" ,python-pytest)))
13791 (propagated-inputs
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.")
13797 (license
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))))
13801
13802 (define-public python2-odfpy
13803 (package-with-python2 python-odfpy))
13804
13805 (define-public python-natsort
13806 (package
13807 (name "python-natsort")
13808 (version "7.0.1")
13809 (source (origin
13810 (method url-fetch)
13811 (uri (pypi-uri "natsort" version))
13812 (sha256
13813 (base32
13814 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13815 (build-system python-build-system)
13816 (arguments
13817 `(#:modules ((guix build utils)
13818 (guix build python-build-system)
13819 (srfi srfi-1)
13820 (srfi srfi-26)
13821 (ice-9 ftw))
13822 #:phases
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))
13827 (replace 'check
13828 (lambda _
13829 (let ((cwd (getcwd)))
13830 (setenv "PYTHONPATH"
13831 (string-append
13832 cwd "/build/"
13833 (find (cut string-prefix? "lib" <>)
13834 (scandir (string-append cwd "/build")))
13835 ":"
13836 (getenv "PYTHONPATH")))
13837 (invoke "pytest" "-v")))))))
13838 (native-inputs
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")
13847 (description
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))))))
13858
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)
13863 (version "6.2.1")
13864 (source (origin
13865 (method url-fetch)
13866 (uri (pypi-uri "natsort" version))
13867 (sha256
13868 (base32
13869 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
13870 (native-inputs
13871 `(("python2-pathlib" ,python2-pathlib)
13872 ,@(package-native-inputs base))))))
13873
13874 (define-public glances
13875 (package
13876 (name "glances")
13877 (version "3.1.4")
13878 (source
13879 (origin
13880 (method url-fetch)
13881 (uri (pypi-uri "Glances" version))
13882 (sha256
13883 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
13884 (modules '((guix build utils)))
13885 (snippet
13886 '(begin
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"
13893 line)))
13894 #t))))
13895 (build-system python-build-system)
13896 (propagated-inputs
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")
13901 (description
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+)))
13906
13907 (define-public python-glances
13908 (deprecated-package "python-glances" glances))
13909
13910 (define-public python-graphql-core
13911 (package
13912 (name "python-graphql-core")
13913 (version "0.5.3")
13914 (source
13915 (origin
13916 (method url-fetch)
13917 (uri (pypi-uri "graphql-core" version))
13918 (sha256
13919 (base32
13920 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13921 (build-system python-build-system)
13922 (arguments
13923 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13924 #:phases
13925 (modify-phases %standard-phases
13926 (add-after 'unpack 'patch-hardcoded-version
13927 (lambda _ (substitute*
13928 "setup.py"
13929 (("'gevent==1.1rc1'") "'gevent'"))
13930 #t)))))
13931 (native-inputs
13932 `(("python-gevent" ,python-gevent)
13933 ("python-mock" ,python-mock)
13934 ("python-pytest-mock" ,python-pytest-mock)))
13935 (propagated-inputs
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")
13940 (description
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}
13944 to Python.")
13945 (license license:expat)))
13946
13947 (define-public python2-graphql-core
13948 (package-with-python2 python-graphql-core))
13949
13950 (define-public python-graphql-relay
13951 (package
13952 (name "python-graphql-relay")
13953 (version "0.4.5")
13954 (source
13955 (origin
13956 (method url-fetch)
13957 (uri (pypi-uri "graphql-relay" version))
13958 (sha256
13959 (base32
13960 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13961 (build-system python-build-system)
13962 (arguments
13963 '(#:tests? #f)) ; The tests are not distributed
13964 (propagated-inputs
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")
13970 (description
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}
13975 from Facebook.")
13976 (license license:expat)))
13977
13978 (define-public python2-graphql-relay
13979 (package-with-python2 python-graphql-relay))
13980
13981 (define-public python-graphene
13982 (package
13983 (name "python-graphene")
13984 (version "0.10.2")
13985 (source
13986 (origin
13987 (method url-fetch)
13988 (uri (pypi-uri "graphene" version))
13989 (sha256
13990 (base32
13991 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13992 (build-system python-build-system)
13993 (propagated-inputs
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)))
13999 (arguments
14000 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14001 (home-page "https://graphene-python.org/")
14002 (synopsis "GraphQL Framework for Python")
14003 (description
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)))
14009
14010 (define-public python2-graphene
14011 (let ((base (package-with-python2
14012 (strip-python2-variant python-graphene))))
14013 (package (inherit base)
14014 (native-inputs
14015 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14016 ,@(package-native-inputs base))))))
14017
14018 (define-public python-nautilus
14019 (package
14020 (name "python-nautilus")
14021 (version "0.4.9")
14022 (source
14023 (origin
14024 (method url-fetch)
14025 (uri (pypi-uri "nautilus" version))
14026 (sha256
14027 (base32
14028 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14029 (build-system python-build-system)
14030 (arguments `(#:tests? #f)) ; fails to import test modules
14031 (propagated-inputs
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)))
14041 (native-inputs
14042 `(("python-nose2" ,python-nose2)))
14043 (home-page "https://github.com/AlecAivazis/nautilus")
14044 (synopsis "Library for creating microservice applications")
14045 (description
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)))
14050
14051 (define-public python-random2
14052 (package
14053 (name "python-random2")
14054 (version "1.0.1")
14055 (source (origin
14056 (method url-fetch)
14057 (uri (pypi-uri "random2" version ".zip"))
14058 (sha256
14059 (base32
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")
14065 (description
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.
14068
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.
14071
14072 This package closes that gap, allowing stable random number generation
14073 between the different Python versions.")
14074 (license license:psfl)))
14075
14076 (define-public python2-random2
14077 (package-with-python2 python-random2))
14078
14079 (define-public python-snowballstemmer
14080 (package
14081 (name "python-snowballstemmer")
14082 (version "2.0.0")
14083 (source (origin
14084 (method url-fetch)
14085 (uri (pypi-uri "snowballstemmer" version))
14086 (sha256
14087 (base32
14088 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14089 (build-system python-build-system)
14090 (arguments
14091 `(;; No tests exist
14092 #:tests? #f))
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
14097 English stemmer.")
14098 (license license:bsd-3)))
14099
14100 (define-public python2-snowballstemmer
14101 (package-with-python2 python-snowballstemmer))
14102
14103 (define-public python-setproctitle
14104 (package
14105 (name "python-setproctitle")
14106 (version "1.1.10")
14107 (source
14108 (origin
14109 (method url-fetch)
14110 (uri (pypi-uri "setproctitle" version))
14111 (sha256
14112 (base32
14113 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14114 (build-system python-build-system)
14115 (arguments
14116 '(#:phases
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.
14122 (lambda _
14123 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14124 (when nose
14125 (substitute* "Makefile"
14126 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14127 (string-append nose "/bin/nosetests "))))
14128 #t)))
14129 (replace 'check
14130 (lambda _
14131 (setenv "PYTHON" (or (which "python3") (which "python")))
14132 (setenv "PYCONFIG" (if (which "python3-config")
14133 "python3-config --embed"
14134 "python-config"))
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"))))))
14139 (native-inputs
14140 `(("procps" ,procps))) ; required for tests
14141 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14142 (synopsis
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).
14146
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))))))
14153
14154 (define-public python2-setproctitle
14155 (let ((base (package-with-python2
14156 (strip-python2-variant python-setproctitle))))
14157 (package
14158 (inherit base)
14159 (native-inputs `(("python2-nose" ,python2-nose)
14160 ,@(package-native-inputs base))))))
14161
14162 (define-public python-validictory
14163 (package
14164 (name "python-validictory")
14165 (version "1.0.1")
14166 (source
14167 (origin
14168 (method url-fetch)
14169 (uri (pypi-uri "validictory" version))
14170 (sha256
14171 (base32
14172 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14173 (build-system python-build-system)
14174 (arguments
14175 '(#:phases
14176 (modify-phases %standard-phases
14177 (add-after 'unpack 'bootstrap
14178 ;; Move the tests out of the package directory to avoid
14179 ;; packaging them.
14180 (lambda* _
14181 (rename-file "validictory/tests" "tests")
14182 (delete-file "tests/__init__.py")))
14183 (replace 'check
14184 (lambda _
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" ))))))
14190 (native-inputs
14191 `(("python-pytest" ,python-pytest)))
14192 (home-page
14193 "https://github.com/jamesturk/validictory")
14194 (synopsis "General purpose Python data validator")
14195 (description "It allows validation of arbitrary Python data structures.
14196
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)))
14201
14202 (define-public python2-validictory
14203 (package-with-python2 python-validictory))
14204
14205 (define-public python-pyelftools
14206 (package
14207 (name "python-pyelftools")
14208 (version "0.25")
14209 (source
14210 (origin
14211 (method url-fetch)
14212 (uri (pypi-uri "pyelftools" version))
14213 (sha256
14214 (base32
14215 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14216 (build-system python-build-system)
14217 (arguments
14218 `(#:phases
14219 (modify-phases %standard-phases
14220 (add-before 'check 'set-pythonpath
14221 (lambda _
14222 (setenv "PYTHONPATH"
14223 (string-append
14224 (getcwd) "/test/"
14225 ":" (getenv "PYTHONPATH")))
14226 #t)))))
14227 (home-page
14228 "https://github.com/eliben/pyelftools")
14229 (synopsis
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)))
14236
14237 (define-public python-pyev
14238 (package
14239 (name "python-pyev")
14240 (version "0.9.0")
14241 (source
14242 (origin
14243 (method url-fetch)
14244 (uri (pypi-uri "pyev" version))
14245 (sha256
14246 (base32
14247 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14248 (build-system python-build-system)
14249 (arguments
14250 `(#:tests? #f ; no test suite
14251 #:phases
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 "\"")))))))))
14260 (inputs
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)))
14266
14267 (define-public python2-pyev
14268 (package-with-python2 python-pyev))
14269
14270 (define-public python-imagesize
14271 (package
14272 (name "python-imagesize")
14273 (version "1.2.0")
14274 (source
14275 (origin
14276 (method url-fetch)
14277 (uri (pypi-uri "imagesize" version))
14278 (sha256
14279 (base32
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")
14284 (description
14285 "This package allows determination of image size from
14286 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14287 (license license:expat)))
14288
14289 (define-public python2-imagesize
14290 (package-with-python2 python-imagesize))
14291
14292 (define-public python-termstyle
14293 (package
14294 (name "python-termstyle")
14295 (version "0.1.11")
14296 (source
14297 (origin
14298 (method url-fetch)
14299 (uri (pypi-uri "termstyle" version))
14300 (sha256
14301 (base32
14302 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14303 (build-system python-build-system)
14304 (arguments
14305 '(#:phases
14306 (modify-phases %standard-phases
14307 (replace 'check
14308 (lambda _
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)))
14314
14315 (define-public python-argcomplete
14316 (package
14317 (name "python-argcomplete")
14318 (version "1.11.1")
14319 (source
14320 (origin
14321 (method url-fetch)
14322 (uri (pypi-uri "argcomplete" version))
14323 (sha256
14324 (base32
14325 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14326 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14327 (build-system python-build-system)
14328 (native-inputs
14329 `(("python-coverage" ,python-coverage)
14330 ("python-flake8" ,python-flake8)
14331 ("python-pexpect" ,python-pexpect)
14332 ("python-wheel" ,python-wheel)
14333 ("tcsh" ,tcsh)
14334 ("fish" ,fish)
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
14342 network.")
14343 (license license:asl2.0)))
14344
14345 (define-public python2-argcomplete
14346 (package-with-python2 python-argcomplete))
14347
14348 (define-public python-csscompressor
14349 (package
14350 (name "python-csscompressor")
14351 (version "0.9.5")
14352 (source
14353 (origin
14354 (method url-fetch)
14355 (uri (pypi-uri "csscompressor" version))
14356 (sha256
14357 (base32
14358 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14359 (build-system python-build-system)
14360 (arguments
14361 '(#:phases
14362 (modify-phases %standard-phases
14363 (replace 'check
14364 (lambda _
14365 (invoke "py.test"))))))
14366 (native-inputs
14367 `(("python-pytest" ,python-pytest)))
14368 (home-page "https://github.com/sprymix/csscompressor")
14369 (synopsis "Python port of YUI CSS Compressor")
14370 (description
14371 "This package provides a python port of YUI CSS Compressor.")
14372 (license license:bsd-3)))
14373
14374 (define-public python-rcssmin
14375 (package
14376 (name "python-rcssmin")
14377 (version "1.0.6")
14378 (source
14379 (origin
14380 (method url-fetch)
14381 (uri (pypi-uri "rcssmin" version))
14382 (sha256
14383 (base32
14384 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14385 (build-system python-build-system)
14386 (arguments
14387 '(#:phases
14388 (modify-phases %standard-phases
14389 (replace 'check
14390 (lambda _
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)))
14397
14398 (define-public python-rjsmin
14399 (package
14400 (name "python-rjsmin")
14401 (version "1.1.0")
14402 (source
14403 (origin
14404 (method url-fetch)
14405 (uri (pypi-uri "rjsmin" version))
14406 (sha256
14407 (base32
14408 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14409 (modules '((guix build utils)))
14410 (snippet
14411 '(begin
14412 (for-each delete-file (find-files "bench" "\\.js$"))
14413 #t))))
14414 (build-system python-build-system)
14415 (arguments
14416 '(#:tests? #f ; Not all test files included.
14417 #:phases
14418 (modify-phases %standard-phases
14419 (replace 'check
14420 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14421 (add-installed-pythonpath inputs outputs)
14422 (if tests?
14423 (invoke "py.test" "-vv" "tests")
14424 #t))))))
14425 (native-inputs
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)))
14434
14435 (define-public python-xopen
14436 (package
14437 (name "python-xopen")
14438 (version "0.5.0")
14439 (source
14440 (origin
14441 (method url-fetch)
14442 (uri (pypi-uri "xopen" version))
14443 (sha256
14444 (base32
14445 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14446 (build-system python-build-system)
14447 (propagated-inputs
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)))
14457
14458 (define-public python2-xopen
14459 (let ((base (package-with-python2
14460 (strip-python2-variant python-xopen))))
14461 (package
14462 (inherit base)
14463 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14464 ,@(package-propagated-inputs base))))))
14465
14466 (define-public python-cheetah
14467 (package
14468 (name "python-cheetah")
14469 (version "3.2.4")
14470 (source
14471 (origin
14472 (method url-fetch)
14473 (uri (pypi-uri "Cheetah3" version))
14474 (sha256
14475 (base32
14476 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14477 (build-system python-build-system)
14478 (arguments
14479 `(#:modules ((guix build utils)
14480 (guix build python-build-system)
14481 (ice-9 ftw)
14482 (srfi srfi-1)
14483 (srfi srfi-26))
14484 #:phases (modify-phases %standard-phases
14485 (add-after 'unpack 'use-absolute-python
14486 (lambda _
14487 (substitute* "Cheetah/CheetahWrapper.py"
14488 (("#!/usr/bin/env python")
14489 (string-append "#!" (which "python"))))
14490 #t))
14491 (add-after 'unpack 'fix-tests
14492 (lambda _
14493 (substitute* "Cheetah/Tests/ImportHooks.py"
14494 (("os.path.dirname\\(__file__\\)")
14495 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14496 #t))
14497 (replace 'check
14498 (lambda _
14499 (let ((cwd (getcwd)))
14500 (setenv "PYTHONPATH"
14501 (string-append
14502 cwd "/build/"
14503 (find (cut string-prefix? "lib" <>)
14504 (scandir (string-append cwd "/build")))
14505 ":" (getenv "PYTHONPATH")))
14506 (setenv "PATH"
14507 (string-append (getenv "PATH")
14508 ":" cwd "/bin"))
14509 (setenv "TMPDIR" "/tmp")
14510
14511 (substitute* "Cheetah/Tests/Test.py"
14512 (("unittest.TextTestRunner\\(\\)")
14513 "unittest.TextTestRunner(verbosity=2)"))
14514
14515 (invoke "python" "Cheetah/Tests/Test.py")))))))
14516 (propagated-inputs
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
14521 generator.
14522
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.
14527
14528 Features:
14529 @enumerate
14530 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14531 text-based format.
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.
14543 @end enumerate")
14544 (license (license:x11-style "file://LICENSE"))))
14545
14546 (define-public python2-cheetah
14547 (package-with-python2 python-cheetah))
14548
14549 (define-public python-dulwich
14550 (package
14551 (name "python-dulwich")
14552 (version "0.19.16")
14553 (source
14554 (origin
14555 (method url-fetch)
14556 (uri (list (string-append "https://www.dulwich.io/releases/"
14557 "dulwich-" version ".tar.gz")
14558 (pypi-uri "dulwich" version)))
14559 (sha256
14560 (base32
14561 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14562 (build-system python-build-system)
14563 (arguments
14564 `(#:phases
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
14569 ;; include PATH.
14570 (substitute* "dulwich/tests/compat/utils.py"
14571 (("'git'") (string-append "'"
14572 (which "git")
14573 "'")))
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")
14579 #t)))))
14580 (propagated-inputs
14581 `(("python-fastimport" ,python-fastimport)
14582 ("python-urllib3" ,python-urllib3)))
14583 (native-inputs
14584 `(("python-mock" ,python-mock)
14585 ("python-geventhttpclient" ,python-geventhttpclient)
14586 ("git" ,git)))
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+))))
14593
14594 (define-public python2-dulwich
14595 (package-with-python2 python-dulwich))
14596
14597 (define-public python-pbkdf2
14598 (package
14599 (name "python-pbkdf2")
14600 (version "1.3")
14601 (source
14602 (origin
14603 (method url-fetch)
14604 (uri (pypi-uri "pbkdf2" version))
14605 (sha256
14606 (base32
14607 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14608 (build-system python-build-system)
14609 (arguments
14610 '(#:phases
14611 (modify-phases %standard-phases
14612 (replace 'check
14613 (lambda _
14614 (setenv "PYTHONPATH"
14615 (string-append (getcwd) "/build/lib:"
14616 (getenv "PYTHONPATH")))
14617 (invoke "python" "test/test_pbkdf2.py"))))))
14618 (propagated-inputs
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.
14624
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)))
14631
14632 (define-public python2-pbkdf2
14633 (package-with-python2 python-pbkdf2))
14634
14635 (define-public python-qrcode
14636 (package
14637 (name "python-qrcode")
14638 (version "6.1")
14639 (source
14640 (origin
14641 (method url-fetch)
14642 (uri (pypi-uri "qrcode" version))
14643 (sha256
14644 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14645 (build-system python-build-system)
14646 (arguments
14647 ;; FIXME: Tests require packaging 'pymaging'.
14648 '(#:tests? #f))
14649 (propagated-inputs
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
14657 of QR Codes.
14658
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
14661 console.")
14662 (license license:bsd-3)))
14663
14664 (define-public python2-qrcode
14665 (package-with-python2 python-qrcode))
14666
14667 (define-public python-rst2ansi
14668 (package
14669 (name "python-rst2ansi")
14670 (version "0.1.5")
14671 (source
14672 (origin
14673 (method url-fetch)
14674 (uri (pypi-uri "rst2ansi" version))
14675 (sha256
14676 (base32
14677 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14678 (build-system python-build-system)
14679 (propagated-inputs
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")
14683 (description
14684 "Python module dedicated to rendering RST (reStructuredText) documents
14685 to ansi-escaped strings suitable for display in a terminal.")
14686 (license license:expat)))
14687
14688 (define-public python-ansi2html
14689 (package
14690 (name "python-ansi2html")
14691 (version "1.2.0")
14692 (source
14693 (origin
14694 (method url-fetch)
14695 (uri (pypi-uri "ansi2html" version))
14696 (sha256
14697 (base32
14698 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14699 (build-system python-build-system)
14700 (native-inputs
14701 `(("python-mock" ,python-mock)
14702 ("python-nose" ,python-nose)))
14703 (propagated-inputs
14704 `(("python-six" ,python-six)))
14705 (home-page "https://github.com/ralphbean/ansi2html")
14706 (synopsis "Convert ANSI-decorated console output to HTML")
14707 (description
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+)))
14711
14712 (define-public python2-ansi2html
14713 (package-with-python2 python-ansi2html))
14714
14715 (define-public python-ddt
14716 (package
14717 (name "python-ddt")
14718 (version "1.1.3")
14719 (source
14720 (origin
14721 (method url-fetch)
14722 (uri (pypi-uri "ddt" version))
14723 (sha256
14724 (base32
14725 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
14726 (build-system python-build-system)
14727 (native-inputs
14728 `(("python-mock" ,python-mock)
14729 ("python-nose" ,python-nose)))
14730 (propagated-inputs
14731 `(("python-six" ,python-six)
14732 ("python-pyyaml" ,python-pyyaml)))
14733 (home-page "https://github.com/txels/ddt")
14734 (synopsis "Data-Driven Tests")
14735 (description
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
14738 cases.")
14739 (license license:expat)))
14740
14741 (define-public python2-ddt
14742 (package-with-python2 python-ddt))
14743
14744 (define-public python-pycountry
14745 (package
14746 (name "python-pycountry")
14747 (version "18.5.26")
14748 (source
14749 (origin
14750 (method url-fetch)
14751 (uri (pypi-uri "pycountry" version))
14752 (sha256
14753 (base32
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.")
14758 (description
14759 "@code{pycountry} provides the ISO databases for the standards:
14760 @enumerate
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)
14767 @end enumerate
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+)))
14771
14772 (define-public python2-pycountry
14773 (package-with-python2 python-pycountry))
14774
14775 (define-public python-pycosat
14776 (package
14777 (name "python-pycosat")
14778 (version "0.6.3")
14779 (source
14780 (origin
14781 (method url-fetch)
14782 (uri (pypi-uri "pycosat" version ".zip"))
14783 (sha256
14784 (base32
14785 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14786 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14787 (build-system python-build-system)
14788 (native-inputs
14789 `(("unzip" ,unzip)))
14790 (home-page "https://github.com/ContinuumIO/pycosat")
14791 (synopsis "Bindings to picosat (a SAT solver)")
14792 (description
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)))
14798
14799 (define-public python2-pycosat
14800 (package-with-python2 python-pycosat))
14801
14802 (define-public python2-ruamel.ordereddict
14803 (package
14804 (name "python2-ruamel.ordereddict")
14805 (version "0.4.9")
14806 (source
14807 (origin
14808 (method url-fetch)
14809 (uri (pypi-uri "ruamel.ordereddict" version))
14810 (sha256
14811 (base32
14812 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14813 (build-system python-build-system)
14814 (arguments
14815 `(#:python ,python-2
14816 #:phases
14817 (modify-phases %standard-phases
14818 (delete 'check)
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")
14825 (description
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)))
14835
14836 (define-public python-pypeg2
14837 (package
14838 (name "python-pypeg2")
14839 (version "2.15.2")
14840 (source
14841 (origin
14842 (method url-fetch)
14843 (uri (pypi-uri "pyPEG2" version))
14844 (sha256
14845 (base32
14846 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14847 (build-system python-build-system)
14848 (propagated-inputs `(("python-lxml" ,python-lxml)))
14849 (arguments
14850 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14851 '(#:tests? #f))
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)))
14858
14859 (define-public python-incremental
14860 (package
14861 (name "python-incremental")
14862 (version "17.5.0")
14863 (source
14864 (origin
14865 (method url-fetch)
14866 (uri (pypi-uri "incremental" version))
14867 (sha256
14868 (base32
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
14874 projects.")
14875 (license license:expat)))
14876
14877 (define-public python2-incremental
14878 (package-with-python2 python-incremental))
14879
14880 (define-public python-invoke
14881 (package
14882 (name "python-invoke")
14883 (home-page "https://www.pyinvoke.org/")
14884 (version "1.4.1")
14885 (source (origin
14886 (method url-fetch)
14887 (uri (pypi-uri "invoke" version))
14888 (sha256
14889 (base32
14890 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
14891 (build-system python-build-system)
14892 (arguments
14893 ;; XXX: Requires many dependencies that are not yet in Guix.
14894 `(#:tests? #f))
14895 (synopsis "Pythonic task execution")
14896 (description
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)))
14902
14903 (define-public python2-invoke
14904 (package-with-python2 python-invoke))
14905
14906 (define-public python-automat
14907 (package
14908 (name "python-automat")
14909 (version "20.2.0")
14910 (source (origin
14911 (method url-fetch)
14912 (uri (pypi-uri "Automat" version))
14913 (sha256
14914 (base32
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))
14922 (native-inputs
14923 `(("python-m2r" ,python-m2r)
14924 ("python-setuptools-scm" ,python-setuptools-scm)
14925 ("python-graphviz" ,python-graphviz)))
14926 (propagated-inputs
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
14933 transducers).")
14934 (license license:expat)))
14935
14936 (define-public python2-automat
14937 (package-with-python2 python-automat))
14938
14939 (define-public python-m2r
14940 (package
14941 (name "python-m2r")
14942 (version "0.2.1")
14943 (source (origin
14944 (method url-fetch)
14945 (uri (pypi-uri "m2r" version))
14946 (sha256
14947 (base32
14948 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
14949 (build-system python-build-system)
14950 (propagated-inputs
14951 `(("python-docutils" ,python-docutils)
14952 ("python-mistune" ,python-mistune)))
14953 (native-inputs
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
14959 reST format.")
14960 (license license:expat)))
14961
14962 (define-public python2-m2r
14963 (package-with-python2 python-m2r))
14964
14965 (define-public python-constantly
14966 (package
14967 (name "python-constantly")
14968 (version "15.1.0")
14969 (source (origin
14970 (method url-fetch)
14971 (uri (pypi-uri "constantly" version))
14972 (sha256
14973 (base32
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)))
14982
14983 (define-public python2-constantly
14984 (package-with-python2 python-constantly))
14985
14986 (define-public python-attrs
14987 (package
14988 (name "python-attrs")
14989 (version "19.3.0")
14990 (source (origin
14991 (method url-fetch)
14992 (uri (pypi-uri "attrs" version))
14993 (sha256
14994 (base32
14995 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
14996 (build-system python-build-system)
14997 (arguments
14998 `(#:modules ((guix build utils)
14999 (guix build python-build-system)
15000 (ice-9 ftw)
15001 (srfi srfi-1)
15002 (srfi srfi-26))
15003 #:phases (modify-phases %standard-phases
15004 (replace 'check
15005 (lambda _
15006 (let ((cwd (getcwd)))
15007 (setenv "PYTHONPATH"
15008 (string-append
15009 cwd "/build/"
15010 (find (cut string-prefix? "lib" <>)
15011 (scandir (string-append cwd "/build")))
15012 ":"
15013 (getenv "PYTHONPATH")))
15014 (invoke "python" "-m" "pytest")))))))
15015 (native-inputs
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
15027 protocols.")
15028 (license license:expat)))
15029
15030 (define-public python2-attrs
15031 (package-with-python2 python-attrs))
15032
15033 (define-public python-attrs-bootstrap
15034 (package
15035 (inherit python-attrs)
15036 (name "python-attrs-bootstrap")
15037 (native-inputs `())
15038 (arguments `(#:tests? #f))))
15039
15040 (define-public python2-attrs-bootstrap
15041 (package-with-python2 python-attrs-bootstrap))
15042
15043 (define-public python2-cliapp
15044 (package
15045 (name "python2-cliapp")
15046 (version "1.20180812.1")
15047 (source
15048 (origin
15049 (method url-fetch)
15050 (uri (string-append
15051 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15052 version ".tar.gz"))
15053 (sha256
15054 (base32
15055 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15056 (build-system python-build-system)
15057 (arguments
15058 `(#:python ,python-2
15059 #:phases
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,
15063 ;; and fails.
15064 (delete 'check)
15065 (add-before 'build 'check
15066 (lambda _
15067 ;; Disable python3 tests
15068 (substitute* "check"
15069 (("python3") "# python3"))
15070 (invoke "./check"))))))
15071 (native-inputs
15072 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15073 ("python2-pep8" ,python2-pep8)))
15074 (propagated-inputs
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+)))
15083
15084 (define-public python2-ttystatus
15085 (package
15086 (name "python2-ttystatus")
15087 (version "0.38")
15088 (source
15089 (origin
15090 (method git-fetch)
15091 (uri (git-reference
15092 (url "http://git.liw.fi/ttystatus")
15093 ;; There are no tags after ttystatus-0.36.
15094 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15095 (sha256
15096 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15097 (file-name (git-file-name name version))))
15098 (build-system python-build-system)
15099 (native-inputs
15100 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15101 ("python2-pep8" ,python2-pep8)))
15102 (arguments
15103 `(#:python ,python-2
15104 #:phases
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,
15108 ;; and fails.
15109 (delete 'check)
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+)))
15121
15122 (define-public python2-tracing
15123 (package
15124 (name "python2-tracing")
15125 (version "0.10")
15126 (source
15127 (origin
15128 (method url-fetch)
15129 (uri (string-append
15130 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15131 version ".tar.gz"))
15132 (sha256
15133 (base32
15134 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15135 (build-system python-build-system)
15136 (arguments
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+)))
15147
15148 (define-public python2-larch
15149 (package
15150 (name "python2-larch")
15151 (version "1.20151025")
15152 (source
15153 (origin
15154 (method url-fetch)
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"))
15160 (sha256
15161 (base32
15162 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15163 (build-system python-build-system)
15164 (arguments
15165 `(#:python ,python-2
15166 #:phases
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,
15170 ;; and fails.
15171 (delete 'check)
15172 (add-before 'build 'check
15173 (lambda _ (invoke "make" "check"))))))
15174 (native-inputs
15175 `(("cmdtest" ,cmdtest)
15176 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15177 (propagated-inputs
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.
15185
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+)))
15191
15192 (define-public python-astroid
15193 (package
15194 (name "python-astroid")
15195 (version "2.4.2")
15196 (source
15197 (origin
15198 (method url-fetch)
15199 (uri (pypi-uri "astroid" version))
15200 (sha256
15201 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15202 (modules '((guix build utils)))
15203 (snippet
15204 '(begin
15205 ;; Check to see if the version pinning has been removed.
15206 (substitute* "astroid/__pkginfo__.py"
15207 (("==1\\.4\\.\\*") ">=1.4.0"))
15208 #t))))
15209 (build-system python-build-system)
15210 (propagated-inputs
15211 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15212 ("python-six" ,python-six)
15213 ("python-wrapt" ,python-wrapt)))
15214 (native-inputs
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
15220 other projects")
15221 (description "@code{python-astroid} provides a common base representation
15222 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15223
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))))))
15232
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.
15238 (version "1.6.5")
15239 (source
15240 (origin
15241 (method url-fetch)
15242 (uri (pypi-uri "astroid" version))
15243 (sha256
15244 (base32
15245 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15246 (arguments
15247 (substitute-keyword-arguments (package-arguments base)
15248 ((#:phases phases)
15249 `(modify-phases ,phases
15250 (add-after 'unpack 'remove-spurious-test
15251 (lambda _
15252 ;; https://github.com/PyCQA/astroid/issues/276
15253 (delete-file "astroid/tests/unittest_brain.py")
15254 #t))
15255 (replace 'check
15256 (lambda _
15257 (invoke"python" "-m" "unittest" "discover"
15258 "-p" "unittest*.py")))))))
15259 (native-inputs `())
15260 (propagated-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)))))))
15267
15268 (define-public python-isbnlib
15269 (package
15270 (name "python-isbnlib")
15271 (version "3.10.3")
15272 (source
15273 (origin
15274 (method url-fetch)
15275 (uri (pypi-uri "isbnlib" version))
15276 (sha256
15277 (base32
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+)))
15288
15289 (define-public python-isort
15290 (package
15291 (name "python-isort")
15292 (version "4.3.4")
15293 (source
15294 (origin
15295 (method git-fetch)
15296 (uri (git-reference
15297 ;; Tests pass only from the Github sources
15298 (url "https://github.com/timothycrosley/isort")
15299 (commit version)))
15300 (file-name (git-file-name name version))
15301 (sha256
15302 (base32
15303 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15304 (build-system python-build-system)
15305 (native-inputs
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
15313 editors.")
15314 (license license:expat)
15315 (properties `((python2-variant . ,(delay python2-isort))))))
15316
15317 (define-public python2-isort
15318 (let ((base (package-with-python2
15319 (strip-python2-variant python-isort))))
15320 (package (inherit base)
15321 (native-inputs
15322 `(("python2-futures" ,python2-futures)
15323 ,@(package-native-inputs base))))))
15324
15325 (define-public python2-backports-functools-lru-cache
15326 (package
15327 (name "python2-backports-functools-lru-cache")
15328 (version "1.6.1")
15329 (source
15330 (origin
15331 (method url-fetch)
15332 ;; only the pypi tarballs contain the necessary metadata
15333 (uri (pypi-uri "backports.functools_lru_cache" version))
15334 (sha256
15335 (base32
15336 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15337 (build-system python-build-system)
15338 (native-inputs
15339 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15340 (arguments
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)))
15347
15348 (define-public python-configparser
15349 (package
15350 (name "python-configparser")
15351 (version "4.0.2")
15352 (source
15353 (origin
15354 (method url-fetch)
15355 (uri (pypi-uri "configparser" version))
15356 (sha256
15357 (base32
15358 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15359 (native-inputs
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)))
15368
15369 (define-public python2-configparser
15370 (package-with-python2 python-configparser))
15371
15372 (define-public python-mamba
15373 (package
15374 (name "python-mamba")
15375 (version "0.11.1")
15376 (source (origin
15377 (method url-fetch)
15378 (uri (pypi-uri "mamba" version))
15379 (sha256
15380 (base32
15381 "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr"))))
15382 (build-system python-build-system)
15383 (arguments `(#:tests? #f)) ; No test
15384 (propagated-inputs
15385 `(("python-clint" ,python-clint)
15386 ("python-coverage" ,python-coverage)))
15387 (home-page "https://nestorsalceda.com/mamba/")
15388 (synopsis "Test runner for Python")
15389 (description
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)))
15393
15394 (define-public python-mando
15395 (package
15396 (name "python-mando")
15397 (version "0.6.4")
15398 (source (origin
15399 (method url-fetch)
15400 (uri (pypi-uri "mando" version))
15401 (sha256
15402 (base32
15403 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15404 (build-system python-build-system)
15405 (propagated-inputs
15406 `(("python-rst2ansi" ,python-rst2ansi)
15407 ("python-six" ,python-six)))
15408 (native-inputs
15409 `(("python-pytest" ,python-pytest)))
15410 (home-page "https://mando.readthedocs.org/")
15411 (synopsis
15412 "Wrapper around argparse, allowing creation of complete CLI applications")
15413 (description
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)))
15417
15418 (define-public python2-mando
15419 (package-with-python2 python-mando))
15420
15421 (define-public python2-argparse
15422 (package
15423 (name "python2-argparse")
15424 (version "1.4.0")
15425 (source
15426 (origin
15427 (method url-fetch)
15428 (uri (pypi-uri "argparse" version))
15429 (sha256
15430 (base32
15431 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15432 (build-system python-build-system)
15433 (arguments
15434 `(#:python ,python-2))
15435 (home-page "https://github.com/ThomasWaldmann/argparse/")
15436 (synopsis "Python command-line parsing library")
15437 (description
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)))
15441
15442 (define-public python-fudge
15443 (package
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.
15447 (version "0.9.6")
15448 (source
15449 (origin
15450 (method url-fetch)
15451 (uri (pypi-uri "fudge" version))
15452 (sha256
15453 (base32
15454 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15455 (build-system python-build-system)
15456 (arguments
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")
15460 (description
15461 "Fudge is a Python module for using fake objects (mocks and stubs) to
15462 test real ones.
15463
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)))
15471
15472 (define-public python2-fudge
15473 (package-with-python2 python-fudge))
15474
15475 (define-public python-mwclient
15476 (package
15477 (name "python-mwclient")
15478 (version "0.10.1")
15479 (source
15480 (origin
15481 (method git-fetch)
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))
15487 (sha256
15488 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15489 (build-system python-build-system)
15490 (propagated-inputs
15491 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15492 ("python-six" ,python-six)))
15493 (native-inputs
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)))
15503
15504 (define-public python2-mwclient
15505 (package-with-python2 python-mwclient))
15506
15507 (define-public python-utils
15508 (package
15509 (name "python-utils")
15510 (version "2.4.0")
15511 (source (origin
15512 (method url-fetch)
15513 (uri (pypi-uri "python-utils" version))
15514 (sha256
15515 (base32
15516 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15517 (build-system python-build-system)
15518 (arguments
15519 `(#:phases
15520 (modify-phases %standard-phases
15521 (replace 'check
15522 (lambda* (#:key inputs outputs #:allow-other-keys)
15523 (add-installed-pythonpath inputs outputs)
15524 (delete-file "pytest.ini")
15525 (invoke "pytest" "-vv"))))))
15526 (native-inputs
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")
15532 (description
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)))
15536
15537 (define-public python2-utils
15538 (package-with-python2 python-utils))
15539
15540 (define-public python-diff-match-patch
15541 (package
15542 (name "python-diff-match-patch")
15543 (version "20121119")
15544 (source
15545 (origin
15546 (method url-fetch)
15547 (uri (pypi-uri "diff-match-patch" version))
15548 (sha256
15549 (base32
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)))
15557
15558 (define-public python2-diff-match-patch
15559 (package-with-python2 python-diff-match-patch))
15560
15561 (define-public python-dirsync
15562 (package
15563 (name "python-dirsync")
15564 (version "2.2.5")
15565 (source
15566 (origin
15567 (method url-fetch)
15568 (uri (pypi-uri "dirsync" version))
15569 (sha256
15570 (base32
15571 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15572 (build-system python-build-system)
15573 (propagated-inputs
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)))
15579
15580 (define-public python2-dirsync
15581 (package-with-python2 python-dirsync))
15582
15583 (define-public python-levenshtein
15584 (package
15585 (name "python-levenshtein")
15586 (version "0.12.0")
15587 (source
15588 (origin
15589 (method url-fetch)
15590 (uri (pypi-uri "python-Levenshtein" version))
15591 (sha256
15592 (base32
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")
15597 (description
15598 "The Levenshtein Python C extension module contains functions for fast computation of
15599 @enumerate
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
15604 @end enumerate
15605 It supports both normal and Unicode strings.")
15606 (license license:gpl2+)))
15607
15608 (define-public python2-levenshtein
15609 (package-with-python2 python-levenshtein))
15610
15611 (define-public python-scandir
15612 (package
15613 (name "python-scandir")
15614 (version "1.10.0")
15615 (source
15616 (origin
15617 (method url-fetch)
15618 (uri (pypi-uri "scandir" version))
15619 (sha256
15620 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15621 (build-system python-build-system)
15622 (arguments
15623 `(#:phases (modify-phases %standard-phases
15624 (replace 'check
15625 (lambda _
15626 (invoke "python" "test/run_tests.py"))))))
15627 (home-page "https://github.com/benhoyt/scandir")
15628 (synopsis "Directory iteration function")
15629 (description
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.
15635
15636 This package is part of the Python standard library since version 3.5.")
15637 (license license:bsd-3)))
15638
15639 (define-public python2-scandir
15640 (package-with-python2 python-scandir))
15641
15642 (define-public python2-stemming
15643 (package
15644 (name "python2-stemming")
15645 (version "1.0.1")
15646 (source
15647 (origin
15648 (method url-fetch)
15649 (uri (pypi-uri "stemming" version))
15650 (sha256
15651 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15652 (build-system python-build-system)
15653 (arguments
15654 `(#:python ,python-2))
15655 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15656 (synopsis "Python implementations of various stemming algorithms")
15657 (description
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
15662 search engine.")
15663 (license license:public-domain)))
15664
15665 (define-public python-factory-boy
15666 (package
15667 (name "python-factory-boy")
15668 (version "2.8.1")
15669 (source
15670 (origin
15671 (method url-fetch)
15672 (uri (pypi-uri "factory_boy" version))
15673 (sha256
15674 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15675 (build-system python-build-system)
15676 (arguments
15677 ;; Tests are not included in the tarball.
15678 `(#:tests? #f))
15679 (propagated-inputs
15680 `(("faker" ,python-faker)))
15681 (home-page "https://github.com/benhoyt/scandir")
15682 (synopsis "Versatile test fixtures replacement")
15683 (description
15684 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15685
15686 As a fixtures replacement tool, it aims to replace static, hard to maintain
15687 fixtures with easy-to-use factories for complex object.
15688
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)))
15693
15694 (define-public python2-factory-boy
15695 (package-with-python2 python-factory-boy))
15696
15697 (define-public python-translate-toolkit
15698 (package
15699 (name "python-translate-toolkit")
15700 (version "2.1.0")
15701 (source
15702 (origin
15703 (method url-fetch)
15704 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15705 (sha256
15706 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15707 (build-system python-build-system)
15708 (native-inputs
15709 `(("python-pytest" ,python-pytest)
15710 ("python-sphinx" ,python-sphinx)))
15711 (propagated-inputs
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)))
15721 (arguments
15722 ;; TODO: tests are not run, because they end with
15723 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15724 ;; 'parse_funcs'
15725 ;; during test setup.
15726 `(#:tests? #f))
15727 (home-page "https://toolkit.translatehouse.org")
15728 (synopsis "Tools and API for translation and localization engineering")
15729 (description
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+)))
15733
15734 (define-public python2-translate-toolkit
15735 (package-with-python2 python-translate-toolkit))
15736
15737 (define-public python-packaging
15738 (package
15739 (name "python-packaging")
15740 (version "20.0")
15741 (source
15742 (origin
15743 (method url-fetch)
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"))
15748 (sha256
15749 (base32
15750 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15751 (build-system python-build-system)
15752 (arguments
15753 `(#:phases (modify-phases %standard-phases
15754 (replace 'check
15755 (lambda* (#:key tests? #:allow-other-keys)
15756 (if tests?
15757 (invoke "py.test" "-vv")
15758 (format #t "test suite not run~%"))
15759 #t)))))
15760 (native-inputs
15761 `(("python-pretend" ,python-pretend)
15762 ("python-pytest" ,python-pytest)))
15763 (propagated-inputs
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
15770 information.")
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
15774 ;; licenses.
15775 (license (list license:asl2.0 license:bsd-2))))
15776
15777 (define-public python2-packaging
15778 (package-with-python2 python-packaging))
15779
15780 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15781 (define-public python-packaging-bootstrap
15782 (hidden-package
15783 (package/inherit
15784 python-packaging
15785 (name "python-packaging-bootstrap")
15786 (native-inputs '())
15787 (propagated-inputs
15788 `(("python-pyparsing" ,python-pyparsing)))
15789 (arguments '(#:tests? #f)))))
15790
15791 (define-public python2-packaging-bootstrap
15792 (hidden-package
15793 (package/inherit
15794 python2-packaging
15795 (name "python2-packaging-bootstrap")
15796 (native-inputs '())
15797 (propagated-inputs
15798 `(("python-pyparsing" ,python2-pyparsing)))
15799 (arguments
15800 `(#:tests? #f
15801 ,@(package-arguments python2-packaging))))))
15802
15803 (define-public python-relatorio
15804 (package
15805 (name "python-relatorio")
15806 (version "0.8.0")
15807 (source
15808 (origin
15809 (method url-fetch)
15810 (uri (pypi-uri "relatorio" version))
15811 (sha256
15812 (base32
15813 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15814 (build-system python-build-system)
15815 (propagated-inputs
15816 `(("python-lxml" ,python-lxml)
15817 ("python-genshi" ,python-genshi)))
15818 (native-inputs
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+)))
15826
15827 (define-public python2-relatorio
15828 (package-with-python2 python-relatorio))
15829
15830 (define-public python-radon
15831 (package
15832 (name "python-radon")
15833 (version "4.1.0")
15834 (source
15835 (origin
15836 (method url-fetch)
15837 (uri (pypi-uri "radon" version))
15838 (sha256
15839 (base32
15840 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15841 (build-system python-build-system)
15842 (arguments
15843 `(#:phases (modify-phases %standard-phases
15844 (replace 'check
15845 (lambda _
15846 (invoke "python" "radon/tests/run.py"))))))
15847 (propagated-inputs
15848 `(("python-colorama" ,python-colorama)
15849 ("python-flake8-polyfill" ,python-flake8-polyfill)
15850 ("python-mando" ,python-mando)))
15851 (native-inputs
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:
15858 @itemize @bullet
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)
15863 @end itemize")
15864 (properties `((python2-variant . ,(delay python2-radon))))
15865 (license license:expat)))
15866
15867 (define-public python2-radon
15868 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
15869 (package
15870 (inherit base)
15871 (propagated-inputs
15872 `(("python-configparser" ,python2-configparser)
15873 ("python-future" ,python2-future)
15874 ,@(package-propagated-inputs base))))))
15875
15876 (define-public python-sure
15877 (package
15878 (name "python-sure")
15879 (version "1.4.11")
15880 (source
15881 (origin
15882 (method url-fetch)
15883 (uri (pypi-uri "sure" version))
15884 (sha256
15885 (base32
15886 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
15887 (build-system python-build-system)
15888 (propagated-inputs
15889 `(("python-mock" ,python-mock)
15890 ("python-six" ,python-six)))
15891 (native-inputs
15892 `(("python-nose" ,python-nose)))
15893 (home-page "https://github.com/gabrielfalcao/sure")
15894 (synopsis "Automated testing library in python for python")
15895 (description
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+)))
15899
15900 (define-public python2-sure
15901 (package-with-python2 python-sure))
15902
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.
15906 (package
15907 (name "python2-couleur")
15908 (version "0.6.2")
15909 (source
15910 (origin
15911 (method url-fetch)
15912 (uri (pypi-uri "couleur" version))
15913 (sha256
15914 (base32
15915 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15916 (build-system python-build-system)
15917 (arguments
15918 `(#:python ,python-2))
15919 (home-page "https://github.com/gabrielfalcao/couleur")
15920 (synopsis
15921 "ANSI terminal tool for python, colored shell and other handy fancy features")
15922 (description
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+)))
15928
15929 (define-public python-misaka
15930 (package
15931 (name "python-misaka")
15932 (version "2.1.1")
15933 (source
15934 (origin
15935 (method url-fetch)
15936 (uri (pypi-uri "misaka" version))
15937 (sha256
15938 (base32
15939 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
15940 (build-system python-build-system)
15941 (arguments
15942 `(;; Line 37 of setup.py calls self.run_command('develop')
15943 ;; in the 'check' phase. This command seems to be trying
15944 ;; to write to
15945 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15946 ;; for which it does not have the permission to write.
15947 #:tests? #f))
15948 (propagated-inputs
15949 `(("python-cffi" ,python-cffi)))
15950 (home-page "https://github.com/FSX/misaka")
15951 (synopsis "Python binding for Hoedown")
15952 (description
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)))
15957
15958 (define-public python2-misaka
15959 (package-with-python2 python-misaka))
15960
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
15964 ;; for python3
15965 (package
15966 (name "python2-steadymark")
15967 (version "0.7.3")
15968 (source
15969 (origin
15970 (method url-fetch)
15971 (uri (pypi-uri "steadymark" version))
15972 (sha256
15973 (base32
15974 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15975 (build-system python-build-system)
15976 (native-inputs
15977 `(("python-couleur" ,python2-couleur)
15978 ("python-sure" ,python2-sure)
15979 ("python-misaka" ,python2-misaka)))
15980 (arguments
15981 `(#:python ,python-2
15982 #:phases
15983 (modify-phases %standard-phases
15984 (add-before 'build 'patch-setup-py
15985 (lambda _
15986 ;; Update requirements from dependency==version
15987 ;; to dependency>=version
15988 (substitute* "setup.py"
15989 (("==") ">="))
15990 #t)))))
15991 (home-page "https://github.com/gabrielfalcao/steadymark")
15992 (synopsis "Markdown-based test runner for python")
15993 (description
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)))
15999
16000 (define-public python-jsonpointer
16001 (package
16002 (name "python-jsonpointer")
16003 (version "1.10")
16004 (source
16005 (origin
16006 (method url-fetch)
16007 (uri (pypi-uri "jsonpointer" version))
16008 (sha256
16009 (base32
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)))
16017
16018 (define-public python2-jsonpointer
16019 (package-with-python2 python-jsonpointer))
16020
16021 (define-public python-jsonpatch
16022 (package
16023 (name "python-jsonpatch")
16024 (version "1.16")
16025 (source
16026 (origin
16027 (method git-fetch)
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))
16033 (sha256
16034 (base32
16035 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16036 (build-system python-build-system)
16037 (native-inputs
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)))
16044
16045 (define-public python2-jsonpatch
16046 (package-with-python2 python-jsonpatch))
16047
16048 (define-public python-jsonpatch-0.4
16049 (package (inherit python-jsonpatch)
16050 (name "python-jsonpatch")
16051 (version "0.4")
16052 (source
16053 (origin
16054 (method git-fetch)
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))
16059 (sha256
16060 (base32
16061 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16062
16063 (define-public python2-jsonpatch-0.4
16064 (package-with-python2 python-jsonpatch-0.4))
16065
16066 (define-public python-rfc3986
16067 (package
16068 (name "python-rfc3986")
16069 (version "1.4.0")
16070 (source (origin
16071 (method url-fetch)
16072 (uri (pypi-uri "rfc3986" version))
16073 (sha256
16074 (base32
16075 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16076 (build-system python-build-system)
16077 (arguments
16078 `(#:modules ((guix build utils)
16079 (guix build python-build-system)
16080 (ice-9 ftw)
16081 (srfi srfi-1)
16082 (srfi srfi-26))
16083 #:phases
16084 (modify-phases %standard-phases
16085 (replace 'check
16086 (lambda _
16087 (let ((cwd (getcwd)))
16088 (setenv "PYTHONPATH"
16089 (string-append cwd "/build/"
16090 (find (cut string-prefix? "lib" <>)
16091 (scandir (string-append cwd "/build")))
16092 ":"
16093 (getenv "PYTHONPATH")))
16094 (invoke "pytest" "-v")))))))
16095 (native-inputs
16096 `(("python-pytest" ,python-pytest)))
16097 (home-page "https://rfc3986.readthedocs.io/")
16098 (synopsis "Parse and validate URI references")
16099 (description
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)))
16104
16105 (define-public python2-rfc3986
16106 (package-with-python2 python-rfc3986))
16107
16108 (define-public python-rfc3987
16109 (package
16110 (name "python-rfc3987")
16111 (version "1.3.7")
16112 (source
16113 (origin
16114 (method url-fetch)
16115 (uri (pypi-uri "rfc3987" version))
16116 (sha256
16117 (base32
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+)))
16125
16126 (define-public python2-rfc3987
16127 (package-with-python2 python-rfc3987))
16128
16129 ;; The latest commit contains fixes for building with both python3 and python2.
16130 (define-public python-rfc6555
16131 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16132 (revision "1"))
16133 (package
16134 (name "python-rfc6555")
16135 (version (git-version "0.0.0" revision commit))
16136 (source (origin
16137 (method git-fetch)
16138 (uri (git-reference
16139 (url "https://github.com/sethmlarson/rfc6555")
16140 (commit commit)))
16141 (file-name (git-file-name name version))
16142 (sha256
16143 (base32
16144 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16145 (build-system python-build-system)
16146 (arguments
16147 '(#:phases
16148 (modify-phases %standard-phases
16149 (replace 'check
16150 (lambda* (#:key tests? #:allow-other-keys)
16151 (if tests?
16152 ;; Other tests require network access.
16153 (invoke "pytest" "tests/test_ipv6.py")
16154 #t))))))
16155 (native-inputs
16156 `(("python-pytest" ,python-pytest)))
16157 (home-page "https://pypi.org/project/rfc6555/")
16158 (synopsis "Python implementation of RFC 6555")
16159 (description
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))))
16165
16166 (define-public python2-rfc6555
16167 (let ((base (package-with-python2
16168 (strip-python2-variant python-rfc6555))))
16169 (package
16170 (inherit base)
16171 (propagated-inputs
16172 `(("python2-selectors2" ,python2-selectors2))))))
16173
16174 (define-public python-validators
16175 (package
16176 (name "python-validators")
16177 (version "0.14.2")
16178 (source (origin
16179 (method url-fetch)
16180 (uri (pypi-uri "validators" version))
16181 (sha256
16182 (base32
16183 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16184 (build-system python-build-system)
16185 (arguments
16186 '(#:phases (modify-phases %standard-phases
16187 (replace 'check
16188 (lambda _
16189 (invoke "pytest" "-vv"))))))
16190 (propagated-inputs
16191 `(("python-decorator" ,python-decorator)
16192 ("python-six" ,python-six)))
16193 (native-inputs
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")
16199 (description
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
16203 some input.")
16204 (license license:expat)))
16205
16206 (define-public python2-validators
16207 (package-with-python2 python-validators))
16208
16209 (define-public python-validate-email
16210 (package
16211 (name "python-validate-email")
16212 (version "1.3")
16213 (source
16214 (origin
16215 (method url-fetch)
16216 (uri (pypi-uri "validate_email" version))
16217 (sha256
16218 (base32
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+)))
16226
16227 (define-public python2-validate-email
16228 (package-with-python2 python-validate-email))
16229
16230 (define-public python-flex
16231 (package
16232 (name "python-flex")
16233 (version "6.10.0")
16234 (source
16235 (origin
16236 (method url-fetch)
16237 (uri (pypi-uri "flex" version))
16238 (sha256
16239 (base32
16240 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16241 (build-system python-build-system)
16242 (propagated-inputs
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)))
16255
16256 (define-public python2-flex
16257 (package-with-python2 python-flex))
16258
16259 (define-public python-marshmallow
16260 (package
16261 (name "python-marshmallow")
16262 (version "3.0.0b14")
16263 (source
16264 (origin
16265 (method url-fetch)
16266 (uri (pypi-uri "marshmallow" version))
16267 (sha256
16268 (base32
16269 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
16270 (build-system python-build-system)
16271 (propagated-inputs
16272 `(("python-dateutil" ,python-dateutil)
16273 ("python-simplejson" ,python-simplejson)))
16274 (native-inputs
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)))
16283
16284 (define-public python2-marshmallow
16285 (package-with-python2 python-marshmallow))
16286
16287 (define-public python-apispec
16288 (package
16289 (name "python-apispec")
16290 (version "0.25.3")
16291 (source
16292 (origin
16293 (method url-fetch)
16294 (uri (pypi-uri "apispec" version))
16295 (sha256
16296 (base32
16297 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16298 (build-system python-build-system)
16299 (propagated-inputs
16300 `(("python-pyyaml" ,python-pyyaml)))
16301 (native-inputs
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.
16312 Swagger 2.0).")
16313 (license license:expat)))
16314
16315 (define-public python2-apispec
16316 (package-with-python2 python-apispec))
16317
16318 (define-public python-flasgger
16319 (package
16320 (name "python-flasgger")
16321 (version "0.6.3")
16322 (source
16323 (origin
16324 (method git-fetch)
16325 (uri (git-reference
16326 (url "https://github.com/rochacbruno/flasgger")
16327 (commit version)))
16328 (file-name (git-file-name name version))
16329 (sha256
16330 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16331 (build-system python-build-system)
16332 (arguments
16333 `(#:phases
16334 (modify-phases %standard-phases
16335 (replace 'check
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)
16341 ":"
16342 (getenv "PYTHONPATH")))
16343 (invoke "py.test"))))))
16344 (propagated-inputs
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)))
16350 (native-inputs
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)))
16364
16365 (define-public python2-flasgger
16366 (package-with-python2 python-flasgger))
16367
16368 (define-public python-swagger-spec-validator
16369 (package
16370 (name "python-swagger-spec-validator")
16371 (version "2.4.3")
16372 (source
16373 (origin
16374 (method url-fetch)
16375 (uri (pypi-uri "swagger-spec-validator" version))
16376 (sha256
16377 (base32
16378 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16379 (build-system python-build-system)
16380 (propagated-inputs
16381 `(("python-jsonschema" ,python-jsonschema)
16382 ("python-pyyaml" ,python-pyyaml)
16383 ("python-six" ,python-six)))
16384 (home-page
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)))
16390
16391 (define-public python2-swagger-spec-validator
16392 (package-with-python2 python-swagger-spec-validator))
16393
16394 (define-public python-apache-libcloud
16395 (package
16396 (name "python-apache-libcloud")
16397 (version "3.1.0")
16398 (source
16399 (origin
16400 (method url-fetch)
16401 (uri (pypi-uri "apache-libcloud" version))
16402 (sha256
16403 (base32
16404 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16405 (build-system python-build-system)
16406 (arguments
16407 `(#:phases
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")
16413 "/bin/ssh" "'")))
16414 #t))
16415 (add-after 'unpack 'patch-tests
16416 (lambda _
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"))
16421 #t))
16422 (add-before 'check 'copy-secret
16423 (lambda _
16424 (copy-file "libcloud/test/secrets.py-dist"
16425 "libcloud/test/secrets.py")
16426 #t)))))
16427 (inputs
16428 `(("openssh" ,openssh)))
16429 (propagated-inputs
16430 `(("python-paramiko" ,python-paramiko)
16431 ("python-requests" ,python-requests)))
16432 (native-inputs
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)))
16443
16444 (define-public python2-apache-libcloud
16445 (package-with-python2 python-apache-libcloud))
16446
16447 (define-public python-smmap
16448 (package
16449 (name "python-smmap")
16450 (version "3.0.1")
16451 (source
16452 (origin
16453 (method url-fetch)
16454 (uri (pypi-uri "smmap" version))
16455 (sha256
16456 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16457 (build-system python-build-system)
16458 (native-inputs
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)))
16465
16466 (define-public python-smmap2
16467 (deprecated-package "python-smmap2" python-smmap))
16468
16469 (define-public python2-smmap
16470 (package-with-python2 python-smmap))
16471
16472 (define-public python2-smmap2
16473 (deprecated-package "python2-smmap2" python2-smmap))
16474
16475 (define-public python-regex
16476 (package
16477 (name "python-regex")
16478 (version "2020.6.8")
16479 (source (origin
16480 (method url-fetch)
16481 (uri (pypi-uri "regex" version))
16482 (sha256
16483 (base32
16484 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16485 (build-system python-build-system)
16486 (arguments
16487 '(#:phases
16488 (modify-phases %standard-phases
16489 (replace 'check
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)))
16500
16501 (define-public python2-regex
16502 (package-with-python2 python-regex))
16503
16504 (define-public python-pyopengl
16505 (package
16506 (name "python-pyopengl")
16507 (version "3.1.5")
16508 (source
16509 (origin
16510 (method url-fetch)
16511 (uri (pypi-uri "PyOpenGL" version))
16512 (sha256
16513 (base32
16514 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16515 (build-system python-build-system)
16516 (inputs
16517 `(("mesa" ,mesa)
16518 ("freeglut" ,freeglut)
16519 ("glu" ,glu)))
16520 (arguments
16521 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16522 ;attribute 'OSMesa'
16523 #:phases
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")
16530 (("'GL'")
16531 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16532 (("'GLU'")
16533 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16534 (("'glut',")
16535 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16536 (("'GLESv1_CM'")
16537 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16538 (("'GLESv2'")
16539 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16540 ;; Not providing libgle. It seems to be very old.
16541 #t)))))
16542 (home-page "http://pyopengl.sourceforge.net")
16543 (synopsis "Standard OpenGL bindings for Python")
16544 (description
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}
16547 library.")
16548 (license license:bsd-3)))
16549
16550 (define-public python-pyopengl-accelerate
16551 (package
16552 (inherit python-pyopengl)
16553 (name "python-pyopengl-accelerate")
16554 (version "3.1.5")
16555 (source
16556 (origin
16557 (method url-fetch)
16558 (uri (pypi-uri "PyOpenGL-accelerate" version))
16559 (sha256
16560 (base32
16561 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16562 (inputs
16563 `(("mesa" ,mesa)
16564 ("python-numpy" ,python-numpy))) ; for cython module
16565 ; numpy_formathandler, thus not propagated
16566 (arguments
16567 `(#:tests? #f
16568 #:phases
16569 (modify-phases %standard-phases
16570 (delete 'fix-paths))))
16571 (synopsis "Acceleration code for PyOpenGL")
16572 (description
16573 "This is the Cython-coded accelerator module for PyOpenGL.")))
16574
16575 (define-public python-rencode
16576 (package
16577 (name "python-rencode")
16578 (version "1.0.5")
16579 (source
16580 (origin
16581 (method url-fetch)
16582 (uri (pypi-uri "rencode" version))
16583 (sha256
16584 (base32
16585 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16586 (build-system python-build-system)
16587 (arguments
16588 `(#:phases
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.
16593 (lambda _
16594 (delete-file "rencode/t.py")
16595 #t)))))
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")
16600 (description
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)))
16608
16609 (define-public python2-rencode
16610 (package-with-python2 python-rencode))
16611
16612 (define-public python-xenon
16613 (package
16614 (name "python-xenon")
16615 (version "0.7.0")
16616 (source
16617 (origin
16618 (method url-fetch)
16619 (uri (pypi-uri "xenon" version))
16620 (sha256
16621 (base32
16622 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16623 (build-system python-build-system)
16624 (native-inputs
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)))
16630 (arguments
16631 `(#:tests? #f ;test suite not shipped with the PyPI archive
16632 #:phases
16633 (modify-phases %standard-phases
16634 (add-before 'build 'patch-test-requirements
16635 (lambda _
16636 ;; Remove httpretty dependency for tests.
16637 (substitute* "setup.py"
16638 (("httpretty") ""))
16639 #t)))))
16640 (home-page "https://xenon.readthedocs.org/")
16641 (synopsis "Monitor code metrics for Python on your CI server")
16642 (description
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)))
16649
16650 (define-public python2-xenon
16651 (package-with-python2 python-xenon))
16652
16653 (define-public python-pysocks
16654 (package
16655 (name "python-pysocks")
16656 (version "1.7.1")
16657 (source
16658 (origin
16659 (method url-fetch)
16660 (uri (pypi-uri "PySocks" version))
16661 (sha256
16662 (base32
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)))
16671
16672 (define-public python2-pysocks
16673 (package-with-python2 python-pysocks))
16674
16675 (define-public python-pydiff
16676 (package
16677 (name "python-pydiff")
16678 (version "0.2")
16679 (source
16680 (origin
16681 (method url-fetch)
16682 (uri (pypi-uri "pydiff" version))
16683 (sha256
16684 (base32
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")
16689 (description
16690 "@code{pydiff} makes it easy to look for actual code changes while
16691 ignoring formatting changes.")
16692 (license license:expat)))
16693
16694 (define-public python2-pydiff
16695 (package-with-python2 python-pydiff))
16696
16697 (define-public python-pydub
16698 (package
16699 (name "python-pydub")
16700 (version "0.24.1")
16701 (source
16702 (origin
16703 (method url-fetch)
16704 (uri (pypi-uri "pydub" version))
16705 (sha256
16706 (base32
16707 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
16708 (build-system python-build-system)
16709 (arguments
16710 `(#:phases
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"))
16723 #t))))))
16724 (home-page "https://pydub.com")
16725 (inputs
16726 `(("ffmpeg" ,ffmpeg)))
16727 (propagated-inputs
16728 `(("python-scipy" ,python-scipy)))
16729 (synopsis "Manipulate audio with a high level interface in Python")
16730 (description
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
16734
16735 (define-public python-tqdm
16736 (package
16737 (name "python-tqdm")
16738 (version "4.43.0")
16739 (source
16740 (origin
16741 (method url-fetch)
16742 (uri (pypi-uri "tqdm" version))
16743 (sha256
16744 (base32
16745 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
16746 (build-system python-build-system)
16747 (arguments
16748 '(#:phases (modify-phases %standard-phases
16749 (replace 'check
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/"))))))
16755 (native-inputs
16756 `(("python-nose" ,python-nose)))
16757 (home-page "https://github.com/tqdm/tqdm")
16758 (synopsis "Fast, extensible progress meter")
16759 (description
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))))
16764
16765 (define-public python2-tqdm
16766 (package-with-python2 python-tqdm))
16767
16768 (define-public python-pkginfo
16769 (package
16770 (name "python-pkginfo")
16771 (version "1.4.2")
16772 (source
16773 (origin
16774 (method url-fetch)
16775 (uri (pypi-uri "pkginfo" version))
16776 (sha256
16777 (base32
16778 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
16779 (build-system python-build-system)
16780 (arguments
16781 ;; The tests are broken upstream.
16782 '(#:tests? #f))
16783 (home-page
16784 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16785 (synopsis
16786 "Query metadatdata from sdists, bdists, and installed packages")
16787 (description
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)))
16794
16795 (define-public python2-pkginfo
16796 (package-with-python2 python-pkginfo))
16797
16798 (define-public python-twine
16799 (package
16800 (name "python-twine")
16801 (version "1.15.0")
16802 (source
16803 (origin
16804 (method url-fetch)
16805 (uri (pypi-uri "twine" version))
16806 (sha256
16807 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
16808 (build-system python-build-system)
16809 (propagated-inputs
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")
16818 (description
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)))
16823
16824 (define-public python2-twine
16825 (package-with-python2 python-twine))
16826
16827 (define-public python-linecache2
16828 (package
16829 (name "python-linecache2")
16830 (version "1.0.0")
16831 (source
16832 (origin
16833 (method url-fetch)
16834 (uri (pypi-uri "linecache2" version))
16835 (sha256
16836 (base32
16837 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16838 (build-system python-build-system)
16839 (arguments
16840 `(;; The tests depend on unittest2, and our version is a bit too old.
16841 #:tests? #f))
16842 (native-inputs
16843 `(("python-pbr" ,python-pbr-minimal)))
16844 (home-page
16845 "https://github.com/testing-cabal/linecache2")
16846 (synopsis "Backports of the linecache module")
16847 (description
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)))
16852
16853 (define-public python2-linecache2
16854 (package-with-python2 python-linecache2))
16855
16856 (define-public python-traceback2
16857 (package
16858 (name "python-traceback2")
16859 (version "1.4.0")
16860 (source
16861 (origin
16862 (method url-fetch)
16863 (uri (pypi-uri "traceback2" version))
16864 (sha256
16865 (base32
16866 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16867 (build-system python-build-system)
16868 (arguments
16869 `(;; python-traceback2 and python-unittest2 depend on one another.
16870 #:tests? #f))
16871 (native-inputs
16872 `(("python-pbr" ,python-pbr-minimal)))
16873 (propagated-inputs
16874 `(("python-linecache2" ,python-linecache2)))
16875 (home-page
16876 "https://github.com/testing-cabal/traceback2")
16877 (synopsis "Backports of the traceback module")
16878 (description
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)))
16883
16884 (define-public python2-traceback2
16885 (package-with-python2 python-traceback2))
16886
16887 (define-public python-ratelimiter
16888 (package
16889 (name "python-ratelimiter")
16890 (version "1.2.0")
16891 (source
16892 (origin
16893 (method url-fetch)
16894 (uri (pypi-uri "ratelimiter" version))
16895 (sha256
16896 (base32
16897 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
16898 (build-system python-build-system)
16899 (arguments
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")
16903 (description
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)))
16907
16908 (define-public python2-ratelimiter
16909 (package-with-python2 python-ratelimiter))
16910
16911 (define-public python-dukpy
16912 (package
16913 (name "python-dukpy")
16914 (version "0.3")
16915 (source
16916 (origin
16917 (method git-fetch)
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))
16922 (sha256
16923 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
16924 (build-system python-build-system)
16925 (home-page "https://github.com/kovidgoyal/dukpy")
16926 (synopsis "Run JavaScript in python")
16927 (description
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))))
16933
16934 (define-public python2-dukpy
16935 (package-with-python2 python-dukpy))
16936
16937 (define-public python-jsonrpclib-pelix
16938 (package
16939 (name "python-jsonrpclib-pelix")
16940 (version "0.3.2")
16941 (source
16942 (origin
16943 (method url-fetch)
16944 (uri (pypi-uri "jsonrpclib-pelix" version))
16945 (sha256
16946 (base32
16947 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
16948 (build-system python-build-system)
16949 (arguments
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")
16953 (description
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
16957 services.")
16958 (license license:asl2.0)))
16959
16960 (define-public python2-jsonrpclib-pelix
16961 (package-with-python2 python-jsonrpclib-pelix))
16962
16963 (define-public python-setuptools-scm-git-archive
16964 (package
16965 (name "python-setuptools-scm-git-archive")
16966 (version "1.0")
16967 (source
16968 (origin
16969 (method url-fetch)
16970 (uri (pypi-uri "setuptools_scm_git_archive" version))
16971 (sha256
16972 (base32
16973 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
16974 (build-system python-build-system)
16975 (native-inputs
16976 `(("python-pytest" ,python-pytest)))
16977 (propagated-inputs
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")
16981 (description
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)))
16986
16987 (define-public python2-setuptools-scm-git-archive
16988 (package-with-python2 python-setuptools-scm-git-archive))
16989
16990 (define-public python-setuptools-git
16991 (package
16992 (name "python-setuptools-git")
16993 (version "1.2")
16994 (source
16995 (origin
16996 (method url-fetch)
16997 (uri (pypi-uri "setuptools-git" version))
16998 (sha256
16999 (base32
17000 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17001 (build-system python-build-system)
17002 (arguments
17003 `(#:phases
17004 (modify-phases %standard-phases
17005 ;; This is needed for tests.
17006 (add-after 'unpack 'configure-git
17007 (lambda _
17008 (setenv "HOME" "/tmp")
17009 (invoke "git" "config" "--global" "user.email" "guix")
17010 (invoke "git" "config" "--global" "user.name" "guix")
17011 #t)))))
17012 (native-inputs
17013 `(("git" ,git-minimal)))
17014 (home-page "https://github.com/msabramo/setuptools-git")
17015 (synopsis "Setuptools revision control system plugin for Git")
17016 (description
17017 "This package provides a plugin for Setuptools for revision control with
17018 Git.")
17019 (license license:bsd-3)))
17020
17021 (define-public python-pyclipper
17022 (package
17023 (name "python-pyclipper")
17024 (version "1.1.0.post3")
17025 (source
17026 (origin
17027 (method url-fetch)
17028 (uri (pypi-uri "pyclipper" version ".zip"))
17029 (sha256
17030 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17031 (modules '((guix build utils)))
17032 (snippet
17033 '(begin
17034 ;; This file is generated by Cython.
17035 (delete-file "pyclipper/pyclipper.cpp") #t))))
17036 (build-system python-build-system)
17037 (arguments
17038 `(#:phases
17039 (modify-phases %standard-phases
17040 (add-before 'build 'cythonize-sources
17041 (lambda _
17042 (with-directory-excursion "pyclipper"
17043 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17044 (propagated-inputs
17045 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17046 (native-inputs
17047 `(("python-cython" ,python-cython)
17048 ("python-pytest" ,python-pytest)
17049 ("python-pytest-runner" ,python-pytest-runner)
17050 ("python-unittest2" ,python-unittest2)
17051 ("unzip" ,unzip)))
17052 (home-page "https://github.com/greginvm/pyclipper")
17053 (synopsis "Wrapper for Angus Johnson's Clipper library")
17054 (description
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)))
17058
17059 (define-public python2-pyclipper
17060 (package-with-python2 python-pyclipper))
17061
17062 (define-public python2-booleanoperations
17063 (package
17064 (name "python2-booleanoperations")
17065 (version "0.7.1")
17066 (source
17067 (origin
17068 (method url-fetch)
17069 (uri (pypi-uri "booleanOperations" version ".zip"))
17070 (sha256
17071 (base32
17072 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17073 (build-system python-build-system)
17074 (arguments
17075 `(#:python ,python-2))
17076 (native-inputs
17077 `(("unzip" ,unzip)
17078 ("python2-pytest" ,python2-pytest)
17079 ("python2-pytest-runner" ,python2-pytest-runner)))
17080 (propagated-inputs
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")
17086 (description
17087 "BooleanOperations provides a Python library that enables
17088 boolean operations on paths.")
17089 (license license:expat)))
17090
17091 (define-public python-tempdir
17092 (package
17093 (name "python-tempdir")
17094 (version "0.7.1")
17095 (source
17096 (origin
17097 (method url-fetch)
17098 (uri (pypi-uri "tempdir" version))
17099 (sha256
17100 (base32
17101 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17102 (build-system python-build-system)
17103 (home-page "https://pypi.org/project/tempdir/")
17104 (arguments
17105 ;; the package has no tests
17106 '(#:tests? #f))
17107 (synopsis "Python library for managing temporary directories")
17108 (description
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)))
17113
17114 (define-public python2-tempdir
17115 (package-with-python2 python-tempdir))
17116
17117 (define-public python-activepapers
17118 (package
17119 (name "python-activepapers")
17120 (version "0.2.2")
17121 (source
17122 (origin
17123 (method url-fetch)
17124 (uri (pypi-uri "ActivePapers.Py" version))
17125 (sha256
17126 (base32
17127 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17128 (build-system python-build-system)
17129 (arguments
17130 `(#:modules ((ice-9 ftw)
17131 (srfi srfi-1)
17132 (guix build utils)
17133 (guix build python-build-system))
17134
17135 #:phases
17136 (modify-phases %standard-phases
17137 (add-after 'unpack 'delete-python2-code
17138 (lambda _
17139 (for-each delete-file
17140 '("lib/activepapers/builtins2.py"
17141 "lib/activepapers/standardlib2.py"
17142 "lib/activepapers/utility2.py"))))
17143 (replace 'check
17144 (lambda _
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)))
17153 (scandir "tests"
17154 (lambda (filename)
17155 (string-suffix? ".py" filename)))))))))
17156 (native-inputs
17157 `(("python-tempdir" ,python-tempdir)
17158 ("python-nose" ,python-nose)))
17159 (propagated-inputs
17160 `(("python-h5py" ,python-h5py)))
17161 (home-page "https://www.activepapers.org/")
17162 (synopsis "Executable papers for scientific computing")
17163 (description
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)))
17170
17171 (define-public python2-activepapers
17172 (let ((base (package-with-python2
17173 (strip-python2-variant python-activepapers))))
17174 (package
17175 (inherit base)
17176 (arguments
17177 (substitute-keyword-arguments (package-arguments base)
17178 ((#:phases phases)
17179 `(modify-phases ,phases
17180 (delete 'delete-python2-code)
17181 (add-after 'unpack 'delete-python3-code
17182 (lambda _
17183 (for-each delete-file
17184 '("lib/activepapers/builtins3.py"
17185 "lib/activepapers/standardlib3.py"
17186 "lib/activepapers/utility3.py")))))))))))
17187
17188 (define-public python-semver
17189 (package
17190 (name "python-semver")
17191 (version "2.9.0")
17192 (source
17193 (origin
17194 (method url-fetch)
17195 (uri (pypi-uri "semver" version))
17196 (sha256
17197 (base32
17198 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17199 (build-system python-build-system)
17200 (native-inputs
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)))
17213
17214 (define-public python2-semver
17215 (package-with-python2 python-semver))
17216
17217 (define-public python-pyro4
17218 (package
17219 (name "python-pyro4")
17220 (version "4.77")
17221 (source
17222 (origin
17223 (method url-fetch)
17224 (uri (pypi-uri "Pyro4" version))
17225 (sha256
17226 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17227 (build-system python-build-system)
17228 (arguments
17229 '(#:tests? #f)) ;FIXME: Some tests require network access.
17230 (native-inputs
17231 `(("python-cloudpickle" ,python-cloudpickle)
17232 ("python-dill" ,python-dill)
17233 ("python-msgpack" ,python-msgpack)))
17234 (propagated-inputs
17235 `(("python-serpent" ,python-serpent)))
17236 (home-page "https://pyro4.readthedocs.io")
17237 (synopsis "Distributed object middleware for Python")
17238 (description
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)))
17243
17244 (define-public python2-pyro
17245 (package
17246 (name "python2-pyro")
17247 (version "3.16")
17248 (source
17249 (origin
17250 (method url-fetch)
17251 (uri (pypi-uri "Pyro" version))
17252 (file-name (string-append "Pyro-" version ".tar.gz"))
17253 (sha256
17254 (base32
17255 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17256 (build-system python-build-system)
17257 (arguments
17258 ;; Pyro is not compatible with Python 3
17259 `(#:python ,python-2
17260 ;; Pyro has no test cases for automatic execution
17261 #:tests? #f))
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)))
17272
17273 (define-public python2-scientific
17274 (package
17275 (name "python2-scientific")
17276 (version "2.9.4")
17277 (source
17278 (origin
17279 (method git-fetch)
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))
17284 (sha256
17285 (base32
17286 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17287 (build-system python-build-system)
17288 (inputs
17289 `(("netcdf" ,netcdf)))
17290 (propagated-inputs
17291 `(("python-numpy" ,python2-numpy-1.8)
17292 ("python-pyro" ,python2-pyro)))
17293 (arguments
17294 ;; ScientificPython is not compatible with Python 3
17295 `(#:python ,python-2
17296 #:tests? #f ; No test suite
17297 #:phases
17298 (modify-phases %standard-phases
17299 (replace 'build
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)))
17312
17313 (define-public python2-mmtk
17314 (package
17315 (name "python2-mmtk")
17316 (version "2.7.12")
17317 (source
17318 (origin
17319 (method git-fetch)
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))
17324 (sha256
17325 (base32
17326 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17327 (build-system python-build-system)
17328 (native-inputs
17329 `(("netcdf" ,netcdf)))
17330 (propagated-inputs
17331 `(("python-scientific" ,python2-scientific)
17332 ("python-tkinter" ,python-2 "tk")))
17333 (arguments
17334 `(#:python ,python-2
17335 #:tests? #f
17336 #:phases
17337 (modify-phases %standard-phases
17338 (add-before 'build 'includes-from-scientific
17339 (lambda* (#:key inputs #:allow-other-keys)
17340 (mkdir-p "Include/Scientific")
17341 (copy-recursively
17342 (string-append
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)))
17354
17355 (define-public python-phonenumbers
17356 (package
17357 (name "python-phonenumbers")
17358 (version "8.9.1")
17359 (source
17360 (origin
17361 (method url-fetch)
17362 (uri (pypi-uri "phonenumbers" version))
17363 (sha256
17364 (base32
17365 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17366 (build-system python-build-system)
17367 (home-page
17368 "https://github.com/daviddrysdale/python-phonenumbers")
17369 (synopsis
17370 "Python library for dealing with international phone numbers")
17371 (description
17372 "This package provides a Python port of Google's libphonenumber library.")
17373 (license license:asl2.0)))
17374
17375 (define-public python2-phonenumbers
17376 (package-with-python2 python-phonenumbers))
17377
17378 (define-public python-send2trash
17379 (package
17380 (name "python-send2trash")
17381 (version "1.5.0")
17382 (source
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")
17387 (commit version)))
17388 (file-name (git-file-name name version))
17389 (sha256
17390 (base32
17391 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17392 (build-system python-build-system)
17393 (arguments
17394 '(#:phases
17395 (modify-phases %standard-phases
17396 (add-before 'check 'pre-check
17397 (lambda _
17398 (mkdir-p "/tmp/foo")
17399 (setenv "HOME" "/tmp/foo")
17400 #t)))))
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)))
17407
17408 (define-public python2-send2trash
17409 (package
17410 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17411 (arguments
17412 (substitute-keyword-arguments (package-arguments python-send2trash)
17413 ((#:phases phases)
17414 `(modify-phases ,phases
17415 (add-before 'check 'setenv
17416 (lambda _
17417 (setenv "PYTHONPATH"
17418 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17419 #t))))))))
17420
17421 (define-public python-pyfavicon
17422 (package
17423 (name "python-pyfavicon")
17424 (version "0.1.1")
17425 (source
17426 (origin
17427 (method url-fetch)
17428 (uri (pypi-uri "pyfavicon" version))
17429 (sha256
17430 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17431 (build-system python-build-system)
17432 (arguments
17433 ;; There are no tests in the PyPI tarball and the tests from the
17434 ;; repository require online data.
17435 '(#:tests? #f))
17436 (propagated-inputs
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")
17442 (description
17443 "@code{pyfavicon} is an async favicon fetcher.")
17444 (license license:expat)))
17445
17446 (define-public python-yapf
17447 (package
17448 (name "python-yapf")
17449 (version "0.29.0")
17450 (source
17451 (origin
17452 (method url-fetch)
17453 (uri (pypi-uri "yapf" version))
17454 (sha256
17455 (base32
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)))
17465
17466 (define-public python2-yapf
17467 (package-with-python2 python-yapf))
17468
17469 (define-public python-yq
17470 (package
17471 (name "python-yq")
17472 (version "2.11.1")
17473 (source
17474 (origin
17475 (method url-fetch)
17476 (uri (pypi-uri "yq" version))
17477 (sha256
17478 (base32
17479 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17480 (build-system python-build-system)
17481 (arguments
17482 '(#:phases
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")
17488 (string-append
17489 "Popen([\""
17490 (assoc-ref inputs "jq")
17491 "/bin/jq")))
17492 #t)))))
17493 (inputs
17494 `(("python-argcomplete" ,python-argcomplete)
17495 ("python-pyyaml" ,python-pyyaml)
17496 ("python-xmltodict" ,python-xmltodict)
17497 ("jq" ,jq)))
17498 (native-inputs
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")
17504 (description
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)))
17509
17510 (define-public python-gyp
17511 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17512 (revision "0"))
17513 (package
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))
17518 (source
17519 (origin
17520 ;; Google does not release tarballs,
17521 ;; git checkout is needed.
17522 (method git-fetch)
17523 (uri (git-reference
17524 (url "https://chromium.googlesource.com/external/gyp")
17525 (commit commit)))
17526 (file-name (git-file-name name version))
17527 (sha256
17528 (base32
17529 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17530 (build-system python-build-system)
17531 (home-page "https://gyp.gsrc.io/")
17532 (synopsis "GYP is a Meta-Build system")
17533 (description
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))))
17538
17539 (define-public python2-gyp
17540 (package-with-python2 python-gyp))
17541
17542 (define-public python-whatever
17543 (package
17544 (name "python-whatever")
17545 (version "0.6")
17546 (source
17547 (origin
17548 (method git-fetch)
17549 (uri (git-reference
17550 (url "https://github.com/Suor/whatever")
17551 (commit version)))
17552 (file-name (git-file-name name version))
17553 (sha256
17554 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17555 (build-system python-build-system)
17556 (arguments
17557 `(#:phases
17558 (modify-phases %standard-phases
17559 (replace 'check
17560 (lambda _
17561 (invoke "py.test"))))))
17562 (native-inputs
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)))
17569
17570 (define-public python2-whatever
17571 (package-with-python2 python-whatever))
17572
17573 (define-public python-funcy
17574 (package
17575 (name "python-funcy")
17576 (version "1.11")
17577 (source
17578 (origin
17579 (method git-fetch)
17580 (uri (git-reference
17581 (url "https://github.com/Suor/funcy")
17582 (commit version)))
17583 (sha256
17584 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17585 (file-name (git-file-name name version))))
17586 (build-system python-build-system)
17587 (arguments
17588 `(#:phases
17589 (modify-phases %standard-phases
17590 (replace 'check
17591 (lambda _
17592 (invoke "py.test"))))))
17593 (native-inputs
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.
17599 Examples are:
17600 @enumerate
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
17619 @end enumerate")
17620 (license license:bsd-3)))
17621
17622 (define-public python2-funcy
17623 (package-with-python2 python-funcy))
17624
17625 (define-public python-isoweek
17626 (package
17627 (name "python-isoweek")
17628 (version "1.3.3")
17629 (source
17630 (origin
17631 (method url-fetch)
17632 (uri (pypi-uri "isoweek" version))
17633 (sha256
17634 (base32
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)))
17644
17645 (define-public python2-isoweek
17646 (package-with-python2 python-isoweek))
17647
17648 (define-public python-pyzbar
17649 (package
17650 (name "python-pyzbar")
17651 (version "0.1.8")
17652 (source
17653 (origin
17654 ;; There's no source tarball on PyPI.
17655 (method git-fetch)
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))
17660 (sha256
17661 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
17662 (build-system python-build-system)
17663 (arguments
17664 `(#:phases
17665 (modify-phases %standard-phases
17666 (add-after 'unpack 'remove-failing-test
17667 (lambda _
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")
17671 #t))
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'")))
17678 #t))))))
17679 (native-inputs
17680 `(("pkg-config" ,pkg-config)
17681 ("python-numpy" ,python-numpy)
17682 ("python-pillow" ,python-pillow)))
17683 (inputs
17684 `(("zbar" ,zbar)))
17685 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
17686 (synopsis "Read one-dimensional barcodes and QR codes")
17687 (description
17688 "Read one-dimensional barcodes and QR codes using the zbar library.
17689
17690 Features:
17691
17692 @itemize
17693 @item Pure python
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
17697 @end itemize")
17698 (license license:expat)))
17699
17700 (define-public python-tokenize-rt
17701 (package
17702 (name "python-tokenize-rt")
17703 (version "2.0.1")
17704 (source
17705 (origin
17706 (method url-fetch)
17707 (uri (pypi-uri "tokenize-rt" version))
17708 (sha256
17709 (base32
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.")
17714 (description
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)))
17720
17721 (define-public python-future-fstrings
17722 (package
17723 (name "python-future-fstrings")
17724 (version "0.4.1")
17725 (source
17726 (origin
17727 (method url-fetch)
17728 (uri (pypi-uri "future_fstrings" version))
17729 (sha256
17730 (base32
17731 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
17732 (build-system python-build-system)
17733 (propagated-inputs
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")
17737 (description
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)))
17743
17744 (define-public python-typed-ast
17745 (package
17746 (name "python-typed-ast")
17747 (version "1.4.0")
17748 (source
17749 (origin
17750 (method git-fetch)
17751 (uri (git-reference
17752 (url "https://github.com/python/typed_ast")
17753 (commit version)))
17754 (sha256
17755 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
17756 (file-name (git-file-name name version))))
17757 (build-system python-build-system)
17758 (arguments
17759 `(#:modules ((guix build utils)
17760 (guix build python-build-system)
17761 (ice-9 ftw)
17762 (srfi srfi-1)
17763 (srfi srfi-26))
17764 #:phases
17765 (modify-phases %standard-phases
17766 (replace 'check
17767 (lambda _
17768 (let ((cwd (getcwd)))
17769 (setenv "PYTHONPATH"
17770 (string-append cwd "/build/"
17771 (find (cut string-prefix? "lib" <>)
17772 (scandir (string-append cwd "/build")))
17773 ":"
17774 (getenv "PYTHONPATH"))))
17775 (invoke "pytest")
17776 #t)))))
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
17788 license:asl2.0
17789 license:expat)))) ;ast27/Parser/spark.py
17790
17791 (define-public python-typing
17792 (package
17793 (name "python-typing")
17794 (version "3.7.4.3")
17795 (source
17796 (origin
17797 (method url-fetch)
17798 (uri (pypi-uri "typing" version))
17799 (sha256
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
17809 and other tools.")
17810 (license license:psfl)))
17811
17812 (define-public python2-typing
17813 (package-with-python2 python-typing))
17814
17815 (define-public python-typing-extensions
17816 (package
17817 (name "python-typing-extensions")
17818 (version "3.7.4.2")
17819 (source
17820 (origin
17821 (method url-fetch)
17822 (uri (pypi-uri "typing_extensions" version))
17823 (sha256
17824 (base32
17825 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
17826 (build-system python-build-system)
17827 (home-page
17828 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
17829 (synopsis "Experimental type hints for Python")
17830 (description
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:
17834 @enumerate
17835 @item ClassVar
17836 @item ContextManager
17837 @item Counter
17838 @item DefaultDict
17839 @item Deque
17840 @item NewType
17841 @item NoReturn
17842 @item overload
17843 @item Protocol
17844 @item runtime
17845 @item Text
17846 @item Type
17847 @item TYPE_CHECKING
17848 @item AsyncGenerator
17849 @end enumerate\n")
17850 (license license:psfl)))
17851
17852 (define-public bpython
17853 (package
17854 (name "bpython")
17855 (version "0.18")
17856 (source
17857 (origin
17858 (method url-fetch)
17859 (uri (pypi-uri "bpython" version))
17860 (sha256
17861 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
17862 (build-system python-build-system)
17863 (arguments
17864 `(#:phases
17865 (modify-phases %standard-phases
17866 (add-after 'unpack 'remove-failing-test
17867 (lambda _
17868 ;; Remove failing test. FIXME: make it pass
17869 (delete-file "bpython/test/test_args.py")
17870 #t))
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")))
17875 (for-each
17876 (lambda (old new)
17877 (symlink old (string-append out "/bin/" new)))
17878 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
17879 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
17880 #t)))))
17881 (propagated-inputs
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)))
17889 (native-inputs
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
17896
17897 @enumerate
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
17902 re-evaluate,
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.
17906 @end enumerate")
17907 (license license:expat)))
17908
17909 (define-public bpython2
17910 (let ((base (package-with-python2
17911 (strip-python2-variant bpython))))
17912 (package (inherit base)
17913 (name "bpython2")
17914 (arguments
17915 `(#:python ,python-2
17916 #:phases
17917 (modify-phases %standard-phases
17918 (add-after 'unpack 'remove-failing-test
17919 (lambda _
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
17923 ;; discovered)
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)))
17929 #t))
17930 (add-before 'build 'rename-scripts
17931 ;; rename the scripts to bypthon2, bpdb2, etc.
17932 (lambda _
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")))
17938 #t))))))))
17939
17940 (define-public python-pyinotify
17941 (package
17942 (name "python-pyinotify")
17943 (version "0.9.6")
17944 (source (origin
17945 (method url-fetch)
17946 (uri (pypi-uri "pyinotify" version))
17947 (sha256
17948 (base32
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")
17954 (description
17955 "@code{pyinotify} provides a Python interface for monitoring
17956 file system events on Linux.")
17957 (license license:expat)))
17958
17959 (define-public python2-pyinotify
17960 (package-with-python2 python-pyinotify))
17961
17962 ;; Ada parser uses this version.
17963 (define-public python2-quex-0.67.3
17964 (package
17965 (name "python2-quex")
17966 (version "0.67.3")
17967 (source
17968 (origin
17969 (method url-fetch)
17970 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
17971 (version-major+minor version)
17972 "/quex-" version ".zip"))
17973 (sha256
17974 (base32
17975 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
17976 (build-system python-build-system)
17977 (native-inputs
17978 `(("unzip" ,unzip)))
17979 (arguments
17980 `(#:python ,python-2
17981 #:tests? #f
17982 #:phases
17983 (modify-phases %standard-phases
17984 (delete 'configure)
17985 (delete 'build)
17986 (replace 'install
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)
17992 (mkdir-p bin)
17993 (symlink (string-append share/quex "/quex-exe.py")
17994 (string-append bin "/quex"))
17995 #t))))))
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
18004
18005 (define-public python2-quex
18006 (package (inherit python2-quex-0.67.3)
18007 (name "python2-quex")
18008 (version "0.68.1")
18009 (source
18010 (origin
18011 (method url-fetch)
18012 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18013 (sha256
18014 (base32
18015 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18016 (file-name (string-append name "-" version ".tar.gz"))))))
18017
18018 (define-public python-more-itertools
18019 (package
18020 (name "python-more-itertools")
18021 (version "8.2.0")
18022 (source
18023 (origin
18024 (method url-fetch)
18025 (uri (pypi-uri "more-itertools" version))
18026 (sha256
18027 (base32
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)))
18038
18039 ;; The 5.x series are the last versions supporting Python 2.7.
18040 (define-public python2-more-itertools
18041 (package
18042 (inherit python-more-itertools)
18043 (name "python2-more-itertools")
18044 (version "5.0.0")
18045 (source (origin
18046 (method url-fetch)
18047 (uri (pypi-uri "more-itertools" version))
18048 (sha256
18049 (base32
18050 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18051 (arguments
18052 `(#:python ,python-2))
18053 (propagated-inputs
18054 `(("python2-six" ,python2-six-bootstrap)))))
18055
18056 (define-public python-latexcodec
18057 (package
18058 (name "python-latexcodec")
18059 (version "1.0.7")
18060 (source
18061 (origin
18062 (method url-fetch)
18063 (uri (pypi-uri "latexcodec" version))
18064 (sha256
18065 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18066 (build-system python-build-system)
18067 (inputs
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)))
18073
18074 (define-public python-pybtex
18075 (package
18076 (name "python-pybtex")
18077 (version "0.22.2")
18078 (source
18079 (origin
18080 (method url-fetch)
18081 (uri (pypi-uri "pybtex" version))
18082 (sha256
18083 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18084 (build-system python-build-system)
18085 (native-inputs
18086 `(("python-nose" ,python-nose)))
18087 (inputs
18088 `(("python-latexcodec" ,python-latexcodec)
18089 ("python-pyyaml" ,python-pyyaml)
18090 ("python-six" ,python-six)))
18091 (arguments
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)))
18098
18099 (define-public python-onetimepass
18100 (package
18101 (name "python-onetimepass")
18102 (version "1.0.1")
18103 (source
18104 (origin
18105 (method url-fetch)
18106 (uri (pypi-uri "onetimepass" version))
18107 (sha256
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)))
18116
18117 (define-public python-parso
18118 (package
18119 (name "python-parso")
18120 (version "0.7.1")
18121 (source
18122 (origin
18123 (method url-fetch)
18124 (uri (pypi-uri "parso" version))
18125 (sha256
18126 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18127 (native-inputs
18128 `(("python-pytest" ,python-pytest)))
18129 (build-system python-build-system)
18130 (arguments
18131 `(#:phases (modify-phases %standard-phases
18132 (replace 'check
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)))
18140
18141 (define-public python2-parso
18142 (package-with-python2 python-parso))
18143
18144 (define-public python-async-generator
18145 (package
18146 (name "python-async-generator")
18147 (version "1.10")
18148 (source
18149 (origin
18150 (method url-fetch)
18151 (uri (pypi-uri "async_generator" version))
18152 (sha256
18153 (base32
18154 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18155 (build-system python-build-system)
18156 (native-inputs
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.")
18162 ;; Dual licensed.
18163 (license (list license:expat license:asl2.0))))
18164
18165 (define-public python-async-timeout
18166 (package
18167 (name "python-async-timeout")
18168 (version "3.0.1")
18169 (source
18170 (origin
18171 (method url-fetch)
18172 (uri (pypi-uri "async-timeout" version))
18173 (sha256
18174 (base32
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)))
18182
18183 (define-public python-glob2
18184 (package
18185 (name "python-glob2")
18186 (version "0.7")
18187 (source
18188 (origin
18189 (method git-fetch)
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))
18194 (sha256
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
18201 adds:
18202
18203 @itemize
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).
18211 @end itemize
18212
18213 Glob2 currently based on the glob code from Python 3.3.1.")
18214 (license license:bsd-2)))
18215
18216 (define-public python2-glob2
18217 (package-with-python2 python-glob2))
18218
18219 (define-public python-gipc
18220 (package
18221 (name "python-gipc")
18222 (version "0.6.0")
18223 (source
18224 (origin
18225 (method url-fetch)
18226 (uri (pypi-uri "gipc" version ".zip"))
18227 (sha256
18228 (base32
18229 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18230 (build-system python-build-system)
18231 (native-inputs
18232 `(("unzip" ,unzip)))
18233 (propagated-inputs
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)))
18242
18243 (define-public python2-gipc
18244 (package-with-python2 python-gipc))
18245
18246 (define-public python-fusepy
18247 (package
18248 (name "python-fusepy")
18249 (version "2.0.4")
18250 (source
18251 (origin
18252 (method url-fetch)
18253 (uri (pypi-uri "fusepy" version))
18254 (sha256
18255 (base32
18256 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18257 (build-system python-build-system)
18258 (arguments
18259 `(#:phases
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'")))
18267 #t))))))
18268 (propagated-inputs
18269 `(("fuse" ,fuse)))
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)))
18275
18276 (define-public python2-fusepy
18277 (package-with-python2 python-fusepy))
18278
18279 (define-public python-fusepyng
18280 (package
18281 (name "python-fusepyng")
18282 (version "1.0.7")
18283 (source
18284 (origin
18285 (method url-fetch)
18286 (uri (pypi-uri "fusepyng" version))
18287 (sha256
18288 (base32
18289 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18290 (build-system python-build-system)
18291 (arguments
18292 '(#:phases
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\""))))
18300 #t)))))
18301 (inputs
18302 `(("fuse" ,fuse)))
18303 (propagated-inputs
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)))
18311
18312 (define-public python2-gdrivefs
18313 (package
18314 (name "python2-gdrivefs")
18315 (version "0.14.9")
18316 (source
18317 (origin
18318 (method url-fetch)
18319 (uri (pypi-uri "gdrivefs" version))
18320 (sha256
18321 (base32
18322 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18323 (build-system python-build-system)
18324 (arguments
18325 `(#:python ,python-2
18326 #:phases
18327 (modify-phases %standard-phases
18328 (add-before 'build 'patch-setup-py
18329 (lambda _
18330 ;; Update requirements from dependency==version
18331 ;; to dependency>=version
18332 (substitute* "gdrivefs/resources/requirements.txt"
18333 (("==") ">="))
18334 #t)))))
18335 (native-inputs
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)))
18343 (propagated-inputs
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)))
18352
18353 (define-public python-userspacefs
18354 (package
18355 (name "python-userspacefs")
18356 (version "1.0.13")
18357 (source
18358 (origin
18359 (method url-fetch)
18360 (uri (pypi-uri "userspacefs" version))
18361 (sha256
18362 (base32
18363 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18364 (build-system python-build-system)
18365 (propagated-inputs
18366 `(("python-fusepyng" ,python-fusepyng)))
18367 (home-page "https://github.com/rianhunter/userspacefs")
18368 (synopsis "User-space file systems for Python")
18369 (description
18370 "@code{userspacefs} is a library that allows you to easily write
18371 user-space file systems in Python.")
18372 (license license:gpl3+)))
18373
18374 (define-public pybind11
18375 (package
18376 (name "pybind11")
18377 (version "2.4.3")
18378 (source (origin
18379 (method git-fetch)
18380 (uri (git-reference
18381 (url "https://github.com/pybind/pybind11")
18382 (commit (string-append "v" version))))
18383 (sha256
18384 (base32
18385 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18386 (file-name (git-file-name name version))))
18387 (build-system cmake-build-system)
18388 (native-inputs
18389 `(("python" ,python-wrapper)
18390
18391 ;; The following dependencies are used for tests.
18392 ("python-pytest" ,python-pytest)
18393 ("catch" ,catch-framework2-1)
18394 ("eigen" ,eigen)))
18395 (arguments
18396 `(#:configure-flags
18397 (list (string-append "-DCATCH_INCLUDE_DIR="
18398 (assoc-ref %build-inputs "catch")
18399 "/include/catch"))
18400
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"
18409 "--root=/"
18410 (string-append "--prefix=" out)))))))
18411
18412 #:test-target "check"))
18413 (home-page "https://github.com/pybind/pybind11/")
18414 (synopsis "Seamless operability between C++11 and Python")
18415 (description
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)))
18422
18423 (define-public python-fasteners
18424 (package
18425 (name "python-fasteners")
18426 (version "0.15")
18427 (source
18428 (origin
18429 (method url-fetch)
18430 (uri (pypi-uri "fasteners" version))
18431 (sha256
18432 (base32
18433 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18434 (build-system python-build-system)
18435 (propagated-inputs
18436 `(("python-monotonic" ,python-monotonic)
18437 ("python-six" ,python-six)))
18438 (native-inputs
18439 `(("python-testtools" ,python-testtools)))
18440 (home-page "https://github.com/harlowja/fasteners")
18441 (synopsis "Python package that provides useful locks")
18442 (description
18443 "This package provides a Python program that provides following locks:
18444
18445 @itemize
18446 @item Locking decorator
18447 @item Reader-writer locks
18448 @item Inter-process locks
18449 @item Generic helpers
18450 @end itemize\n")
18451 (properties `((python2-variant . ,(delay python2-fasteners))))
18452 (license license:asl2.0)))
18453
18454 (define-public python2-fasteners
18455 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18456 (package
18457 (inherit base)
18458 (propagated-inputs
18459 `(("python2-futures" ,python2-futures)
18460 ,@(package-propagated-inputs base))))))
18461
18462 (define-public python-requests-file
18463 (package
18464 (name "python-requests-file")
18465 (version "1.4.3")
18466 (source
18467 (origin
18468 (method url-fetch)
18469 (uri (pypi-uri "requests-file" version))
18470 (sha256
18471 (base32
18472 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18473 (build-system python-build-system)
18474 (propagated-inputs
18475 `(("python-requests" ,python-requests)
18476 ("python-six" ,python-six)))
18477 (home-page
18478 "https://github.com/dashea/requests-file")
18479 (synopsis "File transport adapter for Requests")
18480 (description
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)))
18484
18485 (define-public python2-requests-file
18486 (package-with-python2 python-requests-file))
18487
18488 (define-public python-identify
18489 (package
18490 (name "python-identify")
18491 (version "1.4.25")
18492 (source
18493 (origin
18494 ;; There are no tests in the PyPI tarball.
18495 (method git-fetch)
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))
18500 (sha256
18501 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18502 (build-system python-build-system)
18503 (arguments
18504 `(#:phases
18505 (modify-phases %standard-phases
18506 (replace 'check
18507 (lambda _
18508 (invoke "pytest" "-vv"))))))
18509 (native-inputs
18510 `(("python-coverage" ,python-coverage)
18511 ("python-pytest" ,python-pytest)))
18512 (propagated-inputs
18513 `(("python-editdistance" ,python-editdistance)))
18514 (home-page "https://github.com/chriskuehl/identify")
18515 (synopsis "File identification library for Python")
18516 (description
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)))
18521
18522 (define-public python-tldextract
18523 (package
18524 (name "python-tldextract")
18525 (version "2.2.0")
18526 (source
18527 (origin
18528 (method url-fetch)
18529 (uri (pypi-uri "tldextract" version))
18530 (sha256
18531 (base32
18532 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18533 (build-system python-build-system)
18534 (native-inputs
18535 `(("python-pytest" ,python-pytest)
18536 ("python-responses" ,python-responses)))
18537 (propagated-inputs
18538 `(("python-idna" ,python-idna)
18539 ("python-requests" ,python-requests)
18540 ("python-requests-file" ,python-requests-file)))
18541 (home-page
18542 "https://github.com/john-kurkowski/tldextract")
18543 (synopsis
18544 "Separate the TLD from the registered domain and subdomains of a URL")
18545 (description
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)))
18551
18552 (define-public python2-tldextract
18553 (package-with-python2 python-tldextract))
18554
18555 (define-public python-nodeenv
18556 (package
18557 (name "python-nodeenv")
18558 (version "1.4.0")
18559 (source
18560 (origin
18561 ;; There's no tarball in PyPI.
18562 (method git-fetch)
18563 (uri (git-reference
18564 (url "https://github.com/ekalinin/nodeenv")
18565 (commit version)))
18566 (file-name (git-file-name name version))
18567 (sha256
18568 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18569 (build-system python-build-system)
18570 (arguments
18571 `(#:phases
18572 (modify-phases %standard-phases
18573 (replace 'check
18574 (lambda _
18575 ;; This test fails. It tries to open a network socket.
18576 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18577 (native-inputs
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")
18583 (description
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
18587 environments.")
18588 (license license:bsd-3)))
18589
18590 (define-public python-pynamecheap
18591 (package
18592 (name "python-pynamecheap")
18593 (version "0.0.3")
18594 (source
18595 (origin
18596 (method url-fetch)
18597 (uri (pypi-uri "PyNamecheap" version))
18598 (sha256
18599 (base32
18600 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18601 (build-system python-build-system)
18602 (propagated-inputs
18603 `(("python-requests" ,python-requests)))
18604 (home-page
18605 "https://github.com/Bemmu/PyNamecheap")
18606 (synopsis
18607 "Namecheap API client in Python")
18608 (description
18609 "PyNamecheap is a Namecheap API client in Python.")
18610 (license license:expat)))
18611
18612 (define-public python2-pynamecheap
18613 (package-with-python2 python-pynamecheap))
18614
18615 (define-public python-dns-lexicon
18616 (package
18617 (name "python-dns-lexicon")
18618 (version "2.4.0")
18619 (source
18620 (origin
18621 (method url-fetch)
18622 (uri (pypi-uri "dns-lexicon" version))
18623 (sha256
18624 (base32
18625 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18626 (build-system python-build-system)
18627 (arguments
18628 `(#:tests? #f)) ;requires internet access
18629 (propagated-inputs
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")
18636 (synopsis
18637 "Manipulate DNS records on various DNS providers")
18638 (description
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
18642 Let's Encrypt.")
18643 (license license:expat)))
18644
18645 (define-public python2-dns-lexicon
18646 (package-with-python2 python-dns-lexicon))
18647
18648 (define-public python-cfgv
18649 (package
18650 (name "python-cfgv")
18651 (version "3.1.0")
18652 (source
18653 (origin
18654 ;; There are no tests in the PyPI tarball.
18655 (method git-fetch)
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))
18660 (sha256
18661 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
18662 (build-system python-build-system)
18663 (arguments
18664 `(#:phases
18665 (modify-phases %standard-phases
18666 (replace 'check
18667 (lambda _
18668 (invoke "pytest" "-vv"))))))
18669 (native-inputs
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")
18675 (description
18676 "This library helps to validate configuration files and produce human
18677 readable error messages.")
18678 (license license:expat)))
18679
18680 (define-public python-commandlines
18681 (package
18682 (name "python-commandlines")
18683 (version "0.4.1")
18684 (source
18685 (origin
18686 (method url-fetch)
18687 (uri (pypi-uri "commandlines" version))
18688 (sha256
18689 (base32
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")
18694 (description
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)))
18699
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
18703 (package
18704 (name "python-numba")
18705 (version "0.46.0")
18706 (source
18707 (origin
18708 (method url-fetch)
18709 (uri (pypi-uri "numba" version))
18710 (sha256
18711 (base32
18712 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
18713 (build-system python-build-system)
18714 (arguments
18715 `(#:modules ((guix build utils)
18716 (guix build python-build-system)
18717 (ice-9 ftw)
18718 (srfi srfi-1)
18719 (srfi srfi-26))
18720 #:phases
18721 (modify-phases %standard-phases
18722 (add-after 'unpack 'disable-proprietary-features
18723 (lambda _
18724 (setenv "NUMBA_DISABLE_HSA" "1")
18725 (setenv "NUMBA_DISABLE_CUDA" "1")
18726 #t))
18727 (add-after 'unpack 'remove-failing-tests
18728 (lambda _
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)))
18739
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)))
18746
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)))
18756 #t))
18757 (replace 'check
18758 (lambda _
18759 (let ((cwd (getcwd)))
18760 (setenv "PYTHONPATH"
18761 (string-append cwd "/build/"
18762 (find (cut string-prefix? "lib" <>)
18763 (scandir (string-append cwd "/build")))
18764 ":"
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")))
18771 #t)))))
18772 (propagated-inputs
18773 `(("python-llvmlite" ,python-llvmlite)
18774 ("python-numpy" ,python-numpy)
18775 ("python-singledispatch" ,python-singledispatch)))
18776 ;; Needed for tests.
18777 (inputs
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.
18787
18788 Numba works by generating optimized machine code using the LLVM compiler
18789 infrastructure at import time, runtime, or statically (using the included pycc
18790 tool).")
18791 (license license:bsd-3)))
18792
18793 (define-public python-numcodecs
18794 (package
18795 (name "python-numcodecs")
18796 (version "0.6.4")
18797 (source
18798 (origin
18799 (method url-fetch)
18800 (uri (pypi-uri "numcodecs" version))
18801 (sha256
18802 (base32
18803 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
18804 (build-system python-build-system)
18805 (propagated-inputs
18806 `(("python-numpy" ,python-numpy)
18807 ("python-msgpack" ,python-msgpack)))
18808 (native-inputs
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")
18813 (description
18814 "This Python package provides buffer compression and transformation
18815 codecs for use in data storage and communication applications.")
18816 (license license:expat)))
18817
18818 (define-public python-asciitree
18819 (package
18820 (name "python-asciitree")
18821 (version "0.3.3")
18822 (source
18823 (origin
18824 (method url-fetch)
18825 (uri (pypi-uri "asciitree" version))
18826 (sha256
18827 (base32
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)))
18834
18835 (define-public python-zarr
18836 (package
18837 (name "python-zarr")
18838 (version "2.4.0")
18839 (source
18840 (origin
18841 (method url-fetch)
18842 (uri (pypi-uri "zarr" version))
18843 (sha256
18844 (base32
18845 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
18846 (build-system python-build-system)
18847 (arguments
18848 `(#:phases
18849 (modify-phases %standard-phases
18850 (add-after 'unpack 'disable-service-tests
18851 (lambda _
18852 (setenv "ZARR_TEST_ABS" "0")
18853 (setenv "ZARR_TEST_MONGO" "0")
18854 (setenv "ZARR_TEST_REDIS" "0")
18855 #t))
18856 (replace 'check
18857 (lambda _
18858 (invoke "pytest" "-vv" "-k" "not lmdb")
18859 #t)))))
18860 (propagated-inputs
18861 `(("python-asciitree" ,python-asciitree)
18862 ("python-fasteners" ,python-fasteners)
18863 ("python-numcodecs" ,python-numcodecs)
18864 ("python-numpy" ,python-numpy)))
18865 (native-inputs
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")
18870 (description
18871 "This package provides an implementation of chunked, compressed,
18872 N-dimensional arrays for Python.")
18873 (license license:expat)))
18874
18875 (define-public python-anndata
18876 (package
18877 (name "python-anndata")
18878 (version "0.7.1")
18879 (source
18880 (origin
18881 (method url-fetch)
18882 (uri (pypi-uri "anndata" version))
18883 (sha256
18884 (base32
18885 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
18886 (build-system python-build-system)
18887 (arguments
18888 `(#:phases
18889 (modify-phases %standard-phases
18890 (add-after 'unpack 'delete-inconvenient-tests
18891 (lambda _
18892 ;; This test depends on python-scikit-learn.
18893 (delete-file "anndata/tests/test_inplace_subset.py")
18894 #t))
18895 (delete 'check)
18896 (add-after 'install 'check
18897 (lambda* (#:key inputs outputs #:allow-other-keys)
18898 (add-installed-pythonpath inputs outputs)
18899 (invoke "pytest" "-vv"))))))
18900 (propagated-inputs
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)))
18909 (native-inputs
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)))
18921
18922 (define-public python-dill
18923 (package
18924 (name "python-dill")
18925 (version "0.3.1.1")
18926 (source
18927 (origin
18928 (method url-fetch)
18929 (uri (pypi-uri "dill" version))
18930 (sha256
18931 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
18932 (build-system python-build-system)
18933 (arguments
18934 `(#:phases
18935 (modify-phases %standard-phases
18936 (replace 'check
18937 (lambda _
18938 (with-directory-excursion "/tmp"
18939 (invoke "nosetests" "-v"))
18940 #t)))))
18941 (native-inputs
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)))
18955
18956 (define-public python-multiprocess
18957 (package
18958 (name "python-multiprocess")
18959 (version "0.70.9")
18960 (source
18961 (origin
18962 (method url-fetch)
18963 (uri (pypi-uri "multiprocess" version))
18964 (sha256
18965 (base32
18966 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
18967 (build-system python-build-system)
18968 (arguments
18969 `(#:phases
18970 (modify-phases %standard-phases
18971 (add-after 'unpack 'disable-broken-tests
18972 (lambda _
18973 ;; This test is broken as there is no keyboard interrupt.
18974 (substitute* "py3.7/multiprocess/tests/__init__.py"
18975 (("^(.*)def test_wait_result"
18976 line indent)
18977 (string-append indent
18978 "@unittest.skip(\"Disabled by Guix\")\n"
18979 line)))
18980 #t))
18981 ;; Tests must be run after installation.
18982 (delete 'check)
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")
18987 #t)))))
18988 (propagated-inputs
18989 `(("python-dill" ,python-dill)))
18990 (home-page "https://pypi.org/project/multiprocess/")
18991 (synopsis "Multiprocessing and multithreading in Python")
18992 (description
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)))
18997
18998 (define-public python-toolz
18999 (package
19000 (name "python-toolz")
19001 (version "0.9.0")
19002 (source
19003 (origin
19004 (method url-fetch)
19005 (uri (pypi-uri "toolz" version))
19006 (sha256
19007 (base32
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")
19015 (description
19016 "This package provides a set of utility functions for iterators,
19017 functions, and dictionaries.")
19018 (license license:bsd-3)))
19019
19020 (define-public python2-toolz
19021 (package-with-python2 python-toolz))
19022
19023 (define-public python-cytoolz
19024 (package
19025 (name "python-cytoolz")
19026 (version "0.9.0.1")
19027 (source
19028 (origin
19029 (method url-fetch)
19030 (uri (pypi-uri "cytoolz" version))
19031 (sha256
19032 (base32
19033 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19034 (build-system python-build-system)
19035 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19036 ;; 'exceptions'"
19037 (arguments '(#:tests? #f))
19038 (propagated-inputs
19039 `(("python-toolz" ,python-toolz)))
19040 (native-inputs
19041 `(("python-cython" ,python-cython)))
19042 (home-page "https://github.com/pytoolz/cytoolz")
19043 (synopsis "High performance functional utilities")
19044 (description
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)))
19049
19050 (define-public python-sortedcontainers
19051 (package
19052 (name "python-sortedcontainers")
19053 (version "2.1.0")
19054 (source
19055 (origin
19056 (method url-fetch)
19057 (uri (pypi-uri "sortedcontainers" version))
19058 (sha256
19059 (base32
19060 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19061 (build-system python-build-system)
19062 (arguments
19063 ;; FIXME: Tests require many extra dependencies, and would introduce
19064 ;; a circular dependency on hypothesis, which uses this package.
19065 '(#:tests? #f))
19066 (propagated-inputs
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")
19073 (description
19074 "This package provides a sorted collections library, written in
19075 pure-Python.")
19076 (license license:asl2.0)))
19077
19078 (define-public python2-sortedcontainers
19079 (package-with-python2 python-sortedcontainers))
19080
19081 (define-public python-cloudpickle
19082 (package
19083 (name "python-cloudpickle")
19084 (version "1.3.0")
19085 (source
19086 (origin
19087 (method url-fetch)
19088 (uri (pypi-uri "cloudpickle" version))
19089 (sha256
19090 (base32
19091 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19092 (build-system python-build-system)
19093 (arguments
19094 '(#:phases (modify-phases %standard-phases
19095 (add-before 'check 'do-not-override-PYTHONPATH
19096 (lambda _
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"))
19102 #t))
19103 (replace 'check
19104 (lambda* (#:key tests? #:allow-other-keys)
19105 (if tests?
19106 (invoke "pytest" "-s" "-vv")
19107 (format #t "test suite not run~%"))
19108 #t)))))
19109 (native-inputs
19110 `(;; For tests.
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")
19116 (description
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
19121 data.")
19122 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19123 (license license:bsd-3)))
19124
19125 (define-public python2-cloudpickle
19126 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19127 (package
19128 (inherit base)
19129 (native-inputs
19130 `(("python-mock" ,python2-mock)
19131 ,@(package-native-inputs base)))
19132 (propagated-inputs
19133 `(("python-futures" ,python2-futures)
19134 ,@(package-propagated-inputs base))))))
19135
19136 (define-public python-locket
19137 (package
19138 (name "python-locket")
19139 (version "0.2.0")
19140 (source
19141 (origin
19142 (method url-fetch)
19143 (uri (pypi-uri "locket" version))
19144 (sha256
19145 (base32
19146 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19147 (build-system python-build-system)
19148 (home-page "https://github.com/mwilliamson/locket.py")
19149 (synopsis "File-based locks for Python")
19150 (description
19151 "Locket implements a lock that can be used by multiple processes provided
19152 they use the same path.")
19153 (license license:bsd-2)))
19154
19155 (define-public python2-locket
19156 (package-with-python2 python-locket))
19157
19158 (define-public python-blosc
19159 (package
19160 (name "python-blosc")
19161 (version "1.5.1")
19162 (source
19163 (origin
19164 (method url-fetch)
19165 (uri (pypi-uri "blosc" version))
19166 (sha256
19167 (base32
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))
19173 (propagated-inputs
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.
19181
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.
19185
19186 This Python package wraps the Blosc library.")
19187 (license license:bsd-3)))
19188
19189 (define-public python2-blosc
19190 (package-with-python2 python-blosc))
19191
19192 (define-public python-partd
19193 (package
19194 (name "python-partd")
19195 (version "0.3.9")
19196 (source
19197 (origin
19198 (method url-fetch)
19199 (uri (pypi-uri "partd" version))
19200 (sha256
19201 (base32
19202 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19203 (build-system python-build-system)
19204 (propagated-inputs
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)))
19216
19217 (define-public python2-partd
19218 (package-with-python2 python-partd))
19219
19220 (define-public python-fsspec
19221 (package
19222 (name "python-fsspec")
19223 (version "0.6.1")
19224 (source
19225 (origin
19226 (method url-fetch)
19227 (uri (pypi-uri "fsspec" version))
19228 (sha256
19229 (base32
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)))
19241
19242 (define-public python-dask
19243 (package
19244 (name "python-dask")
19245 (version "2.14.0")
19246 (source
19247 (origin
19248 (method url-fetch)
19249 (uri (pypi-uri "dask" version))
19250 (sha256
19251 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19252 (build-system python-build-system)
19253 (arguments
19254 `(#:phases
19255 (modify-phases %standard-phases
19256 (add-after 'unpack 'disable-broken-tests
19257 (lambda _
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"
19262 m)))
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"
19268 m)))
19269 #t))
19270 (replace 'check
19271 (lambda _ (invoke "pytest" "-vv"))))))
19272 (propagated-inputs
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)))
19281 (native-inputs
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")
19286 (description
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)))
19294
19295 (define-public python-ilinkedlist
19296 (package
19297 (name "python-ilinkedlist")
19298 (version "0.4.0")
19299 (source
19300 (origin
19301 (method url-fetch)
19302 (uri (pypi-uri "ilinkedlist" version))
19303 (sha256
19304 (base32
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")
19311 (description
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+)))
19319
19320 (define-public python-readlike
19321 (package
19322 (name "python-readlike")
19323 (version "0.1.3")
19324 (source
19325 (origin
19326 (method url-fetch)
19327 (uri (pypi-uri "readlike" version))
19328 (sha256
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")
19333 (description
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.
19339
19340 Currently, all stateless Readline commands are implemented. Yanking and history
19341 are not supported.")
19342 (license license:expat)))
19343
19344 (define-public python2-readlike
19345 (package-with-python2 python-readlike))
19346
19347 (define-public python-reparser
19348 (package
19349 (name "python-reparser")
19350 (version "1.4.3")
19351 (source
19352 (origin
19353 (method url-fetch)
19354 (uri (pypi-uri "ReParser" version))
19355 (sha256
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")
19360 (description
19361 "This Python library provides a simple lexer/parser for inline markup based
19362 on regular expressions.")
19363 (license license:expat)))
19364
19365 (define-public python2-reparser
19366 (let ((reparser (package-with-python2
19367 (strip-python2-variant python-reparser))))
19368 (package (inherit reparser)
19369 (propagated-inputs
19370 `(("python2-enum34" ,python2-enum34)
19371 ,@(package-propagated-inputs reparser))))))
19372
19373 (define-public python-retrying
19374 (package
19375 (name "python-retrying")
19376 (version "1.3.3")
19377 (source
19378 (origin
19379 (method git-fetch)
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))
19384 (sha256
19385 (base32
19386 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19387 (build-system python-build-system)
19388 (propagated-inputs
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.
19394
19395 Features:
19396
19397 @itemize
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.
19403 @end itemize")
19404 (license license:asl2.0)))
19405
19406 (define-public python-precis-i18n
19407 (package
19408 (name "python-precis-i18n")
19409 (version "1.0.0")
19410 (source
19411 (origin
19412 (method url-fetch)
19413 (uri (pypi-uri "precis_i18n" version))
19414 (sha256
19415 (base32
19416 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19417 (build-system python-build-system)
19418 (home-page "https://github.com/byllyfish/precis_i18n")
19419 (synopsis "Implementation of the PRECIS framework")
19420 (description
19421 "This module implements the PRECIS Framework as described in RFC 8264,
19422 RFC 8265 and RFC 8266.")
19423 (license license:expat)))
19424
19425 (define-public python-absl-py
19426 (package
19427 (name "python-absl-py")
19428 (version "0.6.1")
19429 (source
19430 (origin
19431 (method url-fetch)
19432 (uri (pypi-uri "absl-py" version))
19433 (sha256
19434 (base32
19435 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19436 (build-system python-build-system)
19437 (propagated-inputs
19438 `(("python-six" ,python-six)))
19439 (home-page "https://github.com/abseil/abseil-py")
19440 (synopsis "Abseil Python common libraries")
19441 (description
19442 "This package provides the Abseil Python Common Libraries, a collection
19443 of Python libraries for building Python applications.")
19444 (license license:asl2.0)))
19445
19446 (define-public python-astor
19447 (package
19448 (name "python-astor")
19449 (version "0.7.1")
19450 (source
19451 (origin
19452 (method url-fetch)
19453 (uri (pypi-uri "astor" version))
19454 (sha256
19455 (base32
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)))
19465
19466 (define-public python2-astor
19467 (package-with-python2 python-astor))
19468
19469 (define-public python-astunparse
19470 (package
19471 (name "python-astunparse")
19472 (version "1.6.2")
19473 (source
19474 (origin
19475 (method url-fetch)
19476 (uri (pypi-uri "astunparse" version))
19477 (sha256
19478 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19479 (build-system python-build-system)
19480 (arguments '(#:tests? #f)) ; there are none
19481 (propagated-inputs
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
19488 distribution.")
19489 (license license:bsd-3)))
19490
19491 (define-public python-gast
19492 (package
19493 (name "python-gast")
19494 (version "0.3.3")
19495 (source
19496 (origin
19497 (method url-fetch)
19498 (uri (pypi-uri "gast" version))
19499 (sha256
19500 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19501 (build-system python-build-system)
19502 (propagated-inputs
19503 `(("python-astunparse" ,python-astunparse)))
19504 (home-page "https://pypi.org/project/gast/")
19505 (synopsis "Generic Python AST that abstracts the underlying Python version")
19506 (description
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}
19509 module.")
19510 (license license:bsd-3)))
19511
19512 (define-public python-wikidata
19513 (package
19514 (name "python-wikidata")
19515 (version "0.6.1")
19516 (source
19517 (origin
19518 (method url-fetch)
19519 (uri (pypi-uri "Wikidata" version))
19520 (sha256
19521 (base32
19522 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19523 (build-system python-build-system)
19524 (propagated-inputs
19525 `(("python-babel" ,python-babel)))
19526 (home-page "https://github.com/dahlia/wikidata")
19527 (synopsis "Wikidata client library")
19528 (description
19529 "This package provides a Python interface to
19530 @url{https://www.wikidata.org/, Wikidata}.")
19531 (properties '((upstream-name . "Wikidata")))
19532 (license license:gpl3+)))
19533
19534 (define-public python-doctest-ignore-unicode
19535 (package
19536 (name "python-doctest-ignore-unicode")
19537 (version "0.1.2")
19538 (source
19539 (origin
19540 (method url-fetch)
19541 (uri (pypi-uri "doctest-ignore-unicode" version))
19542 (sha256
19543 (base32
19544 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19545 (build-system python-build-system)
19546 (native-inputs
19547 `(("python-nose" ,python-nose)))
19548 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19549 (synopsis "Ignore Unicode literal prefixes in doctests")
19550 (description
19551 "This package adds support for a flag to ignore Unicode literal prefixes
19552 in doctests.")
19553 (license license:asl2.0)))
19554
19555 (define-public python-attr
19556 (package
19557 (name "python-attr")
19558 (version "0.3.1")
19559 (source
19560 (origin
19561 (method url-fetch)
19562 (uri (pypi-uri "attr" version))
19563 (sha256
19564 (base32
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)))
19572
19573 (define-public python-construct
19574 (package
19575 (name "python-construct")
19576 (version "2.10.56")
19577 (source
19578 (origin
19579 (method url-fetch)
19580 (uri (pypi-uri "construct" version))
19581 (sha256
19582 (base32
19583 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19584 (build-system python-build-system)
19585 (arguments
19586 `(#:tests? #f)) ; No tests exist.
19587 (propagated-inputs
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")
19594 (description
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)))
19602
19603 (define-public python-outcome
19604 (package
19605 (name "python-outcome")
19606 (version "1.0.1")
19607 (source
19608 (origin
19609 (method url-fetch)
19610 (uri (pypi-uri "outcome" version))
19611 (sha256
19612 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19613 (build-system python-build-system)
19614 (arguments
19615 `(#:phases
19616 (modify-phases %standard-phases
19617 (replace 'check
19618 (lambda* (#:key inputs outputs #:allow-other-keys)
19619 (add-installed-pythonpath inputs outputs)
19620 (invoke "pytest" "-vv"))))))
19621 (native-inputs
19622 `(("python-pytest" ,python-pytest)
19623 ("python-pytest-cov" ,python-pytest-cov)
19624 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19625 (propagated-inputs
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")
19630 (description
19631 "Capture the outcome of Python function calls. Extracted from the Trio
19632 project.")
19633 ;; Either license applies.
19634 (license (list license:expat license:asl2.0))))
19635
19636 (define-public python-trio
19637 (package
19638 (name "python-trio")
19639 (version "0.17.0")
19640 (source
19641 (origin
19642 (method url-fetch)
19643 (uri (pypi-uri "trio" version))
19644 (sha256
19645 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
19646 (build-system python-build-system)
19647 (arguments
19648 `(#:phases
19649 (modify-phases %standard-phases
19650 (add-before 'check 'change-home
19651 (lambda _
19652 ;; Tests require a writable home.
19653 (setenv "HOME" "/tmp")
19654 #t))
19655 (replace 'check
19656 (lambda _
19657 (invoke "pytest" "-vv" "-k"
19658 (string-append
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")))))))
19673 (native-inputs
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)))
19682 (propagated-inputs
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")
19691 (description
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))))
19697
19698 (define-public python-trio-typing
19699 (package
19700 (name "python-trio-typing")
19701 (version "0.5.0")
19702 (source
19703 (origin
19704 (method url-fetch)
19705 (uri (pypi-uri "trio-typing" version))
19706 (sha256
19707 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
19708 (build-system python-build-system)
19709 (arguments
19710 `(#:phases
19711 (modify-phases %standard-phases
19712 (replace 'check
19713 (lambda _
19714 (invoke "pytest" "-vv"))))))
19715 (native-inputs
19716 `(("python-attrs" ,python-attrs)
19717 ("python-pytest" ,python-pytest)))
19718 (propagated-inputs
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")
19727 (description
19728 "This package provides:
19729
19730 @itemize
19731 @item PEP 561 typing stubs packages for the Trio project packages:
19732
19733 @itemize
19734 @item trio (@code{trio-stubs})
19735 @item outcome (@code{outcome-stubs})
19736 @item async_generator (@code{async_generator-stubs})
19737 @end itemize
19738
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.
19742 @end itemize")
19743 ;; Either license applies.
19744 (license (list license:expat license:asl2.0))))
19745
19746 (define-public python-humanize
19747 (package
19748 (name "python-humanize")
19749 (version "0.5.1")
19750 (source
19751 (origin
19752 (method url-fetch)
19753 (uri (pypi-uri "humanize" version))
19754 (sha256
19755 (base32
19756 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
19757 (arguments
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)))
19766
19767 (define-public python-txaio
19768 (package
19769 (name "python-txaio")
19770 (version "18.8.1")
19771 (source
19772 (origin
19773 (method url-fetch)
19774 (uri (pypi-uri "txaio" version))
19775 (sha256
19776 (base32
19777 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
19778 (build-system python-build-system)
19779 (propagated-inputs
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)))
19787
19788 (define-public python-toolshed
19789 (package
19790 (name "python-toolshed")
19791 (version "0.4.6")
19792 (source
19793 (origin
19794 (method url-fetch)
19795 (uri (pypi-uri "toolshed" version))
19796 (sha256
19797 (base32
19798 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
19799 (build-system python-build-system)
19800 (native-inputs
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)))
19807
19808 (define-public python-annoy
19809 (package
19810 (name "python-annoy")
19811 (version "1.15.1")
19812 (source
19813 (origin
19814 (method url-fetch)
19815 (uri (pypi-uri "annoy" version))
19816 (sha256
19817 (base32
19818 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
19819 (build-system python-build-system)
19820 (native-inputs
19821 `(("python-nose" ,python-nose)))
19822 (home-page "https://github.com/spotify/annoy/")
19823 (synopsis "Approximate nearest neighbors library")
19824 (description
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)))
19830
19831 (define-public python-croniter
19832 (package
19833 (name "python-croniter")
19834 (version "0.3.34")
19835 (source (origin
19836 (method url-fetch)
19837 (uri (pypi-uri "croniter" version))
19838 (sha256
19839 (base32
19840 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
19841 (build-system python-build-system)
19842 (propagated-inputs
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")
19847 (description
19848 "@code{croniter} provides iteration for datetime object with cron-like
19849 format.")
19850 (license license:expat)))
19851
19852 (define-public python-pylzma
19853 (package
19854 (name "python-pylzma")
19855 (version "0.5.0")
19856 (source
19857 (origin
19858 (method url-fetch)
19859 (uri (pypi-uri "pylzma" version))
19860 (sha256
19861 (base32
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
19867 by Igor Pavlov.")
19868 (license license:lgpl2.1+)))
19869
19870 (define-public python2-pylzma
19871 (package-with-python2 python-pylzma))
19872
19873 (define-public python2-zeroconf
19874 (package
19875 (name "python2-zeroconf")
19876
19877 ;; This is the last version that supports Python 2.x.
19878 (version "0.19.1")
19879 (source
19880 (origin
19881 (method url-fetch)
19882 (uri (pypi-uri "zeroconf" version))
19883 (sha256
19884 (base32
19885 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
19886 (build-system python-build-system)
19887 (arguments
19888 `(#:python ,python-2
19889 #:phases
19890 (modify-phases %standard-phases
19891 (add-after 'unpack 'patch-requires
19892 (lambda* (#:key inputs #:allow-other-keys)
19893 (substitute* "setup.py"
19894 (("enum-compat")
19895 "enum34"))
19896 #t)))))
19897 (native-inputs
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")
19904 (description
19905 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
19906 compatible).")
19907 (license license:lgpl2.1+)))
19908
19909 (define-public python-bsddb3
19910 (package
19911 (name "python-bsddb3")
19912 (version "6.2.6")
19913 (source
19914 (origin
19915 (method url-fetch)
19916 (uri (pypi-uri "bsddb3" version))
19917 (sha256
19918 (base32
19919 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
19920 (build-system python-build-system)
19921 (inputs
19922 `(("bdb" ,bdb)))
19923 (arguments
19924 '(#:phases
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")
19930 #t))
19931 (replace 'check
19932 (lambda _
19933 (invoke "python3" "test3.py" "-v"))))))
19934 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
19935 (synopsis "Python bindings for Oracle Berkeley DB")
19936 (description
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)))
19945
19946 (define-public python-dbfread
19947 (package
19948 (name "python-dbfread")
19949 (version "2.0.7")
19950 (source (origin
19951 (method url-fetch)
19952 (uri (pypi-uri "dbfread" version))
19953 (sha256
19954 (base32
19955 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
19956 (build-system python-build-system)
19957 (native-inputs
19958 `(("python-pytest" ,python-pytest)))
19959 (home-page "https://dbfread.readthedocs.io")
19960 (synopsis "Read DBF Files with Python")
19961 (description
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
19964 one-off scripts.")
19965 (license license:expat)))
19966
19967 (define-public python-cached-property
19968 (package
19969 (name "python-cached-property")
19970 (version "1.5.1")
19971 (source
19972 (origin
19973 (method url-fetch)
19974 (uri (pypi-uri "cached-property" version))
19975 (sha256
19976 (base32
19977 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
19978 (build-system python-build-system)
19979 (arguments
19980 `(#:phases
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
19985 (lambda _
19986 (substitute* "tests/test_cached_property.py"
19987 (("def test_threads_ttl_expiry\\(self\\)" m)
19988 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
19989 " " m)))
19990 #t)))))
19991 (native-inputs
19992 `(("python-freezegun" ,python-freezegun)))
19993 (home-page
19994 "https://github.com/pydanny/cached-property")
19995 (synopsis
19996 "Decorator for caching properties in classes")
19997 (description
19998 "This package provides a decorator which makes caching
19999 time-or-computationally-expensive properties quick and easy and works in Python
20000 2 or 3.")
20001 (license license:bsd-3)))
20002
20003 (define-public python-folium
20004 (package
20005 (name "python-folium")
20006 (version "0.11.0")
20007 (source
20008 (origin
20009 (method url-fetch)
20010 (uri (pypi-uri "folium" version))
20011 (sha256
20012 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20013 (build-system python-build-system)
20014 (propagated-inputs
20015 `(("python-branca" ,python-branca)
20016 ("python-jinja2" ,python-jinja2)
20017 ("python-numpy" ,python-numpy)
20018 ("python-requests" ,python-requests)))
20019 (native-inputs
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.
20027
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)))
20032
20033 (define-public jube
20034 (package
20035 ;; This is a command-line tool, so no "python-" prefix.
20036 (name "jube")
20037 (version "2.2.2")
20038 (source (origin
20039 (method url-fetch)
20040 (uri (string-append
20041 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20042 version))
20043 (sha256
20044 (base32
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")
20050 (description
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+)))
20057
20058 (define-public python-pyroutelib3
20059 (package
20060 (name "python-pyroutelib3")
20061 (version "1.3.post1")
20062 (source
20063 (origin
20064 (method url-fetch)
20065 (uri (pypi-uri "pyroutelib3" version))
20066 (sha256
20067 (base32
20068 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20069 (build-system python-build-system)
20070 (propagated-inputs
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+)))
20076
20077 (define-public python-bibtexparser
20078 (package
20079 (name "python-bibtexparser")
20080 (version "1.1.0")
20081 (source
20082 (origin
20083 (method url-fetch)
20084 (uri (pypi-uri "bibtexparser" version))
20085 (sha256
20086 (base32
20087 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20088 (build-system python-build-system)
20089 (propagated-inputs
20090 `(("python-pyparsing" ,python-pyparsing)))
20091 (native-inputs
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))))
20097
20098 (define-public python-distro
20099 (package
20100 (name "python-distro")
20101 (version "1.4.0")
20102 (source
20103 (origin
20104 (method url-fetch)
20105 (uri (pypi-uri "distro" version))
20106 (sha256
20107 (base32
20108 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20109 (build-system python-build-system)
20110 (native-inputs
20111 `(("python-pytest" ,python-pytest)))
20112 (home-page "https://github.com/nir0s/distro")
20113 (synopsis
20114 "OS platform information API")
20115 (description
20116 "@code{distro} provides information about the OS distribution it runs on,
20117 such as a reliable machine-readable ID, or version information.
20118
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)))
20124
20125 (define-public python-cairosvg
20126 (package
20127 (name "python-cairosvg")
20128 (version "2.4.2")
20129 (source
20130 (origin
20131 (method url-fetch)
20132 (uri (pypi-uri "CairoSVG" version))
20133 (sha256
20134 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
20135 (build-system python-build-system)
20136 (arguments
20137 `(#:phases
20138 (modify-phases %standard-phases
20139 (replace 'check
20140 (lambda _ (invoke "pytest"))))))
20141 (propagated-inputs
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)))
20147 (native-inputs
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+)))
20159
20160 (define-public python-pyphen
20161 (package
20162 (name "python-pyphen")
20163 (version "0.9.5")
20164 (source
20165 (origin
20166 (method url-fetch)
20167 (uri (pypi-uri "Pyphen" version))
20168 (sha256
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))))
20178
20179 (define-public python-intelhex
20180 (package
20181 (name "python-intelhex")
20182 (version "2.2.1")
20183 (source
20184 (origin
20185 (method url-fetch)
20186 (uri (pypi-uri "intelhex" version))
20187 (sha256
20188 (base32
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)))
20202
20203 (define-public python-pykwalify
20204 (package
20205 (name "python-pykwalify")
20206 (version "1.7.0")
20207 (source
20208 (origin
20209 (method url-fetch)
20210 (uri (pypi-uri "pykwalify" version))
20211 (sha256
20212 (base32
20213 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20214 (build-system python-build-system)
20215 (arguments '(#:tests? #f)) ;missing dependencies
20216 (propagated-inputs
20217 `(("python-dateutil" ,python-dateutil)
20218 ("python-docopt" ,python-docopt)
20219 ("python-pyyaml" ,python-pyyaml)))
20220 (home-page "https://github.com/grokzen/pykwalify")
20221 (synopsis
20222 "Python lib/cli for JSON/YAML schema validation")
20223 (description
20224 "This package provides a parser, schema validator, and data binding tool
20225 for YAML and JSON.")
20226 (license license:expat)))
20227
20228 (define-public python-dbusmock
20229 (package
20230 (name "python-dbusmock")
20231 (version "0.18.3")
20232 (source
20233 (origin
20234 (method url-fetch)
20235 (uri (pypi-uri "python-dbusmock" version))
20236 (sha256
20237 (base32
20238 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20239 (build-system python-build-system)
20240 (arguments
20241 '(#:phases
20242 (modify-phases %standard-phases
20243 (add-after 'unpack 'patch-shell-path
20244 (lambda _
20245 (substitute* "tests/test_code.py"
20246 (("/bin/bash") (which "bash")))
20247 #t)))))
20248 (native-inputs
20249 `(;; For tests.
20250 ("dbus" ,dbus) ; for dbus-daemon
20251 ("python-nose" ,python-nose)
20252 ("which" ,which)))
20253 (propagated-inputs
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+)))
20264
20265 (define-public python-jsonplus
20266 (package
20267 (name "python-jsonplus")
20268 (version "0.8.0")
20269 (home-page "https://github.com/randomir/jsonplus")
20270 (source (origin
20271 (method url-fetch)
20272 (uri (pypi-uri "jsonplus" version))
20273 (sha256
20274 (base32
20275 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20276 (build-system python-build-system)
20277 ;; XXX: No tests on PyPI, and the repository has no tags.
20278 (arguments '(#:tests? #f))
20279 (propagated-inputs
20280 `(("python-dateutil" ,python-dateutil)
20281 ("python-simplejson" ,python-simplejson)
20282 ("python-sortedcontainers" ,python-sortedcontainers)))
20283 (synopsis "Serialize Python types to/from JSON")
20284 (description
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)))
20289
20290 (define-public python-ujson
20291 (package
20292 (name "python-ujson")
20293 (version "2.0.3")
20294 (source
20295 (origin
20296 (method url-fetch)
20297 (uri (pypi-uri "ujson" version))
20298 (sha256
20299 (base32
20300 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
20301 (modules '((guix build utils)))
20302 (snippet
20303 '(begin (delete-file-recursively "deps") #t))))
20304 (build-system python-build-system)
20305 (arguments
20306 `(#:phases
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\""))
20314 (("-lstdc++" stdc)
20315 (string-append "-L" d-c "/lib\","
20316 " \"-ldouble-conversion\","
20317 " \"" stdc)))
20318 #t)))
20319 (replace 'check
20320 (lambda* (#:key inputs outputs #:allow-other-keys)
20321 (add-installed-pythonpath inputs outputs)
20322 (invoke "pytest"))))))
20323 (native-inputs
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")
20329 (description
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)))
20333
20334 (define-public python-ujson-1
20335 (package
20336 (inherit python-ujson)
20337 (version "1.35")
20338 (source
20339 (origin
20340 (method url-fetch)
20341 (uri (pypi-uri "ujson" version))
20342 (sha256
20343 (base32
20344 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
20345 (arguments
20346 '(#:phases %standard-phases))
20347 (native-inputs '())
20348 (home-page "http://www.esn.me")
20349 (description
20350 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20351 bindings for Python 2.5+ and 3.")))
20352
20353 (define-public python2-ujson-1
20354 (package-with-python2 python-ujson-1))
20355
20356 (define-public python-iocapture
20357 ;; The latest release is more than a year older than this commit.
20358 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20359 (revision "1"))
20360 (package
20361 (name "python-iocapture")
20362 (version "0.1.2")
20363 (source
20364 (origin
20365 (method git-fetch)
20366 (uri (git-reference
20367 (url "https://github.com/oinume/iocapture")
20368 (commit commit)))
20369 (file-name (git-file-name name version))
20370 (sha256
20371 (base32
20372 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20373 (build-system python-build-system)
20374 (arguments
20375 `(#:phases
20376 (modify-phases %standard-phases
20377 (delete 'check)
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")
20382 #t)))))
20383 (propagated-inputs
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")
20390 (description
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))))
20394
20395 (define-public python-argh
20396 ;; There are 21 commits since the latest release containing important
20397 ;; improvements.
20398 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20399 (revision "1"))
20400 (package
20401 (name "python-argh")
20402 (version (git-version "0.26.2" revision commit))
20403 (source
20404 (origin
20405 (method git-fetch)
20406 (uri (git-reference
20407 (url "https://github.com/neithere/argh")
20408 (commit commit)))
20409 (file-name (git-file-name name version))
20410 (sha256
20411 (base32
20412 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20413 (build-system python-build-system)
20414 (propagated-inputs
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")
20423 (description
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+))))
20430
20431 (define-public python-ppft
20432 (package
20433 (name "python-ppft")
20434 (version "1.6.6.1")
20435 (source
20436 (origin
20437 (method url-fetch)
20438 (uri (pypi-uri "ppft" version))
20439 (sha256
20440 (base32
20441 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20442 (build-system python-build-system)
20443 (arguments '(#:tests? #f)) ; there are none
20444 (propagated-inputs
20445 `(("python-six" ,python-six)))
20446 (home-page "https://pypi.org/project/ppft/")
20447 (synopsis "Fork of Parallel Python")
20448 (description
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
20453 load balancing.")
20454 (license license:bsd-3)))
20455
20456 (define-public python-pox
20457 (package
20458 (name "python-pox")
20459 (version "0.2.7")
20460 (source
20461 (origin
20462 (method url-fetch)
20463 (uri (pypi-uri "pox" version))
20464 (sha256
20465 (base32
20466 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20467 (build-system python-build-system)
20468 (arguments
20469 `(#:phases
20470 (modify-phases %standard-phases
20471 (replace 'check
20472 (lambda _
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")
20478 #t)))))
20479 (native-inputs
20480 `(("python-pytest" ,python-pytest)
20481 ("which" ,which)))
20482 (home-page "https://pypi.org/project/pox/")
20483 (synopsis "Python utilities for file system exploration and automated builds")
20484 (description
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)))
20493
20494 (define-public python-pathos
20495 (package
20496 (name "python-pathos")
20497 (version "0.2.5")
20498 (source
20499 (origin
20500 (method url-fetch)
20501 (uri (pypi-uri "pathos" version))
20502 (sha256
20503 (base32
20504 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20505 (build-system python-build-system)
20506 (arguments
20507 '(#:phases
20508 (modify-phases %standard-phases
20509 (replace 'check
20510 (lambda _
20511 (setenv "PYTHONPATH"
20512 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20513 (invoke "python" "./tests/__main__.py"))))))
20514 (propagated-inputs
20515 `(("python-dill" ,python-dill)
20516 ("python-multiprocess" ,python-multiprocess)
20517 ("python-pox" ,python-pox)
20518 ("python-ppft" ,python-ppft)))
20519 (native-inputs
20520 `(("python-pytest" ,python-pytest)))
20521 (home-page "https://pypi.org/project/pathos/")
20522 (synopsis
20523 "Parallel graph management and execution in heterogeneous computing")
20524 (description
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)))
20531
20532 (define-public python-flit
20533 (package
20534 (name "python-flit")
20535 (version "2.1.0")
20536 (source
20537 (origin
20538 (method url-fetch)
20539 (uri (pypi-uri "flit" version))
20540 (sha256
20541 (base32
20542 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
20543 (build-system python-build-system)
20544 (arguments
20545 `(#:tests? #f)) ; XXX: Check requires network access.
20546 (home-page "https://flit.readthedocs.io/")
20547 (synopsis
20548 "Simple packaging tool for simple packages")
20549 (description
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)))
20555
20556 (define-public python-pathtools
20557 (package
20558 (name "python-pathtools")
20559 (version "0.1.2")
20560 (source
20561 (origin
20562 (method url-fetch)
20563 (uri (pypi-uri "pathtools" version))
20564 (sha256
20565 (base32
20566 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20567 (build-system python-build-system)
20568 (home-page
20569 "https://github.com/gorakhargosh/pathtools")
20570 (synopsis "Path utilities for Python")
20571 (description "Pattern matching and various utilities for file systems
20572 paths.")
20573 (license license:expat)))
20574
20575 (define-public python-fastentrypoints
20576 (package
20577 (name "python-fastentrypoints")
20578 (version "0.12")
20579 (source
20580 (origin
20581 (method url-fetch)
20582 (uri (pypi-uri "fastentrypoints" version))
20583 (sha256
20584 (base32
20585 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20586 (build-system python-build-system)
20587 (home-page
20588 "https://github.com/ninjaaron/fast-entry_points")
20589 (synopsis
20590 "Makes entry_points specified in setup.py load more quickly")
20591 (description
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)))
20596
20597 (define-public python-funcparserlib
20598 (package
20599 (name "python-funcparserlib")
20600 (version "0.3.6")
20601 (source
20602 (origin
20603 (method url-fetch)
20604 (uri (pypi-uri "funcparserlib" version))
20605 (sha256
20606 (base32
20607 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20608 (native-inputs
20609 `(("python-tox" ,python-tox)))
20610 (arguments
20611 `(#:phases
20612 (modify-phases %standard-phases
20613 (replace 'check
20614 (lambda _
20615 (invoke "tox"))))))
20616 (build-system python-build-system)
20617 (home-page
20618 "https://github.com/vlasovskikh/funcparserlib")
20619 (synopsis
20620 "Recursive descent parsing library based on functional combinators")
20621 (description
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)))
20626
20627 (define-public python-speg
20628 (package
20629 (name "python-speg")
20630 (version "0.3")
20631 (source
20632 (origin
20633 (method url-fetch)
20634 (uri (pypi-uri "speg" version ".zip"))
20635 (sha256
20636 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20637 (arguments
20638 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20639 (native-inputs
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
20645 memoization.")
20646 (license license:expat)))
20647
20648 (define-public python-cson
20649 (package
20650 (name "python-cson")
20651 (version "0.8")
20652 (source
20653 (origin
20654 (method url-fetch)
20655 (uri (pypi-uri "cson" version))
20656 (sha256
20657 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20658 (build-system python-build-system)
20659 (propagated-inputs
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
20664 Notation (CSON).")
20665 (license license:expat)))
20666
20667 (define-public python-asynctest
20668 (package
20669 (name "python-asynctest")
20670 (version "0.13.0")
20671 (source
20672 (origin
20673 (method url-fetch)
20674 (uri (pypi-uri "asynctest" version))
20675 (sha256
20676 (base32
20677 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20678 (build-system python-build-system)
20679 (arguments
20680 '(#:phases
20681 (modify-phases %standard-phases
20682 (replace 'check
20683 (lambda _
20684 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20685 (add-after 'unpack 'disable-tests
20686 (lambda* _
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")))
20703 #t)))))
20704 (home-page "https://github.com/Martiusweb/asynctest")
20705 (synopsis "Extension of unittest for testing asyncio libraries")
20706 (description
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)))
20710
20711 (define-public python-aionotify
20712 (package
20713 (name "python-aionotify")
20714 (version "0.2.0")
20715 (source
20716 (origin
20717 ;; Source tarball on PyPi lacks tests
20718 (method git-fetch)
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))
20723 (sha256
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")
20729 (description
20730 "@code{aionotify} is a simple, asyncio-based inotify library.")
20731 (license license:bsd-3)))
20732
20733 (define-public python-forbiddenfruit
20734 (package
20735 (name "python-forbiddenfruit")
20736 (version "0.1.3")
20737 (source
20738 (origin
20739 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
20740 (method git-fetch)
20741 (uri (git-reference
20742 (url "https://github.com/clarete/forbiddenfruit")
20743 (commit version)))
20744 (file-name (git-file-name name version))
20745 (sha256
20746 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
20747 (build-system python-build-system)
20748 (arguments
20749 '(#:phases
20750 (modify-phases %standard-phases
20751 (replace 'check
20752 (lambda _
20753 (invoke "make" "SKIP_DEPS=1"))))))
20754 (native-inputs
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))))
20761
20762 (define-public python-shouldbe
20763 (package
20764 (name "python-shouldbe")
20765 (version "0.1.2")
20766 (source
20767 (origin
20768 (method url-fetch)
20769 (uri (pypi-uri "shouldbe" version))
20770 (sha256
20771 (base32
20772 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
20773 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
20774 (build-system python-build-system)
20775 (propagated-inputs
20776 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
20777 (native-inputs
20778 `(("python-nose" ,python-nose)))
20779 (home-page "https://github.com/directxman12/should_be")
20780 (synopsis "Python Assertion Helpers inspired by Shouldly")
20781 (description
20782 "Python Assertion Helpers inspired by Shouldly.")
20783 (license license:isc)))
20784
20785 (define-public python-k5test
20786 (package
20787 (name "python-k5test")
20788 (version "0.9.2")
20789 (source
20790 (origin
20791 (method url-fetch)
20792 (uri (pypi-uri "k5test" version))
20793 (sha256
20794 (base32
20795 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
20796 (build-system python-build-system)
20797 (propagated-inputs
20798 `(("python-six" ,python-six)
20799 ;; `which`, `kadmin.local` binaries called inside library
20800 ("which" ,which)
20801 ("mit-krb5" ,mit-krb5)))
20802 (native-inputs `(("mit-krb5" ,mit-krb5)))
20803 (arguments
20804 '(#:phases
20805 (modify-phases %standard-phases
20806 (add-after 'unpack 'patch-paths
20807 (lambda* _
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")
20812 (description
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
20816 tests.")
20817 (license license:isc)))
20818
20819 (define-public python-gssapi
20820 (package
20821 (name "python-gssapi")
20822 (version "1.6.9")
20823 (source
20824 (origin
20825 (method url-fetch)
20826 (uri (pypi-uri "gssapi" version))
20827 (sha256
20828 (base32
20829 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
20830 (build-system python-build-system)
20831 (arguments
20832 `(#:phases
20833 (modify-phases %standard-phases
20834 ;; Work around
20835 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
20836 (add-before 'check 'disable-failing-tests
20837 (lambda _
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")))
20846 #t))))))
20847 (propagated-inputs
20848 `(("python-decorator" ,python-decorator)
20849 ("python-six" ,python-six)))
20850 (inputs
20851 `(("mit-krb5" ,mit-krb5)))
20852 ;; for tests
20853 (native-inputs
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")
20860 (description
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)))
20865
20866 (define-public python-check-manifest
20867 (package
20868 (name "python-check-manifest")
20869 (version "0.37")
20870 (source
20871 (origin
20872 (method url-fetch)
20873 (uri (pypi-uri "check-manifest" version))
20874 (sha256
20875 (base32
20876 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
20877 (build-system python-build-system)
20878 (native-inputs
20879 `(("python-mock" ,python-mock)
20880 ("git" ,git)))
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)))
20887
20888 (define-public python-android-stringslib
20889 (package
20890 (name "python-android-stringslib")
20891 (version "0.1.2")
20892 (source
20893 (origin
20894 (method git-fetch)
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))
20899 (sha256
20900 (base32
20901 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
20902 (build-system python-build-system)
20903 (arguments
20904 `(#:tests? #f))
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)))
20910
20911 (define-public python-watchdog
20912 (package
20913 (name "python-watchdog")
20914 (version "0.9.0")
20915 (source
20916 (origin
20917 (method url-fetch)
20918 (uri (pypi-uri "watchdog" version))
20919 (sha256
20920 (base32
20921 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
20922 (build-system python-build-system)
20923 (arguments
20924 `(#:phases
20925 (modify-phases %standard-phases
20926 (add-before 'check 'remove-failing
20927 (lambda _
20928 (delete-file "tests/test_inotify_buffer.py")
20929 (delete-file "tests/test_snapshot_diff.py")
20930 #t)))))
20931 (propagated-inputs
20932 `(("python-argh" ,python-argh)
20933 ("python-pathtools" ,python-pathtools)
20934 ("python-pyyaml" ,python-pyyaml)))
20935 (native-inputs
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,
20942 but portable.")
20943 (license license:asl2.0)))
20944
20945 (define-public python-watchgod
20946 (package
20947 (name "python-watchgod")
20948 (version "0.6")
20949 (source
20950 (origin
20951 ;; There are no tests in the PyPI tarball.
20952 (method git-fetch)
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))
20957 (sha256
20958 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
20959 (build-system python-build-system)
20960 (arguments
20961 `(#:phases
20962 (modify-phases %standard-phases
20963 (replace 'check
20964 (lambda _
20965 (invoke "pytest" "-vv"))))))
20966 (native-inputs
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")
20982 (description
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)))
20987
20988 (define-public python-wget
20989 (package
20990 (name "python-wget")
20991 (version "3.2")
20992 (source
20993 (origin
20994 (method url-fetch)
20995 (uri (pypi-uri "wget" version ".zip"))
20996 (sha256
20997 (base32
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)))
21006
21007 (define-public offlate
21008 (package
21009 (name "offlate")
21010 (version "0.5")
21011 (source
21012 (origin
21013 (method git-fetch)
21014 (uri (git-reference
21015 (url "https://framagit.org/tyreunom/offlate")
21016 (commit version)))
21017 (file-name (git-file-name name version))
21018 (sha256
21019 (base32
21020 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21021 (build-system python-build-system)
21022 (arguments
21023 ;; No tests
21024 `(#:tests? #f))
21025 (propagated-inputs
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)))
21039 (native-inputs
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+)))
21050
21051 (define-public python-titlecase
21052 (package
21053 (name "python-titlecase")
21054 (version "0.12.0")
21055 (source
21056 (origin
21057 (method url-fetch)
21058 (uri (pypi-uri "titlecase" version))
21059 (sha256
21060 (base32
21061 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21062 (build-system python-build-system)
21063 (native-inputs
21064 `(("python-nose" ,python-nose)))
21065 (home-page "https://github.com/ppannuto/python-titlecase")
21066 (synopsis "Capitalize strings similar to book titles")
21067 (description
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
21071 lowercase.")
21072 (license license:expat)))
21073
21074 (define-public python-pypng
21075 (package
21076 (name "python-pypng")
21077 (version "0.0.20")
21078 (source
21079 (origin
21080 (method url-fetch)
21081 (uri (pypi-uri "pypng" version))
21082 (sha256
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")
21087 (description
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.
21095
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)))
21102
21103 (define-public python-fuzzywuzzy
21104 (package
21105 (name "python-fuzzywuzzy")
21106 (version "0.18.0")
21107 (source
21108 (origin
21109 (method url-fetch)
21110 (uri (pypi-uri "fuzzywuzzy" version))
21111 (sha256
21112 (base32
21113 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21114 (build-system python-build-system)
21115 (native-inputs
21116 `(("python-hypothesis" ,python-hypothesis)
21117 ("python-pycodestyle" ,python-pycodestyle)
21118 ("python-pytest" ,python-pytest)))
21119 (propagated-inputs
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
21125 sequences.")
21126 (license license:gpl2)))
21127
21128 (define-public python2-fuzzywuzzy
21129 (package-with-python2 python-fuzzywuzzy))
21130
21131 (define-public python-block-tracing
21132 (package
21133 (name "python-block-tracing")
21134 (version "1.0.1")
21135 (source
21136 (origin
21137 (method url-fetch)
21138 (uri (pypi-uri "block_tracing" version))
21139 (sha256
21140 (base32
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")
21146 (description
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
21149 your process.")
21150 (license license:expat)))
21151
21152 (define-public python-gcovr
21153 (package
21154 (name "python-gcovr")
21155 (version "4.2")
21156 (source
21157 (origin
21158 (method url-fetch)
21159 (uri (pypi-uri "gcovr" version))
21160 (sha256
21161 (base32
21162 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21163 (build-system python-build-system)
21164 (propagated-inputs
21165 `(("python-lxml" ,python-lxml)
21166 ("python-jinja2" ,python-jinja2)))
21167 (home-page "https://gcovr.com/")
21168 (synopsis "Utility for generating code coverage results")
21169 (description
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
21173 Python.")
21174 (license license:bsd-3)))
21175
21176 (define-public python-owslib
21177 (package
21178 (name "python-owslib")
21179 (version "0.19.2")
21180 (source
21181 (origin
21182 (method url-fetch)
21183 (uri (pypi-uri "OWSLib" version))
21184 (sha256
21185 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21186 (build-system python-build-system)
21187 (arguments
21188 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21189 (synopsis "Interface for Open Geospatial Consortium web service")
21190 (description
21191 "OWSLib is a Python package for client programming with Open Geospatial
21192 Consortium (OGC) web service (hence OWS) interface standards, and their related
21193 content models.")
21194 (home-page "https://geopython.github.io/OWSLib/")
21195 (license license:bsd-3)))
21196
21197 (define-public python-docusign-esign
21198 (package
21199 (name "python-docusign-esign")
21200 (version "3.1.0")
21201 (source (origin
21202 (method url-fetch)
21203 (uri (pypi-uri "docusign_esign" version))
21204 (sha256
21205 (base32
21206 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21207 (build-system python-build-system)
21208 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21209 (arguments `(#:tests? #f))
21210 (propagated-inputs
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)))
21223
21224 (define-public python-xattr
21225 (package
21226 (name "python-xattr")
21227 (version "0.9.7")
21228 (source
21229 (origin
21230 (method url-fetch)
21231 (uri (pypi-uri "xattr" version))
21232 (sha256
21233 (base32
21234 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21235 (build-system python-build-system)
21236 (propagated-inputs
21237 `(("python-cffi" ,python-cffi)))
21238 (home-page "https://github.com/xattr/xattr")
21239 (synopsis
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)))
21246
21247 (define-public python-json-logger
21248 (package
21249 (name "python-json-logger")
21250 (version "0.1.11")
21251 (source
21252 (origin
21253 (method url-fetch)
21254 (uri (pypi-uri "python-json-logger" version))
21255 (sha256
21256 (base32
21257 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21258 (build-system python-build-system)
21259 (home-page
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)))
21266
21267 (define-public python-daiquiri
21268 (package
21269 (name "python-daiquiri")
21270 (version "2.1.1")
21271 (source
21272 (origin
21273 (method url-fetch)
21274 (uri (pypi-uri "daiquiri" version))
21275 (sha256
21276 (base32
21277 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21278 (build-system python-build-system)
21279 (propagated-inputs
21280 `(("python-json-logger" ,python-json-logger)))
21281 (native-inputs
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")
21287 (synopsis
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)))
21292
21293 (define-public python-pifpaf
21294 (package
21295 (name "python-pifpaf")
21296 (version "2.5.0")
21297 (source
21298 (origin
21299 (method url-fetch)
21300 (uri (pypi-uri "pifpaf" version))
21301 (sha256
21302 (base32
21303 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21304 (build-system python-build-system)
21305 (arguments
21306 '(#:phases
21307 (modify-phases %standard-phases
21308 (replace 'check
21309 (lambda _
21310 (invoke "python" "setup.py" "testr" "--slowest"
21311 "--testr-args=until-failure"))))))
21312 (propagated-inputs
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)))
21321 (native-inputs
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)))
21334
21335 (define-public python-pytest-check-links
21336 (package
21337 (name "python-pytest-check-links")
21338 (version "0.3.0")
21339 (source
21340 (origin
21341 (method url-fetch)
21342 ;; URI uses underscores
21343 (uri (pypi-uri "pytest_check_links" version))
21344 (sha256
21345 (base32
21346 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21347 (build-system python-build-system)
21348 (propagated-inputs
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)))
21355 (native-inputs
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)))
21362
21363 (define-public python-json5
21364 (package
21365 (name "python-json5")
21366 (version "0.8.5")
21367 (source
21368 (origin
21369 ;; sample.json5 is missing from PyPi source tarball
21370 (method git-fetch)
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))
21375 (sha256
21376 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21377 (build-system python-build-system)
21378 (home-page "https://github.com/dpranke/pyjson5")
21379 (synopsis
21380 "Python implementation of the JSON5 data format")
21381 (description
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)))
21386
21387 (define-public python-frozendict
21388 (package
21389 (name "python-frozendict")
21390 (version "1.2")
21391 (source
21392 (origin
21393 (method url-fetch)
21394 (uri (pypi-uri "frozendict" version))
21395 (sha256
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")
21400 (description
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)))
21405
21406 (define-public python-unpaddedbase64
21407 (package
21408 (name "python-unpaddedbase64")
21409 (version "1.1.0")
21410 (source
21411 (origin
21412 (method git-fetch)
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))
21417 (sha256
21418 (base32
21419 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21420 (build-system python-build-system)
21421 (home-page "https://pypi.org/project/unpaddedbase64/")
21422 (synopsis "Encode and decode Base64 without “=” padding")
21423 (description
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)))
21428
21429 (define-public python-py-cpuinfo
21430 (package
21431 (name "python-py-cpuinfo")
21432 (version "5.0.0")
21433 (source
21434 (origin
21435 (method url-fetch)
21436 (uri (pypi-uri "py-cpuinfo" version))
21437 (sha256
21438 (base32
21439 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21440 (build-system python-build-system)
21441 (home-page "https://github.com/workhorsy/py-cpuinfo")
21442 (synopsis "Get CPU info with Python")
21443 (description
21444 "This Python module returns the CPU info by using the best sources of
21445 information for your operating system.")
21446 (license license:expat)))
21447
21448 (define-public python-canonicaljson
21449 (package
21450 (name "python-canonicaljson")
21451 (version "1.1.4")
21452 (source
21453 (origin
21454 (method url-fetch)
21455 (uri (pypi-uri "canonicaljson" version))
21456 (sha256
21457 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
21458 (build-system python-build-system)
21459 (propagated-inputs
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")
21465 (description
21466 "Deterministically encode JSON.
21467
21468 @itemize
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.
21477 @end itemize")
21478 (license license:asl2.0)))
21479
21480 (define-public python-signedjson
21481 (package
21482 (name "python-signedjson")
21483 (version "1.1.1")
21484 (source
21485 (origin
21486 (method url-fetch)
21487 (uri (pypi-uri "signedjson" version))
21488 (sha256
21489 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21490 (build-system python-build-system)
21491 (propagated-inputs
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)))
21497 (native-inputs
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")
21501 (description
21502 "Sign JSON objects with ED25519 signatures.
21503
21504 @itemize
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
21507 rotate keys
21508 @item ED25519 can be replaced with a different algorithm.
21509 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21510 key.
21511 @end itemize")
21512 (license license:asl2.0)))
21513
21514 (define-public python-daemonize
21515 (package
21516 (name "python-daemonize")
21517 (version "2.5.0")
21518 (source
21519 (origin
21520 (method url-fetch)
21521 (uri (pypi-uri "daemonize" version))
21522 (sha256
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)))
21529
21530 (define-public python-pymacaroons
21531 (package
21532 (name "python-pymacaroons")
21533 (version "0.13.0")
21534 (source
21535 (origin
21536 (method url-fetch)
21537 (uri (pypi-uri "pymacaroons" version))
21538 (sha256
21539 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21540 (build-system python-build-system)
21541 (propagated-inputs
21542 `(("python-six" ,python-six)
21543 ("python-pynacl" ,python-pynacl)))
21544 (home-page "https://github.com/ecordell/pymacaroons")
21545 (synopsis "Python Macaroon Library")
21546 (description
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.
21551
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)))
21556
21557 (define-public python-ldap3
21558 (package
21559 (name "python-ldap3")
21560 (version "2.7")
21561 (home-page "https://github.com/cannatag/ldap3")
21562 (source
21563 (origin
21564 (method git-fetch)
21565 (uri (git-reference (url home-page)
21566 (commit (string-append "v" version))))
21567 (file-name (git-file-name name version))
21568 (sha256
21569 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21570 (build-system python-build-system)
21571 (arguments
21572 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21573 #:phases (modify-phases %standard-phases
21574 (replace 'check
21575 (lambda* (#:key tests? #:allow-other-keys)
21576 (when tests?
21577 (invoke "nosetests" "-s" "test"))
21578 #t)))))
21579 (native-inputs
21580 `(("python-nose" ,python-nose)))
21581 (propagated-inputs
21582 `(("python-gssapi" ,python-gssapi)
21583 ("python-pyasn1" ,python-pyasn1)))
21584 (synopsis "Python LDAP client")
21585 (description
21586 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21587 library.")
21588 (license license:lgpl3+)))
21589
21590 (define-public python-boltons
21591 (package
21592 (name "python-boltons")
21593 (version "20.0.0")
21594 (source
21595 (origin
21596 (method url-fetch)
21597 (uri (pypi-uri "boltons" version))
21598 (sha256
21599 (base32
21600 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21601 (build-system python-build-system)
21602 (home-page "https://github.com/mahmoud/boltons")
21603 (synopsis "Extensions to the Python standard library")
21604 (description
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:
21607
21608 @itemize
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
21615 iterutils.backoff
21616 @item A full-featured TracebackInfo type, for representing stack traces, in
21617 tbutils
21618 @end itemize")
21619 (license license:bsd-3)))
21620
21621 (define-public python-eliot
21622 (package
21623 (name "python-eliot")
21624 (version "1.12.0")
21625 (source
21626 (origin
21627 (method url-fetch)
21628 (uri (pypi-uri "eliot" version))
21629 (sha256
21630 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21631 (build-system python-build-system)
21632 (arguments
21633 `(#:phases
21634 (modify-phases %standard-phases
21635 (add-after 'unpack 'remove-journald-support
21636 (lambda _
21637 (for-each delete-file
21638 '("eliot/tests/test_journald.py"
21639 "eliot/journald.py"))
21640 #t))
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.
21644 (lambda _
21645 (delete-file "eliot/tests/test_prettyprint.py")
21646 #t)))))
21647 (propagated-inputs
21648 `(("python-boltons" ,python-boltons)
21649 ("python-pyrsistent" ,python-pyrsistent)
21650 ("python-six" ,python-six)
21651 ("python-zope-interface" ,python-zope-interface)))
21652 (native-inputs
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")
21667 (description
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)))
21673
21674 (define-public python-pem
21675 (package
21676 (name "python-pem")
21677 (version "20.1.0")
21678 (source
21679 (origin
21680 (method url-fetch)
21681 (uri (pypi-uri "pem" version))
21682 (sha256
21683 (base32
21684 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
21685 (build-system python-build-system)
21686 (native-inputs
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")
21696 (description
21697 "This package provides a Python module for parsing and splitting PEM files.")
21698 (license license:expat)))
21699
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")
21704 (revision "0"))
21705 (package
21706 (name "python-txsni")
21707 (version (git-version "0.1.9" revision commit))
21708 (home-page "https://github.com/glyph/txsni")
21709 (source
21710 (origin
21711 (method git-fetch)
21712 (uri (git-reference (url home-page) (commit commit)))
21713 (file-name (git-file-name name version))
21714 (sha256
21715 (base32
21716 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
21717 (build-system python-build-system)
21718 (propagated-inputs
21719 `(("python-pyopenssl" ,python-pyopenssl)
21720 ("python-service-identity" ,python-service-identity)
21721 ("python-twisted" ,python-twisted)))
21722 (synopsis "Run TLS servers with Twisted")
21723 (description
21724 "This package provides an easy-to-use SNI endpoint for use
21725 with the Twisted web framework.")
21726 (license license:expat))))
21727
21728 (define-public python-txacme
21729 (package
21730 (name "python-txacme")
21731 (version "0.9.2")
21732 (source
21733 (origin
21734 (method url-fetch)
21735 (uri (pypi-uri "txacme" version))
21736 (sha256
21737 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
21738 (build-system python-build-system)
21739 (propagated-inputs
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)))
21748 (native-inputs
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")
21759 (description
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.
21764
21765 txacme is an implementation of the protocol for Twisted, the event-driven
21766 networking engine for Python.")
21767 (license license:expat)))
21768
21769 (define-public python-pysaml2
21770 (package
21771 (name "python-pysaml2")
21772 (version "5.0.0")
21773 (source
21774 (origin
21775 (method url-fetch)
21776 (uri (pypi-uri "pysaml2" version))
21777 (sha256
21778 (base32
21779 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
21780 (build-system python-build-system)
21781 (propagated-inputs
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")
21791 (description
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.
21795
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)))
21799
21800 (define-public python-click-plugins
21801 (package
21802 (name "python-click-plugins")
21803 (version "1.1.1")
21804 (source
21805 (origin
21806 (method url-fetch)
21807 (uri (pypi-uri "click-plugins" version))
21808 (sha256
21809 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
21810 (build-system python-build-system)
21811 (native-inputs
21812 `(("python-pytest" ,python-pytest)))
21813 (propagated-inputs
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)))
21820
21821 (define-public python-diceware
21822 (package
21823 (name "python-diceware")
21824 (version "0.9.6")
21825 (source
21826 (origin
21827 (method url-fetch)
21828 (uri (pypi-uri "diceware" version))
21829 (sha256
21830 (base32
21831 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
21832 (build-system python-build-system)
21833 (native-inputs
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+)))
21844
21845 (define-public python-dictdiffer
21846 (package
21847 (name "python-dictdiffer")
21848 (version "0.8.1")
21849 (source (origin
21850 (method url-fetch)
21851 (uri (pypi-uri "dictdiffer" version))
21852 (sha256
21853 (base32
21854 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
21855 (build-system python-build-system)
21856 (native-inputs
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")
21871 (description
21872 "Dictdiffer is a Python module that helps you to diff and patch
21873 dictionaries.")
21874 (license license:expat)))
21875
21876 (define-public pyzo
21877 (package
21878 (name "pyzo")
21879 (version "4.10.2")
21880 (source
21881 (origin
21882 (method url-fetch)
21883 (uri (pypi-uri "pyzo" version))
21884 (sha256
21885 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
21886 (build-system python-build-system)
21887 (arguments
21888 `(#:phases
21889 (modify-phases %standard-phases
21890 (add-before 'check 'fix-home-directory
21891 (lambda _
21892 ;; Tests fail with "Permission denied: '/homeless-shelter'".
21893 (setenv "HOME" "/tmp")
21894 #t)))
21895 ;; Tests fail with "Uncaught Python exception: invalid literal for
21896 ;; int() with base 10: 'test'".
21897 #:tests? #f))
21898 (propagated-inputs
21899 `(("python-pyqt" ,python-pyqt)))
21900 (home-page "https://pyzo.org")
21901 (synopsis
21902 "Python IDE for scientific computing")
21903 (description
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.
21907
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,
21911 workspace...")
21912 (license license:bsd-2)))
21913
21914 (define-public python-osc
21915 (package
21916 (name "python-osc")
21917 (version "1.7.4")
21918 (source
21919 (origin
21920 (method url-fetch)
21921 (uri (pypi-uri "python-osc" version))
21922 (sha256
21923 (base32
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")
21928 (description
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)))
21933
21934 (define-public python-voluptuous
21935 (package
21936 (name "python-voluptuous")
21937 (version "0.11.7")
21938 (source
21939 (origin
21940 (method url-fetch)
21941 (uri (pypi-uri "voluptuous" version))
21942 (sha256
21943 (base32
21944 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
21945 (build-system python-build-system)
21946 (native-inputs
21947 `(("python-nose" ,python-nose)))
21948 (home-page "https://github.com/alecthomas/voluptuous")
21949 (synopsis "Python data validation library")
21950 (description
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)))
21954
21955 (define-public python-cmd2
21956 (package
21957 (name "python-cmd2")
21958 (version "1.0.2")
21959 (source
21960 (origin
21961 (method url-fetch)
21962 (uri (pypi-uri "cmd2" version))
21963 (sha256
21964 (base32
21965 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
21966 (build-system python-build-system)
21967 (propagated-inputs
21968 `(("python-attrs" ,python-attrs)
21969 ("python-colorama" ,python-colorama)
21970 ("python-pyperclip" ,python-pyperclip)
21971 ("python-wcwidth" ,python-wcwidth)))
21972 (native-inputs
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)
21988 ("which" ,which)))
21989 (home-page "https://github.com/python-cmd2/cmd2")
21990 (synopsis "Tool for building interactive command line applications")
21991 (description
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)))
22000
22001 (define-public python-pytidylib
22002 (package
22003 (name "python-pytidylib")
22004 (version "0.3.2")
22005 (source (origin
22006 (method url-fetch)
22007 (uri (pypi-uri "pytidylib" version))
22008 (sha256
22009 (base32
22010 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22011 (build-system python-build-system)
22012 (arguments
22013 '(#:phases
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)))
22022 #t))))))
22023 (inputs `(("tidy" ,tidy)))
22024 (home-page "https://github.com/countergram/pytidylib")
22025 (synopsis "Python wrapper for HTML Tidy library")
22026 (description
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)))
22030
22031 (define-public python2-pytidylib
22032 (package-with-python2 python-pytidylib))
22033
22034 (define-public python-mujson
22035 (package
22036 (name "python-mujson")
22037 (version "1.4")
22038 (source
22039 (origin
22040 (method url-fetch)
22041 (uri (pypi-uri "mujson" version))
22042 (sha256
22043 (base32
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
22049 at import time.")
22050 (license license:expat)))
22051
22052 (define-public python-bashlex
22053 (package
22054 (name "python-bashlex")
22055 (version "0.14")
22056 (source
22057 (origin
22058 (method url-fetch)
22059 (uri (pypi-uri "bashlex" version))
22060 (sha256
22061 (base32
22062 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22063 (build-system python-build-system)
22064 (arguments
22065 `(#:phases
22066 (modify-phases %standard-phases
22067 (add-before 'build 'pregenerate-yacc-tables
22068 (lambda _
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"))))))
22072 (home-page
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.
22077
22078 For the most part it's transliterated from C, the major differences are:
22079
22080 @itemize
22081 @item it does not execute anything
22082 @item it is reentrant
22083 @item it generates a complete AST
22084 @end itemize
22085 ")
22086 (license license:gpl3+)))
22087
22088 (define-public python-jinxed
22089 (package
22090 (name "python-jinxed")
22091 (version "1.0.0")
22092 (source
22093 (origin
22094 (method url-fetch)
22095 (uri (pypi-uri "jinxed" version))
22096 (sha256
22097 (base32
22098 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22099 (build-system python-build-system)
22100 (arguments
22101 '(#:phases
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"))
22108 #t))))
22109 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22110 (native-inputs
22111 `(("ncurses" ,ncurses)))
22112 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22113 (synopsis "Jinxed Terminal Library")
22114 (description
22115 "Jinxed is an implementation of a subset of the Python curses library.")
22116 (license license:mpl2.0)))
22117
22118 (define-public python-blessed
22119 (package
22120 (name "python-blessed")
22121 (version "1.17.8")
22122 (source
22123 (origin
22124 (method url-fetch)
22125 (uri (pypi-uri "blessed" version))
22126 (sha256
22127 (base32
22128 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22129 (modules '((guix build utils)))
22130 (snippet
22131 '(begin
22132 ;; Don't get hung up on Windows test failures.
22133 (delete-file "blessed/win_terminal.py") #t))))
22134 (build-system python-build-system)
22135 (propagated-inputs
22136 `(("python-jinxed" ,python-jinxed)
22137 ("python-six" ,python-six)
22138 ("python-wcwidth" ,python-wcwidth)))
22139 (native-inputs
22140 `(("python-mock" ,python-mock)
22141 ("python-pytest" ,python-pytest)))
22142 (home-page "https://github.com/jquast/blessed")
22143 (synopsis "Wrapper around terminal capabilities")
22144 (description
22145 "Blessed is a thin, practical wrapper around terminal styling, screen
22146 positioning, and keyboard input.")
22147 (license license:expat)))
22148
22149 (define-public python-readme-renderer
22150 (package
22151 (name "python-readme-renderer")
22152 (version "26.0")
22153 (source
22154 (origin
22155 (method url-fetch)
22156 (uri (pypi-uri "readme_renderer" version))
22157 (sha256
22158 (base32
22159 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22160 (build-system python-build-system)
22161 (propagated-inputs
22162 `(("python-bleach" ,python-bleach)
22163 ("python-docutils" ,python-docutils)
22164 ("python-pygments" ,python-pygments)
22165 ("python-six" ,python-six)))
22166 (native-inputs
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")
22171 (description
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,
22175 and plain text.")
22176 (license license:asl2.0)))
22177
22178 (define-public python-lazr-delegates
22179 (package
22180 (name "python-lazr-delegates")
22181 (version "2.0.4")
22182 (source
22183 (origin
22184 (method url-fetch)
22185 (uri (pypi-uri "lazr.delegates" version))
22186 (sha256
22187 (base32
22188 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22189 (build-system python-build-system)
22190 (arguments
22191 '(#:phases
22192 (modify-phases %standard-phases
22193 (replace 'check
22194 (lambda _
22195 (invoke "python" "setup.py" "nosetests"))))))
22196 (native-inputs
22197 `(("python-nose" ,python-nose)))
22198 (propagated-inputs
22199 `(("python-zope-interface" ,python-zope-interface)))
22200 (home-page "https://launchpad.net/lazr.delegates")
22201 (synopsis "Easily write objects that delegate behavior")
22202 (description
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)))
22208
22209 (define-public python-lazr-config
22210 (package
22211 (name "python-lazr-config")
22212 (version "2.2.2")
22213 (source
22214 (origin
22215 (method url-fetch)
22216 (uri (pypi-uri "lazr.config" version))
22217 (sha256
22218 (base32
22219 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22220 (build-system python-build-system)
22221 (arguments
22222 '(#:phases
22223 (modify-phases %standard-phases
22224 (replace 'check
22225 (lambda _
22226 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22227 (native-inputs
22228 `(("python-nose" ,python-nose)))
22229 (propagated-inputs
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")
22234 (description
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
22240 validation.")
22241 (license license:lgpl3)))
22242
22243 (define-public python-flufl-bounce
22244 (package
22245 (name "python-flufl-bounce")
22246 (version "3.0.1")
22247 (source
22248 (origin
22249 (method url-fetch)
22250 (uri (pypi-uri "flufl.bounce" version))
22251 (sha256
22252 (base32
22253 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22254 (build-system python-build-system)
22255 (propagated-inputs
22256 `(("python-atpublic" ,python-atpublic)
22257 ("python-zope-interface" ,python-zope-interface)))
22258 (native-inputs
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
22265 RFC 3464.")
22266 (license (list license:asl2.0
22267 license:lgpl3)))) ; only for setup_headers.py
22268
22269 (define-public python-flufl-i18n
22270 (package
22271 (name "python-flufl-i18n")
22272 (version "3.0")
22273 (source
22274 (origin
22275 (method url-fetch)
22276 (uri (pypi-uri "flufl.i18n" version))
22277 (sha256
22278 (base32
22279 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22280 (build-system python-build-system)
22281 (propagated-inputs
22282 `(("python-atpublic" ,python-atpublic)))
22283 (home-page "https://flufli18n.readthedocs.io")
22284 (synopsis "API for Python internationalization")
22285 (description
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
22292 different tasks.")
22293 (license license:asl2.0)))
22294
22295 (define-public python-flufl-lock
22296 (package
22297 (name "python-flufl-lock")
22298 (version "4.0")
22299 (source
22300 (origin
22301 (method url-fetch)
22302 (uri (pypi-uri "flufl.lock" version))
22303 (sha256
22304 (base32
22305 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22306 (build-system python-build-system)
22307 (propagated-inputs
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")
22312 (description
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
22319
22320 (define-public python-flufl-testing
22321 (package
22322 (name "python-flufl-testing")
22323 (version "0.8")
22324 (source
22325 (origin
22326 (method url-fetch)
22327 (uri (pypi-uri "flufl.testing" version))
22328 (sha256
22329 (base32
22330 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22331 (build-system python-build-system)
22332 (native-inputs
22333 `(("python-nose2" ,python-nose2)))
22334 (home-page "https://gitlab.com/warsaw/flufl.testing")
22335 (synopsis "Collection of test tool plugins")
22336 (description
22337 "This package contains a small collection of test tool plugins for
22338 @code{nose2} and @code{flake8}.")
22339 (license license:asl2.0)))
22340
22341 (define-public python-devtools
22342 (package
22343 (name "python-devtools")
22344 (version "0.6")
22345 (source
22346 (origin
22347 (method git-fetch)
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))
22352 (sha256
22353 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22354 (build-system python-build-system)
22355 (native-inputs
22356 `(("python-pytest" ,python-pytest)
22357 ("python-pytest-mock" ,python-pytest-mock)))
22358 (propagated-inputs
22359 `(("python-pygments" ,python-pygments)))
22360 (arguments
22361 `(#:phases (modify-phases %standard-phases
22362 (replace 'check
22363 (lambda _
22364 (invoke "pytest")
22365 #t)))))
22366 (home-page "https://github.com/samuelcolvin/python-devtools")
22367 (synopsis "Debug command and development tools")
22368 (description
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)))
22372
22373 (define-public python-dateparser
22374 (package
22375 (name "python-dateparser")
22376 (version "0.7.6")
22377 (source
22378 (origin
22379 (method url-fetch)
22380 (uri (pypi-uri "dateparser" version))
22381 (sha256
22382 (base32
22383 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22384 (build-system python-build-system)
22385 (propagated-inputs
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)))
22391 (native-inputs
22392 `(("python-mock" ,python-mock)
22393 ("python-parameterized" ,python-parameterized)
22394 ("tzdata" ,tzdata-for-tests)))
22395 (arguments
22396 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22397 #:tests? #f
22398 #:phases
22399 (modify-phases %standard-phases
22400 (add-before 'check 'set-check-environment
22401 (lambda* (#:key inputs #:allow-other-keys)
22402 (setenv "TZ" "UTC")
22403 (setenv "TZDIR"
22404 (string-append (assoc-ref inputs "tzdata")
22405 "/share/zoneinfo"))
22406 #t)))))
22407 (home-page "https://github.com/scrapinghub/dateparser")
22408 (synopsis
22409 "Date parsing library designed to parse dates from HTML pages")
22410 (description
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)))
22414
22415 (define-public python-dparse
22416 (package
22417 (name "python-dparse")
22418 (version "0.5.1")
22419 (source
22420 (origin
22421 (method url-fetch)
22422 (uri (pypi-uri "dparse" version))
22423 (sha256
22424 (base32
22425 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22426 (build-system python-build-system)
22427 (native-inputs
22428 `(("python-pytest" ,python-pytest)))
22429 (propagated-inputs
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)))
22437
22438 (define-public python-dpath
22439 (package
22440 (name "python-dpath")
22441 (version "2.0.1")
22442 (source
22443 (origin
22444 (method url-fetch)
22445 (uri (pypi-uri "dpath" version))
22446 (sha256
22447 (base32
22448 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22449 (build-system python-build-system)
22450 (native-inputs
22451 `(("python-hypothesis" ,python-hypothesis)
22452 ("python-mock" ,python-mock)
22453 ("python-nose" ,python-nose)))
22454 (arguments
22455 '(#:phases
22456 (modify-phases %standard-phases
22457 (replace 'check
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")
22464 (description
22465 "@code{python-dpath} is a library for accessing and searching
22466 dictionaries via /slashed/paths ala xpath.
22467
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)))
22473
22474 (define-public python-safety
22475 (package
22476 (name "python-safety")
22477 (version "1.9.0")
22478 (source
22479 (origin
22480 (method url-fetch)
22481 (uri (pypi-uri "safety" version))
22482 (sha256
22483 (base32
22484 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22485 (build-system python-build-system)
22486 (arguments
22487 `(#:phases
22488 (modify-phases %standard-phases
22489 (add-after 'unpack 'disable-tests
22490 (lambda _
22491 (substitute* "tests/test_safety.py"
22492 ;; requires network
22493 (("def test_check_live") "def _test_check_live"))
22494 #t)))))
22495 (propagated-inputs
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)))
22505
22506 (define-public python-pypandoc
22507 (package
22508 (name "python-pypandoc")
22509 (version "1.5")
22510 (source
22511 (origin
22512 (method url-fetch)
22513 (uri (pypi-uri "pypandoc" version))
22514 (sha256
22515 (base32
22516 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22517 (build-system python-build-system)
22518 (inputs
22519 `(("pandoc" ,pandoc)
22520 ("pandoc-citeproc" ,pandoc-citeproc)))
22521 (propagated-inputs
22522 `(("wheel" ,python-wheel)))
22523 (native-inputs
22524 `(("texlive" ,(texlive-union (list texlive-amsfonts
22525 texlive-fonts-ec
22526 texlive-latex-hyperref
22527 texlive-latex-oberdiek
22528 texlive-lm
22529 texlive-xcolor)))))
22530 (arguments
22531 `(#:phases
22532 (modify-phases %standard-phases
22533 (add-before 'check 'disable-tests
22534 (lambda _
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")
22541 #t)))))
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)))
22547
22548 (define-public python-rnc2rng
22549 (package
22550 (name "python-rnc2rng")
22551 (version "2.6.4")
22552 (source
22553 (origin
22554 (method url-fetch)
22555 (uri (pypi-uri "rnc2rng" version))
22556 (sha256
22557 (base32
22558 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22559 (build-system python-build-system)
22560 (propagated-inputs
22561 `(("python-rply" ,python-rply)))
22562 (arguments
22563 `(#:phases (modify-phases %standard-phases
22564 (replace 'check
22565 (lambda _
22566 (invoke "python" "test.py"))))))
22567 (home-page "https://github.com/djc/rnc2rng")
22568 (synopsis "Convert RELAX NG Compact to regular syntax")
22569 (description
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)))
22574
22575 (define-public python-citeproc-py
22576 (package
22577 (name "python-citeproc-py")
22578 (version "0.5.1")
22579 (source
22580 (origin
22581 (method url-fetch)
22582 (uri (pypi-uri "citeproc-py" version))
22583 (sha256
22584 (base32
22585 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22586 (build-system python-build-system)
22587 (propagated-inputs
22588 `(("python-lxml" ,python-lxml)
22589 ("python-rnc2rng" ,python-rnc2rng)))
22590 (home-page
22591 "https://github.com/brechtm/citeproc-py")
22592 (synopsis "Citations and bibliography formatter")
22593 (description
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)))
22599
22600 (define-public python-inform
22601 (package
22602 (name "python-inform")
22603 (version "1.23.0")
22604 (source
22605 (origin
22606 (method url-fetch)
22607 (uri (pypi-uri "inform" version))
22608 (sha256
22609 (base32
22610 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
22611 (build-system python-build-system)
22612 (arguments
22613 `(#:tests? #f)) ; PyPI tarball lacks tests
22614 (native-inputs
22615 `(("python-hypothesis" ,python-hypothesis)
22616 ("python-pytest-cov" ,python-pytest-cov)
22617 ("python-pytest-runner" ,python-pytest-runner)))
22618 (propagated-inputs
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")
22623 (description
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+)))
22628
22629 (define-public python-nestedtext
22630 (package
22631 (name "python-nestedtext")
22632 (version "1.0.0")
22633 (source
22634 (origin
22635 (method url-fetch)
22636 (uri (pypi-uri "nestedtext" version))
22637 (sha256
22638 (base32
22639 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
22640 (build-system python-build-system)
22641 (arguments
22642 `(#:tests? #f)) ; PyPI tarball lacks tests
22643 (propagated-inputs
22644 `(("python-inform" ,python-inform)))
22645 (home-page "https://nestedtext.org")
22646 (synopsis "Human readable and writable data interchange format")
22647 (description
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
22656
22657 (define-public python-parallel
22658 (package
22659 (name "python-parallel")
22660 (version "1.6.4.4")
22661 (source
22662 (origin
22663 (method url-fetch)
22664 (uri (string-append
22665 "https://www.parallelpython.com/downloads/pp/pp-"
22666 version ".zip"))
22667 (sha256
22668 (base32
22669 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
22670 (native-inputs
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)))
22683
22684 (define-public python2-parallel
22685 (package-with-python2 python-parallel))