gnu: python-tabulate: Update to 0.8.7.
[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 ;;;
86 ;;; This file is part of GNU Guix.
87 ;;;
88 ;;; GNU Guix is free software; you can redistribute it and/or modify it
89 ;;; under the terms of the GNU General Public License as published by
90 ;;; the Free Software Foundation; either version 3 of the License, or (at
91 ;;; your option) any later version.
92 ;;;
93 ;;; GNU Guix is distributed in the hope that it will be useful, but
94 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
95 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96 ;;; GNU General Public License for more details.
97 ;;;
98 ;;; You should have received a copy of the GNU General Public License
99 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
100
101 (define-module (gnu packages python-xyz)
102 #:use-module ((guix licenses) #:prefix license:)
103 #:use-module (gnu packages)
104 #:use-module (gnu packages algebra)
105 #:use-module (gnu packages adns)
106 #:use-module (gnu packages attr)
107 #:use-module (gnu packages backup)
108 #:use-module (gnu packages bash)
109 #:use-module (gnu packages check)
110 #:use-module (gnu packages cmake)
111 #:use-module (gnu packages compression)
112 #:use-module (gnu packages crypto)
113 #:use-module (gnu packages databases)
114 #:use-module (gnu packages dbm)
115 #:use-module (gnu packages enchant)
116 #:use-module (gnu packages file)
117 #:use-module (gnu packages fontutils)
118 #:use-module (gnu packages gcc)
119 #:use-module (gnu packages geo)
120 #:use-module (gnu packages ghostscript)
121 #:use-module (gnu packages gl)
122 #:use-module (gnu packages glib)
123 #:use-module (gnu packages gnome)
124 #:use-module (gnu packages graphviz)
125 #:use-module (gnu packages graphics)
126 #:use-module (gnu packages gsasl)
127 #:use-module (gnu packages gstreamer)
128 #:use-module (gnu packages gtk)
129 #:use-module (gnu packages icu4c)
130 #:use-module (gnu packages image)
131 #:use-module (gnu packages imagemagick)
132 #:use-module (gnu packages kerberos)
133 #:use-module (gnu packages libevent)
134 #:use-module (gnu packages libffi)
135 #:use-module (gnu packages linux)
136 #:use-module (gnu packages llvm)
137 #:use-module (gnu packages man)
138 #:use-module (gnu packages maths)
139 #:use-module (gnu packages monitoring)
140 #:use-module (gnu packages multiprecision)
141 #:use-module (gnu packages networking)
142 #:use-module (gnu packages ncurses)
143 #:use-module (gnu packages openstack)
144 #:use-module (gnu packages pcre)
145 #:use-module (gnu packages perl)
146 #:use-module (gnu packages photo)
147 #:use-module (gnu packages pkg-config)
148 #:use-module (gnu packages python)
149 #:use-module (gnu packages python-check)
150 #:use-module (gnu packages python-compression)
151 #:use-module (gnu packages python-crypto)
152 #:use-module (gnu packages python-science)
153 #:use-module (gnu packages python-web)
154 #:use-module (gnu packages qt)
155 #:use-module (gnu packages readline)
156 #:use-module (gnu packages sdl)
157 #:use-module (gnu packages search)
158 #:use-module (gnu packages shells)
159 #:use-module (gnu packages sphinx)
160 #:use-module (gnu packages ssh)
161 #:use-module (gnu packages terminals)
162 #:use-module (gnu packages tex)
163 #:use-module (gnu packages texinfo)
164 #:use-module (gnu packages time)
165 #:use-module (gnu packages tls)
166 #:use-module (gnu packages version-control)
167 #:use-module (gnu packages video)
168 #:use-module (gnu packages web)
169 #:use-module (gnu packages base)
170 #:use-module (gnu packages xml)
171 #:use-module (gnu packages xorg)
172 #:use-module (gnu packages xdisorg)
173 #:use-module (gnu packages tcl)
174 #:use-module (gnu packages bdw-gc)
175 #:use-module (gnu packages serialization)
176 #:use-module (guix packages)
177 #:use-module (guix download)
178 #:use-module (guix git-download)
179 #:use-module (guix hg-download)
180 #:use-module (guix utils)
181 #:use-module (guix build-system gnu)
182 #:use-module (guix build-system cmake)
183 #:use-module (guix build-system python)
184 #:use-module (guix build-system trivial)
185 #:use-module (srfi srfi-1)
186 #:use-module (srfi srfi-26))
187
188 (define-public python-tenacity
189 (package
190 (name "python-tenacity")
191 (version "6.1.0")
192 (source (origin
193 (method url-fetch)
194 (uri (pypi-uri "tenacity" version))
195 (sha256
196 (base32
197 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
198 (build-system python-build-system)
199 (native-inputs
200 `(("python-setuptools-scm" ,python-setuptools-scm)
201 ("python-sphinx" ,python-sphinx)
202 ("python-tornado" ,python-tornado)
203 ("python-pytest" ,python-pytest)))
204 (propagated-inputs
205 `(("python-six" ,python-six)))
206 (arguments
207 `(#:phases (modify-phases %standard-phases
208 (replace 'check
209 (lambda _
210 (invoke "pytest")
211 #t)))))
212 (home-page "https://github.com/jd/tenacity")
213 (synopsis "Retrying library for python")
214 (description "Tenacity is a general-purpose python library to simplify the
215 task of adding retry behavior to just about anything.")
216 (license license:asl2.0)))
217
218 (define-public python-colorlog
219 (package
220 (name "python-colorlog")
221 (version "4.1.0")
222 (source (origin
223 (method url-fetch)
224 (uri (pypi-uri "colorlog" version))
225 (sha256
226 (base32
227 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
228 (build-system python-build-system)
229 (native-inputs
230 `(("python-pytest" ,python-pytest)))
231 (arguments
232 `(#:phases (modify-phases %standard-phases
233 (replace 'check
234 (lambda _
235 ;; Extend PYTHONPATH so the built package will be found.
236 (setenv "PYTHONPATH"
237 (string-append (getcwd) "/build/lib:"
238 (getenv "PYTHONPATH")))
239 (invoke "pytest" "-p" "no:logging")
240 #t)))))
241 (home-page "https://github.com/borntyping/python-colorlog")
242 (synopsis "Log formatting with colors for python")
243 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
244 with Python's logging module that outputs records using terminal colors.")
245 (license license:expat)))
246
247 (define-public python-pyprind
248 (package
249 (name "python-pyprind")
250 (version "2.11.2")
251 (source (origin
252 (method url-fetch)
253 (uri (pypi-uri "PyPrind" version))
254 (sha256
255 (base32
256 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
257 (build-system python-build-system)
258 (propagated-inputs
259 `(("python-psutil" ,python-psutil)))
260 (home-page "https://github.com/rasbt/pyprind")
261 (synopsis "Python Progress Bar and Percent Indicator Utility")
262 (description "The PyPrind (Python Progress Indicator) module provides a
263 progress bar and a percentage indicator object that let you track the progress
264 of a loop structure or other iterative computation.")
265 (license license:bsd-3)))
266
267 (define-public python-gphoto2
268 (package
269 (name "python-gphoto2")
270 (version "2.2.1")
271 (source (origin
272 (method url-fetch)
273 (uri (pypi-uri "gphoto2" version))
274 (sha256
275 (base32
276 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
277 (build-system python-build-system)
278 (native-inputs
279 `(("pkg-config" ,pkg-config)))
280 (inputs
281 `(("libgphoto2" ,libgphoto2)))
282 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
283 (synopsis "Python interface to libgphoto2")
284 (description "@code{python-gphoto2} is a comprehensive Python interface
285 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
286 automatically generate the interface code.")
287 (license license:gpl3+)))
288
289 (define-public python-colour
290 (package
291 (name "python-colour")
292 (version "0.1.5")
293 (source (origin
294 (method url-fetch)
295 (uri (pypi-uri "colour" version))
296 (sha256
297 (base32
298 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
299 (build-system python-build-system)
300 (native-inputs
301 `(("python-d2to1" ,python-d2to1)))
302 (home-page "https://github.com/vaab/colour")
303 (synopsis "Convert and manipulate various color representations")
304 (description "Pythonic way to manipulate color representations (HSL, RVB,
305 web, X11, ...).")
306 (license license:expat)))
307
308 (define-public python-d2to1
309 (package
310 (name "python-d2to1")
311 (version "0.2.12.post1")
312 (source (origin
313 (method url-fetch)
314 (uri (pypi-uri "d2to1" version))
315 (sha256
316 (base32
317 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
318 (build-system python-build-system)
319 (native-inputs
320 `(("python-nose" ,python-nose)))
321 (home-page "https://github.com/embray/d2to1")
322 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
323 in python")
324 (description "The python package d2to1 (the d is for distutils) allows
325 using distutils2-like setup.cfg files for a package's metadata with a
326 distribute/setuptools setup.py script.")
327 (license license:bsd-2)))
328
329 (define-public python-rawkit
330 (package
331 (name "python-rawkit")
332 (version "0.6.0")
333 (source (origin
334 (method url-fetch)
335 (uri (pypi-uri "rawkit" version))
336 (sha256
337 (base32
338 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
339 (build-system python-build-system)
340 (native-inputs
341 `(("python-pytest" ,python-pytest)
342 ("python-mock" ,python-mock)))
343 (inputs
344 `(("libraw" ,libraw)))
345 (home-page "https://rawkit.readthedocs.io")
346 (synopsis "Ctypes-based LibRaw binding for Python")
347 (description "The rawkit package provides two modules: rawkit and libraw.
348 The rawkit module provides a high-level Pythonic interface for developing raw
349 photos, while the libraw module provides a CTypes based interface for
350 interacting with the low-level LibRaw C APIs.")
351 (license license:expat)))
352
353 (define-public python-easygui
354 (package
355 (name "python-easygui")
356 (version "0.98.1")
357 (source (origin
358 (method url-fetch)
359 (uri (pypi-uri "easygui" version))
360 (sha256
361 (base32
362 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
363 (build-system python-build-system)
364 (propagated-inputs
365 `(("python-tkinter" ,python "tk")))
366 (home-page "https://github.com/robertlugg/easygui")
367 (synopsis "GUI programming module for Python")
368 (description "EasyGUI is a module for very simple, very easy GUI
369 programming in Python. EasyGUI is different from other GUI generators in that
370 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
371 simple function calls.")
372 (license license:bsd-3)))
373
374 (define-public python-pymediainfo
375 (package
376 (name "python-pymediainfo")
377 (version "4.1")
378 (source
379 (origin
380 (method url-fetch)
381 (uri (pypi-uri "pymediainfo" version))
382 (sha256
383 (base32
384 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
385 (build-system python-build-system)
386 (native-inputs
387 `(("python-setuptools-scm" ,python-setuptools-scm)
388 ("python-pytest" ,python-pytest)))
389 (inputs
390 `(("libmediainfo" ,libmediainfo)))
391 (arguments
392 `(#:phases
393 (modify-phases %standard-phases
394 (add-after 'unpack 'patch-libmediainfo
395 (lambda _
396 (substitute* "pymediainfo/__init__.py"
397 (("libmediainfo.so.0")
398 (string-append (assoc-ref %build-inputs "libmediainfo")
399 "/lib/libmediainfo.so.0")))
400 #t))
401 (replace 'check
402 (lambda _
403 ;; Extend PYTHONPATH so the built package will be found.
404 (setenv "PYTHONPATH"
405 (string-append (getcwd) "/build/lib:"
406 (getenv "PYTHONPATH")))
407 ;; Skip the only failing test "test_parse_url"
408 (invoke "pytest" "-vv" "-k" "not test_parse_url")
409 #t)))))
410 (home-page
411 "https://github.com/sbraz/pymediainfo")
412 (synopsis
413 "Python wrapper for the mediainfo library")
414 (description
415 "Python wrapper for the mediainfo library to access the technical and tag
416 data for video and audio files.")
417 (license license:expat)))
418
419 (define-public python-psutil
420 (package
421 (name "python-psutil")
422 (version "5.7.0")
423 (source
424 (origin
425 (method url-fetch)
426 (uri (pypi-uri "psutil" version))
427 (sha256
428 (base32 "03jykdi3dgf1cdal9bv4fq9zjvzj9l9bs99gi5ar81sdl5nc2pk8"))))
429 (build-system python-build-system)
430 (arguments
431 ;; FIXME: some tests do not return and time out. Some tests fail because
432 ;; some processes survive kill().
433 '(#:tests? #f))
434 (home-page "https://www.github.com/giampaolo/psutil")
435 (synopsis "Library for retrieving information on running processes")
436 (description
437 "psutil (Python system and process utilities) is a library for retrieving
438 information on running processes and system utilization (CPU, memory, disks,
439 network) in Python. It is useful mainly for system monitoring, profiling and
440 limiting process resources and management of running processes. It implements
441 many functionalities offered by command line tools such as: ps, top, lsof,
442 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
443 pidof, tty, taskset, pmap.")
444 (properties `((python2-variant . ,(delay python2-psutil))))
445 (license license:bsd-3)))
446
447 (define-public python2-psutil
448 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
449 (package
450 (inherit base)
451 (propagated-inputs
452 `(("python2-enum34" ,python2-enum34) ;optional
453 ,@(package-propagated-inputs base))))))
454
455 (define-public python-shapely
456 (package
457 (name "python-shapely")
458 (version "1.6.4.post2")
459 (source
460 (origin
461 (method url-fetch)
462 (uri (pypi-uri "Shapely" version))
463 (sha256
464 (base32
465 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
466 (build-system python-build-system)
467 (native-inputs
468 `(("python-cython" ,python-cython)
469 ("python-matplotlib" ,python-matplotlib)
470 ("python-pytest" ,python-pytest)
471 ("python-pytest-cov" ,python-pytest-cov)))
472 (inputs
473 `(("geos" ,geos)))
474 (propagated-inputs
475 `(("python-numpy" ,python-numpy)))
476 (arguments
477 `(#:phases
478 (modify-phases %standard-phases
479 (add-after 'unpack 'patch-geos-path
480 (lambda* (#:key inputs #:allow-other-keys)
481 (let ((geos (assoc-ref inputs "geos"))
482 (glibc (assoc-ref inputs ,(if (%current-target-system)
483 "cross-libc" "libc"))))
484 (substitute* "shapely/geos.py"
485 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
486 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
487 geos "/lib/libgeos_c.so'])"))
488 (("free = load_dll\\('c'\\)\\.free")
489 (string-append "free = load_dll('c', fallbacks=['"
490 glibc "/lib/libc.so.6']).free"))))
491 #t)))))
492 (home-page "https://github.com/Toblerity/Shapely")
493 (synopsis "Library for the manipulation and analysis of geometric objects")
494 (description "Shapely is a Python package for manipulation and analysis of
495 planar geometric objects. It is based on the @code{GEOS} library.")
496 (license license:bsd-3)))
497
498 (define-public python-shortuuid
499 (package
500 (name "python-shortuuid")
501 (version "0.5.0")
502 (source
503 (origin
504 (method url-fetch)
505 (uri (pypi-uri "shortuuid" version))
506 (sha256
507 (base32
508 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
509 (build-system python-build-system)
510 (native-inputs
511 `(("python-pep8" ,python-pep8)))
512 (home-page "https://github.com/skorokithakis/shortuuid")
513 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
514 (description
515 "@code{shortuuid} is a Python library for generating concise, unambiguous
516 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
517 module and then similar looking characters are removed.")
518 (license license:bsd-3)))
519
520 (define-public python-logwrap
521 (package
522 (name "python-logwrap")
523 (version "3.2.1")
524 (source
525 (origin
526 (method url-fetch)
527 (uri (pypi-uri "logwrap" version ".zip"))
528 (sha256
529 (base32
530 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
531 (build-system python-build-system)
532 (propagated-inputs
533 `(("python-six" ,python-six)
534 ("python-typing" ,python-typing)))
535 (native-inputs
536 `(("unzip" ,unzip)
537 ("python-cython" ,python-cython)
538 ("python-pytest" ,python-pytest)
539 ("python-pytest-cov" ,python-pytest-cov)
540 ("python-pytest-runner" ,python-pytest-runner)))
541 (home-page "https://github.com/penguinolog/logwrap")
542 (synopsis "Decorator for logging function arguments")
543 (description "This package provides a decorator to log function arguments
544 and function call return values in a human-readable way.")
545 (license license:asl2.0)))
546
547 (define-public python2-shapely
548 (package-with-python2 python-shapely))
549
550 (define-public python-clyent
551 (package
552 (name "python-clyent")
553 (version "1.2.1")
554 (source
555 (origin
556 (method url-fetch)
557 (uri (pypi-uri "clyent" version))
558 (sha256
559 (base32
560 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
561 (build-system python-build-system)
562 (native-inputs
563 `(("python-mock" ,python-mock)))
564 (home-page "https://github.com/binstar/clyent")
565 (synopsis "Command line client library")
566 (description "Clyent is a Python command line utiliy library. It is used
567 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
568 (license license:bsd-3)))
569
570 (define-public python2-clyent
571 (package-with-python2 python-clyent))
572
573 (define-public python-babel
574 (package
575 (name "python-babel")
576 (version "2.8.0")
577 (source
578 (origin
579 (method url-fetch)
580 (uri (pypi-uri "Babel" version))
581 (sha256
582 (base32
583 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
584 (build-system python-build-system)
585 (native-inputs
586 `(("python-freezegun" ,python-freezegun)
587 ("python-pytest" ,python-pytest)))
588 (propagated-inputs
589 `(("python-pytz" ,python-pytz)))
590 (arguments
591 `(#:phases (modify-phases %standard-phases
592 (replace 'check
593 (lambda _
594 (invoke "pytest" "-vv" "-k"
595 (string-append
596 ;; XXX: These tests fail when using Pytest 4.x and
597 ;; Babel 2.6.0. Try removing this for later versions.
598 "not test_no_inherit_metazone_marker_never_in_output"
599 " and not test_smoke_dates"
600 " and not test_smoke_numbers")))))))
601 (home-page "http://babel.pocoo.org/")
602 (synopsis
603 "Tools for internationalizing Python applications")
604 (description
605 "Babel is composed of two major parts:
606 - tools to build and work with gettext message catalogs
607 - a Python interface to the CLDR (Common Locale Data Repository), providing
608 access to various locale display names, localized number and date formatting,
609 etc. ")
610 (license license:bsd-3)))
611
612 (define-public python2-babel
613 (package-with-python2 python-babel))
614
615 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
616 (define-public python2-babel-2.6
617 (package
618 (inherit python2-babel)
619 (version "2.6.0")
620 (source (origin
621 (method url-fetch)
622 (uri (pypi-uri "Babel" version))
623 (sha256
624 (base32
625 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
626
627 (define-public python2-backport-ssl-match-hostname
628 (package
629 (name "python2-backport-ssl-match-hostname")
630 (version "3.5.0.1")
631 (source
632 (origin
633 (method url-fetch)
634 (uri (pypi-uri "backports.ssl_match_hostname" version))
635 (sha256
636 (base32
637 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
638 (build-system python-build-system)
639 (arguments
640 `(#:python ,python-2
641 #:tests? #f)) ; no test target
642 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
643 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
644 (description
645 "This backport brings the ssl.match_hostname() function to users of
646 earlier versions of Python. The function checks the hostname in the
647 certificate returned by the server to which a connection has been established,
648 and verifies that it matches the intended target hostname.")
649 (license license:psfl)))
650
651 (define-public python-bitarray
652 (package
653 (name "python-bitarray")
654 (version "1.2.1")
655 (source (origin
656 (method url-fetch)
657 (uri (pypi-uri "bitarray" version))
658 (sha256
659 (base32
660 "1kxrlxfj9nrx512sfwifwl9z4v6ky3qschl0zmk3s3dvc3s7bmif"))))
661 (build-system python-build-system)
662 (home-page "https://github.com/ilanschnell/bitarray")
663 (synopsis "Efficient arrays of booleans")
664 (description "This package provides an object type which efficiently
665 represents an array of booleans. Bitarrays are sequence types and behave very
666 much like usual lists. Eight bits are represented by one byte in a contiguous
667 block of memory. The user can select between two representations:
668 little-endian and big-endian. All of the functionality is implemented in C.
669 Methods for accessing the machine representation are provided. This can be
670 useful when bit level access to binary files is required, such as portable
671 bitmap image files. Also, when dealing with compressed data which uses
672 variable bit length encoding, you may find this module useful.")
673 (license license:psfl)))
674
675 (define-public python-boolean.py
676 (package
677 (name "python-boolean.py")
678 (version "3.6")
679 (source
680 (origin
681 ;; There's no source tarball on PyPI.
682 (method git-fetch)
683 (uri (git-reference
684 (url "https://github.com/bastikr/boolean.py")
685 (commit (string-append "v" version))))
686 (file-name (git-file-name name version))
687 (sha256
688 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
689 (build-system python-build-system)
690 (home-page "https://github.com/bastikr/boolean.py")
691 (synopsis "Boolean algebra in one Python module")
692 (description
693 "This is a small Python library that implements boolean algebra.
694 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
695 @code{Symbol} class that can take on one of these two values. Calculations
696 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
697 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
698 Expressions are constructed from parsed strings or directly in Python.")
699 (license license:bsd-2)))
700
701 (define-public python-hdf4
702 (package
703 (name "python-hdf4")
704 (version "0.9")
705 (source
706 (origin
707 (method url-fetch)
708 (uri (pypi-uri name version))
709 (sha256
710 (base32
711 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
712 (build-system python-build-system)
713 (native-inputs `(("nose" ,python-nose)))
714 (propagated-inputs `(("numpy" ,python-numpy)))
715 (inputs
716 `(("hdf4" ,hdf4)
717 ("libjpeg" ,libjpeg-turbo)
718 ("zlib" ,zlib)))
719 (arguments
720 `(#:phases
721 (modify-phases %standard-phases
722 (replace 'check
723 (lambda _
724 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
725 ;; on to import numpy. Somehow this works on their CI system.
726 ;; Let's just manage PYTHONPATH here instead.
727 (substitute* "runexamples.sh"
728 (("export PYTHONPATH=.*") ""))
729 (setenv "PYTHONPATH"
730 (string-append (getcwd) ":"
731 (getenv "PYTHONPATH")))
732 (invoke "./runexamples.sh")
733 (invoke "nosetests" "-v"))))))
734 (home-page "https://github.com/fhs/python-hdf4")
735 (synopsis "Python interface to the NCSA HDF4 library")
736 (description
737 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
738 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
739 NetCDF files can also be read and modified. Python-HDF4 is a fork of
740 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
741 (license license:expat)))
742
743 (define-public python2-hdf4
744 (package-with-python2 python-hdf4))
745
746 (define-public python-h5py
747 (package
748 (name "python-h5py")
749 (version "2.10.0")
750 (source
751 (origin
752 (method url-fetch)
753 (uri (pypi-uri "h5py" version))
754 (sha256
755 (base32
756 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
757 (build-system python-build-system)
758 (arguments
759 `(#:tests? #f ; no test target
760 #:phases
761 (modify-phases %standard-phases
762 (add-after 'unpack 'fix-hdf5-paths
763 (lambda* (#:key inputs #:allow-other-keys)
764 (let ((prefix (assoc-ref inputs "hdf5")))
765 (substitute* "setup_build.py"
766 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
767 (string-append "['" prefix "/lib" "']"))
768 (("'/opt/local/include', '/usr/local/include'")
769 (string-append "'" prefix "/include" "'")))
770 (substitute* "setup_configure.py"
771 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
772 (string-append "['" prefix "/lib" "']")))
773 #t))))))
774 (propagated-inputs
775 `(("python-six" ,python-six)
776 ("python-numpy" ,python-numpy)))
777 (inputs
778 `(("hdf5" ,hdf5-1.10)))
779 (native-inputs
780 `(("python-cython" ,python-cython)
781 ("python-pkgconfig" ,python-pkgconfig)
782 ("pkg-config" ,pkg-config)))
783 (home-page "https://www.h5py.org/")
784 (synopsis "Read and write HDF5 files from Python")
785 (description
786 "The h5py package provides both a high- and low-level interface to the
787 HDF5 library from Python. The low-level interface is intended to be a
788 complete wrapping of the HDF5 API, while the high-level component supports
789 access to HDF5 files, datasets and groups using established Python and NumPy
790 concepts.")
791 (license license:bsd-3)))
792
793 (define-public python2-h5py
794 (package-with-python2 python-h5py))
795
796 (define-public python-sh
797 (package
798 (name "python-sh")
799 (version "1.12.14")
800 (source
801 (origin
802 (method url-fetch)
803 (uri (pypi-uri "sh" version))
804 (sha256
805 (base32
806 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
807 (build-system python-build-system)
808 (arguments
809 '(#:phases
810 (modify-phases %standard-phases
811 (replace 'check
812 (lambda _
813 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
814 (setenv "HOME" "/tmp")
815 (invoke "python" "sh.py" "test"))))))
816 (native-inputs
817 `(("python-coverage" ,python-coverage)))
818 (home-page "https://github.com/amoffat/sh")
819 (synopsis "Python subprocess replacement")
820 (description "This package provides a replacement for Python's
821 @code{subprocess} feature.")
822 (license license:expat)))
823
824 (define-public python2-sh
825 (package-with-python2 python-sh))
826
827 (define-public python-cftime
828 (package
829 (name "python-cftime")
830 (version "1.0.4.2")
831 (source
832 (origin
833 (method url-fetch)
834 (uri (pypi-uri "cftime" version))
835 (sha256
836 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
837 (build-system python-build-system)
838 (propagated-inputs
839 `(("python-numpy" ,python-numpy)))
840 (native-inputs
841 `(("python-coveralls" ,python-coveralls)
842 ("python-cython" ,python-cython)
843 ("python-pytest-cov" ,python-pytest-cov)))
844 (home-page "https://github.com/Unidata/cftime")
845 (synopsis "Library for time handling")
846 (description
847 "This package provides time-handling functionality that used to be part
848 of the netcdf4 package before.")
849 ;; This package claims to include code under the GPLv3 but is released
850 ;; under ISC.
851 (license (list license:isc license:gpl3+))))
852
853 (define-public python-netcdf4
854 (package
855 (name "python-netcdf4")
856 (version "1.5.3")
857 (source
858 (origin
859 (method url-fetch)
860 (uri (pypi-uri "netCDF4" version))
861 (sha256
862 (base32
863 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
864 (build-system python-build-system)
865 (arguments
866 '(#:phases
867 (modify-phases %standard-phases
868 (add-after 'unpack 'configure-locations
869 (lambda* (#:key inputs #:allow-other-keys)
870 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
871 #t)))))
872 (native-inputs
873 `(("python-cython" ,python-cython)))
874 (propagated-inputs
875 `(("python-numpy" ,python-numpy)
876 ("python-cftime" ,python-cftime)))
877 (inputs
878 `(("netcdf" ,netcdf)
879 ("hdf4" ,hdf4)
880 ("hdf5" ,hdf5)))
881 (home-page "https://github.com/Unidata/netcdf4-python")
882 (synopsis "Python/numpy interface to the netCDF library")
883 (description "Netcdf4-python is a Python interface to the netCDF C
884 library. netCDF version 4 has many features not found in earlier
885 versions of the library and is implemented on top of HDF5. This module
886 can read and write files in both the new netCDF 4 and the old netCDF 3
887 format, and can create files that are readable by HDF5 clients. The
888 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
889 to users of that module.")
890 ;; The software is mainly ISC, but includes some files covered
891 ;; by the Expat license.
892 (license (list license:isc license:expat))))
893
894 (define-public python2-netcdf4
895 (package-with-python2 python-netcdf4))
896
897 (define-public python-license-expression
898 (package
899 (name "python-license-expression")
900 (version "0.999")
901 (source
902 (origin
903 (method url-fetch)
904 (uri (pypi-uri "license-expression" version))
905 (sha256
906 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
907 (build-system python-build-system)
908 (propagated-inputs
909 `(("python-boolean.py" ,python-boolean.py)))
910 (home-page "https://github.com/nexB/license-expression")
911 (synopsis "Apply boolean logic to license expressions")
912 (description
913 "This Python module defines a tiny language to evaluate and compare
914 license expressions using boolean logic. Logical combinations of licenses can
915 be tested for equality, containment, and equivalence. They can be normalised
916 and simplified. It supports SPDX license expressions as well as other naming
917 conventions and aliases in the same expression.")
918 (license license:gpl2+)))
919
920 (define-public python-lockfile
921 (package
922 (name "python-lockfile")
923 (version "0.12.2")
924 (source
925 (origin
926 (method url-fetch)
927 (uri (pypi-uri "lockfile" version))
928 (sha256
929 (base32
930 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
931 (build-system python-build-system)
932 (arguments '(#:test-target "check"))
933 (native-inputs
934 `(("python-pbr" ,python-pbr)))
935 (home-page "https://launchpad.net/pylockfile")
936 (synopsis "Platform-independent file locking module")
937 (description
938 "The lockfile package exports a LockFile class which provides a simple
939 API for locking files.")
940 (license license:expat)))
941
942 (define-public python2-lockfile
943 (package-with-python2 python-lockfile))
944
945 (define-public python-filelock
946 (package
947 (name "python-filelock")
948 (version "3.0.12")
949 (source
950 (origin
951 (method url-fetch)
952 (uri (pypi-uri "filelock" version))
953 (sha256
954 (base32
955 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
956 (build-system python-build-system)
957 (home-page
958 "https://github.com/benediktschmitt/py-filelock")
959 (synopsis "Platform independent file lock")
960 (description "@code{filelock} contains a single module implementing
961 a platform independent file lock in Python, which provides a simple way of
962 inter-process communication.")
963 (license license:unlicense)))
964
965 (define-public python-semantic-version
966 (package
967 (name "python-semantic-version")
968 (version "2.6.0")
969 (source
970 (origin
971 (method url-fetch)
972 (uri (pypi-uri "semantic_version" version))
973 (sha256
974 (base32
975 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
976 (build-system python-build-system)
977 (arguments
978 `(#:tests? #f)) ; PyPI tarball lacks tests
979 (home-page "https://github.com/rbarrois/python-semanticversion")
980 (synopsis "Semantic versioning module for Python")
981 (description
982 "The @code{semantic_version} class is a small library for handling
983 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
984
985 It can compare versions, generate a new version that represents a bump in one of
986 the version levels, and check whether any given string is a proper semantic
987 version identifier.")
988 (license license:bsd-3)))
989
990 (define-public python2-semantic-version
991 (package-with-python2 python-semantic-version))
992
993 (define-public python-serpent
994 (package
995 (name "python-serpent")
996 (version "1.28")
997 (source
998 (origin
999 (method url-fetch)
1000 (uri (pypi-uri "serpent" version))
1001 (sha256
1002 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1003 (build-system python-build-system)
1004 (native-inputs
1005 `(("python-attrs" ,python-attrs)
1006 ("python-pytz" ,python-pytz)))
1007 (home-page "https://github.com/irmen/Serpent")
1008 (synopsis "Serializer for literal Python expressions")
1009 (description
1010 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1011 serialization. It serializes an object tree into bytes (an utf-8 encoded
1012 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1013 to rebuild the original object tree.
1014
1015 Because only safe literals are encoded, it is safe to send serpent data to
1016 other machines, such as over the network.")
1017 (properties `((python2-variant . ,(delay python2-serpent))))
1018 (license license:expat)))
1019
1020 (define-public python2-serpent
1021 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1022 (package
1023 (inherit base)
1024 (propagated-inputs
1025 `(("python-enum34" ,python2-enum34)
1026 ,@(package-propagated-inputs base))))))
1027
1028 (define-public python-setuptools
1029 (package
1030 (name "python-setuptools")
1031 (version "41.0.1")
1032 (source
1033 (origin
1034 (method url-fetch)
1035 (uri (pypi-uri "setuptools" version ".zip"))
1036 (sha256
1037 (base32
1038 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1039 (modules '((guix build utils)))
1040 (snippet
1041 '(begin
1042 ;; Remove included binaries which are used to build self-extracting
1043 ;; installers for Windows.
1044 ;; TODO: Find some way to build them ourself so we can include them.
1045 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1046 #t))))
1047 (build-system python-build-system)
1048 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1049 ;; One could bootstrap with an internal untested setuptools.
1050 (arguments
1051 `(#:tests? #f))
1052 (home-page "https://pypi.org/project/setuptools/")
1053 (synopsis
1054 "Library designed to facilitate packaging Python projects")
1055 (description
1056 "Setuptools is a fully-featured, stable library designed to facilitate
1057 packaging Python projects, where packaging includes:
1058 Python package and module definitions,
1059 distribution package metadata,
1060 test hooks,
1061 project installation,
1062 platform-specific details,
1063 Python 3 support.")
1064 ;; TODO: setuptools now bundles the following libraries:
1065 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1066 (license (list license:psfl ; setuptools itself
1067 license:expat ; six, appdirs, pyparsing
1068 license:asl2.0 ; packaging is dual ASL2/BSD-2
1069 license:bsd-2))))
1070
1071 (define-public python2-setuptools
1072 (package-with-python2 python-setuptools))
1073
1074 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1075 (define-public python-setuptools-for-tensorflow
1076 (hidden-package
1077 (package
1078 (inherit python-setuptools)
1079 (version "39.1.0")
1080 (source (origin
1081 (inherit (package-source python-setuptools))
1082 (uri (pypi-uri "setuptools" version ".zip"))
1083 (sha256
1084 (base32
1085 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1086
1087 (define-public python-uniseg
1088 (package
1089 (name "python-uniseg")
1090 (version "0.7.1")
1091 (source
1092 (origin
1093 (method url-fetch)
1094 (uri (pypi-uri "uniseg" version ".zip"))
1095 (sha256
1096 (base32
1097 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1098 (build-system python-build-system)
1099 (arguments
1100 '(#:tests? #f)) ; The test suite requires network access.
1101 (native-inputs
1102 `(("unzip" ,unzip)))
1103 (home-page
1104 "https://bitbucket.org/emptypage/uniseg-python")
1105 (synopsis
1106 "Python library to determine Unicode text segmentations")
1107 (description
1108 "Uniseg is a Python package used to determine Unicode text segmentations.
1109 Supported segmentations include:
1110 @enumerate
1111 @item @dfn{Code point} (any value in the Unicode codespace)
1112 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1113 multiple Unicode code points, e.g. \"G\" + acute-accent)
1114 @item Word break
1115 @item Sentence break
1116 @item Line break
1117 @end enumerate")
1118 (license license:expat)))
1119
1120 (define-public python2-uniseg
1121 (package-with-python2 python-uniseg))
1122
1123 (define-public python-humanfriendly
1124 (package
1125 (name "python-humanfriendly")
1126 (version "4.4.1")
1127 (source
1128 (origin
1129 (method url-fetch)
1130 (uri (pypi-uri "humanfriendly" version))
1131 (sha256
1132 (base32
1133 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1134 (build-system python-build-system)
1135 (arguments
1136 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1137 #:tests? #f))
1138 (propagated-inputs
1139 `(("python-monotonic" ,python-monotonic)))
1140 (home-page "https://humanfriendly.readthedocs.io")
1141 (synopsis "Human-friendly input and output in Python")
1142 (description
1143 "The functions and classes in @code{humanfriendly} can be used to make
1144 text interfaces more user-friendly. It includes tools to parse and format
1145 numbers, file sizes, and timespans, timers for long-running operations, menus
1146 to allow the user to choose from a list of options, and terminal interaction
1147 helpers.")
1148 (license license:expat)))
1149
1150 (define-public python2-humanfriendly
1151 (package-with-python2 python-humanfriendly))
1152
1153 (define-public python-textparser
1154 (package
1155 (name "python-textparser")
1156 (version "0.23.0")
1157 (source
1158 (origin
1159 (method url-fetch)
1160 (uri (pypi-uri "textparser" version))
1161 (sha256
1162 (base32
1163 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1164 (build-system python-build-system)
1165 (home-page "https://github.com/eerimoq/textparser")
1166 (synopsis "Fast text parser for Python")
1167 (description "This library provides a text parser written in the Python
1168 language. It aims to be fast.")
1169 (license license:expat)))
1170
1171 (define-public python-aenum
1172 (package
1173 (name "python-aenum")
1174 (version "2.2.3")
1175 (source
1176 (origin
1177 (method url-fetch)
1178 (uri (pypi-uri "aenum" version))
1179 (sha256
1180 (base32
1181 "1s3008rklv4n1kvmq6xdbdfyrpl0gf1rhqasmd27s5kwyjmlqcx4"))))
1182 (build-system python-build-system)
1183 (arguments
1184 `(#:phases (modify-phases %standard-phases
1185 (replace 'check
1186 (lambda _
1187 (format #t "current working dir ~s~%" (getcwd))
1188 (setenv "PYTHONPATH"
1189 (string-append ".:" (getenv "PYTHONPATH")))
1190 ;; We must run the test suite module directly, as it
1191 ;; fails to define the 'tempdir' variable in scope for
1192 ;; the tests otherwise
1193 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1194 ;; issues/32/running-tests-with-python-setuppy-test).
1195 (invoke "python3" "aenum/test.py")
1196 ;; This one fails with "NameError: name
1197 ;; 'test_pickle_dump_load' is not defined" (see:
1198 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1199 ;; /error-running-the-test_v3py-test-suite).
1200 ;; (invoke "python3" "aenum/test_v3.py")
1201 #t)))))
1202 (home-page "https://bitbucket.org/stoneleaf/aenum")
1203 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1204 (description "The aenum library includes an @code{Enum} base class, a
1205 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1206 class.")
1207 (license license:bsd-3)))
1208
1209 (define-public python-can
1210 (package
1211 (name "python-can")
1212 (version "3.3.3")
1213 (source
1214 (origin
1215 (method url-fetch)
1216 (uri (pypi-uri "python-can" version))
1217 (sha256
1218 (base32
1219 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1220 (build-system python-build-system)
1221 (arguments
1222 `(#:phases (modify-phases %standard-phases
1223 (add-after 'unpack 'relax-version-requirements
1224 (lambda _
1225 (substitute* "setup.py"
1226 (("mock~=2\\.0") "mock")
1227 (("coverage<5") "coverage")
1228 (("pytest~=4\\.3") "pytest")
1229 (("hypothesis~=4\\.56") "hypothesis"))
1230 #t))
1231 (add-after 'unpack 'fix-broken-tests
1232 ;; The tests try to run two scripts it expects should be
1233 ;; in PATH, but they aren't at this time (see:
1234 ;; https://github.com/hardbyte/python-can/issues/805).
1235 (lambda _
1236 (substitute* "test/test_scripts.py"
1237 (("\"can_logger\\.py --help\"") "")
1238 (("\"can_player\\.py --help\"") ""))
1239 #t)))))
1240 (propagated-inputs
1241 `(("python-aenum" ,python-aenum)
1242 ("python-wrapt" ,python-wrapt)))
1243 (native-inputs
1244 `(("python-codecov" ,python-codecov)
1245 ("python-coverage" ,python-coverage)
1246 ("python-future" ,python-future)
1247 ("python-hypothesis" ,python-hypothesis)
1248 ("python-mock" ,python-mock)
1249 ("python-pyserial" ,python-pyserial)
1250 ("python-pytest" ,python-pytest)
1251 ("python-pytest-cov" ,python-pytest-cov)
1252 ("python-pytest-runner" ,python-pytest-runner)
1253 ("python-pytest-timeout" ,python-pytest-timeout)))
1254 (home-page "https://github.com/hardbyte/python-can")
1255 (synopsis "Controller Area Network (CAN) interface module for Python")
1256 (description "This package defines the @code{can} module, which provides
1257 controller area network (CAN) support for Python developers; providing common
1258 abstractions to different hardware devices, and a suite of utilities for
1259 sending and receiving messages on a CAN bus.")
1260 (license license:lgpl3+)))
1261
1262 (define-public python-diskcache
1263 (package
1264 (name "python-diskcache")
1265 (version "4.1.0")
1266 (source
1267 (origin
1268 (method url-fetch)
1269 (uri (pypi-uri "diskcache" version))
1270 (sha256
1271 (base32
1272 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1273 (build-system python-build-system)
1274 (arguments
1275 `(#:tests? #f)) ;test suite not included in the release
1276 (home-page "http://www.grantjenks.com/docs/diskcache/")
1277 (synopsis "Disk and file backed cache library")
1278 (description "DiskCache is a disk and file backed persistent cache.")
1279 (license license:asl2.0)))
1280
1281 (define-public python-bitstruct
1282 (package
1283 (name "python-bitstruct")
1284 (version "8.9.0")
1285 (source
1286 (origin
1287 (method url-fetch)
1288 (uri (pypi-uri "bitstruct" version))
1289 (sha256
1290 (base32
1291 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1292 (build-system python-build-system)
1293 (home-page "https://github.com/eerimoq/bitstruct")
1294 (synopsis "Python values to and C bit field structs converter")
1295 (description "This module performs conversions between Python values and C
1296 bit field structs represented as Python byte strings. It is intended to have
1297 a similar interface as the @code{struct} module from Python, but working on
1298 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1299 (license license:expat)))
1300
1301 (define-public python-cantools
1302 (package
1303 (name "python-cantools")
1304 (version "33.1.1")
1305 (source
1306 (origin
1307 ;; We take the sources from the Git repository as the documentation is
1308 ;; not included with the PyPI archive.
1309 (method git-fetch)
1310 (uri (git-reference
1311 (url "https://github.com/eerimoq/cantools.git")
1312 (commit version)))
1313 (file-name (git-file-name name version))
1314 (sha256
1315 (base32
1316 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1317 (build-system python-build-system)
1318 (arguments
1319 `(#:phases
1320 (modify-phases %standard-phases
1321 (add-after 'build 'build-doc
1322 (lambda _
1323 ;; See: https://github.com/eerimoq/cantools/issues/190.
1324 (substitute* "README.rst"
1325 (("https://github.com/eerimoq/cantools/raw/master\
1326 /docs/monitor.png")
1327 "monitor.png"))
1328 (with-directory-excursion "docs"
1329 (invoke "make" "man" "info"))))
1330 (add-after 'install 'install-doc
1331 (lambda* (#:key outputs #:allow-other-keys)
1332 (let* ((out (assoc-ref outputs "out"))
1333 (info (string-append out "/share/info"))
1334 (man1 (string-append out "/share/man/man1")))
1335 (format #t "CWD: ~s~%" (getcwd))
1336 (install-file "docs/_build/texinfo/cantools.info" info)
1337 (install-file "docs/_build/man/cantools.1" man1)
1338 #t))))))
1339 (native-inputs
1340 `(("sphinx" ,python-sphinx)
1341 ("texinfo" ,texinfo)))
1342 (propagated-inputs
1343 `(("python-bitstruct" ,python-bitstruct)
1344 ("python-can" ,python-can)
1345 ("python-diskcache" ,python-diskcache)
1346 ("python-textparser" ,python-textparser)))
1347 (home-page "https://github.com/eerimoq/cantools")
1348 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1349 (description "This package includes Controller Area Network (CAN) related
1350 tools that can be used to:
1351 @itemize
1352 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1353 @item encode and decode CAN messages
1354 @item multiplex simple and extended signals
1355 @item diagnose DID encoding and decoding
1356 @item dump the CAN decoder output
1357 @item test CAN nodes
1358 @item generate C source code
1359 @item monitor the CAN bus
1360 @end itemize")
1361 (license license:expat)))
1362
1363 (define-public python-capturer
1364 (package
1365 (name "python-capturer")
1366 (version "2.4")
1367 (source
1368 (origin
1369 (method url-fetch)
1370 (uri (pypi-uri "capturer" version))
1371 (sha256
1372 (base32
1373 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1374 (build-system python-build-system)
1375 (arguments
1376 `(#:tests? #f))
1377 (propagated-inputs
1378 `(("python-humanfriendly" ,python-humanfriendly)))
1379 (home-page "https://capturer.readthedocs.io")
1380 (synopsis "Capture stdout and stderr streams of the current process")
1381 (description
1382 "The capturer package makes it easy to capture the stdout and stderr
1383 streams of the current process and subprocesses. Output can be relayed
1384 to the terminal in real time but is also available to the Python program
1385 for additional processing.")
1386 (license license:expat)))
1387
1388 (define-public python2-capturer
1389 (package-with-python2 python-capturer))
1390
1391 (define-public python-case
1392 (package
1393 (name "python-case")
1394 (version "1.5.3")
1395 (source
1396 (origin
1397 (method url-fetch)
1398 (uri (pypi-uri "case" version))
1399 (sha256
1400 (base32
1401 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1402 (build-system python-build-system)
1403 (propagated-inputs
1404 `(("python-mock" ,python-mock)
1405 ("python-nose" ,python-nose)
1406 ("python-six" ,python-six)
1407 ("python-unittest2" ,python-unittest2)))
1408 (native-inputs
1409 `(("python-coverage" ,python-coverage)))
1410 (home-page "https://github.com/celery/case")
1411 (synopsis "Unittest utilities and convenience methods")
1412 (description
1413 "The @code{case} package provides utilities on top of unittest, including
1414 some helpful Python 2 compatibility convenience methods.")
1415 (license license:bsd-3)))
1416
1417 (define-public python-verboselogs
1418 (package
1419 (name "python-verboselogs")
1420 (version "1.7")
1421 (source
1422 (origin
1423 (method url-fetch)
1424 (uri (pypi-uri "verboselogs" version))
1425 (sha256
1426 (base32
1427 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1428 (build-system python-build-system)
1429 (arguments
1430 `(#:phases
1431 (modify-phases %standard-phases
1432 (replace 'check
1433 (lambda _
1434 ;; Do not run pylint plugin test, as astroid is an old
1435 ;; unsupported version.
1436 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1437 "verboselogs/tests.py"))))))
1438 (native-inputs
1439 `(("python-mock" ,python-mock)
1440 ("python-pytest" ,python-pytest)))
1441 (home-page "https://verboselogs.readthedocs.io")
1442 (synopsis "Verbose logging level for Python's logging module")
1443 (description
1444 "The @code{verboselogs} package extends Python's @code{logging} module to
1445 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1446 (license license:expat)))
1447
1448 (define-public python2-verboselogs
1449 (package-with-python2 python-verboselogs))
1450
1451 (define-public python-coloredlogs
1452 (package
1453 (name "python-coloredlogs")
1454 (version "10.0")
1455 (source
1456 (origin
1457 (method url-fetch)
1458 (uri (pypi-uri "coloredlogs" version))
1459 (sha256
1460 (base32
1461 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1462 (build-system python-build-system)
1463 (arguments
1464 `(;Tests require some updated modules
1465 #:tests? #f))
1466 (propagated-inputs
1467 `(("python-capturer" ,python-capturer)))
1468 (home-page "https://coloredlogs.readthedocs.io")
1469 (synopsis "Colored stream handler for Python's logging module")
1470 (description
1471 "The @code{coloredlogs} package enables colored terminal output for
1472 Python's logging module. The @code{ColoredFormatter} class inherits from
1473 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1474 messages in color.")
1475 (license license:expat)))
1476
1477 (define-public python2-coloredlogs
1478 (package-with-python2 python-coloredlogs))
1479
1480 (define-public python-editorconfig
1481 (package
1482 (name "python-editorconfig")
1483 (version "0.12.2")
1484 (source
1485 (origin
1486 (method url-fetch)
1487 (uri (pypi-uri "EditorConfig" version))
1488 (sha256
1489 (base32
1490 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1491 (build-system python-build-system)
1492 (home-page "https://editorconfig.org/")
1493 (synopsis "EditorConfig bindings for python")
1494 (description "The EditorConfig project consists of a file format for
1495 defining coding styles and a collection of text editor plugins that enable
1496 editors to read the file format and adhere to defined styles. EditorConfig
1497 files are easily readable and they work nicely with version control systems.")
1498 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1499 (license (list license:bsd-2 license:psfl))))
1500
1501 (define-public python-et-xmlfile
1502 (package
1503 (name "python-et-xmlfile")
1504 (version "1.0.1")
1505 (source
1506 (origin
1507 (method url-fetch)
1508 (uri (pypi-uri "et_xmlfile" version))
1509 (sha256
1510 (base32
1511 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1512 (build-system python-build-system)
1513 (arguments
1514 `(#:phases (modify-phases %standard-phases
1515 (replace 'check
1516 (lambda _
1517 (invoke "pytest"))))))
1518 (native-inputs
1519 `(("python-pytest" ,python-pytest)
1520 ("python-lxml" ,python-lxml))) ;used for the tests
1521 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1522 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1523 (description "This Python library is based upon the @code{xmlfile} module
1524 from @code{lxml}. It aims to provide a low memory, compatible implementation
1525 of @code{xmlfile}.")
1526 (license license:expat)))
1527
1528 (define-public python2-et-xmlfile
1529 (package-with-python2 python-et-xmlfile))
1530
1531 (define-public python-openpyxl
1532 (package
1533 (name "python-openpyxl")
1534 (version "2.6.2")
1535 (source
1536 (origin
1537 ;; We use the upstream repository, as the tests are not included in the
1538 ;; PyPI releases.
1539 (method hg-fetch)
1540 (uri (hg-reference
1541 (url "https://bitbucket.org/openpyxl/openpyxl")
1542 (changeset version)))
1543 (file-name (string-append name "-" version "-checkout"))
1544 (sha256
1545 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1546 (build-system python-build-system)
1547 (arguments
1548 `(#:phases (modify-phases %standard-phases
1549 (replace 'check
1550 (lambda _
1551 (invoke "pytest"))))))
1552 (native-inputs
1553 ;; For the test suite.
1554 `(("python-lxml" ,python-lxml)
1555 ("python-pillow" ,python-pillow)
1556 ("python-pytest" ,python-pytest)))
1557 (propagated-inputs
1558 `(("python-et-xmlfile" ,python-et-xmlfile)
1559 ("python-jdcal" ,python-jdcal)))
1560 (home-page "https://openpyxl.readthedocs.io")
1561 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1562 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1563 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1564 standard.")
1565 (license license:expat)))
1566
1567 (define-public python-eventlet
1568 (package
1569 (name "python-eventlet")
1570 (version "0.25.1")
1571 (source
1572 (origin
1573 (method url-fetch)
1574 (uri (pypi-uri "eventlet" version))
1575 (sha256
1576 (base32
1577 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1578 (build-system python-build-system)
1579 (propagated-inputs
1580 `(("python-greenlet" ,python-greenlet)))
1581 (arguments
1582 ;; TODO: Requires unpackaged 'enum-compat'.
1583 '(#:tests? #f))
1584 (home-page "https://eventlet.net")
1585 (synopsis "Concurrent networking library for Python")
1586 (description
1587 "Eventlet is a concurrent networking library for Python that
1588 allows you to change how you run your code, not how you write it.
1589 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1590 Coroutines ensure that the developer uses a blocking style of programming
1591 that is similar to threading, but provide the benefits of non-blocking I/O.
1592 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1593 from the Python interpreter, or as a small part of a larger application.")
1594 (license license:expat)))
1595
1596 (define-public python2-eventlet
1597 (let ((base (package-with-python2
1598 (strip-python2-variant python-eventlet))))
1599 (package (inherit base)
1600 (propagated-inputs
1601 `(("python2-enum34" ,python2-enum34)
1602 ,@(package-propagated-inputs base))))))
1603
1604 (define-public python-six
1605 (package
1606 (name "python-six")
1607 (version "1.14.0")
1608 (source
1609 (origin
1610 (method url-fetch)
1611 (uri (pypi-uri "six" version))
1612 (sha256
1613 (base32
1614 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1615 (build-system python-build-system)
1616 (arguments
1617 `(#:phases
1618 (modify-phases %standard-phases
1619 (replace 'check
1620 (lambda _
1621 (invoke "py.test" "-v"))))))
1622 (native-inputs
1623 `(("python-pytest" ,python-pytest-bootstrap)))
1624 (home-page "https://pypi.org/project/six/")
1625 (synopsis "Python 2 and 3 compatibility utilities")
1626 (description
1627 "Six is a Python 2 and 3 compatibility library. It provides utility
1628 functions for smoothing over the differences between the Python versions with
1629 the goal of writing Python code that is compatible on both Python versions.
1630 Six supports every Python version since 2.5. It is contained in only one
1631 Python file, so it can be easily copied into your project.")
1632 (license license:x11)))
1633
1634 (define-public python2-six
1635 (package-with-python2 python-six))
1636
1637 (define-public python-six-bootstrap
1638 (package
1639 (inherit python-six)
1640 (name "python-six-bootstrap")
1641 (native-inputs `())
1642 (arguments `(#:tests? #f))))
1643
1644 (define-public python2-six-bootstrap
1645 (package-with-python2 python-six-bootstrap))
1646
1647 (define-public python-schedule
1648 (package
1649 (name "python-schedule")
1650 (version "0.4.3")
1651 (source
1652 (origin
1653 (method url-fetch)
1654 (uri (pypi-uri "schedule" version))
1655 (sha256
1656 (base32
1657 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1658 (build-system python-build-system)
1659 (native-inputs
1660 `(("python-pytest" ,python-pytest)
1661 ("python-mock" ,python-mock)))
1662 (home-page "https://github.com/dbader/schedule")
1663 (synopsis "Schedule periodic function calls in Python")
1664 (description
1665 "Schedule is an in-process scheduler for periodic jobs that uses the
1666 builder pattern for configuration. Schedule lets you run Python functions (or
1667 any other callable) periodically at pre-determined intervals using a simple,
1668 human-friendly syntax.")
1669 (license license:expat)))
1670
1671 (define-public python2-schedule
1672 (package-with-python2 python-schedule))
1673
1674 (define-public python-mechanize
1675 (package
1676 (name "python-mechanize")
1677 (version "0.4.5")
1678 (source
1679 (origin
1680 (method url-fetch)
1681 (uri (pypi-uri "mechanize" version))
1682 (sha256
1683 (base32
1684 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1685 (build-system python-build-system)
1686 (propagated-inputs
1687 `(("python-html5lib" ,python-html5lib)))
1688 (home-page "https://github.com/python-mechanize/mechanize")
1689 (synopsis
1690 "Stateful programmatic web browsing in Python")
1691 (description
1692 "Mechanize implements stateful programmatic web browsing in Python,
1693 after Andy Lester’s Perl module WWW::Mechanize.")
1694 (license license:bsd-3)))
1695
1696 (define-public python2-mechanize
1697 (package-with-python2 python-mechanize))
1698
1699 (define-public python-simplejson
1700 (package
1701 (name "python-simplejson")
1702 (version "3.14.0")
1703 (source
1704 (origin
1705 (method url-fetch)
1706 (uri (pypi-uri "simplejson" version))
1707 (sha256
1708 (base32
1709 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1710 (build-system python-build-system)
1711 (home-page "http://simplejson.readthedocs.org/en/latest/")
1712 (synopsis
1713 "Json library for Python")
1714 (description
1715 "JSON (JavaScript Object Notation) is a subset of JavaScript
1716 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1717 format.
1718
1719 Simplejson exposes an API familiar to users of the standard library marshal
1720 and pickle modules. It is the externally maintained version of the json
1721 library contained in Python 2.6, but maintains compatibility with Python 2.5
1722 and (currently) has significant performance advantages, even without using
1723 the optional C extension for speedups. Simplejson is also supported on
1724 Python 3.3+.")
1725 (license license:x11)))
1726
1727 (define-public python2-simplejson
1728 (package-with-python2 python-simplejson))
1729
1730
1731 (define-public python-pyicu
1732 (package
1733 (name "python-pyicu")
1734 (version "2.4.3")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (pypi-uri "PyICU" version))
1739 (sha256
1740 (base32
1741 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1742 (build-system python-build-system)
1743 (inputs
1744 `(("icu4c" ,icu4c)))
1745 (native-inputs
1746 `(("python-pytest" ,python-pytest)
1747 ("python-six" ,python-six)))
1748 (home-page "https://github.com/ovalhub/pyicu")
1749 (synopsis "Python extension wrapping the ICU C++ API")
1750 (description
1751 "PyICU is a python extension wrapping the ICU C++ API.")
1752 (license license:x11)))
1753
1754 (define-public python2-pyicu
1755 (package-with-python2 python-pyicu))
1756
1757 (define-public python-dogtail
1758 (package
1759 (name "python-dogtail")
1760 (version "0.9.11")
1761 (source (origin
1762 (method url-fetch)
1763 (uri
1764 (string-append
1765 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1766 "dogtail-" version ".tar.gz"))
1767 (sha256
1768 (base32
1769 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1770 (build-system python-build-system)
1771 (arguments
1772 `(#:tests? #f ; TODO Launching dbus for the tests
1773 ; fails
1774 #:phases
1775 (modify-phases %standard-phases
1776 (replace 'check
1777 (lambda* (#:key tests? #:allow-other-keys)
1778 (when tests?
1779 (system "Xvfb :1 &")
1780 (setenv "DISPLAY" ":1")
1781 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1782 #t)))))
1783 (propagated-inputs
1784 `(("python-pygobject" ,python-pygobject)
1785 ("python-pycairo" ,python-pycairo)
1786 ("python-pyatspi" ,python-pyatspi)))
1787 (native-inputs
1788 `(("python-nose" ,python-nose)
1789 ("gtk+" ,gtk+)
1790 ("xvfb" ,xorg-server)
1791 ("dbus" ,dbus)
1792 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1793 ("gobject-introspection" ,gobject-introspection)))
1794 (home-page "https://gitlab.com/dogtail/dogtail/")
1795 (synopsis "GUI test tool and automation framework written in Python")
1796 (description
1797 "Dogtail is a GUI test tool and automation framework written in Python.
1798 It uses Accessibility (a11y) technologies to communicate with desktop
1799 applications. dogtail scripts are written in Python and executed like any
1800 other Python program.")
1801 (license license:gpl2+)))
1802
1803 (define-public python2-dogtail
1804 (package-with-python2 python-dogtail))
1805
1806 (define-public python-empy
1807 (package
1808 (name "python-empy")
1809 (version "3.3.3")
1810 (source (origin
1811 (method url-fetch)
1812 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1813 version ".tar.gz"))
1814 (sha256
1815 (base32
1816 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1817 (build-system python-build-system)
1818 (arguments
1819 `(#:tests? #f)) ; python2 only
1820 (home-page "http://www.alcyone.com/software/empy/")
1821 (synopsis "Templating system for Python")
1822 (description
1823 "EmPy is a system for embedding Python expressions and statements in
1824 template text; it takes an EmPy source file, processes it, and produces
1825 output. This is accomplished via expansions, which are special signals to the
1826 EmPy system and are set off by a special prefix (by default the at sign, @@).
1827 EmPy can expand arbitrary Python expressions and statements in this way, as
1828 well as a variety of special forms. Textual data not explicitly delimited in
1829 this way is sent unaffected to the output, allowing Python to be used in
1830 effect as a markup language. Also supported are callbacks via hooks,
1831 recording and playback via diversions, and dynamic, chainable filters. The
1832 system is highly configurable via command line options and embedded
1833 commands.")
1834 (license license:lgpl2.1+)))
1835
1836 (define-public python2-empy
1837 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1838 (package
1839 (inherit base)
1840 (arguments `(,@(package-arguments base)
1841 #:tests? #t)))))
1842
1843 (define-public python2-element-tree
1844 (package
1845 (name "python2-element-tree")
1846 (version "1.2.6")
1847 (source (origin
1848 (method url-fetch)
1849 (uri (string-append
1850 "http://effbot.org/media/downloads/elementtree-"
1851 version "-20050316.tar.gz"))
1852 (sha256
1853 (base32
1854 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1855 (build-system python-build-system)
1856 (arguments
1857 `(#:python ,python-2 ; seems to be part of Python 3
1858 #:tests? #f)) ; no 'test' sub-command
1859 (synopsis "Toolkit for XML processing in Python")
1860 (description
1861 "ElementTree is a Python library supporting lightweight XML processing.")
1862 (home-page "https://effbot.org/zone/element-index.htm")
1863 (license (license:x11-style
1864 "http://docs.python.org/2/license.html"
1865 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1866
1867 (define-public python2-pybugz
1868 (package
1869 (name "python2-pybugz")
1870 (version "0.6.11")
1871 (source (origin
1872 (method url-fetch)
1873 (uri (string-append
1874 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1875 version ".tar.gz"))
1876 (sha256
1877 (base32
1878 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1879 (patches (search-patches "pybugz-stty.patch"
1880 "pybugz-encode-error.patch"))))
1881 (build-system python-build-system)
1882 (arguments
1883 `(#:python ,python-2 ; SyntaxError with Python 3
1884 #:tests? #f)) ; no 'test' sub-command
1885 (propagated-inputs
1886 `(("element-tree" ,python2-element-tree)))
1887 (synopsis "Python and command-line interface to Bugzilla")
1888 (description
1889 "PyBugz is a Python library and command-line tool to query the Bugzilla
1890 bug tracking system. It is meant as an aid to speed up interaction with the
1891 bug tracker.")
1892 (home-page "http://www.liquidx.net/pybugz/")
1893 (license license:gpl2)))
1894
1895 (define-public python2-enum
1896 (package
1897 (name "python2-enum")
1898 (version "0.4.6")
1899 (source (origin
1900 (method url-fetch)
1901 (uri (pypi-uri "enum" version))
1902 (sha256
1903 (base32
1904 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1905 (build-system python-build-system)
1906 (arguments
1907 `(#:python ,python-2))
1908 (home-page "https://pypi.org/project/enum/")
1909 (synopsis "Robust enumerated type support in Python")
1910 (description
1911 "This provides a module for robust enumerations in Python. It has
1912 been superseded by the Python standard library and is provided only for
1913 compatibility.")
1914 ;; Choice of either license.
1915 (license (list license:gpl3+ license:psfl))))
1916
1917 (define-public python-enum34
1918 (package
1919 (name "python-enum34")
1920 (version "1.1.6")
1921 (source
1922 (origin
1923 (method url-fetch)
1924 (uri (pypi-uri "enum34" version))
1925 (sha256
1926 (base32
1927 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1928 (build-system python-build-system)
1929 (home-page "https://pypi.org/project/enum34/")
1930 (synopsis "Backported Python 3.4 Enum")
1931 (description
1932 "Enum34 is the new Python stdlib enum module available in Python 3.4
1933 backported for previous versions of Python from 2.4 to 3.3.")
1934 (license license:bsd-3)))
1935
1936 (define-public python2-enum34
1937 (package-with-python2 python-enum34))
1938
1939 (define-public python-parse-type
1940 (package
1941 (name "python-parse-type")
1942 (version "0.4.2")
1943 (source
1944 (origin
1945 (method url-fetch)
1946 (uri (pypi-uri "parse_type" version))
1947 (sha256
1948 (base32
1949 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1950 (build-system python-build-system)
1951 (propagated-inputs
1952 `(("python-six" ,python-six)
1953 ("python-parse" ,python-parse)))
1954 (native-inputs
1955 `(("python-pytest" ,python-pytest)
1956 ("python-pytest-runner" ,python-pytest-runner)))
1957 (home-page "https://github.com/jenisys/parse_type")
1958 (synopsis "Extended parse module")
1959 (description
1960 "Parse_type extends the python parse module.")
1961 (properties
1962 `((python2-variant . ,(delay python2-parse-type))))
1963 (license license:bsd-3)))
1964
1965 (define-public python2-parse-type
1966 (let ((base (package-with-python2
1967 (strip-python2-variant python-parse-type))))
1968 (package (inherit base)
1969 (propagated-inputs
1970 `(("python2-enum34" ,python2-enum34)
1971 ,@(package-propagated-inputs base))))))
1972
1973 (define-public python-parse
1974 (package
1975 (name "python-parse")
1976 (version "1.8.4")
1977 (source
1978 (origin
1979 (method url-fetch)
1980 (uri (pypi-uri "parse" version))
1981 (sha256
1982 (base32
1983 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1984 (build-system python-build-system)
1985 (arguments
1986 `(#:phases
1987 (modify-phases %standard-phases
1988 (replace 'check
1989 (lambda _ (invoke "python" "test_parse.py"))))))
1990 (home-page "https://github.com/r1chardj0n3s/parse")
1991 (synopsis "Parse strings")
1992 (description
1993 "Parse strings using a specification based on the Python @code{format()}
1994 syntax.")
1995 (license license:x11)))
1996
1997 (define-public python-polib
1998 (package
1999 (name "python-polib")
2000 (version "1.0.8")
2001 (source (origin
2002 (method url-fetch)
2003 (uri (pypi-uri "polib" version))
2004 (sha256
2005 (base32
2006 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2007 (build-system python-build-system)
2008 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2009 (synopsis "Manipulate, create and modify gettext files")
2010 (description "Polib can manipulate any gettext format (po, pot and mo)
2011 files. It can be used to create po files from scratch or to modify
2012 existing ones.")
2013 (license license:expat)))
2014
2015 (define-public python2-polib
2016 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2017 (package
2018 (inherit base)
2019 (arguments `(,@(package-arguments base)
2020 ;; Tests don't work with python2.
2021 #:tests? #f)))))
2022
2023 (define-public python-poyo
2024 (package
2025 (name "python-poyo")
2026 (version "0.5.0")
2027 (source
2028 (origin
2029 (method url-fetch)
2030 (uri (pypi-uri "poyo" version))
2031 (sha256
2032 (base32
2033 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2034 (build-system python-build-system)
2035 (home-page "https://github.com/hackebrot/poyo")
2036 (synopsis "Lightweight YAML Parser for Python")
2037 (description
2038 "This package provides a lightweight YAML Parser for Python. It supports
2039 only a chosen subset of the YAML format that is required to parse cookiecutter
2040 user configuration files. It does not have support for serializing into YAML
2041 and is not compatible with JSON.")
2042 (license license:expat)))
2043
2044 (define-public scons
2045 (package
2046 (name "scons")
2047 (version "3.0.4")
2048 (source (origin
2049 (method git-fetch)
2050 (uri (git-reference
2051 (url "https://github.com/SCons/scons.git")
2052 (commit version)))
2053 (file-name (git-file-name name version))
2054 (sha256
2055 (base32
2056 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2057 (build-system python-build-system)
2058 (arguments
2059 `(#:use-setuptools? #f ; still relies on distutils
2060 #:tests? #f ; no 'python setup.py test' command
2061 #:phases
2062 (modify-phases %standard-phases
2063 (add-before 'build 'bootstrap
2064 (lambda _
2065 (substitute* "src/engine/SCons/compat/__init__.py"
2066 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2067 "sys.modules[new] = __import__(old)"))
2068 (substitute* "src/engine/SCons/Platform/__init__.py"
2069 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2070 "mod = __import__(full_name)"))
2071 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2072 (chdir "build/scons")
2073 #t)))))
2074 (home-page "https://scons.org/")
2075 (synopsis "Software construction tool written in Python")
2076 (description
2077 "SCons is a software construction tool. Think of SCons as an improved,
2078 cross-platform substitute for the classic Make utility with integrated
2079 functionality similar to autoconf/automake and compiler caches such as ccache.
2080 In short, SCons is an easier, more reliable and faster way to build
2081 software.")
2082 (license license:x11)))
2083
2084 (define-public scons-python2
2085 (package
2086 (inherit (package-with-python2 scons))
2087 (name "scons-python2")))
2088
2089 (define-public python-extras
2090 (package
2091 (name "python-extras")
2092 (version "1.0.0")
2093 (source
2094 (origin
2095 (method url-fetch)
2096 (uri (pypi-uri "extras" version))
2097 (sha256
2098 (base32
2099 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2100 (build-system python-build-system)
2101 (arguments
2102 ;; FIXME: Circular dependency on testtools.
2103 '(#:tests? #f))
2104 (home-page "https://github.com/testing-cabal/extras")
2105 (synopsis "Useful extensions to the Python standard library")
2106 (description
2107 "Extras is a set of extensions to the Python standard library.")
2108 (license license:expat)))
2109
2110 (define-public python2-extras
2111 (package-with-python2 python-extras))
2112
2113 (define-public python-mimeparse
2114 (package
2115 (name "python-mimeparse")
2116 (version "1.6.0")
2117 (source
2118 (origin
2119 (method url-fetch)
2120 (uri (pypi-uri "python-mimeparse" version))
2121 (sha256
2122 (base32
2123 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2124 (build-system python-build-system)
2125 (arguments
2126 '(#:phases
2127 (modify-phases %standard-phases
2128 (replace 'check
2129 (lambda _
2130 (invoke "./mimeparse_test.py"))))))
2131 (home-page
2132 "https://github.com/dbtsai/python-mimeparse")
2133 (synopsis "Python library for parsing MIME types")
2134 (description
2135 "Mimeparse provides basic functions for parsing MIME type names and
2136 matching them against a list of media-ranges.")
2137 (license license:expat)))
2138
2139 (define-public python2-mimeparse
2140 (package-with-python2 python-mimeparse))
2141
2142 (define-public python-miniboa
2143 (package
2144 (name "python-miniboa")
2145 (version "1.0.7")
2146 (source
2147 (origin
2148 (method url-fetch)
2149 (uri (pypi-uri "miniboa" version))
2150 (sha256
2151 (base32
2152 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2153 (build-system python-build-system)
2154 (home-page "https://github.com/shmup/miniboa")
2155 (synopsis "Simple, single-threaded Telnet server")
2156 (description
2157 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2158 server.")
2159 (license license:asl2.0)))
2160
2161 (define-public python2-miniboa
2162 (package-with-python2 python-miniboa))
2163
2164 (define-public python-pafy
2165 (package
2166 (name "python-pafy")
2167 (version "0.5.3.1")
2168 (source
2169 (origin
2170 (method url-fetch)
2171 (uri (pypi-uri "pafy" version))
2172 (sha256
2173 (base32
2174 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2175 (build-system python-build-system)
2176 (arguments
2177 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2178 (propagated-inputs
2179 ;; Youtube-dl is a python package which is imported in the file
2180 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2181 `(("youtube-dl" ,youtube-dl)))
2182 (home-page "https://np1.github.io/pafy/")
2183 (synopsis "Retrieve YouTube content and metadata")
2184 (description
2185 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2186 (license license:lgpl3+)))
2187
2188 (define-public python2-funcsigs
2189 (package
2190 (name "python2-funcsigs")
2191 (version "1.0.2")
2192 (source (origin
2193 (method url-fetch)
2194 (uri (pypi-uri "funcsigs" version))
2195 (sha256
2196 (base32
2197 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2198 (build-system python-build-system)
2199 (arguments
2200 `(#:python ,python-2))
2201 (native-inputs
2202 `(("python2-unittest2" ,python2-unittest2)))
2203 (home-page "http://funcsigs.readthedocs.org")
2204 (synopsis "Python function signatures from PEP362")
2205 (description
2206 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2207 (license license:asl2.0)))
2208
2209 (define-public python2-funcsigs-bootstrap
2210 (package
2211 (inherit python2-funcsigs)
2212 (name "python2-funcsigs-bootstrap")
2213 (native-inputs `())
2214 (arguments
2215 `(#:tests? #f
2216 ,@(package-arguments python2-funcsigs)))))
2217
2218 (define-public python-py
2219 (package
2220 (name "python-py")
2221 (version "1.8.1")
2222 (source
2223 (origin
2224 (method url-fetch)
2225 (uri (pypi-uri "py" version))
2226 (sha256
2227 (base32
2228 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2229 (build-system python-build-system)
2230 (arguments
2231 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2232 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2233 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2234 ;; Is this module globally installed?"
2235 '(#:tests? #f))
2236 (native-inputs
2237 `(("python-setuptools-scm" ,python-setuptools-scm)))
2238 (home-page "https://github.com/pytest-dev/py")
2239 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2240 (description
2241 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2242 code introspection, and logging.")
2243 (license license:expat)))
2244
2245 (define-public python2-py
2246 (package-with-python2 python-py))
2247
2248 ;; Recent versions of python-fixtures and python-testrepository need
2249 ;; python-pbr for packaging, which itself needs these two packages for
2250 ;; testing.
2251 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2252 ;; same source, just without any test dependencies and with tests disabled.
2253 ;; python-pbr-minmal is then used to package python-fixtures and
2254 ;; python-testrepository.
2255 ;; Strictly speaking we currently could remove the test-requirements from the
2256 ;; normal python-pbr package (and save this package) since test are disabled
2257 ;; there anyway. But this may change in future.
2258 (define-public python-pbr-minimal
2259 (package
2260 (name "python-pbr-minimal")
2261 (version "3.0.1")
2262 (source
2263 (origin
2264 (method url-fetch)
2265 (uri (pypi-uri "pbr" version))
2266 (sha256
2267 (base32
2268 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2269 (build-system python-build-system)
2270 (arguments
2271 `(#:tests? #f))
2272 (home-page "https://docs.openstack.org/pbr/latest/")
2273 (synopsis "Minimal build of python-pbr used for bootstrapping")
2274 (description
2275 "Used only for bootstrapping python2-pbr, you should not need this.")
2276 (license license:asl2.0)))
2277
2278 (define-public python2-pbr-minimal
2279 (package-with-python2 python-pbr-minimal))
2280
2281 (define-public python-pbr
2282 (package
2283 (inherit python-pbr-minimal)
2284 (name "python-pbr")
2285 (arguments
2286 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2287 (propagated-inputs
2288 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2289 (native-inputs
2290 `(("python-fixtures" ,python-fixtures-bootstrap)
2291 ;; discover, coverage, hacking, subunit
2292 ("python-mock" ,python-mock)
2293 ("python-six" ,python-six)
2294 ("python-sphinx" ,python-sphinx)
2295 ("python-testrepository" ,python-testrepository-bootstrap)
2296 ("python-testresources" ,python-testresources-bootstrap)
2297 ("python-testscenarios" ,python-testscenarios-bootstrap)
2298 ("python-testtools" ,python-testtools-bootstrap)
2299 ("python-virtualenv" ,python-virtualenv)))
2300 (synopsis "Enhance the default behavior of Python’s setuptools")
2301 (description
2302 "Python Build Reasonableness (PBR) is a library that injects some useful
2303 and sensible default behaviors into your setuptools run. It will set
2304 versions, process requirements files and generate AUTHORS and ChangeLog file
2305 from git information.
2306 ")))
2307
2308 (define-public python2-pbr
2309 (package-with-python2 python-pbr))
2310
2311 (define-public python-pyrsistent
2312 (package
2313 (name "python-pyrsistent")
2314 (version "0.16.0")
2315 (home-page "https://github.com/tobgu/pyrsistent")
2316 (source (origin
2317 (method url-fetch)
2318 (uri (pypi-uri "pyrsistent" version))
2319 (sha256
2320 (base32
2321 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2322 (build-system python-build-system)
2323 (arguments
2324 '(#:phases (modify-phases %standard-phases
2325 ;; The package works fine with newer Pytest and Hypothesis, but
2326 ;; has pinned older versions to stay compatible with Python 2.
2327 (add-before 'check 'loosen-pytest-requirement
2328 (lambda _
2329 (substitute* "setup.py"
2330 (("pytest<5") "pytest")
2331 (("hypothesis<5") "hypothesis"))
2332 #t)))))
2333 (native-inputs
2334 `(("python-hypothesis" ,python-hypothesis)
2335 ("python-pytest" ,python-pytest)
2336 ("python-pytest-runner" ,python-pytest-runner)))
2337 (propagated-inputs
2338 `(("python-six" ,python-six)))
2339 (synopsis "Persistent data structures for Python")
2340 (description
2341 "Pyrsistent is a number of persistent collections (by some referred to as
2342 functional data structures). Persistent in the sense that they are immutable.
2343
2344 All methods on a data structure that would normally mutate it instead return a
2345 new copy of the structure containing the requested updates. The original
2346 structure is left untouched.")
2347 (license license:expat)))
2348
2349 (define-public python2-pyrsistent
2350 (package-with-python2 python-pyrsistent))
2351
2352 (define-public python-exif-read
2353 (package
2354 (name "python-exif-read")
2355 (version "2.1.2")
2356 (source (origin
2357 (method url-fetch)
2358 (uri (pypi-uri "ExifRead" version))
2359 (sha256
2360 (base32
2361 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2362 (build-system python-build-system)
2363 (arguments `(#:tests? #f)) ; no tests
2364 (home-page "https://github.com/ianare/exif-py")
2365 (synopsis "Python library to extract EXIF data from image files")
2366 (description
2367 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2368 files.")
2369 (license license:bsd-3)))
2370
2371 (define-public python2-exif-read
2372 (package-with-python2 python-exif-read))
2373
2374 (define-public python-pyld
2375 (package
2376 (name "python-pyld")
2377 (version "1.0.5")
2378 (source (origin
2379 (method url-fetch)
2380 (uri (pypi-uri "PyLD" version))
2381 (sha256
2382 (base32
2383 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2384 (build-system python-build-system)
2385 (home-page "https://github.com/digitalbazaar/pyld")
2386 (synopsis "Python implementation of the JSON-LD specification")
2387 (description
2388 "PyLD is an implementation of the JSON-LD specification.")
2389 (license license:bsd-3)))
2390
2391 (define-public python2-pyld
2392 (package-with-python2 python-pyld))
2393
2394 (define-public python-click
2395 (package
2396 (name "python-click")
2397 (version "7.0")
2398 (source
2399 (origin
2400 (method url-fetch)
2401 (uri (pypi-uri "click" version))
2402 (sha256
2403 (base32
2404 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
2405 (build-system python-build-system)
2406 (arguments
2407 `(#:phases
2408 (modify-phases %standard-phases
2409 (add-after 'unpack 'fix-paths
2410 (lambda* (#:key inputs #:allow-other-keys)
2411 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2412 "cross-libc" "libc"))))
2413 (substitute* "click/_unicodefun.py"
2414 (("'locale'")
2415 (string-append "'" glibc "/bin/locale'"))))
2416 #t))
2417 (replace 'check
2418 (lambda _
2419 (invoke "python" "-m" "pytest"))))))
2420 (native-inputs
2421 `(("python-pytest" ,python-pytest)))
2422 (home-page "https://palletsprojects.com/p/click/")
2423 (synopsis "Command line library for Python")
2424 (description
2425 "Click is a Python package for creating command line interfaces in a
2426 composable way with as little code as necessary. Its name stands for
2427 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2428 with sensible defaults out of the box.")
2429 (license license:bsd-3)))
2430
2431 (define-public python2-click
2432 (package-with-python2 python-click))
2433
2434 (define-public python-wheel
2435 (package
2436 (name "python-wheel")
2437 (version "0.33.6")
2438 (source
2439 (origin
2440 (method url-fetch)
2441 (uri (pypi-uri "wheel" version))
2442 (sha256
2443 (base32
2444 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2445 (build-system python-build-system)
2446 (arguments
2447 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2448 ;; fails to find the newly-built bdist_wheel library, even though it is
2449 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2450 '(#:tests? #f))
2451 (home-page "https://bitbucket.org/pypa/wheel/")
2452 (synopsis "Format for built Python packages")
2453 (description
2454 "A wheel is a ZIP-format archive with a specially formatted filename and
2455 the @code{.whl} extension. It is designed to contain all the files for a PEP
2456 376 compatible install in a way that is very close to the on-disk format. Many
2457 packages will be properly installed with only the @code{Unpack} step and the
2458 unpacked archive preserves enough information to @code{Spread} (copy data and
2459 scripts to their final locations) at any later time. Wheel files can be
2460 installed with a newer @code{pip} or with wheel's own command line utility.")
2461 (license license:expat)))
2462
2463 (define-public python2-wheel
2464 (package-with-python2 python-wheel))
2465
2466 (define-public python-vcversioner
2467 (package
2468 (name "python-vcversioner")
2469 (version "2.16.0.0")
2470 (source
2471 (origin
2472 (method url-fetch)
2473 (uri (pypi-uri "vcversioner" version))
2474 (sha256
2475 (base32
2476 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2477 (build-system python-build-system)
2478 (synopsis "Python library for version number discovery")
2479 (description "Vcversioner is a Python library that inspects tagging
2480 information in a variety of version control systems in order to discover
2481 version numbers.")
2482 (home-page "https://github.com/habnabit/vcversioner")
2483 (license license:isc)))
2484
2485 (define-public python2-vcversioner
2486 (package-with-python2 python-vcversioner))
2487
2488 (define-public python-jdcal
2489 (package
2490 (name "python-jdcal")
2491 (version "1.4")
2492 (source
2493 (origin
2494 (method url-fetch)
2495 (uri (pypi-uri "jdcal" version))
2496 (sha256
2497 (base32
2498 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2499 (build-system python-build-system)
2500 (arguments
2501 `(#:phases (modify-phases %standard-phases
2502 (replace 'check
2503 (lambda _
2504 (invoke "pytest"))))))
2505 (native-inputs
2506 `(("python-pytest" ,python-pytest)))
2507 (home-page "https://github.com/phn/jdcal")
2508 (synopsis "Functions to convert between Julian dates Gregorian dates")
2509 (description "This Python library provides functions for converting
2510 between Julian dates and Gregorian dates.")
2511 (license license:bsd-2)))
2512
2513 (define-public python2-jdcal
2514 (package-with-python2 python-jdcal))
2515
2516 (define-public python-jsondiff
2517 (package
2518 (name "python-jsondiff")
2519 (version "1.2.0")
2520 (source
2521 (origin
2522 (method url-fetch)
2523 (uri (pypi-uri "jsondiff" version))
2524 (sha256
2525 (base32
2526 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2527 (build-system python-build-system)
2528 (native-inputs
2529 `(("python-nose" ,python-nose)
2530 ("python-nose-random" ,python-nose-random)))
2531 (home-page
2532 "https://github.com/fzumstein/jsondiff")
2533 (synopsis "Compare JSON and JSON-like structures in Python")
2534 (description "@code{jsondiff} is a Python library which lets you
2535 compare, diff, and patch JSON and JSON-like structures in Python.")
2536 (license license:expat)))
2537
2538 (define-public python-jsonschema
2539 (package
2540 (name "python-jsonschema")
2541 (version "3.2.0")
2542 (source (origin
2543 (method url-fetch)
2544 (uri (pypi-uri "jsonschema" version))
2545 (sha256
2546 (base32
2547 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2548 (build-system python-build-system)
2549 (arguments
2550 '(#:phases
2551 (modify-phases %standard-phases
2552 (replace 'check
2553 (lambda* (#:key inputs outputs #:allow-other-keys)
2554 (add-installed-pythonpath inputs outputs)
2555 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2556 (invoke "trial" "jsonschema"))))))
2557 (native-inputs
2558 `(("python-setuptools_scm" ,python-setuptools-scm)
2559 ("python-twisted" ,python-twisted)))
2560 (propagated-inputs
2561 `(("python-attrs" ,python-attrs)
2562 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2563 ("python-pyrsistent" ,python-pyrsistent)
2564 ("python-six" ,python-six)))
2565 (home-page "https://github.com/Julian/jsonschema")
2566 (synopsis "Implementation of JSON Schema for Python")
2567 (description
2568 "Jsonschema is an implementation of JSON Schema for Python.")
2569 (license license:expat)
2570 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2571
2572 (define-public python2-jsonschema
2573 (let ((jsonschema (package-with-python2
2574 (strip-python2-variant python-jsonschema))))
2575 (package (inherit jsonschema)
2576 (propagated-inputs
2577 `(("python2-functools32" ,python2-functools32)
2578 ,@(package-propagated-inputs jsonschema))))))
2579
2580 (define-public python-schema
2581 (package
2582 (name "python-schema")
2583 (version "0.6.6")
2584 (source
2585 (origin
2586 (method url-fetch)
2587 (uri (pypi-uri "schema" version))
2588 (sha256
2589 (base32
2590 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2591 (build-system python-build-system)
2592 (native-inputs
2593 `(("python-pytest" ,python-pytest)))
2594 (home-page "https://github.com/keleshev/schema")
2595 (synopsis "Simple data validation library")
2596 (description
2597 "@code{python-schema} is a library for validating Python data
2598 structures, such as those obtained from config-files, forms, external
2599 services or command-line parsing, converted from JSON/YAML (or
2600 something else) to Python data-types.")
2601 (license license:psfl)))
2602
2603 (define-public python2-schema
2604 (package-with-python2 python-schema))
2605
2606 (define-public python-schema-0.5
2607 (package (inherit python-schema)
2608 (version "0.5.0")
2609 (source
2610 (origin
2611 (method url-fetch)
2612 (uri (pypi-uri "schema" version))
2613 (sha256
2614 (base32
2615 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2616
2617 (define-public python2-schema-0.5
2618 (package-with-python2 python-schema-0.5))
2619
2620 (define-public python-kitchen
2621 (package
2622 (name "python-kitchen")
2623 (version "1.2.5")
2624 (source
2625 (origin
2626 (method url-fetch)
2627 (uri (pypi-uri "kitchen" version))
2628 (sha256
2629 (base32
2630 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2631 (build-system python-build-system)
2632 (propagated-inputs
2633 `(("python-chardet" ,python-chardet)))
2634 (home-page "https://github.com/fedora-infra/kitchen")
2635 (synopsis "Python API for snippets")
2636 (description "@code{kitchen} module provides a python API for all sorts of
2637 little useful snippets of code that everybody ends up writing for their projects
2638 but never seem big enough to build an independent release. Use kitchen and stop
2639 cutting and pasting that code over and over.")
2640 (license (list license:lgpl2.1+
2641 ;; subprocess.py, test_subprocess.py,
2642 ;; kitchen/pycompat25/defaultdict.py:
2643 license:psfl))))
2644
2645 (define-public python2-kitchen
2646 (package-with-python2 python-kitchen))
2647
2648 (define-public python-unidecode
2649 (package
2650 (name "python-unidecode")
2651 (version "1.1.1")
2652 (source (origin
2653 (method url-fetch)
2654 (uri (pypi-uri "Unidecode" version))
2655 (sha256
2656 (base32
2657 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2658 (build-system python-build-system)
2659 (home-page "https://pypi.org/project/Unidecode/")
2660 (synopsis "ASCII transliterations of Unicode text")
2661 (description
2662 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2663 useful when integrating with legacy code that doesn't support Unicode, or for
2664 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2665 machine identifiers from human-readable Unicode strings that should still be
2666 somewhat intelligible.")
2667 (license license:gpl2+)))
2668
2669 (define-public python2-unidecode
2670 (package-with-python2 python-unidecode))
2671
2672 (define-public python-text-unidecode
2673 (package
2674 (name "python-text-unidecode")
2675 (version "1.3")
2676 (source (origin
2677 (method url-fetch)
2678 (uri (pypi-uri "text-unidecode" version))
2679 (sha256
2680 (base32
2681 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2682 (build-system python-build-system)
2683 (arguments
2684 '(#:phases (modify-phases %standard-phases
2685 (replace 'check
2686 (lambda _
2687 (setenv "PYTHONPATH"
2688 (string-append "./build/lib:"
2689 (getenv "PYTHONPATH")))
2690 (invoke "pytest" "-vv"))))))
2691 (native-inputs
2692 `(("python-pytest" ,python-pytest)))
2693 (home-page "https://github.com/kmike/text-unidecode/")
2694 (synopsis "Decode Unicode data")
2695 (description
2696 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2697 Perl library. It can create ASCII representations of Unicode data. In general
2698 users should prefer the @code{python-unidecode} package which offers better
2699 memory usage and transliteration quality.")
2700 ;; The user can choose either license.
2701 (license (list license:clarified-artistic license:gpl2+))))
2702
2703 (define-public python2-text-unidecode
2704 (package-with-python2 python-text-unidecode))
2705
2706 (define-public python-pyjwt
2707 (package
2708 (name "python-pyjwt")
2709 (version "1.7.1")
2710 (source
2711 (origin
2712 (method url-fetch)
2713 (uri (pypi-uri "PyJWT" version))
2714 (sha256
2715 (base32
2716 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2717 (modules '((guix build utils)))
2718 (snippet
2719 '(begin
2720 (for-each delete-file-recursively
2721 (find-files "." "\\.pyc$"))
2722 #t))))
2723 (build-system python-build-system)
2724 (arguments
2725 '(#:phases (modify-phases %standard-phases
2726 (replace 'check
2727 (lambda _
2728 ;; Mimic upstream commit 3a20892442b34c7 to get
2729 ;; rid of dependency on pytest-runner < 5.0.
2730 ;; Remove substitution for PyJWT > 1.7.1.
2731 (substitute* "setup.py"
2732 ((".*pytest-runner.*")
2733 ""))
2734 (invoke "pytest" "-vv"))))))
2735 (native-inputs
2736 `(("python-pytest" ,python-pytest)
2737 ("python-pytest-cov" ,python-pytest-cov)))
2738 (home-page "https://github.com/progrium/pyjwt")
2739 (synopsis "JSON Web Token implementation in Python")
2740 (description
2741 "PyJWT is a JSON Web Token implementation written in Python.")
2742 (license license:expat)))
2743
2744 (define-public python2-pyjwt
2745 (package-with-python2 python-pyjwt))
2746
2747 (define-public python-pykka
2748 (package
2749 (name "python-pykka")
2750 (version "1.2.1")
2751 (source
2752 (origin
2753 (method url-fetch)
2754 (uri (pypi-uri "Pykka" version))
2755 (sha256
2756 (base32
2757 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2758 (build-system python-build-system)
2759 (native-inputs
2760 `(("python-mock" ,python-mock)
2761 ("python-nose" ,python-nose)
2762 ("python-gevent" ,python-gevent)
2763 ("python-eventlet" ,python-eventlet)))
2764 (home-page "https://www.pykka.org/")
2765 (synopsis "Pykka is a Python implementation of the actor model")
2766 (description
2767 "Pykka is a Python implementation of the actor model.
2768 The actor model introduces some simple rules to control the sharing
2769 of state and cooperation between execution units, which makes it
2770 easier to build concurrent applications.")
2771 (license license:asl2.0)))
2772
2773 (define-public python2-pykka
2774 (package-with-python2 python-pykka))
2775
2776 (define-public python-pymsgbox
2777 (package
2778 (name "python-pymsgbox")
2779 (version "1.0.6")
2780 (source
2781 (origin
2782 (method git-fetch)
2783 (uri (git-reference
2784 ;; LICENSE.txt is not present on pypi
2785 (url "https://github.com/asweigart/PyMsgBox")
2786 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2787 (file-name (git-file-name name version))
2788 (sha256
2789 (base32
2790 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2791 (arguments
2792 ;; Circular dependency to run tests:
2793 ;; Tests need pyautogui, which depends on pymsgbox.
2794 '(#:tests? #f))
2795 (build-system python-build-system)
2796 (home-page "https://github.com/asweigart/PyMsgBox")
2797 (synopsis "Python module for JavaScript-like message boxes")
2798 (description
2799 "PyMsgBox is a simple, cross-platform, pure Python module for
2800 JavaScript-like message boxes. Types of dialog boxes include:
2801 @enumerate
2802 @item alert
2803 @item confirm
2804 @item prompt
2805 @item password
2806 @end enumerate
2807 ")
2808 (license license:bsd-3)))
2809
2810 (define-public python-pympler
2811 (package
2812 (name "python-pympler")
2813 (home-page "https://pythonhosted.org/Pympler/")
2814 (version "0.8")
2815 (source (origin
2816 (method url-fetch)
2817 (uri (pypi-uri "Pympler" version))
2818 (sha256
2819 (base32
2820 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2821 (build-system python-build-system)
2822 (arguments
2823 `(#:phases (modify-phases %standard-phases
2824 (delete 'check)
2825 (add-after 'install 'check
2826 (lambda* (#:key inputs outputs #:allow-other-keys)
2827 (add-installed-pythonpath inputs outputs)
2828 (invoke "python" "setup.py" "test"))))))
2829 (synopsis "Measure, monitor and analyze memory behavior")
2830 (description
2831 "Pympler is a development tool to measure, monitor and analyze
2832 the memory behavior of Python objects in a running Python application.
2833
2834 By pympling a Python application, detailed insight in the size and the
2835 lifetime of Python objects can be obtained. Undesirable or unexpected
2836 runtime behavior like memory bloat and other @samp{pymples} can easily
2837 be identified.
2838
2839 A web profiling frontend exposes process statistics, garbage
2840 visualisation and class tracker statistics.")
2841 (license license:asl2.0)))
2842
2843 (define-public python2-pympler
2844 (package-with-python2 python-pympler))
2845
2846 (define-public python-itsdangerous
2847 (package
2848 (name "python-itsdangerous")
2849 (version "1.1.0")
2850 (source
2851 (origin
2852 (method url-fetch)
2853 (uri (pypi-uri "itsdangerous" version))
2854 (sha256
2855 (base32
2856 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2857 (build-system python-build-system)
2858 (home-page "https://palletsprojects.com/p/itsdangerous/")
2859 (synopsis "Python library for passing data to/from untrusted environments")
2860 (description
2861 "Itsdangerous provides various helpers to pass trusted data to untrusted
2862 environments and back.")
2863 (license license:bsd-3)))
2864
2865 (define-public python2-itsdangerous
2866 (package-with-python2 python-itsdangerous))
2867
2868 (define-public python-pyyaml
2869 (package
2870 (name "python-pyyaml")
2871 (version "5.3.1")
2872 (source
2873 (origin
2874 (method url-fetch)
2875 (uri (pypi-uri "PyYAML" version))
2876 (sha256
2877 (base32
2878 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
2879 (build-system python-build-system)
2880 (inputs
2881 `(("libyaml" ,libyaml)))
2882 (home-page "https://pyyaml.org")
2883 (synopsis "YAML parser and emitter for Python")
2884 (description
2885 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2886 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2887 API, and sensible error messages. PyYAML supports standard YAML tags and
2888 provides Python-specific tags that represent an arbitrary Python object.")
2889 (license license:expat)))
2890
2891 (define-public python2-pyyaml
2892 (package-with-python2 python-pyyaml))
2893
2894 (define-public python-vine
2895 (package
2896 (name "python-vine")
2897 (version "1.1.4")
2898 (source
2899 (origin
2900 (method url-fetch)
2901 (uri (pypi-uri "vine" version))
2902 (sha256
2903 (base32
2904 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2905 (build-system python-build-system)
2906 (native-inputs
2907 `(("python-pytest" ,python-pytest)
2908 ("python-case" ,python-case)))
2909 (home-page "https://github.com/celery/vine")
2910 (synopsis "Promises for Python")
2911 (description
2912 "@code{vine} provides a special implementation of promises in that it can
2913 be used both for \"promise of a value\" and lazy evaluation. The biggest
2914 upside for this is that everything in a promise can also be a promise,
2915 e.g. filters, callbacks and errbacks can all be promises.")
2916 (license license:bsd-3)))
2917
2918 (define-public python-virtualenv
2919 (package
2920 (name "python-virtualenv")
2921 (version "20.0.10")
2922 (source
2923 (origin
2924 (method url-fetch)
2925 (uri (pypi-uri "virtualenv" version))
2926 (sha256
2927 (base32
2928 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
2929 (build-system python-build-system)
2930 (native-inputs
2931 `(("python-mock" ,python-mock)
2932 ("python-pytest" ,python-pytest)
2933 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2934 ;; be an input at all". However, removing the input makes the build error:
2935 ;; File "setup.py", line 4, in <module>
2936 ;; raise RuntimeError("setuptools >= 41 required to build")
2937 ("python-setuptools" ,python-setuptools)
2938 ("python-setuptools-scm" ,python-setuptools-scm)))
2939 (propagated-inputs
2940 `(("python-appdirs" ,python-appdirs)
2941 ("python-distlib" ,python-distlib)
2942 ("python-filelock" ,python-filelock)
2943 ("python-six" ,python-six)
2944 ("python-importlib-metadata" ,python-importlib-metadata)))
2945 (home-page "https://virtualenv.pypa.io/")
2946 (synopsis "Virtual Python environment builder")
2947 (description
2948 "Virtualenv is a tool to create isolated Python environments.")
2949 (properties `((python2-variant . ,(delay python2-virtualenv))))
2950 (license license:expat)))
2951
2952 (define-public python2-virtualenv
2953 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2954 (package
2955 (inherit base)
2956 (arguments
2957 `(#:python ,python-2
2958 #:phases
2959 (modify-phases %standard-phases
2960 (add-after 'set-paths 'adjust-PYTHONPATH
2961 (lambda* (#:key inputs #:allow-other-keys)
2962 (let* ((python (assoc-ref inputs "python"))
2963 (python-sitedir (string-append python "/lib/python2.7"
2964 "/site-packages")))
2965 ;; XXX: 'python2' always comes first on PYTHONPATH
2966 ;; and shadows the 'setuptools' input. Move python2
2967 ;; last: this should be fixed in python-build-system
2968 ;; in a future rebuild cycle.
2969 (setenv "PYTHONPATH"
2970 (string-append (string-join (delete python-sitedir
2971 (string-split
2972 (getenv "PYTHONPATH")
2973 #\:))
2974 ":")
2975 ":" python-sitedir))
2976 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2977 (getenv "PYTHONPATH"))
2978 #t))))))
2979 (propagated-inputs
2980 `(("python-contextlib2" ,python2-contextlib2)
2981 ,@(package-propagated-inputs base))))))
2982
2983 (define-public python-markupsafe
2984 (package
2985 (name "python-markupsafe")
2986 (version "1.1.1")
2987 (source
2988 (origin
2989 (method url-fetch)
2990 (uri (pypi-uri "MarkupSafe" version))
2991 (sha256
2992 (base32
2993 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2994 (build-system python-build-system)
2995 (arguments
2996 `(#:modules ((ice-9 ftw)
2997 (srfi srfi-1)
2998 (srfi srfi-26)
2999 (guix build utils)
3000 (guix build python-build-system))
3001 #:phases (modify-phases %standard-phases
3002 (replace 'check
3003 (lambda _
3004 (let ((cwd (getcwd))
3005 (libdir (find (cut string-prefix? "lib." <>)
3006 (scandir "build"))))
3007 (setenv "PYTHONPATH"
3008 (string-append cwd "/build/" libdir ":"
3009 (getenv "PYTHONPATH")))
3010 (invoke "pytest" "-vv")))))))
3011 (native-inputs
3012 `(("python-pytest" ,python-pytest)))
3013 (home-page "https://github.com/mitsuhiko/markupsafe")
3014 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3015 (description
3016 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3017 for Python.")
3018 (license license:bsd-3)))
3019
3020 (define-public python2-markupsafe
3021 (package-with-python2 python-markupsafe))
3022
3023 (define-public python-jinja2
3024 (package
3025 (name "python-jinja2")
3026 (version "2.11.2")
3027 (source
3028 (origin
3029 (method url-fetch)
3030 (uri (pypi-uri "Jinja2" version))
3031 (sha256
3032 (base32
3033 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3034 (build-system python-build-system)
3035 (arguments
3036 '(#:phases (modify-phases %standard-phases
3037 (replace 'check
3038 (lambda* (#:key tests? #:allow-other-keys)
3039 (if tests?
3040 (begin
3041 (setenv "PYTHONPATH"
3042 (string-append "./build/lib:"
3043 (getenv "PYTHONPATH")))
3044 (invoke "pytest" "-vv"))
3045 (format #t "test suite not run~%"))
3046 #t)))))
3047 (native-inputs
3048 `(("python-pytest" ,python-pytest)))
3049 (propagated-inputs
3050 `(("python-markupsafe" ,python-markupsafe)))
3051 (home-page "http://jinja.pocoo.org/")
3052 (synopsis "Python template engine")
3053 (description
3054 "Jinja2 is a small but fast and easy to use stand-alone template engine
3055 written in pure Python.")
3056 (license license:bsd-3)))
3057
3058 (define-public python2-jinja2
3059 (package-with-python2 python-jinja2))
3060
3061 (define-public python-jinja2-time
3062 (package
3063 (name "python-jinja2-time")
3064 (version "0.2.0")
3065 (source
3066 (origin
3067 (method url-fetch)
3068 (uri (pypi-uri "jinja2-time" version))
3069 (sha256
3070 (base32
3071 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3072 (build-system python-build-system)
3073 (propagated-inputs
3074 `(("python-arrow" ,python-arrow)
3075 ("python-jinja2" ,python-jinja2)))
3076 (home-page
3077 "https://github.com/hackebrot/jinja2-time")
3078 (synopsis "Jinja2 Extension for Dates and Times")
3079 (description
3080 "This package provides an extension for the template engine Jinja2. It
3081 adds a 'now' tag providing a convenient access to the arrow.now() API from
3082 templates. A format string can be provided to control the output.")
3083 (license license:expat)))
3084
3085 (define-public python-pystache
3086 (package
3087 (name "python-pystache")
3088 (version "0.5.4")
3089 (source (origin
3090 (method url-fetch)
3091 (uri (pypi-uri "pystache" version))
3092 (sha256
3093 (base32
3094 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3095 (build-system python-build-system)
3096 (arguments
3097 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3098 (home-page "http://defunkt.io/pystache/")
3099 (synopsis "Python logic-less template engine")
3100 (description
3101 "Pystache is a Python implementation of the framework agnostic,
3102 logic-free templating system Mustache.")
3103 (license license:expat)
3104 (properties `((python2-variant . ,(delay python2-pystache))))))
3105
3106 (define-public python2-pystache
3107 (package (inherit (package-with-python2
3108 (strip-python2-variant python-pystache)))
3109 (arguments
3110 `(#:python ,python-2
3111 #:phases
3112 (modify-phases %standard-phases
3113 (replace 'check
3114 (lambda _
3115 (invoke "python" "test_pystache.py"))))))))
3116
3117 (define-public python-joblib
3118 (package
3119 (name "python-joblib")
3120 (version "0.14.1")
3121 (source (origin
3122 (method url-fetch)
3123 (uri (pypi-uri "joblib" version))
3124 (sha256
3125 (base32
3126 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3127 (build-system python-build-system)
3128 (arguments
3129 `(#:phases
3130 (modify-phases %standard-phases
3131 (replace 'check
3132 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3133 (native-inputs
3134 `(("python-pytest" ,python-pytest)))
3135 (home-page "https://joblib.readthedocs.io/")
3136 (synopsis "Using Python functions as pipeline jobs")
3137 (description
3138 "Joblib is a set of tools to provide lightweight pipelining in Python.
3139 In particular, joblib offers: transparent disk-caching of the output values
3140 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3141 logging and tracing of the execution.")
3142 (license license:bsd-3)))
3143
3144 (define-public python2-joblib
3145 (package-with-python2 python-joblib))
3146
3147 (define-public python-daemon
3148 (package
3149 (name "python-daemon")
3150 (version "2.2.3")
3151 (source
3152 (origin
3153 (method url-fetch)
3154 (uri (pypi-uri "python-daemon" version))
3155 (sha256
3156 (base32
3157 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3158 (build-system python-build-system)
3159 (arguments
3160 `(#:phases
3161 (modify-phases %standard-phases
3162 (add-before 'check 'disable-tests
3163 (lambda _
3164 ;; FIXME: Determine why test fails
3165 (substitute* "test/test_daemon.py"
3166 (("test_detaches_process_context")
3167 "skip_test_detaches_process_context"))
3168 #t)))))
3169 (propagated-inputs
3170 `(("python-lockfile" ,python-lockfile)))
3171 (native-inputs
3172 `(("python-unittest2" ,python-unittest2)
3173 ("python-testtools" ,python-testtools)
3174 ("python-testscenarios" ,python-testscenarios)
3175 ("python-mock" ,python-mock)
3176 ("python-docutils" ,python-docutils)))
3177 (home-page "https://pagure.io/python-daemon/")
3178 (synopsis "Python library for making a Unix daemon process")
3179 (description "Python-daemon is a library that assists a Python program to
3180 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3181
3182 This library provides a @code{DaemonContext} class that manages the following
3183 important tasks for becoming a daemon process:
3184 @enumerate
3185 @item Detach the process into its own process group.
3186 @item Set process environment appropriate for running inside a chroot.
3187 @item Renounce suid and sgid privileges.
3188 @item Close all open file descriptors.
3189 @item Change the working directory, uid, gid, and umask.
3190 @item Set appropriate signal handlers.
3191 @item Open new file descriptors for stdin, stdout, and stderr.
3192 @item Manage a specified PID lock file.
3193 @item Register cleanup functions for at-exit processing.
3194 @end enumerate")
3195 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3196 (license (list license:asl2.0 license:gpl3+))))
3197
3198 (define-public python-anytree
3199 (package
3200 (name "python-anytree")
3201 (version "2.8.0")
3202 (source (origin
3203 (method url-fetch)
3204 (uri (pypi-uri "anytree" version))
3205 (sha256
3206 (base32
3207 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3208 (build-system python-build-system)
3209 (propagated-inputs
3210 `(("python-six" ,python-six)))
3211 (native-inputs
3212 `(;; For tests.
3213 ("graphviz" ,graphviz) ;for 'dot'
3214 ("python-nose" ,python-nose)))
3215 (home-page "https://github.com/c0fec0de/anytree")
3216 (synopsis "Lightweight tree data library")
3217 (description
3218 "@code{anytree} is a simple, lightweight, and extensible tree data
3219 structure for Python.")
3220 (license license:asl2.0)))
3221
3222 (define-public python-docutils
3223 (package
3224 (name "python-docutils")
3225 (version "0.16")
3226 (source
3227 (origin
3228 (method url-fetch)
3229 (uri (pypi-uri "docutils" version))
3230 (sha256
3231 (base32
3232 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3233 (build-system python-build-system)
3234 (arguments
3235 '(#:phases (modify-phases %standard-phases
3236 (replace 'check
3237 (lambda* (#:key tests? #:allow-other-keys)
3238 (if tests?
3239 (invoke "python" "test/alltests.py")
3240 (format #t "test suite not run~%"))
3241 #t)))))
3242 (home-page "http://docutils.sourceforge.net/")
3243 (synopsis "Python Documentation Utilities")
3244 (description
3245 "Docutils is a modular system for processing documentation into useful
3246 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3247 reStructuredText.")
3248 ;; Most of the source code is public domain, but some source files are
3249 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3250 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3251
3252 (define-public python2-docutils
3253 (package-with-python2 python-docutils))
3254
3255 ;; python2-sphinx fails its test suite with newer versions.
3256 (define-public python2-docutils-0.14
3257 (package
3258 (inherit python2-docutils)
3259 (version "0.14")
3260 (source (origin
3261 (method url-fetch)
3262 (uri (pypi-uri "docutils" version))
3263 (sha256
3264 (base32
3265 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3266
3267 (define-public python-restructuredtext-lint
3268 (package
3269 (name "python-restructuredtext-lint")
3270 (version "1.3.0")
3271 (source
3272 (origin
3273 (method url-fetch)
3274 (uri (pypi-uri "restructuredtext-lint" version))
3275 (sha256
3276 (base32
3277 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3278 (build-system python-build-system)
3279 (arguments
3280 `(#:phases
3281 (modify-phases %standard-phases
3282 (delete 'check)
3283 (add-after 'install 'check
3284 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3285 (when tests?
3286 (add-installed-pythonpath inputs outputs)
3287 (invoke "nosetests" "-v"))
3288 #t)))))
3289 (propagated-inputs
3290 `(("python-docutils" ,python-docutils)))
3291 (native-inputs
3292 `(("python-nose" ,python-nose)))
3293 (home-page "https://github.com/twolfson/restructuredtext-lint")
3294 (synopsis "reStructuredText linter")
3295 (description "This package provides a linter for the reStructuredText
3296 format.")
3297 (license license:unlicense)))
3298
3299 (define-public python-doc8
3300 (package
3301 (name "python-doc8")
3302 (version "0.8.0")
3303 (source
3304 (origin
3305 (method url-fetch)
3306 (uri (pypi-uri "doc8" version))
3307 (sha256
3308 (base32
3309 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3310 (build-system python-build-system)
3311 (arguments
3312 `(#:phases
3313 (modify-phases %standard-phases
3314 (delete 'check)
3315 (add-after 'install 'check
3316 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3317 (when tests?
3318 (add-installed-pythonpath inputs outputs)
3319 (invoke "pytest" "-v"))
3320 #t)))))
3321 (propagated-inputs
3322 `(("python-chardet" ,python-chardet)
3323 ("python-docutils" ,python-docutils)
3324 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3325 ("python-six" ,python-six)
3326 ("python-stevedore" ,python-stevedore)))
3327 (native-inputs
3328 `(("python-testtools" ,python-testtools)
3329 ("python-pytest" ,python-pytest)))
3330 (home-page "https://launchpad.net/doc8")
3331 (synopsis
3332 "Style checker for Sphinx (or other) RST documentation")
3333 (description
3334 "Doc8 is an opinionated style checker for reStructured Text and plain
3335 text styles of documentation.")
3336 (license license:asl2.0)))
3337
3338 (define-public python-pygments
3339 (package
3340 (name "python-pygments")
3341 (version "2.5.2")
3342 (source
3343 (origin
3344 (method url-fetch)
3345 (uri (pypi-uri "Pygments" version))
3346 (sha256
3347 (base32
3348 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
3349 (build-system python-build-system)
3350 (arguments
3351 ;; FIXME: Tests require sphinx, which depends on this.
3352 '(#:tests? #f))
3353 (home-page "https://pygments.org/")
3354 (synopsis "Syntax highlighting")
3355 (description
3356 "Pygments is a syntax highlighting package written in Python.")
3357 (license license:bsd-2)))
3358
3359 (define-public python2-pygments
3360 (package-with-python2 python-pygments))
3361
3362 (define-public python-bumpversion
3363 (package
3364 (name "python-bumpversion")
3365 (version "0.5.3")
3366 (source
3367 (origin
3368 (method url-fetch)
3369 (uri (pypi-uri "bumpversion" version))
3370 (sha256
3371 (base32
3372 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3373 (build-system python-build-system)
3374 (home-page "https://github.com/peritus/bumpversion")
3375 (synopsis "Tool to bump software version")
3376 (description "This tool provides a command-line interface (CLI) to bump a
3377 software version simply.")
3378 (license license:expat)))
3379
3380 (define-public python-deprecated
3381 (package
3382 (name "python-deprecated")
3383 (version "1.2.5")
3384 (source
3385 (origin
3386 (method git-fetch)
3387 (uri (git-reference
3388 (url "https://github.com/tantale/deprecated.git")
3389 (commit (string-append "v" version))))
3390 (file-name (git-file-name name version))
3391 (sha256
3392 (base32
3393 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3394 (build-system python-build-system)
3395 (arguments
3396 `(#:phases (modify-phases %standard-phases
3397 (replace 'check
3398 (lambda _
3399 (invoke "pytest"))))))
3400 (propagated-inputs
3401 `(("python-wrapt" ,python-wrapt)))
3402 (native-inputs
3403 `(("python-bumpversion" ,python-bumpversion)
3404 ("python-pytest" ,python-pytest)
3405 ("python-pytest-cov" ,python-pytest-cov)
3406 ("python-sphinx" ,python-sphinx)
3407 ("python-tox" ,python-tox)))
3408 (home-page "https://github.com/tantale/deprecated")
3409 (synopsis "Python decorator to deprecate classes, functions or methods")
3410 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3411 to deprecate classes, functions or methods.")
3412 (license license:expat)))
3413
3414 (define-public python-pygithub
3415 (package
3416 (name "python-pygithub")
3417 (version "1.43.8")
3418 (source
3419 ;; We fetch from the Git repo because there are no tests in the PyPI
3420 ;; archive.
3421 (origin
3422 (method git-fetch)
3423 (uri (git-reference
3424 (url "https://github.com/PyGithub/PyGithub.git")
3425 (commit (string-append "v" version))))
3426 (file-name (git-file-name name version))
3427 (sha256
3428 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3429 (build-system python-build-system)
3430 (arguments
3431 `(#:phases (modify-phases %standard-phases
3432 ;; Some tests rely on the network.
3433 (add-after 'unpack 'disable-failing-tests
3434 (lambda _
3435 (substitute* "tests/Issue142.py"
3436 (("testDecodeJson") "disabled_testDecodeJson"))
3437 #t))
3438 (add-before 'check 'prepare-for-tests
3439 (lambda _
3440 (for-each (lambda (f)
3441 (chmod f #o666))
3442 (find-files "./tests"))
3443 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3444 (setenv "PYTHONPATH"
3445 (string-append "./tests:" (getenv "PYTHONPATH")))
3446 #t)))))
3447 (propagated-inputs
3448 `(("python-deprecated" ,python-deprecated)
3449 ("python-pyjwt" ,python-pyjwt)
3450 ("python-requests" ,python-requests)))
3451 (native-inputs `(("python-httpretty" ,python-httpretty)))
3452 (home-page "https://pygithub.readthedocs.io/en/latest/")
3453 (synopsis "Python library for the GitHub API")
3454 (description "This library allows managing GitHub resources such as
3455 repositories, user profiles, and organizations in your Python applications,
3456 using version 3 of the GitHub application programming interface (API).")
3457 (license license:lgpl3+)))
3458
3459 (define-public python-rellu
3460 (package
3461 (name "python-rellu")
3462 (version "0.7")
3463 (source
3464 (origin
3465 (method url-fetch)
3466 (uri (pypi-uri "rellu" version))
3467 (sha256
3468 (base32
3469 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3470 (build-system python-build-system)
3471 (propagated-inputs
3472 `(("python-invoke" ,python-invoke)
3473 ("python-pygithub" ,python-pygithub)))
3474 (home-page "https://github.com/robotframework/rellu")
3475 (synopsis "Utilities to create PyPI releases")
3476 (description "This collection of utilities contains tooling and templates
3477 to assist in creating releases on GitHub and publishing them on PyPI. It is
3478 designed to be used by Robot Framework and tools and libraries in its
3479 ecosystem, but can naturally be used also by other projects.")
3480 (license license:asl2.0)))
3481
3482 (define-public python-robotframework
3483 (package
3484 (name "python-robotframework")
3485 (version "3.1.2")
3486 ;; There are no tests in the PyPI archive.
3487 (source
3488 (origin
3489 (method git-fetch)
3490 (uri (git-reference
3491 (url "https://github.com/robotframework/robotframework.git")
3492 (commit (string-append "v" version))))
3493 (file-name (git-file-name name version))
3494 (sha256
3495 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
3496 (patches (search-patches
3497 "python-robotframework-honor-source-date-epoch.patch"))))
3498 (build-system python-build-system)
3499 (arguments
3500 `(#:phases (modify-phases %standard-phases
3501 (add-before 'build 'build-and-install-doc
3502 (lambda* (#:key outputs #:allow-other-keys)
3503 (let* ((doc-output (assoc-ref outputs "doc"))
3504 (doc (string-append doc-output "/share/"
3505 ,name "-" ,version "/")))
3506 (invoke "invoke" "library-docs" "all")
3507 (mkdir-p doc)
3508 (copy-recursively "doc/libraries"
3509 (string-append doc "/libraries"))
3510 #t)))
3511 (replace 'check
3512 (lambda _
3513 (invoke "python" "utest/run.py"))))))
3514 (native-inputs
3515 `(("python-invoke" ,python-invoke)
3516 ("python-rellu" ,python-rellu)
3517 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3518 (outputs '("out" "doc"))
3519 (home-page "https://robotframework.org")
3520 (synopsis "Generic automation framework")
3521 (description "Robot Framework is a generic automation framework for
3522 acceptance testing, acceptance test driven development (ATDD), and robotic
3523 process automation (RPA).")
3524 (license license:asl2.0)))
3525
3526 (define-public python-robotframework-lint
3527 ;; There is no properly tagged release; the commit below seems to correspond
3528 ;; to the 0.9 stable release available from PyPI. The tests are not
3529 ;; included in the PyPI archive, so we fetch the sources from the upstream
3530 ;; Git repo.
3531 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3532 (revision "1"))
3533 (package
3534 (name "python-robotframework-lint")
3535 (version (git-version "0.9.0" revision commit))
3536 (source
3537 (origin
3538 (method git-fetch)
3539 (uri (git-reference
3540 (url "https://github.com/boakley/robotframework-lint.git")
3541 (commit commit)))
3542 (file-name (git-file-name name version))
3543 (sha256
3544 (base32
3545 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3546 (build-system python-build-system)
3547 (arguments
3548 `(#:phases
3549 (modify-phases %standard-phases
3550 (replace 'check
3551 (lambda _
3552 (invoke "python" "-m" "robot" "-A"
3553 "tests/conf/default.args" "tests"))))))
3554 (propagated-inputs
3555 `(("python-robotframework" ,python-robotframework)))
3556 (home-page "https://github.com/boakley/robotframework-lint/")
3557 (synopsis "Static analysis tool (linter) for Robot Framework")
3558 (description "This package provides the @code{rflint} command-line
3559 utility, a static analysis tool (linter) for Robot Framework source files.")
3560 (license license:asl2.0))))
3561
3562 (define-public python-robotframework-sshlibrary
3563 (package
3564 (name "python-robotframework-sshlibrary")
3565 (version "3.3.0")
3566 ;; There are no tests in the PyPI archive.
3567 (source
3568 (origin
3569 (method git-fetch)
3570 (uri (git-reference
3571 (url "https://github.com/robotframework/SSHLibrary.git")
3572 (commit (string-append "v" version))))
3573 (file-name (git-file-name name version))
3574 (sha256
3575 (base32
3576 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3577 (build-system python-build-system)
3578 (arguments
3579 `(#:phases
3580 (modify-phases %standard-phases
3581 (add-before 'build 'build-and-install-doc
3582 (lambda* (#:key outputs #:allow-other-keys)
3583 (let* ((doc-output (assoc-ref outputs "doc"))
3584 (doc (string-append doc-output "/share/"
3585 ,name "-" ,version "/")))
3586 (invoke "chmod" "-R" "+w" "docs")
3587 (invoke "invoke" "kw-docs" "project-docs")
3588 (mkdir-p doc)
3589 (for-each delete-file (find-files "docs" "\\.rst"))
3590 (copy-recursively "docs" doc)
3591 #t)))
3592 (replace 'check
3593 (lambda _
3594 ;; Some tests require an SSH server; we remove them.
3595 (delete-file "utest/test_client_api.py")
3596 (delete-file "utest/test_scp.py")
3597 (invoke "python" "utest/run.py"))))))
3598 (propagated-inputs
3599 `(("python-robotframework" ,python-robotframework)
3600 ("python-paramiko" ,python-paramiko)
3601 ("python-scp" ,python-scp)))
3602 (native-inputs
3603 `(("openssh" ,openssh)
3604 ("which" ,which)
3605 ;; To generate the documentation
3606 ("python-docutils" ,python-docutils)
3607 ("python-invoke" ,python-invoke)
3608 ("python-pygments" ,python-pygments)
3609 ("python-rellu" ,python-rellu)))
3610 (outputs '("out" "doc"))
3611 (home-page "https://github.com/robotframework/SSHLibrary")
3612 (synopsis "Robot Framework library for SSH and SFTP")
3613 (description "SSHLibrary is a Robot Framework library providing support
3614 for SSH and SFTP. It has the following main usages:
3615 @itemize @bullet
3616 @item Executing commands on the remote machine, either blocking or non-blocking.
3617 @item Writing and reading in an interactive shell.
3618 @item Transferring files and directories over SFTP.
3619 @item Ensuring that files and directories exist on the remote machine.
3620 @end itemize")
3621 (license license:asl2.0)))
3622
3623 (define-public python-rstr
3624 (package
3625 (name "python-rstr")
3626 (version "2.2.6")
3627 (source
3628 (origin
3629 (method url-fetch)
3630 (uri (pypi-uri "rstr" version))
3631 (sha256
3632 (base32
3633 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3634 (build-system python-build-system)
3635 (home-page
3636 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3637 (synopsis "Generate random strings in Python")
3638 (description "This package provides a python module for generating
3639 random strings of various types. It could be useful for fuzz testing,
3640 generating dummy data, or other applications. It has no dependencies
3641 outside the standard library.")
3642 (license license:bsd-3)))
3643
3644 (define-public python-scp
3645 (package
3646 (name "python-scp")
3647 (version "0.13.2")
3648 (source
3649 (origin
3650 (method url-fetch)
3651 (uri (pypi-uri "scp" version))
3652 (sha256
3653 (base32
3654 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3655 (build-system python-build-system)
3656 (arguments
3657 '(#:tests? #f)) ;tests require an SSH server
3658 (propagated-inputs
3659 `(("python-paramiko" ,python-paramiko)))
3660 (home-page "https://github.com/jbardin/scp.py")
3661 (synopsis "SCP protocol module for Python and Paramiko")
3662 (description "The scp module extends the Paramiko library to send and
3663 receive files via the SCP1 protocol, as implemented by the OpenSSH
3664 @command{scp} program.")
3665 (license license:gpl2+)))
3666
3667 (define-public python-rst.linker
3668 (package
3669 (name "python-rst.linker")
3670 (version "1.11")
3671 (source
3672 (origin
3673 (method url-fetch)
3674 (uri (pypi-uri "rst.linker" version))
3675 (sha256
3676 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3677 (build-system python-build-system)
3678 (propagated-inputs
3679 `(("python-dateutil" ,python-dateutil)
3680 ("python-six" ,python-six)))
3681 (native-inputs
3682 `(("python-setuptools-scm" ,python-setuptools-scm)))
3683 ;; Test would require path.py, which would introduce a cyclic dependence.
3684 (arguments `(#:tests? #f))
3685 ;; Note: As of version 1.7 the documentation is not worth building.
3686 (home-page "https://github.com/jaraco/rst.linker")
3687 (synopsis "Sphinx plugin to add links and timestamps")
3688 (description "rst.linker automatically replaces text by a
3689 reStructuredText external reference or timestamps. It's primary purpose is to
3690 augment the changelog, but it can be used for other documents, too.")
3691 (license license:expat)))
3692
3693 (define-public python2-rst.linker
3694 (package-with-python2 python-rst.linker))
3695
3696 (define-public python-feedgenerator
3697 (package
3698 (name "python-feedgenerator")
3699 (version "1.9")
3700 (source
3701 (origin
3702 (method url-fetch)
3703 (uri (pypi-uri "feedgenerator" version))
3704 (sha256
3705 (base32
3706 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3707 (modules '((guix build utils)))
3708 (snippet
3709 '(begin
3710 ;; Remove pre-compiled .pyc files from source.
3711 (for-each delete-file-recursively
3712 (find-files "." "__pycache__" #:directories? #t))
3713 (for-each delete-file (find-files "." "\\.pyc$"))
3714 #t))))
3715 (build-system python-build-system)
3716 (propagated-inputs
3717 `(("python-pytz" ,python-pytz)
3718 ("python-six" ,python-six)))
3719 (home-page "https://github.com/getpelican/feedgenerator")
3720 (synopsis
3721 "Standalone version of Django's Atom/RSS feed generator")
3722 (description
3723 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3724 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3725 (license license:bsd-3)))
3726
3727 (define-public python2-feedgenerator
3728 (package-with-python2 python-feedgenerator))
3729
3730 (define-public python-toml
3731 (package
3732 (name "python-toml")
3733 (version "0.10.1")
3734 (source
3735 (origin
3736 (method url-fetch)
3737 (uri (pypi-uri "toml" version))
3738 (sha256
3739 (base32
3740 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3741 (build-system python-build-system)
3742 (arguments
3743 `(#:tests? #f)) ;no tests suite in release
3744 (home-page "https://github.com/uiri/toml")
3745 (synopsis "Library for TOML")
3746 (description
3747 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3748 Language (TOML) configuration files.")
3749 (license license:expat)))
3750
3751 (define-public python-jsonrpc-server
3752 (package
3753 (name "python-jsonrpc-server")
3754 (version "0.3.4")
3755 (source
3756 (origin
3757 (method url-fetch)
3758 (uri (pypi-uri "python-jsonrpc-server" version))
3759 (sha256
3760 (base32
3761 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
3762 (build-system python-build-system)
3763 (propagated-inputs
3764 `(("python-mock" ,python-mock)
3765 ("python-pytest" ,python-pytest)
3766 ("python-ujson" ,python-ujson-1)))
3767 (home-page
3768 "https://github.com/palantir/python-jsonrpc-server")
3769 (synopsis "JSON RPC 2.0 server library")
3770 (description
3771 "This package provides a JSON RPC 2.0 server library for Python.")
3772 (license license:expat)))
3773
3774 (define-public python-pydocstyle
3775 (package
3776 (name "python-pydocstyle")
3777 (version "3.0.0")
3778 (source
3779 (origin
3780 (method url-fetch)
3781 (uri (pypi-uri "pydocstyle" version))
3782 (sha256
3783 (base32
3784 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3785 (build-system python-build-system)
3786 (propagated-inputs
3787 `(("python-six" ,python-six)
3788 ("python-snowballstemmer" ,python-snowballstemmer)))
3789 (home-page
3790 "https://github.com/PyCQA/pydocstyle/")
3791 (synopsis "Python docstring style checker")
3792 (description
3793 "This package provides a style checker for the Python Language
3794 Server (PLS).")
3795 (license license:expat)))
3796
3797 (define-public python-language-server
3798 (package
3799 (name "python-language-server")
3800 (version "0.32.0")
3801 (source
3802 (origin
3803 (method url-fetch)
3804 (uri (pypi-uri "python-language-server" version))
3805 (sha256
3806 (base32
3807 "0j5swacmjps9sas1gfwg0xi84rmjhfhz20cwg3k4058d20rs20ip"))))
3808 (build-system python-build-system)
3809 (propagated-inputs
3810 `(("python-pluggy" ,python-pluggy)
3811 ("python-jsonrpc-server" ,python-jsonrpc-server)
3812 ;; Note: Remove the special versions of Jedi and Parso when updating
3813 ;; this package.
3814 ("python-jedi" ,python-jedi)
3815 ("python-yapf" ,python-yapf)
3816 ("python-pyflakes" ,python-pyflakes)
3817 ("python-pydocstyle" ,python-pydocstyle)
3818 ("python-pycodestyle" ,python-pycodestyle)
3819 ("python-mccabe" ,python-mccabe)
3820 ("python-rope" ,python-rope)
3821 ("python-autopep8" ,python-autopep8)
3822 ("python-flake8" ,python-flake8)
3823 ("python-pylint" ,python-pylint)))
3824 (home-page "https://github.com/palantir/python-language-server")
3825 (synopsis "Python implementation of the Language Server Protocol")
3826 (description
3827 "The Python Language Server (pyls) is an implementation of the Python 3
3828 language specification for the Language Server Protocol (LSP). This tool is
3829 used in text editing environments to provide a complete and integrated
3830 feature-set for programming Python effectively.")
3831 (license license:expat)))
3832
3833 (define-public python-pathspec
3834 (package
3835 (name "python-pathspec")
3836 (version "0.7.0")
3837 (source
3838 (origin
3839 (method url-fetch)
3840 (uri (pypi-uri "pathspec" version))
3841 (sha256
3842 (base32
3843 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3844 (build-system python-build-system)
3845 (home-page "https://github.com/cpburnz/python-path-specification")
3846 (synopsis "Utility library for gitignore style pattern matching of file paths")
3847 (description
3848 "This package provides a utility library for gitignore style pattern
3849 matching of file paths.")
3850 (license license:mpl2.0)))
3851
3852 (define-public python-black
3853 (package
3854 (name "python-black")
3855 (version "19.10b0")
3856 (source
3857 (origin
3858 (method url-fetch)
3859 (uri (pypi-uri "black" version))
3860 (sha256
3861 (base32
3862 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
3863 (build-system python-build-system)
3864 (arguments
3865 `(#:phases
3866 (modify-phases %standard-phases
3867 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3868 (lambda _
3869 (let ((python3 (which "python3")))
3870 (substitute* '("tests/data/fmtonoff.py"
3871 "tests/data/string_prefixes.py"
3872 "tests/data/function.py"
3873 "tests/data/python37.py")
3874 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3875 (string-append "#!" python3 (if (string? minor-version)
3876 minor-version
3877 "")))))
3878 #t))
3879 (add-after 'unpack 'disable-broken-tests
3880 (lambda _
3881 ;; These tests are supposed to be skipped when the blackd
3882 ;; dependencies are missing, but this doesn't quite work.
3883 (substitute* "tests/test_black.py"
3884 (("( *)class BlackDTestCase.*" match indent)
3885 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3886 indent "class BlackDTestCase(unittest.TestCase):\n"))
3887 (("web.Application") "False")
3888 (("@unittest_run_loop") ""))
3889
3890 ;; Patching the above file breaks the self test
3891 (substitute* "tests/test_black.py"
3892 (("( *)def test_self" match indent)
3893 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3894 #t)))))
3895 (propagated-inputs
3896 `(("python-click" ,python-click)
3897 ("python-attrs" ,python-attrs)
3898 ("python-appdirs" ,python-appdirs)
3899 ("python-pathspec" ,python-pathspec)
3900 ("python-regex" ,python-regex)
3901 ("python-toml" ,python-toml)
3902 ("python-typed-ast" ,python-typed-ast)))
3903 (native-inputs
3904 `(("python-setuptools-scm" ,python-setuptools-scm)))
3905 (home-page "https://github.com/ambv/black")
3906 (synopsis "The uncompromising code formatter")
3907 (description "Black is the uncompromising Python code formatter.")
3908 (license license:expat)))
3909
3910 (define-public python-blinker
3911 (package
3912 (name "python-blinker")
3913 (version "1.4")
3914 (source
3915 (origin
3916 (method url-fetch)
3917 (uri (pypi-uri "blinker" version))
3918 (sha256
3919 (base32
3920 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3921 (build-system python-build-system)
3922 (home-page "https://pythonhosted.org/blinker/")
3923 (synopsis "Fast, simple object-to-object and broadcast signaling")
3924 (description
3925 "Blinker provides a fast dispatching system that allows any number of
3926 interested parties to subscribe to events, or \"signals\".")
3927 (license license:expat)))
3928
3929 (define-public python2-blinker
3930 (package-with-python2 python-blinker))
3931
3932 (define-public pelican
3933 (package
3934 (name "pelican")
3935 (version "4.2.0")
3936 (source
3937 (origin
3938 (method url-fetch)
3939 (uri (pypi-uri "pelican" version))
3940 (sha256
3941 (base32
3942 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3943 (build-system python-build-system)
3944 (propagated-inputs
3945 `(("python-blinker" ,python-blinker)
3946 ("python-dateutil" ,python-dateutil)
3947 ("python-docutils" ,python-docutils)
3948 ("python-feedgenerator" ,python-feedgenerator)
3949 ("python-jinja2" ,python-jinja2)
3950 ("python-markdown" ,python-markdown)
3951 ("python-pygments" ,python-pygments)
3952 ("python-pytz" ,python-pytz)
3953 ("python-six" ,python-six)
3954 ("python-unidecode" ,python-unidecode)))
3955 (home-page "https://getpelican.com/")
3956 (arguments
3957 `(;; XXX Requires a lot more packages to do unit tests :P
3958 #:tests? #f))
3959 (synopsis "Python-based static site publishing system")
3960 (description
3961 "Pelican is a tool to generate a static blog from reStructuredText,
3962 Markdown input files, and more. Pelican uses Jinja2 for templating
3963 and is very extensible.")
3964 (license license:agpl3+)))
3965
3966 (define-public mallard-ducktype
3967 (package
3968 (name "mallard-ducktype")
3969 (version "1.0.2")
3970 (source
3971 (origin
3972 (method git-fetch)
3973 ;; git-reference because tests are not included in pypi source tarball
3974 ;; https://issues.guix.gnu.org/issue/36755#2
3975 (uri (git-reference
3976 (url "https://github.com/projectmallard/mallard-ducktype.git")
3977 (commit version)))
3978 (file-name (git-file-name name version))
3979 (sha256
3980 (base32
3981 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3982 (build-system python-build-system)
3983 (arguments
3984 '(#:phases
3985 (modify-phases %standard-phases
3986 (replace 'check
3987 (lambda _
3988 (with-directory-excursion "tests"
3989 (invoke "sh" "runtests")))))))
3990 (home-page "http://projectmallard.org")
3991 (synopsis "Convert Ducktype to Mallard documentation markup")
3992 (description
3993 "Ducktype is a lightweight syntax that can represent all the semantics
3994 of the Mallard XML documentation system. Ducktype files can be converted to
3995 Mallard using the @command{ducktype} tool. The yelp-tools package
3996 provides additional functionality on the produced Mallard documents.")
3997 (license license:expat)))
3998
3999 (define-public python-cython
4000 (package
4001 (name "python-cython")
4002 (version "0.29.17")
4003 (source
4004 (origin
4005 (method url-fetch)
4006 (uri (pypi-uri "Cython" version))
4007 (sha256
4008 (base32
4009 "1wnaz40hdw4mg5acz5gqb6bhjhn4cvfxg0xdzfy7aa6qn665hqb3"))))
4010 (build-system python-build-system)
4011 ;; we need the full python package and not just the python-wrapper
4012 ;; because we need libpython3.3m.so
4013 (inputs
4014 `(("python" ,python)))
4015 (arguments
4016 `(#:phases
4017 (modify-phases %standard-phases
4018 (add-before 'check 'set-HOME
4019 ;; some tests require access to "$HOME/.cython"
4020 (lambda _ (setenv "HOME" "/tmp") #t))
4021 (replace 'check
4022 (lambda _
4023 ;; Disable compiler optimizations to greatly reduce the running
4024 ;; time of the test suite.
4025 (setenv "CFLAGS" "-O0")
4026
4027 (invoke "python" "runtests.py" "-vv"
4028 "-j" (number->string (parallel-job-count))
4029 ;; XXX: On 32-bit architectures, running the parallel tests
4030 ;; fails on many-core systems, see
4031 ;; <https://github.com/cython/cython/issues/2807>.
4032 ,@(if (not (target-64bit?))
4033 '("-x" "run.parallel")
4034 '())))))))
4035 (home-page "https://cython.org/")
4036 (synopsis "C extensions for Python")
4037 (description "Cython is an optimising static compiler for both the Python
4038 programming language and the extended Cython programming language. It makes
4039 writing C extensions for Python as easy as Python itself.")
4040 (license license:asl2.0)
4041 (properties `((python2-variant . ,(delay python2-cython))))))
4042
4043 (define-public python2-cython
4044 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4045 (package
4046 (inherit base)
4047 (name "python2-cython")
4048 (inputs
4049 `(("python-2" ,python-2))) ;this is not automatically changed
4050 (arguments
4051 (substitute-keyword-arguments (package-arguments base)
4052 ((#:phases phases)
4053 `(modify-phases ,phases
4054 (add-before 'check 'adjust-test_embed
4055 (lambda _
4056 (substitute* "runtests.py"
4057 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4058 ;; so it can give the right -L flag to GCC when embedding static
4059 ;; builds of Python. It is unaware that the Python "config"
4060 ;; directory (where the static library lives) was renamed in
4061 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4062 ;; which works fine, because that is where the shared library is.
4063 ;;
4064 ;; It also appears to be unaware that the Makefile in Demos/embed
4065 ;; already unconditionally pass the static library location to GCC,
4066 ;; after checking sysconfig.get_config_var('LIBPL).
4067 ;;
4068 ;; The effect is that the linker is unable to resolve libexpat
4069 ;; symbols when building for Python 2, because neither the Python 2
4070 ;; shared library nor Expat is available. To fix it, we can either
4071 ;; add Expat as an input and make it visible to the linker, or just
4072 ;; prevent it from overriding the Python shared library location.
4073 ;; The end result is identical, so we take the easy route.
4074 ((" or libname not in os\\.listdir\\(libdir\\)")
4075 ""))
4076 #t)))))))))
4077
4078 ;; The RPython toolchain currently does not support Python 3.
4079 (define-public python2-rpython
4080 (package
4081 (name "python2-rpython")
4082 (version "0.2.1")
4083 (source
4084 (origin
4085 (method url-fetch)
4086 (uri (pypi-uri "rpython" version))
4087 (sha256
4088 (base32
4089 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4090 (build-system python-build-system)
4091 (arguments `(#:python ,python-2))
4092 (native-inputs
4093 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4094 (home-page "https://rpython.readthedocs.org")
4095 (synopsis "Framework for implementing interpreters and virtual machines")
4096 (description "RPython is a translation and support framework for
4097 producing implementations of dynamic languages, emphasizing a clean separation
4098 between language specification and implementation aspects.")
4099 (license license:expat)))
4100
4101 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4102 ;; python-scipy still build, as these three packages are often used together.
4103 (define-public python-numpy
4104 (package
4105 (name "python-numpy")
4106 (version "1.17.3")
4107 (source
4108 (origin
4109 (method url-fetch)
4110 (uri (string-append
4111 "https://github.com/numpy/numpy/releases/download/v"
4112 version "/numpy-" version ".tar.gz"))
4113 (sha256
4114 (base32
4115 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4116 (build-system python-build-system)
4117 (inputs
4118 `(("openblas" ,openblas)
4119 ("lapack" ,lapack)))
4120 (native-inputs
4121 `(("python-cython" ,python-cython)
4122 ("python-pytest" ,python-pytest)
4123 ("gfortran" ,gfortran)))
4124 (arguments
4125 `(#:phases
4126 (modify-phases %standard-phases
4127 (add-before 'build 'configure-blas-lapack
4128 (lambda* (#:key inputs #:allow-other-keys)
4129 (call-with-output-file "site.cfg"
4130 (lambda (port)
4131 (format port
4132 "[openblas]
4133 libraries = openblas
4134 library_dirs = ~a/lib
4135 include_dirs = ~a/include
4136
4137 # backslash-n to make emacs happy
4138 \n[lapack]
4139 lapack_libs = lapack
4140 library_dirs = ~a/lib
4141 include_dirs = ~a/include
4142 "
4143 (assoc-ref inputs "openblas")
4144 (assoc-ref inputs "openblas")
4145 (assoc-ref inputs "lapack")
4146 (assoc-ref inputs "lapack"))))
4147 #t))
4148 (add-before 'build 'fix-executable-paths
4149 (lambda* (#:key inputs #:allow-other-keys)
4150 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4151 ;; instead of /bin/sh.
4152 (substitute* "numpy/distutils/exec_command.py"
4153 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4154 (string-append match-start (assoc-ref inputs "bash") match-end)))
4155 ;; Use "gcc" executable, not "cc".
4156 (substitute* "numpy/distutils/system_info.py"
4157 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4158 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4159 #t))
4160 ;; Tests can only be run after the library has been installed and not
4161 ;; within the source directory.
4162 (delete 'check)
4163 (add-after 'install 'check
4164 (lambda* (#:key outputs inputs #:allow-other-keys)
4165 ;; Make installed package available for running the tests
4166 (add-installed-pythonpath inputs outputs)
4167 ;; Make sure "f2py" etc is found.
4168 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4169 ":" (getenv "PATH")))
4170 (with-directory-excursion "/tmp"
4171 (invoke "python" "-c"
4172 "import numpy; numpy.test(verbose=2)")))))))
4173 (home-page "https://numpy.org")
4174 (synopsis "Fundamental package for scientific computing with Python")
4175 (description "NumPy is the fundamental package for scientific computing
4176 with Python. It contains among other things: a powerful N-dimensional array
4177 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4178 and Fortran code, useful linear algebra, Fourier transform, and random number
4179 capabilities.")
4180 (properties `((python2-variant . ,(delay python2-numpy))))
4181 (license license:bsd-3)))
4182
4183 ;; Numpy 1.16.x are the last versions that support Python 2.
4184 (define-public python2-numpy
4185 (let ((numpy (package-with-python2
4186 (strip-python2-variant python-numpy))))
4187 (package/inherit
4188 numpy
4189 (version "1.16.5")
4190 (source (origin
4191 (method url-fetch)
4192 (uri (string-append
4193 "https://github.com/numpy/numpy/releases/download/v"
4194 version "/numpy-" version ".tar.gz"))
4195 (sha256
4196 (base32
4197 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4198
4199 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4200 ;; interest only for legacy code going back to NumPy's predecessor
4201 ;; Numeric.
4202 (define-public python2-numpy-1.8
4203 (package (inherit python2-numpy)
4204 (version "1.8.2")
4205 (source
4206 (origin
4207 (method git-fetch)
4208 (uri (git-reference
4209 (url "https://github.com/numpy/numpy")
4210 (commit (string-append "v" version))))
4211 (file-name (git-file-name "numpy" version))
4212 (sha256
4213 (base32
4214 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4215 (arguments
4216 (substitute-keyword-arguments (package-arguments python2-numpy)
4217 ((#:phases phases)
4218 `(modify-phases ,phases
4219 (replace 'configure-blas-lapack
4220 (lambda* (#:key inputs #:allow-other-keys)
4221 (call-with-output-file "site.cfg"
4222 (lambda (port)
4223 (format port
4224 "[openblas]
4225 libraries = openblas,lapack
4226 library_dirs = ~a/lib:~a/lib
4227 include_dirs = ~a/include:~a/include
4228 "
4229 (assoc-ref inputs "openblas")
4230 (assoc-ref inputs "lapack")
4231 (assoc-ref inputs "openblas")
4232 (assoc-ref inputs "lapack"))))
4233 #t))))))
4234 (native-inputs
4235 `(("python2-nose" ,python2-nose)))
4236 (description "NumPy is the fundamental package for scientific computing
4237 with Python. It contains among other things: a powerful N-dimensional array
4238 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4239 and Fortran code, useful linear algebra, Fourier transform, and random number
4240 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4241 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4242 Numeric.")
4243 (license license:bsd-3)))
4244
4245 (define-public python-munch
4246 (package
4247 (name "python-munch")
4248 (version "2.0.4")
4249 (source
4250 (origin
4251 (method url-fetch)
4252 (uri (pypi-uri "munch" version))
4253 (sha256
4254 (base32
4255 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4256 (build-system python-build-system)
4257 (home-page "https://github.com/Infinidat/munch")
4258 (synopsis "Dot-accessible dictionary")
4259 (description "Munch is a dot-accessible dictionary similar to JavaScript
4260 objects.")
4261 (license license:expat)))
4262
4263 (define-public python2-munch
4264 (package-with-python2 python-munch))
4265
4266 (define-public python-colormath
4267 (package
4268 (name "python-colormath")
4269 (version "3.0.0")
4270 (source
4271 (origin
4272 (method url-fetch)
4273 (uri (pypi-uri "colormath" version))
4274 (sha256
4275 (base32
4276 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4277 (build-system python-build-system)
4278 (propagated-inputs
4279 `(("python-networkx" ,python-networkx)
4280 ("python-numpy" ,python-numpy)))
4281 (home-page "https://github.com/gtaylor/python-colormath")
4282 (synopsis "Color math and conversion library")
4283 (description
4284 "This is a Python library for color math and conversions.")
4285 (license license:bsd-3)))
4286
4287 (define-public python2-colormath
4288 (package-with-python2 python-colormath))
4289
4290 (define-public python-spectra
4291 (package
4292 (name "python-spectra")
4293 (version "0.0.11")
4294 (source
4295 (origin
4296 (method url-fetch)
4297 (uri (pypi-uri "spectra" version))
4298 (sha256
4299 (base32
4300 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4301 (build-system python-build-system)
4302 (arguments
4303 `(#:phases
4304 (modify-phases %standard-phases
4305 (replace 'check
4306 (lambda _ (invoke "nosetests" "-v"))))))
4307 (propagated-inputs
4308 `(("python-colormath" ,python-colormath)))
4309 (native-inputs
4310 `(("python-nose" ,python-nose)))
4311 (home-page "https://github.com/jsvine/spectra")
4312 (synopsis "Color scales and color conversion")
4313 (description
4314 "This package provides a Python library intended to make color math,
4315 color scales, and color space conversion easy. It has support for:
4316
4317 @enumerate
4318 @item Color scales
4319 @item Color ranges
4320 @item Color blending
4321 @item Brightening/darkening colors
4322 @item Saturating/desaturating colors
4323 @item Conversion to/from multiple color spaces.
4324 @end enumerate\n")
4325 (license license:expat)))
4326
4327 (define-public python2-spectra
4328 (package-with-python2 python-spectra))
4329
4330 (define-public python-numpy-documentation
4331 (package
4332 (name "python-numpy-documentation")
4333 (version (package-version python-numpy))
4334 (source (package-source python-numpy))
4335 (build-system python-build-system)
4336 (native-inputs
4337 `(("python-matplotlib" ,python-matplotlib)
4338 ("python-numpy" ,python-numpy)
4339 ("pkg-config" ,pkg-config)
4340 ("python-sphinx" ,python-sphinx)
4341 ("python-numpydoc" ,python-numpydoc)
4342 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4343 texlive-fonts-ec
4344 texlive-generic-ifxetex
4345 texlive-generic-pdftex
4346 texlive-amsfonts
4347 texlive-latex-capt-of
4348 texlive-latex-cmap
4349 texlive-latex-environ
4350 texlive-latex-eqparbox
4351 texlive-latex-etoolbox
4352 texlive-latex-expdlist
4353 texlive-latex-fancyhdr
4354 texlive-latex-fancyvrb
4355 texlive-latex-fncychap
4356 texlive-latex-float
4357 texlive-latex-framed
4358 texlive-latex-geometry
4359 texlive-latex-graphics
4360 texlive-latex-hyperref
4361 texlive-latex-mdwtools
4362 texlive-latex-multirow
4363 texlive-latex-needspace
4364 texlive-latex-oberdiek
4365 texlive-latex-parskip
4366 texlive-latex-preview
4367 texlive-latex-tabulary
4368 texlive-latex-threeparttable
4369 texlive-latex-titlesec
4370 texlive-latex-trimspaces
4371 texlive-latex-ucs
4372 texlive-latex-upquote
4373 texlive-latex-url
4374 texlive-latex-varwidth
4375 texlive-latex-wrapfig)))
4376 ("texinfo" ,texinfo)
4377 ("perl" ,perl)
4378 ("scipy-sphinx-theme"
4379 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4380 (method git-fetch)
4381 (uri (git-reference
4382 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4383 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4384 (sha256
4385 (base32
4386 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4387 ,@(package-native-inputs python-numpy)))
4388 (arguments
4389 `(#:tests? #f ; we're only generating the documentation
4390 #:phases
4391 (modify-phases %standard-phases
4392 (delete 'build)
4393 (replace 'install
4394 (lambda* (#:key inputs outputs #:allow-other-keys)
4395 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4396 (doc (string-append
4397 data "/doc/" ,name "-"
4398 ,(package-version python-numpy)))
4399 (info-reader (string-append data "/info"))
4400 (html (string-append doc "/html"))
4401 (scipy-sphinx-theme "scipy-sphinx-theme")
4402 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4403 (pyver ,(string-append "PYVER=")))
4404
4405 ;; FIXME: this is needed to for texlive-union to generate
4406 ;; fonts, which are not found.
4407 (setenv "HOME" "/tmp")
4408
4409 (with-directory-excursion "doc"
4410 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4411 (mkdir-p html)
4412 (invoke "make" "html" pyver)
4413 (invoke "make" "latex" "PAPER=a4" pyver)
4414 (invoke "make" "-C" "build/latex"
4415 "all-pdf" "PAPER=a4" pyver)
4416 ;; FIXME: Generation of the info file fails.
4417 ;; (invoke "make" "info" pyver)
4418 ;; (mkdir-p info)
4419 ;; (copy-file "build/texinfo/numpy.info"
4420 ;; (string-append info "/numpy.info"))
4421 (for-each (lambda (file)
4422 (copy-file (string-append "build/latex" file)
4423 (string-append doc file)))
4424 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4425 (with-directory-excursion "build/html"
4426 (for-each (lambda (file)
4427 (let* ((dir (dirname file))
4428 (tgt-dir (string-append html "/" dir)))
4429 (unless (equal? "." dir)
4430 (mkdir-p tgt-dir))
4431 (install-file file html)))
4432 (find-files "." ".*")))))
4433 #t)))))
4434 (home-page (package-home-page python-numpy))
4435 (synopsis "Documentation for the python-numpy package")
4436 (description (package-description python-numpy))
4437 (license (package-license python-numpy))))
4438
4439 (define-public python2-numpy-documentation
4440 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4441 (package
4442 (inherit numpy-documentation)
4443 (native-inputs `(("python2-functools32" ,python2-functools32)
4444 ,@(package-native-inputs numpy-documentation))))))
4445
4446 (define-public python-pygit2
4447 (package
4448 (name "python-pygit2")
4449 (version "1.1.0")
4450 (source
4451 (origin
4452 (method url-fetch)
4453 (uri (pypi-uri "pygit2" version))
4454 (sha256
4455 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4456 (build-system python-build-system)
4457 (arguments
4458 '(#:tests? #f)) ; tests don't run correctly in our environment
4459 (propagated-inputs
4460 `(("python-cached-property" ,python-cached-property)
4461 ("python-cffi" ,python-cffi)
4462 ("libgit2" ,libgit2)))
4463 (native-inputs
4464 `(("python-pytest" ,python-pytest)))
4465 (home-page "https://github.com/libgit2/pygit2")
4466 (synopsis "Python bindings for libgit2")
4467 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4468 library, libgit2 implements Git plumbing.")
4469 ;; GPL2.0 only, with linking exception.
4470 (license license:gpl2)))
4471
4472 (define-public python-pyparsing
4473 (package
4474 (name "python-pyparsing")
4475 (version "2.4.6")
4476 (source
4477 (origin
4478 (method url-fetch)
4479 (uri (pypi-uri "pyparsing" version))
4480 (sha256
4481 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4482 (build-system python-build-system)
4483 (outputs '("out" "doc"))
4484 (arguments
4485 `(#:tests? #f ; no test target
4486 #:phases
4487 (modify-phases %standard-phases
4488 (add-after 'install 'install-doc
4489 (lambda* (#:key outputs #:allow-other-keys)
4490 (let* ((doc (string-append (assoc-ref outputs "doc")
4491 "/share/doc/" ,name "-" ,version))
4492 (html-doc (string-append doc "/html"))
4493 (examples (string-append doc "/examples")))
4494 (mkdir-p html-doc)
4495 (mkdir-p examples)
4496 (for-each
4497 (lambda (dir tgt)
4498 (map (lambda (file)
4499 (install-file file tgt))
4500 (find-files dir ".*")))
4501 (list "docs" "htmldoc" "examples")
4502 (list doc html-doc examples))
4503 #t))))))
4504 (home-page "https://github.com/pyparsing/pyparsing")
4505 (synopsis "Python parsing class library")
4506 (description
4507 "The pyparsing module is an alternative approach to creating and
4508 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4509 of regular expressions. The pyparsing module provides a library of classes
4510 that client code uses to construct the grammar directly in Python code.")
4511 (license license:expat)))
4512
4513 (define-public python2-pyparsing
4514 (package-with-python2 python-pyparsing))
4515
4516 (define-public python-numpydoc
4517 (package
4518 (name "python-numpydoc")
4519 (version "0.8.0")
4520 (source
4521 (origin
4522 (method url-fetch)
4523 (uri (pypi-uri "numpydoc" version))
4524 (sha256
4525 (base32
4526 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4527 (build-system python-build-system)
4528 (propagated-inputs
4529 `(("python-sphinx" ,python-sphinx)))
4530 (native-inputs
4531 `(("python-nose" ,python-nose)))
4532 (home-page "https://pypi.org/project/numpydoc/")
4533 (synopsis
4534 "Numpy's Sphinx extensions")
4535 (description
4536 "Sphinx extension to support docstrings in Numpy format.")
4537 (license license:bsd-2)))
4538
4539 (define-public python2-numpydoc
4540 (package-with-python2 python-numpydoc))
4541
4542 (define-public python-numexpr
4543 (package
4544 (name "python-numexpr")
4545 (version "2.6.5")
4546 (source
4547 (origin
4548 (method url-fetch)
4549 (uri (pypi-uri "numexpr" version))
4550 (sha256
4551 (base32
4552 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4553 (build-system python-build-system)
4554 (arguments `(#:tests? #f)) ; no tests included
4555 (propagated-inputs
4556 `(("python-numpy" ,python-numpy)))
4557 (home-page "https://github.com/pydata/numexpr")
4558 (synopsis "Fast numerical expression evaluator for NumPy")
4559 (description
4560 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4561 expressions that operate on arrays are accelerated and use less memory than
4562 doing the same calculation in Python. In addition, its multi-threaded
4563 capabilities can make use of all your cores, which may accelerate
4564 computations, most specially if they are not memory-bounded (e.g. those using
4565 transcendental functions).")
4566 (license license:expat)))
4567
4568 (define-public python2-numexpr
4569 (package-with-python2 python-numexpr))
4570
4571 (define-public python-cycler
4572 (package
4573 (name "python-cycler")
4574 (version "0.10.0")
4575 (source (origin
4576 (method url-fetch)
4577 (uri (pypi-uri "cycler" version))
4578 (sha256
4579 (base32
4580 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4581 (build-system python-build-system)
4582 (arguments
4583 ;; XXX: The current version requires 'coveralls' which we don't have.
4584 ;; Enable this for the next release which uses 'python-pytest'.
4585 '(#:tests? #f))
4586 (propagated-inputs
4587 `(("python-six" ,python-six)))
4588 (home-page "http://matplotlib.org/cycler/")
4589 (synopsis "Composable keyword argument iterator")
4590 (description
4591 "When using @code{matplotlib} and plotting more than one line, it is
4592 common to want to be able to want to be able to cycle over one or more artist
4593 styles; but the plotting logic can quickly become involved.
4594 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4595 @code{Cycler} class was developed.")
4596 (license license:bsd-3)))
4597
4598 (define-public python2-cycler
4599 (package-with-python2 python-cycler))
4600
4601 (define-public python-colorspacious
4602 (package
4603 (name "python-colorspacious")
4604 (version "1.1.2")
4605 (source
4606 (origin
4607 (method git-fetch)
4608 (uri (git-reference
4609 (url "https://github.com/njsmith/colorspacious.git")
4610 (commit (string-append "v" version))))
4611 (file-name (git-file-name name version))
4612 (sha256
4613 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4614 (build-system python-build-system)
4615 (propagated-inputs
4616 `(("python-numpy" ,python-numpy)))
4617 (native-inputs
4618 `(("python-nose" ,python-nose)))
4619 (arguments
4620 `(#:phases
4621 (modify-phases %standard-phases
4622 (replace 'check
4623 (lambda _
4624 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4625 (home-page "https://github.com/njsmith/colorspacious")
4626 (synopsis "Python library for colorspace conversions")
4627 (description "@code{colorspacious} is a Python library that lets you
4628 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4629 (license license:expat)))
4630
4631 (define-public python2-colorspacious
4632 (package-with-python2 python-colorspacious))
4633
4634 (define-public python-matplotlib
4635 (package
4636 (name "python-matplotlib")
4637 (version "3.1.2")
4638 (source
4639 (origin
4640 (method url-fetch)
4641 (uri (pypi-uri "matplotlib" version))
4642 (sha256
4643 (base32
4644 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4645 (build-system python-build-system)
4646 (propagated-inputs ; the following packages are all needed at run time
4647 `(("python-cycler" ,python-cycler)
4648 ("python-kiwisolver" ,python-kiwisolver)
4649 ("python-pyparsing" ,python-pyparsing)
4650 ("python-pygobject" ,python-pygobject)
4651 ("gobject-introspection" ,gobject-introspection)
4652 ("python-tkinter" ,python "tk")
4653 ("python-dateutil" ,python-dateutil)
4654 ("python-numpy" ,python-numpy)
4655 ("python-pillow" ,python-pillow)
4656 ("python-pytz" ,python-pytz)
4657 ("python-six" ,python-six)
4658 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4659 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4660 ;; object. For this reason we need to import both libraries.
4661 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4662 ("python-pycairo" ,python-pycairo)
4663 ("python-cairocffi" ,python-cairocffi)))
4664 (inputs
4665 `(("libpng" ,libpng)
4666 ("imagemagick" ,imagemagick)
4667 ("freetype" ,freetype)
4668 ("cairo" ,cairo)
4669 ("glib" ,glib)
4670 ;; FIXME: Add backends when available.
4671 ;("python-wxpython" ,python-wxpython)
4672 ("tcl" ,tcl)
4673 ("tk" ,tk)))
4674 (native-inputs
4675 `(("pkg-config" ,pkg-config)
4676 ("python-pytest" ,python-pytest)
4677 ("python-mock" ,python-mock)
4678 ("unzip" ,unzip)
4679 ("jquery-ui"
4680 ,(origin
4681 (method url-fetch)
4682 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4683 (sha256
4684 (base32
4685 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4686 (arguments
4687 `(#:phases
4688 (modify-phases %standard-phases
4689 ;; XXX We disable all image comparison tests because we're using a
4690 ;; newer version of FreeType than matplotlib expects. This leads to
4691 ;; minor differences throughout the tests.
4692 (add-after 'unpack 'fix-and-disable-failing-tests
4693 (lambda _
4694 (substitute* (append (find-files "lib/matplotlib/tests/"
4695 "test_.*\\.py$")
4696 (find-files "lib/mpl_toolkits/tests"
4697 "test_.*\\.py$"))
4698 (("^from matplotlib" match)
4699 (string-append "import pytest\n" match))
4700 (("( *)@image_comparison" match indent)
4701 (string-append indent
4702 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4703 match)))
4704 (substitute* "lib/matplotlib/tests/test_animation.py"
4705 (("/bin/sh") (which "sh")))
4706 (for-each delete-file
4707 ;; test_normal_axes, test_get_tightbbox_polar
4708 '("lib/matplotlib/tests/test_axes.py"
4709 ;; We don't use the webagg backend and this test forces it.
4710 "lib/matplotlib/tests/test_backend_webagg.py"
4711 ;; test_outward_ticks
4712 "lib/matplotlib/tests/test_tightlayout.py"
4713 ;; test_hidden_axes fails with minor extent
4714 ;; differences, possibly due to the use of a
4715 ;; different version of FreeType.
4716 "lib/matplotlib/tests/test_constrainedlayout.py"
4717 ;; Fontconfig returns no fonts.
4718 "lib/matplotlib/tests/test_font_manager.py"))
4719 #t))
4720 (add-before 'install 'install-jquery-ui
4721 (lambda* (#:key outputs inputs #:allow-other-keys)
4722 (let ((dir (string-append (assoc-ref outputs "out")
4723 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4724 (mkdir-p dir)
4725 (invoke "unzip"
4726 (assoc-ref inputs "jquery-ui")
4727 "-d" dir))
4728 #t))
4729 (replace 'check
4730 (lambda* (#:key outputs inputs #:allow-other-keys)
4731 (add-installed-pythonpath inputs outputs)
4732 (invoke "python" "tests.py" "-v"
4733 "-m" "not network and not webagg")))
4734 (add-before 'build 'configure-environment
4735 (lambda* (#:key outputs inputs #:allow-other-keys)
4736 (let ((cairo (assoc-ref inputs "cairo")))
4737 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4738 ;; has not effect.
4739 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4740 (setenv "HOME" (getcwd))
4741 (call-with-output-file "setup.cfg"
4742 (lambda (port)
4743 (format port "[directories]~%
4744 basedirlist = ~a,~a~%
4745 [packages]~%
4746 tests = True~%"
4747 (assoc-ref inputs "tcl")
4748 (assoc-ref inputs "tk")))))
4749 #t)))))
4750 (home-page "https://matplotlib.org/")
4751 (synopsis "2D plotting library for Python")
4752 (description
4753 "Matplotlib is a Python 2D plotting library which produces publication
4754 quality figures in a variety of hardcopy formats and interactive environments
4755 across platforms. Matplotlib can be used in Python scripts, the python and
4756 ipython shell, web application servers, and six graphical user interface
4757 toolkits.")
4758 (license license:psfl)
4759 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4760
4761 (define-public python2-matplotlib
4762 (let ((matplotlib (package-with-python2
4763 (strip-python2-variant python-matplotlib))))
4764 (package (inherit matplotlib)
4765 (version "2.2.4")
4766 (source
4767 (origin
4768 (method url-fetch)
4769 (uri (pypi-uri "matplotlib" version))
4770 (sha256
4771 (base32
4772 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4773 (arguments
4774 (substitute-keyword-arguments (package-arguments matplotlib)
4775 ((#:phases phases)
4776 `(modify-phases ,phases
4777 (replace 'install-jquery-ui
4778 (lambda* (#:key outputs inputs #:allow-other-keys)
4779 (let ((dir (string-append (assoc-ref outputs "out")
4780 "/lib/python2.7/site-packages/"
4781 "matplotlib/backends/web_backend/")))
4782 (mkdir-p dir)
4783 (invoke "unzip"
4784 (assoc-ref inputs "jquery-ui")
4785 "-d" dir))
4786 #t))
4787 (delete 'fix-and-disable-failing-tests)
4788 (delete 'check))))) ; These tests weren't run the the past.
4789 ;; Make sure to use special packages for Python 2 instead
4790 ;; of those automatically rewritten by package-with-python2.
4791 (propagated-inputs
4792 `(("python2-pycairo" ,python2-pycairo)
4793 ("python2-backports-functools-lru-cache"
4794 ,python2-backports-functools-lru-cache)
4795 ("python2-functools32" ,python2-functools32)
4796 ("python2-pygobject-2" ,python2-pygobject-2)
4797 ("python2-subprocess32" ,python2-subprocess32)
4798 ("python2-tkinter" ,python-2 "tk")
4799 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4800 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4801
4802 (define-public python-matplotlib-documentation
4803 (package
4804 (name "python-matplotlib-documentation")
4805 (version (package-version python-matplotlib))
4806 (source (package-source python-matplotlib))
4807 (build-system python-build-system)
4808 (native-inputs
4809 `(("python-matplotlib" ,python-matplotlib)
4810 ("python-colorspacious" ,python-colorspacious)
4811 ("python-sphinx" ,python-sphinx)
4812 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4813 ("python-sphinx-gallery" ,python-sphinx-gallery)
4814 ("python-numpydoc" ,python-numpydoc)
4815 ("python-ipython" ,python-ipython)
4816 ("python-ipykernel" ,python-ipykernel)
4817 ("python-mock" ,python-mock)
4818 ("graphviz" ,graphviz)
4819 ("texlive" ,(texlive-union (list texlive-amsfonts
4820 texlive-latex-amsmath
4821 texlive-latex-enumitem
4822 texlive-latex-expdlist
4823 texlive-latex-geometry
4824 texlive-latex-preview
4825 texlive-latex-type1cm
4826 texlive-latex-ucs
4827
4828 texlive-generic-pdftex
4829
4830 texlive-fonts-ec
4831 texlive-fonts-adobe-times
4832 texlive-fonts-txfonts)))
4833 ("texinfo" ,texinfo)
4834 ,@(package-native-inputs python-matplotlib)))
4835 (arguments
4836 `(#:tests? #f ; we're only generating documentation
4837 #:phases
4838 (modify-phases %standard-phases
4839 ;; The tests in python-matplotlib are run after the install phase, so
4840 ;; we need to delete the extra phase here.
4841 (delete 'check)
4842 (replace 'build
4843 (lambda _
4844 (chdir "doc")
4845 (setenv "PYTHONPATH"
4846 (string-append (getenv "PYTHONPATH")
4847 ":" (getcwd) "/../examples/units"))
4848 (substitute* "conf.py"
4849 ;; Don't use git.
4850 (("^SHA = check_output.*")
4851 (string-append "SHA = \"" ,version "\"\n"))
4852 ;; Don't fetch intersphinx files from the Internet
4853 (("^explicit_order_folders" m)
4854 (string-append "intersphinx_mapping = {}\n" m))
4855 (("'sphinx.ext.intersphinx',") "")
4856 ;; Disable URL embedding which requires internet access.
4857 (("'https://docs.scipy.org/doc/numpy'") "None")
4858 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4859 (invoke "make"
4860 "SPHINXBUILD=sphinx-build"
4861 "SPHINXOPTS=" ; don't abort on warnings
4862 "html" "texinfo")))
4863 (replace 'install
4864 (lambda* (#:key inputs outputs #:allow-other-keys)
4865 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4866 (doc (string-append data "/doc/python-matplotlib-" ,version))
4867 (info (string-append data "/info"))
4868 (html (string-append doc "/html")))
4869 (mkdir-p html)
4870 (mkdir-p info)
4871 (copy-recursively "build/html" html)
4872 (symlink (string-append html "/_images")
4873 (string-append info "/matplotlib-figures"))
4874 (with-directory-excursion "build/texinfo"
4875 (substitute* "matplotlib.texi"
4876 (("@image\\{([^,]*)" all file)
4877 (string-append "@image{matplotlib-figures/" file)))
4878 (symlink (string-append html "/_images")
4879 "./matplotlib-figures")
4880 (invoke "makeinfo" "--no-split"
4881 "-o" "matplotlib.info" "matplotlib.texi"))
4882 (install-file "build/texinfo/matplotlib.info" info))
4883 #t)))))
4884 (home-page (package-home-page python-matplotlib))
4885 (synopsis "Documentation for the python-matplotlib package")
4886 (description (package-description python-matplotlib))
4887 (license (package-license python-matplotlib))))
4888
4889 (define-public python2-matplotlib-documentation
4890 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4891 (package
4892 (inherit parent)
4893 (native-inputs
4894 (alist-delete "python-sphinx-copybutton"
4895 (package-native-inputs parent))))))
4896
4897 (define-public python-matplotlib-venn
4898 (package
4899 (name "python-matplotlib-venn")
4900 (version "0.11.5")
4901 (source
4902 (origin
4903 (method url-fetch)
4904 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4905 (sha256
4906 (base32
4907 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4908 (build-system python-build-system)
4909 (arguments '(#:tests? #f)) ; tests are not included
4910 (propagated-inputs
4911 `(("python-matplotlib" ,python-matplotlib)
4912 ("python-numpy" ,python-numpy)
4913 ("python-scipy" ,python-scipy)))
4914 (native-inputs
4915 `(("unzip" ,unzip)))
4916 (home-page "https://github.com/konstantint/matplotlib-venn")
4917 (synopsis "Plot area-proportional Venn diagrams")
4918 (description
4919 "This package provides tools for plotting area-proportional two- and
4920 three-way Venn diagrams in @code{matplotlib}.")
4921 (license license:expat)))
4922
4923 (define-public python-pysnptools
4924 (package
4925 (name "python-pysnptools")
4926 (version "0.4.11")
4927 (source
4928 (origin
4929 (method url-fetch)
4930 (uri (pypi-uri "pysnptools" version))
4931 (sha256
4932 (base32
4933 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
4934 (build-system python-build-system)
4935 (arguments
4936 `(#:tests? #f ; no test data are included
4937 #:phases
4938 (modify-phases %standard-phases
4939 (replace 'check
4940 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4941 (if tests?
4942 (begin
4943 (add-installed-pythonpath inputs outputs)
4944 (invoke "python3" "pysnptools/test.py"))
4945 #t))))))
4946 (propagated-inputs
4947 `(("python-dill" ,python-dill)
4948 ("python-h5py" ,python-h5py)
4949 ("python-numpy" ,python-numpy)
4950 ("python-pandas" ,python-pandas)
4951 ("python-psutil" ,python-psutil)
4952 ("python-scipy" ,python-scipy)))
4953 (native-inputs
4954 `(("python-cython" ,python-cython)))
4955 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4956 (synopsis "Library for reading and manipulating genetic data")
4957 (description
4958 "PySnpTools is a library for reading and manipulating genetic data. It
4959 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4960 those files. It can also efficiently manipulate ranges of integers using set
4961 operators such as union, intersection, and difference.")
4962 (license license:asl2.0)))
4963
4964 (define-public python2-pysnptools
4965 (package-with-python2 python-pysnptools))
4966
4967 (define-public python-socksipy-branch
4968 (package
4969 (name "python-socksipy-branch")
4970 (version "1.01")
4971 (source
4972 (origin
4973 (method url-fetch)
4974 (uri (pypi-uri "SocksiPy-branch" version))
4975 (sha256
4976 (base32
4977 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4978 (build-system python-build-system)
4979 (arguments
4980 `(#:tests? #f)) ; There are no tests
4981 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4982 (synopsis "Python SOCKS module")
4983 (description
4984 "SocksiPy - A Python SOCKS client module. It provides a
4985 socket-like interface that supports connections to any TCP
4986 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4987 The original version was developed by Dan Haim, this is a
4988 branch created by Mario Vilas to address some open issues,
4989 as the original project seems to have been abandoned circa 2007.")
4990 (license license:bsd-3)))
4991
4992 (define-public python2-socksipy-branch
4993 (package-with-python2 python-socksipy-branch))
4994
4995 (define-public python-socksipychain
4996 (package
4997 (name "python-socksipychain")
4998 (version "2.1.2")
4999 (source
5000 (origin
5001 (method git-fetch)
5002 (uri (git-reference
5003 (url "https://github.com/pagekite/PySocksipyChain.git")
5004 (commit (string-append "v" version))))
5005 (file-name (git-file-name name version))
5006 (sha256
5007 (base32
5008 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5009 (build-system python-build-system)
5010 (arguments
5011 `(#:tests? #f)) ; Tests try to access the network.
5012 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5013 (synopsis "Python SOCKS module with chained proxies support")
5014 (description
5015 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5016 adds support for arbitrary chaining of proxy servers and various modes of
5017 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5018 a simple netcat replacement with chaining support.")
5019 (license license:bsd-3)))
5020
5021 (define-public python-pycodestyle
5022 (package
5023 (name "python-pycodestyle")
5024 (version "2.6.0")
5025 (source
5026 (origin
5027 (method url-fetch)
5028 (uri (pypi-uri "pycodestyle" version))
5029 (sha256
5030 (base32
5031 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5032 (build-system python-build-system)
5033 (arguments
5034 `(#:phases
5035 (modify-phases %standard-phases
5036 (replace 'check
5037 (lambda _
5038 (invoke "pytest" "-vv"))))))
5039 (native-inputs
5040 `(("python-pytest" ,python-pytest)))
5041 (home-page "https://pycodestyle.readthedocs.io/")
5042 (synopsis "Python style guide checker")
5043 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5044 Python code against some of the style conventions in
5045 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5046 (license license:expat)))
5047
5048 (define-public python2-pycodestyle
5049 (package-with-python2 python-pycodestyle))
5050
5051 (define-public python-multidict
5052 (package
5053 (name "python-multidict")
5054 (version "4.7.5")
5055 (source
5056 (origin
5057 (method url-fetch)
5058 (uri (pypi-uri "multidict" version))
5059 (sha256
5060 (base32
5061 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5062 (build-system python-build-system)
5063 (arguments
5064 '(#:modules ((ice-9 ftw)
5065 (srfi srfi-1)
5066 (srfi srfi-26)
5067 (guix build utils)
5068 (guix build python-build-system))
5069 #:phases (modify-phases %standard-phases
5070 (replace 'check
5071 (lambda* (#:key tests? #:allow-other-keys)
5072 (if tests?
5073 (begin
5074 (let ((libdir (find (cut string-prefix? "lib." <>)
5075 (scandir "build"))))
5076 (setenv "PYTHONPATH"
5077 (string-append "./build/" libdir ":"
5078 (getenv "PYTHONPATH")))
5079 (invoke "pytest" "-vv")))
5080 (format #t "test suite not run~%"))
5081 #t)))))
5082 (native-inputs
5083 `(("python-pytest" ,python-pytest)
5084 ("python-pytest-cov" ,python-pytest-cov)))
5085 (home-page "https://github.com/aio-libs/multidict/")
5086 (synopsis "Multidict implementation")
5087 (description "Multidict is dict-like collection of key-value pairs
5088 where key might be occurred more than once in the container.")
5089 (license license:asl2.0)))
5090
5091 (define-public python-orderedmultidict
5092 (package
5093 (name "python-orderedmultidict")
5094 (version "1.0")
5095 (source
5096 (origin
5097 (method url-fetch)
5098 (uri (pypi-uri "orderedmultidict" version))
5099 (sha256
5100 (base32
5101 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5102 (build-system python-build-system)
5103 (arguments
5104 `(#:phases
5105 (modify-phases %standard-phases
5106 (add-after 'unpack 'fix-tests
5107 (lambda _
5108 ;; The package uses nosetest for running the tests.
5109 ;; Adding this initfile allows to run the test suite
5110 ;; without requiring nosetest.
5111 (with-output-to-file "tests/__init__.py" newline)
5112 #t)))))
5113 (propagated-inputs
5114 `(("python-six" ,python-six)))
5115 (native-inputs
5116 `(("python-pycodestyle" ,python-pycodestyle)))
5117 (home-page "https://github.com/gruns/orderedmultidict")
5118 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5119 (description "This package contains a library for ordered multivalue
5120 dictionaries. A multivalue dictionary is a dictionary that can store
5121 multiple values for the same key. An ordered multivalue dictionary is a
5122 multivalue dictionary that retains the order of insertions and deletions.")
5123 (license license:unlicense)))
5124
5125 (define-public python2-orderedmultidict
5126 (package-with-python2 python-orderedmultidict))
5127
5128 (define-public python-autopep8
5129 (package
5130 (name "python-autopep8")
5131 (version "1.5.3")
5132 (source
5133 (origin
5134 (method url-fetch)
5135 (uri (pypi-uri "autopep8" version))
5136 (sha256
5137 (base32
5138 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5139 (build-system python-build-system)
5140 (propagated-inputs
5141 `(("python-pycodestyle" ,python-pycodestyle)
5142 ("python-toml" ,python-toml)))
5143 (home-page "https://github.com/hhatto/autopep8")
5144 (synopsis "Format Python code according to the PEP 8 style guide")
5145 (description
5146 "@code{autopep8} automatically formats Python code to conform to
5147 the PEP 8 style guide. It uses the pycodestyle utility to determine
5148 what parts of the code needs to be formatted. @code{autopep8} is
5149 capable of fixing most of the formatting issues that can be reported
5150 by pycodestyle.")
5151 (license (license:non-copyleft
5152 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5153
5154 (define-public python2-autopep8
5155 (package-with-python2 python-autopep8))
5156
5157 (define-public python-distlib
5158 (package
5159 (name "python-distlib")
5160 (version "0.3.0")
5161 (source
5162 (origin
5163 (method url-fetch)
5164 (uri (pypi-uri "distlib" version ".zip"))
5165 (sha256
5166 (base32
5167 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5168 (build-system python-build-system)
5169 (arguments
5170 `(#:phases
5171 (modify-phases %standard-phases
5172 (add-before 'build 'no-/bin/sh
5173 (lambda _
5174 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5175 (("/bin/sh") (which "sh")))
5176 #t))
5177 (add-before 'check 'prepare-test-env
5178 (lambda _
5179 (setenv "HOME" "/tmp")
5180 ;; NOTE: Any value works, the variable just has to be present.
5181 (setenv "SKIP_ONLINE" "1")
5182 #t)))))
5183 (native-inputs `(("unzip" ,unzip)))
5184 (home-page "https://bitbucket.org/pypa/distlib")
5185 (synopsis "Distribution utilities")
5186 (description "Distlib is a library which implements low-level functions that
5187 relate to packaging and distribution of Python software. It is intended to be
5188 used as the basis for third-party packaging tools.")
5189 (license license:psfl)))
5190
5191 (define-public python-distutils-extra
5192 (package
5193 (name "python-distutils-extra")
5194 (version "2.38")
5195 (source
5196 (origin
5197 (method url-fetch)
5198 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5199 version "/+download/python-distutils-extra-"
5200 version ".tar.gz"))
5201 (sha256
5202 (base32
5203 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5204 (build-system python-build-system)
5205 (home-page "https://launchpad.net/python-distutils-extra/")
5206 (synopsis "Enhancements to Python's distutils")
5207 (description
5208 "The python-distutils-extra module enables you to easily integrate
5209 gettext support, themed icons, and scrollkeeper-based documentation into
5210 Python's distutils.")
5211 (license license:gpl2)))
5212
5213 (define-public python2-distutils-extra
5214 (package-with-python2 python-distutils-extra))
5215
5216 (define-public python2-elib.intl
5217 (package
5218 (name "python2-elib.intl")
5219 (version "0.0.3")
5220 (source
5221 (origin
5222 ;; This project doesn't tag releases or publish tarballs, so we take
5223 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5224 (method git-fetch)
5225 (uri (git-reference
5226 (url "https://github.com/dieterv/elib.intl.git")
5227 (commit "d09997cfef")))
5228 (file-name (string-append name "-" version "-checkout"))
5229 (sha256
5230 (base32
5231 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5232 (build-system python-build-system)
5233 (arguments
5234 ;; incompatible with Python 3 (exception syntax)
5235 `(#:python ,python-2
5236 #:tests? #f))
5237 (home-page "https://github.com/dieterv/elib.intl")
5238 (synopsis "Enhanced internationalization for Python")
5239 (description
5240 "The elib.intl module provides enhanced internationalization (I18N)
5241 services for your Python modules and applications.")
5242 (license license:lgpl3+)))
5243
5244 (define-public python-olefile
5245 (package
5246 (name "python-olefile")
5247 (version "0.46")
5248 (source
5249 (origin
5250 (method url-fetch)
5251 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5252 "download/v" version "/olefile-" version ".tar.gz"))
5253 (file-name (string-append name "-" version ".tar.gz"))
5254 (sha256
5255 (base32
5256 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5257 (build-system python-build-system)
5258 (home-page "https://www.decalage.info/python/olefileio")
5259 (synopsis "Read and write Microsoft OLE2 files.")
5260 (description
5261 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5262 Storage or Compound Document, Microsoft Office). It is an improved version of
5263 the OleFileIO module from PIL, the Python Image Library.")
5264 (license license:bsd-3)))
5265
5266 (define-public python2-olefile
5267 (package-with-python2 python-olefile))
5268
5269 (define-public python-pillow
5270 (package
5271 (name "python-pillow")
5272 (version "6.2.1")
5273 (source
5274 (origin
5275 (method url-fetch)
5276 (uri (pypi-uri "Pillow" version))
5277 (sha256
5278 (base32
5279 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5280 (build-system python-build-system)
5281 (native-inputs
5282 `(("python-pytest" ,python-pytest)))
5283 (inputs
5284 `(("freetype" ,freetype)
5285 ("lcms" ,lcms)
5286 ("libjpeg" ,libjpeg-turbo)
5287 ("libtiff" ,libtiff)
5288 ("libwebp" ,libwebp)
5289 ("openjpeg" ,openjpeg)
5290 ("zlib" ,zlib)))
5291 (propagated-inputs
5292 `(("python-olefile" ,python-olefile)))
5293 (arguments
5294 `(#:phases
5295 (modify-phases %standard-phases
5296 (add-after 'unpack 'patch-ldconfig
5297 (lambda _
5298 (substitute* "setup.py"
5299 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5300 (replace 'check
5301 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5302 (if tests?
5303 (begin
5304 (setenv "HOME" (getcwd))
5305 ;; Make installed package available for running the tests.
5306 (add-installed-pythonpath inputs outputs)
5307 (invoke "python" "selftest.py" "--installed")
5308 (invoke "python" "-m" "pytest" "-vv"))
5309 #t))))))
5310 (home-page "https://python-pillow.org")
5311 (synopsis "Fork of the Python Imaging Library")
5312 (description
5313 "The Python Imaging Library adds image processing capabilities to your
5314 Python interpreter. This library provides extensive file format support, an
5315 efficient internal representation, and fairly powerful image processing
5316 capabilities. The core image library is designed for fast access to data
5317 stored in a few basic pixel formats. It should provide a solid foundation for
5318 a general image processing tool.")
5319 (license (license:x11-style
5320 "http://www.pythonware.com/products/pil/license.htm"
5321 "The PIL Software License"))))
5322
5323 (define-public python2-pillow
5324 (package-with-python2 python-pillow))
5325
5326 (define-public python-roifile
5327 (package
5328 (name "python-roifile")
5329 (version "2020.5.28")
5330 (source
5331 (origin
5332 (method url-fetch)
5333 (uri (pypi-uri "roifile" version))
5334 (sha256
5335 (base32
5336 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5337 (build-system python-build-system)
5338 (arguments `(#:tests? #f)) ; there are none
5339 (propagated-inputs
5340 `(("python-numpy" ,python-numpy)))
5341 (home-page "https://www.lfd.uci.edu/~gohlke/")
5342 (synopsis "Read and write ImageJ ROI format")
5343 (description "Roifile is a Python library to read, write, create, and plot
5344 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5345 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5346 (license license:bsd-3)))
5347
5348 (define-public python-tifffile
5349 (package
5350 (name "python-tifffile")
5351 (version "2020.6.3")
5352 (source
5353 (origin
5354 (method url-fetch)
5355 (uri (pypi-uri "tifffile" version))
5356 (sha256
5357 (base32
5358 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5359 (build-system python-build-system)
5360 ;; Tests require lfdfiles, which depends on tifffile
5361 (arguments `(#:tests? #f))
5362 (propagated-inputs
5363 `(("python-numpy" ,python-numpy)
5364 ;;("python-lfdfiles" ,python-lfdfiles)
5365 ("python-roifile" ,python-roifile)))
5366 (home-page "https://www.lfd.uci.edu/~gohlke/")
5367 (synopsis "Read and write TIFF(r) files")
5368 (description "This package lets you read image and metadata from many
5369 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5370 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5371 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5372 (license license:bsd-3)))
5373
5374 (define-public python-lfdfiles
5375 (package
5376 (name "python-lfdfiles")
5377 (version "2020.1.1")
5378 (source
5379 (origin
5380 (method url-fetch)
5381 (uri (pypi-uri "lfdfiles" version))
5382 (sha256
5383 (base32
5384 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5385 (build-system python-build-system)
5386 (propagated-inputs
5387 `(("python-click" ,python-click)
5388 ("python-numpy" ,python-numpy)
5389 ("python-tifffile" ,python-tifffile)))
5390 (home-page "https://www.lfd.uci.edu/~gohlke/")
5391 (synopsis "Work with LFD data files")
5392 (description
5393 "Lfdfiles is a Python library and console script for reading, writing,
5394 converting, and viewing many of the proprietary file formats used to store
5395 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5396 (license license:bsd-3)))
5397
5398 (define-public python-imageio
5399 (package
5400 (name "python-imageio")
5401 (version "2.8.0")
5402 (source
5403 (origin
5404 (method url-fetch)
5405 (uri (pypi-uri "imageio" version))
5406 (sha256
5407 (base32
5408 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5409 (build-system python-build-system)
5410 (arguments
5411 `(#:tests? #f ; many tests require online data
5412 #:phases
5413 (modify-phases %standard-phases
5414 (replace 'check
5415 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5416 (if tests?
5417 (begin
5418 ;; Make installed package available for running the tests.
5419 (add-installed-pythonpath inputs outputs)
5420 (invoke "pytest" "-vv"))
5421 #t))))))
5422 (propagated-inputs
5423 `(("python-numpy" ,python-numpy)
5424 ("python-pillow" ,python-pillow)
5425 ("python-psutil" ,python-psutil)))
5426 (native-inputs
5427 `(("python-pytest" ,python-pytest)))
5428 (home-page "https://github.com/imageio/imageio")
5429 (synopsis "Read and write image, video, scientific, and volumetric data formats")
5430 (description
5431 "This package provides a Python library for reading and writing a wide
5432 range of image, video, scientific, and volumetric data formats.")
5433 (license license:bsd-2)))
5434
5435 (define-public python-pycparser
5436 (package
5437 (name "python-pycparser")
5438 (version "2.20")
5439 (source
5440 (origin
5441 (method url-fetch)
5442 (uri (pypi-uri "pycparser" version))
5443 (sha256
5444 (base32
5445 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5446 (outputs '("out" "doc"))
5447 (build-system python-build-system)
5448 (native-inputs
5449 `(("pkg-config" ,pkg-config)))
5450 (arguments
5451 `(#:phases
5452 (modify-phases %standard-phases
5453 (replace 'check
5454 (lambda _
5455 (with-directory-excursion "tests"
5456 (invoke "python" "all_tests.py"))
5457 #t))
5458 (add-after 'install 'install-doc
5459 (lambda* (#:key outputs #:allow-other-keys)
5460 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5461 (doc (string-append data "/doc/" ,name "-" ,version))
5462 (examples (string-append doc "/examples")))
5463 (mkdir-p examples)
5464 (for-each (lambda (file)
5465 (copy-file (string-append "." file)
5466 (string-append doc file)))
5467 '("/README.rst" "/CHANGES" "/LICENSE"))
5468 (copy-recursively "examples" examples)
5469 #t))))))
5470 (home-page "https://github.com/eliben/pycparser")
5471 (synopsis "C parser in Python")
5472 (description
5473 "Pycparser is a complete parser of the C language, written in pure Python
5474 using the PLY parsing library. It parses C code into an AST and can serve as
5475 a front-end for C compilers or analysis tools.")
5476 (license license:bsd-3)))
5477
5478 (define-public python2-pycparser
5479 (package-with-python2 python-pycparser))
5480
5481 (define-public python-pywavelets
5482 (package
5483 (name "python-pywavelets")
5484 (version "1.1.1")
5485 (home-page "https://github.com/PyWavelets/pywt")
5486 (source (origin
5487 (method url-fetch)
5488 (uri (pypi-uri "PyWavelets" version))
5489 (sha256
5490 (base32
5491 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5492 (build-system python-build-system)
5493 (arguments
5494 '(#:modules ((ice-9 ftw)
5495 (srfi srfi-1)
5496 (srfi srfi-26)
5497 (guix build utils)
5498 (guix build python-build-system))
5499 #:phases
5500 (modify-phases %standard-phases
5501 (replace 'check
5502 (lambda _
5503 (let ((cwd (getcwd))
5504 (libdir (find (cut string-prefix? "lib." <>)
5505 (scandir "build"))))
5506 (with-directory-excursion (string-append cwd "/build/" libdir)
5507 (invoke "pytest" "-vv"))))))))
5508 (native-inputs
5509 `(("python-matplotlib" ,python-matplotlib) ;for tests
5510 ("python-pytest" ,python-pytest)))
5511 (propagated-inputs
5512 `(("python-numpy" ,python-numpy)))
5513 (synopsis "Wavelet transforms in Python")
5514 (description
5515 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5516 mathematical basis functions that are localized in both time and frequency.
5517 Wavelet transforms are time-frequency transforms employing wavelets. They are
5518 similar to Fourier transforms, the difference being that Fourier transforms are
5519 localized only in frequency instead of in time and frequency.")
5520 (license license:expat)))
5521
5522 (define-public python2-pywavelets
5523 (package-with-python2 python-pywavelets))
5524
5525 (define-public python-pywinrm
5526 (package
5527 (name "python-pywinrm")
5528 (version "0.4.1")
5529 (source
5530 (origin
5531 (method url-fetch)
5532 (uri (pypi-uri "pywinrm" version))
5533 (sha256
5534 (base32
5535 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5536 (build-system python-build-system)
5537 (propagated-inputs
5538 `(("python-six" ,python-six)
5539 ("python-requests_ntlm" ,python-requests_ntlm)
5540 ("python-xmltodict" ,python-xmltodict)
5541 ("python-kerberos" ,python-kerberos)))
5542 (native-inputs
5543 `(("python-mock" ,python-mock)
5544 ("python-pytest" ,python-pytest)))
5545 (home-page "https://github.com/diyan/pywinrm/")
5546 (synopsis
5547 "Python library for Windows Remote Management (WinRM)")
5548 (description
5549 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5550 service. It allows you to invoke commands on target Windows machines from
5551 any machine that can run Python.")
5552 (license license:expat)))
5553
5554 (define-public python-xcffib
5555 (package
5556 (name "python-xcffib")
5557 (version "0.6.0")
5558 (source
5559 (origin
5560 (method url-fetch)
5561 (uri (pypi-uri "xcffib" version))
5562 (sha256
5563 (base32
5564 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5565 (build-system python-build-system)
5566 (inputs
5567 `(("libxcb" ,libxcb)))
5568 (propagated-inputs
5569 `(("python-cffi" ,python-cffi) ; used at run time
5570 ("python-six" ,python-six)))
5571 (arguments
5572 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5573 #:tests? #f
5574 #:phases
5575 (modify-phases %standard-phases
5576 (add-after 'unpack 'fix-libxcb-path
5577 (lambda* (#:key inputs #:allow-other-keys)
5578 (let ((libxcb (assoc-ref inputs "libxcb")))
5579 (substitute* '("xcffib/__init__.py")
5580 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5581 #t)))
5582 (add-after 'install 'install-doc
5583 (lambda* (#:key outputs #:allow-other-keys)
5584 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5585 "/doc/" ,name "-" ,version)))
5586 (mkdir-p doc)
5587 (copy-file "README.md"
5588 (string-append doc "/README.md"))
5589 #t))))))
5590 (home-page "https://github.com/tych0/xcffib")
5591 (synopsis "XCB Python bindings")
5592 (description
5593 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5594 support for Python 3 and PyPy. It is based on cffi.")
5595 (license license:expat)))
5596
5597 (define-public python2-xcffib
5598 (package-with-python2 python-xcffib))
5599
5600 (define-public python-cairocffi
5601 (package
5602 (name "python-cairocffi")
5603 (version "0.9.0")
5604 (source
5605 (origin
5606 (method url-fetch)
5607 (uri (pypi-uri "cairocffi" version))
5608 (sha256
5609 (base32
5610 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5611 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5612 (build-system python-build-system)
5613 (outputs '("out" "doc"))
5614 (inputs
5615 `(("glib" ,glib)
5616 ("gtk+" ,gtk+)
5617 ("gdk-pixbuf" ,gdk-pixbuf)
5618 ("cairo" ,cairo)
5619 ("pango" ,pango)))
5620 (native-inputs
5621 `(("pkg-config" ,pkg-config)
5622 ("python-pytest" ,python-pytest)
5623 ("python-pytest-cov" ,python-pytest-cov)
5624 ("python-pytest-runner" ,python-pytest-runner)
5625 ("python-sphinx" ,python-sphinx)
5626 ("python-docutils" ,python-docutils)))
5627 (propagated-inputs
5628 `(("python-xcffib" ,python-xcffib))) ; used at run time
5629 (arguments
5630 `(#:phases
5631 (modify-phases %standard-phases
5632 (add-after 'unpack 'patch-paths
5633 (lambda* (#:key inputs outputs #:allow-other-keys)
5634 (substitute* (find-files "." "\\.py$")
5635 (("dlopen\\(ffi, 'cairo'")
5636 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5637 "/lib/libcairo.so.2'"))
5638 (("dlopen\\(ffi, 'gdk-3'")
5639 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5640 "/lib/libgtk-3.so.0'"))
5641 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5642 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5643 "/lib/libgdk_pixbuf-2.0.so.0'"))
5644 (("dlopen\\(ffi, 'glib-2.0'")
5645 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5646 "/lib/libglib-2.0.so.0'"))
5647 (("dlopen\\(ffi, 'gobject-2.0'")
5648 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5649 "/lib/libgobject-2.0.so.0'"))
5650 (("dlopen\\(ffi, 'pangocairo-1.0'")
5651 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5652 "/lib/libpangocairo-1.0.so.0'"))
5653 (("dlopen\\(ffi, 'pango-1.0'")
5654 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5655 "/lib/libpango-1.0.so.0'")))
5656 #t))
5657 (add-after 'install 'install-doc
5658 (lambda* (#:key inputs outputs #:allow-other-keys)
5659 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5660 (doc (string-append data "/doc/" ,name "-" ,version))
5661 (html (string-append doc "/html")))
5662 (setenv "LD_LIBRARY_PATH"
5663 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5664 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5665 (setenv "LANG" "en_US.UTF-8")
5666 (mkdir-p html)
5667 (for-each (lambda (file)
5668 (copy-file (string-append "." file)
5669 (string-append doc file)))
5670 '("/README.rst" "/CHANGES" "/LICENSE"))
5671 (system* "python" "setup.py" "build_sphinx")
5672 (copy-recursively "docs/_build/html" html)
5673 #t))))))
5674 (home-page "https://github.com/Kozea/cairocffi")
5675 (synopsis "Python bindings and object-oriented API for Cairo")
5676 (description
5677 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5678 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5679 graphics library with support for multiple backends including image buffers,
5680 PNG, PostScript, PDF, and SVG file output.")
5681 (license license:bsd-3)))
5682
5683 (define-public python2-cairocffi
5684 (package-with-python2 python-cairocffi))
5685
5686 (define-public python-decorator
5687 (package
5688 (name "python-decorator")
5689 (version "4.3.0")
5690 (source
5691 (origin
5692 (method url-fetch)
5693 (uri (pypi-uri "decorator" version))
5694 (sha256
5695 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5696 (build-system python-build-system)
5697 (home-page "https://pypi.org/project/decorator/")
5698 (synopsis "Python module to simplify usage of decorators")
5699 (description
5700 "The aim of the decorator module is to simplify the usage of decorators
5701 for the average programmer, and to popularize decorators usage giving examples
5702 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5703 etc. The core of this module is a decorator factory.")
5704 (license license:expat)))
5705
5706 (define-public python2-decorator
5707 (package-with-python2 python-decorator))
5708
5709 (define-public python-drmaa
5710 (package
5711 (name "python-drmaa")
5712 (version "0.7.7")
5713 (source
5714 (origin
5715 (method url-fetch)
5716 (uri (pypi-uri "drmaa" version))
5717 (sha256
5718 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5719 (build-system python-build-system)
5720 ;; The test suite requires libdrmaa which is provided by the cluster
5721 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5722 ;; should be set to the path of the libdrmaa library.
5723 (arguments '(#:tests? #f))
5724 (native-inputs
5725 `(("python-nose" ,python-nose)))
5726 (home-page "https://pypi.org/project/drmaa/")
5727 (synopsis "Python bindings for the DRMAA library")
5728 (description
5729 "A Python package for Distributed Resource Management (DRM) job
5730 submission and control. This package is an implementation of the DRMAA 1.0
5731 Python language binding specification.")
5732 (license license:bsd-3)))
5733
5734 (define-public python2-drmaa
5735 (package-with-python2 python-drmaa))
5736
5737 (define-public python-grako
5738 (package
5739 (name "python-grako")
5740 (version "3.99.9")
5741 (source
5742 (origin
5743 (method url-fetch)
5744 (uri
5745 (pypi-uri "grako" version ".zip"))
5746 (sha256
5747 (base32
5748 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5749 (build-system python-build-system)
5750 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5751 (native-inputs
5752 `(("unzip" ,unzip)
5753 ("python-pytest" ,python-pytest)
5754 ("python-pytest-runner" ,python-pytest-runner)))
5755 (home-page "https://bitbucket.org/neogeny/grako")
5756 (synopsis "EBNF parser generator")
5757 (description
5758 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5759 memoizing PEG/Packrat parser in Python.")
5760 (license license:bsd-3)))
5761
5762 (define-public python2-grako
5763 (package-with-python2 python-grako))
5764
5765 (define-public python-gridmap
5766 (package
5767 (name "python-gridmap")
5768 (version "0.14.0")
5769 (source
5770 (origin
5771 (method git-fetch)
5772 (uri (git-reference
5773 (url "https://github.com/pygridtools/gridmap.git")
5774 (commit (string-append "v" version))))
5775 (file-name (git-file-name name version))
5776 (sha256
5777 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
5778 (build-system python-build-system)
5779 (arguments
5780 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5781 (propagated-inputs
5782 `(("python-psutil" ,python-psutil)
5783 ("python-drmaa" ,python-drmaa)
5784 ("python-pyzmq" ,python-pyzmq)))
5785 (home-page "https://github.com/pygridtools/gridmap")
5786 (synopsis "Create jobs on a cluster directly from Python")
5787 (description
5788 "Gridmap is a Python package to allow you to easily create jobs on the
5789 cluster directly from Python. You can directly map Python functions onto the
5790 cluster without needing to write any wrapper code yourself.")
5791 (license license:gpl3+)))
5792
5793 (define-public python2-gridmap
5794 (package-with-python2 python-gridmap))
5795
5796 (define-public python-honcho
5797 (package
5798 (name "python-honcho")
5799 (version "1.0.1")
5800 (source
5801 (origin
5802 (method git-fetch)
5803 (uri (git-reference
5804 (url "https://github.com/nickstenning/honcho.git")
5805 (commit (string-append "v" version))))
5806 (file-name (git-file-name name version))
5807 (sha256
5808 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5809 (build-system python-build-system)
5810 (native-inputs
5811 `(("python-pytest" ,python-pytest)
5812 ("python-mock" ,python-mock)
5813 ("python-tox" ,python-tox)
5814 ("which" ,which))) ;for tests
5815 (propagated-inputs
5816 `(("python-jinja2" ,python-jinja2)))
5817 (arguments
5818 `(#:phases
5819 (modify-phases %standard-phases
5820 (delete 'check)
5821 (add-after 'install 'check
5822 (lambda* (#:key outputs inputs #:allow-other-keys)
5823 ;; fix honcho path in testsuite
5824 (substitute* "tests/conftest.py"
5825 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5826 "/bin/honcho" "'")))
5827 ;; It's easier to run tests after install.
5828 ;; Make installed package available for running the tests
5829 (add-installed-pythonpath inputs outputs)
5830 (invoke "py.test" "-v"))))))
5831 (home-page "https://github.com/nickstenning/honcho")
5832 (synopsis "Manage Procfile-based applications")
5833 (description
5834 "A Procfile is a file which describes how to run an application
5835 consisting of several processes. honcho starts all listed processes.
5836 The output of all running processes is collected by honcho and
5837 displayed.")
5838 (license license:expat)))
5839
5840 (define-public python2-honcho
5841 (package-with-python2 python-honcho))
5842
5843 (define-public python-pexpect
5844 (package
5845 (name "python-pexpect")
5846 (version "4.8.0")
5847 (source
5848 (origin
5849 (method url-fetch)
5850 (uri (pypi-uri "pexpect" version))
5851 (sha256
5852 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
5853 (build-system python-build-system)
5854 (arguments
5855 `(#:phases
5856 (modify-phases %standard-phases
5857 (add-before 'check 'prepare-tests
5858 (lambda _
5859 (substitute* (find-files "tests")
5860 (("/bin/ls") (which "ls"))
5861 (("/bin/echo") (which "echo"))
5862 (("/bin/which") (which "which"))
5863 ;; Many tests try to use the /bin directory which
5864 ;; is not present in the build environment.
5865 ;; Use one that's non-empty and unlikely to change.
5866 (("/bin'") "/dev'")
5867 ;; Disable failing test. See upstream bug report
5868 ;; https://github.com/pexpect/pexpect/issues/568
5869 (("def test_bash") "def _test_bash"))
5870 ;; XXX: Socket connection test gets "Connection reset by peer".
5871 ;; Why does it not work? Delete for now.
5872 (delete-file "tests/test_socket.py")
5873 #t))
5874 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5875 (native-inputs
5876 `(("python-nose" ,python-nose)
5877 ("python-pytest" ,python-pytest)
5878 ("man-db" ,man-db)
5879 ("which" ,which)
5880 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5881 (propagated-inputs
5882 `(("python-ptyprocess" ,python-ptyprocess)))
5883 (home-page "http://pexpect.readthedocs.org/")
5884 (synopsis "Controlling interactive console applications")
5885 (description
5886 "Pexpect is a pure Python module for spawning child applications;
5887 controlling them; and responding to expected patterns in their output.
5888 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5889 child application and control it as if a human were typing commands.")
5890 (license license:isc)))
5891
5892 (define-public python2-pexpect
5893 (package-with-python2 python-pexpect))
5894
5895 (define-public python-setuptools-scm
5896 (package
5897 (name "python-setuptools-scm")
5898 (version "3.4.3")
5899 (source (origin
5900 (method url-fetch)
5901 (uri (pypi-uri "setuptools_scm" version))
5902 (sha256
5903 (base32
5904 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
5905 (build-system python-build-system)
5906 (home-page "https://github.com/pypa/setuptools_scm/")
5907 (synopsis "Manage Python package versions in SCM metadata")
5908 (description
5909 "Setuptools_scm handles managing your Python package versions in
5910 @dfn{software configuration management} (SCM) metadata instead of declaring
5911 them as the version argument or in a SCM managed file.")
5912 (license license:expat)))
5913
5914 (define-public python2-setuptools-scm
5915 (package-with-python2 python-setuptools-scm))
5916
5917 (define-public python-sexpdata
5918 (package
5919 (name "python-sexpdata")
5920 (version "0.0.3")
5921 (source
5922 (origin
5923 (method url-fetch)
5924 (uri (pypi-uri "sexpdata" version))
5925 (sha256
5926 (base32
5927 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
5928 (build-system python-build-system)
5929 (home-page "https://github.com/jd-boyd/sexpdata")
5930 (synopsis "S-expression parser for Python")
5931 (description
5932 "Sexpdata is an S-expression parser/serializer. It has load and dump
5933 functions like pickle, json or PyYAML module.")
5934 (license license:bsd-3)))
5935
5936 (define-public python-pathlib2
5937 (package
5938 (name "python-pathlib2")
5939 (version "2.3.3")
5940 (source
5941 (origin
5942 (method url-fetch)
5943 (uri (pypi-uri "pathlib2" version))
5944 (sha256
5945 (base32
5946 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5947 (build-system python-build-system)
5948 (propagated-inputs
5949 `(("python-scandir" ,python-scandir)
5950 ("python-six" ,python-six)))
5951 (home-page "https://pypi.org/project/pathlib2/")
5952 (synopsis "Object-oriented file system paths")
5953 (description "The goal of pathlib2 is to provide a backport of the
5954 standard @code{pathlib} module which tracks the standard library module, so
5955 all the newest features of the standard @code{pathlib} can be used also on
5956 older Python versions.")
5957 (license license:expat)))
5958
5959 (define-public python2-importlib-resources
5960 (package
5961 (name "python2-importlib-resources")
5962 (version "1.0.2")
5963 (source (origin
5964 (method url-fetch)
5965 (uri (pypi-uri "importlib_resources" version))
5966 (sha256
5967 (base32
5968 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5969 (build-system python-build-system)
5970 (arguments
5971 `(#:python ,python-2
5972 #:phases (modify-phases %standard-phases
5973 ;; The build system tests for python-wheel, but it is
5974 ;; not required for Guix nor the test suite. Just drop
5975 ;; it to make bootstrapping pytest easier.
5976 (add-after 'unpack 'drop-wheel-dependency
5977 (lambda _
5978 (substitute* "setup.cfg"
5979 (("^[[:blank:]]+wheel")
5980 ""))
5981 #t)))))
5982 (propagated-inputs
5983 `(("python-pathlib2" ,python2-pathlib2)
5984 ("python-typing" ,python2-typing)))
5985 (home-page "https://gitlab.com/python-devs/importlib_resources")
5986 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5987 (description
5988 "This package provides an implementation of @code{importlib.resources}
5989 for older versions of Python.")
5990 (license license:asl2.0)))
5991
5992 ;; For importlib-metadata-bootstrap below.
5993 (define-public python2-importlib-resources-bootstrap
5994 (hidden-package
5995 (package/inherit
5996 python2-importlib-resources
5997 (name "python2-importlib-resources-bootstrap")
5998 (propagated-inputs
5999 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6000 ("python-typing" ,python2-typing))))))
6001
6002 (define-public python-importlib-metadata
6003 (package
6004 (name "python-importlib-metadata")
6005 (version "1.5.0")
6006 (source
6007 (origin
6008 (method url-fetch)
6009 (uri (pypi-uri "importlib_metadata" version))
6010 (sha256
6011 (base32
6012 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6013 (build-system python-build-system)
6014 (propagated-inputs
6015 `(("python-zipp" ,python-zipp)))
6016 (native-inputs
6017 `(("python-setuptools-scm" ,python-setuptools-scm)
6018 ("python-pyfakefs" ,python-pyfakefs)
6019 ("python-packaging" ,python-packaging)))
6020 (home-page "https://importlib-metadata.readthedocs.io/")
6021 (synopsis "Read metadata from Python packages")
6022 (description
6023 "@code{importlib_metadata} is a library which provides an API for
6024 accessing an installed Python package's metadata, such as its entry points or
6025 its top-level name. This functionality intends to replace most uses of
6026 @code{pkg_resources} entry point API and metadata API. Along with
6027 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6028 need to use the older and less efficient @code{pkg_resources} package.")
6029 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6030 (license license:asl2.0)))
6031
6032 (define-public python2-importlib-metadata
6033 (let ((base (package-with-python2 (strip-python2-variant
6034 python-importlib-metadata))))
6035 (package/inherit
6036 base
6037 (name "python2-importlib-metadata")
6038 (native-inputs
6039 `(("python-setuptools-scm" ,python2-setuptools-scm)
6040 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6041 ("python-packaging" ,python2-packaging-bootstrap)))
6042 (propagated-inputs
6043 `(("python-configparser" ,python2-configparser)
6044 ("python-contextlib2" ,python2-contextlib2)
6045 ("python-importlib-resources" ,python2-importlib-resources)
6046 ("python-pathlib2" ,python2-pathlib2)
6047 ,@(package-propagated-inputs base))))))
6048
6049 ;; This package is used by python2-pytest, and thus must not depend on it.
6050 (define-public python2-importlib-metadata-bootstrap
6051 (hidden-package
6052 (package/inherit
6053 python2-importlib-metadata
6054 (name "python2-importlib-metadata-bootstrap")
6055 (arguments
6056 `(#:tests? #f
6057 ,@(package-arguments python2-importlib-metadata)))
6058 (propagated-inputs
6059 `(("python-zipp" ,python2-zipp-bootstrap)
6060 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6061 ("python-configparser" ,python2-configparser)
6062 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6063 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6064
6065 (define-public python-importmagic
6066 (package
6067 (name "python-importmagic")
6068 (version "0.1.7")
6069 (source
6070 (origin
6071 (method url-fetch)
6072 (uri (pypi-uri "importmagic" version))
6073 (sha256
6074 (base32
6075 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6076 (build-system python-build-system)
6077 (home-page "https://github.com/alecthomas/importmagic")
6078 (synopsis "Library for adding, removing and managing Python imports")
6079 (description
6080 "Importmagic is a Python library for automatically managing imports by
6081 finding unresolved symbols in Python code and their corresponding imports.")
6082 (license license:bsd-3)))
6083
6084 (define-public python-jaraco-packaging
6085 (package
6086 (name "python-jaraco-packaging")
6087 (version "6.1")
6088 (source
6089 (origin
6090 (method url-fetch)
6091 (uri (pypi-uri "jaraco.packaging" version))
6092 (sha256
6093 (base32
6094 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6095 (build-system python-build-system)
6096 (propagated-inputs
6097 `(("python-pytest" ,python-pytest)
6098 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6099 ("python-pytest-flake8" ,python-pytest-flake8)
6100 ("python-rst.linker" ,python-rst.linker)
6101 ("python-setuptools" ,python-setuptools)
6102 ("python-setuptools-scm" ,python-setuptools-scm)
6103 ("python-six" ,python-six)
6104 ("python-sphinx" ,python-sphinx)))
6105 (home-page "https://github.com/jaraco/jaraco.packaging")
6106 (synopsis "Tools to supplement packaging Python releases")
6107 (description
6108 "This package provides various tools to supplement packaging Python
6109 releases.")
6110 (license license:expat)))
6111
6112 (define-public python-pathpy
6113 (package
6114 (name "python-pathpy")
6115 (version "11.5.1")
6116 (source
6117 (origin
6118 (method url-fetch)
6119 (uri (pypi-uri "path.py" version))
6120 (sha256
6121 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6122 (outputs '("out" "doc"))
6123 (build-system python-build-system)
6124 (propagated-inputs
6125 `(("python-appdirs" ,python-appdirs)
6126 ("python-importlib-metadata" ,python-importlib-metadata)))
6127 (native-inputs
6128 `(("python-setuptools-scm" ,python-setuptools-scm)
6129 ("python-sphinx" ,python-sphinx)
6130 ("python-rst.linker" ,python-rst.linker)
6131 ("python-pytest" ,python-pytest)
6132 ("python-pytest-runner" ,python-pytest-runner)
6133 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6134 (arguments
6135 `(#:phases
6136 (modify-phases %standard-phases
6137 (add-after 'build 'build-doc
6138 (lambda _
6139 (setenv "LANG" "en_US.UTF-8")
6140 (invoke "python" "setup.py" "build_sphinx")))
6141 (add-after 'install 'install-doc
6142 (lambda* (#:key outputs #:allow-other-keys)
6143 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6144 (doc (string-append data "/doc/" ,name "-" ,version))
6145 (html (string-append doc "/html")))
6146 (mkdir-p html)
6147 (for-each (lambda (file)
6148 (copy-file file (string-append doc "/" file)))
6149 '("README.rst" "CHANGES.rst"))
6150 (copy-recursively "build/sphinx/html" html)
6151 #t)))
6152 (replace 'check
6153 (lambda _
6154 ;; The import time test aborts if an import takes longer than
6155 ;; 100ms. It may very well take a little longer than that.
6156 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6157 (home-page "https://github.com/jaraco/path.py")
6158 (synopsis "Python module wrapper for built-in os.path")
6159 (description
6160 "@code{path.py} implements path objects as first-class entities, allowing
6161 common operations on files to be invoked on those path objects directly.")
6162 (license license:expat)))
6163
6164 (define-public python2-pathpy
6165 (package-with-python2 python-pathpy))
6166
6167 (define-public python-simplegeneric
6168 (package
6169 (name "python-simplegeneric")
6170 (version "0.8.1")
6171 (source
6172 (origin
6173 (method url-fetch)
6174 (uri (pypi-uri "simplegeneric" version ".zip"))
6175 (sha256
6176 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6177 (build-system python-build-system)
6178 (native-inputs
6179 `(("unzip" ,unzip)))
6180 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6181 (synopsis "Python module for simple generic functions")
6182 (description
6183 "The simplegeneric module lets you define simple single-dispatch generic
6184 functions, akin to Python’s built-in generic functions like @code{len()},
6185 @code{iter()} and so on. However, instead of using specially-named methods,
6186 these generic functions use simple lookup tables, akin to those used by
6187 e.g. @code{pickle.dump()} and other generic functions found in the Python
6188 standard library.")
6189 (license license:zpl2.1)))
6190
6191 (define-public python2-simplegeneric
6192 (package-with-python2 python-simplegeneric))
6193
6194 (define-public python-ipython-genutils
6195 ;; TODO: This package is retired, check if can be removed, see description.
6196 (package
6197 (name "python-ipython-genutils")
6198 (version "0.1.0")
6199 (source
6200 (origin
6201 (method url-fetch)
6202 (uri (pypi-uri "ipython_genutils" version))
6203 (sha256
6204 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6205 (build-system python-build-system)
6206 (arguments `(#:tests? #f)) ; no tests
6207 (home-page "https://ipython.org")
6208 (synopsis "Vestigial utilities from IPython")
6209 (description
6210 "This package provides retired utilities from IPython. No packages
6211 outside IPython/Jupyter should depend on it.
6212
6213 This package shouldn't exist. It contains some common utilities shared by
6214 Jupyter and IPython projects during The Big Split. As soon as possible, those
6215 packages will remove their dependency on this, and this package will go
6216 away.")
6217 (license license:bsd-3)))
6218
6219 (define-public python2-ipython-genutils
6220 (package-with-python2 python-ipython-genutils))
6221
6222 (define-public python-ipyparallel
6223 (package
6224 (name "python-ipyparallel")
6225 (version "6.2.4")
6226 (source
6227 (origin
6228 (method url-fetch)
6229 (uri (pypi-uri "ipyparallel" version))
6230 (sha256
6231 (base32
6232 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6233 (build-system python-build-system)
6234 (arguments
6235 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6236 #:phases
6237 (modify-phases %standard-phases
6238 (add-before 'check 'prepare-for-tests
6239 (lambda _
6240 (setenv "HOME" (getcwd))
6241 #t)))))
6242 (propagated-inputs
6243 `(("python-dateutil" ,python-dateutil)
6244 ("python-decorator" ,python-decorator)
6245 ("python-ipykernel" ,python-ipykernel)
6246 ("python-ipython" ,python-ipython)
6247 ("python-ipython-genutils" ,python-ipython-genutils)
6248 ("python-jupyter-client" ,python-jupyter-client)
6249 ("python-pyzmq" ,python-pyzmq)
6250 ("python-tornado" ,python-tornado)
6251 ("python-traitlets" ,python-traitlets)))
6252 (native-inputs
6253 `(("python-ipython" ,python-ipython)
6254 ("python-mock" ,python-mock)
6255 ("python-nose" ,python-nose)
6256 ("python-pytest" ,python-pytest)
6257 ("python-pytest-cov" ,python-pytest-cov)
6258 ("python-testpath" ,python-testpath)))
6259 (home-page "https://ipython.org/")
6260 (synopsis "Interactive Parallel Computing with IPython")
6261 (description
6262 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6263 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6264 CLI scripts:
6265 @enumerate
6266 @item ipcluster - start/stop a cluster
6267 @item ipcontroller - start a scheduler
6268 @item ipengine - start an engine
6269 @end enumerate")
6270 (license license:bsd-3)))
6271
6272 (define-public python2-ipyparallel
6273 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6274 (package
6275 (inherit ipyparallel)
6276 (propagated-inputs
6277 `(("python2-futures" ,python2-futures)
6278 ,@(package-propagated-inputs ipyparallel))))))
6279
6280 (define-public python-ipython-cluster-helper
6281 (package
6282 (name "python-ipython-cluster-helper")
6283 (version "0.6.4")
6284 (source
6285 (origin
6286 (method url-fetch)
6287 (uri (pypi-uri "ipython-cluster-helper" version))
6288 (sha256
6289 (base32
6290 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6291 (modules '((guix build utils)))
6292 (snippet
6293 '(begin (substitute* "requirements.txt"
6294 (("ipython.*") "ipython\n"))
6295 #t))))
6296 (build-system python-build-system)
6297 (arguments
6298 `(#:tests? #f ; Test suite can't find IPython.
6299 #:phases
6300 (modify-phases %standard-phases
6301 (replace 'check
6302 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6303 (if tests?
6304 (begin
6305 (setenv "HOME" (getcwd))
6306 (add-installed-pythonpath inputs outputs)
6307 (invoke "python" "example/example.py" "--local"))
6308 #t))))))
6309 (propagated-inputs
6310 `(("python-ipyparallel" ,python-ipyparallel)
6311 ("python-ipython" ,python-ipython)
6312 ("python-netifaces" ,python-netifaces)
6313 ("python-pyzmq" ,python-pyzmq)
6314 ("python-setuptools" ,python-setuptools)
6315 ("python-six" ,python-six)))
6316 (home-page "https://github.com/roryk/ipython-cluster-helper")
6317 (synopsis
6318 "Simplify IPython cluster start up and use for multiple schedulers")
6319 (description
6320 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6321 profile, launches a cluster and returns a view. On program exit it shuts the
6322 cluster down and deletes the throwaway profile.")
6323 (license license:expat)))
6324
6325 (define-public python2-ipython-cluster-helper
6326 (package-with-python2 python-ipython-cluster-helper))
6327
6328 (define-public python-traitlets
6329 (package
6330 (name "python-traitlets")
6331 (version "4.3.3")
6332 (source
6333 (origin
6334 (method url-fetch)
6335 (uri (pypi-uri "traitlets" version))
6336 (sha256
6337 (base32
6338 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6339 (build-system python-build-system)
6340 (arguments
6341 `(#:phases
6342 (modify-phases %standard-phases
6343 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6344 (propagated-inputs
6345 `(("python-ipython-genutils" ,python-ipython-genutils)
6346 ("python-decorator" ,python-decorator)))
6347 (native-inputs
6348 `(("python-pytest" ,python-pytest)))
6349 (properties `((python2-variant . ,(delay python2-traitlets))))
6350 (home-page "https://ipython.org")
6351 (synopsis "Configuration system for Python applications")
6352 (description
6353 "Traitlets is a framework that lets Python classes have attributes with
6354 type checking, dynamically calculated default values, and ‘on change’
6355 callbacks. The package also includes a mechanism to use traitlets for
6356 configuration, loading values from files or from command line arguments. This
6357 is a distinct layer on top of traitlets, so you can use traitlets in your code
6358 without using the configuration machinery.")
6359 (license license:bsd-3)))
6360
6361 (define-public python2-traitlets
6362 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6363 (package
6364 (inherit traitlets)
6365 (propagated-inputs
6366 `(("python2-enum34" ,python2-enum34)
6367 ,@(package-propagated-inputs traitlets))))))
6368
6369 (define-public python-jupyter-core
6370 (package
6371 (name "python-jupyter-core")
6372 (version "4.4.0")
6373 (source
6374 (origin
6375 (method url-fetch)
6376 (uri (string-append (pypi-uri "jupyter_core" version)))
6377 (sha256
6378 (base32
6379 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6380 (build-system python-build-system)
6381 ;; FIXME: not sure how to run the tests
6382 (arguments `(#:tests? #f))
6383 (propagated-inputs
6384 `(("python-traitlets" ,python-traitlets)))
6385 (home-page "http://jupyter.org/")
6386 (synopsis "Jupyter base package")
6387 (description
6388 "Jupyter core is the base package on which Jupyter projects rely.")
6389 (license license:bsd-3)))
6390
6391 (define-public python2-jupyter-core
6392 (package-with-python2 python-jupyter-core))
6393
6394 (define-public python-jupyter-client
6395 (package
6396 (name "python-jupyter-client")
6397 (version "5.2.4")
6398 (source
6399 (origin
6400 (method url-fetch)
6401 (uri (pypi-uri "jupyter_client" version))
6402 (sha256
6403 (base32
6404 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6405 (build-system python-build-system)
6406 ;; Tests fail because of missing native python kernel which I assume is
6407 ;; provided by the ipython package, which we cannot use because it would
6408 ;; cause a dependency cycle.
6409 (arguments
6410 `(#:tests? #f
6411
6412 #:phases (modify-phases %standard-phases
6413 (add-after 'unpack 'set-tool-file-names
6414 (lambda* (#:key inputs #:allow-other-keys)
6415 (let ((iproute (assoc-ref inputs "iproute")))
6416 (substitute* "jupyter_client/localinterfaces.py"
6417 (("'ip'")
6418 (string-append "'" iproute "/sbin/ip'")))
6419 #t))))))
6420 (inputs
6421 `(("iproute" ,iproute)))
6422 (propagated-inputs
6423 `(("python-pyzmq" ,python-pyzmq)
6424 ("python-traitlets" ,python-traitlets)
6425 ("python-jupyter-core" ,python-jupyter-core)))
6426 (home-page "http://jupyter.org/")
6427 (synopsis "Jupyter protocol implementation and client libraries")
6428 (description
6429 "The @code{jupyter_client} package contains the reference implementation
6430 of the Jupyter protocol. It also provides client and kernel management APIs
6431 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6432 installing @code{kernelspec}s for use with Jupyter frontends.")
6433 (license license:bsd-3)))
6434
6435 (define-public python2-jupyter-client
6436 (package-with-python2 python-jupyter-client))
6437
6438 (define-public python-ipykernel
6439 (package
6440 (name "python-ipykernel")
6441 (version "5.1.3")
6442 (source
6443 (origin
6444 (method url-fetch)
6445 (uri (pypi-uri "ipykernel" version))
6446 (sha256
6447 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6448 (build-system python-build-system)
6449 (arguments
6450 `(#:phases
6451 (modify-phases %standard-phases
6452 (replace 'check
6453 (lambda _
6454 (setenv "HOME" "/tmp")
6455 (invoke "pytest" "-v")
6456 #t))
6457 (add-after 'install 'set-python-file-name
6458 (lambda* (#:key outputs #:allow-other-keys)
6459 ;; Record the absolute file name of the 'python' executable in
6460 ;; 'kernel.json'.
6461 (let ((out (assoc-ref outputs "out")))
6462 (substitute* (string-append out "/share/jupyter"
6463 "/kernels/python3/kernel.json")
6464 (("\"python\"")
6465 (string-append "\"" (which "python") "\"")))
6466 #t))))))
6467 (propagated-inputs
6468 `(("python-ipython" ,python-ipython)
6469 ;; imported at runtime during connect
6470 ("python-jupyter-client" ,python-jupyter-client)))
6471 (native-inputs
6472 `(("python-flaky" ,python-flaky)
6473 ("python-nose" ,python-nose)
6474 ("python-pytest" ,python-pytest)))
6475 (home-page "https://ipython.org")
6476 (synopsis "IPython Kernel for Jupyter")
6477 (description
6478 "This package provides the IPython kernel for Jupyter.")
6479 (properties `((python2-variant . ,(delay python2-ipykernel))))
6480 (license license:bsd-3)))
6481
6482 ;; Version 5.x and above no longer support Python 2.
6483 (define-public python2-ipykernel
6484 (package
6485 (name "python2-ipykernel")
6486 (version "4.10.1")
6487 (source
6488 (origin
6489 (method url-fetch)
6490 (uri (pypi-uri "ipykernel" version))
6491 (sha256
6492 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6493 (build-system python-build-system)
6494 (arguments
6495 `(#:python ,python-2))
6496 (propagated-inputs
6497 `(("python2-ipython" ,python2-ipython)
6498 ;; imported at runtime during connect
6499 ("python2-jupyter-client" ,python2-jupyter-client)
6500 ("python2-tornado" ,python2-tornado)
6501 ("python2-traitlets" ,python2-traitlets)))
6502 (native-inputs
6503 `(("python2-mock" ,python2-mock)
6504 ("python2-nose" ,python2-nose)
6505 ("python2-pytest" ,python2-pytest)
6506 ("python2-pytest-cov" ,python2-pytest-cov)))
6507 (home-page "https://ipython.org")
6508 (synopsis "IPython Kernel for Jupyter")
6509 (description
6510 "This package provides the IPython kernel for Jupyter.")
6511 (license license:bsd-3)))
6512
6513 (define-public python-pari-jupyter
6514 (package
6515 (name "python-pari-jupyter")
6516 (version "1.3.2")
6517 (source
6518 (origin
6519 (method url-fetch)
6520 (uri (pypi-uri "pari_jupyter" version))
6521 (sha256
6522 (base32
6523 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6524 (build-system python-build-system)
6525 (propagated-inputs
6526 `(("python-ipykernel" ,python-ipykernel)))
6527 (inputs
6528 `(("pari-gp" ,pari-gp)
6529 ("readline" ,readline)))
6530 (arguments
6531 `(#:tests? #f)) ; no test suite
6532 (home-page
6533 "https://github.com/jdemeyer/pari_jupyter")
6534 (synopsis "A Jupyter kernel for PARI/GP")
6535 (description "The package provides a PARI/GP kernel for Jupyter.")
6536 (license license:gpl3+)))
6537
6538 (define-public python-backcall
6539 (package
6540 (name "python-backcall")
6541 (version "0.1.0")
6542 (source
6543 (origin
6544 (method url-fetch)
6545 (uri (pypi-uri "backcall" version))
6546 (sha256
6547 (base32
6548 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
6549 (build-system python-build-system)
6550 (home-page "https://github.com/takluyver/backcall/")
6551 (synopsis "Specifications for callback functions passed in to an API")
6552 (description
6553 "If your code lets other people supply callback functions, it's important
6554 to specify the function signature you expect, and check that functions support
6555 that. Adding extra parameters later would break other peoples code unless
6556 you're careful. The @code{backcall} package provides a way of specifying the
6557 callback signature using a prototype function.")
6558 (license license:bsd-3)))
6559
6560 (define-public python-ipython
6561 (package
6562 (name "python-ipython")
6563 (version "7.9.0")
6564 (source
6565 (origin
6566 (method url-fetch)
6567 (uri (pypi-uri "ipython" version ".tar.gz"))
6568 (sha256
6569 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
6570 (build-system python-build-system)
6571 (propagated-inputs
6572 `(("python-backcall" ,python-backcall)
6573 ("python-pyzmq" ,python-pyzmq)
6574 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
6575 ("python-terminado" ,python-terminado)
6576 ("python-matplotlib" ,python-matplotlib)
6577 ("python-numpy" ,python-numpy)
6578 ("python-numpydoc" ,python-numpydoc)
6579 ("python-jedi" ,python-jedi)
6580 ("python-jinja2" ,python-jinja2)
6581 ("python-mistune" ,python-mistune)
6582 ("python-pexpect" ,python-pexpect)
6583 ("python-pickleshare" ,python-pickleshare)
6584 ("python-simplegeneric" ,python-simplegeneric)
6585 ("python-jsonschema" ,python-jsonschema)
6586 ("python-traitlets" ,python-traitlets)
6587 ("python-nbformat" ,python-nbformat)
6588 ("python-pygments" ,python-pygments)))
6589 (inputs
6590 `(("readline" ,readline)
6591 ("which" ,which)))
6592 (native-inputs
6593 `(("graphviz" ,graphviz)
6594 ("pkg-config" ,pkg-config)
6595 ("python-requests" ,python-requests) ;; for tests
6596 ("python-testpath" ,python-testpath)
6597 ("python-nose" ,python-nose)))
6598 (arguments
6599 `(#:phases
6600 (modify-phases %standard-phases
6601 (add-after 'unpack 'make-docs-reproducible
6602 (lambda _
6603 (substitute* "IPython/sphinxext/ipython_directive.py"
6604 ((".*import datetime") "")
6605 ((".*datetime.datetime.now\\(\\)") "")
6606 (("%timeit") "# %timeit"))
6607 #t))
6608 ;; Tests can only be run after the library has been installed and not
6609 ;; within the source directory.
6610 (delete 'check)
6611 (add-after 'install 'check
6612 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6613 (if tests?
6614 (begin
6615 ;; Make installed package available for running the tests
6616 (add-installed-pythonpath inputs outputs)
6617 (setenv "HOME" "/tmp/") ;; required by a test
6618 ;; We only test the core because one of the other tests
6619 ;; tries to import ipykernel.
6620 (invoke "python" "IPython/testing/iptest.py"
6621 "-v" "IPython/core/tests"))
6622 #t)))
6623 (add-before 'check 'fix-tests
6624 (lambda* (#:key inputs #:allow-other-keys)
6625 (substitute* "./IPython/utils/_process_posix.py"
6626 (("/usr/bin/env', 'which") (which "which")))
6627 (substitute* "./IPython/core/tests/test_inputtransformer.py"
6628 (("#!/usr/bin/env python")
6629 (string-append "#!" (which "python"))))
6630 ;; This test introduces a circular dependency on ipykernel
6631 ;; (which depends on ipython).
6632 (delete-file "IPython/core/tests/test_display.py")
6633 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
6634 (delete-file "IPython/core/tests/test_interactiveshell.py")
6635 #t)))))
6636 (home-page "https://ipython.org")
6637 (synopsis "IPython is a tool for interactive computing in Python")
6638 (description
6639 "IPython provides a rich architecture for interactive computing with:
6640 Powerful interactive shells, a browser-based notebook, support for interactive
6641 data visualization, embeddable interpreters and tools for parallel
6642 computing.")
6643 (properties `((python2-variant . ,(delay python2-ipython))))
6644 (license license:bsd-3)))
6645
6646 ;; This is the latest release of the LTS version of ipython with support for
6647 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
6648 ;; dropped support for Python 2.7.
6649 (define-public python2-ipython
6650 (package
6651 (name "python2-ipython")
6652 (version "5.8.0")
6653 (source
6654 (origin
6655 (method url-fetch)
6656 (uri (pypi-uri "ipython" version ".tar.gz"))
6657 (sha256
6658 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
6659 (build-system python-build-system)
6660 (propagated-inputs
6661 `(("python2-backports-shutil-get-terminal-size"
6662 ,python2-backports-shutil-get-terminal-size)
6663 ("python2-pathlib2" ,python2-pathlib2)
6664 ("python2-pyzmq" ,python2-pyzmq)
6665 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
6666 ("python2-terminado" ,python2-terminado)
6667 ("python2-matplotlib" ,python2-matplotlib)
6668 ("python2-numpy" ,python2-numpy)
6669 ("python2-numpydoc" ,python2-numpydoc)
6670 ("python2-jinja2" ,python2-jinja2)
6671 ("python2-mistune" ,python2-mistune)
6672 ("python2-pexpect" ,python2-pexpect)
6673 ("python2-pickleshare" ,python2-pickleshare)
6674 ("python2-simplegeneric" ,python2-simplegeneric)
6675 ("python2-jsonschema" ,python2-jsonschema)
6676 ("python2-traitlets" ,python2-traitlets)
6677 ("python2-nbformat" ,python2-nbformat)
6678 ("python2-pygments" ,python2-pygments)))
6679 (inputs
6680 `(("readline" ,readline)
6681 ("which" ,which)))
6682 (native-inputs
6683 `(("graphviz" ,graphviz)
6684 ("pkg-config" ,pkg-config)
6685 ("python2-requests" ,python2-requests) ;; for tests
6686 ("python2-testpath" ,python2-testpath)
6687 ("python2-mock" ,python2-mock)
6688 ("python2-nose" ,python2-nose)))
6689 (arguments
6690 `(#:python ,python-2
6691 #:phases
6692 (modify-phases %standard-phases
6693 (add-before 'check 'delete-broken-tests
6694 (lambda* (#:key inputs #:allow-other-keys)
6695 ;; These tests throw errors for unknown reasons.
6696 (delete-file "IPython/core/tests/test_displayhook.py")
6697 (delete-file "IPython/core/tests/test_magic_terminal.py")
6698 (delete-file "IPython/core/tests/test_profile.py")
6699 #t)))))
6700 (home-page "https://ipython.org")
6701 (synopsis "IPython is a tool for interactive computing in Python")
6702 (description
6703 "IPython provides a rich architecture for interactive computing with:
6704 Powerful interactive shells, a browser-based notebook, support for interactive
6705 data visualization, embeddable interpreters and tools for parallel
6706 computing.")
6707 (license license:bsd-3)))
6708
6709 (define-public python-ipython-documentation
6710 (package
6711 (inherit python-ipython)
6712 (name "python-ipython-documentation")
6713 (version (package-version python-ipython))
6714 (arguments
6715 `(#:phases
6716 (modify-phases %standard-phases
6717 (delete 'build)
6718 (delete 'check)
6719 (replace 'install
6720 (lambda* (#:key outputs #:allow-other-keys)
6721 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6722 (doc (string-append data "/doc/" ,name "-" ,version))
6723 (html (string-append doc "/html"))
6724 (man1 (string-append data "/man/man1"))
6725 (info (string-append data "/info"))
6726 (examples (string-append doc "/examples"))
6727 (python-arg (string-append "PYTHON=" (which "python"))))
6728 (setenv "LANG" "en_US.utf8")
6729 (with-directory-excursion "docs"
6730 ;; FIXME: pdf fails to build
6731 ;;(system* "make" "pdf" "PAPER=a4")
6732 (system* "make" python-arg "html")
6733 ;; FIXME: the generated texi file contains ^@^@, which trips
6734 ;; up the parser.
6735 ;; (system* "make" python-arg "info")
6736 )
6737 (copy-recursively "docs/man" man1)
6738 (copy-recursively "examples" examples)
6739 (copy-recursively "docs/build/html" html)
6740 ;; (copy-file "docs/build/latex/ipython.pdf"
6741 ;; (string-append doc "/ipython.pdf"))
6742 (mkdir-p info)
6743 ;; (copy-file "docs/build/texinfo/ipython.info"
6744 ;; (string-append info "/ipython.info"))
6745 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6746 #t)))))
6747 (inputs
6748 `(("python-ipython" ,python-ipython)
6749 ("python-ipykernel" ,python-ipykernel)))
6750 (native-inputs
6751 `(("python-sphinx" ,python-sphinx)
6752 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6753 ;; FIXME: It's possible that a smaller union would work just as well.
6754 ("texlive" ,(texlive-union (list texlive-amsfonts
6755 texlive-fonts-ec
6756 texlive-generic-ifxetex
6757 texlive-generic-pdftex
6758 texlive-latex-capt-of
6759 texlive-latex-cmap
6760 texlive-latex-environ
6761 texlive-latex-eqparbox
6762 texlive-latex-etoolbox
6763 texlive-latex-expdlist
6764 texlive-latex-fancyhdr
6765 texlive-latex-fancyvrb
6766 texlive-latex-fncychap
6767 texlive-latex-float
6768 texlive-latex-framed
6769 texlive-latex-geometry
6770 texlive-latex-graphics
6771 texlive-latex-hyperref
6772 texlive-latex-mdwtools
6773 texlive-latex-multirow
6774 texlive-latex-needspace
6775 texlive-latex-oberdiek
6776 texlive-latex-parskip
6777 texlive-latex-preview
6778 texlive-latex-tabulary
6779 texlive-latex-threeparttable
6780 texlive-latex-titlesec
6781 texlive-latex-trimspaces
6782 texlive-latex-ucs
6783 texlive-latex-upquote
6784 texlive-latex-url
6785 texlive-latex-varwidth
6786 texlive-latex-wrapfig)))
6787 ("texinfo" ,texinfo)))))
6788
6789 (define-public python-urwid
6790 (package
6791 (name "python-urwid")
6792 (version "2.1.0")
6793 (source
6794 (origin
6795 (method url-fetch)
6796 (uri (pypi-uri "urwid" version))
6797 (sha256
6798 (base32
6799 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
6800 (build-system python-build-system)
6801 (home-page "http://urwid.org")
6802 (synopsis "Console user interface library for Python")
6803 (description
6804 "Urwid is a curses-based UI/widget library for Python. It includes many
6805 features useful for text console applications.")
6806 (license license:lgpl2.1+)))
6807
6808 (define-public python2-urwid
6809 (package-with-python2 python-urwid))
6810
6811 (define-public python-urwidtrees
6812 (package
6813 (name "python-urwidtrees")
6814 (version "1.0.2")
6815 (source
6816 (origin
6817 (method git-fetch)
6818 ;; package author intends on distributing via github rather than pypi:
6819 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6820 (uri (git-reference
6821 (url "https://github.com/pazz/urwidtrees")
6822 (commit version)))
6823 (file-name (git-file-name name version))
6824 (sha256
6825 (base32
6826 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
6827 (build-system python-build-system)
6828 (arguments
6829 '(#:use-setuptools? #f
6830 #:tests? #f)) ; no tests
6831 (propagated-inputs `(("python-urwid" ,python-urwid)))
6832 (home-page "https://github.com/pazz/urwidtrees")
6833 (synopsis "Tree widgets for urwid")
6834 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6835 toolkit. Use it to build trees of widgets.")
6836 (license license:gpl3+)))
6837
6838 (define-public python2-urwidtrees
6839 (package-with-python2 python-urwidtrees))
6840
6841 (define-public python-ua-parser
6842 (package
6843 (name "python-ua-parser")
6844 (version "0.8.0")
6845 (source
6846 (origin
6847 (method url-fetch)
6848 (uri (pypi-uri "ua-parser" version))
6849 (sha256
6850 (base32
6851 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
6852 (build-system python-build-system)
6853 (arguments
6854 `(#:tests? #f)) ;no test suite in release
6855 (native-inputs
6856 `(("python-pyyaml" ,python-pyyaml)))
6857 (home-page "https://github.com/ua-parser/uap-python")
6858 (synopsis "User agent parser")
6859 (description
6860 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
6861 (license license:asl2.0)))
6862
6863 (define-public python2-ua-parser
6864 (package-with-python2 python-ua-parser))
6865
6866 (define-public python-user-agents
6867 (package
6868 (name "python-user-agents")
6869 (version "1.1.0")
6870 (source
6871 (origin
6872 (method url-fetch)
6873 (uri (pypi-uri "user-agents" version))
6874 (sha256
6875 (base32
6876 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
6877 (build-system python-build-system)
6878 (arguments
6879 `(#:tests? #f)) ;missing devices.json test file in release
6880 (propagated-inputs
6881 `(("python-ua-parser" ,python-ua-parser)))
6882 (home-page "https://github.com/selwin/python-user-agents")
6883 (synopsis "User Agent strings parsing library")
6884 (description
6885 "A library to identify devices (phones, tablets) and their capabilities by
6886 parsing (browser/HTTP) user agent strings.")
6887 (license license:expat)))
6888
6889 (define-public python2-user-agents
6890 (package-with-python2 python-user-agents))
6891
6892 (define-public python-dbus
6893 (package
6894 (name "python-dbus")
6895 (version "1.2.14")
6896 (source
6897 (origin
6898 (method url-fetch)
6899 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
6900 "dbus-python-" version ".tar.gz"))
6901 (sha256
6902 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
6903 (build-system gnu-build-system)
6904 (native-inputs
6905 `(("pkg-config" ,pkg-config)))
6906 (inputs
6907 `(("python" ,python-wrapper)
6908 ("dbus-glib" ,dbus-glib)))
6909 (synopsis "Python bindings for D-bus")
6910 (description "python-dbus provides bindings for libdbus, the reference
6911 implementation of D-Bus.")
6912 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
6913 (license license:expat)))
6914
6915 (define-public python2-dbus
6916 (package (inherit python-dbus)
6917 (name "python2-dbus")
6918 (inputs `(("python" ,python-2)
6919 ,@(alist-delete "python"
6920 (package-inputs python-dbus)
6921 equal?)))))
6922
6923 (define-public python-notify2
6924 (package
6925 (name "python-notify2")
6926 (version "0.3.1")
6927 (source
6928 (origin
6929 (method url-fetch)
6930 (uri (pypi-uri "notify2" version))
6931 (sha256
6932 (base32
6933 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
6934 (build-system python-build-system)
6935 (arguments `(#:tests? #f)) ; tests depend on system state
6936 (native-inputs
6937 `(("python-dbus" ,python-dbus)))
6938 (home-page "https://bitbucket.org/takluyver/pynotify2")
6939 (synopsis "Python interface to D-Bus notifications")
6940 (description
6941 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6942 It is a reimplementation of pynotify in pure Python, and an alternative to
6943 the GObject Introspection bindings to libnotify for non-GTK applications.")
6944 (license (list license:bsd-2
6945 license:lgpl2.1+))))
6946
6947 (define-public python2-notify2
6948 (package-with-python2 python-notify2))
6949
6950 ;; beautifulsoup4 has a totally different namespace than 3.x,
6951 ;; and pypi seems to put it under its own name, so I guess we should too
6952 (define-public python-beautifulsoup4
6953 (package
6954 (name "python-beautifulsoup4")
6955 (version "4.7.1")
6956 (source
6957 (origin
6958 (method url-fetch)
6959 (uri (pypi-uri "beautifulsoup4" version))
6960 (sha256
6961 (base32
6962 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
6963 (build-system python-build-system)
6964 (arguments
6965 `(#:phases
6966 (modify-phases %standard-phases
6967 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6968 ;; must use this conversion script when building with Python 3. The
6969 ;; conversion script also runs the tests.
6970 ;; For more information, see the file 'convert-py3k' in the source
6971 ;; distribution.
6972 (replace 'check
6973 (lambda _ (invoke "./convert-py3k"))))))
6974 (propagated-inputs
6975 `(("python-soupsieve" ,python-soupsieve)))
6976 (home-page
6977 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6978 (synopsis
6979 "Python screen-scraping library")
6980 (description
6981 "Beautiful Soup is a Python library designed for rapidly setting up
6982 screen-scraping projects. It offers Pythonic idioms for navigating,
6983 searching, and modifying a parse tree, providing a toolkit for
6984 dissecting a document and extracting what you need. It automatically
6985 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6986 (license license:expat)
6987 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6988
6989 (define-public python2-beautifulsoup4
6990 (package
6991 (inherit (package-with-python2
6992 (strip-python2-variant python-beautifulsoup4)))
6993 (arguments `(#:python ,python-2))))
6994
6995 (define-public python-soupsieve
6996 (package
6997 (name "python-soupsieve")
6998 (version "1.9.5")
6999 (source
7000 (origin
7001 (method url-fetch)
7002 (uri (pypi-uri "soupsieve" version))
7003 (sha256
7004 (base32
7005 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
7006 (build-system python-build-system)
7007 (arguments `(#:tests? #f))
7008 ;;XXX: 2 tests fail currently despite claming they were to be
7009 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7010 ;;don't want to create a circular dependency.
7011 (home-page "https://github.com/facelessuser/soupsieve")
7012 (synopsis "CSS selector library")
7013 (description
7014 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7015 Soup 4. It aims to provide selecting, matching, and filtering using modern
7016 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7017 specifications up through the latest CSS level 4 drafts and beyond (though
7018 some are not yet implemented).")
7019 (properties `((python2-variant . ,(delay python2-soupsieve))))
7020 (license license:expat)))
7021
7022 (define-public python2-soupsieve
7023 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7024 (package
7025 (inherit base)
7026 (propagated-inputs
7027 `(("python2-backports-functools-lru-cache"
7028 ,python2-backports-functools-lru-cache)
7029 ,@(package-propagated-inputs base))))))
7030
7031 (define-public python-netifaces
7032 (package
7033 (name "python-netifaces")
7034 (version "0.10.9")
7035 (source
7036 (origin
7037 (method url-fetch)
7038 (uri (pypi-uri "netifaces" version))
7039 (sha256
7040 (base32
7041 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7042 (build-system python-build-system)
7043 (home-page "https://github.com/al45tair/netifaces")
7044 (synopsis
7045 "Python module for portable network interface information")
7046 (description
7047 "Netifaces is a Python module providing information on network
7048 interfaces in an easy and portable manner.")
7049 (license license:expat)))
7050
7051 (define-public python2-netifaces
7052 (package-with-python2 python-netifaces))
7053
7054 (define-public python-networkx
7055 (package
7056 (name "python-networkx")
7057 (version "2.4")
7058 (source
7059 (origin
7060 (method url-fetch)
7061 (uri (pypi-uri "networkx" version))
7062 (sha256
7063 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
7064 (build-system python-build-system)
7065 (arguments
7066 '(#:phases (modify-phases %standard-phases
7067 (replace 'check
7068 (lambda* (#:key tests? #:allow-other-keys)
7069 (if tests?
7070 (invoke "pytest" "-vv" "--pyargs" "networkx")
7071 (format #t "test suite not run~%"))
7072 #t)))))
7073 ;; python-decorator is needed at runtime.
7074 (propagated-inputs
7075 `(("python-decorator" ,python-decorator)))
7076 (native-inputs
7077 `(("python-pytest" ,python-pytest)))
7078 (home-page "https://networkx.github.io/")
7079 (synopsis "Python module for creating and manipulating graphs and networks")
7080 (description
7081 "NetworkX is a Python package for the creation, manipulation, and study
7082 of the structure, dynamics, and functions of complex networks.")
7083 (properties `((python2-variant . ,(delay python2-networkx))))
7084 (license license:bsd-3)))
7085
7086 ;; NetworkX 2.2 is the last version with support for Python 2.
7087 (define-public python2-networkx
7088 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7089 (package
7090 (inherit base)
7091 (version "2.2")
7092 (source (origin
7093 (method url-fetch)
7094 (uri (pypi-uri "networkx" version ".zip"))
7095 (sha256
7096 (base32
7097 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7098 (arguments
7099 `(#:python ,python-2))
7100 (native-inputs
7101 `(("python-nose" ,python2-nose)
7102 ("unzip" ,unzip))))))
7103
7104 (define-public python-datrie
7105 (package
7106 (name "python-datrie")
7107 (version "0.8.2")
7108 (source
7109 (origin
7110 (method url-fetch)
7111 (uri (pypi-uri "datrie" version))
7112 (sha256
7113 (base32
7114 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7115 (build-system python-build-system)
7116 (native-inputs
7117 `(("python-cython" ,python-cython)
7118 ("python-hypothesis" ,python-hypothesis)
7119 ("python-pytest" ,python-pytest)
7120 ("python-pytest-runner" ,python-pytest-runner)))
7121 (home-page "https://github.com/kmike/datrie")
7122 (synopsis "Fast, efficiently stored trie for Python")
7123 (description
7124 "This package provides a fast, efficiently stored trie implementation for
7125 Python.")
7126 (license license:lgpl2.1+)))
7127
7128 (define-public snakemake
7129 (package
7130 (name "snakemake")
7131 (version "5.7.1")
7132 (source
7133 (origin
7134 (method url-fetch)
7135 (uri (pypi-uri "snakemake" version))
7136 (sha256
7137 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7138 (build-system python-build-system)
7139 (arguments
7140 ;; TODO: Package missing test dependencies.
7141 '(#:tests? #f
7142 #:phases
7143 (modify-phases %standard-phases
7144 ;; For cluster execution Snakemake will call Python. Since there is
7145 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7146 ;; this by calling the snakemake wrapper instead.
7147 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7148 (lambda* (#:key outputs #:allow-other-keys)
7149 (substitute* "snakemake/executors.py"
7150 (("\\{sys.executable\\} -m snakemake")
7151 (string-append (assoc-ref outputs "out")
7152 "/bin/snakemake")))
7153 #t)))))
7154 (propagated-inputs
7155 `(("python-appdirs" ,python-appdirs)
7156 ("python-configargparse" ,python-configargparse)
7157 ("python-datrie" ,python-datrie)
7158 ("python-docutils" ,python-docutils)
7159 ("python-gitpython" ,python-gitpython)
7160 ("python-jinja2" ,python-jinja2)
7161 ("python-jsonschema" ,python-jsonschema)
7162 ("python-networkx" ,python-networkx)
7163 ("python-psutil" ,python-psutil)
7164 ("python-pyyaml" ,python-pyyaml)
7165 ("python-ratelimiter" ,python-ratelimiter)
7166 ("python-requests" ,python-requests)
7167 ("python-wrapt" ,python-wrapt)))
7168 (home-page "https://snakemake.readthedocs.io")
7169 (synopsis "Python-based execution environment for make-like workflows")
7170 (description
7171 "Snakemake aims to reduce the complexity of creating workflows by
7172 providing a clean and modern domain specific specification language (DSL) in
7173 Python style, together with a fast and comfortable execution environment.")
7174 (license license:expat)))
7175
7176 (define-public python-pyqrcode
7177 (package
7178 (name "python-pyqrcode")
7179 (version "1.2.1")
7180 (source
7181 (origin
7182 (method url-fetch)
7183 (uri (pypi-uri "PyQRCode" version))
7184 (sha256
7185 (base32
7186 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7187 (build-system python-build-system)
7188 (home-page
7189 "https://github.com/mnooner256/pyqrcode")
7190 (synopsis "QR code generator")
7191 (description
7192 "Pyqrcode is a QR code generator written purely in Python with
7193 SVG, EPS, PNG and terminal output.")
7194 (license license:bsd-3)))
7195
7196 (define-public python-seaborn
7197 (package
7198 (name "python-seaborn")
7199 (version "0.10.0")
7200 (source
7201 (origin
7202 (method url-fetch)
7203 (uri (pypi-uri "seaborn" version))
7204 (sha256
7205 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7206 (build-system python-build-system)
7207 (arguments
7208 `(#:phases
7209 (modify-phases %standard-phases
7210 (add-before 'check 'start-xserver
7211 (lambda* (#:key inputs #:allow-other-keys)
7212 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7213 ;; There must be a running X server and make check doesn't
7214 ;; start one. Therefore we must do it.
7215 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7216 (setenv "DISPLAY" ":1")
7217 #t)))
7218 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7219 (propagated-inputs
7220 `(("python-pandas" ,python-pandas)
7221 ("python-matplotlib" ,python-matplotlib)
7222 ("python-numpy" ,python-numpy)
7223 ("python-scipy" ,python-scipy)))
7224 (native-inputs
7225 `(("python-pytest" ,python-pytest)
7226 ("xorg-server" ,xorg-server-for-tests)))
7227 (home-page "https://seaborn.pydata.org/")
7228 (synopsis "Statistical data visualization")
7229 (description
7230 "Seaborn is a library for making attractive and informative statistical
7231 graphics in Python. It is built on top of matplotlib and tightly integrated
7232 with the PyData stack, including support for numpy and pandas data structures
7233 and statistical routines from scipy and statsmodels.")
7234 (properties `((python2-variant . ,(delay python2-seaborn))))
7235 (license license:bsd-3)))
7236
7237 ;; 0.9.1 is the last release with support for Python 2.
7238 (define-public python2-seaborn
7239 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7240 (package
7241 (inherit base)
7242 (version "0.9.1")
7243 (source (origin
7244 (method url-fetch)
7245 (uri (pypi-uri "seaborn" version))
7246 (sha256
7247 (base32
7248 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7249
7250 (define-public python-mpmath
7251 (package
7252 (name "python-mpmath")
7253 (version "0.19")
7254 (source (origin
7255 (method url-fetch)
7256 (uri (string-append "http://mpmath.org/files/mpmath-"
7257 version ".tar.gz"))
7258 (sha256
7259 (base32
7260 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
7261 (build-system python-build-system)
7262 (arguments
7263 '(#:phases
7264 (modify-phases %standard-phases
7265 (replace 'check
7266 (lambda _
7267 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7268 (home-page "http://mpmath.org")
7269 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7270 (description
7271 "@code{mpmath} can be used as an arbitrary-precision substitute for
7272 Python's float/complex types and math/cmath modules, but also does much
7273 more advanced mathematics.")
7274 (license license:bsd-3)))
7275
7276 (define-public python2-mpmath
7277 (package-with-python2 python-mpmath))
7278
7279 (define-public python-bigfloat
7280 (package
7281 (name "python-bigfloat")
7282 (version "0.3.0")
7283 (source
7284 (origin
7285 (method url-fetch)
7286 (uri (pypi-uri "bigfloat" version))
7287 (sha256
7288 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7289 (build-system python-build-system)
7290 (inputs
7291 `(("mpfr" ,mpfr)))
7292 (home-page "https://github.com/mdickinson/bigfloat")
7293 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7294 (description
7295 "This package provides a Python interface to the MPFR library for
7296 multiprecision arithmetic.")
7297 (license license:lgpl3+)))
7298
7299 (define-public python2-bigfloat
7300 (package-with-python2 python-bigfloat))
7301
7302 (define-public python-sympy
7303 (package
7304 (name "python-sympy")
7305 (version "1.1.1")
7306 (source
7307 (origin
7308 (method url-fetch)
7309 (uri (string-append
7310 "https://github.com/sympy/sympy/releases/download/sympy-"
7311 version "/sympy-" version ".tar.gz"))
7312 (sha256
7313 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
7314 (build-system python-build-system)
7315 (arguments
7316 `(#:phases
7317 (modify-phases %standard-phases
7318 ;; Run the core tests after installation. By default it would run
7319 ;; *all* tests, which take a very long time to complete and are known
7320 ;; to be flaky.
7321 (delete 'check)
7322 (add-after 'install 'check
7323 (lambda* (#:key outputs #:allow-other-keys)
7324 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
7325 #t)))))
7326 (propagated-inputs
7327 `(("python-mpmath" ,python-mpmath)))
7328 (home-page "https://www.sympy.org/")
7329 (synopsis "Python library for symbolic mathematics")
7330 (description
7331 "SymPy is a Python library for symbolic mathematics. It aims to become a
7332 full-featured computer algebra system (CAS) while keeping the code as simple
7333 as possible in order to be comprehensible and easily extensible.")
7334 (license license:bsd-3)))
7335
7336 (define-public python2-sympy
7337 (package
7338 (inherit (package-with-python2 python-sympy))
7339 (arguments
7340 `(#:phases
7341 (modify-phases %standard-phases
7342 ;; Run the core tests after installation. By default it would run
7343 ;; *all* tests, which take a very long time to complete and are known
7344 ;; to be flaky.
7345 (delete 'check)
7346 (add-after 'install 'check
7347 (lambda* (#:key outputs #:allow-other-keys)
7348 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
7349 #t)))))))
7350
7351 (define-public python-q
7352 (package
7353 (name "python-q")
7354 (version "2.6")
7355 (source
7356 (origin
7357 (method url-fetch)
7358 (uri (pypi-uri "q" version))
7359 (sha256
7360 (base32
7361 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7362 (build-system python-build-system)
7363 (home-page "https://github.com/zestyping/q")
7364 (synopsis "Quick-and-dirty debugging output for tired programmers")
7365 (description
7366 "q is a Python module for \"print\" style of debugging Python code. It
7367 provides convenient short API for print out of values, tracebacks, and
7368 falling into the Python interpreter.")
7369 (license license:asl2.0)))
7370
7371 (define-public python2-q
7372 (package-with-python2 python-q))
7373
7374 (define-public python2-xlib
7375 (package
7376 (name "python2-xlib")
7377 (version "0.14")
7378 (source (origin
7379 (method url-fetch)
7380 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
7381 "/" version "/"
7382 "python-xlib-" version ".tar.gz"))
7383 (sha256
7384 (base32
7385 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
7386 (build-system python-build-system)
7387 (arguments
7388 `(#:python ,python-2 ;Python 2 only
7389 #:tests? #f)) ;no tests
7390 (home-page "http://python-xlib.sourceforge.net/")
7391 (synopsis "Python X11 client library")
7392 (description
7393 "The Python X Library is intended to be a fully functional X client
7394 library for Python programs. It is useful to implement low-level X clients.
7395 It is written entirely in Python.")
7396 (license license:gpl2+)))
7397
7398 (define-public python-singledispatch
7399 (package
7400 (name "python-singledispatch")
7401 (version "3.4.0.3")
7402 (source
7403 (origin
7404 (method url-fetch)
7405 (uri (pypi-uri "singledispatch" version))
7406 (sha256
7407 (base32
7408 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7409 (build-system python-build-system)
7410 (native-inputs
7411 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7412 (home-page
7413 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7414 (synopsis "Backport of singledispatch feature from Python 3.4")
7415 (description
7416 "This library brings functools.singledispatch from Python 3.4 to Python
7417 2.6-3.3.")
7418 (license license:expat)))
7419
7420 (define-public python2-singledispatch
7421 (package-with-python2 python-singledispatch))
7422
7423 ;; the python- version can be removed with python-3.5
7424 (define-public python-backports-abc
7425 (package
7426 (name "python-backports-abc")
7427 (version "0.5")
7428 (source
7429 (origin
7430 (method url-fetch)
7431 (uri (pypi-uri "backports_abc" version))
7432 (sha256
7433 (base32
7434 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7435 (build-system python-build-system)
7436 (home-page "https://github.com/cython/backports_abc")
7437 (synopsis "Backport of additions to the 'collections.abc' module")
7438 (description
7439 "Python-backports-abc provides a backport of additions to the
7440 @code{collections.abc} module in Python-3.5.")
7441 (license license:psfl)))
7442
7443 (define-public python2-backports-abc
7444 (package-with-python2 python-backports-abc))
7445
7446 (define-public python-backports-csv
7447 (package
7448 (name "python-backports-csv")
7449 (version "1.0.7")
7450 (source
7451 (origin
7452 (method url-fetch)
7453 (uri (pypi-uri "backports.csv" version))
7454 (sha256
7455 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7456 (build-system python-build-system)
7457 (home-page "https://github.com/ryanhiebert/backports.csv")
7458 (synopsis "Backport of Python 3's csv module for Python 2")
7459 (description
7460 "Provides a backport of Python 3's @code{csv} module for parsing
7461 comma separated values. The API of the @code{csv} module in Python 2
7462 is drastically different from the @code{csv} module in Python 3.
7463 This is due, for the most part, to the difference between str in
7464 Python 2 and Python 3.")
7465 (license license:psfl)))
7466
7467 (define-public python2-backports-csv
7468 (package-with-python2 python-backports-csv))
7469
7470 (define-public python2-backports-shutil-get-terminal-size
7471 (package
7472 (name "python2-backports-shutil-get-terminal-size")
7473 (version "1.0.0")
7474 (source
7475 (origin
7476 (method url-fetch)
7477 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7478 (sha256
7479 (base32
7480 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7481 (build-system python-build-system)
7482 (arguments
7483 `(#:python ,python-2
7484 #:phases
7485 (modify-phases %standard-phases
7486 (replace 'check
7487 (lambda _
7488 (setenv "PYTHONPATH" (string-append "./build/lib:"
7489 (getenv "PYTHONPATH")))
7490 (invoke "py.test" "-v"))))))
7491 (native-inputs
7492 `(("python2-pytest" ,python2-pytest)))
7493 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7494 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7495 (description
7496 "This package provides a backport of the @code{get_terminal_size
7497 function} from Python 3.3's @code{shutil}.
7498 Unlike the original version it is written in pure Python rather than C,
7499 so it might be a tiny bit slower.")
7500 (license license:expat)))
7501
7502 (define-public python-waf
7503 (package
7504 (name "python-waf")
7505 (version "2.0.19")
7506 (source (origin
7507 (method url-fetch)
7508 (uri (string-append "https://waf.io/"
7509 "waf-" version ".tar.bz2"))
7510 (sha256
7511 (base32
7512 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7513 (build-system python-build-system)
7514 (arguments
7515 '(#:phases
7516 (modify-phases %standard-phases
7517 (replace 'build
7518 (lambda _
7519 ;; XXX: Find a way to add all extra tools.
7520 (let ((tools '("gccdeps"
7521 "clang_compilation_database")))
7522 (invoke "python" "waf-light" "configure" "build"
7523 (string-append "--tools="
7524 (string-join tools ","))))))
7525 (replace 'check
7526 (lambda _
7527 (invoke "python" "waf" "--version")))
7528 (replace 'install
7529 (lambda* (#:key outputs #:allow-other-keys)
7530 (let ((out (assoc-ref outputs "out")))
7531 (install-file "waf" (string-append out "/bin")))
7532 #t))
7533 ;; waf breaks when it is wrapped.
7534 (delete 'wrap))))
7535 (home-page "https://waf.io/")
7536 (synopsis "Python-based build system")
7537 (description
7538 "Waf is a Python-based framework for configuring, compiling and installing
7539 applications.")
7540 (license license:bsd-3)))
7541
7542 (define-public python2-waf
7543 (package-with-python2 python-waf))
7544
7545 (define-public python-pyzmq
7546 (package
7547 (name "python-pyzmq")
7548 (version "17.1.2")
7549 (source
7550 (origin
7551 (method url-fetch)
7552 (uri (pypi-uri "pyzmq" version))
7553 (sha256
7554 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
7555 (build-system python-build-system)
7556 (arguments
7557 `(#:configure-flags
7558 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
7559 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
7560 ;; --inplace' for 'python setup.py test' to work.
7561 #:tests? #f))
7562 (inputs
7563 `(("zeromq" ,zeromq)))
7564 (native-inputs
7565 `(("pkg-config" ,pkg-config)
7566 ("python-nose" ,python-nose)))
7567 (home-page "https://github.com/zeromq/pyzmq")
7568 (synopsis "Python bindings for 0MQ")
7569 (description
7570 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
7571 (license license:bsd-4)))
7572
7573 (define-public python2-pyzmq
7574 (package-with-python2 python-pyzmq))
7575
7576 (define-public python-pep8
7577 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
7578 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
7579 ;; some dependents' test suites, and nothing more.
7580 (package
7581 (name "python-pep8")
7582 (version "1.7.0")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (pypi-uri "pep8" version))
7587 (sha256
7588 (base32
7589 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
7590 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
7591 (build-system python-build-system)
7592 (home-page "https://pep8.readthedocs.org/")
7593 (synopsis "Python style guide checker")
7594 (description
7595 "This tools checks Python code against some of the style conventions in
7596 PEP 8.")
7597 (license license:expat)))
7598
7599 (define-public python2-pep8
7600 (package-with-python2 python-pep8))
7601
7602 (define-public python-pyflakes
7603 (package
7604 (name "python-pyflakes")
7605 (version "2.2.0")
7606 (source
7607 (origin
7608 (method url-fetch)
7609 (uri (pypi-uri "pyflakes" version))
7610 (sha256
7611 (base32
7612 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
7613 (build-system python-build-system)
7614 (home-page
7615 "https://github.com/pyflakes/pyflakes")
7616 (synopsis "Passive checker of Python programs")
7617 (description
7618 "Pyflakes statically checks Python source code for common errors.")
7619 (license license:expat)))
7620
7621 (define-public python2-pyflakes
7622 (package-with-python2 python-pyflakes))
7623
7624 ;; Flake8 2.6 requires an older version of pyflakes.
7625 ;; This should be removed ASAP.
7626 (define-public python-pyflakes-1.2
7627 (package (inherit python-pyflakes)
7628 (version "1.2.3")
7629 (source
7630 (origin
7631 (method url-fetch)
7632 (uri (pypi-uri "pyflakes" version))
7633 (sha256
7634 (base32
7635 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
7636 (arguments
7637 '(#:phases
7638 (modify-phases %standard-phases
7639 ;; This one test fails.
7640 (replace 'check
7641 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
7642 (native-inputs
7643 `(("python-pytest" ,python-pytest)))))
7644
7645 (define-public python-mccabe
7646 (package
7647 (name "python-mccabe")
7648 (version "0.6.1")
7649 (source
7650 (origin
7651 (method url-fetch)
7652 (uri (pypi-uri "mccabe" version))
7653 (sha256
7654 (base32
7655 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
7656 (build-system python-build-system)
7657 (native-inputs
7658 `(("python-pytest" ,python-pytest-bootstrap)
7659 ("python-pytest-runner" ,python-pytest-runner)))
7660 (home-page "https://github.com/flintwork/mccabe")
7661 (synopsis "McCabe checker, plugin for flake8")
7662 (description
7663 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7664 complexity of Python source code.")
7665 (license license:expat)))
7666
7667 (define-public python2-mccabe
7668 (package-with-python2 python-mccabe))
7669
7670 (define-public python-mccabe-0.2.1
7671 (package (inherit python-mccabe)
7672 (version "0.2.1")
7673 (source
7674 (origin
7675 (method url-fetch)
7676 (uri (pypi-uri "mccabe" version))
7677 (sha256
7678 (base32
7679 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7680
7681 (define-public python2-mccabe-0.2.1
7682 (package-with-python2 python-mccabe-0.2.1))
7683
7684 ;; Flake8 2.4.1 requires an older version of pep8.
7685 ;; This should be removed ASAP.
7686 (define-public python-pep8-1.5.7
7687 (package (inherit python-pep8)
7688 (version "1.5.7")
7689 (source
7690 (origin
7691 (method url-fetch)
7692 (uri (pypi-uri "pep8" version))
7693 (sha256
7694 (base32
7695 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7696 (arguments
7697 ;; XXX Tests not compatible with Python 3.5.
7698 '(#:tests? #f))))
7699
7700 (define-public python2-pep8-1.5.7
7701 (package-with-python2 python-pep8-1.5.7))
7702
7703 (define-public python-flake8
7704 (package
7705 (name "python-flake8")
7706 (version "3.8.3")
7707 (source (origin
7708 (method url-fetch)
7709 (uri (pypi-uri "flake8" version))
7710 (sha256
7711 (base32
7712 "02527892hh0qjivxaiphzalj7q32qkna1cqaikjs7c03mk5ryjzh"))))
7713 (build-system python-build-system)
7714 (arguments
7715 `(#:phases
7716 (modify-phases %standard-phases
7717 (delete 'check)
7718 (add-after 'install 'check
7719 (lambda* (#:key inputs outputs #:allow-other-keys)
7720 (add-installed-pythonpath inputs outputs)
7721 (invoke "pytest" "-v")
7722 #t)))))
7723 (propagated-inputs
7724 `(("python-pycodestyle" ,python-pycodestyle)
7725 ("python-entrypoints" ,python-entrypoints)
7726 ("python-pyflakes" ,python-pyflakes)
7727 ("python-mccabe" ,python-mccabe)))
7728 (native-inputs
7729 `(("python-mock" ,python-mock)
7730 ("python-pytest" ,python-pytest-bootstrap)))
7731 (home-page "https://gitlab.com/pycqa/flake8")
7732 (synopsis
7733 "The modular source code checker: pep8, pyflakes and co")
7734 (description
7735 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7736 (properties `((python2-variant . ,(delay python2-flake8))))
7737 (license license:expat)))
7738
7739 (define-public python2-flake8
7740 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
7741 (package (inherit base)
7742 (propagated-inputs
7743 `(("python2-configparser" ,python2-configparser)
7744 ("python2-enum34" ,python2-enum34)
7745 ("python2-functools32" ,python2-functools32)
7746 ("python2-typing" ,python2-typing)
7747 ,@(package-propagated-inputs base))))))
7748
7749 ;; python-hacking requires flake8 <2.7.0.
7750 (define-public python-flake8-2.6
7751 (package
7752 (inherit python-flake8)
7753 (version "2.6.2")
7754 (source (origin
7755 (method url-fetch)
7756 (uri (pypi-uri "flake8" version))
7757 (sha256
7758 (base32
7759 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
7760 (arguments
7761 `(#:phases
7762 (modify-phases %standard-phases
7763 (add-after 'unpack 'use-later-pycodestyles
7764 (lambda __
7765 (substitute* '("flake8.egg-info/requires.txt"
7766 "setup.py")
7767 (("pycodestyle >= 2.0, < 2.1")
7768 "pycodestyle >= 2.0"))
7769 #t))
7770 (delete 'check)
7771 (add-after 'install 'check
7772 (lambda* (#:key inputs outputs #:allow-other-keys)
7773 (add-installed-pythonpath inputs outputs)
7774 (invoke "pytest" "-v")
7775 #t)))))
7776 (propagated-inputs
7777 `(("python-pep8" ,python-pep8)
7778 ("python-pycodestyle" ,python-pycodestyle)
7779 ("python-entrypoints" ,python-entrypoints)
7780 ("python-pyflakes" ,python-pyflakes-1.2)
7781 ("python-mccabe" ,python-mccabe)))))
7782
7783 (define-public python-flake8-polyfill
7784 (package
7785 (name "python-flake8-polyfill")
7786 (version "1.0.2")
7787 (source
7788 (origin
7789 (method url-fetch)
7790 (uri (pypi-uri "flake8-polyfill" version))
7791 (sha256
7792 (base32
7793 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7794 (build-system python-build-system)
7795 (arguments
7796 '(#:phases
7797 (modify-phases %standard-phases
7798 (replace 'check
7799 (lambda _
7800 ;; Be compatible with Pytest 4:
7801 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7802 (substitute* "setup.cfg"
7803 (("\\[pytest\\]")
7804 "[tool:pytest]"))
7805
7806 (setenv "PYTHONPATH"
7807 (string-append (getcwd) "/build/lib:"
7808 (getenv "PYTHONPATH")))
7809 (invoke "py.test" "-v"))))))
7810 (native-inputs
7811 `(("python-flake8" ,python-flake8)
7812 ("python-mock" ,python-mock)
7813 ("python-pep8" ,python-pep8)
7814 ("python-pycodestyle" ,python-pycodestyle)
7815 ("python-pytest" ,python-pytest)))
7816 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7817 (synopsis "Polyfill package for Flake8 plugins")
7818 (description
7819 "This package that provides some compatibility helpers for Flake8
7820 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7821 (license license:expat)))
7822
7823 (define-public python2-flake8-polyfill
7824 (package-with-python2 python-flake8-polyfill))
7825
7826 (define-public python-mistune
7827 (package
7828 (name "python-mistune")
7829 (version "0.8.4")
7830 (source
7831 (origin
7832 (method url-fetch)
7833 (uri (pypi-uri "mistune" version))
7834 (sha256
7835 (base32
7836 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7837 (build-system python-build-system)
7838 (native-inputs
7839 `(("python-nose" ,python-nose)
7840 ("python-cython" ,python-cython)))
7841 (home-page "https://github.com/lepture/mistune")
7842 (synopsis "Markdown parser in pure Python")
7843 (description "This package provides a fast markdown parser in pure
7844 Python.")
7845 (license license:bsd-3)))
7846
7847 (define-public python2-mistune
7848 (package-with-python2 python-mistune))
7849
7850 (define-public python-markdown
7851 (package
7852 (name "python-markdown")
7853 (version "3.2.1")
7854 (source
7855 (origin
7856 (method url-fetch)
7857 (uri (pypi-uri "Markdown" version))
7858 (sha256
7859 (base32
7860 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
7861 (build-system python-build-system)
7862 (native-inputs
7863 `(("python-nose" ,python-nose)
7864 ("python-pyyaml" ,python-pyyaml)))
7865 (home-page "https://python-markdown.github.io/")
7866 (synopsis "Python implementation of Markdown")
7867 (description
7868 "This package provides a Python implementation of John Gruber's
7869 Markdown. The library features international input, various Markdown
7870 extensions, and several HTML output formats. A command line wrapper
7871 markdown_py is also provided to convert Markdown files to HTML.")
7872 (properties `((python2-variant . ,(delay python2-markdown))))
7873 (license license:bsd-3)))
7874
7875 ;; Markdown 3.2 dropped support for Python 2.
7876 (define-public python2-markdown
7877 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7878 (package/inherit
7879 base
7880 (version "3.1.1")
7881 (source (origin
7882 (method url-fetch)
7883 (uri (pypi-uri "Markdown" version))
7884 (sha256
7885 (base32
7886 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
7887
7888 (define-public python-ptyprocess
7889 (package
7890 (name "python-ptyprocess")
7891 (version "0.5.2")
7892 (source
7893 (origin
7894 (method url-fetch)
7895 (uri (pypi-uri "ptyprocess" version))
7896 (sha256
7897 (base32
7898 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7899 (build-system python-build-system)
7900 (native-inputs
7901 `(("python-nose" ,python-nose)))
7902 (arguments
7903 `(#:phases
7904 (modify-phases %standard-phases
7905 (replace 'check
7906 (lambda _ (invoke "nosetests"))))))
7907 (home-page "https://github.com/pexpect/ptyprocess")
7908 (synopsis "Run a subprocess in a pseudo terminal")
7909 (description
7910 "This package provides a Python library used to launch a subprocess in a
7911 pseudo terminal (pty), and interact with both the process and its pty.")
7912 (license license:isc)))
7913
7914 (define-public python2-ptyprocess
7915 (package-with-python2 python-ptyprocess))
7916
7917 (define-public python-cram
7918 (package
7919 (name "python-cram")
7920 (version "0.7")
7921 (home-page "https://bitheap.org/cram/")
7922 (source (origin
7923 (method url-fetch)
7924 (uri (list (string-append home-page "cram-"
7925 version ".tar.gz")
7926 (pypi-uri "cram" version)))
7927 (sha256
7928 (base32
7929 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7930 (arguments
7931 '(#:phases
7932 (modify-phases %standard-phases
7933 (add-after 'unpack 'patch-source
7934 (lambda _
7935 (substitute* (find-files "cram" ".*\\.py$")
7936 ;; Replace default shell path.
7937 (("/bin/sh") (which "sh")))
7938 (substitute* (find-files "tests" ".*\\.t$")
7939 (("md5") "md5sum")
7940 (("/bin/bash") (which "bash"))
7941 (("/bin/sh") (which "sh")))
7942 (substitute* "cram/_test.py"
7943 ;; This hack works around a bug triggered by substituting
7944 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7945 ;; "cram -h", which breaks the output at 80 characters. This
7946 ;; causes the line showing the default shell to break into two
7947 ;; lines, but the test expects a single line...
7948 (("env\\['COLUMNS'\\] = '80'")
7949 "env['COLUMNS'] = '160'"))
7950
7951 (substitute* "Makefile"
7952 ;; Recent versions of python-coverage have caused the test
7953 ;; coverage to decrease (as of version 0.7). Allow that.
7954 (("--fail-under=100")
7955 "--fail-under=90"))
7956
7957 #t))
7958 (replace 'check
7959 ;; The test phase uses the built library and executable.
7960 (lambda* (#:key inputs outputs #:allow-other-keys)
7961 (add-installed-pythonpath inputs outputs)
7962 (setenv "PATH" (string-append (getenv "PATH") ":"
7963 (assoc-ref outputs "out") "/bin"))
7964 (invoke "make" "test"))))))
7965 (build-system python-build-system)
7966 (native-inputs
7967 `(("python-coverage" ,python-coverage)
7968 ("which" ,which)))
7969 (synopsis "Simple testing framework for command line applications")
7970 (description
7971 "Cram is a functional testing framework for command line applications.
7972 Cram tests look like snippets of interactive shell sessions. Cram runs each
7973 command and compares the command output in the test with the command’s actual
7974 output.")
7975 (license license:gpl2+)))
7976
7977 (define-public python2-cram
7978 (package-with-python2 python-cram))
7979
7980 (define-public python-straight-plugin
7981 (package
7982 (name "python-straight-plugin")
7983 (version "1.4.1")
7984 (source
7985 (origin
7986 (method url-fetch)
7987 (uri (pypi-uri "straight.plugin" version))
7988 (sha256
7989 (base32
7990 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7991 (build-system python-build-system)
7992 (home-page "https://github.com/ironfroggy/straight.plugin")
7993 (synopsis "Simple namespaced plugin facility")
7994 (description "Straight Plugin provides a type of plugin you can create from
7995 almost any existing Python modules, and an easy way for outside developers to
7996 add functionality and customization to your projects with their own plugins.")
7997 (license license:expat)))
7998
7999 (define-public python2-straight-plugin
8000 (package-with-python2 python-straight-plugin))
8001
8002 (define-public python-fonttools
8003 (package
8004 (name "python-fonttools")
8005 (version "4.6.0")
8006 (source (origin
8007 (method url-fetch)
8008 (uri (pypi-uri "fonttools" version ".zip"))
8009 (sha256
8010 (base32
8011 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8012 (build-system python-build-system)
8013 (native-inputs
8014 `(("unzip" ,unzip)
8015 ("python-pytest" ,python-pytest)
8016 ("python-pytest-runner" ,python-pytest-runner)))
8017 (home-page "https://github.com/fonttools/fonttools")
8018 (synopsis "Tools to manipulate font files")
8019 (description
8020 "FontTools/TTX is a library to manipulate font files from Python. It
8021 supports reading and writing of TrueType/OpenType fonts, reading and writing
8022 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8023 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8024 from an XML-based format.")
8025 (license license:expat)))
8026
8027 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8028 (define-public python2-fonttools
8029 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8030 (package/inherit
8031 base
8032 (version "3.44.0")
8033 (source (origin
8034 (method url-fetch)
8035 (uri (pypi-uri "fonttools" version ".zip"))
8036 (sha256
8037 (base32
8038 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8039
8040 (define-public python-ly
8041 (package
8042 (name "python-ly")
8043 (version "0.9.5")
8044 (source
8045 (origin
8046 (method url-fetch)
8047 (uri (pypi-uri name version))
8048 (sha256
8049 (base32
8050 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8051 (build-system python-build-system)
8052 (arguments
8053 ;; FIXME: Some tests need network access.
8054 '(#:tests? #f))
8055 (synopsis "Tool and library for manipulating LilyPond files")
8056 (description "This package provides a Python library to parse, manipulate
8057 or create documents in LilyPond format. A command line program ly is also
8058 provided that can be used to do various manipulations with LilyPond files.")
8059 (home-page "https://pypi.org/project/python-ly/")
8060 (license license:gpl2+)))
8061
8062 (define-public python-appdirs
8063 (package
8064 (name "python-appdirs")
8065 (version "1.4.3")
8066 (source
8067 (origin
8068 (method url-fetch)
8069 (uri (pypi-uri "appdirs" version))
8070 (sha256
8071 (base32
8072 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8073 (build-system python-build-system)
8074 (home-page "https://github.com/ActiveState/appdirs")
8075 (synopsis
8076 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8077 (description
8078 "This module provides a portable way of finding out where user data
8079 should be stored on various operating systems.")
8080 (license license:expat)))
8081
8082 (define-public python2-appdirs
8083 (package-with-python2 python-appdirs))
8084
8085 (define-public python-llfuse
8086 (package
8087 (name "python-llfuse")
8088 (version "1.3.6")
8089 (source (origin
8090 (method url-fetch)
8091 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8092 (sha256
8093 (base32
8094 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8095 (build-system python-build-system)
8096 (inputs
8097 `(("fuse" ,fuse)
8098 ("attr" ,attr)))
8099 (native-inputs
8100 `(("pkg-config" ,pkg-config)))
8101 (synopsis "Python bindings for FUSE")
8102 (description
8103 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8104 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8105 (license license:lgpl2.0+)
8106 (properties `((python2-variant . ,(delay python2-llfuse))))))
8107
8108 (define-public python2-llfuse
8109 (package (inherit (package-with-python2
8110 (strip-python2-variant python-llfuse)))
8111 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8112
8113 ;; For attic-0.16
8114 (define-public python-llfuse-0.41
8115 (package (inherit python-llfuse)
8116 (version "0.41.1")
8117 (source (origin
8118 (method url-fetch)
8119 (uri (string-append
8120 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8121 "llfuse-" version ".tar.bz2"))
8122 (sha256
8123 (base32
8124 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8125 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8126 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8127 (license (list license:expat license:lgpl2.0+))))
8128
8129 (define-public python-msgpack
8130 (package
8131 (name "python-msgpack")
8132 (version "1.0.0")
8133 (source (origin
8134 (method url-fetch)
8135 (uri (pypi-uri "msgpack" version))
8136 (sha256
8137 (base32
8138 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8139 (build-system python-build-system)
8140 (arguments
8141 `(#:modules ((guix build utils)
8142 (guix build python-build-system)
8143 (ice-9 ftw)
8144 (srfi srfi-1)
8145 (srfi srfi-26))
8146 #:phases
8147 (modify-phases %standard-phases
8148 (replace 'check
8149 (lambda _
8150 (let ((cwd (getcwd)))
8151 (setenv "PYTHONPATH"
8152 (string-append cwd "/build/"
8153 (find (cut string-prefix? "lib" <>)
8154 (scandir (string-append cwd "/build")))
8155 ":"
8156 (getenv "PYTHONPATH")))
8157 (invoke "pytest" "-v" "test")))))))
8158 (native-inputs
8159 `(("python-pytest" ,python-pytest)))
8160 (synopsis "MessagePack (de)serializer")
8161 (description "MessagePack is a fast, compact binary serialization format,
8162 suitable for similar data to JSON. This package provides CPython bindings for
8163 reading and writing MessagePack data.")
8164 (home-page "https://pypi.org/project/msgpack/")
8165 (license license:asl2.0)))
8166
8167 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8168 ;; release 0.5. Some packages like borg still call it by the old name for now.
8169 ;; <https://bugs.gnu.org/30662>
8170 (define-public python-msgpack-transitional
8171 (package
8172 (inherit python-msgpack)
8173 (name "python-msgpack-transitional")
8174 (version "0.5.6")
8175 (source (origin
8176 (method url-fetch)
8177 (uri (pypi-uri "msgpack" version))
8178 (sha256
8179 (base32
8180 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8181 (arguments
8182 (substitute-keyword-arguments (package-arguments python-msgpack)
8183 ((#:phases phases)
8184 `(modify-phases ,phases
8185 (add-after 'unpack 'configure-transitional
8186 (lambda _
8187 ;; Keep using the old name.
8188 (substitute* "setup.py"
8189 (("TRANSITIONAL = False")
8190 "TRANSITIONAL = 1"))
8191 #t))))))))
8192
8193 (define-public python2-msgpack
8194 (package-with-python2 python-msgpack))
8195
8196 (define-public python-netaddr
8197 (package
8198 (name "python-netaddr")
8199 (version "0.7.19")
8200 (source
8201 (origin
8202 (method url-fetch)
8203 (uri (pypi-uri "netaddr" version))
8204 (sha256
8205 (base32
8206 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8207 (build-system python-build-system)
8208 (arguments `(#:tests? #f)) ;; No tests.
8209 (home-page "https://github.com/drkjam/netaddr/")
8210 (synopsis "Pythonic manipulation of network addresses")
8211 (description
8212 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8213 and MAC network addresses.")
8214 (license license:bsd-3)))
8215
8216 (define-public python2-netaddr
8217 (package-with-python2 python-netaddr))
8218
8219 (define-public python2-pyroute2
8220 (package
8221 (name "python2-pyroute2")
8222 (version "0.5.6")
8223 (source
8224 (origin
8225 (method url-fetch)
8226 (uri (pypi-uri "pyroute2" version))
8227 (sha256
8228 (base32
8229 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8230 (build-system python-build-system)
8231 (arguments
8232 `(#:python ,python-2)) ;Python 3.x is not supported
8233 (home-page "https://github.com/svinota/pyroute2")
8234 (synopsis "Python netlink library")
8235 (description
8236 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8237 Supported netlink families and protocols include:
8238 @itemize
8239 @item rtnl, network settings - addresses, routes, traffic controls
8240 @item nfnetlink - netfilter API: ipset, nftables, ...
8241 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8242 @item devlink - manage and monitor devlink-enabled hardware
8243 @item generic - generic netlink families
8244 @itemize
8245 @item nl80211 - wireless functions API (basic support)
8246 @item taskstats - extended process statistics
8247 @item acpi_events - ACPI events monitoring
8248 @item thermal_events - thermal events monitoring
8249 @item VFS_DQUOT - disk quota events monitoring
8250 @end itemize
8251 @end itemize")
8252 (license license:gpl2+)))
8253
8254 (define-public python-wrapt
8255 (package
8256 (name "python-wrapt")
8257 (version "1.11.2")
8258 (source
8259 (origin
8260 (method url-fetch)
8261 (uri (pypi-uri "wrapt" version))
8262 (sha256
8263 (base32
8264 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8265 (build-system python-build-system)
8266 (arguments
8267 ;; Tests are not included in the tarball, they are only available in the
8268 ;; git repository.
8269 `(#:tests? #f))
8270 (home-page "https://github.com/GrahamDumpleton/wrapt")
8271 (synopsis "Module for decorators, wrappers and monkey patching")
8272 (description
8273 "The aim of the wrapt module is to provide a transparent object proxy for
8274 Python, which can be used as the basis for the construction of function
8275 wrappers and decorator functions.")
8276 (license license:bsd-2)))
8277
8278 (define-public python2-wrapt
8279 (package-with-python2 python-wrapt))
8280
8281 (define-public python-xlrd
8282 (package
8283 (name "python-xlrd")
8284 (version "1.2.0")
8285 (source (origin
8286 (method url-fetch)
8287 (uri (pypi-uri "xlrd" version))
8288 (sha256
8289 (base32
8290 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8291 (build-system python-build-system)
8292 (arguments
8293 `(#:phases
8294 (modify-phases %standard-phases
8295 ;; Some tests depend on writing a temporary file to the user's home
8296 ;; directory.
8297 (add-after 'unpack 'fix-tests
8298 (lambda _
8299 (delete-file "tests/test_open_workbook.py")
8300 #t)))))
8301 (home-page "http://www.python-excel.org/")
8302 (synopsis "Library for extracting data from Excel files")
8303 (description "This package provides a library to extract data from
8304 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8305 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8306 Unicode-aware. It is not intended as an end-user tool.")
8307 (license license:bsd-3)))
8308
8309 (define-public python2-xlrd
8310 (package-with-python2 python-xlrd))
8311
8312 (define-public python-prettytable
8313 (package
8314 (name "python-prettytable")
8315 (version "0.7.2")
8316 (source
8317 (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8320 (sha256
8321 (base32
8322 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8323 (build-system python-build-system)
8324 (home-page "https://code.google.com/archive/p/prettytable/")
8325 (synopsis "Display tabular data in an ASCII table format")
8326 (description
8327 "A library designed to represent tabular data in visually appealing ASCII
8328 tables. PrettyTable allows for selection of which columns are to be printed,
8329 independent alignment of columns (left or right justified or centred) and
8330 printing of sub-tables by specifying a row range.")
8331 (license license:bsd-3)))
8332
8333 (define-public python2-prettytable
8334 (package-with-python2 python-prettytable))
8335
8336 (define-public python-tables
8337 (package
8338 (name "python-tables")
8339 (version "3.6.1")
8340 (source
8341 (origin
8342 (method url-fetch)
8343 (uri (pypi-uri "tables" version))
8344 (sha256
8345 (base32
8346 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
8347 (modules '((guix build utils)))
8348 (snippet
8349 '(begin
8350 ;; Remove pre-compiled .pyc files from source.
8351 (for-each delete-file-recursively
8352 (find-files "." "__pycache__" #:directories? #t))
8353 (for-each delete-file (find-files "." "\\.pyc$"))
8354 #t))))
8355 (build-system python-build-system)
8356 (arguments
8357 `(;; FIXME: python-build-system does not pass configure-flags to "build"
8358 ;; or "check", so we must override the build and check phases.
8359 #:phases
8360 (modify-phases %standard-phases
8361 (add-after 'unpack 'use-gcc
8362 (lambda _
8363 (substitute* "setup.py"
8364 (("^( +)compiler = new_compiler\\(\\)" line indent)
8365 (string-append line
8366 "\n"
8367 indent
8368 "compiler.set_executables(compiler='gcc',"
8369 "compiler_so='gcc',"
8370 "linker_exe='gcc',"
8371 "linker_so='gcc -shared')")))
8372 #t))
8373 (add-after 'unpack 'disable-tuning
8374 (lambda _
8375 (substitute* "setup.py"
8376 (("cpu_flags = .*")
8377 "cpu_flags = ['sse2']\n"))
8378 #t))
8379 (replace 'build
8380 (lambda* (#:key inputs #:allow-other-keys)
8381 (invoke "python" "setup.py" "build"
8382 (string-append "--hdf5="
8383 (assoc-ref inputs "hdf5")))))
8384 (replace 'check
8385 (lambda* (#:key inputs #:allow-other-keys)
8386 (invoke "python" "setup.py" "check"
8387 (string-append "--hdf5="
8388 (assoc-ref inputs "hdf5"))))))))
8389 (propagated-inputs
8390 `(("python-numexpr" ,python-numexpr)
8391 ("python-numpy" ,python-numpy)))
8392 (native-inputs
8393 `(("python-cython" ,python-cython)
8394 ("pkg-config" ,pkg-config)))
8395 (inputs
8396 `(("hdf5" ,hdf5-1.10)
8397 ("bzip2" ,bzip2)
8398 ("zlib" ,zlib)))
8399 (home-page "https://www.pytables.org/")
8400 (synopsis "Hierarchical datasets for Python")
8401 (description "PyTables is a package for managing hierarchical datasets and
8402 designed to efficiently cope with extremely large amounts of data.")
8403 (license license:bsd-3)))
8404
8405 (define-public python2-tables
8406 (package-with-python2 python-tables))
8407
8408 (define-public python-pytest-black
8409 (package
8410 (name "python-pytest-black")
8411 (version "0.3.8")
8412 (source
8413 (origin
8414 (method url-fetch)
8415 (uri (pypi-uri "pytest-black" version))
8416 (sha256
8417 (base32
8418 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
8419 (build-system python-build-system)
8420 (propagated-inputs
8421 `(("python-pytest" ,python-pytest)
8422 ("python-black" ,python-black)
8423 ("python-toml" ,python-toml)))
8424 (native-inputs
8425 `(("python-setuptools-scm" ,python-setuptools-scm)))
8426 (home-page "https://github.com/shopkeep/pytest-black")
8427 (synopsis "Pytest plugin to enable format checking with black")
8428 (description
8429 "This package provides a pytest plugin to enable format checking with the
8430 Python code formatter \"black\".")
8431 (license license:expat)))
8432
8433 (define-public python-get-version
8434 (package
8435 (name "python-get-version")
8436 (version "2.1")
8437 (source
8438 (origin
8439 (method url-fetch)
8440 (uri (pypi-uri "get_version" version))
8441 (sha256
8442 (base32
8443 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
8444 (build-system python-build-system)
8445 (propagated-inputs
8446 `(("python-pygments" ,python-pygments)
8447 ("python-pytest" ,python-pytest)
8448 ("python-pytest-black" ,python-pytest-black)
8449 ("python-pytest-cov" ,python-pytest-cov)
8450 ("python-setuptools" ,python-setuptools)
8451 ("python-testpath" ,python-testpath)))
8452 (home-page "https://github.com/flying-sheep/get_version")
8453 (synopsis "Version helper in the spirit of versioneer")
8454 (description
8455 "This package provides a version helper that lets you automatically use
8456 the latest @code{vX.X.X} Git tag as the version in your Python package. It
8457 also supports getting the version from Python source distributions or, once
8458 your package is installed, via @code{pkg_resources} (part of
8459 @code{setuptools}).")
8460 (license license:gpl3+)))
8461
8462 (define-public python-legacy-api-wrap
8463 (package
8464 (name "python-legacy-api-wrap")
8465 (version "1.2")
8466 (source
8467 (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "legacy-api-wrap" version))
8470 (sha256
8471 (base32
8472 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
8473 (build-system python-build-system)
8474 (propagated-inputs
8475 `(("python-get-version" ,python-get-version)
8476 ("python-pytest" ,python-pytest)
8477 ("python-pytest-black" ,python-pytest-black)
8478 ("python-pytest-cov" ,python-pytest-cov)
8479 ("python-setuptools" ,python-setuptools)))
8480 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
8481 (synopsis "Legacy API wrapper")
8482 (description "This module defines a decorator to wrap legacy APIs. The
8483 primary use case is APIs defined before keyword-only parameters existed.")
8484 (license license:gpl3+)))
8485
8486 (define-public python-pyasn1
8487 (package
8488 (name "python-pyasn1")
8489 (version "0.4.8")
8490 (source
8491 (origin
8492 (method url-fetch)
8493 (uri (pypi-uri "pyasn1" version))
8494 (sha256
8495 (base32
8496 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
8497 (build-system python-build-system)
8498 (home-page "http://pyasn1.sourceforge.net/")
8499 (synopsis "ASN.1 types and codecs")
8500 (description
8501 "This is an implementation of ASN.1 types and codecs in Python. It is
8502 suitable for a wide range of protocols based on the ASN.1 specification.")
8503 (license license:bsd-2)))
8504
8505 (define-public python2-pyasn1
8506 (package-with-python2 python-pyasn1))
8507
8508 (define-public python-pyasn1-modules
8509 (package
8510 (name "python-pyasn1-modules")
8511 (version "0.2.2")
8512 (source
8513 (origin
8514 (method url-fetch)
8515 (uri (pypi-uri "pyasn1-modules" version))
8516 (sha256
8517 (base32
8518 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
8519 (build-system python-build-system)
8520 (propagated-inputs
8521 `(("python-pyasn1" ,python-pyasn1)))
8522 (home-page "https://sourceforge.net/projects/pyasn1/")
8523 (synopsis "ASN.1 codec implementations")
8524 (description
8525 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
8526 implementations of ASN.1-based codecs and protocols.")
8527 (license license:bsd-3)))
8528
8529 (define-public python2-pyasn1-modules
8530 (package-with-python2 python-pyasn1-modules))
8531
8532 (define-public python-ipaddress
8533 (package
8534 (name "python-ipaddress")
8535 (version "1.0.22")
8536 (source (origin
8537 (method url-fetch)
8538 (uri (pypi-uri "ipaddress" version))
8539 (sha256
8540 (base32
8541 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
8542 (build-system python-build-system)
8543 (home-page "https://github.com/phihag/ipaddress")
8544 (synopsis "IP address manipulation library")
8545 (description
8546 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
8547 in Python. This library is used to create, poke at, and manipulate IPv4 and
8548 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
8549 module to older versions of Python.")
8550 (license license:psfl)))
8551
8552 (define-public python2-ipaddress
8553 (package-with-python2 python-ipaddress))
8554
8555 (define-public python2-ipaddr
8556 (package
8557 (name "python2-ipaddr")
8558 (version "2.1.11")
8559 (source
8560 (origin
8561 (method url-fetch)
8562 (uri (pypi-uri "ipaddr" version))
8563 (sha256
8564 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
8565 (build-system python-build-system)
8566 (arguments
8567 `(#:python ,python-2 ;version 2 only
8568 #:phases
8569 (modify-phases %standard-phases
8570 (replace 'check
8571 (lambda _ (invoke "python" "ipaddr_test.py"))))))
8572 (home-page "https://github.com/google/ipaddr-py")
8573 (synopsis "IP address manipulation library")
8574 (description
8575 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
8576 IPv6 addresses and networks.
8577
8578 For new implementations you may prefer to use the standard module
8579 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
8580 versions of Python.")
8581 (license license:asl2.0)))
8582
8583 (define-public python-idna
8584 (package
8585 (name "python-idna")
8586 (version "2.9")
8587 (source
8588 (origin
8589 (method url-fetch)
8590 (uri (pypi-uri "idna" version))
8591 (sha256
8592 (base32
8593 "1jxp2pdi8y4asi7ka1zhx3yx09kv8kzj533f0ds7viz49b0x323m"))))
8594 (build-system python-build-system)
8595 (home-page "https://github.com/kjd/idna")
8596 (synopsis "Internationalized domain names in applications")
8597 (description
8598 "This is a library to support the Internationalised Domain Names in
8599 Applications (IDNA) protocol as specified in RFC 5891. This version of the
8600 protocol is often referred to as “IDNA2008” and can produce different results
8601 from the earlier standard from 2003. The library is also intended to act as a
8602 suitable drop-in replacement for the “encodings.idna” module that comes with
8603 the Python standard library but currently only supports the older 2003
8604 specification.")
8605 (license license:bsd-4)))
8606
8607 (define-public python-idna-2.7
8608 (package (inherit python-idna)
8609 (version "2.7")
8610 (source (origin
8611 (method url-fetch)
8612 (uri (pypi-uri "idna" version))
8613 (sha256
8614 (base32
8615 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
8616
8617
8618 (define-public python2-idna
8619 (package-with-python2 python-idna))
8620
8621 (define-public python-idna-ssl
8622 (package
8623 (name "python-idna-ssl")
8624 (version "1.0.1")
8625 (source
8626 (origin
8627 (method url-fetch)
8628 (uri (pypi-uri "idna-ssl" version))
8629 (sha256
8630 (base32
8631 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
8632 (build-system python-build-system)
8633 (arguments
8634 `(#:tests? #f)) ;circular dependency with python-aiohttp
8635 (home-page "https://github.com/aio-libs/idna-ssl")
8636 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
8637 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
8638 domains support.")
8639 (license license:expat)))
8640
8641 (define-public python-pretend
8642 (package
8643 (name "python-pretend")
8644 (version "1.0.9")
8645 (source
8646 (origin
8647 (method url-fetch)
8648 (uri (pypi-uri "pretend" version))
8649 (sha256
8650 (base32
8651 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
8652 (build-system python-build-system)
8653 (home-page "https://github.com/alex/pretend")
8654 (synopsis "Library for stubbing in Python")
8655 (description
8656 "Pretend is a library to make stubbing with Python easier. Stubbing is a
8657 technique for writing tests. You may hear the term mixed up with mocks,
8658 fakes, or doubles. Basically, a stub is an object that returns pre-canned
8659 responses, rather than doing any computation.")
8660 (license license:bsd-3)))
8661
8662 (define-public python2-pretend
8663 (package-with-python2 python-pretend))
8664
8665 (define-public python-pip
8666 (package
8667 (name "python-pip")
8668 (version "20.0.2")
8669 (source
8670 (origin
8671 (method url-fetch)
8672 (uri (pypi-uri "pip" version))
8673 (sha256
8674 (base32
8675 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
8676 (build-system python-build-system)
8677 (arguments
8678 '(#:tests? #f)) ; there are no tests in the pypi archive.
8679 (home-page "https://pip.pypa.io/")
8680 (synopsis "Package manager for Python software")
8681 (description
8682 "Pip is a package manager for Python software, that finds packages on the
8683 Python Package Index (PyPI).")
8684 (license license:expat)))
8685
8686 (define-public python2-pip
8687 (package-with-python2 python-pip))
8688
8689 (define-public python-tlsh
8690 (package
8691 (name "python-tlsh")
8692 (version "3.4.5")
8693 (home-page "https://github.com/trendmicro/tlsh")
8694 (source
8695 (origin
8696 (method git-fetch)
8697 (uri (git-reference
8698 (url "https://github.com/trendmicro/tlsh.git")
8699 (commit (string-append "v" version))))
8700 (file-name (git-file-name name version))
8701 (sha256
8702 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
8703 (build-system cmake-build-system)
8704 (arguments
8705 '(#:out-of-source? #f
8706 #:phases (modify-phases %standard-phases
8707 (replace
8708 'install
8709 (lambda* (#:key outputs #:allow-other-keys)
8710 ;; Build and install the Python bindings. The underlying
8711 ;; C++ library is apparently not meant to be installed.
8712 (let ((out (assoc-ref outputs "out")))
8713 (with-directory-excursion "py_ext"
8714 (and (system* "python" "setup.py" "build")
8715 (system* "python" "setup.py" "install"
8716 (string-append "--prefix=" out))))))))))
8717 (inputs `(("python" ,python-wrapper))) ;for the bindings
8718 (synopsis "Fuzzy matching library for Python")
8719 (description
8720 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8721 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8722 value which can be used for similarity comparisons. Similar objects have
8723 similar hash values, which allows for the detection of similar objects by
8724 comparing their hash values. The byte stream should have a sufficient amount
8725 of complexity; for example, a byte stream of identical bytes will not generate
8726 a hash value.")
8727 (license license:asl2.0)))
8728
8729 (define-public python2-tlsh
8730 (package
8731 (inherit python-tlsh)
8732 (name "python2-tlsh")
8733 (inputs `(("python" ,python-2)))))
8734
8735 (define-public python-termcolor
8736 (package
8737 (name "python-termcolor")
8738 (version "1.1.0")
8739 (source
8740 (origin
8741 (method url-fetch)
8742 (uri (pypi-uri "termcolor" version))
8743 (sha256
8744 (base32
8745 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8746 (build-system python-build-system)
8747 (arguments
8748 ;; There are no tests.
8749 `(#:tests? #f))
8750 (home-page "https://pypi.org/project/termcolor/")
8751 (synopsis "ANSII Color formatting for terminal output")
8752 (description
8753 "This package provides ANSII Color formatting for output in terminals.")
8754 (license license:expat)))
8755
8756 (define-public python2-termcolor
8757 (package-with-python2 python-termcolor))
8758
8759 (define-public python-libarchive-c
8760 (package
8761 (name "python-libarchive-c")
8762 (version "2.9")
8763 (source (origin
8764 (method url-fetch)
8765 (uri (pypi-uri "libarchive-c" version))
8766 (sha256
8767 (base32
8768 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
8769 (build-system python-build-system)
8770 (arguments
8771 '(#:phases (modify-phases %standard-phases
8772 (add-before
8773 'build 'reference-libarchive
8774 (lambda* (#:key inputs #:allow-other-keys)
8775 ;; Retain the absolute file name of libarchive.so.
8776 (let ((libarchive (assoc-ref inputs "libarchive")))
8777 (substitute* "libarchive/ffi.py"
8778 (("find_library\\('archive'\\)")
8779 (string-append "'" libarchive
8780 "/lib/libarchive.so'"))))))
8781 (replace 'check
8782 (lambda _ (invoke "pytest" "-vv"))))))
8783 (native-inputs
8784 `(("python-mock" ,python-mock)
8785 ("python-pytest" ,python-pytest)))
8786 (inputs
8787 `(("libarchive" ,libarchive)))
8788 (home-page "https://github.com/Changaco/python-libarchive-c")
8789 (synopsis "Python interface to libarchive")
8790 (description
8791 "This package provides Python bindings to libarchive, a C library to
8792 access possibly compressed archives in many different formats. It uses
8793 Python's @code{ctypes} foreign function interface (FFI).")
8794 (license license:lgpl2.0+)))
8795
8796 (define-public python2-libarchive-c
8797 (package-with-python2 python-libarchive-c))
8798
8799 (define-public python-file
8800 (package
8801 (inherit file)
8802 (name "python-file")
8803 (build-system python-build-system)
8804 (arguments
8805 '(#:tests? #f ;no tests
8806 #:configure-flags '("--single-version-externally-managed" "--root=/")
8807 #:phases (modify-phases %standard-phases
8808 (add-before 'build 'change-directory
8809 (lambda _
8810 (chdir "python")
8811 #t))
8812 (add-before 'build 'set-library-file-name
8813 (lambda* (#:key inputs #:allow-other-keys)
8814 (let ((file (assoc-ref inputs "file")))
8815 (substitute* "magic.py"
8816 (("find_library\\('magic'\\)")
8817 (string-append "'" file "/lib/libmagic.so'")))
8818 #t))))))
8819 (inputs `(("file" ,file)))
8820 (native-inputs (if (%current-target-system)
8821 `(("self" ,this-package))
8822 '()))
8823 (synopsis "Python bindings to the libmagic file type guesser. Note that
8824 this module and the python-magic module both provide a \"magic.py\" file;
8825 these two modules, which are different and were developed separately, both
8826 serve the same purpose: provide Python bindings for libmagic.")))
8827
8828 (define-public python2-file
8829 (package-with-python2 python-file))
8830
8831 (define-public python-debian
8832 (package
8833 (name "python-debian")
8834 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
8835 (version "0.1.36")
8836 (source
8837 (origin
8838 ;; Use git-fetch, as pypi doesn't include test suite.
8839 (method git-fetch)
8840 (uri (git-reference
8841 (url home-page)
8842 (commit version)))
8843 (file-name (git-file-name name version))
8844 (sha256
8845 (base32
8846 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
8847 (build-system python-build-system)
8848 (arguments
8849 `(#:phases (modify-phases %standard-phases
8850 (add-after 'unpack 'remove-debian-specific-tests
8851 ;; python-apt, apt and dpkg are not yet available in guix,
8852 ;; and these tests heavily depend on them.
8853 (lambda _
8854 (delete-file "lib/debian/tests/test_deb822.py")
8855 (delete-file "lib/debian/tests/test_debfile.py")
8856 #t)))))
8857 (propagated-inputs
8858 `(("python-six" ,python-six)
8859 ("python-chardet" ,python-chardet)))
8860 (synopsis "Debian package related modules")
8861 (description
8862 ;; XXX: Use @enumerate instead of @itemize to work around
8863 ;; <http://bugs.gnu.org/21772>.
8864 "This package provides Python modules that abstract many formats of
8865 Debian-related files, such as:
8866
8867 @enumerate
8868 @item Debtags information;
8869 @item @file{debian/changelog} files;
8870 @item packages files, pdiffs;
8871 @item control files of single or multiple RFC822-style paragraphs---e.g.
8872 @file{debian/control}, @file{.changes}, @file{.dsc};
8873 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8874 contained files and meta-information.
8875 @end enumerate\n")
8876
8877 ;; Modules are either GPLv2+ or GPLv3+.
8878 (license license:gpl3+)))
8879
8880 (define-public python-nbformat
8881 (package
8882 (name "python-nbformat")
8883 (version "4.4.0")
8884 (source
8885 (origin
8886 (method url-fetch)
8887 (uri (pypi-uri "nbformat" version))
8888 (sha256
8889 (base32
8890 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8891 (build-system python-build-system)
8892 (arguments `(#:tests? #f)) ; no test target
8893 (propagated-inputs
8894 `(("python-ipython-genutils" ,python-ipython-genutils)
8895 ("python-jsonschema" ,python-jsonschema)
8896 ("python-jupyter-core" ,python-jupyter-core)
8897 ("python-traitlets" ,python-traitlets)))
8898 (home-page "http://jupyter.org")
8899 (synopsis "Jupyter Notebook format")
8900 (description "This package provides the reference implementation of the
8901 Jupyter Notebook format and Python APIs for working with notebooks.")
8902 (license license:bsd-3)))
8903
8904 (define-public python2-nbformat
8905 (package-with-python2 python-nbformat))
8906
8907 (define-public python-bleach
8908 (package
8909 (name "python-bleach")
8910 (version "3.1.3")
8911 (source
8912 (origin
8913 (method url-fetch)
8914 (uri (pypi-uri "bleach" version))
8915 (sha256
8916 (base32
8917 "0al437aw4p2xp83az5hhlrp913nsf0cg6kg4qj3fjhv4wakxipzq"))))
8918 (build-system python-build-system)
8919 (propagated-inputs
8920 `(("python-webencodings" ,python-webencodings)
8921 ("python-six" ,python-six)))
8922 (native-inputs
8923 `(("python-datrie" ,python-datrie)
8924 ("python-genshi" ,python-genshi)
8925 ("python-lxml" ,python-lxml)
8926 ("python-pytest" ,python-pytest)))
8927 (home-page "https://github.com/mozilla/bleach")
8928 (synopsis "Whitelist-based HTML-sanitizing tool")
8929 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8930 (license license:asl2.0)))
8931
8932 (define-public python2-bleach
8933 (package-with-python2 python-bleach))
8934
8935 (define-public python-entrypoints
8936 (package
8937 (name "python-entrypoints")
8938 (version "0.3")
8939 (source
8940 (origin
8941 (method url-fetch)
8942 (uri (pypi-uri "entrypoints" version))
8943 (sha256
8944 (base32
8945 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
8946 (build-system python-build-system)
8947 ;; The package does not come with a setup.py file, so we have to generate
8948 ;; one ourselves.
8949 (arguments
8950 `(#:tests? #f
8951 #:phases
8952 (modify-phases %standard-phases
8953 (add-after 'unpack 'create-setup.py
8954 (lambda _
8955 (call-with-output-file "setup.py"
8956 (lambda (port)
8957 (format port "\
8958 from setuptools import setup
8959 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8960 " ,version))))))))
8961 (home-page "https://github.com/takluyver/entrypoints")
8962 (synopsis "Discover and load entry points from installed Python packages")
8963 (description "Entry points are a way for Python packages to advertise
8964 objects with some common interface. The most common examples are
8965 @code{console_scripts} entry points, which define shell commands by
8966 identifying a Python function to run. The @code{entrypoints} module contains
8967 functions to find and load entry points.")
8968 (license license:expat)))
8969
8970 (define-public python2-entrypoints
8971 (package-with-python2 python-entrypoints))
8972
8973 (define-public python-epc
8974 (package
8975 (name "python-epc")
8976 (version "0.0.5")
8977 (source
8978 (origin
8979 (method url-fetch)
8980 (uri (pypi-uri "epc" version))
8981 (sha256
8982 (base32
8983 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
8984 (build-system python-build-system)
8985 (propagated-inputs
8986 `(("python-sexpdata" ,python-sexpdata)))
8987 (native-inputs
8988 `(("python-nose" ,python-nose)))
8989 (home-page "https://github.com/tkf/python-epc")
8990 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
8991 (description
8992 "Python-EPC can call elisp functions from Python and Python functions
8993 from elisp.")
8994 (license license:gpl3)))
8995
8996 (define-public python-nbconvert
8997 (package
8998 (name "python-nbconvert")
8999 (version "5.0.0b1")
9000 (source
9001 (origin
9002 (method url-fetch)
9003 (uri (pypi-uri "nbconvert" version))
9004 (sha256
9005 (base32
9006 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9007 (build-system python-build-system)
9008 (arguments
9009 `(;; The "bdist_egg" target is disabled by default, causing the installation
9010 ;; to fail.
9011 #:configure-flags (list "bdist_egg")
9012 ;; FIXME: 5 failures, 40 errors.
9013 #:tests? #f))
9014 ;; #:phases
9015 ;; (modify-phases %standard-phases
9016 ;; (replace 'check
9017 ;; (lambda _
9018 ;; (zero? (system* "py.test" "-v")))))
9019 (native-inputs
9020 `(("python-pytest" ,python-pytest)))
9021 (propagated-inputs
9022 `(("python-bleach" ,python-bleach)
9023 ("python-entrypoints" ,python-entrypoints)
9024 ("python-jinja2" ,python-jinja2)
9025 ("python-jupyter-core" ,python-jupyter-core)
9026 ("python-mistune" ,python-mistune)
9027 ("python-nbformat" ,python-nbformat)
9028 ("python-pygments" ,python-pygments)
9029 ("python-traitlets" ,python-traitlets)))
9030 (home-page "http://jupyter.org")
9031 (synopsis "Converting Jupyter Notebooks")
9032 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9033 notebooks to various other formats via Jinja templates. It allows you to
9034 convert an @code{.ipynb} notebook file into various static formats including:
9035
9036 @enumerate
9037 @item HTML
9038 @item LaTeX
9039 @item PDF
9040 @item Reveal JS
9041 @item Markdown (md)
9042 @item ReStructured Text (rst)
9043 @item executable script
9044 @end enumerate\n")
9045 (license license:bsd-3)))
9046
9047 (define-public python2-nbconvert
9048 (package-with-python2 python-nbconvert))
9049
9050 (define-public python-notebook
9051 (package
9052 (name "python-notebook")
9053 (version "5.7.4")
9054 (source (origin
9055 (method url-fetch)
9056 (uri (pypi-uri "notebook" version))
9057 (sha256
9058 (base32
9059 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9060 (build-system python-build-system)
9061 (arguments
9062 `(#:phases
9063 (modify-phases %standard-phases
9064 (replace 'check
9065 (lambda _
9066 ;; These tests require a browser
9067 (delete-file-recursively "notebook/tests/selenium")
9068 ;; Some tests need HOME
9069 (setenv "HOME" "/tmp")
9070 ;; This file contains "warningfilters", which are not supported
9071 ;; by this version of nose.
9072 (delete-file "setup.cfg")
9073 (with-directory-excursion "/tmp"
9074 (invoke "nosetests" "-v"))
9075 #t)))))
9076 (propagated-inputs
9077 `(("python-jupyter-core" ,python-jupyter-core)
9078 ("python-nbformat" ,python-nbformat)
9079 ("python-nbconvert" ,python-nbconvert)
9080 ("python-prometheus-client" ,python-prometheus-client)
9081 ("python-send2trash" ,python-send2trash)
9082 ("python-terminado" ,python-terminado)))
9083 (native-inputs
9084 `(("python-nose" ,python-nose)
9085 ("python-sphinx" ,python-sphinx)
9086 ("python-requests" ,python-requests)))
9087 (home-page "http://jupyter.org/")
9088 (synopsis "Web-based notebook environment for interactive computing")
9089 (description
9090 "The Jupyter HTML notebook is a web-based notebook environment for
9091 interactive computing.")
9092 (properties `((python2-variant . ,(delay python2-notebook))))
9093 (license license:bsd-3)))
9094
9095 (define-public python2-notebook
9096 (let ((base (package-with-python2
9097 (strip-python2-variant python-notebook))))
9098 (package (inherit base)
9099 (native-inputs
9100 `(("python2-mock" ,python2-mock)
9101 ,@(package-native-inputs base)))
9102 (arguments
9103 (substitute-keyword-arguments (package-arguments base)
9104 ((#:phases phases)
9105 `(modify-phases ,phases
9106 (add-before 'check 'disable-test-case
9107 ;; The test requires network access to localhost. Curiously it
9108 ;; fails with Python 2 only. Simply make the test-case return
9109 ;; immediately.
9110 (lambda _
9111 (substitute*
9112 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9113 (("formats = self.nbconvert_api") "return #")))))))))))
9114
9115 (define-public python-widgetsnbextension
9116 (package
9117 (name "python-widgetsnbextension")
9118 (version "3.5.1")
9119 (source
9120 (origin
9121 (method url-fetch)
9122 (uri (pypi-uri "widgetsnbextension" version))
9123 (sha256
9124 (base32
9125 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9126 (build-system python-build-system)
9127 (propagated-inputs
9128 `(("python-ipykernel" ,python-ipykernel)
9129 ("python-notebook" ,python-notebook)))
9130 (native-inputs
9131 `(("python-certifi" ,python-certifi)
9132 ("python-nose" ,python-nose)))
9133 (home-page "https://ipython.org")
9134 (synopsis "IPython HTML widgets for Jupyter")
9135 (description "This package provides interactive HTML widgets for Jupyter
9136 notebooks.")
9137 (license license:bsd-3)))
9138
9139 (define-public python2-widgetsnbextension
9140 (package-with-python2 python-widgetsnbextension))
9141
9142 (define-public python-ipywidgets
9143 (package
9144 (name "python-ipywidgets")
9145 (version "7.5.1")
9146 (source
9147 (origin
9148 (method url-fetch)
9149 (uri (pypi-uri "ipywidgets" version))
9150 (sha256
9151 (base32
9152 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
9153 (build-system python-build-system)
9154 (propagated-inputs
9155 `(("python-ipython" ,python-ipython)
9156 ("python-traitlets" ,python-traitlets)
9157 ("python-widgetsnbextension" ,python-widgetsnbextension)))
9158 (native-inputs
9159 `(("python-nose" ,python-nose)
9160 ("python-pytest" ,python-pytest)))
9161 (home-page "https://ipython.org")
9162 (synopsis "IPython HTML widgets for Jupyter")
9163 (description "Ipywidgets are interactive HTML widgets for Jupyter
9164 notebooks and the IPython kernel. Notebooks come alive when interactive
9165 widgets are used. Users gain control of their data and can visualize changes
9166 in the data.")
9167 (license license:bsd-3)))
9168
9169 (define-public python2-ipywidgets
9170 (package-with-python2 python-ipywidgets))
9171
9172 (define-public python-jupyter-console
9173 (package
9174 (name "python-jupyter-console")
9175 (version "6.1.0")
9176 (source
9177 (origin
9178 (method url-fetch)
9179 (uri (pypi-uri "jupyter_console" version))
9180 (sha256
9181 (base32
9182 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
9183 (build-system python-build-system)
9184 (propagated-inputs
9185 `(("python-ipykernel" ,python-ipykernel)
9186 ("python-jupyter-client" ,python-jupyter-client)
9187 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
9188 ("python-pygments" ,python-pygments)))
9189 (native-inputs
9190 `(("python-nose" ,python-nose)))
9191 (home-page "https://jupyter.org")
9192 (synopsis "Jupyter terminal console")
9193 (description "This package provides a terminal-based console frontend for
9194 Jupyter kernels. It also allows for console-based interaction with non-Python
9195 Jupyter kernels such as IJulia and IRKernel.")
9196 (properties `((python2-variant . ,(delay python2-jupyter-console))))
9197 (license license:bsd-3)))
9198
9199 (define-public python2-jupyter-console
9200 (package
9201 (name "python2-jupyter-console")
9202 (version "5.2.0")
9203 (source
9204 (origin
9205 (method url-fetch)
9206 (uri (pypi-uri "jupyter_console" version))
9207 (sha256
9208 (base32
9209 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
9210 (build-system python-build-system)
9211 (arguments
9212 `(#:python ,python-2
9213 #:tests? #f)) ; Tests only run in a TTY.
9214 (propagated-inputs
9215 `(("python2-ipykernel" ,python2-ipykernel)
9216 ("python2-jupyter-client" ,python2-jupyter-client)
9217 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
9218 ("python2-pygments" ,python2-pygments)))
9219 (native-inputs
9220 `(("python2-nose" ,python2-nose)))
9221 (home-page "https://jupyter.org")
9222 (synopsis "Jupyter terminal console")
9223 (description "This package provides a terminal-based console frontend for
9224 Jupyter kernels. It also allows for console-based interaction with non-Python
9225 Jupyter kernels such as IJulia and IRKernel.")
9226 (license license:bsd-3)))
9227
9228 ;; The python-ipython and python-jupyter-console require each other. To get
9229 ;; the functionality in both packages working, strip down the
9230 ;; python-jupyter-console package when using it as an input to python-ipython.
9231 (define python-jupyter-console-minimal
9232 (package
9233 (inherit python-jupyter-console)
9234 (name "python-jupyter-console-minimal")
9235 (arguments
9236 (substitute-keyword-arguments
9237 (package-arguments python-jupyter-console)
9238 ((#:phases phases)
9239 `(modify-phases ,phases
9240 (add-after 'install 'delete-bin
9241 (lambda* (#:key outputs #:allow-other-keys)
9242 ;; Delete the bin files, to avoid conflicts in profiles
9243 ;; where python-ipython and python-jupyter-console are
9244 ;; both present.
9245 (delete-file-recursively
9246 (string-append
9247 (assoc-ref outputs "out") "/bin"))))))))
9248 ;; Remove the python-ipython propagated input, to avoid the cycle
9249 (propagated-inputs
9250 (alist-delete
9251 "python-ipython"
9252 (package-propagated-inputs python-jupyter-console)))))
9253
9254 (define-public python-qtconsole
9255 (package
9256 (name "python-qtconsole")
9257 (version "4.4.3")
9258 (source
9259 (origin
9260 (method url-fetch)
9261 (uri (pypi-uri "qtconsole" version))
9262 (sha256
9263 (base32
9264 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
9265 (build-system python-build-system)
9266 (arguments
9267 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
9268 ;; but we only have the LTS version 5.x. This means that there might be
9269 ;; runtime errors, but since this is a dependency of the Jupyter package,
9270 ;; and Jupyter can be used without the qtconsole we can overlook this for
9271 ;; now.
9272 `(#:tests? #f
9273 #:phases
9274 (modify-phases %standard-phases
9275 (add-before 'check 'pre-check
9276 (lambda _
9277 (setenv "QT_QPA_PLATFORM" "offscreen")
9278 #t)))))
9279 (propagated-inputs
9280 `(("python-ipykernel" ,python-ipykernel)
9281 ("python-ipython" ,python-ipython)))
9282 (native-inputs
9283 `(("python-pytest" ,python-pytest)))
9284 (home-page "http://jupyter.org")
9285 (synopsis "Jupyter Qt console")
9286 (description "This package provides a Qt-based console for Jupyter with
9287 support for rich media output.")
9288 (license license:bsd-3)))
9289
9290 (define-public python-jsbeautifier
9291 (package
9292 (name "python-jsbeautifier")
9293 (version "1.10.2")
9294 (home-page "https://github.com/beautify-web/js-beautify")
9295 (source (origin
9296 (method git-fetch)
9297 (uri (git-reference
9298 (url home-page)
9299 (commit (string-append "v" version))))
9300 (file-name (git-file-name name version))
9301 (sha256
9302 (base32
9303 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
9304 (build-system python-build-system)
9305 (arguments
9306 `(#:phases (modify-phases %standard-phases
9307 (add-after 'unpack 'chdir
9308 (lambda _
9309 ;; The upstream Git repository contains all the code,
9310 ;; but this package only builds the python code.
9311 (chdir "python")
9312 #t))
9313 (add-after 'unpack 'patch-python-six-requirements
9314 (lambda _
9315 (substitute* "python/setup.py"
9316 (("six>=1.12.0")
9317 "six>=1.11.0"))
9318 #t)))))
9319 (propagated-inputs
9320 `(("python-editorconfig" ,python-editorconfig)
9321 ("python-six" ,python-six)))
9322 (native-inputs
9323 `(("python-pytest" ,python-pytest)))
9324 (synopsis "JavaScript unobfuscator and beautifier")
9325 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
9326 popular online obfuscators.")
9327 (license license:expat)))
9328
9329 (define-public jupyter
9330 (package
9331 (name "jupyter")
9332 (version "1.0.0")
9333 (source
9334 (origin
9335 (method url-fetch)
9336 (uri (pypi-uri "jupyter" version))
9337 (sha256
9338 (base32
9339 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
9340 (build-system python-build-system)
9341 (arguments '(#:tests? #f)) ; there are none.
9342 (propagated-inputs
9343 `(("python-ipykernel" ,python-ipykernel)
9344 ("python-ipywidgets" ,python-ipywidgets)
9345 ("python-jupyter-console" ,python-jupyter-console)
9346 ("python-nbconvert" ,python-nbconvert)
9347 ("python-notebook" ,python-notebook)
9348 ("python-qtconsole" ,python-qtconsole)))
9349 (native-search-paths
9350 (list (search-path-specification
9351 (variable "JUPYTER_PATH")
9352 (files '("share/jupyter")))))
9353 (home-page "https://jupyter.org")
9354 (synopsis "Web application for interactive documents")
9355 (description
9356 "The Jupyter Notebook is a web application that allows you to create and
9357 share documents that contain live code, equations, visualizations and
9358 explanatory text. Uses include: data cleaning and transformation, numerical
9359 simulation, statistical modeling, machine learning and much more.")
9360 (license license:bsd-3)))
9361
9362 (define-public python-chardet
9363 (package
9364 (name "python-chardet")
9365 (version "3.0.4")
9366 (source
9367 (origin
9368 (method url-fetch)
9369 (uri (pypi-uri "chardet" version))
9370 (sha256
9371 (base32
9372 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
9373 (native-inputs
9374 `(("python-hypothesis" ,python-hypothesis)
9375 ("python-pytest" ,python-pytest)
9376 ("python-pytest-runner" ,python-pytest-runner)))
9377 (build-system python-build-system)
9378 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
9379 (arguments `(#:tests? #f))
9380 (home-page "https://github.com/chardet/chardet")
9381 (synopsis "Universal encoding detector for Python 2 and 3")
9382 (description
9383 "This package provides @code{chardet}, a Python module that can
9384 automatically detect a wide range of file encodings.")
9385 (license license:lgpl2.1+)))
9386
9387 (define-public python2-chardet
9388 (package-with-python2 python-chardet))
9389
9390 (define-public python-docopt
9391 (package
9392 (name "python-docopt")
9393 (version "0.6.2")
9394 (source
9395 (origin
9396 (method git-fetch)
9397 ;; The release on PyPI does not include tests.
9398 (uri (git-reference
9399 (url "https://github.com/docopt/docopt")
9400 (commit version)))
9401 (file-name (git-file-name name version))
9402 (sha256
9403 (base32
9404 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
9405 (build-system python-build-system)
9406 (native-inputs
9407 `(("python-pytest" ,python-pytest)))
9408 (arguments
9409 `(#:phases
9410 (modify-phases %standard-phases
9411 (replace 'check
9412 (lambda _ (invoke "py.test"))))))
9413 (home-page "http://docopt.org")
9414 (synopsis "Command-line interface description language for Python")
9415 (description "This library allows the user to define a command-line
9416 interface from a program's help message rather than specifying it
9417 programmatically with command-line parsers like @code{getopt} and
9418 @code{argparse}.")
9419 (license license:expat)))
9420
9421 (define-public python2-docopt
9422 (package-with-python2 python-docopt))
9423
9424 (define-public python-pythondialog
9425 (package
9426 (name "python-pythondialog")
9427 (version "3.4.0")
9428 (source
9429 (origin
9430 (method url-fetch)
9431 (uri (pypi-uri "pythondialog" version))
9432 (sha256
9433 (base32
9434 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
9435 (build-system python-build-system)
9436 (arguments
9437 `(#:phases
9438 (modify-phases %standard-phases
9439 (add-after 'unpack 'patch-path
9440 (lambda* (#:key inputs #:allow-other-keys)
9441 (let* ((dialog (assoc-ref inputs "dialog")))
9442 ;; Since this library really wants to grovel the search path, we
9443 ;; must hardcode dialog's store path into it.
9444 (substitute* "dialog.py"
9445 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
9446 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
9447 #t))))
9448 #:tests? #f)) ; no test suite
9449 (propagated-inputs
9450 `(("dialog" ,dialog)))
9451 (home-page "http://pythondialog.sourceforge.net/")
9452 (synopsis "Python interface to the UNIX dialog utility")
9453 (description "A Python wrapper for the dialog utility. Its purpose is to
9454 provide an easy to use, pythonic and comprehensive Python interface to dialog.
9455 This allows one to make simple text-mode user interfaces on Unix-like systems")
9456 (license license:lgpl2.1)
9457 (properties `((python2-variant . ,(delay python2-pythondialog))))))
9458
9459 (define-public python2-pythondialog
9460 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
9461 (package
9462 (inherit base)
9463 (version (package-version python-pythondialog))
9464 (source (origin
9465 (method url-fetch)
9466 (uri (pypi-uri "python2-pythondialog" version))
9467 (sha256
9468 (base32
9469 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
9470
9471 (define-public python-configobj
9472 (package
9473 (name "python-configobj")
9474 (version "5.0.6")
9475 (source (origin
9476 (method url-fetch)
9477 (uri (pypi-uri "configobj" version))
9478 (sha256
9479 (base32
9480 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9481 ;; Patch setup.py so it looks for python-setuptools, which is
9482 ;; required to parse the keyword 'install_requires' in setup.py.
9483 (patches (search-patches "python-configobj-setuptools.patch"))))
9484 (build-system python-build-system)
9485 (propagated-inputs
9486 `(("python-six" ,python-six)))
9487 (synopsis "Config file reading, writing and validation")
9488 (description "ConfigObj is a simple but powerful config file reader and
9489 writer: an ini file round tripper. Its main feature is that it is very easy to
9490 use, with a straightforward programmer’s interface and a simple syntax for
9491 config files.")
9492 (home-page "https://github.com/DiffSK/configobj")
9493 (license license:bsd-3)))
9494
9495 (define-public python2-configobj
9496 (package-with-python2 python-configobj))
9497
9498 (define-public python-configargparse
9499 (package
9500 (name "python-configargparse")
9501 (version "0.14.0")
9502 (source (origin
9503 (method url-fetch)
9504 (uri (pypi-uri "ConfigArgParse" version))
9505 (sha256
9506 (base32
9507 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
9508 (build-system python-build-system)
9509 (native-inputs
9510 `(("python-pyyaml" ,python-pyyaml)))
9511 (arguments
9512 `(#:phases
9513 (modify-phases %standard-phases
9514 (replace 'check
9515 (lambda _
9516 ;; Bypass setuptools-shim because one test relies on "setup.py"
9517 ;; being the first argument passed to the python call.
9518 ;;
9519 ;; NOTE: Many tests do not run because they rely on Python's
9520 ;; built-in test.test_argparse, but we remove the unit tests from
9521 ;; our Python installation.
9522 (invoke "python" "setup.py" "test"))))))
9523 (synopsis "Replacement for argparse")
9524 (description "A drop-in replacement for argparse that allows options to also
9525 be set via config files and/or environment variables.")
9526 (home-page "https://github.com/bw2/ConfigArgParse")
9527 (license license:expat)))
9528
9529 (define-public python2-configargparse
9530 (package-with-python2 python-configargparse))
9531
9532 (define-public python-argparse-manpage
9533 (package
9534 (name "python-argparse-manpage")
9535 (version "1.1")
9536 (source
9537 (origin
9538 (method url-fetch)
9539 (uri (pypi-uri "argparse-manpage" version))
9540 (sha256
9541 (base32
9542 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
9543 (build-system python-build-system)
9544 (home-page "https://github.com/praiskup/argparse-manpage")
9545 (synopsis "Build manual page from Python's ArgumentParser object")
9546 (description
9547 "This package provides tools to build manual pages from Python's
9548 @code{ArgumentParser} object.")
9549 (license license:asl2.0)))
9550
9551 (define-public python-contextlib2
9552 (package
9553 (name "python-contextlib2")
9554 (version "0.6.0.post1")
9555 (source
9556 (origin
9557 (method url-fetch)
9558 (uri (pypi-uri "contextlib2" version))
9559 (sha256
9560 (base32
9561 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
9562 (build-system python-build-system)
9563 (home-page "https://contextlib2.readthedocs.org/")
9564 (synopsis "Tools for decorators and context managers")
9565 (description "This module is primarily a backport of the Python
9566 3.2 contextlib to earlier Python versions. Like contextlib, it
9567 provides utilities for common tasks involving decorators and context
9568 managers. It also contains additional features that are not part of
9569 the standard library.")
9570 (properties `((python2-variant . ,(delay python2-contextlib2))))
9571 (license license:psfl)))
9572
9573 (define-public python2-contextlib2
9574 (let ((base (package-with-python2
9575 (strip-python2-variant python-contextlib2))))
9576 (package
9577 (inherit base)
9578 (arguments
9579 (substitute-keyword-arguments (package-arguments base)
9580 ((#:phases phases)
9581 `(modify-phases ,phases
9582 (replace 'check
9583 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
9584 (native-inputs
9585 `(("python2-unittest2" ,python2-unittest2))))))
9586
9587 ;; This package is used by python2-pytest via python2-importlib-metadata,
9588 ;; and thus can not depend on python-unittest2 (which depends on pytest).
9589 (define-public python2-contextlib2-bootstrap
9590 (hidden-package
9591 (package/inherit
9592 python2-contextlib2
9593 (name "python2-contextlib2-bootstrap")
9594 (arguments
9595 `(#:tests? #f
9596 ,@(package-arguments python2-contextlib2)))
9597 (native-inputs '()))))
9598
9599 (define-public python-texttable
9600 (package
9601 (name "python-texttable")
9602 (version "1.6.2")
9603 (source
9604 (origin
9605 (method url-fetch)
9606 (uri (pypi-uri "texttable" version))
9607 (sha256
9608 (base32
9609 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
9610 (build-system python-build-system)
9611 (arguments
9612 `(#:phases
9613 (modify-phases %standard-phases
9614 (replace 'check
9615 (lambda _ (invoke "pytest" "tests.py"))))))
9616 (native-inputs
9617 `(("python-pytest" ,python-pytest)))
9618 (home-page "https://github.com/foutaise/texttable/")
9619 (synopsis "Python module for creating simple ASCII tables")
9620 (description "Texttable is a Python module for creating simple ASCII
9621 tables.")
9622 (license license:expat)))
9623
9624 (define-public python2-texttable
9625 (package-with-python2 python-texttable))
9626
9627 (define-public python-atomicwrites
9628 (package
9629 (name "python-atomicwrites")
9630 (version "1.3.0")
9631 (source (origin
9632 (method url-fetch)
9633 (uri (pypi-uri "atomicwrites" version))
9634 (sha256
9635 (base32
9636 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
9637 (build-system python-build-system)
9638 (synopsis "Atomic file writes in Python")
9639 (description "Library for atomic file writes using platform dependent tools
9640 for atomic file system operations.")
9641 (home-page "https://github.com/untitaker/python-atomicwrites")
9642 (license license:expat)))
9643
9644 (define-public python2-atomicwrites
9645 (package-with-python2 python-atomicwrites))
9646
9647 (define-public python-click-threading
9648 (package
9649 (name "python-click-threading")
9650 (version "0.4.4")
9651 (source (origin
9652 (method url-fetch)
9653 (uri (pypi-uri "click-threading" version))
9654 (sha256
9655 (base32
9656 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
9657 (build-system python-build-system)
9658 (propagated-inputs
9659 `(("python-click" ,python-click)))
9660 (synopsis "Utilities for multithreading in Click")
9661 (description "This package provides utilities for multithreading in Click
9662 applications.")
9663 (home-page "https://github.com/click-contrib/click-threading")
9664 (license license:expat)))
9665
9666 (define-public python-click-log
9667 (package
9668 (name "python-click-log")
9669 (version "0.3.2")
9670 (source (origin
9671 (method url-fetch)
9672 (uri (pypi-uri "click-log" version))
9673 (sha256
9674 (base32
9675 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
9676 (build-system python-build-system)
9677 (propagated-inputs
9678 `(("python-click" ,python-click)))
9679 (synopsis "Logging for click applications")
9680 (description "This package provides a Python library for logging Click
9681 applications.")
9682 (home-page "https://github.com/click-contrib/click-log")
9683 (license license:expat)))
9684
9685 (define-public python-apipkg
9686 (package
9687 (name "python-apipkg")
9688 (version "1.5")
9689 (source (origin
9690 (method url-fetch)
9691 (uri (pypi-uri "apipkg" version))
9692 (sha256
9693 (base32
9694 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
9695 (build-system python-build-system)
9696 (native-inputs
9697 `(("python-pytest" ,python-pytest)
9698 ("python-setuptools-scm" ,python-setuptools-scm)))
9699 (synopsis "Namespace control and lazy-import mechanism")
9700 (description "With apipkg you can control the exported namespace of a Python
9701 package and greatly reduce the number of imports for your users. It is a small
9702 pure Python module that works on virtually all Python versions.")
9703 (home-page "https://github.com/pytest-dev/apipkg")
9704 (license license:expat)))
9705
9706 (define-public python-execnet
9707 (package
9708 (name "python-execnet")
9709 (version "1.4.1")
9710 (source (origin
9711 (method url-fetch)
9712 (uri (pypi-uri "execnet" version))
9713 (sha256
9714 (base32
9715 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9716 (build-system python-build-system)
9717 (arguments
9718 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9719 ;; The two test failures are caused by the lack of an `ssh` executable.
9720 ;; The test suite can be run with pytest after the 'install' phase.
9721 #:tests? #f))
9722 (native-inputs
9723 `(("python-pytest" ,python-pytest)
9724 ("python-setuptools-scm" ,python-setuptools-scm)))
9725 (propagated-inputs
9726 `(("python-apipkg" ,python-apipkg)))
9727 (synopsis "Rapid multi-Python deployment")
9728 (description "Execnet provides a share-nothing model with
9729 channel-send/receive communication for distributing execution across many
9730 Python interpreters across version, platform and network barriers. It has a
9731 minimal and fast API targeting the following uses:
9732 @enumerate
9733 @item distribute tasks to (many) local or remote CPUs
9734 @item write and deploy hybrid multi-process applications
9735 @item write scripts to administer multiple environments
9736 @end enumerate")
9737 (home-page "https://codespeak.net/execnet/")
9738 (license license:expat)))
9739
9740 (define-public python2-execnet
9741 (package-with-python2 python-execnet))
9742
9743 (define-public python-icalendar
9744 (package
9745 (name "python-icalendar")
9746 (version "4.0.5")
9747 (source (origin
9748 (method url-fetch)
9749 (uri (pypi-uri "icalendar" version))
9750 (sha256
9751 (base32
9752 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
9753 (build-system python-build-system)
9754 (propagated-inputs
9755 `(("python-dateutil" ,python-dateutil)
9756 ("python-pytz" ,python-pytz)))
9757 (synopsis "Python library for parsing iCalendar files")
9758 (description "The icalendar package is a parser/generator of iCalendar
9759 files for use with Python.")
9760 (home-page "https://github.com/collective/icalendar")
9761 (license license:bsd-2)))
9762
9763 (define-public python-args
9764 (package
9765 (name "python-args")
9766 (version "0.1.0")
9767 (source (origin
9768 (method url-fetch)
9769 (uri (pypi-uri "args" version))
9770 (sha256
9771 (base32
9772 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9773 (build-system python-build-system)
9774 (home-page "https://github.com/kennethreitz/args")
9775 (synopsis "Command-line argument parser")
9776 (description
9777 "This library provides a Python module to parse command-line arguments.")
9778 (license license:bsd-3)))
9779
9780 (define-public python2-args
9781 (package-with-python2 python-args))
9782
9783 (define-public python-clint
9784 (package
9785 (name "python-clint")
9786 (version "0.5.1")
9787 (source (origin
9788 (method url-fetch)
9789 (uri (pypi-uri "clint" version))
9790 (sha256
9791 (base32
9792 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9793 (build-system python-build-system)
9794 (arguments
9795 '(#:phases
9796 (modify-phases %standard-phases
9797 (replace 'check
9798 (lambda _ (invoke "py.test" "-v"))))))
9799 (native-inputs
9800 `(("python-pytest" ,python-pytest)))
9801 (propagated-inputs
9802 `(("python-args" ,python-args)))
9803 (home-page "https://github.com/kennethreitz/clint")
9804 (synopsis "Command-line interface tools")
9805 (description
9806 "Clint is a Python module filled with a set of tools for developing
9807 command-line applications, including tools for colored and indented
9808 output, progress bar display, and pipes.")
9809 (license license:isc)))
9810
9811 (define-public python2-clint
9812 (package-with-python2 python-clint))
9813
9814 (define-public python-rply
9815 (package
9816 (name "python-rply")
9817 (version "0.7.5")
9818 (source (origin
9819 (method url-fetch)
9820 (uri (pypi-uri "rply" version))
9821 (sha256
9822 (base32
9823 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9824 (build-system python-build-system)
9825 (propagated-inputs
9826 `(("python-appdirs" ,python-appdirs)))
9827 (home-page "https://github.com/alex/rply")
9828 (synopsis "Parser generator for Python")
9829 (description
9830 "This package provides a pure Python based parser generator, that also
9831 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9832 with a new public API, and RPython support.")
9833 (license license:bsd-3)))
9834
9835 (define-public python2-rply
9836 (package-with-python2 python-rply))
9837
9838 (define-public python-hy
9839 (package
9840 (name "python-hy")
9841 (version "0.18.0")
9842 (source (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "hy" version))
9845 (sha256
9846 (base32
9847 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
9848 (build-system python-build-system)
9849 (arguments
9850 '(#:phases
9851 (modify-phases %standard-phases
9852 (add-before 'install 'set-HOME
9853 (lambda _
9854 (setenv "HOME" "/tmp") #t))
9855 (replace 'check
9856 (lambda _
9857 ;; Tests require write access to HOME.
9858 (setenv "HOME" "/tmp")
9859 (invoke "nosetests"))))))
9860 (native-inputs
9861 `(("python-coverage" ,python-coverage)
9862 ("python-nose" ,python-nose)))
9863 (propagated-inputs
9864 `(("python-astor" ,python-astor)
9865 ("python-colorama" ,python-colorama)
9866 ("python-rply" ,python-rply)
9867 ("python-funcparserlib"
9868 ,python-funcparserlib)))
9869 (home-page "http://hylang.org/")
9870 (synopsis "Lisp frontend to Python")
9871 (description
9872 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9873 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9874 Python at your fingertips, in Lisp form.")
9875 (license license:expat)))
9876
9877 (define-public python2-functools32
9878 (package
9879 (name "python2-functools32")
9880 (version "3.2.3-2")
9881 (source
9882 (origin
9883 (method url-fetch)
9884 (uri (pypi-uri "functools32" version))
9885 (sha256
9886 (base32
9887 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9888 (build-system python-build-system)
9889 (arguments
9890 `(#:python ,python-2
9891 #:tests? #f)) ; no test target
9892 (home-page "https://github.com/MiCHiLU/python-functools32")
9893 (synopsis
9894 "Backport of the functools module from Python 3.2.3")
9895 (description
9896 "This package is a backport of the @code{functools} module from Python
9897 3.2.3 for use with older versions of Python and PyPy.")
9898 (license license:expat)))
9899
9900 (define-public python2-subprocess32
9901 (package
9902 (name "python2-subprocess32")
9903 (version "3.2.7")
9904 (source (origin
9905 (method url-fetch)
9906 (uri (pypi-uri "subprocess32" version))
9907 (sha256
9908 (base32
9909 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9910 (patches
9911 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9912 (build-system python-build-system)
9913 (arguments
9914 `(#:python ,python-2
9915 ;; The test suite fails with Python > 2.7.13:
9916 ;; import test.support
9917 ;; ImportError: No module named support
9918 #:tests? #f
9919 #:phases
9920 (modify-phases %standard-phases
9921 (add-after 'unpack 'patch-/bin/sh
9922 (lambda _
9923 (substitute* '("subprocess32.py"
9924 "test_subprocess32.py")
9925 (("/bin/sh") (which "sh")))
9926 #t)))))
9927 (home-page "https://github.com/google/python-subprocess32")
9928 (synopsis "Backport of the subprocess module from Python 3.2")
9929 (description
9930 "This is a backport of the @code{subprocess} standard library module
9931 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9932 new features. On POSIX systems it is guaranteed to be reliable when used
9933 in threaded applications. It includes timeout support from Python 3.3 but
9934 otherwise matches 3.2’s API.")
9935 (license license:psfl)))
9936
9937 (define-public python2-futures
9938 (package
9939 (name "python2-futures")
9940 (version "3.2.0")
9941 (source
9942 (origin
9943 (method url-fetch)
9944 (uri (pypi-uri "futures" version))
9945 (sha256
9946 (base32
9947 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9948 (build-system python-build-system)
9949 (arguments
9950 `(#:python ,python-2
9951 #:phases
9952 (modify-phases %standard-phases
9953 (replace 'check
9954 (lambda _
9955 (invoke "python" "test_futures.py")
9956 #t)))))
9957 (home-page "https://github.com/agronholm/pythonfutures")
9958 (synopsis
9959 "Backport of the concurrent.futures package from Python 3.2")
9960 (description
9961 "The concurrent.futures module provides a high-level interface for
9962 asynchronously executing callables. This package backports the
9963 concurrent.futures package from Python 3.2")
9964 (license license:bsd-3)))
9965
9966 (define-public python-promise
9967 (package
9968 (name "python-promise")
9969 (version "0.4.2")
9970 (source
9971 (origin
9972 (method url-fetch)
9973 (uri (pypi-uri "promise" version))
9974 (sha256
9975 (base32
9976 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9977 (build-system python-build-system)
9978 ;; Tests wants python-futures, which is a python2 only program, and
9979 ;; can't be found by python-promise at test time.
9980 (arguments `(#:tests? #f))
9981 (home-page "https://github.com/syrusakbary/promise")
9982 (synopsis "Promises/A+ implementation for Python")
9983 (description
9984 "Promises/A+ implementation for Python")
9985 (properties `((python2-variant . ,(delay python2-promise))))
9986 (license license:expat)))
9987
9988 (define-public python2-promise
9989 (let ((promise (package-with-python2
9990 (strip-python2-variant python-promise))))
9991 (package (inherit promise)
9992 (arguments (substitute-keyword-arguments (package-arguments promise)
9993 ((#:tests? _) #t)))
9994 (native-inputs
9995 `(("python2-futures" ,python2-futures)
9996 ("python2-pytest" ,python2-pytest)
9997 ,@(package-native-inputs promise))))))
9998
9999 (define-public python-progressbar2
10000 (package
10001 (name "python-progressbar2")
10002 (version "3.51.3")
10003 (source
10004 (origin
10005 (method url-fetch)
10006 (uri (pypi-uri "progressbar2" version))
10007 (sha256
10008 (base32
10009 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10010 (build-system python-build-system)
10011 (propagated-inputs
10012 `(("python-six" ,python-six)
10013 ("python-utils" ,python-utils)))
10014 (native-inputs
10015 `(("python-flake8" ,python-flake8)
10016 ("python-freezegun" ,python-freezegun)
10017 ("python-pycodestyle" ,python-pycodestyle)
10018 ("python-pytest" ,python-pytest)
10019 ("python-pytest-cache" ,python-pytest-cache)
10020 ("python-pytest-cov" ,python-pytest-cov)
10021 ("python-pytest-flakes" ,python-pytest-flakes)
10022 ("python-pytest-pep8" ,python-pytest-pep8)
10023 ("python-sphinx" ,python-sphinx)))
10024 (home-page "https://github.com/WoLpH/python-progressbar")
10025 (synopsis "Text progress bar library for Python")
10026 (description
10027 "This package provides a Python progressbar library to provide
10028 visual (yet text based) progress to long running operations.")
10029 (license license:bsd-3)))
10030
10031 (define-public python-progressbar33
10032 (package
10033 (name "python-progressbar33")
10034 (version "2.4")
10035 (source
10036 (origin
10037 (method url-fetch)
10038 (uri (pypi-uri "progressbar33" version))
10039 (sha256
10040 (base32
10041 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10042 (build-system python-build-system)
10043 (home-page "http://github.com/germangh/python-progressbar")
10044 (synopsis "Text progress bar library for Python")
10045 (description
10046 "This package provides a text progress bar library for Python. This
10047 version only differs from the original @code{progressbar} package in that it
10048 uses relative package imports instead of absolute imports, which is necessary
10049 for the module to work under Python 3.3.")
10050 ;; Either or both of these licenses may be selected.
10051 (license (list license:lgpl2.1+ license:bsd-3))))
10052
10053 (define-public python-colorama
10054 (package
10055 (name "python-colorama")
10056 (version "0.4.3")
10057 (source
10058 (origin
10059 (method url-fetch)
10060 (uri (pypi-uri "colorama" version))
10061 (sha256
10062 (base32
10063 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
10064 (build-system python-build-system)
10065 (synopsis "Colored terminal text rendering for Python")
10066 (description "Colorama is a Python library for rendering colored terminal
10067 text.")
10068 (home-page "https://pypi.org/project/colorama/")
10069 (license license:bsd-3)))
10070
10071 (define-public python2-colorama
10072 (package-with-python2 python-colorama))
10073
10074 (define-public python-rsa
10075 (package
10076 (name "python-rsa")
10077 (version "3.4.2")
10078 (source
10079 (origin
10080 (method url-fetch)
10081 (uri (pypi-uri "rsa" version))
10082 (sha256
10083 (base32
10084 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10085 (build-system python-build-system)
10086 (propagated-inputs
10087 `(("python-pyasn1" ,python-pyasn1)))
10088 (synopsis "Pure-Python RSA implementation")
10089 (description "Python-RSA is a pure-Python RSA implementation. It supports
10090 encryption and decryption, signing and verifying signatures, and key
10091 generation according to PKCS#1 version 1.5. It can be used as a Python
10092 library as well as on the command line.")
10093 (home-page "https://stuvel.eu/rsa")
10094 (license license:asl2.0)))
10095
10096 (define-public python2-rsa
10097 (package-with-python2 python-rsa))
10098
10099 (define-public python-pluggy
10100 (package
10101 (name "python-pluggy")
10102 (version "0.13.1")
10103 (source
10104 (origin
10105 (method url-fetch)
10106 (uri (pypi-uri "pluggy" version))
10107 (sha256
10108 (base32
10109 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
10110 (build-system python-build-system)
10111 (native-inputs
10112 `(("python-setuptools-scm" ,python-setuptools-scm)))
10113 (synopsis "Plugin and hook calling mechanism for Python")
10114 (description "Pluggy is an extraction of the plugin manager as used by
10115 Pytest but stripped of Pytest specific details.")
10116 (home-page "https://pypi.org/project/pluggy/")
10117 (properties `((python2-variant . ,(delay python2-pluggy))))
10118 (license license:expat)))
10119
10120 (define-public python2-pluggy
10121 (let ((base (package-with-python2 (strip-python2-variant
10122 python-pluggy))))
10123 (package/inherit
10124 base
10125 (propagated-inputs
10126 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
10127
10128 ;; This package requires python2-importlib-metadata, but that package
10129 ;; ends up needing python2-pluggy via python2-pytest, so we need this
10130 ;; variant to solve the circular dependency.
10131 (define-public python2-pluggy-bootstrap
10132 (hidden-package
10133 (package/inherit
10134 python2-pluggy
10135 (name "python2-pluggy-bootstrap")
10136 (arguments
10137 `(#:tests? #f
10138 ,@(package-arguments python2-pluggy)))
10139 (propagated-inputs
10140 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10141
10142 (define-public python-tox
10143 (package
10144 (name "python-tox")
10145 (version "2.8.1")
10146 (source
10147 (origin
10148 (method url-fetch)
10149 (uri (pypi-uri "tox" version))
10150 (sha256
10151 (base32
10152 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
10153 (build-system python-build-system)
10154 (arguments
10155 ;; FIXME: Tests require pytest-timeout, which itself requires
10156 ;; pytest>=2.8.0 for installation.
10157 '(#:tests? #f))
10158 (propagated-inputs
10159 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
10160 ("python-py" ,python-py)
10161 ("python-virtualenv" ,python-virtualenv)))
10162 (native-inputs
10163 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
10164 ("python-pytest" ,python-pytest) ; >= 2.3.5
10165 ("python-setuptools-scm" ,python-setuptools-scm)))
10166 (home-page "https://tox.readthedocs.io")
10167 (synopsis "Virtualenv-based automation of test activities")
10168 (description "Tox is a generic virtualenv management and test command line
10169 tool. It can be used to check that a package installs correctly with
10170 different Python versions and interpreters, or run tests in each type of
10171 supported environment, or act as a frontend to continuous integration
10172 servers.")
10173 (license license:expat)))
10174
10175 (define-public python2-tox
10176 (package-with-python2 python-tox))
10177
10178 (define-public python-jmespath
10179 (package
10180 (name "python-jmespath")
10181 (version "0.9.4")
10182 (source
10183 (origin
10184 (method url-fetch)
10185 (uri (pypi-uri "jmespath" version))
10186 (sha256
10187 (base32
10188 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
10189 (build-system python-build-system)
10190 (native-inputs
10191 `(("python-nose" ,python-nose)))
10192 (synopsis "JSON Matching Expressions")
10193 (description "JMESPath (pronounced “james path”) is a Python library that
10194 allows one to declaratively specify how to extract elements from a JSON
10195 document.")
10196 (home-page "https://github.com/jmespath/jmespath.py")
10197 (license license:expat)))
10198
10199 (define-public python2-jmespath
10200 (package-with-python2 python-jmespath))
10201
10202 (define-public python-symengine
10203 (package
10204 (name "python-symengine")
10205 (version "0.6.1")
10206 (source
10207 (origin
10208 (method url-fetch)
10209 (uri (pypi-uri "symengine" version))
10210 (sha256
10211 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
10212 (build-system python-build-system)
10213 (native-inputs
10214 `(("cmake" ,cmake)
10215 ("python-cython" ,python-cython)))
10216 (inputs
10217 `(("symengine" ,symengine)))
10218 (home-page "https://github.com/symengine/symengine.py")
10219 (synopsis "Python library providing wrappers to SymEngine")
10220 (description
10221 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
10222 manipulation library.")
10223 (license license:expat)))
10224
10225 (define-public python-botocore
10226 (package
10227 (name "python-botocore")
10228 (version "1.15.26")
10229 (source
10230 (origin
10231 (method url-fetch)
10232 (uri (pypi-uri "botocore" version))
10233 (sha256
10234 (base32
10235 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
10236 (build-system python-build-system)
10237 (arguments
10238 ;; FIXME: Many tests are failing.
10239 '(#:tests? #f))
10240 (propagated-inputs
10241 `(("python-dateutil" ,python-dateutil)
10242 ("python-docutils" ,python-docutils)
10243 ("python-jmespath" ,python-jmespath)))
10244 (native-inputs
10245 `(("python-mock" ,python-mock)
10246 ("python-nose" ,python-nose)
10247 ("behave" ,behave)
10248 ("python-tox" ,python-tox)
10249 ("python-urllib3" ,python-urllib3)
10250 ("python-wheel" ,python-wheel)))
10251 (home-page "https://github.com/boto/botocore")
10252 (synopsis "Low-level interface to AWS")
10253 (description "Botocore is a Python library that provides a low-level
10254 interface to the Amazon Web Services (AWS) API.")
10255 (license license:asl2.0)))
10256
10257 (define-public python2-botocore
10258 (package-with-python2 python-botocore))
10259
10260 (define-public python-pyfiglet
10261 (package
10262 (name "python-pyfiglet")
10263 (version "0.8.post1")
10264 (source
10265 (origin
10266 (method url-fetch)
10267 (uri (pypi-uri "pyfiglet" version))
10268 (sha256
10269 (base32
10270 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
10271 (build-system python-build-system)
10272 (home-page "https://github.com/pwaller/pyfiglet")
10273 (synopsis "Draw ASCII art big letters in Python")
10274 (description "This module lets you draw large letter from ordinary characters
10275 in pure Python.")
10276 (license license:expat)))
10277
10278 (define-public python-xdo
10279 (package
10280 (name "python-xdo")
10281 (version "0.3")
10282 (source (origin
10283 (method url-fetch)
10284 (uri (string-append
10285 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10286 "python-xdo_" version ".orig.tar.gz"))
10287 (sha256
10288 (base32
10289 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
10290 (build-system python-build-system)
10291 (arguments
10292 '(#:phases
10293 (modify-phases %standard-phases
10294 (add-before 'install 'patch-libxdo-path
10295 ;; Hardcode the path of dynamically loaded libxdo library.
10296 (lambda* (#:key inputs #:allow-other-keys)
10297 (let ((libxdo (string-append
10298 (assoc-ref inputs "xdotool")
10299 "/lib/libxdo.so")))
10300 (substitute* "xdo/_xdo.py"
10301 (("find_library\\(\"xdo\"\\)")
10302 (simple-format #f "\"~a\"" libxdo)))
10303 #t))))
10304 #:tests? #f)) ; no tests provided
10305 (propagated-inputs
10306 `(("python-six" ,python-six)))
10307 (inputs
10308 `(("xdotool" ,xdotool)
10309 ("libX11" ,libx11)))
10310 (home-page "https://tracker.debian.org/pkg/python-xdo")
10311 (synopsis "Python library for simulating X11 keyboard/mouse input")
10312 (description "Provides bindings to libxdo for manipulating X11 via simulated
10313 input. (Note that this is mostly a legacy library; you may wish to look at
10314 python-xdo for newer bindings.)")
10315 (license license:bsd-3)))
10316
10317 (define-public python2-xdo
10318 (package-with-python2 python-xdo))
10319
10320 (define-public python-mako
10321 (package
10322 (name "python-mako")
10323 (version "1.1.2")
10324 (source
10325 (origin
10326 (method url-fetch)
10327 (uri (pypi-uri "Mako" version))
10328 (sha256
10329 (base32
10330 "17bd6r9ynp4hyfckkia0bb8gpd98f42jfl5rmzdpbld59bbcaf9i"))))
10331 (build-system python-build-system)
10332 (arguments
10333 `(#:phases (modify-phases %standard-phases
10334 (replace 'check
10335 (lambda* (#:key tests? #:allow-other-keys)
10336 (if tests?
10337 (invoke "nosetests" "-v")
10338 (format #t "test suite not run~%"))
10339 #t)))))
10340 (propagated-inputs
10341 `(("python-markupsafe" ,python-markupsafe)))
10342 (native-inputs
10343 `(("python-mock" ,python-mock)
10344 ("python-nose" ,python-nose)))
10345 (home-page "https://www.makotemplates.org/")
10346 (synopsis "Templating language for Python")
10347 (description "Mako is a templating language for Python that compiles
10348 templates into Python modules.")
10349 (license license:expat)))
10350
10351 (define-public python2-mako
10352 (package-with-python2 python-mako))
10353
10354 (define-public python-waitress
10355 (package
10356 (name "python-waitress")
10357 (version "1.1.0")
10358 (source
10359 (origin
10360 (method url-fetch)
10361 (uri (pypi-uri "waitress" version))
10362 (patches (search-patches "python-waitress-fix-tests.patch"))
10363 (sha256
10364 (base32
10365 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
10366 (build-system python-build-system)
10367 (home-page "https://github.com/Pylons/waitress")
10368 (synopsis "Waitress WSGI server")
10369 (description "Waitress is meant to be a production-quality pure-Python WSGI
10370 server with very acceptable performance.")
10371 (license license:zpl2.1)))
10372
10373 (define-public python2-waitress
10374 (package-with-python2 python-waitress))
10375
10376 (define-public python-whichcraft
10377 (package
10378 (name "python-whichcraft")
10379 (version "0.6.1")
10380 (source
10381 (origin
10382 (method url-fetch)
10383 (uri (pypi-uri "whichcraft" version))
10384 (sha256
10385 (base32
10386 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
10387 (build-system python-build-system)
10388 (native-inputs
10389 `(("python-pytest" ,python-pytest)))
10390 (home-page "https://github.com/pydanny/whichcraft")
10391 (synopsis "Cross-platform cross-python shutil.which functionality")
10392 (description
10393 "This package provides a shim of the shutil.which function that's
10394 designed to work across multiple versions of Python.")
10395 (license license:bsd-3)))
10396
10397 (define-public python-cookiecutter
10398 (package
10399 (name "python-cookiecutter")
10400 (version "1.6.0")
10401 (source
10402 (origin
10403 (method url-fetch)
10404 (uri (pypi-uri "cookiecutter" version))
10405 (sha256
10406 (base32
10407 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
10408 (build-system python-build-system)
10409 (native-inputs
10410 `(("python-freezegun" ,python-freezegun)
10411 ("python-pytest" ,python-pytest)
10412 ("python-pytest-catchlog" ,python-pytest-catchlog)
10413 ("python-pytest-cov" ,python-pytest-cov)
10414 ("python-pytest-mock" ,python-pytest-mock)))
10415 (propagated-inputs
10416 `(("python-binaryornot" ,python-binaryornot)
10417 ("python-click" ,python-click)
10418 ("python-future" ,python-future)
10419 ("python-jinja2" ,python-jinja2)
10420 ("python-jinja2-time" ,python-jinja2-time)
10421 ("python-poyo" ,python-poyo)
10422 ("python-requests" ,python-requests)
10423 ("python-whichcraft" ,python-whichcraft)))
10424 (home-page "https://github.com/audreyr/cookiecutter")
10425 (synopsis
10426 "Command-line utility that creates projects from project templates")
10427 (description
10428 "This package provides a command-line utility that creates projects from
10429 project templates, e.g. creating a Python package project from a Python package
10430 project template.")
10431 (license license:bsd-3)))
10432
10433 (define-public python-pyquery
10434 (package
10435 (name "python-pyquery")
10436 (version "1.2.17")
10437 (source
10438 (origin
10439 (method url-fetch)
10440 (uri (pypi-uri "pyquery" version))
10441 (sha256
10442 (base32
10443 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10444 (build-system python-build-system)
10445 (native-inputs
10446 `(("python-webob" ,python-webob)
10447 ("python-webtest" ,python-webtest)))
10448 (propagated-inputs
10449 `(("python-lxml" ,python-lxml)
10450 ("python-cssselect" ,python-cssselect)))
10451 (home-page "https://github.com/gawel/pyquery")
10452 (synopsis "Make jQuery-like queries on xml documents")
10453 (description "pyquery allows you to make jQuery queries on xml documents.
10454 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10455 fast xml and html manipulation.")
10456 (license license:bsd-3)))
10457
10458 (define-public python-anyjson
10459 (package
10460 (name "python-anyjson")
10461 (version "0.3.3")
10462 (source
10463 (origin
10464 (method url-fetch)
10465 (uri (pypi-uri "anyjson" version))
10466 (sha256
10467 (base32
10468 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10469 (build-system python-build-system)
10470 (arguments
10471 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10472 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10473 ;; whatever) so this transformation needs to be done before the tests
10474 ;; can be run. Maybe we could add a build step to transform beforehand
10475 ;; but it could be annoying/difficult.
10476 ;; We can enable tests for the Python 2 version, though, and do below.
10477 #:tests? #f))
10478 (home-page "https://bitbucket.org/runeh/anyjson/")
10479 (synopsis
10480 "Wraps best available JSON implementation in a common interface")
10481 (description
10482 "Anyjson loads whichever is the fastest JSON module installed
10483 and provides a uniform API regardless of which JSON implementation is used.")
10484 (license license:bsd-3)
10485 (properties `((python2-variant . ,(delay python2-anyjson))))))
10486
10487 (define-public python2-anyjson
10488 (let ((anyjson (package-with-python2
10489 (strip-python2-variant python-anyjson))))
10490 (package
10491 (inherit anyjson)
10492 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10493 #:tests? #t
10494 ,@(package-arguments anyjson)))
10495 (native-inputs `(("python2-nose" ,python2-nose))))))
10496
10497 (define-public python-amqp
10498 (package
10499 (name "python-amqp")
10500 (version "2.3.2")
10501 (source
10502 (origin
10503 (method url-fetch)
10504 (uri (pypi-uri "amqp" version))
10505 (sha256
10506 (base32
10507 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
10508 (build-system python-build-system)
10509 (native-inputs
10510 `(("python-case" ,python-case)
10511 ("python-pytest-sugar" ,python-pytest-sugar)
10512 ("python-mock" ,python-mock)))
10513 (propagated-inputs
10514 `(("python-vine" ,python-vine)))
10515 (home-page "https://github.com/celery/py-amqp")
10516 (synopsis
10517 "Low-level AMQP client for Python (fork of amqplib)")
10518 (description
10519 "This is a fork of amqplib which was originally written by Barry Pederson.
10520 It is maintained by the Celery project, and used by kombu as a pure python
10521 alternative when librabbitmq is not available.")
10522 (license license:lgpl2.1+)
10523 (properties `((python2-variant . ,(delay python2-amqp))))))
10524
10525 (define-public python2-amqp
10526 (let ((amqp (package-with-python2
10527 (strip-python2-variant python-amqp))))
10528 (package
10529 (inherit amqp)
10530 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10531 ;; unmaintained. Weirdly, does not do this on the python 3
10532 ;; version?
10533 #:tests? #f
10534 ,@(package-arguments amqp))))))
10535
10536 (define-public python-txamqp
10537 (package
10538 (name "python-txamqp")
10539 (version "0.8.2")
10540 (source
10541 (origin
10542 (method url-fetch)
10543 (uri (pypi-uri "txAMQP" version))
10544 (sha256
10545 (base32
10546 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
10547 (build-system python-build-system)
10548 (propagated-inputs
10549 `(("python-six" ,python-six)
10550 ("python-twisted" ,python-twisted)))
10551 (home-page "https://github.com/txamqp/txamqp")
10552 (synopsis "Communicate with AMQP peers and brokers using Twisted")
10553 (description
10554 "This package provides a Python library for communicating with AMQP peers
10555 and brokers using the asynchronous networking framework Twisted. It contains
10556 all the necessary code to connect, send and receive messages to/from an
10557 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
10558 also includes support for using Thrift RPC over AMQP in Twisted
10559 applications.")
10560 (license license:asl2.0)))
10561
10562 (define-public python2-txamqp
10563 (package-with-python2 python-txamqp))
10564
10565 (define-public python-kombu
10566 (package
10567 (name "python-kombu")
10568 (version "4.2.2")
10569 (source
10570 (origin
10571 (method url-fetch)
10572 (uri (pypi-uri "kombu" version))
10573 (sha256
10574 (base32
10575 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
10576 (build-system python-build-system)
10577 (native-inputs
10578 `(("python-mock" ,python-mock)
10579 ("python-case" ,python-case)
10580 ("python-pyro4" ,python-pyro4)
10581 ("python-pytest-sugar" ,python-pytest-sugar)
10582 ("python-pytz" ,python-pytz)))
10583 (propagated-inputs
10584 `(("python-anyjson" ,python-anyjson)
10585 ("python-amqp" ,python-amqp)
10586 ("python-redis" ,python-redis)))
10587 (home-page "https://kombu.readthedocs.io")
10588 (synopsis "Message passing library for Python")
10589 (description "The aim of Kombu is to make messaging in Python as easy as
10590 possible by providing an idiomatic high-level interface for the AMQ protocol,
10591 and also provide proven and tested solutions to common messaging problems.
10592 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10593 message orientation, queuing, routing, reliability and security, for which the
10594 RabbitMQ messaging server is the most popular implementation.")
10595 (license license:bsd-3)
10596 (properties `((python2-variant . ,(delay python2-kombu))))))
10597
10598 (define-public python2-kombu
10599 (let ((kombu (package-with-python2
10600 (strip-python2-variant python-kombu))))
10601 (package
10602 (inherit kombu)
10603 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10604 ;; It works fine on the python3 variant.
10605 #:tests? #f
10606 ,@(package-arguments kombu)))
10607 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10608 ,@(package-native-inputs kombu))))))
10609
10610 (define-public python-billiard
10611 (package
10612 (name "python-billiard")
10613 (version "3.5.0.5")
10614 (source
10615 (origin
10616 (method url-fetch)
10617 (uri (pypi-uri "billiard" version))
10618 (sha256
10619 (base32
10620 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
10621 (build-system python-build-system)
10622 (native-inputs
10623 `(("python-case" ,python-case)
10624 ("python-pytest" ,python-pytest)))
10625 (home-page "https://github.com/celery/billiard")
10626 (synopsis
10627 "Python multiprocessing fork with improvements and bugfixes")
10628 (description
10629 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10630 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10631 pyprocessing package. This standalone variant is intended to be compatible with
10632 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10633 (license license:bsd-3)
10634 (properties `((python2-variant . ,(delay python2-billiard))))))
10635
10636 (define-public python2-billiard
10637 (let ((billiard (package-with-python2
10638 (strip-python2-variant python-billiard))))
10639 (package
10640 (inherit billiard)
10641 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10642 ("python2-mock" ,python2-mock)
10643 ,@(package-native-inputs billiard))))))
10644
10645 (define-public python-celery
10646 (package
10647 (name "python-celery")
10648 (version "4.2.1")
10649 (source
10650 (origin
10651 (method url-fetch)
10652 (uri (pypi-uri "celery" version))
10653 (sha256
10654 (base32
10655 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
10656 (build-system python-build-system)
10657 (arguments
10658 '(;; TODO The tests fail with Python 3.7
10659 ;; https://github.com/celery/celery/issues/4849
10660 #:tests? #f
10661 #:phases
10662 (modify-phases %standard-phases
10663 (add-after 'unpack 'patch-requirements
10664 (lambda _
10665 (substitute* "requirements/test.txt"
10666 (("pytest>=3\\.0,<3\\.3")
10667 "pytest>=3.0"))
10668 #t)))))
10669 (native-inputs
10670 `(("python-case" ,python-case)
10671 ("python-pytest" ,python-pytest)))
10672 (propagated-inputs
10673 `(("python-pytz" ,python-pytz)
10674 ("python-billiard" ,python-billiard)
10675 ("python-kombu" ,python-kombu)))
10676 (home-page "https://celeryproject.org")
10677 (synopsis "Distributed Task Queue")
10678 (description "Celery is an asynchronous task queue/job queue based on
10679 distributed message passing. It is focused on real-time operation, but
10680 supports scheduling as well. The execution units, called tasks, are executed
10681 concurrently on a single or more worker servers using multiprocessing,
10682 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10683 synchronously (wait until ready).")
10684 (license license:bsd-3)
10685 (properties `((python2-variant . ,(delay python2-celery))))))
10686
10687 (define-public python2-celery
10688 (let ((celery (package-with-python2
10689 (strip-python2-variant python-celery))))
10690 (package
10691 (inherit celery)
10692 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10693 ("python2-mock" ,python2-mock)
10694 ,@(package-native-inputs celery))))))
10695
10696 (define-public python-translitcodec
10697 (package
10698 (name "python-translitcodec")
10699 (version "0.4.0")
10700 (source
10701 (origin
10702 (method url-fetch)
10703 (uri (pypi-uri "translitcodec" version))
10704 (sha256
10705 (base32
10706 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10707 (build-system python-build-system)
10708 (arguments
10709 `(#:tests? #f)) ; no tests provided
10710 (home-page
10711 "https://github.com/claudep/translitcodec")
10712 (synopsis
10713 "Unicode to 8-bit charset transliteration codec")
10714 (description
10715 "This package contains codecs for transliterating ISO 10646 texts into
10716 best-effort representations using smaller coded character sets (ASCII,
10717 ISO 8859, etc.).")
10718 (license license:expat)))
10719
10720 (define-public python2-translitcodec
10721 (package-with-python2 python-translitcodec))
10722
10723 (define-public python-editor
10724 (package
10725 (name "python-editor")
10726 (version "1.0.4")
10727 (source
10728 (origin
10729 (method url-fetch)
10730 (uri (pypi-uri "python-editor" version))
10731 (sha256
10732 (base32
10733 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
10734 (build-system python-build-system)
10735 (arguments
10736 '(#:tests? #f)) ;XXX: needs a TTY and an editor
10737 (home-page "https://github.com/fmoo/python-editor")
10738 (synopsis "Programmatically open an editor, capture the result")
10739 (description
10740 "python-editor is a library that provides the editor module for
10741 programmatically interfacing with your system's $EDITOR.")
10742 (license license:asl2.0)))
10743
10744 (define-public python2-editor
10745 (package-with-python2 python-editor))
10746
10747 (define-public python-vobject
10748 (package
10749 (name "python-vobject")
10750 (version "0.9.6.1")
10751 (source (origin
10752 (method url-fetch)
10753 (uri (pypi-uri "vobject" version))
10754 (sha256
10755 (base32
10756 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
10757 (build-system python-build-system)
10758 (arguments
10759 '(;; The test suite relies on some non-portable Windows interfaces.
10760 #:tests? #f))
10761 (propagated-inputs
10762 `(("python-dateutil" ,python-dateutil)
10763 ("python-pyicu" ,python-pyicu)))
10764 (synopsis "Parse and generate vCard and vCalendar files")
10765 (description "Vobject is intended to be a full featured Python package for
10766 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10767 are supported and well tested. vCard 3.0 files are supported, and all data
10768 should be imported, but only a few components are understood in a sophisticated
10769 way.")
10770 (home-page "https://eventable.github.io/vobject/")
10771 (license license:asl2.0)))
10772
10773 (define-public python2-vobject
10774 (package-with-python2 python-vobject))
10775
10776 (define-public python-munkres
10777 (package
10778 (name "python-munkres")
10779 (version "1.0.8")
10780 (source (origin
10781 (method url-fetch)
10782 (uri (pypi-uri "munkres" version))
10783 (sha256
10784 (base32
10785 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10786 (build-system python-build-system)
10787 (arguments
10788 '(#:tests? #f)) ; no test suite
10789 (home-page "https://software.clapper.org/munkres/")
10790 (synopsis "Implementation of the Munkres algorithm")
10791 (description "The Munkres module provides an implementation of the Munkres
10792 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10793 useful for solving the Assignment Problem.")
10794 (license license:bsd-3)))
10795
10796 (define-public python2-munkres
10797 (package-with-python2 python-munkres))
10798
10799 (define-public python-whoosh
10800 (package
10801 (name "python-whoosh")
10802 (version "2.7.4")
10803 (source
10804 (origin
10805 (method url-fetch)
10806 (uri (pypi-uri "Whoosh" version))
10807 (sha256
10808 (base32
10809 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10810 (build-system python-build-system)
10811 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
10812 (native-inputs
10813 `(("python-pytest" ,python-pytest)))
10814 (home-page "https://bitbucket.org/mchaput/whoosh")
10815 (synopsis "Full text indexing, search, and spell checking library")
10816 (description
10817 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10818 checking library.")
10819 (license license:bsd-2)))
10820
10821 (define-public python2-whoosh
10822 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10823 (package (inherit whoosh)
10824 (propagated-inputs
10825 `(("python2-backport-ssl-match-hostname"
10826 ,python2-backport-ssl-match-hostname)
10827 ,@(package-propagated-inputs whoosh))))))
10828
10829 (define-public python-pathlib
10830 (package
10831 (name "python-pathlib")
10832 (version "1.0.1")
10833 (source (origin
10834 (method url-fetch)
10835 (uri (pypi-uri "pathlib" version))
10836 (sha256
10837 (base32
10838 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10839 (build-system python-build-system)
10840 ;; The tests depend on the internal "test" module, which does not provide
10841 ;; a stable interface.
10842 (arguments `(#:tests? #f))
10843 (home-page "https://pathlib.readthedocs.org/")
10844 (synopsis "Object-oriented file system paths")
10845 (description "Pathlib offers a set of classes to handle file system paths.
10846 It offers the following advantages over using string objects:
10847
10848 @enumerate
10849 @item No more cumbersome use of os and os.path functions. Everything can
10850 be done easily through operators, attribute accesses, and method calls.
10851 @item Embodies the semantics of different path types. For example,
10852 comparing Windows paths ignores casing.
10853 @item Well-defined semantics, eliminating any inconsistencies or
10854 ambiguities (forward vs. backward slashes, etc.).
10855 @end enumerate
10856
10857 Note: In Python 3.4, pathlib is now part of the standard library. For other
10858 Python versions please consider python-pathlib2 instead, which tracks the
10859 standard library module. This module (python-pathlib) isn't maintained
10860 anymore.")
10861 (license license:expat)))
10862
10863 (define-public python2-pathlib
10864 (package-with-python2 python-pathlib))
10865
10866 (define-public python2-pathlib2
10867 (package
10868 (name "python2-pathlib2")
10869 (version "2.3.5")
10870 (source (origin
10871 (method url-fetch)
10872 (uri (pypi-uri "pathlib2" version))
10873 (sha256
10874 (base32
10875 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
10876 (build-system python-build-system)
10877 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10878 ;; version is 3.4 which already includes this package as part of the
10879 ;; standard library.
10880 (arguments
10881 `(#:python ,python-2))
10882 (propagated-inputs
10883 `(("python2-scandir" ,python2-scandir)
10884 ("python2-six" ,python2-six)))
10885 (home-page "https://pypi.org/project/pathlib2/")
10886 (synopsis "Object-oriented file system paths - backport of standard
10887 pathlib module")
10888 (description "The goal of pathlib2 is to provide a backport of standard
10889 pathlib module which tracks the standard library module, so all the newest
10890 features of the standard pathlib can be used also on older Python versions.
10891
10892 Pathlib offers a set of classes to handle file system paths. It offers the
10893 following advantages over using string objects:
10894
10895 @enumerate
10896 @item No more cumbersome use of os and os.path functions. Everything can
10897 be done easily through operators, attribute accesses, and method calls.
10898 @item Embodies the semantics of different path types. For example,
10899 comparing Windows paths ignores casing.
10900 @item Well-defined semantics, eliminating any inconsistencies or
10901 ambiguities (forward vs. backward slashes, etc.).
10902 @end enumerate")
10903 (license license:expat)))
10904
10905 (define-public python2-pathlib2-bootstrap
10906 (hidden-package
10907 (package
10908 (inherit python2-pathlib2)
10909 (name "python2-pathlib2-bootstrap")
10910 (propagated-inputs
10911 `(("python2-scandir" ,python2-scandir)
10912 ("python2-six" ,python2-six-bootstrap))))))
10913
10914 (define-public python-jellyfish
10915 (package
10916 (name "python-jellyfish")
10917 (version "0.5.6")
10918 (source (origin
10919 (method url-fetch)
10920 (uri (pypi-uri "jellyfish" version))
10921 (sha256
10922 (base32
10923 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10924 (build-system python-build-system)
10925 (native-inputs
10926 `(("python-pytest" ,python-pytest)))
10927 (home-page "https://github.com/jamesturk/jellyfish")
10928 (synopsis "Approximate and phonetic matching of strings")
10929 (description "Jellyfish uses a variety of string comparison and phonetic
10930 encoding algorithms to do fuzzy string matching.")
10931 (license license:bsd-2)
10932 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10933
10934 (define-public python2-jellyfish
10935 (let ((jellyfish (package-with-python2
10936 (strip-python2-variant python-jellyfish))))
10937 (package (inherit jellyfish)
10938 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10939 ,@(package-native-inputs jellyfish))))))
10940
10941 (define-public python2-unicodecsv
10942 (package
10943 (name "python2-unicodecsv")
10944 (version "0.14.1")
10945 (source (origin
10946 (method git-fetch)
10947 ;; The test suite is not included in the PyPi release.
10948 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10949 (uri (git-reference
10950 (url "https://github.com/jdunck/python-unicodecsv")
10951 (commit version)))
10952 (file-name (git-file-name name version))
10953 (sha256
10954 (base32
10955 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
10956 (build-system python-build-system)
10957 (arguments
10958 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10959 #:python ,python-2))
10960 (native-inputs
10961 `(("python2-unittest2" ,python2-unittest2)))
10962 (home-page "https://github.com/jdunck/python-unicodecsv")
10963 (synopsis "Unicode CSV module for Python 2")
10964 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10965 module, adding support for Unicode strings.")
10966 (license license:bsd-2)))
10967
10968 (define-public python-rarfile
10969 (package
10970 (name "python-rarfile")
10971 (version "2.8")
10972 (source (origin
10973 (method url-fetch)
10974 (uri (pypi-uri "rarfile" version))
10975 (sha256
10976 (base32
10977 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10978 (build-system python-build-system)
10979 (arguments
10980 '(#:phases
10981 (modify-phases %standard-phases
10982 (replace 'check
10983 ;; Many tests fail, but the installation proceeds.
10984 (lambda _ (invoke "make" "-C" "test" "test"))))))
10985 (native-inputs
10986 `(("which" ,which))) ; required for tests
10987 (propagated-inputs
10988 `(("libarchive" ,libarchive)))
10989 (home-page "https://github.com/markokr/rarfile")
10990 (synopsis "RAR archive reader for Python")
10991 (description "This is Python module for RAR archive reading. The interface
10992 is made as zipfile like as possible.")
10993 (license license:isc)))
10994
10995 (define-public python2-rarfile
10996 (package-with-python2 python-rarfile))
10997
10998 (define-public python-magic
10999 (package
11000 (name "python-magic")
11001 (version "0.4.15")
11002 (source
11003 (origin
11004 (method url-fetch)
11005 (uri (pypi-uri "python-magic" version))
11006 (sha256
11007 (base32
11008 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11009 (file-name (string-append name "-" version "-checkout"))))
11010 (build-system python-build-system)
11011 (arguments
11012 ;; The tests are unreliable, so don't run them. The tests fail
11013 ;; under Python3 because they were written for Python2 and
11014 ;; contain import statements that do not work in Python3. One of
11015 ;; the tests fails under Python2 because its assertions are
11016 ;; overly stringent; it relies on comparing output strings which
11017 ;; are brittle and can change depending on the version of
11018 ;; libmagic being used and the system on which the test is
11019 ;; running. In my case, under GuixSD 0.10.0, only one test
11020 ;; failed, and it seems to have failed only because the version
11021 ;; of libmagic that is packaged in Guix outputs a slightly
11022 ;; different (but not wrong) string than the one that the test
11023 ;; expected.
11024 '(#:tests? #f
11025 #:phases (modify-phases %standard-phases
11026 ;; Replace a specific method call with a hard-coded
11027 ;; path to the necessary libmagic.so file in the
11028 ;; store. If we don't do this, then the method call
11029 ;; will fail to find the libmagic.so file, which in
11030 ;; turn will cause any application using
11031 ;; python-magic to fail.
11032 (add-before 'build 'hard-code-path-to-libmagic
11033 (lambda* (#:key inputs #:allow-other-keys)
11034 (let ((file (assoc-ref inputs "file")))
11035 (substitute* "magic.py"
11036 (("ctypes.util.find_library\\('magic'\\)")
11037 (string-append "'" file "/lib/libmagic.so'")))
11038 #t)))
11039 (add-before 'install 'disable-egg-compression
11040 (lambda _
11041 (let ((port (open-file "setup.cfg" "a")))
11042 (display "\n[easy_install]\nzip_ok = 0\n"
11043 port)
11044 (close-port port)
11045 #t))))))
11046 (inputs
11047 ;; python-magic needs to be able to find libmagic.so.
11048 `(("file" ,file)))
11049 (home-page
11050 "https://github.com/ahupp/python-magic")
11051 (synopsis
11052 "File type identification using libmagic")
11053 (description
11054 "This module uses ctypes to access the libmagic file type
11055 identification library. It makes use of the local magic database and
11056 supports both textual and MIME-type output. Note that this module and
11057 the python-file module both provide a \"magic.py\" file; these two
11058 modules, which are different and were developed separately, both serve
11059 the same purpose: to provide Python bindings for libmagic.")
11060 (license license:expat)))
11061
11062 (define-public python2-magic
11063 (package-with-python2 python-magic))
11064
11065 (define-public python2-s3cmd
11066 (package
11067 (name "python2-s3cmd")
11068 (version "1.6.1")
11069 (source
11070 (origin
11071 (method url-fetch)
11072 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11073 "s3cmd-" version ".tar.gz"))
11074 (sha256
11075 (base32
11076 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11077 (build-system python-build-system)
11078 (arguments
11079 ;; s3cmd is written for python2 only and contains no tests.
11080 `(#:python ,python-2
11081 #:tests? #f))
11082 (propagated-inputs
11083 `(("python2-dateutil" ,python2-dateutil)
11084 ;; The python-file package also provides a magic.py module.
11085 ;; This is an unfortunate state of affairs; however, s3cmd
11086 ;; fails to install if it cannot find specifically the
11087 ;; python-magic package. Thus we include it, instead of using
11088 ;; python-file. Ironically, s3cmd sometimes works better
11089 ;; without libmagic bindings at all:
11090 ;; https://github.com/s3tools/s3cmd/issues/198
11091 ("python2-magic" ,python2-magic)))
11092 (home-page "https://s3tools.org/s3cmd")
11093 (synopsis "Command line tool for S3-compatible storage services")
11094 (description
11095 "S3cmd is a command line tool for uploading, retrieving and managing data
11096 in storage services that are compatible with the Amazon Simple Storage
11097 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11098 GnuPG encryption, and more. It also supports management of Amazon's
11099 CloudFront content delivery network.")
11100 (license license:gpl2+)))
11101
11102 (define-public python-pkgconfig
11103 (package
11104 (name "python-pkgconfig")
11105 (version "1.3.1")
11106 (source
11107 (origin
11108 (method url-fetch)
11109 (uri (pypi-uri "pkgconfig" version))
11110 (sha256
11111 (base32
11112 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
11113 (build-system python-build-system)
11114 (native-inputs
11115 `(("python-nose" ,python-nose)))
11116 (inputs
11117 `(("pkg-config" ,pkg-config)))
11118 (arguments
11119 `(#:phases
11120 (modify-phases %standard-phases
11121 (add-before 'build 'patch
11122 ;; Hard-code the path to pkg-config.
11123 (lambda _
11124 (substitute* "pkgconfig/pkgconfig.py"
11125 (("cmd = 'pkg-config")
11126 (string-append "cmd = '" (which "pkg-config"))))
11127 #t))
11128 (replace 'check
11129 (lambda _
11130 (invoke "nosetests" "test.py"))))))
11131 (home-page "https://github.com/matze/pkgconfig")
11132 (synopsis "Python interface for pkg-config")
11133 (description "This module provides a Python interface to pkg-config. It
11134 can be used to find all pkg-config packages, check if a package exists,
11135 check if a package meets certain version requirements, query CFLAGS and
11136 LDFLAGS and parse the output to build extensions with setup.py.")
11137 (license license:expat)))
11138
11139 (define-public python2-pkgconfig
11140 (package-with-python2 python-pkgconfig))
11141
11142 (define-public python-bz2file
11143 (package
11144 (name "python-bz2file")
11145 (version "0.98")
11146 (source
11147 (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "bz2file" version))
11150 (sha256
11151 (base32
11152 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11153 (build-system python-build-system)
11154 (arguments
11155 `(#:tests? #f)) ; Tests use deprecated python modules.
11156 (home-page "https://github.com/nvawda/bz2file")
11157 (synopsis "Read and write bzip2-compressed files")
11158 (description
11159 "Bz2file is a Python library for reading and writing bzip2-compressed
11160 files. It contains a drop-in replacement for the I/O interface in the
11161 standard library's @code{bz2} module, including features from the latest
11162 development version of CPython that are not available in older releases.")
11163 (license license:asl2.0)))
11164
11165 (define-public python2-bz2file
11166 (package-with-python2 python-bz2file))
11167
11168 (define-public python-future
11169 (package
11170 (name "python-future")
11171 (version "0.17.1")
11172 (source
11173 (origin
11174 (method url-fetch)
11175 (uri (pypi-uri "future" version))
11176 (sha256
11177 (base32
11178 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
11179 (build-system python-build-system)
11180 ;; Many tests connect to the network or are otherwise flawed.
11181 ;; https://github.com/PythonCharmers/python-future/issues/210
11182 (arguments
11183 `(#:tests? #f))
11184 (home-page "https://python-future.org")
11185 (synopsis "Single-source support for Python 3 and 2")
11186 (description
11187 "@code{python-future} is the missing compatibility layer between Python 2 and
11188 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11189 to support both Python 2 and Python 3 with minimal overhead.")
11190 (license license:expat)))
11191
11192 (define-public python2-future
11193 (package-with-python2 python-future))
11194
11195 (define-public python-cysignals
11196 (package
11197 (name "python-cysignals")
11198 (version "1.9.0")
11199 (source
11200 (origin
11201 (method url-fetch)
11202 (uri (pypi-uri "cysignals" version))
11203 (sha256
11204 (base32
11205 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
11206 (build-system python-build-system)
11207 (native-inputs
11208 `(("python-cython" ,python-cython)
11209 ("python-sphinx" ,python-sphinx)))
11210 (inputs
11211 `(("pari-gp" ,pari-gp)))
11212 (arguments
11213 `(#:modules ((guix build python-build-system)
11214 ((guix build gnu-build-system) #:prefix gnu:)
11215 (guix build utils))
11216 ;; FIXME: Tests are executed after installation and currently fail
11217 ;; when not installing into standard locations; the author is working
11218 ;; on a fix.
11219 #:tests? #f
11220 #:phases
11221 (modify-phases %standard-phases
11222 (add-before
11223 'build 'configure
11224 (assoc-ref gnu:%standard-phases 'configure)))))
11225 (home-page
11226 "https://github.com/sagemath/cysignals")
11227 (synopsis
11228 "Handling of interrupts and signals for Cython")
11229 (description
11230 "The cysignals package provides mechanisms to handle interrupts (and
11231 other signals and errors) in Cython code, using two related approaches,
11232 for mixed Cython/Python code or external C libraries and pure Cython code,
11233 respectively.")
11234 (license license:lgpl3+)))
11235
11236 (define-public python2-cysignals
11237 (package-with-python2 python-cysignals))
11238
11239 (define-public python2-shedskin
11240 (package
11241 (name "python2-shedskin")
11242 (version "0.9.4")
11243 (source
11244 (origin
11245 (method url-fetch)
11246 (uri (string-append "https://github.com/shedskin/shedskin/"
11247 "releases/download/v" version
11248 "/shedskin-" version ".tgz"))
11249 (sha256
11250 (base32
11251 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11252 (build-system python-build-system)
11253 (arguments
11254 `(#:python ,python-2
11255 #:phases (modify-phases %standard-phases
11256 (add-after 'unpack 'fix-resulting-include-libs
11257 (lambda* (#:key inputs #:allow-other-keys)
11258 (let ((libgc (assoc-ref inputs "libgc"))
11259 (pcre (assoc-ref inputs "pcre")))
11260 (substitute* "shedskin/makefile.py"
11261 (("variable == 'CCFLAGS':[ ]*")
11262 (string-append "variable == 'CCFLAGS':\n"
11263 " line += ' -I " pcre "/include"
11264 " -I " libgc "/include'"))
11265 (("variable == 'LFLAGS':[ ]*")
11266 (string-append "variable == 'LFLAGS':\n"
11267 " line += ' -L" pcre "/lib"
11268 " -L " libgc "/lib'")))
11269 #t))))))
11270 (inputs `(("pcre" ,pcre)
11271 ("libgc" ,libgc)))
11272 (home-page "https://shedskin.github.io/")
11273 (synopsis "Experimental Python-2 to C++ Compiler")
11274 (description (string-append "This is an experimental compiler for a subset of
11275 Python. It generates C++ code and a Makefile."))
11276 (license (list license:gpl3 license:bsd-3 license:expat))))
11277
11278 (define-public python2-rope
11279 (package
11280 (name "python2-rope")
11281 (version "0.11.0")
11282 (source
11283 (origin
11284 (method url-fetch)
11285 (uri (pypi-uri "rope" version))
11286 (sha256
11287 (base32
11288 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
11289 (arguments
11290 ;; Rope has only partial python3 support, see `python-rope'
11291 `(#:python ,python-2))
11292 (build-system python-build-system)
11293 (native-inputs
11294 `(("python2-unittest2" ,python2-unittest2)))
11295 (home-page "https://github.com/python-rope/rope")
11296 (synopsis "Refactoring library for Python")
11297 (description "Rope is a refactoring library for Python. It facilitates
11298 the renaming, moving and extracting of attributes, functions, modules, fields
11299 and parameters in Python 2 source code. These refactorings can also be applied
11300 to occurrences in strings and comments.")
11301 (license license:gpl2)))
11302
11303 (define-public python-rope
11304 (package
11305 (inherit python2-rope)
11306 (name "python-rope")
11307 (arguments `(#:python ,python-wrapper
11308 ;; XXX: Only partial python3 support, results in some failing
11309 ;; tests: <https://github.com/python-rope/rope/issues/247>.
11310 #:tests? #f))
11311 (properties `((python2-variant . ,(delay python2-rope))))))
11312
11313 (define-public python-py3status
11314 (package
11315 (name "python-py3status")
11316 (version "3.21")
11317 (source
11318 (origin
11319 (method url-fetch)
11320 (uri (pypi-uri "py3status" version))
11321 (sha256
11322 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
11323 (build-system python-build-system)
11324 (inputs
11325 `(("file" ,file)))
11326 (arguments
11327 '(#:phases
11328 (modify-phases %standard-phases
11329 ;; 'file' is used for detection of configuration file encoding
11330 ;; let's make link the dependency to particular input
11331 (add-before 'build 'patch-file-path
11332 (lambda* (#:key inputs #:allow-other-keys)
11333 (let ((file-path (assoc-ref inputs "file")))
11334 (substitute* "py3status/parse_config.py"
11335 (("\\[\"file\", \"-b\"")
11336 (string-append "['" file-path "/bin/file', '-b'")))
11337 #t))))
11338 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
11339 (home-page "https://github.com/ultrabug/py3status")
11340 (synopsis "Extensible i3status wrapper written in Python")
11341 (description "py3status is an i3status wrapper which extends i3status
11342 functionality in a modular way, allowing you to extend your panel with your
11343 own code, responding to click events and updating clock every second.")
11344 (license license:bsd-3)))
11345
11346 (define-public python-tblib
11347 (package
11348 (name "python-tblib")
11349 (version "1.6.0")
11350 (source (origin
11351 (method url-fetch)
11352 (uri (pypi-uri "tblib" version))
11353 (sha256
11354 (base32
11355 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
11356 (build-system python-build-system)
11357 (arguments
11358 `(#:phases
11359 (modify-phases %standard-phases
11360 (replace 'check
11361 (lambda _
11362 ;; Upstream runs tests after installation and the package itself
11363 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11364 ;; found.
11365 (setenv "PYTHONPATH"
11366 (string-append (getcwd) "/build/lib:"
11367 (getenv "PYTHONPATH")))
11368 (invoke "py.test" "-vv" "tests" "README.rst"))))))
11369 (native-inputs
11370 `(("python-pytest" ,python-pytest)
11371 ("python-six" ,python-six)))
11372 (home-page "https://github.com/ionelmc/python-tblib")
11373 (synopsis "Traceback serialization library")
11374 (description
11375 "Traceback serialization allows you to:
11376
11377 @enumerate
11378 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11379 different processes. This allows better error handling when running code over
11380 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11381
11382 @item Parse traceback strings and raise with the parsed tracebacks.
11383 @end enumerate\n")
11384 (license license:bsd-3)))
11385
11386 (define-public python2-tblib
11387 (package-with-python2 python-tblib))
11388
11389 (define-public python-greenlet
11390 (package
11391 (name "python-greenlet")
11392 (version "0.4.15")
11393 (source (origin
11394 (method url-fetch)
11395 (uri (pypi-uri "greenlet" version))
11396 (sha256
11397 (base32
11398 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
11399 (build-system python-build-system)
11400 (home-page "https://greenlet.readthedocs.io/")
11401 (synopsis "Lightweight in-process concurrent programming")
11402 (description
11403 "Greenlet package is a spin-off of Stackless, a version of CPython
11404 that supports micro-threads called \"tasklets\". Tasklets run
11405 pseudo-concurrently (typically in a single or a few OS-level threads) and
11406 are synchronized with data exchanges on \"channels\".")
11407 (license (list license:psfl license:expat))))
11408
11409 (define-public python2-greenlet
11410 (package-with-python2 python-greenlet))
11411
11412 (define-public python-objgraph
11413 (package
11414 (name "python-objgraph")
11415 (version "3.4.1")
11416 (source
11417 (origin
11418 (method url-fetch)
11419 (uri (pypi-uri "objgraph" version))
11420 (sha256
11421 (base32
11422 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
11423 (build-system python-build-system)
11424 (propagated-inputs
11425 `(("python-graphviz" ,python-graphviz)))
11426 (native-inputs
11427 `(("python-mock" ,python-mock)
11428 ("graphviz" ,graphviz)))
11429 (home-page "https://mg.pov.lt/objgraph/")
11430 (synopsis "Draw Python object reference graphs with graphviz")
11431 (description
11432 "This package provides tools to draw Python object reference graphs with
11433 graphviz.")
11434 (license license:expat)))
11435
11436 (define-public python2-objgraph
11437 (package-with-python2 python-objgraph))
11438
11439 (define-public python-gevent
11440 (package
11441 (name "python-gevent")
11442 (version "20.5.0")
11443 (source (origin
11444 (method url-fetch)
11445 (uri (pypi-uri "gevent" version))
11446 (sha256
11447 (base32
11448 "1yppsrs0ccld9j9zfbsd0bxb987b2zkh2ar7whjxcrqzpkvg3iqx"))
11449 (modules '((guix build utils)))
11450 (snippet
11451 '(begin
11452 ;; unbunding libev and c-ares
11453 (delete-file-recursively "deps")
11454 #t))))
11455 (build-system python-build-system)
11456 (arguments
11457 `(#:modules ((ice-9 ftw)
11458 (ice-9 match)
11459 (srfi srfi-26)
11460 (guix build utils)
11461 (guix build python-build-system))
11462 #:phases (modify-phases %standard-phases
11463 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
11464 (lambda _
11465 (substitute* "src/gevent/subprocess.py"
11466 (("/bin/sh") (which "sh")))
11467 (for-each (lambda (file)
11468 (substitute* file
11469 (("/bin/sh") (which "sh"))
11470 (("/bin/true") (which "true"))))
11471 (find-files "src/greentest" "\\.py$"))
11472 #t))
11473 (add-before 'build 'do-not-use-bundled-sources
11474 (lambda _
11475 (setenv "GEVENTSETUP_EMBED" "0")
11476
11477 ;; Prevent building bundled libev.
11478 (substitute* "setup.py"
11479 (("run_make=_BUILDING")
11480 "run_make=False"))
11481 #t))
11482 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
11483 (lambda* (#:key inputs #:allow-other-keys)
11484 (let ((greenlet (string-append
11485 (assoc-ref inputs "python-greenlet")
11486 "/include")))
11487 (match (scandir greenlet
11488 (lambda (item)
11489 (string-prefix? "python" item)))
11490 ((python)
11491 (setenv "C_INCLUDE_PATH"
11492 (string-append greenlet "/" python ":"
11493 (or (getenv "C_INCLUDE_PATH")
11494 ""))))))
11495 #t))
11496 (add-before 'check 'pretend-to-be-CI
11497 (lambda _
11498 ;; A few tests are skipped due to network constraints or
11499 ;; get longer timeouts when running in a CI environment.
11500 ;; Piggy-back on that, as we need the same adjustments.
11501 (setenv "TRAVIS" "1")
11502 (setenv "APPVEYOR" "1")
11503 #t))
11504 (add-before 'check 'adjust-tests
11505 (lambda _
11506 (let ((disabled-tests
11507 '(;; These tests rely on networking which is not
11508 ;; available in the build container.
11509 "test_urllib2net.py"
11510 "test__server.py"
11511 "test__server_pywsgi.py"
11512 "test_socket.py"
11513 "test__socket.py"
11514 "test__socket_ssl.py"
11515 "test__socket_dns.py"
11516 "test__socket_dns6.py"
11517 "test___example_servers.py"
11518 "test__getaddrinfo_import.py"
11519 "test__examples.py"
11520 "test_httplib.py"
11521 "test_https.py"
11522 "test_urllib2_localnet.py"
11523 "test_ssl.py"
11524 "test__ssl.py"
11525 ;; XXX: These tests borrow functionality from the
11526 ;; Python builtin 'test' module, but it is not
11527 ;; installed with the Guix Python distribution.
11528 "test_smtpd.py"
11529 "test_wsgiref.py"
11530 "test_urllib2.py"
11531 "test_thread.py"
11532 "test_threading.py"
11533 "test__threading_2.py"
11534 ;; These tests rely on KeyboardInterrupts which do not
11535 ;; work inside the build container for some reason
11536 ;; (lack of controlling terminal?).
11537 "test_subprocess.py"
11538 "test__issues461_471.py"
11539 ;; TODO: Patch out the tests that use getprotobyname, etc
11540 ;; instead of disabling all the tests from these files.
11541 "test__resolver_dnspython.py"
11542 "test__doctests.py"
11543 "test__all__.py"
11544 "test___config.py"
11545 "test__execmodules.py")))
11546 (call-with-output-file "skipped_tests.txt"
11547 (lambda (port)
11548 (format port "~a~%"
11549 (string-join disabled-tests "\n"))))
11550 #t)))
11551 (replace 'check
11552 (lambda _
11553 ;; Make sure the build directory is on PYTHONPATH.
11554 (setenv "PYTHONPATH"
11555 (string-append
11556 (getenv "PYTHONPATH") ":"
11557 (getcwd) "/build/"
11558 (car (scandir "build" (cut string-prefix? "lib." <>)))))
11559
11560 ;; Use the build daemons configured number of workers.
11561 (setenv "NWORKERS" (number->string (parallel-job-count)))
11562
11563 (invoke "python" "-m" "gevent.tests" "--config"
11564 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
11565 (propagated-inputs
11566 `(("python-greenlet" ,python-greenlet)
11567 ("python-objgraph" ,python-objgraph)))
11568 (native-inputs
11569 `(("python-six" ,python-six)
11570
11571 ;; For tests.
11572 ("python-dnspython" ,python-dnspython)
11573 ("python-psutil" ,python-psutil)
11574 ("python-zope.event" ,python-zope-event)
11575 ("python-zope.interface" ,python-zope-interface)))
11576 (inputs
11577 `(("c-ares" ,c-ares)
11578 ("libev" ,libev)))
11579 (home-page "http://www.gevent.org/")
11580 (synopsis "Coroutine-based network library")
11581 (description
11582 "gevent is a coroutine-based Python networking library that uses greenlet
11583 to provide a high-level synchronous API on top of the libev event loop.")
11584 (license license:expat)
11585 (properties `((python2-variant . ,(delay python2-gevent))))))
11586
11587 (define-public python2-gevent
11588 (let ((base (package-with-python2
11589 (strip-python2-variant python-gevent))))
11590 (package
11591 (inherit base)
11592 (native-inputs `(,@(package-native-inputs base)
11593 ("python-mock" ,python2-mock))))))
11594
11595 (define-public python-fastimport
11596 (package
11597 (name "python-fastimport")
11598 (version "0.9.6")
11599 (source
11600 (origin
11601 (method url-fetch)
11602 (uri (pypi-uri "fastimport" version))
11603 (sha256
11604 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11605 (build-system python-build-system)
11606 (home-page "https://github.com/jelmer/python-fastimport")
11607 (synopsis "VCS fastimport parser and generator in Python")
11608 (description "This package provides a parser for and generator of the Git
11609 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11610 format.")
11611 (license license:gpl2+)))
11612
11613 (define-public python2-fastimport
11614 (package-with-python2 python-fastimport))
11615
11616 (define-public python-twisted
11617 (package
11618 (name "python-twisted")
11619 (version "19.7.0")
11620 (source (origin
11621 (method url-fetch)
11622 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11623 (sha256
11624 (base32
11625 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
11626 (build-system python-build-system)
11627 (arguments
11628 '(#:tests? #f)) ; FIXME: some tests fail
11629 (propagated-inputs
11630 `(("python-zope-interface" ,python-zope-interface)
11631 ("python-pyhamcrest" ,python-pyhamcrest)
11632 ("python-incremental" ,python-incremental)
11633 ("python-hyperlink" ,python-hyperlink)
11634 ("python-constantly" ,python-constantly)
11635 ("python-automat" ,python-automat)))
11636 (home-page "https://twistedmatrix.com/")
11637 (synopsis "Asynchronous networking framework written in Python")
11638 (description
11639 "Twisted is an extensible framework for Python programming, with special
11640 focus on event-based network programming and multiprotocol integration.")
11641 (license license:expat)))
11642
11643 (define-public python2-twisted
11644 (package-with-python2 python-twisted))
11645
11646 (define-public python-pika
11647 (package
11648 (name "python-pika")
11649 (version "0.12.0")
11650 (source
11651 (origin
11652 (method url-fetch)
11653 (uri (pypi-uri "pika" version))
11654 (sha256
11655 (base32
11656 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
11657 (build-system python-build-system)
11658 (native-inputs
11659 `(("python-pyev" ,python-pyev)
11660 ("python-tornado" ,python-tornado)
11661 ("python-twisted" ,python-twisted)))
11662 (home-page "https://pika.readthedocs.org")
11663 (synopsis "Pure Python AMQP Client Library")
11664 (description
11665 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11666 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11667 network support library.")
11668 (license license:bsd-3)))
11669
11670 (define-public python2-pika
11671 (package-with-python2 python-pika))
11672
11673 (define-public python-ply
11674 (package
11675 (name "python-ply")
11676 (version "3.11")
11677 (source
11678 (origin
11679 (method url-fetch)
11680 (uri (pypi-uri "ply" version))
11681 (sha256
11682 (base32
11683 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
11684 (build-system python-build-system)
11685 (home-page "http://www.dabeaz.com/ply/")
11686 (synopsis "Python Lex & Yacc")
11687 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11688 It uses LR parsing and does extensive error checking.")
11689 (license license:bsd-3)))
11690
11691 (define-public python-tabulate
11692 (package
11693 (name "python-tabulate")
11694 (version "0.8.7")
11695 (source (origin
11696 (method url-fetch)
11697 (uri (pypi-uri "tabulate" version))
11698 (sha256
11699 (base32
11700 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
11701 (build-system python-build-system)
11702 (arguments
11703 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11704 ;; and the latest release is not tagged in the upstream repository.
11705 '(#:tests? #f))
11706 (home-page "https://bitbucket.org/astanin/python-tabulate")
11707 (synopsis "Pretty-print tabular data")
11708 (description
11709 "Tabulate is a library and command-line utility to pretty-print tabular
11710 data in Python.")
11711 (license license:expat)))
11712
11713 (define-public python2-tabulate
11714 (package-with-python2 python-tabulate))
11715
11716 (define-public python-kazoo
11717 (package
11718 (name "python-kazoo")
11719 (version "2.4.0")
11720 (source
11721 (origin
11722 (method url-fetch)
11723 (uri (pypi-uri "kazoo" version))
11724 (sha256
11725 (base32
11726 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
11727 (build-system python-build-system)
11728 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11729 (propagated-inputs
11730 `(("python-six" ,python-six)))
11731 (home-page "https://kazoo.readthedocs.org")
11732 (synopsis "High-level Zookeeper client library")
11733 (description
11734 "Kazoo is a Python client library for the Apache Zookeeper distributed
11735 application service. It is designed to be easy to use and to avoid common
11736 programming errors.")
11737 (license license:asl2.0)))
11738
11739 (define-public python2-kazoo
11740 (package-with-python2 python-kazoo))
11741
11742 (define-public python-pykafka
11743 (package
11744 (name "python-pykafka")
11745 (version "2.4.0")
11746 (source (origin
11747 (method url-fetch)
11748 (uri (pypi-uri "pykafka" version))
11749 (sha256
11750 (base32
11751 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11752 (build-system python-build-system)
11753 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11754 (propagated-inputs
11755 `(("python-gevent" ,python-gevent)
11756 ("python-kazoo" ,python-kazoo)
11757 ("python-tabulate" ,python-tabulate)))
11758 (inputs
11759 `(("librdkafka" ,librdkafka)))
11760 (home-page "https://pykafka.readthedocs.io/")
11761 (synopsis "Apache Kafka client for Python")
11762 (description
11763 "PyKafka is a client for the Apache Kafka distributed messaging system.
11764 It includes Python implementations of Kafka producers and consumers, which
11765 are optionally backed by a C extension built on librdkafka.")
11766 (license license:asl2.0)))
11767
11768 (define-public python2-pykafka
11769 (package-with-python2 python-pykafka))
11770
11771 (define-public python-wcwidth
11772 (package
11773 (name "python-wcwidth")
11774 (version "0.1.8")
11775 (source (origin
11776 (method url-fetch)
11777 (uri (pypi-uri "wcwidth" version))
11778 (sha256
11779 (base32
11780 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
11781 (build-system python-build-system)
11782 (home-page "https://github.com/jquast/wcwidth")
11783 (synopsis "Measure number of terminal column cells of wide-character codes")
11784 (description "Wcwidth measures the number of terminal column cells of
11785 wide-character codes. It is useful for those implementing a terminal emulator,
11786 or programs that carefully produce output to be interpreted by one. It is a
11787 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11788 specified in POSIX.1-2001 and POSIX.1-2008.")
11789 (license license:expat)))
11790
11791 (define-public python2-wcwidth
11792 (package-with-python2 python-wcwidth))
11793
11794 (define-public python2-jsonrpclib
11795 (package
11796 (name "python2-jsonrpclib")
11797 (version "0.1.7")
11798 (source (origin
11799 (method url-fetch)
11800 (uri (pypi-uri "jsonrpclib" version))
11801 (sha256
11802 (base32
11803 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11804 (build-system python-build-system)
11805 (arguments
11806 `(#:tests? #f
11807 #:python ,python-2))
11808 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11809 (synopsis "Implementation of JSON-RPC specification for Python")
11810 (description
11811 "This library is an implementation of the JSON-RPC specification.
11812 It supports both the original 1.0 specification, as well as the
11813 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11814 etc.")
11815 (license license:asl2.0)))
11816
11817 (define-public python-chai
11818 (package
11819 (name "python-chai")
11820 (version "1.1.2")
11821 (source (origin
11822 (method url-fetch)
11823 (uri (pypi-uri "chai" version))
11824 (sha256
11825 (base32
11826 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
11827 (build-system python-build-system)
11828 (home-page "https://github.com/agoragames/chai")
11829 (synopsis "Mocking framework for Python")
11830 (description
11831 "Chai provides an api for mocking, stubbing and spying your python
11832 objects, patterned after the Mocha library for Ruby.")
11833 (license license:bsd-3)))
11834
11835 (define-public python2-chai
11836 (package-with-python2 python-chai))
11837
11838 (define-public python-inflection
11839 (package
11840 (name "python-inflection")
11841 (version "0.3.1")
11842 (source
11843 (origin (method url-fetch)
11844 (uri (pypi-uri "inflection" version))
11845 (sha256
11846 (base32
11847 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11848 (build-system python-build-system)
11849 (native-inputs
11850 `(("python-pytest" ,python-pytest)))
11851 (home-page "https://github.com/jpvanhal/inflection")
11852 (synopsis "Python string transformation library")
11853 (description
11854 "Inflection is a string transformation library. It singularizes
11855 and pluralizes English words, and transforms strings from CamelCase to
11856 underscored string.")
11857 (license license:expat)))
11858
11859 (define-public python2-inflection
11860 (package-with-python2 python-inflection))
11861
11862 (define-public python-pylev
11863 (package
11864 (name "python-pylev")
11865 (version "1.3.0")
11866 (source (origin
11867 (method url-fetch)
11868 (uri (pypi-uri "pylev" version))
11869 (sha256
11870 (base32
11871 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11872 (build-system python-build-system)
11873 (home-page "https://github.com/toastdriven/pylev")
11874 (synopsis "Levenshtein distance implementation in Python")
11875 (description "Pure Python Levenshtein implementation, based off the
11876 Wikipedia code samples at
11877 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11878 (license license:bsd-3)))
11879
11880 (define-public python2-pylev
11881 (package-with-python2 python-pylev))
11882
11883 (define-public python-cleo
11884 (package
11885 (name "python-cleo")
11886 (version "0.7.6")
11887 (source (origin
11888 (method url-fetch)
11889 (uri (pypi-uri "cleo" version))
11890 (sha256
11891 (base32
11892 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
11893 (build-system python-build-system)
11894 (native-inputs
11895 `( ;; For testing
11896 ("python-mock" ,python-mock)
11897 ("python-pytest-mock" ,python-pytest-mock)
11898 ("python-pytest" ,python-pytest)))
11899 (propagated-inputs
11900 `(("python-backpack" ,python-backpack)
11901 ("python-clikit" ,python-clikit)
11902 ("python-pastel" ,python-pastel)
11903 ("python-pylev" ,python-pylev)))
11904 (home-page "https://github.com/sdispater/cleo")
11905 (synopsis "Command-line arguments library for Python")
11906 (description
11907 "Cleo allows you to create command-line commands with signature in
11908 docstring and colored output.")
11909 (license license:expat)))
11910
11911 (define-public python2-cleo
11912 (package-with-python2 python-cleo))
11913
11914 (define-public python-tomlkit
11915 (package
11916 (name "python-tomlkit")
11917 (version "0.5.11")
11918 (source
11919 (origin
11920 (method url-fetch)
11921 (uri (pypi-uri "tomlkit" version))
11922 (sha256
11923 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
11924 (build-system python-build-system)
11925 (native-inputs
11926 `(("python-pytest" ,python-pytest)))
11927 (home-page "https://github.com/sdispater/tomlkit")
11928 (synopsis "Style-preserving TOML library")
11929 (description
11930 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11931 preserves all comments, indentations, whitespace and internal element ordering,
11932 and makes them accessible and editable via an intuitive API. It can also
11933 create new TOML documents from scratch using the provided helpers. Part of the
11934 implementation has been adapted, improved, and fixed from Molten.")
11935 (license license:expat)))
11936
11937 (define-public python-shellingham
11938 (package
11939 (name "python-shellingham")
11940 (version "1.3.2")
11941 (source
11942 (origin
11943 (method url-fetch)
11944 (uri (pypi-uri "shellingham" version))
11945 (sha256
11946 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
11947 (build-system python-build-system)
11948 (arguments
11949 `(#:phases
11950 (modify-phases %standard-phases
11951 (add-after 'unpack 'restore-setup.py
11952 ;; setup.py will return in the next release.
11953 ;; <https://github.com/sarugaku/shellingham/issues/33>
11954 (lambda _
11955 (with-output-to-file "setup.py"
11956 (lambda _
11957 (display "from setuptools import setup\nsetup()\n")))
11958 #t)))))
11959 (home-page "https://github.com/sarugaku/shellingham")
11960 (synopsis "Tool to detect surrounding shell")
11961 (description
11962 "Shellingham detects what shell the current Python executable is
11963 running in.")
11964 (license license:isc)))
11965
11966 (define-public python-memcached
11967 (package
11968 (name "python-memcached")
11969 (version "1.59")
11970 (source
11971 (origin
11972 (method url-fetch)
11973 (uri (pypi-uri "python-memcached" version))
11974 (sha256
11975 (base32
11976 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
11977 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
11978 (build-system python-build-system)
11979 (propagated-inputs `(("python-six" ,python-six)))
11980 (home-page
11981 "https://github.com/linsomniac/python-memcached")
11982 (synopsis "Pure python memcached client")
11983 (description
11984 "This software is a pure Python interface to the memcached memory cache
11985 daemon. It is the client side software which allows storing values in one or
11986 more, possibly remote, memcached servers.")
11987 (license license:psfl)))
11988
11989 (define-public python-clikit
11990 (package
11991 (name "python-clikit")
11992 (version "0.4.2")
11993 (source
11994 (origin
11995 (method url-fetch)
11996 (uri (pypi-uri "clikit" version))
11997 (sha256
11998 (base32
11999 "1jnnr21hvzx4i29nbph1z96ympv0njiwyvngjq48w1q05133cwzn"))))
12000 (build-system python-build-system)
12001 (propagated-inputs
12002 `(("python-pastel" ,python-pastel)
12003 ("python-pylev" ,python-pylev)))
12004 (home-page "https://github.com/sdispater/clikit")
12005 (synopsis "Group of utilities to build command line interfaces")
12006 (description
12007 "CliKit is a group of utilities to build testable command line
12008 interfaces.")
12009 (properties `((python2-variant . ,(delay python2-clikit))))
12010 (license license:expat)))
12011
12012 (define-public python2-clikit
12013 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12014 (package/inherit
12015 base
12016 (propagated-inputs
12017 `(("python-enum34" ,python2-enum34)
12018 ("python-typing" ,python2-typing)
12019 ,@(package-propagated-inputs base))))))
12020
12021 (define-public python-msgpack-python
12022 (package
12023 (name "python-msgpack-python")
12024 (version "0.5.6")
12025 (source
12026 (origin
12027 (method url-fetch)
12028 (uri (pypi-uri "msgpack-python" version))
12029 (sha256
12030 (base32
12031 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
12032 (build-system python-build-system)
12033 (home-page "http://msgpack.org/")
12034 (synopsis "Package to deserialize messages in MessagePack binary format")
12035 (description
12036 "MessagePack is an efficient binary serialization format. It lets you
12037 exchange data among multiple languages like JSON. But it's faster and
12038 smaller. Small integers are encoded into a single byte, and typical short
12039 strings require only one extra byte in addition to the strings themselves.")
12040 (license license:asl2.0)))
12041
12042 (define-public python-cachy
12043 (package
12044 (name "python-cachy")
12045 (version "0.3.0")
12046 (source
12047 (origin
12048 (method url-fetch)
12049 (uri (pypi-uri "cachy" version))
12050 (sha256
12051 (base32
12052 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
12053 (build-system python-build-system)
12054 (arguments
12055 '(#:phases
12056 (modify-phases %standard-phases
12057 (replace 'check
12058 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
12059 "pytest"))))))
12060 (native-inputs
12061 `(("memcached" ,memcached)
12062 ("python-fakeredis" ,python-fakeredis)
12063 ("python-flexmock" ,python-flexmock)
12064 ("python-pifpaf" ,python-pifpaf)
12065 ("python-pytest" ,python-pytest)))
12066 (propagated-inputs
12067 `(("python-memcached" ,python-memcached)
12068 ("python-msgpack-python" ,python-msgpack-python)
12069 ("python-redis" ,python-redis)))
12070 (home-page "https://github.com/sdispater/cachy")
12071 (synopsis "Simple yet effective caching library")
12072 (description
12073 "Cachy provides a simple yet effective caching library. A simple but
12074 powerful API: thread-safety; decorator syntax; support for memcached, redis,
12075 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
12076 (license license:expat)))
12077
12078 (define-public poetry
12079 (package
12080 (name "poetry")
12081 (version "1.0.9")
12082 ;; Poetry can only be built from source with Poetry.
12083 (source
12084 (origin
12085 (method url-fetch)
12086 (uri (pypi-uri "poetry" version))
12087 (sha256
12088 (base32
12089 "1avp0db1a4hf6lz3wrzhpdvj4rpmzr4in3myrd3lp5j66nc5ck0a"))))
12090 (build-system python-build-system)
12091 (arguments
12092 `(#:tests? #f ;; Pypi does not have tests.
12093 #:phases
12094 (modify-phases %standard-phases
12095 (add-before 'build 'patch-setup-py
12096 (lambda _
12097 (substitute* "setup.py"
12098 ;; poetry won't update version as 21.0.0 relies on python > 3.6
12099 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
12100 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0"))
12101 #t)))))
12102 (propagated-inputs
12103 `(("python-cachecontrol" ,python-cachecontrol)
12104 ("python-cachy" ,python-cachy)
12105 ("python-cleo" ,python-cleo)
12106 ("python-clikit" ,python-clikit)
12107 ("python-html5lib" ,python-html5lib)
12108 ("python-jsonschema" ,python-jsonschema)
12109 ("python-keyring" ,python-keyring)
12110 ("python-msgpack-transitional" ,python-msgpack-transitional)
12111 ("python-pexpect" ,python-pexpect)
12112 ("python-pkginfo" ,python-pkginfo)
12113 ("python-pyparsing" ,python-pyparsing)
12114 ("python-pyrsistent" ,python-pyrsistent)
12115 ("python-requests" ,python-requests)
12116 ("python-requests-toolbelt" ,python-requests-toolbelt)
12117 ("python-shellingham" ,python-shellingham)
12118 ("python-tomlkit" ,python-tomlkit)
12119 ("python-virtualenv" ,python-virtualenv)))
12120 (home-page "https://python-poetry.org")
12121 (synopsis "Python dependency management and packaging made easy")
12122 (description "Poetry is a tool for dependency management and packaging
12123 in Python. It allows you to declare the libraries your project depends on and
12124 it will manage (install/update) them for you.")
12125 (license license:expat)))
12126
12127 (define-public python-lazy-object-proxy
12128 (package
12129 (name "python-lazy-object-proxy")
12130 (version "1.4.3")
12131 (source (origin
12132 (method url-fetch)
12133 (uri (pypi-uri "lazy-object-proxy" version))
12134 (sha256
12135 (base32
12136 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
12137 (native-inputs
12138 `(("python-setuptools-scm" ,python-setuptools-scm)))
12139 (build-system python-build-system)
12140 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
12141 (synopsis "Lazy object proxy for python")
12142 (description
12143 "Lazy object proxy is an object that wraps a callable but defers the call
12144 until the object is actually required, and caches the result of said call.")
12145 (license license:bsd-2)))
12146
12147 (define-public python2-lazy-object-proxy
12148 (package-with-python2 python-lazy-object-proxy))
12149
12150 (define-public python-dnspython
12151 (package
12152 (name "python-dnspython")
12153 (version "1.16.0")
12154 (source (origin
12155 (method url-fetch)
12156 (uri (string-append "http://www.dnspython.org/kits/"
12157 version "/dnspython-" version ".tar.gz"))
12158 (sha256
12159 (base32
12160 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
12161 (build-system python-build-system)
12162 (arguments '(#:tests? #f)) ; XXX: requires internet access
12163 (home-page "http://www.dnspython.org")
12164 (synopsis "DNS toolkit for Python")
12165 (description
12166 "dnspython is a DNS toolkit for Python. It supports almost all record
12167 types. It can be used for queries, zone transfers, and dynamic updates.
12168 It supports TSIG authenticated messages and EDNS0.")
12169 (license license:expat)))
12170
12171 (define-public python2-dnspython
12172 (package-with-python2 python-dnspython))
12173
12174 (define-public python-email-validator
12175 (package
12176 (name "python-email-validator")
12177 (version "1.0.2")
12178 (source
12179 (origin (method url-fetch)
12180 (uri (pypi-uri "email_validator" version))
12181 (sha256
12182 (base32
12183 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
12184 (build-system python-build-system)
12185 (arguments
12186 '(#:phases
12187 (modify-phases %standard-phases
12188 (add-before 'build 'use-dnspython
12189 (lambda _
12190 (substitute* "setup.py"
12191 (("dnspython3") "dnspython"))
12192 #t)))))
12193 (propagated-inputs
12194 `(("python-dnspython" ,python-dnspython)
12195 ("python-idna" ,python-idna)))
12196 (home-page "https://github.com/JoshData/python-email-validator")
12197 (synopsis "Email address validation library for Python")
12198 (description
12199 "This library validates email address syntax and deliverability.")
12200 (license license:cc0)))
12201
12202 (define-public python2-email-validator
12203 (package-with-python2 python-email-validator))
12204
12205 (define-public python-ukpostcodeparser
12206 (package
12207 (name "python-ukpostcodeparser")
12208 (version "1.0.3")
12209 (source (origin
12210 (method url-fetch)
12211 (uri (pypi-uri "UkPostcodeParser" version))
12212 (sha256
12213 (base32
12214 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
12215 (build-system python-build-system)
12216 (home-page "https://github.com/hamstah/ukpostcodeparser")
12217 (synopsis "UK Postcode parser for Python")
12218 (description
12219 "This library provides the @code{parse_uk_postcode} function for
12220 parsing UK postcodes.")
12221 (license license:expat)))
12222
12223 (define-public python2-ukpostcodeparser
12224 (package-with-python2 python-ukpostcodeparser))
12225
12226 (define-public python-faker
12227 (package
12228 (name "python-faker")
12229 (version "4.0.2")
12230 (source (origin
12231 (method url-fetch)
12232 (uri (pypi-uri "Faker" version))
12233 (sha256
12234 (base32
12235 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
12236 (build-system python-build-system)
12237 (arguments
12238 '(#:phases
12239 (modify-phases %standard-phases
12240 (replace 'check
12241 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
12242 (native-inputs
12243 `(;; For testing
12244 ("python-freezegun" ,python-freezegun)
12245 ("python-pytest" ,python-pytest)
12246 ("python-random2" ,python-random2)
12247 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
12248 ("python-validators" ,python-validators)))
12249 (propagated-inputs
12250 `(("python-dateutil" ,python-dateutil)
12251 ("python-text-unidecode" ,python-text-unidecode)))
12252 (home-page "https://github.com/joke2k/faker")
12253 (synopsis "Python package that generates fake data")
12254 (description
12255 "Faker is a Python package that generates fake data such as names,
12256 addresses, and phone numbers.")
12257 (license license:expat)
12258 (properties `((python2-variant . ,(delay python2-faker))))))
12259
12260 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
12261 (define-public python2-faker
12262 (let ((base (package-with-python2 (strip-python2-variant
12263 python-faker))))
12264 (package
12265 (inherit base)
12266 (version "3.0.1")
12267 (source (origin
12268 (method url-fetch)
12269 (uri (pypi-uri "Faker" version))
12270 (sha256
12271 (base32
12272 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
12273 (native-inputs
12274 `(("python-mock" ,python2-mock)
12275 ,@(package-native-inputs base)))
12276 (propagated-inputs
12277 `(("python2-ipaddress" ,python2-ipaddress)
12278 ("python2-six" ,python2-six)
12279 ,@(package-propagated-inputs base))))))
12280
12281 (define-public python-pyaml
12282 (package
12283 (name "python-pyaml")
12284 (version "18.11.0")
12285 (source (origin
12286 (method url-fetch)
12287 (uri (pypi-uri "pyaml" version))
12288 (sha256
12289 (base32
12290 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
12291 (build-system python-build-system)
12292 (native-inputs
12293 `(("python-unidecode" ,python-unidecode)))
12294 (propagated-inputs
12295 `(("python-pyyaml" ,python-pyyaml)))
12296 (home-page "https://github.com/mk-fg/pretty-yaml")
12297 (synopsis "YAML pretty-print library for Python")
12298 (description
12299 "pyaml is a PyYAML based python module to produce pretty and readable
12300 YAML-serialized data.")
12301 (license license:wtfpl2)))
12302
12303 (define-public python2-pyaml
12304 (package-with-python2 python-pyaml))
12305
12306 (define-public python-backpack
12307 (package
12308 (name "python-backpack")
12309 (version "0.1")
12310 (source
12311 (origin
12312 (method url-fetch)
12313 (uri (pypi-uri "backpack" version))
12314 (sha256
12315 (base32
12316 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
12317 (build-system python-build-system)
12318 (native-inputs
12319 `(("python-pytest" ,python-pytest)
12320 ("python-nose" ,python-nose)))
12321 (propagated-inputs
12322 `(("python-simplejson" ,python-simplejson)))
12323 (home-page "https://github.com/sdispater/backpack")
12324 (synopsis "Utilities for working with Python collections")
12325 (description "Backpack provides some useful utilities for working with
12326 collections of data.")
12327 (license license:expat)))
12328
12329 (define-public python2-backpack
12330 (package-with-python2 python-backpack))
12331
12332 (define-public python-prompt-toolkit
12333 (package
12334 (name "python-prompt-toolkit")
12335 (version "3.0.5")
12336 (source
12337 (origin
12338 (method url-fetch)
12339 (uri (pypi-uri "prompt_toolkit" version))
12340 (sha256
12341 (base32
12342 "1j3x5s4gp4ih73sbcni0a0vffbzvrxbrbnkvb3fzjgxn810ilgan"))))
12343 (build-system python-build-system)
12344 (arguments
12345 `(#:phases
12346 (modify-phases %standard-phases
12347 (delete 'check)
12348 (add-after 'install 'post-install-check
12349 (lambda* (#:key inputs outputs #:allow-other-keys)
12350 ;; HOME is needed for the test
12351 ;; "test_pathcompleter_can_expanduser".
12352 (setenv "HOME" "/tmp")
12353 (add-installed-pythonpath inputs outputs)
12354 (invoke "py.test"))))))
12355 (propagated-inputs
12356 `(("python-wcwidth" ,python-wcwidth)))
12357 (native-inputs
12358 `(("python-pytest" ,python-pytest)))
12359 (home-page
12360 "https://github.com/prompt-toolkit/python-prompt-toolkit")
12361 (synopsis "Library for building command line interfaces in Python")
12362 (description
12363 "Prompt-Toolkit is a library for building interactive command line
12364 interfaces in Python. It's like GNU Readline but it also features syntax
12365 highlighting while typing, out-of-the-box multi-line input editing, advanced
12366 code completion, incremental search, support for Chinese double-width
12367 characters, mouse support, and auto suggestions.")
12368 (license license:bsd-3)))
12369
12370 (define-public python-prompt-toolkit-2
12371 (package (inherit python-prompt-toolkit)
12372 (name "python-prompt-toolkit")
12373 (version "2.0.7")
12374 (source
12375 (origin
12376 (method url-fetch)
12377 (uri (pypi-uri "prompt_toolkit" version))
12378 (sha256
12379 (base32
12380 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
12381 (propagated-inputs
12382 `(("python-wcwidth" ,python-wcwidth)
12383 ("python-six" ,python-six)
12384 ("python-pygments" ,python-pygments)))))
12385
12386 (define-public python2-prompt-toolkit
12387 (package-with-python2 python-prompt-toolkit-2))
12388
12389 (define-public python-prompt-toolkit-1
12390 (package (inherit python-prompt-toolkit-2)
12391 (version "1.0.15")
12392 (source
12393 (origin
12394 (method url-fetch)
12395 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
12396 (sha256
12397 (base32
12398 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
12399
12400 (define-public python2-prompt-toolkit-1
12401 (package-with-python2 python-prompt-toolkit-1))
12402
12403 (define-public python-jedi
12404 (package
12405 (name "python-jedi")
12406 (version "0.17.0")
12407 (source
12408 (origin
12409 (method url-fetch)
12410 (uri (pypi-uri "jedi" version))
12411 (patches (search-patches "python-jedi-sort-project-test.patch"))
12412 (sha256
12413 (base32
12414 "0c1h9x3a9klvk2g288wl328x8xgzw7136k6vs9hkd56b85vcjh6z"))))
12415 (build-system python-build-system)
12416 (arguments
12417 `(#:phases
12418 (modify-phases %standard-phases
12419 (add-before 'check 'adjust-test-for-python-3.8
12420 (lambda _
12421 ;; Mimic upstream commit e7feeef64 to allow for extra output lines
12422 ;; in TestSetupReadline on Python 3.8. Remove for jedi > 0.17.0.
12423 (substitute* "test/test_utils.py"
12424 (("assert len\\(difference\\) < 20")
12425 "assert len(difference) < 22"))
12426 #t))
12427 (replace 'check
12428 (lambda _
12429 (setenv "HOME" "/tmp")
12430 (invoke "python" "-m" "pytest" "-vv"))))))
12431 (native-inputs
12432 `(("python-pytest" ,python-pytest)
12433 ("python-docopt" ,python-docopt)))
12434 (propagated-inputs
12435 `(("python-parso" ,python-parso)))
12436 (home-page "https://github.com/davidhalter/jedi")
12437 (synopsis "Autocompletion and static analysis library for Python")
12438 (description
12439 "Jedi is a static analysis tool for Python that can be used in Integrated
12440 Development Environments (@dfn{IDE}s) and text editors. It understands Python
12441 on a deeper level than many other static analysis frameworks for Python.
12442
12443 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
12444 well.")
12445 (license license:expat)))
12446
12447 (define-public python2-jedi
12448 (package-with-python2 python-jedi))
12449
12450 (define-public ptpython
12451 (package
12452 (name "ptpython")
12453 (version "0.34")
12454 (source (origin
12455 (method url-fetch)
12456 (uri (pypi-uri "ptpython" version))
12457 (sha256
12458 (base32
12459 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12460 (build-system python-build-system)
12461 (arguments
12462 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
12463 (propagated-inputs
12464 `(("python-docopt" ,python-docopt)
12465 ("python-jedi" ,python-jedi)
12466 ("python-prompt-toolkit" ,python-prompt-toolkit)
12467 ("python-pygments" ,python-pygments)))
12468 (home-page "https://github.com/jonathanslenders/ptpython")
12469 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12470 (description
12471 "ptpython is a Python read-eval-print loop with IDE-like features.
12472 It supports syntax highlighting, multiline editing, autocompletion, mouse,
12473 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12474 etc.")
12475 (license license:bsd-3)
12476 (properties `((python2-variant . ,(delay ptpython-2))))))
12477
12478 (define-public ptpython-2
12479 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12480 (package
12481 (inherit base)
12482 (name "ptpython2"))))
12483
12484 (define-public python-stem
12485 (package
12486 (name "python-stem")
12487 (version "1.8.0")
12488 (source
12489 (origin
12490 (method url-fetch)
12491 (uri (pypi-uri "stem" version))
12492 (sha256
12493 (base32
12494 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
12495 (build-system python-build-system)
12496 (arguments
12497 `(#:phases
12498 (modify-phases %standard-phases
12499 (replace 'check
12500 (lambda _
12501 (invoke "./run_tests.py" "--unit")
12502 #t)))))
12503 (native-inputs
12504 `(("python-mock" ,python-mock)
12505 ("python-pycodestyle" ,python-pycodestyle)
12506 ("python-pyflakes" ,python-pyflakes)))
12507 (home-page "https://stem.torproject.org/")
12508 (synopsis
12509 "Python controller library that allows applications to interact with Tor")
12510 (description
12511 "Stem is a Python controller library for Tor. With it you can use Tor's
12512 control protocol to script against the Tor process and read descriptor data
12513 relays publish about themselves.")
12514 (license license:lgpl3)))
12515
12516 (define-public python2-stem
12517 (package-with-python2 python-stem))
12518
12519 (define-public python-pyserial
12520 (package
12521 (name "python-pyserial")
12522 (version "3.4")
12523 (source
12524 (origin
12525 (method url-fetch)
12526 (uri (pypi-uri "pyserial" version))
12527 (sha256
12528 (base32
12529 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
12530 (build-system python-build-system)
12531 (arguments
12532 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12533 ;; #:phases
12534 ;; (modify-phases %standard-phases
12535 ;; (replace 'check
12536 ;; (lambda _
12537 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12538 (home-page
12539 "https://github.com/pyserial/pyserial")
12540 (synopsis "Python Serial Port Bindings")
12541 (description "@code{pyserial} provide serial port bindings for Python. It
12542 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12543 and/or Xon/Xoff. The port is accessed in RAW mode.")
12544 (license license:bsd-3)))
12545
12546 (define-public python2-pyserial
12547 (package-with-python2 python-pyserial))
12548
12549 (define-public python-kivy
12550 (package
12551 (name "python-kivy")
12552 (version "1.10.1")
12553 (source
12554 (origin
12555 (method url-fetch)
12556 (uri (pypi-uri "Kivy" version))
12557 (file-name (string-append name "-" version ".tar.gz"))
12558 (sha256
12559 (base32
12560 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
12561 (build-system python-build-system)
12562 (arguments
12563 `(#:tests? #f ; Tests require many optional packages
12564 #:phases
12565 (modify-phases %standard-phases
12566 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12567 (lambda* (#:key inputs #:allow-other-keys)
12568 (setenv "KIVY_SDL2_PATH"
12569 (string-append (assoc-ref inputs "sdl-union")
12570 "/include/SDL2"))
12571 #t)))))
12572 (native-inputs
12573 `(("pkg-config" ,pkg-config)
12574 ("python-cython" ,python-cython)))
12575 (inputs
12576 `(("gstreamer" ,gstreamer)
12577 ("mesa" ,mesa)
12578 ("sdl-union"
12579 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12580 (home-page "https://kivy.org")
12581 (synopsis
12582 "Multitouch application framework")
12583 (description
12584 "A software library for rapid development of
12585 hardware-accelerated multitouch applications.")
12586 (license license:expat)))
12587
12588 (define-public python2-kivy
12589 (package-with-python2 python-kivy))
12590
12591 (define-public python-binaryornot
12592 (package
12593 (name "python-binaryornot")
12594 (version "0.4.4")
12595 (source (origin
12596 (method url-fetch)
12597 (uri (pypi-uri "binaryornot" version))
12598 (sha256
12599 (base32
12600 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
12601 (build-system python-build-system)
12602 (arguments
12603 `(#:phases
12604 (modify-phases %standard-phases
12605 (add-after 'unpack 'patch-tests
12606 (lambda _
12607 ;; TypeError: binary() got an unexpected keyword argument
12608 ;; 'average_size'.
12609 (substitute* "tests/test_check.py"
12610 (("average_size=512") ""))
12611 #t)))))
12612 (propagated-inputs
12613 `(("python-chardet" ,python-chardet)
12614 ("python-hypothesis" ,python-hypothesis)))
12615 (home-page "https://github.com/audreyr/binaryornot")
12616 (synopsis "Package to check if a file is binary or text")
12617 (description "Ultra-lightweight pure Python package to check if a file is
12618 binary or text.")
12619 (license license:bsd-3)
12620 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12621
12622 (define-public python2-binaryornot
12623 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12624 (package (inherit base)
12625 (propagated-inputs
12626 `(("python2-enum34" ,python2-enum34)
12627 ,@(package-propagated-inputs base))))))
12628
12629 (define-public python-binwalk
12630 (package
12631 (name "python-binwalk")
12632 (version "2.2.0")
12633 (source
12634 (origin
12635 (method git-fetch)
12636 (uri (git-reference
12637 (url "https://github.com/ReFirmLabs/binwalk")
12638 (commit (string-append "v" version))))
12639 (file-name (git-file-name name version))
12640 (sha256
12641 (base32
12642 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
12643 (build-system python-build-system)
12644 (arguments
12645 `(#:phases
12646 (modify-phases %standard-phases
12647 (add-before 'check 'set-pythonpath
12648 (lambda _
12649 (setenv "PYTHONPATH"
12650 (string-append
12651 (getcwd) "/src/"
12652 ":" (getenv "PYTHONPATH")))
12653 (setenv "HOME" "")
12654 #t)))))
12655 (native-inputs
12656 `(("python-coverage" ,python-coverage)
12657 ("python-nose" ,python-nose)))
12658 (home-page "https://github.com/ReFirmLabs/binwalk")
12659 (synopsis "Firmware analysis tool")
12660 (description "Binwalk is a tool for analyzing, reverse engineering, and
12661 extracting firmware images")
12662 (license license:expat)))
12663
12664 (define-public python-nltk
12665 (package
12666 (name "python-nltk")
12667 (version "3.2.1")
12668 (source (origin
12669 (method url-fetch)
12670 (uri (pypi-uri "nltk" version))
12671 (sha256
12672 (base32
12673 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12674 (build-system python-build-system)
12675 (arguments
12676 '(;; The tests require some extra resources to be downloaded.
12677 ;; TODO Try packaging these resources.
12678 #:tests? #f))
12679 (home-page "http://nltk.org/")
12680 (synopsis "Natural Language Toolkit")
12681 (description "It provides interfaces to over 50 corpora and lexical
12682 resources such as WordNet, along with a suite of text processing libraries
12683 for classification, tokenization, stemming, tagging, parsing, and semantic
12684 reasoning, wrappers for natural language processing libraries.")
12685 (license license:asl2.0)))
12686
12687 (define-public python2-nltk
12688 (package-with-python2 python-nltk))
12689
12690 (define-public python-pymongo
12691 (package
12692 (name "python-pymongo")
12693 (version "3.7.2")
12694 (source (origin
12695 (method url-fetch)
12696 (uri (pypi-uri "pymongo" version))
12697 (sha256
12698 (base32
12699 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
12700 (build-system python-build-system)
12701 (propagated-inputs
12702 `(("python-certifi" ,python-certifi)))
12703 (home-page "https://github.com/mongodb/mongo-python-driver")
12704 (synopsis "Python driver for MongoDB")
12705 (description "Python driver for MongoDB.")
12706 (license license:asl2.0)))
12707
12708 (define-public python2-pymongo
12709 (package-with-python2 python-pymongo))
12710
12711 (define-public python-consul
12712 (package
12713 (name "python-consul")
12714 (version "0.6.1")
12715 (source
12716 (origin
12717 (method url-fetch)
12718 (uri (pypi-uri "python-consul" version))
12719 (sha256
12720 (base32
12721 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12722 (build-system python-build-system)
12723 (arguments
12724 '(#:tests? #f)) ; The tests are not distributed
12725 (propagated-inputs
12726 `(("python-requests" ,python-requests)
12727 ("python-six" ,python-six)))
12728 (home-page "https://github.com/cablehead/python-consul")
12729 (synopsis "Python client for Consul")
12730 (description
12731 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12732 discovery, monitoring and configuration.")
12733 (license license:expat)))
12734
12735 (define-public python2-consul
12736 (package-with-python2 python-consul))
12737
12738 (define-public python-schematics
12739 (package
12740 (name "python-schematics")
12741 (version "1.1.1")
12742 (source
12743 (origin
12744 (method git-fetch)
12745 (uri (git-reference
12746 (url "https://github.com/schematics/schematics.git")
12747 (commit (string-append "v" version))))
12748 (file-name (git-file-name name version))
12749 (sha256
12750 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
12751 (build-system python-build-system)
12752 (propagated-inputs
12753 `(("python-six" ,python-six)))
12754 (arguments
12755 ;; The tests require a bunch of not very nice packages with fixed
12756 ;; version requirements (e.g. python-coveralls).
12757 `(#:tests? #f))
12758 (home-page "https://github.com/schematics/schematics")
12759 (synopsis "Python Data Structures for Humans")
12760 (description "Python Data Structures for Humans.")
12761 (license license:bsd-3)))
12762
12763 (define-public python2-schematics
12764 (package-with-python2 python-schematics))
12765
12766 (define-public python-odfpy
12767 (package
12768 (name "python-odfpy")
12769 (version "1.4.1")
12770 (source (origin
12771 (method url-fetch)
12772 (uri (pypi-uri "odfpy" version))
12773 (sha256
12774 (base32
12775 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
12776 (arguments
12777 `(#:phases
12778 (modify-phases %standard-phases
12779 (replace 'check
12780 (lambda _
12781 (setenv "PYTHONPATH" (string-append "./build/lib:"
12782 (getenv "PYTHONPATH")))
12783 (invoke "pytest" "-vv"))))))
12784 (build-system python-build-system)
12785 (native-inputs
12786 `(("python-pytest" ,python-pytest)))
12787 (propagated-inputs
12788 `(("python-defusedxml" ,python-defusedxml)))
12789 (home-page "https://github.com/eea/odfpy")
12790 (synopsis "Python API and tools to manipulate OpenDocument files")
12791 (description "Collection of libraries and utility programs written in
12792 Python to manipulate OpenDocument 1.2 files.")
12793 (license
12794 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12795 ;; number of files with other licenses.
12796 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12797
12798 (define-public python2-odfpy
12799 (package-with-python2 python-odfpy))
12800
12801 (define-public python-natsort
12802 (package
12803 (name "python-natsort")
12804 (version "7.0.1")
12805 (source (origin
12806 (method url-fetch)
12807 (uri (pypi-uri "natsort" version))
12808 (sha256
12809 (base32
12810 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
12811 (build-system python-build-system)
12812 (arguments
12813 `(#:modules ((guix build utils)
12814 (guix build python-build-system)
12815 (srfi srfi-1)
12816 (srfi srfi-26)
12817 (ice-9 ftw))
12818 #:phases
12819 (modify-phases %standard-phases
12820 (add-before 'check 'set-cachedir
12821 ;; Tests require write access to $HOME by default
12822 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
12823 (replace 'check
12824 (lambda _
12825 (let ((cwd (getcwd)))
12826 (setenv "PYTHONPATH"
12827 (string-append
12828 cwd "/build/"
12829 (find (cut string-prefix? "lib" <>)
12830 (scandir (string-append cwd "/build")))
12831 ":"
12832 (getenv "PYTHONPATH")))
12833 (invoke "pytest" "-v")))))))
12834 (native-inputs
12835 `(("python-hypothesis" ,python-hypothesis)
12836 ("python-pytest-cov" ,python-pytest-cov)
12837 ("python-pytest-mock" ,python-pytest-mock)
12838 ("python-pytest" ,python-pytest)))
12839 (propagated-inputs ; TODO: Add python-fastnumbers.
12840 `(("python-pyicu" ,python-pyicu)))
12841 (home-page "https://github.com/SethMMorton/natsort")
12842 (synopsis "Natural sorting for python and shell")
12843 (description
12844 "Natsort lets you apply natural sorting on lists instead of
12845 lexicographical. If you use the built-in @code{sorted} method in python
12846 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
12847 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
12848 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
12849 identifies numbers and sorts them separately from strings. It can also sort
12850 version numbers, real numbers, mixed types and more, and comes with a shell
12851 command @command{natsort} that exposes this functionality in the command line.")
12852 (license license:expat)
12853 (properties `((python2-variant . ,(delay python2-natsort))))))
12854
12855 ;; Natsort 6.x are the last versions with support for Python 2.
12856 (define-public python2-natsort
12857 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12858 (package (inherit base)
12859 (version "6.2.1")
12860 (source (origin
12861 (method url-fetch)
12862 (uri (pypi-uri "natsort" version))
12863 (sha256
12864 (base32
12865 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
12866 (native-inputs
12867 `(("python2-pathlib" ,python2-pathlib)
12868 ,@(package-native-inputs base))))))
12869
12870 (define-public glances
12871 (package
12872 (name "glances")
12873 (version "3.1.4")
12874 (source
12875 (origin
12876 (method url-fetch)
12877 (uri (pypi-uri "Glances" version))
12878 (sha256
12879 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
12880 (modules '((guix build utils)))
12881 (snippet
12882 '(begin
12883 ;; Glances phones PyPI for weekly update checks by default.
12884 ;; Disable these. The user can re-enable them if desired.
12885 (substitute* "glances/outdated.py"
12886 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
12887 (string-append indentation
12888 "self.args.disable_check_update = True\n"
12889 line)))
12890 #t))))
12891 (build-system python-build-system)
12892 (propagated-inputs
12893 `(("python-future" ,python-future)
12894 ("python-psutil" ,python-psutil)))
12895 (home-page "https://github.com/nicolargo/glances")
12896 (synopsis "Cross-platform curses-based monitoring tool")
12897 (description
12898 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12899 Glances uses the PsUtil library to get information from your system. It
12900 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12901 (license license:lgpl3+)))
12902
12903 (define-public python-glances
12904 (deprecated-package "python-glances" glances))
12905
12906 (define-public python-graphql-core
12907 (package
12908 (name "python-graphql-core")
12909 (version "0.5.3")
12910 (source
12911 (origin
12912 (method url-fetch)
12913 (uri (pypi-uri "graphql-core" version))
12914 (sha256
12915 (base32
12916 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12917 (build-system python-build-system)
12918 (arguments
12919 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12920 #:phases
12921 (modify-phases %standard-phases
12922 (add-after 'unpack 'patch-hardcoded-version
12923 (lambda _ (substitute*
12924 "setup.py"
12925 (("'gevent==1.1rc1'") "'gevent'"))
12926 #t)))))
12927 (native-inputs
12928 `(("python-gevent" ,python-gevent)
12929 ("python-mock" ,python-mock)
12930 ("python-pytest-mock" ,python-pytest-mock)))
12931 (propagated-inputs
12932 `(("python-promise" ,python-promise)
12933 ("python-six" ,python-six)))
12934 (home-page "https://github.com/graphql-python/graphql-core")
12935 (synopsis "GraphQL implementation for Python")
12936 (description
12937 "GraphQL implementation for Python. GraphQL is a data query language and
12938 runtime designed and used to request and deliver data to mobile and web apps.
12939 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12940 to Python.")
12941 (license license:expat)))
12942
12943 (define-public python2-graphql-core
12944 (package-with-python2 python-graphql-core))
12945
12946 (define-public python-graphql-relay
12947 (package
12948 (name "python-graphql-relay")
12949 (version "0.4.5")
12950 (source
12951 (origin
12952 (method url-fetch)
12953 (uri (pypi-uri "graphql-relay" version))
12954 (sha256
12955 (base32
12956 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12957 (build-system python-build-system)
12958 (arguments
12959 '(#:tests? #f)) ; The tests are not distributed
12960 (propagated-inputs
12961 `(("python-graphql-core" ,python-graphql-core)
12962 ("python-promise" ,python-promise)
12963 ("python-six" ,python-six)))
12964 (home-page "https://github.com/graphql-python/graphql-relay-py")
12965 (synopsis "Relay implementation for Python")
12966 (description
12967 "This is a library to allow the easy creation of Relay-compliant servers
12968 using the GraphQL Python reference implementation of a GraphQL server. It
12969 should be noted that the code is a exact port of the original
12970 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12971 from Facebook.")
12972 (license license:expat)))
12973
12974 (define-public python2-graphql-relay
12975 (package-with-python2 python-graphql-relay))
12976
12977 (define-public python-graphene
12978 (package
12979 (name "python-graphene")
12980 (version "0.10.2")
12981 (source
12982 (origin
12983 (method url-fetch)
12984 (uri (pypi-uri "graphene" version))
12985 (sha256
12986 (base32
12987 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12988 (build-system python-build-system)
12989 (propagated-inputs
12990 `(("python-graphql-core" ,python-graphql-core)
12991 ("python-graphql-relay" ,python-graphql-relay)
12992 ("python-iso8601" ,python-iso8601)
12993 ("python-promise" ,python-promise)
12994 ("python-six" ,python-six)))
12995 (arguments
12996 `(#:tests? #f)) ; no tests/ in the PyPI tarball
12997 (home-page "https://graphene-python.org/")
12998 (synopsis "GraphQL Framework for Python")
12999 (description
13000 "Graphene is a Python library for building GraphQL schemas/types.
13001 A GraphQL schema describes your data model, and provides a GraphQL server
13002 with an associated set of resolve methods that know how to fetch data.")
13003 (properties `((python2-variant . ,(delay python2-graphene))))
13004 (license license:expat)))
13005
13006 (define-public python2-graphene
13007 (let ((base (package-with-python2
13008 (strip-python2-variant python-graphene))))
13009 (package (inherit base)
13010 (native-inputs
13011 `(("python2-sqlalchemy" ,python2-sqlalchemy)
13012 ,@(package-native-inputs base))))))
13013
13014 (define-public python-nautilus
13015 (package
13016 (name "python-nautilus")
13017 (version "0.4.9")
13018 (source
13019 (origin
13020 (method url-fetch)
13021 (uri (pypi-uri "nautilus" version))
13022 (sha256
13023 (base32
13024 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13025 (build-system python-build-system)
13026 (arguments `(#:tests? #f)) ; fails to import test modules
13027 (propagated-inputs
13028 `(("python-bcrypt" ,python-bcrypt)
13029 ("python-click" ,python-click)
13030 ("python-consul" ,python-consul)
13031 ("python-graphene" ,python-graphene)
13032 ("python-jinja2" ,python-jinja2)
13033 ("python-peewee" ,python-peewee)
13034 ("python-pika" ,python-pika)
13035 ("python-tornado" ,python-tornado)
13036 ("python-wtforms" ,python-wtforms)))
13037 (native-inputs
13038 `(("python-nose2" ,python-nose2)))
13039 (home-page "https://github.com/AlecAivazis/nautilus")
13040 (synopsis "Library for creating microservice applications")
13041 (description
13042 "Nautilus is a framework for flux based microservices that looks to
13043 provide extendible implementations of common aspects of a cloud so that you can
13044 focus on building massively scalable web applications.")
13045 (license license:expat)))
13046
13047 (define-public python-random2
13048 (package
13049 (name "python-random2")
13050 (version "1.0.1")
13051 (source (origin
13052 (method url-fetch)
13053 (uri (pypi-uri "random2" version ".zip"))
13054 (sha256
13055 (base32
13056 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
13057 (build-system python-build-system)
13058 (native-inputs `(("unzip" ,unzip)))
13059 (home-page "http://pypi.python.org/pypi/random2")
13060 (synopsis "Python 3 version of the Python 2 @code{random} module")
13061 (description
13062 "This package provides a Python 3 ported version of Python 2.7’s
13063 @code{random} module. It has also been back-ported to work in Python 2.6.
13064
13065 In Python 3, the implementation of @code{randrange()} was changed, so that
13066 even with the same seed you get different sequences in Python 2 and 3.
13067
13068 This package closes that gap, allowing stable random number generation
13069 between the different Python versions.")
13070 (license license:psfl)))
13071
13072 (define-public python2-random2
13073 (package-with-python2 python-random2))
13074
13075 (define-public python-snowballstemmer
13076 (package
13077 (name "python-snowballstemmer")
13078 (version "2.0.0")
13079 (source (origin
13080 (method url-fetch)
13081 (uri (pypi-uri "snowballstemmer" version))
13082 (sha256
13083 (base32
13084 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
13085 (build-system python-build-system)
13086 (arguments
13087 `(;; No tests exist
13088 #:tests? #f))
13089 (home-page "https://github.com/shibukawa/snowball_py")
13090 (synopsis "Snowball stemming library collection for Python")
13091 (description "This package provides 16 word stemmer algorithms generated
13092 from Snowball algorithms. It includes the 15 original ones plus the Poerter
13093 English stemmer.")
13094 (license license:bsd-3)))
13095
13096 (define-public python2-snowballstemmer
13097 (package-with-python2 python-snowballstemmer))
13098
13099 (define-public python-setproctitle
13100 (package
13101 (name "python-setproctitle")
13102 (version "1.1.10")
13103 (source
13104 (origin
13105 (method url-fetch)
13106 (uri (pypi-uri "setproctitle" version))
13107 (sha256
13108 (base32
13109 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13110 (build-system python-build-system)
13111 (arguments
13112 '(#:phases
13113 (modify-phases %standard-phases
13114 (add-before 'check 'patch-Makefile
13115 ;; Stricly this is only required for the python2 variant.
13116 ;; But adding a phase in an inherited package seems to be
13117 ;; cumbersum. So we patch even for python3.
13118 (lambda _
13119 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13120 (when nose
13121 (substitute* "Makefile"
13122 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13123 (string-append nose "/bin/nosetests "))))
13124 #t)))
13125 (replace 'check
13126 (lambda _
13127 (setenv "PYTHON" (or (which "python3") (which "python")))
13128 (setenv "PYCONFIG" (or (which "python3-config")
13129 (which "python-config")))
13130 (setenv "CC" "gcc")
13131 ;; No need to extend PYTHONPATH to find the built package, since
13132 ;; the Makefile will build anyway
13133 (invoke "make" "check"))))))
13134 (native-inputs
13135 `(("procps" ,procps))) ; required for tests
13136 (home-page
13137 "https://github.com/dvarrazzo/py-setproctitle")
13138 (synopsis
13139 "Setproctitle implementation for Python to customize the process title")
13140 (description "The library allows a process to change its title (as displayed
13141 by system tools such as ps and top).
13142
13143 Changing the title is mostly useful in multi-process systems, for
13144 example when a master process is forked: changing the children's title
13145 allows identifying the task each process is busy with. The technique
13146 is used by PostgreSQL and the OpenSSH Server for example.")
13147 (license license:bsd-3)
13148 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13149
13150 (define-public python2-setproctitle
13151 (let ((base (package-with-python2
13152 (strip-python2-variant python-setproctitle))))
13153 (package
13154 (inherit base)
13155 (native-inputs `(("python2-nose" ,python2-nose)
13156 ,@(package-native-inputs base))))))
13157
13158 (define-public python-validictory
13159 (package
13160 (name "python-validictory")
13161 (version "1.0.1")
13162 (source
13163 (origin
13164 (method url-fetch)
13165 (uri (pypi-uri "validictory" version))
13166 (sha256
13167 (base32
13168 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13169 (build-system python-build-system)
13170 (arguments
13171 '(#:phases
13172 (modify-phases %standard-phases
13173 (add-after 'unpack 'bootstrap
13174 ;; Move the tests out of the package directory to avoid
13175 ;; packaging them.
13176 (lambda* _
13177 (rename-file "validictory/tests" "tests")
13178 (delete-file "tests/__init__.py")))
13179 (replace 'check
13180 (lambda _
13181 ;; Extend PYTHONPATH so the built package will be found.
13182 (setenv "PYTHONPATH"
13183 (string-append (getcwd) "/build/lib:"
13184 (getenv "PYTHONPATH")))
13185 (invoke "py.test" "-vv" ))))))
13186 (native-inputs
13187 `(("python-pytest" ,python-pytest)))
13188 (home-page
13189 "https://github.com/jamesturk/validictory")
13190 (synopsis "General purpose Python data validator")
13191 (description "It allows validation of arbitrary Python data structures.
13192
13193 The schema format is based on the JSON Schema
13194 proposal (http://json-schema.org), so combined with json the library is also
13195 useful as a validator for JSON data.")
13196 (license license:expat)))
13197
13198 (define-public python2-validictory
13199 (package-with-python2 python-validictory))
13200
13201 (define-public python-pyelftools
13202 (package
13203 (name "python-pyelftools")
13204 (version "0.25")
13205 (source
13206 (origin
13207 (method url-fetch)
13208 (uri (pypi-uri "pyelftools" version))
13209 (sha256
13210 (base32
13211 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
13212 (build-system python-build-system)
13213 (arguments
13214 `(#:phases
13215 (modify-phases %standard-phases
13216 (add-before 'check 'set-pythonpath
13217 (lambda _
13218 (setenv "PYTHONPATH"
13219 (string-append
13220 (getcwd) "/test/"
13221 ":" (getenv "PYTHONPATH")))
13222 #t)))))
13223 (home-page
13224 "https://github.com/eliben/pyelftools")
13225 (synopsis
13226 "Analyze binary and library file information")
13227 (description "This Python library provides interfaces for parsing and
13228 analyzing two binary and library file formats; the Executable and Linking
13229 Format (ELF), and debugging information in the Debugging With Attributed
13230 Record Format (DWARF).")
13231 (license license:public-domain)))
13232
13233 (define-public python-pyev
13234 (package
13235 (name "python-pyev")
13236 (version "0.9.0")
13237 (source
13238 (origin
13239 (method url-fetch)
13240 (uri (pypi-uri "pyev" version))
13241 (sha256
13242 (base32
13243 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13244 (build-system python-build-system)
13245 (arguments
13246 `(#:tests? #f ; no test suite
13247 #:phases
13248 (modify-phases %standard-phases
13249 (add-after 'unpack 'patch
13250 (lambda* (#:key inputs #:allow-other-keys)
13251 (let ((libev (string-append (assoc-ref inputs "libev")
13252 "/lib/libev.so.4")))
13253 (substitute* "setup.py"
13254 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13255 (string-append "libev_dll_name = \"" libev "\"")))))))))
13256 (inputs
13257 `(("libev" ,libev)))
13258 (home-page "http://pythonhosted.org/pyev/")
13259 (synopsis "Python libev interface")
13260 (description "Pyev provides a Python interface to libev.")
13261 (license license:gpl3)))
13262
13263 (define-public python2-pyev
13264 (package-with-python2 python-pyev))
13265
13266 (define-public python-imagesize
13267 (package
13268 (name "python-imagesize")
13269 (version "1.2.0")
13270 (source
13271 (origin
13272 (method url-fetch)
13273 (uri (pypi-uri "imagesize" version))
13274 (sha256
13275 (base32
13276 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
13277 (build-system python-build-system)
13278 (home-page "https://github.com/shibukawa/imagesize_py")
13279 (synopsis "Gets image size of files in various formats in Python")
13280 (description
13281 "This package allows determination of image size from
13282 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13283 (license license:expat)))
13284
13285 (define-public python2-imagesize
13286 (package-with-python2 python-imagesize))
13287
13288 (define-public python-termstyle
13289 (package
13290 (name "python-termstyle")
13291 (version "0.1.11")
13292 (source
13293 (origin
13294 (method url-fetch)
13295 (uri (pypi-uri "termstyle" version))
13296 (sha256
13297 (base32
13298 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13299 (build-system python-build-system)
13300 (arguments
13301 '(#:phases
13302 (modify-phases %standard-phases
13303 (replace 'check
13304 (lambda _
13305 (invoke "python" "test3.py"))))))
13306 (home-page "https://github.com/gfxmonk/termstyle")
13307 (synopsis "Console text coloring for Python")
13308 (description "This package provides console text coloring for Python.")
13309 (license license:bsd-3)))
13310
13311 (define-public python-argcomplete
13312 (package
13313 (name "python-argcomplete")
13314 (version "1.11.1")
13315 (source
13316 (origin
13317 (method url-fetch)
13318 (uri (pypi-uri "argcomplete" version))
13319 (sha256
13320 (base32
13321 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
13322 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
13323 (build-system python-build-system)
13324 (native-inputs
13325 `(("python-coverage" ,python-coverage)
13326 ("python-flake8" ,python-flake8)
13327 ("python-pexpect" ,python-pexpect)
13328 ("python-wheel" ,python-wheel)
13329 ("tcsh" ,tcsh)
13330 ("fish" ,fish)
13331 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
13332 (home-page "https://github.com/kislyuk/argcomplete")
13333 (synopsis "Shell tab completion for Python argparse")
13334 (description "argcomplete provides extensible command line tab completion
13335 of arguments and options for Python scripts using @code{argparse}. It's
13336 particularly useful for programs with many options or sub-parsers that can
13337 dynamically suggest completions; for example, when browsing resources over the
13338 network.")
13339 (license license:asl2.0)))
13340
13341 (define-public python2-argcomplete
13342 (package-with-python2 python-argcomplete))
13343
13344 (define-public python-xopen
13345 (package
13346 (name "python-xopen")
13347 (version "0.5.0")
13348 (source
13349 (origin
13350 (method url-fetch)
13351 (uri (pypi-uri "xopen" version))
13352 (sha256
13353 (base32
13354 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
13355 (build-system python-build-system)
13356 (propagated-inputs
13357 `(("python-setuptools-scm" ,python-setuptools-scm)))
13358 (home-page "https://github.com/marcelm/xopen/")
13359 (synopsis "Open compressed files transparently")
13360 (description "This module provides an @code{xopen} function that works like
13361 Python's built-in @code{open} function, but can also deal with compressed files.
13362 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13363 recognized by their file extensions. The focus is on being as efficient as
13364 possible on all supported Python versions.")
13365 (license license:expat)))
13366
13367 (define-public python2-xopen
13368 (let ((base (package-with-python2
13369 (strip-python2-variant python-xopen))))
13370 (package
13371 (inherit base)
13372 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
13373 ,@(package-propagated-inputs base))))))
13374
13375 (define-public python-cheetah
13376 (package
13377 (name "python-cheetah")
13378 (version "3.2.4")
13379 (source
13380 (origin
13381 (method url-fetch)
13382 (uri (pypi-uri "Cheetah3" version))
13383 (sha256
13384 (base32
13385 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
13386 (build-system python-build-system)
13387 (arguments
13388 `(#:modules ((guix build utils)
13389 (guix build python-build-system)
13390 (ice-9 ftw)
13391 (srfi srfi-1)
13392 (srfi srfi-26))
13393 #:phases (modify-phases %standard-phases
13394 (add-after 'unpack 'use-absolute-python
13395 (lambda _
13396 (substitute* "Cheetah/CheetahWrapper.py"
13397 (("#!/usr/bin/env python")
13398 (string-append "#!" (which "python"))))
13399 #t))
13400 (add-after 'unpack 'fix-tests
13401 (lambda _
13402 (substitute* "Cheetah/Tests/ImportHooks.py"
13403 (("os.path.dirname\\(__file__\\)")
13404 (string-append "'" (getcwd) "/Cheetah/Tests'")))
13405 #t))
13406 (replace 'check
13407 (lambda _
13408 (let ((cwd (getcwd)))
13409 (setenv "PYTHONPATH"
13410 (string-append
13411 cwd "/build/"
13412 (find (cut string-prefix? "lib" <>)
13413 (scandir (string-append cwd "/build")))
13414 ":" (getenv "PYTHONPATH")))
13415 (setenv "PATH"
13416 (string-append (getenv "PATH")
13417 ":" cwd "/bin"))
13418 (setenv "TMPDIR" "/tmp")
13419
13420 (substitute* "Cheetah/Tests/Test.py"
13421 (("unittest.TextTestRunner\\(\\)")
13422 "unittest.TextTestRunner(verbosity=2)"))
13423
13424 (invoke "python" "Cheetah/Tests/Test.py")))))))
13425 (propagated-inputs
13426 `(("python-markdown" ,python-markdown))) ;optional
13427 (home-page "https://cheetahtemplate.org/")
13428 (synopsis "Template engine")
13429 (description "Cheetah is a text-based template engine and Python code
13430 generator.
13431
13432 Cheetah can be used as a standalone templating utility or referenced as
13433 a library from other Python applications. It has many potential uses,
13434 but web developers looking for a viable alternative to ASP, JSP, PHP and
13435 PSP are expected to be its principle user group.
13436
13437 Features:
13438 @enumerate
13439 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13440 text-based format.
13441 @item Cleanly separates content, graphic design, and program code.
13442 @item Blends the power and flexibility of Python with a simple template language
13443 that non-programmers can understand.
13444 @item Gives template writers full access to any Python data structure, module,
13445 function, object, or method in their templates.
13446 @item Makes code reuse easy by providing an object-orientated interface to
13447 templates that is accessible from Python code or other Cheetah templates.
13448 One template can subclass another and selectively reimplement sections of it.
13449 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13450 improve the performance of a dynamic website.
13451 @item Compiles templates into optimized, yet readable, Python code.
13452 @end enumerate")
13453 (license (license:x11-style "file://LICENSE"))))
13454
13455 (define-public python2-cheetah
13456 (package-with-python2 python-cheetah))
13457
13458 (define-public python-dulwich
13459 (package
13460 (name "python-dulwich")
13461 (version "0.19.16")
13462 (source
13463 (origin
13464 (method url-fetch)
13465 (uri (list (string-append "https://www.dulwich.io/releases/"
13466 "dulwich-" version ".tar.gz")
13467 (pypi-uri "dulwich" version)))
13468 (sha256
13469 (base32
13470 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
13471 (build-system python-build-system)
13472 (arguments
13473 `(#:phases
13474 (modify-phases %standard-phases
13475 (add-before 'check 'fix-tests
13476 (lambda* (#:key inputs #:allow-other-keys)
13477 ;; The tests use Popen with a custom environment which doesn't
13478 ;; include PATH.
13479 (substitute* "dulwich/tests/compat/utils.py"
13480 (("'git'") (string-append "'"
13481 (which "git")
13482 "'")))
13483 (substitute* '("dulwich/tests/test_repository.py"
13484 "dulwich/tests/test_hooks.py")
13485 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13486 (setenv "TEST_RUNNER" "unittest")
13487 (setenv "PYTHONHASHSEED" "random")
13488 #t)))))
13489 (propagated-inputs
13490 `(("python-fastimport" ,python-fastimport)
13491 ("python-urllib3" ,python-urllib3)))
13492 (native-inputs
13493 `(("python-mock" ,python-mock)
13494 ("python-geventhttpclient" ,python-geventhttpclient)
13495 ("git" ,git)))
13496 (home-page "https://www.dulwich.io/")
13497 (synopsis "Git implementation in Python")
13498 (description "Dulwich is an implementation of the Git file formats and
13499 protocols written in pure Python.")
13500 ;; Can be used with either license.
13501 (license (list license:asl2.0 license:gpl2+))))
13502
13503 (define-public python2-dulwich
13504 (package-with-python2 python-dulwich))
13505
13506 (define-public python-pbkdf2
13507 (package
13508 (name "python-pbkdf2")
13509 (version "1.3")
13510 (source
13511 (origin
13512 (method url-fetch)
13513 (uri (pypi-uri "pbkdf2" version))
13514 (sha256
13515 (base32
13516 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13517 (build-system python-build-system)
13518 (arguments
13519 '(#:phases
13520 (modify-phases %standard-phases
13521 (replace 'check
13522 (lambda _
13523 (setenv "PYTHONPATH"
13524 (string-append (getcwd) "/build/lib:"
13525 (getenv "PYTHONPATH")))
13526 (invoke "python" "test/test_pbkdf2.py"))))))
13527 (propagated-inputs
13528 `(("python-pycrypto" ,python-pycrypto))) ; optional
13529 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
13530 (synopsis "Password-based key derivation")
13531 (description "This module implements the password-based key derivation
13532 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13533
13534 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13535 is part of the RSA Public Key Cryptography Standards series. The provided
13536 implementation takes a password or a passphrase and a salt value (and
13537 optionally a iteration count, a digest module, and a MAC module) and provides
13538 a file-like object from which an arbitrarly-sized key can be read.")
13539 (license license:expat)))
13540
13541 (define-public python2-pbkdf2
13542 (package-with-python2 python-pbkdf2))
13543
13544 (define-public python-qrcode
13545 (package
13546 (name "python-qrcode")
13547 (version "6.1")
13548 (source
13549 (origin
13550 (method url-fetch)
13551 (uri (pypi-uri "qrcode" version))
13552 (sha256
13553 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
13554 (build-system python-build-system)
13555 (arguments
13556 ;; FIXME: Tests require packaging 'pymaging'.
13557 '(#:tests? #f))
13558 (propagated-inputs
13559 `(("python-lxml" ,python-lxml) ; for SVG output
13560 ("python-pillow" ,python-pillow) ; for PNG output
13561 ("python-six" ,python-six)))
13562 (home-page "https://github.com/lincolnloop/python-qrcode")
13563 (synopsis "QR Code image generator")
13564 (description "This package provides a pure Python QR Code generator
13565 module. It uses the Python Imaging Library (PIL) to allow for the generation
13566 of QR Codes.
13567
13568 In addition this package provides a command line tool to generate QR codes and
13569 either write these QR codes to a file or do the output as ascii art at the
13570 console.")
13571 (license license:bsd-3)))
13572
13573 (define-public python2-qrcode
13574 (package-with-python2 python-qrcode))
13575
13576 (define-public python-rst2ansi
13577 (package
13578 (name "python-rst2ansi")
13579 (version "0.1.5")
13580 (source
13581 (origin
13582 (method url-fetch)
13583 (uri (pypi-uri "rst2ansi" version))
13584 (sha256
13585 (base32
13586 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13587 (build-system python-build-system)
13588 (propagated-inputs
13589 `(("python-docutils" ,python-docutils)))
13590 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13591 (synopsis "Convert RST to ANSI-decorated console output")
13592 (description
13593 "Python module dedicated to rendering RST (reStructuredText) documents
13594 to ansi-escaped strings suitable for display in a terminal.")
13595 (license license:expat)))
13596
13597 (define-public python-ansi2html
13598 (package
13599 (name "python-ansi2html")
13600 (version "1.2.0")
13601 (source
13602 (origin
13603 (method url-fetch)
13604 (uri (pypi-uri "ansi2html" version))
13605 (sha256
13606 (base32
13607 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13608 (build-system python-build-system)
13609 (native-inputs
13610 `(("python-mock" ,python-mock)
13611 ("python-nose" ,python-nose)))
13612 (propagated-inputs
13613 `(("python-six" ,python-six)))
13614 (home-page "https://github.com/ralphbean/ansi2html")
13615 (synopsis "Convert ANSI-decorated console output to HTML")
13616 (description
13617 "@command{ansi2html} is a Python library and command line utility for
13618 convering text with ANSI color codes to HTML or LaTeX.")
13619 (license license:gpl3+)))
13620
13621 (define-public python2-ansi2html
13622 (package-with-python2 python-ansi2html))
13623
13624 (define-public python-ddt
13625 (package
13626 (name "python-ddt")
13627 (version "1.1.3")
13628 (source
13629 (origin
13630 (method url-fetch)
13631 (uri (pypi-uri "ddt" version))
13632 (sha256
13633 (base32
13634 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
13635 (build-system python-build-system)
13636 (native-inputs
13637 `(("python-mock" ,python-mock)
13638 ("python-nose" ,python-nose)))
13639 (propagated-inputs
13640 `(("python-six" ,python-six)
13641 ("python-pyyaml" ,python-pyyaml)))
13642 (home-page "https://github.com/txels/ddt")
13643 (synopsis "Data-Driven Tests")
13644 (description
13645 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
13646 running it with different test data, and make it appear as multiple test
13647 cases.")
13648 (license license:expat)))
13649
13650 (define-public python2-ddt
13651 (package-with-python2 python-ddt))
13652
13653 (define-public python-pycountry
13654 (package
13655 (name "python-pycountry")
13656 (version "18.5.26")
13657 (source
13658 (origin
13659 (method url-fetch)
13660 (uri (pypi-uri "pycountry" version))
13661 (sha256
13662 (base32
13663 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
13664 (build-system python-build-system)
13665 (home-page "https://bitbucket.org/flyingcircus/pycountry")
13666 (synopsis "ISO databases for languages, countries, currencies, etc.")
13667 (description
13668 "@code{pycountry} provides the ISO databases for the standards:
13669 @enumerate
13670 @item 639-3 (Languages)
13671 @item 3166 (Countries)
13672 @item 3166-3 (Deleted Countries)
13673 @item 3166-2 (Subdivisions of countries)
13674 @item 4217 (Currencies)
13675 @item 15924 (Scripts)
13676 @end enumerate
13677 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
13678 through a Python API.")
13679 (license license:lgpl2.1+)))
13680
13681 (define-public python2-pycountry
13682 (package-with-python2 python-pycountry))
13683
13684 (define-public python-pycosat
13685 (package
13686 (name "python-pycosat")
13687 (version "0.6.1")
13688 (source
13689 (origin
13690 (method url-fetch)
13691 (uri (pypi-uri "pycosat" version))
13692 (sha256
13693 (base32
13694 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13695 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13696 (build-system python-build-system)
13697 (home-page "https://github.com/ContinuumIO/pycosat")
13698 (synopsis "Bindings to picosat (a SAT solver)")
13699 (description
13700 "This package provides efficient Python bindings to @code{picosat} on
13701 the C level. When importing pycosat, the @code{picosat} solver becomes part
13702 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13703 Problem} (SAT) solver.")
13704 (license license:expat)))
13705
13706 (define-public python2-pycosat
13707 (package-with-python2 python-pycosat))
13708
13709 (define-public python2-ruamel.ordereddict
13710 (package
13711 (name "python2-ruamel.ordereddict")
13712 (version "0.4.9")
13713 (source
13714 (origin
13715 (method url-fetch)
13716 (uri (pypi-uri "ruamel.ordereddict" version))
13717 (sha256
13718 (base32
13719 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13720 (build-system python-build-system)
13721 (arguments
13722 `(#:python ,python-2
13723 #:phases
13724 (modify-phases %standard-phases
13725 (delete 'check)
13726 (add-after 'install 'check
13727 (lambda* (#:key inputs outputs #:allow-other-keys)
13728 (add-installed-pythonpath inputs outputs)
13729 (invoke "python" "test/testordereddict.py"))))))
13730 (home-page "https://bitbucket.org/ruamel/ordereddict")
13731 (synopsis "Version of dict that keeps keys in insertion order")
13732 (description
13733 "This is an implementation of an ordered dictionary with @dfn{Key
13734 Insertion Order} (KIO: updates of values do not affect the position of the
13735 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13736 removed and put at the back). The standard library module @code{OrderedDict},
13737 implemented later, implements a subset of @code{ordereddict} functionality.
13738 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13739 Order} (KSO, no sorting function can be specified, but a transform can be
13740 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13741 (license license:expat)))
13742
13743 (define-public python-pypeg2
13744 (package
13745 (name "python-pypeg2")
13746 (version "2.15.2")
13747 (source
13748 (origin
13749 (method url-fetch)
13750 (uri (pypi-uri "pyPEG2" version))
13751 (sha256
13752 (base32
13753 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13754 (build-system python-build-system)
13755 (propagated-inputs `(("python-lxml" ,python-lxml)))
13756 (arguments
13757 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13758 '(#:tests? #f))
13759 (home-page "https://fdik.org/pyPEG/")
13760 (synopsis "Parsering Expression Grammars in Python")
13761 (description "PyPEG is an intrinsic parser interpreter framework for
13762 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13763 parse many formal languages.")
13764 (license license:gpl2)))
13765
13766 (define-public python-incremental
13767 (package
13768 (name "python-incremental")
13769 (version "17.5.0")
13770 (source
13771 (origin
13772 (method url-fetch)
13773 (uri (pypi-uri "incremental" version))
13774 (sha256
13775 (base32
13776 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
13777 (build-system python-build-system)
13778 (home-page "https://github.com/hawkowl/incremental")
13779 (synopsis "Library for versioning Python projects")
13780 (description "Incremental is a small library that versions your Python
13781 projects.")
13782 (license license:expat)))
13783
13784 (define-public python2-incremental
13785 (package-with-python2 python-incremental))
13786
13787 (define-public python-invoke
13788 (package
13789 (name "python-invoke")
13790 (home-page "https://www.pyinvoke.org/")
13791 (version "1.3.0")
13792 (source (origin
13793 (method url-fetch)
13794 (uri (pypi-uri "invoke" version))
13795 (sha256
13796 (base32
13797 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
13798 (build-system python-build-system)
13799 (arguments
13800 ;; XXX: Requires many dependencies that are not yet in Guix.
13801 `(#:tests? #f))
13802 (synopsis "Pythonic task execution")
13803 (description
13804 "Invoke is a Python task execution tool and library, drawing inspiration
13805 from various sources to arrive at a powerful and clean feature set. It is
13806 evolved from the Fabric project, but focuses on local and abstract concerns
13807 instead of servers and network commands.")
13808 (license license:bsd-3)))
13809
13810 (define-public python2-invoke
13811 (package-with-python2 python-invoke))
13812
13813 (define-public python-automat
13814 (package
13815 (name "python-automat")
13816 (version "20.2.0")
13817 (source (origin
13818 (method url-fetch)
13819 (uri (pypi-uri "Automat" version))
13820 (sha256
13821 (base32
13822 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
13823 (build-system python-build-system)
13824 ;; We disable the tests because they require python-twisted, while
13825 ;; python-twisted depends on python-automat. Twisted is optional, but the
13826 ;; tests fail if it is not available. Also see
13827 ;; <https://github.com/glyph/automat/issues/71>.
13828 (arguments '(#:tests? #f))
13829 (native-inputs
13830 `(("python-m2r" ,python-m2r)
13831 ("python-setuptools-scm" ,python-setuptools-scm)
13832 ("python-graphviz" ,python-graphviz)))
13833 (propagated-inputs
13834 `(("python-six" ,python-six)
13835 ("python-attrs" ,python-attrs)))
13836 (home-page "https://github.com/glyph/Automat")
13837 (synopsis "Self-service finite-state machines")
13838 (description "Automat is a library for concise, idiomatic Python
13839 expression of finite-state automata (particularly deterministic finite-state
13840 transducers).")
13841 (license license:expat)))
13842
13843 (define-public python2-automat
13844 (package-with-python2 python-automat))
13845
13846 (define-public python-m2r
13847 (package
13848 (name "python-m2r")
13849 (version "0.2.1")
13850 (source (origin
13851 (method url-fetch)
13852 (uri (pypi-uri "m2r" version))
13853 (sha256
13854 (base32
13855 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
13856 (build-system python-build-system)
13857 (propagated-inputs
13858 `(("python-docutils" ,python-docutils)
13859 ("python-mistune" ,python-mistune)))
13860 (native-inputs
13861 `(("python-pygments" ,python-pygments)
13862 ("python-mock" ,python-mock)))
13863 (home-page "https://github.com/miyakogi/m2r")
13864 (synopsis "Markdown to reStructuredText converter")
13865 (description "M2R converts a markdown file including reST markups to valid
13866 reST format.")
13867 (license license:expat)))
13868
13869 (define-public python2-m2r
13870 (package-with-python2 python-m2r))
13871
13872 (define-public python-constantly
13873 (package
13874 (name "python-constantly")
13875 (version "15.1.0")
13876 (source (origin
13877 (method url-fetch)
13878 (uri (pypi-uri "constantly" version))
13879 (sha256
13880 (base32
13881 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
13882 (build-system python-build-system)
13883 (home-page "https://github.com/twisted/constantly")
13884 (synopsis "Symbolic constants in Python")
13885 (description "Constantly is a Python library that provides symbolic
13886 constant support. It includes collections and constants with text, numeric,
13887 and bit flag values.")
13888 (license license:expat)))
13889
13890 (define-public python2-constantly
13891 (package-with-python2 python-constantly))
13892
13893 (define-public python-attrs
13894 (package
13895 (name "python-attrs")
13896 (version "19.3.0")
13897 (source (origin
13898 (method url-fetch)
13899 (uri (pypi-uri "attrs" version))
13900 (sha256
13901 (base32
13902 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
13903 (build-system python-build-system)
13904 (arguments
13905 `(#:modules ((guix build utils)
13906 (guix build python-build-system)
13907 (ice-9 ftw)
13908 (srfi srfi-1)
13909 (srfi srfi-26))
13910 #:phases (modify-phases %standard-phases
13911 (replace 'check
13912 (lambda _
13913 (let ((cwd (getcwd)))
13914 (setenv "PYTHONPATH"
13915 (string-append
13916 cwd "/build/"
13917 (find (cut string-prefix? "lib" <>)
13918 (scandir (string-append cwd "/build")))
13919 ":"
13920 (getenv "PYTHONPATH")))
13921 (invoke "python" "-m" "pytest")))))))
13922 (native-inputs
13923 `(("python-coverage" ,python-coverage)
13924 ("python-hypothesis" ,python-hypothesis)
13925 ("python-pympler" ,python-pympler)
13926 ("python-pytest" ,python-pytest)
13927 ("python-six" ,python-six)
13928 ("python-sphinx" ,python-sphinx)
13929 ("python-zope-interface" ,python-zope-interface)))
13930 (home-page "https://github.com/python-attrs/attrs/")
13931 (synopsis "Attributes without boilerplate")
13932 (description "@code{attrs} is a Python package with class decorators that
13933 ease the chores of implementing the most common attribute-related object
13934 protocols.")
13935 (license license:expat)))
13936
13937 (define-public python2-attrs
13938 (package-with-python2 python-attrs))
13939
13940 (define-public python-attrs-bootstrap
13941 (package
13942 (inherit python-attrs)
13943 (name "python-attrs-bootstrap")
13944 (native-inputs `())
13945 (arguments `(#:tests? #f))))
13946
13947 (define-public python2-attrs-bootstrap
13948 (package-with-python2 python-attrs-bootstrap))
13949
13950 (define-public python2-cliapp
13951 (package
13952 (name "python2-cliapp")
13953 (version "1.20180812.1")
13954 (source
13955 (origin
13956 (method url-fetch)
13957 (uri (string-append
13958 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13959 version ".tar.gz"))
13960 (sha256
13961 (base32
13962 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
13963 (build-system python-build-system)
13964 (arguments
13965 `(#:python ,python-2
13966 #:phases
13967 (modify-phases %standard-phases
13968 ;; check phase needs to be run before the build phase. If not,
13969 ;; coverage-test-runner looks for tests for the built source files,
13970 ;; and fails.
13971 (delete 'check)
13972 (add-before 'build 'check
13973 (lambda _
13974 ;; Disable python3 tests
13975 (substitute* "check"
13976 (("python3") "# python3"))
13977 (invoke "./check"))))))
13978 (native-inputs
13979 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13980 ("python2-pep8" ,python2-pep8)))
13981 (propagated-inputs
13982 `(("python2-pyaml" ,python2-pyaml)))
13983 (home-page "https://liw.fi/cliapp/")
13984 (synopsis "Python framework for command line programs")
13985 (description "@code{python2-cliapp} is a python framework for
13986 command line programs. It contains the typical stuff such programs
13987 need to do, such as parsing the command line for options, and
13988 iterating over input files.")
13989 (license license:gpl2+)))
13990
13991 (define-public python2-ttystatus
13992 (package
13993 (name "python2-ttystatus")
13994 (version "0.36")
13995 (source
13996 (origin
13997 (method url-fetch)
13998 (uri (string-append
13999 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
14000 version ".tar.gz"))
14001 (sha256
14002 (base32
14003 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
14004 (build-system python-build-system)
14005 (native-inputs
14006 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14007 ("python2-pep8" ,python2-pep8)))
14008 (arguments
14009 `(#:python ,python-2
14010 #:phases
14011 (modify-phases %standard-phases
14012 ;; check phase needs to be run before the build phase. If not,
14013 ;; coverage-test-runner looks for tests for the built source files,
14014 ;; and fails.
14015 (delete 'check)
14016 (add-before 'build 'check
14017 (lambda _ (invoke "make" "check"))))))
14018 (home-page "https://liw.fi/ttystatus/")
14019 (synopsis "Python library for showing progress reporting and
14020 status updates on terminals")
14021 (description "@code{python2-ttystatus} is a python library for
14022 showing progress reporting and status updates on terminals, for
14023 command line programs. Output is automatically adapted to the width
14024 of the terminal: truncated if it does not fit, and resized if the
14025 terminal size changes.")
14026 (license license:gpl3+)))
14027
14028 (define-public python2-tracing
14029 (package
14030 (name "python2-tracing")
14031 (version "0.10")
14032 (source
14033 (origin
14034 (method url-fetch)
14035 (uri (string-append
14036 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
14037 version ".tar.gz"))
14038 (sha256
14039 (base32
14040 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
14041 (build-system python-build-system)
14042 (arguments
14043 `(#:python ,python-2))
14044 (home-page "https://liw.fi/tracing/")
14045 (synopsis "Python debug logging helper")
14046 (description "@code{python2-tracing} is a python library for
14047 logging debug messages. It provides a way to turn debugging messages
14048 on and off, based on the filename they occur in. It is much faster
14049 than using @code{logging.Filter} to accomplish the same thing, which
14050 matters when code is run in production mode. The actual logging still
14051 happens using the @code{logging} library.")
14052 (license license:gpl3+)))
14053
14054 (define-public python2-larch
14055 (package
14056 (name "python2-larch")
14057 (version "1.20151025")
14058 (source
14059 (origin
14060 (method url-fetch)
14061 (uri (string-append
14062 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
14063 version ".tar.gz"))
14064 (patches (search-patches
14065 "python2-larch-coverage-4.0a6-compatibility.patch"))
14066 (sha256
14067 (base32
14068 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14069 (build-system python-build-system)
14070 (arguments
14071 `(#:python ,python-2
14072 #:phases
14073 (modify-phases %standard-phases
14074 ;; check phase needs to be run before the build phase. If not,
14075 ;; coverage-test-runner looks for tests for the built source files,
14076 ;; and fails.
14077 (delete 'check)
14078 (add-before 'build 'check
14079 (lambda _ (invoke "make" "check"))))))
14080 (native-inputs
14081 `(("cmdtest" ,cmdtest)
14082 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
14083 (propagated-inputs
14084 `(("python2-tracing" ,python2-tracing)))
14085 (home-page "https://liw.fi/larch/")
14086 (synopsis "Python copy-on-write B-tree library")
14087 (description "@code{python2-larch} is an implementation of
14088 particular kind of B-tree, based on research by Ohad Rodeh. See
14089 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14090 on the data structure.
14091
14092 The distinctive feature of this B-tree is that a node is never
14093 (conceptually) modified. Instead, all updates are done by
14094 copy-on-write. This makes it easy to clone a tree, and modify only the
14095 clone, while other processes access the original tree.")
14096 (license license:gpl3+)))
14097
14098 (define-public python-astroid
14099 (package
14100 (name "python-astroid")
14101 (version "2.4.1")
14102 (source
14103 (origin
14104 (method url-fetch)
14105 (uri (pypi-uri "astroid" version))
14106 (sha256
14107 (base32 "1h99jal7ax07xna1djw5z7hpgb8vjrl3hrrg49p1phljwniww5sc"))))
14108 (build-system python-build-system)
14109 (propagated-inputs
14110 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14111 ("python-six" ,python-six)
14112 ("python-wrapt" ,python-wrapt)))
14113 (native-inputs
14114 `(("python-dateutil" ,python-dateutil)
14115 ("python-pytest" ,python-pytest)
14116 ("python-pytest-runner" ,python-pytest-runner)))
14117 (home-page "https://github.com/PyCQA/astroid")
14118 (synopsis "Common base representation of python source code for pylint and
14119 other projects")
14120 (description "@code{python-astroid} provides a common base representation
14121 of python source code for projects such as pychecker, pyreverse, pylint, etc.
14122
14123 It provides a compatible representation which comes from the _ast module. It
14124 rebuilds the tree generated by the builtin _ast module by recursively walking
14125 down the AST and building an extended ast. The new node classes have
14126 additional methods and attributes for different usages. They include some
14127 support for static inference and local name scopes. Furthermore, astroid
14128 builds partial trees by inspecting living objects.")
14129 (license license:lgpl2.1+)
14130 (properties `((python2-variant . ,(delay python2-astroid))))))
14131
14132 (define-public python2-astroid
14133 (let ((base (package-with-python2
14134 (strip-python2-variant python-astroid))))
14135 (package (inherit base)
14136 ;; Version 2.x removes python2 support.
14137 (version "1.6.5")
14138 (source
14139 (origin
14140 (method url-fetch)
14141 (uri (pypi-uri "astroid" version))
14142 (sha256
14143 (base32
14144 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
14145 (arguments
14146 (substitute-keyword-arguments (package-arguments base)
14147 ((#:phases phases)
14148 `(modify-phases ,phases
14149 (add-after 'unpack 'remove-spurious-test
14150 (lambda _
14151 ;; https://github.com/PyCQA/astroid/issues/276
14152 (delete-file "astroid/tests/unittest_brain.py")
14153 #t))
14154 (replace 'check
14155 (lambda _
14156 (invoke"python" "-m" "unittest" "discover"
14157 "-p" "unittest*.py")))))))
14158 (native-inputs `())
14159 (propagated-inputs
14160 `(("python2-backports-functools-lru-cache"
14161 ,python2-backports-functools-lru-cache)
14162 ("python2-enum34" ,python2-enum34)
14163 ("python2-singledispatch" ,python2-singledispatch)
14164 ,@(alist-delete "python-typed-ast"
14165 (package-propagated-inputs base)))))))
14166
14167 (define-public python-isort
14168 (package
14169 (name "python-isort")
14170 (version "4.3.4")
14171 (source
14172 (origin
14173 (method git-fetch)
14174 (uri (git-reference
14175 ;; Tests pass only from the Github sources
14176 (url "https://github.com/timothycrosley/isort")
14177 (commit version)))
14178 (file-name (git-file-name name version))
14179 (sha256
14180 (base32
14181 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
14182 (build-system python-build-system)
14183 (native-inputs
14184 `(("python-mock" ,python-mock)
14185 ("python-pytest" ,python-pytest)))
14186 (home-page "https://github.com/timothycrosley/isort")
14187 (synopsis "Python utility/library to sort python imports")
14188 (description "@code{python-isort} is a python utility/library to sort
14189 imports alphabetically, and automatically separated into sections. It
14190 provides a command line utility, a python library and plugins for various
14191 editors.")
14192 (license license:expat)
14193 (properties `((python2-variant . ,(delay python2-isort))))))
14194
14195 (define-public python2-isort
14196 (let ((base (package-with-python2
14197 (strip-python2-variant python-isort))))
14198 (package (inherit base)
14199 (native-inputs
14200 `(("python2-futures" ,python2-futures)
14201 ,@(package-native-inputs base))))))
14202
14203 (define-public python2-backports-functools-lru-cache
14204 (package
14205 (name "python2-backports-functools-lru-cache")
14206 (version "1.5")
14207 (source
14208 (origin
14209 (method url-fetch)
14210 ;; only the pypi tarballs contain the necessary metadata
14211 (uri (pypi-uri "backports.functools_lru_cache" version))
14212 (sha256
14213 (base32
14214 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
14215 (build-system python-build-system)
14216 (native-inputs
14217 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14218 (arguments
14219 `(#:python ,python-2))
14220 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14221 (synopsis "Backport of functools.lru_cache from Python 3.3")
14222 (description "@code{python2-backports-functools-lru-cache} is a backport
14223 of @code{functools.lru_cache} from python 3.3.")
14224 (license license:expat)))
14225
14226 (define-public python-configparser
14227 (package
14228 (name "python-configparser")
14229 (version "4.0.2")
14230 (source
14231 (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "configparser" version))
14234 (sha256
14235 (base32
14236 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
14237 (native-inputs
14238 `(("python-setuptools_scm" ,python-setuptools-scm)))
14239 (build-system python-build-system)
14240 (home-page "https://github.com/jaraco/configparser/")
14241 (synopsis "Backport of configparser from python 3.5")
14242 (description "@code{python-configparser} is a backport of
14243 @code{configparser} from Python 3.5 so that it can be used directly
14244 in other versions.")
14245 (license license:expat)))
14246
14247 (define-public python2-configparser
14248 (package-with-python2 python-configparser))
14249
14250 (define-public python-mando
14251 (package
14252 (name "python-mando")
14253 (version "0.6.4")
14254 (source (origin
14255 (method url-fetch)
14256 (uri (pypi-uri "mando" version))
14257 (sha256
14258 (base32
14259 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
14260 (build-system python-build-system)
14261 (propagated-inputs
14262 `(("python-rst2ansi" ,python-rst2ansi)
14263 ("python-six" ,python-six)))
14264 (native-inputs
14265 `(("python-pytest" ,python-pytest)))
14266 (home-page "https://mando.readthedocs.org/")
14267 (synopsis
14268 "Wrapper around argparse, allowing creation of complete CLI applications")
14269 (description
14270 "This package is a wrapper around argparse, allowing you to write complete CLI
14271 applications in seconds while maintaining all the flexibility.")
14272 (license license:expat)))
14273
14274 (define-public python2-mando
14275 (package-with-python2 python-mando))
14276
14277 (define-public python2-argparse
14278 (package
14279 (name "python2-argparse")
14280 (version "1.4.0")
14281 (source
14282 (origin
14283 (method url-fetch)
14284 (uri (pypi-uri "argparse" version))
14285 (sha256
14286 (base32
14287 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
14288 (build-system python-build-system)
14289 (arguments
14290 `(#:python ,python-2))
14291 (home-page "https://github.com/ThomasWaldmann/argparse/")
14292 (synopsis "Python command-line parsing library")
14293 (description
14294 "This package is mostly for people who want to have @code{argparse} on
14295 older Pythons because it was not part of the standard library back then.")
14296 (license license:psfl)))
14297
14298 (define-public python-fudge
14299 (package
14300 (name "python-fudge")
14301 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14302 ;; package, which is currently the only use of this package.
14303 (version "0.9.6")
14304 (source
14305 (origin
14306 (method url-fetch)
14307 (uri (pypi-uri "fudge" version))
14308 (sha256
14309 (base32
14310 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14311 (build-system python-build-system)
14312 (arguments
14313 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14314 (home-page "https://github.com/fudge-py/fudge")
14315 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14316 (description
14317 "Fudge is a Python module for using fake objects (mocks and stubs) to
14318 test real ones.
14319
14320 In readable Python code, you declare the methods available on your fake object
14321 and how they should be called. Then you inject that into your application and
14322 start testing. This declarative approach means you don’t have to record and
14323 playback actions and you don’t have to inspect your fakes after running code.
14324 If the fake object was used incorrectly then you’ll see an informative
14325 exception message with a traceback that points to the culprit.")
14326 (license license:expat)))
14327
14328 (define-public python2-fudge
14329 (package-with-python2 python-fudge))
14330
14331 (define-public python-mwclient
14332 (package
14333 (name "python-mwclient")
14334 (version "0.10.1")
14335 (source
14336 (origin
14337 (method git-fetch)
14338 ;; The PyPI version wouldn't contain tests.
14339 (uri (git-reference
14340 (url "https://github.com/mwclient/mwclient")
14341 (commit (string-append "v" version))))
14342 (file-name (git-file-name name version))
14343 (sha256
14344 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
14345 (build-system python-build-system)
14346 (propagated-inputs
14347 `(("python-requests-oauthlib" ,python-requests-oauthlib)
14348 ("python-six" ,python-six)))
14349 (native-inputs
14350 `(("python-mock" ,python-mock)
14351 ("python-pytest" ,python-pytest)
14352 ("python-pytest-cov" ,python-pytest-cov)
14353 ("python-pytest-runner" ,python-pytest-runner)
14354 ("python-responses" ,python-responses)))
14355 (home-page "https://github.com/btongminh/mwclient")
14356 (synopsis "MediaWiki API client")
14357 (description "This package provides a MediaWiki API client.")
14358 (license license:expat)))
14359
14360 (define-public python2-mwclient
14361 (package-with-python2 python-mwclient))
14362
14363 (define-public python-utils
14364 (package
14365 (name "python-utils")
14366 (version "2.4.0")
14367 (source (origin
14368 (method url-fetch)
14369 (uri (pypi-uri "python-utils" version))
14370 (sha256
14371 (base32
14372 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
14373 (build-system python-build-system)
14374 (arguments
14375 `(#:phases
14376 (modify-phases %standard-phases
14377 (replace 'check
14378 (lambda* (#:key inputs outputs #:allow-other-keys)
14379 (add-installed-pythonpath inputs outputs)
14380 (delete-file "pytest.ini")
14381 (invoke "pytest" "-vv"))))))
14382 (native-inputs
14383 `(("pytest-runner" ,python-pytest-runner)
14384 ("pytest" ,python-pytest)
14385 ("six" ,python-six)))
14386 (home-page "https://github.com/WoLpH/python-utils")
14387 (synopsis "Convenient utilities not included with the standard Python install")
14388 (description
14389 "Python Utils is a collection of small Python functions and classes which
14390 make common patterns shorter and easier.")
14391 (license license:bsd-2)))
14392
14393 (define-public python2-utils
14394 (package-with-python2 python-utils))
14395
14396 (define-public python-diff-match-patch
14397 (package
14398 (name "python-diff-match-patch")
14399 (version "20121119")
14400 (source
14401 (origin
14402 (method url-fetch)
14403 (uri (pypi-uri "diff-match-patch" version))
14404 (sha256
14405 (base32
14406 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14407 (build-system python-build-system)
14408 (home-page "https://code.google.com/p/google-diff-match-patch")
14409 (synopsis "Synchronize plain text")
14410 (description "Diff Match and Patch libraries offer robust algorithms to
14411 perform the operations required for synchronizing plain text.")
14412 (license license:asl2.0)))
14413
14414 (define-public python2-diff-match-patch
14415 (package-with-python2 python-diff-match-patch))
14416
14417 (define-public python-dirsync
14418 (package
14419 (name "python-dirsync")
14420 (version "2.2.3")
14421 (source
14422 (origin
14423 (method url-fetch)
14424 (uri (pypi-uri "dirsync" version))
14425 (sha256
14426 (base32
14427 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
14428 (build-system python-build-system)
14429 (propagated-inputs
14430 `(("six" ,python-six)))
14431 (home-page "https://bitbucket.org/tkhyn/dirsync")
14432 (synopsis "Advanced directory tree synchronisation tool")
14433 (description "Advanced directory tree synchronisation tool.")
14434 (license license:expat)))
14435
14436 (define-public python2-dirsync
14437 (package-with-python2 python-dirsync))
14438
14439 (define-public python-levenshtein
14440 (package
14441 (name "python-levenshtein")
14442 (version "0.12.0")
14443 (source
14444 (origin
14445 (method url-fetch)
14446 (uri (pypi-uri "python-Levenshtein" version))
14447 (sha256
14448 (base32
14449 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14450 (build-system python-build-system)
14451 (home-page "https://github.com/ztane/python-Levenshtein")
14452 (synopsis "Fast computation of Levenshtein distance and string similarity")
14453 (description
14454 "The Levenshtein Python C extension module contains functions for fast computation of
14455 @enumerate
14456 @item Levenshtein (edit) distance, and edit operations
14457 @item string similarity
14458 @item approximate median strings, and generally string averaging
14459 @item string sequence and set similarity
14460 @end enumerate
14461 It supports both normal and Unicode strings.")
14462 (license license:gpl2+)))
14463
14464 (define-public python2-levenshtein
14465 (package-with-python2 python-levenshtein))
14466
14467 (define-public python-scandir
14468 (package
14469 (name "python-scandir")
14470 (version "1.10.0")
14471 (source
14472 (origin
14473 (method url-fetch)
14474 (uri (pypi-uri "scandir" version))
14475 (sha256
14476 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
14477 (build-system python-build-system)
14478 (arguments
14479 `(#:phases (modify-phases %standard-phases
14480 (replace 'check
14481 (lambda _
14482 (invoke "python" "test/run_tests.py"))))))
14483 (home-page "https://github.com/benhoyt/scandir")
14484 (synopsis "Directory iteration function")
14485 (description
14486 "Directory iteration function like os.listdir(), except that instead of
14487 returning a list of bare filenames, it yields DirEntry objects that include
14488 file type and stat information along with the name. Using scandir() increases
14489 the speed of os.walk() by 2-20 times (depending on the platform and file
14490 system) by avoiding unnecessary calls to os.stat() in most cases.
14491
14492 This package is part of the Python standard library since version 3.5.")
14493 (license license:bsd-3)))
14494
14495 (define-public python2-scandir
14496 (package-with-python2 python-scandir))
14497
14498 (define-public python2-stemming
14499 (package
14500 (name "python2-stemming")
14501 (version "1.0.1")
14502 (source
14503 (origin
14504 (method url-fetch)
14505 (uri (pypi-uri "stemming" version))
14506 (sha256
14507 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14508 (build-system python-build-system)
14509 (arguments
14510 `(#:python ,python-2))
14511 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14512 (synopsis "Python implementations of various stemming algorithms")
14513 (description
14514 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14515 stemming algorithms for English. These implementations are straightforward and
14516 efficient, unlike some Python versions of the same algorithms available on the
14517 Web. This package is an extraction of the stemming code included in the Whoosh
14518 search engine.")
14519 (license license:public-domain)))
14520
14521 (define-public python-factory-boy
14522 (package
14523 (name "python-factory-boy")
14524 (version "2.8.1")
14525 (source
14526 (origin
14527 (method url-fetch)
14528 (uri (pypi-uri "factory_boy" version))
14529 (sha256
14530 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14531 (build-system python-build-system)
14532 (arguments
14533 ;; Tests are not included in the tarball.
14534 `(#:tests? #f))
14535 (propagated-inputs
14536 `(("faker" ,python-faker)))
14537 (home-page "https://github.com/benhoyt/scandir")
14538 (synopsis "Versatile test fixtures replacement")
14539 (description
14540 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14541
14542 As a fixtures replacement tool, it aims to replace static, hard to maintain
14543 fixtures with easy-to-use factories for complex object.
14544
14545 Instead of building an exhaustive test setup with every possible combination
14546 of corner cases, factory_boy allows you to use objects customized for the
14547 current test, while only declaring the test-specific fields")
14548 (license license:expat)))
14549
14550 (define-public python2-factory-boy
14551 (package-with-python2 python-factory-boy))
14552
14553 (define-public python-translate-toolkit
14554 (package
14555 (name "python-translate-toolkit")
14556 (version "2.1.0")
14557 (source
14558 (origin
14559 (method url-fetch)
14560 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14561 (sha256
14562 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14563 (build-system python-build-system)
14564 (native-inputs
14565 `(("python-pytest" ,python-pytest)
14566 ("python-sphinx" ,python-sphinx)))
14567 (propagated-inputs
14568 `(("python-babel" ,python-babel)
14569 ("python-beautifulsoup4" ,python-beautifulsoup4)
14570 ("python-chardet" ,python-chardet)
14571 ("python-diff-match-patch" ,python-diff-match-patch)
14572 ("python-levenshtein" ,python-levenshtein)
14573 ("python-lxml" ,python-lxml)
14574 ("python-six" ,python-six)
14575 ("python-vobject" ,python-vobject)
14576 ("python-pyyaml" ,python-pyyaml)))
14577 (arguments
14578 ;; TODO: tests are not run, because they end with
14579 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14580 ;; 'parse_funcs'
14581 ;; during test setup.
14582 `(#:tests? #f))
14583 (home-page "https://toolkit.translatehouse.org")
14584 (synopsis "Tools and API for translation and localization engineering")
14585 (description
14586 "Tools and API for translation and localization engineering. It contains
14587 several utilities, as well as an API for building localization tools.")
14588 (license license:gpl2+)))
14589
14590 (define-public python2-translate-toolkit
14591 (package-with-python2 python-translate-toolkit))
14592
14593 (define-public python-packaging
14594 (package
14595 (name "python-packaging")
14596 (version "20.0")
14597 (source
14598 (origin
14599 (method url-fetch)
14600 (uri (pypi-uri "packaging" version))
14601 ;; XXX: The URL in the patch file is wrong, it should be
14602 ;; <https://github.com/pypa/packaging/pull/256>.
14603 (patches (search-patches "python-packaging-test-arch.patch"))
14604 (sha256
14605 (base32
14606 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
14607 (build-system python-build-system)
14608 (arguments
14609 `(#:phases (modify-phases %standard-phases
14610 (replace 'check
14611 (lambda* (#:key tests? #:allow-other-keys)
14612 (if tests?
14613 (invoke "py.test" "-vv")
14614 (format #t "test suite not run~%"))
14615 #t)))))
14616 (native-inputs
14617 `(("python-pretend" ,python-pretend)
14618 ("python-pytest" ,python-pytest)))
14619 (propagated-inputs
14620 `(("python-pyparsing" ,python-pyparsing)
14621 ("python-six" ,python-six)))
14622 (home-page "https://github.com/pypa/packaging")
14623 (synopsis "Core utilities for Python packages")
14624 (description "Packaging is a Python module for dealing with Python packages.
14625 It offers an interface for working with package versions, names, and dependency
14626 information.")
14627 ;; From 'LICENSE': This software is made available under the terms of
14628 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14629 ;; Contributions to this software is made under the terms of *both* these
14630 ;; licenses.
14631 (license (list license:asl2.0 license:bsd-2))))
14632
14633 (define-public python2-packaging
14634 (package-with-python2 python-packaging))
14635
14636 ;; Variants with minimal dependencies, for bootstrapping Pytest.
14637 (define-public python-packaging-bootstrap
14638 (hidden-package
14639 (package/inherit
14640 python-packaging
14641 (name "python-packaging-bootstrap")
14642 (native-inputs '())
14643 (propagated-inputs
14644 `(("python-pyparsing" ,python-pyparsing)))
14645 (arguments '(#:tests? #f)))))
14646
14647 (define-public python2-packaging-bootstrap
14648 (hidden-package
14649 (package/inherit
14650 python2-packaging
14651 (name "python2-packaging-bootstrap")
14652 (native-inputs '())
14653 (propagated-inputs
14654 `(("python-pyparsing" ,python2-pyparsing)))
14655 (arguments
14656 `(#:tests? #f
14657 ,@(package-arguments python2-packaging))))))
14658
14659 (define-public python-relatorio
14660 (package
14661 (name "python-relatorio")
14662 (version "0.8.0")
14663 (source
14664 (origin
14665 (method url-fetch)
14666 (uri (pypi-uri "relatorio" version))
14667 (sha256
14668 (base32
14669 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
14670 (build-system python-build-system)
14671 (propagated-inputs
14672 `(("python-lxml" ,python-lxml)
14673 ("python-genshi" ,python-genshi)))
14674 (native-inputs
14675 `(("python-magic" ,python-magic)))
14676 (home-page "https://relatorio.tryton.org/")
14677 (synopsis "Templating library able to output ODT and PDF files")
14678 (description "Relatorio is a templating library which provides a way to
14679 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14680 for more filetypes can be easily added by creating plugins for them.")
14681 (license license:gpl3+)))
14682
14683 (define-public python2-relatorio
14684 (package-with-python2 python-relatorio))
14685
14686 (define-public python-radon
14687 (package
14688 (name "python-radon")
14689 (version "4.1.0")
14690 (source
14691 (origin
14692 (method url-fetch)
14693 (uri (pypi-uri "radon" version))
14694 (sha256
14695 (base32
14696 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
14697 (build-system python-build-system)
14698 (arguments
14699 `(#:phases (modify-phases %standard-phases
14700 (replace 'check
14701 (lambda _
14702 (invoke "python" "radon/tests/run.py"))))))
14703 (propagated-inputs
14704 `(("python-colorama" ,python-colorama)
14705 ("python-flake8-polyfill" ,python-flake8-polyfill)
14706 ("python-mando" ,python-mando)))
14707 (native-inputs
14708 `(("python-pytest" ,python-pytest)
14709 ("python-pytest-mock" ,python-pytest-mock)))
14710 (home-page "https://radon.readthedocs.org/")
14711 (synopsis "Code Metrics in Python")
14712 (description "Radon is a Python tool which computes various code metrics.
14713 Supported metrics are:
14714 @itemize @bullet
14715 @item raw metrics: SLOC, comment lines, blank lines, &c.
14716 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14717 @item Halstead metrics (all of them)
14718 @item the Maintainability Index (a Visual Studio metric)
14719 @end itemize")
14720 (properties `((python2-variant . ,(delay python2-radon))))
14721 (license license:expat)))
14722
14723 (define-public python2-radon
14724 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
14725 (package
14726 (inherit base)
14727 (propagated-inputs
14728 `(("python-configparser" ,python2-configparser)
14729 ("python-future" ,python2-future)
14730 ,@(package-propagated-inputs base))))))
14731
14732 (define-public python-sure
14733 (package
14734 (name "python-sure")
14735 (version "1.4.11")
14736 (source
14737 (origin
14738 (method url-fetch)
14739 (uri (pypi-uri "sure" version))
14740 (sha256
14741 (base32
14742 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
14743 (build-system python-build-system)
14744 (propagated-inputs
14745 `(("python-mock" ,python-mock)
14746 ("python-six" ,python-six)))
14747 (native-inputs
14748 `(("python-nose" ,python-nose)))
14749 (home-page "https://github.com/gabrielfalcao/sure")
14750 (synopsis "Automated testing library in python for python")
14751 (description
14752 "Sure is a python library that leverages a DSL for writing assertions.
14753 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
14754 (license license:gpl3+)))
14755
14756 (define-public python2-sure
14757 (package-with-python2 python-sure))
14758
14759 (define-public python2-couleur
14760 ;; This package does not seem to support python3 at all, hence,
14761 ;; only the python2 variant definition is provided.
14762 (package
14763 (name "python2-couleur")
14764 (version "0.6.2")
14765 (source
14766 (origin
14767 (method url-fetch)
14768 (uri (pypi-uri "couleur" version))
14769 (sha256
14770 (base32
14771 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
14772 (build-system python-build-system)
14773 (arguments
14774 `(#:python ,python-2))
14775 (home-page "https://github.com/gabrielfalcao/couleur")
14776 (synopsis
14777 "ANSI terminal tool for python, colored shell and other handy fancy features")
14778 (description
14779 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
14780 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
14781 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
14782 ;; https://github.com/gabrielfalcao/couleur/issues/11
14783 (license license:lgpl3+)))
14784
14785 (define-public python-misaka
14786 (package
14787 (name "python-misaka")
14788 (version "2.1.1")
14789 (source
14790 (origin
14791 (method url-fetch)
14792 (uri (pypi-uri "misaka" version))
14793 (sha256
14794 (base32
14795 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
14796 (build-system python-build-system)
14797 (arguments
14798 `(;; Line 37 of setup.py calls self.run_command('develop')
14799 ;; in the 'check' phase. This command seems to be trying
14800 ;; to write to
14801 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
14802 ;; for which it does not have the permission to write.
14803 #:tests? #f))
14804 (propagated-inputs
14805 `(("python-cffi" ,python-cffi)))
14806 (home-page "https://github.com/FSX/misaka")
14807 (synopsis "Python binding for Hoedown")
14808 (description
14809 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
14810 library written in C. It features a fast HTML renderer and functionality to make custom
14811 renderers (e.g. man pages or LaTeX).")
14812 (license license:expat)))
14813
14814 (define-public python2-misaka
14815 (package-with-python2 python-misaka))
14816
14817 (define-public python2-steadymark
14818 ;; This is forced into being a python2 only variant
14819 ;; due to its dependence on couleur that has no support
14820 ;; for python3
14821 (package
14822 (name "python2-steadymark")
14823 (version "0.7.3")
14824 (source
14825 (origin
14826 (method url-fetch)
14827 (uri (pypi-uri "steadymark" version))
14828 (sha256
14829 (base32
14830 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
14831 (build-system python-build-system)
14832 (native-inputs
14833 `(("python-couleur" ,python2-couleur)
14834 ("python-sure" ,python2-sure)
14835 ("python-misaka" ,python2-misaka)))
14836 (arguments
14837 `(#:python ,python-2
14838 #:phases
14839 (modify-phases %standard-phases
14840 (add-before 'build 'patch-setup-py
14841 (lambda _
14842 ;; Update requirements from dependency==version
14843 ;; to dependency>=version
14844 (substitute* "setup.py"
14845 (("==") ">="))
14846 #t)))))
14847 (home-page "https://github.com/gabrielfalcao/steadymark")
14848 (synopsis "Markdown-based test runner for python")
14849 (description
14850 "@code{Steadymark} allows documentation to be written in github-flavoured
14851 markdown. The documentation may contain snippets of code surrounded by python
14852 code blocks and @code{Steadymark} will find these snippets and run them, making
14853 sure that there are no old malfunctional examples in the documentation examples.")
14854 (license license:expat)))
14855
14856 (define-public python-jsonpointer
14857 (package
14858 (name "python-jsonpointer")
14859 (version "1.10")
14860 (source
14861 (origin
14862 (method url-fetch)
14863 (uri (pypi-uri "jsonpointer" version))
14864 (sha256
14865 (base32
14866 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
14867 (build-system python-build-system)
14868 (home-page "https://github.com/stefankoegl/python-json-pointer")
14869 (synopsis "Identify specific nodes in a JSON document")
14870 (description "@code{jsonpointer} allows you to access specific nodes
14871 by path in a JSON document (see RFC 6901).")
14872 (license license:bsd-3)))
14873
14874 (define-public python2-jsonpointer
14875 (package-with-python2 python-jsonpointer))
14876
14877 (define-public python-jsonpatch
14878 (package
14879 (name "python-jsonpatch")
14880 (version "1.16")
14881 (source
14882 (origin
14883 (method git-fetch)
14884 ;; pypi version lacks tests.js
14885 (uri (git-reference
14886 (url "https://github.com/stefankoegl/python-json-patch")
14887 (commit (string-append "v" version))))
14888 (file-name (git-file-name name version))
14889 (sha256
14890 (base32
14891 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
14892 (build-system python-build-system)
14893 (native-inputs
14894 `(("python-jsonpointer" ,python-jsonpointer)))
14895 (home-page "https://github.com/stefankoegl/python-json-patch")
14896 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
14897 (description "@code{jsonpatch} is a library and program that allows
14898 applying JSON Patches according to RFC 6902.")
14899 (license license:bsd-3)))
14900
14901 (define-public python2-jsonpatch
14902 (package-with-python2 python-jsonpatch))
14903
14904 (define-public python-jsonpatch-0.4
14905 (package (inherit python-jsonpatch)
14906 (name "python-jsonpatch")
14907 (version "0.4")
14908 (source
14909 (origin
14910 (method git-fetch)
14911 (uri (git-reference
14912 (url "https://github.com/stefankoegl/python-json-patch")
14913 (commit (string-append "v" version))))
14914 (file-name (git-file-name name version))
14915 (sha256
14916 (base32
14917 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
14918
14919 (define-public python2-jsonpatch-0.4
14920 (package-with-python2 python-jsonpatch-0.4))
14921
14922 (define-public python-rfc3986
14923 (package
14924 (name "python-rfc3986")
14925 (version "1.1.0")
14926 (source (origin
14927 (method url-fetch)
14928 (uri (pypi-uri "rfc3986" version))
14929 (sha256
14930 (base32
14931 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
14932 (build-system python-build-system)
14933 (arguments
14934 `(#:modules ((guix build utils)
14935 (guix build python-build-system)
14936 (ice-9 ftw)
14937 (srfi srfi-1)
14938 (srfi srfi-26))
14939 #:phases
14940 (modify-phases %standard-phases
14941 (replace 'check
14942 (lambda _
14943 (let ((cwd (getcwd)))
14944 (setenv "PYTHONPATH"
14945 (string-append cwd "/build/"
14946 (find (cut string-prefix? "lib" <>)
14947 (scandir (string-append cwd "/build")))
14948 ":"
14949 (getenv "PYTHONPATH")))
14950 (invoke "pytest" "-v")))))))
14951 (native-inputs
14952 `(("python-pytest" ,python-pytest)))
14953 (home-page "https://rfc3986.readthedocs.io/")
14954 (synopsis "Parse and validate URI references")
14955 (description
14956 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14957 validation and authority parsing. This module also supports RFC@tie{}6874
14958 which adds support for zone identifiers to IPv6 addresses.")
14959 (license license:asl2.0)))
14960
14961 (define-public python2-rfc3986
14962 (package-with-python2 python-rfc3986))
14963
14964 (define-public python-rfc3987
14965 (package
14966 (name "python-rfc3987")
14967 (version "1.3.7")
14968 (source
14969 (origin
14970 (method url-fetch)
14971 (uri (pypi-uri "rfc3987" version))
14972 (sha256
14973 (base32
14974 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14975 (build-system python-build-system)
14976 (home-page "https://pypi.org/project/rfc3987/")
14977 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14978 (description "@code{rfc3987} provides routines for parsing and
14979 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14980 (license license:gpl3+)))
14981
14982 (define-public python2-rfc3987
14983 (package-with-python2 python-rfc3987))
14984
14985 (define-public python-validators
14986 (package
14987 (name "python-validators")
14988 (version "0.14.2")
14989 (source (origin
14990 (method url-fetch)
14991 (uri (pypi-uri "validators" version))
14992 (sha256
14993 (base32
14994 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
14995 (build-system python-build-system)
14996 (arguments
14997 '(#:phases (modify-phases %standard-phases
14998 (replace 'check
14999 (lambda _
15000 (invoke "pytest" "-vv"))))))
15001 (propagated-inputs
15002 `(("python-decorator" ,python-decorator)
15003 ("python-six" ,python-six)))
15004 (native-inputs
15005 `(("python-flake8" ,python-flake8)
15006 ("python-isort" ,python-isort)
15007 ("python-pytest" ,python-pytest)))
15008 (home-page "https://github.com/kvesteri/validators")
15009 (synopsis "Data validation library")
15010 (description
15011 "This package contains validators for different things such as email
15012 addresses, IP addresses, URLs, hashes and more. It has been designed to
15013 be easy to use and not require defining a schema or form just to validate
15014 some input.")
15015 (license license:expat)))
15016
15017 (define-public python2-validators
15018 (package-with-python2 python-validators))
15019
15020 (define-public python-validate-email
15021 (package
15022 (name "python-validate-email")
15023 (version "1.3")
15024 (source
15025 (origin
15026 (method url-fetch)
15027 (uri (pypi-uri "validate_email" version))
15028 (sha256
15029 (base32
15030 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15031 (build-system python-build-system)
15032 (home-page "https://github.com/syrusakbary/validate_email")
15033 (synopsis "Verifies if an email address is valid and really exists")
15034 (description "@code{validate_email} can be used to verify if an email
15035 address is valid and really exists.")
15036 (license license:lgpl3+)))
15037
15038 (define-public python2-validate-email
15039 (package-with-python2 python-validate-email))
15040
15041 (define-public python-flex
15042 (package
15043 (name "python-flex")
15044 (version "6.10.0")
15045 (source
15046 (origin
15047 (method url-fetch)
15048 (uri (pypi-uri "flex" version))
15049 (sha256
15050 (base32
15051 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15052 (build-system python-build-system)
15053 (propagated-inputs
15054 `(("python-click" ,python-click)
15055 ("python-iso8601" ,python-iso8601)
15056 ("python-jsonpointer" ,python-jsonpointer)
15057 ("python-pyyaml" ,python-pyyaml)
15058 ("python-requests" ,python-requests)
15059 ("python-rfc3987" ,python-rfc3987)
15060 ("python-six" ,python-six)
15061 ("python-validate-email" ,python-validate-email)))
15062 (home-page "https://github.com/pipermerriam/flex")
15063 (synopsis "Validates Swagger schemata")
15064 (description "@code{flex} can be used to validate Swagger schemata.")
15065 (license license:bsd-3)))
15066
15067 (define-public python2-flex
15068 (package-with-python2 python-flex))
15069
15070 (define-public python-marshmallow
15071 (package
15072 (name "python-marshmallow")
15073 (version "3.0.0b14")
15074 (source
15075 (origin
15076 (method url-fetch)
15077 (uri (pypi-uri "marshmallow" version))
15078 (sha256
15079 (base32
15080 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
15081 (build-system python-build-system)
15082 (propagated-inputs
15083 `(("python-dateutil" ,python-dateutil)
15084 ("python-simplejson" ,python-simplejson)))
15085 (native-inputs
15086 `(("python-pytest" ,python-pytest)
15087 ("python-pytz" ,python-pytz)))
15088 (home-page "https://github.com/marshmallow-code/marshmallow")
15089 (synopsis "Convert complex datatypes to and from native
15090 Python datatypes.")
15091 (description "@code{marshmallow} provides a library for converting
15092 complex datatypes to and from native Python datatypes.")
15093 (license license:expat)))
15094
15095 (define-public python2-marshmallow
15096 (package-with-python2 python-marshmallow))
15097
15098 (define-public python-apispec
15099 (package
15100 (name "python-apispec")
15101 (version "0.25.3")
15102 (source
15103 (origin
15104 (method url-fetch)
15105 (uri (pypi-uri "apispec" version))
15106 (sha256
15107 (base32
15108 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
15109 (build-system python-build-system)
15110 (propagated-inputs
15111 `(("python-pyyaml" ,python-pyyaml)))
15112 (native-inputs
15113 `(("python-pytest" ,python-pytest)
15114 ("python-flask" ,python-flask)
15115 ("python-marshmallow" ,python-marshmallow)
15116 ("python-tornado" ,python-tornado)
15117 ("python-bottle" ,python-bottle)
15118 ("python-mock" ,python-mock)))
15119 (home-page "https://github.com/marshmallow-code/apispec")
15120 (synopsis "Swagger 2.0 API specification generator")
15121 (description "@code{python-apispec} is a pluggable API specification
15122 generator. Currently supports the OpenAPI specification (f.k.a.
15123 Swagger 2.0).")
15124 (license license:expat)))
15125
15126 (define-public python2-apispec
15127 (package-with-python2 python-apispec))
15128
15129 (define-public python-flasgger
15130 (package
15131 (name "python-flasgger")
15132 (version "0.6.3")
15133 (source
15134 (origin
15135 (method git-fetch)
15136 (uri (git-reference
15137 (url "https://github.com/rochacbruno/flasgger.git")
15138 (commit version)))
15139 (file-name (git-file-name name version))
15140 (sha256
15141 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
15142 (build-system python-build-system)
15143 (arguments
15144 `(#:phases
15145 (modify-phases %standard-phases
15146 (replace 'check
15147 (lambda* (#:key inputs outputs #:allow-other-keys)
15148 (substitute* "Makefile"
15149 (("flake8 flasgger --ignore=F403")
15150 "flake8 flasgger --ignore=E731,F403"))
15151 (setenv "PYTHONPATH" (string-append (getcwd)
15152 ":"
15153 (getenv "PYTHONPATH")))
15154 (invoke "py.test"))))))
15155 (propagated-inputs
15156 `(("python-flask" ,python-flask)
15157 ("python-pyyaml" ,python-pyyaml)
15158 ("python-jsonschema" ,python-jsonschema)
15159 ("python-mistune" ,python-mistune)
15160 ("python-six" ,python-six)))
15161 (native-inputs
15162 `(("python-decorator" ,python-decorator)
15163 ("python-flake8" ,python-flake8)
15164 ("python-flask-restful" ,python-flask-restful)
15165 ("python-flex" ,python-flex)
15166 ("python-pytest" ,python-pytest)
15167 ("python-pytest-cov" ,python-pytest-cov)
15168 ("python-marshmallow" ,python-marshmallow)
15169 ("python-apispec" ,python-apispec)))
15170 (home-page "https://github.com/rochacbruno/flasgger/")
15171 (synopsis "Extract Swagger specs from your Flask project")
15172 (description "@code{python-flasgger} allows extracting Swagger specs
15173 from your Flask project. It is a fork of Flask-Swagger.")
15174 (license license:expat)))
15175
15176 (define-public python2-flasgger
15177 (package-with-python2 python-flasgger))
15178
15179 (define-public python-swagger-spec-validator
15180 (package
15181 (name "python-swagger-spec-validator")
15182 (version "2.4.3")
15183 (source
15184 (origin
15185 (method url-fetch)
15186 (uri (pypi-uri "swagger-spec-validator" version))
15187 (sha256
15188 (base32
15189 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
15190 (build-system python-build-system)
15191 (propagated-inputs
15192 `(("python-jsonschema" ,python-jsonschema)
15193 ("python-pyyaml" ,python-pyyaml)
15194 ("python-six" ,python-six)))
15195 (home-page
15196 "https://github.com/Yelp/swagger_spec_validator")
15197 (synopsis "Validation of Swagger specifications")
15198 (description "@code{swagger_spec_validator} provides a library for
15199 validating Swagger API specifications.")
15200 (license license:asl2.0)))
15201
15202 (define-public python2-swagger-spec-validator
15203 (package-with-python2 python-swagger-spec-validator))
15204
15205 (define-public python-apache-libcloud
15206 (package
15207 (name "python-apache-libcloud")
15208 (version "2.4.0")
15209 (source
15210 (origin
15211 (method url-fetch)
15212 (uri (pypi-uri "apache-libcloud" version))
15213 (sha256
15214 (base32
15215 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
15216 (build-system python-build-system)
15217 (arguments
15218 `(#:phases
15219 (modify-phases %standard-phases
15220 (add-after 'unpack 'patch-ssh
15221 (lambda* (#:key inputs #:allow-other-keys)
15222 (substitute* "libcloud/compute/ssh.py"
15223 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15224 "/bin/ssh" "'")))
15225 #t))
15226 (add-after 'unpack 'patch-tests
15227 (lambda _
15228 (substitute* "./libcloud/test/test_file_fixtures.py"
15229 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15230 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15231 return (httplib.OK,
15232 \"1234abcd\",
15233 {\"test\": \"value\"},
15234 httplib.responses[httplib.OK])
15235 def _ascii"))
15236 (substitute* "libcloud/test/compute/test_ssh_client.py"
15237 (("class ShellOutSSHClientTests")
15238 "@unittest.skip(\"Guix container doesn't have ssh service\")
15239 class ShellOutSSHClientTests")
15240 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15241 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15242 (("'.xF0', '.x90', '.x8D', '.x88'")
15243 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15244 #t))
15245 (add-before 'check 'copy-secret
15246 (lambda _
15247 (copy-file "libcloud/test/secrets.py-dist"
15248 "libcloud/test/secrets.py")
15249 #t)))))
15250 (inputs
15251 `(("openssh" ,openssh)))
15252 (propagated-inputs
15253 `(("python-paramiko" ,python-paramiko)
15254 ("python-requests" ,python-requests)))
15255 (native-inputs
15256 `(("python-lockfile" ,python-lockfile)
15257 ("python-mock" ,python-mock)
15258 ("python-pytest" ,python-pytest)
15259 ("python-pytest-runner" ,python-pytest-runner)
15260 ("python-requests-mock" ,python-requests-mock)))
15261 (home-page "https://libcloud.apache.org/")
15262 (synopsis "Unified Cloud API")
15263 (description "@code{libcloud} is a Python library for interacting with
15264 many of the popular cloud service providers using a unified API.")
15265 (license license:asl2.0)))
15266
15267 (define-public python2-apache-libcloud
15268 (package-with-python2 python-apache-libcloud))
15269
15270 (define-public python-smmap
15271 (package
15272 (name "python-smmap")
15273 (version "3.0.1")
15274 (source
15275 (origin
15276 (method url-fetch)
15277 (uri (pypi-uri "smmap" version))
15278 (sha256
15279 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
15280 (build-system python-build-system)
15281 (native-inputs
15282 `(("python-nosexcover" ,python-nosexcover)))
15283 (home-page "https://github.com/Byron/smmap")
15284 (synopsis "Python sliding window memory map manager")
15285 (description "@code{smmap} is a pure Python implementation of a sliding
15286 window memory map manager.")
15287 (license license:bsd-3)))
15288
15289 (define-public python-smmap2
15290 (deprecated-package "python-smmap2" python-smmap))
15291
15292 (define-public python2-smmap
15293 (package-with-python2 python-smmap))
15294
15295 (define-public python2-smmap2
15296 (deprecated-package "python2-smmap2" python2-smmap))
15297
15298 (define-public python-regex
15299 (package
15300 (name "python-regex")
15301 (version "2020.6.8")
15302 (source (origin
15303 (method url-fetch)
15304 (uri (pypi-uri "regex" version))
15305 (sha256
15306 (base32
15307 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
15308 (build-system python-build-system)
15309 (arguments
15310 '(#:phases
15311 (modify-phases %standard-phases
15312 (replace 'check
15313 (lambda* (#:key inputs outputs #:allow-other-keys)
15314 (add-installed-pythonpath inputs outputs)
15315 (invoke "python" "-c"
15316 "from regex.test_regex import test_main; test_main()"))))))
15317 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15318 (synopsis "Alternative regular expression module")
15319 (description "This regular expression implementation is backwards-
15320 compatible with the standard @code{re} module, but offers additional
15321 functionality like full case-folding for case-insensitive matches in Unicode.")
15322 (license license:psfl)))
15323
15324 (define-public python2-regex
15325 (package-with-python2 python-regex))
15326
15327 (define-public python2-pyopengl
15328 (package
15329 (name "python2-pyopengl")
15330 (version "3.1.0")
15331 (source
15332 (origin
15333 (method url-fetch)
15334 (uri (pypi-uri "PyOpenGL" version))
15335 (sha256
15336 (base32
15337 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15338 (arguments
15339 `(#:python ,python-2))
15340 (build-system python-build-system)
15341 (home-page "http://pyopengl.sourceforge.net")
15342 (synopsis "Standard OpenGL bindings for Python")
15343 (description
15344 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15345 related APIs. The binding is created using the standard @code{ctypes}
15346 library.")
15347 (license license:bsd-3)))
15348
15349 (define-public python2-pyopengl-accelerate
15350 (package
15351 (inherit python2-pyopengl)
15352 (name "python2-pyopengl-accelerate")
15353 (version "3.1.0")
15354 (source
15355 (origin
15356 (method url-fetch)
15357 (uri (pypi-uri "PyOpenGL-accelerate" version))
15358 (sha256
15359 (base32
15360 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
15361 (synopsis "Acceleration code for PyOpenGL")
15362 (description
15363 "This is the Cython-coded accelerator module for PyOpenGL.")))
15364
15365 (define-public python-rencode
15366 (package
15367 (name "python-rencode")
15368 (version "1.0.5")
15369 (source
15370 (origin
15371 (method url-fetch)
15372 (uri (pypi-uri "rencode" version))
15373 (sha256
15374 (base32
15375 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
15376 (build-system python-build-system)
15377 (arguments
15378 `(#:phases
15379 (modify-phases %standard-phases
15380 (add-before 'check 'delete-bogus-test
15381 ;; This test requires /home/aresch/Downloads, which is not provided by
15382 ;; the build environment.
15383 (lambda _
15384 (delete-file "rencode/t.py")
15385 #t)))))
15386 (native-inputs `(("pkg-config" ,pkg-config)
15387 ("python-cython" ,python-cython)))
15388 (home-page "https://github.com/aresch/rencode")
15389 (synopsis "Serialization of heterogeneous data structures")
15390 (description
15391 "The @code{rencode} module is a data structure serialization library,
15392 similar to @code{bencode} from the BitTorrent project. For complex,
15393 heterogeneous data structures with many small elements, r-encoding stake up
15394 significantly less space than b-encodings. This version of rencode is a
15395 complete rewrite in Cython to attempt to increase the performance over the
15396 pure Python module.")
15397 (license license:bsd-3)))
15398
15399 (define-public python2-rencode
15400 (package-with-python2 python-rencode))
15401
15402 (define-public python-xenon
15403 (package
15404 (name "python-xenon")
15405 (version "0.7.0")
15406 (source
15407 (origin
15408 (method url-fetch)
15409 (uri (pypi-uri "xenon" version))
15410 (sha256
15411 (base32
15412 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
15413 (build-system python-build-system)
15414 (native-inputs
15415 `(("python-pyyaml" ,python-pyyaml)
15416 ("python-radon" ,python-radon)
15417 ("python-requests" ,python-requests)
15418 ("python-flake8" ,python-flake8)
15419 ("python-tox" ,python-tox)))
15420 (arguments
15421 `(#:tests? #f ;test suite not shipped with the PyPI archive
15422 #:phases
15423 (modify-phases %standard-phases
15424 (add-before 'build 'patch-test-requirements
15425 (lambda _
15426 ;; Remove httpretty dependency for tests.
15427 (substitute* "setup.py"
15428 (("httpretty") ""))
15429 #t)))))
15430 (home-page "https://xenon.readthedocs.org/")
15431 (synopsis "Monitor code metrics for Python on your CI server")
15432 (description
15433 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
15434 Ideally, @code{xenon} is run every time code is committed. Through command
15435 line options, various thresholds can be set for the complexity of code. It
15436 will fail (i.e. it will exit with a non-zero exit code) when any of these
15437 requirements is not met.")
15438 (license license:expat)))
15439
15440 (define-public python2-xenon
15441 (package-with-python2 python-xenon))
15442
15443 (define-public python-pysocks
15444 (package
15445 (name "python-pysocks")
15446 (version "1.7.0")
15447 (source
15448 (origin
15449 (method url-fetch)
15450 (uri (pypi-uri "PySocks" version))
15451 (sha256
15452 (base32
15453 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
15454 (build-system python-build-system)
15455 (arguments `(#:tests? #f))
15456 (home-page "https://github.com/Anorov/PySocks")
15457 (synopsis "SOCKS client module")
15458 (description "@code{pysocks} is an updated and semi-actively maintained
15459 version of @code{SocksiPy} with bug fixes and extra features.")
15460 (license license:bsd-3)))
15461
15462 (define-public python2-pysocks
15463 (package-with-python2 python-pysocks))
15464
15465 (define-public python-pydiff
15466 (package
15467 (name "python-pydiff")
15468 (version "0.2")
15469 (source
15470 (origin
15471 (method url-fetch)
15472 (uri (pypi-uri "pydiff" version))
15473 (sha256
15474 (base32
15475 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
15476 (build-system python-build-system)
15477 (home-page "https://github.com/myint/pydiff")
15478 (synopsis "Library to diff two Python files at the bytecode level")
15479 (description
15480 "@code{pydiff} makes it easy to look for actual code changes while
15481 ignoring formatting changes.")
15482 (license license:expat)))
15483
15484 (define-public python2-pydiff
15485 (package-with-python2 python-pydiff))
15486
15487 (define-public python-tqdm
15488 (package
15489 (name "python-tqdm")
15490 (version "4.43.0")
15491 (source
15492 (origin
15493 (method url-fetch)
15494 (uri (pypi-uri "tqdm" version))
15495 (sha256
15496 (base32
15497 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
15498 (build-system python-build-system)
15499 (arguments
15500 '(#:phases (modify-phases %standard-phases
15501 (replace 'check
15502 (lambda* (#:key inputs outputs #:allow-other-keys)
15503 (add-installed-pythonpath inputs outputs)
15504 ;; This invokation is taken from tox.ini.
15505 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
15506 "-d" "-v" "tqdm/"))))))
15507 (native-inputs
15508 `(("python-nose" ,python-nose)))
15509 (home-page "https://github.com/tqdm/tqdm")
15510 (synopsis "Fast, extensible progress meter")
15511 (description
15512 "Make loops show a progress bar on the console by just wrapping any
15513 iterable with @code{|tqdm(iterable)|}. Offers many options to define
15514 design and layout.")
15515 (license (list license:mpl2.0 license:expat))))
15516
15517 (define-public python2-tqdm
15518 (package-with-python2 python-tqdm))
15519
15520 (define-public python-pkginfo
15521 (package
15522 (name "python-pkginfo")
15523 (version "1.4.2")
15524 (source
15525 (origin
15526 (method url-fetch)
15527 (uri (pypi-uri "pkginfo" version))
15528 (sha256
15529 (base32
15530 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
15531 (build-system python-build-system)
15532 (arguments
15533 ;; The tests are broken upstream.
15534 '(#:tests? #f))
15535 (home-page
15536 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
15537 (synopsis
15538 "Query metadatdata from sdists, bdists, and installed packages")
15539 (description
15540 "API to query the distutils metadata written in @file{PKG-INFO} inside a
15541 source distriubtion (an sdist) or a binary distribution (e.g., created by
15542 running bdist_egg). It can also query the EGG-INFO directory of an installed
15543 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
15544 created by running @code{python setup.py develop}).")
15545 (license license:expat)))
15546
15547 (define-public python2-pkginfo
15548 (package-with-python2 python-pkginfo))
15549
15550 (define-public python-twine
15551 (package
15552 (name "python-twine")
15553 (version "1.9.1")
15554 (source
15555 (origin
15556 (method url-fetch)
15557 (uri (pypi-uri "twine" version))
15558 (sha256
15559 (base32
15560 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
15561 (build-system python-build-system)
15562 (propagated-inputs
15563 `(("python-tqdm" ,python-tqdm)
15564 ("python-pkginfo" ,python-pkginfo)
15565 ("python-requests" ,python-requests)
15566 ("python-requests-toolbelt" ,python-requests-toolbelt)))
15567 (home-page "https://github.com/pypa/twine")
15568 (synopsis "Collection of utilities for interacting with PyPI")
15569 (description
15570 "@code{twine} currently supports registering projects and uploading
15571 distributions. It authenticates the user over HTTPS, allows them to pre-sign
15572 their files and supports any packaging format (including wheels).")
15573 (license license:asl2.0)))
15574
15575 (define-public python2-twine
15576 (package-with-python2 python-twine))
15577
15578 (define-public python-linecache2
15579 (package
15580 (name "python-linecache2")
15581 (version "1.0.0")
15582 (source
15583 (origin
15584 (method url-fetch)
15585 (uri (pypi-uri "linecache2" version))
15586 (sha256
15587 (base32
15588 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
15589 (build-system python-build-system)
15590 (arguments
15591 `(;; The tests depend on unittest2, and our version is a bit too old.
15592 #:tests? #f))
15593 (native-inputs
15594 `(("python-pbr" ,python-pbr-minimal)))
15595 (home-page
15596 "https://github.com/testing-cabal/linecache2")
15597 (synopsis "Backports of the linecache module")
15598 (description
15599 "The linecache module allows one to get any line from any file, while
15600 attempting to optimize internally, using a cache, the common case where many
15601 lines are read from a single file.")
15602 (license license:psfl)))
15603
15604 (define-public python2-linecache2
15605 (package-with-python2 python-linecache2))
15606
15607 (define-public python-traceback2
15608 (package
15609 (name "python-traceback2")
15610 (version "1.4.0")
15611 (source
15612 (origin
15613 (method url-fetch)
15614 (uri (pypi-uri "traceback2" version))
15615 (sha256
15616 (base32
15617 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
15618 (build-system python-build-system)
15619 (arguments
15620 `(;; python-traceback2 and python-unittest2 depend on one another.
15621 #:tests? #f))
15622 (native-inputs
15623 `(("python-pbr" ,python-pbr-minimal)))
15624 (propagated-inputs
15625 `(("python-linecache2" ,python-linecache2)))
15626 (home-page
15627 "https://github.com/testing-cabal/traceback2")
15628 (synopsis "Backports of the traceback module")
15629 (description
15630 "This module provides a standard interface to extract, format and print
15631 stack traces of Python programs. It exactly mimics the behavior of the Python
15632 interpreter when it prints a stack trace.")
15633 (license license:psfl)))
15634
15635 (define-public python2-traceback2
15636 (package-with-python2 python-traceback2))
15637
15638 (define-public python-ratelimiter
15639 (package
15640 (name "python-ratelimiter")
15641 (version "1.2.0")
15642 (source
15643 (origin
15644 (method url-fetch)
15645 (uri (pypi-uri "ratelimiter" version))
15646 (sha256
15647 (base32
15648 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
15649 (build-system python-build-system)
15650 (arguments
15651 '(#:tests? #f)) ; There are no tests in the pypi archive.
15652 (home-page "https://github.com/RazerM/ratelimiter")
15653 (synopsis "Simple rate limiting object")
15654 (description
15655 "The @code{ratelimiter} module ensures that an operation will not be
15656 executed more than a given number of times during a given period.")
15657 (license license:asl2.0)))
15658
15659 (define-public python2-ratelimiter
15660 (package-with-python2 python-ratelimiter))
15661
15662 (define-public python-dukpy
15663 (package
15664 (name "python-dukpy")
15665 (version "0.3")
15666 (source
15667 (origin
15668 (method git-fetch)
15669 (uri (git-reference
15670 (url "https://github.com/kovidgoyal/dukpy.git")
15671 (commit (string-append "v" version))))
15672 (file-name (git-file-name name version))
15673 (sha256
15674 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
15675 (build-system python-build-system)
15676 (home-page "https://github.com/kovidgoyal/dukpy")
15677 (synopsis "Run JavaScript in python")
15678 (description
15679 "dukpy is a JavaScript runtime environment for Python using the duktape
15680 embeddable JavaScript engine.")
15681 ;; Dukpy is licensed under MIT like the embedded duktape library,
15682 ;; with 'errors.c' as GPL3.
15683 (license (list license:expat license:gpl3))))
15684
15685 (define-public python2-dukpy
15686 (package-with-python2 python-dukpy))
15687
15688 (define-public python-jsonrpclib-pelix
15689 (package
15690 (name "python-jsonrpclib-pelix")
15691 (version "0.3.2")
15692 (source
15693 (origin
15694 (method url-fetch)
15695 (uri (pypi-uri "jsonrpclib-pelix" version))
15696 (sha256
15697 (base32
15698 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
15699 (build-system python-build-system)
15700 (arguments
15701 `(#:tests? #f)) ; no tests in PyPI tarball
15702 (home-page "https://github.com/tcalmant/jsonrpclib/")
15703 (synopsis "JSON-RPC 2.0 client library for Python")
15704 (description
15705 "This library implements the JSON-RPC v2.0
15706 specification (backwards-compatible) as a client library for Python. This
15707 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
15708 services.")
15709 (license license:asl2.0)))
15710
15711 (define-public python2-jsonrpclib-pelix
15712 (package-with-python2 python-jsonrpclib-pelix))
15713
15714 (define-public python-setuptools-scm-git-archive
15715 (package
15716 (name "python-setuptools-scm-git-archive")
15717 (version "1.0")
15718 (source
15719 (origin
15720 (method url-fetch)
15721 (uri (pypi-uri "setuptools_scm_git_archive" version))
15722 (sha256
15723 (base32
15724 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
15725 (build-system python-build-system)
15726 (native-inputs
15727 `(("python-pytest" ,python-pytest)))
15728 (propagated-inputs
15729 `(("python-setuptools-scm" ,python-setuptools-scm)))
15730 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
15731 (synopsis "Setuptools_scm plugin for git archives")
15732 (description
15733 "The setuptools_scm_git_archive package is a plugin to
15734 setuptools_scm, which supports obtaining versions from git archives that
15735 belong to tagged versions.")
15736 (license license:expat)))
15737
15738 (define-public python2-setuptools-scm-git-archive
15739 (package-with-python2 python-setuptools-scm-git-archive))
15740
15741 (define-public python-setuptools-git
15742 (package
15743 (name "python-setuptools-git")
15744 (version "1.2")
15745 (source
15746 (origin
15747 (method url-fetch)
15748 (uri (pypi-uri "setuptools-git" version))
15749 (sha256
15750 (base32
15751 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
15752 (build-system python-build-system)
15753 (arguments
15754 `(#:phases
15755 (modify-phases %standard-phases
15756 ;; This is needed for tests.
15757 (add-after 'unpack 'configure-git
15758 (lambda _
15759 (setenv "HOME" "/tmp")
15760 (invoke "git" "config" "--global" "user.email" "guix")
15761 (invoke "git" "config" "--global" "user.name" "guix")
15762 #t)))))
15763 (native-inputs
15764 `(("git" ,git-minimal)))
15765 (home-page "https://github.com/msabramo/setuptools-git")
15766 (synopsis "Setuptools revision control system plugin for Git")
15767 (description
15768 "This package provides a plugin for Setuptools for revision control with
15769 Git.")
15770 (license license:bsd-3)))
15771
15772 (define-public python-pyclipper
15773 (package
15774 (name "python-pyclipper")
15775 (version "1.1.0.post3")
15776 (source
15777 (origin
15778 (method url-fetch)
15779 (uri (pypi-uri "pyclipper" version ".zip"))
15780 (sha256
15781 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
15782 (modules '((guix build utils)))
15783 (snippet
15784 '(begin
15785 ;; This file is generated by Cython.
15786 (delete-file "pyclipper/pyclipper.cpp") #t))))
15787 (build-system python-build-system)
15788 (arguments
15789 `(#:phases
15790 (modify-phases %standard-phases
15791 (add-before 'build 'cythonize-sources
15792 (lambda _
15793 (with-directory-excursion "pyclipper"
15794 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
15795 (propagated-inputs
15796 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
15797 (native-inputs
15798 `(("python-cython" ,python-cython)
15799 ("python-pytest" ,python-pytest)
15800 ("python-pytest-runner" ,python-pytest-runner)
15801 ("python-unittest2" ,python-unittest2)
15802 ("unzip" ,unzip)))
15803 (home-page "https://github.com/greginvm/pyclipper")
15804 (synopsis "Wrapper for Angus Johnson's Clipper library")
15805 (description
15806 "Pyclipper is a Cython wrapper for the C++ translation of the
15807 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
15808 (license license:expat)))
15809
15810 (define-public python2-pyclipper
15811 (package-with-python2 python-pyclipper))
15812
15813 (define-public python2-booleanoperations
15814 (package
15815 (name "python2-booleanoperations")
15816 (version "0.7.1")
15817 (source
15818 (origin
15819 (method url-fetch)
15820 (uri (pypi-uri "booleanOperations" version ".zip"))
15821 (sha256
15822 (base32
15823 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
15824 (build-system python-build-system)
15825 (arguments
15826 `(#:python ,python-2))
15827 (native-inputs
15828 `(("unzip" ,unzip)
15829 ("python2-pytest" ,python2-pytest)
15830 ("python2-pytest-runner" ,python2-pytest-runner)))
15831 (propagated-inputs
15832 `(("python-fonttools" ,python2-fonttools)
15833 ("python-pyclipper" ,python2-pyclipper)
15834 ("python-ufolib" ,python2-ufolib)))
15835 (home-page "https://github.com/typemytype/booleanOperations")
15836 (synopsis "Boolean operations on paths")
15837 (description
15838 "BooleanOperations provides a Python library that enables
15839 boolean operations on paths.")
15840 (license license:expat)))
15841
15842 (define-public python-tempdir
15843 (package
15844 (name "python-tempdir")
15845 (version "0.7.1")
15846 (source
15847 (origin
15848 (method url-fetch)
15849 (uri (pypi-uri "tempdir" version))
15850 (sha256
15851 (base32
15852 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
15853 (build-system python-build-system)
15854 (home-page "https://pypi.org/project/tempdir/")
15855 (arguments
15856 ;; the package has no tests
15857 '(#:tests? #f))
15858 (synopsis "Python library for managing temporary directories")
15859 (description
15860 "This library manages temporary directories that are automatically
15861 deleted with all their contents when they are no longer needed. It is
15862 particularly convenient for use in tests.")
15863 (license license:expat)))
15864
15865 (define-public python2-tempdir
15866 (package-with-python2 python-tempdir))
15867
15868 (define-public python-activepapers
15869 (package
15870 (name "python-activepapers")
15871 (version "0.2.2")
15872 (source
15873 (origin
15874 (method url-fetch)
15875 (uri (pypi-uri "ActivePapers.Py" version))
15876 (sha256
15877 (base32
15878 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
15879 (build-system python-build-system)
15880 (arguments
15881 `(#:modules ((ice-9 ftw)
15882 (srfi srfi-1)
15883 (guix build utils)
15884 (guix build python-build-system))
15885
15886 #:phases
15887 (modify-phases %standard-phases
15888 (add-after 'unpack 'delete-python2-code
15889 (lambda _
15890 (for-each delete-file
15891 '("lib/activepapers/builtins2.py"
15892 "lib/activepapers/standardlib2.py"
15893 "lib/activepapers/utility2.py"))))
15894 (replace 'check
15895 (lambda _
15896 ;; Deactivate the test cases that download files
15897 (setenv "NO_NETWORK_ACCESS" "1")
15898 ;; For some strange reason, some tests fail if nosetests runs all
15899 ;; test modules in a single execution. They pass if each test
15900 ;; module is run individually.
15901 (for-each (lambda (filename)
15902 (invoke "nosetests"
15903 (string-append "tests/" filename)))
15904 (scandir "tests"
15905 (lambda (filename)
15906 (string-suffix? ".py" filename)))))))))
15907 (native-inputs
15908 `(("python-tempdir" ,python-tempdir)
15909 ("python-nose" ,python-nose)))
15910 (propagated-inputs
15911 `(("python-h5py" ,python-h5py)))
15912 (home-page "https://www.activepapers.org/")
15913 (synopsis "Executable papers for scientific computing")
15914 (description
15915 "ActivePapers is a tool for working with executable papers, which
15916 combine data, code, and documentation in single-file packages,
15917 suitable for publication as supplementary material or on repositories
15918 such as figshare or Zenodo.")
15919 (properties `((python2-variant . ,(delay python2-activepapers))))
15920 (license license:bsd-3)))
15921
15922 (define-public python2-activepapers
15923 (let ((base (package-with-python2
15924 (strip-python2-variant python-activepapers))))
15925 (package
15926 (inherit base)
15927 (arguments
15928 (substitute-keyword-arguments (package-arguments base)
15929 ((#:phases phases)
15930 `(modify-phases ,phases
15931 (delete 'delete-python2-code)
15932 (add-after 'unpack 'delete-python3-code
15933 (lambda _
15934 (for-each delete-file
15935 '("lib/activepapers/builtins3.py"
15936 "lib/activepapers/standardlib3.py"
15937 "lib/activepapers/utility3.py")))))))))))
15938
15939 (define-public python-semver
15940 (package
15941 (name "python-semver")
15942 (version "2.9.0")
15943 (source
15944 (origin
15945 (method url-fetch)
15946 (uri (pypi-uri "semver" version))
15947 (sha256
15948 (base32
15949 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
15950 (build-system python-build-system)
15951 (native-inputs
15952 `(("python-appdirs" ,python-appdirs)
15953 ("python-distlib" ,python-distlib)
15954 ("python-importlib-metadata" ,python-importlib-metadata)
15955 ("python-filelock" ,python-filelock)
15956 ("python-six" ,python-six)
15957 ("python-tox" ,python-tox)
15958 ("python-virtualenv" ,python-virtualenv)))
15959 (home-page "https://github.com/k-bx/python-semver")
15960 (synopsis "Python helper for Semantic Versioning")
15961 (description "This package provides a Python library for
15962 @url{Semantic Versioning, http://semver.org/}.")
15963 (license license:bsd-3)))
15964
15965 (define-public python2-semver
15966 (package-with-python2 python-semver))
15967
15968 (define-public python-pyro4
15969 (package
15970 (name "python-pyro4")
15971 (version "4.77")
15972 (source
15973 (origin
15974 (method url-fetch)
15975 (uri (pypi-uri "Pyro4" version))
15976 (sha256
15977 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
15978 (build-system python-build-system)
15979 (arguments
15980 '(#:tests? #f)) ;FIXME: Some tests require network access.
15981 (native-inputs
15982 `(("python-cloudpickle" ,python-cloudpickle)
15983 ("python-dill" ,python-dill)
15984 ("python-msgpack" ,python-msgpack)))
15985 (propagated-inputs
15986 `(("python-serpent" ,python-serpent)))
15987 (home-page "https://pyro4.readthedocs.io")
15988 (synopsis "Distributed object middleware for Python")
15989 (description
15990 "Pyro enables you to build applications in which objects can talk to each
15991 other over the network. You can just use normal Python method calls to call
15992 objects on other machines, also known as remote procedure calls (RPC).")
15993 (license license:expat)))
15994
15995 (define-public python2-pyro
15996 (package
15997 (name "python2-pyro")
15998 (version "3.16")
15999 (source
16000 (origin
16001 (method url-fetch)
16002 (uri (pypi-uri "Pyro" version))
16003 (file-name (string-append "Pyro-" version ".tar.gz"))
16004 (sha256
16005 (base32
16006 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
16007 (build-system python-build-system)
16008 (arguments
16009 ;; Pyro is not compatible with Python 3
16010 `(#:python ,python-2
16011 ;; Pyro has no test cases for automatic execution
16012 #:tests? #f))
16013 (home-page "https://pythonhosted.org/Pyro/")
16014 (synopsis "Distributed object manager for Python")
16015 (description "Pyro is a Distributed Object Technology system
16016 written in Python that is designed to be easy to use. It resembles
16017 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
16018 which is a system and language independent Distributed Object Technology
16019 and has much more to offer than Pyro or RMI. Pyro 3.x is no
16020 longer maintained. New projects should use Pyro4 instead, which
16021 is the new Pyro version that is actively developed.")
16022 (license license:expat)))
16023
16024 (define-public python2-scientific
16025 (package
16026 (name "python2-scientific")
16027 (version "2.9.4")
16028 (source
16029 (origin
16030 (method git-fetch)
16031 (uri (git-reference
16032 (url "https://github.com/khinsen/ScientificPython")
16033 (commit (string-append "rel" version))))
16034 (file-name (git-file-name name version))
16035 (sha256
16036 (base32
16037 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
16038 (build-system python-build-system)
16039 (inputs
16040 `(("netcdf" ,netcdf)))
16041 (propagated-inputs
16042 `(("python-numpy" ,python2-numpy-1.8)
16043 ("python-pyro" ,python2-pyro)))
16044 (arguments
16045 ;; ScientificPython is not compatible with Python 3
16046 `(#:python ,python-2
16047 #:tests? #f ; No test suite
16048 #:phases
16049 (modify-phases %standard-phases
16050 (replace 'build
16051 (lambda* (#:key inputs #:allow-other-keys)
16052 (invoke "python" "setup.py" "build"
16053 (string-append "--netcdf_prefix="
16054 (assoc-ref inputs "netcdf"))))))))
16055 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
16056 (synopsis "Python modules for scientific computing")
16057 (description "ScientificPython is a collection of Python modules that are
16058 useful for scientific computing. Most modules are rather general (Geometry,
16059 physical units, automatic derivatives, ...) whereas others are more
16060 domain-specific (e.g. netCDF and PDB support). The library is currently
16061 not actively maintained and works only with Python 2 and NumPy < 1.9.")
16062 (license license:cecill-c)))
16063
16064 (define-public python2-mmtk
16065 (package
16066 (name "python2-mmtk")
16067 (version "2.7.12")
16068 (source
16069 (origin
16070 (method git-fetch)
16071 (uri (git-reference
16072 (url "https://github.com/khinsen/MMTK")
16073 (commit (string-append "rel" version))))
16074 (file-name (git-file-name name version))
16075 (sha256
16076 (base32
16077 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
16078 (build-system python-build-system)
16079 (native-inputs
16080 `(("netcdf" ,netcdf)))
16081 (propagated-inputs
16082 `(("python-scientific" ,python2-scientific)
16083 ("python-tkinter" ,python-2 "tk")))
16084 (arguments
16085 `(#:python ,python-2
16086 #:tests? #f
16087 #:phases
16088 (modify-phases %standard-phases
16089 (add-before 'build 'includes-from-scientific
16090 (lambda* (#:key inputs #:allow-other-keys)
16091 (mkdir-p "Include/Scientific")
16092 (copy-recursively
16093 (string-append
16094 (assoc-ref inputs "python-scientific")
16095 "/include/python2.7/Scientific")
16096 "Include/Scientific"))))))
16097 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
16098 (synopsis "Python library for molecular simulation")
16099 (description "MMTK is a library for molecular simulations with an emphasis
16100 on biomolecules. It provides widely used methods such as Molecular Dynamics
16101 and normal mode analysis, but also basic routines for implementing new methods
16102 for simulation and analysis. The library is currently not actively maintained
16103 and works only with Python 2 and NumPy < 1.9.")
16104 (license license:cecill-c)))
16105
16106 (define-public python-phonenumbers
16107 (package
16108 (name "python-phonenumbers")
16109 (version "8.9.1")
16110 (source
16111 (origin
16112 (method url-fetch)
16113 (uri (pypi-uri "phonenumbers" version))
16114 (sha256
16115 (base32
16116 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
16117 (build-system python-build-system)
16118 (home-page
16119 "https://github.com/daviddrysdale/python-phonenumbers")
16120 (synopsis
16121 "Python library for dealing with international phone numbers")
16122 (description
16123 "This package provides a Python port of Google's libphonenumber library.")
16124 (license license:asl2.0)))
16125
16126 (define-public python2-phonenumbers
16127 (package-with-python2 python-phonenumbers))
16128
16129 (define-public python-send2trash
16130 (package
16131 (name "python-send2trash")
16132 (version "1.5.0")
16133 (source
16134 (origin (method git-fetch)
16135 ;; Source tarball on PyPI doesn't include tests.
16136 (uri (git-reference
16137 (url "https://github.com/hsoft/send2trash.git")
16138 (commit version)))
16139 (file-name (git-file-name name version))
16140 (sha256
16141 (base32
16142 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
16143 (build-system python-build-system)
16144 (arguments
16145 '(#:phases
16146 (modify-phases %standard-phases
16147 (add-before 'check 'pre-check
16148 (lambda _
16149 (mkdir-p "/tmp/foo")
16150 (setenv "HOME" "/tmp/foo")
16151 #t)))))
16152 (home-page "https://github.com/hsoft/send2trash")
16153 (synopsis "Send files to the user's @file{~/Trash} directory")
16154 (description "This package provides a Python library to send files to the
16155 user's @file{~/Trash} directory.")
16156 (properties `((python2-variant . ,(delay python2-send2trash))))
16157 (license license:bsd-3)))
16158
16159 (define-public python2-send2trash
16160 (package
16161 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
16162 (arguments
16163 (substitute-keyword-arguments (package-arguments python-send2trash)
16164 ((#:phases phases)
16165 `(modify-phases ,phases
16166 (add-before 'check 'setenv
16167 (lambda _
16168 (setenv "PYTHONPATH"
16169 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
16170 #t))))))))
16171
16172 (define-public python-yapf
16173 (package
16174 (name "python-yapf")
16175 (version "0.29.0")
16176 (source
16177 (origin
16178 (method url-fetch)
16179 (uri (pypi-uri "yapf" version))
16180 (sha256
16181 (base32
16182 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
16183 (build-system python-build-system)
16184 (home-page "https://github.com/google/yapf")
16185 (synopsis "Formatter for Python code")
16186 (description "YAPF is a formatter for Python code. It's based off of
16187 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
16188 takes the code and reformats it to the best formatting that conforms to the
16189 style guide, even if the original code didn't violate the style guide.")
16190 (license license:asl2.0)))
16191
16192 (define-public python2-yapf
16193 (package-with-python2 python-yapf))
16194
16195 (define-public python-gyp
16196 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
16197 (revision "0"))
16198 (package
16199 (name "python-gyp")
16200 ;; Google does not release versions,
16201 ;; based on second most recent commit date.
16202 (version (git-version "0.0.0" revision commit))
16203 (source
16204 (origin
16205 ;; Google does not release tarballs,
16206 ;; git checkout is needed.
16207 (method git-fetch)
16208 (uri (git-reference
16209 (url "https://chromium.googlesource.com/external/gyp")
16210 (commit commit)))
16211 (file-name (git-file-name name version))
16212 (sha256
16213 (base32
16214 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
16215 (build-system python-build-system)
16216 (home-page "https://gyp.gsrc.io/")
16217 (synopsis "GYP is a Meta-Build system")
16218 (description
16219 "GYP builds build systems for large, cross platform applications.
16220 It can be used to generate XCode projects, Visual Studio projects, Ninja build
16221 files, and Makefiles.")
16222 (license license:bsd-3))))
16223
16224 (define-public python2-gyp
16225 (package-with-python2 python-gyp))
16226
16227 (define-public python-whatever
16228 (package
16229 (name "python-whatever")
16230 (version "0.6")
16231 (source
16232 (origin
16233 (method git-fetch)
16234 (uri (git-reference
16235 (url "https://github.com/Suor/whatever")
16236 (commit version)))
16237 (file-name (git-file-name name version))
16238 (sha256
16239 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
16240 (build-system python-build-system)
16241 (arguments
16242 `(#:phases
16243 (modify-phases %standard-phases
16244 (replace 'check
16245 (lambda _
16246 (invoke "py.test"))))))
16247 (native-inputs
16248 `(("python-pytest" ,python-pytest)))
16249 (home-page "http://github.com/Suor/whatever")
16250 (synopsis "Make anonymous functions by partial application of operators")
16251 (description "@code{whatever} provides an easy way to make anonymous
16252 functions by partial application of operators.")
16253 (license license:bsd-3)))
16254
16255 (define-public python2-whatever
16256 (package-with-python2 python-whatever))
16257
16258 (define-public python-funcy
16259 (package
16260 (name "python-funcy")
16261 (version "1.11")
16262 (source
16263 (origin
16264 (method git-fetch)
16265 (uri (git-reference
16266 (url "https://github.com/Suor/funcy.git")
16267 (commit version)))
16268 (sha256
16269 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
16270 (file-name (git-file-name name version))))
16271 (build-system python-build-system)
16272 (arguments
16273 `(#:phases
16274 (modify-phases %standard-phases
16275 (replace 'check
16276 (lambda _
16277 (invoke "py.test"))))))
16278 (native-inputs
16279 `(("python-pytest" ,python-pytest)
16280 ("python-whatever" ,python-whatever)))
16281 (home-page "http://github.com/Suor/funcy")
16282 (synopsis "Functional tools")
16283 (description "@code{funcy} is a library that provides functional tools.
16284 Examples are:
16285 @enumerate
16286 @item merge - Merges collections of the same type
16287 @item walk - Type-preserving map
16288 @item select - Selects a part of a collection
16289 @item take - Takes the first n items of a collection
16290 @item first - Takes the first item of a collection
16291 @item remove - Predicated-removes items of a collection
16292 @item concat - Concatenates two collections
16293 @item flatten - Flattens a collection with subcollections
16294 @item distinct - Returns only distinct items
16295 @item split - Predicated-splits a collection
16296 @item split_at - Splits a collection at a given item
16297 @item group_by - Groups items by group
16298 @item pairwise - Pairs off adjacent items
16299 @item partial - Partially-applies a function
16300 @item curry - Curries a function
16301 @item compose - Composes functions
16302 @item complement - Complements a predicate
16303 @item all_fn - \"all\" with predicate
16304 @end enumerate")
16305 (license license:bsd-3)))
16306
16307 (define-public python2-funcy
16308 (package-with-python2 python-funcy))
16309
16310 (define-public python-isoweek
16311 (package
16312 (name "python-isoweek")
16313 (version "1.3.3")
16314 (source
16315 (origin
16316 (method url-fetch)
16317 (uri (pypi-uri "isoweek" version))
16318 (sha256
16319 (base32
16320 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
16321 (build-system python-build-system)
16322 (home-page "https://github.com/gisle/isoweek")
16323 (synopsis "Objects representing a week")
16324 (description "The @code{isoweek} module provide the class Week that
16325 implements the week definition of ISO 8601. This standard also defines
16326 a notation for identifying weeks; yyyyWww (where the W is a literal).
16327 Week instances stringify to this form.")
16328 (license license:bsd-3)))
16329
16330 (define-public python2-isoweek
16331 (package-with-python2 python-isoweek))
16332
16333 (define-public python-tokenize-rt
16334 (package
16335 (name "python-tokenize-rt")
16336 (version "2.0.1")
16337 (source
16338 (origin
16339 (method url-fetch)
16340 (uri (pypi-uri "tokenize-rt" version))
16341 (sha256
16342 (base32
16343 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
16344 (build-system python-build-system)
16345 (home-page "https://github.com/asottile/tokenize-rt")
16346 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
16347 (description
16348 "This Python library is a wrapper around @code{tokenize} from the Python
16349 standard library. It provides two additional tokens @code{ESCAPED_NL} and
16350 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
16351 and @code{tokens_to_src} to roundtrip.")
16352 (license license:expat)))
16353
16354 (define-public python-future-fstrings
16355 (package
16356 (name "python-future-fstrings")
16357 (version "0.4.1")
16358 (source
16359 (origin
16360 (method url-fetch)
16361 (uri (pypi-uri "future_fstrings" version))
16362 (sha256
16363 (base32
16364 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
16365 (build-system python-build-system)
16366 (propagated-inputs
16367 `(("python-tokenize-rt" ,python-tokenize-rt)))
16368 (home-page "https://github.com/asottile/future-fstrings")
16369 (synopsis "Backport of fstrings to Python < 3.6")
16370 (description
16371 "This package provides a UTF-8 compatible encoding
16372 @code{future_fstrings}, which performs source manipulation. It decodes the
16373 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
16374 @code{f} strings.")
16375 (license license:expat)))
16376
16377 (define-public python-typed-ast
16378 (package
16379 (name "python-typed-ast")
16380 (version "1.4.0")
16381 (source
16382 (origin
16383 (method git-fetch)
16384 (uri (git-reference
16385 (url "https://github.com/python/typed_ast.git")
16386 (commit version)))
16387 (sha256
16388 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
16389 (file-name (git-file-name name version))))
16390 (build-system python-build-system)
16391 (arguments
16392 `(#:modules ((guix build utils)
16393 (guix build python-build-system)
16394 (ice-9 ftw)
16395 (srfi srfi-1)
16396 (srfi srfi-26))
16397 #:phases
16398 (modify-phases %standard-phases
16399 (replace 'check
16400 (lambda _
16401 (let ((cwd (getcwd)))
16402 (setenv "PYTHONPATH"
16403 (string-append cwd "/build/"
16404 (find (cut string-prefix? "lib" <>)
16405 (scandir (string-append cwd "/build")))
16406 ":"
16407 (getenv "PYTHONPATH"))))
16408 (invoke "pytest")
16409 #t)))))
16410 (native-inputs `(("python-pytest" ,python-pytest)))
16411 (home-page "https://github.com/python/typed_ast")
16412 (synopsis "Fork of Python @code{ast} modules with type comment support")
16413 (description "This package provides a parser similar to the standard
16414 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
16415 include PEP 484 type comments and are independent of the version of Python
16416 under which they are run. The @code{typed_ast} parsers produce the standard
16417 Python AST (plus type comments), and are both fast and correct, as they are
16418 based on the CPython 2.7 and 3.7 parsers.")
16419 ;; See the file "LICENSE" for the details.
16420 (license (list license:psfl
16421 license:asl2.0
16422 license:expat)))) ;ast27/Parser/spark.py
16423
16424 (define-public python-typing
16425 (package
16426 (name "python-typing")
16427 (version "3.7.4.1")
16428 (source
16429 (origin
16430 (method url-fetch)
16431 (uri (pypi-uri "typing" version))
16432 (sha256
16433 (base32
16434 "08xs7s5pyq99hbrzw23inczmidz90krvpv9q5p1qrvh6yzrydpwi"))))
16435 (build-system python-build-system)
16436 (home-page "https://docs.python.org/3/library/typing.html")
16437 (synopsis "Type hints for Python")
16438 (description "This is a backport of the standard library @code{typing}
16439 module to Python versions older than 3.5. Typing defines a standard notation
16440 for Python function and variable type annotations. The notation can be used
16441 for documenting code in a concise, standard format, and it has been designed
16442 to also be used by static and runtime type checkers, static analyzers, IDEs
16443 and other tools.")
16444 (license license:psfl)))
16445
16446 (define-public python2-typing
16447 (package-with-python2 python-typing))
16448
16449 (define-public python-typing-extensions
16450 (package
16451 (name "python-typing-extensions")
16452 (version "3.7.4.1")
16453 (source
16454 (origin
16455 (method url-fetch)
16456 (uri (pypi-uri "typing_extensions" version))
16457 (sha256
16458 (base32
16459 "1wj1vcgbnm20aiinmphyxfrbv3qi9xdhvw89ab3qm42y9n4wq7h9"))))
16460 (build-system python-build-system)
16461 (home-page
16462 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
16463 (synopsis "Experimental type hints for Python")
16464 (description
16465 "The typing_extensions module contains additional @code{typing} hints not
16466 yet present in the of the @code{typing} standard library.
16467 Included are implementations of:
16468 @enumerate
16469 @item ClassVar
16470 @item ContextManager
16471 @item Counter
16472 @item DefaultDict
16473 @item Deque
16474 @item NewType
16475 @item NoReturn
16476 @item overload
16477 @item Protocol
16478 @item runtime
16479 @item Text
16480 @item Type
16481 @item TYPE_CHECKING
16482 @item AsyncGenerator
16483 @end enumerate\n")
16484 (license license:psfl)))
16485
16486 (define-public bpython
16487 (package
16488 (name "bpython")
16489 (version "0.18")
16490 (source
16491 (origin
16492 (method url-fetch)
16493 (uri (pypi-uri "bpython" version))
16494 (sha256
16495 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
16496 (build-system python-build-system)
16497 (arguments
16498 `(#:phases
16499 (modify-phases %standard-phases
16500 (add-after 'unpack 'remove-failing-test
16501 (lambda _
16502 ;; Remove failing test. FIXME: make it pass
16503 (delete-file "bpython/test/test_args.py")
16504 #t))
16505 (add-after 'wrap 'add-aliases
16506 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
16507 (lambda* (#:key outputs #:allow-other-keys)
16508 (let ((out (assoc-ref outputs "out")))
16509 (for-each
16510 (lambda (old new)
16511 (symlink old (string-append out "/bin/" new)))
16512 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
16513 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
16514 #t)))))
16515 (propagated-inputs
16516 `(("python-pygments" ,python-pygments)
16517 ("python-requests" ,python-requests)
16518 ("python-babel" ,python-babel) ; optional, for internationalization
16519 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
16520 ("python-greenlet" ,python-greenlet)
16521 ("python-urwid" ,python-urwid) ; for bpython-urwid only
16522 ("python-six" ,python-six)))
16523 (native-inputs
16524 `(("python-sphinx" ,python-sphinx)
16525 ("python-mock" ,python-mock)))
16526 (home-page "https://bpython-interpreter.org/")
16527 (synopsis "Fancy interface to the Python interpreter")
16528 (description "Bpython is a fancy interface to the Python
16529 interpreter. bpython's main features are
16530
16531 @enumerate
16532 @item in-line syntax highlighting,
16533 @item readline-like autocomplete with suggestions displayed as you type,
16534 @item expected parameter list for any Python function,
16535 @item \"rewind\" function to pop the last line of code from memory and
16536 re-evaluate,
16537 @item send the code you've entered off to a pastebin,
16538 @item save the code you've entered to a file, and
16539 @item auto-indentation.
16540 @end enumerate")
16541 (license license:expat)))
16542
16543 (define-public bpython2
16544 (let ((base (package-with-python2
16545 (strip-python2-variant bpython))))
16546 (package (inherit base)
16547 (name "bpython2")
16548 (arguments
16549 `(#:python ,python-2
16550 #:phases
16551 (modify-phases %standard-phases
16552 (add-after 'unpack 'remove-failing-test
16553 (lambda _
16554 ;; Remove failing test. FIXME: make it pass
16555 (delete-file "bpython/test/test_args.py")
16556 ;; Disable failing test-cases (renaming inhibits they are
16557 ;; discovered)
16558 (substitute* "bpython/test/test_curtsies_repl.py"
16559 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
16560 (string-append a "xxx_off_" b))
16561 (("^(\\s*def )(test_complex\\W)" _ a b)
16562 (string-append a "xxx_off_" b)))
16563 #t))
16564 (add-before 'build 'rename-scripts
16565 ;; rename the scripts to bypthon2, bpdb2, etc.
16566 (lambda _
16567 (substitute* "setup.py"
16568 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
16569 (string-append name "2" rest "\n"))
16570 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
16571 (string-append name "2" (or sub "") rest "\n")))
16572 #t))))))))
16573
16574 (define-public python-pyinotify
16575 (package
16576 (name "python-pyinotify")
16577 (version "0.9.6")
16578 (source (origin
16579 (method url-fetch)
16580 (uri (pypi-uri "pyinotify" version))
16581 (sha256
16582 (base32
16583 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
16584 (build-system python-build-system)
16585 (arguments `(#:tests? #f)) ;no tests
16586 (home-page "https://github.com/seb-m/pyinotify")
16587 (synopsis "Python library for monitoring inotify events")
16588 (description
16589 "@code{pyinotify} provides a Python interface for monitoring
16590 file system events on Linux.")
16591 (license license:expat)))
16592
16593 (define-public python2-pyinotify
16594 (package-with-python2 python-pyinotify))
16595
16596 ;; Ada parser uses this version.
16597 (define-public python2-quex-0.67.3
16598 (package
16599 (name "python2-quex")
16600 (version "0.67.3")
16601 (source
16602 (origin
16603 (method url-fetch)
16604 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
16605 (version-major+minor version)
16606 "/quex-" version ".zip"))
16607 (sha256
16608 (base32
16609 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
16610 (build-system python-build-system)
16611 (native-inputs
16612 `(("unzip" ,unzip)))
16613 (arguments
16614 `(#:python ,python-2
16615 #:tests? #f
16616 #:phases
16617 (modify-phases %standard-phases
16618 (delete 'configure)
16619 (delete 'build)
16620 (replace 'install
16621 (lambda* (#:key outputs #:allow-other-keys)
16622 (let* ((out (assoc-ref outputs "out"))
16623 (share/quex (string-append out "/share/quex"))
16624 (bin (string-append out "/bin")))
16625 (copy-recursively "." share/quex)
16626 (mkdir-p bin)
16627 (symlink (string-append share/quex "/quex-exe.py")
16628 (string-append bin "/quex"))
16629 #t))))))
16630 (native-search-paths
16631 (list (search-path-specification
16632 (variable "QUEX_PATH")
16633 (files '("share/quex")))))
16634 (home-page "http://quex.sourceforge.net/")
16635 (synopsis "Lexical analyzer generator in Python")
16636 (description "@code{quex} is a lexical analyzer generator in Python.")
16637 (license license:lgpl2.1+))) ; Non-military
16638
16639 (define-public python2-quex
16640 (package (inherit python2-quex-0.67.3)
16641 (name "python2-quex")
16642 (version "0.68.1")
16643 (source
16644 (origin
16645 (method url-fetch)
16646 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
16647 (sha256
16648 (base32
16649 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
16650 (file-name (string-append name "-" version ".tar.gz"))))))
16651
16652 (define-public python-more-itertools
16653 (package
16654 (name "python-more-itertools")
16655 (version "8.2.0")
16656 (source
16657 (origin
16658 (method url-fetch)
16659 (uri (pypi-uri "more-itertools" version))
16660 (sha256
16661 (base32
16662 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
16663 (build-system python-build-system)
16664 (home-page "https://github.com/erikrose/more-itertools")
16665 (synopsis "More routines for operating on iterables, beyond itertools")
16666 (description "Python's built-in @code{itertools} module implements a
16667 number of iterator building blocks inspired by constructs from APL, Haskell,
16668 and SML. @code{more-itertools} includes additional building blocks for
16669 working with iterables.")
16670 (properties `((python2-variant . ,(delay python2-more-itertools))))
16671 (license license:expat)))
16672
16673 ;; The 5.x series are the last versions supporting Python 2.7.
16674 (define-public python2-more-itertools
16675 (package
16676 (inherit python-more-itertools)
16677 (name "python2-more-itertools")
16678 (version "5.0.0")
16679 (source (origin
16680 (method url-fetch)
16681 (uri (pypi-uri "more-itertools" version))
16682 (sha256
16683 (base32
16684 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
16685 (arguments
16686 `(#:python ,python-2))
16687 (propagated-inputs
16688 `(("python2-six" ,python2-six-bootstrap)))))
16689
16690 (define-public python-latexcodec
16691 (package
16692 (name "python-latexcodec")
16693 (version "1.0.7")
16694 (source
16695 (origin
16696 (method url-fetch)
16697 (uri (pypi-uri "latexcodec" version))
16698 (sha256
16699 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
16700 (build-system python-build-system)
16701 (inputs
16702 `(("python-six" ,python-six)))
16703 (home-page "https://readthedocs.org/projects/latexcodec/")
16704 (synopsis "Work with LaTeX code in Python")
16705 (description "Lexer and codec to work with LaTeX code in Python.")
16706 (license license:expat)))
16707
16708 (define-public python-pybtex
16709 (package
16710 (name "python-pybtex")
16711 (version "0.22.2")
16712 (source
16713 (origin
16714 (method url-fetch)
16715 (uri (pypi-uri "pybtex" version))
16716 (sha256
16717 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
16718 (build-system python-build-system)
16719 (native-inputs
16720 `(("python-nose" ,python-nose)))
16721 (inputs
16722 `(("python-latexcodec" ,python-latexcodec)
16723 ("python-pyyaml" ,python-pyyaml)
16724 ("python-six" ,python-six)))
16725 (arguments
16726 `(#:test-target "nosetests"))
16727 (home-page "https://pybtex.org/")
16728 (synopsis "BibTeX-compatible bibliography processor")
16729 (description "Pybtex is a BibTeX-compatible bibliography processor written
16730 in Python. You can simply type pybtex instead of bibtex.")
16731 (license license:expat)))
16732
16733 (define-public python-onetimepass
16734 (package
16735 (name "python-onetimepass")
16736 (version "1.0.1")
16737 (source
16738 (origin
16739 (method url-fetch)
16740 (uri (pypi-uri "onetimepass" version))
16741 (sha256
16742 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
16743 (build-system python-build-system)
16744 (propagated-inputs `(("python-six" ,python-six)))
16745 (home-page "https://github.com/tadeck/onetimepass/")
16746 (synopsis "One-time password library")
16747 (description "Python one-time password library for HMAC-based (HOTP) and
16748 time-based (TOTP) passwords.")
16749 (license license:expat)))
16750
16751 (define-public python-parso
16752 (package
16753 (name "python-parso")
16754 (version "0.7.0")
16755 (source
16756 (origin
16757 (method url-fetch)
16758 (uri (pypi-uri "parso" version))
16759 (sha256
16760 (base32
16761 "0b7irps2dqmzq41sxbpvxbivhh1x2hwmbqp45bbpd82446p9z3lh"))))
16762 (native-inputs
16763 `(("python-pytest" ,python-pytest)))
16764 (build-system python-build-system)
16765 (arguments
16766 `(#:phases (modify-phases %standard-phases
16767 (replace 'check
16768 (lambda _ (invoke "pytest" "-vv"))))))
16769 (home-page "https://github.com/davidhalter/parso")
16770 (synopsis "Python Parser")
16771 (description "Parso is a Python parser that supports error recovery and
16772 round-trip parsing for different Python versions (in multiple Python versions).
16773 Parso is also able to list multiple syntax errors in your Python file.")
16774 (license license:expat)))
16775
16776 (define-public python2-parso
16777 (package-with-python2 python-parso))
16778
16779 (define-public python-async-generator
16780 (package
16781 (name "python-async-generator")
16782 (version "1.10")
16783 (source
16784 (origin
16785 (method url-fetch)
16786 (uri (pypi-uri "async_generator" version))
16787 (sha256
16788 (base32
16789 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
16790 (build-system python-build-system)
16791 (native-inputs
16792 `(("python-pytest" ,python-pytest)))
16793 (home-page "https://github.com/python-trio/async_generator")
16794 (synopsis "Async generators and context managers for Python 3.5+")
16795 (description "@code{async_generator} back-ports Python 3.6's native async
16796 generators and Python 3.7's context managers into Python 3.5.")
16797 ;; Dual licensed.
16798 (license (list license:expat license:asl2.0))))
16799
16800 (define-public python-async-timeout
16801 (package
16802 (name "python-async-timeout")
16803 (version "3.0.1")
16804 (source
16805 (origin
16806 (method url-fetch)
16807 (uri (pypi-uri "async-timeout" version))
16808 (sha256
16809 (base32
16810 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
16811 (build-system python-build-system)
16812 (home-page "https://github.com/aio-libs/async_timeout/")
16813 (synopsis "Timeout context manager for asyncio programs")
16814 (description "@code{async-timeout} provides a timeout timeout context
16815 manager compatible with @code{asyncio}.")
16816 (license license:asl2.0)))
16817
16818 (define-public python-glob2
16819 (package
16820 (name "python-glob2")
16821 (version "0.7")
16822 (source
16823 (origin
16824 (method git-fetch)
16825 (uri (git-reference
16826 (url "https://github.com/miracle2k/python-glob2.git")
16827 (commit (string-append "v" version))))
16828 (file-name (git-file-name name version))
16829 (sha256
16830 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
16831 (build-system python-build-system)
16832 (home-page "https://github.com/miracle2k/python-glob2/")
16833 (synopsis "Extended Version of the python buildin glob module")
16834 (description "This is an extended version of the Python
16835 @url{http://docs.python.org/library/glob.html, built-in glob module} which
16836 adds:
16837
16838 @itemize
16839 @item The ability to capture the text matched by glob patterns, and return
16840 those matches alongside the file names.
16841 @item A recursive @code{**} globbing syntax, akin for example to the
16842 @code{globstar} option of Bash.
16843 @item The ability to replace the file system functions used, in order to glob
16844 on virtual file systems.
16845 @item Compatible with Python 2 and Python 3 (tested with 3.3).
16846 @end itemize
16847
16848 Glob2 currently based on the glob code from Python 3.3.1.")
16849 (license license:bsd-2)))
16850
16851 (define-public python2-glob2
16852 (package-with-python2 python-glob2))
16853
16854 (define-public python-gipc
16855 (package
16856 (name "python-gipc")
16857 (version "0.6.0")
16858 (source
16859 (origin
16860 (method url-fetch)
16861 (uri (pypi-uri "gipc" version ".zip"))
16862 (sha256
16863 (base32
16864 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
16865 (build-system python-build-system)
16866 (native-inputs
16867 `(("unzip" ,unzip)))
16868 (propagated-inputs
16869 `(("python-gevent" ,python-gevent)))
16870 (home-page "https://gehrcke.de/gipc/")
16871 (synopsis "Child process management in the context of gevent")
16872 (description "Usage of Python's multiprocessing package in a
16873 gevent-powered application may raise problems. With @code{gipc},
16874 process-based child processes can safely be created anywhere within a
16875 gevent-powered application.")
16876 (license license:expat)))
16877
16878 (define-public python2-gipc
16879 (package-with-python2 python-gipc))
16880
16881 (define-public python-fusepy
16882 (package
16883 (name "python-fusepy")
16884 (version "2.0.4")
16885 (source
16886 (origin
16887 (method url-fetch)
16888 (uri (pypi-uri "fusepy" version))
16889 (sha256
16890 (base32
16891 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
16892 (build-system python-build-system)
16893 (arguments
16894 `(#:phases
16895 (modify-phases %standard-phases
16896 (add-before 'build 'set-library-file-name
16897 (lambda* (#:key inputs #:allow-other-keys)
16898 (let ((fuse (assoc-ref inputs "fuse")))
16899 (substitute* "fuse.py"
16900 (("find_library\\('fuse'\\)")
16901 (string-append "'" fuse "/lib/libfuse.so'")))
16902 #t))))))
16903 (propagated-inputs
16904 `(("fuse" ,fuse)))
16905 (home-page "https://github.com/fusepy/fusepy")
16906 (synopsis "Simple ctypes bindings for FUSE")
16907 (description "Python module that provides a simple interface to FUSE and
16908 MacFUSE. The binding is created using the standard @code{ctypes} library.")
16909 (license license:isc)))
16910
16911 (define-public python2-fusepy
16912 (package-with-python2 python-fusepy))
16913
16914 (define-public python-fusepyng
16915 (package
16916 (name "python-fusepyng")
16917 (version "1.0.7")
16918 (source
16919 (origin
16920 (method url-fetch)
16921 (uri (pypi-uri "fusepyng" version))
16922 (sha256
16923 (base32
16924 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
16925 (build-system python-build-system)
16926 (arguments
16927 '(#:phases
16928 (modify-phases %standard-phases
16929 (add-after 'unpack 'set-libfuse-path
16930 (lambda* (#:key inputs #:allow-other-keys)
16931 (let ((fuse (assoc-ref inputs "fuse")))
16932 (substitute* "fusepyng.py"
16933 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
16934 (string-append "\"" fuse "/lib/libfuse.so\""))))
16935 #t)))))
16936 (inputs
16937 `(("fuse" ,fuse)))
16938 (propagated-inputs
16939 `(("python-paramiko" ,python-paramiko)))
16940 (home-page "https://github.com/rianhunter/fusepyng")
16941 (synopsis "Simple ctypes bindings for FUSE")
16942 (description "@code{fusepyng} is a Python module that provides a simple
16943 interface to FUSE on various operating systems. It's just one file and is
16944 implemented using @code{ctypes}.")
16945 (license license:isc)))
16946
16947 (define-public python2-gdrivefs
16948 (package
16949 (name "python2-gdrivefs")
16950 (version "0.14.9")
16951 (source
16952 (origin
16953 (method url-fetch)
16954 (uri (pypi-uri "gdrivefs" version))
16955 (sha256
16956 (base32
16957 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
16958 (build-system python-build-system)
16959 (arguments
16960 `(#:python ,python-2
16961 #:phases
16962 (modify-phases %standard-phases
16963 (add-before 'build 'patch-setup-py
16964 (lambda _
16965 ;; Update requirements from dependency==version
16966 ;; to dependency>=version
16967 (substitute* "gdrivefs/resources/requirements.txt"
16968 (("==") ">="))
16969 #t)))))
16970 (native-inputs
16971 `(("python2-gipc" ,python2-gipc)
16972 ("python2-gevent" ,python2-gevent)
16973 ("python2-greenlet" ,python2-greenlet)
16974 ("python2-httplib2" ,python2-httplib2)
16975 ("python2-uritemplate" ,python2-uritemplate)
16976 ("python2-oauth2client" ,python2-oauth2client)
16977 ("python2-six" ,python2-six)))
16978 (propagated-inputs
16979 `(("python2-dateutil" ,python2-dateutil)
16980 ("python2-fusepy" ,python2-fusepy)
16981 ("python2-google-api-client" ,python2-google-api-client)))
16982 (home-page "https://github.com/dsoprea/GDriveFS")
16983 (synopsis "Mount Google Drive as a local file system")
16984 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
16985 under Python 2.7.")
16986 (license license:gpl2)))
16987
16988 (define-public python-userspacefs
16989 (package
16990 (name "python-userspacefs")
16991 (version "1.0.13")
16992 (source
16993 (origin
16994 (method url-fetch)
16995 (uri (pypi-uri "userspacefs" version))
16996 (sha256
16997 (base32
16998 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
16999 (build-system python-build-system)
17000 (propagated-inputs
17001 `(("python-fusepyng" ,python-fusepyng)))
17002 (home-page "https://github.com/rianhunter/userspacefs")
17003 (synopsis "User-space file systems for Python")
17004 (description
17005 "@code{userspacefs} is a library that allows you to easily write
17006 user-space file systems in Python.")
17007 (license license:gpl3+)))
17008
17009 (define-public pybind11
17010 (package
17011 (name "pybind11")
17012 (version "2.4.3")
17013 (source (origin
17014 (method git-fetch)
17015 (uri (git-reference
17016 (url "https://github.com/pybind/pybind11.git")
17017 (commit (string-append "v" version))))
17018 (sha256
17019 (base32
17020 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
17021 (file-name (git-file-name name version))))
17022 (build-system cmake-build-system)
17023 (native-inputs
17024 `(("python" ,python-wrapper)
17025
17026 ;; The following dependencies are used for tests.
17027 ("python-pytest" ,python-pytest)
17028 ("catch" ,catch-framework2-1)
17029 ("eigen" ,eigen)))
17030 (arguments
17031 `(#:configure-flags
17032 (list (string-append "-DCATCH_INCLUDE_DIR="
17033 (assoc-ref %build-inputs "catch")
17034 "/include/catch"))
17035
17036 #:phases (modify-phases %standard-phases
17037 (add-after 'install 'install-python
17038 (lambda* (#:key outputs #:allow-other-keys)
17039 (let ((out (assoc-ref outputs "out")))
17040 (with-directory-excursion "../source"
17041 (setenv "PYBIND11_USE_CMAKE" "yes")
17042 (invoke "python" "setup.py" "install"
17043 "--single-version-externally-managed"
17044 "--root=/"
17045 (string-append "--prefix=" out)))))))
17046
17047 #:test-target "check"))
17048 (home-page "https://github.com/pybind/pybind11/")
17049 (synopsis "Seamless operability between C++11 and Python")
17050 (description
17051 "@code{pybind11} is a lightweight header-only library that exposes C++
17052 types in Python and vice versa, mainly to create Python bindings of existing
17053 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
17054 library: to minimize boilerplate code in traditional extension modules by
17055 inferring type information using compile-time introspection.")
17056 (license license:bsd-3)))
17057
17058 (define-public python-fasteners
17059 (package
17060 (name "python-fasteners")
17061 (version "0.14.1")
17062 (source
17063 (origin
17064 (method url-fetch)
17065 (uri (pypi-uri "fasteners" version))
17066 (sha256
17067 (base32
17068 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
17069 (build-system python-build-system)
17070 (propagated-inputs
17071 `(("python-monotonic" ,python-monotonic)
17072 ("python-six" ,python-six)
17073 ("python-testtools" ,python-testtools)))
17074 (home-page "https://github.com/harlowja/fasteners")
17075 (synopsis "Python package that provides useful locks")
17076 (description
17077 "This package provides a Python program that provides following locks:
17078
17079 @itemize
17080 @item Locking decorator
17081 @item Reader-writer locks
17082 @item Inter-process locks
17083 @item Generic helpers
17084 @end itemize\n")
17085 (properties `((python2-variant . ,(delay python2-fasteners))))
17086 (license license:asl2.0)))
17087
17088 (define-public python2-fasteners
17089 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
17090 (package
17091 (inherit base)
17092 (propagated-inputs
17093 `(("python2-futures" ,python2-futures)
17094 ,@(package-propagated-inputs base))))))
17095
17096 (define-public python-requests-file
17097 (package
17098 (name "python-requests-file")
17099 (version "1.4.3")
17100 (source
17101 (origin
17102 (method url-fetch)
17103 (uri (pypi-uri "requests-file" version))
17104 (sha256
17105 (base32
17106 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
17107 (build-system python-build-system)
17108 (propagated-inputs
17109 `(("python-requests" ,python-requests)
17110 ("python-six" ,python-six)))
17111 (home-page
17112 "https://github.com/dashea/requests-file")
17113 (synopsis "File transport adapter for Requests")
17114 (description
17115 "Requests-File is a transport adapter for use with the Requests Python
17116 library to allow local file system access via @code{file://} URLs.")
17117 (license license:asl2.0)))
17118
17119 (define-public python2-requests-file
17120 (package-with-python2 python-requests-file))
17121
17122 (define-public python-tldextract
17123 (package
17124 (name "python-tldextract")
17125 (version "2.2.0")
17126 (source
17127 (origin
17128 (method url-fetch)
17129 (uri (pypi-uri "tldextract" version))
17130 (sha256
17131 (base32
17132 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
17133 (build-system python-build-system)
17134 (native-inputs
17135 `(("python-pytest" ,python-pytest)
17136 ("python-responses" ,python-responses)))
17137 (propagated-inputs
17138 `(("python-idna" ,python-idna)
17139 ("python-requests" ,python-requests)
17140 ("python-requests-file" ,python-requests-file)))
17141 (home-page
17142 "https://github.com/john-kurkowski/tldextract")
17143 (synopsis
17144 "Separate the TLD from the registered domain and subdomains of a URL")
17145 (description
17146 "TLDExtract accurately separates the TLD from the registered domain and
17147 subdomains of a URL, using the Public Suffix List. By default, this includes
17148 the public ICANN TLDs and their exceptions. It can optionally support the
17149 Public Suffix List's private domains as well.")
17150 (license license:bsd-3)))
17151
17152 (define-public python2-tldextract
17153 (package-with-python2 python-tldextract))
17154
17155 (define-public python-pynamecheap
17156 (package
17157 (name "python-pynamecheap")
17158 (version "0.0.3")
17159 (source
17160 (origin
17161 (method url-fetch)
17162 (uri (pypi-uri "PyNamecheap" version))
17163 (sha256
17164 (base32
17165 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
17166 (build-system python-build-system)
17167 (propagated-inputs
17168 `(("python-requests" ,python-requests)))
17169 (home-page
17170 "https://github.com/Bemmu/PyNamecheap")
17171 (synopsis
17172 "Namecheap API client in Python")
17173 (description
17174 "PyNamecheap is a Namecheap API client in Python.")
17175 (license license:expat)))
17176
17177 (define-public python2-pynamecheap
17178 (package-with-python2 python-pynamecheap))
17179
17180 (define-public python-dns-lexicon
17181 (package
17182 (name "python-dns-lexicon")
17183 (version "2.4.0")
17184 (source
17185 (origin
17186 (method url-fetch)
17187 (uri (pypi-uri "dns-lexicon" version))
17188 (sha256
17189 (base32
17190 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
17191 (build-system python-build-system)
17192 (arguments
17193 `(#:tests? #f)) ;requires internet access
17194 (propagated-inputs
17195 `(("python-future" ,python-future)
17196 ("python-pynamecheap" ,python-pynamecheap)
17197 ("python-requests" ,python-requests)
17198 ("python-tldextract" ,python-tldextract)
17199 ("python-urllib3" ,python-urllib3)))
17200 (home-page "https://github.com/AnalogJ/lexicon")
17201 (synopsis
17202 "Manipulate DNS records on various DNS providers")
17203 (description
17204 "Lexicon provides a way to manipulate DNS records on multiple DNS
17205 providers in a standardized way. It has a CLI but it can also be used as a
17206 Python library. It was designed to be used in automation, specifically with
17207 Let's Encrypt.")
17208 (license license:expat)))
17209
17210 (define-public python2-dns-lexicon
17211 (package-with-python2 python-dns-lexicon))
17212
17213 (define-public python-commandlines
17214 (package
17215 (name "python-commandlines")
17216 (version "0.4.1")
17217 (source
17218 (origin
17219 (method url-fetch)
17220 (uri (pypi-uri "commandlines" version))
17221 (sha256
17222 (base32
17223 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
17224 (build-system python-build-system)
17225 (home-page "https://github.com/chrissimpkins/commandlines")
17226 (synopsis "Command line argument to object parsing library")
17227 (description
17228 "@code{Commandlines} is a Python library for command line application
17229 development that supports command line argument parsing, command string
17230 validation testing and application logic.")
17231 (license license:expat)))
17232
17233 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
17234 ;; python-numba. They have a very unflexible relationship.
17235 (define-public python-numba
17236 (package
17237 (name "python-numba")
17238 (version "0.46.0")
17239 (source
17240 (origin
17241 (method url-fetch)
17242 (uri (pypi-uri "numba" version))
17243 (sha256
17244 (base32
17245 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
17246 (build-system python-build-system)
17247 (arguments
17248 `(#:modules ((guix build utils)
17249 (guix build python-build-system)
17250 (ice-9 ftw)
17251 (srfi srfi-1)
17252 (srfi srfi-26))
17253 #:phases
17254 (modify-phases %standard-phases
17255 (add-after 'unpack 'disable-proprietary-features
17256 (lambda _
17257 (setenv "NUMBA_DISABLE_HSA" "1")
17258 (setenv "NUMBA_DISABLE_CUDA" "1")
17259 #t))
17260 (add-after 'unpack 'remove-failing-tests
17261 (lambda _
17262 ;; FIXME: These tests fail for unknown reasons:
17263 ;; test_non_writable_pycache, test_non_creatable_pycache, and
17264 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
17265 (substitute* "numba/tests/test_dispatcher.py"
17266 (("def test(_non_writable_pycache)" _ m)
17267 (string-append "def guix_skip" m))
17268 (("def test(_non_creatable_pycache)" _ m)
17269 (string-append "def guix_skip" m))
17270 (("def test(_frozen)" _ m)
17271 (string-append "def guix_skip" m)))
17272
17273 ;; These tests fail because we don't run the tests from the build
17274 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
17275 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
17276 (substitute* "numba/tests/test_pycc.py"
17277 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
17278 (string-append "def guix_skip" m)))
17279
17280 ;; These tests fail because our version of Python does not have
17281 ;; a recognizable front-end for the Numba distribution to use
17282 ;; to check against.
17283 (substitute* "numba/tests/test_entrypoints.py"
17284 (("def test(_init_entrypoint)" _ m)
17285 (string-append "def guix_skip" m)))
17286 (substitute* "numba/tests/test_jitclasses.py"
17287 (("def test(_jitclass_longlabel_not_truncated)" _ m)
17288 (string-append "def guix_skip" m)))
17289 #t))
17290 (replace 'check
17291 (lambda _
17292 (let ((cwd (getcwd)))
17293 (setenv "PYTHONPATH"
17294 (string-append cwd "/build/"
17295 (find (cut string-prefix? "lib" <>)
17296 (scandir (string-append cwd "/build")))
17297 ":"
17298 (getenv "PYTHONPATH")))
17299 ;; Something is wrong with the PYTHONPATH when running the
17300 ;; tests from the build directory, as it complains about not being
17301 ;; able to import certain modules.
17302 (with-directory-excursion "/tmp"
17303 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
17304 #t)))))
17305 (propagated-inputs
17306 `(("python-llvmlite" ,python-llvmlite)
17307 ("python-numpy" ,python-numpy)
17308 ("python-singledispatch" ,python-singledispatch)))
17309 ;; Needed for tests.
17310 (inputs
17311 `(("python-jinja2" ,python-jinja2)
17312 ("python-pygments" ,python-pygments)))
17313 (home-page "https://numba.pydata.org")
17314 (synopsis "Compile Python code using LLVM")
17315 (description "Numba gives you the power to speed up your applications with
17316 high performance functions written directly in Python. With a few
17317 annotations, array-oriented and math-heavy Python code can be just-in-time
17318 compiled to native machine instructions, similar in performance to C, C++ and
17319 Fortran, without having to switch languages or Python interpreters.
17320
17321 Numba works by generating optimized machine code using the LLVM compiler
17322 infrastructure at import time, runtime, or statically (using the included pycc
17323 tool).")
17324 (license license:bsd-3)))
17325
17326 (define-public python-numcodecs
17327 (package
17328 (name "python-numcodecs")
17329 (version "0.6.4")
17330 (source
17331 (origin
17332 (method url-fetch)
17333 (uri (pypi-uri "numcodecs" version))
17334 (sha256
17335 (base32
17336 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
17337 (build-system python-build-system)
17338 (propagated-inputs
17339 `(("python-numpy" ,python-numpy)
17340 ("python-msgpack" ,python-msgpack)))
17341 (native-inputs
17342 `(("python-pytest" ,python-pytest)
17343 ("python-setuptools-scm" ,python-setuptools-scm)))
17344 (home-page "https://github.com/zarr-developers/numcodecs")
17345 (synopsis "Buffer compression and transformation codecs")
17346 (description
17347 "This Python package provides buffer compression and transformation
17348 codecs for use in data storage and communication applications.")
17349 (license license:expat)))
17350
17351 (define-public python-asciitree
17352 (package
17353 (name "python-asciitree")
17354 (version "0.3.3")
17355 (source
17356 (origin
17357 (method url-fetch)
17358 (uri (pypi-uri "asciitree" version))
17359 (sha256
17360 (base32
17361 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
17362 (build-system python-build-system)
17363 (home-page "https://github.com/mbr/asciitree")
17364 (synopsis "Draws ASCII trees")
17365 (description "This package draws tree structures using characters.")
17366 (license license:expat)))
17367
17368 (define-public python-zarr
17369 (package
17370 (name "python-zarr")
17371 (version "2.4.0")
17372 (source
17373 (origin
17374 (method url-fetch)
17375 (uri (pypi-uri "zarr" version))
17376 (sha256
17377 (base32
17378 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
17379 (build-system python-build-system)
17380 (arguments
17381 `(#:phases
17382 (modify-phases %standard-phases
17383 (add-after 'unpack 'disable-service-tests
17384 (lambda _
17385 (setenv "ZARR_TEST_ABS" "0")
17386 (setenv "ZARR_TEST_MONGO" "0")
17387 (setenv "ZARR_TEST_REDIS" "0")
17388 #t))
17389 (replace 'check
17390 (lambda _
17391 (invoke "pytest" "-vv" "-k" "not lmdb")
17392 #t)))))
17393 (propagated-inputs
17394 `(("python-asciitree" ,python-asciitree)
17395 ("python-fasteners" ,python-fasteners)
17396 ("python-numcodecs" ,python-numcodecs)
17397 ("python-numpy" ,python-numpy)))
17398 (native-inputs
17399 `(("python-pytest" ,python-pytest)
17400 ("python-setuptools-scm" ,python-setuptools-scm)))
17401 (home-page "https://github.com/zarr-developers/zarr-python")
17402 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
17403 (description
17404 "This package provides an implementation of chunked, compressed,
17405 N-dimensional arrays for Python.")
17406 (license license:expat)))
17407
17408 (define-public python-anndata
17409 (package
17410 (name "python-anndata")
17411 (version "0.7.1")
17412 (source
17413 (origin
17414 (method url-fetch)
17415 (uri (pypi-uri "anndata" version))
17416 (sha256
17417 (base32
17418 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
17419 (build-system python-build-system)
17420 (arguments
17421 `(#:phases
17422 (modify-phases %standard-phases
17423 (add-after 'unpack 'delete-inconvenient-tests
17424 (lambda _
17425 ;; This test depends on python-scikit-learn.
17426 (delete-file "anndata/tests/test_inplace_subset.py")
17427 #t))
17428 (delete 'check)
17429 (add-after 'install 'check
17430 (lambda* (#:key inputs outputs #:allow-other-keys)
17431 (add-installed-pythonpath inputs outputs)
17432 (invoke "pytest" "-vv"))))))
17433 (propagated-inputs
17434 `(("python-h5py" ,python-h5py)
17435 ("python-importlib-metadata" ,python-importlib-metadata)
17436 ("python-natsort" ,python-natsort)
17437 ("python-numcodecs" ,python-numcodecs)
17438 ("python-packaging" ,python-packaging)
17439 ("python-pandas" ,python-pandas)
17440 ("python-scipy" ,python-scipy)
17441 ("python-zarr" ,python-zarr)))
17442 (native-inputs
17443 `(("python-joblib" ,python-joblib)
17444 ("python-pytest" ,python-pytest)
17445 ("python-setuptools-scm" ,python-setuptools-scm)))
17446 (home-page "https://github.com/theislab/anndata")
17447 (synopsis "Annotated data for data analysis pipelines")
17448 (description "Anndata is a package for simple (functional) high-level APIs
17449 for data analysis pipelines. In this context, it provides an efficient,
17450 scalable way of keeping track of data together with learned annotations and
17451 reduces the code overhead typically encountered when using a mostly
17452 object-oriented library such as @code{scikit-learn}.")
17453 (license license:bsd-3)))
17454
17455 (define-public python-dill
17456 (package
17457 (name "python-dill")
17458 (version "0.3.1.1")
17459 (source
17460 (origin
17461 (method url-fetch)
17462 (uri (pypi-uri "dill" version))
17463 (sha256
17464 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
17465 (build-system python-build-system)
17466 (arguments
17467 `(#:phases
17468 (modify-phases %standard-phases
17469 (replace 'check
17470 (lambda _
17471 (with-directory-excursion "/tmp"
17472 (invoke "nosetests" "-v"))
17473 #t)))))
17474 (native-inputs
17475 `(("python-nose" ,python-nose)))
17476 (home-page "https://pypi.org/project/dill/")
17477 (synopsis "Serialize all of Python")
17478 (description "Dill extends Python's @code{pickle} module for serializing
17479 and de-serializing Python objects to the majority of the built-in Python
17480 types. Dill provides the user the same interface as the @code{pickle} module,
17481 and also includes some additional features. In addition to pickling Python
17482 objects, @code{dill} provides the ability to save the state of an interpreter
17483 session in a single command. Hence, it would be feasible to save a
17484 interpreter session, close the interpreter, ship the pickled file to another
17485 computer, open a new interpreter, unpickle the session and thus continue from
17486 the saved state of the original interpreter session.")
17487 (license license:bsd-3)))
17488
17489 (define-public python-multiprocess
17490 (package
17491 (name "python-multiprocess")
17492 (version "0.70.9")
17493 (source
17494 (origin
17495 (method url-fetch)
17496 (uri (pypi-uri "multiprocess" version))
17497 (sha256
17498 (base32
17499 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
17500 (build-system python-build-system)
17501 (arguments
17502 `(#:phases
17503 (modify-phases %standard-phases
17504 (add-after 'unpack 'disable-broken-tests
17505 (lambda _
17506 ;; This test is broken as there is no keyboard interrupt.
17507 (substitute* "py3.7/multiprocess/tests/__init__.py"
17508 (("^(.*)def test_wait_result"
17509 line indent)
17510 (string-append indent
17511 "@unittest.skip(\"Disabled by Guix\")\n"
17512 line)))
17513 #t))
17514 ;; Tests must be run after installation.
17515 (delete 'check)
17516 (add-after 'install 'check
17517 (lambda* (#:key inputs outputs #:allow-other-keys)
17518 (add-installed-pythonpath inputs outputs)
17519 (invoke "python" "-m" "multiprocess.tests")
17520 #t)))))
17521 (propagated-inputs
17522 `(("python-dill" ,python-dill)))
17523 (home-page "https://pypi.org/project/multiprocess/")
17524 (synopsis "Multiprocessing and multithreading in Python")
17525 (description
17526 "This package is a fork of the multiprocessing Python package, a package
17527 which supports the spawning of processes using the API of the standard
17528 library's @code{threading} module.")
17529 (license license:bsd-3)))
17530
17531 (define-public python-toolz
17532 (package
17533 (name "python-toolz")
17534 (version "0.9.0")
17535 (source
17536 (origin
17537 (method url-fetch)
17538 (uri (pypi-uri "toolz" version))
17539 (sha256
17540 (base32
17541 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
17542 (build-system python-build-system)
17543 ;; FIXME: tests cannot be computed: "Can't perform this operation for
17544 ;; unregistered loader type"
17545 (arguments '(#:tests? #f))
17546 (home-page "https://github.com/pytoolz/toolz/")
17547 (synopsis "List processing tools and functional utilities")
17548 (description
17549 "This package provides a set of utility functions for iterators,
17550 functions, and dictionaries.")
17551 (license license:bsd-3)))
17552
17553 (define-public python2-toolz
17554 (package-with-python2 python-toolz))
17555
17556 (define-public python-cytoolz
17557 (package
17558 (name "python-cytoolz")
17559 (version "0.9.0.1")
17560 (source
17561 (origin
17562 (method url-fetch)
17563 (uri (pypi-uri "cytoolz" version))
17564 (sha256
17565 (base32
17566 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
17567 (build-system python-build-system)
17568 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
17569 ;; 'exceptions'"
17570 (arguments '(#:tests? #f))
17571 (propagated-inputs
17572 `(("python-toolz" ,python-toolz)))
17573 (native-inputs
17574 `(("python-cython" ,python-cython)))
17575 (home-page "https://github.com/pytoolz/cytoolz")
17576 (synopsis "High performance functional utilities")
17577 (description
17578 "The cytoolz package implements the same API as provided by toolz. The
17579 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
17580 that is accessible to other projects developed in Cython.")
17581 (license license:bsd-3)))
17582
17583 (define-public python-sortedcontainers
17584 (package
17585 (name "python-sortedcontainers")
17586 (version "2.1.0")
17587 (source
17588 (origin
17589 (method url-fetch)
17590 (uri (pypi-uri "sortedcontainers" version))
17591 (sha256
17592 (base32
17593 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
17594 (build-system python-build-system)
17595 (arguments
17596 ;; FIXME: Tests require many extra dependencies, and would introduce
17597 ;; a circular dependency on hypothesis, which uses this package.
17598 '(#:tests? #f))
17599 (propagated-inputs
17600 `(("python-appdirs" ,python-appdirs)
17601 ("python-distlib" ,python-distlib)
17602 ("python-filelock" ,python-filelock)
17603 ("python-six" ,python-six-bootstrap)))
17604 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
17605 (synopsis "Sorted List, Sorted Dict, Sorted Set")
17606 (description
17607 "This package provides a sorted collections library, written in
17608 pure-Python.")
17609 (license license:asl2.0)))
17610
17611 (define-public python2-sortedcontainers
17612 (package-with-python2 python-sortedcontainers))
17613
17614 (define-public python-cloudpickle
17615 (package
17616 (name "python-cloudpickle")
17617 (version "1.3.0")
17618 (source
17619 (origin
17620 (method url-fetch)
17621 (uri (pypi-uri "cloudpickle" version))
17622 (sha256
17623 (base32
17624 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
17625 (build-system python-build-system)
17626 (arguments
17627 '(#:phases (modify-phases %standard-phases
17628 (add-before 'check 'do-not-override-PYTHONPATH
17629 (lambda _
17630 ;; Append to PYTHONPATH instead of overriding it so
17631 ;; that dependencies from Guix can be found.
17632 (substitute* "tests/testutils.py"
17633 (("env\\['PYTHONPATH'\\] = pythonpath")
17634 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
17635 #t))
17636 (replace 'check
17637 (lambda* (#:key tests? #:allow-other-keys)
17638 (if tests?
17639 (invoke "pytest" "-s" "-vv")
17640 (format #t "test suite not run~%"))
17641 #t)))))
17642 (native-inputs
17643 `(;; For tests.
17644 ("python-psutil" ,python-psutil)
17645 ("python-pytest" ,python-pytest)
17646 ("python-tornado" ,python-tornado)))
17647 (home-page "https://github.com/cloudpipe/cloudpickle")
17648 (synopsis "Extended pickling support for Python objects")
17649 (description
17650 "Cloudpickle makes it possible to serialize Python constructs not
17651 supported by the default pickle module from the Python standard library. It
17652 is especially useful for cluster computing where Python expressions are
17653 shipped over the network to execute on remote hosts, possibly close to the
17654 data.")
17655 (properties `((python2-variant . ,(delay python2-cloudpickle))))
17656 (license license:bsd-3)))
17657
17658 (define-public python2-cloudpickle
17659 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
17660 (package
17661 (inherit base)
17662 (native-inputs
17663 `(("python-mock" ,python2-mock)
17664 ,@(package-native-inputs base)))
17665 (propagated-inputs
17666 `(("python-futures" ,python2-futures)
17667 ,@(package-propagated-inputs base))))))
17668
17669 (define-public python-locket
17670 (package
17671 (name "python-locket")
17672 (version "0.2.0")
17673 (source
17674 (origin
17675 (method url-fetch)
17676 (uri (pypi-uri "locket" version))
17677 (sha256
17678 (base32
17679 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
17680 (build-system python-build-system)
17681 (home-page "https://github.com/mwilliamson/locket.py")
17682 (synopsis "File-based locks for Python")
17683 (description
17684 "Locket implements a lock that can be used by multiple processes provided
17685 they use the same path.")
17686 (license license:bsd-2)))
17687
17688 (define-public python2-locket
17689 (package-with-python2 python-locket))
17690
17691 (define-public python-blosc
17692 (package
17693 (name "python-blosc")
17694 (version "1.5.1")
17695 (source
17696 (origin
17697 (method url-fetch)
17698 (uri (pypi-uri "blosc" version))
17699 (sha256
17700 (base32
17701 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
17702 (build-system python-build-system)
17703 ;; FIXME: all tests pass, but then this error is printed:
17704 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
17705 (arguments '(#:tests? #f))
17706 (propagated-inputs
17707 `(("python-numpy" ,python-numpy)))
17708 (home-page "https://github.com/blosc/python-blosc")
17709 (synopsis "Python wrapper for the Blosc data compressor library")
17710 (description "Blosc is a high performance compressor optimized for binary
17711 data. It has been designed to transmit data to the processor cache faster
17712 than the traditional, non-compressed, direct memory fetch approach via a
17713 @code{memcpy()} system call.
17714
17715 Blosc works well for compressing numerical arrays that contains data with
17716 relatively low entropy, like sparse data, time series, grids with
17717 regular-spaced values, etc.
17718
17719 This Python package wraps the Blosc library.")
17720 (license license:bsd-3)))
17721
17722 (define-public python2-blosc
17723 (package-with-python2 python-blosc))
17724
17725 (define-public python-partd
17726 (package
17727 (name "python-partd")
17728 (version "0.3.9")
17729 (source
17730 (origin
17731 (method url-fetch)
17732 (uri (pypi-uri "partd" version))
17733 (sha256
17734 (base32
17735 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
17736 (build-system python-build-system)
17737 (propagated-inputs
17738 `(("python-blosc" ,python-blosc)
17739 ("python-locket" ,python-locket)
17740 ("python-numpy" ,python-numpy)
17741 ("python-pandas" ,python-pandas)
17742 ("python-pyzmq" ,python-pyzmq)
17743 ("python-toolz" ,python-toolz)))
17744 (home-page "https://github.com/dask/partd/")
17745 (synopsis "Appendable key-value storage")
17746 (description "Partd stores key-value pairs. Values are raw bytes. We
17747 append on old values. Partd excels at shuffling operations.")
17748 (license license:bsd-3)))
17749
17750 (define-public python2-partd
17751 (package-with-python2 python-partd))
17752
17753 (define-public python-fsspec
17754 (package
17755 (name "python-fsspec")
17756 (version "0.6.1")
17757 (source
17758 (origin
17759 (method url-fetch)
17760 (uri (pypi-uri "fsspec" version))
17761 (sha256
17762 (base32
17763 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
17764 (build-system python-build-system)
17765 (arguments '(#:tests? #f)) ; there are none
17766 (home-page "https://github.com/intake/filesystem_spec")
17767 (synopsis "File-system specification")
17768 (description "The purpose of this package is to produce a template or
17769 specification for a file-system interface, that specific implementations
17770 should follow, so that applications making use of them can rely on a common
17771 behavior and not have to worry about the specific internal implementation
17772 decisions with any given backend.")
17773 (license license:bsd-3)))
17774
17775 (define-public python-dask
17776 (package
17777 (name "python-dask")
17778 (version "2.14.0")
17779 (source
17780 (origin
17781 (method url-fetch)
17782 (uri (pypi-uri "dask" version))
17783 (sha256
17784 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
17785 (build-system python-build-system)
17786 (arguments
17787 `(#:phases
17788 (modify-phases %standard-phases
17789 (add-after 'unpack 'disable-broken-tests
17790 (lambda _
17791 ;; This test is marked as xfail when pytest-xdist is used.
17792 (substitute* "dask/tests/test_threaded.py"
17793 (("def test_interrupt\\(\\)" m)
17794 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
17795 m)))
17796 ;; This one fails with a type error:
17797 ;; TypeError: Already tz-aware, use tz_convert to convert.
17798 (substitute* "dask/dataframe/tests/test_shuffle.py"
17799 (("def test_set_index_timestamp\\(\\)" m)
17800 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
17801 m)))
17802 #t))
17803 (replace 'check
17804 (lambda _ (invoke "pytest" "-vv"))))))
17805 (propagated-inputs
17806 `(("python-cloudpickle" ,python-cloudpickle)
17807 ("python-fsspec" ,python-fsspec)
17808 ("python-numpy" ,python-numpy)
17809 ("python-packaging" ,python-packaging)
17810 ("python-pandas" ,python-pandas)
17811 ("python-partd" ,python-partd)
17812 ("python-toolz" ,python-toolz)
17813 ("python-pyyaml" ,python-pyyaml)))
17814 (native-inputs
17815 `(("python-pytest" ,python-pytest)
17816 ("python-pytest-runner" ,python-pytest-runner)))
17817 (home-page "https://github.com/dask/dask/")
17818 (synopsis "Parallel computing with task scheduling")
17819 (description
17820 "Dask is a flexible parallel computing library for analytics. It
17821 consists of two components: dynamic task scheduling optimized for computation,
17822 and large data collections like parallel arrays, dataframes, and lists that
17823 extend common interfaces like NumPy, Pandas, or Python iterators to
17824 larger-than-memory or distributed environments. These parallel collections
17825 run on top of the dynamic task schedulers. ")
17826 (license license:bsd-3)))
17827
17828 (define-public python-ilinkedlist
17829 (package
17830 (name "python-ilinkedlist")
17831 (version "0.4.0")
17832 (source
17833 (origin
17834 (method url-fetch)
17835 (uri (pypi-uri "ilinkedlist" version))
17836 (sha256
17837 (base32
17838 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
17839 (build-system python-build-system)
17840 (native-inputs `(("python-pytest" ,python-pytest)))
17841 (inputs `(("python" ,python)))
17842 (home-page "https://github.com/luther9/ilinkedlist-py")
17843 (synopsis "Immutable linked list library")
17844 (description
17845 "This is a implementation of immutable linked lists for Python. It
17846 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
17847 Since a linked list is treated as immutable, it is hashable, and its length
17848 can be retrieved in constant time. Some of the terminology is inspired by
17849 LISP. It is possible to create an improper list by creating a @code{Pair}
17850 with a non-list @code{cdr}.")
17851 (license license:gpl3+)))
17852
17853 (define-public python-readlike
17854 (package
17855 (name "python-readlike")
17856 (version "0.1.3")
17857 (source
17858 (origin
17859 (method url-fetch)
17860 (uri (pypi-uri "readlike" version))
17861 (sha256
17862 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
17863 (build-system python-build-system)
17864 (home-page "https://github.com/jangler/readlike")
17865 (synopsis "GNU Readline-like line editing module")
17866 (description
17867 "This Python module provides line editing functions similar to the default
17868 Emacs-style ones of GNU Readline. Unlike the Python standard library's
17869 @code{readline} package, this one allows access to those capabilties in settings
17870 outside of a standard command-line interface. It is especially well-suited to
17871 interfacing with Urwid, due to a shared syntax for describing key inputs.
17872
17873 Currently, all stateless Readline commands are implemented. Yanking and history
17874 are not supported.")
17875 (license license:expat)))
17876
17877 (define-public python2-readlike
17878 (package-with-python2 python-readlike))
17879
17880 (define-public python-reparser
17881 (package
17882 (name "python-reparser")
17883 (version "1.4.3")
17884 (source
17885 (origin
17886 (method url-fetch)
17887 (uri (pypi-uri "ReParser" version))
17888 (sha256
17889 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
17890 (build-system python-build-system)
17891 (home-page "https://github.com/xmikos/reparser")
17892 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
17893 (description
17894 "This Python library provides a simple lexer/parser for inline markup based
17895 on regular expressions.")
17896 (license license:expat)))
17897
17898 (define-public python2-reparser
17899 (let ((reparser (package-with-python2
17900 (strip-python2-variant python-reparser))))
17901 (package (inherit reparser)
17902 (propagated-inputs
17903 `(("python2-enum34" ,python2-enum34)
17904 ,@(package-propagated-inputs reparser))))))
17905
17906 (define-public python-retrying
17907 (package
17908 (name "python-retrying")
17909 (version "1.3.3")
17910 (source
17911 (origin
17912 (method git-fetch)
17913 (uri (git-reference
17914 (url "https://github.com/rholder/retrying.git")
17915 (commit (string-append "v" version))))
17916 (file-name (git-file-name name version))
17917 (sha256
17918 (base32
17919 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
17920 (build-system python-build-system)
17921 (propagated-inputs
17922 `(("python-six" ,python-six)))
17923 (home-page "https://github.com/rholder/retrying")
17924 (synopsis "Library for adding retry behavior")
17925 (description "Retrying is a general-purpose retrying library to simplify
17926 the task of adding retry behavior to just about anything.
17927
17928 Features:
17929
17930 @itemize
17931 @item Generic Decorator API.
17932 @item Specify stop condition (i.e. limit by number of attempts).
17933 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
17934 @item Customize retrying on Exceptions.
17935 @item Customize retrying on expected returned result.
17936 @end itemize")
17937 (license license:asl2.0)))
17938
17939 (define-public python-precis-i18n
17940 (package
17941 (name "python-precis-i18n")
17942 (version "1.0.0")
17943 (source
17944 (origin
17945 (method url-fetch)
17946 (uri (pypi-uri "precis_i18n" version))
17947 (sha256
17948 (base32
17949 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
17950 (build-system python-build-system)
17951 (home-page "https://github.com/byllyfish/precis_i18n")
17952 (synopsis "Implementation of the PRECIS framework")
17953 (description
17954 "This module implements the PRECIS Framework as described in RFC 8264,
17955 RFC 8265 and RFC 8266.")
17956 (license license:expat)))
17957
17958 (define-public python-absl-py
17959 (package
17960 (name "python-absl-py")
17961 (version "0.6.1")
17962 (source
17963 (origin
17964 (method url-fetch)
17965 (uri (pypi-uri "absl-py" version))
17966 (sha256
17967 (base32
17968 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
17969 (build-system python-build-system)
17970 (propagated-inputs
17971 `(("python-six" ,python-six)))
17972 (home-page "https://github.com/abseil/abseil-py")
17973 (synopsis "Abseil Python common libraries")
17974 (description
17975 "This package provides the Abseil Python Common Libraries, a collection
17976 of Python libraries for building Python applications.")
17977 (license license:asl2.0)))
17978
17979 (define-public python-astor
17980 (package
17981 (name "python-astor")
17982 (version "0.7.1")
17983 (source
17984 (origin
17985 (method url-fetch)
17986 (uri (pypi-uri "astor" version))
17987 (sha256
17988 (base32
17989 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
17990 (build-system python-build-system)
17991 ;; FIXME: There are two errors and two test failures.
17992 (arguments `(#:tests? #f))
17993 (home-page "https://github.com/berkerpeksag/astor")
17994 (synopsis "Read and write Python ASTs")
17995 (description "Astor is designed to allow easy manipulation of Python
17996 source via the Abstract Syntax Tree.")
17997 (license license:bsd-3)))
17998
17999 (define-public python2-astor
18000 (package-with-python2 python-astor))
18001
18002 (define-public python-astunparse
18003 (package
18004 (name "python-astunparse")
18005 (version "1.6.2")
18006 (source
18007 (origin
18008 (method url-fetch)
18009 (uri (pypi-uri "astunparse" version))
18010 (sha256
18011 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
18012 (build-system python-build-system)
18013 (arguments '(#:tests? #f)) ; there are none
18014 (propagated-inputs
18015 `(("python-six" ,python-six)
18016 ("python-wheel" ,python-wheel)))
18017 (home-page "https://github.com/simonpercivall/astunparse")
18018 (synopsis "AST unparser for Python")
18019 (description "This package provides an AST unparser for Python. It is a
18020 factored out version of @code{unparse} found in the Python source
18021 distribution.")
18022 (license license:bsd-3)))
18023
18024 (define-public python-gast
18025 (package
18026 (name "python-gast")
18027 (version "0.3.3")
18028 (source
18029 (origin
18030 (method url-fetch)
18031 (uri (pypi-uri "gast" version))
18032 (sha256
18033 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
18034 (build-system python-build-system)
18035 (propagated-inputs
18036 `(("python-astunparse" ,python-astunparse)))
18037 (home-page "https://pypi.org/project/gast/")
18038 (synopsis "Generic Python AST that abstracts the underlying Python version")
18039 (description
18040 "GAST provides a compatibility layer between the AST of various Python
18041 versions, as produced by @code{ast.parse} from the standard @code{ast}
18042 module.")
18043 (license license:bsd-3)))
18044
18045 (define-public python-wikidata
18046 (package
18047 (name "python-wikidata")
18048 (version "0.6.1")
18049 (source
18050 (origin
18051 (method url-fetch)
18052 (uri (pypi-uri "Wikidata" version))
18053 (sha256
18054 (base32
18055 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
18056 (build-system python-build-system)
18057 (propagated-inputs
18058 `(("python-babel" ,python-babel)))
18059 (home-page "https://github.com/dahlia/wikidata")
18060 (synopsis "Wikidata client library")
18061 (description
18062 "This package provides a Python interface to
18063 @url{https://www.wikidata.org/, Wikidata}.")
18064 (properties '((upstream-name . "Wikidata")))
18065 (license license:gpl3+)))
18066
18067 (define-public python-doctest-ignore-unicode
18068 (package
18069 (name "python-doctest-ignore-unicode")
18070 (version "0.1.2")
18071 (source
18072 (origin
18073 (method url-fetch)
18074 (uri (pypi-uri "doctest-ignore-unicode" version))
18075 (sha256
18076 (base32
18077 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
18078 (build-system python-build-system)
18079 (native-inputs
18080 `(("python-nose" ,python-nose)))
18081 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
18082 (synopsis "Ignore Unicode literal prefixes in doctests")
18083 (description
18084 "This package adds support for a flag to ignore Unicode literal prefixes
18085 in doctests.")
18086 (license license:asl2.0)))
18087
18088 (define-public python-attr
18089 (package
18090 (name "python-attr")
18091 (version "0.3.1")
18092 (source
18093 (origin
18094 (method url-fetch)
18095 (uri (pypi-uri "attr" version))
18096 (sha256
18097 (base32
18098 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
18099 (build-system python-build-system)
18100 (home-page "https://github.com/denis-ryzhkov/attr")
18101 (synopsis "Decorator for attributes of target function or class")
18102 (description "Simple decorator to set attributes of target function or
18103 class in a @acronym{DRY, Don't Repeat Yourself} way.")
18104 (license license:expat)))
18105
18106 (define-public python-construct
18107 (package
18108 (name "python-construct")
18109 (version "2.10.56")
18110 (source
18111 (origin
18112 (method url-fetch)
18113 (uri (pypi-uri "construct" version))
18114 (sha256
18115 (base32
18116 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
18117 (build-system python-build-system)
18118 (arguments
18119 `(#:tests? #f)) ; No tests exist.
18120 (propagated-inputs
18121 `(("python-extras" ,python-extras)
18122 ("python-arrow" ,python-arrow)
18123 ("python-numpy" ,python-numpy)
18124 ("python-ruamel.yaml" ,python-ruamel.yaml)))
18125 (home-page "https://construct.readthedocs.io")
18126 (synopsis "Declarative and symmetrical parser and builder for binary data")
18127 (description
18128 "This package provides both simple, atomic constructs (such as
18129 integers of various sizes), as well as composite ones which allow you
18130 form hierarchical and sequential structures of increasing complexity.
18131 It features bit and byte granularity, easy debugging and testing, an
18132 easy-to-extend subclass system, and lots of primitive constructs to
18133 make your work easier.")
18134 (license license:expat)))
18135
18136 (define-public python-humanize
18137 (package
18138 (name "python-humanize")
18139 (version "0.5.1")
18140 (source
18141 (origin
18142 (method url-fetch)
18143 (uri (pypi-uri "humanize" version))
18144 (sha256
18145 (base32
18146 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
18147 (arguments
18148 '(#:tests? #f)) ; tests not in pypi archive
18149 (build-system python-build-system)
18150 (home-page "https://github.com/jmoiron/humanize")
18151 (synopsis "Print numerical information in a human-readable form")
18152 (description "This package provides a Python module that displays numbers
18153 and dates in \"human readable\" forms. For example, it would display
18154 \"12345591313\" as \"12.3 billion\".")
18155 (license license:expat)))
18156
18157 (define-public python-txaio
18158 (package
18159 (name "python-txaio")
18160 (version "18.8.1")
18161 (source
18162 (origin
18163 (method url-fetch)
18164 (uri (pypi-uri "txaio" version))
18165 (sha256
18166 (base32
18167 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
18168 (build-system python-build-system)
18169 (propagated-inputs
18170 `(("python-twisted" ,python-twisted)
18171 ("python-six" ,python-six)))
18172 (home-page "https://github.com/crossbario/txaio")
18173 (synopsis "Compatibility layer between Python asyncio and Twisted")
18174 (description "Txaio provides a compatibility layer between the Python
18175 @code{asyncio} module and @code{Twisted}.")
18176 (license license:expat)))
18177
18178 (define-public python-toolshed
18179 (package
18180 (name "python-toolshed")
18181 (version "0.4.6")
18182 (source
18183 (origin
18184 (method url-fetch)
18185 (uri (pypi-uri "toolshed" version))
18186 (sha256
18187 (base32
18188 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
18189 (build-system python-build-system)
18190 (native-inputs
18191 `(("python-nose" ,python-nose)))
18192 (home-page "https://github.com/brentp/toolshed/")
18193 (synopsis "Collection of modules and functions for working with data")
18194 (description "This is a collection of well-tested, simple modules and
18195 functions that aim to reduce boilerplate when working with data.")
18196 (license license:bsd-2)))
18197
18198 (define-public python-annoy
18199 (package
18200 (name "python-annoy")
18201 (version "1.15.1")
18202 (source
18203 (origin
18204 (method url-fetch)
18205 (uri (pypi-uri "annoy" version))
18206 (sha256
18207 (base32
18208 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
18209 (build-system python-build-system)
18210 (native-inputs
18211 `(("python-nose" ,python-nose)))
18212 (home-page "https://github.com/spotify/annoy/")
18213 (synopsis "Approximate nearest neighbors library")
18214 (description
18215 "Annoy is a C++ library with Python bindings to search for points in
18216 space that are close to a given query point. It also creates large read-only
18217 file-based data structures that are @code{mmap}ped into memory so that many
18218 processes may share the same data.")
18219 (license license:asl2.0)))
18220
18221 (define-public python-pylzma
18222 (package
18223 (name "python-pylzma")
18224 (version "0.5.0")
18225 (source
18226 (origin
18227 (method url-fetch)
18228 (uri (pypi-uri "pylzma" version))
18229 (sha256
18230 (base32
18231 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
18232 (build-system python-build-system)
18233 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
18234 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
18235 (description "This package provides Python bindings for the LZMA library
18236 by Igor Pavlov.")
18237 (license license:lgpl2.1+)))
18238
18239 (define-public python2-pylzma
18240 (package-with-python2 python-pylzma))
18241
18242 (define-public python2-zeroconf
18243 (package
18244 (name "python2-zeroconf")
18245
18246 ;; This is the last version that supports Python 2.x.
18247 (version "0.19.1")
18248 (source
18249 (origin
18250 (method url-fetch)
18251 (uri (pypi-uri "zeroconf" version))
18252 (sha256
18253 (base32
18254 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
18255 (build-system python-build-system)
18256 (arguments
18257 `(#:python ,python-2
18258 #:phases
18259 (modify-phases %standard-phases
18260 (add-after 'unpack 'patch-requires
18261 (lambda* (#:key inputs #:allow-other-keys)
18262 (substitute* "setup.py"
18263 (("enum-compat")
18264 "enum34"))
18265 #t)))))
18266 (native-inputs
18267 `(("python2-six" ,python2-six)
18268 ("python2-enum32" ,python2-enum34)
18269 ("python2-netifaces" ,python2-netifaces)
18270 ("python2-typing" ,python2-typing)))
18271 (home-page "https://github.com/jstasiak/python-zeroconf")
18272 (synopsis "Pure Python mDNS service discovery")
18273 (description
18274 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
18275 compatible).")
18276 (license license:lgpl2.1+)))
18277
18278 (define-public python-bsddb3
18279 (package
18280 (name "python-bsddb3")
18281 (version "6.2.6")
18282 (source
18283 (origin
18284 (method url-fetch)
18285 (uri (pypi-uri "bsddb3" version))
18286 (sha256
18287 (base32
18288 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
18289 (build-system python-build-system)
18290 (inputs
18291 `(("bdb" ,bdb)))
18292 (arguments
18293 '(#:phases
18294 (modify-phases %standard-phases
18295 (add-after 'unpack 'configure-locations
18296 (lambda* (#:key inputs #:allow-other-keys)
18297 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
18298 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
18299 #t))
18300 (replace 'check
18301 (lambda _
18302 (invoke "python3" "test3.py" "-v"))))))
18303 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
18304 (synopsis "Python bindings for Oracle Berkeley DB")
18305 (description
18306 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
18307 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
18308 Transaction objects, and each of these is exposed as a Python type in the
18309 bsddb3.db module. The database objects can use various access methods: btree,
18310 hash, recno, and queue. Complete support of Berkeley DB distributed
18311 transactions. Complete support for Berkeley DB Replication Manager.
18312 Complete support for Berkeley DB Base Replication. Support for RPC.")
18313 (license license:bsd-3)))
18314
18315 (define-public python-dbfread
18316 (package
18317 (name "python-dbfread")
18318 (version "2.0.7")
18319 (source (origin
18320 (method url-fetch)
18321 (uri (pypi-uri "dbfread" version))
18322 (sha256
18323 (base32
18324 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
18325 (build-system python-build-system)
18326 (native-inputs
18327 `(("python-pytest" ,python-pytest)))
18328 (home-page "https://dbfread.readthedocs.io")
18329 (synopsis "Read DBF Files with Python")
18330 (description
18331 "This library reads DBF files and returns the data as native Python data
18332 types for further processing. It is primarily intended for batch jobs and
18333 one-off scripts.")
18334 (license license:expat)))
18335
18336 (define-public python-cached-property
18337 (package
18338 (name "python-cached-property")
18339 (version "1.5.1")
18340 (source
18341 (origin
18342 (method url-fetch)
18343 (uri (pypi-uri "cached-property" version))
18344 (sha256
18345 (base32
18346 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
18347 (build-system python-build-system)
18348 (arguments
18349 `(#:phases
18350 (modify-phases %standard-phases
18351 ;; https://github.com/pydanny/cached-property/issues/131
18352 ;; recent versions of freezegun break one test
18353 (add-after 'unpack 'disable-broken-test
18354 (lambda _
18355 (substitute* "tests/test_cached_property.py"
18356 (("def test_threads_ttl_expiry\\(self\\)" m)
18357 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
18358 " " m)))
18359 #t)))))
18360 (native-inputs
18361 `(("python-freezegun" ,python-freezegun)))
18362 (home-page
18363 "https://github.com/pydanny/cached-property")
18364 (synopsis
18365 "Decorator for caching properties in classes")
18366 (description
18367 "This package provides a decorator which makes caching
18368 time-or-computationally-expensive properties quick and easy and works in Python
18369 2 or 3.")
18370 (license license:bsd-3)))
18371
18372 (define-public python-folium
18373 (package
18374 (name "python-folium")
18375 (version "0.10.1")
18376 (source
18377 (origin
18378 (method url-fetch)
18379 (uri (pypi-uri "folium" version))
18380 (sha256
18381 (base32
18382 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
18383 (build-system python-build-system)
18384 (propagated-inputs
18385 `(("python-branca" ,python-branca)
18386 ("python-jinja2" ,python-jinja2)
18387 ("python-numpy" ,python-numpy)
18388 ("python-requests" ,python-requests)))
18389 (native-inputs
18390 `(("python-pytest" ,python-pytest)))
18391 (home-page "https://github.com/python-visualization/folium")
18392 (synopsis "Make beautiful maps with Leaflet.js & Python")
18393 (description "@code{folium} makes it easy to visualize data that’s been
18394 manipulated in Python on an interactive leaflet map. It enables both the
18395 binding of data to a map for @code{choropleth} visualizations as well as
18396 passing rich vector/raster/HTML visualizations as markers on the map.
18397
18398 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
18399 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
18400 supports Image, Video, GeoJSON and TopoJSON overlays.")
18401 (license license:expat)))
18402
18403 (define-public jube
18404 (package
18405 ;; This is a command-line tool, so no "python-" prefix.
18406 (name "jube")
18407 (version "2.2.2")
18408 (source (origin
18409 (method url-fetch)
18410 (uri (string-append
18411 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
18412 version))
18413 (sha256
18414 (base32
18415 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
18416 (file-name (string-append "jube-" version ".tar.gz"))))
18417 (build-system python-build-system)
18418 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
18419 (synopsis "Benchmarking environment")
18420 (description
18421 "JUBE helps perform and analyze benchmarks in a systematic way. For each
18422 benchmarked application, benchmark data is stored in a format that allows JUBE
18423 to deduct the desired information. This data can be parsed by automatic pre-
18424 and post-processing scripts that draw information and store it more densely
18425 for manual interpretation.")
18426 (license license:gpl3+)))
18427
18428 (define-public python-pyroutelib3
18429 (package
18430 (name "python-pyroutelib3")
18431 (version "1.3.post1")
18432 (source
18433 (origin
18434 (method url-fetch)
18435 (uri (pypi-uri "pyroutelib3" version))
18436 (sha256
18437 (base32
18438 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
18439 (build-system python-build-system)
18440 (propagated-inputs
18441 `(("python-dateutil" ,python-dateutil)))
18442 (home-page "https://github.com/MKuranowski/pyroutelib3")
18443 (synopsis "Library for simple routing on OSM data")
18444 (description "Library for simple routing on OSM data")
18445 (license license:gpl3+)))
18446
18447 (define-public python-bibtexparser
18448 (package
18449 (name "python-bibtexparser")
18450 (version "1.1.0")
18451 (source
18452 (origin
18453 (method url-fetch)
18454 (uri (pypi-uri "bibtexparser" version))
18455 (sha256
18456 (base32
18457 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
18458 (build-system python-build-system)
18459 (propagated-inputs
18460 `(("python-pyparsing" ,python-pyparsing)))
18461 (native-inputs
18462 `(("python-future" ,python-future)))
18463 (home-page "https://github.com/sciunto-org/python-bibtexparser")
18464 (synopsis "Python library to parse BibTeX files")
18465 (description "BibtexParser is a Python library to parse BibTeX files.")
18466 (license (list license:bsd-3 license:lgpl3))))
18467
18468 (define-public python-distro
18469 (package
18470 (name "python-distro")
18471 (version "1.4.0")
18472 (source
18473 (origin
18474 (method url-fetch)
18475 (uri (pypi-uri "distro" version))
18476 (sha256
18477 (base32
18478 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
18479 (build-system python-build-system)
18480 (native-inputs
18481 `(("python-pytest" ,python-pytest)))
18482 (home-page "https://github.com/nir0s/distro")
18483 (synopsis
18484 "OS platform information API")
18485 (description
18486 "@code{distro} provides information about the OS distribution it runs on,
18487 such as a reliable machine-readable ID, or version information.
18488
18489 It is the recommended replacement for Python's original
18490 `platform.linux_distribution` function (which will be removed in Python 3.8).
18491 @code{distro} also provides a command-line interface to output the platform
18492 information in various formats.")
18493 (license license:asl2.0)))
18494
18495 (define-public python-cairosvg
18496 (package
18497 (name "python-cairosvg")
18498 (version "2.4.2")
18499 (source
18500 (origin
18501 (method url-fetch)
18502 (uri (pypi-uri "CairoSVG" version))
18503 (sha256
18504 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
18505 (build-system python-build-system)
18506 (arguments
18507 `(#:phases
18508 (modify-phases %standard-phases
18509 (replace 'check
18510 (lambda _ (invoke "pytest"))))))
18511 (propagated-inputs
18512 `(("python-cairocffi" ,python-cairocffi)
18513 ("python-cssselect2" ,python-cssselect2)
18514 ("python-defusedxml" ,python-defusedxml)
18515 ("python-pillow" ,python-pillow)
18516 ("python-tinycss2" ,python-tinycss2)))
18517 (native-inputs
18518 `(("python-pytest-flake8" ,python-pytest-flake8)
18519 ("python-pytest-isort" ,python-pytest-isort)
18520 ("python-pytest-runner" ,python-pytest-runner)))
18521 (home-page "https://cairosvg.org/")
18522 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
18523 (description "CairoSVG is a SVG converter based on Cairo. It can export
18524 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
18525 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
18526 parsed, the result is drawn to a Cairo surface that can be exported to
18527 qvarious formats: PDF, PostScript, PNG and even SVG.")
18528 (license license:lgpl3+)))
18529
18530 (define-public python-pyphen
18531 (package
18532 (name "python-pyphen")
18533 (version "0.9.5")
18534 (source
18535 (origin
18536 (method url-fetch)
18537 (uri (pypi-uri "Pyphen" version))
18538 (sha256
18539 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
18540 (build-system python-build-system)
18541 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
18542 ;; embedded set provided by upstream - like Debian does.
18543 (home-page "https://github.com/Kozea/Pyphen")
18544 (synopsis "Pure Python module to hyphenate text")
18545 (description "Pyphen is a pure Python module to hyphenate text using
18546 existing Hunspell hyphenation dictionaries.")
18547 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
18548
18549 (define-public python-intelhex
18550 (package
18551 (name "python-intelhex")
18552 (version "2.2.1")
18553 (source
18554 (origin
18555 (method url-fetch)
18556 (uri (pypi-uri "intelhex" version))
18557 (sha256
18558 (base32
18559 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
18560 (build-system python-build-system)
18561 (arguments '(#:tests? #f)) ;issue with version
18562 (home-page "https://pypi.org/project/IntelHex/")
18563 (synopsis "Python library for Intel HEX files manipulations")
18564 (description "The Intel HEX file format is widely used in microprocessors
18565 and microcontrollers area (embedded systems etc.) as the de facto standard for
18566 representation of code to be programmed into microelectronic devices. This
18567 package provides an intelhex Python library to read, write, create from
18568 scratch and manipulate data from Intel HEX file format. It also includes
18569 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
18570 converters and more, those based on the library itself.")
18571 (license license:bsd-3)))
18572
18573 (define-public python-pykwalify
18574 (package
18575 (name "python-pykwalify")
18576 (version "1.7.0")
18577 (source
18578 (origin
18579 (method url-fetch)
18580 (uri (pypi-uri "pykwalify" version))
18581 (sha256
18582 (base32
18583 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
18584 (build-system python-build-system)
18585 (arguments '(#:tests? #f)) ;missing dependencies
18586 (propagated-inputs
18587 `(("python-dateutil" ,python-dateutil)
18588 ("python-docopt" ,python-docopt)
18589 ("python-pyyaml" ,python-pyyaml)))
18590 (home-page "https://github.com/grokzen/pykwalify")
18591 (synopsis
18592 "Python lib/cli for JSON/YAML schema validation")
18593 (description
18594 "This package provides a parser, schema validator, and data binding tool
18595 for YAML and JSON.")
18596 (license license:expat)))
18597
18598 (define-public python-dbusmock
18599 (package
18600 (name "python-dbusmock")
18601 (version "0.18.3")
18602 (source
18603 (origin
18604 (method url-fetch)
18605 (uri (pypi-uri "python-dbusmock" version))
18606 (sha256
18607 (base32
18608 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
18609 (build-system python-build-system)
18610 (arguments
18611 '(#:phases
18612 (modify-phases %standard-phases
18613 (add-after 'unpack 'patch-shell-path
18614 (lambda _
18615 (substitute* "tests/test_code.py"
18616 (("/bin/bash") (which "bash")))
18617 #t)))))
18618 (native-inputs
18619 `(;; For tests.
18620 ("dbus" ,dbus) ; for dbus-daemon
18621 ("python-nose" ,python-nose)
18622 ("which" ,which)))
18623 (propagated-inputs
18624 `(("python-dbus" ,python-dbus)
18625 ("python-pygobject" ,python-pygobject)))
18626 (home-page "https://github.com/martinpitt/python-dbusmock")
18627 (synopsis "Python library for mock D-Bus objects")
18628 (description "python-dbusmock allows for the easy creation of mock objects on
18629 D-Bus. This is useful for writing tests for software which talks to D-Bus
18630 services such as upower, systemd, logind, gnome-session or others, and it is
18631 hard (or impossible without root privileges) to set the state of the real
18632 services to what you expect in your tests.")
18633 (license license:lgpl3+)))
18634
18635 (define-public python-ujson
18636 (package
18637 (name "python-ujson")
18638 (version "2.0.3")
18639 (source
18640 (origin
18641 (method url-fetch)
18642 (uri (pypi-uri "ujson" version))
18643 (sha256
18644 (base32
18645 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
18646 (modules '((guix build utils)))
18647 (snippet
18648 '(begin (delete-file-recursively "deps") #t))))
18649 (build-system python-build-system)
18650 (arguments
18651 `(#:phases
18652 (modify-phases %standard-phases
18653 (add-after 'unpack 'link-to-system-double-conversion
18654 (lambda* (#:key inputs #:allow-other-keys)
18655 (let ((d-c (assoc-ref inputs "double-conversion")))
18656 (substitute* "setup.py"
18657 (("./deps/double-conversion/double-conversion\"")
18658 (string-append d-c "/include/double-conversion\""))
18659 (("-lstdc++" stdc)
18660 (string-append "-L" d-c "/lib\","
18661 " \"-ldouble-conversion\","
18662 " \"" stdc)))
18663 #t)))
18664 (replace 'check
18665 (lambda* (#:key inputs outputs #:allow-other-keys)
18666 (add-installed-pythonpath inputs outputs)
18667 (invoke "pytest"))))))
18668 (native-inputs
18669 `(("double-conversion" ,double-conversion)
18670 ("python-setuptools-scm" ,python-setuptools-scm)
18671 ("python-pytest" ,python-pytest)))
18672 (home-page "https://github.com/ultrajson/ultrajson")
18673 (synopsis "Ultra fast JSON encoder and decoder for Python")
18674 (description
18675 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
18676 bindings for Python 3.")
18677 (license license:bsd-3)))
18678
18679 (define-public python-ujson-1
18680 (package
18681 (inherit python-ujson)
18682 (version "1.35")
18683 (source
18684 (origin
18685 (method url-fetch)
18686 (uri (pypi-uri "ujson" version))
18687 (sha256
18688 (base32
18689 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
18690 (arguments
18691 '(#:phases %standard-phases))
18692 (native-inputs '())
18693 (home-page "http://www.esn.me")
18694 (description
18695 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
18696 bindings for Python 2.5+ and 3.")))
18697
18698 (define-public python2-ujson-1
18699 (package-with-python2 python-ujson-1))
18700
18701 (define-public python-iocapture
18702 ;; The latest release is more than a year older than this commit.
18703 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
18704 (revision "1"))
18705 (package
18706 (name "python-iocapture")
18707 (version "0.1.2")
18708 (source
18709 (origin
18710 (method git-fetch)
18711 (uri (git-reference
18712 (url "https://github.com/oinume/iocapture.git")
18713 (commit commit)))
18714 (file-name (git-file-name name version))
18715 (sha256
18716 (base32
18717 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
18718 (build-system python-build-system)
18719 (arguments
18720 `(#:phases
18721 (modify-phases %standard-phases
18722 (delete 'check)
18723 (add-after 'install 'check
18724 (lambda* (#:key inputs outputs #:allow-other-keys)
18725 (add-installed-pythonpath inputs outputs)
18726 (invoke "py.test" "-v" "tests")
18727 #t)))))
18728 (propagated-inputs
18729 `(("python-flexmock" ,python-flexmock)
18730 ("python-pytest" ,python-pytest)
18731 ("python-pytest-cov" ,python-pytest-cov)
18732 ("python-six" ,python-six)))
18733 (home-page "https://github.com/oinume/iocapture")
18734 (synopsis "Python capturing tool for stdout and stderr")
18735 (description
18736 "This package helps you to capture the standard out (stdout) and the
18737 standard error channel (stderr) in your program.")
18738 (license license:expat))))
18739
18740 (define-public python-argh
18741 ;; There are 21 commits since the latest release containing important
18742 ;; improvements.
18743 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
18744 (revision "1"))
18745 (package
18746 (name "python-argh")
18747 (version (git-version "0.26.2" revision commit))
18748 (source
18749 (origin
18750 (method git-fetch)
18751 (uri (git-reference
18752 (url "https://github.com/neithere/argh.git")
18753 (commit commit)))
18754 (file-name (git-file-name name version))
18755 (sha256
18756 (base32
18757 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
18758 (build-system python-build-system)
18759 (propagated-inputs
18760 `(("python-iocapture" ,python-iocapture)
18761 ("python-mock" ,python-mock)
18762 ("python-pytest" ,python-pytest)
18763 ("python-pytest-cov" ,python-pytest-cov)
18764 ("python-pytest-xdist" ,python-pytest-xdist)
18765 ("python-tox" ,python-tox)))
18766 (home-page "https://github.com/neithere/argh/")
18767 (synopsis "Argparse wrapper with natural syntax")
18768 (description
18769 "python-argh is a small library that provides several layers of
18770 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
18771 always possible to declare a command with the highest possible (and least
18772 flexible) layer and then tune the behaviour with any of the lower layers
18773 including the native API of @code{python-argparse}.")
18774 (license license:lgpl3+))))
18775
18776 (define-public python-ppft
18777 (package
18778 (name "python-ppft")
18779 (version "1.6.6.1")
18780 (source
18781 (origin
18782 (method url-fetch)
18783 (uri (pypi-uri "ppft" version))
18784 (sha256
18785 (base32
18786 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
18787 (build-system python-build-system)
18788 (arguments '(#:tests? #f)) ; there are none
18789 (propagated-inputs
18790 `(("python-six" ,python-six)))
18791 (home-page "https://pypi.org/project/ppft/")
18792 (synopsis "Fork of Parallel Python")
18793 (description
18794 "This package is a fork of Parallel Python. The Parallel Python
18795 module (@code{pp}) provides an easy and efficient way to create
18796 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
18797 computers and clusters. It features cross-platform portability and dynamic
18798 load balancing.")
18799 (license license:bsd-3)))
18800
18801 (define-public python-pox
18802 (package
18803 (name "python-pox")
18804 (version "0.2.7")
18805 (source
18806 (origin
18807 (method url-fetch)
18808 (uri (pypi-uri "pox" version))
18809 (sha256
18810 (base32
18811 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
18812 (build-system python-build-system)
18813 (arguments
18814 `(#:phases
18815 (modify-phases %standard-phases
18816 (replace 'check
18817 (lambda _
18818 (mkdir-p "/tmp/guix")
18819 (setenv "SHELL" "bash")
18820 (setenv "USERNAME" "guix")
18821 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
18822 (invoke "py.test" "-vv")
18823 #t)))))
18824 (native-inputs
18825 `(("python-pytest" ,python-pytest)
18826 ("which" ,which)))
18827 (home-page "https://pypi.org/project/pox/")
18828 (synopsis "Python utilities for filesystem exploration and automated builds")
18829 (description
18830 "Pox provides a collection of utilities for navigating and manipulating
18831 filesystems. This module is designed to facilitate some of the low level
18832 operating system interactions that are useful when exploring a filesystem on a
18833 remote host. Pox provides Python equivalents of several shell commands such
18834 as @command{which} and @command{find}. These commands allow automated
18835 discovery of what has been installed on an operating system, and where the
18836 essential tools are located.")
18837 (license license:bsd-3)))
18838
18839 (define-public python-pathos
18840 (package
18841 (name "python-pathos")
18842 (version "0.2.5")
18843 (source
18844 (origin
18845 (method url-fetch)
18846 (uri (pypi-uri "pathos" version))
18847 (sha256
18848 (base32
18849 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
18850 (build-system python-build-system)
18851 (arguments
18852 '(#:phases
18853 (modify-phases %standard-phases
18854 (replace 'check
18855 (lambda _
18856 (setenv "PYTHONPATH"
18857 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18858 (invoke "python" "./tests/__main__.py"))))))
18859 (propagated-inputs
18860 `(("python-dill" ,python-dill)
18861 ("python-multiprocess" ,python-multiprocess)
18862 ("python-pox" ,python-pox)
18863 ("python-ppft" ,python-ppft)))
18864 (native-inputs
18865 `(("python-pytest" ,python-pytest)))
18866 (home-page "https://pypi.org/project/pathos/")
18867 (synopsis
18868 "Parallel graph management and execution in heterogeneous computing")
18869 (description
18870 "Python-pathos is a framework for heterogenous computing. It provides a
18871 consistent high-level interface for configuring and launching parallel
18872 computations across heterogenous resources. Python-pathos provides configurable
18873 launchers for parallel and distributed computing, where each launcher contains
18874 the syntactic logic to configure and launch jobs in an execution environment.")
18875 (license license:bsd-3)))
18876
18877 (define-public python-flit
18878 (package
18879 (name "python-flit")
18880 (version "2.1.0")
18881 (source
18882 (origin
18883 (method url-fetch)
18884 (uri (pypi-uri "flit" version))
18885 (sha256
18886 (base32
18887 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
18888 (build-system python-build-system)
18889 (arguments
18890 `(#:tests? #f)) ; XXX: Check requires network access.
18891 (home-page "https://flit.readthedocs.io/")
18892 (synopsis
18893 "Simple packaging tool for simple packages")
18894 (description
18895 "Flit is a simple way to put Python packages and modules on PyPI. Flit
18896 packages a single importable module or package at a time, using the import
18897 name as the name on PyPI. All subpackages and data files within a package
18898 are included automatically.")
18899 (license license:bsd-3)))
18900
18901 (define-public python-pathtools
18902 (package
18903 (name "python-pathtools")
18904 (version "0.1.2")
18905 (source
18906 (origin
18907 (method url-fetch)
18908 (uri (pypi-uri "pathtools" version))
18909 (sha256
18910 (base32
18911 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
18912 (build-system python-build-system)
18913 (home-page
18914 "https://github.com/gorakhargosh/pathtools")
18915 (synopsis "Path utilities for Python")
18916 (description "Pattern matching and various utilities for file systems
18917 paths.")
18918 (license license:expat)))
18919
18920 (define-public python-fastentrypoints
18921 (package
18922 (name "python-fastentrypoints")
18923 (version "0.12")
18924 (source
18925 (origin
18926 (method url-fetch)
18927 (uri (pypi-uri "fastentrypoints" version))
18928 (sha256
18929 (base32
18930 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
18931 (build-system python-build-system)
18932 (home-page
18933 "https://github.com/ninjaaron/fast-entry_points")
18934 (synopsis
18935 "Makes entry_points specified in setup.py load more quickly")
18936 (description
18937 "Using entry_points in your setup.py makes scripts that start really
18938 slowly because it imports pkg_resources. This package allows such setup
18939 scripts to load entry points more quickly.")
18940 (license license:bsd-3)))
18941
18942 (define-public python-funcparserlib
18943 (package
18944 (name "python-funcparserlib")
18945 (version "0.3.6")
18946 (source
18947 (origin
18948 (method url-fetch)
18949 (uri (pypi-uri "funcparserlib" version))
18950 (sha256
18951 (base32
18952 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
18953 (native-inputs
18954 `(("python-tox" ,python-tox)))
18955 (arguments
18956 `(#:phases
18957 (modify-phases %standard-phases
18958 (replace 'check
18959 (lambda _
18960 (invoke "tox"))))))
18961 (build-system python-build-system)
18962 (home-page
18963 "https://github.com/vlasovskikh/funcparserlib")
18964 (synopsis
18965 "Recursive descent parsing library based on functional combinators")
18966 (description
18967 "This package is a recursive descent parsing library for Python based on
18968 functional combinators. Parser combinators are just higher-order functions
18969 that take parsers as their arguments and return them as result values.")
18970 (license license:expat)))
18971
18972 (define-public python-speg
18973 (package
18974 (name "python-speg")
18975 (version "0.3")
18976 (source
18977 (origin
18978 (method url-fetch)
18979 (uri (pypi-uri "speg" version ".zip"))
18980 (sha256
18981 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
18982 (arguments
18983 `(#:tests? #f)) ;FIXME: tests fail, not sure why
18984 (native-inputs
18985 `(("unzip" ,unzip)))
18986 (build-system python-build-system)
18987 (home-page "https://github.com/avakar/speg")
18988 (synopsis "PEG-based parser interpreter with memoization")
18989 (description "This package is a PEG-based parser and interpreter with
18990 memoization.")
18991 (license license:expat)))
18992
18993 (define-public python-cson
18994 (package
18995 (name "python-cson")
18996 (version "0.8")
18997 (source
18998 (origin
18999 (method url-fetch)
19000 (uri (pypi-uri "cson" version))
19001 (sha256
19002 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
19003 (build-system python-build-system)
19004 (propagated-inputs
19005 `(("python-speg" ,python-speg)))
19006 (home-page "https://github.com/avakar/pycson")
19007 (synopsis "Parser for Coffeescript Object Notation (CSON)")
19008 (description "This package is a parser for Coffeescript Object
19009 Notation (CSON).")
19010 (license license:expat)))
19011
19012 (define-public python-asynctest
19013 (package
19014 (name "python-asynctest")
19015 (version "0.13.0")
19016 (source
19017 (origin
19018 (method url-fetch)
19019 (uri (pypi-uri "asynctest" version))
19020 (sha256
19021 (base32
19022 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
19023 (build-system python-build-system)
19024 (arguments
19025 '(#:phases
19026 (modify-phases %standard-phases
19027 (replace 'check
19028 (lambda _
19029 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
19030 (add-after 'unpack 'disable-tests
19031 (lambda* _
19032 (substitute* "test/test_selector.py"
19033 ;; XXX: This test fails for unknown reason inside the build
19034 ;; environment.
19035 (("def test_events_watched_outside_test_are_ignored")
19036 "@unittest.skip('disabled by guix')
19037 def test_events_watched_outside_test_are_ignored")))))))
19038 (home-page "https://github.com/Martiusweb/asynctest")
19039 (synopsis "Extension of unittest for testing asyncio libraries")
19040 (description
19041 "The package asynctest is built on top of the standard unittest module
19042 and cuts down boilerplate code when testing libraries for asyncio.")
19043 (license license:asl2.0)))
19044
19045 (define-public python-aionotify
19046 (package
19047 (name "python-aionotify")
19048 (version "0.2.0")
19049 (source
19050 (origin
19051 ;; Source tarball on PyPi lacks tests
19052 (method git-fetch)
19053 (uri (git-reference
19054 (url "https://github.com/rbarrois/aionotify")
19055 (commit (string-append "v" version))))
19056 (file-name (git-file-name name version))
19057 (sha256
19058 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
19059 (build-system python-build-system)
19060 (native-inputs `(("python-asynctest" ,python-asynctest)))
19061 (home-page "https://github.com/rbarrois/aionotify")
19062 (synopsis "Asyncio-powered inotify library")
19063 (description
19064 "@code{aionotify} is a simple, asyncio-based inotify library.")
19065 (license license:bsd-3)))
19066
19067 (define-public python-forbiddenfruit
19068 (package
19069 (name "python-forbiddenfruit")
19070 (version "0.1.3")
19071 (source
19072 (origin
19073 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
19074 (method git-fetch)
19075 (uri (git-reference
19076 (url "https://github.com/clarete/forbiddenfruit")
19077 (commit version)))
19078 (file-name (git-file-name name version))
19079 (sha256
19080 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
19081 (build-system python-build-system)
19082 (arguments
19083 '(#:phases
19084 (modify-phases %standard-phases
19085 (replace 'check
19086 (lambda _
19087 (invoke "make" "SKIP_DEPS=1"))))))
19088 (native-inputs
19089 `(("python-nose" ,python-nose)
19090 ("python-coverage" ,python-coverage)))
19091 (home-page "https://github.com/clarete/forbiddenfruit")
19092 (synopsis "Patch python built-in objects")
19093 (description "This project allows Python code to extend built-in types.")
19094 (license (list license:gpl3+ license:expat))))
19095
19096 (define-public python-shouldbe
19097 (package
19098 (name "python-shouldbe")
19099 (version "0.1.2")
19100 (source
19101 (origin
19102 (method url-fetch)
19103 (uri (pypi-uri "shouldbe" version))
19104 (sha256
19105 (base32
19106 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
19107 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
19108 (build-system python-build-system)
19109 (propagated-inputs
19110 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
19111 (native-inputs
19112 `(("python-nose" ,python-nose)))
19113 (home-page "https://github.com/directxman12/should_be")
19114 (synopsis "Python Assertion Helpers inspired by Shouldly")
19115 (description
19116 "Python Assertion Helpers inspired by Shouldly.")
19117 (license license:isc)))
19118
19119 (define-public python-k5test
19120 (package
19121 (name "python-k5test")
19122 (version "0.9.2")
19123 (source
19124 (origin
19125 (method url-fetch)
19126 (uri (pypi-uri "k5test" version))
19127 (sha256
19128 (base32
19129 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
19130 (build-system python-build-system)
19131 (propagated-inputs
19132 `(("python-six" ,python-six)
19133 ;; `which`, `kadmin.local` binaries called inside library
19134 ("which" ,which)
19135 ("mit-krb5" ,mit-krb5)))
19136 (native-inputs `(("mit-krb5" ,mit-krb5)))
19137 (arguments
19138 '(#:phases
19139 (modify-phases %standard-phases
19140 (add-after 'unpack 'patch-paths
19141 (lambda* _
19142 (substitute* "k5test/realm.py"
19143 (("'kadmin_local'") "'kadmin.local'")))))))
19144 (home-page "https://github.com/pythongssapi/k5test")
19145 (synopsis "Library for setting up self-contained Kerberos 5 environments")
19146 (description
19147 "@code{k5test} is a library for setting up self-contained Kerberos 5
19148 environments, and running Python unit tests inside those environments. It is
19149 based on the file of the same name found alongside the MIT Kerberos 5 unit
19150 tests.")
19151 (license license:isc)))
19152
19153 (define-public python-gssapi
19154 (package
19155 (name "python-gssapi")
19156 (version "1.6.5")
19157 (source
19158 (origin
19159 (method url-fetch)
19160 (uri (pypi-uri "gssapi" version))
19161 (sha256
19162 (base32
19163 "02i5s7998dg5kcr4m0xwamd8vjqk1816xbzldyp68l91f6bynwcr"))))
19164 (build-system python-build-system)
19165 (propagated-inputs
19166 `(("python-decorator" ,python-decorator)
19167 ("python-six" ,python-six)))
19168 (inputs
19169 `(("mit-krb5" ,mit-krb5)))
19170 ;; for tests
19171 (native-inputs
19172 `(("python-shouldbe" ,python-shouldbe)
19173 ("python-parameterized" ,python-parameterized)
19174 ("python-k5test" ,python-k5test)
19175 ("python-nose" ,python-nose)))
19176 (home-page "https://github.com/pythongssapi/python-gssapi")
19177 (synopsis "Python GSSAPI Wrapper")
19178 (description
19179 "Python-GSSAPI provides both low-level and high level wrappers around the
19180 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
19181 also be useable with other GSSAPI mechanisms.")
19182 (license license:isc)))
19183
19184 (define-public python-check-manifest
19185 (package
19186 (name "python-check-manifest")
19187 (version "0.37")
19188 (source
19189 (origin
19190 (method url-fetch)
19191 (uri (pypi-uri "check-manifest" version))
19192 (sha256
19193 (base32
19194 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
19195 (build-system python-build-system)
19196 (native-inputs
19197 `(("python-mock" ,python-mock)
19198 ("git" ,git)))
19199 (home-page "https://github.com/mgedmin/check-manifest")
19200 (synopsis "Check MANIFEST.in in a Python source package for completeness")
19201 (description "Python package can include a MANIFEST.in file to help with
19202 sending package files to the Python Package Index. This package checks that
19203 file to ensure it completely and accurately describes your project.")
19204 (license license:expat)))
19205
19206 (define-public python-android-stringslib
19207 (package
19208 (name "python-android-stringslib")
19209 (version "0.1.2")
19210 (source
19211 (origin
19212 (method git-fetch)
19213 (uri (git-reference
19214 (url "https://framagit.org/tyreunom/python-android-strings-lib")
19215 (commit (string-append "v" version))))
19216 (file-name (git-file-name name version))
19217 (sha256
19218 (base32
19219 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
19220 (build-system python-build-system)
19221 (arguments
19222 `(#:tests? #f))
19223 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
19224 (synopsis "Android strings.xml support")
19225 (description "Android Strings Lib provides support for android's strings.xml
19226 files. These files are used to translate strings in android apps.")
19227 (license license:expat)))
19228
19229 (define-public python-watchdog
19230 (package
19231 (name "python-watchdog")
19232 (version "0.9.0")
19233 (source
19234 (origin
19235 (method url-fetch)
19236 (uri (pypi-uri "watchdog" version))
19237 (sha256
19238 (base32
19239 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
19240 (build-system python-build-system)
19241 (arguments
19242 `(#:phases
19243 (modify-phases %standard-phases
19244 (add-before 'check 'remove-failing
19245 (lambda _
19246 (delete-file "tests/test_inotify_buffer.py")
19247 (delete-file "tests/test_snapshot_diff.py")
19248 #t)))))
19249 (propagated-inputs
19250 `(("python-argh" ,python-argh)
19251 ("python-pathtools" ,python-pathtools)
19252 ("python-pyyaml" ,python-pyyaml)))
19253 (native-inputs
19254 `(("python-pytest-cov" ,python-pytest-cov)
19255 ("python-pytest-timeout" ,python-pytest-timeout)))
19256 (home-page "https://github.com/gorakhargosh/watchdog")
19257 (synopsis "Filesystem events monitoring")
19258 (description "This package provides a way to monitor filesystem events
19259 such as a file modification and trigger an action. This is similar to inotify,
19260 but portable.")
19261 (license license:asl2.0)))
19262
19263 (define-public python-wget
19264 (package
19265 (name "python-wget")
19266 (version "3.2")
19267 (source
19268 (origin
19269 (method url-fetch)
19270 (uri (pypi-uri "wget" version ".zip"))
19271 (sha256
19272 (base32
19273 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
19274 (build-system python-build-system)
19275 (native-inputs `(("unzip" ,unzip)))
19276 (home-page "https://bitbucket.org/techtonik/python-wget/")
19277 (synopsis "Pure Python download utility")
19278 (description "The python-wget library provides an API to download files
19279 with features similar to the @command{wget} utility.")
19280 (license license:unlicense)))
19281
19282 (define-public offlate
19283 (package
19284 (name "offlate")
19285 (version "0.5")
19286 (source
19287 (origin
19288 (method git-fetch)
19289 (uri (git-reference
19290 (url "https://framagit.org/tyreunom/offlate")
19291 (commit version)))
19292 (file-name (git-file-name name version))
19293 (sha256
19294 (base32
19295 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
19296 (build-system python-build-system)
19297 (arguments
19298 ;; No tests
19299 `(#:tests? #f))
19300 (propagated-inputs
19301 `(("python-android-stringslib" ,python-android-stringslib)
19302 ("python-dateutil" ,python-dateutil)
19303 ("python-gitlab" ,python-gitlab)
19304 ("python-lxml" ,python-lxml)
19305 ("python-polib" ,python-polib)
19306 ("python-pyenchant" ,python-pyenchant)
19307 ("python-pygit2" ,python-pygit2)
19308 ("python-pygithub" ,python-pygithub)
19309 ("python-pyqt" ,python-pyqt)
19310 ("python-requests" ,python-requests)
19311 ("python-ruamel.yaml" ,python-ruamel.yaml)
19312 ("python-translation-finder" ,python-translation-finder)
19313 ("python-watchdog" ,python-watchdog)))
19314 (native-inputs
19315 `(("qttools" ,qttools)))
19316 (home-page "https://framagit.org/tyreunom/offlate")
19317 (synopsis "Offline translation interface for online translation tools")
19318 (description "Offlate offers a unified interface for different translation
19319 file formats, as well as many different online translation platforms. You can
19320 use it to get work from online platforms, specialized such as the Translation
19321 Project, or not such a gitlab instance when your upstream doesn't use any
19322 dedicated platform. The tool proposes a unified interface for any format and
19323 an upload option to send your work back to the platform.")
19324 (license license:gpl3+)))
19325
19326 (define-public python-titlecase
19327 (package
19328 (name "python-titlecase")
19329 (version "0.12.0")
19330 (source
19331 (origin
19332 (method url-fetch)
19333 (uri (pypi-uri "titlecase" version))
19334 (sha256
19335 (base32
19336 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
19337 (build-system python-build-system)
19338 (native-inputs
19339 `(("python-nose" ,python-nose)))
19340 (home-page "https://github.com/ppannuto/python-titlecase")
19341 (synopsis "Capitalize strings similar to book titles")
19342 (description
19343 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
19344 It capitalizes (predominantly English) strings in a way that is similar to
19345 book titles, using the New York Times Manual of Style to leave certain words
19346 lowercase.")
19347 (license license:expat)))
19348
19349 (define-public python-pypng
19350 (package
19351 (name "python-pypng")
19352 (version "0.0.20")
19353 (source
19354 (origin
19355 (method url-fetch)
19356 (uri (pypi-uri "pypng" version))
19357 (sha256
19358 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
19359 (build-system python-build-system)
19360 (home-page "https://github.com/drj11/pypng")
19361 (synopsis "Pure Python PNG image encoder/decoder")
19362 (description
19363 "The PyPNG module implements support for PNG images. It reads and writes
19364 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
19365 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
19366 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
19367 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
19368 A number of optional chunks can be specified (when writing) and
19369 understood (when reading): tRNS, bKGD, gAMA.
19370
19371 PyPNG is not a high level toolkit for image processing (like PIL) and does not
19372 aim at being a replacement or competitor. Its strength lies in fine-grained
19373 extensive support of PNG features. It can also read and write Netpbm PAM
19374 files, with a focus on its use as an intermediate format for implementing
19375 custom PNG processing.")
19376 (license license:expat)))
19377
19378 (define-public python-fuzzywuzzy
19379 (package
19380 (name "python-fuzzywuzzy")
19381 (version "0.18.0")
19382 (source
19383 (origin
19384 (method url-fetch)
19385 (uri (pypi-uri "fuzzywuzzy" version))
19386 (sha256
19387 (base32
19388 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
19389 (build-system python-build-system)
19390 (native-inputs
19391 `(("python-hypothesis" ,python-hypothesis)
19392 ("python-pycodestyle" ,python-pycodestyle)
19393 ("python-pytest" ,python-pytest)))
19394 (propagated-inputs
19395 `(("python-levenshtein" ,python-levenshtein)))
19396 (home-page "https://github.com/seatgeek/fuzzywuzzy")
19397 (synopsis "Fuzzy string matching in Python")
19398 (description "Approximate string matching using
19399 @emph{Levenshtein Distance} to calculate the differences between
19400 sequences.")
19401 (license license:gpl2)))
19402
19403 (define-public python2-fuzzywuzzy
19404 (package-with-python2 python-fuzzywuzzy))
19405
19406 (define-public python-block-tracing
19407 (package
19408 (name "python-block-tracing")
19409 (version "1.0.1")
19410 (source
19411 (origin
19412 (method url-fetch)
19413 (uri (pypi-uri "block_tracing" version))
19414 (sha256
19415 (base32
19416 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
19417 (build-system python-build-system)
19418 (arguments '(#:tests? #f)) ; no tests
19419 (home-page "https://github.com/rianhunter/block_tracing")
19420 (synopsis "Protect process memory")
19421 (description
19422 "@code{block_tracing} is a tiny Python library that can be used to
19423 prevent debuggers and other applications from inspecting the memory within
19424 your process.")
19425 (license license:expat)))
19426
19427 (define-public python-gcovr
19428 (package
19429 (name "python-gcovr")
19430 (version "4.2")
19431 (source
19432 (origin
19433 (method url-fetch)
19434 (uri (pypi-uri "gcovr" version))
19435 (sha256
19436 (base32
19437 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
19438 (build-system python-build-system)
19439 (propagated-inputs
19440 `(("python-lxml" ,python-lxml)
19441 ("python-jinja2" ,python-jinja2)))
19442 (home-page "https://gcovr.com/")
19443 (synopsis "Utility for generating code coverage results")
19444 (description
19445 "Gcovr provides a utility for managing the use of the GNU gcov
19446 utility and generating summarized code coverage results. It is inspired
19447 by the Python coverage.py package, which provides a similar utility for
19448 Python.")
19449 (license license:bsd-3)))
19450
19451 (define-public python-owslib
19452 (package
19453 (name "python-owslib")
19454 (version "0.19.2")
19455 (source
19456 (origin
19457 (method url-fetch)
19458 (uri (pypi-uri "OWSLib" version))
19459 (sha256
19460 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
19461 (build-system python-build-system)
19462 (arguments
19463 '(#:tests? #f)) ; TODO: package dependencies required for tests.
19464 (synopsis "Interface for Open Geospatial Consortium web service")
19465 (description
19466 "OWSLib is a Python package for client programming with Open Geospatial
19467 Consortium (OGC) web service (hence OWS) interface standards, and their related
19468 content models.")
19469 (home-page "https://geopython.github.io/OWSLib/")
19470 (license license:bsd-3)))
19471
19472 (define-public python-docusign-esign
19473 (package
19474 (name "python-docusign-esign")
19475 (version "3.1.0")
19476 (source (origin
19477 (method url-fetch)
19478 (uri (pypi-uri "docusign_esign" version))
19479 (sha256
19480 (base32
19481 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
19482 (build-system python-build-system)
19483 ;; Testing requires undocumented setup changes, and so testing is disabled here.
19484 (arguments `(#:tests? #f))
19485 (propagated-inputs
19486 `(("python-certifi", python-certifi)
19487 ("python-six", python-six)
19488 ("python-dateutil", python-dateutil)
19489 ("python-urllib3", python-urllib3)
19490 ("python-pyjwt", python-pyjwt)
19491 ("python-cryptography", python-cryptography)
19492 ("python-nose", python-nose)))
19493 (synopsis "DocuSign Python Client")
19494 (description "The Official DocuSign Python Client Library used to interact
19495 with the eSign REST API. Send, sign, and approve documents using this client.")
19496 (home-page "https://www.docusign.com/devcenter")
19497 (license license:expat)))
19498
19499 (define-public python-xattr
19500 (package
19501 (name "python-xattr")
19502 (version "0.9.7")
19503 (source
19504 (origin
19505 (method url-fetch)
19506 (uri (pypi-uri "xattr" version))
19507 (sha256
19508 (base32
19509 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
19510 (build-system python-build-system)
19511 (propagated-inputs
19512 `(("python-cffi" ,python-cffi)))
19513 (home-page "https://github.com/xattr/xattr")
19514 (synopsis
19515 "Python wrapper for extended filesystem attributes")
19516 (description "This package provides a Python wrapper for using extended
19517 filesystem attributes. Extended attributes extend the basic attributes of files
19518 and directories in the file system. They are stored as name:data pairs
19519 associated with file system objects (files, directories, symlinks, etc).")
19520 (license license:expat)))
19521
19522 (define-public python-json-logger
19523 (package
19524 (name "python-json-logger")
19525 (version "0.1.11")
19526 (source
19527 (origin
19528 (method url-fetch)
19529 (uri (pypi-uri "python-json-logger" version))
19530 (sha256
19531 (base32
19532 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
19533 (build-system python-build-system)
19534 (home-page
19535 "https://github.com/madzak/python-json-logger")
19536 (synopsis "JSON log formatter in Python")
19537 (description "This library allows standard Python logging to output log data
19538 as JSON objects. With JSON we can make our logs more readable by machines and
19539 we can stop writing custom parsers for syslog-type records.")
19540 (license license:bsd-3)))
19541
19542 (define-public python-daiquiri
19543 (package
19544 (name "python-daiquiri")
19545 (version "2.1.1")
19546 (source
19547 (origin
19548 (method url-fetch)
19549 (uri (pypi-uri "daiquiri" version))
19550 (sha256
19551 (base32
19552 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
19553 (build-system python-build-system)
19554 (propagated-inputs
19555 `(("python-json-logger" ,python-json-logger)))
19556 (native-inputs
19557 `(("python-mock" ,python-mock)
19558 ("python-pytest" ,python-pytest)
19559 ("python-setuptools-scm" ,python-setuptools-scm)
19560 ("python-six" ,python-six)))
19561 (home-page "https://github.com/jd/daiquiri")
19562 (synopsis
19563 "Library to configure Python logging easily")
19564 (description "The daiquiri library provides an easy way to configure
19565 logging in Python. It also provides some custom formatters and handlers.")
19566 (license license:asl2.0)))
19567
19568 (define-public python-pifpaf
19569 (package
19570 (name "python-pifpaf")
19571 (version "2.4.0")
19572 (source
19573 (origin
19574 (method url-fetch)
19575 (uri (pypi-uri "pifpaf" version))
19576 (sha256
19577 (base32
19578 "150av2pylsjy8ykrpyi0vzy2q24s9rhh2ya01zvwnvj9j5dspviz"))))
19579 (build-system python-build-system)
19580 (arguments
19581 `(#:tests? #f))
19582 (propagated-inputs
19583 `(("python-click" ,python-click)
19584 ("python-daiquiri" ,python-daiquiri)
19585 ("python-fixtures" ,python-fixtures)
19586 ("python-jinja2" ,python-jinja2)
19587 ("python-pbr" ,python-pbr)
19588 ("python-psutil" ,python-psutil)
19589 ("python-six" ,python-six)
19590 ("python-xattr" ,python-xattr)))
19591 (native-inputs
19592 `(("python-mock" ,python-mock)
19593 ("python-os-testr" ,python-os-testr)
19594 ("python-requests" ,python-requests)
19595 ("python-testrepository" ,python-testrepository)
19596 ("python-testtools" ,python-testtools)))
19597 (home-page "https://github.com/jd/pifpaf")
19598 (synopsis "Tools and fixtures to manage daemons for testing in Python")
19599 (description "Pifpaf is a suite of fixtures and a command-line tool that
19600 starts and stops daemons for a quick throw-away usage. This is typically
19601 useful when needing these daemons to run integration testing. It originally
19602 evolved from its precursor @code{overtest}.")
19603 (license license:asl2.0)))
19604
19605 (define-public python-pytest-check-links
19606 (package
19607 (name "python-pytest-check-links")
19608 (version "0.3.0")
19609 (source
19610 (origin
19611 (method url-fetch)
19612 ;; URI uses underscores
19613 (uri (pypi-uri "pytest_check_links" version))
19614 (sha256
19615 (base32
19616 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
19617 (build-system python-build-system)
19618 (propagated-inputs
19619 `(("python-docutils" ,python-docutils)
19620 ("python-html5lib" ,python-html5lib)
19621 ("python-nbconvert" ,python-nbconvert)
19622 ("python-nbformat" ,python-nbformat)
19623 ("python-pytest" ,python-pytest)
19624 ("python-six" ,python-six)))
19625 (native-inputs
19626 `(("python-pbr-minimal" ,python-pbr-minimal)))
19627 (home-page "https://github.com/minrk/pytest-check-links")
19628 (synopsis "Check links in files")
19629 (description "This package provides a pytest plugin that checks URLs for
19630 HTML-containing files.")
19631 (license license:bsd-3)))
19632
19633 (define-public python-json5
19634 (package
19635 (name "python-json5")
19636 (version "0.8.5")
19637 (source
19638 (origin
19639 ;; sample.json5 is missing from PyPi source tarball
19640 (method git-fetch)
19641 (uri (git-reference
19642 (url "https://github.com/dpranke/pyjson5.git")
19643 (commit (string-append "v" version))))
19644 (file-name (git-file-name name version))
19645 (sha256
19646 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
19647 (build-system python-build-system)
19648 (home-page "https://github.com/dpranke/pyjson5")
19649 (synopsis
19650 "Python implementation of the JSON5 data format")
19651 (description
19652 "JSON5 extends the JSON data interchange format to make it slightly more
19653 usable as a configuration language. This Python package implements parsing and
19654 dumping of JSON5 data structures.")
19655 (license license:asl2.0)))
19656
19657 (define-public python-frozendict
19658 (package
19659 (name "python-frozendict")
19660 (version "1.2")
19661 (source
19662 (origin
19663 (method url-fetch)
19664 (uri (pypi-uri "frozendict" version))
19665 (sha256
19666 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
19667 (build-system python-build-system)
19668 (home-page "https://github.com/slezica/python-frozendict")
19669 (synopsis "Simple immutable mapping for Python")
19670 (description
19671 "@dfn{frozendict} is an immutable wrapper around dictionaries that
19672 implements the complete mapping interface. It can be used as a drop-in
19673 replacement for dictionaries where immutability is desired.")
19674 (license license:expat)))
19675
19676 (define-public python-unpaddedbase64
19677 (package
19678 (name "python-unpaddedbase64")
19679 (version "1.1.0")
19680 (source
19681 (origin
19682 (method git-fetch)
19683 (uri (git-reference
19684 (url "https://github.com/matrix-org/python-unpaddedbase64.git")
19685 (commit (string-append "v" version))))
19686 (file-name (git-file-name name version))
19687 (sha256
19688 (base32
19689 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
19690 (build-system python-build-system)
19691 (home-page "https://pypi.org/project/unpaddedbase64/")
19692 (synopsis "Encode and decode Base64 without “=” padding")
19693 (description
19694 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
19695 using “=” characters. However this conveys no benefit so many protocols
19696 choose to use Base64 without the “=” padding.")
19697 (license license:asl2.0)))
19698
19699 (define-public python-py-cpuinfo
19700 (package
19701 (name "python-py-cpuinfo")
19702 (version "5.0.0")
19703 (source
19704 (origin
19705 (method url-fetch)
19706 (uri (pypi-uri "py-cpuinfo" version))
19707 (sha256
19708 (base32
19709 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
19710 (build-system python-build-system)
19711 (home-page "https://github.com/workhorsy/py-cpuinfo")
19712 (synopsis "Get CPU info with Python")
19713 (description
19714 "This Python module returns the CPU info by using the best sources of
19715 information for your operating system.")
19716 (license license:expat)))
19717
19718 (define-public python-canonicaljson
19719 (package
19720 (name "python-canonicaljson")
19721 (version "1.1.4")
19722 (source
19723 (origin
19724 (method url-fetch)
19725 (uri (pypi-uri "canonicaljson" version))
19726 (sha256
19727 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
19728 (build-system python-build-system)
19729 (propagated-inputs
19730 `(("python-six" ,python-six)
19731 ("python-frozendict" ,python-frozendict)
19732 ("python-simplejson" ,python-simplejson)))
19733 (home-page "https://github.com/matrix-org/python-canonicaljson")
19734 (synopsis "Canonical JSON")
19735 (description
19736 "Deterministically encode JSON.
19737
19738 @itemize
19739 @item Encodes objects and arrays as RFC 7159 JSON.
19740 @item Sorts object keys so that you get the same result each time.
19741 @item Has no insignificant whitespace to make the output as small as possible.
19742 @item Escapes only the characters that must be escaped, U+0000 to
19743 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
19744 @item Uses the shortest escape sequence for each escaped character.
19745 @item Encodes the JSON as UTF-8.
19746 @item Can encode frozendict immutable dictionaries.
19747 @end itemize")
19748 (license license:asl2.0)))
19749
19750 (define-public python-signedjson
19751 (package
19752 (name "python-signedjson")
19753 (version "1.1.1")
19754 (source
19755 (origin
19756 (method url-fetch)
19757 (uri (pypi-uri "signedjson" version))
19758 (sha256
19759 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
19760 (build-system python-build-system)
19761 (propagated-inputs
19762 `(("python-canonicaljson" ,python-canonicaljson)
19763 ("python-importlib-metadata" ,python-importlib-metadata)
19764 ("python-pynacl" ,python-pynacl)
19765 ("python-typing-extensions" ,python-typing-extensions)
19766 ("python-unpaddedbase64" ,python-unpaddedbase64)))
19767 (native-inputs
19768 `(("python-setuptools-scm" ,python-setuptools-scm)))
19769 (home-page "https://github.com/matrix-org/python-signedjson")
19770 (synopsis "Sign JSON objects with ED25519 signatures")
19771 (description
19772 "Sign JSON objects with ED25519 signatures.
19773
19774 @itemize
19775 @item More than one entity can sign the same object.
19776 @item Each entity can sign the object with more than one key making it easier to
19777 rotate keys
19778 @item ED25519 can be replaced with a different algorithm.
19779 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
19780 key.
19781 @end itemize")
19782 (license license:asl2.0)))
19783
19784 (define-public python-daemonize
19785 (package
19786 (name "python-daemonize")
19787 (version "2.5.0")
19788 (source
19789 (origin
19790 (method url-fetch)
19791 (uri (pypi-uri "daemonize" version))
19792 (sha256
19793 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
19794 (build-system python-build-system)
19795 (home-page "https://github.com/thesharp/daemonize")
19796 (synopsis "Library for writing system daemons in Python")
19797 (description "Daemonize is a library for writing system daemons in Python.")
19798 (license license:expat)))
19799
19800 (define-public python-pymacaroons
19801 (package
19802 (name "python-pymacaroons")
19803 (version "0.13.0")
19804 (source
19805 (origin
19806 (method url-fetch)
19807 (uri (pypi-uri "pymacaroons" version))
19808 (sha256
19809 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
19810 (build-system python-build-system)
19811 (propagated-inputs
19812 `(("python-six" ,python-six)
19813 ("python-pynacl" ,python-pynacl)))
19814 (home-page "https://github.com/ecordell/pymacaroons")
19815 (synopsis "Python Macaroon Library")
19816 (description
19817 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
19818 tokens, macaroons embed caveats that define specific authorization
19819 requirements for the target service, the service that issued the root macaroon
19820 and which is capable of verifying the integrity of macaroons it receives.
19821
19822 Macaroons allow for delegation and attenuation of authorization. They are
19823 simple and fast to verify, and decouple authorization policy from the
19824 enforcement of that policy.")
19825 (license license:expat)))
19826
19827 (define-public python-ldap3
19828 (package
19829 (name "python-ldap3")
19830 (version "2.7")
19831 (home-page "https://github.com/cannatag/ldap3")
19832 (source
19833 (origin
19834 (method git-fetch)
19835 (uri (git-reference (url home-page)
19836 (commit (string-append "v" version))))
19837 (file-name (git-file-name name version))
19838 (sha256
19839 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
19840 (build-system python-build-system)
19841 (arguments
19842 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
19843 #:phases (modify-phases %standard-phases
19844 (replace 'check
19845 (lambda* (#:key tests? #:allow-other-keys)
19846 (when tests?
19847 (invoke "nosetests" "-s" "test"))
19848 #t)))))
19849 (native-inputs
19850 `(("python-nose" ,python-nose)))
19851 (propagated-inputs
19852 `(("python-gssapi" ,python-gssapi)
19853 ("python-pyasn1" ,python-pyasn1)))
19854 (synopsis "Python LDAP client")
19855 (description
19856 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
19857 library.")
19858 (license license:lgpl3+)))
19859
19860 (define-public python-boltons
19861 (package
19862 (name "python-boltons")
19863 (version "20.0.0")
19864 (source
19865 (origin
19866 (method url-fetch)
19867 (uri (pypi-uri "boltons" version))
19868 (sha256
19869 (base32
19870 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
19871 (build-system python-build-system)
19872 (home-page "https://github.com/mahmoud/boltons")
19873 (synopsis "Extensions to the Python standard library")
19874 (description
19875 "Boltons is a set of over 230 pure-Python utilities in the same spirit
19876 as — and yet conspicuously missing from — the standard library, including:
19877
19878 @itemize
19879 @item Atomic file saving, bolted on with fileutils
19880 @item A highly-optimized OrderedMultiDict, in dictutils
19881 @item Two types of PriorityQueue, in queueutils
19882 @item Chunked and windowed iteration, in iterutils
19883 @item Recursive data structure iteration and merging, with iterutils.remap
19884 @item Exponential backoff functionality, including jitter, through
19885 iterutils.backoff
19886 @item A full-featured TracebackInfo type, for representing stack traces, in
19887 tbutils
19888 @end itemize")
19889 (license license:bsd-3)))
19890
19891 (define-public python-eliot
19892 (package
19893 (name "python-eliot")
19894 (version "1.12.0")
19895 (source
19896 (origin
19897 (method url-fetch)
19898 (uri (pypi-uri "eliot" version))
19899 (sha256
19900 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
19901 (build-system python-build-system)
19902 (arguments
19903 `(#:phases
19904 (modify-phases %standard-phases
19905 (add-after 'unpack 'remove-journald-support
19906 (lambda _
19907 (for-each delete-file
19908 '("eliot/tests/test_journald.py"
19909 "eliot/journald.py"))
19910 #t))
19911 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
19912 ;; remove command-line tool's tests. TODO eliot-prettyprint should
19913 ;; be installed and these tests should pass.
19914 (lambda _
19915 (delete-file "eliot/tests/test_prettyprint.py")
19916 #t)))))
19917 (propagated-inputs
19918 `(("python-boltons" ,python-boltons)
19919 ("python-pyrsistent" ,python-pyrsistent)
19920 ("python-six" ,python-six)
19921 ("python-zope-interface" ,python-zope-interface)))
19922 (native-inputs
19923 `(("python-black" ,python-black)
19924 ("python-coverage" ,python-coverage)
19925 ("python-dask" ,python-dask)
19926 ("python-flake8" ,python-flake8)
19927 ("python-hypothesis" ,python-hypothesis)
19928 ("python-pytest" ,python-pytest)
19929 ("python-setuptools" ,python-setuptools)
19930 ("python-sphinx" ,python-sphinx)
19931 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
19932 ("python-testtools" ,python-testtools)
19933 ("python-twine" ,python-twine)
19934 ("python-twisted" ,python-twisted)))
19935 (home-page "https://github.com/itamarst/eliot/")
19936 (synopsis "Eliot: the logging system that tells you why it happened")
19937 (description
19938 "@dfn{eliot} is a Python logging system that outputs causal chains of
19939 actions: actions can spawn other actions, and eventually they either succeed
19940 or fail. The resulting logs tell you the story of what your software did: what
19941 happened, and what caused it.")
19942 (license license:asl2.0)))
19943
19944 (define-public python-pem
19945 (package
19946 (name "python-pem")
19947 (version "20.1.0")
19948 (source
19949 (origin
19950 (method url-fetch)
19951 (uri (pypi-uri "pem" version))
19952 (sha256
19953 (base32
19954 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
19955 (build-system python-build-system)
19956 (native-inputs
19957 `(("python-certifi" ,python-certifi)
19958 ("python-coverage" ,python-coverage)
19959 ("python-pretend" ,python-pretend)
19960 ("python-pyopenssl" ,python-pyopenssl)
19961 ("python-pytest" ,python-pytest)
19962 ("python-sphinx" ,python-sphinx)
19963 ("python-twisted" ,python-twisted)))
19964 (home-page "https://pem.readthedocs.io/")
19965 (synopsis "Easy PEM file parsing in Python")
19966 (description
19967 "This package provides a Python module for parsing and splitting PEM files.")
19968 (license license:expat)))
19969
19970 (define-public python-txsni
19971 ;; We need a few commits on top of 0.1.9 for compatibility with newer
19972 ;; Python and OpenSSL.
19973 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
19974 (revision "0"))
19975 (package
19976 (name "python-txsni")
19977 (version (git-version "0.1.9" revision commit))
19978 (home-page "https://github.com/glyph/txsni")
19979 (source
19980 (origin
19981 (method git-fetch)
19982 (uri (git-reference (url home-page) (commit commit)))
19983 (file-name (git-file-name name version))
19984 (sha256
19985 (base32
19986 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
19987 (build-system python-build-system)
19988 (propagated-inputs
19989 `(("python-pyopenssl" ,python-pyopenssl)
19990 ("python-service-identity" ,python-service-identity)
19991 ("python-twisted" ,python-twisted)))
19992 (synopsis "Run TLS servers with Twisted")
19993 (description
19994 "This package provides an easy-to-use SNI endpoint for use
19995 with the Twisted web framework.")
19996 (license license:expat))))
19997
19998 (define-public python-txacme
19999 (package
20000 (name "python-txacme")
20001 (version "0.9.2")
20002 (source
20003 (origin
20004 (method url-fetch)
20005 (uri (pypi-uri "txacme" version))
20006 (sha256
20007 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
20008 (build-system python-build-system)
20009 (propagated-inputs
20010 `(("python-acme" ,python-acme)
20011 ("python-attrs" ,python-attrs)
20012 ("python-eliot" ,python-eliot)
20013 ("python-josepy" ,python-josepy)
20014 ("python-pem" ,python-pem)
20015 ("python-treq" ,python-treq)
20016 ("python-twisted" ,python-twisted)
20017 ("python-txsni" ,python-txsni)))
20018 (native-inputs
20019 `(("python-fixtures" ,python-fixtures)
20020 ("python-hypothesis" ,python-hypothesis)
20021 ("python-mock" ,python-mock)
20022 ("python-service-identity"
20023 ,python-service-identity)
20024 ("python-testrepository" ,python-testrepository)
20025 ("python-testscenarios" ,python-testscenarios)
20026 ("python-testtools" ,python-testtools)))
20027 (home-page "https://github.com/twisted/txacme")
20028 (synopsis "Twisted implexmentation of the ACME protocol")
20029 (description
20030 "ACME is Automatic Certificate Management Environment, a protocol that
20031 allows clients and certificate authorities to automate verification and
20032 certificate issuance. The ACME protocol is used by the free Let's Encrypt
20033 Certificate Authority.
20034
20035 txacme is an implementation of the protocol for Twisted, the event-driven
20036 networking engine for Python.")
20037 (license license:expat)))
20038
20039 (define-public python-pysaml2
20040 (package
20041 (name "python-pysaml2")
20042 (version "5.0.0")
20043 (source
20044 (origin
20045 (method url-fetch)
20046 (uri (pypi-uri "pysaml2" version))
20047 (sha256
20048 (base32
20049 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
20050 (build-system python-build-system)
20051 (propagated-inputs
20052 `(("python-cryptography" ,python-cryptography)
20053 ("python-dateutil" ,python-dateutil)
20054 ("python-defusedxml" ,python-defusedxml)
20055 ("python-pyopenssl" ,python-pyopenssl)
20056 ("python-pytz" ,python-pytz)
20057 ("python-requests" ,python-requests)
20058 ("python-six" ,python-six)))
20059 (home-page "https://idpy.org")
20060 (synopsis "Python implementation of SAML Version 2 Standard")
20061 (description
20062 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
20063 It contains all necessary pieces for building a SAML2 service provider or
20064 an identity provider. The distribution contains examples of both.
20065
20066 This package was originally written to work in a WSGI environment, but
20067 there are extensions that allow you to use it with other frameworks.")
20068 (license license:asl2.0)))
20069
20070 (define-public python-click-plugins
20071 (package
20072 (name "python-click-plugins")
20073 (version "1.1.1")
20074 (source
20075 (origin
20076 (method url-fetch)
20077 (uri (pypi-uri "click-plugins" version))
20078 (sha256
20079 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
20080 (build-system python-build-system)
20081 (native-inputs
20082 `(("python-pytest" ,python-pytest)))
20083 (propagated-inputs
20084 `(("python-click" ,python-click)))
20085 (synopsis "Extension for Click to register external CLI commands")
20086 (description "This package provides n extension module for Click to
20087 register external CLI commands via setuptools entry-points.")
20088 (home-page "https://github.com/click-contrib/click-plugins")
20089 (license license:bsd-3)))
20090
20091 (define-public python-diceware
20092 (package
20093 (name "python-diceware")
20094 (version "0.9.6")
20095 (source
20096 (origin
20097 (method url-fetch)
20098 (uri (pypi-uri "diceware" version))
20099 (sha256
20100 (base32
20101 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
20102 (build-system python-build-system)
20103 (native-inputs
20104 `(("python-coverage" ,python-coverage)
20105 ("python-pytest" ,python-pytest)
20106 ("python-pytest-runner" ,python-pytest-runner)))
20107 (home-page "https://github.com/ulif/diceware/")
20108 (synopsis "Generates memorable passphrases")
20109 (description "This package generates passphrases by concatenating words
20110 randomly picked from wordlists. It supports several sources of
20111 randomness (including real life dice) and different wordlists (including
20112 cryptographically signed ones).")
20113 (license license:gpl3+)))
20114
20115 (define-public pyzo
20116 (package
20117 (name "pyzo")
20118 (version "4.10.2")
20119 (source
20120 (origin
20121 (method url-fetch)
20122 (uri (pypi-uri "pyzo" version))
20123 (sha256
20124 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
20125 (build-system python-build-system)
20126 (arguments
20127 `(#:phases
20128 (modify-phases %standard-phases
20129 (add-before 'check 'fix-home-directory
20130 (lambda _
20131 ;; Tests fail with "Permission denied: '/homeless-shelter'".
20132 (setenv "HOME" "/tmp")
20133 #t)))
20134 ;; Tests fail with "Uncaught Python exception: invalid literal for
20135 ;; int() with base 10: 'test'".
20136 #:tests? #f))
20137 (propagated-inputs
20138 `(("python-pyqt" ,python-pyqt)))
20139 (home-page "https://pyzo.org")
20140 (synopsis
20141 "Python IDE for scientific computing")
20142 (description
20143 "Pyzo is a Python IDE focused on interactivity and introspection,
20144 which makes it very suitable for scientific computing. Its practical
20145 design is aimed at simplicity and efficiency.
20146
20147 It consists of two main components, the editor and the shell, and uses
20148 a set of pluggable tools to help the programmer in various ways. Some
20149 example tools are source structure, project manager, interactive help,
20150 workspace...")
20151 (license license:bsd-2)))
20152
20153 (define-public python-osc
20154 (package
20155 (name "python-osc")
20156 (version "1.7.4")
20157 (source
20158 (origin
20159 (method url-fetch)
20160 (uri (pypi-uri "python-osc" version))
20161 (sha256
20162 (base32
20163 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
20164 (build-system python-build-system)
20165 (home-page "https://github.com/attwad/python-osc")
20166 (synopsis "Open Sound Control server and client implementations")
20167 (description
20168 "@code{python-osc} is a pure Python library with no external
20169 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
20170 Open Sound Control 1.0} specification.")
20171 (license license:unlicense)))
20172
20173 (define-public python-voluptuous
20174 (package
20175 (name "python-voluptuous")
20176 (version "0.11.7")
20177 (source
20178 (origin
20179 (method url-fetch)
20180 (uri (pypi-uri "voluptuous" version))
20181 (sha256
20182 (base32
20183 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
20184 (build-system python-build-system)
20185 (native-inputs
20186 `(("python-nose" ,python-nose)))
20187 (home-page "https://github.com/alecthomas/voluptuous")
20188 (synopsis "Python data validation library")
20189 (description
20190 "Voluptuous is a Python data validation library. It is primarily
20191 intended for validating data coming into Python as JSON, YAML, etc.")
20192 (license license:bsd-3)))
20193
20194 (define-public python-cmd2
20195 (package
20196 (name "python-cmd2")
20197 (version "1.0.2")
20198 (source
20199 (origin
20200 (method url-fetch)
20201 (uri (pypi-uri "cmd2" version))
20202 (sha256
20203 (base32
20204 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
20205 (build-system python-build-system)
20206 (propagated-inputs
20207 `(("python-attrs" ,python-attrs)
20208 ("python-colorama" ,python-colorama)
20209 ("python-pyperclip" ,python-pyperclip)
20210 ("python-wcwidth" ,python-wcwidth)))
20211 (native-inputs
20212 `(("python-codecov" ,python-codecov)
20213 ("python-coverage" ,python-coverage)
20214 ("python-doc8" ,python-doc8)
20215 ("python-flake8" ,python-flake8)
20216 ("python-invoke" ,python-invoke)
20217 ("python-mock" ,python-mock)
20218 ("python-pytest" ,python-pytest)
20219 ("python-pytest-cov" ,python-pytest-cov)
20220 ("python-pytest-mock" ,python-pytest-mock)
20221 ("python-setuptools-scm" ,python-setuptools-scm)
20222 ("python-sphinx" ,python-sphinx)
20223 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
20224 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
20225 ("python-tox" ,python-tox)
20226 ("python-twine" ,python-twine)
20227 ("which" ,which)))
20228 (home-page "https://github.com/python-cmd2/cmd2")
20229 (synopsis "Tool for building interactive command line applications")
20230 (description
20231 "Cmd2 is a tool for building interactive command line applications in
20232 Python. Its goal is to make it quick and easy for developers to build
20233 feature-rich and user-friendly interactive command line applications. It
20234 provides a simple API which is an extension of Python's built-in @code{cmd}
20235 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
20236 make your life easier and eliminates much of the boilerplate code which would
20237 be necessary when using @code{cmd}.")
20238 (license license:expat)))
20239
20240 (define-public python-pytidylib
20241 (package
20242 (name "python-pytidylib")
20243 (version "0.3.2")
20244 (source (origin
20245 (method url-fetch)
20246 (uri (pypi-uri "pytidylib" version))
20247 (sha256
20248 (base32
20249 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
20250 (build-system python-build-system)
20251 (arguments
20252 '(#:phases
20253 (modify-phases %standard-phases
20254 (add-before 'build 'qualify-libtidy
20255 (lambda* (#:key inputs #:allow-other-keys)
20256 (let ((libtidy (string-append (assoc-ref inputs "tidy")
20257 "/lib/libtidy.so")))
20258 (substitute* "tidylib/tidy.py"
20259 (("ctypes\\.util\\.find_library\\('tidy'\\)")
20260 (format #f "'~a'" libtidy)))
20261 #t))))))
20262 (inputs `(("tidy" ,tidy)))
20263 (home-page "https://github.com/countergram/pytidylib")
20264 (synopsis "Python wrapper for HTML Tidy library")
20265 (description
20266 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
20267 allows you, from Python code, to “fix” invalid (X)HTML markup.")
20268 (license license:expat)))
20269
20270 (define-public python2-pytidylib
20271 (package-with-python2 python-pytidylib))
20272
20273 (define-public python-mujson
20274 (package
20275 (name "python-mujson")
20276 (version "1.4")
20277 (source
20278 (origin
20279 (method url-fetch)
20280 (uri (pypi-uri "mujson" version))
20281 (sha256
20282 (base32
20283 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
20284 (build-system python-build-system)
20285 (home-page "https://github.com/mattgiles/mujson")
20286 (synopsis "Use the fastest JSON functions available at import time")
20287 (description "This packages selects the fastest JSON functions available
20288 at import time.")
20289 (license license:expat)))
20290
20291 (define-public python-bashlex
20292 (package
20293 (name "python-bashlex")
20294 (version "0.14")
20295 (source
20296 (origin
20297 (method url-fetch)
20298 (uri (pypi-uri "bashlex" version))
20299 (sha256
20300 (base32
20301 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
20302 (build-system python-build-system)
20303 (arguments
20304 `(#:phases
20305 (modify-phases %standard-phases
20306 (add-before 'build 'pregenerate-yacc-tables
20307 (lambda _
20308 ;; parser.py caches tables, which attempts to write to site lib
20309 ;; see https://github.com/idank/bashlex/issues/51
20310 (invoke "python" "-c" "import bashlex"))))))
20311 (home-page
20312 "https://github.com/idank/bashlex")
20313 (synopsis "Python parser for bash")
20314 (description "@code{bashlex} is a Python port of the parser used
20315 internally by GNU bash.
20316
20317 For the most part it's transliterated from C, the major differences are:
20318
20319 @itemize
20320 @item it does not execute anything
20321 @item it is reentrant
20322 @item it generates a complete AST
20323 @end itemize
20324 ")
20325 (license license:gpl3+)))