Merge remote-tracking branch 'origin/master' into wip-haskell
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016, 2020 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
35 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
36 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
37 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
38 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
39 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
40 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017, 2020 Roel Janssen <roel@gnu.org>
43 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
60 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
61 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
62 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
63 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
64 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
65 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
66 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
67 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
68 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
69 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
70 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
71 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
72 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
73 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
74 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
75 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
76 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
77 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
78 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
79 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
80 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
81 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
82 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
83 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
84 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
85 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
86 ;;;
87 ;;; This file is part of GNU Guix.
88 ;;;
89 ;;; GNU Guix is free software; you can redistribute it and/or modify it
90 ;;; under the terms of the GNU General Public License as published by
91 ;;; the Free Software Foundation; either version 3 of the License, or (at
92 ;;; your option) any later version.
93 ;;;
94 ;;; GNU Guix is distributed in the hope that it will be useful, but
95 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
96 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
97 ;;; GNU General Public License for more details.
98 ;;;
99 ;;; You should have received a copy of the GNU General Public License
100 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
101
102 (define-module (gnu packages python-xyz)
103 #:use-module ((guix licenses) #:prefix license:)
104 #:use-module (gnu packages)
105 #:use-module (gnu packages algebra)
106 #:use-module (gnu packages adns)
107 #:use-module (gnu packages attr)
108 #:use-module (gnu packages backup)
109 #:use-module (gnu packages bash)
110 #:use-module (gnu packages check)
111 #:use-module (gnu packages cmake)
112 #:use-module (gnu packages compression)
113 #:use-module (gnu packages crypto)
114 #:use-module (gnu packages databases)
115 #:use-module (gnu packages dbm)
116 #:use-module (gnu packages enchant)
117 #:use-module (gnu packages file)
118 #:use-module (gnu packages fontutils)
119 #:use-module (gnu packages gcc)
120 #:use-module (gnu packages geo)
121 #:use-module (gnu packages ghostscript)
122 #:use-module (gnu packages gl)
123 #:use-module (gnu packages glib)
124 #:use-module (gnu packages gnome)
125 #:use-module (gnu packages graphviz)
126 #:use-module (gnu packages graphics)
127 #:use-module (gnu packages gsasl)
128 #:use-module (gnu packages gstreamer)
129 #:use-module (gnu packages gtk)
130 #:use-module (gnu packages icu4c)
131 #:use-module (gnu packages image)
132 #:use-module (gnu packages imagemagick)
133 #:use-module (gnu packages kerberos)
134 #:use-module (gnu packages libevent)
135 #:use-module (gnu packages libffi)
136 #:use-module (gnu packages linux)
137 #:use-module (gnu packages llvm)
138 #:use-module (gnu packages man)
139 #:use-module (gnu packages maths)
140 #:use-module (gnu packages monitoring)
141 #:use-module (gnu packages multiprecision)
142 #:use-module (gnu packages networking)
143 #:use-module (gnu packages ncurses)
144 #:use-module (gnu packages openstack)
145 #:use-module (gnu packages pcre)
146 #:use-module (gnu packages perl)
147 #:use-module (gnu packages photo)
148 #:use-module (gnu packages pkg-config)
149 #:use-module (gnu packages python)
150 #:use-module (gnu packages python-check)
151 #:use-module (gnu packages python-compression)
152 #:use-module (gnu packages python-crypto)
153 #:use-module (gnu packages python-science)
154 #:use-module (gnu packages python-web)
155 #:use-module (gnu packages qt)
156 #:use-module (gnu packages readline)
157 #:use-module (gnu packages sdl)
158 #:use-module (gnu packages search)
159 #:use-module (gnu packages shells)
160 #:use-module (gnu packages sphinx)
161 #:use-module (gnu packages ssh)
162 #:use-module (gnu packages terminals)
163 #:use-module (gnu packages tex)
164 #:use-module (gnu packages texinfo)
165 #:use-module (gnu packages textutils)
166 #:use-module (gnu packages time)
167 #:use-module (gnu packages tls)
168 #:use-module (gnu packages version-control)
169 #:use-module (gnu packages video)
170 #:use-module (gnu packages web)
171 #:use-module (gnu packages base)
172 #:use-module (gnu packages xml)
173 #:use-module (gnu packages xorg)
174 #:use-module (gnu packages xdisorg)
175 #:use-module (gnu packages tcl)
176 #:use-module (gnu packages bdw-gc)
177 #:use-module (gnu packages serialization)
178 #:use-module (guix packages)
179 #:use-module (guix download)
180 #:use-module (guix git-download)
181 #:use-module (guix hg-download)
182 #:use-module (guix utils)
183 #:use-module (guix build-system gnu)
184 #:use-module (guix build-system cmake)
185 #:use-module (guix build-system python)
186 #:use-module (guix build-system trivial)
187 #:use-module (srfi srfi-1)
188 #:use-module (srfi srfi-26))
189
190 (define-public python-tenacity
191 (package
192 (name "python-tenacity")
193 (version "6.1.0")
194 (source (origin
195 (method url-fetch)
196 (uri (pypi-uri "tenacity" version))
197 (sha256
198 (base32
199 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
200 (build-system python-build-system)
201 (native-inputs
202 `(("python-setuptools-scm" ,python-setuptools-scm)
203 ("python-sphinx" ,python-sphinx)
204 ("python-tornado" ,python-tornado)
205 ("python-pytest" ,python-pytest)))
206 (propagated-inputs
207 `(("python-six" ,python-six)))
208 (arguments
209 `(#:phases (modify-phases %standard-phases
210 (replace 'check
211 (lambda _
212 (invoke "pytest")
213 #t)))))
214 (home-page "https://github.com/jd/tenacity")
215 (synopsis "Retrying library for python")
216 (description "Tenacity is a general-purpose python library to simplify the
217 task of adding retry behavior to just about anything.")
218 (license license:asl2.0)))
219
220 (define-public python-colorlog
221 (package
222 (name "python-colorlog")
223 (version "4.1.0")
224 (source (origin
225 (method url-fetch)
226 (uri (pypi-uri "colorlog" version))
227 (sha256
228 (base32
229 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
230 (build-system python-build-system)
231 (native-inputs
232 `(("python-pytest" ,python-pytest)))
233 (arguments
234 `(#:phases (modify-phases %standard-phases
235 (replace 'check
236 (lambda _
237 ;; Extend PYTHONPATH so the built package will be found.
238 (setenv "PYTHONPATH"
239 (string-append (getcwd) "/build/lib:"
240 (getenv "PYTHONPATH")))
241 (invoke "pytest" "-p" "no:logging")
242 #t)))))
243 (home-page "https://github.com/borntyping/python-colorlog")
244 (synopsis "Log formatting with colors for python")
245 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
246 with Python's logging module that outputs records using terminal colors.")
247 (license license:expat)))
248
249 (define-public python-pyprind
250 (package
251 (name "python-pyprind")
252 (version "2.11.2")
253 (source (origin
254 (method url-fetch)
255 (uri (pypi-uri "PyPrind" version))
256 (sha256
257 (base32
258 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
259 (build-system python-build-system)
260 (propagated-inputs
261 `(("python-psutil" ,python-psutil)))
262 (home-page "https://github.com/rasbt/pyprind")
263 (synopsis "Python Progress Bar and Percent Indicator Utility")
264 (description "The PyPrind (Python Progress Indicator) module provides a
265 progress bar and a percentage indicator object that let you track the progress
266 of a loop structure or other iterative computation.")
267 (license license:bsd-3)))
268
269 (define-public python-gphoto2
270 (package
271 (name "python-gphoto2")
272 (version "2.2.1")
273 (source (origin
274 (method url-fetch)
275 (uri (pypi-uri "gphoto2" version))
276 (sha256
277 (base32
278 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
279 (build-system python-build-system)
280 (native-inputs
281 `(("pkg-config" ,pkg-config)))
282 (inputs
283 `(("libgphoto2" ,libgphoto2)))
284 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
285 (synopsis "Python interface to libgphoto2")
286 (description "@code{python-gphoto2} is a comprehensive Python interface
287 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
288 automatically generate the interface code.")
289 (license license:gpl3+)))
290
291 (define-public python-colour
292 (package
293 (name "python-colour")
294 (version "0.1.5")
295 (source (origin
296 (method url-fetch)
297 (uri (pypi-uri "colour" version))
298 (sha256
299 (base32
300 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
301 (build-system python-build-system)
302 (native-inputs
303 `(("python-d2to1" ,python-d2to1)))
304 (home-page "https://github.com/vaab/colour")
305 (synopsis "Convert and manipulate various color representations")
306 (description "Pythonic way to manipulate color representations (HSL, RVB,
307 web, X11, ...).")
308 (license license:expat)))
309
310 (define-public python-d2to1
311 (package
312 (name "python-d2to1")
313 (version "0.2.12.post1")
314 (source (origin
315 (method url-fetch)
316 (uri (pypi-uri "d2to1" version))
317 (sha256
318 (base32
319 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
320 (build-system python-build-system)
321 (native-inputs
322 `(("python-nose" ,python-nose)))
323 (home-page "https://github.com/embray/d2to1")
324 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
325 in python")
326 (description "The python package d2to1 (the d is for distutils) allows
327 using distutils2-like setup.cfg files for a package's metadata with a
328 distribute/setuptools setup.py script.")
329 (license license:bsd-2)))
330
331 (define-public python-rawkit
332 (package
333 (name "python-rawkit")
334 (version "0.6.0")
335 (source (origin
336 (method url-fetch)
337 (uri (pypi-uri "rawkit" version))
338 (sha256
339 (base32
340 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
341 (build-system python-build-system)
342 (native-inputs
343 `(("python-pytest" ,python-pytest)
344 ("python-mock" ,python-mock)))
345 (inputs
346 `(("libraw" ,libraw)))
347 (home-page "https://rawkit.readthedocs.io")
348 (synopsis "Ctypes-based LibRaw binding for Python")
349 (description "The rawkit package provides two modules: rawkit and libraw.
350 The rawkit module provides a high-level Pythonic interface for developing raw
351 photos, while the libraw module provides a CTypes based interface for
352 interacting with the low-level LibRaw C APIs.")
353 (license license:expat)))
354
355 (define-public python-easygui
356 (package
357 (name "python-easygui")
358 (version "0.98.1")
359 (source (origin
360 (method url-fetch)
361 (uri (pypi-uri "easygui" version))
362 (sha256
363 (base32
364 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
365 (build-system python-build-system)
366 (propagated-inputs
367 `(("python-tkinter" ,python "tk")))
368 (home-page "https://github.com/robertlugg/easygui")
369 (synopsis "GUI programming module for Python")
370 (description "EasyGUI is a module for very simple, very easy GUI
371 programming in Python. EasyGUI is different from other GUI generators in that
372 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
373 simple function calls.")
374 (license license:bsd-3)))
375
376 (define-public python-pymediainfo
377 (package
378 (name "python-pymediainfo")
379 (version "4.1")
380 (source
381 (origin
382 (method url-fetch)
383 (uri (pypi-uri "pymediainfo" version))
384 (sha256
385 (base32
386 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
387 (build-system python-build-system)
388 (native-inputs
389 `(("python-setuptools-scm" ,python-setuptools-scm)
390 ("python-pytest" ,python-pytest)))
391 (inputs
392 `(("libmediainfo" ,libmediainfo)))
393 (arguments
394 `(#:phases
395 (modify-phases %standard-phases
396 (add-after 'unpack 'patch-libmediainfo
397 (lambda _
398 (substitute* "pymediainfo/__init__.py"
399 (("libmediainfo.so.0")
400 (string-append (assoc-ref %build-inputs "libmediainfo")
401 "/lib/libmediainfo.so.0")))
402 #t))
403 (replace 'check
404 (lambda _
405 ;; Extend PYTHONPATH so the built package will be found.
406 (setenv "PYTHONPATH"
407 (string-append (getcwd) "/build/lib:"
408 (getenv "PYTHONPATH")))
409 ;; Skip the only failing test "test_parse_url"
410 (invoke "pytest" "-vv" "-k" "not test_parse_url")
411 #t)))))
412 (home-page
413 "https://github.com/sbraz/pymediainfo")
414 (synopsis
415 "Python wrapper for the mediainfo library")
416 (description
417 "Python wrapper for the mediainfo library to access the technical and tag
418 data for video and audio files.")
419 (license license:expat)))
420
421 (define-public python-psutil
422 (package
423 (name "python-psutil")
424 (version "5.7.2")
425 (source
426 (origin
427 (method url-fetch)
428 (uri (pypi-uri "psutil" version))
429 (sha256
430 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
431 (build-system python-build-system)
432 (arguments
433 ;; FIXME: some tests do not return and time out. Some tests fail because
434 ;; some processes survive kill().
435 '(#:tests? #f))
436 (home-page "https://www.github.com/giampaolo/psutil")
437 (synopsis "Library for retrieving information on running processes")
438 (description
439 "psutil (Python system and process utilities) is a library for retrieving
440 information on running processes and system utilization (CPU, memory, disks,
441 network) in Python. It is useful mainly for system monitoring, profiling and
442 limiting process resources and management of running processes. It implements
443 many functionalities offered by command line tools such as: ps, top, lsof,
444 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
445 pidof, tty, taskset, pmap.")
446 (properties `((python2-variant . ,(delay python2-psutil))))
447 (license license:bsd-3)))
448
449 (define-public python2-psutil
450 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
451 (package
452 (inherit base)
453 (propagated-inputs
454 `(("python2-enum34" ,python2-enum34) ;optional
455 ,@(package-propagated-inputs base))))))
456
457 (define-public python-shapely
458 (package
459 (name "python-shapely")
460 (version "1.6.4.post2")
461 (source
462 (origin
463 (method url-fetch)
464 (uri (pypi-uri "Shapely" version))
465 (sha256
466 (base32
467 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
468 (build-system python-build-system)
469 (native-inputs
470 `(("python-cython" ,python-cython)
471 ("python-matplotlib" ,python-matplotlib)
472 ("python-pytest" ,python-pytest)
473 ("python-pytest-cov" ,python-pytest-cov)))
474 (inputs
475 `(("geos" ,geos)))
476 (propagated-inputs
477 `(("python-numpy" ,python-numpy)))
478 (arguments
479 `(#:phases
480 (modify-phases %standard-phases
481 (add-after 'unpack 'patch-geos-path
482 (lambda* (#:key inputs #:allow-other-keys)
483 (let ((geos (assoc-ref inputs "geos"))
484 (glibc (assoc-ref inputs ,(if (%current-target-system)
485 "cross-libc" "libc"))))
486 (substitute* "shapely/geos.py"
487 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
488 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
489 geos "/lib/libgeos_c.so'])"))
490 (("free = load_dll\\('c'\\)\\.free")
491 (string-append "free = load_dll('c', fallbacks=['"
492 glibc "/lib/libc.so.6']).free"))))
493 #t)))))
494 (home-page "https://github.com/Toblerity/Shapely")
495 (synopsis "Library for the manipulation and analysis of geometric objects")
496 (description "Shapely is a Python package for manipulation and analysis of
497 planar geometric objects. It is based on the @code{GEOS} library.")
498 (license license:bsd-3)))
499
500 (define-public python-shortuuid
501 (package
502 (name "python-shortuuid")
503 (version "0.5.0")
504 (source
505 (origin
506 (method url-fetch)
507 (uri (pypi-uri "shortuuid" version))
508 (sha256
509 (base32
510 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
511 (build-system python-build-system)
512 (native-inputs
513 `(("python-pep8" ,python-pep8)))
514 (home-page "https://github.com/skorokithakis/shortuuid")
515 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
516 (description
517 "@code{shortuuid} is a Python library for generating concise, unambiguous
518 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
519 module and then similar looking characters are removed.")
520 (license license:bsd-3)))
521
522 (define-public python-logwrap
523 (package
524 (name "python-logwrap")
525 (version "3.2.1")
526 (source
527 (origin
528 (method url-fetch)
529 (uri (pypi-uri "logwrap" version ".zip"))
530 (sha256
531 (base32
532 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
533 (build-system python-build-system)
534 (propagated-inputs
535 `(("python-six" ,python-six)
536 ("python-typing" ,python-typing)))
537 (native-inputs
538 `(("unzip" ,unzip)
539 ("python-cython" ,python-cython)
540 ("python-pytest" ,python-pytest)
541 ("python-pytest-cov" ,python-pytest-cov)
542 ("python-pytest-runner" ,python-pytest-runner)))
543 (home-page "https://github.com/penguinolog/logwrap")
544 (synopsis "Decorator for logging function arguments")
545 (description "This package provides a decorator to log function arguments
546 and function call return values in a human-readable way.")
547 (license license:asl2.0)))
548
549 (define-public python2-shapely
550 (package-with-python2 python-shapely))
551
552 (define-public python-clyent
553 (package
554 (name "python-clyent")
555 (version "1.2.1")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (pypi-uri "clyent" version))
560 (sha256
561 (base32
562 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
563 (build-system python-build-system)
564 (native-inputs
565 `(("python-mock" ,python-mock)))
566 (home-page "https://github.com/Anaconda-Platform/clyent")
567 (synopsis "Command line client library")
568 (description "Clyent is a Python command line utility library. It is used
569 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
570 (license license:bsd-3)))
571
572 (define-public python2-clyent
573 (package-with-python2 python-clyent))
574
575 (define-public python-babel
576 (package
577 (name "python-babel")
578 (version "2.8.0")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (pypi-uri "Babel" version))
583 (sha256
584 (base32
585 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
586 (build-system python-build-system)
587 (native-inputs
588 `(("python-freezegun" ,python-freezegun)
589 ("python-pytest" ,python-pytest)))
590 (propagated-inputs
591 `(("python-pytz" ,python-pytz)))
592 (arguments
593 `(#:phases (modify-phases %standard-phases
594 (replace 'check
595 (lambda _
596 (invoke "pytest" "-vv" "-k"
597 (string-append
598 ;; XXX: These tests fail when using Pytest 4.x and
599 ;; Babel 2.6.0. Try removing this for later versions.
600 "not test_no_inherit_metazone_marker_never_in_output"
601 " and not test_smoke_dates"
602 " and not test_smoke_numbers")))))))
603 (home-page "http://babel.pocoo.org/")
604 (synopsis
605 "Tools for internationalizing Python applications")
606 (description
607 "Babel is composed of two major parts:
608 - tools to build and work with gettext message catalogs
609 - a Python interface to the CLDR (Common Locale Data Repository), providing
610 access to various locale display names, localized number and date formatting,
611 etc. ")
612 (license license:bsd-3)))
613
614 (define-public python2-babel
615 (package-with-python2 python-babel))
616
617 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
618 (define-public python2-babel-2.6
619 (package
620 (inherit python2-babel)
621 (version "2.6.0")
622 (source (origin
623 (method url-fetch)
624 (uri (pypi-uri "Babel" version))
625 (sha256
626 (base32
627 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
628
629 (define-public python2-backport-ssl-match-hostname
630 (package
631 (name "python2-backport-ssl-match-hostname")
632 (version "3.5.0.1")
633 (source
634 (origin
635 (method url-fetch)
636 (uri (pypi-uri "backports.ssl_match_hostname" version))
637 (sha256
638 (base32
639 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
640 (build-system python-build-system)
641 (arguments
642 `(#:python ,python-2
643 #:tests? #f)) ; no test target
644 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
645 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
646 (description
647 "This backport brings the ssl.match_hostname() function to users of
648 earlier versions of Python. The function checks the hostname in the
649 certificate returned by the server to which a connection has been established,
650 and verifies that it matches the intended target hostname.")
651 (license license:psfl)))
652
653 (define-public python-bitarray
654 (package
655 (name "python-bitarray")
656 (version "1.4.0")
657 (source (origin
658 (method url-fetch)
659 (uri (pypi-uri "bitarray" version))
660 (sha256
661 (base32
662 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
663 (build-system python-build-system)
664 (home-page "https://github.com/ilanschnell/bitarray")
665 (synopsis "Efficient arrays of booleans")
666 (description "This package provides an object type which efficiently
667 represents an array of booleans. Bitarrays are sequence types and behave very
668 much like usual lists. Eight bits are represented by one byte in a contiguous
669 block of memory. The user can select between two representations:
670 little-endian and big-endian. All of the functionality is implemented in C.
671 Methods for accessing the machine representation are provided. This can be
672 useful when bit level access to binary files is required, such as portable
673 bitmap image files. Also, when dealing with compressed data which uses
674 variable bit length encoding, you may find this module useful.")
675 (license license:psfl)))
676
677 (define-public python-boolean.py
678 (package
679 (name "python-boolean.py")
680 (version "3.6")
681 (source
682 (origin
683 ;; There's no source tarball on PyPI.
684 (method git-fetch)
685 (uri (git-reference
686 (url "https://github.com/bastikr/boolean.py")
687 (commit (string-append "v" version))))
688 (file-name (git-file-name name version))
689 (sha256
690 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
691 (build-system python-build-system)
692 (home-page "https://github.com/bastikr/boolean.py")
693 (synopsis "Boolean algebra in one Python module")
694 (description
695 "This is a small Python library that implements boolean algebra.
696 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
697 @code{Symbol} class that can take on one of these two values. Calculations
698 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
699 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
700 Expressions are constructed from parsed strings or directly in Python.")
701 (license license:bsd-2)))
702
703 (define-public python-hdf4
704 (package
705 (name "python-hdf4")
706 (version "0.9")
707 (source
708 (origin
709 (method url-fetch)
710 (uri (pypi-uri name version))
711 (sha256
712 (base32
713 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
714 (build-system python-build-system)
715 (native-inputs `(("nose" ,python-nose)))
716 (propagated-inputs `(("numpy" ,python-numpy)))
717 (inputs
718 `(("hdf4" ,hdf4)
719 ("libjpeg" ,libjpeg-turbo)
720 ("zlib" ,zlib)))
721 (arguments
722 `(#:phases
723 (modify-phases %standard-phases
724 (replace 'check
725 (lambda _
726 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
727 ;; on to import numpy. Somehow this works on their CI system.
728 ;; Let's just manage PYTHONPATH here instead.
729 (substitute* "runexamples.sh"
730 (("export PYTHONPATH=.*") ""))
731 (setenv "PYTHONPATH"
732 (string-append (getcwd) ":"
733 (getenv "PYTHONPATH")))
734 (invoke "./runexamples.sh")
735 (invoke "nosetests" "-v"))))))
736 (home-page "https://github.com/fhs/python-hdf4")
737 (synopsis "Python interface to the NCSA HDF4 library")
738 (description
739 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
740 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
741 NetCDF files can also be read and modified. Python-HDF4 is a fork of
742 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
743 (license license:expat)))
744
745 (define-public python2-hdf4
746 (package-with-python2 python-hdf4))
747
748 (define-public python-h5py
749 (package
750 (name "python-h5py")
751 (version "2.10.0")
752 (source
753 (origin
754 (method url-fetch)
755 (uri (pypi-uri "h5py" version))
756 (sha256
757 (base32
758 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
759 (build-system python-build-system)
760 (arguments
761 `(#:tests? #f ; no test target
762 #:phases
763 (modify-phases %standard-phases
764 (add-after 'unpack 'fix-hdf5-paths
765 (lambda* (#:key inputs #:allow-other-keys)
766 (let ((prefix (assoc-ref inputs "hdf5")))
767 (substitute* "setup_build.py"
768 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
769 (string-append "['" prefix "/lib" "']"))
770 (("'/opt/local/include', '/usr/local/include'")
771 (string-append "'" prefix "/include" "'")))
772 (substitute* "setup_configure.py"
773 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
774 (string-append "['" prefix "/lib" "']")))
775 #t))))))
776 (propagated-inputs
777 `(("python-six" ,python-six)
778 ("python-numpy" ,python-numpy)))
779 (inputs
780 `(("hdf5" ,hdf5-1.10)))
781 (native-inputs
782 `(("python-cython" ,python-cython)
783 ("python-pkgconfig" ,python-pkgconfig)
784 ("pkg-config" ,pkg-config)))
785 (home-page "https://www.h5py.org/")
786 (synopsis "Read and write HDF5 files from Python")
787 (description
788 "The h5py package provides both a high- and low-level interface to the
789 HDF5 library from Python. The low-level interface is intended to be a
790 complete wrapping of the HDF5 API, while the high-level component supports
791 access to HDF5 files, datasets and groups using established Python and NumPy
792 concepts.")
793 (license license:bsd-3)))
794
795 (define-public python2-h5py
796 (package-with-python2 python-h5py))
797
798 (define-public python-sh
799 (package
800 (name "python-sh")
801 (version "1.12.14")
802 (source
803 (origin
804 (method url-fetch)
805 (uri (pypi-uri "sh" version))
806 (sha256
807 (base32
808 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
809 (build-system python-build-system)
810 (arguments
811 '(#:phases
812 (modify-phases %standard-phases
813 (replace 'check
814 (lambda _
815 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
816 (setenv "HOME" "/tmp")
817 (invoke "python" "sh.py" "test"))))))
818 (native-inputs
819 `(("python-coverage" ,python-coverage)))
820 (home-page "https://github.com/amoffat/sh")
821 (synopsis "Python subprocess replacement")
822 (description "This package provides a replacement for Python's
823 @code{subprocess} feature.")
824 (license license:expat)))
825
826 (define-public python2-sh
827 (package-with-python2 python-sh))
828
829 (define-public python-cftime
830 (package
831 (name "python-cftime")
832 (version "1.0.4.2")
833 (source
834 (origin
835 (method url-fetch)
836 (uri (pypi-uri "cftime" version))
837 (sha256
838 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
839 (build-system python-build-system)
840 (propagated-inputs
841 `(("python-numpy" ,python-numpy)))
842 (native-inputs
843 `(("python-coveralls" ,python-coveralls)
844 ("python-cython" ,python-cython)
845 ("python-pytest-cov" ,python-pytest-cov)))
846 (home-page "https://github.com/Unidata/cftime")
847 (synopsis "Library for time handling")
848 (description
849 "This package provides time-handling functionality that used to be part
850 of the netcdf4 package before.")
851 ;; This package claims to include code under the GPLv3 but is released
852 ;; under ISC.
853 (license (list license:isc license:gpl3+))))
854
855 (define-public python-netcdf4
856 (package
857 (name "python-netcdf4")
858 (version "1.5.3")
859 (source
860 (origin
861 (method url-fetch)
862 (uri (pypi-uri "netCDF4" version))
863 (sha256
864 (base32
865 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
866 (build-system python-build-system)
867 (arguments
868 '(#:phases
869 (modify-phases %standard-phases
870 (add-after 'unpack 'configure-locations
871 (lambda* (#:key inputs #:allow-other-keys)
872 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
873 #t)))))
874 (native-inputs
875 `(("python-cython" ,python-cython)))
876 (propagated-inputs
877 `(("python-numpy" ,python-numpy)
878 ("python-cftime" ,python-cftime)))
879 (inputs
880 `(("netcdf" ,netcdf)
881 ("hdf4" ,hdf4)
882 ("hdf5" ,hdf5)))
883 (home-page "https://github.com/Unidata/netcdf4-python")
884 (synopsis "Python/numpy interface to the netCDF library")
885 (description "Netcdf4-python is a Python interface to the netCDF C
886 library. netCDF version 4 has many features not found in earlier
887 versions of the library and is implemented on top of HDF5. This module
888 can read and write files in both the new netCDF 4 and the old netCDF 3
889 format, and can create files that are readable by HDF5 clients. The
890 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
891 to users of that module.")
892 ;; The software is mainly ISC, but includes some files covered
893 ;; by the Expat license.
894 (license (list license:isc license:expat))))
895
896 (define-public python2-netcdf4
897 (package-with-python2 python-netcdf4))
898
899 (define-public python-license-expression
900 (package
901 (name "python-license-expression")
902 (version "0.999")
903 (source
904 (origin
905 (method url-fetch)
906 (uri (pypi-uri "license-expression" version))
907 (sha256
908 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
909 (build-system python-build-system)
910 (propagated-inputs
911 `(("python-boolean.py" ,python-boolean.py)))
912 (home-page "https://github.com/nexB/license-expression")
913 (synopsis "Apply boolean logic to license expressions")
914 (description
915 "This Python module defines a tiny language to evaluate and compare
916 license expressions using boolean logic. Logical combinations of licenses can
917 be tested for equality, containment, and equivalence. They can be normalised
918 and simplified. It supports SPDX license expressions as well as other naming
919 conventions and aliases in the same expression.")
920 (license license:gpl2+)))
921
922 (define-public python-lockfile
923 (package
924 (name "python-lockfile")
925 (version "0.12.2")
926 (source
927 (origin
928 (method url-fetch)
929 (uri (pypi-uri "lockfile" version))
930 (sha256
931 (base32
932 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
933 (build-system python-build-system)
934 (arguments '(#:test-target "check"))
935 (native-inputs
936 `(("python-pbr" ,python-pbr)))
937 (home-page "https://launchpad.net/pylockfile")
938 (synopsis "Platform-independent file locking module")
939 (description
940 "The lockfile package exports a LockFile class which provides a simple
941 API for locking files.")
942 (license license:expat)))
943
944 (define-public python2-lockfile
945 (package-with-python2 python-lockfile))
946
947 (define-public python-filelock
948 (package
949 (name "python-filelock")
950 (version "3.0.12")
951 (source
952 (origin
953 (method url-fetch)
954 (uri (pypi-uri "filelock" version))
955 (sha256
956 (base32
957 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
958 (build-system python-build-system)
959 (home-page
960 "https://github.com/benediktschmitt/py-filelock")
961 (synopsis "Platform independent file lock")
962 (description "@code{filelock} contains a single module implementing
963 a platform independent file lock in Python, which provides a simple way of
964 inter-process communication.")
965 (license license:unlicense)))
966
967 (define-public python-semantic-version
968 (package
969 (name "python-semantic-version")
970 (version "2.6.0")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "semantic_version" version))
975 (sha256
976 (base32
977 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
978 (build-system python-build-system)
979 (arguments
980 `(#:tests? #f)) ; PyPI tarball lacks tests
981 (home-page "https://github.com/rbarrois/python-semanticversion")
982 (synopsis "Semantic versioning module for Python")
983 (description
984 "The @code{semantic_version} class is a small library for handling
985 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
986
987 It can compare versions, generate a new version that represents a bump in one of
988 the version levels, and check whether any given string is a proper semantic
989 version identifier.")
990 (license license:bsd-3)))
991
992 (define-public python2-semantic-version
993 (package-with-python2 python-semantic-version))
994
995 (define-public python-serpent
996 (package
997 (name "python-serpent")
998 (version "1.28")
999 (source
1000 (origin
1001 (method url-fetch)
1002 (uri (pypi-uri "serpent" version))
1003 (sha256
1004 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1005 (build-system python-build-system)
1006 (native-inputs
1007 `(("python-attrs" ,python-attrs)
1008 ("python-pytz" ,python-pytz)))
1009 (home-page "https://github.com/irmen/Serpent")
1010 (synopsis "Serializer for literal Python expressions")
1011 (description
1012 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1013 serialization. It serializes an object tree into bytes (an utf-8 encoded
1014 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1015 to rebuild the original object tree.
1016
1017 Because only safe literals are encoded, it is safe to send serpent data to
1018 other machines, such as over the network.")
1019 (properties `((python2-variant . ,(delay python2-serpent))))
1020 (license license:expat)))
1021
1022 (define-public python2-serpent
1023 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1024 (package
1025 (inherit base)
1026 (propagated-inputs
1027 `(("python-enum34" ,python2-enum34)
1028 ,@(package-propagated-inputs base))))))
1029
1030 (define-public python-setuptools
1031 (package
1032 (name "python-setuptools")
1033 (version "41.0.1")
1034 (source
1035 (origin
1036 (method url-fetch)
1037 (uri (pypi-uri "setuptools" version ".zip"))
1038 (sha256
1039 (base32
1040 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1041 (modules '((guix build utils)))
1042 (snippet
1043 '(begin
1044 ;; Remove included binaries which are used to build self-extracting
1045 ;; installers for Windows.
1046 ;; TODO: Find some way to build them ourself so we can include them.
1047 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1048 #t))))
1049 (build-system python-build-system)
1050 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1051 ;; One could bootstrap with an internal untested setuptools.
1052 (arguments
1053 `(#:tests? #f))
1054 (home-page "https://pypi.org/project/setuptools/")
1055 (synopsis
1056 "Library designed to facilitate packaging Python projects")
1057 (description
1058 "Setuptools is a fully-featured, stable library designed to facilitate
1059 packaging Python projects, where packaging includes:
1060 Python package and module definitions,
1061 distribution package metadata,
1062 test hooks,
1063 project installation,
1064 platform-specific details,
1065 Python 3 support.")
1066 ;; TODO: setuptools now bundles the following libraries:
1067 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1068 (license (list license:psfl ; setuptools itself
1069 license:expat ; six, appdirs, pyparsing
1070 license:asl2.0 ; packaging is dual ASL2/BSD-2
1071 license:bsd-2))))
1072
1073 (define-public python2-setuptools
1074 (package-with-python2 python-setuptools))
1075
1076 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1077 (define-public python-setuptools-for-tensorflow
1078 (hidden-package
1079 (package
1080 (inherit python-setuptools)
1081 (version "39.1.0")
1082 (source (origin
1083 (inherit (package-source python-setuptools))
1084 (uri (pypi-uri "setuptools" version ".zip"))
1085 (sha256
1086 (base32
1087 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1088
1089 (define-public python-uniseg
1090 (package
1091 (name "python-uniseg")
1092 (version "0.7.1")
1093 (source
1094 (origin
1095 (method url-fetch)
1096 (uri (pypi-uri "uniseg" version ".zip"))
1097 (sha256
1098 (base32
1099 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1100 (build-system python-build-system)
1101 (arguments
1102 '(#:tests? #f)) ; The test suite requires network access.
1103 (native-inputs
1104 `(("unzip" ,unzip)))
1105 (home-page
1106 "https://bitbucket.org/emptypage/uniseg-python")
1107 (synopsis
1108 "Python library to determine Unicode text segmentations")
1109 (description
1110 "Uniseg is a Python package used to determine Unicode text segmentations.
1111 Supported segmentations include:
1112 @enumerate
1113 @item @dfn{Code point} (any value in the Unicode codespace)
1114 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1115 multiple Unicode code points, e.g. \"G\" + acute-accent)
1116 @item Word break
1117 @item Sentence break
1118 @item Line break
1119 @end enumerate")
1120 (license license:expat)))
1121
1122 (define-public python2-uniseg
1123 (package-with-python2 python-uniseg))
1124
1125 (define-public python-humanfriendly
1126 (package
1127 (name "python-humanfriendly")
1128 (version "8.2")
1129 (source
1130 (origin
1131 (method url-fetch)
1132 (uri (pypi-uri "humanfriendly" version))
1133 (sha256
1134 (base32
1135 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1136 (build-system python-build-system)
1137 (arguments
1138 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1139 #:tests? #f))
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 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1149 (license license:expat)))
1150
1151 (define-public python2-humanfriendly
1152 (let ((base (package-with-python2
1153 (strip-python2-variant python-humanfriendly))))
1154 (package (inherit base)
1155 (propagated-inputs
1156 `(("python2-monotonic" ,python2-monotonic)
1157 ,@(package-propagated-inputs base))))))
1158
1159 (define-public python-textparser
1160 (package
1161 (name "python-textparser")
1162 (version "0.23.0")
1163 (source
1164 (origin
1165 (method url-fetch)
1166 (uri (pypi-uri "textparser" version))
1167 (sha256
1168 (base32
1169 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1170 (build-system python-build-system)
1171 (home-page "https://github.com/eerimoq/textparser")
1172 (synopsis "Fast text parser for Python")
1173 (description "This library provides a text parser written in the Python
1174 language. It aims to be fast.")
1175 (license license:expat)))
1176
1177 (define-public python-aenum
1178 (package
1179 (name "python-aenum")
1180 (version "2.2.4")
1181 (source
1182 (origin
1183 (method url-fetch)
1184 (uri (pypi-uri "aenum" version))
1185 (sha256
1186 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1187 (build-system python-build-system)
1188 (arguments
1189 `(#:phases (modify-phases %standard-phases
1190 (replace 'check
1191 (lambda _
1192 (format #t "current working dir ~s~%" (getcwd))
1193 (setenv "PYTHONPATH"
1194 (string-append ".:" (getenv "PYTHONPATH")))
1195 ;; We must run the test suite module directly, as it
1196 ;; fails to define the 'tempdir' variable in scope for
1197 ;; the tests otherwise
1198 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1199 ;; issues/32/running-tests-with-python-setuppy-test).
1200 (invoke "python3" "aenum/test.py")
1201 ;; This one fails with "NameError: name
1202 ;; 'test_pickle_dump_load' is not defined" (see:
1203 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1204 ;; /error-running-the-test_v3py-test-suite).
1205 ;; (invoke "python3" "aenum/test_v3.py")
1206 #t)))))
1207 (home-page "https://bitbucket.org/stoneleaf/aenum")
1208 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1209 (description "The aenum library includes an @code{Enum} base class, a
1210 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1211 class.")
1212 (license license:bsd-3)))
1213
1214 (define-public python-can
1215 (package
1216 (name "python-can")
1217 (version "3.3.3")
1218 (source
1219 (origin
1220 (method url-fetch)
1221 (uri (pypi-uri "python-can" version))
1222 (sha256
1223 (base32
1224 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1225 (build-system python-build-system)
1226 (arguments
1227 `(#:phases (modify-phases %standard-phases
1228 (add-after 'unpack 'relax-version-requirements
1229 (lambda _
1230 (substitute* "setup.py"
1231 (("mock~=2\\.0") "mock")
1232 (("coverage<5") "coverage")
1233 (("pytest~=4\\.3") "pytest")
1234 (("hypothesis~=4\\.56") "hypothesis"))
1235 #t))
1236 (add-after 'unpack 'fix-broken-tests
1237 ;; The tests try to run two scripts it expects should be
1238 ;; in PATH, but they aren't at this time (see:
1239 ;; https://github.com/hardbyte/python-can/issues/805).
1240 (lambda _
1241 (substitute* "test/test_scripts.py"
1242 (("\"can_logger\\.py --help\"") "")
1243 (("\"can_player\\.py --help\"") ""))
1244 #t)))))
1245 (propagated-inputs
1246 `(("python-aenum" ,python-aenum)
1247 ("python-wrapt" ,python-wrapt)))
1248 (native-inputs
1249 `(("python-codecov" ,python-codecov)
1250 ("python-coverage" ,python-coverage)
1251 ("python-future" ,python-future)
1252 ("python-hypothesis" ,python-hypothesis)
1253 ("python-mock" ,python-mock)
1254 ("python-pyserial" ,python-pyserial)
1255 ("python-pytest" ,python-pytest)
1256 ("python-pytest-cov" ,python-pytest-cov)
1257 ("python-pytest-runner" ,python-pytest-runner)
1258 ("python-pytest-timeout" ,python-pytest-timeout)))
1259 (home-page "https://github.com/hardbyte/python-can")
1260 (synopsis "Controller Area Network (CAN) interface module for Python")
1261 (description "This package defines the @code{can} module, which provides
1262 controller area network (CAN) support for Python developers; providing common
1263 abstractions to different hardware devices, and a suite of utilities for
1264 sending and receiving messages on a CAN bus.")
1265 (license license:lgpl3+)))
1266
1267 (define-public python-diskcache
1268 (package
1269 (name "python-diskcache")
1270 (version "4.1.0")
1271 (source
1272 (origin
1273 (method url-fetch)
1274 (uri (pypi-uri "diskcache" version))
1275 (sha256
1276 (base32
1277 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1278 (build-system python-build-system)
1279 (arguments
1280 `(#:tests? #f)) ;test suite not included in the release
1281 (home-page "http://www.grantjenks.com/docs/diskcache/")
1282 (synopsis "Disk and file backed cache library")
1283 (description "DiskCache is a disk and file backed persistent cache.")
1284 (license license:asl2.0)))
1285
1286 (define-public python-bitstruct
1287 (package
1288 (name "python-bitstruct")
1289 (version "8.9.0")
1290 (source
1291 (origin
1292 (method url-fetch)
1293 (uri (pypi-uri "bitstruct" version))
1294 (sha256
1295 (base32
1296 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1297 (build-system python-build-system)
1298 (home-page "https://github.com/eerimoq/bitstruct")
1299 (synopsis "Python values to and C bit field structs converter")
1300 (description "This module performs conversions between Python values and C
1301 bit field structs represented as Python byte strings. It is intended to have
1302 a similar interface as the @code{struct} module from Python, but working on
1303 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1304 (license license:expat)))
1305
1306 (define-public python-cantools
1307 (package
1308 (name "python-cantools")
1309 (version "33.1.1")
1310 (source
1311 (origin
1312 ;; We take the sources from the Git repository as the documentation is
1313 ;; not included with the PyPI archive.
1314 (method git-fetch)
1315 (uri (git-reference
1316 (url "https://github.com/eerimoq/cantools")
1317 (commit version)))
1318 (file-name (git-file-name name version))
1319 (sha256
1320 (base32
1321 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1322 (build-system python-build-system)
1323 (arguments
1324 `(#:phases
1325 (modify-phases %standard-phases
1326 (add-after 'build 'build-doc
1327 (lambda _
1328 ;; See: https://github.com/eerimoq/cantools/issues/190.
1329 (substitute* "README.rst"
1330 (("https://github.com/eerimoq/cantools/raw/master\
1331 /docs/monitor.png")
1332 "monitor.png"))
1333 (with-directory-excursion "docs"
1334 (invoke "make" "man" "info"))))
1335 (add-after 'install 'install-doc
1336 (lambda* (#:key outputs #:allow-other-keys)
1337 (let* ((out (assoc-ref outputs "out"))
1338 (info (string-append out "/share/info"))
1339 (man1 (string-append out "/share/man/man1")))
1340 (format #t "CWD: ~s~%" (getcwd))
1341 (install-file "docs/_build/texinfo/cantools.info" info)
1342 (install-file "docs/_build/man/cantools.1" man1)
1343 #t))))))
1344 (native-inputs
1345 `(("sphinx" ,python-sphinx)
1346 ("texinfo" ,texinfo)))
1347 (propagated-inputs
1348 `(("python-bitstruct" ,python-bitstruct)
1349 ("python-can" ,python-can)
1350 ("python-diskcache" ,python-diskcache)
1351 ("python-textparser" ,python-textparser)))
1352 (home-page "https://github.com/eerimoq/cantools")
1353 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1354 (description "This package includes Controller Area Network (CAN) related
1355 tools that can be used to:
1356 @itemize
1357 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1358 @item encode and decode CAN messages
1359 @item multiplex simple and extended signals
1360 @item diagnose DID encoding and decoding
1361 @item dump the CAN decoder output
1362 @item test CAN nodes
1363 @item generate C source code
1364 @item monitor the CAN bus
1365 @end itemize")
1366 (license license:expat)))
1367
1368 (define-public python-capturer
1369 (package
1370 (name "python-capturer")
1371 (version "2.4")
1372 (source
1373 (origin
1374 (method url-fetch)
1375 (uri (pypi-uri "capturer" version))
1376 (sha256
1377 (base32
1378 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1379 (build-system python-build-system)
1380 (arguments
1381 `(#:tests? #f))
1382 (propagated-inputs
1383 `(("python-humanfriendly" ,python-humanfriendly)))
1384 (home-page "https://capturer.readthedocs.io")
1385 (synopsis "Capture stdout and stderr streams of the current process")
1386 (description
1387 "The capturer package makes it easy to capture the stdout and stderr
1388 streams of the current process and subprocesses. Output can be relayed
1389 to the terminal in real time but is also available to the Python program
1390 for additional processing.")
1391 (license license:expat)))
1392
1393 (define-public python2-capturer
1394 (package-with-python2 python-capturer))
1395
1396 (define-public python-case
1397 (package
1398 (name "python-case")
1399 (version "1.5.3")
1400 (source
1401 (origin
1402 (method url-fetch)
1403 (uri (pypi-uri "case" version))
1404 (sha256
1405 (base32
1406 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1407 (build-system python-build-system)
1408 (propagated-inputs
1409 `(("python-mock" ,python-mock)
1410 ("python-nose" ,python-nose)
1411 ("python-six" ,python-six)
1412 ("python-unittest2" ,python-unittest2)))
1413 (native-inputs
1414 `(("python-coverage" ,python-coverage)))
1415 (home-page "https://github.com/celery/case")
1416 (synopsis "Unittest utilities and convenience methods")
1417 (description
1418 "The @code{case} package provides utilities on top of unittest, including
1419 some helpful Python 2 compatibility convenience methods.")
1420 (license license:bsd-3)))
1421
1422 (define-public python-verboselogs
1423 (package
1424 (name "python-verboselogs")
1425 (version "1.7")
1426 (source
1427 (origin
1428 (method url-fetch)
1429 (uri (pypi-uri "verboselogs" version))
1430 (sha256
1431 (base32
1432 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1433 (build-system python-build-system)
1434 (arguments
1435 `(#:phases
1436 (modify-phases %standard-phases
1437 (replace 'check
1438 (lambda _
1439 ;; Do not run pylint plugin test, as astroid is an old
1440 ;; unsupported version.
1441 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1442 "verboselogs/tests.py"))))))
1443 (native-inputs
1444 `(("python-mock" ,python-mock)
1445 ("python-pytest" ,python-pytest)))
1446 (home-page "https://verboselogs.readthedocs.io")
1447 (synopsis "Verbose logging level for Python's logging module")
1448 (description
1449 "The @code{verboselogs} package extends Python's @code{logging} module to
1450 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1451 (license license:expat)))
1452
1453 (define-public python2-verboselogs
1454 (package-with-python2 python-verboselogs))
1455
1456 (define-public python-coloredlogs
1457 (package
1458 (name "python-coloredlogs")
1459 (version "10.0")
1460 (source
1461 (origin
1462 (method url-fetch)
1463 (uri (pypi-uri "coloredlogs" version))
1464 (sha256
1465 (base32
1466 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1467 (build-system python-build-system)
1468 (arguments
1469 `(;Tests require some updated modules
1470 #:tests? #f))
1471 (propagated-inputs
1472 `(("python-capturer" ,python-capturer)))
1473 (home-page "https://coloredlogs.readthedocs.io")
1474 (synopsis "Colored stream handler for Python's logging module")
1475 (description
1476 "The @code{coloredlogs} package enables colored terminal output for
1477 Python's logging module. The @code{ColoredFormatter} class inherits from
1478 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1479 messages in color.")
1480 (license license:expat)))
1481
1482 (define-public python2-coloredlogs
1483 (package-with-python2 python-coloredlogs))
1484
1485 (define-public python-editorconfig
1486 (package
1487 (name "python-editorconfig")
1488 (version "0.12.2")
1489 (source
1490 (origin
1491 (method url-fetch)
1492 (uri (pypi-uri "EditorConfig" version))
1493 (sha256
1494 (base32
1495 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1496 (build-system python-build-system)
1497 (home-page "https://editorconfig.org/")
1498 (synopsis "EditorConfig bindings for python")
1499 (description "The EditorConfig project consists of a file format for
1500 defining coding styles and a collection of text editor plugins that enable
1501 editors to read the file format and adhere to defined styles. EditorConfig
1502 files are easily readable and they work nicely with version control systems.")
1503 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1504 (license (list license:bsd-2 license:psfl))))
1505
1506 (define-public python-et-xmlfile
1507 (package
1508 (name "python-et-xmlfile")
1509 (version "1.0.1")
1510 (source
1511 (origin
1512 (method url-fetch)
1513 (uri (pypi-uri "et_xmlfile" version))
1514 (sha256
1515 (base32
1516 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1517 (build-system python-build-system)
1518 (arguments
1519 `(#:phases (modify-phases %standard-phases
1520 (replace 'check
1521 (lambda _
1522 (invoke "pytest"))))))
1523 (native-inputs
1524 `(("python-pytest" ,python-pytest)
1525 ("python-lxml" ,python-lxml))) ;used for the tests
1526 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1527 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1528 (description "This Python library is based upon the @code{xmlfile} module
1529 from @code{lxml}. It aims to provide a low memory, compatible implementation
1530 of @code{xmlfile}.")
1531 (license license:expat)))
1532
1533 (define-public python2-et-xmlfile
1534 (package-with-python2 python-et-xmlfile))
1535
1536 (define-public python-openpyxl
1537 (package
1538 (name "python-openpyxl")
1539 (version "2.6.2")
1540 (source
1541 (origin
1542 ;; We use the upstream repository, as the tests are not included in the
1543 ;; PyPI releases.
1544 (method hg-fetch)
1545 (uri (hg-reference
1546 (url "https://bitbucket.org/openpyxl/openpyxl")
1547 (changeset version)))
1548 (file-name (string-append name "-" version "-checkout"))
1549 (sha256
1550 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1551 (build-system python-build-system)
1552 (arguments
1553 `(#:phases (modify-phases %standard-phases
1554 (replace 'check
1555 (lambda _
1556 (invoke "pytest"))))))
1557 (native-inputs
1558 ;; For the test suite.
1559 `(("python-lxml" ,python-lxml)
1560 ("python-pillow" ,python-pillow)
1561 ("python-pytest" ,python-pytest)))
1562 (propagated-inputs
1563 `(("python-et-xmlfile" ,python-et-xmlfile)
1564 ("python-jdcal" ,python-jdcal)))
1565 (home-page "https://openpyxl.readthedocs.io")
1566 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1567 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1568 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1569 standard.")
1570 (license license:expat)))
1571
1572 (define-public python-eventlet
1573 (package
1574 (name "python-eventlet")
1575 (version "0.25.1")
1576 (source
1577 (origin
1578 (method url-fetch)
1579 (uri (pypi-uri "eventlet" version))
1580 (sha256
1581 (base32
1582 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1583 (build-system python-build-system)
1584 (propagated-inputs
1585 `(("python-greenlet" ,python-greenlet)))
1586 (arguments
1587 ;; TODO: Requires unpackaged 'enum-compat'.
1588 '(#:tests? #f))
1589 (home-page "https://eventlet.net")
1590 (synopsis "Concurrent networking library for Python")
1591 (description
1592 "Eventlet is a concurrent networking library for Python that
1593 allows you to change how you run your code, not how you write it.
1594 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1595 Coroutines ensure that the developer uses a blocking style of programming
1596 that is similar to threading, but provide the benefits of non-blocking I/O.
1597 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1598 from the Python interpreter, or as a small part of a larger application.")
1599 (license license:expat)))
1600
1601 (define-public python2-eventlet
1602 (let ((base (package-with-python2
1603 (strip-python2-variant python-eventlet))))
1604 (package (inherit base)
1605 (propagated-inputs
1606 `(("python2-enum34" ,python2-enum34)
1607 ,@(package-propagated-inputs base))))))
1608
1609 (define-public python-six
1610 (package
1611 (name "python-six")
1612 (version "1.14.0")
1613 (source
1614 (origin
1615 (method url-fetch)
1616 (uri (pypi-uri "six" version))
1617 (sha256
1618 (base32
1619 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1620 (build-system python-build-system)
1621 (arguments
1622 `(#:phases
1623 (modify-phases %standard-phases
1624 (replace 'check
1625 (lambda _
1626 (invoke "py.test" "-v"))))))
1627 (native-inputs
1628 `(("python-pytest" ,python-pytest-bootstrap)))
1629 (home-page "https://pypi.org/project/six/")
1630 (synopsis "Python 2 and 3 compatibility utilities")
1631 (description
1632 "Six is a Python 2 and 3 compatibility library. It provides utility
1633 functions for smoothing over the differences between the Python versions with
1634 the goal of writing Python code that is compatible on both Python versions.
1635 Six supports every Python version since 2.5. It is contained in only one
1636 Python file, so it can be easily copied into your project.")
1637 (license license:x11)))
1638
1639 (define-public python2-six
1640 (package-with-python2 python-six))
1641
1642 (define-public python-six-bootstrap
1643 (package
1644 (inherit python-six)
1645 (name "python-six-bootstrap")
1646 (native-inputs `())
1647 (arguments `(#:tests? #f))))
1648
1649 (define-public python2-six-bootstrap
1650 (package-with-python2 python-six-bootstrap))
1651
1652 (define-public python-schedule
1653 (package
1654 (name "python-schedule")
1655 (version "0.4.3")
1656 (source
1657 (origin
1658 (method url-fetch)
1659 (uri (pypi-uri "schedule" version))
1660 (sha256
1661 (base32
1662 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1663 (build-system python-build-system)
1664 (native-inputs
1665 `(("python-pytest" ,python-pytest)
1666 ("python-mock" ,python-mock)))
1667 (home-page "https://github.com/dbader/schedule")
1668 (synopsis "Schedule periodic function calls in Python")
1669 (description
1670 "Schedule is an in-process scheduler for periodic jobs that uses the
1671 builder pattern for configuration. Schedule lets you run Python functions (or
1672 any other callable) periodically at pre-determined intervals using a simple,
1673 human-friendly syntax.")
1674 (license license:expat)))
1675
1676 (define-public python2-schedule
1677 (package-with-python2 python-schedule))
1678
1679 (define-public python-mechanize
1680 (package
1681 (name "python-mechanize")
1682 (version "0.4.5")
1683 (source
1684 (origin
1685 (method url-fetch)
1686 (uri (pypi-uri "mechanize" version))
1687 (sha256
1688 (base32
1689 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1690 (build-system python-build-system)
1691 (propagated-inputs
1692 `(("python-html5lib" ,python-html5lib)))
1693 (home-page "https://github.com/python-mechanize/mechanize")
1694 (synopsis
1695 "Stateful programmatic web browsing in Python")
1696 (description
1697 "Mechanize implements stateful programmatic web browsing in Python,
1698 after Andy Lester’s Perl module WWW::Mechanize.")
1699 (license license:bsd-3)))
1700
1701 (define-public python2-mechanize
1702 (package-with-python2 python-mechanize))
1703
1704 (define-public python-simplejson
1705 (package
1706 (name "python-simplejson")
1707 (version "3.17.0")
1708 (source
1709 (origin
1710 (method url-fetch)
1711 (uri (pypi-uri "simplejson" version))
1712 (sha256
1713 (base32
1714 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1715 (build-system python-build-system)
1716 (home-page "http://simplejson.readthedocs.org/en/latest/")
1717 (synopsis
1718 "Json library for Python")
1719 (description
1720 "JSON (JavaScript Object Notation) is a subset of JavaScript
1721 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1722 format.
1723
1724 Simplejson exposes an API familiar to users of the standard library marshal
1725 and pickle modules. It is the externally maintained version of the json
1726 library contained in Python 2.6, but maintains compatibility with Python 2.5
1727 and (currently) has significant performance advantages, even without using
1728 the optional C extension for speedups. Simplejson is also supported on
1729 Python 3.3+.")
1730 (license license:x11)))
1731
1732 (define-public python2-simplejson
1733 (package-with-python2 python-simplejson))
1734
1735
1736 (define-public python-pyicu
1737 (package
1738 (name "python-pyicu")
1739 (version "2.4.3")
1740 (source
1741 (origin
1742 (method url-fetch)
1743 (uri (pypi-uri "PyICU" version))
1744 (sha256
1745 (base32
1746 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1747 (build-system python-build-system)
1748 (inputs
1749 `(("icu4c" ,icu4c)))
1750 (native-inputs
1751 `(("python-pytest" ,python-pytest)
1752 ("python-six" ,python-six)))
1753 (home-page "https://github.com/ovalhub/pyicu")
1754 (synopsis "Python extension wrapping the ICU C++ API")
1755 (description
1756 "PyICU is a python extension wrapping the ICU C++ API.")
1757 (license license:x11)))
1758
1759 (define-public python2-pyicu
1760 (package-with-python2 python-pyicu))
1761
1762 (define-public python-dogtail
1763 (package
1764 (name "python-dogtail")
1765 (version "0.9.11")
1766 (source (origin
1767 (method url-fetch)
1768 (uri
1769 (string-append
1770 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1771 "dogtail-" version ".tar.gz"))
1772 (sha256
1773 (base32
1774 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1775 (build-system python-build-system)
1776 (arguments
1777 `(#:tests? #f ; TODO Launching dbus for the tests
1778 ; fails
1779 #:phases
1780 (modify-phases %standard-phases
1781 (replace 'check
1782 (lambda* (#:key tests? #:allow-other-keys)
1783 (when tests?
1784 (system "Xvfb :1 &")
1785 (setenv "DISPLAY" ":1")
1786 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1787 #t)))))
1788 (propagated-inputs
1789 `(("python-pygobject" ,python-pygobject)
1790 ("python-pycairo" ,python-pycairo)
1791 ("python-pyatspi" ,python-pyatspi)))
1792 (native-inputs
1793 `(("python-nose" ,python-nose)
1794 ("gtk+" ,gtk+)
1795 ("xvfb" ,xorg-server)
1796 ("dbus" ,dbus)
1797 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1798 ("gobject-introspection" ,gobject-introspection)))
1799 (home-page "https://gitlab.com/dogtail/dogtail/")
1800 (synopsis "GUI test tool and automation framework written in Python")
1801 (description
1802 "Dogtail is a GUI test tool and automation framework written in Python.
1803 It uses Accessibility (a11y) technologies to communicate with desktop
1804 applications. dogtail scripts are written in Python and executed like any
1805 other Python program.")
1806 (license license:gpl2+)))
1807
1808 (define-public python2-dogtail
1809 (package-with-python2 python-dogtail))
1810
1811 (define-public python-empy
1812 (package
1813 (name "python-empy")
1814 (version "3.3.3")
1815 (source (origin
1816 (method url-fetch)
1817 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1818 version ".tar.gz"))
1819 (sha256
1820 (base32
1821 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1822 (build-system python-build-system)
1823 (arguments
1824 `(#:tests? #f)) ; python2 only
1825 (home-page "http://www.alcyone.com/software/empy/")
1826 (synopsis "Templating system for Python")
1827 (description
1828 "EmPy is a system for embedding Python expressions and statements in
1829 template text; it takes an EmPy source file, processes it, and produces
1830 output. This is accomplished via expansions, which are special signals to the
1831 EmPy system and are set off by a special prefix (by default the at sign, @@).
1832 EmPy can expand arbitrary Python expressions and statements in this way, as
1833 well as a variety of special forms. Textual data not explicitly delimited in
1834 this way is sent unaffected to the output, allowing Python to be used in
1835 effect as a markup language. Also supported are callbacks via hooks,
1836 recording and playback via diversions, and dynamic, chainable filters. The
1837 system is highly configurable via command line options and embedded
1838 commands.")
1839 (license license:lgpl2.1+)))
1840
1841 (define-public python2-empy
1842 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1843 (package
1844 (inherit base)
1845 (arguments `(,@(package-arguments base)
1846 #:tests? #t)))))
1847
1848 (define-public python2-element-tree
1849 (package
1850 (name "python2-element-tree")
1851 (version "1.2.6")
1852 (source (origin
1853 (method url-fetch)
1854 (uri (string-append
1855 "http://effbot.org/media/downloads/elementtree-"
1856 version "-20050316.tar.gz"))
1857 (sha256
1858 (base32
1859 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1860 (build-system python-build-system)
1861 (arguments
1862 `(#:python ,python-2 ; seems to be part of Python 3
1863 #:tests? #f)) ; no 'test' sub-command
1864 (synopsis "Toolkit for XML processing in Python")
1865 (description
1866 "ElementTree is a Python library supporting lightweight XML processing.")
1867 (home-page "https://effbot.org/zone/element-index.htm")
1868 (license (license:x11-style
1869 "http://docs.python.org/2/license.html"
1870 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1871
1872 (define-public python2-pybugz
1873 (package
1874 (name "python2-pybugz")
1875 (version "0.6.11")
1876 (source (origin
1877 (method url-fetch)
1878 (uri (string-append
1879 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1880 version ".tar.gz"))
1881 (sha256
1882 (base32
1883 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1884 (patches (search-patches "pybugz-stty.patch"
1885 "pybugz-encode-error.patch"))))
1886 (build-system python-build-system)
1887 (arguments
1888 `(#:python ,python-2 ; SyntaxError with Python 3
1889 #:tests? #f)) ; no 'test' sub-command
1890 (propagated-inputs
1891 `(("element-tree" ,python2-element-tree)))
1892 (synopsis "Python and command-line interface to Bugzilla")
1893 (description
1894 "PyBugz is a Python library and command-line tool to query the Bugzilla
1895 bug tracking system. It is meant as an aid to speed up interaction with the
1896 bug tracker.")
1897 (home-page "http://www.liquidx.net/pybugz/")
1898 (license license:gpl2)))
1899
1900 (define-public python2-enum
1901 (package
1902 (name "python2-enum")
1903 (version "0.4.6")
1904 (source (origin
1905 (method url-fetch)
1906 (uri (pypi-uri "enum" version))
1907 (sha256
1908 (base32
1909 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1910 (build-system python-build-system)
1911 (arguments
1912 `(#:python ,python-2))
1913 (home-page "https://pypi.org/project/enum/")
1914 (synopsis "Robust enumerated type support in Python")
1915 (description
1916 "This provides a module for robust enumerations in Python. It has
1917 been superseded by the Python standard library and is provided only for
1918 compatibility.")
1919 ;; Choice of either license.
1920 (license (list license:gpl3+ license:psfl))))
1921
1922 (define-public python-enum34
1923 (package
1924 (name "python-enum34")
1925 (version "1.1.6")
1926 (source
1927 (origin
1928 (method url-fetch)
1929 (uri (pypi-uri "enum34" version))
1930 (sha256
1931 (base32
1932 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1933 (build-system python-build-system)
1934 (home-page "https://pypi.org/project/enum34/")
1935 (synopsis "Backported Python 3.4 Enum")
1936 (description
1937 "Enum34 is the new Python stdlib enum module available in Python 3.4
1938 backported for previous versions of Python from 2.4 to 3.3.")
1939 (license license:bsd-3)))
1940
1941 (define-public python2-enum34
1942 (package-with-python2 python-enum34))
1943
1944 (define-public python-parse-type
1945 (package
1946 (name "python-parse-type")
1947 (version "0.4.2")
1948 (source
1949 (origin
1950 (method url-fetch)
1951 (uri (pypi-uri "parse_type" version))
1952 (sha256
1953 (base32
1954 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1955 (build-system python-build-system)
1956 (propagated-inputs
1957 `(("python-six" ,python-six)
1958 ("python-parse" ,python-parse)))
1959 (native-inputs
1960 `(("python-pytest" ,python-pytest)
1961 ("python-pytest-runner" ,python-pytest-runner)))
1962 (home-page "https://github.com/jenisys/parse_type")
1963 (synopsis "Extended parse module")
1964 (description
1965 "Parse_type extends the python parse module.")
1966 (properties
1967 `((python2-variant . ,(delay python2-parse-type))))
1968 (license license:bsd-3)))
1969
1970 (define-public python2-parse-type
1971 (let ((base (package-with-python2
1972 (strip-python2-variant python-parse-type))))
1973 (package (inherit base)
1974 (propagated-inputs
1975 `(("python2-enum34" ,python2-enum34)
1976 ,@(package-propagated-inputs base))))))
1977
1978 (define-public python-parse
1979 (package
1980 (name "python-parse")
1981 (version "1.8.4")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (pypi-uri "parse" version))
1986 (sha256
1987 (base32
1988 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1989 (build-system python-build-system)
1990 (arguments
1991 `(#:phases
1992 (modify-phases %standard-phases
1993 (replace 'check
1994 (lambda _ (invoke "python" "test_parse.py"))))))
1995 (home-page "https://github.com/r1chardj0n3s/parse")
1996 (synopsis "Parse strings")
1997 (description
1998 "Parse strings using a specification based on the Python @code{format()}
1999 syntax.")
2000 (license license:x11)))
2001
2002 (define-public python-polib
2003 (package
2004 (name "python-polib")
2005 (version "1.0.8")
2006 (source (origin
2007 (method url-fetch)
2008 (uri (pypi-uri "polib" version))
2009 (sha256
2010 (base32
2011 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2012 (build-system python-build-system)
2013 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2014 (synopsis "Manipulate, create and modify gettext files")
2015 (description "Polib can manipulate any gettext format (po, pot and mo)
2016 files. It can be used to create po files from scratch or to modify
2017 existing ones.")
2018 (license license:expat)))
2019
2020 (define-public python2-polib
2021 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2022 (package
2023 (inherit base)
2024 (arguments `(,@(package-arguments base)
2025 ;; Tests don't work with python2.
2026 #:tests? #f)))))
2027
2028 (define-public python-poyo
2029 (package
2030 (name "python-poyo")
2031 (version "0.5.0")
2032 (source
2033 (origin
2034 (method url-fetch)
2035 (uri (pypi-uri "poyo" version))
2036 (sha256
2037 (base32
2038 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2039 (build-system python-build-system)
2040 (home-page "https://github.com/hackebrot/poyo")
2041 (synopsis "Lightweight YAML Parser for Python")
2042 (description
2043 "This package provides a lightweight YAML Parser for Python. It supports
2044 only a chosen subset of the YAML format that is required to parse cookiecutter
2045 user configuration files. It does not have support for serializing into YAML
2046 and is not compatible with JSON.")
2047 (license license:expat)))
2048
2049 (define-public scons
2050 (package
2051 (name "scons")
2052 (version "3.0.4")
2053 (source (origin
2054 (method git-fetch)
2055 (uri (git-reference
2056 (url "https://github.com/SCons/scons")
2057 (commit version)))
2058 (file-name (git-file-name name version))
2059 (sha256
2060 (base32
2061 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2062 (build-system python-build-system)
2063 (arguments
2064 `(#:use-setuptools? #f ; still relies on distutils
2065 #:tests? #f ; no 'python setup.py test' command
2066 #:phases
2067 (modify-phases %standard-phases
2068 (add-before 'build 'bootstrap
2069 (lambda _
2070 (substitute* "src/engine/SCons/compat/__init__.py"
2071 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2072 "sys.modules[new] = __import__(old)"))
2073 (substitute* "src/engine/SCons/Platform/__init__.py"
2074 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2075 "mod = __import__(full_name)"))
2076 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2077 (chdir "build/scons")
2078 #t)))))
2079 (home-page "https://scons.org/")
2080 (synopsis "Software construction tool written in Python")
2081 (description
2082 "SCons is a software construction tool. Think of SCons as an improved,
2083 cross-platform substitute for the classic Make utility with integrated
2084 functionality similar to autoconf/automake and compiler caches such as ccache.
2085 In short, SCons is an easier, more reliable and faster way to build
2086 software.")
2087 (license license:x11)))
2088
2089 (define-public scons-python2
2090 (package
2091 (inherit (package-with-python2 scons))
2092 (name "scons-python2")))
2093
2094 (define-public python-extras
2095 (package
2096 (name "python-extras")
2097 (version "1.0.0")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (pypi-uri "extras" version))
2102 (sha256
2103 (base32
2104 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2105 (build-system python-build-system)
2106 (arguments
2107 ;; FIXME: Circular dependency on testtools.
2108 '(#:tests? #f))
2109 (home-page "https://github.com/testing-cabal/extras")
2110 (synopsis "Useful extensions to the Python standard library")
2111 (description
2112 "Extras is a set of extensions to the Python standard library.")
2113 (license license:expat)))
2114
2115 (define-public python2-extras
2116 (package-with-python2 python-extras))
2117
2118 (define-public python-mimeparse
2119 (package
2120 (name "python-mimeparse")
2121 (version "1.6.0")
2122 (source
2123 (origin
2124 (method url-fetch)
2125 (uri (pypi-uri "python-mimeparse" version))
2126 (sha256
2127 (base32
2128 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2129 (build-system python-build-system)
2130 (arguments
2131 '(#:phases
2132 (modify-phases %standard-phases
2133 (replace 'check
2134 (lambda _
2135 (invoke "./mimeparse_test.py"))))))
2136 (home-page
2137 "https://github.com/dbtsai/python-mimeparse")
2138 (synopsis "Python library for parsing MIME types")
2139 (description
2140 "Mimeparse provides basic functions for parsing MIME type names and
2141 matching them against a list of media-ranges.")
2142 (license license:expat)))
2143
2144 (define-public python2-mimeparse
2145 (package-with-python2 python-mimeparse))
2146
2147 (define-public python-miniboa
2148 (package
2149 (name "python-miniboa")
2150 (version "1.0.7")
2151 (source
2152 (origin
2153 (method url-fetch)
2154 (uri (pypi-uri "miniboa" version))
2155 (sha256
2156 (base32
2157 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2158 (build-system python-build-system)
2159 (home-page "https://github.com/shmup/miniboa")
2160 (synopsis "Simple, single-threaded Telnet server")
2161 (description
2162 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2163 server.")
2164 (license license:asl2.0)))
2165
2166 (define-public python2-miniboa
2167 (package-with-python2 python-miniboa))
2168
2169 (define-public python-pafy
2170 (package
2171 (name "python-pafy")
2172 (version "0.5.3.1")
2173 (source
2174 (origin
2175 (method url-fetch)
2176 (uri (pypi-uri "pafy" version))
2177 (sha256
2178 (base32
2179 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2180 (build-system python-build-system)
2181 (arguments
2182 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2183 (propagated-inputs
2184 ;; Youtube-dl is a python package which is imported in the file
2185 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2186 `(("youtube-dl" ,youtube-dl)))
2187 (home-page "https://np1.github.io/pafy/")
2188 (synopsis "Retrieve YouTube content and metadata")
2189 (description
2190 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2191 (license license:lgpl3+)))
2192
2193 (define-public python2-funcsigs
2194 (package
2195 (name "python2-funcsigs")
2196 (version "1.0.2")
2197 (source (origin
2198 (method url-fetch)
2199 (uri (pypi-uri "funcsigs" version))
2200 (sha256
2201 (base32
2202 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2203 (build-system python-build-system)
2204 (arguments
2205 `(#:python ,python-2))
2206 (native-inputs
2207 `(("python2-unittest2" ,python2-unittest2)))
2208 (home-page "http://funcsigs.readthedocs.org")
2209 (synopsis "Python function signatures from PEP362")
2210 (description
2211 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2212 (license license:asl2.0)))
2213
2214 (define-public python2-funcsigs-bootstrap
2215 (package
2216 (inherit python2-funcsigs)
2217 (name "python2-funcsigs-bootstrap")
2218 (native-inputs `())
2219 (arguments
2220 `(#:tests? #f
2221 ,@(package-arguments python2-funcsigs)))))
2222
2223 (define-public python-py
2224 (package
2225 (name "python-py")
2226 (version "1.8.1")
2227 (source
2228 (origin
2229 (method url-fetch)
2230 (uri (pypi-uri "py" version))
2231 (sha256
2232 (base32
2233 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2234 (build-system python-build-system)
2235 (arguments
2236 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2237 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2238 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2239 ;; Is this module globally installed?"
2240 '(#:tests? #f))
2241 (native-inputs
2242 `(("python-setuptools-scm" ,python-setuptools-scm)))
2243 (home-page "https://github.com/pytest-dev/py")
2244 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2245 (description
2246 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2247 code introspection, and logging.")
2248 (license license:expat)))
2249
2250 (define-public python2-py
2251 (package-with-python2 python-py))
2252
2253 ;; Recent versions of python-fixtures and python-testrepository need
2254 ;; python-pbr for packaging, which itself needs these two packages for
2255 ;; testing.
2256 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2257 ;; same source, just without any test dependencies and with tests disabled.
2258 ;; python-pbr-minmal is then used to package python-fixtures and
2259 ;; python-testrepository.
2260 ;; Strictly speaking we currently could remove the test-requirements from the
2261 ;; normal python-pbr package (and save this package) since test are disabled
2262 ;; there anyway. But this may change in future.
2263 (define-public python-pbr-minimal
2264 (package
2265 (name "python-pbr-minimal")
2266 (version "3.0.1")
2267 (source
2268 (origin
2269 (method url-fetch)
2270 (uri (pypi-uri "pbr" version))
2271 (sha256
2272 (base32
2273 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2274 (build-system python-build-system)
2275 (arguments
2276 `(#:tests? #f))
2277 (home-page "https://docs.openstack.org/pbr/latest/")
2278 (synopsis "Minimal build of python-pbr used for bootstrapping")
2279 (description
2280 "Used only for bootstrapping python2-pbr, you should not need this.")
2281 (license license:asl2.0)))
2282
2283 (define-public python2-pbr-minimal
2284 (package-with-python2 python-pbr-minimal))
2285
2286 (define-public python-pbr
2287 (package
2288 (inherit python-pbr-minimal)
2289 (name "python-pbr")
2290 (arguments
2291 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2292 (propagated-inputs
2293 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2294 (native-inputs
2295 `(("python-fixtures" ,python-fixtures-bootstrap)
2296 ;; discover, coverage, hacking, subunit
2297 ("python-mock" ,python-mock)
2298 ("python-six" ,python-six)
2299 ("python-sphinx" ,python-sphinx)
2300 ("python-testrepository" ,python-testrepository-bootstrap)
2301 ("python-testresources" ,python-testresources-bootstrap)
2302 ("python-testscenarios" ,python-testscenarios-bootstrap)
2303 ("python-testtools" ,python-testtools-bootstrap)
2304 ("python-virtualenv" ,python-virtualenv)))
2305 (synopsis "Enhance the default behavior of Python’s setuptools")
2306 (description
2307 "Python Build Reasonableness (PBR) is a library that injects some useful
2308 and sensible default behaviors into your setuptools run. It will set
2309 versions, process requirements files and generate AUTHORS and ChangeLog file
2310 from git information.
2311 ")))
2312
2313 (define-public python2-pbr
2314 (package-with-python2 python-pbr))
2315
2316 (define-public python-pyrsistent
2317 (package
2318 (name "python-pyrsistent")
2319 (version "0.16.0")
2320 (home-page "https://github.com/tobgu/pyrsistent")
2321 (source (origin
2322 (method url-fetch)
2323 (uri (pypi-uri "pyrsistent" version))
2324 (sha256
2325 (base32
2326 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2327 (build-system python-build-system)
2328 (arguments
2329 '(#:phases (modify-phases %standard-phases
2330 ;; The package works fine with newer Pytest and Hypothesis, but
2331 ;; has pinned older versions to stay compatible with Python 2.
2332 (add-before 'check 'loosen-pytest-requirement
2333 (lambda _
2334 (substitute* "setup.py"
2335 (("pytest<5") "pytest")
2336 (("hypothesis<5") "hypothesis"))
2337 #t)))))
2338 (native-inputs
2339 `(("python-hypothesis" ,python-hypothesis)
2340 ("python-pytest" ,python-pytest)
2341 ("python-pytest-runner" ,python-pytest-runner)))
2342 (propagated-inputs
2343 `(("python-six" ,python-six)))
2344 (synopsis "Persistent data structures for Python")
2345 (description
2346 "Pyrsistent is a number of persistent collections (by some referred to as
2347 functional data structures). Persistent in the sense that they are immutable.
2348
2349 All methods on a data structure that would normally mutate it instead return a
2350 new copy of the structure containing the requested updates. The original
2351 structure is left untouched.")
2352 (license license:expat)))
2353
2354 (define-public python2-pyrsistent
2355 (package-with-python2 python-pyrsistent))
2356
2357 (define-public python-exif-read
2358 (package
2359 (name "python-exif-read")
2360 (version "2.1.2")
2361 (source (origin
2362 (method url-fetch)
2363 (uri (pypi-uri "ExifRead" version))
2364 (sha256
2365 (base32
2366 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2367 (build-system python-build-system)
2368 (arguments `(#:tests? #f)) ; no tests
2369 (home-page "https://github.com/ianare/exif-py")
2370 (synopsis "Python library to extract EXIF data from image files")
2371 (description
2372 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2373 files.")
2374 (license license:bsd-3)))
2375
2376 (define-public python2-exif-read
2377 (package-with-python2 python-exif-read))
2378
2379 (define-public python-pyld
2380 (package
2381 (name "python-pyld")
2382 (version "1.0.5")
2383 (source (origin
2384 (method url-fetch)
2385 (uri (pypi-uri "PyLD" version))
2386 (sha256
2387 (base32
2388 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2389 (build-system python-build-system)
2390 (home-page "https://github.com/digitalbazaar/pyld")
2391 (synopsis "Python implementation of the JSON-LD specification")
2392 (description
2393 "PyLD is an implementation of the JSON-LD specification.")
2394 (license license:bsd-3)))
2395
2396 (define-public python2-pyld
2397 (package-with-python2 python-pyld))
2398
2399 (define-public python-cli-helpers
2400 (package
2401 (name "python-cli-helpers")
2402 (version "2.0.1")
2403 (source
2404 (origin
2405 ;; There's no source tarball on PyPI.
2406 (method git-fetch)
2407 (uri (git-reference
2408 (url "https://github.com/dbcli/cli_helpers")
2409 (commit (string-append "v" version))))
2410 (file-name (git-file-name name version))
2411 (sha256
2412 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2413 (build-system python-build-system)
2414 (native-inputs
2415 `(("python-pytest" ,python-pytest)))
2416 (propagated-inputs
2417 `(("python-wcwidth" ,python-wcwidth)
2418 ("python-configobj" ,python-configobj)
2419 ("python-tabulate" ,python-tabulate)
2420 ("python-terminaltables" ,python-terminaltables)))
2421 (home-page "https://github.com/dbcli/cli_helpers")
2422 (synopsis "Helpers for building command-line apps")
2423 (description
2424 "CLI Helpers is a Python package that makes it easy to perform common
2425 tasks when building command-line apps. It's a helper library for command-line
2426 interfaces.")
2427 (license license:bsd-3)))
2428
2429 (define-public python-click
2430 (package
2431 (name "python-click")
2432 (version "7.1.2")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (pypi-uri "click" version))
2437 (sha256
2438 (base32
2439 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2440 (build-system python-build-system)
2441 (arguments
2442 `(#:phases
2443 (modify-phases %standard-phases
2444 (add-after 'unpack 'fix-paths
2445 (lambda* (#:key inputs #:allow-other-keys)
2446 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2447 "cross-libc" "libc"))))
2448 (substitute* "src/click/_unicodefun.py"
2449 (("'locale'")
2450 (string-append "'" glibc "/bin/locale'"))))
2451 #t))
2452 (replace 'check
2453 (lambda _
2454 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2455 (invoke "python" "-m" "pytest"))))))
2456 (native-inputs
2457 `(("python-pytest" ,python-pytest)))
2458 (home-page "https://palletsprojects.com/p/click/")
2459 (synopsis "Command line library for Python")
2460 (description
2461 "Click is a Python package for creating command line interfaces in a
2462 composable way with as little code as necessary. Its name stands for
2463 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2464 with sensible defaults out of the box.")
2465 (license license:bsd-3)))
2466
2467 (define-public python2-click
2468 (package-with-python2 python-click))
2469
2470 (define-public python-click-5
2471 (package (inherit python-click)
2472 (name "python-click")
2473 (version "5.1")
2474 (source
2475 (origin
2476 (method url-fetch)
2477 (uri (pypi-uri "click" version))
2478 (sha256
2479 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2480 (arguments `())))
2481
2482 (define-public python-wheel
2483 (package
2484 (name "python-wheel")
2485 (version "0.33.6")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "wheel" version))
2490 (sha256
2491 (base32
2492 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2493 (build-system python-build-system)
2494 (arguments
2495 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2496 ;; fails to find the newly-built bdist_wheel library, even though it is
2497 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2498 '(#:tests? #f))
2499 (home-page "https://bitbucket.org/pypa/wheel/")
2500 (synopsis "Format for built Python packages")
2501 (description
2502 "A wheel is a ZIP-format archive with a specially formatted filename and
2503 the @code{.whl} extension. It is designed to contain all the files for a PEP
2504 376 compatible install in a way that is very close to the on-disk format. Many
2505 packages will be properly installed with only the @code{Unpack} step and the
2506 unpacked archive preserves enough information to @code{Spread} (copy data and
2507 scripts to their final locations) at any later time. Wheel files can be
2508 installed with a newer @code{pip} or with wheel's own command line utility.")
2509 (license license:expat)))
2510
2511 (define-public python2-wheel
2512 (package-with-python2 python-wheel))
2513
2514 (define-public python-vcversioner
2515 (package
2516 (name "python-vcversioner")
2517 (version "2.16.0.0")
2518 (source
2519 (origin
2520 (method url-fetch)
2521 (uri (pypi-uri "vcversioner" version))
2522 (sha256
2523 (base32
2524 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2525 (build-system python-build-system)
2526 (synopsis "Python library for version number discovery")
2527 (description "Vcversioner is a Python library that inspects tagging
2528 information in a variety of version control systems in order to discover
2529 version numbers.")
2530 (home-page "https://github.com/habnabit/vcversioner")
2531 (license license:isc)))
2532
2533 (define-public python2-vcversioner
2534 (package-with-python2 python-vcversioner))
2535
2536 (define-public python-jdcal
2537 (package
2538 (name "python-jdcal")
2539 (version "1.4")
2540 (source
2541 (origin
2542 (method url-fetch)
2543 (uri (pypi-uri "jdcal" version))
2544 (sha256
2545 (base32
2546 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2547 (build-system python-build-system)
2548 (arguments
2549 `(#:phases (modify-phases %standard-phases
2550 (replace 'check
2551 (lambda _
2552 (invoke "pytest"))))))
2553 (native-inputs
2554 `(("python-pytest" ,python-pytest)))
2555 (home-page "https://github.com/phn/jdcal")
2556 (synopsis "Functions to convert between Julian dates Gregorian dates")
2557 (description "This Python library provides functions for converting
2558 between Julian dates and Gregorian dates.")
2559 (license license:bsd-2)))
2560
2561 (define-public python2-jdcal
2562 (package-with-python2 python-jdcal))
2563
2564 (define-public python-jsondiff
2565 (package
2566 (name "python-jsondiff")
2567 (version "1.2.0")
2568 (source
2569 (origin
2570 (method url-fetch)
2571 (uri (pypi-uri "jsondiff" version))
2572 (sha256
2573 (base32
2574 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2575 (build-system python-build-system)
2576 (native-inputs
2577 `(("python-nose" ,python-nose)
2578 ("python-nose-random" ,python-nose-random)))
2579 (home-page
2580 "https://github.com/fzumstein/jsondiff")
2581 (synopsis "Compare JSON and JSON-like structures in Python")
2582 (description "@code{jsondiff} is a Python library which lets you
2583 compare, diff, and patch JSON and JSON-like structures in Python.")
2584 (license license:expat)))
2585
2586 (define-public python-jsonschema
2587 (package
2588 (name "python-jsonschema")
2589 (version "3.2.0")
2590 (source (origin
2591 (method url-fetch)
2592 (uri (pypi-uri "jsonschema" version))
2593 (sha256
2594 (base32
2595 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2596 (build-system python-build-system)
2597 (arguments
2598 '(#:phases
2599 (modify-phases %standard-phases
2600 (replace 'check
2601 (lambda* (#:key inputs outputs #:allow-other-keys)
2602 (add-installed-pythonpath inputs outputs)
2603 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2604 (invoke "trial" "jsonschema"))))))
2605 (native-inputs
2606 `(("python-setuptools_scm" ,python-setuptools-scm)
2607 ("python-twisted" ,python-twisted)))
2608 (propagated-inputs
2609 `(("python-attrs" ,python-attrs)
2610 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2611 ("python-pyrsistent" ,python-pyrsistent)
2612 ("python-six" ,python-six)))
2613 (home-page "https://github.com/Julian/jsonschema")
2614 (synopsis "Implementation of JSON Schema for Python")
2615 (description
2616 "Jsonschema is an implementation of JSON Schema for Python.")
2617 (license license:expat)
2618 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2619
2620 (define-public python2-jsonschema
2621 (let ((jsonschema (package-with-python2
2622 (strip-python2-variant python-jsonschema))))
2623 (package (inherit jsonschema)
2624 (propagated-inputs
2625 `(("python2-functools32" ,python2-functools32)
2626 ,@(package-propagated-inputs jsonschema))))))
2627
2628 (define-public python-schema
2629 (package
2630 (name "python-schema")
2631 (version "0.6.6")
2632 (source
2633 (origin
2634 (method url-fetch)
2635 (uri (pypi-uri "schema" version))
2636 (sha256
2637 (base32
2638 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2639 (build-system python-build-system)
2640 (native-inputs
2641 `(("python-pytest" ,python-pytest)))
2642 (home-page "https://github.com/keleshev/schema")
2643 (synopsis "Simple data validation library")
2644 (description
2645 "@code{python-schema} is a library for validating Python data
2646 structures, such as those obtained from config-files, forms, external
2647 services or command-line parsing, converted from JSON/YAML (or
2648 something else) to Python data-types.")
2649 (license license:psfl)))
2650
2651 (define-public python2-schema
2652 (package-with-python2 python-schema))
2653
2654 (define-public python-schema-0.5
2655 (package (inherit python-schema)
2656 (version "0.5.0")
2657 (source
2658 (origin
2659 (method url-fetch)
2660 (uri (pypi-uri "schema" version))
2661 (sha256
2662 (base32
2663 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2664
2665 (define-public python2-schema-0.5
2666 (package-with-python2 python-schema-0.5))
2667
2668 (define-public python-kitchen
2669 (package
2670 (name "python-kitchen")
2671 (version "1.2.5")
2672 (source
2673 (origin
2674 (method url-fetch)
2675 (uri (pypi-uri "kitchen" version))
2676 (sha256
2677 (base32
2678 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2679 (build-system python-build-system)
2680 (propagated-inputs
2681 `(("python-chardet" ,python-chardet)))
2682 (home-page "https://github.com/fedora-infra/kitchen")
2683 (synopsis "Python API for snippets")
2684 (description "@code{kitchen} module provides a python API for all sorts of
2685 little useful snippets of code that everybody ends up writing for their projects
2686 but never seem big enough to build an independent release. Use kitchen and stop
2687 cutting and pasting that code over and over.")
2688 (license (list license:lgpl2.1+
2689 ;; subprocess.py, test_subprocess.py,
2690 ;; kitchen/pycompat25/defaultdict.py:
2691 license:psfl))))
2692
2693 (define-public python2-kitchen
2694 (package-with-python2 python-kitchen))
2695
2696 (define-public python-unidecode
2697 (package
2698 (name "python-unidecode")
2699 (version "1.1.1")
2700 (source (origin
2701 (method url-fetch)
2702 (uri (pypi-uri "Unidecode" version))
2703 (sha256
2704 (base32
2705 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2706 (build-system python-build-system)
2707 (home-page "https://pypi.org/project/Unidecode/")
2708 (synopsis "ASCII transliterations of Unicode text")
2709 (description
2710 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2711 useful when integrating with legacy code that doesn't support Unicode, or for
2712 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2713 machine identifiers from human-readable Unicode strings that should still be
2714 somewhat intelligible.")
2715 (license license:gpl2+)))
2716
2717 (define-public python2-unidecode
2718 (package-with-python2 python-unidecode))
2719
2720 (define-public python-text-unidecode
2721 (package
2722 (name "python-text-unidecode")
2723 (version "1.3")
2724 (source (origin
2725 (method url-fetch)
2726 (uri (pypi-uri "text-unidecode" version))
2727 (sha256
2728 (base32
2729 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2730 (build-system python-build-system)
2731 (arguments
2732 '(#:phases (modify-phases %standard-phases
2733 (replace 'check
2734 (lambda _
2735 (setenv "PYTHONPATH"
2736 (string-append "./build/lib:"
2737 (getenv "PYTHONPATH")))
2738 (invoke "pytest" "-vv"))))))
2739 (native-inputs
2740 `(("python-pytest" ,python-pytest)))
2741 (home-page "https://github.com/kmike/text-unidecode/")
2742 (synopsis "Decode Unicode data")
2743 (description
2744 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2745 Perl library. It can create ASCII representations of Unicode data. In general
2746 users should prefer the @code{python-unidecode} package which offers better
2747 memory usage and transliteration quality.")
2748 ;; The user can choose either license.
2749 (license (list license:clarified-artistic license:gpl2+))))
2750
2751 (define-public python2-text-unidecode
2752 (package-with-python2 python-text-unidecode))
2753
2754 (define-public python-pyjwt
2755 (package
2756 (name "python-pyjwt")
2757 (version "1.7.1")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (pypi-uri "PyJWT" version))
2762 (sha256
2763 (base32
2764 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2765 (modules '((guix build utils)))
2766 (snippet
2767 '(begin
2768 (for-each delete-file-recursively
2769 (find-files "." "\\.pyc$"))
2770 #t))))
2771 (build-system python-build-system)
2772 (arguments
2773 '(#:phases (modify-phases %standard-phases
2774 (replace 'check
2775 (lambda _
2776 ;; Mimic upstream commit 3a20892442b34c7 to get
2777 ;; rid of dependency on pytest-runner < 5.0.
2778 ;; Remove substitution for PyJWT > 1.7.1.
2779 (substitute* "setup.py"
2780 ((".*pytest-runner.*")
2781 ""))
2782 (invoke "pytest" "-vv"))))))
2783 (native-inputs
2784 `(("python-pytest" ,python-pytest)
2785 ("python-pytest-cov" ,python-pytest-cov)))
2786 (home-page "https://github.com/progrium/pyjwt")
2787 (synopsis "JSON Web Token implementation in Python")
2788 (description
2789 "PyJWT is a JSON Web Token implementation written in Python.")
2790 (license license:expat)))
2791
2792 (define-public python2-pyjwt
2793 (package-with-python2 python-pyjwt))
2794
2795 (define-public python-pykka
2796 (package
2797 (name "python-pykka")
2798 (version "1.2.1")
2799 (source
2800 (origin
2801 (method url-fetch)
2802 (uri (pypi-uri "Pykka" version))
2803 (sha256
2804 (base32
2805 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2806 (build-system python-build-system)
2807 (native-inputs
2808 `(("python-mock" ,python-mock)
2809 ("python-nose" ,python-nose)
2810 ("python-gevent" ,python-gevent)
2811 ("python-eventlet" ,python-eventlet)))
2812 (home-page "https://www.pykka.org/")
2813 (synopsis "Pykka is a Python implementation of the actor model")
2814 (description
2815 "Pykka is a Python implementation of the actor model.
2816 The actor model introduces some simple rules to control the sharing
2817 of state and cooperation between execution units, which makes it
2818 easier to build concurrent applications.")
2819 (license license:asl2.0)))
2820
2821 (define-public python2-pykka
2822 (package-with-python2 python-pykka))
2823
2824 (define-public python-pymsgbox
2825 (package
2826 (name "python-pymsgbox")
2827 (version "1.0.6")
2828 (source
2829 (origin
2830 (method git-fetch)
2831 (uri (git-reference
2832 ;; LICENSE.txt is not present on pypi
2833 (url "https://github.com/asweigart/PyMsgBox")
2834 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2835 (file-name (git-file-name name version))
2836 (sha256
2837 (base32
2838 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2839 (arguments
2840 ;; Circular dependency to run tests:
2841 ;; Tests need pyautogui, which depends on pymsgbox.
2842 '(#:tests? #f))
2843 (build-system python-build-system)
2844 (home-page "https://github.com/asweigart/PyMsgBox")
2845 (synopsis "Python module for JavaScript-like message boxes")
2846 (description
2847 "PyMsgBox is a simple, cross-platform, pure Python module for
2848 JavaScript-like message boxes. Types of dialog boxes include:
2849 @enumerate
2850 @item alert
2851 @item confirm
2852 @item prompt
2853 @item password
2854 @end enumerate
2855 ")
2856 (license license:bsd-3)))
2857
2858 (define-public python-pympler
2859 (package
2860 (name "python-pympler")
2861 (home-page "https://pythonhosted.org/Pympler/")
2862 (version "0.8")
2863 (source (origin
2864 (method url-fetch)
2865 (uri (pypi-uri "Pympler" version))
2866 (sha256
2867 (base32
2868 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2869 (build-system python-build-system)
2870 (arguments
2871 `(#:phases (modify-phases %standard-phases
2872 (delete 'check)
2873 (add-after 'install 'check
2874 (lambda* (#:key inputs outputs #:allow-other-keys)
2875 (add-installed-pythonpath inputs outputs)
2876 (invoke "python" "setup.py" "test"))))))
2877 (synopsis "Measure, monitor and analyze memory behavior")
2878 (description
2879 "Pympler is a development tool to measure, monitor and analyze
2880 the memory behavior of Python objects in a running Python application.
2881
2882 By pympling a Python application, detailed insight in the size and the
2883 lifetime of Python objects can be obtained. Undesirable or unexpected
2884 runtime behavior like memory bloat and other @samp{pymples} can easily
2885 be identified.
2886
2887 A web profiling frontend exposes process statistics, garbage
2888 visualisation and class tracker statistics.")
2889 (license license:asl2.0)))
2890
2891 (define-public python2-pympler
2892 (package-with-python2 python-pympler))
2893
2894 (define-public python-itsdangerous
2895 (package
2896 (name "python-itsdangerous")
2897 (version "1.1.0")
2898 (source
2899 (origin
2900 (method url-fetch)
2901 (uri (pypi-uri "itsdangerous" version))
2902 (sha256
2903 (base32
2904 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2905 (build-system python-build-system)
2906 (home-page "https://palletsprojects.com/p/itsdangerous/")
2907 (synopsis "Python library for passing data to/from untrusted environments")
2908 (description
2909 "Itsdangerous provides various helpers to pass trusted data to untrusted
2910 environments and back.")
2911 (license license:bsd-3)))
2912
2913 (define-public python2-itsdangerous
2914 (package-with-python2 python-itsdangerous))
2915
2916 (define-public python-pyyaml
2917 (package
2918 (name "python-pyyaml")
2919 (version "5.3.1")
2920 (source
2921 (origin
2922 (method url-fetch)
2923 (uri (pypi-uri "PyYAML" version))
2924 (sha256
2925 (base32
2926 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
2927 (build-system python-build-system)
2928 (inputs
2929 `(("libyaml" ,libyaml)))
2930 (home-page "https://pyyaml.org")
2931 (synopsis "YAML parser and emitter for Python")
2932 (description
2933 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2934 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2935 API, and sensible error messages. PyYAML supports standard YAML tags and
2936 provides Python-specific tags that represent an arbitrary Python object.")
2937 (license license:expat)))
2938
2939 (define-public python2-pyyaml
2940 (package-with-python2 python-pyyaml))
2941
2942 (define-public python-vine
2943 (package
2944 (name "python-vine")
2945 (version "1.1.4")
2946 (source
2947 (origin
2948 (method url-fetch)
2949 (uri (pypi-uri "vine" version))
2950 (sha256
2951 (base32
2952 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2953 (build-system python-build-system)
2954 (native-inputs
2955 `(("python-pytest" ,python-pytest)
2956 ("python-case" ,python-case)))
2957 (home-page "https://github.com/celery/vine")
2958 (synopsis "Promises for Python")
2959 (description
2960 "@code{vine} provides a special implementation of promises in that it can
2961 be used both for \"promise of a value\" and lazy evaluation. The biggest
2962 upside for this is that everything in a promise can also be a promise,
2963 e.g. filters, callbacks and errbacks can all be promises.")
2964 (license license:bsd-3)))
2965
2966 (define-public python-virtualenv
2967 (package
2968 (name "python-virtualenv")
2969 (version "20.0.10")
2970 (source
2971 (origin
2972 (method url-fetch)
2973 (uri (pypi-uri "virtualenv" version))
2974 (sha256
2975 (base32
2976 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
2977 (build-system python-build-system)
2978 (native-inputs
2979 `(("python-mock" ,python-mock)
2980 ("python-pytest" ,python-pytest)
2981 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2982 ;; be an input at all". However, removing the input makes the build error:
2983 ;; File "setup.py", line 4, in <module>
2984 ;; raise RuntimeError("setuptools >= 41 required to build")
2985 ("python-setuptools" ,python-setuptools)
2986 ("python-setuptools-scm" ,python-setuptools-scm)))
2987 (propagated-inputs
2988 `(("python-appdirs" ,python-appdirs)
2989 ("python-distlib" ,python-distlib)
2990 ("python-filelock" ,python-filelock)
2991 ("python-six" ,python-six)
2992 ("python-importlib-metadata" ,python-importlib-metadata)))
2993 (home-page "https://virtualenv.pypa.io/")
2994 (synopsis "Virtual Python environment builder")
2995 (description
2996 "Virtualenv is a tool to create isolated Python environments.")
2997 (properties `((python2-variant . ,(delay python2-virtualenv))))
2998 (license license:expat)))
2999
3000 (define-public python2-virtualenv
3001 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3002 (package
3003 (inherit base)
3004 (arguments
3005 `(#:python ,python-2
3006 #:phases
3007 (modify-phases %standard-phases
3008 (add-after 'set-paths 'adjust-PYTHONPATH
3009 (lambda* (#:key inputs #:allow-other-keys)
3010 (let* ((python (assoc-ref inputs "python"))
3011 (python-sitedir (string-append python "/lib/python2.7"
3012 "/site-packages")))
3013 ;; XXX: 'python2' always comes first on PYTHONPATH
3014 ;; and shadows the 'setuptools' input. Move python2
3015 ;; last: this should be fixed in python-build-system
3016 ;; in a future rebuild cycle.
3017 (setenv "PYTHONPATH"
3018 (string-append (string-join (delete python-sitedir
3019 (string-split
3020 (getenv "PYTHONPATH")
3021 #\:))
3022 ":")
3023 ":" python-sitedir))
3024 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3025 (getenv "PYTHONPATH"))
3026 #t))))))
3027 (propagated-inputs
3028 `(("python-contextlib2" ,python2-contextlib2)
3029 ,@(package-propagated-inputs base))))))
3030
3031 (define-public python-markupsafe
3032 (package
3033 (name "python-markupsafe")
3034 (version "1.1.1")
3035 (source
3036 (origin
3037 (method url-fetch)
3038 (uri (pypi-uri "MarkupSafe" version))
3039 (sha256
3040 (base32
3041 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3042 (build-system python-build-system)
3043 (arguments
3044 `(#:modules ((ice-9 ftw)
3045 (srfi srfi-1)
3046 (srfi srfi-26)
3047 (guix build utils)
3048 (guix build python-build-system))
3049 #:phases (modify-phases %standard-phases
3050 (replace 'check
3051 (lambda _
3052 (let ((cwd (getcwd))
3053 (libdir (find (cut string-prefix? "lib." <>)
3054 (scandir "build"))))
3055 (setenv "PYTHONPATH"
3056 (string-append cwd "/build/" libdir ":"
3057 (getenv "PYTHONPATH")))
3058 (invoke "pytest" "-vv")))))))
3059 (native-inputs
3060 `(("python-pytest" ,python-pytest)))
3061 (home-page "https://github.com/mitsuhiko/markupsafe")
3062 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3063 (description
3064 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3065 for Python.")
3066 (license license:bsd-3)))
3067
3068 (define-public python2-markupsafe
3069 (package-with-python2 python-markupsafe))
3070
3071 (define-public python-jinja2
3072 (package
3073 (name "python-jinja2")
3074 (version "2.11.2")
3075 (source
3076 (origin
3077 (method url-fetch)
3078 (uri (pypi-uri "Jinja2" version))
3079 (sha256
3080 (base32
3081 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3082 (build-system python-build-system)
3083 (arguments
3084 '(#:phases (modify-phases %standard-phases
3085 (replace 'check
3086 (lambda* (#:key tests? #:allow-other-keys)
3087 (if tests?
3088 (begin
3089 (setenv "PYTHONPATH"
3090 (string-append "./build/lib:"
3091 (getenv "PYTHONPATH")))
3092 (invoke "pytest" "-vv"))
3093 (format #t "test suite not run~%"))
3094 #t)))))
3095 (native-inputs
3096 `(("python-pytest" ,python-pytest)))
3097 (propagated-inputs
3098 `(("python-markupsafe" ,python-markupsafe)))
3099 (home-page "http://jinja.pocoo.org/")
3100 (synopsis "Python template engine")
3101 (description
3102 "Jinja2 is a small but fast and easy to use stand-alone template engine
3103 written in pure Python.")
3104 (license license:bsd-3)))
3105
3106 (define-public python2-jinja2
3107 (package-with-python2 python-jinja2))
3108
3109 (define-public python-jinja2-time
3110 (package
3111 (name "python-jinja2-time")
3112 (version "0.2.0")
3113 (source
3114 (origin
3115 (method url-fetch)
3116 (uri (pypi-uri "jinja2-time" version))
3117 (sha256
3118 (base32
3119 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3120 (build-system python-build-system)
3121 (propagated-inputs
3122 `(("python-arrow" ,python-arrow)
3123 ("python-jinja2" ,python-jinja2)))
3124 (home-page
3125 "https://github.com/hackebrot/jinja2-time")
3126 (synopsis "Jinja2 Extension for Dates and Times")
3127 (description
3128 "This package provides an extension for the template engine Jinja2. It
3129 adds a 'now' tag providing a convenient access to the arrow.now() API from
3130 templates. A format string can be provided to control the output.")
3131 (license license:expat)))
3132
3133 (define-public python-pystache
3134 (package
3135 (name "python-pystache")
3136 (version "0.5.4")
3137 (source (origin
3138 (method url-fetch)
3139 (uri (pypi-uri "pystache" version))
3140 (sha256
3141 (base32
3142 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3143 (build-system python-build-system)
3144 (arguments
3145 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3146 (home-page "http://defunkt.io/pystache/")
3147 (synopsis "Python logic-less template engine")
3148 (description
3149 "Pystache is a Python implementation of the framework agnostic,
3150 logic-free templating system Mustache.")
3151 (license license:expat)
3152 (properties `((python2-variant . ,(delay python2-pystache))))))
3153
3154 (define-public python2-pystache
3155 (package (inherit (package-with-python2
3156 (strip-python2-variant python-pystache)))
3157 (arguments
3158 `(#:python ,python-2
3159 #:phases
3160 (modify-phases %standard-phases
3161 (replace 'check
3162 (lambda _
3163 (invoke "python" "test_pystache.py"))))))))
3164
3165 (define-public python-joblib
3166 (package
3167 (name "python-joblib")
3168 (version "0.14.1")
3169 (source (origin
3170 (method url-fetch)
3171 (uri (pypi-uri "joblib" version))
3172 (sha256
3173 (base32
3174 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3175 (build-system python-build-system)
3176 (arguments
3177 `(#:phases
3178 (modify-phases %standard-phases
3179 (replace 'check
3180 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3181 (native-inputs
3182 `(("python-pytest" ,python-pytest)))
3183 (home-page "https://joblib.readthedocs.io/")
3184 (synopsis "Using Python functions as pipeline jobs")
3185 (description
3186 "Joblib is a set of tools to provide lightweight pipelining in Python.
3187 In particular, joblib offers: transparent disk-caching of the output values
3188 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3189 logging and tracing of the execution.")
3190 (license license:bsd-3)))
3191
3192 (define-public python2-joblib
3193 (package-with-python2 python-joblib))
3194
3195 (define-public python-daemon
3196 (package
3197 (name "python-daemon")
3198 (version "2.2.3")
3199 (source
3200 (origin
3201 (method url-fetch)
3202 (uri (pypi-uri "python-daemon" version))
3203 (sha256
3204 (base32
3205 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3206 (build-system python-build-system)
3207 (arguments
3208 `(#:phases
3209 (modify-phases %standard-phases
3210 (add-before 'check 'disable-tests
3211 (lambda _
3212 ;; FIXME: Determine why test fails
3213 (substitute* "test/test_daemon.py"
3214 (("test_detaches_process_context")
3215 "skip_test_detaches_process_context"))
3216 #t)))))
3217 (propagated-inputs
3218 `(("python-lockfile" ,python-lockfile)))
3219 (native-inputs
3220 `(("python-unittest2" ,python-unittest2)
3221 ("python-testtools" ,python-testtools)
3222 ("python-testscenarios" ,python-testscenarios)
3223 ("python-mock" ,python-mock)
3224 ("python-docutils" ,python-docutils)))
3225 (home-page "https://pagure.io/python-daemon/")
3226 (synopsis "Python library for making a Unix daemon process")
3227 (description "Python-daemon is a library that assists a Python program to
3228 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3229
3230 This library provides a @code{DaemonContext} class that manages the following
3231 important tasks for becoming a daemon process:
3232 @enumerate
3233 @item Detach the process into its own process group.
3234 @item Set process environment appropriate for running inside a chroot.
3235 @item Renounce suid and sgid privileges.
3236 @item Close all open file descriptors.
3237 @item Change the working directory, uid, gid, and umask.
3238 @item Set appropriate signal handlers.
3239 @item Open new file descriptors for stdin, stdout, and stderr.
3240 @item Manage a specified PID lock file.
3241 @item Register cleanup functions for at-exit processing.
3242 @end enumerate")
3243 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3244 (license (list license:asl2.0 license:gpl3+))))
3245
3246 (define-public python-anytree
3247 (package
3248 (name "python-anytree")
3249 (version "2.8.0")
3250 (source (origin
3251 (method url-fetch)
3252 (uri (pypi-uri "anytree" version))
3253 (sha256
3254 (base32
3255 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3256 (build-system python-build-system)
3257 (propagated-inputs
3258 `(("python-six" ,python-six)))
3259 (native-inputs
3260 `(;; For tests.
3261 ("graphviz" ,graphviz) ;for 'dot'
3262 ("python-nose" ,python-nose)))
3263 (home-page "https://github.com/c0fec0de/anytree")
3264 (synopsis "Lightweight tree data library")
3265 (description
3266 "@code{anytree} is a simple, lightweight, and extensible tree data
3267 structure for Python.")
3268 (license license:asl2.0)))
3269
3270 (define-public python-docutils
3271 (package
3272 (name "python-docutils")
3273 (version "0.16")
3274 (source
3275 (origin
3276 (method url-fetch)
3277 (uri (pypi-uri "docutils" version))
3278 (sha256
3279 (base32
3280 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3281 (build-system python-build-system)
3282 (arguments
3283 '(#:phases (modify-phases %standard-phases
3284 (replace 'check
3285 (lambda* (#:key tests? #:allow-other-keys)
3286 (if tests?
3287 (invoke "python" "test/alltests.py")
3288 (format #t "test suite not run~%"))
3289 #t)))))
3290 (home-page "http://docutils.sourceforge.net/")
3291 (synopsis "Python Documentation Utilities")
3292 (description
3293 "Docutils is a modular system for processing documentation into useful
3294 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3295 reStructuredText.")
3296 ;; Most of the source code is public domain, but some source files are
3297 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3298 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3299
3300 (define-public python2-docutils
3301 (package-with-python2 python-docutils))
3302
3303 ;; python2-sphinx fails its test suite with newer versions.
3304 (define-public python2-docutils-0.14
3305 (package
3306 (inherit python2-docutils)
3307 (version "0.14")
3308 (source (origin
3309 (method url-fetch)
3310 (uri (pypi-uri "docutils" version))
3311 (sha256
3312 (base32
3313 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3314
3315 (define-public python-restructuredtext-lint
3316 (package
3317 (name "python-restructuredtext-lint")
3318 (version "1.3.0")
3319 (source
3320 (origin
3321 (method url-fetch)
3322 (uri (pypi-uri "restructuredtext-lint" version))
3323 (sha256
3324 (base32
3325 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3326 (build-system python-build-system)
3327 (arguments
3328 `(#:phases
3329 (modify-phases %standard-phases
3330 (delete 'check)
3331 (add-after 'install 'check
3332 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3333 (when tests?
3334 (add-installed-pythonpath inputs outputs)
3335 (invoke "nosetests" "-v"))
3336 #t)))))
3337 (propagated-inputs
3338 `(("python-docutils" ,python-docutils)))
3339 (native-inputs
3340 `(("python-nose" ,python-nose)))
3341 (home-page "https://github.com/twolfson/restructuredtext-lint")
3342 (synopsis "reStructuredText linter")
3343 (description "This package provides a linter for the reStructuredText
3344 format.")
3345 (license license:unlicense)))
3346
3347 (define-public python-doc8
3348 (package
3349 (name "python-doc8")
3350 (version "0.8.0")
3351 (source
3352 (origin
3353 (method url-fetch)
3354 (uri (pypi-uri "doc8" version))
3355 (sha256
3356 (base32
3357 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3358 (build-system python-build-system)
3359 (arguments
3360 `(#:phases
3361 (modify-phases %standard-phases
3362 (delete 'check)
3363 (add-after 'install 'check
3364 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3365 (when tests?
3366 (add-installed-pythonpath inputs outputs)
3367 (invoke "pytest" "-v"))
3368 #t)))))
3369 (propagated-inputs
3370 `(("python-chardet" ,python-chardet)
3371 ("python-docutils" ,python-docutils)
3372 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3373 ("python-six" ,python-six)
3374 ("python-stevedore" ,python-stevedore)))
3375 (native-inputs
3376 `(("python-testtools" ,python-testtools)
3377 ("python-pytest" ,python-pytest)))
3378 (home-page "https://launchpad.net/doc8")
3379 (synopsis
3380 "Style checker for Sphinx (or other) RST documentation")
3381 (description
3382 "Doc8 is an opinionated style checker for reStructured Text and plain
3383 text styles of documentation.")
3384 (license license:asl2.0)))
3385
3386 (define-public python-pygments
3387 (package
3388 (name "python-pygments")
3389 (version "2.5.2")
3390 (source
3391 (origin
3392 (method url-fetch)
3393 (uri (pypi-uri "Pygments" version))
3394 (sha256
3395 (base32
3396 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
3397 (build-system python-build-system)
3398 (arguments
3399 ;; FIXME: Tests require sphinx, which depends on this.
3400 '(#:tests? #f))
3401 (home-page "https://pygments.org/")
3402 (synopsis "Syntax highlighting")
3403 (description
3404 "Pygments is a syntax highlighting package written in Python.")
3405 (license license:bsd-2)))
3406
3407 (define-public python2-pygments
3408 (package-with-python2 python-pygments))
3409
3410 (define-public python-bumpversion
3411 (package
3412 (name "python-bumpversion")
3413 (version "0.5.3")
3414 (source
3415 (origin
3416 (method url-fetch)
3417 (uri (pypi-uri "bumpversion" version))
3418 (sha256
3419 (base32
3420 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3421 (build-system python-build-system)
3422 (home-page "https://github.com/peritus/bumpversion")
3423 (synopsis "Tool to bump software version")
3424 (description "This tool provides a command-line interface (CLI) to bump a
3425 software version simply.")
3426 (license license:expat)))
3427
3428 (define-public python-deprecated
3429 (package
3430 (name "python-deprecated")
3431 (version "1.2.5")
3432 (source
3433 (origin
3434 (method git-fetch)
3435 (uri (git-reference
3436 (url "https://github.com/tantale/deprecated")
3437 (commit (string-append "v" version))))
3438 (file-name (git-file-name name version))
3439 (sha256
3440 (base32
3441 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3442 (build-system python-build-system)
3443 (arguments
3444 `(#:phases (modify-phases %standard-phases
3445 (replace 'check
3446 (lambda _
3447 (invoke "pytest"))))))
3448 (propagated-inputs
3449 `(("python-wrapt" ,python-wrapt)))
3450 (native-inputs
3451 `(("python-bumpversion" ,python-bumpversion)
3452 ("python-pytest" ,python-pytest)
3453 ("python-pytest-cov" ,python-pytest-cov)
3454 ("python-sphinx" ,python-sphinx)
3455 ("python-tox" ,python-tox)))
3456 (home-page "https://github.com/tantale/deprecated")
3457 (synopsis "Python decorator to deprecate classes, functions or methods")
3458 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3459 to deprecate classes, functions or methods.")
3460 (license license:expat)))
3461
3462 (define-public python-pygithub
3463 (package
3464 (name "python-pygithub")
3465 (version "1.43.8")
3466 (source
3467 ;; We fetch from the Git repo because there are no tests in the PyPI
3468 ;; archive.
3469 (origin
3470 (method git-fetch)
3471 (uri (git-reference
3472 (url "https://github.com/PyGithub/PyGithub")
3473 (commit (string-append "v" version))))
3474 (file-name (git-file-name name version))
3475 (sha256
3476 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3477 (build-system python-build-system)
3478 (arguments
3479 `(#:phases (modify-phases %standard-phases
3480 ;; Some tests rely on the network.
3481 (add-after 'unpack 'disable-failing-tests
3482 (lambda _
3483 (substitute* "tests/Issue142.py"
3484 (("testDecodeJson") "disabled_testDecodeJson"))
3485 #t))
3486 (add-before 'check 'prepare-for-tests
3487 (lambda _
3488 (for-each (lambda (f)
3489 (chmod f #o666))
3490 (find-files "./tests"))
3491 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3492 (setenv "PYTHONPATH"
3493 (string-append "./tests:" (getenv "PYTHONPATH")))
3494 #t)))))
3495 (propagated-inputs
3496 `(("python-deprecated" ,python-deprecated)
3497 ("python-pyjwt" ,python-pyjwt)
3498 ("python-requests" ,python-requests)))
3499 (native-inputs `(("python-httpretty" ,python-httpretty)))
3500 (home-page "https://pygithub.readthedocs.io/en/latest/")
3501 (synopsis "Python library for the GitHub API")
3502 (description "This library allows managing GitHub resources such as
3503 repositories, user profiles, and organizations in your Python applications,
3504 using version 3 of the GitHub application programming interface (API).")
3505 (license license:lgpl3+)))
3506
3507 (define-public python-rellu
3508 (package
3509 (name "python-rellu")
3510 (version "0.7")
3511 (source
3512 (origin
3513 (method url-fetch)
3514 (uri (pypi-uri "rellu" version))
3515 (sha256
3516 (base32
3517 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3518 (build-system python-build-system)
3519 (propagated-inputs
3520 `(("python-invoke" ,python-invoke)
3521 ("python-pygithub" ,python-pygithub)))
3522 (home-page "https://github.com/robotframework/rellu")
3523 (synopsis "Utilities to create PyPI releases")
3524 (description "This collection of utilities contains tooling and templates
3525 to assist in creating releases on GitHub and publishing them on PyPI. It is
3526 designed to be used by Robot Framework and tools and libraries in its
3527 ecosystem, but can naturally be used also by other projects.")
3528 (license license:asl2.0)))
3529
3530 (define-public python-robotframework
3531 (package
3532 (name "python-robotframework")
3533 (version "3.1.2")
3534 ;; There are no tests in the PyPI archive.
3535 (source
3536 (origin
3537 (method git-fetch)
3538 (uri (git-reference
3539 (url "https://github.com/robotframework/robotframework")
3540 (commit (string-append "v" version))))
3541 (file-name (git-file-name name version))
3542 (sha256
3543 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
3544 (patches (search-patches
3545 "python-robotframework-honor-source-date-epoch.patch"))))
3546 (build-system python-build-system)
3547 (arguments
3548 `(#:phases (modify-phases %standard-phases
3549 (add-before 'build 'build-and-install-doc
3550 (lambda* (#:key outputs #:allow-other-keys)
3551 (let* ((doc-output (assoc-ref outputs "doc"))
3552 (doc (string-append doc-output "/share/"
3553 ,name "-" ,version "/")))
3554 (invoke "invoke" "library-docs" "all")
3555 (mkdir-p doc)
3556 (copy-recursively "doc/libraries"
3557 (string-append doc "/libraries"))
3558 #t)))
3559 (replace 'check
3560 (lambda _
3561 (invoke "python" "utest/run.py"))))))
3562 (native-inputs
3563 `(("python-invoke" ,python-invoke)
3564 ("python-rellu" ,python-rellu)
3565 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3566 (outputs '("out" "doc"))
3567 (home-page "https://robotframework.org")
3568 (synopsis "Generic automation framework")
3569 (description "Robot Framework is a generic automation framework for
3570 acceptance testing, acceptance test driven development (ATDD), and robotic
3571 process automation (RPA).")
3572 (license license:asl2.0)))
3573
3574 (define-public python-robotframework-lint
3575 ;; There is no properly tagged release; the commit below seems to correspond
3576 ;; to the 0.9 stable release available from PyPI. The tests are not
3577 ;; included in the PyPI archive, so we fetch the sources from the upstream
3578 ;; Git repo.
3579 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3580 (revision "1"))
3581 (package
3582 (name "python-robotframework-lint")
3583 (version (git-version "0.9.0" revision commit))
3584 (source
3585 (origin
3586 (method git-fetch)
3587 (uri (git-reference
3588 (url "https://github.com/boakley/robotframework-lint")
3589 (commit commit)))
3590 (file-name (git-file-name name version))
3591 (sha256
3592 (base32
3593 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3594 (build-system python-build-system)
3595 (arguments
3596 `(#:phases
3597 (modify-phases %standard-phases
3598 (replace 'check
3599 (lambda _
3600 (invoke "python" "-m" "robot" "-A"
3601 "tests/conf/default.args" "tests"))))))
3602 (propagated-inputs
3603 `(("python-robotframework" ,python-robotframework)))
3604 (home-page "https://github.com/boakley/robotframework-lint/")
3605 (synopsis "Static analysis tool (linter) for Robot Framework")
3606 (description "This package provides the @code{rflint} command-line
3607 utility, a static analysis tool (linter) for Robot Framework source files.")
3608 (license license:asl2.0))))
3609
3610 (define-public python-robotframework-sshlibrary
3611 (package
3612 (name "python-robotframework-sshlibrary")
3613 (version "3.3.0")
3614 ;; There are no tests in the PyPI archive.
3615 (source
3616 (origin
3617 (method git-fetch)
3618 (uri (git-reference
3619 (url "https://github.com/robotframework/SSHLibrary")
3620 (commit (string-append "v" version))))
3621 (file-name (git-file-name name version))
3622 (sha256
3623 (base32
3624 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3625 (build-system python-build-system)
3626 (arguments
3627 `(#:phases
3628 (modify-phases %standard-phases
3629 (add-before 'build 'build-and-install-doc
3630 (lambda* (#:key outputs #:allow-other-keys)
3631 (let* ((doc-output (assoc-ref outputs "doc"))
3632 (doc (string-append doc-output "/share/"
3633 ,name "-" ,version "/")))
3634 (invoke "chmod" "-R" "+w" "docs")
3635 (invoke "invoke" "kw-docs" "project-docs")
3636 (mkdir-p doc)
3637 (for-each delete-file (find-files "docs" "\\.rst"))
3638 (copy-recursively "docs" doc)
3639 #t)))
3640 (replace 'check
3641 (lambda _
3642 ;; Some tests require an SSH server; we remove them.
3643 (delete-file "utest/test_client_api.py")
3644 (delete-file "utest/test_scp.py")
3645 (invoke "python" "utest/run.py"))))))
3646 (propagated-inputs
3647 `(("python-robotframework" ,python-robotframework)
3648 ("python-paramiko" ,python-paramiko)
3649 ("python-scp" ,python-scp)))
3650 (native-inputs
3651 `(("openssh" ,openssh)
3652 ("which" ,which)
3653 ;; To generate the documentation
3654 ("python-docutils" ,python-docutils)
3655 ("python-invoke" ,python-invoke)
3656 ("python-pygments" ,python-pygments)
3657 ("python-rellu" ,python-rellu)))
3658 (outputs '("out" "doc"))
3659 (home-page "https://github.com/robotframework/SSHLibrary")
3660 (synopsis "Robot Framework library for SSH and SFTP")
3661 (description "SSHLibrary is a Robot Framework library providing support
3662 for SSH and SFTP. It has the following main usages:
3663 @itemize @bullet
3664 @item Executing commands on the remote machine, either blocking or non-blocking.
3665 @item Writing and reading in an interactive shell.
3666 @item Transferring files and directories over SFTP.
3667 @item Ensuring that files and directories exist on the remote machine.
3668 @end itemize")
3669 (license license:asl2.0)))
3670
3671 (define-public python-rstr
3672 (package
3673 (name "python-rstr")
3674 (version "2.2.6")
3675 (source
3676 (origin
3677 (method url-fetch)
3678 (uri (pypi-uri "rstr" version))
3679 (sha256
3680 (base32
3681 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3682 (build-system python-build-system)
3683 (home-page
3684 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3685 (synopsis "Generate random strings in Python")
3686 (description "This package provides a python module for generating
3687 random strings of various types. It could be useful for fuzz testing,
3688 generating dummy data, or other applications. It has no dependencies
3689 outside the standard library.")
3690 (license license:bsd-3)))
3691
3692 (define-public python-scp
3693 (package
3694 (name "python-scp")
3695 (version "0.13.2")
3696 (source
3697 (origin
3698 (method url-fetch)
3699 (uri (pypi-uri "scp" version))
3700 (sha256
3701 (base32
3702 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3703 (build-system python-build-system)
3704 (arguments
3705 '(#:tests? #f)) ;tests require an SSH server
3706 (propagated-inputs
3707 `(("python-paramiko" ,python-paramiko)))
3708 (home-page "https://github.com/jbardin/scp.py")
3709 (synopsis "SCP protocol module for Python and Paramiko")
3710 (description "The scp module extends the Paramiko library to send and
3711 receive files via the SCP1 protocol, as implemented by the OpenSSH
3712 @command{scp} program.")
3713 (license license:gpl2+)))
3714
3715 (define-public python-rst.linker
3716 (package
3717 (name "python-rst.linker")
3718 (version "1.11")
3719 (source
3720 (origin
3721 (method url-fetch)
3722 (uri (pypi-uri "rst.linker" version))
3723 (sha256
3724 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3725 (build-system python-build-system)
3726 (propagated-inputs
3727 `(("python-dateutil" ,python-dateutil)
3728 ("python-six" ,python-six)))
3729 (native-inputs
3730 `(("python-setuptools-scm" ,python-setuptools-scm)))
3731 ;; Test would require path.py, which would introduce a cyclic dependence.
3732 (arguments `(#:tests? #f))
3733 ;; Note: As of version 1.7 the documentation is not worth building.
3734 (home-page "https://github.com/jaraco/rst.linker")
3735 (synopsis "Sphinx plugin to add links and timestamps")
3736 (description "rst.linker automatically replaces text by a
3737 reStructuredText external reference or timestamps. It's primary purpose is to
3738 augment the changelog, but it can be used for other documents, too.")
3739 (license license:expat)))
3740
3741 (define-public python2-rst.linker
3742 (package-with-python2 python-rst.linker))
3743
3744 (define-public python-feedgenerator
3745 (package
3746 (name "python-feedgenerator")
3747 (version "1.9")
3748 (source
3749 (origin
3750 (method url-fetch)
3751 (uri (pypi-uri "feedgenerator" version))
3752 (sha256
3753 (base32
3754 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3755 (modules '((guix build utils)))
3756 (snippet
3757 '(begin
3758 ;; Remove pre-compiled .pyc files from source.
3759 (for-each delete-file-recursively
3760 (find-files "." "__pycache__" #:directories? #t))
3761 (for-each delete-file (find-files "." "\\.pyc$"))
3762 #t))))
3763 (build-system python-build-system)
3764 (propagated-inputs
3765 `(("python-pytz" ,python-pytz)
3766 ("python-six" ,python-six)))
3767 (home-page "https://github.com/getpelican/feedgenerator")
3768 (synopsis
3769 "Standalone version of Django's Atom/RSS feed generator")
3770 (description
3771 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3772 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3773 (license license:bsd-3)))
3774
3775 (define-public python2-feedgenerator
3776 (package-with-python2 python-feedgenerator))
3777
3778 (define-public python-toml
3779 (package
3780 (name "python-toml")
3781 (version "0.10.1")
3782 (source
3783 (origin
3784 (method url-fetch)
3785 (uri (pypi-uri "toml" version))
3786 (sha256
3787 (base32
3788 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3789 (build-system python-build-system)
3790 (arguments
3791 `(#:tests? #f)) ;no tests suite in release
3792 (home-page "https://github.com/uiri/toml")
3793 (synopsis "Library for TOML")
3794 (description
3795 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3796 Language (TOML) configuration files.")
3797 (license license:expat)))
3798
3799 (define-public python-jsonrpc-server
3800 (package
3801 (name "python-jsonrpc-server")
3802 (version "0.3.4")
3803 (source
3804 (origin
3805 (method url-fetch)
3806 (uri (pypi-uri "python-jsonrpc-server" version))
3807 (sha256
3808 (base32
3809 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
3810 (build-system python-build-system)
3811 (propagated-inputs
3812 `(("python-mock" ,python-mock)
3813 ("python-pytest" ,python-pytest)
3814 ("python-ujson" ,python-ujson-1)))
3815 (home-page
3816 "https://github.com/palantir/python-jsonrpc-server")
3817 (synopsis "JSON RPC 2.0 server library")
3818 (description
3819 "This package provides a JSON RPC 2.0 server library for Python.")
3820 (license license:expat)))
3821
3822 (define-public python-pydantic
3823 (package
3824 (name "python-pydantic")
3825 (version "1.6.1")
3826 (source
3827 (origin
3828 (method git-fetch)
3829 (uri (git-reference
3830 (url "https://github.com/samuelcolvin/pydantic")
3831 (commit (string-append "v" version))))
3832 (file-name (git-file-name name version))
3833 (sha256
3834 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
3835 (build-system python-build-system)
3836 (arguments
3837 '(#:phases
3838 (modify-phases %standard-phases
3839 ;; Reported upstream:
3840 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
3841 ;; Disable the faulty test as the fix is unclear.
3842 (add-before 'check 'disable-test
3843 (lambda _
3844 (substitute* "tests/test_validators.py"
3845 (("test_assert_raises_validation_error")
3846 "_test_assert_raises_validation_error"))
3847 #t))
3848 (replace 'check
3849 (lambda _ (invoke "pytest" "-vv" "tests"))))))
3850 (native-inputs
3851 `(("python-pytest" ,python-pytest)))
3852 (home-page "https://github.com/samuelcolvin/pydantic")
3853 (synopsis "Python data validation and settings management")
3854 (description
3855 "Pydantic enforces type hints at runtime, and provides user friendly
3856 errors when data is invalid.")
3857 (license license:expat)))
3858
3859 (define-public python-pydocstyle
3860 (package
3861 (name "python-pydocstyle")
3862 (version "3.0.0")
3863 (source
3864 (origin
3865 (method url-fetch)
3866 (uri (pypi-uri "pydocstyle" version))
3867 (sha256
3868 (base32
3869 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3870 (build-system python-build-system)
3871 (propagated-inputs
3872 `(("python-six" ,python-six)
3873 ("python-snowballstemmer" ,python-snowballstemmer)))
3874 (home-page
3875 "https://github.com/PyCQA/pydocstyle/")
3876 (synopsis "Python docstring style checker")
3877 (description
3878 "This package provides a style checker for the Python Language
3879 Server (PLS).")
3880 (license license:expat)))
3881
3882 (define-public python-language-server
3883 (package
3884 (name "python-language-server")
3885 (version "0.34.1")
3886 (source
3887 (origin
3888 (method url-fetch)
3889 (uri (pypi-uri "python-language-server" version))
3890 (sha256
3891 (base32
3892 "0gfjjlj7yg2nf8wkbrshwaljkwlqja4n7s1x949f495anmkg8vxr"))))
3893 (build-system python-build-system)
3894 (propagated-inputs
3895 `(("python-pluggy" ,python-pluggy)
3896 ("python-jsonrpc-server" ,python-jsonrpc-server)
3897 ("python-jedi" ,python-jedi)
3898 ("python-yapf" ,python-yapf)
3899 ("python-pyflakes" ,python-pyflakes)
3900 ("python-pydocstyle" ,python-pydocstyle)
3901 ("python-pycodestyle" ,python-pycodestyle)
3902 ("python-mccabe" ,python-mccabe)
3903 ("python-rope" ,python-rope)
3904 ("python-autopep8" ,python-autopep8)
3905 ("python-flake8" ,python-flake8)
3906 ("python-pylint" ,python-pylint)))
3907 (home-page "https://github.com/palantir/python-language-server")
3908 (synopsis "Python implementation of the Language Server Protocol")
3909 (description
3910 "The Python Language Server (pyls) is an implementation of the Python 3
3911 language specification for the Language Server Protocol (LSP). This tool is
3912 used in text editing environments to provide a complete and integrated
3913 feature-set for programming Python effectively.")
3914 (license license:expat)))
3915
3916 (define-public python-pathspec
3917 (package
3918 (name "python-pathspec")
3919 (version "0.7.0")
3920 (source
3921 (origin
3922 (method url-fetch)
3923 (uri (pypi-uri "pathspec" version))
3924 (sha256
3925 (base32
3926 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3927 (build-system python-build-system)
3928 (home-page "https://github.com/cpburnz/python-path-specification")
3929 (synopsis "Utility library for gitignore style pattern matching of file paths")
3930 (description
3931 "This package provides a utility library for gitignore style pattern
3932 matching of file paths.")
3933 (license license:mpl2.0)))
3934
3935 (define-public python-black
3936 (package
3937 (name "python-black")
3938 (version "19.10b0")
3939 (source
3940 (origin
3941 (method url-fetch)
3942 (uri (pypi-uri "black" version))
3943 (sha256
3944 (base32
3945 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
3946 (build-system python-build-system)
3947 (arguments
3948 `(#:phases
3949 (modify-phases %standard-phases
3950 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3951 (lambda _
3952 (let ((python3 (which "python3")))
3953 (substitute* '("tests/data/fmtonoff.py"
3954 "tests/data/string_prefixes.py"
3955 "tests/data/function.py"
3956 "tests/data/python37.py")
3957 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3958 (string-append "#!" python3 (if (string? minor-version)
3959 minor-version
3960 "")))))
3961 #t))
3962 (add-after 'unpack 'disable-broken-tests
3963 (lambda _
3964 ;; These tests are supposed to be skipped when the blackd
3965 ;; dependencies are missing, but this doesn't quite work.
3966 (substitute* "tests/test_black.py"
3967 (("( *)class BlackDTestCase.*" match indent)
3968 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3969 indent "class BlackDTestCase(unittest.TestCase):\n"))
3970 (("web.Application") "False")
3971 (("@unittest_run_loop") ""))
3972
3973 ;; Patching the above file breaks the self test
3974 (substitute* "tests/test_black.py"
3975 (("( *)def test_self" match indent)
3976 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3977 #t)))))
3978 (propagated-inputs
3979 `(("python-click" ,python-click)
3980 ("python-attrs" ,python-attrs)
3981 ("python-appdirs" ,python-appdirs)
3982 ("python-pathspec" ,python-pathspec)
3983 ("python-regex" ,python-regex)
3984 ("python-toml" ,python-toml)
3985 ("python-typed-ast" ,python-typed-ast)))
3986 (native-inputs
3987 `(("python-setuptools-scm" ,python-setuptools-scm)))
3988 (home-page "https://github.com/ambv/black")
3989 (synopsis "The uncompromising code formatter")
3990 (description "Black is the uncompromising Python code formatter.")
3991 (license license:expat)))
3992
3993 (define-public python-blinker
3994 (package
3995 (name "python-blinker")
3996 (version "1.4")
3997 (source
3998 (origin
3999 (method url-fetch)
4000 (uri (pypi-uri "blinker" version))
4001 (sha256
4002 (base32
4003 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4004 (build-system python-build-system)
4005 (home-page "https://pythonhosted.org/blinker/")
4006 (synopsis "Fast, simple object-to-object and broadcast signaling")
4007 (description
4008 "Blinker provides a fast dispatching system that allows any number of
4009 interested parties to subscribe to events, or \"signals\".")
4010 (license license:expat)))
4011
4012 (define-public python2-blinker
4013 (package-with-python2 python-blinker))
4014
4015 (define-public pelican
4016 (package
4017 (name "pelican")
4018 (version "4.2.0")
4019 (source
4020 (origin
4021 (method url-fetch)
4022 (uri (pypi-uri "pelican" version))
4023 (sha256
4024 (base32
4025 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4026 (build-system python-build-system)
4027 (propagated-inputs
4028 `(("python-blinker" ,python-blinker)
4029 ("python-dateutil" ,python-dateutil)
4030 ("python-docutils" ,python-docutils)
4031 ("python-feedgenerator" ,python-feedgenerator)
4032 ("python-jinja2" ,python-jinja2)
4033 ("python-markdown" ,python-markdown)
4034 ("python-pygments" ,python-pygments)
4035 ("python-pytz" ,python-pytz)
4036 ("python-six" ,python-six)
4037 ("python-unidecode" ,python-unidecode)))
4038 (home-page "https://getpelican.com/")
4039 (arguments
4040 `(;; XXX Requires a lot more packages to do unit tests :P
4041 #:tests? #f))
4042 (synopsis "Python-based static site publishing system")
4043 (description
4044 "Pelican is a tool to generate a static blog from reStructuredText,
4045 Markdown input files, and more. Pelican uses Jinja2 for templating
4046 and is very extensible.")
4047 (license license:agpl3+)))
4048
4049 (define-public mallard-ducktype
4050 (package
4051 (name "mallard-ducktype")
4052 (version "1.0.2")
4053 (source
4054 (origin
4055 (method git-fetch)
4056 ;; git-reference because tests are not included in pypi source tarball
4057 ;; https://issues.guix.gnu.org/issue/36755#2
4058 (uri (git-reference
4059 (url "https://github.com/projectmallard/mallard-ducktype")
4060 (commit version)))
4061 (file-name (git-file-name name version))
4062 (sha256
4063 (base32
4064 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4065 (build-system python-build-system)
4066 (arguments
4067 '(#:phases
4068 (modify-phases %standard-phases
4069 (replace 'check
4070 (lambda _
4071 (with-directory-excursion "tests"
4072 (invoke "sh" "runtests")))))))
4073 (home-page "http://projectmallard.org")
4074 (synopsis "Convert Ducktype to Mallard documentation markup")
4075 (description
4076 "Ducktype is a lightweight syntax that can represent all the semantics
4077 of the Mallard XML documentation system. Ducktype files can be converted to
4078 Mallard using the @command{ducktype} tool. The yelp-tools package
4079 provides additional functionality on the produced Mallard documents.")
4080 (license license:expat)))
4081
4082 (define-public python-cython
4083 (package
4084 (name "python-cython")
4085 (version "0.29.17")
4086 (source
4087 (origin
4088 (method url-fetch)
4089 (uri (pypi-uri "Cython" version))
4090 (sha256
4091 (base32
4092 "1wnaz40hdw4mg5acz5gqb6bhjhn4cvfxg0xdzfy7aa6qn665hqb3"))))
4093 (build-system python-build-system)
4094 ;; we need the full python package and not just the python-wrapper
4095 ;; because we need libpython3.3m.so
4096 (inputs
4097 `(("python" ,python)))
4098 (arguments
4099 `(#:phases
4100 (modify-phases %standard-phases
4101 (add-before 'check 'set-HOME
4102 ;; some tests require access to "$HOME/.cython"
4103 (lambda _ (setenv "HOME" "/tmp") #t))
4104 (replace 'check
4105 (lambda _
4106 ;; Disable compiler optimizations to greatly reduce the running
4107 ;; time of the test suite.
4108 (setenv "CFLAGS" "-O0")
4109
4110 (invoke "python" "runtests.py" "-vv"
4111 "-j" (number->string (parallel-job-count))
4112 ;; XXX: On 32-bit architectures, running the parallel tests
4113 ;; fails on many-core systems, see
4114 ;; <https://github.com/cython/cython/issues/2807>.
4115 ,@(if (not (target-64bit?))
4116 '("-x" "run.parallel")
4117 '())))))))
4118 (home-page "https://cython.org/")
4119 (synopsis "C extensions for Python")
4120 (description "Cython is an optimising static compiler for both the Python
4121 programming language and the extended Cython programming language. It makes
4122 writing C extensions for Python as easy as Python itself.")
4123 (license license:asl2.0)
4124 (properties `((python2-variant . ,(delay python2-cython))))))
4125
4126 (define-public python2-cython
4127 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4128 (package
4129 (inherit base)
4130 (name "python2-cython")
4131 (inputs
4132 `(("python-2" ,python-2))) ;this is not automatically changed
4133 (arguments
4134 (substitute-keyword-arguments (package-arguments base)
4135 ((#:phases phases)
4136 `(modify-phases ,phases
4137 (add-before 'check 'adjust-test_embed
4138 (lambda _
4139 (substitute* "runtests.py"
4140 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4141 ;; so it can give the right -L flag to GCC when embedding static
4142 ;; builds of Python. It is unaware that the Python "config"
4143 ;; directory (where the static library lives) was renamed in
4144 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4145 ;; which works fine, because that is where the shared library is.
4146 ;;
4147 ;; It also appears to be unaware that the Makefile in Demos/embed
4148 ;; already unconditionally pass the static library location to GCC,
4149 ;; after checking sysconfig.get_config_var('LIBPL).
4150 ;;
4151 ;; The effect is that the linker is unable to resolve libexpat
4152 ;; symbols when building for Python 2, because neither the Python 2
4153 ;; shared library nor Expat is available. To fix it, we can either
4154 ;; add Expat as an input and make it visible to the linker, or just
4155 ;; prevent it from overriding the Python shared library location.
4156 ;; The end result is identical, so we take the easy route.
4157 ((" or libname not in os\\.listdir\\(libdir\\)")
4158 ""))
4159 #t)))))))))
4160
4161 ;; The RPython toolchain currently does not support Python 3.
4162 (define-public python2-rpython
4163 (package
4164 (name "python2-rpython")
4165 (version "0.2.1")
4166 (source
4167 (origin
4168 (method url-fetch)
4169 (uri (pypi-uri "rpython" version))
4170 (sha256
4171 (base32
4172 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4173 (build-system python-build-system)
4174 (arguments `(#:python ,python-2))
4175 (native-inputs
4176 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4177 (home-page "https://rpython.readthedocs.org")
4178 (synopsis "Framework for implementing interpreters and virtual machines")
4179 (description "RPython is a translation and support framework for
4180 producing implementations of dynamic languages, emphasizing a clean separation
4181 between language specification and implementation aspects.")
4182 (license license:expat)))
4183
4184 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4185 ;; python-scipy still build, as these three packages are often used together.
4186 (define-public python-numpy
4187 (package
4188 (name "python-numpy")
4189 (version "1.17.3")
4190 (source
4191 (origin
4192 (method url-fetch)
4193 (uri (string-append
4194 "https://github.com/numpy/numpy/releases/download/v"
4195 version "/numpy-" version ".tar.gz"))
4196 (sha256
4197 (base32
4198 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4199 (build-system python-build-system)
4200 (inputs
4201 `(("openblas" ,openblas)
4202 ("lapack" ,lapack)))
4203 (native-inputs
4204 `(("python-cython" ,python-cython)
4205 ("python-pytest" ,python-pytest)
4206 ("gfortran" ,gfortran)))
4207 (arguments
4208 `(#:phases
4209 (modify-phases %standard-phases
4210 (add-before 'build 'configure-blas-lapack
4211 (lambda* (#:key inputs #:allow-other-keys)
4212 (call-with-output-file "site.cfg"
4213 (lambda (port)
4214 (format port
4215 "[openblas]
4216 libraries = openblas
4217 library_dirs = ~a/lib
4218 include_dirs = ~a/include
4219
4220 # backslash-n to make emacs happy
4221 \n[lapack]
4222 lapack_libs = lapack
4223 library_dirs = ~a/lib
4224 include_dirs = ~a/include
4225 "
4226 (assoc-ref inputs "openblas")
4227 (assoc-ref inputs "openblas")
4228 (assoc-ref inputs "lapack")
4229 (assoc-ref inputs "lapack"))))
4230 #t))
4231 (add-before 'build 'fix-executable-paths
4232 (lambda* (#:key inputs #:allow-other-keys)
4233 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4234 ;; instead of /bin/sh.
4235 (substitute* "numpy/distutils/exec_command.py"
4236 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4237 (string-append match-start (assoc-ref inputs "bash") match-end)))
4238 ;; Use "gcc" executable, not "cc".
4239 (substitute* "numpy/distutils/system_info.py"
4240 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4241 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4242 #t))
4243 ;; Tests can only be run after the library has been installed and not
4244 ;; within the source directory.
4245 (delete 'check)
4246 (add-after 'install 'check
4247 (lambda* (#:key outputs inputs #:allow-other-keys)
4248 ;; Make installed package available for running the tests
4249 (add-installed-pythonpath inputs outputs)
4250 ;; Make sure "f2py" etc is found.
4251 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4252 ":" (getenv "PATH")))
4253 (with-directory-excursion "/tmp"
4254 (invoke "python" "-c"
4255 "import numpy; numpy.test(verbose=2)")))))))
4256 (home-page "https://numpy.org")
4257 (synopsis "Fundamental package for scientific computing with Python")
4258 (description "NumPy is the fundamental package for scientific computing
4259 with Python. It contains among other things: a powerful N-dimensional array
4260 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4261 and Fortran code, useful linear algebra, Fourier transform, and random number
4262 capabilities.")
4263 (properties `((python2-variant . ,(delay python2-numpy))))
4264 (license license:bsd-3)))
4265
4266 ;; Numpy 1.16.x are the last versions that support Python 2.
4267 (define-public python2-numpy
4268 (let ((numpy (package-with-python2
4269 (strip-python2-variant python-numpy))))
4270 (package/inherit
4271 numpy
4272 (version "1.16.5")
4273 (source (origin
4274 (method url-fetch)
4275 (uri (string-append
4276 "https://github.com/numpy/numpy/releases/download/v"
4277 version "/numpy-" version ".tar.gz"))
4278 (sha256
4279 (base32
4280 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4281
4282 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4283 ;; interest only for legacy code going back to NumPy's predecessor
4284 ;; Numeric.
4285 (define-public python2-numpy-1.8
4286 (package (inherit python2-numpy)
4287 (version "1.8.2")
4288 (source
4289 (origin
4290 (method git-fetch)
4291 (uri (git-reference
4292 (url "https://github.com/numpy/numpy")
4293 (commit (string-append "v" version))))
4294 (file-name (git-file-name "numpy" version))
4295 (sha256
4296 (base32
4297 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4298 (arguments
4299 (substitute-keyword-arguments (package-arguments python2-numpy)
4300 ((#:phases phases)
4301 `(modify-phases ,phases
4302 (replace 'configure-blas-lapack
4303 (lambda* (#:key inputs #:allow-other-keys)
4304 (call-with-output-file "site.cfg"
4305 (lambda (port)
4306 (format port
4307 "[openblas]
4308 libraries = openblas,lapack
4309 library_dirs = ~a/lib:~a/lib
4310 include_dirs = ~a/include:~a/include
4311 "
4312 (assoc-ref inputs "openblas")
4313 (assoc-ref inputs "lapack")
4314 (assoc-ref inputs "openblas")
4315 (assoc-ref inputs "lapack"))))
4316 #t))))))
4317 (native-inputs
4318 `(("python2-nose" ,python2-nose)))
4319 (description "NumPy is the fundamental package for scientific computing
4320 with Python. It contains among other things: a powerful N-dimensional array
4321 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4322 and Fortran code, useful linear algebra, Fourier transform, and random number
4323 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4324 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4325 Numeric.")
4326 (license license:bsd-3)))
4327
4328 (define-public python-munch
4329 (package
4330 (name "python-munch")
4331 (version "2.0.4")
4332 (source
4333 (origin
4334 (method url-fetch)
4335 (uri (pypi-uri "munch" version))
4336 (sha256
4337 (base32
4338 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4339 (build-system python-build-system)
4340 (home-page "https://github.com/Infinidat/munch")
4341 (synopsis "Dot-accessible dictionary")
4342 (description "Munch is a dot-accessible dictionary similar to JavaScript
4343 objects.")
4344 (license license:expat)))
4345
4346 (define-public python2-munch
4347 (package-with-python2 python-munch))
4348
4349 (define-public python-colormath
4350 (package
4351 (name "python-colormath")
4352 (version "3.0.0")
4353 (source
4354 (origin
4355 (method url-fetch)
4356 (uri (pypi-uri "colormath" version))
4357 (sha256
4358 (base32
4359 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4360 (build-system python-build-system)
4361 (propagated-inputs
4362 `(("python-networkx" ,python-networkx)
4363 ("python-numpy" ,python-numpy)))
4364 (home-page "https://github.com/gtaylor/python-colormath")
4365 (synopsis "Color math and conversion library")
4366 (description
4367 "This is a Python library for color math and conversions.")
4368 (license license:bsd-3)))
4369
4370 (define-public python2-colormath
4371 (package-with-python2 python-colormath))
4372
4373 (define-public python-spectra
4374 (package
4375 (name "python-spectra")
4376 (version "0.0.11")
4377 (source
4378 (origin
4379 (method url-fetch)
4380 (uri (pypi-uri "spectra" version))
4381 (sha256
4382 (base32
4383 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4384 (build-system python-build-system)
4385 (arguments
4386 `(#:phases
4387 (modify-phases %standard-phases
4388 (replace 'check
4389 (lambda _ (invoke "nosetests" "-v"))))))
4390 (propagated-inputs
4391 `(("python-colormath" ,python-colormath)))
4392 (native-inputs
4393 `(("python-nose" ,python-nose)))
4394 (home-page "https://github.com/jsvine/spectra")
4395 (synopsis "Color scales and color conversion")
4396 (description
4397 "This package provides a Python library intended to make color math,
4398 color scales, and color space conversion easy. It has support for:
4399
4400 @enumerate
4401 @item Color scales
4402 @item Color ranges
4403 @item Color blending
4404 @item Brightening/darkening colors
4405 @item Saturating/desaturating colors
4406 @item Conversion to/from multiple color spaces.
4407 @end enumerate\n")
4408 (license license:expat)))
4409
4410 (define-public python2-spectra
4411 (package-with-python2 python-spectra))
4412
4413 (define-public python-numpy-documentation
4414 (package
4415 (name "python-numpy-documentation")
4416 (version (package-version python-numpy))
4417 (source (package-source python-numpy))
4418 (build-system python-build-system)
4419 (native-inputs
4420 `(("python-matplotlib" ,python-matplotlib)
4421 ("python-numpy" ,python-numpy)
4422 ("pkg-config" ,pkg-config)
4423 ("python-sphinx" ,python-sphinx)
4424 ("python-numpydoc" ,python-numpydoc)
4425 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4426 texlive-fonts-ec
4427 texlive-generic-ifxetex
4428 texlive-generic-pdftex
4429 texlive-amsfonts
4430 texlive-latex-capt-of
4431 texlive-latex-cmap
4432 texlive-latex-environ
4433 texlive-latex-eqparbox
4434 texlive-latex-etoolbox
4435 texlive-latex-expdlist
4436 texlive-latex-fancyhdr
4437 texlive-latex-fancyvrb
4438 texlive-latex-fncychap
4439 texlive-latex-float
4440 texlive-latex-framed
4441 texlive-latex-geometry
4442 texlive-latex-graphics
4443 texlive-latex-hyperref
4444 texlive-latex-mdwtools
4445 texlive-latex-multirow
4446 texlive-latex-needspace
4447 texlive-latex-oberdiek
4448 texlive-latex-parskip
4449 texlive-latex-preview
4450 texlive-latex-tabulary
4451 texlive-latex-threeparttable
4452 texlive-latex-titlesec
4453 texlive-latex-trimspaces
4454 texlive-latex-ucs
4455 texlive-latex-upquote
4456 texlive-latex-url
4457 texlive-latex-varwidth
4458 texlive-latex-wrapfig)))
4459 ("texinfo" ,texinfo)
4460 ("perl" ,perl)
4461 ("scipy-sphinx-theme"
4462 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4463 (method git-fetch)
4464 (uri (git-reference
4465 (url "https://github.com/scipy/scipy-sphinx-theme")
4466 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4467 (sha256
4468 (base32
4469 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4470 ,@(package-native-inputs python-numpy)))
4471 (arguments
4472 `(#:tests? #f ; we're only generating the documentation
4473 #:phases
4474 (modify-phases %standard-phases
4475 (delete 'build)
4476 (replace 'install
4477 (lambda* (#:key inputs outputs #:allow-other-keys)
4478 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4479 (doc (string-append
4480 data "/doc/" ,name "-"
4481 ,(package-version python-numpy)))
4482 (info-reader (string-append data "/info"))
4483 (html (string-append doc "/html"))
4484 (scipy-sphinx-theme "scipy-sphinx-theme")
4485 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4486 (pyver ,(string-append "PYVER=")))
4487
4488 ;; FIXME: this is needed to for texlive-union to generate
4489 ;; fonts, which are not found.
4490 (setenv "HOME" "/tmp")
4491
4492 (with-directory-excursion "doc"
4493 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4494 (mkdir-p html)
4495 (invoke "make" "html" pyver)
4496 (invoke "make" "latex" "PAPER=a4" pyver)
4497 (invoke "make" "-C" "build/latex"
4498 "all-pdf" "PAPER=a4" pyver)
4499 ;; FIXME: Generation of the info file fails.
4500 ;; (invoke "make" "info" pyver)
4501 ;; (mkdir-p info)
4502 ;; (copy-file "build/texinfo/numpy.info"
4503 ;; (string-append info "/numpy.info"))
4504 (for-each (lambda (file)
4505 (copy-file (string-append "build/latex" file)
4506 (string-append doc file)))
4507 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4508 (with-directory-excursion "build/html"
4509 (for-each (lambda (file)
4510 (let* ((dir (dirname file))
4511 (tgt-dir (string-append html "/" dir)))
4512 (unless (equal? "." dir)
4513 (mkdir-p tgt-dir))
4514 (install-file file html)))
4515 (find-files "." ".*")))))
4516 #t)))))
4517 (home-page (package-home-page python-numpy))
4518 (synopsis "Documentation for the python-numpy package")
4519 (description (package-description python-numpy))
4520 (license (package-license python-numpy))))
4521
4522 (define-public python2-numpy-documentation
4523 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4524 (package
4525 (inherit numpy-documentation)
4526 (native-inputs `(("python2-functools32" ,python2-functools32)
4527 ,@(package-native-inputs numpy-documentation))))))
4528
4529 (define-public python-pygit2
4530 (package
4531 (name "python-pygit2")
4532 (version "1.1.0")
4533 (source
4534 (origin
4535 (method url-fetch)
4536 (uri (pypi-uri "pygit2" version))
4537 (sha256
4538 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4539 (build-system python-build-system)
4540 (arguments
4541 '(#:tests? #f)) ; tests don't run correctly in our environment
4542 (propagated-inputs
4543 `(("python-cached-property" ,python-cached-property)
4544 ("python-cffi" ,python-cffi)
4545 ("libgit2" ,libgit2)))
4546 (native-inputs
4547 `(("python-pytest" ,python-pytest)))
4548 (home-page "https://github.com/libgit2/pygit2")
4549 (synopsis "Python bindings for libgit2")
4550 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4551 library, libgit2 implements Git plumbing.")
4552 ;; GPL2.0 only, with linking exception.
4553 (license license:gpl2)))
4554
4555 (define-public python-patiencediff
4556 (package
4557 (name "python-patiencediff")
4558 (version "0.2.0")
4559 (source
4560 (origin
4561 (method url-fetch)
4562 (uri (pypi-uri "patiencediff" version))
4563 (sha256
4564 (base32
4565 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4566 (build-system python-build-system)
4567 (home-page "https://www.breezy-vcs.org/")
4568 (synopsis "Python implementation of the patiencediff algorithm")
4569 (description
4570 "This package contains a Python implementation of the @code{patiencediff}
4571 algorithm. Patiencediff provides a good balance of performance, nice output for
4572 humans, and implementation simplicity.")
4573 (license license:gpl2)))
4574
4575 (define-public python-pyparsing
4576 (package
4577 (name "python-pyparsing")
4578 (version "2.4.6")
4579 (source
4580 (origin
4581 (method url-fetch)
4582 (uri (pypi-uri "pyparsing" version))
4583 (sha256
4584 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4585 (build-system python-build-system)
4586 (outputs '("out" "doc"))
4587 (arguments
4588 `(#:tests? #f ; no test target
4589 #:phases
4590 (modify-phases %standard-phases
4591 (add-after 'install 'install-doc
4592 (lambda* (#:key outputs #:allow-other-keys)
4593 (let* ((doc (string-append (assoc-ref outputs "doc")
4594 "/share/doc/" ,name "-" ,version))
4595 (html-doc (string-append doc "/html"))
4596 (examples (string-append doc "/examples")))
4597 (mkdir-p html-doc)
4598 (mkdir-p examples)
4599 (for-each
4600 (lambda (dir tgt)
4601 (map (lambda (file)
4602 (install-file file tgt))
4603 (find-files dir ".*")))
4604 (list "docs" "htmldoc" "examples")
4605 (list doc html-doc examples))
4606 #t))))))
4607 (home-page "https://github.com/pyparsing/pyparsing")
4608 (synopsis "Python parsing class library")
4609 (description
4610 "The pyparsing module is an alternative approach to creating and
4611 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4612 of regular expressions. The pyparsing module provides a library of classes
4613 that client code uses to construct the grammar directly in Python code.")
4614 (license license:expat)))
4615
4616 (define-public python2-pyparsing
4617 (package-with-python2 python-pyparsing))
4618
4619 (define-public python-numpydoc
4620 (package
4621 (name "python-numpydoc")
4622 (version "0.8.0")
4623 (source
4624 (origin
4625 (method url-fetch)
4626 (uri (pypi-uri "numpydoc" version))
4627 (sha256
4628 (base32
4629 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4630 (build-system python-build-system)
4631 (propagated-inputs
4632 `(("python-sphinx" ,python-sphinx)))
4633 (native-inputs
4634 `(("python-nose" ,python-nose)))
4635 (home-page "https://pypi.org/project/numpydoc/")
4636 (synopsis
4637 "Numpy's Sphinx extensions")
4638 (description
4639 "Sphinx extension to support docstrings in Numpy format.")
4640 (license license:bsd-2)))
4641
4642 (define-public python2-numpydoc
4643 (package-with-python2 python-numpydoc))
4644
4645 (define-public python-numexpr
4646 (package
4647 (name "python-numexpr")
4648 (version "2.6.5")
4649 (source
4650 (origin
4651 (method url-fetch)
4652 (uri (pypi-uri "numexpr" version))
4653 (sha256
4654 (base32
4655 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4656 (build-system python-build-system)
4657 (arguments `(#:tests? #f)) ; no tests included
4658 (propagated-inputs
4659 `(("python-numpy" ,python-numpy)))
4660 (home-page "https://github.com/pydata/numexpr")
4661 (synopsis "Fast numerical expression evaluator for NumPy")
4662 (description
4663 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4664 expressions that operate on arrays are accelerated and use less memory than
4665 doing the same calculation in Python. In addition, its multi-threaded
4666 capabilities can make use of all your cores, which may accelerate
4667 computations, most specially if they are not memory-bounded (e.g. those using
4668 transcendental functions).")
4669 (license license:expat)))
4670
4671 (define-public python2-numexpr
4672 (package-with-python2 python-numexpr))
4673
4674 (define-public python-cycler
4675 (package
4676 (name "python-cycler")
4677 (version "0.10.0")
4678 (source (origin
4679 (method url-fetch)
4680 (uri (pypi-uri "cycler" version))
4681 (sha256
4682 (base32
4683 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4684 (build-system python-build-system)
4685 (arguments
4686 ;; XXX: The current version requires 'coveralls' which we don't have.
4687 ;; Enable this for the next release which uses 'python-pytest'.
4688 '(#:tests? #f))
4689 (propagated-inputs
4690 `(("python-six" ,python-six)))
4691 (home-page "http://matplotlib.org/cycler/")
4692 (synopsis "Composable keyword argument iterator")
4693 (description
4694 "When using @code{matplotlib} and plotting more than one line, it is
4695 common to want to be able to want to be able to cycle over one or more artist
4696 styles; but the plotting logic can quickly become involved.
4697 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4698 @code{Cycler} class was developed.")
4699 (license license:bsd-3)))
4700
4701 (define-public python2-cycler
4702 (package-with-python2 python-cycler))
4703
4704 (define-public python-colorspacious
4705 (package
4706 (name "python-colorspacious")
4707 (version "1.1.2")
4708 (source
4709 (origin
4710 (method git-fetch)
4711 (uri (git-reference
4712 (url "https://github.com/njsmith/colorspacious")
4713 (commit (string-append "v" version))))
4714 (file-name (git-file-name name version))
4715 (sha256
4716 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4717 (build-system python-build-system)
4718 (propagated-inputs
4719 `(("python-numpy" ,python-numpy)))
4720 (native-inputs
4721 `(("python-nose" ,python-nose)))
4722 (arguments
4723 `(#:phases
4724 (modify-phases %standard-phases
4725 (replace 'check
4726 (lambda _
4727 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4728 (home-page "https://github.com/njsmith/colorspacious")
4729 (synopsis "Python library for colorspace conversions")
4730 (description "@code{colorspacious} is a Python library that lets you
4731 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4732 (license license:expat)))
4733
4734 (define-public python2-colorspacious
4735 (package-with-python2 python-colorspacious))
4736
4737 (define-public python-matplotlib
4738 (package
4739 (name "python-matplotlib")
4740 (version "3.1.2")
4741 (source
4742 (origin
4743 (method url-fetch)
4744 (uri (pypi-uri "matplotlib" version))
4745 (sha256
4746 (base32
4747 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4748 (build-system python-build-system)
4749 (propagated-inputs ; the following packages are all needed at run time
4750 `(("python-cycler" ,python-cycler)
4751 ("python-kiwisolver" ,python-kiwisolver)
4752 ("python-pyparsing" ,python-pyparsing)
4753 ("python-pygobject" ,python-pygobject)
4754 ("gobject-introspection" ,gobject-introspection)
4755 ("python-tkinter" ,python "tk")
4756 ("python-dateutil" ,python-dateutil)
4757 ("python-numpy" ,python-numpy)
4758 ("python-pillow" ,python-pillow)
4759 ("python-pytz" ,python-pytz)
4760 ("python-six" ,python-six)
4761 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4762 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4763 ;; object. For this reason we need to import both libraries.
4764 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4765 ("python-pycairo" ,python-pycairo)
4766 ("python-cairocffi" ,python-cairocffi)))
4767 (inputs
4768 `(("libpng" ,libpng)
4769 ("imagemagick" ,imagemagick)
4770 ("freetype" ,freetype)
4771 ("cairo" ,cairo)
4772 ("glib" ,glib)
4773 ;; FIXME: Add backends when available.
4774 ;("python-wxpython" ,python-wxpython)
4775 ("tcl" ,tcl)
4776 ("tk" ,tk)))
4777 (native-inputs
4778 `(("pkg-config" ,pkg-config)
4779 ("python-pytest" ,python-pytest)
4780 ("python-mock" ,python-mock)
4781 ("unzip" ,unzip)
4782 ("jquery-ui"
4783 ,(origin
4784 (method url-fetch)
4785 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4786 (sha256
4787 (base32
4788 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4789 (arguments
4790 `(#:phases
4791 (modify-phases %standard-phases
4792 ;; XXX We disable all image comparison tests because we're using a
4793 ;; newer version of FreeType than matplotlib expects. This leads to
4794 ;; minor differences throughout the tests.
4795 (add-after 'unpack 'fix-and-disable-failing-tests
4796 (lambda _
4797 (substitute* (append (find-files "lib/matplotlib/tests/"
4798 "test_.*\\.py$")
4799 (find-files "lib/mpl_toolkits/tests"
4800 "test_.*\\.py$"))
4801 (("^from matplotlib" match)
4802 (string-append "import pytest\n" match))
4803 (("( *)@image_comparison" match indent)
4804 (string-append indent
4805 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4806 match)))
4807 (substitute* "lib/matplotlib/tests/test_animation.py"
4808 (("/bin/sh") (which "sh")))
4809 (for-each delete-file
4810 ;; test_normal_axes, test_get_tightbbox_polar
4811 '("lib/matplotlib/tests/test_axes.py"
4812 ;; We don't use the webagg backend and this test forces it.
4813 "lib/matplotlib/tests/test_backend_webagg.py"
4814 ;; test_outward_ticks
4815 "lib/matplotlib/tests/test_tightlayout.py"
4816 ;; test_hidden_axes fails with minor extent
4817 ;; differences, possibly due to the use of a
4818 ;; different version of FreeType.
4819 "lib/matplotlib/tests/test_constrainedlayout.py"
4820 ;; Fontconfig returns no fonts.
4821 "lib/matplotlib/tests/test_font_manager.py"))
4822 #t))
4823 (add-before 'install 'install-jquery-ui
4824 (lambda* (#:key outputs inputs #:allow-other-keys)
4825 (let ((dir (string-append (assoc-ref outputs "out")
4826 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4827 (mkdir-p dir)
4828 (invoke "unzip"
4829 (assoc-ref inputs "jquery-ui")
4830 "-d" dir))
4831 #t))
4832 (replace 'check
4833 (lambda* (#:key outputs inputs #:allow-other-keys)
4834 (add-installed-pythonpath inputs outputs)
4835 (invoke "python" "tests.py" "-v"
4836 "-m" "not network and not webagg")))
4837 (add-before 'build 'configure-environment
4838 (lambda* (#:key outputs inputs #:allow-other-keys)
4839 (let ((cairo (assoc-ref inputs "cairo")))
4840 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4841 ;; has not effect.
4842 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4843 (setenv "HOME" (getcwd))
4844 (call-with-output-file "setup.cfg"
4845 (lambda (port)
4846 (format port "[directories]~%
4847 basedirlist = ~a,~a~%
4848 [packages]~%
4849 tests = True~%"
4850 (assoc-ref inputs "tcl")
4851 (assoc-ref inputs "tk")))))
4852 #t)))))
4853 (home-page "https://matplotlib.org/")
4854 (synopsis "2D plotting library for Python")
4855 (description
4856 "Matplotlib is a Python 2D plotting library which produces publication
4857 quality figures in a variety of hardcopy formats and interactive environments
4858 across platforms. Matplotlib can be used in Python scripts, the python and
4859 ipython shell, web application servers, and six graphical user interface
4860 toolkits.")
4861 (license license:psfl)
4862 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4863
4864 (define-public python2-matplotlib
4865 (let ((matplotlib (package-with-python2
4866 (strip-python2-variant python-matplotlib))))
4867 (package (inherit matplotlib)
4868 (version "2.2.4")
4869 (source
4870 (origin
4871 (method url-fetch)
4872 (uri (pypi-uri "matplotlib" version))
4873 (sha256
4874 (base32
4875 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4876 (arguments
4877 (substitute-keyword-arguments (package-arguments matplotlib)
4878 ((#:phases phases)
4879 `(modify-phases ,phases
4880 (replace 'install-jquery-ui
4881 (lambda* (#:key outputs inputs #:allow-other-keys)
4882 (let ((dir (string-append (assoc-ref outputs "out")
4883 "/lib/python2.7/site-packages/"
4884 "matplotlib/backends/web_backend/")))
4885 (mkdir-p dir)
4886 (invoke "unzip"
4887 (assoc-ref inputs "jquery-ui")
4888 "-d" dir))
4889 #t))
4890 (delete 'fix-and-disable-failing-tests)
4891 (delete 'check))))) ; These tests weren't run the the past.
4892 ;; Make sure to use special packages for Python 2 instead
4893 ;; of those automatically rewritten by package-with-python2.
4894 (propagated-inputs
4895 `(("python2-pycairo" ,python2-pycairo)
4896 ("python2-backports-functools-lru-cache"
4897 ,python2-backports-functools-lru-cache)
4898 ("python2-functools32" ,python2-functools32)
4899 ("python2-pygobject-2" ,python2-pygobject-2)
4900 ("python2-subprocess32" ,python2-subprocess32)
4901 ("python2-tkinter" ,python-2 "tk")
4902 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4903 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4904
4905 (define-public python-matplotlib-documentation
4906 (package
4907 (name "python-matplotlib-documentation")
4908 (version (package-version python-matplotlib))
4909 (source (package-source python-matplotlib))
4910 (build-system python-build-system)
4911 (native-inputs
4912 `(("python-matplotlib" ,python-matplotlib)
4913 ("python-colorspacious" ,python-colorspacious)
4914 ("python-sphinx" ,python-sphinx)
4915 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4916 ("python-sphinx-gallery" ,python-sphinx-gallery)
4917 ("python-numpydoc" ,python-numpydoc)
4918 ("python-ipython" ,python-ipython)
4919 ("python-ipykernel" ,python-ipykernel)
4920 ("python-mock" ,python-mock)
4921 ("graphviz" ,graphviz)
4922 ("texlive" ,(texlive-union (list texlive-amsfonts
4923 texlive-latex-amsmath
4924 texlive-latex-enumitem
4925 texlive-latex-expdlist
4926 texlive-latex-geometry
4927 texlive-latex-preview
4928 texlive-latex-type1cm
4929 texlive-latex-ucs
4930
4931 texlive-generic-pdftex
4932
4933 texlive-fonts-ec
4934 texlive-fonts-adobe-times
4935 texlive-fonts-txfonts)))
4936 ("texinfo" ,texinfo)
4937 ,@(package-native-inputs python-matplotlib)))
4938 (arguments
4939 `(#:tests? #f ; we're only generating documentation
4940 #:phases
4941 (modify-phases %standard-phases
4942 ;; The tests in python-matplotlib are run after the install phase, so
4943 ;; we need to delete the extra phase here.
4944 (delete 'check)
4945 (replace 'build
4946 (lambda _
4947 (chdir "doc")
4948 (setenv "PYTHONPATH"
4949 (string-append (getenv "PYTHONPATH")
4950 ":" (getcwd) "/../examples/units"))
4951 (substitute* "conf.py"
4952 ;; Don't use git.
4953 (("^SHA = check_output.*")
4954 (string-append "SHA = \"" ,version "\"\n"))
4955 ;; Don't fetch intersphinx files from the Internet
4956 (("^explicit_order_folders" m)
4957 (string-append "intersphinx_mapping = {}\n" m))
4958 (("'sphinx.ext.intersphinx',") "")
4959 ;; Disable URL embedding which requires internet access.
4960 (("'https://docs.scipy.org/doc/numpy'") "None")
4961 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4962 (invoke "make"
4963 "SPHINXBUILD=sphinx-build"
4964 "SPHINXOPTS=" ; don't abort on warnings
4965 "html" "texinfo")))
4966 (replace 'install
4967 (lambda* (#:key inputs outputs #:allow-other-keys)
4968 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4969 (doc (string-append data "/doc/python-matplotlib-" ,version))
4970 (info (string-append data "/info"))
4971 (html (string-append doc "/html")))
4972 (mkdir-p html)
4973 (mkdir-p info)
4974 (copy-recursively "build/html" html)
4975 (symlink (string-append html "/_images")
4976 (string-append info "/matplotlib-figures"))
4977 (with-directory-excursion "build/texinfo"
4978 (substitute* "matplotlib.texi"
4979 (("@image\\{([^,]*)" all file)
4980 (string-append "@image{matplotlib-figures/" file)))
4981 (symlink (string-append html "/_images")
4982 "./matplotlib-figures")
4983 (invoke "makeinfo" "--no-split"
4984 "-o" "matplotlib.info" "matplotlib.texi"))
4985 (install-file "build/texinfo/matplotlib.info" info))
4986 #t)))))
4987 (home-page (package-home-page python-matplotlib))
4988 (synopsis "Documentation for the python-matplotlib package")
4989 (description (package-description python-matplotlib))
4990 (license (package-license python-matplotlib))))
4991
4992 (define-public python2-matplotlib-documentation
4993 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4994 (package
4995 (inherit parent)
4996 (native-inputs
4997 (alist-delete "python-sphinx-copybutton"
4998 (package-native-inputs parent))))))
4999
5000 (define-public python-matplotlib-venn
5001 (package
5002 (name "python-matplotlib-venn")
5003 (version "0.11.5")
5004 (source
5005 (origin
5006 (method url-fetch)
5007 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5008 (sha256
5009 (base32
5010 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5011 (build-system python-build-system)
5012 (arguments '(#:tests? #f)) ; tests are not included
5013 (propagated-inputs
5014 `(("python-matplotlib" ,python-matplotlib)
5015 ("python-numpy" ,python-numpy)
5016 ("python-scipy" ,python-scipy)))
5017 (native-inputs
5018 `(("unzip" ,unzip)))
5019 (home-page "https://github.com/konstantint/matplotlib-venn")
5020 (synopsis "Plot area-proportional Venn diagrams")
5021 (description
5022 "This package provides tools for plotting area-proportional two- and
5023 three-way Venn diagrams in @code{matplotlib}.")
5024 (license license:expat)))
5025
5026 (define-public python-pysnptools
5027 (package
5028 (name "python-pysnptools")
5029 (version "0.4.11")
5030 (source
5031 (origin
5032 (method url-fetch)
5033 (uri (pypi-uri "pysnptools" version))
5034 (sha256
5035 (base32
5036 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5037 (build-system python-build-system)
5038 (arguments
5039 `(#:tests? #f ; no test data are included
5040 #:phases
5041 (modify-phases %standard-phases
5042 (replace 'check
5043 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5044 (if tests?
5045 (begin
5046 (add-installed-pythonpath inputs outputs)
5047 (invoke "python3" "pysnptools/test.py"))
5048 #t))))))
5049 (propagated-inputs
5050 `(("python-dill" ,python-dill)
5051 ("python-h5py" ,python-h5py)
5052 ("python-numpy" ,python-numpy)
5053 ("python-pandas" ,python-pandas)
5054 ("python-psutil" ,python-psutil)
5055 ("python-scipy" ,python-scipy)))
5056 (native-inputs
5057 `(("python-cython" ,python-cython)))
5058 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5059 (synopsis "Library for reading and manipulating genetic data")
5060 (description
5061 "PySnpTools is a library for reading and manipulating genetic data. It
5062 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5063 those files. It can also efficiently manipulate ranges of integers using set
5064 operators such as union, intersection, and difference.")
5065 (license license:asl2.0)))
5066
5067 (define-public python2-pysnptools
5068 (package-with-python2 python-pysnptools))
5069
5070 (define-public python-wurlitzer
5071 (package
5072 (name "python-wurlitzer")
5073 (version "2.0.1")
5074 (source
5075 (origin
5076 (method url-fetch)
5077 (uri (pypi-uri "wurlitzer" version))
5078 (sha256
5079 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5080 (build-system python-build-system)
5081 (arguments
5082 '(#:phases
5083 (modify-phases %standard-phases
5084 (replace 'check
5085 (lambda _
5086 (invoke "pytest" "-vv" "test.py"))))))
5087 (native-inputs
5088 `(("python-mock" ,python-mock)
5089 ("python-pytest" ,python-pytest)))
5090 (home-page "https://github.com/minrk/wurlitzer")
5091 (synopsis "Capture C-level output in context managers")
5092 (description
5093 "This library helps to redirect @code{sys.stdout} to a stream or a file
5094 while executing some piece of code, including C code running within a Python
5095 process.")
5096 (license license:expat)))
5097
5098 (define-public python-socksipy-branch
5099 (package
5100 (name "python-socksipy-branch")
5101 (version "1.01")
5102 (source
5103 (origin
5104 (method url-fetch)
5105 (uri (pypi-uri "SocksiPy-branch" version))
5106 (sha256
5107 (base32
5108 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5109 (build-system python-build-system)
5110 (arguments
5111 `(#:tests? #f)) ; There are no tests
5112 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5113 (synopsis "Python SOCKS module")
5114 (description
5115 "SocksiPy - A Python SOCKS client module. It provides a
5116 socket-like interface that supports connections to any TCP
5117 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5118 The original version was developed by Dan Haim, this is a
5119 branch created by Mario Vilas to address some open issues,
5120 as the original project seems to have been abandoned circa 2007.")
5121 (license license:bsd-3)))
5122
5123 (define-public python2-socksipy-branch
5124 (package-with-python2 python-socksipy-branch))
5125
5126 (define-public python-socksipychain
5127 (package
5128 (name "python-socksipychain")
5129 (version "2.1.2")
5130 (source
5131 (origin
5132 (method git-fetch)
5133 (uri (git-reference
5134 (url "https://github.com/pagekite/PySocksipyChain")
5135 (commit (string-append "v" version))))
5136 (file-name (git-file-name name version))
5137 (sha256
5138 (base32
5139 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5140 (build-system python-build-system)
5141 (arguments
5142 `(#:tests? #f)) ; Tests try to access the network.
5143 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5144 (synopsis "Python SOCKS module with chained proxies support")
5145 (description
5146 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5147 adds support for arbitrary chaining of proxy servers and various modes of
5148 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5149 a simple netcat replacement with chaining support.")
5150 (license license:bsd-3)))
5151
5152 (define-public python-pycodestyle
5153 (package
5154 (name "python-pycodestyle")
5155 (version "2.6.0")
5156 (source
5157 (origin
5158 (method url-fetch)
5159 (uri (pypi-uri "pycodestyle" version))
5160 (sha256
5161 (base32
5162 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5163 (build-system python-build-system)
5164 (arguments
5165 `(#:phases
5166 (modify-phases %standard-phases
5167 (replace 'check
5168 (lambda _
5169 (invoke "pytest" "-vv"))))))
5170 (native-inputs
5171 `(("python-pytest" ,python-pytest)))
5172 (home-page "https://pycodestyle.readthedocs.io/")
5173 (synopsis "Python style guide checker")
5174 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5175 Python code against some of the style conventions in
5176 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5177 (license license:expat)))
5178
5179 (define-public python2-pycodestyle
5180 (package-with-python2 python-pycodestyle))
5181
5182 (define-public python-multidict
5183 (package
5184 (name "python-multidict")
5185 (version "4.7.5")
5186 (source
5187 (origin
5188 (method url-fetch)
5189 (uri (pypi-uri "multidict" version))
5190 (sha256
5191 (base32
5192 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5193 (build-system python-build-system)
5194 (arguments
5195 '(#:modules ((ice-9 ftw)
5196 (srfi srfi-1)
5197 (srfi srfi-26)
5198 (guix build utils)
5199 (guix build python-build-system))
5200 #:phases (modify-phases %standard-phases
5201 (replace 'check
5202 (lambda* (#:key tests? #:allow-other-keys)
5203 (if tests?
5204 (begin
5205 (let ((libdir (find (cut string-prefix? "lib." <>)
5206 (scandir "build"))))
5207 (setenv "PYTHONPATH"
5208 (string-append "./build/" libdir ":"
5209 (getenv "PYTHONPATH")))
5210 (invoke "pytest" "-vv")))
5211 (format #t "test suite not run~%"))
5212 #t)))))
5213 (native-inputs
5214 `(("python-pytest" ,python-pytest)
5215 ("python-pytest-cov" ,python-pytest-cov)))
5216 (home-page "https://github.com/aio-libs/multidict/")
5217 (synopsis "Multidict implementation")
5218 (description "Multidict is dict-like collection of key-value pairs
5219 where key might be occurred more than once in the container.")
5220 (license license:asl2.0)))
5221
5222 (define-public python-orderedmultidict
5223 (package
5224 (name "python-orderedmultidict")
5225 (version "1.0")
5226 (source
5227 (origin
5228 (method url-fetch)
5229 (uri (pypi-uri "orderedmultidict" version))
5230 (sha256
5231 (base32
5232 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5233 (build-system python-build-system)
5234 (arguments
5235 `(#:phases
5236 (modify-phases %standard-phases
5237 (add-after 'unpack 'fix-tests
5238 (lambda _
5239 ;; The package uses nosetest for running the tests.
5240 ;; Adding this initfile allows to run the test suite
5241 ;; without requiring nosetest.
5242 (with-output-to-file "tests/__init__.py" newline)
5243 #t)))))
5244 (propagated-inputs
5245 `(("python-six" ,python-six)))
5246 (native-inputs
5247 `(("python-pycodestyle" ,python-pycodestyle)))
5248 (home-page "https://github.com/gruns/orderedmultidict")
5249 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5250 (description "This package contains a library for ordered multivalue
5251 dictionaries. A multivalue dictionary is a dictionary that can store
5252 multiple values for the same key. An ordered multivalue dictionary is a
5253 multivalue dictionary that retains the order of insertions and deletions.")
5254 (license license:unlicense)))
5255
5256 (define-public python2-orderedmultidict
5257 (package-with-python2 python-orderedmultidict))
5258
5259 (define-public python-autopep8
5260 (package
5261 (name "python-autopep8")
5262 (version "1.5.3")
5263 (source
5264 (origin
5265 (method url-fetch)
5266 (uri (pypi-uri "autopep8" version))
5267 (sha256
5268 (base32
5269 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5270 (build-system python-build-system)
5271 (propagated-inputs
5272 `(("python-pycodestyle" ,python-pycodestyle)
5273 ("python-toml" ,python-toml)))
5274 (home-page "https://github.com/hhatto/autopep8")
5275 (synopsis "Format Python code according to the PEP 8 style guide")
5276 (description
5277 "@code{autopep8} automatically formats Python code to conform to
5278 the PEP 8 style guide. It uses the pycodestyle utility to determine
5279 what parts of the code needs to be formatted. @code{autopep8} is
5280 capable of fixing most of the formatting issues that can be reported
5281 by pycodestyle.")
5282 (license (license:non-copyleft
5283 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5284
5285 (define-public python2-autopep8
5286 (package-with-python2 python-autopep8))
5287
5288 (define-public python-distlib
5289 (package
5290 (name "python-distlib")
5291 (version "0.3.0")
5292 (source
5293 (origin
5294 (method url-fetch)
5295 (uri (pypi-uri "distlib" version ".zip"))
5296 (sha256
5297 (base32
5298 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5299 (build-system python-build-system)
5300 (arguments
5301 `(#:phases
5302 (modify-phases %standard-phases
5303 (add-before 'build 'no-/bin/sh
5304 (lambda _
5305 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5306 (("/bin/sh") (which "sh")))
5307 #t))
5308 (add-before 'check 'prepare-test-env
5309 (lambda _
5310 (setenv "HOME" "/tmp")
5311 ;; NOTE: Any value works, the variable just has to be present.
5312 (setenv "SKIP_ONLINE" "1")
5313 #t)))))
5314 (native-inputs `(("unzip" ,unzip)))
5315 (home-page "https://bitbucket.org/pypa/distlib")
5316 (synopsis "Distribution utilities")
5317 (description "Distlib is a library which implements low-level functions that
5318 relate to packaging and distribution of Python software. It is intended to be
5319 used as the basis for third-party packaging tools.")
5320 (license license:psfl)))
5321
5322 (define-public python-distutils-extra
5323 (package
5324 (name "python-distutils-extra")
5325 (version "2.38")
5326 (source
5327 (origin
5328 (method url-fetch)
5329 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5330 version "/+download/python-distutils-extra-"
5331 version ".tar.gz"))
5332 (sha256
5333 (base32
5334 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5335 (build-system python-build-system)
5336 (home-page "https://launchpad.net/python-distutils-extra/")
5337 (synopsis "Enhancements to Python's distutils")
5338 (description
5339 "The python-distutils-extra module enables you to easily integrate
5340 gettext support, themed icons, and scrollkeeper-based documentation into
5341 Python's distutils.")
5342 (license license:gpl2)))
5343
5344 (define-public python2-distutils-extra
5345 (package-with-python2 python-distutils-extra))
5346
5347 (define-public python2-elib.intl
5348 (package
5349 (name "python2-elib.intl")
5350 (version "0.0.3")
5351 (source
5352 (origin
5353 ;; This project doesn't tag releases or publish tarballs, so we take
5354 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5355 (method git-fetch)
5356 (uri (git-reference
5357 (url "https://github.com/dieterv/elib.intl")
5358 (commit "d09997cfef")))
5359 (file-name (string-append name "-" version "-checkout"))
5360 (sha256
5361 (base32
5362 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5363 (build-system python-build-system)
5364 (arguments
5365 ;; incompatible with Python 3 (exception syntax)
5366 `(#:python ,python-2
5367 #:tests? #f))
5368 (home-page "https://github.com/dieterv/elib.intl")
5369 (synopsis "Enhanced internationalization for Python")
5370 (description
5371 "The elib.intl module provides enhanced internationalization (I18N)
5372 services for your Python modules and applications.")
5373 (license license:lgpl3+)))
5374
5375 (define-public python-olefile
5376 (package
5377 (name "python-olefile")
5378 (version "0.46")
5379 (source
5380 (origin
5381 (method url-fetch)
5382 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5383 "download/v" version "/olefile-" version ".tar.gz"))
5384 (file-name (string-append name "-" version ".tar.gz"))
5385 (sha256
5386 (base32
5387 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5388 (build-system python-build-system)
5389 (home-page "https://www.decalage.info/python/olefileio")
5390 (synopsis "Read and write Microsoft OLE2 files.")
5391 (description
5392 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5393 Storage or Compound Document, Microsoft Office). It is an improved version of
5394 the OleFileIO module from PIL, the Python Image Library.")
5395 (license license:bsd-3)))
5396
5397 (define-public python2-olefile
5398 (package-with-python2 python-olefile))
5399
5400 (define-public python-pillow
5401 (package
5402 (name "python-pillow")
5403 (version "6.2.1")
5404 (source
5405 (origin
5406 (method url-fetch)
5407 (uri (pypi-uri "Pillow" version))
5408 (sha256
5409 (base32
5410 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5411 (build-system python-build-system)
5412 (native-inputs
5413 `(("python-pytest" ,python-pytest)))
5414 (inputs
5415 `(("freetype" ,freetype)
5416 ("lcms" ,lcms)
5417 ("libjpeg" ,libjpeg-turbo)
5418 ("libtiff" ,libtiff)
5419 ("libwebp" ,libwebp)
5420 ("openjpeg" ,openjpeg)
5421 ("zlib" ,zlib)))
5422 (propagated-inputs
5423 `(("python-olefile" ,python-olefile)))
5424 (arguments
5425 `(#:phases
5426 (modify-phases %standard-phases
5427 (add-after 'unpack 'patch-ldconfig
5428 (lambda _
5429 (substitute* "setup.py"
5430 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5431 (replace 'check
5432 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5433 (if tests?
5434 (begin
5435 (setenv "HOME" (getcwd))
5436 ;; Make installed package available for running the tests.
5437 (add-installed-pythonpath inputs outputs)
5438 (invoke "python" "selftest.py" "--installed")
5439 (invoke "python" "-m" "pytest" "-vv"))
5440 #t))))))
5441 (home-page "https://python-pillow.org")
5442 (synopsis "Fork of the Python Imaging Library")
5443 (description
5444 "The Python Imaging Library adds image processing capabilities to your
5445 Python interpreter. This library provides extensive file format support, an
5446 efficient internal representation, and fairly powerful image processing
5447 capabilities. The core image library is designed for fast access to data
5448 stored in a few basic pixel formats. It should provide a solid foundation for
5449 a general image processing tool.")
5450 (license (license:x11-style
5451 "http://www.pythonware.com/products/pil/license.htm"
5452 "The PIL Software License"))))
5453
5454 (define-public python2-pillow
5455 (package-with-python2 python-pillow))
5456
5457 (define-public python-pillow-2.9
5458 (package
5459 (inherit python-pillow)
5460 (version "2.9.0")
5461 (source
5462 (origin
5463 (method url-fetch)
5464 (uri (pypi-uri "Pillow" version))
5465 (sha256
5466 (base32
5467 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5468 (arguments
5469 (substitute-keyword-arguments (package-arguments python-pillow)
5470 ((#:tests? _ #f) #f)))
5471 (properties '((hidden? #t)))))
5472
5473 (define-public python-roifile
5474 (package
5475 (name "python-roifile")
5476 (version "2020.5.28")
5477 (source
5478 (origin
5479 (method url-fetch)
5480 (uri (pypi-uri "roifile" version))
5481 (sha256
5482 (base32
5483 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5484 (build-system python-build-system)
5485 (arguments `(#:tests? #f)) ; there are none
5486 (propagated-inputs
5487 `(("python-numpy" ,python-numpy)))
5488 (home-page "https://www.lfd.uci.edu/~gohlke/")
5489 (synopsis "Read and write ImageJ ROI format")
5490 (description "Roifile is a Python library to read, write, create, and plot
5491 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5492 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5493 (license license:bsd-3)))
5494
5495 (define-public python-tifffile
5496 (package
5497 (name "python-tifffile")
5498 (version "2020.6.3")
5499 (source
5500 (origin
5501 (method url-fetch)
5502 (uri (pypi-uri "tifffile" version))
5503 (sha256
5504 (base32
5505 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5506 (build-system python-build-system)
5507 ;; Tests require lfdfiles, which depends on tifffile
5508 (arguments `(#:tests? #f))
5509 (propagated-inputs
5510 `(("python-numpy" ,python-numpy)
5511 ;;("python-lfdfiles" ,python-lfdfiles)
5512 ("python-roifile" ,python-roifile)))
5513 (home-page "https://www.lfd.uci.edu/~gohlke/")
5514 (synopsis "Read and write TIFF(r) files")
5515 (description "This package lets you read image and metadata from many
5516 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5517 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5518 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5519 (license license:bsd-3)))
5520
5521 (define-public python-lfdfiles
5522 (package
5523 (name "python-lfdfiles")
5524 (version "2020.1.1")
5525 (source
5526 (origin
5527 (method url-fetch)
5528 (uri (pypi-uri "lfdfiles" version))
5529 (sha256
5530 (base32
5531 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5532 (build-system python-build-system)
5533 (propagated-inputs
5534 `(("python-click" ,python-click)
5535 ("python-numpy" ,python-numpy)
5536 ("python-tifffile" ,python-tifffile)))
5537 (home-page "https://www.lfd.uci.edu/~gohlke/")
5538 (synopsis "Work with LFD data files")
5539 (description
5540 "Lfdfiles is a Python library and console script for reading, writing,
5541 converting, and viewing many of the proprietary file formats used to store
5542 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5543 (license license:bsd-3)))
5544
5545 (define-public python-imageio
5546 (package
5547 (name "python-imageio")
5548 (version "2.8.0")
5549 (source
5550 (origin
5551 (method url-fetch)
5552 (uri (pypi-uri "imageio" version))
5553 (sha256
5554 (base32
5555 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5556 (build-system python-build-system)
5557 (arguments
5558 `(#:tests? #f ; many tests require online data
5559 #:phases
5560 (modify-phases %standard-phases
5561 (replace 'check
5562 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5563 (if tests?
5564 (begin
5565 ;; Make installed package available for running the tests.
5566 (add-installed-pythonpath inputs outputs)
5567 (invoke "pytest" "-vv"))
5568 #t))))))
5569 (propagated-inputs
5570 `(("python-numpy" ,python-numpy)
5571 ("python-pillow" ,python-pillow)
5572 ("python-psutil" ,python-psutil)))
5573 (native-inputs
5574 `(("python-pytest" ,python-pytest)))
5575 (home-page "https://imageio.github.io/")
5576 (synopsis "Library for reading and writing a wide range of image data")
5577 (description
5578 "Imageio is a Python library that provides an easy interface to read and
5579 write a wide range of image data, including animated images, video, volumetric
5580 data, and scientific formats.")
5581 (license license:bsd-2)))
5582
5583 (define-public python-pycparser
5584 (package
5585 (name "python-pycparser")
5586 (version "2.20")
5587 (source
5588 (origin
5589 (method url-fetch)
5590 (uri (pypi-uri "pycparser" version))
5591 (sha256
5592 (base32
5593 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5594 (outputs '("out" "doc"))
5595 (build-system python-build-system)
5596 (native-inputs
5597 `(("pkg-config" ,pkg-config)))
5598 (arguments
5599 `(#:phases
5600 (modify-phases %standard-phases
5601 (replace 'check
5602 (lambda _
5603 (with-directory-excursion "tests"
5604 (invoke "python" "all_tests.py"))
5605 #t))
5606 (add-after 'install 'install-doc
5607 (lambda* (#:key outputs #:allow-other-keys)
5608 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5609 (doc (string-append data "/doc/" ,name "-" ,version))
5610 (examples (string-append doc "/examples")))
5611 (mkdir-p examples)
5612 (for-each (lambda (file)
5613 (copy-file (string-append "." file)
5614 (string-append doc file)))
5615 '("/README.rst" "/CHANGES" "/LICENSE"))
5616 (copy-recursively "examples" examples)
5617 #t))))))
5618 (home-page "https://github.com/eliben/pycparser")
5619 (synopsis "C parser in Python")
5620 (description
5621 "Pycparser is a complete parser of the C language, written in pure Python
5622 using the PLY parsing library. It parses C code into an AST and can serve as
5623 a front-end for C compilers or analysis tools.")
5624 (license license:bsd-3)))
5625
5626 (define-public python2-pycparser
5627 (package-with-python2 python-pycparser))
5628
5629 (define-public python-pywavelets
5630 (package
5631 (name "python-pywavelets")
5632 (version "1.1.1")
5633 (home-page "https://github.com/PyWavelets/pywt")
5634 (source (origin
5635 (method url-fetch)
5636 (uri (pypi-uri "PyWavelets" version))
5637 (sha256
5638 (base32
5639 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5640 (build-system python-build-system)
5641 (arguments
5642 '(#:modules ((ice-9 ftw)
5643 (srfi srfi-1)
5644 (srfi srfi-26)
5645 (guix build utils)
5646 (guix build python-build-system))
5647 #:phases
5648 (modify-phases %standard-phases
5649 (replace 'check
5650 (lambda _
5651 (let ((cwd (getcwd))
5652 (libdir (find (cut string-prefix? "lib." <>)
5653 (scandir "build"))))
5654 (with-directory-excursion (string-append cwd "/build/" libdir)
5655 (invoke "pytest" "-vv"))))))))
5656 (native-inputs
5657 `(("python-matplotlib" ,python-matplotlib) ;for tests
5658 ("python-pytest" ,python-pytest)))
5659 (propagated-inputs
5660 `(("python-numpy" ,python-numpy)))
5661 (synopsis "Wavelet transforms in Python")
5662 (description
5663 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5664 mathematical basis functions that are localized in both time and frequency.
5665 Wavelet transforms are time-frequency transforms employing wavelets. They are
5666 similar to Fourier transforms, the difference being that Fourier transforms are
5667 localized only in frequency instead of in time and frequency.")
5668 (license license:expat)))
5669
5670 (define-public python-pywinrm
5671 (package
5672 (name "python-pywinrm")
5673 (version "0.4.1")
5674 (source
5675 (origin
5676 (method url-fetch)
5677 (uri (pypi-uri "pywinrm" version))
5678 (sha256
5679 (base32
5680 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5681 (build-system python-build-system)
5682 (propagated-inputs
5683 `(("python-six" ,python-six)
5684 ("python-requests_ntlm" ,python-requests_ntlm)
5685 ("python-xmltodict" ,python-xmltodict)
5686 ("python-kerberos" ,python-kerberos)))
5687 (native-inputs
5688 `(("python-mock" ,python-mock)
5689 ("python-pytest" ,python-pytest)))
5690 (home-page "https://github.com/diyan/pywinrm/")
5691 (synopsis
5692 "Python library for Windows Remote Management (WinRM)")
5693 (description
5694 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5695 service. It allows you to invoke commands on target Windows machines from
5696 any machine that can run Python.")
5697 (license license:expat)))
5698
5699 (define-public python-xcffib
5700 (package
5701 (name "python-xcffib")
5702 (version "0.6.0")
5703 (source
5704 (origin
5705 (method url-fetch)
5706 (uri (pypi-uri "xcffib" version))
5707 (sha256
5708 (base32
5709 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5710 (build-system python-build-system)
5711 (inputs
5712 `(("libxcb" ,libxcb)))
5713 (propagated-inputs
5714 `(("python-cffi" ,python-cffi) ; used at run time
5715 ("python-six" ,python-six)))
5716 (arguments
5717 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5718 #:tests? #f
5719 #:phases
5720 (modify-phases %standard-phases
5721 (add-after 'unpack 'fix-libxcb-path
5722 (lambda* (#:key inputs #:allow-other-keys)
5723 (let ((libxcb (assoc-ref inputs "libxcb")))
5724 (substitute* '("xcffib/__init__.py")
5725 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5726 #t)))
5727 (add-after 'install 'install-doc
5728 (lambda* (#:key outputs #:allow-other-keys)
5729 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5730 "/doc/" ,name "-" ,version)))
5731 (mkdir-p doc)
5732 (copy-file "README.md"
5733 (string-append doc "/README.md"))
5734 #t))))))
5735 (home-page "https://github.com/tych0/xcffib")
5736 (synopsis "XCB Python bindings")
5737 (description
5738 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5739 support for Python 3 and PyPy. It is based on cffi.")
5740 (license license:expat)))
5741
5742 (define-public python2-xcffib
5743 (package-with-python2 python-xcffib))
5744
5745 (define-public python-cairocffi
5746 (package
5747 (name "python-cairocffi")
5748 (version "0.9.0")
5749 (source
5750 (origin
5751 (method url-fetch)
5752 (uri (pypi-uri "cairocffi" version))
5753 (sha256
5754 (base32
5755 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5756 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5757 (build-system python-build-system)
5758 (outputs '("out" "doc"))
5759 (inputs
5760 `(("glib" ,glib)
5761 ("gtk+" ,gtk+)
5762 ("gdk-pixbuf" ,gdk-pixbuf)
5763 ("cairo" ,cairo)
5764 ("pango" ,pango)))
5765 (native-inputs
5766 `(("pkg-config" ,pkg-config)
5767 ("python-pytest" ,python-pytest)
5768 ("python-pytest-cov" ,python-pytest-cov)
5769 ("python-pytest-runner" ,python-pytest-runner)
5770 ("python-sphinx" ,python-sphinx)
5771 ("python-docutils" ,python-docutils)))
5772 (propagated-inputs
5773 `(("python-xcffib" ,python-xcffib))) ; used at run time
5774 (arguments
5775 `(#:phases
5776 (modify-phases %standard-phases
5777 (add-after 'unpack 'patch-paths
5778 (lambda* (#:key inputs outputs #:allow-other-keys)
5779 (substitute* (find-files "." "\\.py$")
5780 (("dlopen\\(ffi, 'cairo'")
5781 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5782 "/lib/libcairo.so.2'"))
5783 (("dlopen\\(ffi, 'gdk-3'")
5784 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5785 "/lib/libgtk-3.so.0'"))
5786 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5787 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5788 "/lib/libgdk_pixbuf-2.0.so.0'"))
5789 (("dlopen\\(ffi, 'glib-2.0'")
5790 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5791 "/lib/libglib-2.0.so.0'"))
5792 (("dlopen\\(ffi, 'gobject-2.0'")
5793 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5794 "/lib/libgobject-2.0.so.0'"))
5795 (("dlopen\\(ffi, 'pangocairo-1.0'")
5796 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5797 "/lib/libpangocairo-1.0.so.0'"))
5798 (("dlopen\\(ffi, 'pango-1.0'")
5799 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5800 "/lib/libpango-1.0.so.0'")))
5801 #t))
5802 (add-after 'install 'install-doc
5803 (lambda* (#:key inputs outputs #:allow-other-keys)
5804 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5805 (doc (string-append data "/doc/" ,name "-" ,version))
5806 (html (string-append doc "/html")))
5807 (setenv "LD_LIBRARY_PATH"
5808 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5809 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5810 (setenv "LANG" "en_US.UTF-8")
5811 (mkdir-p html)
5812 (for-each (lambda (file)
5813 (copy-file (string-append "." file)
5814 (string-append doc file)))
5815 '("/README.rst" "/CHANGES" "/LICENSE"))
5816 (system* "python" "setup.py" "build_sphinx")
5817 (copy-recursively "docs/_build/html" html)
5818 #t))))))
5819 (home-page "https://github.com/Kozea/cairocffi")
5820 (synopsis "Python bindings and object-oriented API for Cairo")
5821 (description
5822 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5823 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5824 graphics library with support for multiple backends including image buffers,
5825 PNG, PostScript, PDF, and SVG file output.")
5826 (license license:bsd-3)))
5827
5828 (define-public python2-cairocffi
5829 (package-with-python2 python-cairocffi))
5830
5831 (define-public python-decorator
5832 (package
5833 (name "python-decorator")
5834 (version "4.3.0")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (pypi-uri "decorator" version))
5839 (sha256
5840 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5841 (build-system python-build-system)
5842 (home-page "https://pypi.org/project/decorator/")
5843 (synopsis "Python module to simplify usage of decorators")
5844 (description
5845 "The aim of the decorator module is to simplify the usage of decorators
5846 for the average programmer, and to popularize decorators usage giving examples
5847 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5848 etc. The core of this module is a decorator factory.")
5849 (license license:expat)))
5850
5851 (define-public python2-decorator
5852 (package-with-python2 python-decorator))
5853
5854 (define-public python-drmaa
5855 (package
5856 (name "python-drmaa")
5857 (version "0.7.7")
5858 (source
5859 (origin
5860 (method url-fetch)
5861 (uri (pypi-uri "drmaa" version))
5862 (sha256
5863 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5864 (build-system python-build-system)
5865 ;; The test suite requires libdrmaa which is provided by the cluster
5866 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5867 ;; should be set to the path of the libdrmaa library.
5868 (arguments '(#:tests? #f))
5869 (native-inputs
5870 `(("python-nose" ,python-nose)))
5871 (home-page "https://pypi.org/project/drmaa/")
5872 (synopsis "Python bindings for the DRMAA library")
5873 (description
5874 "A Python package for Distributed Resource Management (DRM) job
5875 submission and control. This package is an implementation of the DRMAA 1.0
5876 Python language binding specification.")
5877 (license license:bsd-3)))
5878
5879 (define-public python2-drmaa
5880 (package-with-python2 python-drmaa))
5881
5882 (define-public python-grako
5883 (package
5884 (name "python-grako")
5885 (version "3.99.9")
5886 (source
5887 (origin
5888 (method url-fetch)
5889 (uri
5890 (pypi-uri "grako" version ".zip"))
5891 (sha256
5892 (base32
5893 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5894 (build-system python-build-system)
5895 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5896 (native-inputs
5897 `(("unzip" ,unzip)
5898 ("python-pytest" ,python-pytest)
5899 ("python-pytest-runner" ,python-pytest-runner)))
5900 (home-page "https://bitbucket.org/neogeny/grako")
5901 (synopsis "EBNF parser generator")
5902 (description
5903 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5904 memoizing PEG/Packrat parser in Python.")
5905 (license license:bsd-3)))
5906
5907 (define-public python2-grako
5908 (package-with-python2 python-grako))
5909
5910 (define-public python-gridmap
5911 (package
5912 (name "python-gridmap")
5913 (version "0.14.0")
5914 (source
5915 (origin
5916 (method git-fetch)
5917 (uri (git-reference
5918 (url "https://github.com/pygridtools/gridmap")
5919 (commit (string-append "v" version))))
5920 (file-name (git-file-name name version))
5921 (sha256
5922 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
5923 (build-system python-build-system)
5924 (arguments
5925 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5926 (propagated-inputs
5927 `(("python-psutil" ,python-psutil)
5928 ("python-drmaa" ,python-drmaa)
5929 ("python-pyzmq" ,python-pyzmq)))
5930 (home-page "https://github.com/pygridtools/gridmap")
5931 (synopsis "Create jobs on a cluster directly from Python")
5932 (description
5933 "Gridmap is a Python package to allow you to easily create jobs on the
5934 cluster directly from Python. You can directly map Python functions onto the
5935 cluster without needing to write any wrapper code yourself.")
5936 (license license:gpl3+)))
5937
5938 (define-public python2-gridmap
5939 (package-with-python2 python-gridmap))
5940
5941 (define-public python-honcho
5942 (package
5943 (name "python-honcho")
5944 (version "1.0.1")
5945 (source
5946 (origin
5947 (method git-fetch)
5948 (uri (git-reference
5949 (url "https://github.com/nickstenning/honcho")
5950 (commit (string-append "v" version))))
5951 (file-name (git-file-name name version))
5952 (sha256
5953 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5954 (build-system python-build-system)
5955 (native-inputs
5956 `(("python-pytest" ,python-pytest)
5957 ("python-mock" ,python-mock)
5958 ("python-tox" ,python-tox)
5959 ("which" ,which))) ;for tests
5960 (propagated-inputs
5961 `(("python-jinja2" ,python-jinja2)))
5962 (arguments
5963 `(#:phases
5964 (modify-phases %standard-phases
5965 (delete 'check)
5966 (add-after 'install 'check
5967 (lambda* (#:key outputs inputs #:allow-other-keys)
5968 ;; fix honcho path in testsuite
5969 (substitute* "tests/conftest.py"
5970 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5971 "/bin/honcho" "'")))
5972 ;; It's easier to run tests after install.
5973 ;; Make installed package available for running the tests
5974 (add-installed-pythonpath inputs outputs)
5975 (invoke "py.test" "-v"))))))
5976 (home-page "https://github.com/nickstenning/honcho")
5977 (synopsis "Manage Procfile-based applications")
5978 (description
5979 "A Procfile is a file which describes how to run an application
5980 consisting of several processes. honcho starts all listed processes.
5981 The output of all running processes is collected by honcho and
5982 displayed.")
5983 (license license:expat)))
5984
5985 (define-public python2-honcho
5986 (package-with-python2 python-honcho))
5987
5988 (define-public python-pexpect
5989 (package
5990 (name "python-pexpect")
5991 (version "4.8.0")
5992 (source
5993 (origin
5994 (method url-fetch)
5995 (uri (pypi-uri "pexpect" version))
5996 (sha256
5997 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
5998 (build-system python-build-system)
5999 (arguments
6000 `(#:phases
6001 (modify-phases %standard-phases
6002 (add-before 'check 'prepare-tests
6003 (lambda _
6004 (substitute* (find-files "tests")
6005 (("/bin/ls") (which "ls"))
6006 (("/bin/echo") (which "echo"))
6007 (("/bin/which") (which "which"))
6008 ;; Many tests try to use the /bin directory which
6009 ;; is not present in the build environment.
6010 ;; Use one that's non-empty and unlikely to change.
6011 (("/bin'") "/dev'")
6012 ;; Disable failing test. See upstream bug report
6013 ;; https://github.com/pexpect/pexpect/issues/568
6014 (("def test_bash") "def _test_bash"))
6015 ;; XXX: Socket connection test gets "Connection reset by peer".
6016 ;; Why does it not work? Delete for now.
6017 (delete-file "tests/test_socket.py")
6018 #t))
6019 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6020 (native-inputs
6021 `(("python-nose" ,python-nose)
6022 ("python-pytest" ,python-pytest)
6023 ("man-db" ,man-db)
6024 ("which" ,which)
6025 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6026 (propagated-inputs
6027 `(("python-ptyprocess" ,python-ptyprocess)))
6028 (home-page "http://pexpect.readthedocs.org/")
6029 (synopsis "Controlling interactive console applications")
6030 (description
6031 "Pexpect is a pure Python module for spawning child applications;
6032 controlling them; and responding to expected patterns in their output.
6033 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6034 child application and control it as if a human were typing commands.")
6035 (license license:isc)))
6036
6037 (define-public python2-pexpect
6038 (package-with-python2 python-pexpect))
6039
6040 (define-public python-setuptools-scm
6041 (package
6042 (name "python-setuptools-scm")
6043 (version "3.4.3")
6044 (source (origin
6045 (method url-fetch)
6046 (uri (pypi-uri "setuptools_scm" version))
6047 (sha256
6048 (base32
6049 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6050 (build-system python-build-system)
6051 (home-page "https://github.com/pypa/setuptools_scm/")
6052 (synopsis "Manage Python package versions in SCM metadata")
6053 (description
6054 "Setuptools_scm handles managing your Python package versions in
6055 @dfn{software configuration management} (SCM) metadata instead of declaring
6056 them as the version argument or in a SCM managed file.")
6057 (license license:expat)))
6058
6059 (define-public python2-setuptools-scm
6060 (package-with-python2 python-setuptools-scm))
6061
6062 (define-public python-sexpdata
6063 (package
6064 (name "python-sexpdata")
6065 (version "0.0.3")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (pypi-uri "sexpdata" version))
6070 (sha256
6071 (base32
6072 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6073 (build-system python-build-system)
6074 (home-page "https://github.com/jd-boyd/sexpdata")
6075 (synopsis "S-expression parser for Python")
6076 (description
6077 "Sexpdata is an S-expression parser/serializer. It has load and dump
6078 functions like pickle, json or PyYAML module.")
6079 (license license:bsd-3)))
6080
6081 (define-public python-pathlib2
6082 (package
6083 (name "python-pathlib2")
6084 (version "2.3.3")
6085 (source
6086 (origin
6087 (method url-fetch)
6088 (uri (pypi-uri "pathlib2" version))
6089 (sha256
6090 (base32
6091 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6092 (build-system python-build-system)
6093 (propagated-inputs
6094 `(("python-scandir" ,python-scandir)
6095 ("python-six" ,python-six)))
6096 (home-page "https://pypi.org/project/pathlib2/")
6097 (synopsis "Object-oriented file system paths")
6098 (description "The goal of pathlib2 is to provide a backport of the
6099 standard @code{pathlib} module which tracks the standard library module, so
6100 all the newest features of the standard @code{pathlib} can be used also on
6101 older Python versions.")
6102 (license license:expat)))
6103
6104 (define-public python-importlib-resources
6105 (package
6106 (name "python-importlib-resources")
6107 (version "3.0.0")
6108 (source
6109 (origin
6110 (method url-fetch)
6111 (uri (pypi-uri "importlib_resources" version))
6112 (sha256
6113 (base32
6114 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6115 (build-system python-build-system)
6116 (native-inputs
6117 `(("python-setuptools-scm" ,python-setuptools-scm)
6118 ("python-toml" ,python-toml)))
6119 (home-page "http://importlib-resources.readthedocs.io/")
6120 (synopsis "Read resources from Python packages")
6121 (description
6122 "@code{importlib_resources} is a backport of Python 3's standard library
6123 @code{importlib.resources} module for Python 2.7, and Python 3.")
6124 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6125 (license license:asl2.0)))
6126
6127 (define-public python2-importlib-resources
6128 (package
6129 (name "python2-importlib-resources")
6130 (version "1.0.2")
6131 (source (origin
6132 (method url-fetch)
6133 (uri (pypi-uri "importlib_resources" version))
6134 (sha256
6135 (base32
6136 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6137 (build-system python-build-system)
6138 (arguments
6139 `(#:python ,python-2
6140 #:phases (modify-phases %standard-phases
6141 ;; The build system tests for python-wheel, but it is
6142 ;; not required for Guix nor the test suite. Just drop
6143 ;; it to make bootstrapping pytest easier.
6144 (add-after 'unpack 'drop-wheel-dependency
6145 (lambda _
6146 (substitute* "setup.cfg"
6147 (("^[[:blank:]]+wheel")
6148 ""))
6149 #t)))))
6150 (propagated-inputs
6151 `(("python-pathlib2" ,python2-pathlib2)
6152 ("python-typing" ,python2-typing)))
6153 (home-page "https://gitlab.com/python-devs/importlib_resources")
6154 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6155 (description
6156 "This package provides an implementation of @code{importlib.resources}
6157 for older versions of Python.")
6158 (license license:asl2.0)))
6159
6160 ;; For importlib-metadata-bootstrap below.
6161 (define-public python2-importlib-resources-bootstrap
6162 (hidden-package
6163 (package/inherit
6164 python2-importlib-resources
6165 (name "python2-importlib-resources-bootstrap")
6166 (propagated-inputs
6167 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6168 ("python-typing" ,python2-typing))))))
6169
6170 (define-public python-importlib-metadata
6171 (package
6172 (name "python-importlib-metadata")
6173 (version "1.5.0")
6174 (source
6175 (origin
6176 (method url-fetch)
6177 (uri (pypi-uri "importlib_metadata" version))
6178 (sha256
6179 (base32
6180 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6181 (build-system python-build-system)
6182 (propagated-inputs
6183 `(("python-zipp" ,python-zipp)))
6184 (native-inputs
6185 `(("python-setuptools-scm" ,python-setuptools-scm)
6186 ("python-pyfakefs" ,python-pyfakefs)
6187 ("python-packaging" ,python-packaging)))
6188 (home-page "https://importlib-metadata.readthedocs.io/")
6189 (synopsis "Read metadata from Python packages")
6190 (description
6191 "@code{importlib_metadata} is a library which provides an API for
6192 accessing an installed Python package's metadata, such as its entry points or
6193 its top-level name. This functionality intends to replace most uses of
6194 @code{pkg_resources} entry point API and metadata API. Along with
6195 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6196 need to use the older and less efficient @code{pkg_resources} package.")
6197 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6198 (license license:asl2.0)))
6199
6200 (define-public python2-importlib-metadata
6201 (let ((base (package-with-python2 (strip-python2-variant
6202 python-importlib-metadata))))
6203 (package/inherit
6204 base
6205 (name "python2-importlib-metadata")
6206 (native-inputs
6207 `(("python-setuptools-scm" ,python2-setuptools-scm)
6208 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6209 ("python-packaging" ,python2-packaging-bootstrap)))
6210 (propagated-inputs
6211 `(("python-configparser" ,python2-configparser)
6212 ("python-contextlib2" ,python2-contextlib2)
6213 ("python-importlib-resources" ,python2-importlib-resources)
6214 ("python-pathlib2" ,python2-pathlib2)
6215 ,@(package-propagated-inputs base))))))
6216
6217 ;; This package is used by python2-pytest, and thus must not depend on it.
6218 (define-public python2-importlib-metadata-bootstrap
6219 (hidden-package
6220 (package/inherit
6221 python2-importlib-metadata
6222 (name "python2-importlib-metadata-bootstrap")
6223 (arguments
6224 `(#:tests? #f
6225 ,@(package-arguments python2-importlib-metadata)))
6226 (propagated-inputs
6227 `(("python-zipp" ,python2-zipp-bootstrap)
6228 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6229 ("python-configparser" ,python2-configparser)
6230 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6231 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6232
6233 (define-public python-importmagic
6234 (package
6235 (name "python-importmagic")
6236 (version "0.1.7")
6237 (source
6238 (origin
6239 (method url-fetch)
6240 (uri (pypi-uri "importmagic" version))
6241 (sha256
6242 (base32
6243 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6244 (build-system python-build-system)
6245 (home-page "https://github.com/alecthomas/importmagic")
6246 (synopsis "Library for adding, removing and managing Python imports")
6247 (description
6248 "Importmagic is a Python library for automatically managing imports by
6249 finding unresolved symbols in Python code and their corresponding imports.")
6250 (license license:bsd-3)))
6251
6252 (define-public python-jaraco-packaging
6253 (package
6254 (name "python-jaraco-packaging")
6255 (version "6.1")
6256 (source
6257 (origin
6258 (method url-fetch)
6259 (uri (pypi-uri "jaraco.packaging" version))
6260 (sha256
6261 (base32
6262 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6263 (build-system python-build-system)
6264 (propagated-inputs
6265 `(("python-pytest" ,python-pytest)
6266 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6267 ("python-pytest-flake8" ,python-pytest-flake8)
6268 ("python-rst.linker" ,python-rst.linker)
6269 ("python-setuptools" ,python-setuptools)
6270 ("python-setuptools-scm" ,python-setuptools-scm)
6271 ("python-six" ,python-six)
6272 ("python-sphinx" ,python-sphinx)))
6273 (home-page "https://github.com/jaraco/jaraco.packaging")
6274 (synopsis "Tools to supplement packaging Python releases")
6275 (description
6276 "This package provides various tools to supplement packaging Python
6277 releases.")
6278 (license license:expat)))
6279
6280 (define-public python-pathpy
6281 (package
6282 (name "python-pathpy")
6283 (version "11.5.1")
6284 (source
6285 (origin
6286 (method url-fetch)
6287 (uri (pypi-uri "path.py" version))
6288 (sha256
6289 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6290 (outputs '("out" "doc"))
6291 (build-system python-build-system)
6292 (propagated-inputs
6293 `(("python-appdirs" ,python-appdirs)
6294 ("python-importlib-metadata" ,python-importlib-metadata)))
6295 (native-inputs
6296 `(("python-setuptools-scm" ,python-setuptools-scm)
6297 ("python-sphinx" ,python-sphinx)
6298 ("python-rst.linker" ,python-rst.linker)
6299 ("python-pytest" ,python-pytest)
6300 ("python-pytest-runner" ,python-pytest-runner)
6301 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6302 (arguments
6303 `(#:phases
6304 (modify-phases %standard-phases
6305 (add-after 'build 'build-doc
6306 (lambda _
6307 (setenv "LANG" "en_US.UTF-8")
6308 (invoke "python" "setup.py" "build_sphinx")))
6309 (add-after 'install 'install-doc
6310 (lambda* (#:key outputs #:allow-other-keys)
6311 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6312 (doc (string-append data "/doc/" ,name "-" ,version))
6313 (html (string-append doc "/html")))
6314 (mkdir-p html)
6315 (for-each (lambda (file)
6316 (copy-file file (string-append doc "/" file)))
6317 '("README.rst" "CHANGES.rst"))
6318 (copy-recursively "build/sphinx/html" html)
6319 #t)))
6320 (replace 'check
6321 (lambda _
6322 ;; The import time test aborts if an import takes longer than
6323 ;; 100ms. It may very well take a little longer than that.
6324 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6325 (home-page "https://github.com/jaraco/path.py")
6326 (synopsis "Python module wrapper for built-in os.path")
6327 (description
6328 "@code{path.py} implements path objects as first-class entities, allowing
6329 common operations on files to be invoked on those path objects directly.")
6330 (license license:expat)))
6331
6332 (define-public python2-pathpy
6333 (package-with-python2 python-pathpy))
6334
6335 (define-public python-simplegeneric
6336 (package
6337 (name "python-simplegeneric")
6338 (version "0.8.1")
6339 (source
6340 (origin
6341 (method url-fetch)
6342 (uri (pypi-uri "simplegeneric" version ".zip"))
6343 (sha256
6344 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6345 (build-system python-build-system)
6346 (native-inputs
6347 `(("unzip" ,unzip)))
6348 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6349 (synopsis "Python module for simple generic functions")
6350 (description
6351 "The simplegeneric module lets you define simple single-dispatch generic
6352 functions, akin to Python’s built-in generic functions like @code{len()},
6353 @code{iter()} and so on. However, instead of using specially-named methods,
6354 these generic functions use simple lookup tables, akin to those used by
6355 e.g. @code{pickle.dump()} and other generic functions found in the Python
6356 standard library.")
6357 (license license:zpl2.1)))
6358
6359 (define-public python2-simplegeneric
6360 (package-with-python2 python-simplegeneric))
6361
6362 (define-public python-ipython-genutils
6363 ;; TODO: This package is retired, check if can be removed, see description.
6364 (package
6365 (name "python-ipython-genutils")
6366 (version "0.1.0")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "ipython_genutils" version))
6371 (sha256
6372 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6373 (build-system python-build-system)
6374 (arguments `(#:tests? #f)) ; no tests
6375 (home-page "https://ipython.org")
6376 (synopsis "Vestigial utilities from IPython")
6377 (description
6378 "This package provides retired utilities from IPython. No packages
6379 outside IPython/Jupyter should depend on it.
6380
6381 This package shouldn't exist. It contains some common utilities shared by
6382 Jupyter and IPython projects during The Big Split. As soon as possible, those
6383 packages will remove their dependency on this, and this package will go
6384 away.")
6385 (license license:bsd-3)))
6386
6387 (define-public python2-ipython-genutils
6388 (package-with-python2 python-ipython-genutils))
6389
6390 (define-public python-ipyparallel
6391 (package
6392 (name "python-ipyparallel")
6393 (version "6.2.4")
6394 (source
6395 (origin
6396 (method url-fetch)
6397 (uri (pypi-uri "ipyparallel" version))
6398 (sha256
6399 (base32
6400 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6401 (build-system python-build-system)
6402 (arguments
6403 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6404 #:phases
6405 (modify-phases %standard-phases
6406 (add-before 'check 'prepare-for-tests
6407 (lambda _
6408 (setenv "HOME" (getcwd))
6409 #t)))))
6410 (propagated-inputs
6411 `(("python-dateutil" ,python-dateutil)
6412 ("python-decorator" ,python-decorator)
6413 ("python-ipykernel" ,python-ipykernel)
6414 ("python-ipython" ,python-ipython)
6415 ("python-ipython-genutils" ,python-ipython-genutils)
6416 ("python-jupyter-client" ,python-jupyter-client)
6417 ("python-pyzmq" ,python-pyzmq)
6418 ("python-tornado" ,python-tornado)
6419 ("python-traitlets" ,python-traitlets)))
6420 (native-inputs
6421 `(("python-ipython" ,python-ipython)
6422 ("python-mock" ,python-mock)
6423 ("python-nose" ,python-nose)
6424 ("python-pytest" ,python-pytest)
6425 ("python-pytest-cov" ,python-pytest-cov)
6426 ("python-testpath" ,python-testpath)))
6427 (home-page "https://ipython.org/")
6428 (synopsis "Interactive Parallel Computing with IPython")
6429 (description
6430 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6431 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6432 CLI scripts:
6433 @enumerate
6434 @item ipcluster - start/stop a cluster
6435 @item ipcontroller - start a scheduler
6436 @item ipengine - start an engine
6437 @end enumerate")
6438 (license license:bsd-3)))
6439
6440 (define-public python2-ipyparallel
6441 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6442 (package
6443 (inherit ipyparallel)
6444 (propagated-inputs
6445 `(("python2-futures" ,python2-futures)
6446 ,@(package-propagated-inputs ipyparallel))))))
6447
6448 (define-public python-ipython-cluster-helper
6449 (package
6450 (name "python-ipython-cluster-helper")
6451 (version "0.6.4")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (pypi-uri "ipython-cluster-helper" version))
6456 (sha256
6457 (base32
6458 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6459 (modules '((guix build utils)))
6460 (snippet
6461 '(begin (substitute* "requirements.txt"
6462 (("ipython.*") "ipython\n"))
6463 #t))))
6464 (build-system python-build-system)
6465 (arguments
6466 `(#:tests? #f ; Test suite can't find IPython.
6467 #:phases
6468 (modify-phases %standard-phases
6469 (replace 'check
6470 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6471 (if tests?
6472 (begin
6473 (setenv "HOME" (getcwd))
6474 (add-installed-pythonpath inputs outputs)
6475 (invoke "python" "example/example.py" "--local"))
6476 #t))))))
6477 (propagated-inputs
6478 `(("python-ipyparallel" ,python-ipyparallel)
6479 ("python-ipython" ,python-ipython)
6480 ("python-netifaces" ,python-netifaces)
6481 ("python-pyzmq" ,python-pyzmq)
6482 ("python-setuptools" ,python-setuptools)
6483 ("python-six" ,python-six)))
6484 (home-page "https://github.com/roryk/ipython-cluster-helper")
6485 (synopsis
6486 "Simplify IPython cluster start up and use for multiple schedulers")
6487 (description
6488 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6489 profile, launches a cluster and returns a view. On program exit it shuts the
6490 cluster down and deletes the throwaway profile.")
6491 (license license:expat)))
6492
6493 (define-public python2-ipython-cluster-helper
6494 (package-with-python2 python-ipython-cluster-helper))
6495
6496 (define-public python-traitlets
6497 (package
6498 (name "python-traitlets")
6499 (version "4.3.3")
6500 (source
6501 (origin
6502 (method url-fetch)
6503 (uri (pypi-uri "traitlets" version))
6504 (sha256
6505 (base32
6506 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6507 (build-system python-build-system)
6508 (arguments
6509 `(#:phases
6510 (modify-phases %standard-phases
6511 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6512 (propagated-inputs
6513 `(("python-ipython-genutils" ,python-ipython-genutils)
6514 ("python-decorator" ,python-decorator)))
6515 (native-inputs
6516 `(("python-pytest" ,python-pytest)))
6517 (properties `((python2-variant . ,(delay python2-traitlets))))
6518 (home-page "https://ipython.org")
6519 (synopsis "Configuration system for Python applications")
6520 (description
6521 "Traitlets is a framework that lets Python classes have attributes with
6522 type checking, dynamically calculated default values, and ‘on change’
6523 callbacks. The package also includes a mechanism to use traitlets for
6524 configuration, loading values from files or from command line arguments. This
6525 is a distinct layer on top of traitlets, so you can use traitlets in your code
6526 without using the configuration machinery.")
6527 (license license:bsd-3)))
6528
6529 (define-public python2-traitlets
6530 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6531 (package
6532 (inherit traitlets)
6533 (propagated-inputs
6534 `(("python2-enum34" ,python2-enum34)
6535 ,@(package-propagated-inputs traitlets))))))
6536
6537 (define-public python-jupyter-core
6538 (package
6539 (name "python-jupyter-core")
6540 (version "4.4.0")
6541 (source
6542 (origin
6543 (method url-fetch)
6544 (uri (string-append (pypi-uri "jupyter_core" version)))
6545 (sha256
6546 (base32
6547 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6548 (build-system python-build-system)
6549 ;; FIXME: not sure how to run the tests
6550 (arguments `(#:tests? #f))
6551 (propagated-inputs
6552 `(("python-traitlets" ,python-traitlets)))
6553 (home-page "http://jupyter.org/")
6554 (synopsis "Jupyter base package")
6555 (description
6556 "Jupyter core is the base package on which Jupyter projects rely.")
6557 (license license:bsd-3)))
6558
6559 (define-public python2-jupyter-core
6560 (package-with-python2 python-jupyter-core))
6561
6562 (define-public python-jupyter-client
6563 (package
6564 (name "python-jupyter-client")
6565 (version "5.2.4")
6566 (source
6567 (origin
6568 (method url-fetch)
6569 (uri (pypi-uri "jupyter_client" version))
6570 (sha256
6571 (base32
6572 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6573 (build-system python-build-system)
6574 ;; Tests fail because of missing native python kernel which I assume is
6575 ;; provided by the ipython package, which we cannot use because it would
6576 ;; cause a dependency cycle.
6577 (arguments
6578 `(#:tests? #f
6579
6580 #:phases (modify-phases %standard-phases
6581 (add-after 'unpack 'set-tool-file-names
6582 (lambda* (#:key inputs #:allow-other-keys)
6583 (let ((iproute (assoc-ref inputs "iproute")))
6584 (substitute* "jupyter_client/localinterfaces.py"
6585 (("'ip'")
6586 (string-append "'" iproute "/sbin/ip'")))
6587 #t))))))
6588 (inputs
6589 `(("iproute" ,iproute)))
6590 (propagated-inputs
6591 `(("python-pyzmq" ,python-pyzmq)
6592 ("python-traitlets" ,python-traitlets)
6593 ("python-jupyter-core" ,python-jupyter-core)))
6594 (home-page "http://jupyter.org/")
6595 (synopsis "Jupyter protocol implementation and client libraries")
6596 (description
6597 "The @code{jupyter_client} package contains the reference implementation
6598 of the Jupyter protocol. It also provides client and kernel management APIs
6599 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6600 installing @code{kernelspec}s for use with Jupyter frontends.")
6601 (license license:bsd-3)))
6602
6603 (define-public python2-jupyter-client
6604 (package-with-python2 python-jupyter-client))
6605
6606 (define-public python-ipykernel
6607 (package
6608 (name "python-ipykernel")
6609 (version "5.1.3")
6610 (source
6611 (origin
6612 (method url-fetch)
6613 (uri (pypi-uri "ipykernel" version))
6614 (sha256
6615 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6616 (build-system python-build-system)
6617 (arguments
6618 `(#:phases
6619 (modify-phases %standard-phases
6620 (replace 'check
6621 (lambda _
6622 (setenv "HOME" "/tmp")
6623 (invoke "pytest" "-v")
6624 #t))
6625 (add-after 'install 'set-python-file-name
6626 (lambda* (#:key outputs #:allow-other-keys)
6627 ;; Record the absolute file name of the 'python' executable in
6628 ;; 'kernel.json'.
6629 (let ((out (assoc-ref outputs "out")))
6630 (substitute* (string-append out "/share/jupyter"
6631 "/kernels/python3/kernel.json")
6632 (("\"python\"")
6633 (string-append "\"" (which "python") "\"")))
6634 #t))))))
6635 (propagated-inputs
6636 `(("python-ipython" ,python-ipython)
6637 ;; imported at runtime during connect
6638 ("python-jupyter-client" ,python-jupyter-client)))
6639 (native-inputs
6640 `(("python-flaky" ,python-flaky)
6641 ("python-nose" ,python-nose)
6642 ("python-pytest" ,python-pytest)))
6643 (home-page "https://ipython.org")
6644 (synopsis "IPython Kernel for Jupyter")
6645 (description
6646 "This package provides the IPython kernel for Jupyter.")
6647 (properties `((python2-variant . ,(delay python2-ipykernel))))
6648 (license license:bsd-3)))
6649
6650 ;; Version 5.x and above no longer support Python 2.
6651 (define-public python2-ipykernel
6652 (package
6653 (name "python2-ipykernel")
6654 (version "4.10.1")
6655 (source
6656 (origin
6657 (method url-fetch)
6658 (uri (pypi-uri "ipykernel" version))
6659 (sha256
6660 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6661 (build-system python-build-system)
6662 (arguments
6663 `(#:python ,python-2))
6664 (propagated-inputs
6665 `(("python2-ipython" ,python2-ipython)
6666 ;; imported at runtime during connect
6667 ("python2-jupyter-client" ,python2-jupyter-client)
6668 ("python2-tornado" ,python2-tornado)
6669 ("python2-traitlets" ,python2-traitlets)))
6670 (native-inputs
6671 `(("python2-mock" ,python2-mock)
6672 ("python2-nose" ,python2-nose)
6673 ("python2-pytest" ,python2-pytest)
6674 ("python2-pytest-cov" ,python2-pytest-cov)))
6675 (home-page "https://ipython.org")
6676 (synopsis "IPython Kernel for Jupyter")
6677 (description
6678 "This package provides the IPython kernel for Jupyter.")
6679 (license license:bsd-3)))
6680
6681 (define-public python-pari-jupyter
6682 (package
6683 (name "python-pari-jupyter")
6684 (version "1.3.2")
6685 (source
6686 (origin
6687 (method url-fetch)
6688 (uri (pypi-uri "pari_jupyter" version))
6689 (sha256
6690 (base32
6691 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6692 (build-system python-build-system)
6693 (propagated-inputs
6694 `(("python-ipykernel" ,python-ipykernel)))
6695 (inputs
6696 `(("pari-gp" ,pari-gp)
6697 ("readline" ,readline)))
6698 (arguments
6699 `(#:tests? #f)) ; no test suite
6700 (home-page
6701 "https://github.com/jdemeyer/pari_jupyter")
6702 (synopsis "A Jupyter kernel for PARI/GP")
6703 (description "The package provides a PARI/GP kernel for Jupyter.")
6704 (license license:gpl3+)))
6705
6706 (define-public python-backcall
6707 (package
6708 (name "python-backcall")
6709 (version "0.1.0")
6710 (source
6711 (origin
6712 (method url-fetch)
6713 (uri (pypi-uri "backcall" version))
6714 (sha256
6715 (base32
6716 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
6717 (build-system python-build-system)
6718 (home-page "https://github.com/takluyver/backcall/")
6719 (synopsis "Specifications for callback functions passed in to an API")
6720 (description
6721 "If your code lets other people supply callback functions, it's important
6722 to specify the function signature you expect, and check that functions support
6723 that. Adding extra parameters later would break other peoples code unless
6724 you're careful. The @code{backcall} package provides a way of specifying the
6725 callback signature using a prototype function.")
6726 (license license:bsd-3)))
6727
6728 (define-public python-ipython
6729 (package
6730 (name "python-ipython")
6731 (version "7.9.0")
6732 (source
6733 (origin
6734 (method url-fetch)
6735 (uri (pypi-uri "ipython" version ".tar.gz"))
6736 (sha256
6737 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
6738 (build-system python-build-system)
6739 (propagated-inputs
6740 `(("python-backcall" ,python-backcall)
6741 ("python-pyzmq" ,python-pyzmq)
6742 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
6743 ("python-terminado" ,python-terminado)
6744 ("python-matplotlib" ,python-matplotlib)
6745 ("python-numpy" ,python-numpy)
6746 ("python-numpydoc" ,python-numpydoc)
6747 ("python-jedi" ,python-jedi)
6748 ("python-jinja2" ,python-jinja2)
6749 ("python-mistune" ,python-mistune)
6750 ("python-pexpect" ,python-pexpect)
6751 ("python-pickleshare" ,python-pickleshare)
6752 ("python-simplegeneric" ,python-simplegeneric)
6753 ("python-jsonschema" ,python-jsonschema)
6754 ("python-traitlets" ,python-traitlets)
6755 ("python-nbformat" ,python-nbformat)
6756 ("python-pygments" ,python-pygments)))
6757 (inputs
6758 `(("readline" ,readline)
6759 ("which" ,which)))
6760 (native-inputs
6761 `(("graphviz" ,graphviz)
6762 ("pkg-config" ,pkg-config)
6763 ("python-requests" ,python-requests) ;; for tests
6764 ("python-testpath" ,python-testpath)
6765 ("python-nose" ,python-nose)))
6766 (arguments
6767 `(#:phases
6768 (modify-phases %standard-phases
6769 (add-after 'unpack 'make-docs-reproducible
6770 (lambda _
6771 (substitute* "IPython/sphinxext/ipython_directive.py"
6772 ((".*import datetime") "")
6773 ((".*datetime.datetime.now\\(\\)") "")
6774 (("%timeit") "# %timeit"))
6775 #t))
6776 ;; Tests can only be run after the library has been installed and not
6777 ;; within the source directory.
6778 (delete 'check)
6779 (add-after 'install 'check
6780 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6781 (if tests?
6782 (begin
6783 ;; Make installed package available for running the tests
6784 (add-installed-pythonpath inputs outputs)
6785 (setenv "HOME" "/tmp/") ;; required by a test
6786 ;; We only test the core because one of the other tests
6787 ;; tries to import ipykernel.
6788 (invoke "python" "IPython/testing/iptest.py"
6789 "-v" "IPython/core/tests"))
6790 #t)))
6791 (add-before 'check 'fix-tests
6792 (lambda* (#:key inputs #:allow-other-keys)
6793 (substitute* "./IPython/utils/_process_posix.py"
6794 (("/usr/bin/env', 'which") (which "which")))
6795 (substitute* "./IPython/core/tests/test_inputtransformer.py"
6796 (("#!/usr/bin/env python")
6797 (string-append "#!" (which "python"))))
6798 ;; This test introduces a circular dependency on ipykernel
6799 ;; (which depends on ipython).
6800 (delete-file "IPython/core/tests/test_display.py")
6801 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
6802 (delete-file "IPython/core/tests/test_interactiveshell.py")
6803 #t)))))
6804 (home-page "https://ipython.org")
6805 (synopsis "IPython is a tool for interactive computing in Python")
6806 (description
6807 "IPython provides a rich architecture for interactive computing with:
6808 Powerful interactive shells, a browser-based notebook, support for interactive
6809 data visualization, embeddable interpreters and tools for parallel
6810 computing.")
6811 (properties `((python2-variant . ,(delay python2-ipython))))
6812 (license license:bsd-3)))
6813
6814 ;; This is the latest release of the LTS version of ipython with support for
6815 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
6816 ;; dropped support for Python 2.7.
6817 (define-public python2-ipython
6818 (package
6819 (name "python2-ipython")
6820 (version "5.8.0")
6821 (source
6822 (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "ipython" version ".tar.gz"))
6825 (sha256
6826 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
6827 (build-system python-build-system)
6828 (propagated-inputs
6829 `(("python2-backports-shutil-get-terminal-size"
6830 ,python2-backports-shutil-get-terminal-size)
6831 ("python2-pathlib2" ,python2-pathlib2)
6832 ("python2-pyzmq" ,python2-pyzmq)
6833 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
6834 ("python2-terminado" ,python2-terminado)
6835 ("python2-matplotlib" ,python2-matplotlib)
6836 ("python2-numpy" ,python2-numpy)
6837 ("python2-numpydoc" ,python2-numpydoc)
6838 ("python2-jinja2" ,python2-jinja2)
6839 ("python2-mistune" ,python2-mistune)
6840 ("python2-pexpect" ,python2-pexpect)
6841 ("python2-pickleshare" ,python2-pickleshare)
6842 ("python2-simplegeneric" ,python2-simplegeneric)
6843 ("python2-jsonschema" ,python2-jsonschema)
6844 ("python2-traitlets" ,python2-traitlets)
6845 ("python2-nbformat" ,python2-nbformat)
6846 ("python2-pygments" ,python2-pygments)))
6847 (inputs
6848 `(("readline" ,readline)
6849 ("which" ,which)))
6850 (native-inputs
6851 `(("graphviz" ,graphviz)
6852 ("pkg-config" ,pkg-config)
6853 ("python2-requests" ,python2-requests) ;; for tests
6854 ("python2-testpath" ,python2-testpath)
6855 ("python2-mock" ,python2-mock)
6856 ("python2-nose" ,python2-nose)))
6857 (arguments
6858 `(#:python ,python-2
6859 #:phases
6860 (modify-phases %standard-phases
6861 (add-before 'check 'delete-broken-tests
6862 (lambda* (#:key inputs #:allow-other-keys)
6863 ;; These tests throw errors for unknown reasons.
6864 (delete-file "IPython/core/tests/test_displayhook.py")
6865 (delete-file "IPython/core/tests/test_magic_terminal.py")
6866 (delete-file "IPython/core/tests/test_profile.py")
6867 #t)))))
6868 (home-page "https://ipython.org")
6869 (synopsis "IPython is a tool for interactive computing in Python")
6870 (description
6871 "IPython provides a rich architecture for interactive computing with:
6872 Powerful interactive shells, a browser-based notebook, support for interactive
6873 data visualization, embeddable interpreters and tools for parallel
6874 computing.")
6875 (license license:bsd-3)))
6876
6877 (define-public python-ipython-documentation
6878 (package
6879 (inherit python-ipython)
6880 (name "python-ipython-documentation")
6881 (version (package-version python-ipython))
6882 (arguments
6883 `(#:phases
6884 (modify-phases %standard-phases
6885 (delete 'build)
6886 (delete 'check)
6887 (replace 'install
6888 (lambda* (#:key outputs #:allow-other-keys)
6889 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6890 (doc (string-append data "/doc/" ,name "-" ,version))
6891 (html (string-append doc "/html"))
6892 (man1 (string-append data "/man/man1"))
6893 (info (string-append data "/info"))
6894 (examples (string-append doc "/examples"))
6895 (python-arg (string-append "PYTHON=" (which "python"))))
6896 (setenv "LANG" "en_US.utf8")
6897 (with-directory-excursion "docs"
6898 ;; FIXME: pdf fails to build
6899 ;;(system* "make" "pdf" "PAPER=a4")
6900 (system* "make" python-arg "html")
6901 ;; FIXME: the generated texi file contains ^@^@, which trips
6902 ;; up the parser.
6903 ;; (system* "make" python-arg "info")
6904 )
6905 (copy-recursively "docs/man" man1)
6906 (copy-recursively "examples" examples)
6907 (copy-recursively "docs/build/html" html)
6908 ;; (copy-file "docs/build/latex/ipython.pdf"
6909 ;; (string-append doc "/ipython.pdf"))
6910 (mkdir-p info)
6911 ;; (copy-file "docs/build/texinfo/ipython.info"
6912 ;; (string-append info "/ipython.info"))
6913 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6914 #t)))))
6915 (inputs
6916 `(("python-ipython" ,python-ipython)
6917 ("python-ipykernel" ,python-ipykernel)))
6918 (native-inputs
6919 `(("python-sphinx" ,python-sphinx)
6920 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6921 ;; FIXME: It's possible that a smaller union would work just as well.
6922 ("texlive" ,(texlive-union (list texlive-amsfonts
6923 texlive-fonts-ec
6924 texlive-generic-ifxetex
6925 texlive-generic-pdftex
6926 texlive-latex-capt-of
6927 texlive-latex-cmap
6928 texlive-latex-environ
6929 texlive-latex-eqparbox
6930 texlive-latex-etoolbox
6931 texlive-latex-expdlist
6932 texlive-latex-fancyhdr
6933 texlive-latex-fancyvrb
6934 texlive-latex-fncychap
6935 texlive-latex-float
6936 texlive-latex-framed
6937 texlive-latex-geometry
6938 texlive-latex-graphics
6939 texlive-latex-hyperref
6940 texlive-latex-mdwtools
6941 texlive-latex-multirow
6942 texlive-latex-needspace
6943 texlive-latex-oberdiek
6944 texlive-latex-parskip
6945 texlive-latex-preview
6946 texlive-latex-tabulary
6947 texlive-latex-threeparttable
6948 texlive-latex-titlesec
6949 texlive-latex-trimspaces
6950 texlive-latex-ucs
6951 texlive-latex-upquote
6952 texlive-latex-url
6953 texlive-latex-varwidth
6954 texlive-latex-wrapfig)))
6955 ("texinfo" ,texinfo)))))
6956
6957 (define-public python-urwid
6958 (package
6959 (name "python-urwid")
6960 (version "2.1.0")
6961 (source
6962 (origin
6963 (method url-fetch)
6964 (uri (pypi-uri "urwid" version))
6965 (sha256
6966 (base32
6967 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
6968 (build-system python-build-system)
6969 (home-page "http://urwid.org")
6970 (synopsis "Console user interface library for Python")
6971 (description
6972 "Urwid is a curses-based UI/widget library for Python. It includes many
6973 features useful for text console applications.")
6974 (license license:lgpl2.1+)))
6975
6976 (define-public python2-urwid
6977 (package-with-python2 python-urwid))
6978
6979 (define-public python-urwidtrees
6980 (package
6981 (name "python-urwidtrees")
6982 (version "1.0.2")
6983 (source
6984 (origin
6985 (method git-fetch)
6986 ;; package author intends on distributing via github rather than pypi:
6987 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6988 (uri (git-reference
6989 (url "https://github.com/pazz/urwidtrees")
6990 (commit version)))
6991 (file-name (git-file-name name version))
6992 (sha256
6993 (base32
6994 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
6995 (build-system python-build-system)
6996 (arguments
6997 '(#:use-setuptools? #f
6998 #:tests? #f)) ; no tests
6999 (propagated-inputs `(("python-urwid" ,python-urwid)))
7000 (home-page "https://github.com/pazz/urwidtrees")
7001 (synopsis "Tree widgets for urwid")
7002 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7003 toolkit. Use it to build trees of widgets.")
7004 (license license:gpl3+)))
7005
7006 (define-public python2-urwidtrees
7007 (package-with-python2 python-urwidtrees))
7008
7009 (define-public python-ua-parser
7010 (package
7011 (name "python-ua-parser")
7012 (version "0.8.0")
7013 (source
7014 (origin
7015 (method url-fetch)
7016 (uri (pypi-uri "ua-parser" version))
7017 (sha256
7018 (base32
7019 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7020 (build-system python-build-system)
7021 (arguments
7022 `(#:tests? #f)) ;no test suite in release
7023 (native-inputs
7024 `(("python-pyyaml" ,python-pyyaml)))
7025 (home-page "https://github.com/ua-parser/uap-python")
7026 (synopsis "User agent parser")
7027 (description
7028 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7029 (license license:asl2.0)))
7030
7031 (define-public python2-ua-parser
7032 (package-with-python2 python-ua-parser))
7033
7034 (define-public python-user-agents
7035 (package
7036 (name "python-user-agents")
7037 (version "1.1.0")
7038 (source
7039 (origin
7040 (method url-fetch)
7041 (uri (pypi-uri "user-agents" version))
7042 (sha256
7043 (base32
7044 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7045 (build-system python-build-system)
7046 (arguments
7047 `(#:tests? #f)) ;missing devices.json test file in release
7048 (propagated-inputs
7049 `(("python-ua-parser" ,python-ua-parser)))
7050 (home-page "https://github.com/selwin/python-user-agents")
7051 (synopsis "User Agent strings parsing library")
7052 (description
7053 "A library to identify devices (phones, tablets) and their capabilities by
7054 parsing (browser/HTTP) user agent strings.")
7055 (license license:expat)))
7056
7057 (define-public python2-user-agents
7058 (package-with-python2 python-user-agents))
7059
7060 (define-public python-dbus
7061 (package
7062 (name "python-dbus")
7063 (version "1.2.16")
7064 (source
7065 (origin
7066 (method url-fetch)
7067 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7068 "dbus-python-" version ".tar.gz"))
7069 (sha256
7070 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7071 (build-system gnu-build-system)
7072 (native-inputs
7073 `(("pkg-config" ,pkg-config)))
7074 (inputs
7075 `(("python" ,python-wrapper)
7076 ("dbus-glib" ,dbus-glib)))
7077 (synopsis "Python bindings for D-bus")
7078 (description "python-dbus provides bindings for libdbus, the reference
7079 implementation of D-Bus.")
7080 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7081 (license license:expat)))
7082
7083 (define-public python2-dbus
7084 (package (inherit python-dbus)
7085 (name "python2-dbus")
7086 (inputs `(("python" ,python-2)
7087 ,@(alist-delete "python"
7088 (package-inputs python-dbus)
7089 equal?)))))
7090
7091 (define-public python-notify2
7092 (package
7093 (name "python-notify2")
7094 (version "0.3.1")
7095 (source
7096 (origin
7097 (method url-fetch)
7098 (uri (pypi-uri "notify2" version))
7099 (sha256
7100 (base32
7101 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7102 (build-system python-build-system)
7103 (arguments `(#:tests? #f)) ; tests depend on system state
7104 (native-inputs
7105 `(("python-dbus" ,python-dbus)))
7106 (home-page "https://bitbucket.org/takluyver/pynotify2")
7107 (synopsis "Python interface to D-Bus notifications")
7108 (description
7109 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7110 It is a reimplementation of pynotify in pure Python, and an alternative to
7111 the GObject Introspection bindings to libnotify for non-GTK applications.")
7112 (license (list license:bsd-2
7113 license:lgpl2.1+))))
7114
7115 (define-public python2-notify2
7116 (package-with-python2 python-notify2))
7117
7118 ;; beautifulsoup4 has a totally different namespace than 3.x,
7119 ;; and pypi seems to put it under its own name, so I guess we should too
7120 (define-public python-beautifulsoup4
7121 (package
7122 (name "python-beautifulsoup4")
7123 (version "4.9.1")
7124 (source
7125 (origin
7126 (method url-fetch)
7127 (uri (pypi-uri "beautifulsoup4" version))
7128 (sha256
7129 (base32
7130 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7131 (build-system python-build-system)
7132 (arguments
7133 `(#:phases
7134 (modify-phases %standard-phases
7135 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7136 ;; must use this conversion script when building with Python 3. The
7137 ;; conversion script also runs the tests.
7138 ;; For more information, see the file 'convert-py3k' in the source
7139 ;; distribution.
7140 (replace 'check
7141 (lambda _ (invoke "./convert-py3k"))))))
7142 (propagated-inputs
7143 `(("python-soupsieve" ,python-soupsieve)))
7144 (home-page
7145 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7146 (synopsis
7147 "Python screen-scraping library")
7148 (description
7149 "Beautiful Soup is a Python library designed for rapidly setting up
7150 screen-scraping projects. It offers Pythonic idioms for navigating,
7151 searching, and modifying a parse tree, providing a toolkit for
7152 dissecting a document and extracting what you need. It automatically
7153 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7154 (license license:expat)
7155 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7156
7157 (define-public python2-beautifulsoup4
7158 (package
7159 (inherit (package-with-python2
7160 (strip-python2-variant python-beautifulsoup4)))
7161 (arguments `(#:python ,python-2))))
7162
7163 (define-public python-soupsieve
7164 (package
7165 (name "python-soupsieve")
7166 (version "2.0.1")
7167 (source
7168 (origin
7169 (method url-fetch)
7170 (uri (pypi-uri "soupsieve" version))
7171 (sha256
7172 (base32
7173 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7174 (build-system python-build-system)
7175 (arguments `(#:tests? #f))
7176 ;;XXX: 2 tests fail currently despite claming they were to be
7177 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7178 ;;don't want to create a circular dependency.
7179 (home-page "https://github.com/facelessuser/soupsieve")
7180 (synopsis "CSS selector library")
7181 (description
7182 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7183 Soup 4. It aims to provide selecting, matching, and filtering using modern
7184 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7185 specifications up through the latest CSS level 4 drafts and beyond (though
7186 some are not yet implemented).")
7187 (properties `((python2-variant . ,(delay python2-soupsieve))))
7188 (license license:expat)))
7189
7190 ;; This is the last version that supports python-2
7191 (define-public python2-soupsieve
7192 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7193 (package
7194 (inherit base)
7195 (version "1.9.6")
7196 (source
7197 (origin
7198 (method url-fetch)
7199 (uri (pypi-uri "soupsieve" version))
7200 (sha256
7201 (base32
7202 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7203 (propagated-inputs
7204 `(("python2-backports-functools-lru-cache"
7205 ,python2-backports-functools-lru-cache)
7206 ,@(package-propagated-inputs base))))))
7207
7208 (define-public python-netifaces
7209 (package
7210 (name "python-netifaces")
7211 (version "0.10.9")
7212 (source
7213 (origin
7214 (method url-fetch)
7215 (uri (pypi-uri "netifaces" version))
7216 (sha256
7217 (base32
7218 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7219 (build-system python-build-system)
7220 (home-page "https://github.com/al45tair/netifaces")
7221 (synopsis
7222 "Python module for portable network interface information")
7223 (description
7224 "Netifaces is a Python module providing information on network
7225 interfaces in an easy and portable manner.")
7226 (license license:expat)))
7227
7228 (define-public python2-netifaces
7229 (package-with-python2 python-netifaces))
7230
7231 (define-public python-networkx
7232 (package
7233 (name "python-networkx")
7234 (version "2.4")
7235 (source
7236 (origin
7237 (method url-fetch)
7238 (uri (pypi-uri "networkx" version))
7239 (sha256
7240 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
7241 (build-system python-build-system)
7242 (arguments
7243 '(#:phases (modify-phases %standard-phases
7244 (replace 'check
7245 (lambda* (#:key tests? #:allow-other-keys)
7246 (if tests?
7247 (invoke "pytest" "-vv" "--pyargs" "networkx")
7248 (format #t "test suite not run~%"))
7249 #t)))))
7250 ;; python-decorator is needed at runtime.
7251 (propagated-inputs
7252 `(("python-decorator" ,python-decorator)))
7253 (native-inputs
7254 `(("python-pytest" ,python-pytest)))
7255 (home-page "https://networkx.github.io/")
7256 (synopsis "Python module for creating and manipulating graphs and networks")
7257 (description
7258 "NetworkX is a Python package for the creation, manipulation, and study
7259 of the structure, dynamics, and functions of complex networks.")
7260 (properties `((python2-variant . ,(delay python2-networkx))))
7261 (license license:bsd-3)))
7262
7263 ;; NetworkX 2.2 is the last version with support for Python 2.
7264 (define-public python2-networkx
7265 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7266 (package
7267 (inherit base)
7268 (version "2.2")
7269 (source (origin
7270 (method url-fetch)
7271 (uri (pypi-uri "networkx" version ".zip"))
7272 (sha256
7273 (base32
7274 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7275 (arguments
7276 `(#:python ,python-2))
7277 (native-inputs
7278 `(("python-nose" ,python2-nose)
7279 ("unzip" ,unzip))))))
7280
7281 (define-public python-datrie
7282 (package
7283 (name "python-datrie")
7284 (version "0.8.2")
7285 (source
7286 (origin
7287 (method url-fetch)
7288 (uri (pypi-uri "datrie" version))
7289 (sha256
7290 (base32
7291 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7292 (build-system python-build-system)
7293 (native-inputs
7294 `(("python-cython" ,python-cython)
7295 ("python-hypothesis" ,python-hypothesis)
7296 ("python-pytest" ,python-pytest)
7297 ("python-pytest-runner" ,python-pytest-runner)))
7298 (home-page "https://github.com/kmike/datrie")
7299 (synopsis "Fast, efficiently stored trie for Python")
7300 (description
7301 "This package provides a fast, efficiently stored trie implementation for
7302 Python.")
7303 (license license:lgpl2.1+)))
7304
7305 (define-public snakemake
7306 (package
7307 (name "snakemake")
7308 (version "5.7.1")
7309 (source
7310 (origin
7311 (method url-fetch)
7312 (uri (pypi-uri "snakemake" version))
7313 (sha256
7314 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7315 (build-system python-build-system)
7316 (arguments
7317 ;; TODO: Package missing test dependencies.
7318 '(#:tests? #f
7319 #:phases
7320 (modify-phases %standard-phases
7321 ;; For cluster execution Snakemake will call Python. Since there is
7322 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7323 ;; this by calling the snakemake wrapper instead.
7324 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7325 (lambda* (#:key outputs #:allow-other-keys)
7326 (substitute* "snakemake/executors.py"
7327 (("\\{sys.executable\\} -m snakemake")
7328 (string-append (assoc-ref outputs "out")
7329 "/bin/snakemake")))
7330 #t)))))
7331 (propagated-inputs
7332 `(("python-appdirs" ,python-appdirs)
7333 ("python-configargparse" ,python-configargparse)
7334 ("python-datrie" ,python-datrie)
7335 ("python-docutils" ,python-docutils)
7336 ("python-gitpython" ,python-gitpython)
7337 ("python-jinja2" ,python-jinja2)
7338 ("python-jsonschema" ,python-jsonschema)
7339 ("python-networkx" ,python-networkx)
7340 ("python-psutil" ,python-psutil)
7341 ("python-pyyaml" ,python-pyyaml)
7342 ("python-ratelimiter" ,python-ratelimiter)
7343 ("python-requests" ,python-requests)
7344 ("python-wrapt" ,python-wrapt)))
7345 (home-page "https://snakemake.readthedocs.io")
7346 (synopsis "Python-based execution environment for make-like workflows")
7347 (description
7348 "Snakemake aims to reduce the complexity of creating workflows by
7349 providing a clean and modern domain specific specification language (DSL) in
7350 Python style, together with a fast and comfortable execution environment.")
7351 (license license:expat)))
7352
7353 (define-public python-pyqrcode
7354 (package
7355 (name "python-pyqrcode")
7356 (version "1.2.1")
7357 (source
7358 (origin
7359 (method url-fetch)
7360 (uri (pypi-uri "PyQRCode" version))
7361 (sha256
7362 (base32
7363 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7364 (build-system python-build-system)
7365 (home-page
7366 "https://github.com/mnooner256/pyqrcode")
7367 (synopsis "QR code generator")
7368 (description
7369 "Pyqrcode is a QR code generator written purely in Python with
7370 SVG, EPS, PNG and terminal output.")
7371 (license license:bsd-3)))
7372
7373 (define-public python-seaborn
7374 (package
7375 (name "python-seaborn")
7376 (version "0.10.0")
7377 (source
7378 (origin
7379 (method url-fetch)
7380 (uri (pypi-uri "seaborn" version))
7381 (sha256
7382 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7383 (build-system python-build-system)
7384 (arguments
7385 `(#:phases
7386 (modify-phases %standard-phases
7387 (add-before 'check 'start-xserver
7388 (lambda* (#:key inputs #:allow-other-keys)
7389 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7390 ;; There must be a running X server and make check doesn't
7391 ;; start one. Therefore we must do it.
7392 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7393 (setenv "DISPLAY" ":1")
7394 #t)))
7395 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7396 (propagated-inputs
7397 `(("python-pandas" ,python-pandas)
7398 ("python-matplotlib" ,python-matplotlib)
7399 ("python-numpy" ,python-numpy)
7400 ("python-scipy" ,python-scipy)))
7401 (native-inputs
7402 `(("python-pytest" ,python-pytest)
7403 ("xorg-server" ,xorg-server-for-tests)))
7404 (home-page "https://seaborn.pydata.org/")
7405 (synopsis "Statistical data visualization")
7406 (description
7407 "Seaborn is a library for making attractive and informative statistical
7408 graphics in Python. It is built on top of matplotlib and tightly integrated
7409 with the PyData stack, including support for numpy and pandas data structures
7410 and statistical routines from scipy and statsmodels.")
7411 (properties `((python2-variant . ,(delay python2-seaborn))))
7412 (license license:bsd-3)))
7413
7414 ;; 0.9.1 is the last release with support for Python 2.
7415 (define-public python2-seaborn
7416 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7417 (package
7418 (inherit base)
7419 (version "0.9.1")
7420 (source (origin
7421 (method url-fetch)
7422 (uri (pypi-uri "seaborn" version))
7423 (sha256
7424 (base32
7425 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7426
7427 (define-public python-mpmath
7428 (package
7429 (name "python-mpmath")
7430 (version "0.19")
7431 (source (origin
7432 (method url-fetch)
7433 (uri (string-append "http://mpmath.org/files/mpmath-"
7434 version ".tar.gz"))
7435 (sha256
7436 (base32
7437 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
7438 (build-system python-build-system)
7439 (arguments
7440 '(#:phases
7441 (modify-phases %standard-phases
7442 (replace 'check
7443 (lambda _
7444 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7445 (home-page "http://mpmath.org")
7446 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7447 (description
7448 "@code{mpmath} can be used as an arbitrary-precision substitute for
7449 Python's float/complex types and math/cmath modules, but also does much
7450 more advanced mathematics.")
7451 (license license:bsd-3)))
7452
7453 (define-public python2-mpmath
7454 (package-with-python2 python-mpmath))
7455
7456 (define-public python-bigfloat
7457 (package
7458 (name "python-bigfloat")
7459 (version "0.3.0")
7460 (source
7461 (origin
7462 (method url-fetch)
7463 (uri (pypi-uri "bigfloat" version))
7464 (sha256
7465 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7466 (build-system python-build-system)
7467 (inputs
7468 `(("mpfr" ,mpfr)))
7469 (home-page "https://github.com/mdickinson/bigfloat")
7470 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7471 (description
7472 "This package provides a Python interface to the MPFR library for
7473 multiprecision arithmetic.")
7474 (license license:lgpl3+)))
7475
7476 (define-public python2-bigfloat
7477 (package-with-python2 python-bigfloat))
7478
7479 (define-public python-sympy
7480 (package
7481 (name "python-sympy")
7482 (version "1.1.1")
7483 (source
7484 (origin
7485 (method url-fetch)
7486 (uri (string-append
7487 "https://github.com/sympy/sympy/releases/download/sympy-"
7488 version "/sympy-" version ".tar.gz"))
7489 (sha256
7490 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
7491 (build-system python-build-system)
7492 (arguments
7493 `(#:phases
7494 (modify-phases %standard-phases
7495 ;; Run the core tests after installation. By default it would run
7496 ;; *all* tests, which take a very long time to complete and are known
7497 ;; to be flaky.
7498 (delete 'check)
7499 (add-after 'install 'check
7500 (lambda* (#:key outputs #:allow-other-keys)
7501 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
7502 #t)))))
7503 (propagated-inputs
7504 `(("python-mpmath" ,python-mpmath)))
7505 (home-page "https://www.sympy.org/")
7506 (synopsis "Python library for symbolic mathematics")
7507 (description
7508 "SymPy is a Python library for symbolic mathematics. It aims to become a
7509 full-featured computer algebra system (CAS) while keeping the code as simple
7510 as possible in order to be comprehensible and easily extensible.")
7511 (license license:bsd-3)))
7512
7513 (define-public python2-sympy
7514 (package
7515 (inherit (package-with-python2 python-sympy))
7516 (arguments
7517 `(#:phases
7518 (modify-phases %standard-phases
7519 ;; Run the core tests after installation. By default it would run
7520 ;; *all* tests, which take a very long time to complete and are known
7521 ;; to be flaky.
7522 (delete 'check)
7523 (add-after 'install 'check
7524 (lambda* (#:key outputs #:allow-other-keys)
7525 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
7526 #t)))))))
7527
7528 (define-public python-q
7529 (package
7530 (name "python-q")
7531 (version "2.6")
7532 (source
7533 (origin
7534 (method url-fetch)
7535 (uri (pypi-uri "q" version))
7536 (sha256
7537 (base32
7538 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7539 (build-system python-build-system)
7540 (home-page "https://github.com/zestyping/q")
7541 (synopsis "Quick-and-dirty debugging output for tired programmers")
7542 (description
7543 "q is a Python module for \"print\" style of debugging Python code. It
7544 provides convenient short API for print out of values, tracebacks, and
7545 falling into the Python interpreter.")
7546 (license license:asl2.0)))
7547
7548 (define-public python2-q
7549 (package-with-python2 python-q))
7550
7551 (define-public python-xlib
7552 (package
7553 (name "python-xlib")
7554 (version "0.27")
7555 (source
7556 (origin
7557 (method git-fetch)
7558 (uri (git-reference
7559 (url "https://github.com/python-xlib/python-xlib")
7560 (commit version)))
7561 (file-name (git-file-name name version))
7562 (sha256
7563 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7564 (build-system python-build-system)
7565 (arguments
7566 `(#:phases
7567 (modify-phases %standard-phases
7568 (add-before 'check 'start-xserver
7569 (lambda* (#:key inputs #:allow-other-keys)
7570 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7571 ;; There must be a running X server and make check doesn't
7572 ;; start one. Therefore we must do it.
7573 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7574 (setenv "DISPLAY" ":1")
7575 #t))))))
7576 (native-inputs
7577 `(("python-mock" ,python-mock)
7578 ("python-setuptools-scm" ,python-setuptools-scm)
7579 ("python-six" ,python-six)
7580 ("xorg-server" ,xorg-server)))
7581 (home-page "https://github.com/python-xlib/python-xlib")
7582 (synopsis "Python X11 client library")
7583 (description
7584 "The Python X Library is intended to be a fully functional
7585 X client library for Python programs. It is useful to implement
7586 low-level X clients. It is written entirely in Python.")
7587 (license license:gpl2+)))
7588
7589 (define-public python2-xlib
7590 (package-with-python2 python-xlib))
7591
7592 (define-public python-singledispatch
7593 (package
7594 (name "python-singledispatch")
7595 (version "3.4.0.3")
7596 (source
7597 (origin
7598 (method url-fetch)
7599 (uri (pypi-uri "singledispatch" version))
7600 (sha256
7601 (base32
7602 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7603 (build-system python-build-system)
7604 (native-inputs
7605 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7606 (home-page
7607 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7608 (synopsis "Backport of singledispatch feature from Python 3.4")
7609 (description
7610 "This library brings functools.singledispatch from Python 3.4 to Python
7611 2.6-3.3.")
7612 (license license:expat)))
7613
7614 (define-public python2-singledispatch
7615 (package-with-python2 python-singledispatch))
7616
7617 ;; the python- version can be removed with python-3.5
7618 (define-public python-backports-abc
7619 (package
7620 (name "python-backports-abc")
7621 (version "0.5")
7622 (source
7623 (origin
7624 (method url-fetch)
7625 (uri (pypi-uri "backports_abc" version))
7626 (sha256
7627 (base32
7628 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7629 (build-system python-build-system)
7630 (home-page "https://github.com/cython/backports_abc")
7631 (synopsis "Backport of additions to the 'collections.abc' module")
7632 (description
7633 "Python-backports-abc provides a backport of additions to the
7634 @code{collections.abc} module in Python-3.5.")
7635 (license license:psfl)))
7636
7637 (define-public python2-backports-abc
7638 (package-with-python2 python-backports-abc))
7639
7640 (define-public python-backports-csv
7641 (package
7642 (name "python-backports-csv")
7643 (version "1.0.7")
7644 (source
7645 (origin
7646 (method url-fetch)
7647 (uri (pypi-uri "backports.csv" version))
7648 (sha256
7649 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7650 (build-system python-build-system)
7651 (home-page "https://github.com/ryanhiebert/backports.csv")
7652 (synopsis "Backport of Python 3's csv module for Python 2")
7653 (description
7654 "Provides a backport of Python 3's @code{csv} module for parsing
7655 comma separated values. The API of the @code{csv} module in Python 2
7656 is drastically different from the @code{csv} module in Python 3.
7657 This is due, for the most part, to the difference between str in
7658 Python 2 and Python 3.")
7659 (license license:psfl)))
7660
7661 (define-public python2-backports-csv
7662 (package-with-python2 python-backports-csv))
7663
7664 (define-public python2-backports-shutil-get-terminal-size
7665 (package
7666 (name "python2-backports-shutil-get-terminal-size")
7667 (version "1.0.0")
7668 (source
7669 (origin
7670 (method url-fetch)
7671 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7672 (sha256
7673 (base32
7674 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7675 (build-system python-build-system)
7676 (arguments
7677 `(#:python ,python-2
7678 #:phases
7679 (modify-phases %standard-phases
7680 (replace 'check
7681 (lambda _
7682 (setenv "PYTHONPATH" (string-append "./build/lib:"
7683 (getenv "PYTHONPATH")))
7684 (invoke "py.test" "-v"))))))
7685 (native-inputs
7686 `(("python2-pytest" ,python2-pytest)))
7687 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7688 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7689 (description
7690 "This package provides a backport of the @code{get_terminal_size
7691 function} from Python 3.3's @code{shutil}.
7692 Unlike the original version it is written in pure Python rather than C,
7693 so it might be a tiny bit slower.")
7694 (license license:expat)))
7695
7696 (define-public python-waf
7697 (package
7698 (name "python-waf")
7699 (version "2.0.19")
7700 (source (origin
7701 (method url-fetch)
7702 (uri (string-append "https://waf.io/"
7703 "waf-" version ".tar.bz2"))
7704 (sha256
7705 (base32
7706 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7707 (build-system python-build-system)
7708 (arguments
7709 '(#:phases
7710 (modify-phases %standard-phases
7711 (replace 'build
7712 (lambda _
7713 ;; XXX: Find a way to add all extra tools.
7714 (let ((tools '("gccdeps"
7715 "clang_compilation_database")))
7716 (invoke "python" "waf-light" "configure" "build"
7717 (string-append "--tools="
7718 (string-join tools ","))))))
7719 (replace 'check
7720 (lambda _
7721 (invoke "python" "waf" "--version")))
7722 (replace 'install
7723 (lambda* (#:key outputs #:allow-other-keys)
7724 (let ((out (assoc-ref outputs "out")))
7725 (install-file "waf" (string-append out "/bin")))
7726 #t))
7727 ;; waf breaks when it is wrapped.
7728 (delete 'wrap))))
7729 (home-page "https://waf.io/")
7730 (synopsis "Python-based build system")
7731 (description
7732 "Waf is a Python-based framework for configuring, compiling and installing
7733 applications.")
7734 (license license:bsd-3)))
7735
7736 (define-public python2-waf
7737 (package-with-python2 python-waf))
7738
7739 (define-public python-pyzmq
7740 (package
7741 (name "python-pyzmq")
7742 (version "17.1.2")
7743 (source
7744 (origin
7745 (method url-fetch)
7746 (uri (pypi-uri "pyzmq" version))
7747 (sha256
7748 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
7749 (build-system python-build-system)
7750 (arguments
7751 `(#:configure-flags
7752 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
7753 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
7754 ;; --inplace' for 'python setup.py test' to work.
7755 #:tests? #f))
7756 (inputs
7757 `(("zeromq" ,zeromq)))
7758 (native-inputs
7759 `(("pkg-config" ,pkg-config)
7760 ("python-nose" ,python-nose)))
7761 (home-page "https://github.com/zeromq/pyzmq")
7762 (synopsis "Python bindings for 0MQ")
7763 (description
7764 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
7765 (license license:bsd-4)))
7766
7767 (define-public python2-pyzmq
7768 (package-with-python2 python-pyzmq))
7769
7770 (define-public python-pep8
7771 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
7772 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
7773 ;; some dependents' test suites, and nothing more.
7774 (package
7775 (name "python-pep8")
7776 (version "1.7.0")
7777 (source
7778 (origin
7779 (method url-fetch)
7780 (uri (pypi-uri "pep8" version))
7781 (sha256
7782 (base32
7783 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
7784 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
7785 (build-system python-build-system)
7786 (home-page "https://pep8.readthedocs.org/")
7787 (synopsis "Python style guide checker")
7788 (description
7789 "This tools checks Python code against some of the style conventions in
7790 PEP 8.")
7791 (license license:expat)))
7792
7793 (define-public python2-pep8
7794 (package-with-python2 python-pep8))
7795
7796 (define-public python-pep517
7797 (package
7798 (name "python-pep517")
7799 (version "0.8.2")
7800 (source
7801 (origin
7802 (method url-fetch)
7803 (uri (pypi-uri "pep517" version))
7804 (sha256
7805 (base32
7806 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
7807 (build-system python-build-system)
7808 (arguments
7809 '(#:phases
7810 (modify-phases %standard-phases
7811 (replace 'check
7812 (lambda* (#:key tests? #:allow-other-keys)
7813 (delete-file "pytest.ini")
7814 ;; This test tries to connect to the internet
7815 (delete-file "tests/test_meta.py")
7816 (if tests?
7817 (invoke "pytest")
7818 #t))))))
7819 (native-inputs
7820 `(("python-mock" ,python-mock)
7821 ("python-pytest" ,python-pytest)
7822 ("python-testpath" ,python-testpath)))
7823 (propagated-inputs
7824 `(("python-toml" ,python-toml)
7825 ("python-wheel" ,python-wheel)))
7826 (home-page "https://github.com/pypa/pep517")
7827 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
7828 (description
7829 "Wrappers to build Python packages using PEP 517 hooks.")
7830 (properties `((python2-variant . ,(delay python2-pep517))))
7831 (license license:expat)))
7832
7833 ;; Skip the tests so we don't create a cyclical dependency with pytest.
7834 (define-public python2-pep517
7835 (let ((base (package-with-python2
7836 (strip-python2-variant python-pep517))))
7837 (package
7838 (inherit base)
7839 (name "python2-pep517")
7840 (arguments
7841 `(#:tests? #f
7842 ,@(package-arguments base)))
7843 (native-inputs `()))))
7844
7845 (define-public python-pyflakes
7846 (package
7847 (name "python-pyflakes")
7848 (version "2.2.0")
7849 (source
7850 (origin
7851 (method url-fetch)
7852 (uri (pypi-uri "pyflakes" version))
7853 (sha256
7854 (base32
7855 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
7856 (build-system python-build-system)
7857 (home-page
7858 "https://github.com/pyflakes/pyflakes")
7859 (synopsis "Passive checker of Python programs")
7860 (description
7861 "Pyflakes statically checks Python source code for common errors.")
7862 (license license:expat)))
7863
7864 (define-public python2-pyflakes
7865 (package-with-python2 python-pyflakes))
7866
7867 ;; Flake8 2.6 requires an older version of pyflakes.
7868 ;; This should be removed ASAP.
7869 (define-public python-pyflakes-1.2
7870 (package (inherit python-pyflakes)
7871 (version "1.2.3")
7872 (source
7873 (origin
7874 (method url-fetch)
7875 (uri (pypi-uri "pyflakes" version))
7876 (sha256
7877 (base32
7878 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
7879 (arguments
7880 '(#:phases
7881 (modify-phases %standard-phases
7882 ;; This one test fails.
7883 (replace 'check
7884 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
7885 (native-inputs
7886 `(("python-pytest" ,python-pytest)))))
7887
7888 (define-public python-mccabe
7889 (package
7890 (name "python-mccabe")
7891 (version "0.6.1")
7892 (source
7893 (origin
7894 (method url-fetch)
7895 (uri (pypi-uri "mccabe" version))
7896 (sha256
7897 (base32
7898 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
7899 (build-system python-build-system)
7900 (native-inputs
7901 `(("python-pytest" ,python-pytest-bootstrap)
7902 ("python-pytest-runner" ,python-pytest-runner)))
7903 (home-page "https://github.com/flintwork/mccabe")
7904 (synopsis "McCabe checker, plugin for flake8")
7905 (description
7906 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7907 complexity of Python source code.")
7908 (license license:expat)))
7909
7910 (define-public python2-mccabe
7911 (package-with-python2 python-mccabe))
7912
7913 (define-public python-mccabe-0.2.1
7914 (package (inherit python-mccabe)
7915 (version "0.2.1")
7916 (source
7917 (origin
7918 (method url-fetch)
7919 (uri (pypi-uri "mccabe" version))
7920 (sha256
7921 (base32
7922 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7923
7924 (define-public python2-mccabe-0.2.1
7925 (package-with-python2 python-mccabe-0.2.1))
7926
7927 ;; Flake8 2.4.1 requires an older version of pep8.
7928 ;; This should be removed ASAP.
7929 (define-public python-pep8-1.5.7
7930 (package (inherit python-pep8)
7931 (version "1.5.7")
7932 (source
7933 (origin
7934 (method url-fetch)
7935 (uri (pypi-uri "pep8" version))
7936 (sha256
7937 (base32
7938 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7939 (arguments
7940 ;; XXX Tests not compatible with Python 3.5.
7941 '(#:tests? #f))))
7942
7943 (define-public python2-pep8-1.5.7
7944 (package-with-python2 python-pep8-1.5.7))
7945
7946 (define-public python-flake8
7947 (package
7948 (name "python-flake8")
7949 (version "3.8.3")
7950 (source (origin
7951 (method url-fetch)
7952 (uri (pypi-uri "flake8" version))
7953 (sha256
7954 (base32
7955 "02527892hh0qjivxaiphzalj7q32qkna1cqaikjs7c03mk5ryjzh"))))
7956 (build-system python-build-system)
7957 (arguments
7958 `(#:phases
7959 (modify-phases %standard-phases
7960 (delete 'check)
7961 (add-after 'install 'check
7962 (lambda* (#:key inputs outputs #:allow-other-keys)
7963 (add-installed-pythonpath inputs outputs)
7964 (invoke "pytest" "-v")
7965 #t)))))
7966 (propagated-inputs
7967 `(("python-pycodestyle" ,python-pycodestyle)
7968 ("python-entrypoints" ,python-entrypoints)
7969 ("python-pyflakes" ,python-pyflakes)
7970 ("python-mccabe" ,python-mccabe)))
7971 (native-inputs
7972 `(("python-mock" ,python-mock)
7973 ("python-pytest" ,python-pytest-bootstrap)))
7974 (home-page "https://gitlab.com/pycqa/flake8")
7975 (synopsis
7976 "The modular source code checker: pep8, pyflakes and co")
7977 (description
7978 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7979 (properties `((python2-variant . ,(delay python2-flake8))))
7980 (license license:expat)))
7981
7982 (define-public python2-flake8
7983 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
7984 (package (inherit base)
7985 (propagated-inputs
7986 `(("python2-configparser" ,python2-configparser)
7987 ("python2-enum34" ,python2-enum34)
7988 ("python2-functools32" ,python2-functools32)
7989 ("python2-typing" ,python2-typing)
7990 ,@(package-propagated-inputs base))))))
7991
7992 ;; python-hacking requires flake8 <2.7.0.
7993 (define-public python-flake8-2.6
7994 (package
7995 (inherit python-flake8)
7996 (version "2.6.2")
7997 (source (origin
7998 (method url-fetch)
7999 (uri (pypi-uri "flake8" version))
8000 (sha256
8001 (base32
8002 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
8003 (arguments
8004 `(#:phases
8005 (modify-phases %standard-phases
8006 (add-after 'unpack 'use-later-pycodestyles
8007 (lambda __
8008 (substitute* '("flake8.egg-info/requires.txt"
8009 "setup.py")
8010 (("pycodestyle >= 2.0, < 2.1")
8011 "pycodestyle >= 2.0"))
8012 #t))
8013 (delete 'check)
8014 (add-after 'install 'check
8015 (lambda* (#:key inputs outputs #:allow-other-keys)
8016 (add-installed-pythonpath inputs outputs)
8017 (invoke "pytest" "-v")
8018 #t)))))
8019 (propagated-inputs
8020 `(("python-pep8" ,python-pep8)
8021 ("python-pycodestyle" ,python-pycodestyle)
8022 ("python-entrypoints" ,python-entrypoints)
8023 ("python-pyflakes" ,python-pyflakes-1.2)
8024 ("python-mccabe" ,python-mccabe)))))
8025
8026 (define-public python-flake8-bugbear
8027 (package
8028 (name "python-flake8-bugbear")
8029 (version "20.1.4")
8030 (source
8031 (origin
8032 (method url-fetch)
8033 (uri (pypi-uri "flake8-bugbear" version))
8034 (sha256
8035 (base32
8036 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8037 (build-system python-build-system)
8038 (arguments
8039 '(#:phases
8040 (modify-phases %standard-phases
8041 (add-before 'check 'disable-test
8042 (lambda _
8043 ;; This test fails on slow computers.
8044 (substitute* "tests/test_bugbear.py"
8045 (("def test_does_not_crash_on_any_valid_code")
8046 "def _test_does_not_crash_on_any_valid_code")))))))
8047 (native-inputs
8048 `(("python-hypothesis" ,python-hypothesis)
8049 ("python-hypothesmith" ,python-hypothesmith)))
8050 (propagated-inputs
8051 `(("python-attrs" ,python-attrs)
8052 ("python-flake8" ,python-flake8)))
8053 (home-page "https://github.com/PyCQA/flake8-bugbear")
8054 (synopsis
8055 "Flake8 plugin for finding likely bugs and design problems in your program")
8056 (description
8057 "This package contains a plugin for Flake8 finding likely bugs and
8058 design problems in your program. It contains warnings that don't belong
8059 in pyflakes and pycodestyle.")
8060 (license license:expat)))
8061
8062 (define-public python-flake8-polyfill
8063 (package
8064 (name "python-flake8-polyfill")
8065 (version "1.0.2")
8066 (source
8067 (origin
8068 (method url-fetch)
8069 (uri (pypi-uri "flake8-polyfill" version))
8070 (sha256
8071 (base32
8072 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8073 (build-system python-build-system)
8074 (arguments
8075 '(#:phases
8076 (modify-phases %standard-phases
8077 (replace 'check
8078 (lambda _
8079 ;; Be compatible with Pytest 4:
8080 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8081 (substitute* "setup.cfg"
8082 (("\\[pytest\\]")
8083 "[tool:pytest]"))
8084
8085 (setenv "PYTHONPATH"
8086 (string-append (getcwd) "/build/lib:"
8087 (getenv "PYTHONPATH")))
8088 (invoke "py.test" "-v"))))))
8089 (native-inputs
8090 `(("python-flake8" ,python-flake8)
8091 ("python-mock" ,python-mock)
8092 ("python-pep8" ,python-pep8)
8093 ("python-pycodestyle" ,python-pycodestyle)
8094 ("python-pytest" ,python-pytest)))
8095 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8096 (synopsis "Polyfill package for Flake8 plugins")
8097 (description
8098 "This package that provides some compatibility helpers for Flake8
8099 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8100 (license license:expat)))
8101
8102 (define-public python2-flake8-polyfill
8103 (package-with-python2 python-flake8-polyfill))
8104
8105 (define-public python-flake8-pyi
8106 (package
8107 (name "python-flake8-pyi")
8108 (version "20.5.0")
8109 (source
8110 (origin
8111 (method url-fetch)
8112 (uri (pypi-uri "flake8-pyi" version))
8113 (sha256
8114 (base32
8115 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8116 (build-system python-build-system)
8117 (propagated-inputs
8118 `(("python-attrs" ,python-attrs)
8119 ("python-flake8" ,python-flake8)
8120 ("python-pyflakes" ,python-pyflakes)))
8121 (home-page "https://github.com/ambv/flake8-pyi")
8122 (synopsis
8123 "Flake8 plugin that provides specializations for type hinting stub files")
8124 (description
8125 "This package contains a plugin that provides specializations for
8126 type hinting stub files, especially interesting for linting typeshed. It
8127 adds the @file{.pyi} extension to the default value of the @code{--filename}
8128 command-line argument to Flake8. This means stubs are linted by default with
8129 this plugin enabled, without needing to explicitly list every file. It
8130 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8131 expressions after the entire file has been read. This enables support for
8132 first-class forward references that stub files use.")
8133 (license license:expat)))
8134
8135 (define-public python-mistune
8136 (package
8137 (name "python-mistune")
8138 (version "0.8.4")
8139 (source
8140 (origin
8141 (method url-fetch)
8142 (uri (pypi-uri "mistune" version))
8143 (sha256
8144 (base32
8145 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8146 (build-system python-build-system)
8147 (native-inputs
8148 `(("python-nose" ,python-nose)
8149 ("python-cython" ,python-cython)))
8150 (home-page "https://github.com/lepture/mistune")
8151 (synopsis "Markdown parser in pure Python")
8152 (description "This package provides a fast markdown parser in pure
8153 Python.")
8154 (license license:bsd-3)))
8155
8156 (define-public python2-mistune
8157 (package-with-python2 python-mistune))
8158
8159 (define-public python-markdown
8160 (package
8161 (name "python-markdown")
8162 (version "3.2.1")
8163 (source
8164 (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "Markdown" version))
8167 (sha256
8168 (base32
8169 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8170 (build-system python-build-system)
8171 (native-inputs
8172 `(("python-nose" ,python-nose)
8173 ("python-pyyaml" ,python-pyyaml)))
8174 (home-page "https://python-markdown.github.io/")
8175 (synopsis "Python implementation of Markdown")
8176 (description
8177 "This package provides a Python implementation of John Gruber's
8178 Markdown. The library features international input, various Markdown
8179 extensions, and several HTML output formats. A command line wrapper
8180 markdown_py is also provided to convert Markdown files to HTML.")
8181 (properties `((python2-variant . ,(delay python2-markdown))))
8182 (license license:bsd-3)))
8183
8184 ;; Markdown 3.2 dropped support for Python 2.
8185 (define-public python2-markdown
8186 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8187 (package/inherit
8188 base
8189 (version "3.1.1")
8190 (source (origin
8191 (method url-fetch)
8192 (uri (pypi-uri "Markdown" version))
8193 (sha256
8194 (base32
8195 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8196
8197 (define-public python-ptyprocess
8198 (package
8199 (name "python-ptyprocess")
8200 (version "0.5.2")
8201 (source
8202 (origin
8203 (method url-fetch)
8204 (uri (pypi-uri "ptyprocess" version))
8205 (sha256
8206 (base32
8207 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8208 (build-system python-build-system)
8209 (native-inputs
8210 `(("python-nose" ,python-nose)))
8211 (arguments
8212 `(#:phases
8213 (modify-phases %standard-phases
8214 (replace 'check
8215 (lambda _ (invoke "nosetests"))))))
8216 (home-page "https://github.com/pexpect/ptyprocess")
8217 (synopsis "Run a subprocess in a pseudo terminal")
8218 (description
8219 "This package provides a Python library used to launch a subprocess in a
8220 pseudo terminal (pty), and interact with both the process and its pty.")
8221 (license license:isc)))
8222
8223 (define-public python2-ptyprocess
8224 (package-with-python2 python-ptyprocess))
8225
8226 (define-public python-cram
8227 (package
8228 (name "python-cram")
8229 (version "0.7")
8230 (home-page "https://bitheap.org/cram/")
8231 (source (origin
8232 (method url-fetch)
8233 (uri (list (string-append home-page "cram-"
8234 version ".tar.gz")
8235 (pypi-uri "cram" version)))
8236 (sha256
8237 (base32
8238 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8239 (arguments
8240 '(#:phases
8241 (modify-phases %standard-phases
8242 (add-after 'unpack 'patch-source
8243 (lambda _
8244 (substitute* (find-files "cram" ".*\\.py$")
8245 ;; Replace default shell path.
8246 (("/bin/sh") (which "sh")))
8247 (substitute* (find-files "tests" ".*\\.t$")
8248 (("md5") "md5sum")
8249 (("/bin/bash") (which "bash"))
8250 (("/bin/sh") (which "sh")))
8251 (substitute* "cram/_test.py"
8252 ;; This hack works around a bug triggered by substituting
8253 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8254 ;; "cram -h", which breaks the output at 80 characters. This
8255 ;; causes the line showing the default shell to break into two
8256 ;; lines, but the test expects a single line...
8257 (("env\\['COLUMNS'\\] = '80'")
8258 "env['COLUMNS'] = '160'"))
8259
8260 (substitute* "Makefile"
8261 ;; Recent versions of python-coverage have caused the test
8262 ;; coverage to decrease (as of version 0.7). Allow that.
8263 (("--fail-under=100")
8264 "--fail-under=90"))
8265
8266 #t))
8267 (replace 'check
8268 ;; The test phase uses the built library and executable.
8269 (lambda* (#:key inputs outputs #:allow-other-keys)
8270 (add-installed-pythonpath inputs outputs)
8271 (setenv "PATH" (string-append (getenv "PATH") ":"
8272 (assoc-ref outputs "out") "/bin"))
8273 (invoke "make" "test"))))))
8274 (build-system python-build-system)
8275 (native-inputs
8276 `(("python-coverage" ,python-coverage)
8277 ("which" ,which)))
8278 (synopsis "Simple testing framework for command line applications")
8279 (description
8280 "Cram is a functional testing framework for command line applications.
8281 Cram tests look like snippets of interactive shell sessions. Cram runs each
8282 command and compares the command output in the test with the command’s actual
8283 output.")
8284 (license license:gpl2+)))
8285
8286 (define-public python2-cram
8287 (package-with-python2 python-cram))
8288
8289 (define-public python-crashtest
8290 (package
8291 (name "python-crashtest")
8292 (version "0.3.1")
8293 (source
8294 (origin
8295 (method url-fetch)
8296 (uri (pypi-uri "crashtest" version))
8297 (sha256
8298 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8299 (build-system python-build-system)
8300 (home-page "https://github.com/sdispater/crashtest")
8301 (synopsis "Manage Python errors with ease")
8302 (description
8303 "Python library that makes exceptions handling and inspection easier.")
8304 (license license:expat)))
8305
8306 (define-public python-straight-plugin
8307 (package
8308 (name "python-straight-plugin")
8309 (version "1.4.1")
8310 (source
8311 (origin
8312 (method url-fetch)
8313 (uri (pypi-uri "straight.plugin" version))
8314 (sha256
8315 (base32
8316 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8317 (build-system python-build-system)
8318 (home-page "https://github.com/ironfroggy/straight.plugin")
8319 (synopsis "Simple namespaced plugin facility")
8320 (description "Straight Plugin provides a type of plugin you can create from
8321 almost any existing Python modules, and an easy way for outside developers to
8322 add functionality and customization to your projects with their own plugins.")
8323 (license license:expat)))
8324
8325 (define-public python2-straight-plugin
8326 (package-with-python2 python-straight-plugin))
8327
8328 (define-public python-fonttools
8329 (package
8330 (name "python-fonttools")
8331 (version "4.6.0")
8332 (source (origin
8333 (method url-fetch)
8334 (uri (pypi-uri "fonttools" version ".zip"))
8335 (sha256
8336 (base32
8337 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8338 (build-system python-build-system)
8339 (native-inputs
8340 `(("unzip" ,unzip)
8341 ("python-pytest" ,python-pytest)
8342 ("python-pytest-runner" ,python-pytest-runner)))
8343 (home-page "https://github.com/fonttools/fonttools")
8344 (synopsis "Tools to manipulate font files")
8345 (description
8346 "FontTools/TTX is a library to manipulate font files from Python. It
8347 supports reading and writing of TrueType/OpenType fonts, reading and writing
8348 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8349 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8350 from an XML-based format.")
8351 (license license:expat)))
8352
8353 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8354 (define-public python2-fonttools
8355 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8356 (package/inherit
8357 base
8358 (version "3.44.0")
8359 (source (origin
8360 (method url-fetch)
8361 (uri (pypi-uri "fonttools" version ".zip"))
8362 (sha256
8363 (base32
8364 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8365
8366 (define-public python-ly
8367 (package
8368 (name "python-ly")
8369 (version "0.9.5")
8370 (source
8371 (origin
8372 (method url-fetch)
8373 (uri (pypi-uri name version))
8374 (sha256
8375 (base32
8376 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8377 (build-system python-build-system)
8378 (arguments
8379 ;; FIXME: Some tests need network access.
8380 '(#:tests? #f))
8381 (synopsis "Tool and library for manipulating LilyPond files")
8382 (description "This package provides a Python library to parse, manipulate
8383 or create documents in LilyPond format. A command line program ly is also
8384 provided that can be used to do various manipulations with LilyPond files.")
8385 (home-page "https://pypi.org/project/python-ly/")
8386 (license license:gpl2+)))
8387
8388 (define-public python-appdirs
8389 (package
8390 (name "python-appdirs")
8391 (version "1.4.3")
8392 (source
8393 (origin
8394 (method url-fetch)
8395 (uri (pypi-uri "appdirs" version))
8396 (sha256
8397 (base32
8398 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8399 (build-system python-build-system)
8400 (home-page "https://github.com/ActiveState/appdirs")
8401 (synopsis
8402 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8403 (description
8404 "This module provides a portable way of finding out where user data
8405 should be stored on various operating systems.")
8406 (license license:expat)))
8407
8408 (define-public python2-appdirs
8409 (package-with-python2 python-appdirs))
8410
8411 (define-public python-llfuse
8412 (package
8413 (name "python-llfuse")
8414 (version "1.3.6")
8415 (source (origin
8416 (method url-fetch)
8417 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8418 (sha256
8419 (base32
8420 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8421 (build-system python-build-system)
8422 (inputs
8423 `(("fuse" ,fuse)
8424 ("attr" ,attr)))
8425 (native-inputs
8426 `(("pkg-config" ,pkg-config)))
8427 (synopsis "Python bindings for FUSE")
8428 (description
8429 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8430 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8431 (license license:lgpl2.0+)
8432 (properties `((python2-variant . ,(delay python2-llfuse))))))
8433
8434 (define-public python2-llfuse
8435 (package (inherit (package-with-python2
8436 (strip-python2-variant python-llfuse)))
8437 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8438
8439 ;; For attic-0.16
8440 (define-public python-llfuse-0.41
8441 (package (inherit python-llfuse)
8442 (version "0.41.1")
8443 (source (origin
8444 (method url-fetch)
8445 (uri (string-append
8446 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8447 "llfuse-" version ".tar.bz2"))
8448 (sha256
8449 (base32
8450 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8451 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8452 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8453 (license (list license:expat license:lgpl2.0+))))
8454
8455 (define-public python-msgpack
8456 (package
8457 (name "python-msgpack")
8458 (version "1.0.0")
8459 (source (origin
8460 (method url-fetch)
8461 (uri (pypi-uri "msgpack" version))
8462 (sha256
8463 (base32
8464 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8465 (build-system python-build-system)
8466 (arguments
8467 `(#:modules ((guix build utils)
8468 (guix build python-build-system)
8469 (ice-9 ftw)
8470 (srfi srfi-1)
8471 (srfi srfi-26))
8472 #:phases
8473 (modify-phases %standard-phases
8474 (replace 'check
8475 (lambda _
8476 (let ((cwd (getcwd)))
8477 (setenv "PYTHONPATH"
8478 (string-append cwd "/build/"
8479 (find (cut string-prefix? "lib" <>)
8480 (scandir (string-append cwd "/build")))
8481 ":"
8482 (getenv "PYTHONPATH")))
8483 (invoke "pytest" "-v" "test")))))))
8484 (native-inputs
8485 `(("python-pytest" ,python-pytest)))
8486 (synopsis "MessagePack (de)serializer")
8487 (description "MessagePack is a fast, compact binary serialization format,
8488 suitable for similar data to JSON. This package provides CPython bindings for
8489 reading and writing MessagePack data.")
8490 (home-page "https://pypi.org/project/msgpack/")
8491 (license license:asl2.0)))
8492
8493 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8494 ;; release 0.5. Some packages like borg still call it by the old name for now.
8495 ;; <https://bugs.gnu.org/30662>
8496 (define-public python-msgpack-transitional
8497 (package
8498 (inherit python-msgpack)
8499 (name "python-msgpack-transitional")
8500 (version "0.5.6")
8501 (source (origin
8502 (method url-fetch)
8503 (uri (pypi-uri "msgpack" version))
8504 (sha256
8505 (base32
8506 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8507 (arguments
8508 (substitute-keyword-arguments (package-arguments python-msgpack)
8509 ((#:phases phases)
8510 `(modify-phases ,phases
8511 (add-after 'unpack 'configure-transitional
8512 (lambda _
8513 ;; Keep using the old name.
8514 (substitute* "setup.py"
8515 (("TRANSITIONAL = False")
8516 "TRANSITIONAL = 1"))
8517 #t))))))))
8518
8519 (define-public python2-msgpack
8520 (package-with-python2 python-msgpack))
8521
8522 (define-public python-netaddr
8523 (package
8524 (name "python-netaddr")
8525 (version "0.7.19")
8526 (source
8527 (origin
8528 (method url-fetch)
8529 (uri (pypi-uri "netaddr" version))
8530 (sha256
8531 (base32
8532 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8533 (build-system python-build-system)
8534 (arguments `(#:tests? #f)) ;; No tests.
8535 (home-page "https://github.com/drkjam/netaddr/")
8536 (synopsis "Pythonic manipulation of network addresses")
8537 (description
8538 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8539 and MAC network addresses.")
8540 (license license:bsd-3)))
8541
8542 (define-public python2-netaddr
8543 (package-with-python2 python-netaddr))
8544
8545 (define-public python2-pyroute2
8546 (package
8547 (name "python2-pyroute2")
8548 (version "0.5.6")
8549 (source
8550 (origin
8551 (method url-fetch)
8552 (uri (pypi-uri "pyroute2" version))
8553 (sha256
8554 (base32
8555 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8556 (build-system python-build-system)
8557 (arguments
8558 `(#:python ,python-2)) ;Python 3.x is not supported
8559 (home-page "https://github.com/svinota/pyroute2")
8560 (synopsis "Python netlink library")
8561 (description
8562 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8563 Supported netlink families and protocols include:
8564 @itemize
8565 @item rtnl, network settings - addresses, routes, traffic controls
8566 @item nfnetlink - netfilter API: ipset, nftables, ...
8567 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8568 @item devlink - manage and monitor devlink-enabled hardware
8569 @item generic - generic netlink families
8570 @itemize
8571 @item nl80211 - wireless functions API (basic support)
8572 @item taskstats - extended process statistics
8573 @item acpi_events - ACPI events monitoring
8574 @item thermal_events - thermal events monitoring
8575 @item VFS_DQUOT - disk quota events monitoring
8576 @end itemize
8577 @end itemize")
8578 (license license:gpl2+)))
8579
8580 (define-public python-wrapt
8581 (package
8582 (name "python-wrapt")
8583 (version "1.11.2")
8584 (source
8585 (origin
8586 (method url-fetch)
8587 (uri (pypi-uri "wrapt" version))
8588 (sha256
8589 (base32
8590 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8591 (build-system python-build-system)
8592 (arguments
8593 ;; Tests are not included in the tarball, they are only available in the
8594 ;; git repository.
8595 `(#:tests? #f))
8596 (home-page "https://github.com/GrahamDumpleton/wrapt")
8597 (synopsis "Module for decorators, wrappers and monkey patching")
8598 (description
8599 "The aim of the wrapt module is to provide a transparent object proxy for
8600 Python, which can be used as the basis for the construction of function
8601 wrappers and decorator functions.")
8602 (license license:bsd-2)))
8603
8604 (define-public python2-wrapt
8605 (package-with-python2 python-wrapt))
8606
8607 (define-public python-xlrd
8608 (package
8609 (name "python-xlrd")
8610 (version "1.2.0")
8611 (source (origin
8612 (method url-fetch)
8613 (uri (pypi-uri "xlrd" version))
8614 (sha256
8615 (base32
8616 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8617 (build-system python-build-system)
8618 (arguments
8619 `(#:phases
8620 (modify-phases %standard-phases
8621 ;; Some tests depend on writing a temporary file to the user's home
8622 ;; directory.
8623 (add-after 'unpack 'fix-tests
8624 (lambda _
8625 (delete-file "tests/test_open_workbook.py")
8626 #t)))))
8627 (home-page "http://www.python-excel.org/")
8628 (synopsis "Library for extracting data from Excel files")
8629 (description "This package provides a library to extract data from
8630 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8631 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8632 Unicode-aware. It is not intended as an end-user tool.")
8633 (license license:bsd-3)))
8634
8635 (define-public python2-xlrd
8636 (package-with-python2 python-xlrd))
8637
8638 (define-public python-immutables
8639 (package
8640 (name "python-immutables")
8641 (version "0.14")
8642 (source
8643 (origin
8644 (method url-fetch)
8645 (uri (pypi-uri "immutables" version))
8646 (sha256
8647 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
8648 (build-system python-build-system)
8649 (home-page "https://github.com/MagicStack/immutables")
8650 (synopsis "High-performance immutable mapping type for Python")
8651 (description
8652 "An immutable mapping type for Python. The underlying datastructure is a
8653 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
8654 functional languages.")
8655 (license license:asl2.0)))
8656
8657 (define-public python-prettytable
8658 (package
8659 (name "python-prettytable")
8660 (version "0.7.2")
8661 (source
8662 (origin
8663 (method url-fetch)
8664 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8665 (sha256
8666 (base32
8667 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8668 (build-system python-build-system)
8669 (home-page "https://code.google.com/archive/p/prettytable/")
8670 (synopsis "Display tabular data in an ASCII table format")
8671 (description
8672 "A library designed to represent tabular data in visually appealing ASCII
8673 tables. PrettyTable allows for selection of which columns are to be printed,
8674 independent alignment of columns (left or right justified or centred) and
8675 printing of sub-tables by specifying a row range.")
8676 (license license:bsd-3)))
8677
8678 (define-public python2-prettytable
8679 (package-with-python2 python-prettytable))
8680
8681 (define-public python-curio
8682 (package
8683 (name "python-curio")
8684 (version "1.2")
8685 (source
8686 (origin
8687 (method url-fetch)
8688 (uri (pypi-uri "curio" version))
8689 (sha256
8690 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
8691 (build-system python-build-system)
8692 (arguments
8693 `(#:phases
8694 (modify-phases %standard-phases
8695 (replace 'check
8696 (lambda* (#:key inputs outputs #:allow-other-keys)
8697 (add-installed-pythonpath inputs outputs)
8698 (invoke "pytest" "-vv" "-k"
8699 ;; Tries to open an outgoing connection.
8700 "not test_ssl_outgoing"))))))
8701 (native-inputs
8702 `(("python-pytest" ,python-pytest)))
8703 (home-page "https://github.com/dabeaz/curio")
8704 (synopsis "Coroutine-based library for concurrent Python")
8705 (description
8706 "Curio is a coroutine-based library for concurrent Python systems
8707 programming. It provides standard programming abstractions such as as
8708 tasks, sockets, files, locks, and queues.")
8709 (license license:bsd-3)))
8710
8711 (define-public python-tables
8712 (package
8713 (name "python-tables")
8714 (version "3.6.1")
8715 (source
8716 (origin
8717 (method url-fetch)
8718 (uri (pypi-uri "tables" version))
8719 (sha256
8720 (base32
8721 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
8722 (modules '((guix build utils)))
8723 (snippet
8724 '(begin
8725 ;; Remove pre-compiled .pyc files from source.
8726 (for-each delete-file-recursively
8727 (find-files "." "__pycache__" #:directories? #t))
8728 (for-each delete-file (find-files "." "\\.pyc$"))
8729 #t))))
8730 (build-system python-build-system)
8731 (arguments
8732 `(;; FIXME: python-build-system does not pass configure-flags to "build"
8733 ;; or "check", so we must override the build and check phases.
8734 #:phases
8735 (modify-phases %standard-phases
8736 (add-after 'unpack 'use-gcc
8737 (lambda _
8738 (substitute* "setup.py"
8739 (("^( +)compiler = new_compiler\\(\\)" line indent)
8740 (string-append line
8741 "\n"
8742 indent
8743 "compiler.set_executables(compiler='gcc',"
8744 "compiler_so='gcc',"
8745 "linker_exe='gcc',"
8746 "linker_so='gcc -shared')")))
8747 #t))
8748 (add-after 'unpack 'disable-tuning
8749 (lambda _
8750 (substitute* "setup.py"
8751 (("cpu_flags = .*")
8752 "cpu_flags = ['sse2']\n"))
8753 #t))
8754 (replace 'build
8755 (lambda* (#:key inputs #:allow-other-keys)
8756 (invoke "python" "setup.py" "build"
8757 (string-append "--hdf5="
8758 (assoc-ref inputs "hdf5")))))
8759 (replace 'check
8760 (lambda* (#:key inputs #:allow-other-keys)
8761 (invoke "python" "setup.py" "check"
8762 (string-append "--hdf5="
8763 (assoc-ref inputs "hdf5"))))))))
8764 (propagated-inputs
8765 `(("python-numexpr" ,python-numexpr)
8766 ("python-numpy" ,python-numpy)))
8767 (native-inputs
8768 `(("python-cython" ,python-cython)
8769 ("pkg-config" ,pkg-config)))
8770 (inputs
8771 `(("hdf5" ,hdf5-1.10)
8772 ("bzip2" ,bzip2)
8773 ("zlib" ,zlib)))
8774 (home-page "https://www.pytables.org/")
8775 (synopsis "Hierarchical datasets for Python")
8776 (description "PyTables is a package for managing hierarchical datasets and
8777 designed to efficiently cope with extremely large amounts of data.")
8778 (license license:bsd-3)))
8779
8780 (define-public python2-tables
8781 (package-with-python2 python-tables))
8782
8783 (define-public python-sniffio
8784 (package
8785 (name "python-sniffio")
8786 (version "1.1.0")
8787 (source
8788 (origin
8789 (method url-fetch)
8790 (uri (pypi-uri "sniffio" version))
8791 (sha256
8792 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
8793 (build-system python-build-system)
8794 (arguments
8795 `(#:phases
8796 (modify-phases %standard-phases
8797 (replace 'check
8798 (lambda _
8799 (invoke "pytest" "-vv"))))))
8800 (native-inputs
8801 `(("python-curio" ,python-curio)
8802 ("python-pytest" ,python-pytest)
8803 ("python-pytest-cov" ,python-pytest-cov)))
8804 (home-page "https://github.com/python-trio/sniffio")
8805 (synopsis "Detect which async library a program is running under")
8806 (description "This package detects which async library a program is
8807 running under. It supports multiple async I/O packages, like Trio, and
8808 asyncio.")
8809 ;; Either license applies.
8810 (license (list license:expat license:asl2.0))))
8811
8812 (define-public python-pytest-black
8813 (package
8814 (name "python-pytest-black")
8815 (version "0.3.8")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "pytest-black" version))
8820 (sha256
8821 (base32
8822 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
8823 (build-system python-build-system)
8824 (propagated-inputs
8825 `(("python-pytest" ,python-pytest)
8826 ("python-black" ,python-black)
8827 ("python-toml" ,python-toml)))
8828 (native-inputs
8829 `(("python-setuptools-scm" ,python-setuptools-scm)))
8830 (home-page "https://github.com/shopkeep/pytest-black")
8831 (synopsis "Pytest plugin to enable format checking with black")
8832 (description
8833 "This package provides a pytest plugin to enable format checking with the
8834 Python code formatter \"black\".")
8835 (license license:expat)))
8836
8837 (define-public python-get-version
8838 (package
8839 (name "python-get-version")
8840 (version "2.1")
8841 (source
8842 (origin
8843 (method url-fetch)
8844 (uri (pypi-uri "get_version" version))
8845 (sha256
8846 (base32
8847 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
8848 (build-system python-build-system)
8849 (propagated-inputs
8850 `(("python-pygments" ,python-pygments)
8851 ("python-pytest" ,python-pytest)
8852 ("python-pytest-black" ,python-pytest-black)
8853 ("python-pytest-cov" ,python-pytest-cov)
8854 ("python-setuptools" ,python-setuptools)
8855 ("python-testpath" ,python-testpath)))
8856 (home-page "https://github.com/flying-sheep/get_version")
8857 (synopsis "Version helper in the spirit of versioneer")
8858 (description
8859 "This package provides a version helper that lets you automatically use
8860 the latest @code{vX.X.X} Git tag as the version in your Python package. It
8861 also supports getting the version from Python source distributions or, once
8862 your package is installed, via @code{pkg_resources} (part of
8863 @code{setuptools}).")
8864 (license license:gpl3+)))
8865
8866 (define-public python-legacy-api-wrap
8867 (package
8868 (name "python-legacy-api-wrap")
8869 (version "1.2")
8870 (source
8871 (origin
8872 (method url-fetch)
8873 (uri (pypi-uri "legacy-api-wrap" version))
8874 (sha256
8875 (base32
8876 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
8877 (build-system python-build-system)
8878 (propagated-inputs
8879 `(("python-get-version" ,python-get-version)
8880 ("python-pytest" ,python-pytest)
8881 ("python-pytest-black" ,python-pytest-black)
8882 ("python-pytest-cov" ,python-pytest-cov)
8883 ("python-setuptools" ,python-setuptools)))
8884 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
8885 (synopsis "Legacy API wrapper")
8886 (description "This module defines a decorator to wrap legacy APIs. The
8887 primary use case is APIs defined before keyword-only parameters existed.")
8888 (license license:gpl3+)))
8889
8890 (define-public python-pyasn1
8891 (package
8892 (name "python-pyasn1")
8893 (version "0.4.8")
8894 (source
8895 (origin
8896 (method url-fetch)
8897 (uri (pypi-uri "pyasn1" version))
8898 (sha256
8899 (base32
8900 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
8901 (build-system python-build-system)
8902 (home-page "http://pyasn1.sourceforge.net/")
8903 (synopsis "ASN.1 types and codecs")
8904 (description
8905 "This is an implementation of ASN.1 types and codecs in Python. It is
8906 suitable for a wide range of protocols based on the ASN.1 specification.")
8907 (license license:bsd-2)))
8908
8909 (define-public python2-pyasn1
8910 (package-with-python2 python-pyasn1))
8911
8912 (define-public python-pyasn1-modules
8913 (package
8914 (name "python-pyasn1-modules")
8915 (version "0.2.2")
8916 (source
8917 (origin
8918 (method url-fetch)
8919 (uri (pypi-uri "pyasn1-modules" version))
8920 (sha256
8921 (base32
8922 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
8923 (build-system python-build-system)
8924 (propagated-inputs
8925 `(("python-pyasn1" ,python-pyasn1)))
8926 (home-page "https://sourceforge.net/projects/pyasn1/")
8927 (synopsis "ASN.1 codec implementations")
8928 (description
8929 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
8930 implementations of ASN.1-based codecs and protocols.")
8931 (license license:bsd-3)))
8932
8933 (define-public python2-pyasn1-modules
8934 (package-with-python2 python-pyasn1-modules))
8935
8936 (define-public python-ipaddress
8937 (package
8938 (name "python-ipaddress")
8939 (version "1.0.22")
8940 (source (origin
8941 (method url-fetch)
8942 (uri (pypi-uri "ipaddress" version))
8943 (sha256
8944 (base32
8945 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
8946 (build-system python-build-system)
8947 (home-page "https://github.com/phihag/ipaddress")
8948 (synopsis "IP address manipulation library")
8949 (description
8950 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
8951 in Python. This library is used to create, poke at, and manipulate IPv4 and
8952 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
8953 module to older versions of Python.")
8954 (license license:psfl)))
8955
8956 (define-public python2-ipaddress
8957 (package-with-python2 python-ipaddress))
8958
8959 (define-public python2-ipaddr
8960 (package
8961 (name "python2-ipaddr")
8962 (version "2.1.11")
8963 (source
8964 (origin
8965 (method url-fetch)
8966 (uri (pypi-uri "ipaddr" version))
8967 (sha256
8968 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
8969 (build-system python-build-system)
8970 (arguments
8971 `(#:python ,python-2 ;version 2 only
8972 #:phases
8973 (modify-phases %standard-phases
8974 (replace 'check
8975 (lambda _ (invoke "python" "ipaddr_test.py"))))))
8976 (home-page "https://github.com/google/ipaddr-py")
8977 (synopsis "IP address manipulation library")
8978 (description
8979 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
8980 IPv6 addresses and networks.
8981
8982 For new implementations you may prefer to use the standard module
8983 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
8984 versions of Python.")
8985 (license license:asl2.0)))
8986
8987 (define-public python-idna
8988 (package
8989 (name "python-idna")
8990 (version "2.9")
8991 (source
8992 (origin
8993 (method url-fetch)
8994 (uri (pypi-uri "idna" version))
8995 (sha256
8996 (base32
8997 "1jxp2pdi8y4asi7ka1zhx3yx09kv8kzj533f0ds7viz49b0x323m"))))
8998 (build-system python-build-system)
8999 (home-page "https://github.com/kjd/idna")
9000 (synopsis "Internationalized domain names in applications")
9001 (description
9002 "This is a library to support the Internationalised Domain Names in
9003 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9004 protocol is often referred to as “IDNA2008” and can produce different results
9005 from the earlier standard from 2003. The library is also intended to act as a
9006 suitable drop-in replacement for the “encodings.idna” module that comes with
9007 the Python standard library but currently only supports the older 2003
9008 specification.")
9009 (license license:bsd-4)))
9010
9011 (define-public python-idna-2.7
9012 (package (inherit python-idna)
9013 (version "2.7")
9014 (source (origin
9015 (method url-fetch)
9016 (uri (pypi-uri "idna" version))
9017 (sha256
9018 (base32
9019 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9020
9021
9022 (define-public python2-idna
9023 (package-with-python2 python-idna))
9024
9025 (define-public python-libsass
9026 (package
9027 (name "python-libsass")
9028 (version "0.20.0")
9029 (source
9030 (origin
9031 ;; PyPI tarball is missing some test files.
9032 (method git-fetch)
9033 (uri (git-reference
9034 (url "https://github.com/sass/libsass-python")
9035 (commit version)))
9036 (file-name (git-file-name name version))
9037 (sha256
9038 (base32 "0h9rj4k9izkfdvli8ip72bbvh6a7bvrv5pxz6zay2bq235gpfgfc"))))
9039 (build-system python-build-system)
9040 (arguments
9041 `(#:phases
9042 (modify-phases %standard-phases
9043 ;; Use Guix package of libsass instead of compiling from a checkout.
9044 (add-before 'build 'set-libsass
9045 (lambda _
9046 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9047 #t))
9048 (replace 'check
9049 (lambda* (#:key inputs outputs #:allow-other-keys)
9050 (add-installed-pythonpath inputs outputs)
9051 (invoke "pytest" "sasstests.py" "-k"
9052 ;; See https://github.com/sass/libsass/issues/3092.
9053 ;; This test may work in a future release of libsass.
9054 "not test_stack_trace_formatting"))))))
9055 (native-inputs
9056 `(("python-pytest" ,python-pytest)
9057 ("python-werkzeug" ,python-werkzeug)))
9058 (inputs
9059 `(("libsass" ,libsass)))
9060 (propagated-inputs
9061 `(("python-six" ,python-six)))
9062 (home-page "https://sass.github.io/libsass-python/")
9063 (synopsis "Straightforward binding of libsass for Python")
9064 (description
9065 "This package provides a simple Python extension module @code{sass} which
9066 is binding LibSass.")
9067 (license license:expat)))
9068
9069 (define-public python-idna-ssl
9070 (package
9071 (name "python-idna-ssl")
9072 (version "1.0.1")
9073 (source
9074 (origin
9075 (method url-fetch)
9076 (uri (pypi-uri "idna-ssl" version))
9077 (sha256
9078 (base32
9079 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9080 (build-system python-build-system)
9081 (arguments
9082 `(#:tests? #f)) ;circular dependency with python-aiohttp
9083 (home-page "https://github.com/aio-libs/idna-ssl")
9084 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9085 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9086 domains support.")
9087 (license license:expat)))
9088
9089 (define-public python-pretend
9090 (package
9091 (name "python-pretend")
9092 (version "1.0.9")
9093 (source
9094 (origin
9095 (method url-fetch)
9096 (uri (pypi-uri "pretend" version))
9097 (sha256
9098 (base32
9099 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9100 (build-system python-build-system)
9101 (home-page "https://github.com/alex/pretend")
9102 (synopsis "Library for stubbing in Python")
9103 (description
9104 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9105 technique for writing tests. You may hear the term mixed up with mocks,
9106 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9107 responses, rather than doing any computation.")
9108 (license license:bsd-3)))
9109
9110 (define-public python2-pretend
9111 (package-with-python2 python-pretend))
9112
9113 (define-public python-pip
9114 (package
9115 (name "python-pip")
9116 (version "20.0.2")
9117 (source
9118 (origin
9119 (method url-fetch)
9120 (uri (pypi-uri "pip" version))
9121 (sha256
9122 (base32
9123 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9124 (build-system python-build-system)
9125 (arguments
9126 '(#:tests? #f)) ; there are no tests in the pypi archive.
9127 (home-page "https://pip.pypa.io/")
9128 (synopsis "Package manager for Python software")
9129 (description
9130 "Pip is a package manager for Python software, that finds packages on the
9131 Python Package Index (PyPI).")
9132 (license license:expat)))
9133
9134 (define-public python2-pip
9135 (package-with-python2 python-pip))
9136
9137 (define-public python-tlsh
9138 (package
9139 (name "python-tlsh")
9140 (version "3.4.5")
9141 (home-page "https://github.com/trendmicro/tlsh")
9142 (source
9143 (origin
9144 (method git-fetch)
9145 (uri (git-reference
9146 (url "https://github.com/trendmicro/tlsh")
9147 (commit (string-append "v" version))))
9148 (file-name (git-file-name name version))
9149 (sha256
9150 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9151 (build-system cmake-build-system)
9152 (arguments
9153 '(#:out-of-source? #f
9154 #:phases (modify-phases %standard-phases
9155 (replace
9156 'install
9157 (lambda* (#:key outputs #:allow-other-keys)
9158 ;; Build and install the Python bindings. The underlying
9159 ;; C++ library is apparently not meant to be installed.
9160 (let ((out (assoc-ref outputs "out")))
9161 (with-directory-excursion "py_ext"
9162 (and (system* "python" "setup.py" "build")
9163 (system* "python" "setup.py" "install"
9164 (string-append "--prefix=" out))))))))))
9165 (inputs `(("python" ,python-wrapper))) ;for the bindings
9166 (synopsis "Fuzzy matching library for Python")
9167 (description
9168 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9169 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9170 value which can be used for similarity comparisons. Similar objects have
9171 similar hash values, which allows for the detection of similar objects by
9172 comparing their hash values. The byte stream should have a sufficient amount
9173 of complexity; for example, a byte stream of identical bytes will not generate
9174 a hash value.")
9175 (license license:asl2.0)))
9176
9177 (define-public python2-tlsh
9178 (package
9179 (inherit python-tlsh)
9180 (name "python2-tlsh")
9181 (inputs `(("python" ,python-2)))))
9182
9183 (define-public python-termcolor
9184 (package
9185 (name "python-termcolor")
9186 (version "1.1.0")
9187 (source
9188 (origin
9189 (method url-fetch)
9190 (uri (pypi-uri "termcolor" version))
9191 (sha256
9192 (base32
9193 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9194 (build-system python-build-system)
9195 (arguments
9196 ;; There are no tests.
9197 `(#:tests? #f))
9198 (home-page "https://pypi.org/project/termcolor/")
9199 (synopsis "ANSII Color formatting for terminal output")
9200 (description
9201 "This package provides ANSII Color formatting for output in terminals.")
9202 (license license:expat)))
9203
9204 (define-public python2-termcolor
9205 (package-with-python2 python-termcolor))
9206
9207 (define-public python-terminaltables
9208 (package
9209 (name "python-terminaltables")
9210 (version "3.1.0")
9211 (source
9212 (origin
9213 (method url-fetch)
9214 (uri (pypi-uri "terminaltables" version))
9215 (sha256
9216 (base32
9217 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9218 (build-system python-build-system)
9219 (home-page "https://github.com/Robpol86/terminaltables")
9220 (synopsis
9221 "Generate simple tables in terminals from a nested list of strings")
9222 (description
9223 "This package makes it easy to draw tables in terminal/console
9224 applications from a list of lists of strings. It supports multi-line rows.")
9225 (license license:expat)))
9226
9227 (define-public python-libarchive-c
9228 (package
9229 (name "python-libarchive-c")
9230 (version "2.9")
9231 (source (origin
9232 (method url-fetch)
9233 (uri (pypi-uri "libarchive-c" version))
9234 (sha256
9235 (base32
9236 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9237 (build-system python-build-system)
9238 (arguments
9239 '(#:phases (modify-phases %standard-phases
9240 (add-before
9241 'build 'reference-libarchive
9242 (lambda* (#:key inputs #:allow-other-keys)
9243 ;; Retain the absolute file name of libarchive.so.
9244 (let ((libarchive (assoc-ref inputs "libarchive")))
9245 (substitute* "libarchive/ffi.py"
9246 (("find_library\\('archive'\\)")
9247 (string-append "'" libarchive
9248 "/lib/libarchive.so'"))))))
9249 (replace 'check
9250 (lambda _ (invoke "pytest" "-vv"))))))
9251 (native-inputs
9252 `(("python-mock" ,python-mock)
9253 ("python-pytest" ,python-pytest)))
9254 (inputs
9255 `(("libarchive" ,libarchive)))
9256 (home-page "https://github.com/Changaco/python-libarchive-c")
9257 (synopsis "Python interface to libarchive")
9258 (description
9259 "This package provides Python bindings to libarchive, a C library to
9260 access possibly compressed archives in many different formats. It uses
9261 Python's @code{ctypes} foreign function interface (FFI).")
9262 (license license:lgpl2.0+)))
9263
9264 (define-public python2-libarchive-c
9265 (package-with-python2 python-libarchive-c))
9266
9267 (define-public python-file
9268 (package
9269 (inherit file)
9270 (name "python-file")
9271 (build-system python-build-system)
9272 (arguments
9273 '(#:tests? #f ;no tests
9274 #:configure-flags '("--single-version-externally-managed" "--root=/")
9275 #:phases (modify-phases %standard-phases
9276 (add-before 'build 'change-directory
9277 (lambda _
9278 (chdir "python")
9279 #t))
9280 (add-before 'build 'set-library-file-name
9281 (lambda* (#:key inputs #:allow-other-keys)
9282 (let ((file (assoc-ref inputs "file")))
9283 (substitute* "magic.py"
9284 (("find_library\\('magic'\\)")
9285 (string-append "'" file "/lib/libmagic.so'")))
9286 #t))))))
9287 (inputs `(("file" ,file)))
9288 (native-inputs (if (%current-target-system)
9289 `(("self" ,this-package))
9290 '()))
9291 (synopsis "Python bindings to the libmagic file type guesser. Note that
9292 this module and the python-magic module both provide a \"magic.py\" file;
9293 these two modules, which are different and were developed separately, both
9294 serve the same purpose: provide Python bindings for libmagic.")))
9295
9296 (define-public python2-file
9297 (package-with-python2 python-file))
9298
9299 (define-public python-debian
9300 (package
9301 (name "python-debian")
9302 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9303 (version "0.1.36")
9304 (source
9305 (origin
9306 ;; Use git-fetch, as pypi doesn't include test suite.
9307 (method git-fetch)
9308 (uri (git-reference
9309 (url home-page)
9310 (commit version)))
9311 (file-name (git-file-name name version))
9312 (sha256
9313 (base32
9314 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9315 (build-system python-build-system)
9316 (arguments
9317 `(#:phases (modify-phases %standard-phases
9318 (add-after 'unpack 'remove-debian-specific-tests
9319 ;; python-apt, apt and dpkg are not yet available in guix,
9320 ;; and these tests heavily depend on them.
9321 (lambda _
9322 (delete-file "lib/debian/tests/test_deb822.py")
9323 (delete-file "lib/debian/tests/test_debfile.py")
9324 #t)))))
9325 (propagated-inputs
9326 `(("python-six" ,python-six)
9327 ("python-chardet" ,python-chardet)))
9328 (synopsis "Debian package related modules")
9329 (description
9330 ;; XXX: Use @enumerate instead of @itemize to work around
9331 ;; <http://bugs.gnu.org/21772>.
9332 "This package provides Python modules that abstract many formats of
9333 Debian-related files, such as:
9334
9335 @enumerate
9336 @item Debtags information;
9337 @item @file{debian/changelog} files;
9338 @item packages files, pdiffs;
9339 @item control files of single or multiple RFC822-style paragraphs---e.g.
9340 @file{debian/control}, @file{.changes}, @file{.dsc};
9341 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9342 contained files and meta-information.
9343 @end enumerate\n")
9344
9345 ;; Modules are either GPLv2+ or GPLv3+.
9346 (license license:gpl3+)))
9347
9348 (define-public python-nbformat
9349 (package
9350 (name "python-nbformat")
9351 (version "4.4.0")
9352 (source
9353 (origin
9354 (method url-fetch)
9355 (uri (pypi-uri "nbformat" version))
9356 (sha256
9357 (base32
9358 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9359 (build-system python-build-system)
9360 (arguments `(#:tests? #f)) ; no test target
9361 (propagated-inputs
9362 `(("python-ipython-genutils" ,python-ipython-genutils)
9363 ("python-jsonschema" ,python-jsonschema)
9364 ("python-jupyter-core" ,python-jupyter-core)
9365 ("python-traitlets" ,python-traitlets)))
9366 (home-page "http://jupyter.org")
9367 (synopsis "Jupyter Notebook format")
9368 (description "This package provides the reference implementation of the
9369 Jupyter Notebook format and Python APIs for working with notebooks.")
9370 (license license:bsd-3)))
9371
9372 (define-public python2-nbformat
9373 (package-with-python2 python-nbformat))
9374
9375 (define-public python-bleach
9376 (package
9377 (name "python-bleach")
9378 (version "3.1.5")
9379 (source
9380 (origin
9381 (method url-fetch)
9382 (uri (pypi-uri "bleach" version))
9383 (sha256
9384 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9385 (build-system python-build-system)
9386 (propagated-inputs
9387 `(("python-webencodings" ,python-webencodings)
9388 ("python-six" ,python-six)))
9389 (native-inputs
9390 `(("python-datrie" ,python-datrie)
9391 ("python-genshi" ,python-genshi)
9392 ("python-lxml" ,python-lxml)
9393 ("python-pytest" ,python-pytest)))
9394 (home-page "https://github.com/mozilla/bleach")
9395 (synopsis "Whitelist-based HTML-sanitizing tool")
9396 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9397 (license license:asl2.0)))
9398
9399 (define-public python2-bleach
9400 (package-with-python2 python-bleach))
9401
9402 (define-public python-entrypoints
9403 (package
9404 (name "python-entrypoints")
9405 (version "0.3")
9406 (source
9407 (origin
9408 (method url-fetch)
9409 (uri (pypi-uri "entrypoints" version))
9410 (sha256
9411 (base32
9412 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9413 (build-system python-build-system)
9414 ;; The package does not come with a setup.py file, so we have to generate
9415 ;; one ourselves.
9416 (arguments
9417 `(#:tests? #f
9418 #:phases
9419 (modify-phases %standard-phases
9420 (add-after 'unpack 'create-setup.py
9421 (lambda _
9422 (call-with-output-file "setup.py"
9423 (lambda (port)
9424 (format port "\
9425 from setuptools import setup
9426 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9427 " ,version))))))))
9428 (home-page "https://github.com/takluyver/entrypoints")
9429 (synopsis "Discover and load entry points from installed Python packages")
9430 (description "Entry points are a way for Python packages to advertise
9431 objects with some common interface. The most common examples are
9432 @code{console_scripts} entry points, which define shell commands by
9433 identifying a Python function to run. The @code{entrypoints} module contains
9434 functions to find and load entry points.")
9435 (license license:expat)))
9436
9437 (define-public python2-entrypoints
9438 (package-with-python2 python-entrypoints))
9439
9440 (define-public python-epc
9441 (package
9442 (name "python-epc")
9443 (version "0.0.5")
9444 (source
9445 (origin
9446 (method url-fetch)
9447 (uri (pypi-uri "epc" version))
9448 (sha256
9449 (base32
9450 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9451 (build-system python-build-system)
9452 (propagated-inputs
9453 `(("python-sexpdata" ,python-sexpdata)))
9454 (native-inputs
9455 `(("python-nose" ,python-nose)))
9456 (home-page "https://github.com/tkf/python-epc")
9457 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9458 (description
9459 "Python-EPC can call elisp functions from Python and Python functions
9460 from elisp.")
9461 (license license:gpl3)))
9462
9463 (define-public python-nbconvert
9464 (package
9465 (name "python-nbconvert")
9466 (version "5.0.0b1")
9467 (source
9468 (origin
9469 (method url-fetch)
9470 (uri (pypi-uri "nbconvert" version))
9471 (sha256
9472 (base32
9473 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9474 (build-system python-build-system)
9475 (arguments
9476 `(;; The "bdist_egg" target is disabled by default, causing the installation
9477 ;; to fail.
9478 #:configure-flags (list "bdist_egg")
9479 ;; FIXME: 5 failures, 40 errors.
9480 #:tests? #f))
9481 ;; #:phases
9482 ;; (modify-phases %standard-phases
9483 ;; (replace 'check
9484 ;; (lambda _
9485 ;; (zero? (system* "py.test" "-v")))))
9486 (native-inputs
9487 `(("python-pytest" ,python-pytest)))
9488 (propagated-inputs
9489 `(("python-bleach" ,python-bleach)
9490 ("python-entrypoints" ,python-entrypoints)
9491 ("python-jinja2" ,python-jinja2)
9492 ("python-jupyter-core" ,python-jupyter-core)
9493 ("python-mistune" ,python-mistune)
9494 ("python-nbformat" ,python-nbformat)
9495 ("python-pygments" ,python-pygments)
9496 ("python-traitlets" ,python-traitlets)))
9497 (home-page "http://jupyter.org")
9498 (synopsis "Converting Jupyter Notebooks")
9499 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9500 notebooks to various other formats via Jinja templates. It allows you to
9501 convert an @code{.ipynb} notebook file into various static formats including:
9502
9503 @enumerate
9504 @item HTML
9505 @item LaTeX
9506 @item PDF
9507 @item Reveal JS
9508 @item Markdown (md)
9509 @item ReStructured Text (rst)
9510 @item executable script
9511 @end enumerate\n")
9512 (license license:bsd-3)))
9513
9514 (define-public python2-nbconvert
9515 (package-with-python2 python-nbconvert))
9516
9517 (define-public python-notebook
9518 (package
9519 (name "python-notebook")
9520 (version "5.7.4")
9521 (source (origin
9522 (method url-fetch)
9523 (uri (pypi-uri "notebook" version))
9524 (sha256
9525 (base32
9526 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9527 (build-system python-build-system)
9528 (arguments
9529 `(#:phases
9530 (modify-phases %standard-phases
9531 (replace 'check
9532 (lambda _
9533 ;; These tests require a browser
9534 (delete-file-recursively "notebook/tests/selenium")
9535 ;; Some tests need HOME
9536 (setenv "HOME" "/tmp")
9537 ;; This file contains "warningfilters", which are not supported
9538 ;; by this version of nose.
9539 (delete-file "setup.cfg")
9540 (with-directory-excursion "/tmp"
9541 (invoke "nosetests" "-v"))
9542 #t)))))
9543 (propagated-inputs
9544 `(("python-jupyter-core" ,python-jupyter-core)
9545 ("python-nbformat" ,python-nbformat)
9546 ("python-nbconvert" ,python-nbconvert)
9547 ("python-prometheus-client" ,python-prometheus-client)
9548 ("python-send2trash" ,python-send2trash)
9549 ("python-terminado" ,python-terminado)))
9550 (native-inputs
9551 `(("python-nose" ,python-nose)
9552 ("python-sphinx" ,python-sphinx)
9553 ("python-requests" ,python-requests)))
9554 (home-page "http://jupyter.org/")
9555 (synopsis "Web-based notebook environment for interactive computing")
9556 (description
9557 "The Jupyter HTML notebook is a web-based notebook environment for
9558 interactive computing.")
9559 (properties `((python2-variant . ,(delay python2-notebook))))
9560 (license license:bsd-3)))
9561
9562 (define-public python2-notebook
9563 (let ((base (package-with-python2
9564 (strip-python2-variant python-notebook))))
9565 (package (inherit base)
9566 (native-inputs
9567 `(("python2-mock" ,python2-mock)
9568 ,@(package-native-inputs base)))
9569 (arguments
9570 (substitute-keyword-arguments (package-arguments base)
9571 ((#:phases phases)
9572 `(modify-phases ,phases
9573 (add-before 'check 'disable-test-case
9574 ;; The test requires network access to localhost. Curiously it
9575 ;; fails with Python 2 only. Simply make the test-case return
9576 ;; immediately.
9577 (lambda _
9578 (substitute*
9579 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9580 (("formats = self.nbconvert_api") "return #")))))))))))
9581
9582 (define-public python-widgetsnbextension
9583 (package
9584 (name "python-widgetsnbextension")
9585 (version "3.5.1")
9586 (source
9587 (origin
9588 (method url-fetch)
9589 (uri (pypi-uri "widgetsnbextension" version))
9590 (sha256
9591 (base32
9592 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9593 (build-system python-build-system)
9594 (propagated-inputs
9595 `(("python-ipykernel" ,python-ipykernel)
9596 ("python-notebook" ,python-notebook)))
9597 (native-inputs
9598 `(("python-certifi" ,python-certifi)
9599 ("python-nose" ,python-nose)))
9600 (home-page "https://ipython.org")
9601 (synopsis "IPython HTML widgets for Jupyter")
9602 (description "This package provides interactive HTML widgets for Jupyter
9603 notebooks.")
9604 (license license:bsd-3)))
9605
9606 (define-public python2-widgetsnbextension
9607 (package-with-python2 python-widgetsnbextension))
9608
9609 (define-public python-ipywidgets
9610 (package
9611 (name "python-ipywidgets")
9612 (version "7.5.1")
9613 (source
9614 (origin
9615 (method url-fetch)
9616 (uri (pypi-uri "ipywidgets" version))
9617 (sha256
9618 (base32
9619 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
9620 (build-system python-build-system)
9621 (propagated-inputs
9622 `(("python-ipython" ,python-ipython)
9623 ("python-traitlets" ,python-traitlets)
9624 ("python-widgetsnbextension" ,python-widgetsnbextension)))
9625 (native-inputs
9626 `(("python-nose" ,python-nose)
9627 ("python-pytest" ,python-pytest)))
9628 (home-page "https://ipython.org")
9629 (synopsis "IPython HTML widgets for Jupyter")
9630 (description "Ipywidgets are interactive HTML widgets for Jupyter
9631 notebooks and the IPython kernel. Notebooks come alive when interactive
9632 widgets are used. Users gain control of their data and can visualize changes
9633 in the data.")
9634 (license license:bsd-3)))
9635
9636 (define-public python2-ipywidgets
9637 (package-with-python2 python-ipywidgets))
9638
9639 (define-public python-jupyter-console
9640 (package
9641 (name "python-jupyter-console")
9642 (version "6.1.0")
9643 (source
9644 (origin
9645 (method url-fetch)
9646 (uri (pypi-uri "jupyter_console" version))
9647 (sha256
9648 (base32
9649 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
9650 (build-system python-build-system)
9651 (propagated-inputs
9652 `(("python-ipykernel" ,python-ipykernel)
9653 ("python-jupyter-client" ,python-jupyter-client)
9654 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
9655 ("python-pygments" ,python-pygments)))
9656 (native-inputs
9657 `(("python-nose" ,python-nose)))
9658 (home-page "https://jupyter.org")
9659 (synopsis "Jupyter terminal console")
9660 (description "This package provides a terminal-based console frontend for
9661 Jupyter kernels. It also allows for console-based interaction with non-Python
9662 Jupyter kernels such as IJulia and IRKernel.")
9663 (properties `((python2-variant . ,(delay python2-jupyter-console))))
9664 (license license:bsd-3)))
9665
9666 (define-public python2-jupyter-console
9667 (package
9668 (name "python2-jupyter-console")
9669 (version "5.2.0")
9670 (source
9671 (origin
9672 (method url-fetch)
9673 (uri (pypi-uri "jupyter_console" version))
9674 (sha256
9675 (base32
9676 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
9677 (build-system python-build-system)
9678 (arguments
9679 `(#:python ,python-2
9680 #:tests? #f)) ; Tests only run in a TTY.
9681 (propagated-inputs
9682 `(("python2-ipykernel" ,python2-ipykernel)
9683 ("python2-jupyter-client" ,python2-jupyter-client)
9684 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
9685 ("python2-pygments" ,python2-pygments)))
9686 (native-inputs
9687 `(("python2-nose" ,python2-nose)))
9688 (home-page "https://jupyter.org")
9689 (synopsis "Jupyter terminal console")
9690 (description "This package provides a terminal-based console frontend for
9691 Jupyter kernels. It also allows for console-based interaction with non-Python
9692 Jupyter kernels such as IJulia and IRKernel.")
9693 (license license:bsd-3)))
9694
9695 ;; The python-ipython and python-jupyter-console require each other. To get
9696 ;; the functionality in both packages working, strip down the
9697 ;; python-jupyter-console package when using it as an input to python-ipython.
9698 (define python-jupyter-console-minimal
9699 (package
9700 (inherit python-jupyter-console)
9701 (name "python-jupyter-console-minimal")
9702 (arguments
9703 (substitute-keyword-arguments
9704 (package-arguments python-jupyter-console)
9705 ((#:phases phases)
9706 `(modify-phases ,phases
9707 (add-after 'install 'delete-bin
9708 (lambda* (#:key outputs #:allow-other-keys)
9709 ;; Delete the bin files, to avoid conflicts in profiles
9710 ;; where python-ipython and python-jupyter-console are
9711 ;; both present.
9712 (delete-file-recursively
9713 (string-append
9714 (assoc-ref outputs "out") "/bin"))))))))
9715 ;; Remove the python-ipython propagated input, to avoid the cycle
9716 (propagated-inputs
9717 (alist-delete
9718 "python-ipython"
9719 (package-propagated-inputs python-jupyter-console)))))
9720
9721 (define-public python-qtconsole
9722 (package
9723 (name "python-qtconsole")
9724 (version "4.4.3")
9725 (source
9726 (origin
9727 (method url-fetch)
9728 (uri (pypi-uri "qtconsole" version))
9729 (sha256
9730 (base32
9731 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
9732 (build-system python-build-system)
9733 (arguments
9734 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
9735 ;; but we only have the LTS version 5.x. This means that there might be
9736 ;; runtime errors, but since this is a dependency of the Jupyter package,
9737 ;; and Jupyter can be used without the qtconsole we can overlook this for
9738 ;; now.
9739 `(#:tests? #f
9740 #:phases
9741 (modify-phases %standard-phases
9742 (add-before 'check 'pre-check
9743 (lambda _
9744 (setenv "QT_QPA_PLATFORM" "offscreen")
9745 #t)))))
9746 (propagated-inputs
9747 `(("python-ipykernel" ,python-ipykernel)
9748 ("python-ipython" ,python-ipython)))
9749 (native-inputs
9750 `(("python-pytest" ,python-pytest)))
9751 (home-page "http://jupyter.org")
9752 (synopsis "Jupyter Qt console")
9753 (description "This package provides a Qt-based console for Jupyter with
9754 support for rich media output.")
9755 (license license:bsd-3)))
9756
9757 (define-public python-jsbeautifier
9758 (package
9759 (name "python-jsbeautifier")
9760 (version "1.10.2")
9761 (home-page "https://github.com/beautify-web/js-beautify")
9762 (source (origin
9763 (method git-fetch)
9764 (uri (git-reference
9765 (url home-page)
9766 (commit (string-append "v" version))))
9767 (file-name (git-file-name name version))
9768 (sha256
9769 (base32
9770 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
9771 (build-system python-build-system)
9772 (arguments
9773 `(#:phases (modify-phases %standard-phases
9774 (add-after 'unpack 'chdir
9775 (lambda _
9776 ;; The upstream Git repository contains all the code,
9777 ;; but this package only builds the python code.
9778 (chdir "python")
9779 #t))
9780 (add-after 'unpack 'patch-python-six-requirements
9781 (lambda _
9782 (substitute* "python/setup.py"
9783 (("six>=1.12.0")
9784 "six>=1.11.0"))
9785 #t)))))
9786 (propagated-inputs
9787 `(("python-editorconfig" ,python-editorconfig)
9788 ("python-six" ,python-six)))
9789 (native-inputs
9790 `(("python-pytest" ,python-pytest)))
9791 (synopsis "JavaScript unobfuscator and beautifier")
9792 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
9793 popular online obfuscators.")
9794 (license license:expat)))
9795
9796 (define-public jupyter
9797 (package
9798 (name "jupyter")
9799 (version "1.0.0")
9800 (source
9801 (origin
9802 (method url-fetch)
9803 (uri (pypi-uri "jupyter" version))
9804 (sha256
9805 (base32
9806 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
9807 (build-system python-build-system)
9808 (arguments '(#:tests? #f)) ; there are none.
9809 (propagated-inputs
9810 `(("python-ipykernel" ,python-ipykernel)
9811 ("python-ipywidgets" ,python-ipywidgets)
9812 ("python-jupyter-console" ,python-jupyter-console)
9813 ("python-nbconvert" ,python-nbconvert)
9814 ("python-notebook" ,python-notebook)
9815 ("python-qtconsole" ,python-qtconsole)))
9816 (native-search-paths
9817 (list (search-path-specification
9818 (variable "JUPYTER_PATH")
9819 (files '("share/jupyter")))))
9820 (home-page "https://jupyter.org")
9821 (synopsis "Web application for interactive documents")
9822 (description
9823 "The Jupyter Notebook is a web application that allows you to create and
9824 share documents that contain live code, equations, visualizations and
9825 explanatory text. Uses include: data cleaning and transformation, numerical
9826 simulation, statistical modeling, machine learning and much more.")
9827 (license license:bsd-3)))
9828
9829 (define-public python-chardet
9830 (package
9831 (name "python-chardet")
9832 (version "3.0.4")
9833 (source
9834 (origin
9835 (method url-fetch)
9836 (uri (pypi-uri "chardet" version))
9837 (sha256
9838 (base32
9839 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
9840 (native-inputs
9841 `(("python-hypothesis" ,python-hypothesis)
9842 ("python-pytest" ,python-pytest)
9843 ("python-pytest-runner" ,python-pytest-runner)))
9844 (build-system python-build-system)
9845 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
9846 (arguments `(#:tests? #f))
9847 (home-page "https://github.com/chardet/chardet")
9848 (synopsis "Universal encoding detector for Python 2 and 3")
9849 (description
9850 "This package provides @code{chardet}, a Python module that can
9851 automatically detect a wide range of file encodings.")
9852 (license license:lgpl2.1+)))
9853
9854 (define-public python2-chardet
9855 (package-with-python2 python-chardet))
9856
9857 (define-public python-docopt
9858 (package
9859 (name "python-docopt")
9860 (version "0.6.2")
9861 (source
9862 (origin
9863 (method git-fetch)
9864 ;; The release on PyPI does not include tests.
9865 (uri (git-reference
9866 (url "https://github.com/docopt/docopt")
9867 (commit version)))
9868 (file-name (git-file-name name version))
9869 (sha256
9870 (base32
9871 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
9872 (build-system python-build-system)
9873 (native-inputs
9874 `(("python-pytest" ,python-pytest)))
9875 (arguments
9876 `(#:phases
9877 (modify-phases %standard-phases
9878 (replace 'check
9879 (lambda _ (invoke "py.test"))))))
9880 (home-page "http://docopt.org")
9881 (synopsis "Command-line interface description language for Python")
9882 (description "This library allows the user to define a command-line
9883 interface from a program's help message rather than specifying it
9884 programmatically with command-line parsers like @code{getopt} and
9885 @code{argparse}.")
9886 (license license:expat)))
9887
9888 (define-public python2-docopt
9889 (package-with-python2 python-docopt))
9890
9891 (define-public python-pythondialog
9892 (package
9893 (name "python-pythondialog")
9894 (version "3.4.0")
9895 (source
9896 (origin
9897 (method url-fetch)
9898 (uri (pypi-uri "pythondialog" version))
9899 (sha256
9900 (base32
9901 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
9902 (build-system python-build-system)
9903 (arguments
9904 `(#:phases
9905 (modify-phases %standard-phases
9906 (add-after 'unpack 'patch-path
9907 (lambda* (#:key inputs #:allow-other-keys)
9908 (let* ((dialog (assoc-ref inputs "dialog")))
9909 ;; Since this library really wants to grovel the search path, we
9910 ;; must hardcode dialog's store path into it.
9911 (substitute* "dialog.py"
9912 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
9913 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
9914 #t))))
9915 #:tests? #f)) ; no test suite
9916 (propagated-inputs
9917 `(("dialog" ,dialog)))
9918 (home-page "http://pythondialog.sourceforge.net/")
9919 (synopsis "Python interface to the UNIX dialog utility")
9920 (description "A Python wrapper for the dialog utility. Its purpose is to
9921 provide an easy to use, pythonic and comprehensive Python interface to dialog.
9922 This allows one to make simple text-mode user interfaces on Unix-like systems")
9923 (license license:lgpl2.1)
9924 (properties `((python2-variant . ,(delay python2-pythondialog))))))
9925
9926 (define-public python2-pythondialog
9927 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
9928 (package
9929 (inherit base)
9930 (version (package-version python-pythondialog))
9931 (source (origin
9932 (method url-fetch)
9933 (uri (pypi-uri "python2-pythondialog" version))
9934 (sha256
9935 (base32
9936 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
9937
9938 (define-public python-configobj
9939 (package
9940 (name "python-configobj")
9941 (version "5.0.6")
9942 (source (origin
9943 (method url-fetch)
9944 (uri (pypi-uri "configobj" version))
9945 (sha256
9946 (base32
9947 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9948 ;; Patch setup.py so it looks for python-setuptools, which is
9949 ;; required to parse the keyword 'install_requires' in setup.py.
9950 (patches (search-patches "python-configobj-setuptools.patch"))))
9951 (build-system python-build-system)
9952 (propagated-inputs
9953 `(("python-six" ,python-six)))
9954 (synopsis "Config file reading, writing and validation")
9955 (description "ConfigObj is a simple but powerful config file reader and
9956 writer: an ini file round tripper. Its main feature is that it is very easy to
9957 use, with a straightforward programmer’s interface and a simple syntax for
9958 config files.")
9959 (home-page "https://github.com/DiffSK/configobj")
9960 (license license:bsd-3)))
9961
9962 (define-public python2-configobj
9963 (package-with-python2 python-configobj))
9964
9965 (define-public python-configargparse
9966 (package
9967 (name "python-configargparse")
9968 (version "0.14.0")
9969 (source (origin
9970 (method url-fetch)
9971 (uri (pypi-uri "ConfigArgParse" version))
9972 (sha256
9973 (base32
9974 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
9975 (build-system python-build-system)
9976 (native-inputs
9977 `(("python-pyyaml" ,python-pyyaml)))
9978 (arguments
9979 `(#:phases
9980 (modify-phases %standard-phases
9981 (replace 'check
9982 (lambda _
9983 ;; Bypass setuptools-shim because one test relies on "setup.py"
9984 ;; being the first argument passed to the python call.
9985 ;;
9986 ;; NOTE: Many tests do not run because they rely on Python's
9987 ;; built-in test.test_argparse, but we remove the unit tests from
9988 ;; our Python installation.
9989 (invoke "python" "setup.py" "test"))))))
9990 (synopsis "Replacement for argparse")
9991 (description "A drop-in replacement for argparse that allows options to also
9992 be set via config files and/or environment variables.")
9993 (home-page "https://github.com/bw2/ConfigArgParse")
9994 (license license:expat)))
9995
9996 (define-public python2-configargparse
9997 (package-with-python2 python-configargparse))
9998
9999 (define-public python-argparse-manpage
10000 (package
10001 (name "python-argparse-manpage")
10002 (version "1.1")
10003 (source
10004 (origin
10005 (method url-fetch)
10006 (uri (pypi-uri "argparse-manpage" version))
10007 (sha256
10008 (base32
10009 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10010 (build-system python-build-system)
10011 (home-page "https://github.com/praiskup/argparse-manpage")
10012 (synopsis "Build manual page from Python's ArgumentParser object")
10013 (description
10014 "This package provides tools to build manual pages from Python's
10015 @code{ArgumentParser} object.")
10016 (license license:asl2.0)))
10017
10018 (define-public python-contextlib2
10019 (package
10020 (name "python-contextlib2")
10021 (version "0.6.0.post1")
10022 (source
10023 (origin
10024 (method url-fetch)
10025 (uri (pypi-uri "contextlib2" version))
10026 (sha256
10027 (base32
10028 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10029 (build-system python-build-system)
10030 (home-page "https://contextlib2.readthedocs.org/")
10031 (synopsis "Tools for decorators and context managers")
10032 (description "This module is primarily a backport of the Python
10033 3.2 contextlib to earlier Python versions. Like contextlib, it
10034 provides utilities for common tasks involving decorators and context
10035 managers. It also contains additional features that are not part of
10036 the standard library.")
10037 (properties `((python2-variant . ,(delay python2-contextlib2))))
10038 (license license:psfl)))
10039
10040 (define-public python2-contextlib2
10041 (let ((base (package-with-python2
10042 (strip-python2-variant python-contextlib2))))
10043 (package
10044 (inherit base)
10045 (arguments
10046 (substitute-keyword-arguments (package-arguments base)
10047 ((#:phases phases)
10048 `(modify-phases ,phases
10049 (replace 'check
10050 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10051 (native-inputs
10052 `(("python2-unittest2" ,python2-unittest2))))))
10053
10054 ;; This package is used by python2-pytest via python2-importlib-metadata,
10055 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10056 (define-public python2-contextlib2-bootstrap
10057 (hidden-package
10058 (package/inherit
10059 python2-contextlib2
10060 (name "python2-contextlib2-bootstrap")
10061 (arguments
10062 `(#:tests? #f
10063 ,@(package-arguments python2-contextlib2)))
10064 (native-inputs '()))))
10065
10066 (define-public python-texttable
10067 (package
10068 (name "python-texttable")
10069 (version "1.6.2")
10070 (source
10071 (origin
10072 (method url-fetch)
10073 (uri (pypi-uri "texttable" version))
10074 (sha256
10075 (base32
10076 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10077 (build-system python-build-system)
10078 (arguments
10079 `(#:phases
10080 (modify-phases %standard-phases
10081 (replace 'check
10082 (lambda _ (invoke "pytest" "tests.py"))))))
10083 (native-inputs
10084 `(("python-pytest" ,python-pytest)))
10085 (home-page "https://github.com/foutaise/texttable/")
10086 (synopsis "Python module for creating simple ASCII tables")
10087 (description "Texttable is a Python module for creating simple ASCII
10088 tables.")
10089 (license license:expat)))
10090
10091 (define-public python2-texttable
10092 (package-with-python2 python-texttable))
10093
10094 (define-public python-atomicwrites
10095 (package
10096 (name "python-atomicwrites")
10097 (version "1.3.0")
10098 (source (origin
10099 (method url-fetch)
10100 (uri (pypi-uri "atomicwrites" version))
10101 (sha256
10102 (base32
10103 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10104 (build-system python-build-system)
10105 (synopsis "Atomic file writes in Python")
10106 (description "Library for atomic file writes using platform dependent tools
10107 for atomic file system operations.")
10108 (home-page "https://github.com/untitaker/python-atomicwrites")
10109 (license license:expat)))
10110
10111 (define-public python2-atomicwrites
10112 (package-with-python2 python-atomicwrites))
10113
10114 (define-public python-click-threading
10115 (package
10116 (name "python-click-threading")
10117 (version "0.4.4")
10118 (source (origin
10119 (method url-fetch)
10120 (uri (pypi-uri "click-threading" version))
10121 (sha256
10122 (base32
10123 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10124 (build-system python-build-system)
10125 (propagated-inputs
10126 `(("python-click" ,python-click)))
10127 (synopsis "Utilities for multithreading in Click")
10128 (description "This package provides utilities for multithreading in Click
10129 applications.")
10130 (home-page "https://github.com/click-contrib/click-threading")
10131 (license license:expat)))
10132
10133 (define-public python-click-log
10134 (package
10135 (name "python-click-log")
10136 (version "0.3.2")
10137 (source (origin
10138 (method url-fetch)
10139 (uri (pypi-uri "click-log" version))
10140 (sha256
10141 (base32
10142 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10143 (build-system python-build-system)
10144 (propagated-inputs
10145 `(("python-click" ,python-click)))
10146 (synopsis "Logging for click applications")
10147 (description "This package provides a Python library for logging Click
10148 applications.")
10149 (home-page "https://github.com/click-contrib/click-log")
10150 (license license:expat)))
10151
10152 (define-public python-apipkg
10153 (package
10154 (name "python-apipkg")
10155 (version "1.5")
10156 (source (origin
10157 (method url-fetch)
10158 (uri (pypi-uri "apipkg" version))
10159 (sha256
10160 (base32
10161 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10162 (build-system python-build-system)
10163 (native-inputs
10164 `(("python-pytest" ,python-pytest)
10165 ("python-setuptools-scm" ,python-setuptools-scm)))
10166 (synopsis "Namespace control and lazy-import mechanism")
10167 (description "With apipkg you can control the exported namespace of a Python
10168 package and greatly reduce the number of imports for your users. It is a small
10169 pure Python module that works on virtually all Python versions.")
10170 (home-page "https://github.com/pytest-dev/apipkg")
10171 (license license:expat)))
10172
10173 (define-public python-execnet
10174 (package
10175 (name "python-execnet")
10176 (version "1.4.1")
10177 (source (origin
10178 (method url-fetch)
10179 (uri (pypi-uri "execnet" version))
10180 (sha256
10181 (base32
10182 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10183 (build-system python-build-system)
10184 (arguments
10185 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10186 ;; The two test failures are caused by the lack of an `ssh` executable.
10187 ;; The test suite can be run with pytest after the 'install' phase.
10188 #:tests? #f))
10189 (native-inputs
10190 `(("python-pytest" ,python-pytest)
10191 ("python-setuptools-scm" ,python-setuptools-scm)))
10192 (propagated-inputs
10193 `(("python-apipkg" ,python-apipkg)))
10194 (synopsis "Rapid multi-Python deployment")
10195 (description "Execnet provides a share-nothing model with
10196 channel-send/receive communication for distributing execution across many
10197 Python interpreters across version, platform and network barriers. It has a
10198 minimal and fast API targeting the following uses:
10199 @enumerate
10200 @item distribute tasks to (many) local or remote CPUs
10201 @item write and deploy hybrid multi-process applications
10202 @item write scripts to administer multiple environments
10203 @end enumerate")
10204 (home-page "https://codespeak.net/execnet/")
10205 (license license:expat)))
10206
10207 (define-public python2-execnet
10208 (package-with-python2 python-execnet))
10209
10210 (define-public python-icalendar
10211 (package
10212 (name "python-icalendar")
10213 (version "4.0.5")
10214 (source (origin
10215 (method url-fetch)
10216 (uri (pypi-uri "icalendar" version))
10217 (sha256
10218 (base32
10219 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10220 (build-system python-build-system)
10221 (propagated-inputs
10222 `(("python-dateutil" ,python-dateutil)
10223 ("python-pytz" ,python-pytz)))
10224 (synopsis "Python library for parsing iCalendar files")
10225 (description "The icalendar package is a parser/generator of iCalendar
10226 files for use with Python.")
10227 (home-page "https://github.com/collective/icalendar")
10228 (license license:bsd-2)))
10229
10230 (define-public python-args
10231 (package
10232 (name "python-args")
10233 (version "0.1.0")
10234 (source (origin
10235 (method url-fetch)
10236 (uri (pypi-uri "args" version))
10237 (sha256
10238 (base32
10239 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10240 (build-system python-build-system)
10241 (home-page "https://github.com/kennethreitz/args")
10242 (synopsis "Command-line argument parser")
10243 (description
10244 "This library provides a Python module to parse command-line arguments.")
10245 (license license:bsd-3)))
10246
10247 (define-public python2-args
10248 (package-with-python2 python-args))
10249
10250 (define-public python-clint
10251 (package
10252 (name "python-clint")
10253 (version "0.5.1")
10254 (source (origin
10255 (method url-fetch)
10256 (uri (pypi-uri "clint" version))
10257 (sha256
10258 (base32
10259 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10260 (build-system python-build-system)
10261 (arguments
10262 '(#:phases
10263 (modify-phases %standard-phases
10264 (replace 'check
10265 (lambda _ (invoke "py.test" "-v"))))))
10266 (native-inputs
10267 `(("python-pytest" ,python-pytest)))
10268 (propagated-inputs
10269 `(("python-args" ,python-args)))
10270 (home-page "https://github.com/kennethreitz/clint")
10271 (synopsis "Command-line interface tools")
10272 (description
10273 "Clint is a Python module filled with a set of tools for developing
10274 command-line applications, including tools for colored and indented
10275 output, progress bar display, and pipes.")
10276 (license license:isc)))
10277
10278 (define-public python2-clint
10279 (package-with-python2 python-clint))
10280
10281 (define-public python-rply
10282 (package
10283 (name "python-rply")
10284 (version "0.7.5")
10285 (source (origin
10286 (method url-fetch)
10287 (uri (pypi-uri "rply" version))
10288 (sha256
10289 (base32
10290 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10291 (build-system python-build-system)
10292 (propagated-inputs
10293 `(("python-appdirs" ,python-appdirs)))
10294 (home-page "https://github.com/alex/rply")
10295 (synopsis "Parser generator for Python")
10296 (description
10297 "This package provides a pure Python based parser generator, that also
10298 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10299 with a new public API, and RPython support.")
10300 (license license:bsd-3)))
10301
10302 (define-public python2-rply
10303 (package-with-python2 python-rply))
10304
10305 (define-public python-hy
10306 (package
10307 (name "python-hy")
10308 (version "0.18.0")
10309 (source (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "hy" version))
10312 (sha256
10313 (base32
10314 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10315 (build-system python-build-system)
10316 (arguments
10317 '(#:phases
10318 (modify-phases %standard-phases
10319 (add-before 'install 'set-HOME
10320 (lambda _
10321 (setenv "HOME" "/tmp") #t))
10322 (replace 'check
10323 (lambda _
10324 ;; Tests require write access to HOME.
10325 (setenv "HOME" "/tmp")
10326 (invoke "nosetests"))))))
10327 (native-inputs
10328 `(("python-coverage" ,python-coverage)
10329 ("python-nose" ,python-nose)))
10330 (propagated-inputs
10331 `(("python-astor" ,python-astor)
10332 ("python-colorama" ,python-colorama)
10333 ("python-rply" ,python-rply)
10334 ("python-funcparserlib"
10335 ,python-funcparserlib)))
10336 (home-page "http://hylang.org/")
10337 (synopsis "Lisp frontend to Python")
10338 (description
10339 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10340 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10341 Python at your fingertips, in Lisp form.")
10342 (license license:expat)))
10343
10344 (define-public python2-functools32
10345 (package
10346 (name "python2-functools32")
10347 (version "3.2.3-2")
10348 (source
10349 (origin
10350 (method url-fetch)
10351 (uri (pypi-uri "functools32" version))
10352 (sha256
10353 (base32
10354 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10355 (build-system python-build-system)
10356 (arguments
10357 `(#:python ,python-2
10358 #:tests? #f)) ; no test target
10359 (home-page "https://github.com/MiCHiLU/python-functools32")
10360 (synopsis
10361 "Backport of the functools module from Python 3.2.3")
10362 (description
10363 "This package is a backport of the @code{functools} module from Python
10364 3.2.3 for use with older versions of Python and PyPy.")
10365 (license license:expat)))
10366
10367 (define-public python2-subprocess32
10368 (package
10369 (name "python2-subprocess32")
10370 (version "3.2.7")
10371 (source (origin
10372 (method url-fetch)
10373 (uri (pypi-uri "subprocess32" version))
10374 (sha256
10375 (base32
10376 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10377 (patches
10378 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10379 (build-system python-build-system)
10380 (arguments
10381 `(#:python ,python-2
10382 ;; The test suite fails with Python > 2.7.13:
10383 ;; import test.support
10384 ;; ImportError: No module named support
10385 #:tests? #f
10386 #:phases
10387 (modify-phases %standard-phases
10388 (add-after 'unpack 'patch-/bin/sh
10389 (lambda _
10390 (substitute* '("subprocess32.py"
10391 "test_subprocess32.py")
10392 (("/bin/sh") (which "sh")))
10393 #t)))))
10394 (home-page "https://github.com/google/python-subprocess32")
10395 (synopsis "Backport of the subprocess module from Python 3.2")
10396 (description
10397 "This is a backport of the @code{subprocess} standard library module
10398 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10399 new features. On POSIX systems it is guaranteed to be reliable when used
10400 in threaded applications. It includes timeout support from Python 3.3 but
10401 otherwise matches 3.2’s API.")
10402 (license license:psfl)))
10403
10404 (define-public python2-futures
10405 (package
10406 (name "python2-futures")
10407 (version "3.2.0")
10408 (source
10409 (origin
10410 (method url-fetch)
10411 (uri (pypi-uri "futures" version))
10412 (sha256
10413 (base32
10414 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10415 (build-system python-build-system)
10416 (arguments
10417 `(#:python ,python-2
10418 #:phases
10419 (modify-phases %standard-phases
10420 (replace 'check
10421 (lambda _
10422 (invoke "python" "test_futures.py")
10423 #t)))))
10424 (home-page "https://github.com/agronholm/pythonfutures")
10425 (synopsis
10426 "Backport of the concurrent.futures package from Python 3.2")
10427 (description
10428 "The concurrent.futures module provides a high-level interface for
10429 asynchronously executing callables. This package backports the
10430 concurrent.futures package from Python 3.2")
10431 (license license:bsd-3)))
10432
10433 (define-public python-promise
10434 (package
10435 (name "python-promise")
10436 (version "0.4.2")
10437 (source
10438 (origin
10439 (method url-fetch)
10440 (uri (pypi-uri "promise" version))
10441 (sha256
10442 (base32
10443 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10444 (build-system python-build-system)
10445 ;; Tests wants python-futures, which is a python2 only program, and
10446 ;; can't be found by python-promise at test time.
10447 (arguments `(#:tests? #f))
10448 (home-page "https://github.com/syrusakbary/promise")
10449 (synopsis "Promises/A+ implementation for Python")
10450 (description
10451 "Promises/A+ implementation for Python")
10452 (properties `((python2-variant . ,(delay python2-promise))))
10453 (license license:expat)))
10454
10455 (define-public python2-promise
10456 (let ((promise (package-with-python2
10457 (strip-python2-variant python-promise))))
10458 (package (inherit promise)
10459 (arguments (substitute-keyword-arguments (package-arguments promise)
10460 ((#:tests? _) #t)))
10461 (native-inputs
10462 `(("python2-futures" ,python2-futures)
10463 ("python2-pytest" ,python2-pytest)
10464 ,@(package-native-inputs promise))))))
10465
10466 (define-public python-progressbar2
10467 (package
10468 (name "python-progressbar2")
10469 (version "3.51.3")
10470 (source
10471 (origin
10472 (method url-fetch)
10473 (uri (pypi-uri "progressbar2" version))
10474 (sha256
10475 (base32
10476 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10477 (build-system python-build-system)
10478 (propagated-inputs
10479 `(("python-six" ,python-six)
10480 ("python-utils" ,python-utils)))
10481 (native-inputs
10482 `(("python-flake8" ,python-flake8)
10483 ("python-freezegun" ,python-freezegun)
10484 ("python-pycodestyle" ,python-pycodestyle)
10485 ("python-pytest" ,python-pytest)
10486 ("python-pytest-cache" ,python-pytest-cache)
10487 ("python-pytest-cov" ,python-pytest-cov)
10488 ("python-pytest-flakes" ,python-pytest-flakes)
10489 ("python-pytest-pep8" ,python-pytest-pep8)
10490 ("python-sphinx" ,python-sphinx)))
10491 (home-page "https://github.com/WoLpH/python-progressbar")
10492 (synopsis "Text progress bar library for Python")
10493 (description
10494 "This package provides a Python progressbar library to provide
10495 visual (yet text based) progress to long running operations.")
10496 (license license:bsd-3)))
10497
10498 (define-public python-progressbar33
10499 (package
10500 (name "python-progressbar33")
10501 (version "2.4")
10502 (source
10503 (origin
10504 (method url-fetch)
10505 (uri (pypi-uri "progressbar33" version))
10506 (sha256
10507 (base32
10508 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10509 (build-system python-build-system)
10510 (home-page "https://github.com/germangh/python-progressbar")
10511 (synopsis "Text progress bar library for Python")
10512 (description
10513 "This package provides a text progress bar library for Python. This
10514 version only differs from the original @code{progressbar} package in that it
10515 uses relative package imports instead of absolute imports, which is necessary
10516 for the module to work under Python 3.3.")
10517 ;; Either or both of these licenses may be selected.
10518 (license (list license:lgpl2.1+ license:bsd-3))))
10519
10520 (define-public python-colorama
10521 (package
10522 (name "python-colorama")
10523 (version "0.4.3")
10524 (source
10525 (origin
10526 (method url-fetch)
10527 (uri (pypi-uri "colorama" version))
10528 (sha256
10529 (base32
10530 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
10531 (build-system python-build-system)
10532 (synopsis "Colored terminal text rendering for Python")
10533 (description "Colorama is a Python library for rendering colored terminal
10534 text.")
10535 (home-page "https://pypi.org/project/colorama/")
10536 (license license:bsd-3)))
10537
10538 (define-public python2-colorama
10539 (package-with-python2 python-colorama))
10540
10541 (define-public python-rsa
10542 (package
10543 (name "python-rsa")
10544 (version "3.4.2")
10545 (source
10546 (origin
10547 (method url-fetch)
10548 (uri (pypi-uri "rsa" version))
10549 (sha256
10550 (base32
10551 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10552 (build-system python-build-system)
10553 (propagated-inputs
10554 `(("python-pyasn1" ,python-pyasn1)))
10555 (synopsis "Pure-Python RSA implementation")
10556 (description "Python-RSA is a pure-Python RSA implementation. It supports
10557 encryption and decryption, signing and verifying signatures, and key
10558 generation according to PKCS#1 version 1.5. It can be used as a Python
10559 library as well as on the command line.")
10560 (home-page "https://stuvel.eu/rsa")
10561 (license license:asl2.0)))
10562
10563 (define-public python2-rsa
10564 (package-with-python2 python-rsa))
10565
10566 (define-public python-pluggy
10567 (package
10568 (name "python-pluggy")
10569 (version "0.13.1")
10570 (source
10571 (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "pluggy" version))
10574 (sha256
10575 (base32
10576 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
10577 (build-system python-build-system)
10578 (native-inputs
10579 `(("python-setuptools-scm" ,python-setuptools-scm)))
10580 (synopsis "Plugin and hook calling mechanism for Python")
10581 (description "Pluggy is an extraction of the plugin manager as used by
10582 Pytest but stripped of Pytest specific details.")
10583 (home-page "https://pypi.org/project/pluggy/")
10584 (properties `((python2-variant . ,(delay python2-pluggy))))
10585 (license license:expat)))
10586
10587 (define-public python2-pluggy
10588 (let ((base (package-with-python2 (strip-python2-variant
10589 python-pluggy))))
10590 (package/inherit
10591 base
10592 (propagated-inputs
10593 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
10594
10595 ;; This package requires python2-importlib-metadata, but that package
10596 ;; ends up needing python2-pluggy via python2-pytest, so we need this
10597 ;; variant to solve the circular dependency.
10598 (define-public python2-pluggy-bootstrap
10599 (hidden-package
10600 (package/inherit
10601 python2-pluggy
10602 (name "python2-pluggy-bootstrap")
10603 (arguments
10604 `(#:tests? #f
10605 ,@(package-arguments python2-pluggy)))
10606 (propagated-inputs
10607 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10608
10609 (define-public python-tox
10610 (package
10611 (name "python-tox")
10612 (version "2.8.1")
10613 (source
10614 (origin
10615 (method url-fetch)
10616 (uri (pypi-uri "tox" version))
10617 (sha256
10618 (base32
10619 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
10620 (build-system python-build-system)
10621 (arguments
10622 ;; FIXME: Tests require pytest-timeout, which itself requires
10623 ;; pytest>=2.8.0 for installation.
10624 '(#:tests? #f))
10625 (propagated-inputs
10626 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
10627 ("python-py" ,python-py)
10628 ("python-virtualenv" ,python-virtualenv)))
10629 (native-inputs
10630 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
10631 ("python-pytest" ,python-pytest) ; >= 2.3.5
10632 ("python-setuptools-scm" ,python-setuptools-scm)))
10633 (home-page "https://tox.readthedocs.io")
10634 (synopsis "Virtualenv-based automation of test activities")
10635 (description "Tox is a generic virtualenv management and test command line
10636 tool. It can be used to check that a package installs correctly with
10637 different Python versions and interpreters, or run tests in each type of
10638 supported environment, or act as a frontend to continuous integration
10639 servers.")
10640 (license license:expat)))
10641
10642 (define-public python2-tox
10643 (package-with-python2 python-tox))
10644
10645 (define-public python-jmespath
10646 (package
10647 (name "python-jmespath")
10648 (version "0.9.4")
10649 (source
10650 (origin
10651 (method url-fetch)
10652 (uri (pypi-uri "jmespath" version))
10653 (sha256
10654 (base32
10655 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
10656 (build-system python-build-system)
10657 (native-inputs
10658 `(("python-nose" ,python-nose)))
10659 (synopsis "JSON Matching Expressions")
10660 (description "JMESPath (pronounced “james path”) is a Python library that
10661 allows one to declaratively specify how to extract elements from a JSON
10662 document.")
10663 (home-page "https://github.com/jmespath/jmespath.py")
10664 (license license:expat)))
10665
10666 (define-public python2-jmespath
10667 (package-with-python2 python-jmespath))
10668
10669 (define-public python-symengine
10670 (package
10671 (name "python-symengine")
10672 (version "0.6.1")
10673 (source
10674 (origin
10675 (method url-fetch)
10676 (uri (pypi-uri "symengine" version))
10677 (sha256
10678 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
10679 (build-system python-build-system)
10680 (native-inputs
10681 `(("cmake" ,cmake)
10682 ("python-cython" ,python-cython)))
10683 (inputs
10684 `(("symengine" ,symengine)))
10685 (home-page "https://github.com/symengine/symengine.py")
10686 (synopsis "Python library providing wrappers to SymEngine")
10687 (description
10688 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
10689 manipulation library.")
10690 (license license:expat)))
10691
10692 (define-public python-botocore
10693 (package
10694 (name "python-botocore")
10695 (version "1.15.26")
10696 (source
10697 (origin
10698 (method url-fetch)
10699 (uri (pypi-uri "botocore" version))
10700 (sha256
10701 (base32
10702 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
10703 (build-system python-build-system)
10704 (arguments
10705 ;; FIXME: Many tests are failing.
10706 '(#:tests? #f))
10707 (propagated-inputs
10708 `(("python-dateutil" ,python-dateutil)
10709 ("python-docutils" ,python-docutils)
10710 ("python-jmespath" ,python-jmespath)))
10711 (native-inputs
10712 `(("python-mock" ,python-mock)
10713 ("python-nose" ,python-nose)
10714 ("behave" ,behave)
10715 ("python-tox" ,python-tox)
10716 ("python-urllib3" ,python-urllib3)
10717 ("python-wheel" ,python-wheel)))
10718 (home-page "https://github.com/boto/botocore")
10719 (synopsis "Low-level interface to AWS")
10720 (description "Botocore is a Python library that provides a low-level
10721 interface to the Amazon Web Services (AWS) API.")
10722 (license license:asl2.0)))
10723
10724 (define-public python2-botocore
10725 (package-with-python2 python-botocore))
10726
10727 (define-public python-pyfiglet
10728 (package
10729 (name "python-pyfiglet")
10730 (version "0.8.post1")
10731 (source
10732 (origin
10733 (method url-fetch)
10734 (uri (pypi-uri "pyfiglet" version))
10735 (sha256
10736 (base32
10737 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
10738 (build-system python-build-system)
10739 (home-page "https://github.com/pwaller/pyfiglet")
10740 (synopsis "Draw ASCII art big letters in Python")
10741 (description "This module lets you draw large letter from ordinary characters
10742 in pure Python.")
10743 (license license:expat)))
10744
10745 (define-public python-xdo
10746 (package
10747 (name "python-xdo")
10748 (version "0.3")
10749 (source (origin
10750 (method url-fetch)
10751 (uri (string-append
10752 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10753 "python-xdo_" version ".orig.tar.gz"))
10754 (sha256
10755 (base32
10756 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
10757 (build-system python-build-system)
10758 (arguments
10759 '(#:phases
10760 (modify-phases %standard-phases
10761 (add-before 'install 'patch-libxdo-path
10762 ;; Hardcode the path of dynamically loaded libxdo library.
10763 (lambda* (#:key inputs #:allow-other-keys)
10764 (let ((libxdo (string-append
10765 (assoc-ref inputs "xdotool")
10766 "/lib/libxdo.so")))
10767 (substitute* "xdo/_xdo.py"
10768 (("find_library\\(\"xdo\"\\)")
10769 (simple-format #f "\"~a\"" libxdo)))
10770 #t))))
10771 #:tests? #f)) ; no tests provided
10772 (propagated-inputs
10773 `(("python-six" ,python-six)))
10774 (inputs
10775 `(("xdotool" ,xdotool)
10776 ("libX11" ,libx11)))
10777 (home-page "https://tracker.debian.org/pkg/python-xdo")
10778 (synopsis "Python library for simulating X11 keyboard/mouse input")
10779 (description "Provides bindings to libxdo for manipulating X11 via simulated
10780 input. (Note that this is mostly a legacy library; you may wish to look at
10781 python-xdo for newer bindings.)")
10782 (license license:bsd-3)))
10783
10784 (define-public python2-xdo
10785 (package-with-python2 python-xdo))
10786
10787 (define-public python-mako
10788 (package
10789 (name "python-mako")
10790 (version "1.1.2")
10791 (source
10792 (origin
10793 (method url-fetch)
10794 (uri (pypi-uri "Mako" version))
10795 (sha256
10796 (base32
10797 "17bd6r9ynp4hyfckkia0bb8gpd98f42jfl5rmzdpbld59bbcaf9i"))))
10798 (build-system python-build-system)
10799 (arguments
10800 `(#:phases (modify-phases %standard-phases
10801 (replace 'check
10802 (lambda* (#:key tests? #:allow-other-keys)
10803 (if tests?
10804 (invoke "nosetests" "-v")
10805 (format #t "test suite not run~%"))
10806 #t)))))
10807 (propagated-inputs
10808 `(("python-markupsafe" ,python-markupsafe)))
10809 (native-inputs
10810 `(("python-mock" ,python-mock)
10811 ("python-nose" ,python-nose)))
10812 (home-page "https://www.makotemplates.org/")
10813 (synopsis "Templating language for Python")
10814 (description "Mako is a templating language for Python that compiles
10815 templates into Python modules.")
10816 (license license:expat)))
10817
10818 (define-public python2-mako
10819 (package-with-python2 python-mako))
10820
10821 (define-public python-waitress
10822 (package
10823 (name "python-waitress")
10824 (version "1.1.0")
10825 (source
10826 (origin
10827 (method url-fetch)
10828 (uri (pypi-uri "waitress" version))
10829 (patches (search-patches "python-waitress-fix-tests.patch"))
10830 (sha256
10831 (base32
10832 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
10833 (build-system python-build-system)
10834 (home-page "https://github.com/Pylons/waitress")
10835 (synopsis "Waitress WSGI server")
10836 (description "Waitress is meant to be a production-quality pure-Python WSGI
10837 server with very acceptable performance.")
10838 (license license:zpl2.1)))
10839
10840 (define-public python2-waitress
10841 (package-with-python2 python-waitress))
10842
10843 (define-public python-whichcraft
10844 (package
10845 (name "python-whichcraft")
10846 (version "0.6.1")
10847 (source
10848 (origin
10849 (method url-fetch)
10850 (uri (pypi-uri "whichcraft" version))
10851 (sha256
10852 (base32
10853 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
10854 (build-system python-build-system)
10855 (native-inputs
10856 `(("python-pytest" ,python-pytest)))
10857 (home-page "https://github.com/pydanny/whichcraft")
10858 (synopsis "Cross-platform cross-python shutil.which functionality")
10859 (description
10860 "This package provides a shim of the shutil.which function that's
10861 designed to work across multiple versions of Python.")
10862 (license license:bsd-3)))
10863
10864 (define-public python-cookiecutter
10865 (package
10866 (name "python-cookiecutter")
10867 (version "1.7.2")
10868 (source
10869 (origin
10870 (method url-fetch)
10871 (uri (pypi-uri "cookiecutter" version))
10872 (sha256
10873 (base32
10874 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
10875 (build-system python-build-system)
10876 (native-inputs
10877 `(("python-freezegun" ,python-freezegun)
10878 ("python-pytest" ,python-pytest)
10879 ("python-pytest-catchlog" ,python-pytest-catchlog)
10880 ("python-pytest-cov" ,python-pytest-cov)
10881 ("python-pytest-mock" ,python-pytest-mock)))
10882 (propagated-inputs
10883 `(("python-binaryornot" ,python-binaryornot)
10884 ("python-click" ,python-click)
10885 ("python-future" ,python-future)
10886 ("python-jinja2" ,python-jinja2)
10887 ("python-jinja2-time" ,python-jinja2-time)
10888 ("python-poyo" ,python-poyo)
10889 ("python-requests" ,python-requests)
10890 ("python-slugify" ,python-slugify)
10891 ("python-text-unidecode" ,python-text-unidecode)
10892 ("python-whichcraft" ,python-whichcraft)))
10893 (home-page "https://github.com/cookiecutter/cookiecutter")
10894 (synopsis
10895 "Command-line utility that creates projects from project templates")
10896 (description
10897 "This package provides a command-line utility that creates projects from
10898 project templates, e.g. creating a Python package project from a Python package
10899 project template.")
10900 (license license:bsd-3)))
10901
10902 (define-public python-pyquery
10903 (package
10904 (name "python-pyquery")
10905 (version "1.2.17")
10906 (source
10907 (origin
10908 (method url-fetch)
10909 (uri (pypi-uri "pyquery" version))
10910 (sha256
10911 (base32
10912 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10913 (build-system python-build-system)
10914 (native-inputs
10915 `(("python-webob" ,python-webob)
10916 ("python-webtest" ,python-webtest)))
10917 (propagated-inputs
10918 `(("python-lxml" ,python-lxml)
10919 ("python-cssselect" ,python-cssselect)))
10920 (home-page "https://github.com/gawel/pyquery")
10921 (synopsis "Make jQuery-like queries on xml documents")
10922 (description "pyquery allows you to make jQuery queries on xml documents.
10923 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10924 fast xml and html manipulation.")
10925 (license license:bsd-3)))
10926
10927 (define-public python-anyjson
10928 (package
10929 (name "python-anyjson")
10930 (version "0.3.3")
10931 (source
10932 (origin
10933 (method url-fetch)
10934 (uri (pypi-uri "anyjson" version))
10935 (sha256
10936 (base32
10937 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10938 (build-system python-build-system)
10939 (arguments
10940 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10941 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10942 ;; whatever) so this transformation needs to be done before the tests
10943 ;; can be run. Maybe we could add a build step to transform beforehand
10944 ;; but it could be annoying/difficult.
10945 ;; We can enable tests for the Python 2 version, though, and do below.
10946 #:tests? #f))
10947 (home-page "https://bitbucket.org/runeh/anyjson/")
10948 (synopsis
10949 "Wraps best available JSON implementation in a common interface")
10950 (description
10951 "Anyjson loads whichever is the fastest JSON module installed
10952 and provides a uniform API regardless of which JSON implementation is used.")
10953 (license license:bsd-3)
10954 (properties `((python2-variant . ,(delay python2-anyjson))))))
10955
10956 (define-public python2-anyjson
10957 (let ((anyjson (package-with-python2
10958 (strip-python2-variant python-anyjson))))
10959 (package
10960 (inherit anyjson)
10961 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10962 #:tests? #t
10963 ,@(package-arguments anyjson)))
10964 (native-inputs `(("python2-nose" ,python2-nose))))))
10965
10966 (define-public python-amqp
10967 (package
10968 (name "python-amqp")
10969 (version "2.3.2")
10970 (source
10971 (origin
10972 (method url-fetch)
10973 (uri (pypi-uri "amqp" version))
10974 (sha256
10975 (base32
10976 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
10977 (build-system python-build-system)
10978 (native-inputs
10979 `(("python-case" ,python-case)
10980 ("python-pytest-sugar" ,python-pytest-sugar)
10981 ("python-mock" ,python-mock)))
10982 (propagated-inputs
10983 `(("python-vine" ,python-vine)))
10984 (home-page "https://github.com/celery/py-amqp")
10985 (synopsis
10986 "Low-level AMQP client for Python (fork of amqplib)")
10987 (description
10988 "This is a fork of amqplib which was originally written by Barry Pederson.
10989 It is maintained by the Celery project, and used by kombu as a pure python
10990 alternative when librabbitmq is not available.")
10991 (license license:lgpl2.1+)
10992 (properties `((python2-variant . ,(delay python2-amqp))))))
10993
10994 (define-public python2-amqp
10995 (let ((amqp (package-with-python2
10996 (strip-python2-variant python-amqp))))
10997 (package
10998 (inherit amqp)
10999 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11000 ;; unmaintained. Weirdly, does not do this on the python 3
11001 ;; version?
11002 #:tests? #f
11003 ,@(package-arguments amqp))))))
11004
11005 (define-public python-txamqp
11006 (package
11007 (name "python-txamqp")
11008 (version "0.8.2")
11009 (source
11010 (origin
11011 (method url-fetch)
11012 (uri (pypi-uri "txAMQP" version))
11013 (sha256
11014 (base32
11015 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11016 (build-system python-build-system)
11017 (propagated-inputs
11018 `(("python-six" ,python-six)
11019 ("python-twisted" ,python-twisted)))
11020 (home-page "https://github.com/txamqp/txamqp")
11021 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11022 (description
11023 "This package provides a Python library for communicating with AMQP peers
11024 and brokers using the asynchronous networking framework Twisted. It contains
11025 all the necessary code to connect, send and receive messages to/from an
11026 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11027 also includes support for using Thrift RPC over AMQP in Twisted
11028 applications.")
11029 (license license:asl2.0)))
11030
11031 (define-public python2-txamqp
11032 (package-with-python2 python-txamqp))
11033
11034 (define-public python-kombu
11035 (package
11036 (name "python-kombu")
11037 (version "4.2.2")
11038 (source
11039 (origin
11040 (method url-fetch)
11041 (uri (pypi-uri "kombu" version))
11042 (sha256
11043 (base32
11044 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11045 (build-system python-build-system)
11046 (native-inputs
11047 `(("python-mock" ,python-mock)
11048 ("python-case" ,python-case)
11049 ("python-pyro4" ,python-pyro4)
11050 ("python-pytest-sugar" ,python-pytest-sugar)
11051 ("python-pytz" ,python-pytz)))
11052 (propagated-inputs
11053 `(("python-anyjson" ,python-anyjson)
11054 ("python-amqp" ,python-amqp)
11055 ("python-redis" ,python-redis)))
11056 (home-page "https://kombu.readthedocs.io")
11057 (synopsis "Message passing library for Python")
11058 (description "The aim of Kombu is to make messaging in Python as easy as
11059 possible by providing an idiomatic high-level interface for the AMQ protocol,
11060 and also provide proven and tested solutions to common messaging problems.
11061 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11062 message orientation, queuing, routing, reliability and security, for which the
11063 RabbitMQ messaging server is the most popular implementation.")
11064 (license license:bsd-3)
11065 (properties `((python2-variant . ,(delay python2-kombu))))))
11066
11067 (define-public python2-kombu
11068 (let ((kombu (package-with-python2
11069 (strip-python2-variant python-kombu))))
11070 (package
11071 (inherit kombu)
11072 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11073 ;; It works fine on the python3 variant.
11074 #:tests? #f
11075 ,@(package-arguments kombu)))
11076 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11077 ,@(package-native-inputs kombu))))))
11078
11079 (define-public python-billiard
11080 (package
11081 (name "python-billiard")
11082 (version "3.5.0.5")
11083 (source
11084 (origin
11085 (method url-fetch)
11086 (uri (pypi-uri "billiard" version))
11087 (sha256
11088 (base32
11089 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11090 (build-system python-build-system)
11091 (native-inputs
11092 `(("python-case" ,python-case)
11093 ("python-pytest" ,python-pytest)))
11094 (home-page "https://github.com/celery/billiard")
11095 (synopsis
11096 "Python multiprocessing fork with improvements and bugfixes")
11097 (description
11098 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11099 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11100 pyprocessing package. This standalone variant is intended to be compatible with
11101 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11102 (license license:bsd-3)
11103 (properties `((python2-variant . ,(delay python2-billiard))))))
11104
11105 (define-public python2-billiard
11106 (let ((billiard (package-with-python2
11107 (strip-python2-variant python-billiard))))
11108 (package
11109 (inherit billiard)
11110 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11111 ("python2-mock" ,python2-mock)
11112 ,@(package-native-inputs billiard))))))
11113
11114 (define-public python-celery
11115 (package
11116 (name "python-celery")
11117 (version "4.2.1")
11118 (source
11119 (origin
11120 (method url-fetch)
11121 (uri (pypi-uri "celery" version))
11122 (sha256
11123 (base32
11124 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11125 (build-system python-build-system)
11126 (arguments
11127 '(;; TODO The tests fail with Python 3.7
11128 ;; https://github.com/celery/celery/issues/4849
11129 #:tests? #f
11130 #:phases
11131 (modify-phases %standard-phases
11132 (add-after 'unpack 'patch-requirements
11133 (lambda _
11134 (substitute* "requirements/test.txt"
11135 (("pytest>=3\\.0,<3\\.3")
11136 "pytest>=3.0"))
11137 #t)))))
11138 (native-inputs
11139 `(("python-case" ,python-case)
11140 ("python-pytest" ,python-pytest)))
11141 (propagated-inputs
11142 `(("python-pytz" ,python-pytz)
11143 ("python-billiard" ,python-billiard)
11144 ("python-kombu" ,python-kombu)))
11145 (home-page "https://celeryproject.org")
11146 (synopsis "Distributed Task Queue")
11147 (description "Celery is an asynchronous task queue/job queue based on
11148 distributed message passing. It is focused on real-time operation, but
11149 supports scheduling as well. The execution units, called tasks, are executed
11150 concurrently on a single or more worker servers using multiprocessing,
11151 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11152 synchronously (wait until ready).")
11153 (license license:bsd-3)
11154 (properties `((python2-variant . ,(delay python2-celery))))))
11155
11156 (define-public python2-celery
11157 (let ((celery (package-with-python2
11158 (strip-python2-variant python-celery))))
11159 (package
11160 (inherit celery)
11161 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11162 ("python2-mock" ,python2-mock)
11163 ,@(package-native-inputs celery))))))
11164
11165 (define-public python-translitcodec
11166 (package
11167 (name "python-translitcodec")
11168 (version "0.4.0")
11169 (source
11170 (origin
11171 (method url-fetch)
11172 (uri (pypi-uri "translitcodec" version))
11173 (sha256
11174 (base32
11175 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11176 (build-system python-build-system)
11177 (arguments
11178 `(#:tests? #f)) ; no tests provided
11179 (home-page
11180 "https://github.com/claudep/translitcodec")
11181 (synopsis
11182 "Unicode to 8-bit charset transliteration codec")
11183 (description
11184 "This package contains codecs for transliterating ISO 10646 texts into
11185 best-effort representations using smaller coded character sets (ASCII,
11186 ISO 8859, etc.).")
11187 (license license:expat)))
11188
11189 (define-public python2-translitcodec
11190 (package-with-python2 python-translitcodec))
11191
11192 (define-public python-editor
11193 (package
11194 (name "python-editor")
11195 (version "1.0.4")
11196 (source
11197 (origin
11198 (method url-fetch)
11199 (uri (pypi-uri "python-editor" version))
11200 (sha256
11201 (base32
11202 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11203 (build-system python-build-system)
11204 (arguments
11205 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11206 (home-page "https://github.com/fmoo/python-editor")
11207 (synopsis "Programmatically open an editor, capture the result")
11208 (description
11209 "python-editor is a library that provides the editor module for
11210 programmatically interfacing with your system's $EDITOR.")
11211 (license license:asl2.0)))
11212
11213 (define-public python2-editor
11214 (package-with-python2 python-editor))
11215
11216 (define-public python-vobject
11217 (package
11218 (name "python-vobject")
11219 (version "0.9.6.1")
11220 (source (origin
11221 (method url-fetch)
11222 (uri (pypi-uri "vobject" version))
11223 (sha256
11224 (base32
11225 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11226 (build-system python-build-system)
11227 (arguments
11228 '(;; The test suite relies on some non-portable Windows interfaces.
11229 #:tests? #f))
11230 (propagated-inputs
11231 `(("python-dateutil" ,python-dateutil)
11232 ("python-pyicu" ,python-pyicu)))
11233 (synopsis "Parse and generate vCard and vCalendar files")
11234 (description "Vobject is intended to be a full featured Python package for
11235 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11236 are supported and well tested. vCard 3.0 files are supported, and all data
11237 should be imported, but only a few components are understood in a sophisticated
11238 way.")
11239 (home-page "https://eventable.github.io/vobject/")
11240 (license license:asl2.0)))
11241
11242 (define-public python2-vobject
11243 (package-with-python2 python-vobject))
11244
11245 (define-public python-munkres
11246 (package
11247 (name "python-munkres")
11248 (version "1.0.8")
11249 (source (origin
11250 (method url-fetch)
11251 (uri (pypi-uri "munkres" version))
11252 (sha256
11253 (base32
11254 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11255 (build-system python-build-system)
11256 (arguments
11257 '(#:tests? #f)) ; no test suite
11258 (home-page "https://software.clapper.org/munkres/")
11259 (synopsis "Implementation of the Munkres algorithm")
11260 (description "The Munkres module provides an implementation of the Munkres
11261 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11262 useful for solving the Assignment Problem.")
11263 (license license:bsd-3)))
11264
11265 (define-public python2-munkres
11266 (package-with-python2 python-munkres))
11267
11268 (define-public python-whoosh
11269 (package
11270 (name "python-whoosh")
11271 (version "2.7.4")
11272 (source
11273 (origin
11274 (method url-fetch)
11275 (uri (pypi-uri "Whoosh" version))
11276 (sha256
11277 (base32
11278 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11279 (build-system python-build-system)
11280 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11281 (native-inputs
11282 `(("python-pytest" ,python-pytest)))
11283 (home-page "https://bitbucket.org/mchaput/whoosh")
11284 (synopsis "Full text indexing, search, and spell checking library")
11285 (description
11286 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11287 checking library.")
11288 (license license:bsd-2)))
11289
11290 (define-public python2-whoosh
11291 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11292 (package (inherit whoosh)
11293 (propagated-inputs
11294 `(("python2-backport-ssl-match-hostname"
11295 ,python2-backport-ssl-match-hostname)
11296 ,@(package-propagated-inputs whoosh))))))
11297
11298 (define-public python-pathlib
11299 (package
11300 (name "python-pathlib")
11301 (version "1.0.1")
11302 (source (origin
11303 (method url-fetch)
11304 (uri (pypi-uri "pathlib" version))
11305 (sha256
11306 (base32
11307 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11308 (build-system python-build-system)
11309 ;; The tests depend on the internal "test" module, which does not provide
11310 ;; a stable interface.
11311 (arguments `(#:tests? #f))
11312 (home-page "https://pathlib.readthedocs.org/")
11313 (synopsis "Object-oriented file system paths")
11314 (description "Pathlib offers a set of classes to handle file system paths.
11315 It offers the following advantages over using string objects:
11316
11317 @enumerate
11318 @item No more cumbersome use of os and os.path functions. Everything can
11319 be done easily through operators, attribute accesses, and method calls.
11320 @item Embodies the semantics of different path types. For example,
11321 comparing Windows paths ignores casing.
11322 @item Well-defined semantics, eliminating any inconsistencies or
11323 ambiguities (forward vs. backward slashes, etc.).
11324 @end enumerate
11325
11326 Note: In Python 3.4, pathlib is now part of the standard library. For other
11327 Python versions please consider python-pathlib2 instead, which tracks the
11328 standard library module. This module (python-pathlib) isn't maintained
11329 anymore.")
11330 (license license:expat)))
11331
11332 (define-public python2-pathlib
11333 (package-with-python2 python-pathlib))
11334
11335 (define-public python2-pathlib2
11336 (package
11337 (name "python2-pathlib2")
11338 (version "2.3.5")
11339 (source (origin
11340 (method url-fetch)
11341 (uri (pypi-uri "pathlib2" version))
11342 (sha256
11343 (base32
11344 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11345 (build-system python-build-system)
11346 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11347 ;; version is 3.4 which already includes this package as part of the
11348 ;; standard library.
11349 (arguments
11350 `(#:python ,python-2))
11351 (propagated-inputs
11352 `(("python2-scandir" ,python2-scandir)
11353 ("python2-six" ,python2-six)))
11354 (home-page "https://pypi.org/project/pathlib2/")
11355 (synopsis "Object-oriented file system paths - backport of standard
11356 pathlib module")
11357 (description "The goal of pathlib2 is to provide a backport of standard
11358 pathlib module which tracks the standard library module, so all the newest
11359 features of the standard pathlib can be used also on older Python versions.
11360
11361 Pathlib offers a set of classes to handle file system paths. It offers the
11362 following advantages over using string objects:
11363
11364 @enumerate
11365 @item No more cumbersome use of os and os.path functions. Everything can
11366 be done easily through operators, attribute accesses, and method calls.
11367 @item Embodies the semantics of different path types. For example,
11368 comparing Windows paths ignores casing.
11369 @item Well-defined semantics, eliminating any inconsistencies or
11370 ambiguities (forward vs. backward slashes, etc.).
11371 @end enumerate")
11372 (license license:expat)))
11373
11374 (define-public python2-pathlib2-bootstrap
11375 (hidden-package
11376 (package
11377 (inherit python2-pathlib2)
11378 (name "python2-pathlib2-bootstrap")
11379 (propagated-inputs
11380 `(("python2-scandir" ,python2-scandir)
11381 ("python2-six" ,python2-six-bootstrap))))))
11382
11383 (define-public python-jellyfish
11384 (package
11385 (name "python-jellyfish")
11386 (version "0.5.6")
11387 (source (origin
11388 (method url-fetch)
11389 (uri (pypi-uri "jellyfish" version))
11390 (sha256
11391 (base32
11392 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11393 (build-system python-build-system)
11394 (native-inputs
11395 `(("python-pytest" ,python-pytest)))
11396 (home-page "https://github.com/jamesturk/jellyfish")
11397 (synopsis "Approximate and phonetic matching of strings")
11398 (description "Jellyfish uses a variety of string comparison and phonetic
11399 encoding algorithms to do fuzzy string matching.")
11400 (license license:bsd-2)
11401 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11402
11403 (define-public python2-jellyfish
11404 (let ((jellyfish (package-with-python2
11405 (strip-python2-variant python-jellyfish))))
11406 (package (inherit jellyfish)
11407 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11408 ,@(package-native-inputs jellyfish))))))
11409
11410 (define-public python2-unicodecsv
11411 (package
11412 (name "python2-unicodecsv")
11413 (version "0.14.1")
11414 (source (origin
11415 (method git-fetch)
11416 ;; The test suite is not included in the PyPi release.
11417 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11418 (uri (git-reference
11419 (url "https://github.com/jdunck/python-unicodecsv")
11420 (commit version)))
11421 (file-name (git-file-name name version))
11422 (sha256
11423 (base32
11424 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11425 (build-system python-build-system)
11426 (arguments
11427 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11428 #:python ,python-2))
11429 (native-inputs
11430 `(("python2-unittest2" ,python2-unittest2)))
11431 (home-page "https://github.com/jdunck/python-unicodecsv")
11432 (synopsis "Unicode CSV module for Python 2")
11433 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11434 module, adding support for Unicode strings.")
11435 (license license:bsd-2)))
11436
11437 (define-public python-rarfile
11438 (package
11439 (name "python-rarfile")
11440 (version "2.8")
11441 (source (origin
11442 (method url-fetch)
11443 (uri (pypi-uri "rarfile" version))
11444 (sha256
11445 (base32
11446 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11447 (build-system python-build-system)
11448 (arguments
11449 '(#:phases
11450 (modify-phases %standard-phases
11451 (replace 'check
11452 ;; Many tests fail, but the installation proceeds.
11453 (lambda _ (invoke "make" "-C" "test" "test"))))))
11454 (native-inputs
11455 `(("which" ,which))) ; required for tests
11456 (propagated-inputs
11457 `(("libarchive" ,libarchive)))
11458 (home-page "https://github.com/markokr/rarfile")
11459 (synopsis "RAR archive reader for Python")
11460 (description "This is Python module for RAR archive reading. The interface
11461 is made as zipfile like as possible.")
11462 (license license:isc)))
11463
11464 (define-public python2-rarfile
11465 (package-with-python2 python-rarfile))
11466
11467 (define-public python-magic
11468 (package
11469 (name "python-magic")
11470 (version "0.4.15")
11471 (source
11472 (origin
11473 (method url-fetch)
11474 (uri (pypi-uri "python-magic" version))
11475 (sha256
11476 (base32
11477 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11478 (file-name (string-append name "-" version "-checkout"))))
11479 (build-system python-build-system)
11480 (arguments
11481 ;; The tests are unreliable, so don't run them. The tests fail
11482 ;; under Python3 because they were written for Python2 and
11483 ;; contain import statements that do not work in Python3. One of
11484 ;; the tests fails under Python2 because its assertions are
11485 ;; overly stringent; it relies on comparing output strings which
11486 ;; are brittle and can change depending on the version of
11487 ;; libmagic being used and the system on which the test is
11488 ;; running. In my case, under GuixSD 0.10.0, only one test
11489 ;; failed, and it seems to have failed only because the version
11490 ;; of libmagic that is packaged in Guix outputs a slightly
11491 ;; different (but not wrong) string than the one that the test
11492 ;; expected.
11493 '(#:tests? #f
11494 #:phases (modify-phases %standard-phases
11495 ;; Replace a specific method call with a hard-coded
11496 ;; path to the necessary libmagic.so file in the
11497 ;; store. If we don't do this, then the method call
11498 ;; will fail to find the libmagic.so file, which in
11499 ;; turn will cause any application using
11500 ;; python-magic to fail.
11501 (add-before 'build 'hard-code-path-to-libmagic
11502 (lambda* (#:key inputs #:allow-other-keys)
11503 (let ((file (assoc-ref inputs "file")))
11504 (substitute* "magic.py"
11505 (("ctypes.util.find_library\\('magic'\\)")
11506 (string-append "'" file "/lib/libmagic.so'")))
11507 #t)))
11508 (add-before 'install 'disable-egg-compression
11509 (lambda _
11510 (let ((port (open-file "setup.cfg" "a")))
11511 (display "\n[easy_install]\nzip_ok = 0\n"
11512 port)
11513 (close-port port)
11514 #t))))))
11515 (inputs
11516 ;; python-magic needs to be able to find libmagic.so.
11517 `(("file" ,file)))
11518 (home-page
11519 "https://github.com/ahupp/python-magic")
11520 (synopsis
11521 "File type identification using libmagic")
11522 (description
11523 "This module uses ctypes to access the libmagic file type
11524 identification library. It makes use of the local magic database and
11525 supports both textual and MIME-type output. Note that this module and
11526 the python-file module both provide a \"magic.py\" file; these two
11527 modules, which are different and were developed separately, both serve
11528 the same purpose: to provide Python bindings for libmagic.")
11529 (license license:expat)))
11530
11531 (define-public python2-magic
11532 (package-with-python2 python-magic))
11533
11534 (define-public python2-s3cmd
11535 (package
11536 (name "python2-s3cmd")
11537 (version "1.6.1")
11538 (source
11539 (origin
11540 (method url-fetch)
11541 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11542 "s3cmd-" version ".tar.gz"))
11543 (sha256
11544 (base32
11545 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11546 (build-system python-build-system)
11547 (arguments
11548 ;; s3cmd is written for python2 only and contains no tests.
11549 `(#:python ,python-2
11550 #:tests? #f))
11551 (propagated-inputs
11552 `(("python2-dateutil" ,python2-dateutil)
11553 ;; The python-file package also provides a magic.py module.
11554 ;; This is an unfortunate state of affairs; however, s3cmd
11555 ;; fails to install if it cannot find specifically the
11556 ;; python-magic package. Thus we include it, instead of using
11557 ;; python-file. Ironically, s3cmd sometimes works better
11558 ;; without libmagic bindings at all:
11559 ;; https://github.com/s3tools/s3cmd/issues/198
11560 ("python2-magic" ,python2-magic)))
11561 (home-page "https://s3tools.org/s3cmd")
11562 (synopsis "Command line tool for S3-compatible storage services")
11563 (description
11564 "S3cmd is a command line tool for uploading, retrieving and managing data
11565 in storage services that are compatible with the Amazon Simple Storage
11566 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11567 GnuPG encryption, and more. It also supports management of Amazon's
11568 CloudFront content delivery network.")
11569 (license license:gpl2+)))
11570
11571 (define-public python-pkgconfig
11572 (package
11573 (name "python-pkgconfig")
11574 (version "1.3.1")
11575 (source
11576 (origin
11577 (method url-fetch)
11578 (uri (pypi-uri "pkgconfig" version))
11579 (sha256
11580 (base32
11581 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
11582 (build-system python-build-system)
11583 (native-inputs
11584 `(("python-nose" ,python-nose)))
11585 (inputs
11586 `(("pkg-config" ,pkg-config)))
11587 (arguments
11588 `(#:phases
11589 (modify-phases %standard-phases
11590 (add-before 'build 'patch
11591 ;; Hard-code the path to pkg-config.
11592 (lambda _
11593 (substitute* "pkgconfig/pkgconfig.py"
11594 (("cmd = 'pkg-config")
11595 (string-append "cmd = '" (which "pkg-config"))))
11596 #t))
11597 (replace 'check
11598 (lambda _
11599 (invoke "nosetests" "test.py"))))))
11600 (home-page "https://github.com/matze/pkgconfig")
11601 (synopsis "Python interface for pkg-config")
11602 (description "This module provides a Python interface to pkg-config. It
11603 can be used to find all pkg-config packages, check if a package exists,
11604 check if a package meets certain version requirements, query CFLAGS and
11605 LDFLAGS and parse the output to build extensions with setup.py.")
11606 (license license:expat)))
11607
11608 (define-public python2-pkgconfig
11609 (package-with-python2 python-pkgconfig))
11610
11611 (define-public python-bz2file
11612 (package
11613 (name "python-bz2file")
11614 (version "0.98")
11615 (source
11616 (origin
11617 (method url-fetch)
11618 (uri (pypi-uri "bz2file" version))
11619 (sha256
11620 (base32
11621 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11622 (build-system python-build-system)
11623 (arguments
11624 `(#:tests? #f)) ; Tests use deprecated python modules.
11625 (home-page "https://github.com/nvawda/bz2file")
11626 (synopsis "Read and write bzip2-compressed files")
11627 (description
11628 "Bz2file is a Python library for reading and writing bzip2-compressed
11629 files. It contains a drop-in replacement for the I/O interface in the
11630 standard library's @code{bz2} module, including features from the latest
11631 development version of CPython that are not available in older releases.")
11632 (license license:asl2.0)))
11633
11634 (define-public python2-bz2file
11635 (package-with-python2 python-bz2file))
11636
11637 (define-public python-future
11638 (package
11639 (name "python-future")
11640 (version "0.17.1")
11641 (source
11642 (origin
11643 (method url-fetch)
11644 (uri (pypi-uri "future" version))
11645 (sha256
11646 (base32
11647 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
11648 (build-system python-build-system)
11649 ;; Many tests connect to the network or are otherwise flawed.
11650 ;; https://github.com/PythonCharmers/python-future/issues/210
11651 (arguments
11652 `(#:tests? #f))
11653 (home-page "https://python-future.org")
11654 (synopsis "Single-source support for Python 3 and 2")
11655 (description
11656 "@code{python-future} is the missing compatibility layer between Python 2 and
11657 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11658 to support both Python 2 and Python 3 with minimal overhead.")
11659 (license license:expat)))
11660
11661 (define-public python2-future
11662 (package-with-python2 python-future))
11663
11664 (define-public python-cysignals
11665 (package
11666 (name "python-cysignals")
11667 (version "1.9.0")
11668 (source
11669 (origin
11670 (method url-fetch)
11671 (uri (pypi-uri "cysignals" version))
11672 (sha256
11673 (base32
11674 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
11675 (build-system python-build-system)
11676 (native-inputs
11677 `(("python-cython" ,python-cython)
11678 ("python-sphinx" ,python-sphinx)))
11679 (inputs
11680 `(("pari-gp" ,pari-gp)))
11681 (arguments
11682 `(#:modules ((guix build python-build-system)
11683 ((guix build gnu-build-system) #:prefix gnu:)
11684 (guix build utils))
11685 ;; FIXME: Tests are executed after installation and currently fail
11686 ;; when not installing into standard locations; the author is working
11687 ;; on a fix.
11688 #:tests? #f
11689 #:phases
11690 (modify-phases %standard-phases
11691 (add-before
11692 'build 'configure
11693 (assoc-ref gnu:%standard-phases 'configure)))))
11694 (home-page
11695 "https://github.com/sagemath/cysignals")
11696 (synopsis
11697 "Handling of interrupts and signals for Cython")
11698 (description
11699 "The cysignals package provides mechanisms to handle interrupts (and
11700 other signals and errors) in Cython code, using two related approaches,
11701 for mixed Cython/Python code or external C libraries and pure Cython code,
11702 respectively.")
11703 (license license:lgpl3+)))
11704
11705 (define-public python2-cysignals
11706 (package-with-python2 python-cysignals))
11707
11708 (define-public python2-shedskin
11709 (package
11710 (name "python2-shedskin")
11711 (version "0.9.4")
11712 (source
11713 (origin
11714 (method url-fetch)
11715 (uri (string-append "https://github.com/shedskin/shedskin/"
11716 "releases/download/v" version
11717 "/shedskin-" version ".tgz"))
11718 (sha256
11719 (base32
11720 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11721 (build-system python-build-system)
11722 (arguments
11723 `(#:python ,python-2
11724 #:phases (modify-phases %standard-phases
11725 (add-after 'unpack 'fix-resulting-include-libs
11726 (lambda* (#:key inputs #:allow-other-keys)
11727 (let ((libgc (assoc-ref inputs "libgc"))
11728 (pcre (assoc-ref inputs "pcre")))
11729 (substitute* "shedskin/makefile.py"
11730 (("variable == 'CCFLAGS':[ ]*")
11731 (string-append "variable == 'CCFLAGS':\n"
11732 " line += ' -I " pcre "/include"
11733 " -I " libgc "/include'"))
11734 (("variable == 'LFLAGS':[ ]*")
11735 (string-append "variable == 'LFLAGS':\n"
11736 " line += ' -L" pcre "/lib"
11737 " -L " libgc "/lib'")))
11738 #t))))))
11739 (inputs `(("pcre" ,pcre)
11740 ("libgc" ,libgc)))
11741 (home-page "https://shedskin.github.io/")
11742 (synopsis "Experimental Python-2 to C++ Compiler")
11743 (description (string-append "This is an experimental compiler for a subset of
11744 Python. It generates C++ code and a Makefile."))
11745 (license (list license:gpl3 license:bsd-3 license:expat))))
11746
11747 (define-public python2-rope
11748 (package
11749 (name "python2-rope")
11750 (version "0.11.0")
11751 (source
11752 (origin
11753 (method url-fetch)
11754 (uri (pypi-uri "rope" version))
11755 (sha256
11756 (base32
11757 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
11758 (arguments
11759 ;; Rope has only partial python3 support, see `python-rope'
11760 `(#:python ,python-2))
11761 (build-system python-build-system)
11762 (native-inputs
11763 `(("python2-unittest2" ,python2-unittest2)))
11764 (home-page "https://github.com/python-rope/rope")
11765 (synopsis "Refactoring library for Python")
11766 (description "Rope is a refactoring library for Python. It facilitates
11767 the renaming, moving and extracting of attributes, functions, modules, fields
11768 and parameters in Python 2 source code. These refactorings can also be applied
11769 to occurrences in strings and comments.")
11770 (license license:gpl2)))
11771
11772 (define-public python-rope
11773 (package
11774 (inherit python2-rope)
11775 (name "python-rope")
11776 (arguments `(#:python ,python-wrapper
11777 ;; XXX: Only partial python3 support, results in some failing
11778 ;; tests: <https://github.com/python-rope/rope/issues/247>.
11779 #:tests? #f))
11780 (properties `((python2-variant . ,(delay python2-rope))))))
11781
11782 (define-public python-py3status
11783 (package
11784 (name "python-py3status")
11785 (version "3.21")
11786 (source
11787 (origin
11788 (method url-fetch)
11789 (uri (pypi-uri "py3status" version))
11790 (sha256
11791 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
11792 (build-system python-build-system)
11793 (inputs
11794 `(("file" ,file)))
11795 (arguments
11796 '(#:phases
11797 (modify-phases %standard-phases
11798 ;; 'file' is used for detection of configuration file encoding
11799 ;; let's make link the dependency to particular input
11800 (add-before 'build 'patch-file-path
11801 (lambda* (#:key inputs #:allow-other-keys)
11802 (let ((file-path (assoc-ref inputs "file")))
11803 (substitute* "py3status/parse_config.py"
11804 (("\\[\"file\", \"-b\"")
11805 (string-append "['" file-path "/bin/file', '-b'")))
11806 #t))))
11807 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
11808 (home-page "https://github.com/ultrabug/py3status")
11809 (synopsis "Extensible i3status wrapper written in Python")
11810 (description "py3status is an i3status wrapper which extends i3status
11811 functionality in a modular way, allowing you to extend your panel with your
11812 own code, responding to click events and updating clock every second.")
11813 (license license:bsd-3)))
11814
11815 (define-public python2-selectors2
11816 (package
11817 (name "python2-selectors2")
11818 (version "2.0.1")
11819 (source (origin
11820 (method url-fetch)
11821 (uri (pypi-uri "selectors2" version))
11822 (sha256
11823 (base32
11824 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
11825 (build-system python-build-system)
11826 (arguments
11827 `(#:python ,python-2))
11828 (native-inputs
11829 `(("python2-mock" ,python2-mock)
11830 ("python2-psutil" ,python2-psutil)))
11831 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
11832 (synopsis "Backport of the selectors module from Python 3.5+")
11833 (description
11834 "This package provides a drop-in replacement for the @code{selectors}
11835 module in Python 3.5 and later.")
11836 (license license:expat)))
11837
11838 (define-public python-tblib
11839 (package
11840 (name "python-tblib")
11841 (version "1.6.0")
11842 (source (origin
11843 (method url-fetch)
11844 (uri (pypi-uri "tblib" version))
11845 (sha256
11846 (base32
11847 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
11848 (build-system python-build-system)
11849 (arguments
11850 `(#:phases
11851 (modify-phases %standard-phases
11852 (replace 'check
11853 (lambda _
11854 ;; Upstream runs tests after installation and the package itself
11855 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11856 ;; found.
11857 (setenv "PYTHONPATH"
11858 (string-append (getcwd) "/build/lib:"
11859 (getenv "PYTHONPATH")))
11860 (invoke "py.test" "-vv" "tests" "README.rst"))))))
11861 (native-inputs
11862 `(("python-pytest" ,python-pytest)
11863 ("python-six" ,python-six)))
11864 (home-page "https://github.com/ionelmc/python-tblib")
11865 (synopsis "Traceback serialization library")
11866 (description
11867 "Traceback serialization allows you to:
11868
11869 @enumerate
11870 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11871 different processes. This allows better error handling when running code over
11872 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11873
11874 @item Parse traceback strings and raise with the parsed tracebacks.
11875 @end enumerate\n")
11876 (license license:bsd-3)))
11877
11878 (define-public python2-tblib
11879 (package-with-python2 python-tblib))
11880
11881 (define-public python-greenlet
11882 (package
11883 (name "python-greenlet")
11884 (version "0.4.16")
11885 (source (origin
11886 (method url-fetch)
11887 (uri (pypi-uri "greenlet" version))
11888 (sha256
11889 (base32
11890 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
11891 (build-system python-build-system)
11892 (home-page "https://greenlet.readthedocs.io/")
11893 (synopsis "Lightweight in-process concurrent programming")
11894 (description
11895 "Greenlet package is a spin-off of Stackless, a version of CPython
11896 that supports micro-threads called \"tasklets\". Tasklets run
11897 pseudo-concurrently (typically in a single or a few OS-level threads) and
11898 are synchronized with data exchanges on \"channels\".")
11899 (license (list license:psfl license:expat))))
11900
11901 (define-public python2-greenlet
11902 (package-with-python2 python-greenlet))
11903
11904 (define-public python-objgraph
11905 (package
11906 (name "python-objgraph")
11907 (version "3.4.1")
11908 (source
11909 (origin
11910 (method url-fetch)
11911 (uri (pypi-uri "objgraph" version))
11912 (sha256
11913 (base32
11914 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
11915 (build-system python-build-system)
11916 (propagated-inputs
11917 `(("python-graphviz" ,python-graphviz)))
11918 (native-inputs
11919 `(("python-mock" ,python-mock)
11920 ("graphviz" ,graphviz)))
11921 (home-page "https://mg.pov.lt/objgraph/")
11922 (synopsis "Draw Python object reference graphs with graphviz")
11923 (description
11924 "This package provides tools to draw Python object reference graphs with
11925 graphviz.")
11926 (license license:expat)))
11927
11928 (define-public python2-objgraph
11929 (package-with-python2 python-objgraph))
11930
11931 (define-public python-gevent
11932 (package
11933 (name "python-gevent")
11934 (version "20.6.2")
11935 (source (origin
11936 (method url-fetch)
11937 (uri (pypi-uri "gevent" version))
11938 (sha256
11939 (base32
11940 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
11941 (modules '((guix build utils)))
11942 (snippet
11943 '(begin
11944 ;; unbunding libev and c-ares
11945 (delete-file-recursively "deps")
11946 #t))))
11947 (build-system python-build-system)
11948 (arguments
11949 `(#:modules ((ice-9 ftw)
11950 (ice-9 match)
11951 (srfi srfi-26)
11952 (guix build utils)
11953 (guix build python-build-system))
11954 #:phases (modify-phases %standard-phases
11955 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
11956 (lambda _
11957 (substitute* "src/gevent/subprocess.py"
11958 (("/bin/sh") (which "sh")))
11959 (for-each (lambda (file)
11960 (substitute* file
11961 (("/bin/sh") (which "sh"))
11962 (("/bin/true") (which "true"))))
11963 (find-files "src/greentest" "\\.py$"))
11964 #t))
11965 (add-before 'build 'do-not-use-bundled-sources
11966 (lambda _
11967 (setenv "GEVENTSETUP_EMBED" "0")
11968
11969 ;; Prevent building bundled libev.
11970 (substitute* "setup.py"
11971 (("run_make=_BUILDING")
11972 "run_make=False"))
11973 #t))
11974 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
11975 (lambda* (#:key inputs #:allow-other-keys)
11976 (let ((greenlet (string-append
11977 (assoc-ref inputs "python-greenlet")
11978 "/include")))
11979 (match (scandir greenlet
11980 (lambda (item)
11981 (string-prefix? "python" item)))
11982 ((python)
11983 (setenv "C_INCLUDE_PATH"
11984 (string-append greenlet "/" python ":"
11985 (or (getenv "C_INCLUDE_PATH")
11986 ""))))))
11987 #t))
11988 (add-before 'check 'pretend-to-be-CI
11989 (lambda _
11990 ;; A few tests are skipped due to network constraints or
11991 ;; get longer timeouts when running in a CI environment.
11992 ;; Piggy-back on that, as we need the same adjustments.
11993 (setenv "TRAVIS" "1")
11994 (setenv "APPVEYOR" "1")
11995 #t))
11996 (add-before 'check 'adjust-tests
11997 (lambda _
11998 (let ((disabled-tests
11999 '(;; These tests rely on networking which is not
12000 ;; available in the build container.
12001 "test_urllib2net.py"
12002 "test__server.py"
12003 "test__server_pywsgi.py"
12004 "test_socket.py"
12005 "test__socket.py"
12006 "test__socket_ssl.py"
12007 "test__socket_dns.py"
12008 "test__socket_dns6.py"
12009 "test___example_servers.py"
12010 "test__getaddrinfo_import.py"
12011 "test__examples.py"
12012 "test_httplib.py"
12013 "test_https.py"
12014 "test_urllib2_localnet.py"
12015 "test_ssl.py"
12016 "test__ssl.py"
12017 ;; XXX: These tests borrow functionality from the
12018 ;; Python builtin 'test' module, but it is not
12019 ;; installed with the Guix Python distribution.
12020 "test_smtpd.py"
12021 "test_wsgiref.py"
12022 "test_urllib2.py"
12023 "test_thread.py"
12024 "test_threading.py"
12025 "test__threading_2.py"
12026 ;; These tests rely on KeyboardInterrupts which do not
12027 ;; work inside the build container for some reason
12028 ;; (lack of controlling terminal?).
12029 "test_subprocess.py"
12030 "test__issues461_471.py"
12031 ;; TODO: Patch out the tests that use getprotobyname, etc
12032 ;; instead of disabling all the tests from these files.
12033 "test__resolver_dnspython.py"
12034 "test__doctests.py"
12035 "test__all__.py"
12036 "test___config.py"
12037 "test__execmodules.py")))
12038 (call-with-output-file "skipped_tests.txt"
12039 (lambda (port)
12040 (format port "~a~%"
12041 (string-join disabled-tests "\n"))))
12042 #t)))
12043 (replace 'check
12044 (lambda _
12045 ;; Make sure the build directory is on PYTHONPATH.
12046 (setenv "PYTHONPATH"
12047 (string-append
12048 (getenv "PYTHONPATH") ":"
12049 (getcwd) "/build/"
12050 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12051
12052 ;; Use the build daemons configured number of workers.
12053 (setenv "NWORKERS" (number->string (parallel-job-count)))
12054
12055 (invoke "python" "-m" "gevent.tests" "--config"
12056 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12057 (propagated-inputs
12058 `(("python-greenlet" ,python-greenlet)
12059 ("python-objgraph" ,python-objgraph)
12060 ("python-zope.event" ,python-zope-event)
12061 ("python-zope.interface" ,python-zope-interface)))
12062 (native-inputs
12063 `(("python-six" ,python-six)
12064
12065 ;; For tests.
12066 ("python-dnspython" ,python-dnspython)
12067 ("python-psutil" ,python-psutil)))
12068 (inputs
12069 `(("c-ares" ,c-ares)
12070 ("libev" ,libev)))
12071 (home-page "http://www.gevent.org/")
12072 (synopsis "Coroutine-based network library")
12073 (description
12074 "gevent is a coroutine-based Python networking library that uses greenlet
12075 to provide a high-level synchronous API on top of the libev event loop.")
12076 (license license:expat)
12077 (properties `((python2-variant . ,(delay python2-gevent))))))
12078
12079 (define-public python2-gevent
12080 (let ((base (package-with-python2
12081 (strip-python2-variant python-gevent))))
12082 (package
12083 (inherit base)
12084 (native-inputs `(,@(package-native-inputs base)
12085 ("python-mock" ,python2-mock)
12086 ("python2-selectors2" ,python2-selectors2))))))
12087
12088 (define-public python-fastimport
12089 (package
12090 (name "python-fastimport")
12091 (version "0.9.8")
12092 (source
12093 (origin
12094 (method url-fetch)
12095 (uri (pypi-uri "fastimport" version))
12096 (sha256
12097 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12098 (build-system python-build-system)
12099 (home-page "https://github.com/jelmer/python-fastimport")
12100 (synopsis "VCS fastimport parser and generator in Python")
12101 (description "This package provides a parser for and generator of the Git
12102 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12103 format.")
12104 (license license:gpl2+)))
12105
12106 (define-public python2-fastimport
12107 (package-with-python2 python-fastimport))
12108
12109 (define-public python-twisted
12110 (package
12111 (name "python-twisted")
12112 (version "19.7.0")
12113 (source (origin
12114 (method url-fetch)
12115 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12116 (sha256
12117 (base32
12118 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12119 (build-system python-build-system)
12120 (arguments
12121 '(#:tests? #f)) ; FIXME: some tests fail
12122 (propagated-inputs
12123 `(("python-zope-interface" ,python-zope-interface)
12124 ("python-pyhamcrest" ,python-pyhamcrest)
12125 ("python-incremental" ,python-incremental)
12126 ("python-hyperlink" ,python-hyperlink)
12127 ("python-constantly" ,python-constantly)
12128 ("python-automat" ,python-automat)))
12129 (home-page "https://twistedmatrix.com/")
12130 (synopsis "Asynchronous networking framework written in Python")
12131 (description
12132 "Twisted is an extensible framework for Python programming, with special
12133 focus on event-based network programming and multiprotocol integration.")
12134 (license license:expat)))
12135
12136 (define-public python2-twisted
12137 (package-with-python2 python-twisted))
12138
12139 (define-public python-pika
12140 (package
12141 (name "python-pika")
12142 (version "0.12.0")
12143 (source
12144 (origin
12145 (method url-fetch)
12146 (uri (pypi-uri "pika" version))
12147 (sha256
12148 (base32
12149 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12150 (build-system python-build-system)
12151 (native-inputs
12152 `(("python-pyev" ,python-pyev)
12153 ("python-tornado" ,python-tornado)
12154 ("python-twisted" ,python-twisted)))
12155 (home-page "https://pika.readthedocs.org")
12156 (synopsis "Pure Python AMQP Client Library")
12157 (description
12158 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12159 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12160 network support library.")
12161 (license license:bsd-3)))
12162
12163 (define-public python2-pika
12164 (package-with-python2 python-pika))
12165
12166 (define-public python-ply
12167 (package
12168 (name "python-ply")
12169 (version "3.11")
12170 (source
12171 (origin
12172 (method url-fetch)
12173 (uri (pypi-uri "ply" version))
12174 (sha256
12175 (base32
12176 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12177 (build-system python-build-system)
12178 (home-page "http://www.dabeaz.com/ply/")
12179 (synopsis "Python Lex & Yacc")
12180 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12181 It uses LR parsing and does extensive error checking.")
12182 (license license:bsd-3)))
12183
12184 (define-public python-tabulate
12185 (package
12186 (name "python-tabulate")
12187 (version "0.8.7")
12188 (source (origin
12189 (method url-fetch)
12190 (uri (pypi-uri "tabulate" version))
12191 (sha256
12192 (base32
12193 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12194 (build-system python-build-system)
12195 (arguments
12196 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12197 ;; and the latest release is not tagged in the upstream repository.
12198 '(#:tests? #f))
12199 (home-page "https://bitbucket.org/astanin/python-tabulate")
12200 (synopsis "Pretty-print tabular data")
12201 (description
12202 "Tabulate is a library and command-line utility to pretty-print tabular
12203 data in Python.")
12204 (license license:expat)))
12205
12206 (define-public python2-tabulate
12207 (package-with-python2 python-tabulate))
12208
12209 (define-public python-kazoo
12210 (package
12211 (name "python-kazoo")
12212 (version "2.4.0")
12213 (source
12214 (origin
12215 (method url-fetch)
12216 (uri (pypi-uri "kazoo" version))
12217 (sha256
12218 (base32
12219 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12220 (build-system python-build-system)
12221 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12222 (propagated-inputs
12223 `(("python-six" ,python-six)))
12224 (home-page "https://kazoo.readthedocs.org")
12225 (synopsis "High-level Zookeeper client library")
12226 (description
12227 "Kazoo is a Python client library for the Apache Zookeeper distributed
12228 application service. It is designed to be easy to use and to avoid common
12229 programming errors.")
12230 (license license:asl2.0)))
12231
12232 (define-public python2-kazoo
12233 (package-with-python2 python-kazoo))
12234
12235 (define-public python-pykafka
12236 (package
12237 (name "python-pykafka")
12238 (version "2.4.0")
12239 (source (origin
12240 (method url-fetch)
12241 (uri (pypi-uri "pykafka" version))
12242 (sha256
12243 (base32
12244 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12245 (build-system python-build-system)
12246 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12247 (propagated-inputs
12248 `(("python-gevent" ,python-gevent)
12249 ("python-kazoo" ,python-kazoo)
12250 ("python-tabulate" ,python-tabulate)))
12251 (inputs
12252 `(("librdkafka" ,librdkafka)))
12253 (home-page "https://pykafka.readthedocs.io/")
12254 (synopsis "Apache Kafka client for Python")
12255 (description
12256 "PyKafka is a client for the Apache Kafka distributed messaging system.
12257 It includes Python implementations of Kafka producers and consumers, which
12258 are optionally backed by a C extension built on librdkafka.")
12259 (license license:asl2.0)))
12260
12261 (define-public python2-pykafka
12262 (package-with-python2 python-pykafka))
12263
12264 (define-public python-wcwidth
12265 (package
12266 (name "python-wcwidth")
12267 (version "0.1.8")
12268 (source (origin
12269 (method url-fetch)
12270 (uri (pypi-uri "wcwidth" version))
12271 (sha256
12272 (base32
12273 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12274 (build-system python-build-system)
12275 (home-page "https://github.com/jquast/wcwidth")
12276 (synopsis "Measure number of terminal column cells of wide-character codes")
12277 (description "Wcwidth measures the number of terminal column cells of
12278 wide-character codes. It is useful for those implementing a terminal emulator,
12279 or programs that carefully produce output to be interpreted by one. It is a
12280 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12281 specified in POSIX.1-2001 and POSIX.1-2008.")
12282 (license license:expat)))
12283
12284 (define-public python2-wcwidth
12285 (package-with-python2 python-wcwidth))
12286
12287 (define-public python2-jsonrpclib
12288 (package
12289 (name "python2-jsonrpclib")
12290 (version "0.1.7")
12291 (source (origin
12292 (method url-fetch)
12293 (uri (pypi-uri "jsonrpclib" version))
12294 (sha256
12295 (base32
12296 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12297 (build-system python-build-system)
12298 (arguments
12299 `(#:tests? #f
12300 #:python ,python-2))
12301 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12302 (synopsis "Implementation of JSON-RPC specification for Python")
12303 (description
12304 "This library is an implementation of the JSON-RPC specification.
12305 It supports both the original 1.0 specification, as well as the
12306 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12307 etc.")
12308 (license license:asl2.0)))
12309
12310 (define-public python-chai
12311 (package
12312 (name "python-chai")
12313 (version "1.1.2")
12314 (source (origin
12315 (method url-fetch)
12316 (uri (pypi-uri "chai" version))
12317 (sha256
12318 (base32
12319 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12320 (build-system python-build-system)
12321 (home-page "https://github.com/agoragames/chai")
12322 (synopsis "Mocking framework for Python")
12323 (description
12324 "Chai provides an api for mocking, stubbing and spying your python
12325 objects, patterned after the Mocha library for Ruby.")
12326 (license license:bsd-3)))
12327
12328 (define-public python2-chai
12329 (package-with-python2 python-chai))
12330
12331 (define-public python-inflection
12332 (package
12333 (name "python-inflection")
12334 (version "0.3.1")
12335 (source
12336 (origin (method url-fetch)
12337 (uri (pypi-uri "inflection" version))
12338 (sha256
12339 (base32
12340 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12341 (build-system python-build-system)
12342 (native-inputs
12343 `(("python-pytest" ,python-pytest)))
12344 (home-page "https://github.com/jpvanhal/inflection")
12345 (synopsis "Python string transformation library")
12346 (description
12347 "Inflection is a string transformation library. It singularizes
12348 and pluralizes English words, and transforms strings from CamelCase to
12349 underscored string.")
12350 (license license:expat)))
12351
12352 (define-public python2-inflection
12353 (package-with-python2 python-inflection))
12354
12355 (define-public python-pylev
12356 (package
12357 (name "python-pylev")
12358 (version "1.3.0")
12359 (source (origin
12360 (method url-fetch)
12361 (uri (pypi-uri "pylev" version))
12362 (sha256
12363 (base32
12364 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12365 (build-system python-build-system)
12366 (home-page "https://github.com/toastdriven/pylev")
12367 (synopsis "Levenshtein distance implementation in Python")
12368 (description "Pure Python Levenshtein implementation, based off the
12369 Wikipedia code samples at
12370 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12371 (license license:bsd-3)))
12372
12373 (define-public python2-pylev
12374 (package-with-python2 python-pylev))
12375
12376 (define-public python-cleo
12377 (package
12378 (name "python-cleo")
12379 (version "0.8.1")
12380 (source (origin
12381 (method url-fetch)
12382 (uri (pypi-uri "cleo" version))
12383 (sha256
12384 (base32
12385 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12386 (build-system python-build-system)
12387 (native-inputs
12388 `( ;; For testing
12389 ("python-mock" ,python-mock)
12390 ("python-pytest-mock" ,python-pytest-mock)
12391 ("python-pytest" ,python-pytest)))
12392 (propagated-inputs
12393 `(("python-backpack" ,python-backpack)
12394 ("python-clikit" ,python-clikit)
12395 ("python-pastel" ,python-pastel)
12396 ("python-pylev" ,python-pylev)))
12397 (home-page "https://github.com/sdispater/cleo")
12398 (synopsis "Command-line arguments library for Python")
12399 (description
12400 "Cleo allows you to create command-line commands with signature in
12401 docstring and colored output.")
12402 (license license:expat)))
12403
12404 (define-public python2-cleo
12405 (package-with-python2 python-cleo))
12406
12407 (define-public python-tomlkit
12408 (package
12409 (name "python-tomlkit")
12410 (version "0.6.0")
12411 (source
12412 (origin
12413 (method url-fetch)
12414 (uri (pypi-uri "tomlkit" version))
12415 (sha256
12416 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12417 (build-system python-build-system)
12418 (native-inputs
12419 `(("python-pytest" ,python-pytest)))
12420 (home-page "https://github.com/sdispater/tomlkit")
12421 (synopsis "Style-preserving TOML library")
12422 (description
12423 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
12424 preserves all comments, indentations, whitespace and internal element ordering,
12425 and makes them accessible and editable via an intuitive API. It can also
12426 create new TOML documents from scratch using the provided helpers. Part of the
12427 implementation has been adapted, improved, and fixed from Molten.")
12428 (license license:expat)))
12429
12430 (define-public python-shellingham
12431 (package
12432 (name "python-shellingham")
12433 (version "1.3.2")
12434 (source
12435 (origin
12436 (method url-fetch)
12437 (uri (pypi-uri "shellingham" version))
12438 (sha256
12439 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12440 (build-system python-build-system)
12441 (arguments
12442 `(#:phases
12443 (modify-phases %standard-phases
12444 (add-after 'unpack 'restore-setup.py
12445 ;; setup.py will return in the next release.
12446 ;; <https://github.com/sarugaku/shellingham/issues/33>
12447 (lambda _
12448 (with-output-to-file "setup.py"
12449 (lambda _
12450 (display "from setuptools import setup\nsetup()\n")))
12451 #t)))))
12452 (home-page "https://github.com/sarugaku/shellingham")
12453 (synopsis "Tool to detect surrounding shell")
12454 (description
12455 "Shellingham detects what shell the current Python executable is
12456 running in.")
12457 (license license:isc)))
12458
12459 (define-public python-memcached
12460 (package
12461 (name "python-memcached")
12462 (version "1.59")
12463 (source
12464 (origin
12465 (method url-fetch)
12466 (uri (pypi-uri "python-memcached" version))
12467 (sha256
12468 (base32
12469 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
12470 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
12471 (build-system python-build-system)
12472 (propagated-inputs `(("python-six" ,python-six)))
12473 (home-page
12474 "https://github.com/linsomniac/python-memcached")
12475 (synopsis "Pure python memcached client")
12476 (description
12477 "This software is a pure Python interface to the memcached memory cache
12478 daemon. It is the client side software which allows storing values in one or
12479 more, possibly remote, memcached servers.")
12480 (license license:psfl)))
12481
12482 (define-public python-clikit
12483 (package
12484 (name "python-clikit")
12485 (version "0.6.2")
12486 (source
12487 (origin
12488 (method url-fetch)
12489 (uri (pypi-uri "clikit" version))
12490 (sha256
12491 (base32
12492 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
12493 (build-system python-build-system)
12494 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
12495 (propagated-inputs
12496 `(("python-crashtest" ,python-crashtest)
12497 ("python-pastel" ,python-pastel)
12498 ("python-pylev" ,python-pylev)))
12499 (home-page "https://github.com/sdispater/clikit")
12500 (synopsis "Group of utilities to build command line interfaces")
12501 (description
12502 "CliKit is a group of utilities to build testable command line
12503 interfaces.")
12504 (properties `((python2-variant . ,(delay python2-clikit))))
12505 (license license:expat)))
12506
12507 (define-public python2-clikit
12508 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12509 (package/inherit
12510 base
12511 (propagated-inputs
12512 `(("python-enum34" ,python2-enum34)
12513 ("python-typing" ,python2-typing)
12514 ,@(package-propagated-inputs base))))))
12515
12516 (define-public python-msgpack-python
12517 (package
12518 (name "python-msgpack-python")
12519 (version "0.5.6")
12520 (source
12521 (origin
12522 (method url-fetch)
12523 (uri (pypi-uri "msgpack-python" version))
12524 (sha256
12525 (base32
12526 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
12527 (build-system python-build-system)
12528 (home-page "http://msgpack.org/")
12529 (synopsis "Package to deserialize messages in MessagePack binary format")
12530 (description
12531 "MessagePack is an efficient binary serialization format. It lets you
12532 exchange data among multiple languages like JSON. But it's faster and
12533 smaller. Small integers are encoded into a single byte, and typical short
12534 strings require only one extra byte in addition to the strings themselves.")
12535 (license license:asl2.0)))
12536
12537 (define-public python-cachy
12538 (package
12539 (name "python-cachy")
12540 (version "0.3.0")
12541 (source
12542 (origin
12543 (method url-fetch)
12544 (uri (pypi-uri "cachy" version))
12545 (sha256
12546 (base32
12547 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
12548 (build-system python-build-system)
12549 (arguments
12550 '(#:phases
12551 (modify-phases %standard-phases
12552 (replace 'check
12553 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
12554 "pytest"))))))
12555 (native-inputs
12556 `(("memcached" ,memcached)
12557 ("python-fakeredis" ,python-fakeredis)
12558 ("python-flexmock" ,python-flexmock)
12559 ("python-pifpaf" ,python-pifpaf)
12560 ("python-pytest" ,python-pytest)))
12561 (propagated-inputs
12562 `(("python-memcached" ,python-memcached)
12563 ("python-msgpack-python" ,python-msgpack-python)
12564 ("python-redis" ,python-redis)))
12565 (home-page "https://github.com/sdispater/cachy")
12566 (synopsis "Simple yet effective caching library")
12567 (description
12568 "Cachy provides a simple yet effective caching library. A simple but
12569 powerful API: thread-safety; decorator syntax; support for memcached, redis,
12570 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
12571 (license license:expat)))
12572
12573 (define-public poetry
12574 (package
12575 (name "poetry")
12576 (version "1.0.10")
12577 ;; Poetry can only be built from source with Poetry.
12578 (source
12579 (origin
12580 (method url-fetch)
12581 (uri (pypi-uri "poetry" version))
12582 (sha256
12583 (base32
12584 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
12585 (build-system python-build-system)
12586 (arguments
12587 `(#:tests? #f ;; Pypi does not have tests.
12588 #:phases
12589 (modify-phases %standard-phases
12590 (add-before 'build 'patch-setup-py
12591 (lambda _
12592 (substitute* "setup.py"
12593 ;; poetry won't update version as 21.0.0 relies on python > 3.6
12594 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
12595 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
12596 ;; Reported upstream:
12597 ;; <https://github.com/python-poetry/poetry/issues/2752>.
12598 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
12599 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
12600 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
12601 #t)))))
12602 (propagated-inputs
12603 `(("python-cachecontrol" ,python-cachecontrol)
12604 ("python-cachy" ,python-cachy)
12605 ("python-cleo" ,python-cleo)
12606 ("python-clikit" ,python-clikit)
12607 ("python-html5lib" ,python-html5lib)
12608 ("python-jsonschema" ,python-jsonschema)
12609 ("python-keyring" ,python-keyring)
12610 ("python-msgpack-transitional" ,python-msgpack-transitional)
12611 ("python-pexpect" ,python-pexpect)
12612 ("python-pkginfo" ,python-pkginfo)
12613 ("python-pyparsing" ,python-pyparsing)
12614 ("python-pyrsistent" ,python-pyrsistent)
12615 ("python-requests" ,python-requests)
12616 ("python-requests-toolbelt" ,python-requests-toolbelt)
12617 ("python-shellingham" ,python-shellingham)
12618 ("python-tomlkit" ,python-tomlkit)
12619 ("python-virtualenv" ,python-virtualenv)))
12620 (home-page "https://python-poetry.org")
12621 (synopsis "Python dependency management and packaging made easy")
12622 (description "Poetry is a tool for dependency management and packaging
12623 in Python. It allows you to declare the libraries your project depends on and
12624 it will manage (install/update) them for you.")
12625 (license license:expat)))
12626
12627 (define-public python-lark-parser
12628 (package
12629 (name "python-lark-parser")
12630 (version "0.9.0")
12631 (source (origin
12632 (method url-fetch)
12633 (uri (pypi-uri "lark-parser" version))
12634 (sha256
12635 (base32
12636 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
12637 (build-system python-build-system)
12638 (home-page "https://github.com/lark-parser/lark")
12639 (synopsis "Multi-language parser for Python")
12640 (description
12641 "Lark is a parser built with a focus on ergonomics, performance and
12642 resilience. Lark can parse all context-free languages. That means it is
12643 capable of parsing almost any programming language out there, and to
12644 some degree most natural languages too.")
12645 (license license:expat)))
12646
12647 (define-public python-libcst
12648 (package
12649 (name "python-libcst")
12650 (version "0.3.8")
12651 (source (origin
12652 (method url-fetch)
12653 (uri (pypi-uri "libcst" version))
12654 (sha256
12655 (base32
12656 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
12657 (build-system python-build-system)
12658 (arguments
12659 `(#:phases
12660 (modify-phases %standard-phases
12661 (add-after 'unpack 'remove-failing-tests
12662 (lambda _
12663 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
12664 (delete-file "libcst/tests/test_fuzz.py")
12665 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
12666 (delete-file "libcst/tests/test_pyre_integration.py")
12667 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
12668 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
12669 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
12670 #t))
12671 (add-before 'check 'generate-test-data
12672 (lambda _
12673 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
12674 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
12675 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
12676 (replace 'check
12677 (lambda _
12678 (invoke "python" "-m" "unittest")
12679 #t)))))
12680 (native-inputs
12681 `(("python-black" ,python-black)
12682 ("python-isort" ,python-isort)))
12683 (propagated-inputs
12684 `(("python-typing-extensions" ,python-typing-extensions)
12685 ("python-typing-inspect" ,python-typing-inspect)
12686 ("python-pyyaml" ,python-pyyaml)))
12687 (home-page "https://github.com/Instagram/LibCST")
12688 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
12689 (description
12690 "LibCST parses Python source code as a CST tree that keeps all
12691 formatting details (comments, whitespaces, parentheses, etc). It's useful
12692 for building automated refactoring (codemod) applications and linters.
12693 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
12694 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
12695 naming node types and fields, LibCST creates a lossless CST that looks and
12696 feels like an AST.")
12697 (license (list license:expat
12698 ;; Some files unde libcst/_parser/ are under Python Software
12699 ;; Foundation license (see LICENSE file for details)
12700 license:psfl
12701 ;; libcst/_add_slots.py
12702 license:asl2.0))))
12703
12704 (define-public python-typing-inspect
12705 (package
12706 (name "python-typing-inspect")
12707 (version "0.6.0")
12708 (source (origin
12709 (method url-fetch)
12710 (uri (pypi-uri "typing_inspect" version))
12711 (sha256
12712 (base32
12713 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
12714 (build-system python-build-system)
12715 (propagated-inputs
12716 `(("python-mypy-extensions" ,python-mypy-extensions)
12717 ("python-typing-extensions" ,python-typing-extensions)))
12718 (home-page "https://github.com/ilevkivskyi/typing_inspect")
12719 (synopsis "API for inspection of types in the Python @code{typing} module")
12720 (description
12721 "The @code{typing_inspect} module defines experimental API for runtime
12722 inspection of types defined in the Python standard typing module.")
12723 (license license:expat)))
12724
12725 (define-public python-lazy-object-proxy
12726 (package
12727 (name "python-lazy-object-proxy")
12728 (version "1.5.1")
12729 (source (origin
12730 (method url-fetch)
12731 (uri (pypi-uri "lazy-object-proxy" version))
12732 (sha256
12733 (base32
12734 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
12735 (native-inputs
12736 `(("python-setuptools-scm" ,python-setuptools-scm)))
12737 (build-system python-build-system)
12738 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
12739 (synopsis "Lazy object proxy for python")
12740 (description
12741 "Lazy object proxy is an object that wraps a callable but defers the call
12742 until the object is actually required, and caches the result of said call.")
12743 (license license:bsd-2)))
12744
12745 (define-public python2-lazy-object-proxy
12746 (package-with-python2 python-lazy-object-proxy))
12747
12748 (define-public python-dnspython
12749 (package
12750 (name "python-dnspython")
12751 (version "1.16.0")
12752 (source (origin
12753 (method url-fetch)
12754 (uri (string-append "http://www.dnspython.org/kits/"
12755 version "/dnspython-" version ".tar.gz"))
12756 (sha256
12757 (base32
12758 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
12759 (build-system python-build-system)
12760 (arguments '(#:tests? #f)) ; XXX: requires internet access
12761 (home-page "http://www.dnspython.org")
12762 (synopsis "DNS toolkit for Python")
12763 (description
12764 "dnspython is a DNS toolkit for Python. It supports almost all record
12765 types. It can be used for queries, zone transfers, and dynamic updates.
12766 It supports TSIG authenticated messages and EDNS0.")
12767 (license license:expat)))
12768
12769 (define-public python2-dnspython
12770 (package-with-python2 python-dnspython))
12771
12772 (define-public python-py3dns
12773 (package
12774 (name "python-py3dns")
12775 (version "3.2.1")
12776 (source
12777 (origin
12778 (method url-fetch)
12779 (uri (pypi-uri "py3dns" version))
12780 (sha256
12781 (base32
12782 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
12783 (build-system python-build-system)
12784 ;; This package wants to read /etc/resolv.conf. We can't patch it without
12785 ;; removing functionality so we copy from Nix and "just don't build it".
12786 (arguments
12787 `(#:phases
12788 (modify-phases %standard-phases
12789 (add-after 'unpack 'patch-source
12790 (lambda _
12791 (substitute* "setup.py"
12792 (("import DNS") "")
12793 (("DNS.__version__") (string-append "\"" ,version "\"")))
12794 #t)))
12795 #:tests? #f)) ; Also skip the tests.
12796 (home-page "https://launchpad.net/py3dns")
12797 (synopsis "Python 3 DNS library")
12798 (description "This Python 3 module provides a DNS API for looking up DNS
12799 entries from within Python 3 modules and applications. This module is a
12800 simple, lightweight implementation.")
12801 (license license:psfl)))
12802
12803 (define-public python-email-validator
12804 (package
12805 (name "python-email-validator")
12806 (version "1.0.2")
12807 (source
12808 (origin (method url-fetch)
12809 (uri (pypi-uri "email_validator" version))
12810 (sha256
12811 (base32
12812 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
12813 (build-system python-build-system)
12814 (arguments
12815 '(#:phases
12816 (modify-phases %standard-phases
12817 (add-before 'build 'use-dnspython
12818 (lambda _
12819 (substitute* "setup.py"
12820 (("dnspython3") "dnspython"))
12821 #t)))))
12822 (propagated-inputs
12823 `(("python-dnspython" ,python-dnspython)
12824 ("python-idna" ,python-idna)))
12825 (home-page "https://github.com/JoshData/python-email-validator")
12826 (synopsis "Email address validation library for Python")
12827 (description
12828 "This library validates email address syntax and deliverability.")
12829 (license license:cc0)))
12830
12831 (define-public python2-email-validator
12832 (package-with-python2 python-email-validator))
12833
12834 (define-public python-ukpostcodeparser
12835 (package
12836 (name "python-ukpostcodeparser")
12837 (version "1.0.3")
12838 (source (origin
12839 (method url-fetch)
12840 (uri (pypi-uri "UkPostcodeParser" version))
12841 (sha256
12842 (base32
12843 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
12844 (build-system python-build-system)
12845 (home-page "https://github.com/hamstah/ukpostcodeparser")
12846 (synopsis "UK Postcode parser for Python")
12847 (description
12848 "This library provides the @code{parse_uk_postcode} function for
12849 parsing UK postcodes.")
12850 (license license:expat)))
12851
12852 (define-public python2-ukpostcodeparser
12853 (package-with-python2 python-ukpostcodeparser))
12854
12855 (define-public python-faker
12856 (package
12857 (name "python-faker")
12858 (version "4.0.2")
12859 (source (origin
12860 (method url-fetch)
12861 (uri (pypi-uri "Faker" version))
12862 (sha256
12863 (base32
12864 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
12865 (build-system python-build-system)
12866 (arguments
12867 '(#:phases
12868 (modify-phases %standard-phases
12869 (replace 'check
12870 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
12871 (native-inputs
12872 `(;; For testing
12873 ("python-freezegun" ,python-freezegun)
12874 ("python-pytest" ,python-pytest)
12875 ("python-random2" ,python-random2)
12876 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
12877 ("python-validators" ,python-validators)))
12878 (propagated-inputs
12879 `(("python-dateutil" ,python-dateutil)
12880 ("python-text-unidecode" ,python-text-unidecode)))
12881 (home-page "https://github.com/joke2k/faker")
12882 (synopsis "Python package that generates fake data")
12883 (description
12884 "Faker is a Python package that generates fake data such as names,
12885 addresses, and phone numbers.")
12886 (license license:expat)
12887 (properties `((python2-variant . ,(delay python2-faker))))))
12888
12889 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
12890 (define-public python2-faker
12891 (let ((base (package-with-python2 (strip-python2-variant
12892 python-faker))))
12893 (package
12894 (inherit base)
12895 (version "3.0.1")
12896 (source (origin
12897 (method url-fetch)
12898 (uri (pypi-uri "Faker" version))
12899 (sha256
12900 (base32
12901 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
12902 (native-inputs
12903 `(("python-mock" ,python2-mock)
12904 ,@(package-native-inputs base)))
12905 (propagated-inputs
12906 `(("python2-ipaddress" ,python2-ipaddress)
12907 ("python2-six" ,python2-six)
12908 ,@(package-propagated-inputs base))))))
12909
12910 (define-public python-pyaml
12911 (package
12912 (name "python-pyaml")
12913 (version "18.11.0")
12914 (source (origin
12915 (method url-fetch)
12916 (uri (pypi-uri "pyaml" version))
12917 (sha256
12918 (base32
12919 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
12920 (build-system python-build-system)
12921 (native-inputs
12922 `(("python-unidecode" ,python-unidecode)))
12923 (propagated-inputs
12924 `(("python-pyyaml" ,python-pyyaml)))
12925 (home-page "https://github.com/mk-fg/pretty-yaml")
12926 (synopsis "YAML pretty-print library for Python")
12927 (description
12928 "pyaml is a PyYAML based python module to produce pretty and readable
12929 YAML-serialized data.")
12930 (license license:wtfpl2)))
12931
12932 (define-public python2-pyaml
12933 (package-with-python2 python-pyaml))
12934
12935 (define-public python-backpack
12936 (package
12937 (name "python-backpack")
12938 (version "0.1")
12939 (source
12940 (origin
12941 (method url-fetch)
12942 (uri (pypi-uri "backpack" version))
12943 (sha256
12944 (base32
12945 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
12946 (build-system python-build-system)
12947 (native-inputs
12948 `(("python-pytest" ,python-pytest)
12949 ("python-nose" ,python-nose)))
12950 (propagated-inputs
12951 `(("python-simplejson" ,python-simplejson)))
12952 (home-page "https://github.com/sdispater/backpack")
12953 (synopsis "Utilities for working with Python collections")
12954 (description "Backpack provides some useful utilities for working with
12955 collections of data.")
12956 (license license:expat)))
12957
12958 (define-public python2-backpack
12959 (package-with-python2 python-backpack))
12960
12961 (define-public python-prompt-toolkit
12962 (package
12963 (name "python-prompt-toolkit")
12964 (version "3.0.5")
12965 (source
12966 (origin
12967 (method url-fetch)
12968 (uri (pypi-uri "prompt_toolkit" version))
12969 (sha256
12970 (base32
12971 "1j3x5s4gp4ih73sbcni0a0vffbzvrxbrbnkvb3fzjgxn810ilgan"))))
12972 (build-system python-build-system)
12973 (arguments
12974 `(#:phases
12975 (modify-phases %standard-phases
12976 (delete 'check)
12977 (add-after 'install 'post-install-check
12978 (lambda* (#:key inputs outputs #:allow-other-keys)
12979 ;; HOME is needed for the test
12980 ;; "test_pathcompleter_can_expanduser".
12981 (setenv "HOME" "/tmp")
12982 (add-installed-pythonpath inputs outputs)
12983 (invoke "py.test"))))))
12984 (propagated-inputs
12985 `(("python-wcwidth" ,python-wcwidth)))
12986 (native-inputs
12987 `(("python-pytest" ,python-pytest)))
12988 (home-page
12989 "https://github.com/prompt-toolkit/python-prompt-toolkit")
12990 (synopsis "Library for building command line interfaces in Python")
12991 (description
12992 "Prompt-Toolkit is a library for building interactive command line
12993 interfaces in Python. It's like GNU Readline but it also features syntax
12994 highlighting while typing, out-of-the-box multi-line input editing, advanced
12995 code completion, incremental search, support for Chinese double-width
12996 characters, mouse support, and auto suggestions.")
12997 (license license:bsd-3)))
12998
12999 (define-public python-prompt-toolkit-2
13000 (package (inherit python-prompt-toolkit)
13001 (name "python-prompt-toolkit")
13002 (version "2.0.7")
13003 (source
13004 (origin
13005 (method url-fetch)
13006 (uri (pypi-uri "prompt_toolkit" version))
13007 (sha256
13008 (base32
13009 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13010 (propagated-inputs
13011 `(("python-wcwidth" ,python-wcwidth)
13012 ("python-six" ,python-six)
13013 ("python-pygments" ,python-pygments)))))
13014
13015 (define-public python2-prompt-toolkit
13016 (package-with-python2 python-prompt-toolkit-2))
13017
13018 (define-public python-prompt-toolkit-1
13019 (package (inherit python-prompt-toolkit-2)
13020 (version "1.0.15")
13021 (source
13022 (origin
13023 (method url-fetch)
13024 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13025 (sha256
13026 (base32
13027 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13028
13029 (define-public python2-prompt-toolkit-1
13030 (package-with-python2 python-prompt-toolkit-1))
13031
13032 (define-public python-jedi
13033 (package
13034 (name "python-jedi")
13035 (version "0.17.2")
13036 (source
13037 (origin
13038 (method url-fetch)
13039 (uri (pypi-uri "jedi" version))
13040 (sha256
13041 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13042 (build-system python-build-system)
13043 (arguments
13044 `(#:phases
13045 (modify-phases %standard-phases
13046 (replace 'check
13047 (lambda _
13048 (setenv "HOME" "/tmp")
13049 (invoke "python" "-m" "pytest" "-vv"))))))
13050 (native-inputs
13051 `(("python-pytest" ,python-pytest)
13052 ("python-docopt" ,python-docopt)))
13053 (propagated-inputs
13054 `(("python-parso" ,python-parso)))
13055 (home-page "https://github.com/davidhalter/jedi")
13056 (synopsis "Autocompletion and static analysis library for Python")
13057 (description
13058 "Jedi is a static analysis tool for Python that can be used in Integrated
13059 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13060 on a deeper level than many other static analysis frameworks for Python.
13061
13062 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13063 well.")
13064 (license license:expat)))
13065
13066 (define-public python2-jedi
13067 (package-with-python2 python-jedi))
13068
13069 (define-public ptpython
13070 (package
13071 (name "ptpython")
13072 (version "0.34")
13073 (source (origin
13074 (method url-fetch)
13075 (uri (pypi-uri "ptpython" version))
13076 (sha256
13077 (base32
13078 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
13079 (build-system python-build-system)
13080 (arguments
13081 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13082 (propagated-inputs
13083 `(("python-docopt" ,python-docopt)
13084 ("python-jedi" ,python-jedi)
13085 ("python-prompt-toolkit" ,python-prompt-toolkit)
13086 ("python-pygments" ,python-pygments)))
13087 (home-page "https://github.com/jonathanslenders/ptpython")
13088 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13089 (description
13090 "ptpython is a Python read-eval-print loop with IDE-like features.
13091 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13092 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13093 etc.")
13094 (license license:bsd-3)
13095 (properties `((python2-variant . ,(delay ptpython-2))))))
13096
13097 (define-public ptpython-2
13098 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13099 (package
13100 (inherit base)
13101 (name "ptpython2"))))
13102
13103 (define-public python-stem
13104 (package
13105 (name "python-stem")
13106 (version "1.8.0")
13107 (source
13108 (origin
13109 (method url-fetch)
13110 (uri (pypi-uri "stem" version))
13111 (sha256
13112 (base32
13113 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13114 (build-system python-build-system)
13115 (arguments
13116 `(#:phases
13117 (modify-phases %standard-phases
13118 (replace 'check
13119 (lambda _
13120 (invoke "./run_tests.py" "--unit")
13121 #t)))))
13122 (native-inputs
13123 `(("python-mock" ,python-mock)
13124 ("python-pycodestyle" ,python-pycodestyle)
13125 ("python-pyflakes" ,python-pyflakes)))
13126 (home-page "https://stem.torproject.org/")
13127 (synopsis
13128 "Python controller library that allows applications to interact with Tor")
13129 (description
13130 "Stem is a Python controller library for Tor. With it you can use Tor's
13131 control protocol to script against the Tor process and read descriptor data
13132 relays publish about themselves.")
13133 (license license:lgpl3)))
13134
13135 (define-public python2-stem
13136 (package-with-python2 python-stem))
13137
13138 (define-public python-pyserial
13139 (package
13140 (name "python-pyserial")
13141 (version "3.4")
13142 (source
13143 (origin
13144 (method url-fetch)
13145 (uri (pypi-uri "pyserial" version))
13146 (sha256
13147 (base32
13148 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13149 (build-system python-build-system)
13150 (arguments
13151 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13152 ;; #:phases
13153 ;; (modify-phases %standard-phases
13154 ;; (replace 'check
13155 ;; (lambda _
13156 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13157 (home-page
13158 "https://github.com/pyserial/pyserial")
13159 (synopsis "Python Serial Port Bindings")
13160 (description "@code{pyserial} provide serial port bindings for Python. It
13161 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13162 and/or Xon/Xoff. The port is accessed in RAW mode.")
13163 (license license:bsd-3)))
13164
13165 (define-public python2-pyserial
13166 (package-with-python2 python-pyserial))
13167
13168 (define-public python-kivy
13169 (package
13170 (name "python-kivy")
13171 (version "1.10.1")
13172 (source
13173 (origin
13174 (method url-fetch)
13175 (uri (pypi-uri "Kivy" version))
13176 (file-name (string-append name "-" version ".tar.gz"))
13177 (sha256
13178 (base32
13179 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13180 (build-system python-build-system)
13181 (arguments
13182 `(#:tests? #f ; Tests require many optional packages
13183 #:phases
13184 (modify-phases %standard-phases
13185 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13186 (lambda* (#:key inputs #:allow-other-keys)
13187 (setenv "KIVY_SDL2_PATH"
13188 (string-append (assoc-ref inputs "sdl-union")
13189 "/include/SDL2"))
13190 #t)))))
13191 (native-inputs
13192 `(("pkg-config" ,pkg-config)
13193 ("python-cython" ,python-cython)))
13194 (inputs
13195 `(("gstreamer" ,gstreamer)
13196 ("mesa" ,mesa)
13197 ("sdl-union"
13198 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13199 (home-page "https://kivy.org")
13200 (synopsis
13201 "Multitouch application framework")
13202 (description
13203 "A software library for rapid development of
13204 hardware-accelerated multitouch applications.")
13205 (license license:expat)))
13206
13207 (define-public python2-kivy
13208 (package-with-python2 python-kivy))
13209
13210 (define-public python-binaryornot
13211 (package
13212 (name "python-binaryornot")
13213 (version "0.4.4")
13214 (source (origin
13215 (method url-fetch)
13216 (uri (pypi-uri "binaryornot" version))
13217 (sha256
13218 (base32
13219 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13220 (build-system python-build-system)
13221 (arguments
13222 `(#:phases
13223 (modify-phases %standard-phases
13224 (add-after 'unpack 'patch-tests
13225 (lambda _
13226 ;; TypeError: binary() got an unexpected keyword argument
13227 ;; 'average_size'.
13228 (substitute* "tests/test_check.py"
13229 (("average_size=512") ""))
13230 #t)))))
13231 (propagated-inputs
13232 `(("python-chardet" ,python-chardet)
13233 ("python-hypothesis" ,python-hypothesis)))
13234 (home-page "https://github.com/audreyr/binaryornot")
13235 (synopsis "Package to check if a file is binary or text")
13236 (description "Ultra-lightweight pure Python package to check if a file is
13237 binary or text.")
13238 (license license:bsd-3)
13239 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13240
13241 (define-public python2-binaryornot
13242 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13243 (package (inherit base)
13244 (propagated-inputs
13245 `(("python2-enum34" ,python2-enum34)
13246 ,@(package-propagated-inputs base))))))
13247
13248 (define-public python-binwalk
13249 (package
13250 (name "python-binwalk")
13251 (version "2.2.0")
13252 (source
13253 (origin
13254 (method git-fetch)
13255 (uri (git-reference
13256 (url "https://github.com/ReFirmLabs/binwalk")
13257 (commit (string-append "v" version))))
13258 (file-name (git-file-name name version))
13259 (sha256
13260 (base32
13261 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13262 (build-system python-build-system)
13263 (arguments
13264 `(#:phases
13265 (modify-phases %standard-phases
13266 (add-before 'check 'set-pythonpath
13267 (lambda _
13268 (setenv "PYTHONPATH"
13269 (string-append
13270 (getcwd) "/src/"
13271 ":" (getenv "PYTHONPATH")))
13272 (setenv "HOME" "")
13273 #t)))))
13274 (native-inputs
13275 `(("python-coverage" ,python-coverage)
13276 ("python-nose" ,python-nose)))
13277 (home-page "https://github.com/ReFirmLabs/binwalk")
13278 (synopsis "Firmware analysis tool")
13279 (description "Binwalk is a tool for analyzing, reverse engineering, and
13280 extracting firmware images")
13281 (license license:expat)))
13282
13283 (define-public python-nltk
13284 (package
13285 (name "python-nltk")
13286 (version "3.2.1")
13287 (source (origin
13288 (method url-fetch)
13289 (uri (pypi-uri "nltk" version))
13290 (sha256
13291 (base32
13292 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13293 (build-system python-build-system)
13294 (arguments
13295 '(;; The tests require some extra resources to be downloaded.
13296 ;; TODO Try packaging these resources.
13297 #:tests? #f))
13298 (home-page "http://nltk.org/")
13299 (synopsis "Natural Language Toolkit")
13300 (description "It provides interfaces to over 50 corpora and lexical
13301 resources such as WordNet, along with a suite of text processing libraries
13302 for classification, tokenization, stemming, tagging, parsing, and semantic
13303 reasoning, wrappers for natural language processing libraries.")
13304 (license license:asl2.0)))
13305
13306 (define-public python2-nltk
13307 (package-with-python2 python-nltk))
13308
13309 (define-public python-pymongo
13310 (package
13311 (name "python-pymongo")
13312 (version "3.7.2")
13313 (source (origin
13314 (method url-fetch)
13315 (uri (pypi-uri "pymongo" version))
13316 (sha256
13317 (base32
13318 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13319 (build-system python-build-system)
13320 (propagated-inputs
13321 `(("python-certifi" ,python-certifi)))
13322 (home-page "https://github.com/mongodb/mongo-python-driver")
13323 (synopsis "Python driver for MongoDB")
13324 (description "Python driver for MongoDB.")
13325 (license license:asl2.0)))
13326
13327 (define-public python2-pymongo
13328 (package-with-python2 python-pymongo))
13329
13330 (define-public python-consul
13331 (package
13332 (name "python-consul")
13333 (version "0.6.1")
13334 (source
13335 (origin
13336 (method url-fetch)
13337 (uri (pypi-uri "python-consul" version))
13338 (sha256
13339 (base32
13340 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13341 (build-system python-build-system)
13342 (arguments
13343 '(#:tests? #f)) ; The tests are not distributed
13344 (propagated-inputs
13345 `(("python-requests" ,python-requests)
13346 ("python-six" ,python-six)))
13347 (home-page "https://github.com/cablehead/python-consul")
13348 (synopsis "Python client for Consul")
13349 (description
13350 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13351 discovery, monitoring and configuration.")
13352 (license license:expat)))
13353
13354 (define-public python2-consul
13355 (package-with-python2 python-consul))
13356
13357 (define-public python-schematics
13358 (package
13359 (name "python-schematics")
13360 (version "1.1.1")
13361 (source
13362 (origin
13363 (method git-fetch)
13364 (uri (git-reference
13365 (url "https://github.com/schematics/schematics")
13366 (commit (string-append "v" version))))
13367 (file-name (git-file-name name version))
13368 (sha256
13369 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13370 (build-system python-build-system)
13371 (propagated-inputs
13372 `(("python-six" ,python-six)))
13373 (arguments
13374 ;; The tests require a bunch of not very nice packages with fixed
13375 ;; version requirements (e.g. python-coveralls).
13376 `(#:tests? #f))
13377 (home-page "https://github.com/schematics/schematics")
13378 (synopsis "Python Data Structures for Humans")
13379 (description "Python Data Structures for Humans.")
13380 (license license:bsd-3)))
13381
13382 (define-public python2-schematics
13383 (package-with-python2 python-schematics))
13384
13385 (define-public python-odfpy
13386 (package
13387 (name "python-odfpy")
13388 (version "1.4.1")
13389 (source (origin
13390 (method url-fetch)
13391 (uri (pypi-uri "odfpy" version))
13392 (sha256
13393 (base32
13394 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13395 (arguments
13396 `(#:phases
13397 (modify-phases %standard-phases
13398 (replace 'check
13399 (lambda _
13400 (setenv "PYTHONPATH" (string-append "./build/lib:"
13401 (getenv "PYTHONPATH")))
13402 (invoke "pytest" "-vv"))))))
13403 (build-system python-build-system)
13404 (native-inputs
13405 `(("python-pytest" ,python-pytest)))
13406 (propagated-inputs
13407 `(("python-defusedxml" ,python-defusedxml)))
13408 (home-page "https://github.com/eea/odfpy")
13409 (synopsis "Python API and tools to manipulate OpenDocument files")
13410 (description "Collection of libraries and utility programs written in
13411 Python to manipulate OpenDocument 1.2 files.")
13412 (license
13413 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13414 ;; number of files with other licenses.
13415 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13416
13417 (define-public python2-odfpy
13418 (package-with-python2 python-odfpy))
13419
13420 (define-public python-natsort
13421 (package
13422 (name "python-natsort")
13423 (version "7.0.1")
13424 (source (origin
13425 (method url-fetch)
13426 (uri (pypi-uri "natsort" version))
13427 (sha256
13428 (base32
13429 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13430 (build-system python-build-system)
13431 (arguments
13432 `(#:modules ((guix build utils)
13433 (guix build python-build-system)
13434 (srfi srfi-1)
13435 (srfi srfi-26)
13436 (ice-9 ftw))
13437 #:phases
13438 (modify-phases %standard-phases
13439 (add-before 'check 'set-cachedir
13440 ;; Tests require write access to $HOME by default
13441 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
13442 (replace 'check
13443 (lambda _
13444 (let ((cwd (getcwd)))
13445 (setenv "PYTHONPATH"
13446 (string-append
13447 cwd "/build/"
13448 (find (cut string-prefix? "lib" <>)
13449 (scandir (string-append cwd "/build")))
13450 ":"
13451 (getenv "PYTHONPATH")))
13452 (invoke "pytest" "-v")))))))
13453 (native-inputs
13454 `(("python-hypothesis" ,python-hypothesis)
13455 ("python-pytest-cov" ,python-pytest-cov)
13456 ("python-pytest-mock" ,python-pytest-mock)
13457 ("python-pytest" ,python-pytest)))
13458 (propagated-inputs ; TODO: Add python-fastnumbers.
13459 `(("python-pyicu" ,python-pyicu)))
13460 (home-page "https://github.com/SethMMorton/natsort")
13461 (synopsis "Natural sorting for python and shell")
13462 (description
13463 "Natsort lets you apply natural sorting on lists instead of
13464 lexicographical. If you use the built-in @code{sorted} method in python
13465 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
13466 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
13467 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
13468 identifies numbers and sorts them separately from strings. It can also sort
13469 version numbers, real numbers, mixed types and more, and comes with a shell
13470 command @command{natsort} that exposes this functionality in the command line.")
13471 (license license:expat)
13472 (properties `((python2-variant . ,(delay python2-natsort))))))
13473
13474 ;; Natsort 6.x are the last versions with support for Python 2.
13475 (define-public python2-natsort
13476 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13477 (package (inherit base)
13478 (version "6.2.1")
13479 (source (origin
13480 (method url-fetch)
13481 (uri (pypi-uri "natsort" version))
13482 (sha256
13483 (base32
13484 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
13485 (native-inputs
13486 `(("python2-pathlib" ,python2-pathlib)
13487 ,@(package-native-inputs base))))))
13488
13489 (define-public glances
13490 (package
13491 (name "glances")
13492 (version "3.1.4")
13493 (source
13494 (origin
13495 (method url-fetch)
13496 (uri (pypi-uri "Glances" version))
13497 (sha256
13498 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
13499 (modules '((guix build utils)))
13500 (snippet
13501 '(begin
13502 ;; Glances phones PyPI for weekly update checks by default.
13503 ;; Disable these. The user can re-enable them if desired.
13504 (substitute* "glances/outdated.py"
13505 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
13506 (string-append indentation
13507 "self.args.disable_check_update = True\n"
13508 line)))
13509 #t))))
13510 (build-system python-build-system)
13511 (propagated-inputs
13512 `(("python-future" ,python-future)
13513 ("python-psutil" ,python-psutil)))
13514 (home-page "https://github.com/nicolargo/glances")
13515 (synopsis "Cross-platform curses-based monitoring tool")
13516 (description
13517 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13518 Glances uses the PsUtil library to get information from your system. It
13519 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13520 (license license:lgpl3+)))
13521
13522 (define-public python-glances
13523 (deprecated-package "python-glances" glances))
13524
13525 (define-public python-graphql-core
13526 (package
13527 (name "python-graphql-core")
13528 (version "0.5.3")
13529 (source
13530 (origin
13531 (method url-fetch)
13532 (uri (pypi-uri "graphql-core" version))
13533 (sha256
13534 (base32
13535 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13536 (build-system python-build-system)
13537 (arguments
13538 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13539 #:phases
13540 (modify-phases %standard-phases
13541 (add-after 'unpack 'patch-hardcoded-version
13542 (lambda _ (substitute*
13543 "setup.py"
13544 (("'gevent==1.1rc1'") "'gevent'"))
13545 #t)))))
13546 (native-inputs
13547 `(("python-gevent" ,python-gevent)
13548 ("python-mock" ,python-mock)
13549 ("python-pytest-mock" ,python-pytest-mock)))
13550 (propagated-inputs
13551 `(("python-promise" ,python-promise)
13552 ("python-six" ,python-six)))
13553 (home-page "https://github.com/graphql-python/graphql-core")
13554 (synopsis "GraphQL implementation for Python")
13555 (description
13556 "GraphQL implementation for Python. GraphQL is a data query language and
13557 runtime designed and used to request and deliver data to mobile and web apps.
13558 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13559 to Python.")
13560 (license license:expat)))
13561
13562 (define-public python2-graphql-core
13563 (package-with-python2 python-graphql-core))
13564
13565 (define-public python-graphql-relay
13566 (package
13567 (name "python-graphql-relay")
13568 (version "0.4.5")
13569 (source
13570 (origin
13571 (method url-fetch)
13572 (uri (pypi-uri "graphql-relay" version))
13573 (sha256
13574 (base32
13575 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13576 (build-system python-build-system)
13577 (arguments
13578 '(#:tests? #f)) ; The tests are not distributed
13579 (propagated-inputs
13580 `(("python-graphql-core" ,python-graphql-core)
13581 ("python-promise" ,python-promise)
13582 ("python-six" ,python-six)))
13583 (home-page "https://github.com/graphql-python/graphql-relay-py")
13584 (synopsis "Relay implementation for Python")
13585 (description
13586 "This is a library to allow the easy creation of Relay-compliant servers
13587 using the GraphQL Python reference implementation of a GraphQL server. It
13588 should be noted that the code is a exact port of the original
13589 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13590 from Facebook.")
13591 (license license:expat)))
13592
13593 (define-public python2-graphql-relay
13594 (package-with-python2 python-graphql-relay))
13595
13596 (define-public python-graphene
13597 (package
13598 (name "python-graphene")
13599 (version "0.10.2")
13600 (source
13601 (origin
13602 (method url-fetch)
13603 (uri (pypi-uri "graphene" version))
13604 (sha256
13605 (base32
13606 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13607 (build-system python-build-system)
13608 (propagated-inputs
13609 `(("python-graphql-core" ,python-graphql-core)
13610 ("python-graphql-relay" ,python-graphql-relay)
13611 ("python-iso8601" ,python-iso8601)
13612 ("python-promise" ,python-promise)
13613 ("python-six" ,python-six)))
13614 (arguments
13615 `(#:tests? #f)) ; no tests/ in the PyPI tarball
13616 (home-page "https://graphene-python.org/")
13617 (synopsis "GraphQL Framework for Python")
13618 (description
13619 "Graphene is a Python library for building GraphQL schemas/types.
13620 A GraphQL schema describes your data model, and provides a GraphQL server
13621 with an associated set of resolve methods that know how to fetch data.")
13622 (properties `((python2-variant . ,(delay python2-graphene))))
13623 (license license:expat)))
13624
13625 (define-public python2-graphene
13626 (let ((base (package-with-python2
13627 (strip-python2-variant python-graphene))))
13628 (package (inherit base)
13629 (native-inputs
13630 `(("python2-sqlalchemy" ,python2-sqlalchemy)
13631 ,@(package-native-inputs base))))))
13632
13633 (define-public python-nautilus
13634 (package
13635 (name "python-nautilus")
13636 (version "0.4.9")
13637 (source
13638 (origin
13639 (method url-fetch)
13640 (uri (pypi-uri "nautilus" version))
13641 (sha256
13642 (base32
13643 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13644 (build-system python-build-system)
13645 (arguments `(#:tests? #f)) ; fails to import test modules
13646 (propagated-inputs
13647 `(("python-bcrypt" ,python-bcrypt)
13648 ("python-click" ,python-click)
13649 ("python-consul" ,python-consul)
13650 ("python-graphene" ,python-graphene)
13651 ("python-jinja2" ,python-jinja2)
13652 ("python-peewee" ,python-peewee)
13653 ("python-pika" ,python-pika)
13654 ("python-tornado" ,python-tornado)
13655 ("python-wtforms" ,python-wtforms)))
13656 (native-inputs
13657 `(("python-nose2" ,python-nose2)))
13658 (home-page "https://github.com/AlecAivazis/nautilus")
13659 (synopsis "Library for creating microservice applications")
13660 (description
13661 "Nautilus is a framework for flux based microservices that looks to
13662 provide extendible implementations of common aspects of a cloud so that you can
13663 focus on building massively scalable web applications.")
13664 (license license:expat)))
13665
13666 (define-public python-random2
13667 (package
13668 (name "python-random2")
13669 (version "1.0.1")
13670 (source (origin
13671 (method url-fetch)
13672 (uri (pypi-uri "random2" version ".zip"))
13673 (sha256
13674 (base32
13675 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
13676 (build-system python-build-system)
13677 (native-inputs `(("unzip" ,unzip)))
13678 (home-page "http://pypi.python.org/pypi/random2")
13679 (synopsis "Python 3 version of the Python 2 @code{random} module")
13680 (description
13681 "This package provides a Python 3 ported version of Python 2.7’s
13682 @code{random} module. It has also been back-ported to work in Python 2.6.
13683
13684 In Python 3, the implementation of @code{randrange()} was changed, so that
13685 even with the same seed you get different sequences in Python 2 and 3.
13686
13687 This package closes that gap, allowing stable random number generation
13688 between the different Python versions.")
13689 (license license:psfl)))
13690
13691 (define-public python2-random2
13692 (package-with-python2 python-random2))
13693
13694 (define-public python-snowballstemmer
13695 (package
13696 (name "python-snowballstemmer")
13697 (version "2.0.0")
13698 (source (origin
13699 (method url-fetch)
13700 (uri (pypi-uri "snowballstemmer" version))
13701 (sha256
13702 (base32
13703 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
13704 (build-system python-build-system)
13705 (arguments
13706 `(;; No tests exist
13707 #:tests? #f))
13708 (home-page "https://github.com/shibukawa/snowball_py")
13709 (synopsis "Snowball stemming library collection for Python")
13710 (description "This package provides 16 word stemmer algorithms generated
13711 from Snowball algorithms. It includes the 15 original ones plus the Poerter
13712 English stemmer.")
13713 (license license:bsd-3)))
13714
13715 (define-public python2-snowballstemmer
13716 (package-with-python2 python-snowballstemmer))
13717
13718 (define-public python-setproctitle
13719 (package
13720 (name "python-setproctitle")
13721 (version "1.1.10")
13722 (source
13723 (origin
13724 (method url-fetch)
13725 (uri (pypi-uri "setproctitle" version))
13726 (sha256
13727 (base32
13728 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13729 (build-system python-build-system)
13730 (arguments
13731 '(#:phases
13732 (modify-phases %standard-phases
13733 (add-before 'check 'patch-Makefile
13734 ;; Stricly this is only required for the python2 variant.
13735 ;; But adding a phase in an inherited package seems to be
13736 ;; cumbersum. So we patch even for python3.
13737 (lambda _
13738 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13739 (when nose
13740 (substitute* "Makefile"
13741 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13742 (string-append nose "/bin/nosetests "))))
13743 #t)))
13744 (replace 'check
13745 (lambda _
13746 (setenv "PYTHON" (or (which "python3") (which "python")))
13747 (setenv "PYCONFIG" (if (which "python3-config")
13748 "python3-config --embed"
13749 "python-config"))
13750 (setenv "CC" "gcc")
13751 ;; No need to extend PYTHONPATH to find the built package, since
13752 ;; the Makefile will build anyway
13753 (invoke "make" "check"))))))
13754 (native-inputs
13755 `(("procps" ,procps))) ; required for tests
13756 (home-page "https://github.com/dvarrazzo/py-setproctitle")
13757 (synopsis
13758 "Setproctitle implementation for Python to customize the process title")
13759 (description "The library allows a process to change its title (as displayed
13760 by system tools such as ps and top).
13761
13762 Changing the title is mostly useful in multi-process systems, for
13763 example when a master process is forked: changing the children's title
13764 allows identifying the task each process is busy with. The technique
13765 is used by PostgreSQL and the OpenSSH Server for example.")
13766 (license license:bsd-3)
13767 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13768
13769 (define-public python2-setproctitle
13770 (let ((base (package-with-python2
13771 (strip-python2-variant python-setproctitle))))
13772 (package
13773 (inherit base)
13774 (native-inputs `(("python2-nose" ,python2-nose)
13775 ,@(package-native-inputs base))))))
13776
13777 (define-public python-validictory
13778 (package
13779 (name "python-validictory")
13780 (version "1.0.1")
13781 (source
13782 (origin
13783 (method url-fetch)
13784 (uri (pypi-uri "validictory" version))
13785 (sha256
13786 (base32
13787 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13788 (build-system python-build-system)
13789 (arguments
13790 '(#:phases
13791 (modify-phases %standard-phases
13792 (add-after 'unpack 'bootstrap
13793 ;; Move the tests out of the package directory to avoid
13794 ;; packaging them.
13795 (lambda* _
13796 (rename-file "validictory/tests" "tests")
13797 (delete-file "tests/__init__.py")))
13798 (replace 'check
13799 (lambda _
13800 ;; Extend PYTHONPATH so the built package will be found.
13801 (setenv "PYTHONPATH"
13802 (string-append (getcwd) "/build/lib:"
13803 (getenv "PYTHONPATH")))
13804 (invoke "py.test" "-vv" ))))))
13805 (native-inputs
13806 `(("python-pytest" ,python-pytest)))
13807 (home-page
13808 "https://github.com/jamesturk/validictory")
13809 (synopsis "General purpose Python data validator")
13810 (description "It allows validation of arbitrary Python data structures.
13811
13812 The schema format is based on the JSON Schema
13813 proposal (http://json-schema.org), so combined with json the library is also
13814 useful as a validator for JSON data.")
13815 (license license:expat)))
13816
13817 (define-public python2-validictory
13818 (package-with-python2 python-validictory))
13819
13820 (define-public python-pyelftools
13821 (package
13822 (name "python-pyelftools")
13823 (version "0.25")
13824 (source
13825 (origin
13826 (method url-fetch)
13827 (uri (pypi-uri "pyelftools" version))
13828 (sha256
13829 (base32
13830 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
13831 (build-system python-build-system)
13832 (arguments
13833 `(#:phases
13834 (modify-phases %standard-phases
13835 (add-before 'check 'set-pythonpath
13836 (lambda _
13837 (setenv "PYTHONPATH"
13838 (string-append
13839 (getcwd) "/test/"
13840 ":" (getenv "PYTHONPATH")))
13841 #t)))))
13842 (home-page
13843 "https://github.com/eliben/pyelftools")
13844 (synopsis
13845 "Analyze binary and library file information")
13846 (description "This Python library provides interfaces for parsing and
13847 analyzing two binary and library file formats; the Executable and Linking
13848 Format (ELF), and debugging information in the Debugging With Attributed
13849 Record Format (DWARF).")
13850 (license license:public-domain)))
13851
13852 (define-public python-pyev
13853 (package
13854 (name "python-pyev")
13855 (version "0.9.0")
13856 (source
13857 (origin
13858 (method url-fetch)
13859 (uri (pypi-uri "pyev" version))
13860 (sha256
13861 (base32
13862 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13863 (build-system python-build-system)
13864 (arguments
13865 `(#:tests? #f ; no test suite
13866 #:phases
13867 (modify-phases %standard-phases
13868 (add-after 'unpack 'patch
13869 (lambda* (#:key inputs #:allow-other-keys)
13870 (let ((libev (string-append (assoc-ref inputs "libev")
13871 "/lib/libev.so.4")))
13872 (substitute* "setup.py"
13873 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13874 (string-append "libev_dll_name = \"" libev "\"")))))))))
13875 (inputs
13876 `(("libev" ,libev)))
13877 (home-page "http://pythonhosted.org/pyev/")
13878 (synopsis "Python libev interface")
13879 (description "Pyev provides a Python interface to libev.")
13880 (license license:gpl3)))
13881
13882 (define-public python2-pyev
13883 (package-with-python2 python-pyev))
13884
13885 (define-public python-imagesize
13886 (package
13887 (name "python-imagesize")
13888 (version "1.2.0")
13889 (source
13890 (origin
13891 (method url-fetch)
13892 (uri (pypi-uri "imagesize" version))
13893 (sha256
13894 (base32
13895 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
13896 (build-system python-build-system)
13897 (home-page "https://github.com/shibukawa/imagesize_py")
13898 (synopsis "Gets image size of files in various formats in Python")
13899 (description
13900 "This package allows determination of image size from
13901 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13902 (license license:expat)))
13903
13904 (define-public python2-imagesize
13905 (package-with-python2 python-imagesize))
13906
13907 (define-public python-termstyle
13908 (package
13909 (name "python-termstyle")
13910 (version "0.1.11")
13911 (source
13912 (origin
13913 (method url-fetch)
13914 (uri (pypi-uri "termstyle" version))
13915 (sha256
13916 (base32
13917 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13918 (build-system python-build-system)
13919 (arguments
13920 '(#:phases
13921 (modify-phases %standard-phases
13922 (replace 'check
13923 (lambda _
13924 (invoke "python" "test3.py"))))))
13925 (home-page "https://github.com/gfxmonk/termstyle")
13926 (synopsis "Console text coloring for Python")
13927 (description "This package provides console text coloring for Python.")
13928 (license license:bsd-3)))
13929
13930 (define-public python-argcomplete
13931 (package
13932 (name "python-argcomplete")
13933 (version "1.11.1")
13934 (source
13935 (origin
13936 (method url-fetch)
13937 (uri (pypi-uri "argcomplete" version))
13938 (sha256
13939 (base32
13940 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
13941 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
13942 (build-system python-build-system)
13943 (native-inputs
13944 `(("python-coverage" ,python-coverage)
13945 ("python-flake8" ,python-flake8)
13946 ("python-pexpect" ,python-pexpect)
13947 ("python-wheel" ,python-wheel)
13948 ("tcsh" ,tcsh)
13949 ("fish" ,fish)
13950 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
13951 (home-page "https://github.com/kislyuk/argcomplete")
13952 (synopsis "Shell tab completion for Python argparse")
13953 (description "argcomplete provides extensible command line tab completion
13954 of arguments and options for Python scripts using @code{argparse}. It's
13955 particularly useful for programs with many options or sub-parsers that can
13956 dynamically suggest completions; for example, when browsing resources over the
13957 network.")
13958 (license license:asl2.0)))
13959
13960 (define-public python2-argcomplete
13961 (package-with-python2 python-argcomplete))
13962
13963 (define-public python-csscompressor
13964 (package
13965 (name "python-csscompressor")
13966 (version "0.9.5")
13967 (source
13968 (origin
13969 (method url-fetch)
13970 (uri (pypi-uri "csscompressor" version))
13971 (sha256
13972 (base32
13973 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
13974 (build-system python-build-system)
13975 (arguments
13976 '(#:phases
13977 (modify-phases %standard-phases
13978 (replace 'check
13979 (lambda _
13980 (invoke "py.test"))))))
13981 (native-inputs
13982 `(("python-pytest" ,python-pytest)))
13983 (home-page "https://github.com/sprymix/csscompressor")
13984 (synopsis "Python port of YUI CSS Compressor")
13985 (description
13986 "This package provides a python port of YUI CSS Compressor.")
13987 (license license:bsd-3)))
13988
13989 (define-public python-rcssmin
13990 (package
13991 (name "python-rcssmin")
13992 (version "1.0.6")
13993 (source
13994 (origin
13995 (method url-fetch)
13996 (uri (pypi-uri "rcssmin" version))
13997 (sha256
13998 (base32
13999 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14000 (build-system python-build-system)
14001 (arguments
14002 '(#:phases
14003 (modify-phases %standard-phases
14004 (replace 'check
14005 (lambda _
14006 (invoke "python" "run_tests.py" "tests"))))))
14007 (home-page "http://opensource.perlig.de/rcssmin/")
14008 (synopsis "CSS Minifier")
14009 (description "The minifier is based on the semantics of the YUI compressor,
14010 which itself is based on the rule list by Isaac Schlueter.")
14011 (license license:asl2.0)))
14012
14013 (define-public python-rjsmin
14014 (package
14015 (name "python-rjsmin")
14016 (version "1.1.0")
14017 (source
14018 (origin
14019 (method url-fetch)
14020 (uri (pypi-uri "rjsmin" version))
14021 (sha256
14022 (base32
14023 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14024 (modules '((guix build utils)))
14025 (snippet
14026 '(begin
14027 (for-each delete-file (find-files "bench" "\\.js$"))
14028 #t))))
14029 (build-system python-build-system)
14030 (arguments
14031 '(#:tests? #f ; Not all test files included.
14032 #:phases
14033 (modify-phases %standard-phases
14034 (replace 'check
14035 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14036 (add-installed-pythonpath inputs outputs)
14037 (if tests?
14038 (invoke "py.test" "-vv" "tests")
14039 #t))))))
14040 (native-inputs
14041 `(("python-pytest" ,python-pytest)))
14042 (home-page "http://opensource.perlig.de/rjsmin/")
14043 (synopsis "Javascript Minifier")
14044 (description "@code{rJSmin} is a javascript minifier written in Python. The
14045 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14046 is a re-implementation aiming for speed, so it can be used at runtime (rather
14047 than during a preprocessing step).")
14048 (license license:asl2.0)))
14049
14050 (define-public python-xopen
14051 (package
14052 (name "python-xopen")
14053 (version "0.5.0")
14054 (source
14055 (origin
14056 (method url-fetch)
14057 (uri (pypi-uri "xopen" version))
14058 (sha256
14059 (base32
14060 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14061 (build-system python-build-system)
14062 (propagated-inputs
14063 `(("python-setuptools-scm" ,python-setuptools-scm)))
14064 (home-page "https://github.com/marcelm/xopen/")
14065 (synopsis "Open compressed files transparently")
14066 (description "This module provides an @code{xopen} function that works like
14067 Python's built-in @code{open} function, but can also deal with compressed files.
14068 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14069 recognized by their file extensions. The focus is on being as efficient as
14070 possible on all supported Python versions.")
14071 (license license:expat)))
14072
14073 (define-public python2-xopen
14074 (let ((base (package-with-python2
14075 (strip-python2-variant python-xopen))))
14076 (package
14077 (inherit base)
14078 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14079 ,@(package-propagated-inputs base))))))
14080
14081 (define-public python-cheetah
14082 (package
14083 (name "python-cheetah")
14084 (version "3.2.4")
14085 (source
14086 (origin
14087 (method url-fetch)
14088 (uri (pypi-uri "Cheetah3" version))
14089 (sha256
14090 (base32
14091 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14092 (build-system python-build-system)
14093 (arguments
14094 `(#:modules ((guix build utils)
14095 (guix build python-build-system)
14096 (ice-9 ftw)
14097 (srfi srfi-1)
14098 (srfi srfi-26))
14099 #:phases (modify-phases %standard-phases
14100 (add-after 'unpack 'use-absolute-python
14101 (lambda _
14102 (substitute* "Cheetah/CheetahWrapper.py"
14103 (("#!/usr/bin/env python")
14104 (string-append "#!" (which "python"))))
14105 #t))
14106 (add-after 'unpack 'fix-tests
14107 (lambda _
14108 (substitute* "Cheetah/Tests/ImportHooks.py"
14109 (("os.path.dirname\\(__file__\\)")
14110 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14111 #t))
14112 (replace 'check
14113 (lambda _
14114 (let ((cwd (getcwd)))
14115 (setenv "PYTHONPATH"
14116 (string-append
14117 cwd "/build/"
14118 (find (cut string-prefix? "lib" <>)
14119 (scandir (string-append cwd "/build")))
14120 ":" (getenv "PYTHONPATH")))
14121 (setenv "PATH"
14122 (string-append (getenv "PATH")
14123 ":" cwd "/bin"))
14124 (setenv "TMPDIR" "/tmp")
14125
14126 (substitute* "Cheetah/Tests/Test.py"
14127 (("unittest.TextTestRunner\\(\\)")
14128 "unittest.TextTestRunner(verbosity=2)"))
14129
14130 (invoke "python" "Cheetah/Tests/Test.py")))))))
14131 (propagated-inputs
14132 `(("python-markdown" ,python-markdown))) ;optional
14133 (home-page "https://cheetahtemplate.org/")
14134 (synopsis "Template engine")
14135 (description "Cheetah is a text-based template engine and Python code
14136 generator.
14137
14138 Cheetah can be used as a standalone templating utility or referenced as
14139 a library from other Python applications. It has many potential uses,
14140 but web developers looking for a viable alternative to ASP, JSP, PHP and
14141 PSP are expected to be its principle user group.
14142
14143 Features:
14144 @enumerate
14145 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14146 text-based format.
14147 @item Cleanly separates content, graphic design, and program code.
14148 @item Blends the power and flexibility of Python with a simple template language
14149 that non-programmers can understand.
14150 @item Gives template writers full access to any Python data structure, module,
14151 function, object, or method in their templates.
14152 @item Makes code reuse easy by providing an object-orientated interface to
14153 templates that is accessible from Python code or other Cheetah templates.
14154 One template can subclass another and selectively reimplement sections of it.
14155 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14156 improve the performance of a dynamic website.
14157 @item Compiles templates into optimized, yet readable, Python code.
14158 @end enumerate")
14159 (license (license:x11-style "file://LICENSE"))))
14160
14161 (define-public python2-cheetah
14162 (package-with-python2 python-cheetah))
14163
14164 (define-public python-dulwich
14165 (package
14166 (name "python-dulwich")
14167 (version "0.19.16")
14168 (source
14169 (origin
14170 (method url-fetch)
14171 (uri (list (string-append "https://www.dulwich.io/releases/"
14172 "dulwich-" version ".tar.gz")
14173 (pypi-uri "dulwich" version)))
14174 (sha256
14175 (base32
14176 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14177 (build-system python-build-system)
14178 (arguments
14179 `(#:phases
14180 (modify-phases %standard-phases
14181 (add-before 'check 'fix-tests
14182 (lambda* (#:key inputs #:allow-other-keys)
14183 ;; The tests use Popen with a custom environment which doesn't
14184 ;; include PATH.
14185 (substitute* "dulwich/tests/compat/utils.py"
14186 (("'git'") (string-append "'"
14187 (which "git")
14188 "'")))
14189 (substitute* '("dulwich/tests/test_repository.py"
14190 "dulwich/tests/test_hooks.py")
14191 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14192 (setenv "TEST_RUNNER" "unittest")
14193 (setenv "PYTHONHASHSEED" "random")
14194 #t)))))
14195 (propagated-inputs
14196 `(("python-fastimport" ,python-fastimport)
14197 ("python-urllib3" ,python-urllib3)))
14198 (native-inputs
14199 `(("python-mock" ,python-mock)
14200 ("python-geventhttpclient" ,python-geventhttpclient)
14201 ("git" ,git)))
14202 (home-page "https://www.dulwich.io/")
14203 (synopsis "Git implementation in Python")
14204 (description "Dulwich is an implementation of the Git file formats and
14205 protocols written in pure Python.")
14206 ;; Can be used with either license.
14207 (license (list license:asl2.0 license:gpl2+))))
14208
14209 (define-public python2-dulwich
14210 (package-with-python2 python-dulwich))
14211
14212 (define-public python-pbkdf2
14213 (package
14214 (name "python-pbkdf2")
14215 (version "1.3")
14216 (source
14217 (origin
14218 (method url-fetch)
14219 (uri (pypi-uri "pbkdf2" version))
14220 (sha256
14221 (base32
14222 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14223 (build-system python-build-system)
14224 (arguments
14225 '(#:phases
14226 (modify-phases %standard-phases
14227 (replace 'check
14228 (lambda _
14229 (setenv "PYTHONPATH"
14230 (string-append (getcwd) "/build/lib:"
14231 (getenv "PYTHONPATH")))
14232 (invoke "python" "test/test_pbkdf2.py"))))))
14233 (propagated-inputs
14234 `(("python-pycrypto" ,python-pycrypto))) ; optional
14235 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14236 (synopsis "Password-based key derivation")
14237 (description "This module implements the password-based key derivation
14238 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14239
14240 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14241 is part of the RSA Public Key Cryptography Standards series. The provided
14242 implementation takes a password or a passphrase and a salt value (and
14243 optionally a iteration count, a digest module, and a MAC module) and provides
14244 a file-like object from which an arbitrarly-sized key can be read.")
14245 (license license:expat)))
14246
14247 (define-public python2-pbkdf2
14248 (package-with-python2 python-pbkdf2))
14249
14250 (define-public python-qrcode
14251 (package
14252 (name "python-qrcode")
14253 (version "6.1")
14254 (source
14255 (origin
14256 (method url-fetch)
14257 (uri (pypi-uri "qrcode" version))
14258 (sha256
14259 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14260 (build-system python-build-system)
14261 (arguments
14262 ;; FIXME: Tests require packaging 'pymaging'.
14263 '(#:tests? #f))
14264 (propagated-inputs
14265 `(("python-lxml" ,python-lxml) ; for SVG output
14266 ("python-pillow" ,python-pillow) ; for PNG output
14267 ("python-six" ,python-six)))
14268 (home-page "https://github.com/lincolnloop/python-qrcode")
14269 (synopsis "QR Code image generator")
14270 (description "This package provides a pure Python QR Code generator
14271 module. It uses the Python Imaging Library (PIL) to allow for the generation
14272 of QR Codes.
14273
14274 In addition this package provides a command line tool to generate QR codes and
14275 either write these QR codes to a file or do the output as ascii art at the
14276 console.")
14277 (license license:bsd-3)))
14278
14279 (define-public python2-qrcode
14280 (package-with-python2 python-qrcode))
14281
14282 (define-public python-rst2ansi
14283 (package
14284 (name "python-rst2ansi")
14285 (version "0.1.5")
14286 (source
14287 (origin
14288 (method url-fetch)
14289 (uri (pypi-uri "rst2ansi" version))
14290 (sha256
14291 (base32
14292 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14293 (build-system python-build-system)
14294 (propagated-inputs
14295 `(("python-docutils" ,python-docutils)))
14296 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14297 (synopsis "Convert RST to ANSI-decorated console output")
14298 (description
14299 "Python module dedicated to rendering RST (reStructuredText) documents
14300 to ansi-escaped strings suitable for display in a terminal.")
14301 (license license:expat)))
14302
14303 (define-public python-ansi2html
14304 (package
14305 (name "python-ansi2html")
14306 (version "1.2.0")
14307 (source
14308 (origin
14309 (method url-fetch)
14310 (uri (pypi-uri "ansi2html" version))
14311 (sha256
14312 (base32
14313 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14314 (build-system python-build-system)
14315 (native-inputs
14316 `(("python-mock" ,python-mock)
14317 ("python-nose" ,python-nose)))
14318 (propagated-inputs
14319 `(("python-six" ,python-six)))
14320 (home-page "https://github.com/ralphbean/ansi2html")
14321 (synopsis "Convert ANSI-decorated console output to HTML")
14322 (description
14323 "@command{ansi2html} is a Python library and command line utility for
14324 convering text with ANSI color codes to HTML or LaTeX.")
14325 (license license:gpl3+)))
14326
14327 (define-public python2-ansi2html
14328 (package-with-python2 python-ansi2html))
14329
14330 (define-public python-ddt
14331 (package
14332 (name "python-ddt")
14333 (version "1.1.3")
14334 (source
14335 (origin
14336 (method url-fetch)
14337 (uri (pypi-uri "ddt" version))
14338 (sha256
14339 (base32
14340 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
14341 (build-system python-build-system)
14342 (native-inputs
14343 `(("python-mock" ,python-mock)
14344 ("python-nose" ,python-nose)))
14345 (propagated-inputs
14346 `(("python-six" ,python-six)
14347 ("python-pyyaml" ,python-pyyaml)))
14348 (home-page "https://github.com/txels/ddt")
14349 (synopsis "Data-Driven Tests")
14350 (description
14351 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14352 running it with different test data, and make it appear as multiple test
14353 cases.")
14354 (license license:expat)))
14355
14356 (define-public python2-ddt
14357 (package-with-python2 python-ddt))
14358
14359 (define-public python-pycountry
14360 (package
14361 (name "python-pycountry")
14362 (version "18.5.26")
14363 (source
14364 (origin
14365 (method url-fetch)
14366 (uri (pypi-uri "pycountry" version))
14367 (sha256
14368 (base32
14369 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14370 (build-system python-build-system)
14371 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14372 (synopsis "ISO databases for languages, countries, currencies, etc.")
14373 (description
14374 "@code{pycountry} provides the ISO databases for the standards:
14375 @enumerate
14376 @item 639-3 (Languages)
14377 @item 3166 (Countries)
14378 @item 3166-3 (Deleted Countries)
14379 @item 3166-2 (Subdivisions of countries)
14380 @item 4217 (Currencies)
14381 @item 15924 (Scripts)
14382 @end enumerate
14383 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14384 through a Python API.")
14385 (license license:lgpl2.1+)))
14386
14387 (define-public python2-pycountry
14388 (package-with-python2 python-pycountry))
14389
14390 (define-public python-pycosat
14391 (package
14392 (name "python-pycosat")
14393 (version "0.6.3")
14394 (source
14395 (origin
14396 (method url-fetch)
14397 (uri (pypi-uri "pycosat" version ".zip"))
14398 (sha256
14399 (base32
14400 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14401 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14402 (build-system python-build-system)
14403 (native-inputs
14404 `(("unzip" ,unzip)))
14405 (home-page "https://github.com/ContinuumIO/pycosat")
14406 (synopsis "Bindings to picosat (a SAT solver)")
14407 (description
14408 "This package provides efficient Python bindings to @code{picosat} on
14409 the C level. When importing pycosat, the @code{picosat} solver becomes part
14410 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14411 Problem} (SAT) solver.")
14412 (license license:expat)))
14413
14414 (define-public python2-pycosat
14415 (package-with-python2 python-pycosat))
14416
14417 (define-public python2-ruamel.ordereddict
14418 (package
14419 (name "python2-ruamel.ordereddict")
14420 (version "0.4.9")
14421 (source
14422 (origin
14423 (method url-fetch)
14424 (uri (pypi-uri "ruamel.ordereddict" version))
14425 (sha256
14426 (base32
14427 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14428 (build-system python-build-system)
14429 (arguments
14430 `(#:python ,python-2
14431 #:phases
14432 (modify-phases %standard-phases
14433 (delete 'check)
14434 (add-after 'install 'check
14435 (lambda* (#:key inputs outputs #:allow-other-keys)
14436 (add-installed-pythonpath inputs outputs)
14437 (invoke "python" "test/testordereddict.py"))))))
14438 (home-page "https://bitbucket.org/ruamel/ordereddict")
14439 (synopsis "Version of dict that keeps keys in insertion order")
14440 (description
14441 "This is an implementation of an ordered dictionary with @dfn{Key
14442 Insertion Order} (KIO: updates of values do not affect the position of the
14443 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14444 removed and put at the back). The standard library module @code{OrderedDict},
14445 implemented later, implements a subset of @code{ordereddict} functionality.
14446 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14447 Order} (KSO, no sorting function can be specified, but a transform can be
14448 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14449 (license license:expat)))
14450
14451 (define-public python-pypeg2
14452 (package
14453 (name "python-pypeg2")
14454 (version "2.15.2")
14455 (source
14456 (origin
14457 (method url-fetch)
14458 (uri (pypi-uri "pyPEG2" version))
14459 (sha256
14460 (base32
14461 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14462 (build-system python-build-system)
14463 (propagated-inputs `(("python-lxml" ,python-lxml)))
14464 (arguments
14465 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14466 '(#:tests? #f))
14467 (home-page "https://fdik.org/pyPEG/")
14468 (synopsis "Parsering Expression Grammars in Python")
14469 (description "PyPEG is an intrinsic parser interpreter framework for
14470 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14471 parse many formal languages.")
14472 (license license:gpl2)))
14473
14474 (define-public python-incremental
14475 (package
14476 (name "python-incremental")
14477 (version "17.5.0")
14478 (source
14479 (origin
14480 (method url-fetch)
14481 (uri (pypi-uri "incremental" version))
14482 (sha256
14483 (base32
14484 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14485 (build-system python-build-system)
14486 (home-page "https://github.com/hawkowl/incremental")
14487 (synopsis "Library for versioning Python projects")
14488 (description "Incremental is a small library that versions your Python
14489 projects.")
14490 (license license:expat)))
14491
14492 (define-public python2-incremental
14493 (package-with-python2 python-incremental))
14494
14495 (define-public python-invoke
14496 (package
14497 (name "python-invoke")
14498 (home-page "https://www.pyinvoke.org/")
14499 (version "1.3.0")
14500 (source (origin
14501 (method url-fetch)
14502 (uri (pypi-uri "invoke" version))
14503 (sha256
14504 (base32
14505 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
14506 (build-system python-build-system)
14507 (arguments
14508 ;; XXX: Requires many dependencies that are not yet in Guix.
14509 `(#:tests? #f))
14510 (synopsis "Pythonic task execution")
14511 (description
14512 "Invoke is a Python task execution tool and library, drawing inspiration
14513 from various sources to arrive at a powerful and clean feature set. It is
14514 evolved from the Fabric project, but focuses on local and abstract concerns
14515 instead of servers and network commands.")
14516 (license license:bsd-3)))
14517
14518 (define-public python2-invoke
14519 (package-with-python2 python-invoke))
14520
14521 (define-public python-automat
14522 (package
14523 (name "python-automat")
14524 (version "20.2.0")
14525 (source (origin
14526 (method url-fetch)
14527 (uri (pypi-uri "Automat" version))
14528 (sha256
14529 (base32
14530 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
14531 (build-system python-build-system)
14532 ;; We disable the tests because they require python-twisted, while
14533 ;; python-twisted depends on python-automat. Twisted is optional, but the
14534 ;; tests fail if it is not available. Also see
14535 ;; <https://github.com/glyph/automat/issues/71>.
14536 (arguments '(#:tests? #f))
14537 (native-inputs
14538 `(("python-m2r" ,python-m2r)
14539 ("python-setuptools-scm" ,python-setuptools-scm)
14540 ("python-graphviz" ,python-graphviz)))
14541 (propagated-inputs
14542 `(("python-six" ,python-six)
14543 ("python-attrs" ,python-attrs)))
14544 (home-page "https://github.com/glyph/Automat")
14545 (synopsis "Self-service finite-state machines")
14546 (description "Automat is a library for concise, idiomatic Python
14547 expression of finite-state automata (particularly deterministic finite-state
14548 transducers).")
14549 (license license:expat)))
14550
14551 (define-public python2-automat
14552 (package-with-python2 python-automat))
14553
14554 (define-public python-m2r
14555 (package
14556 (name "python-m2r")
14557 (version "0.2.1")
14558 (source (origin
14559 (method url-fetch)
14560 (uri (pypi-uri "m2r" version))
14561 (sha256
14562 (base32
14563 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
14564 (build-system python-build-system)
14565 (propagated-inputs
14566 `(("python-docutils" ,python-docutils)
14567 ("python-mistune" ,python-mistune)))
14568 (native-inputs
14569 `(("python-pygments" ,python-pygments)
14570 ("python-mock" ,python-mock)))
14571 (home-page "https://github.com/miyakogi/m2r")
14572 (synopsis "Markdown to reStructuredText converter")
14573 (description "M2R converts a markdown file including reST markups to valid
14574 reST format.")
14575 (license license:expat)))
14576
14577 (define-public python2-m2r
14578 (package-with-python2 python-m2r))
14579
14580 (define-public python-constantly
14581 (package
14582 (name "python-constantly")
14583 (version "15.1.0")
14584 (source (origin
14585 (method url-fetch)
14586 (uri (pypi-uri "constantly" version))
14587 (sha256
14588 (base32
14589 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
14590 (build-system python-build-system)
14591 (home-page "https://github.com/twisted/constantly")
14592 (synopsis "Symbolic constants in Python")
14593 (description "Constantly is a Python library that provides symbolic
14594 constant support. It includes collections and constants with text, numeric,
14595 and bit flag values.")
14596 (license license:expat)))
14597
14598 (define-public python2-constantly
14599 (package-with-python2 python-constantly))
14600
14601 (define-public python-attrs
14602 (package
14603 (name "python-attrs")
14604 (version "19.3.0")
14605 (source (origin
14606 (method url-fetch)
14607 (uri (pypi-uri "attrs" version))
14608 (sha256
14609 (base32
14610 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
14611 (build-system python-build-system)
14612 (arguments
14613 `(#:modules ((guix build utils)
14614 (guix build python-build-system)
14615 (ice-9 ftw)
14616 (srfi srfi-1)
14617 (srfi srfi-26))
14618 #:phases (modify-phases %standard-phases
14619 (replace 'check
14620 (lambda _
14621 (let ((cwd (getcwd)))
14622 (setenv "PYTHONPATH"
14623 (string-append
14624 cwd "/build/"
14625 (find (cut string-prefix? "lib" <>)
14626 (scandir (string-append cwd "/build")))
14627 ":"
14628 (getenv "PYTHONPATH")))
14629 (invoke "python" "-m" "pytest")))))))
14630 (native-inputs
14631 `(("python-coverage" ,python-coverage)
14632 ("python-hypothesis" ,python-hypothesis)
14633 ("python-pympler" ,python-pympler)
14634 ("python-pytest" ,python-pytest)
14635 ("python-six" ,python-six)
14636 ("python-sphinx" ,python-sphinx)
14637 ("python-zope-interface" ,python-zope-interface)))
14638 (home-page "https://github.com/python-attrs/attrs/")
14639 (synopsis "Attributes without boilerplate")
14640 (description "@code{attrs} is a Python package with class decorators that
14641 ease the chores of implementing the most common attribute-related object
14642 protocols.")
14643 (license license:expat)))
14644
14645 (define-public python2-attrs
14646 (package-with-python2 python-attrs))
14647
14648 (define-public python-attrs-bootstrap
14649 (package
14650 (inherit python-attrs)
14651 (name "python-attrs-bootstrap")
14652 (native-inputs `())
14653 (arguments `(#:tests? #f))))
14654
14655 (define-public python2-attrs-bootstrap
14656 (package-with-python2 python-attrs-bootstrap))
14657
14658 (define-public python2-cliapp
14659 (package
14660 (name "python2-cliapp")
14661 (version "1.20180812.1")
14662 (source
14663 (origin
14664 (method url-fetch)
14665 (uri (string-append
14666 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
14667 version ".tar.gz"))
14668 (sha256
14669 (base32
14670 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
14671 (build-system python-build-system)
14672 (arguments
14673 `(#:python ,python-2
14674 #:phases
14675 (modify-phases %standard-phases
14676 ;; check phase needs to be run before the build phase. If not,
14677 ;; coverage-test-runner looks for tests for the built source files,
14678 ;; and fails.
14679 (delete 'check)
14680 (add-before 'build 'check
14681 (lambda _
14682 ;; Disable python3 tests
14683 (substitute* "check"
14684 (("python3") "# python3"))
14685 (invoke "./check"))))))
14686 (native-inputs
14687 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14688 ("python2-pep8" ,python2-pep8)))
14689 (propagated-inputs
14690 `(("python2-pyaml" ,python2-pyaml)))
14691 (home-page "https://liw.fi/cliapp/")
14692 (synopsis "Python framework for command line programs")
14693 (description "@code{python2-cliapp} is a python framework for
14694 command line programs. It contains the typical stuff such programs
14695 need to do, such as parsing the command line for options, and
14696 iterating over input files.")
14697 (license license:gpl2+)))
14698
14699 (define-public python2-ttystatus
14700 (package
14701 (name "python2-ttystatus")
14702 (version "0.38")
14703 (source
14704 (origin
14705 (method git-fetch)
14706 (uri (git-reference
14707 (url "http://git.liw.fi/ttystatus")
14708 ;; There are no tags after ttystatus-0.36.
14709 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
14710 (sha256
14711 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
14712 (file-name (git-file-name name version))))
14713 (build-system python-build-system)
14714 (native-inputs
14715 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14716 ("python2-pep8" ,python2-pep8)))
14717 (arguments
14718 `(#:python ,python-2
14719 #:phases
14720 (modify-phases %standard-phases
14721 ;; check phase needs to be run before the build phase. If not,
14722 ;; coverage-test-runner looks for tests for the built source files,
14723 ;; and fails.
14724 (delete 'check)
14725 (add-before 'build 'check
14726 (lambda _ (invoke "make" "check"))))))
14727 (home-page "https://liw.fi/ttystatus/")
14728 (synopsis "Python library for showing progress reporting and
14729 status updates on terminals")
14730 (description "@code{python2-ttystatus} is a python library for
14731 showing progress reporting and status updates on terminals, for
14732 command line programs. Output is automatically adapted to the width
14733 of the terminal: truncated if it does not fit, and resized if the
14734 terminal size changes.")
14735 (license license:gpl3+)))
14736
14737 (define-public python2-tracing
14738 (package
14739 (name "python2-tracing")
14740 (version "0.10")
14741 (source
14742 (origin
14743 (method url-fetch)
14744 (uri (string-append
14745 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
14746 version ".tar.gz"))
14747 (sha256
14748 (base32
14749 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
14750 (build-system python-build-system)
14751 (arguments
14752 `(#:python ,python-2))
14753 (home-page "https://liw.fi/tracing/")
14754 (synopsis "Python debug logging helper")
14755 (description "@code{python2-tracing} is a python library for
14756 logging debug messages. It provides a way to turn debugging messages
14757 on and off, based on the filename they occur in. It is much faster
14758 than using @code{logging.Filter} to accomplish the same thing, which
14759 matters when code is run in production mode. The actual logging still
14760 happens using the @code{logging} library.")
14761 (license license:gpl3+)))
14762
14763 (define-public python2-larch
14764 (package
14765 (name "python2-larch")
14766 (version "1.20151025")
14767 (source
14768 (origin
14769 (method url-fetch)
14770 (uri (string-append
14771 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
14772 version ".tar.gz"))
14773 (patches (search-patches
14774 "python2-larch-coverage-4.0a6-compatibility.patch"))
14775 (sha256
14776 (base32
14777 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14778 (build-system python-build-system)
14779 (arguments
14780 `(#:python ,python-2
14781 #:phases
14782 (modify-phases %standard-phases
14783 ;; check phase needs to be run before the build phase. If not,
14784 ;; coverage-test-runner looks for tests for the built source files,
14785 ;; and fails.
14786 (delete 'check)
14787 (add-before 'build 'check
14788 (lambda _ (invoke "make" "check"))))))
14789 (native-inputs
14790 `(("cmdtest" ,cmdtest)
14791 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
14792 (propagated-inputs
14793 `(("python2-tracing" ,python2-tracing)))
14794 (home-page "https://liw.fi/larch/")
14795 (synopsis "Python copy-on-write B-tree library")
14796 (description "@code{python2-larch} is an implementation of
14797 particular kind of B-tree, based on research by Ohad Rodeh. See
14798 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14799 on the data structure.
14800
14801 The distinctive feature of this B-tree is that a node is never
14802 (conceptually) modified. Instead, all updates are done by
14803 copy-on-write. This makes it easy to clone a tree, and modify only the
14804 clone, while other processes access the original tree.")
14805 (license license:gpl3+)))
14806
14807 (define-public python-astroid
14808 (package
14809 (name "python-astroid")
14810 (version "2.4.2")
14811 (source
14812 (origin
14813 (method url-fetch)
14814 (uri (pypi-uri "astroid" version))
14815 (sha256
14816 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
14817 (modules '((guix build utils)))
14818 (snippet
14819 '(begin
14820 ;; Check to see if the version pinning has been removed.
14821 (substitute* "astroid/__pkginfo__.py"
14822 (("==1\\.4\\.\\*") ">=1.4.0"))
14823 #t))))
14824 (build-system python-build-system)
14825 (propagated-inputs
14826 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14827 ("python-six" ,python-six)
14828 ("python-wrapt" ,python-wrapt)))
14829 (native-inputs
14830 `(("python-dateutil" ,python-dateutil)
14831 ("python-pytest" ,python-pytest)
14832 ("python-pytest-runner" ,python-pytest-runner)))
14833 (home-page "https://github.com/PyCQA/astroid")
14834 (synopsis "Common base representation of python source code for pylint and
14835 other projects")
14836 (description "@code{python-astroid} provides a common base representation
14837 of python source code for projects such as pychecker, pyreverse, pylint, etc.
14838
14839 It provides a compatible representation which comes from the _ast module. It
14840 rebuilds the tree generated by the builtin _ast module by recursively walking
14841 down the AST and building an extended ast. The new node classes have
14842 additional methods and attributes for different usages. They include some
14843 support for static inference and local name scopes. Furthermore, astroid
14844 builds partial trees by inspecting living objects.")
14845 (license license:lgpl2.1+)
14846 (properties `((python2-variant . ,(delay python2-astroid))))))
14847
14848 (define-public python2-astroid
14849 (let ((base (package-with-python2
14850 (strip-python2-variant python-astroid))))
14851 (package (inherit base)
14852 ;; Version 2.x removes python2 support.
14853 (version "1.6.5")
14854 (source
14855 (origin
14856 (method url-fetch)
14857 (uri (pypi-uri "astroid" version))
14858 (sha256
14859 (base32
14860 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
14861 (arguments
14862 (substitute-keyword-arguments (package-arguments base)
14863 ((#:phases phases)
14864 `(modify-phases ,phases
14865 (add-after 'unpack 'remove-spurious-test
14866 (lambda _
14867 ;; https://github.com/PyCQA/astroid/issues/276
14868 (delete-file "astroid/tests/unittest_brain.py")
14869 #t))
14870 (replace 'check
14871 (lambda _
14872 (invoke"python" "-m" "unittest" "discover"
14873 "-p" "unittest*.py")))))))
14874 (native-inputs `())
14875 (propagated-inputs
14876 `(("python2-backports-functools-lru-cache"
14877 ,python2-backports-functools-lru-cache)
14878 ("python2-enum34" ,python2-enum34)
14879 ("python2-singledispatch" ,python2-singledispatch)
14880 ,@(alist-delete "python-typed-ast"
14881 (package-propagated-inputs base)))))))
14882
14883 (define-public python-isbnlib
14884 (package
14885 (name "python-isbnlib")
14886 (version "3.10.3")
14887 (source
14888 (origin
14889 (method url-fetch)
14890 (uri (pypi-uri "isbnlib" version))
14891 (sha256
14892 (base32
14893 "07qhykv0x60d5rsx5pj6s4q15ri4znczscll3xmpf6gyclac1592"))))
14894 (build-system python-build-system)
14895 (arguments '(#:tests? #f)) ; No test
14896 (home-page "https://github.com/xlcnd/isbnlib")
14897 (synopsis "Python library to work with ISBN strings")
14898 (description "@code{python-isbnlib} is a (pure) python library that provides
14899 several useful methods and functions to validate, clean, transform, hyphenate and
14900 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
14901 version, is suitable to be include as a dependency in other projects.")
14902 (license license:lgpl3+)))
14903
14904 (define-public python-isort
14905 (package
14906 (name "python-isort")
14907 (version "4.3.4")
14908 (source
14909 (origin
14910 (method git-fetch)
14911 (uri (git-reference
14912 ;; Tests pass only from the Github sources
14913 (url "https://github.com/timothycrosley/isort")
14914 (commit version)))
14915 (file-name (git-file-name name version))
14916 (sha256
14917 (base32
14918 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
14919 (build-system python-build-system)
14920 (native-inputs
14921 `(("python-mock" ,python-mock)
14922 ("python-pytest" ,python-pytest)))
14923 (home-page "https://github.com/timothycrosley/isort")
14924 (synopsis "Python utility/library to sort python imports")
14925 (description "@code{python-isort} is a python utility/library to sort
14926 imports alphabetically, and automatically separated into sections. It
14927 provides a command line utility, a python library and plugins for various
14928 editors.")
14929 (license license:expat)
14930 (properties `((python2-variant . ,(delay python2-isort))))))
14931
14932 (define-public python2-isort
14933 (let ((base (package-with-python2
14934 (strip-python2-variant python-isort))))
14935 (package (inherit base)
14936 (native-inputs
14937 `(("python2-futures" ,python2-futures)
14938 ,@(package-native-inputs base))))))
14939
14940 (define-public python2-backports-functools-lru-cache
14941 (package
14942 (name "python2-backports-functools-lru-cache")
14943 (version "1.6.1")
14944 (source
14945 (origin
14946 (method url-fetch)
14947 ;; only the pypi tarballs contain the necessary metadata
14948 (uri (pypi-uri "backports.functools_lru_cache" version))
14949 (sha256
14950 (base32
14951 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
14952 (build-system python-build-system)
14953 (native-inputs
14954 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14955 (arguments
14956 `(#:python ,python-2))
14957 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14958 (synopsis "Backport of functools.lru_cache from Python 3.3")
14959 (description "@code{python2-backports-functools-lru-cache} is a backport
14960 of @code{functools.lru_cache} from python 3.3.")
14961 (license license:expat)))
14962
14963 (define-public python-configparser
14964 (package
14965 (name "python-configparser")
14966 (version "4.0.2")
14967 (source
14968 (origin
14969 (method url-fetch)
14970 (uri (pypi-uri "configparser" version))
14971 (sha256
14972 (base32
14973 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
14974 (native-inputs
14975 `(("python-setuptools_scm" ,python-setuptools-scm)))
14976 (build-system python-build-system)
14977 (home-page "https://github.com/jaraco/configparser/")
14978 (synopsis "Backport of configparser from python 3.5")
14979 (description "@code{python-configparser} is a backport of
14980 @code{configparser} from Python 3.5 so that it can be used directly
14981 in other versions.")
14982 (license license:expat)))
14983
14984 (define-public python2-configparser
14985 (package-with-python2 python-configparser))
14986
14987 (define-public python-mamba
14988 (package
14989 (name "python-mamba")
14990 (version "0.11.1")
14991 (source (origin
14992 (method url-fetch)
14993 (uri (pypi-uri "mamba" version))
14994 (sha256
14995 (base32
14996 "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr"))))
14997 (build-system python-build-system)
14998 (arguments `(#:tests? #f)) ; No test
14999 (propagated-inputs
15000 `(("python-clint" ,python-clint)
15001 ("python-coverage" ,python-coverage)))
15002 (home-page "https://nestorsalceda.com/mamba/")
15003 (synopsis "Test runner for Python")
15004 (description
15005 "Mamba is a Behaviour-Driven Development tool for Python developers.
15006 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15007 (license license:expat)))
15008
15009 (define-public python-mando
15010 (package
15011 (name "python-mando")
15012 (version "0.6.4")
15013 (source (origin
15014 (method url-fetch)
15015 (uri (pypi-uri "mando" version))
15016 (sha256
15017 (base32
15018 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15019 (build-system python-build-system)
15020 (propagated-inputs
15021 `(("python-rst2ansi" ,python-rst2ansi)
15022 ("python-six" ,python-six)))
15023 (native-inputs
15024 `(("python-pytest" ,python-pytest)))
15025 (home-page "https://mando.readthedocs.org/")
15026 (synopsis
15027 "Wrapper around argparse, allowing creation of complete CLI applications")
15028 (description
15029 "This package is a wrapper around argparse, allowing you to write complete CLI
15030 applications in seconds while maintaining all the flexibility.")
15031 (license license:expat)))
15032
15033 (define-public python2-mando
15034 (package-with-python2 python-mando))
15035
15036 (define-public python2-argparse
15037 (package
15038 (name "python2-argparse")
15039 (version "1.4.0")
15040 (source
15041 (origin
15042 (method url-fetch)
15043 (uri (pypi-uri "argparse" version))
15044 (sha256
15045 (base32
15046 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15047 (build-system python-build-system)
15048 (arguments
15049 `(#:python ,python-2))
15050 (home-page "https://github.com/ThomasWaldmann/argparse/")
15051 (synopsis "Python command-line parsing library")
15052 (description
15053 "This package is mostly for people who want to have @code{argparse} on
15054 older Pythons because it was not part of the standard library back then.")
15055 (license license:psfl)))
15056
15057 (define-public python-fudge
15058 (package
15059 (name "python-fudge")
15060 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15061 ;; package, which is currently the only use of this package.
15062 (version "0.9.6")
15063 (source
15064 (origin
15065 (method url-fetch)
15066 (uri (pypi-uri "fudge" version))
15067 (sha256
15068 (base32
15069 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15070 (build-system python-build-system)
15071 (arguments
15072 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15073 (home-page "https://github.com/fudge-py/fudge")
15074 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15075 (description
15076 "Fudge is a Python module for using fake objects (mocks and stubs) to
15077 test real ones.
15078
15079 In readable Python code, you declare the methods available on your fake object
15080 and how they should be called. Then you inject that into your application and
15081 start testing. This declarative approach means you don’t have to record and
15082 playback actions and you don’t have to inspect your fakes after running code.
15083 If the fake object was used incorrectly then you’ll see an informative
15084 exception message with a traceback that points to the culprit.")
15085 (license license:expat)))
15086
15087 (define-public python2-fudge
15088 (package-with-python2 python-fudge))
15089
15090 (define-public python-mwclient
15091 (package
15092 (name "python-mwclient")
15093 (version "0.10.1")
15094 (source
15095 (origin
15096 (method git-fetch)
15097 ;; The PyPI version wouldn't contain tests.
15098 (uri (git-reference
15099 (url "https://github.com/mwclient/mwclient")
15100 (commit (string-append "v" version))))
15101 (file-name (git-file-name name version))
15102 (sha256
15103 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15104 (build-system python-build-system)
15105 (propagated-inputs
15106 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15107 ("python-six" ,python-six)))
15108 (native-inputs
15109 `(("python-mock" ,python-mock)
15110 ("python-pytest" ,python-pytest)
15111 ("python-pytest-cov" ,python-pytest-cov)
15112 ("python-pytest-runner" ,python-pytest-runner)
15113 ("python-responses" ,python-responses)))
15114 (home-page "https://github.com/btongminh/mwclient")
15115 (synopsis "MediaWiki API client")
15116 (description "This package provides a MediaWiki API client.")
15117 (license license:expat)))
15118
15119 (define-public python2-mwclient
15120 (package-with-python2 python-mwclient))
15121
15122 (define-public python-utils
15123 (package
15124 (name "python-utils")
15125 (version "2.4.0")
15126 (source (origin
15127 (method url-fetch)
15128 (uri (pypi-uri "python-utils" version))
15129 (sha256
15130 (base32
15131 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15132 (build-system python-build-system)
15133 (arguments
15134 `(#:phases
15135 (modify-phases %standard-phases
15136 (replace 'check
15137 (lambda* (#:key inputs outputs #:allow-other-keys)
15138 (add-installed-pythonpath inputs outputs)
15139 (delete-file "pytest.ini")
15140 (invoke "pytest" "-vv"))))))
15141 (native-inputs
15142 `(("pytest-runner" ,python-pytest-runner)
15143 ("pytest" ,python-pytest)
15144 ("six" ,python-six)))
15145 (home-page "https://github.com/WoLpH/python-utils")
15146 (synopsis "Convenient utilities not included with the standard Python install")
15147 (description
15148 "Python Utils is a collection of small Python functions and classes which
15149 make common patterns shorter and easier.")
15150 (license license:bsd-2)))
15151
15152 (define-public python2-utils
15153 (package-with-python2 python-utils))
15154
15155 (define-public python-diff-match-patch
15156 (package
15157 (name "python-diff-match-patch")
15158 (version "20121119")
15159 (source
15160 (origin
15161 (method url-fetch)
15162 (uri (pypi-uri "diff-match-patch" version))
15163 (sha256
15164 (base32
15165 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15166 (build-system python-build-system)
15167 (home-page "https://code.google.com/p/google-diff-match-patch")
15168 (synopsis "Synchronize plain text")
15169 (description "Diff Match and Patch libraries offer robust algorithms to
15170 perform the operations required for synchronizing plain text.")
15171 (license license:asl2.0)))
15172
15173 (define-public python2-diff-match-patch
15174 (package-with-python2 python-diff-match-patch))
15175
15176 (define-public python-dirsync
15177 (package
15178 (name "python-dirsync")
15179 (version "2.2.3")
15180 (source
15181 (origin
15182 (method url-fetch)
15183 (uri (pypi-uri "dirsync" version))
15184 (sha256
15185 (base32
15186 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
15187 (build-system python-build-system)
15188 (propagated-inputs
15189 `(("six" ,python-six)))
15190 (home-page "https://bitbucket.org/tkhyn/dirsync")
15191 (synopsis "Advanced directory tree synchronisation tool")
15192 (description "Advanced directory tree synchronisation tool.")
15193 (license license:expat)))
15194
15195 (define-public python2-dirsync
15196 (package-with-python2 python-dirsync))
15197
15198 (define-public python-levenshtein
15199 (package
15200 (name "python-levenshtein")
15201 (version "0.12.0")
15202 (source
15203 (origin
15204 (method url-fetch)
15205 (uri (pypi-uri "python-Levenshtein" version))
15206 (sha256
15207 (base32
15208 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15209 (build-system python-build-system)
15210 (home-page "https://github.com/ztane/python-Levenshtein")
15211 (synopsis "Fast computation of Levenshtein distance and string similarity")
15212 (description
15213 "The Levenshtein Python C extension module contains functions for fast computation of
15214 @enumerate
15215 @item Levenshtein (edit) distance, and edit operations
15216 @item string similarity
15217 @item approximate median strings, and generally string averaging
15218 @item string sequence and set similarity
15219 @end enumerate
15220 It supports both normal and Unicode strings.")
15221 (license license:gpl2+)))
15222
15223 (define-public python2-levenshtein
15224 (package-with-python2 python-levenshtein))
15225
15226 (define-public python-scandir
15227 (package
15228 (name "python-scandir")
15229 (version "1.10.0")
15230 (source
15231 (origin
15232 (method url-fetch)
15233 (uri (pypi-uri "scandir" version))
15234 (sha256
15235 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15236 (build-system python-build-system)
15237 (arguments
15238 `(#:phases (modify-phases %standard-phases
15239 (replace 'check
15240 (lambda _
15241 (invoke "python" "test/run_tests.py"))))))
15242 (home-page "https://github.com/benhoyt/scandir")
15243 (synopsis "Directory iteration function")
15244 (description
15245 "Directory iteration function like os.listdir(), except that instead of
15246 returning a list of bare filenames, it yields DirEntry objects that include
15247 file type and stat information along with the name. Using scandir() increases
15248 the speed of os.walk() by 2-20 times (depending on the platform and file
15249 system) by avoiding unnecessary calls to os.stat() in most cases.
15250
15251 This package is part of the Python standard library since version 3.5.")
15252 (license license:bsd-3)))
15253
15254 (define-public python2-scandir
15255 (package-with-python2 python-scandir))
15256
15257 (define-public python2-stemming
15258 (package
15259 (name "python2-stemming")
15260 (version "1.0.1")
15261 (source
15262 (origin
15263 (method url-fetch)
15264 (uri (pypi-uri "stemming" version))
15265 (sha256
15266 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15267 (build-system python-build-system)
15268 (arguments
15269 `(#:python ,python-2))
15270 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15271 (synopsis "Python implementations of various stemming algorithms")
15272 (description
15273 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15274 stemming algorithms for English. These implementations are straightforward and
15275 efficient, unlike some Python versions of the same algorithms available on the
15276 Web. This package is an extraction of the stemming code included in the Whoosh
15277 search engine.")
15278 (license license:public-domain)))
15279
15280 (define-public python-factory-boy
15281 (package
15282 (name "python-factory-boy")
15283 (version "2.8.1")
15284 (source
15285 (origin
15286 (method url-fetch)
15287 (uri (pypi-uri "factory_boy" version))
15288 (sha256
15289 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15290 (build-system python-build-system)
15291 (arguments
15292 ;; Tests are not included in the tarball.
15293 `(#:tests? #f))
15294 (propagated-inputs
15295 `(("faker" ,python-faker)))
15296 (home-page "https://github.com/benhoyt/scandir")
15297 (synopsis "Versatile test fixtures replacement")
15298 (description
15299 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15300
15301 As a fixtures replacement tool, it aims to replace static, hard to maintain
15302 fixtures with easy-to-use factories for complex object.
15303
15304 Instead of building an exhaustive test setup with every possible combination
15305 of corner cases, factory_boy allows you to use objects customized for the
15306 current test, while only declaring the test-specific fields")
15307 (license license:expat)))
15308
15309 (define-public python2-factory-boy
15310 (package-with-python2 python-factory-boy))
15311
15312 (define-public python-translate-toolkit
15313 (package
15314 (name "python-translate-toolkit")
15315 (version "2.1.0")
15316 (source
15317 (origin
15318 (method url-fetch)
15319 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15320 (sha256
15321 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15322 (build-system python-build-system)
15323 (native-inputs
15324 `(("python-pytest" ,python-pytest)
15325 ("python-sphinx" ,python-sphinx)))
15326 (propagated-inputs
15327 `(("python-babel" ,python-babel)
15328 ("python-beautifulsoup4" ,python-beautifulsoup4)
15329 ("python-chardet" ,python-chardet)
15330 ("python-diff-match-patch" ,python-diff-match-patch)
15331 ("python-levenshtein" ,python-levenshtein)
15332 ("python-lxml" ,python-lxml)
15333 ("python-six" ,python-six)
15334 ("python-vobject" ,python-vobject)
15335 ("python-pyyaml" ,python-pyyaml)))
15336 (arguments
15337 ;; TODO: tests are not run, because they end with
15338 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15339 ;; 'parse_funcs'
15340 ;; during test setup.
15341 `(#:tests? #f))
15342 (home-page "https://toolkit.translatehouse.org")
15343 (synopsis "Tools and API for translation and localization engineering")
15344 (description
15345 "Tools and API for translation and localization engineering. It contains
15346 several utilities, as well as an API for building localization tools.")
15347 (license license:gpl2+)))
15348
15349 (define-public python2-translate-toolkit
15350 (package-with-python2 python-translate-toolkit))
15351
15352 (define-public python-packaging
15353 (package
15354 (name "python-packaging")
15355 (version "20.0")
15356 (source
15357 (origin
15358 (method url-fetch)
15359 (uri (pypi-uri "packaging" version))
15360 ;; XXX: The URL in the patch file is wrong, it should be
15361 ;; <https://github.com/pypa/packaging/pull/256>.
15362 (patches (search-patches "python-packaging-test-arch.patch"))
15363 (sha256
15364 (base32
15365 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15366 (build-system python-build-system)
15367 (arguments
15368 `(#:phases (modify-phases %standard-phases
15369 (replace 'check
15370 (lambda* (#:key tests? #:allow-other-keys)
15371 (if tests?
15372 (invoke "py.test" "-vv")
15373 (format #t "test suite not run~%"))
15374 #t)))))
15375 (native-inputs
15376 `(("python-pretend" ,python-pretend)
15377 ("python-pytest" ,python-pytest)))
15378 (propagated-inputs
15379 `(("python-pyparsing" ,python-pyparsing)
15380 ("python-six" ,python-six)))
15381 (home-page "https://github.com/pypa/packaging")
15382 (synopsis "Core utilities for Python packages")
15383 (description "Packaging is a Python module for dealing with Python packages.
15384 It offers an interface for working with package versions, names, and dependency
15385 information.")
15386 ;; From 'LICENSE': This software is made available under the terms of
15387 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15388 ;; Contributions to this software is made under the terms of *both* these
15389 ;; licenses.
15390 (license (list license:asl2.0 license:bsd-2))))
15391
15392 (define-public python2-packaging
15393 (package-with-python2 python-packaging))
15394
15395 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15396 (define-public python-packaging-bootstrap
15397 (hidden-package
15398 (package/inherit
15399 python-packaging
15400 (name "python-packaging-bootstrap")
15401 (native-inputs '())
15402 (propagated-inputs
15403 `(("python-pyparsing" ,python-pyparsing)))
15404 (arguments '(#:tests? #f)))))
15405
15406 (define-public python2-packaging-bootstrap
15407 (hidden-package
15408 (package/inherit
15409 python2-packaging
15410 (name "python2-packaging-bootstrap")
15411 (native-inputs '())
15412 (propagated-inputs
15413 `(("python-pyparsing" ,python2-pyparsing)))
15414 (arguments
15415 `(#:tests? #f
15416 ,@(package-arguments python2-packaging))))))
15417
15418 (define-public python-relatorio
15419 (package
15420 (name "python-relatorio")
15421 (version "0.8.0")
15422 (source
15423 (origin
15424 (method url-fetch)
15425 (uri (pypi-uri "relatorio" version))
15426 (sha256
15427 (base32
15428 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15429 (build-system python-build-system)
15430 (propagated-inputs
15431 `(("python-lxml" ,python-lxml)
15432 ("python-genshi" ,python-genshi)))
15433 (native-inputs
15434 `(("python-magic" ,python-magic)))
15435 (home-page "https://relatorio.tryton.org/")
15436 (synopsis "Templating library able to output ODT and PDF files")
15437 (description "Relatorio is a templating library which provides a way to
15438 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15439 for more filetypes can be easily added by creating plugins for them.")
15440 (license license:gpl3+)))
15441
15442 (define-public python2-relatorio
15443 (package-with-python2 python-relatorio))
15444
15445 (define-public python-radon
15446 (package
15447 (name "python-radon")
15448 (version "4.1.0")
15449 (source
15450 (origin
15451 (method url-fetch)
15452 (uri (pypi-uri "radon" version))
15453 (sha256
15454 (base32
15455 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15456 (build-system python-build-system)
15457 (arguments
15458 `(#:phases (modify-phases %standard-phases
15459 (replace 'check
15460 (lambda _
15461 (invoke "python" "radon/tests/run.py"))))))
15462 (propagated-inputs
15463 `(("python-colorama" ,python-colorama)
15464 ("python-flake8-polyfill" ,python-flake8-polyfill)
15465 ("python-mando" ,python-mando)))
15466 (native-inputs
15467 `(("python-pytest" ,python-pytest)
15468 ("python-pytest-mock" ,python-pytest-mock)))
15469 (home-page "https://radon.readthedocs.org/")
15470 (synopsis "Code Metrics in Python")
15471 (description "Radon is a Python tool which computes various code metrics.
15472 Supported metrics are:
15473 @itemize @bullet
15474 @item raw metrics: SLOC, comment lines, blank lines, &c.
15475 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15476 @item Halstead metrics (all of them)
15477 @item the Maintainability Index (a Visual Studio metric)
15478 @end itemize")
15479 (properties `((python2-variant . ,(delay python2-radon))))
15480 (license license:expat)))
15481
15482 (define-public python2-radon
15483 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
15484 (package
15485 (inherit base)
15486 (propagated-inputs
15487 `(("python-configparser" ,python2-configparser)
15488 ("python-future" ,python2-future)
15489 ,@(package-propagated-inputs base))))))
15490
15491 (define-public python-sure
15492 (package
15493 (name "python-sure")
15494 (version "1.4.11")
15495 (source
15496 (origin
15497 (method url-fetch)
15498 (uri (pypi-uri "sure" version))
15499 (sha256
15500 (base32
15501 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
15502 (build-system python-build-system)
15503 (propagated-inputs
15504 `(("python-mock" ,python-mock)
15505 ("python-six" ,python-six)))
15506 (native-inputs
15507 `(("python-nose" ,python-nose)))
15508 (home-page "https://github.com/gabrielfalcao/sure")
15509 (synopsis "Automated testing library in python for python")
15510 (description
15511 "Sure is a python library that leverages a DSL for writing assertions.
15512 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15513 (license license:gpl3+)))
15514
15515 (define-public python2-sure
15516 (package-with-python2 python-sure))
15517
15518 (define-public python2-couleur
15519 ;; This package does not seem to support python3 at all, hence,
15520 ;; only the python2 variant definition is provided.
15521 (package
15522 (name "python2-couleur")
15523 (version "0.6.2")
15524 (source
15525 (origin
15526 (method url-fetch)
15527 (uri (pypi-uri "couleur" version))
15528 (sha256
15529 (base32
15530 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15531 (build-system python-build-system)
15532 (arguments
15533 `(#:python ,python-2))
15534 (home-page "https://github.com/gabrielfalcao/couleur")
15535 (synopsis
15536 "ANSI terminal tool for python, colored shell and other handy fancy features")
15537 (description
15538 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15539 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15540 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15541 ;; https://github.com/gabrielfalcao/couleur/issues/11
15542 (license license:lgpl3+)))
15543
15544 (define-public python-misaka
15545 (package
15546 (name "python-misaka")
15547 (version "2.1.1")
15548 (source
15549 (origin
15550 (method url-fetch)
15551 (uri (pypi-uri "misaka" version))
15552 (sha256
15553 (base32
15554 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
15555 (build-system python-build-system)
15556 (arguments
15557 `(;; Line 37 of setup.py calls self.run_command('develop')
15558 ;; in the 'check' phase. This command seems to be trying
15559 ;; to write to
15560 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15561 ;; for which it does not have the permission to write.
15562 #:tests? #f))
15563 (propagated-inputs
15564 `(("python-cffi" ,python-cffi)))
15565 (home-page "https://github.com/FSX/misaka")
15566 (synopsis "Python binding for Hoedown")
15567 (description
15568 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15569 library written in C. It features a fast HTML renderer and functionality to make custom
15570 renderers (e.g. man pages or LaTeX).")
15571 (license license:expat)))
15572
15573 (define-public python2-misaka
15574 (package-with-python2 python-misaka))
15575
15576 (define-public python2-steadymark
15577 ;; This is forced into being a python2 only variant
15578 ;; due to its dependence on couleur that has no support
15579 ;; for python3
15580 (package
15581 (name "python2-steadymark")
15582 (version "0.7.3")
15583 (source
15584 (origin
15585 (method url-fetch)
15586 (uri (pypi-uri "steadymark" version))
15587 (sha256
15588 (base32
15589 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15590 (build-system python-build-system)
15591 (native-inputs
15592 `(("python-couleur" ,python2-couleur)
15593 ("python-sure" ,python2-sure)
15594 ("python-misaka" ,python2-misaka)))
15595 (arguments
15596 `(#:python ,python-2
15597 #:phases
15598 (modify-phases %standard-phases
15599 (add-before 'build 'patch-setup-py
15600 (lambda _
15601 ;; Update requirements from dependency==version
15602 ;; to dependency>=version
15603 (substitute* "setup.py"
15604 (("==") ">="))
15605 #t)))))
15606 (home-page "https://github.com/gabrielfalcao/steadymark")
15607 (synopsis "Markdown-based test runner for python")
15608 (description
15609 "@code{Steadymark} allows documentation to be written in github-flavoured
15610 markdown. The documentation may contain snippets of code surrounded by python
15611 code blocks and @code{Steadymark} will find these snippets and run them, making
15612 sure that there are no old malfunctional examples in the documentation examples.")
15613 (license license:expat)))
15614
15615 (define-public python-jsonpointer
15616 (package
15617 (name "python-jsonpointer")
15618 (version "1.10")
15619 (source
15620 (origin
15621 (method url-fetch)
15622 (uri (pypi-uri "jsonpointer" version))
15623 (sha256
15624 (base32
15625 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15626 (build-system python-build-system)
15627 (home-page "https://github.com/stefankoegl/python-json-pointer")
15628 (synopsis "Identify specific nodes in a JSON document")
15629 (description "@code{jsonpointer} allows you to access specific nodes
15630 by path in a JSON document (see RFC 6901).")
15631 (license license:bsd-3)))
15632
15633 (define-public python2-jsonpointer
15634 (package-with-python2 python-jsonpointer))
15635
15636 (define-public python-jsonpatch
15637 (package
15638 (name "python-jsonpatch")
15639 (version "1.16")
15640 (source
15641 (origin
15642 (method git-fetch)
15643 ;; pypi version lacks tests.js
15644 (uri (git-reference
15645 (url "https://github.com/stefankoegl/python-json-patch")
15646 (commit (string-append "v" version))))
15647 (file-name (git-file-name name version))
15648 (sha256
15649 (base32
15650 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
15651 (build-system python-build-system)
15652 (native-inputs
15653 `(("python-jsonpointer" ,python-jsonpointer)))
15654 (home-page "https://github.com/stefankoegl/python-json-patch")
15655 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15656 (description "@code{jsonpatch} is a library and program that allows
15657 applying JSON Patches according to RFC 6902.")
15658 (license license:bsd-3)))
15659
15660 (define-public python2-jsonpatch
15661 (package-with-python2 python-jsonpatch))
15662
15663 (define-public python-jsonpatch-0.4
15664 (package (inherit python-jsonpatch)
15665 (name "python-jsonpatch")
15666 (version "0.4")
15667 (source
15668 (origin
15669 (method git-fetch)
15670 (uri (git-reference
15671 (url "https://github.com/stefankoegl/python-json-patch")
15672 (commit (string-append "v" version))))
15673 (file-name (git-file-name name version))
15674 (sha256
15675 (base32
15676 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
15677
15678 (define-public python2-jsonpatch-0.4
15679 (package-with-python2 python-jsonpatch-0.4))
15680
15681 (define-public python-rfc3986
15682 (package
15683 (name "python-rfc3986")
15684 (version "1.4.0")
15685 (source (origin
15686 (method url-fetch)
15687 (uri (pypi-uri "rfc3986" version))
15688 (sha256
15689 (base32
15690 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
15691 (build-system python-build-system)
15692 (arguments
15693 `(#:modules ((guix build utils)
15694 (guix build python-build-system)
15695 (ice-9 ftw)
15696 (srfi srfi-1)
15697 (srfi srfi-26))
15698 #:phases
15699 (modify-phases %standard-phases
15700 (replace 'check
15701 (lambda _
15702 (let ((cwd (getcwd)))
15703 (setenv "PYTHONPATH"
15704 (string-append cwd "/build/"
15705 (find (cut string-prefix? "lib" <>)
15706 (scandir (string-append cwd "/build")))
15707 ":"
15708 (getenv "PYTHONPATH")))
15709 (invoke "pytest" "-v")))))))
15710 (native-inputs
15711 `(("python-pytest" ,python-pytest)))
15712 (home-page "https://rfc3986.readthedocs.io/")
15713 (synopsis "Parse and validate URI references")
15714 (description
15715 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
15716 validation and authority parsing. This module also supports RFC@tie{}6874
15717 which adds support for zone identifiers to IPv6 addresses.")
15718 (license license:asl2.0)))
15719
15720 (define-public python2-rfc3986
15721 (package-with-python2 python-rfc3986))
15722
15723 (define-public python-rfc3987
15724 (package
15725 (name "python-rfc3987")
15726 (version "1.3.7")
15727 (source
15728 (origin
15729 (method url-fetch)
15730 (uri (pypi-uri "rfc3987" version))
15731 (sha256
15732 (base32
15733 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15734 (build-system python-build-system)
15735 (home-page "https://pypi.org/project/rfc3987/")
15736 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15737 (description "@code{rfc3987} provides routines for parsing and
15738 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15739 (license license:gpl3+)))
15740
15741 (define-public python2-rfc3987
15742 (package-with-python2 python-rfc3987))
15743
15744 (define-public python-validators
15745 (package
15746 (name "python-validators")
15747 (version "0.14.2")
15748 (source (origin
15749 (method url-fetch)
15750 (uri (pypi-uri "validators" version))
15751 (sha256
15752 (base32
15753 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
15754 (build-system python-build-system)
15755 (arguments
15756 '(#:phases (modify-phases %standard-phases
15757 (replace 'check
15758 (lambda _
15759 (invoke "pytest" "-vv"))))))
15760 (propagated-inputs
15761 `(("python-decorator" ,python-decorator)
15762 ("python-six" ,python-six)))
15763 (native-inputs
15764 `(("python-flake8" ,python-flake8)
15765 ("python-isort" ,python-isort)
15766 ("python-pytest" ,python-pytest)))
15767 (home-page "https://github.com/kvesteri/validators")
15768 (synopsis "Data validation library")
15769 (description
15770 "This package contains validators for different things such as email
15771 addresses, IP addresses, URLs, hashes and more. It has been designed to
15772 be easy to use and not require defining a schema or form just to validate
15773 some input.")
15774 (license license:expat)))
15775
15776 (define-public python2-validators
15777 (package-with-python2 python-validators))
15778
15779 (define-public python-validate-email
15780 (package
15781 (name "python-validate-email")
15782 (version "1.3")
15783 (source
15784 (origin
15785 (method url-fetch)
15786 (uri (pypi-uri "validate_email" version))
15787 (sha256
15788 (base32
15789 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15790 (build-system python-build-system)
15791 (home-page "https://github.com/syrusakbary/validate_email")
15792 (synopsis "Verifies if an email address is valid and really exists")
15793 (description "@code{validate_email} can be used to verify if an email
15794 address is valid and really exists.")
15795 (license license:lgpl3+)))
15796
15797 (define-public python2-validate-email
15798 (package-with-python2 python-validate-email))
15799
15800 (define-public python-flex
15801 (package
15802 (name "python-flex")
15803 (version "6.10.0")
15804 (source
15805 (origin
15806 (method url-fetch)
15807 (uri (pypi-uri "flex" version))
15808 (sha256
15809 (base32
15810 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15811 (build-system python-build-system)
15812 (propagated-inputs
15813 `(("python-click" ,python-click)
15814 ("python-iso8601" ,python-iso8601)
15815 ("python-jsonpointer" ,python-jsonpointer)
15816 ("python-pyyaml" ,python-pyyaml)
15817 ("python-requests" ,python-requests)
15818 ("python-rfc3987" ,python-rfc3987)
15819 ("python-six" ,python-six)
15820 ("python-validate-email" ,python-validate-email)))
15821 (home-page "https://github.com/pipermerriam/flex")
15822 (synopsis "Validates Swagger schemata")
15823 (description "@code{flex} can be used to validate Swagger schemata.")
15824 (license license:bsd-3)))
15825
15826 (define-public python2-flex
15827 (package-with-python2 python-flex))
15828
15829 (define-public python-marshmallow
15830 (package
15831 (name "python-marshmallow")
15832 (version "3.0.0b14")
15833 (source
15834 (origin
15835 (method url-fetch)
15836 (uri (pypi-uri "marshmallow" version))
15837 (sha256
15838 (base32
15839 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
15840 (build-system python-build-system)
15841 (propagated-inputs
15842 `(("python-dateutil" ,python-dateutil)
15843 ("python-simplejson" ,python-simplejson)))
15844 (native-inputs
15845 `(("python-pytest" ,python-pytest)
15846 ("python-pytz" ,python-pytz)))
15847 (home-page "https://github.com/marshmallow-code/marshmallow")
15848 (synopsis "Convert complex datatypes to and from native
15849 Python datatypes.")
15850 (description "@code{marshmallow} provides a library for converting
15851 complex datatypes to and from native Python datatypes.")
15852 (license license:expat)))
15853
15854 (define-public python2-marshmallow
15855 (package-with-python2 python-marshmallow))
15856
15857 (define-public python-apispec
15858 (package
15859 (name "python-apispec")
15860 (version "0.25.3")
15861 (source
15862 (origin
15863 (method url-fetch)
15864 (uri (pypi-uri "apispec" version))
15865 (sha256
15866 (base32
15867 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
15868 (build-system python-build-system)
15869 (propagated-inputs
15870 `(("python-pyyaml" ,python-pyyaml)))
15871 (native-inputs
15872 `(("python-pytest" ,python-pytest)
15873 ("python-flask" ,python-flask)
15874 ("python-marshmallow" ,python-marshmallow)
15875 ("python-tornado" ,python-tornado)
15876 ("python-bottle" ,python-bottle)
15877 ("python-mock" ,python-mock)))
15878 (home-page "https://github.com/marshmallow-code/apispec")
15879 (synopsis "Swagger 2.0 API specification generator")
15880 (description "@code{python-apispec} is a pluggable API specification
15881 generator. Currently supports the OpenAPI specification (f.k.a.
15882 Swagger 2.0).")
15883 (license license:expat)))
15884
15885 (define-public python2-apispec
15886 (package-with-python2 python-apispec))
15887
15888 (define-public python-flasgger
15889 (package
15890 (name "python-flasgger")
15891 (version "0.6.3")
15892 (source
15893 (origin
15894 (method git-fetch)
15895 (uri (git-reference
15896 (url "https://github.com/rochacbruno/flasgger")
15897 (commit version)))
15898 (file-name (git-file-name name version))
15899 (sha256
15900 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
15901 (build-system python-build-system)
15902 (arguments
15903 `(#:phases
15904 (modify-phases %standard-phases
15905 (replace 'check
15906 (lambda* (#:key inputs outputs #:allow-other-keys)
15907 (substitute* "Makefile"
15908 (("flake8 flasgger --ignore=F403")
15909 "flake8 flasgger --ignore=E731,F403"))
15910 (setenv "PYTHONPATH" (string-append (getcwd)
15911 ":"
15912 (getenv "PYTHONPATH")))
15913 (invoke "py.test"))))))
15914 (propagated-inputs
15915 `(("python-flask" ,python-flask)
15916 ("python-pyyaml" ,python-pyyaml)
15917 ("python-jsonschema" ,python-jsonschema)
15918 ("python-mistune" ,python-mistune)
15919 ("python-six" ,python-six)))
15920 (native-inputs
15921 `(("python-decorator" ,python-decorator)
15922 ("python-flake8" ,python-flake8)
15923 ("python-flask-restful" ,python-flask-restful)
15924 ("python-flex" ,python-flex)
15925 ("python-pytest" ,python-pytest)
15926 ("python-pytest-cov" ,python-pytest-cov)
15927 ("python-marshmallow" ,python-marshmallow)
15928 ("python-apispec" ,python-apispec)))
15929 (home-page "https://github.com/rochacbruno/flasgger/")
15930 (synopsis "Extract Swagger specs from your Flask project")
15931 (description "@code{python-flasgger} allows extracting Swagger specs
15932 from your Flask project. It is a fork of Flask-Swagger.")
15933 (license license:expat)))
15934
15935 (define-public python2-flasgger
15936 (package-with-python2 python-flasgger))
15937
15938 (define-public python-swagger-spec-validator
15939 (package
15940 (name "python-swagger-spec-validator")
15941 (version "2.4.3")
15942 (source
15943 (origin
15944 (method url-fetch)
15945 (uri (pypi-uri "swagger-spec-validator" version))
15946 (sha256
15947 (base32
15948 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
15949 (build-system python-build-system)
15950 (propagated-inputs
15951 `(("python-jsonschema" ,python-jsonschema)
15952 ("python-pyyaml" ,python-pyyaml)
15953 ("python-six" ,python-six)))
15954 (home-page
15955 "https://github.com/Yelp/swagger_spec_validator")
15956 (synopsis "Validation of Swagger specifications")
15957 (description "@code{swagger_spec_validator} provides a library for
15958 validating Swagger API specifications.")
15959 (license license:asl2.0)))
15960
15961 (define-public python2-swagger-spec-validator
15962 (package-with-python2 python-swagger-spec-validator))
15963
15964 (define-public python-apache-libcloud
15965 (package
15966 (name "python-apache-libcloud")
15967 (version "2.4.0")
15968 (source
15969 (origin
15970 (method url-fetch)
15971 (uri (pypi-uri "apache-libcloud" version))
15972 (sha256
15973 (base32
15974 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
15975 (build-system python-build-system)
15976 (arguments
15977 `(#:phases
15978 (modify-phases %standard-phases
15979 (add-after 'unpack 'patch-ssh
15980 (lambda* (#:key inputs #:allow-other-keys)
15981 (substitute* "libcloud/compute/ssh.py"
15982 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15983 "/bin/ssh" "'")))
15984 #t))
15985 (add-after 'unpack 'patch-tests
15986 (lambda _
15987 (substitute* "./libcloud/test/test_file_fixtures.py"
15988 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15989 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15990 return (httplib.OK,
15991 \"1234abcd\",
15992 {\"test\": \"value\"},
15993 httplib.responses[httplib.OK])
15994 def _ascii"))
15995 (substitute* "libcloud/test/compute/test_ssh_client.py"
15996 (("class ShellOutSSHClientTests")
15997 "@unittest.skip(\"Guix container doesn't have ssh service\")
15998 class ShellOutSSHClientTests")
15999 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
16000 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
16001 (("'.xF0', '.x90', '.x8D', '.x88'")
16002 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
16003 #t))
16004 (add-before 'check 'copy-secret
16005 (lambda _
16006 (copy-file "libcloud/test/secrets.py-dist"
16007 "libcloud/test/secrets.py")
16008 #t)))))
16009 (inputs
16010 `(("openssh" ,openssh)))
16011 (propagated-inputs
16012 `(("python-paramiko" ,python-paramiko)
16013 ("python-requests" ,python-requests)))
16014 (native-inputs
16015 `(("python-lockfile" ,python-lockfile)
16016 ("python-mock" ,python-mock)
16017 ("python-pytest" ,python-pytest)
16018 ("python-pytest-runner" ,python-pytest-runner)
16019 ("python-requests-mock" ,python-requests-mock)))
16020 (home-page "https://libcloud.apache.org/")
16021 (synopsis "Unified Cloud API")
16022 (description "@code{libcloud} is a Python library for interacting with
16023 many of the popular cloud service providers using a unified API.")
16024 (license license:asl2.0)))
16025
16026 (define-public python2-apache-libcloud
16027 (package-with-python2 python-apache-libcloud))
16028
16029 (define-public python-smmap
16030 (package
16031 (name "python-smmap")
16032 (version "3.0.1")
16033 (source
16034 (origin
16035 (method url-fetch)
16036 (uri (pypi-uri "smmap" version))
16037 (sha256
16038 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16039 (build-system python-build-system)
16040 (native-inputs
16041 `(("python-nosexcover" ,python-nosexcover)))
16042 (home-page "https://github.com/Byron/smmap")
16043 (synopsis "Python sliding window memory map manager")
16044 (description "@code{smmap} is a pure Python implementation of a sliding
16045 window memory map manager.")
16046 (license license:bsd-3)))
16047
16048 (define-public python-smmap2
16049 (deprecated-package "python-smmap2" python-smmap))
16050
16051 (define-public python2-smmap
16052 (package-with-python2 python-smmap))
16053
16054 (define-public python2-smmap2
16055 (deprecated-package "python2-smmap2" python2-smmap))
16056
16057 (define-public python-regex
16058 (package
16059 (name "python-regex")
16060 (version "2020.6.8")
16061 (source (origin
16062 (method url-fetch)
16063 (uri (pypi-uri "regex" version))
16064 (sha256
16065 (base32
16066 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16067 (build-system python-build-system)
16068 (arguments
16069 '(#:phases
16070 (modify-phases %standard-phases
16071 (replace 'check
16072 (lambda* (#:key inputs outputs #:allow-other-keys)
16073 (add-installed-pythonpath inputs outputs)
16074 (invoke "python" "-c"
16075 "from regex.test_regex import test_main; test_main()"))))))
16076 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16077 (synopsis "Alternative regular expression module")
16078 (description "This regular expression implementation is backwards-
16079 compatible with the standard @code{re} module, but offers additional
16080 functionality like full case-folding for case-insensitive matches in Unicode.")
16081 (license license:psfl)))
16082
16083 (define-public python2-regex
16084 (package-with-python2 python-regex))
16085
16086 (define-public python-pyopengl
16087 (package
16088 (name "python-pyopengl")
16089 (version "3.1.5")
16090 (source
16091 (origin
16092 (method url-fetch)
16093 (uri (pypi-uri "PyOpenGL" version))
16094 (sha256
16095 (base32
16096 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16097 (build-system python-build-system)
16098 (inputs
16099 `(("mesa" ,mesa)
16100 ("freeglut" ,freeglut)
16101 ("glu" ,glu)))
16102 (arguments
16103 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16104 ;attribute 'OSMesa'
16105 #:phases
16106 (modify-phases %standard-phases
16107 (add-before 'build 'fix-paths
16108 (lambda* (#:key inputs outputs #:allow-other-keys)
16109 (substitute* '("OpenGL/platform/ctypesloader.py")
16110 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16111 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16112 (("'GL'")
16113 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16114 (("'GLU'")
16115 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16116 (("'glut',")
16117 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16118 (("'GLESv1_CM'")
16119 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16120 (("'GLESv2'")
16121 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16122 ;; Not providing libgle. It seems to be very old.
16123 #t)))))
16124 (home-page "http://pyopengl.sourceforge.net")
16125 (synopsis "Standard OpenGL bindings for Python")
16126 (description
16127 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16128 related APIs. The binding is created using the standard @code{ctypes}
16129 library.")
16130 (license license:bsd-3)))
16131
16132 (define-public python-pyopengl-accelerate
16133 (package
16134 (inherit python-pyopengl)
16135 (name "python-pyopengl-accelerate")
16136 (version "3.1.5")
16137 (source
16138 (origin
16139 (method url-fetch)
16140 (uri (pypi-uri "PyOpenGL-accelerate" version))
16141 (sha256
16142 (base32
16143 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16144 (inputs
16145 `(("mesa" ,mesa)
16146 ("python-numpy" ,python-numpy))) ; for cython module
16147 ; numpy_formathandler, thus not propagated
16148 (arguments
16149 `(#:tests? #f
16150 #:phases
16151 (modify-phases %standard-phases
16152 (delete 'fix-paths))))
16153 (synopsis "Acceleration code for PyOpenGL")
16154 (description
16155 "This is the Cython-coded accelerator module for PyOpenGL.")))
16156
16157 (define-public python-rencode
16158 (package
16159 (name "python-rencode")
16160 (version "1.0.5")
16161 (source
16162 (origin
16163 (method url-fetch)
16164 (uri (pypi-uri "rencode" version))
16165 (sha256
16166 (base32
16167 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16168 (build-system python-build-system)
16169 (arguments
16170 `(#:phases
16171 (modify-phases %standard-phases
16172 (add-before 'check 'delete-bogus-test
16173 ;; This test requires /home/aresch/Downloads, which is not provided by
16174 ;; the build environment.
16175 (lambda _
16176 (delete-file "rencode/t.py")
16177 #t)))))
16178 (native-inputs `(("pkg-config" ,pkg-config)
16179 ("python-cython" ,python-cython)))
16180 (home-page "https://github.com/aresch/rencode")
16181 (synopsis "Serialization of heterogeneous data structures")
16182 (description
16183 "The @code{rencode} module is a data structure serialization library,
16184 similar to @code{bencode} from the BitTorrent project. For complex,
16185 heterogeneous data structures with many small elements, r-encoding stake up
16186 significantly less space than b-encodings. This version of rencode is a
16187 complete rewrite in Cython to attempt to increase the performance over the
16188 pure Python module.")
16189 (license license:bsd-3)))
16190
16191 (define-public python2-rencode
16192 (package-with-python2 python-rencode))
16193
16194 (define-public python-xenon
16195 (package
16196 (name "python-xenon")
16197 (version "0.7.0")
16198 (source
16199 (origin
16200 (method url-fetch)
16201 (uri (pypi-uri "xenon" version))
16202 (sha256
16203 (base32
16204 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16205 (build-system python-build-system)
16206 (native-inputs
16207 `(("python-pyyaml" ,python-pyyaml)
16208 ("python-radon" ,python-radon)
16209 ("python-requests" ,python-requests)
16210 ("python-flake8" ,python-flake8)
16211 ("python-tox" ,python-tox)))
16212 (arguments
16213 `(#:tests? #f ;test suite not shipped with the PyPI archive
16214 #:phases
16215 (modify-phases %standard-phases
16216 (add-before 'build 'patch-test-requirements
16217 (lambda _
16218 ;; Remove httpretty dependency for tests.
16219 (substitute* "setup.py"
16220 (("httpretty") ""))
16221 #t)))))
16222 (home-page "https://xenon.readthedocs.org/")
16223 (synopsis "Monitor code metrics for Python on your CI server")
16224 (description
16225 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16226 Ideally, @code{xenon} is run every time code is committed. Through command
16227 line options, various thresholds can be set for the complexity of code. It
16228 will fail (i.e. it will exit with a non-zero exit code) when any of these
16229 requirements is not met.")
16230 (license license:expat)))
16231
16232 (define-public python2-xenon
16233 (package-with-python2 python-xenon))
16234
16235 (define-public python-pysocks
16236 (package
16237 (name "python-pysocks")
16238 (version "1.7.0")
16239 (source
16240 (origin
16241 (method url-fetch)
16242 (uri (pypi-uri "PySocks" version))
16243 (sha256
16244 (base32
16245 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
16246 (build-system python-build-system)
16247 (arguments `(#:tests? #f))
16248 (home-page "https://github.com/Anorov/PySocks")
16249 (synopsis "SOCKS client module")
16250 (description "@code{pysocks} is an updated and semi-actively maintained
16251 version of @code{SocksiPy} with bug fixes and extra features.")
16252 (license license:bsd-3)))
16253
16254 (define-public python2-pysocks
16255 (package-with-python2 python-pysocks))
16256
16257 (define-public python-pydiff
16258 (package
16259 (name "python-pydiff")
16260 (version "0.2")
16261 (source
16262 (origin
16263 (method url-fetch)
16264 (uri (pypi-uri "pydiff" version))
16265 (sha256
16266 (base32
16267 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16268 (build-system python-build-system)
16269 (home-page "https://github.com/myint/pydiff")
16270 (synopsis "Library to diff two Python files at the bytecode level")
16271 (description
16272 "@code{pydiff} makes it easy to look for actual code changes while
16273 ignoring formatting changes.")
16274 (license license:expat)))
16275
16276 (define-public python2-pydiff
16277 (package-with-python2 python-pydiff))
16278
16279 (define-public python-tqdm
16280 (package
16281 (name "python-tqdm")
16282 (version "4.43.0")
16283 (source
16284 (origin
16285 (method url-fetch)
16286 (uri (pypi-uri "tqdm" version))
16287 (sha256
16288 (base32
16289 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
16290 (build-system python-build-system)
16291 (arguments
16292 '(#:phases (modify-phases %standard-phases
16293 (replace 'check
16294 (lambda* (#:key inputs outputs #:allow-other-keys)
16295 (add-installed-pythonpath inputs outputs)
16296 ;; This invokation is taken from tox.ini.
16297 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
16298 "-d" "-v" "tqdm/"))))))
16299 (native-inputs
16300 `(("python-nose" ,python-nose)))
16301 (home-page "https://github.com/tqdm/tqdm")
16302 (synopsis "Fast, extensible progress meter")
16303 (description
16304 "Make loops show a progress bar on the console by just wrapping any
16305 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16306 design and layout.")
16307 (license (list license:mpl2.0 license:expat))))
16308
16309 (define-public python2-tqdm
16310 (package-with-python2 python-tqdm))
16311
16312 (define-public python-pkginfo
16313 (package
16314 (name "python-pkginfo")
16315 (version "1.4.2")
16316 (source
16317 (origin
16318 (method url-fetch)
16319 (uri (pypi-uri "pkginfo" version))
16320 (sha256
16321 (base32
16322 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
16323 (build-system python-build-system)
16324 (arguments
16325 ;; The tests are broken upstream.
16326 '(#:tests? #f))
16327 (home-page
16328 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16329 (synopsis
16330 "Query metadatdata from sdists, bdists, and installed packages")
16331 (description
16332 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16333 source distriubtion (an sdist) or a binary distribution (e.g., created by
16334 running bdist_egg). It can also query the EGG-INFO directory of an installed
16335 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16336 created by running @code{python setup.py develop}).")
16337 (license license:expat)))
16338
16339 (define-public python2-pkginfo
16340 (package-with-python2 python-pkginfo))
16341
16342 (define-public python-twine
16343 (package
16344 (name "python-twine")
16345 (version "1.15.0")
16346 (source
16347 (origin
16348 (method url-fetch)
16349 (uri (pypi-uri "twine" version))
16350 (sha256
16351 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
16352 (build-system python-build-system)
16353 (propagated-inputs
16354 `(("python-tqdm" ,python-tqdm)
16355 ("python-packaging" ,python-packaging)
16356 ("python-pkginfo" ,python-pkginfo)
16357 ("python-readme-renderer" ,python-readme-renderer)
16358 ("python-requests" ,python-requests)
16359 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16360 (home-page "https://github.com/pypa/twine")
16361 (synopsis "Collection of utilities for interacting with PyPI")
16362 (description
16363 "@code{twine} currently supports registering projects and uploading
16364 distributions. It authenticates the user over HTTPS, allows them to pre-sign
16365 their files and supports any packaging format (including wheels).")
16366 (license license:asl2.0)))
16367
16368 (define-public python2-twine
16369 (package-with-python2 python-twine))
16370
16371 (define-public python-linecache2
16372 (package
16373 (name "python-linecache2")
16374 (version "1.0.0")
16375 (source
16376 (origin
16377 (method url-fetch)
16378 (uri (pypi-uri "linecache2" version))
16379 (sha256
16380 (base32
16381 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16382 (build-system python-build-system)
16383 (arguments
16384 `(;; The tests depend on unittest2, and our version is a bit too old.
16385 #:tests? #f))
16386 (native-inputs
16387 `(("python-pbr" ,python-pbr-minimal)))
16388 (home-page
16389 "https://github.com/testing-cabal/linecache2")
16390 (synopsis "Backports of the linecache module")
16391 (description
16392 "The linecache module allows one to get any line from any file, while
16393 attempting to optimize internally, using a cache, the common case where many
16394 lines are read from a single file.")
16395 (license license:psfl)))
16396
16397 (define-public python2-linecache2
16398 (package-with-python2 python-linecache2))
16399
16400 (define-public python-traceback2
16401 (package
16402 (name "python-traceback2")
16403 (version "1.4.0")
16404 (source
16405 (origin
16406 (method url-fetch)
16407 (uri (pypi-uri "traceback2" version))
16408 (sha256
16409 (base32
16410 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16411 (build-system python-build-system)
16412 (arguments
16413 `(;; python-traceback2 and python-unittest2 depend on one another.
16414 #:tests? #f))
16415 (native-inputs
16416 `(("python-pbr" ,python-pbr-minimal)))
16417 (propagated-inputs
16418 `(("python-linecache2" ,python-linecache2)))
16419 (home-page
16420 "https://github.com/testing-cabal/traceback2")
16421 (synopsis "Backports of the traceback module")
16422 (description
16423 "This module provides a standard interface to extract, format and print
16424 stack traces of Python programs. It exactly mimics the behavior of the Python
16425 interpreter when it prints a stack trace.")
16426 (license license:psfl)))
16427
16428 (define-public python2-traceback2
16429 (package-with-python2 python-traceback2))
16430
16431 (define-public python-ratelimiter
16432 (package
16433 (name "python-ratelimiter")
16434 (version "1.2.0")
16435 (source
16436 (origin
16437 (method url-fetch)
16438 (uri (pypi-uri "ratelimiter" version))
16439 (sha256
16440 (base32
16441 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
16442 (build-system python-build-system)
16443 (arguments
16444 '(#:tests? #f)) ; There are no tests in the pypi archive.
16445 (home-page "https://github.com/RazerM/ratelimiter")
16446 (synopsis "Simple rate limiting object")
16447 (description
16448 "The @code{ratelimiter} module ensures that an operation will not be
16449 executed more than a given number of times during a given period.")
16450 (license license:asl2.0)))
16451
16452 (define-public python2-ratelimiter
16453 (package-with-python2 python-ratelimiter))
16454
16455 (define-public python-dukpy
16456 (package
16457 (name "python-dukpy")
16458 (version "0.3")
16459 (source
16460 (origin
16461 (method git-fetch)
16462 (uri (git-reference
16463 (url "https://github.com/kovidgoyal/dukpy")
16464 (commit (string-append "v" version))))
16465 (file-name (git-file-name name version))
16466 (sha256
16467 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
16468 (build-system python-build-system)
16469 (home-page "https://github.com/kovidgoyal/dukpy")
16470 (synopsis "Run JavaScript in python")
16471 (description
16472 "dukpy is a JavaScript runtime environment for Python using the duktape
16473 embeddable JavaScript engine.")
16474 ;; Dukpy is licensed under MIT like the embedded duktape library,
16475 ;; with 'errors.c' as GPL3.
16476 (license (list license:expat license:gpl3))))
16477
16478 (define-public python2-dukpy
16479 (package-with-python2 python-dukpy))
16480
16481 (define-public python-jsonrpclib-pelix
16482 (package
16483 (name "python-jsonrpclib-pelix")
16484 (version "0.3.2")
16485 (source
16486 (origin
16487 (method url-fetch)
16488 (uri (pypi-uri "jsonrpclib-pelix" version))
16489 (sha256
16490 (base32
16491 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
16492 (build-system python-build-system)
16493 (arguments
16494 `(#:tests? #f)) ; no tests in PyPI tarball
16495 (home-page "https://github.com/tcalmant/jsonrpclib/")
16496 (synopsis "JSON-RPC 2.0 client library for Python")
16497 (description
16498 "This library implements the JSON-RPC v2.0
16499 specification (backwards-compatible) as a client library for Python. This
16500 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
16501 services.")
16502 (license license:asl2.0)))
16503
16504 (define-public python2-jsonrpclib-pelix
16505 (package-with-python2 python-jsonrpclib-pelix))
16506
16507 (define-public python-setuptools-scm-git-archive
16508 (package
16509 (name "python-setuptools-scm-git-archive")
16510 (version "1.0")
16511 (source
16512 (origin
16513 (method url-fetch)
16514 (uri (pypi-uri "setuptools_scm_git_archive" version))
16515 (sha256
16516 (base32
16517 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
16518 (build-system python-build-system)
16519 (native-inputs
16520 `(("python-pytest" ,python-pytest)))
16521 (propagated-inputs
16522 `(("python-setuptools-scm" ,python-setuptools-scm)))
16523 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
16524 (synopsis "Setuptools_scm plugin for git archives")
16525 (description
16526 "The setuptools_scm_git_archive package is a plugin to
16527 setuptools_scm, which supports obtaining versions from git archives that
16528 belong to tagged versions.")
16529 (license license:expat)))
16530
16531 (define-public python2-setuptools-scm-git-archive
16532 (package-with-python2 python-setuptools-scm-git-archive))
16533
16534 (define-public python-setuptools-git
16535 (package
16536 (name "python-setuptools-git")
16537 (version "1.2")
16538 (source
16539 (origin
16540 (method url-fetch)
16541 (uri (pypi-uri "setuptools-git" version))
16542 (sha256
16543 (base32
16544 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
16545 (build-system python-build-system)
16546 (arguments
16547 `(#:phases
16548 (modify-phases %standard-phases
16549 ;; This is needed for tests.
16550 (add-after 'unpack 'configure-git
16551 (lambda _
16552 (setenv "HOME" "/tmp")
16553 (invoke "git" "config" "--global" "user.email" "guix")
16554 (invoke "git" "config" "--global" "user.name" "guix")
16555 #t)))))
16556 (native-inputs
16557 `(("git" ,git-minimal)))
16558 (home-page "https://github.com/msabramo/setuptools-git")
16559 (synopsis "Setuptools revision control system plugin for Git")
16560 (description
16561 "This package provides a plugin for Setuptools for revision control with
16562 Git.")
16563 (license license:bsd-3)))
16564
16565 (define-public python-pyclipper
16566 (package
16567 (name "python-pyclipper")
16568 (version "1.1.0.post3")
16569 (source
16570 (origin
16571 (method url-fetch)
16572 (uri (pypi-uri "pyclipper" version ".zip"))
16573 (sha256
16574 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
16575 (modules '((guix build utils)))
16576 (snippet
16577 '(begin
16578 ;; This file is generated by Cython.
16579 (delete-file "pyclipper/pyclipper.cpp") #t))))
16580 (build-system python-build-system)
16581 (arguments
16582 `(#:phases
16583 (modify-phases %standard-phases
16584 (add-before 'build 'cythonize-sources
16585 (lambda _
16586 (with-directory-excursion "pyclipper"
16587 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
16588 (propagated-inputs
16589 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
16590 (native-inputs
16591 `(("python-cython" ,python-cython)
16592 ("python-pytest" ,python-pytest)
16593 ("python-pytest-runner" ,python-pytest-runner)
16594 ("python-unittest2" ,python-unittest2)
16595 ("unzip" ,unzip)))
16596 (home-page "https://github.com/greginvm/pyclipper")
16597 (synopsis "Wrapper for Angus Johnson's Clipper library")
16598 (description
16599 "Pyclipper is a Cython wrapper for the C++ translation of the
16600 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
16601 (license license:expat)))
16602
16603 (define-public python2-pyclipper
16604 (package-with-python2 python-pyclipper))
16605
16606 (define-public python2-booleanoperations
16607 (package
16608 (name "python2-booleanoperations")
16609 (version "0.7.1")
16610 (source
16611 (origin
16612 (method url-fetch)
16613 (uri (pypi-uri "booleanOperations" version ".zip"))
16614 (sha256
16615 (base32
16616 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
16617 (build-system python-build-system)
16618 (arguments
16619 `(#:python ,python-2))
16620 (native-inputs
16621 `(("unzip" ,unzip)
16622 ("python2-pytest" ,python2-pytest)
16623 ("python2-pytest-runner" ,python2-pytest-runner)))
16624 (propagated-inputs
16625 `(("python-fonttools" ,python2-fonttools)
16626 ("python-pyclipper" ,python2-pyclipper)
16627 ("python-ufolib" ,python2-ufolib)))
16628 (home-page "https://github.com/typemytype/booleanOperations")
16629 (synopsis "Boolean operations on paths")
16630 (description
16631 "BooleanOperations provides a Python library that enables
16632 boolean operations on paths.")
16633 (license license:expat)))
16634
16635 (define-public python-tempdir
16636 (package
16637 (name "python-tempdir")
16638 (version "0.7.1")
16639 (source
16640 (origin
16641 (method url-fetch)
16642 (uri (pypi-uri "tempdir" version))
16643 (sha256
16644 (base32
16645 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
16646 (build-system python-build-system)
16647 (home-page "https://pypi.org/project/tempdir/")
16648 (arguments
16649 ;; the package has no tests
16650 '(#:tests? #f))
16651 (synopsis "Python library for managing temporary directories")
16652 (description
16653 "This library manages temporary directories that are automatically
16654 deleted with all their contents when they are no longer needed. It is
16655 particularly convenient for use in tests.")
16656 (license license:expat)))
16657
16658 (define-public python2-tempdir
16659 (package-with-python2 python-tempdir))
16660
16661 (define-public python-activepapers
16662 (package
16663 (name "python-activepapers")
16664 (version "0.2.2")
16665 (source
16666 (origin
16667 (method url-fetch)
16668 (uri (pypi-uri "ActivePapers.Py" version))
16669 (sha256
16670 (base32
16671 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
16672 (build-system python-build-system)
16673 (arguments
16674 `(#:modules ((ice-9 ftw)
16675 (srfi srfi-1)
16676 (guix build utils)
16677 (guix build python-build-system))
16678
16679 #:phases
16680 (modify-phases %standard-phases
16681 (add-after 'unpack 'delete-python2-code
16682 (lambda _
16683 (for-each delete-file
16684 '("lib/activepapers/builtins2.py"
16685 "lib/activepapers/standardlib2.py"
16686 "lib/activepapers/utility2.py"))))
16687 (replace 'check
16688 (lambda _
16689 ;; Deactivate the test cases that download files
16690 (setenv "NO_NETWORK_ACCESS" "1")
16691 ;; For some strange reason, some tests fail if nosetests runs all
16692 ;; test modules in a single execution. They pass if each test
16693 ;; module is run individually.
16694 (for-each (lambda (filename)
16695 (invoke "nosetests"
16696 (string-append "tests/" filename)))
16697 (scandir "tests"
16698 (lambda (filename)
16699 (string-suffix? ".py" filename)))))))))
16700 (native-inputs
16701 `(("python-tempdir" ,python-tempdir)
16702 ("python-nose" ,python-nose)))
16703 (propagated-inputs
16704 `(("python-h5py" ,python-h5py)))
16705 (home-page "https://www.activepapers.org/")
16706 (synopsis "Executable papers for scientific computing")
16707 (description
16708 "ActivePapers is a tool for working with executable papers, which
16709 combine data, code, and documentation in single-file packages,
16710 suitable for publication as supplementary material or on repositories
16711 such as figshare or Zenodo.")
16712 (properties `((python2-variant . ,(delay python2-activepapers))))
16713 (license license:bsd-3)))
16714
16715 (define-public python2-activepapers
16716 (let ((base (package-with-python2
16717 (strip-python2-variant python-activepapers))))
16718 (package
16719 (inherit base)
16720 (arguments
16721 (substitute-keyword-arguments (package-arguments base)
16722 ((#:phases phases)
16723 `(modify-phases ,phases
16724 (delete 'delete-python2-code)
16725 (add-after 'unpack 'delete-python3-code
16726 (lambda _
16727 (for-each delete-file
16728 '("lib/activepapers/builtins3.py"
16729 "lib/activepapers/standardlib3.py"
16730 "lib/activepapers/utility3.py")))))))))))
16731
16732 (define-public python-semver
16733 (package
16734 (name "python-semver")
16735 (version "2.9.0")
16736 (source
16737 (origin
16738 (method url-fetch)
16739 (uri (pypi-uri "semver" version))
16740 (sha256
16741 (base32
16742 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
16743 (build-system python-build-system)
16744 (native-inputs
16745 `(("python-appdirs" ,python-appdirs)
16746 ("python-distlib" ,python-distlib)
16747 ("python-importlib-metadata" ,python-importlib-metadata)
16748 ("python-filelock" ,python-filelock)
16749 ("python-six" ,python-six)
16750 ("python-tox" ,python-tox)
16751 ("python-virtualenv" ,python-virtualenv)))
16752 (home-page "https://github.com/k-bx/python-semver")
16753 (synopsis "Python helper for Semantic Versioning")
16754 (description "This package provides a Python library for
16755 @url{Semantic Versioning, http://semver.org/}.")
16756 (license license:bsd-3)))
16757
16758 (define-public python2-semver
16759 (package-with-python2 python-semver))
16760
16761 (define-public python-pyro4
16762 (package
16763 (name "python-pyro4")
16764 (version "4.77")
16765 (source
16766 (origin
16767 (method url-fetch)
16768 (uri (pypi-uri "Pyro4" version))
16769 (sha256
16770 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
16771 (build-system python-build-system)
16772 (arguments
16773 '(#:tests? #f)) ;FIXME: Some tests require network access.
16774 (native-inputs
16775 `(("python-cloudpickle" ,python-cloudpickle)
16776 ("python-dill" ,python-dill)
16777 ("python-msgpack" ,python-msgpack)))
16778 (propagated-inputs
16779 `(("python-serpent" ,python-serpent)))
16780 (home-page "https://pyro4.readthedocs.io")
16781 (synopsis "Distributed object middleware for Python")
16782 (description
16783 "Pyro enables you to build applications in which objects can talk to each
16784 other over the network. You can just use normal Python method calls to call
16785 objects on other machines, also known as remote procedure calls (RPC).")
16786 (license license:expat)))
16787
16788 (define-public python2-pyro
16789 (package
16790 (name "python2-pyro")
16791 (version "3.16")
16792 (source
16793 (origin
16794 (method url-fetch)
16795 (uri (pypi-uri "Pyro" version))
16796 (file-name (string-append "Pyro-" version ".tar.gz"))
16797 (sha256
16798 (base32
16799 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
16800 (build-system python-build-system)
16801 (arguments
16802 ;; Pyro is not compatible with Python 3
16803 `(#:python ,python-2
16804 ;; Pyro has no test cases for automatic execution
16805 #:tests? #f))
16806 (home-page "https://pythonhosted.org/Pyro/")
16807 (synopsis "Distributed object manager for Python")
16808 (description "Pyro is a Distributed Object Technology system
16809 written in Python that is designed to be easy to use. It resembles
16810 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
16811 which is a system and language independent Distributed Object Technology
16812 and has much more to offer than Pyro or RMI. Pyro 3.x is no
16813 longer maintained. New projects should use Pyro4 instead, which
16814 is the new Pyro version that is actively developed.")
16815 (license license:expat)))
16816
16817 (define-public python2-scientific
16818 (package
16819 (name "python2-scientific")
16820 (version "2.9.4")
16821 (source
16822 (origin
16823 (method git-fetch)
16824 (uri (git-reference
16825 (url "https://github.com/khinsen/ScientificPython")
16826 (commit (string-append "rel" version))))
16827 (file-name (git-file-name name version))
16828 (sha256
16829 (base32
16830 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
16831 (build-system python-build-system)
16832 (inputs
16833 `(("netcdf" ,netcdf)))
16834 (propagated-inputs
16835 `(("python-numpy" ,python2-numpy-1.8)
16836 ("python-pyro" ,python2-pyro)))
16837 (arguments
16838 ;; ScientificPython is not compatible with Python 3
16839 `(#:python ,python-2
16840 #:tests? #f ; No test suite
16841 #:phases
16842 (modify-phases %standard-phases
16843 (replace 'build
16844 (lambda* (#:key inputs #:allow-other-keys)
16845 (invoke "python" "setup.py" "build"
16846 (string-append "--netcdf_prefix="
16847 (assoc-ref inputs "netcdf"))))))))
16848 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
16849 (synopsis "Python modules for scientific computing")
16850 (description "ScientificPython is a collection of Python modules that are
16851 useful for scientific computing. Most modules are rather general (Geometry,
16852 physical units, automatic derivatives, ...) whereas others are more
16853 domain-specific (e.g. netCDF and PDB support). The library is currently
16854 not actively maintained and works only with Python 2 and NumPy < 1.9.")
16855 (license license:cecill-c)))
16856
16857 (define-public python2-mmtk
16858 (package
16859 (name "python2-mmtk")
16860 (version "2.7.12")
16861 (source
16862 (origin
16863 (method git-fetch)
16864 (uri (git-reference
16865 (url "https://github.com/khinsen/MMTK")
16866 (commit (string-append "rel" version))))
16867 (file-name (git-file-name name version))
16868 (sha256
16869 (base32
16870 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
16871 (build-system python-build-system)
16872 (native-inputs
16873 `(("netcdf" ,netcdf)))
16874 (propagated-inputs
16875 `(("python-scientific" ,python2-scientific)
16876 ("python-tkinter" ,python-2 "tk")))
16877 (arguments
16878 `(#:python ,python-2
16879 #:tests? #f
16880 #:phases
16881 (modify-phases %standard-phases
16882 (add-before 'build 'includes-from-scientific
16883 (lambda* (#:key inputs #:allow-other-keys)
16884 (mkdir-p "Include/Scientific")
16885 (copy-recursively
16886 (string-append
16887 (assoc-ref inputs "python-scientific")
16888 "/include/python2.7/Scientific")
16889 "Include/Scientific"))))))
16890 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
16891 (synopsis "Python library for molecular simulation")
16892 (description "MMTK is a library for molecular simulations with an emphasis
16893 on biomolecules. It provides widely used methods such as Molecular Dynamics
16894 and normal mode analysis, but also basic routines for implementing new methods
16895 for simulation and analysis. The library is currently not actively maintained
16896 and works only with Python 2 and NumPy < 1.9.")
16897 (license license:cecill-c)))
16898
16899 (define-public python-phonenumbers
16900 (package
16901 (name "python-phonenumbers")
16902 (version "8.9.1")
16903 (source
16904 (origin
16905 (method url-fetch)
16906 (uri (pypi-uri "phonenumbers" version))
16907 (sha256
16908 (base32
16909 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
16910 (build-system python-build-system)
16911 (home-page
16912 "https://github.com/daviddrysdale/python-phonenumbers")
16913 (synopsis
16914 "Python library for dealing with international phone numbers")
16915 (description
16916 "This package provides a Python port of Google's libphonenumber library.")
16917 (license license:asl2.0)))
16918
16919 (define-public python2-phonenumbers
16920 (package-with-python2 python-phonenumbers))
16921
16922 (define-public python-send2trash
16923 (package
16924 (name "python-send2trash")
16925 (version "1.5.0")
16926 (source
16927 (origin (method git-fetch)
16928 ;; Source tarball on PyPI doesn't include tests.
16929 (uri (git-reference
16930 (url "https://github.com/hsoft/send2trash")
16931 (commit version)))
16932 (file-name (git-file-name name version))
16933 (sha256
16934 (base32
16935 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
16936 (build-system python-build-system)
16937 (arguments
16938 '(#:phases
16939 (modify-phases %standard-phases
16940 (add-before 'check 'pre-check
16941 (lambda _
16942 (mkdir-p "/tmp/foo")
16943 (setenv "HOME" "/tmp/foo")
16944 #t)))))
16945 (home-page "https://github.com/hsoft/send2trash")
16946 (synopsis "Send files to the user's @file{~/Trash} directory")
16947 (description "This package provides a Python library to send files to the
16948 user's @file{~/Trash} directory.")
16949 (properties `((python2-variant . ,(delay python2-send2trash))))
16950 (license license:bsd-3)))
16951
16952 (define-public python2-send2trash
16953 (package
16954 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
16955 (arguments
16956 (substitute-keyword-arguments (package-arguments python-send2trash)
16957 ((#:phases phases)
16958 `(modify-phases ,phases
16959 (add-before 'check 'setenv
16960 (lambda _
16961 (setenv "PYTHONPATH"
16962 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
16963 #t))))))))
16964
16965 (define-public python-yapf
16966 (package
16967 (name "python-yapf")
16968 (version "0.29.0")
16969 (source
16970 (origin
16971 (method url-fetch)
16972 (uri (pypi-uri "yapf" version))
16973 (sha256
16974 (base32
16975 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
16976 (build-system python-build-system)
16977 (home-page "https://github.com/google/yapf")
16978 (synopsis "Formatter for Python code")
16979 (description "YAPF is a formatter for Python code. It's based off of
16980 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
16981 takes the code and reformats it to the best formatting that conforms to the
16982 style guide, even if the original code didn't violate the style guide.")
16983 (license license:asl2.0)))
16984
16985 (define-public python2-yapf
16986 (package-with-python2 python-yapf))
16987
16988 (define-public python-gyp
16989 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
16990 (revision "0"))
16991 (package
16992 (name "python-gyp")
16993 ;; Google does not release versions,
16994 ;; based on second most recent commit date.
16995 (version (git-version "0.0.0" revision commit))
16996 (source
16997 (origin
16998 ;; Google does not release tarballs,
16999 ;; git checkout is needed.
17000 (method git-fetch)
17001 (uri (git-reference
17002 (url "https://chromium.googlesource.com/external/gyp")
17003 (commit commit)))
17004 (file-name (git-file-name name version))
17005 (sha256
17006 (base32
17007 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17008 (build-system python-build-system)
17009 (home-page "https://gyp.gsrc.io/")
17010 (synopsis "GYP is a Meta-Build system")
17011 (description
17012 "GYP builds build systems for large, cross platform applications.
17013 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17014 files, and Makefiles.")
17015 (license license:bsd-3))))
17016
17017 (define-public python2-gyp
17018 (package-with-python2 python-gyp))
17019
17020 (define-public python-whatever
17021 (package
17022 (name "python-whatever")
17023 (version "0.6")
17024 (source
17025 (origin
17026 (method git-fetch)
17027 (uri (git-reference
17028 (url "https://github.com/Suor/whatever")
17029 (commit version)))
17030 (file-name (git-file-name name version))
17031 (sha256
17032 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17033 (build-system python-build-system)
17034 (arguments
17035 `(#:phases
17036 (modify-phases %standard-phases
17037 (replace 'check
17038 (lambda _
17039 (invoke "py.test"))))))
17040 (native-inputs
17041 `(("python-pytest" ,python-pytest)))
17042 (home-page "https://github.com/Suor/whatever")
17043 (synopsis "Make anonymous functions by partial application of operators")
17044 (description "@code{whatever} provides an easy way to make anonymous
17045 functions by partial application of operators.")
17046 (license license:bsd-3)))
17047
17048 (define-public python2-whatever
17049 (package-with-python2 python-whatever))
17050
17051 (define-public python-funcy
17052 (package
17053 (name "python-funcy")
17054 (version "1.11")
17055 (source
17056 (origin
17057 (method git-fetch)
17058 (uri (git-reference
17059 (url "https://github.com/Suor/funcy")
17060 (commit version)))
17061 (sha256
17062 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17063 (file-name (git-file-name name version))))
17064 (build-system python-build-system)
17065 (arguments
17066 `(#:phases
17067 (modify-phases %standard-phases
17068 (replace 'check
17069 (lambda _
17070 (invoke "py.test"))))))
17071 (native-inputs
17072 `(("python-pytest" ,python-pytest)
17073 ("python-whatever" ,python-whatever)))
17074 (home-page "https://github.com/Suor/funcy")
17075 (synopsis "Functional tools")
17076 (description "@code{funcy} is a library that provides functional tools.
17077 Examples are:
17078 @enumerate
17079 @item merge - Merges collections of the same type
17080 @item walk - Type-preserving map
17081 @item select - Selects a part of a collection
17082 @item take - Takes the first n items of a collection
17083 @item first - Takes the first item of a collection
17084 @item remove - Predicated-removes items of a collection
17085 @item concat - Concatenates two collections
17086 @item flatten - Flattens a collection with subcollections
17087 @item distinct - Returns only distinct items
17088 @item split - Predicated-splits a collection
17089 @item split_at - Splits a collection at a given item
17090 @item group_by - Groups items by group
17091 @item pairwise - Pairs off adjacent items
17092 @item partial - Partially-applies a function
17093 @item curry - Curries a function
17094 @item compose - Composes functions
17095 @item complement - Complements a predicate
17096 @item all_fn - \"all\" with predicate
17097 @end enumerate")
17098 (license license:bsd-3)))
17099
17100 (define-public python2-funcy
17101 (package-with-python2 python-funcy))
17102
17103 (define-public python-isoweek
17104 (package
17105 (name "python-isoweek")
17106 (version "1.3.3")
17107 (source
17108 (origin
17109 (method url-fetch)
17110 (uri (pypi-uri "isoweek" version))
17111 (sha256
17112 (base32
17113 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17114 (build-system python-build-system)
17115 (home-page "https://github.com/gisle/isoweek")
17116 (synopsis "Objects representing a week")
17117 (description "The @code{isoweek} module provide the class Week that
17118 implements the week definition of ISO 8601. This standard also defines
17119 a notation for identifying weeks; yyyyWww (where the W is a literal).
17120 Week instances stringify to this form.")
17121 (license license:bsd-3)))
17122
17123 (define-public python2-isoweek
17124 (package-with-python2 python-isoweek))
17125
17126 (define-public python-tokenize-rt
17127 (package
17128 (name "python-tokenize-rt")
17129 (version "2.0.1")
17130 (source
17131 (origin
17132 (method url-fetch)
17133 (uri (pypi-uri "tokenize-rt" version))
17134 (sha256
17135 (base32
17136 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
17137 (build-system python-build-system)
17138 (home-page "https://github.com/asottile/tokenize-rt")
17139 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
17140 (description
17141 "This Python library is a wrapper around @code{tokenize} from the Python
17142 standard library. It provides two additional tokens @code{ESCAPED_NL} and
17143 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
17144 and @code{tokens_to_src} to roundtrip.")
17145 (license license:expat)))
17146
17147 (define-public python-future-fstrings
17148 (package
17149 (name "python-future-fstrings")
17150 (version "0.4.1")
17151 (source
17152 (origin
17153 (method url-fetch)
17154 (uri (pypi-uri "future_fstrings" version))
17155 (sha256
17156 (base32
17157 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
17158 (build-system python-build-system)
17159 (propagated-inputs
17160 `(("python-tokenize-rt" ,python-tokenize-rt)))
17161 (home-page "https://github.com/asottile/future-fstrings")
17162 (synopsis "Backport of fstrings to Python < 3.6")
17163 (description
17164 "This package provides a UTF-8 compatible encoding
17165 @code{future_fstrings}, which performs source manipulation. It decodes the
17166 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
17167 @code{f} strings.")
17168 (license license:expat)))
17169
17170 (define-public python-typed-ast
17171 (package
17172 (name "python-typed-ast")
17173 (version "1.4.0")
17174 (source
17175 (origin
17176 (method git-fetch)
17177 (uri (git-reference
17178 (url "https://github.com/python/typed_ast")
17179 (commit version)))
17180 (sha256
17181 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
17182 (file-name (git-file-name name version))))
17183 (build-system python-build-system)
17184 (arguments
17185 `(#:modules ((guix build utils)
17186 (guix build python-build-system)
17187 (ice-9 ftw)
17188 (srfi srfi-1)
17189 (srfi srfi-26))
17190 #:phases
17191 (modify-phases %standard-phases
17192 (replace 'check
17193 (lambda _
17194 (let ((cwd (getcwd)))
17195 (setenv "PYTHONPATH"
17196 (string-append cwd "/build/"
17197 (find (cut string-prefix? "lib" <>)
17198 (scandir (string-append cwd "/build")))
17199 ":"
17200 (getenv "PYTHONPATH"))))
17201 (invoke "pytest")
17202 #t)))))
17203 (native-inputs `(("python-pytest" ,python-pytest)))
17204 (home-page "https://github.com/python/typed_ast")
17205 (synopsis "Fork of Python @code{ast} modules with type comment support")
17206 (description "This package provides a parser similar to the standard
17207 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
17208 include PEP 484 type comments and are independent of the version of Python
17209 under which they are run. The @code{typed_ast} parsers produce the standard
17210 Python AST (plus type comments), and are both fast and correct, as they are
17211 based on the CPython 2.7 and 3.7 parsers.")
17212 ;; See the file "LICENSE" for the details.
17213 (license (list license:psfl
17214 license:asl2.0
17215 license:expat)))) ;ast27/Parser/spark.py
17216
17217 (define-public python-typing
17218 (package
17219 (name "python-typing")
17220 (version "3.7.4.3")
17221 (source
17222 (origin
17223 (method url-fetch)
17224 (uri (pypi-uri "typing" version))
17225 (sha256
17226 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
17227 (build-system python-build-system)
17228 (home-page "https://docs.python.org/3/library/typing.html")
17229 (synopsis "Type hints for Python")
17230 (description "This is a backport of the standard library @code{typing}
17231 module to Python versions older than 3.5. Typing defines a standard notation
17232 for Python function and variable type annotations. The notation can be used
17233 for documenting code in a concise, standard format, and it has been designed
17234 to also be used by static and runtime type checkers, static analyzers, IDEs
17235 and other tools.")
17236 (license license:psfl)))
17237
17238 (define-public python2-typing
17239 (package-with-python2 python-typing))
17240
17241 (define-public python-typing-extensions
17242 (package
17243 (name "python-typing-extensions")
17244 (version "3.7.4.2")
17245 (source
17246 (origin
17247 (method url-fetch)
17248 (uri (pypi-uri "typing_extensions" version))
17249 (sha256
17250 (base32
17251 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
17252 (build-system python-build-system)
17253 (home-page
17254 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
17255 (synopsis "Experimental type hints for Python")
17256 (description
17257 "The typing_extensions module contains additional @code{typing} hints not
17258 yet present in the of the @code{typing} standard library.
17259 Included are implementations of:
17260 @enumerate
17261 @item ClassVar
17262 @item ContextManager
17263 @item Counter
17264 @item DefaultDict
17265 @item Deque
17266 @item NewType
17267 @item NoReturn
17268 @item overload
17269 @item Protocol
17270 @item runtime
17271 @item Text
17272 @item Type
17273 @item TYPE_CHECKING
17274 @item AsyncGenerator
17275 @end enumerate\n")
17276 (license license:psfl)))
17277
17278 (define-public bpython
17279 (package
17280 (name "bpython")
17281 (version "0.18")
17282 (source
17283 (origin
17284 (method url-fetch)
17285 (uri (pypi-uri "bpython" version))
17286 (sha256
17287 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
17288 (build-system python-build-system)
17289 (arguments
17290 `(#:phases
17291 (modify-phases %standard-phases
17292 (add-after 'unpack 'remove-failing-test
17293 (lambda _
17294 ;; Remove failing test. FIXME: make it pass
17295 (delete-file "bpython/test/test_args.py")
17296 #t))
17297 (add-after 'wrap 'add-aliases
17298 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
17299 (lambda* (#:key outputs #:allow-other-keys)
17300 (let ((out (assoc-ref outputs "out")))
17301 (for-each
17302 (lambda (old new)
17303 (symlink old (string-append out "/bin/" new)))
17304 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
17305 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
17306 #t)))))
17307 (propagated-inputs
17308 `(("python-pygments" ,python-pygments)
17309 ("python-requests" ,python-requests)
17310 ("python-babel" ,python-babel) ; optional, for internationalization
17311 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
17312 ("python-greenlet" ,python-greenlet)
17313 ("python-urwid" ,python-urwid) ; for bpython-urwid only
17314 ("python-six" ,python-six)))
17315 (native-inputs
17316 `(("python-sphinx" ,python-sphinx)
17317 ("python-mock" ,python-mock)))
17318 (home-page "https://bpython-interpreter.org/")
17319 (synopsis "Fancy interface to the Python interpreter")
17320 (description "Bpython is a fancy interface to the Python
17321 interpreter. bpython's main features are
17322
17323 @enumerate
17324 @item in-line syntax highlighting,
17325 @item readline-like autocomplete with suggestions displayed as you type,
17326 @item expected parameter list for any Python function,
17327 @item \"rewind\" function to pop the last line of code from memory and
17328 re-evaluate,
17329 @item send the code you've entered off to a pastebin,
17330 @item save the code you've entered to a file, and
17331 @item auto-indentation.
17332 @end enumerate")
17333 (license license:expat)))
17334
17335 (define-public bpython2
17336 (let ((base (package-with-python2
17337 (strip-python2-variant bpython))))
17338 (package (inherit base)
17339 (name "bpython2")
17340 (arguments
17341 `(#:python ,python-2
17342 #:phases
17343 (modify-phases %standard-phases
17344 (add-after 'unpack 'remove-failing-test
17345 (lambda _
17346 ;; Remove failing test. FIXME: make it pass
17347 (delete-file "bpython/test/test_args.py")
17348 ;; Disable failing test-cases (renaming inhibits they are
17349 ;; discovered)
17350 (substitute* "bpython/test/test_curtsies_repl.py"
17351 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
17352 (string-append a "xxx_off_" b))
17353 (("^(\\s*def )(test_complex\\W)" _ a b)
17354 (string-append a "xxx_off_" b)))
17355 #t))
17356 (add-before 'build 'rename-scripts
17357 ;; rename the scripts to bypthon2, bpdb2, etc.
17358 (lambda _
17359 (substitute* "setup.py"
17360 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
17361 (string-append name "2" rest "\n"))
17362 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
17363 (string-append name "2" (or sub "") rest "\n")))
17364 #t))))))))
17365
17366 (define-public python-pyinotify
17367 (package
17368 (name "python-pyinotify")
17369 (version "0.9.6")
17370 (source (origin
17371 (method url-fetch)
17372 (uri (pypi-uri "pyinotify" version))
17373 (sha256
17374 (base32
17375 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
17376 (build-system python-build-system)
17377 (arguments `(#:tests? #f)) ;no tests
17378 (home-page "https://github.com/seb-m/pyinotify")
17379 (synopsis "Python library for monitoring inotify events")
17380 (description
17381 "@code{pyinotify} provides a Python interface for monitoring
17382 file system events on Linux.")
17383 (license license:expat)))
17384
17385 (define-public python2-pyinotify
17386 (package-with-python2 python-pyinotify))
17387
17388 ;; Ada parser uses this version.
17389 (define-public python2-quex-0.67.3
17390 (package
17391 (name "python2-quex")
17392 (version "0.67.3")
17393 (source
17394 (origin
17395 (method url-fetch)
17396 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
17397 (version-major+minor version)
17398 "/quex-" version ".zip"))
17399 (sha256
17400 (base32
17401 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
17402 (build-system python-build-system)
17403 (native-inputs
17404 `(("unzip" ,unzip)))
17405 (arguments
17406 `(#:python ,python-2
17407 #:tests? #f
17408 #:phases
17409 (modify-phases %standard-phases
17410 (delete 'configure)
17411 (delete 'build)
17412 (replace 'install
17413 (lambda* (#:key outputs #:allow-other-keys)
17414 (let* ((out (assoc-ref outputs "out"))
17415 (share/quex (string-append out "/share/quex"))
17416 (bin (string-append out "/bin")))
17417 (copy-recursively "." share/quex)
17418 (mkdir-p bin)
17419 (symlink (string-append share/quex "/quex-exe.py")
17420 (string-append bin "/quex"))
17421 #t))))))
17422 (native-search-paths
17423 (list (search-path-specification
17424 (variable "QUEX_PATH")
17425 (files '("share/quex")))))
17426 (home-page "http://quex.sourceforge.net/")
17427 (synopsis "Lexical analyzer generator in Python")
17428 (description "@code{quex} is a lexical analyzer generator in Python.")
17429 (license license:lgpl2.1+))) ; Non-military
17430
17431 (define-public python2-quex
17432 (package (inherit python2-quex-0.67.3)
17433 (name "python2-quex")
17434 (version "0.68.1")
17435 (source
17436 (origin
17437 (method url-fetch)
17438 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
17439 (sha256
17440 (base32
17441 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
17442 (file-name (string-append name "-" version ".tar.gz"))))))
17443
17444 (define-public python-more-itertools
17445 (package
17446 (name "python-more-itertools")
17447 (version "8.2.0")
17448 (source
17449 (origin
17450 (method url-fetch)
17451 (uri (pypi-uri "more-itertools" version))
17452 (sha256
17453 (base32
17454 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
17455 (build-system python-build-system)
17456 (home-page "https://github.com/erikrose/more-itertools")
17457 (synopsis "More routines for operating on iterables, beyond itertools")
17458 (description "Python's built-in @code{itertools} module implements a
17459 number of iterator building blocks inspired by constructs from APL, Haskell,
17460 and SML. @code{more-itertools} includes additional building blocks for
17461 working with iterables.")
17462 (properties `((python2-variant . ,(delay python2-more-itertools))))
17463 (license license:expat)))
17464
17465 ;; The 5.x series are the last versions supporting Python 2.7.
17466 (define-public python2-more-itertools
17467 (package
17468 (inherit python-more-itertools)
17469 (name "python2-more-itertools")
17470 (version "5.0.0")
17471 (source (origin
17472 (method url-fetch)
17473 (uri (pypi-uri "more-itertools" version))
17474 (sha256
17475 (base32
17476 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
17477 (arguments
17478 `(#:python ,python-2))
17479 (propagated-inputs
17480 `(("python2-six" ,python2-six-bootstrap)))))
17481
17482 (define-public python-latexcodec
17483 (package
17484 (name "python-latexcodec")
17485 (version "1.0.7")
17486 (source
17487 (origin
17488 (method url-fetch)
17489 (uri (pypi-uri "latexcodec" version))
17490 (sha256
17491 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
17492 (build-system python-build-system)
17493 (inputs
17494 `(("python-six" ,python-six)))
17495 (home-page "https://readthedocs.org/projects/latexcodec/")
17496 (synopsis "Work with LaTeX code in Python")
17497 (description "Lexer and codec to work with LaTeX code in Python.")
17498 (license license:expat)))
17499
17500 (define-public python-pybtex
17501 (package
17502 (name "python-pybtex")
17503 (version "0.22.2")
17504 (source
17505 (origin
17506 (method url-fetch)
17507 (uri (pypi-uri "pybtex" version))
17508 (sha256
17509 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
17510 (build-system python-build-system)
17511 (native-inputs
17512 `(("python-nose" ,python-nose)))
17513 (inputs
17514 `(("python-latexcodec" ,python-latexcodec)
17515 ("python-pyyaml" ,python-pyyaml)
17516 ("python-six" ,python-six)))
17517 (arguments
17518 `(#:test-target "nosetests"))
17519 (home-page "https://pybtex.org/")
17520 (synopsis "BibTeX-compatible bibliography processor")
17521 (description "Pybtex is a BibTeX-compatible bibliography processor written
17522 in Python. You can simply type pybtex instead of bibtex.")
17523 (license license:expat)))
17524
17525 (define-public python-onetimepass
17526 (package
17527 (name "python-onetimepass")
17528 (version "1.0.1")
17529 (source
17530 (origin
17531 (method url-fetch)
17532 (uri (pypi-uri "onetimepass" version))
17533 (sha256
17534 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
17535 (build-system python-build-system)
17536 (propagated-inputs `(("python-six" ,python-six)))
17537 (home-page "https://github.com/tadeck/onetimepass/")
17538 (synopsis "One-time password library")
17539 (description "Python one-time password library for HMAC-based (HOTP) and
17540 time-based (TOTP) passwords.")
17541 (license license:expat)))
17542
17543 (define-public python-parso
17544 (package
17545 (name "python-parso")
17546 (version "0.7.1")
17547 (source
17548 (origin
17549 (method url-fetch)
17550 (uri (pypi-uri "parso" version))
17551 (sha256
17552 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
17553 (native-inputs
17554 `(("python-pytest" ,python-pytest)))
17555 (build-system python-build-system)
17556 (arguments
17557 `(#:phases (modify-phases %standard-phases
17558 (replace 'check
17559 (lambda _ (invoke "pytest" "-vv"))))))
17560 (home-page "https://github.com/davidhalter/parso")
17561 (synopsis "Python Parser")
17562 (description "Parso is a Python parser that supports error recovery and
17563 round-trip parsing for different Python versions (in multiple Python versions).
17564 Parso is also able to list multiple syntax errors in your Python file.")
17565 (license license:expat)))
17566
17567 (define-public python2-parso
17568 (package-with-python2 python-parso))
17569
17570 (define-public python-async-generator
17571 (package
17572 (name "python-async-generator")
17573 (version "1.10")
17574 (source
17575 (origin
17576 (method url-fetch)
17577 (uri (pypi-uri "async_generator" version))
17578 (sha256
17579 (base32
17580 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
17581 (build-system python-build-system)
17582 (native-inputs
17583 `(("python-pytest" ,python-pytest)))
17584 (home-page "https://github.com/python-trio/async_generator")
17585 (synopsis "Async generators and context managers for Python 3.5+")
17586 (description "@code{async_generator} back-ports Python 3.6's native async
17587 generators and Python 3.7's context managers into Python 3.5.")
17588 ;; Dual licensed.
17589 (license (list license:expat license:asl2.0))))
17590
17591 (define-public python-async-timeout
17592 (package
17593 (name "python-async-timeout")
17594 (version "3.0.1")
17595 (source
17596 (origin
17597 (method url-fetch)
17598 (uri (pypi-uri "async-timeout" version))
17599 (sha256
17600 (base32
17601 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
17602 (build-system python-build-system)
17603 (home-page "https://github.com/aio-libs/async_timeout/")
17604 (synopsis "Timeout context manager for asyncio programs")
17605 (description "@code{async-timeout} provides a timeout timeout context
17606 manager compatible with @code{asyncio}.")
17607 (license license:asl2.0)))
17608
17609 (define-public python-glob2
17610 (package
17611 (name "python-glob2")
17612 (version "0.7")
17613 (source
17614 (origin
17615 (method git-fetch)
17616 (uri (git-reference
17617 (url "https://github.com/miracle2k/python-glob2")
17618 (commit (string-append "v" version))))
17619 (file-name (git-file-name name version))
17620 (sha256
17621 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
17622 (build-system python-build-system)
17623 (home-page "https://github.com/miracle2k/python-glob2/")
17624 (synopsis "Extended Version of the python buildin glob module")
17625 (description "This is an extended version of the Python
17626 @url{http://docs.python.org/library/glob.html, built-in glob module} which
17627 adds:
17628
17629 @itemize
17630 @item The ability to capture the text matched by glob patterns, and return
17631 those matches alongside the file names.
17632 @item A recursive @code{**} globbing syntax, akin for example to the
17633 @code{globstar} option of Bash.
17634 @item The ability to replace the file system functions used, in order to glob
17635 on virtual file systems.
17636 @item Compatible with Python 2 and Python 3 (tested with 3.3).
17637 @end itemize
17638
17639 Glob2 currently based on the glob code from Python 3.3.1.")
17640 (license license:bsd-2)))
17641
17642 (define-public python2-glob2
17643 (package-with-python2 python-glob2))
17644
17645 (define-public python-gipc
17646 (package
17647 (name "python-gipc")
17648 (version "0.6.0")
17649 (source
17650 (origin
17651 (method url-fetch)
17652 (uri (pypi-uri "gipc" version ".zip"))
17653 (sha256
17654 (base32
17655 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
17656 (build-system python-build-system)
17657 (native-inputs
17658 `(("unzip" ,unzip)))
17659 (propagated-inputs
17660 `(("python-gevent" ,python-gevent)))
17661 (home-page "https://gehrcke.de/gipc/")
17662 (synopsis "Child process management in the context of gevent")
17663 (description "Usage of Python's multiprocessing package in a
17664 gevent-powered application may raise problems. With @code{gipc},
17665 process-based child processes can safely be created anywhere within a
17666 gevent-powered application.")
17667 (license license:expat)))
17668
17669 (define-public python2-gipc
17670 (package-with-python2 python-gipc))
17671
17672 (define-public python-fusepy
17673 (package
17674 (name "python-fusepy")
17675 (version "2.0.4")
17676 (source
17677 (origin
17678 (method url-fetch)
17679 (uri (pypi-uri "fusepy" version))
17680 (sha256
17681 (base32
17682 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
17683 (build-system python-build-system)
17684 (arguments
17685 `(#:phases
17686 (modify-phases %standard-phases
17687 (add-before 'build 'set-library-file-name
17688 (lambda* (#:key inputs #:allow-other-keys)
17689 (let ((fuse (assoc-ref inputs "fuse")))
17690 (substitute* "fuse.py"
17691 (("find_library\\('fuse'\\)")
17692 (string-append "'" fuse "/lib/libfuse.so'")))
17693 #t))))))
17694 (propagated-inputs
17695 `(("fuse" ,fuse)))
17696 (home-page "https://github.com/fusepy/fusepy")
17697 (synopsis "Simple ctypes bindings for FUSE")
17698 (description "Python module that provides a simple interface to FUSE and
17699 MacFUSE. The binding is created using the standard @code{ctypes} library.")
17700 (license license:isc)))
17701
17702 (define-public python2-fusepy
17703 (package-with-python2 python-fusepy))
17704
17705 (define-public python-fusepyng
17706 (package
17707 (name "python-fusepyng")
17708 (version "1.0.7")
17709 (source
17710 (origin
17711 (method url-fetch)
17712 (uri (pypi-uri "fusepyng" version))
17713 (sha256
17714 (base32
17715 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
17716 (build-system python-build-system)
17717 (arguments
17718 '(#:phases
17719 (modify-phases %standard-phases
17720 (add-after 'unpack 'set-libfuse-path
17721 (lambda* (#:key inputs #:allow-other-keys)
17722 (let ((fuse (assoc-ref inputs "fuse")))
17723 (substitute* "fusepyng.py"
17724 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
17725 (string-append "\"" fuse "/lib/libfuse.so\""))))
17726 #t)))))
17727 (inputs
17728 `(("fuse" ,fuse)))
17729 (propagated-inputs
17730 `(("python-paramiko" ,python-paramiko)))
17731 (home-page "https://github.com/rianhunter/fusepyng")
17732 (synopsis "Simple ctypes bindings for FUSE")
17733 (description "@code{fusepyng} is a Python module that provides a simple
17734 interface to FUSE on various operating systems. It's just one file and is
17735 implemented using @code{ctypes}.")
17736 (license license:isc)))
17737
17738 (define-public python2-gdrivefs
17739 (package
17740 (name "python2-gdrivefs")
17741 (version "0.14.9")
17742 (source
17743 (origin
17744 (method url-fetch)
17745 (uri (pypi-uri "gdrivefs" version))
17746 (sha256
17747 (base32
17748 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
17749 (build-system python-build-system)
17750 (arguments
17751 `(#:python ,python-2
17752 #:phases
17753 (modify-phases %standard-phases
17754 (add-before 'build 'patch-setup-py
17755 (lambda _
17756 ;; Update requirements from dependency==version
17757 ;; to dependency>=version
17758 (substitute* "gdrivefs/resources/requirements.txt"
17759 (("==") ">="))
17760 #t)))))
17761 (native-inputs
17762 `(("python2-gipc" ,python2-gipc)
17763 ("python2-gevent" ,python2-gevent)
17764 ("python2-greenlet" ,python2-greenlet)
17765 ("python2-httplib2" ,python2-httplib2)
17766 ("python2-uritemplate" ,python2-uritemplate)
17767 ("python2-oauth2client" ,python2-oauth2client)
17768 ("python2-six" ,python2-six)))
17769 (propagated-inputs
17770 `(("python2-dateutil" ,python2-dateutil)
17771 ("python2-fusepy" ,python2-fusepy)
17772 ("python2-google-api-client" ,python2-google-api-client)))
17773 (home-page "https://github.com/dsoprea/GDriveFS")
17774 (synopsis "Mount Google Drive as a local file system")
17775 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
17776 under Python 2.7.")
17777 (license license:gpl2)))
17778
17779 (define-public python-userspacefs
17780 (package
17781 (name "python-userspacefs")
17782 (version "1.0.13")
17783 (source
17784 (origin
17785 (method url-fetch)
17786 (uri (pypi-uri "userspacefs" version))
17787 (sha256
17788 (base32
17789 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
17790 (build-system python-build-system)
17791 (propagated-inputs
17792 `(("python-fusepyng" ,python-fusepyng)))
17793 (home-page "https://github.com/rianhunter/userspacefs")
17794 (synopsis "User-space file systems for Python")
17795 (description
17796 "@code{userspacefs} is a library that allows you to easily write
17797 user-space file systems in Python.")
17798 (license license:gpl3+)))
17799
17800 (define-public pybind11
17801 (package
17802 (name "pybind11")
17803 (version "2.4.3")
17804 (source (origin
17805 (method git-fetch)
17806 (uri (git-reference
17807 (url "https://github.com/pybind/pybind11")
17808 (commit (string-append "v" version))))
17809 (sha256
17810 (base32
17811 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
17812 (file-name (git-file-name name version))))
17813 (build-system cmake-build-system)
17814 (native-inputs
17815 `(("python" ,python-wrapper)
17816
17817 ;; The following dependencies are used for tests.
17818 ("python-pytest" ,python-pytest)
17819 ("catch" ,catch-framework2-1)
17820 ("eigen" ,eigen)))
17821 (arguments
17822 `(#:configure-flags
17823 (list (string-append "-DCATCH_INCLUDE_DIR="
17824 (assoc-ref %build-inputs "catch")
17825 "/include/catch"))
17826
17827 #:phases (modify-phases %standard-phases
17828 (add-after 'install 'install-python
17829 (lambda* (#:key outputs #:allow-other-keys)
17830 (let ((out (assoc-ref outputs "out")))
17831 (with-directory-excursion "../source"
17832 (setenv "PYBIND11_USE_CMAKE" "yes")
17833 (invoke "python" "setup.py" "install"
17834 "--single-version-externally-managed"
17835 "--root=/"
17836 (string-append "--prefix=" out)))))))
17837
17838 #:test-target "check"))
17839 (home-page "https://github.com/pybind/pybind11/")
17840 (synopsis "Seamless operability between C++11 and Python")
17841 (description
17842 "@code{pybind11} is a lightweight header-only library that exposes C++
17843 types in Python and vice versa, mainly to create Python bindings of existing
17844 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
17845 library: to minimize boilerplate code in traditional extension modules by
17846 inferring type information using compile-time introspection.")
17847 (license license:bsd-3)))
17848
17849 (define-public python-fasteners
17850 (package
17851 (name "python-fasteners")
17852 (version "0.15")
17853 (source
17854 (origin
17855 (method url-fetch)
17856 (uri (pypi-uri "fasteners" version))
17857 (sha256
17858 (base32
17859 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
17860 (build-system python-build-system)
17861 (propagated-inputs
17862 `(("python-monotonic" ,python-monotonic)
17863 ("python-six" ,python-six)))
17864 (native-inputs
17865 `(("python-testtools" ,python-testtools)))
17866 (home-page "https://github.com/harlowja/fasteners")
17867 (synopsis "Python package that provides useful locks")
17868 (description
17869 "This package provides a Python program that provides following locks:
17870
17871 @itemize
17872 @item Locking decorator
17873 @item Reader-writer locks
17874 @item Inter-process locks
17875 @item Generic helpers
17876 @end itemize\n")
17877 (properties `((python2-variant . ,(delay python2-fasteners))))
17878 (license license:asl2.0)))
17879
17880 (define-public python2-fasteners
17881 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
17882 (package
17883 (inherit base)
17884 (propagated-inputs
17885 `(("python2-futures" ,python2-futures)
17886 ,@(package-propagated-inputs base))))))
17887
17888 (define-public python-requests-file
17889 (package
17890 (name "python-requests-file")
17891 (version "1.4.3")
17892 (source
17893 (origin
17894 (method url-fetch)
17895 (uri (pypi-uri "requests-file" version))
17896 (sha256
17897 (base32
17898 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
17899 (build-system python-build-system)
17900 (propagated-inputs
17901 `(("python-requests" ,python-requests)
17902 ("python-six" ,python-six)))
17903 (home-page
17904 "https://github.com/dashea/requests-file")
17905 (synopsis "File transport adapter for Requests")
17906 (description
17907 "Requests-File is a transport adapter for use with the Requests Python
17908 library to allow local file system access via @code{file://} URLs.")
17909 (license license:asl2.0)))
17910
17911 (define-public python2-requests-file
17912 (package-with-python2 python-requests-file))
17913
17914 (define-public python-identify
17915 (package
17916 (name "python-identify")
17917 (version "1.4.25")
17918 (source
17919 (origin
17920 ;; There are no tests in the PyPI tarball.
17921 (method git-fetch)
17922 (uri (git-reference
17923 (url "https://github.com/chriskuehl/identify")
17924 (commit (string-append "v" version))))
17925 (file-name (git-file-name name version))
17926 (sha256
17927 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
17928 (build-system python-build-system)
17929 (arguments
17930 `(#:phases
17931 (modify-phases %standard-phases
17932 (replace 'check
17933 (lambda _
17934 (invoke "pytest" "-vv"))))))
17935 (native-inputs
17936 `(("python-coverage" ,python-coverage)
17937 ("python-pytest" ,python-pytest)))
17938 (propagated-inputs
17939 `(("python-editdistance" ,python-editdistance)))
17940 (home-page "https://github.com/chriskuehl/identify")
17941 (synopsis "File identification library for Python")
17942 (description
17943 "@code{identify} is a file identification library for Python. Given
17944 a file (or some information about a file), return a set of standardized tags
17945 identifying what the file is.")
17946 (license license:expat)))
17947
17948 (define-public python-tldextract
17949 (package
17950 (name "python-tldextract")
17951 (version "2.2.0")
17952 (source
17953 (origin
17954 (method url-fetch)
17955 (uri (pypi-uri "tldextract" version))
17956 (sha256
17957 (base32
17958 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
17959 (build-system python-build-system)
17960 (native-inputs
17961 `(("python-pytest" ,python-pytest)
17962 ("python-responses" ,python-responses)))
17963 (propagated-inputs
17964 `(("python-idna" ,python-idna)
17965 ("python-requests" ,python-requests)
17966 ("python-requests-file" ,python-requests-file)))
17967 (home-page
17968 "https://github.com/john-kurkowski/tldextract")
17969 (synopsis
17970 "Separate the TLD from the registered domain and subdomains of a URL")
17971 (description
17972 "TLDExtract accurately separates the TLD from the registered domain and
17973 subdomains of a URL, using the Public Suffix List. By default, this includes
17974 the public ICANN TLDs and their exceptions. It can optionally support the
17975 Public Suffix List's private domains as well.")
17976 (license license:bsd-3)))
17977
17978 (define-public python2-tldextract
17979 (package-with-python2 python-tldextract))
17980
17981 (define-public python-nodeenv
17982 (package
17983 (name "python-nodeenv")
17984 (version "1.4.0")
17985 (source
17986 (origin
17987 ;; There's no tarball in PyPI.
17988 (method git-fetch)
17989 (uri (git-reference
17990 (url "https://github.com/ekalinin/nodeenv")
17991 (commit version)))
17992 (file-name (git-file-name name version))
17993 (sha256
17994 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
17995 (build-system python-build-system)
17996 (arguments
17997 `(#:phases
17998 (modify-phases %standard-phases
17999 (replace 'check
18000 (lambda _
18001 ;; This test fails. It tries to open a network socket.
18002 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18003 (native-inputs
18004 `(("python-coverage" ,python-coverage)
18005 ("python-mock" ,python-mock)
18006 ("python-pytest" ,python-pytest)))
18007 (home-page "https://ekalinin.github.io/nodeenv/")
18008 (synopsis "Create isolated node.js environments")
18009 (description
18010 "Nodeenv (node.js virtual environment) is a tool to create isolated
18011 node.js environments. It creates an environment that has its own installation
18012 directories, that doesn't share libraries with other node.js virtual
18013 environments.")
18014 (license license:bsd-3)))
18015
18016 (define-public python-pynamecheap
18017 (package
18018 (name "python-pynamecheap")
18019 (version "0.0.3")
18020 (source
18021 (origin
18022 (method url-fetch)
18023 (uri (pypi-uri "PyNamecheap" version))
18024 (sha256
18025 (base32
18026 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18027 (build-system python-build-system)
18028 (propagated-inputs
18029 `(("python-requests" ,python-requests)))
18030 (home-page
18031 "https://github.com/Bemmu/PyNamecheap")
18032 (synopsis
18033 "Namecheap API client in Python")
18034 (description
18035 "PyNamecheap is a Namecheap API client in Python.")
18036 (license license:expat)))
18037
18038 (define-public python2-pynamecheap
18039 (package-with-python2 python-pynamecheap))
18040
18041 (define-public python-dns-lexicon
18042 (package
18043 (name "python-dns-lexicon")
18044 (version "2.4.0")
18045 (source
18046 (origin
18047 (method url-fetch)
18048 (uri (pypi-uri "dns-lexicon" version))
18049 (sha256
18050 (base32
18051 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18052 (build-system python-build-system)
18053 (arguments
18054 `(#:tests? #f)) ;requires internet access
18055 (propagated-inputs
18056 `(("python-future" ,python-future)
18057 ("python-pynamecheap" ,python-pynamecheap)
18058 ("python-requests" ,python-requests)
18059 ("python-tldextract" ,python-tldextract)
18060 ("python-urllib3" ,python-urllib3)))
18061 (home-page "https://github.com/AnalogJ/lexicon")
18062 (synopsis
18063 "Manipulate DNS records on various DNS providers")
18064 (description
18065 "Lexicon provides a way to manipulate DNS records on multiple DNS
18066 providers in a standardized way. It has a CLI but it can also be used as a
18067 Python library. It was designed to be used in automation, specifically with
18068 Let's Encrypt.")
18069 (license license:expat)))
18070
18071 (define-public python2-dns-lexicon
18072 (package-with-python2 python-dns-lexicon))
18073
18074 (define-public python-cfgv
18075 (package
18076 (name "python-cfgv")
18077 (version "3.1.0")
18078 (source
18079 (origin
18080 ;; There are no tests in the PyPI tarball.
18081 (method git-fetch)
18082 (uri (git-reference
18083 (url "https://github.com/asottile/cfgv")
18084 (commit (string-append "v" version))))
18085 (file-name (git-file-name name version))
18086 (sha256
18087 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
18088 (build-system python-build-system)
18089 (arguments
18090 `(#:phases
18091 (modify-phases %standard-phases
18092 (replace 'check
18093 (lambda _
18094 (invoke "pytest" "-vv"))))))
18095 (native-inputs
18096 `(("python-covdefaults" ,python-covdefaults)
18097 ("python-coverage" ,python-coverage)
18098 ("python-pytest" ,python-pytest)))
18099 (home-page "https://github.com/asottile/cfgv")
18100 (synopsis "Configuration validation library")
18101 (description
18102 "This library helps to validate configuration files and produce human
18103 readable error messages.")
18104 (license license:expat)))
18105
18106 (define-public python-commandlines
18107 (package
18108 (name "python-commandlines")
18109 (version "0.4.1")
18110 (source
18111 (origin
18112 (method url-fetch)
18113 (uri (pypi-uri "commandlines" version))
18114 (sha256
18115 (base32
18116 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
18117 (build-system python-build-system)
18118 (home-page "https://github.com/chrissimpkins/commandlines")
18119 (synopsis "Command line argument to object parsing library")
18120 (description
18121 "@code{Commandlines} is a Python library for command line application
18122 development that supports command line argument parsing, command string
18123 validation testing and application logic.")
18124 (license license:expat)))
18125
18126 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
18127 ;; python-numba. They have a very unflexible relationship.
18128 (define-public python-numba
18129 (package
18130 (name "python-numba")
18131 (version "0.46.0")
18132 (source
18133 (origin
18134 (method url-fetch)
18135 (uri (pypi-uri "numba" version))
18136 (sha256
18137 (base32
18138 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
18139 (build-system python-build-system)
18140 (arguments
18141 `(#:modules ((guix build utils)
18142 (guix build python-build-system)
18143 (ice-9 ftw)
18144 (srfi srfi-1)
18145 (srfi srfi-26))
18146 #:phases
18147 (modify-phases %standard-phases
18148 (add-after 'unpack 'disable-proprietary-features
18149 (lambda _
18150 (setenv "NUMBA_DISABLE_HSA" "1")
18151 (setenv "NUMBA_DISABLE_CUDA" "1")
18152 #t))
18153 (add-after 'unpack 'remove-failing-tests
18154 (lambda _
18155 ;; FIXME: These tests fail for unknown reasons:
18156 ;; test_non_writable_pycache, test_non_creatable_pycache, and
18157 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
18158 (substitute* "numba/tests/test_dispatcher.py"
18159 (("def test(_non_writable_pycache)" _ m)
18160 (string-append "def guix_skip" m))
18161 (("def test(_non_creatable_pycache)" _ m)
18162 (string-append "def guix_skip" m))
18163 (("def test(_frozen)" _ m)
18164 (string-append "def guix_skip" m)))
18165
18166 ;; These tests fail because we don't run the tests from the build
18167 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
18168 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
18169 (substitute* "numba/tests/test_pycc.py"
18170 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
18171 (string-append "def guix_skip" m)))
18172
18173 ;; These tests fail because our version of Python does not have
18174 ;; a recognizable front-end for the Numba distribution to use
18175 ;; to check against.
18176 (substitute* "numba/tests/test_entrypoints.py"
18177 (("def test(_init_entrypoint)" _ m)
18178 (string-append "def guix_skip" m)))
18179 (substitute* "numba/tests/test_jitclasses.py"
18180 (("def test(_jitclass_longlabel_not_truncated)" _ m)
18181 (string-append "def guix_skip" m)))
18182 #t))
18183 (replace 'check
18184 (lambda _
18185 (let ((cwd (getcwd)))
18186 (setenv "PYTHONPATH"
18187 (string-append cwd "/build/"
18188 (find (cut string-prefix? "lib" <>)
18189 (scandir (string-append cwd "/build")))
18190 ":"
18191 (getenv "PYTHONPATH")))
18192 ;; Something is wrong with the PYTHONPATH when running the
18193 ;; tests from the build directory, as it complains about not being
18194 ;; able to import certain modules.
18195 (with-directory-excursion "/tmp"
18196 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
18197 #t)))))
18198 (propagated-inputs
18199 `(("python-llvmlite" ,python-llvmlite)
18200 ("python-numpy" ,python-numpy)
18201 ("python-singledispatch" ,python-singledispatch)))
18202 ;; Needed for tests.
18203 (inputs
18204 `(("python-jinja2" ,python-jinja2)
18205 ("python-pygments" ,python-pygments)))
18206 (home-page "https://numba.pydata.org")
18207 (synopsis "Compile Python code using LLVM")
18208 (description "Numba gives you the power to speed up your applications with
18209 high performance functions written directly in Python. With a few
18210 annotations, array-oriented and math-heavy Python code can be just-in-time
18211 compiled to native machine instructions, similar in performance to C, C++ and
18212 Fortran, without having to switch languages or Python interpreters.
18213
18214 Numba works by generating optimized machine code using the LLVM compiler
18215 infrastructure at import time, runtime, or statically (using the included pycc
18216 tool).")
18217 (license license:bsd-3)))
18218
18219 (define-public python-numcodecs
18220 (package
18221 (name "python-numcodecs")
18222 (version "0.6.4")
18223 (source
18224 (origin
18225 (method url-fetch)
18226 (uri (pypi-uri "numcodecs" version))
18227 (sha256
18228 (base32
18229 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
18230 (build-system python-build-system)
18231 (propagated-inputs
18232 `(("python-numpy" ,python-numpy)
18233 ("python-msgpack" ,python-msgpack)))
18234 (native-inputs
18235 `(("python-pytest" ,python-pytest)
18236 ("python-setuptools-scm" ,python-setuptools-scm)))
18237 (home-page "https://github.com/zarr-developers/numcodecs")
18238 (synopsis "Buffer compression and transformation codecs")
18239 (description
18240 "This Python package provides buffer compression and transformation
18241 codecs for use in data storage and communication applications.")
18242 (license license:expat)))
18243
18244 (define-public python-asciitree
18245 (package
18246 (name "python-asciitree")
18247 (version "0.3.3")
18248 (source
18249 (origin
18250 (method url-fetch)
18251 (uri (pypi-uri "asciitree" version))
18252 (sha256
18253 (base32
18254 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
18255 (build-system python-build-system)
18256 (home-page "https://github.com/mbr/asciitree")
18257 (synopsis "Draws ASCII trees")
18258 (description "This package draws tree structures using characters.")
18259 (license license:expat)))
18260
18261 (define-public python-zarr
18262 (package
18263 (name "python-zarr")
18264 (version "2.4.0")
18265 (source
18266 (origin
18267 (method url-fetch)
18268 (uri (pypi-uri "zarr" version))
18269 (sha256
18270 (base32
18271 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
18272 (build-system python-build-system)
18273 (arguments
18274 `(#:phases
18275 (modify-phases %standard-phases
18276 (add-after 'unpack 'disable-service-tests
18277 (lambda _
18278 (setenv "ZARR_TEST_ABS" "0")
18279 (setenv "ZARR_TEST_MONGO" "0")
18280 (setenv "ZARR_TEST_REDIS" "0")
18281 #t))
18282 (replace 'check
18283 (lambda _
18284 (invoke "pytest" "-vv" "-k" "not lmdb")
18285 #t)))))
18286 (propagated-inputs
18287 `(("python-asciitree" ,python-asciitree)
18288 ("python-fasteners" ,python-fasteners)
18289 ("python-numcodecs" ,python-numcodecs)
18290 ("python-numpy" ,python-numpy)))
18291 (native-inputs
18292 `(("python-pytest" ,python-pytest)
18293 ("python-setuptools-scm" ,python-setuptools-scm)))
18294 (home-page "https://github.com/zarr-developers/zarr-python")
18295 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
18296 (description
18297 "This package provides an implementation of chunked, compressed,
18298 N-dimensional arrays for Python.")
18299 (license license:expat)))
18300
18301 (define-public python-anndata
18302 (package
18303 (name "python-anndata")
18304 (version "0.7.1")
18305 (source
18306 (origin
18307 (method url-fetch)
18308 (uri (pypi-uri "anndata" version))
18309 (sha256
18310 (base32
18311 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
18312 (build-system python-build-system)
18313 (arguments
18314 `(#:phases
18315 (modify-phases %standard-phases
18316 (add-after 'unpack 'delete-inconvenient-tests
18317 (lambda _
18318 ;; This test depends on python-scikit-learn.
18319 (delete-file "anndata/tests/test_inplace_subset.py")
18320 #t))
18321 (delete 'check)
18322 (add-after 'install 'check
18323 (lambda* (#:key inputs outputs #:allow-other-keys)
18324 (add-installed-pythonpath inputs outputs)
18325 (invoke "pytest" "-vv"))))))
18326 (propagated-inputs
18327 `(("python-h5py" ,python-h5py)
18328 ("python-importlib-metadata" ,python-importlib-metadata)
18329 ("python-natsort" ,python-natsort)
18330 ("python-numcodecs" ,python-numcodecs)
18331 ("python-packaging" ,python-packaging)
18332 ("python-pandas" ,python-pandas)
18333 ("python-scipy" ,python-scipy)
18334 ("python-zarr" ,python-zarr)))
18335 (native-inputs
18336 `(("python-joblib" ,python-joblib)
18337 ("python-pytest" ,python-pytest)
18338 ("python-setuptools-scm" ,python-setuptools-scm)))
18339 (home-page "https://github.com/theislab/anndata")
18340 (synopsis "Annotated data for data analysis pipelines")
18341 (description "Anndata is a package for simple (functional) high-level APIs
18342 for data analysis pipelines. In this context, it provides an efficient,
18343 scalable way of keeping track of data together with learned annotations and
18344 reduces the code overhead typically encountered when using a mostly
18345 object-oriented library such as @code{scikit-learn}.")
18346 (license license:bsd-3)))
18347
18348 (define-public python-dill
18349 (package
18350 (name "python-dill")
18351 (version "0.3.1.1")
18352 (source
18353 (origin
18354 (method url-fetch)
18355 (uri (pypi-uri "dill" version))
18356 (sha256
18357 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
18358 (build-system python-build-system)
18359 (arguments
18360 `(#:phases
18361 (modify-phases %standard-phases
18362 (replace 'check
18363 (lambda _
18364 (with-directory-excursion "/tmp"
18365 (invoke "nosetests" "-v"))
18366 #t)))))
18367 (native-inputs
18368 `(("python-nose" ,python-nose)))
18369 (home-page "https://pypi.org/project/dill/")
18370 (synopsis "Serialize all of Python")
18371 (description "Dill extends Python's @code{pickle} module for serializing
18372 and de-serializing Python objects to the majority of the built-in Python
18373 types. Dill provides the user the same interface as the @code{pickle} module,
18374 and also includes some additional features. In addition to pickling Python
18375 objects, @code{dill} provides the ability to save the state of an interpreter
18376 session in a single command. Hence, it would be feasible to save a
18377 interpreter session, close the interpreter, ship the pickled file to another
18378 computer, open a new interpreter, unpickle the session and thus continue from
18379 the saved state of the original interpreter session.")
18380 (license license:bsd-3)))
18381
18382 (define-public python-multiprocess
18383 (package
18384 (name "python-multiprocess")
18385 (version "0.70.9")
18386 (source
18387 (origin
18388 (method url-fetch)
18389 (uri (pypi-uri "multiprocess" version))
18390 (sha256
18391 (base32
18392 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
18393 (build-system python-build-system)
18394 (arguments
18395 `(#:phases
18396 (modify-phases %standard-phases
18397 (add-after 'unpack 'disable-broken-tests
18398 (lambda _
18399 ;; This test is broken as there is no keyboard interrupt.
18400 (substitute* "py3.7/multiprocess/tests/__init__.py"
18401 (("^(.*)def test_wait_result"
18402 line indent)
18403 (string-append indent
18404 "@unittest.skip(\"Disabled by Guix\")\n"
18405 line)))
18406 #t))
18407 ;; Tests must be run after installation.
18408 (delete 'check)
18409 (add-after 'install 'check
18410 (lambda* (#:key inputs outputs #:allow-other-keys)
18411 (add-installed-pythonpath inputs outputs)
18412 (invoke "python" "-m" "multiprocess.tests")
18413 #t)))))
18414 (propagated-inputs
18415 `(("python-dill" ,python-dill)))
18416 (home-page "https://pypi.org/project/multiprocess/")
18417 (synopsis "Multiprocessing and multithreading in Python")
18418 (description
18419 "This package is a fork of the multiprocessing Python package, a package
18420 which supports the spawning of processes using the API of the standard
18421 library's @code{threading} module.")
18422 (license license:bsd-3)))
18423
18424 (define-public python-toolz
18425 (package
18426 (name "python-toolz")
18427 (version "0.9.0")
18428 (source
18429 (origin
18430 (method url-fetch)
18431 (uri (pypi-uri "toolz" version))
18432 (sha256
18433 (base32
18434 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
18435 (build-system python-build-system)
18436 ;; FIXME: tests cannot be computed: "Can't perform this operation for
18437 ;; unregistered loader type"
18438 (arguments '(#:tests? #f))
18439 (home-page "https://github.com/pytoolz/toolz/")
18440 (synopsis "List processing tools and functional utilities")
18441 (description
18442 "This package provides a set of utility functions for iterators,
18443 functions, and dictionaries.")
18444 (license license:bsd-3)))
18445
18446 (define-public python2-toolz
18447 (package-with-python2 python-toolz))
18448
18449 (define-public python-cytoolz
18450 (package
18451 (name "python-cytoolz")
18452 (version "0.9.0.1")
18453 (source
18454 (origin
18455 (method url-fetch)
18456 (uri (pypi-uri "cytoolz" version))
18457 (sha256
18458 (base32
18459 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
18460 (build-system python-build-system)
18461 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
18462 ;; 'exceptions'"
18463 (arguments '(#:tests? #f))
18464 (propagated-inputs
18465 `(("python-toolz" ,python-toolz)))
18466 (native-inputs
18467 `(("python-cython" ,python-cython)))
18468 (home-page "https://github.com/pytoolz/cytoolz")
18469 (synopsis "High performance functional utilities")
18470 (description
18471 "The cytoolz package implements the same API as provided by toolz. The
18472 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
18473 that is accessible to other projects developed in Cython.")
18474 (license license:bsd-3)))
18475
18476 (define-public python-sortedcontainers
18477 (package
18478 (name "python-sortedcontainers")
18479 (version "2.1.0")
18480 (source
18481 (origin
18482 (method url-fetch)
18483 (uri (pypi-uri "sortedcontainers" version))
18484 (sha256
18485 (base32
18486 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
18487 (build-system python-build-system)
18488 (arguments
18489 ;; FIXME: Tests require many extra dependencies, and would introduce
18490 ;; a circular dependency on hypothesis, which uses this package.
18491 '(#:tests? #f))
18492 (propagated-inputs
18493 `(("python-appdirs" ,python-appdirs)
18494 ("python-distlib" ,python-distlib)
18495 ("python-filelock" ,python-filelock)
18496 ("python-six" ,python-six-bootstrap)))
18497 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
18498 (synopsis "Sorted List, Sorted Dict, Sorted Set")
18499 (description
18500 "This package provides a sorted collections library, written in
18501 pure-Python.")
18502 (license license:asl2.0)))
18503
18504 (define-public python2-sortedcontainers
18505 (package-with-python2 python-sortedcontainers))
18506
18507 (define-public python-cloudpickle
18508 (package
18509 (name "python-cloudpickle")
18510 (version "1.3.0")
18511 (source
18512 (origin
18513 (method url-fetch)
18514 (uri (pypi-uri "cloudpickle" version))
18515 (sha256
18516 (base32
18517 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
18518 (build-system python-build-system)
18519 (arguments
18520 '(#:phases (modify-phases %standard-phases
18521 (add-before 'check 'do-not-override-PYTHONPATH
18522 (lambda _
18523 ;; Append to PYTHONPATH instead of overriding it so
18524 ;; that dependencies from Guix can be found.
18525 (substitute* "tests/testutils.py"
18526 (("env\\['PYTHONPATH'\\] = pythonpath")
18527 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
18528 #t))
18529 (replace 'check
18530 (lambda* (#:key tests? #:allow-other-keys)
18531 (if tests?
18532 (invoke "pytest" "-s" "-vv")
18533 (format #t "test suite not run~%"))
18534 #t)))))
18535 (native-inputs
18536 `(;; For tests.
18537 ("python-psutil" ,python-psutil)
18538 ("python-pytest" ,python-pytest)
18539 ("python-tornado" ,python-tornado)))
18540 (home-page "https://github.com/cloudpipe/cloudpickle")
18541 (synopsis "Extended pickling support for Python objects")
18542 (description
18543 "Cloudpickle makes it possible to serialize Python constructs not
18544 supported by the default pickle module from the Python standard library. It
18545 is especially useful for cluster computing where Python expressions are
18546 shipped over the network to execute on remote hosts, possibly close to the
18547 data.")
18548 (properties `((python2-variant . ,(delay python2-cloudpickle))))
18549 (license license:bsd-3)))
18550
18551 (define-public python2-cloudpickle
18552 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
18553 (package
18554 (inherit base)
18555 (native-inputs
18556 `(("python-mock" ,python2-mock)
18557 ,@(package-native-inputs base)))
18558 (propagated-inputs
18559 `(("python-futures" ,python2-futures)
18560 ,@(package-propagated-inputs base))))))
18561
18562 (define-public python-locket
18563 (package
18564 (name "python-locket")
18565 (version "0.2.0")
18566 (source
18567 (origin
18568 (method url-fetch)
18569 (uri (pypi-uri "locket" version))
18570 (sha256
18571 (base32
18572 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
18573 (build-system python-build-system)
18574 (home-page "https://github.com/mwilliamson/locket.py")
18575 (synopsis "File-based locks for Python")
18576 (description
18577 "Locket implements a lock that can be used by multiple processes provided
18578 they use the same path.")
18579 (license license:bsd-2)))
18580
18581 (define-public python2-locket
18582 (package-with-python2 python-locket))
18583
18584 (define-public python-blosc
18585 (package
18586 (name "python-blosc")
18587 (version "1.5.1")
18588 (source
18589 (origin
18590 (method url-fetch)
18591 (uri (pypi-uri "blosc" version))
18592 (sha256
18593 (base32
18594 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
18595 (build-system python-build-system)
18596 ;; FIXME: all tests pass, but then this error is printed:
18597 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
18598 (arguments '(#:tests? #f))
18599 (propagated-inputs
18600 `(("python-numpy" ,python-numpy)))
18601 (home-page "https://github.com/blosc/python-blosc")
18602 (synopsis "Python wrapper for the Blosc data compressor library")
18603 (description "Blosc is a high performance compressor optimized for binary
18604 data. It has been designed to transmit data to the processor cache faster
18605 than the traditional, non-compressed, direct memory fetch approach via a
18606 @code{memcpy()} system call.
18607
18608 Blosc works well for compressing numerical arrays that contains data with
18609 relatively low entropy, like sparse data, time series, grids with
18610 regular-spaced values, etc.
18611
18612 This Python package wraps the Blosc library.")
18613 (license license:bsd-3)))
18614
18615 (define-public python2-blosc
18616 (package-with-python2 python-blosc))
18617
18618 (define-public python-partd
18619 (package
18620 (name "python-partd")
18621 (version "0.3.9")
18622 (source
18623 (origin
18624 (method url-fetch)
18625 (uri (pypi-uri "partd" version))
18626 (sha256
18627 (base32
18628 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
18629 (build-system python-build-system)
18630 (propagated-inputs
18631 `(("python-blosc" ,python-blosc)
18632 ("python-locket" ,python-locket)
18633 ("python-numpy" ,python-numpy)
18634 ("python-pandas" ,python-pandas)
18635 ("python-pyzmq" ,python-pyzmq)
18636 ("python-toolz" ,python-toolz)))
18637 (home-page "https://github.com/dask/partd/")
18638 (synopsis "Appendable key-value storage")
18639 (description "Partd stores key-value pairs. Values are raw bytes. We
18640 append on old values. Partd excels at shuffling operations.")
18641 (license license:bsd-3)))
18642
18643 (define-public python2-partd
18644 (package-with-python2 python-partd))
18645
18646 (define-public python-fsspec
18647 (package
18648 (name "python-fsspec")
18649 (version "0.6.1")
18650 (source
18651 (origin
18652 (method url-fetch)
18653 (uri (pypi-uri "fsspec" version))
18654 (sha256
18655 (base32
18656 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
18657 (build-system python-build-system)
18658 (arguments '(#:tests? #f)) ; there are none
18659 (home-page "https://github.com/intake/filesystem_spec")
18660 (synopsis "File-system specification")
18661 (description "The purpose of this package is to produce a template or
18662 specification for a file-system interface, that specific implementations
18663 should follow, so that applications making use of them can rely on a common
18664 behavior and not have to worry about the specific internal implementation
18665 decisions with any given backend.")
18666 (license license:bsd-3)))
18667
18668 (define-public python-dask
18669 (package
18670 (name "python-dask")
18671 (version "2.14.0")
18672 (source
18673 (origin
18674 (method url-fetch)
18675 (uri (pypi-uri "dask" version))
18676 (sha256
18677 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
18678 (build-system python-build-system)
18679 (arguments
18680 `(#:phases
18681 (modify-phases %standard-phases
18682 (add-after 'unpack 'disable-broken-tests
18683 (lambda _
18684 ;; This test is marked as xfail when pytest-xdist is used.
18685 (substitute* "dask/tests/test_threaded.py"
18686 (("def test_interrupt\\(\\)" m)
18687 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
18688 m)))
18689 ;; This one fails with a type error:
18690 ;; TypeError: Already tz-aware, use tz_convert to convert.
18691 (substitute* "dask/dataframe/tests/test_shuffle.py"
18692 (("def test_set_index_timestamp\\(\\)" m)
18693 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
18694 m)))
18695 #t))
18696 (replace 'check
18697 (lambda _ (invoke "pytest" "-vv"))))))
18698 (propagated-inputs
18699 `(("python-cloudpickle" ,python-cloudpickle)
18700 ("python-fsspec" ,python-fsspec)
18701 ("python-numpy" ,python-numpy)
18702 ("python-packaging" ,python-packaging)
18703 ("python-pandas" ,python-pandas)
18704 ("python-partd" ,python-partd)
18705 ("python-toolz" ,python-toolz)
18706 ("python-pyyaml" ,python-pyyaml)))
18707 (native-inputs
18708 `(("python-pytest" ,python-pytest)
18709 ("python-pytest-runner" ,python-pytest-runner)))
18710 (home-page "https://github.com/dask/dask/")
18711 (synopsis "Parallel computing with task scheduling")
18712 (description
18713 "Dask is a flexible parallel computing library for analytics. It
18714 consists of two components: dynamic task scheduling optimized for computation,
18715 and large data collections like parallel arrays, dataframes, and lists that
18716 extend common interfaces like NumPy, Pandas, or Python iterators to
18717 larger-than-memory or distributed environments. These parallel collections
18718 run on top of the dynamic task schedulers. ")
18719 (license license:bsd-3)))
18720
18721 (define-public python-ilinkedlist
18722 (package
18723 (name "python-ilinkedlist")
18724 (version "0.4.0")
18725 (source
18726 (origin
18727 (method url-fetch)
18728 (uri (pypi-uri "ilinkedlist" version))
18729 (sha256
18730 (base32
18731 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
18732 (build-system python-build-system)
18733 (native-inputs `(("python-pytest" ,python-pytest)))
18734 (inputs `(("python" ,python)))
18735 (home-page "https://github.com/luther9/ilinkedlist-py")
18736 (synopsis "Immutable linked list library")
18737 (description
18738 "This is a implementation of immutable linked lists for Python. It
18739 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
18740 Since a linked list is treated as immutable, it is hashable, and its length
18741 can be retrieved in constant time. Some of the terminology is inspired by
18742 LISP. It is possible to create an improper list by creating a @code{Pair}
18743 with a non-list @code{cdr}.")
18744 (license license:gpl3+)))
18745
18746 (define-public python-readlike
18747 (package
18748 (name "python-readlike")
18749 (version "0.1.3")
18750 (source
18751 (origin
18752 (method url-fetch)
18753 (uri (pypi-uri "readlike" version))
18754 (sha256
18755 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
18756 (build-system python-build-system)
18757 (home-page "https://github.com/jangler/readlike")
18758 (synopsis "GNU Readline-like line editing module")
18759 (description
18760 "This Python module provides line editing functions similar to the default
18761 Emacs-style ones of GNU Readline. Unlike the Python standard library's
18762 @code{readline} package, this one allows access to those capabilties in settings
18763 outside of a standard command-line interface. It is especially well-suited to
18764 interfacing with Urwid, due to a shared syntax for describing key inputs.
18765
18766 Currently, all stateless Readline commands are implemented. Yanking and history
18767 are not supported.")
18768 (license license:expat)))
18769
18770 (define-public python2-readlike
18771 (package-with-python2 python-readlike))
18772
18773 (define-public python-reparser
18774 (package
18775 (name "python-reparser")
18776 (version "1.4.3")
18777 (source
18778 (origin
18779 (method url-fetch)
18780 (uri (pypi-uri "ReParser" version))
18781 (sha256
18782 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
18783 (build-system python-build-system)
18784 (home-page "https://github.com/xmikos/reparser")
18785 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
18786 (description
18787 "This Python library provides a simple lexer/parser for inline markup based
18788 on regular expressions.")
18789 (license license:expat)))
18790
18791 (define-public python2-reparser
18792 (let ((reparser (package-with-python2
18793 (strip-python2-variant python-reparser))))
18794 (package (inherit reparser)
18795 (propagated-inputs
18796 `(("python2-enum34" ,python2-enum34)
18797 ,@(package-propagated-inputs reparser))))))
18798
18799 (define-public python-retrying
18800 (package
18801 (name "python-retrying")
18802 (version "1.3.3")
18803 (source
18804 (origin
18805 (method git-fetch)
18806 (uri (git-reference
18807 (url "https://github.com/rholder/retrying")
18808 (commit (string-append "v" version))))
18809 (file-name (git-file-name name version))
18810 (sha256
18811 (base32
18812 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
18813 (build-system python-build-system)
18814 (propagated-inputs
18815 `(("python-six" ,python-six)))
18816 (home-page "https://github.com/rholder/retrying")
18817 (synopsis "Library for adding retry behavior")
18818 (description "Retrying is a general-purpose retrying library to simplify
18819 the task of adding retry behavior to just about anything.
18820
18821 Features:
18822
18823 @itemize
18824 @item Generic Decorator API.
18825 @item Specify stop condition (i.e. limit by number of attempts).
18826 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
18827 @item Customize retrying on Exceptions.
18828 @item Customize retrying on expected returned result.
18829 @end itemize")
18830 (license license:asl2.0)))
18831
18832 (define-public python-precis-i18n
18833 (package
18834 (name "python-precis-i18n")
18835 (version "1.0.0")
18836 (source
18837 (origin
18838 (method url-fetch)
18839 (uri (pypi-uri "precis_i18n" version))
18840 (sha256
18841 (base32
18842 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
18843 (build-system python-build-system)
18844 (home-page "https://github.com/byllyfish/precis_i18n")
18845 (synopsis "Implementation of the PRECIS framework")
18846 (description
18847 "This module implements the PRECIS Framework as described in RFC 8264,
18848 RFC 8265 and RFC 8266.")
18849 (license license:expat)))
18850
18851 (define-public python-absl-py
18852 (package
18853 (name "python-absl-py")
18854 (version "0.6.1")
18855 (source
18856 (origin
18857 (method url-fetch)
18858 (uri (pypi-uri "absl-py" version))
18859 (sha256
18860 (base32
18861 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
18862 (build-system python-build-system)
18863 (propagated-inputs
18864 `(("python-six" ,python-six)))
18865 (home-page "https://github.com/abseil/abseil-py")
18866 (synopsis "Abseil Python common libraries")
18867 (description
18868 "This package provides the Abseil Python Common Libraries, a collection
18869 of Python libraries for building Python applications.")
18870 (license license:asl2.0)))
18871
18872 (define-public python-astor
18873 (package
18874 (name "python-astor")
18875 (version "0.7.1")
18876 (source
18877 (origin
18878 (method url-fetch)
18879 (uri (pypi-uri "astor" version))
18880 (sha256
18881 (base32
18882 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
18883 (build-system python-build-system)
18884 ;; FIXME: There are two errors and two test failures.
18885 (arguments `(#:tests? #f))
18886 (home-page "https://github.com/berkerpeksag/astor")
18887 (synopsis "Read and write Python ASTs")
18888 (description "Astor is designed to allow easy manipulation of Python
18889 source via the Abstract Syntax Tree.")
18890 (license license:bsd-3)))
18891
18892 (define-public python2-astor
18893 (package-with-python2 python-astor))
18894
18895 (define-public python-astunparse
18896 (package
18897 (name "python-astunparse")
18898 (version "1.6.2")
18899 (source
18900 (origin
18901 (method url-fetch)
18902 (uri (pypi-uri "astunparse" version))
18903 (sha256
18904 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
18905 (build-system python-build-system)
18906 (arguments '(#:tests? #f)) ; there are none
18907 (propagated-inputs
18908 `(("python-six" ,python-six)
18909 ("python-wheel" ,python-wheel)))
18910 (home-page "https://github.com/simonpercivall/astunparse")
18911 (synopsis "AST unparser for Python")
18912 (description "This package provides an AST unparser for Python. It is a
18913 factored out version of @code{unparse} found in the Python source
18914 distribution.")
18915 (license license:bsd-3)))
18916
18917 (define-public python-gast
18918 (package
18919 (name "python-gast")
18920 (version "0.3.3")
18921 (source
18922 (origin
18923 (method url-fetch)
18924 (uri (pypi-uri "gast" version))
18925 (sha256
18926 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
18927 (build-system python-build-system)
18928 (propagated-inputs
18929 `(("python-astunparse" ,python-astunparse)))
18930 (home-page "https://pypi.org/project/gast/")
18931 (synopsis "Generic Python AST that abstracts the underlying Python version")
18932 (description
18933 "GAST provides a compatibility layer between the AST of various Python
18934 versions, as produced by @code{ast.parse} from the standard @code{ast}
18935 module.")
18936 (license license:bsd-3)))
18937
18938 (define-public python-wikidata
18939 (package
18940 (name "python-wikidata")
18941 (version "0.6.1")
18942 (source
18943 (origin
18944 (method url-fetch)
18945 (uri (pypi-uri "Wikidata" version))
18946 (sha256
18947 (base32
18948 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
18949 (build-system python-build-system)
18950 (propagated-inputs
18951 `(("python-babel" ,python-babel)))
18952 (home-page "https://github.com/dahlia/wikidata")
18953 (synopsis "Wikidata client library")
18954 (description
18955 "This package provides a Python interface to
18956 @url{https://www.wikidata.org/, Wikidata}.")
18957 (properties '((upstream-name . "Wikidata")))
18958 (license license:gpl3+)))
18959
18960 (define-public python-doctest-ignore-unicode
18961 (package
18962 (name "python-doctest-ignore-unicode")
18963 (version "0.1.2")
18964 (source
18965 (origin
18966 (method url-fetch)
18967 (uri (pypi-uri "doctest-ignore-unicode" version))
18968 (sha256
18969 (base32
18970 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
18971 (build-system python-build-system)
18972 (native-inputs
18973 `(("python-nose" ,python-nose)))
18974 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
18975 (synopsis "Ignore Unicode literal prefixes in doctests")
18976 (description
18977 "This package adds support for a flag to ignore Unicode literal prefixes
18978 in doctests.")
18979 (license license:asl2.0)))
18980
18981 (define-public python-attr
18982 (package
18983 (name "python-attr")
18984 (version "0.3.1")
18985 (source
18986 (origin
18987 (method url-fetch)
18988 (uri (pypi-uri "attr" version))
18989 (sha256
18990 (base32
18991 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
18992 (build-system python-build-system)
18993 (home-page "https://github.com/denis-ryzhkov/attr")
18994 (synopsis "Decorator for attributes of target function or class")
18995 (description "Simple decorator to set attributes of target function or
18996 class in a @acronym{DRY, Don't Repeat Yourself} way.")
18997 (license license:expat)))
18998
18999 (define-public python-construct
19000 (package
19001 (name "python-construct")
19002 (version "2.10.56")
19003 (source
19004 (origin
19005 (method url-fetch)
19006 (uri (pypi-uri "construct" version))
19007 (sha256
19008 (base32
19009 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19010 (build-system python-build-system)
19011 (arguments
19012 `(#:tests? #f)) ; No tests exist.
19013 (propagated-inputs
19014 `(("python-extras" ,python-extras)
19015 ("python-arrow" ,python-arrow)
19016 ("python-numpy" ,python-numpy)
19017 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19018 (home-page "https://construct.readthedocs.io")
19019 (synopsis "Declarative and symmetrical parser and builder for binary data")
19020 (description
19021 "This package provides both simple, atomic constructs (such as
19022 integers of various sizes), as well as composite ones which allow you
19023 form hierarchical and sequential structures of increasing complexity.
19024 It features bit and byte granularity, easy debugging and testing, an
19025 easy-to-extend subclass system, and lots of primitive constructs to
19026 make your work easier.")
19027 (license license:expat)))
19028
19029 (define-public python-outcome
19030 (package
19031 (name "python-outcome")
19032 (version "1.0.1")
19033 (source
19034 (origin
19035 (method url-fetch)
19036 (uri (pypi-uri "outcome" version))
19037 (sha256
19038 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19039 (build-system python-build-system)
19040 (arguments
19041 `(#:phases
19042 (modify-phases %standard-phases
19043 (replace 'check
19044 (lambda* (#:key inputs outputs #:allow-other-keys)
19045 (add-installed-pythonpath inputs outputs)
19046 (invoke "pytest" "-vv"))))))
19047 (native-inputs
19048 `(("python-pytest" ,python-pytest)
19049 ("python-pytest-cov" ,python-pytest-cov)
19050 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19051 (propagated-inputs
19052 `(("python-async-generator" ,python-async-generator)
19053 ("python-attrs" ,python-attrs)))
19054 (home-page "https://github.com/python-trio/outcome")
19055 (synopsis "Capture the outcome of Python function calls")
19056 (description
19057 "Capture the outcome of Python function calls. Extracted from the Trio
19058 project.")
19059 ;; Either license applies.
19060 (license (list license:expat license:asl2.0))))
19061
19062 (define-public python-trio
19063 (package
19064 (name "python-trio")
19065 (version "0.16.0")
19066 (source
19067 (origin
19068 (method url-fetch)
19069 (uri (pypi-uri "trio" version))
19070 (sha256
19071 (base32 "0g6gkwz6i05rm9ym4l4imxakzld7qcgxhb21kprilchcav87s1nz"))))
19072 (build-system python-build-system)
19073 (arguments
19074 `(#:phases
19075 (modify-phases %standard-phases
19076 (add-before 'check 'change-home
19077 (lambda _
19078 ;; Tests require a writable home.
19079 (setenv "HOME" "/tmp")
19080 #t))
19081 (replace 'check
19082 (lambda _
19083 (invoke "pytest" "-vv" "-k"
19084 (string-append
19085 ;; This test times out.
19086 "not test_ki_protection_works"
19087 ;; Assertion errors.
19088 " and not test_guest_mode_ki"
19089 " and not test_run_in_trio_thread_ki"
19090 ;; These try to raise KeyboardInterrupt which does not work
19091 ;; in the build environment.
19092 " and not test_ki_self"
19093 " and not test_ki_wakes_us_up"
19094 ;; Failure in name resolution.
19095 " and not test_getnameinfo"
19096 " and not test_SocketType_resolve"
19097 ;; OSError: protocol not found.
19098 " and not test_getprotobyname")))))))
19099 (native-inputs
19100 `(("python-astor" ,python-astor)
19101 ("python-ipython" ,python-ipython)
19102 ("python-jedi" ,python-jedi)
19103 ("python-pylint" ,python-pylint)
19104 ("python-pyopenssl" ,python-pyopenssl)
19105 ("python-pytest" ,python-pytest)
19106 ("python-pytest-cov" ,python-pytest-cov)
19107 ("python-trustme" ,python-trustme)))
19108 (propagated-inputs
19109 `(("python-attrs" ,python-attrs)
19110 ("python-idna" ,python-idna)
19111 ("python-outcome" ,python-outcome)
19112 ("python-sniffio" ,python-sniffio)
19113 ("python-sortedcontainers"
19114 ,python-sortedcontainers)))
19115 (home-page "https://github.com/python-trio/trio")
19116 (synopsis "Friendly Python library for async concurrency and I/O")
19117 (description
19118 "Trio strives to be a production-quality, async/await-native I/O library
19119 for Python. Like all async libraries, its main purpose is to help you write
19120 programs that do multiple things at the same time with parallelized I/O.")
19121 ;; Either license applies.
19122 (license (list license:expat license:asl2.0))))
19123
19124 (define-public python-humanize
19125 (package
19126 (name "python-humanize")
19127 (version "0.5.1")
19128 (source
19129 (origin
19130 (method url-fetch)
19131 (uri (pypi-uri "humanize" version))
19132 (sha256
19133 (base32
19134 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
19135 (arguments
19136 '(#:tests? #f)) ; tests not in pypi archive
19137 (build-system python-build-system)
19138 (home-page "https://github.com/jmoiron/humanize")
19139 (synopsis "Print numerical information in a human-readable form")
19140 (description "This package provides a Python module that displays numbers
19141 and dates in \"human readable\" forms. For example, it would display
19142 \"12345591313\" as \"12.3 billion\".")
19143 (license license:expat)))
19144
19145 (define-public python-txaio
19146 (package
19147 (name "python-txaio")
19148 (version "18.8.1")
19149 (source
19150 (origin
19151 (method url-fetch)
19152 (uri (pypi-uri "txaio" version))
19153 (sha256
19154 (base32
19155 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
19156 (build-system python-build-system)
19157 (propagated-inputs
19158 `(("python-twisted" ,python-twisted)
19159 ("python-six" ,python-six)))
19160 (home-page "https://github.com/crossbario/txaio")
19161 (synopsis "Compatibility layer between Python asyncio and Twisted")
19162 (description "Txaio provides a compatibility layer between the Python
19163 @code{asyncio} module and @code{Twisted}.")
19164 (license license:expat)))
19165
19166 (define-public python-toolshed
19167 (package
19168 (name "python-toolshed")
19169 (version "0.4.6")
19170 (source
19171 (origin
19172 (method url-fetch)
19173 (uri (pypi-uri "toolshed" version))
19174 (sha256
19175 (base32
19176 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
19177 (build-system python-build-system)
19178 (native-inputs
19179 `(("python-nose" ,python-nose)))
19180 (home-page "https://github.com/brentp/toolshed/")
19181 (synopsis "Collection of modules and functions for working with data")
19182 (description "This is a collection of well-tested, simple modules and
19183 functions that aim to reduce boilerplate when working with data.")
19184 (license license:bsd-2)))
19185
19186 (define-public python-annoy
19187 (package
19188 (name "python-annoy")
19189 (version "1.15.1")
19190 (source
19191 (origin
19192 (method url-fetch)
19193 (uri (pypi-uri "annoy" version))
19194 (sha256
19195 (base32
19196 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
19197 (build-system python-build-system)
19198 (native-inputs
19199 `(("python-nose" ,python-nose)))
19200 (home-page "https://github.com/spotify/annoy/")
19201 (synopsis "Approximate nearest neighbors library")
19202 (description
19203 "Annoy is a C++ library with Python bindings to search for points in
19204 space that are close to a given query point. It also creates large read-only
19205 file-based data structures that are @code{mmap}ped into memory so that many
19206 processes may share the same data.")
19207 (license license:asl2.0)))
19208
19209 (define-public python-pylzma
19210 (package
19211 (name "python-pylzma")
19212 (version "0.5.0")
19213 (source
19214 (origin
19215 (method url-fetch)
19216 (uri (pypi-uri "pylzma" version))
19217 (sha256
19218 (base32
19219 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
19220 (build-system python-build-system)
19221 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
19222 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
19223 (description "This package provides Python bindings for the LZMA library
19224 by Igor Pavlov.")
19225 (license license:lgpl2.1+)))
19226
19227 (define-public python2-pylzma
19228 (package-with-python2 python-pylzma))
19229
19230 (define-public python2-zeroconf
19231 (package
19232 (name "python2-zeroconf")
19233
19234 ;; This is the last version that supports Python 2.x.
19235 (version "0.19.1")
19236 (source
19237 (origin
19238 (method url-fetch)
19239 (uri (pypi-uri "zeroconf" version))
19240 (sha256
19241 (base32
19242 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
19243 (build-system python-build-system)
19244 (arguments
19245 `(#:python ,python-2
19246 #:phases
19247 (modify-phases %standard-phases
19248 (add-after 'unpack 'patch-requires
19249 (lambda* (#:key inputs #:allow-other-keys)
19250 (substitute* "setup.py"
19251 (("enum-compat")
19252 "enum34"))
19253 #t)))))
19254 (native-inputs
19255 `(("python2-six" ,python2-six)
19256 ("python2-enum32" ,python2-enum34)
19257 ("python2-netifaces" ,python2-netifaces)
19258 ("python2-typing" ,python2-typing)))
19259 (home-page "https://github.com/jstasiak/python-zeroconf")
19260 (synopsis "Pure Python mDNS service discovery")
19261 (description
19262 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
19263 compatible).")
19264 (license license:lgpl2.1+)))
19265
19266 (define-public python-bsddb3
19267 (package
19268 (name "python-bsddb3")
19269 (version "6.2.6")
19270 (source
19271 (origin
19272 (method url-fetch)
19273 (uri (pypi-uri "bsddb3" version))
19274 (sha256
19275 (base32
19276 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
19277 (build-system python-build-system)
19278 (inputs
19279 `(("bdb" ,bdb)))
19280 (arguments
19281 '(#:phases
19282 (modify-phases %standard-phases
19283 (add-after 'unpack 'configure-locations
19284 (lambda* (#:key inputs #:allow-other-keys)
19285 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
19286 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
19287 #t))
19288 (replace 'check
19289 (lambda _
19290 (invoke "python3" "test3.py" "-v"))))))
19291 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
19292 (synopsis "Python bindings for Oracle Berkeley DB")
19293 (description
19294 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
19295 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
19296 Transaction objects, and each of these is exposed as a Python type in the
19297 bsddb3.db module. The database objects can use various access methods: btree,
19298 hash, recno, and queue. Complete support of Berkeley DB distributed
19299 transactions. Complete support for Berkeley DB Replication Manager.
19300 Complete support for Berkeley DB Base Replication. Support for RPC.")
19301 (license license:bsd-3)))
19302
19303 (define-public python-dbfread
19304 (package
19305 (name "python-dbfread")
19306 (version "2.0.7")
19307 (source (origin
19308 (method url-fetch)
19309 (uri (pypi-uri "dbfread" version))
19310 (sha256
19311 (base32
19312 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
19313 (build-system python-build-system)
19314 (native-inputs
19315 `(("python-pytest" ,python-pytest)))
19316 (home-page "https://dbfread.readthedocs.io")
19317 (synopsis "Read DBF Files with Python")
19318 (description
19319 "This library reads DBF files and returns the data as native Python data
19320 types for further processing. It is primarily intended for batch jobs and
19321 one-off scripts.")
19322 (license license:expat)))
19323
19324 (define-public python-cached-property
19325 (package
19326 (name "python-cached-property")
19327 (version "1.5.1")
19328 (source
19329 (origin
19330 (method url-fetch)
19331 (uri (pypi-uri "cached-property" version))
19332 (sha256
19333 (base32
19334 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
19335 (build-system python-build-system)
19336 (arguments
19337 `(#:phases
19338 (modify-phases %standard-phases
19339 ;; https://github.com/pydanny/cached-property/issues/131
19340 ;; recent versions of freezegun break one test
19341 (add-after 'unpack 'disable-broken-test
19342 (lambda _
19343 (substitute* "tests/test_cached_property.py"
19344 (("def test_threads_ttl_expiry\\(self\\)" m)
19345 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
19346 " " m)))
19347 #t)))))
19348 (native-inputs
19349 `(("python-freezegun" ,python-freezegun)))
19350 (home-page
19351 "https://github.com/pydanny/cached-property")
19352 (synopsis
19353 "Decorator for caching properties in classes")
19354 (description
19355 "This package provides a decorator which makes caching
19356 time-or-computationally-expensive properties quick and easy and works in Python
19357 2 or 3.")
19358 (license license:bsd-3)))
19359
19360 (define-public python-folium
19361 (package
19362 (name "python-folium")
19363 (version "0.11.0")
19364 (source
19365 (origin
19366 (method url-fetch)
19367 (uri (pypi-uri "folium" version))
19368 (sha256
19369 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
19370 (build-system python-build-system)
19371 (propagated-inputs
19372 `(("python-branca" ,python-branca)
19373 ("python-jinja2" ,python-jinja2)
19374 ("python-numpy" ,python-numpy)
19375 ("python-requests" ,python-requests)))
19376 (native-inputs
19377 `(("python-pytest" ,python-pytest)))
19378 (home-page "https://github.com/python-visualization/folium")
19379 (synopsis "Make beautiful maps with Leaflet.js & Python")
19380 (description "@code{folium} makes it easy to visualize data that’s been
19381 manipulated in Python on an interactive leaflet map. It enables both the
19382 binding of data to a map for @code{choropleth} visualizations as well as
19383 passing rich vector/raster/HTML visualizations as markers on the map.
19384
19385 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
19386 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
19387 supports Image, Video, GeoJSON and TopoJSON overlays.")
19388 (license license:expat)))
19389
19390 (define-public jube
19391 (package
19392 ;; This is a command-line tool, so no "python-" prefix.
19393 (name "jube")
19394 (version "2.2.2")
19395 (source (origin
19396 (method url-fetch)
19397 (uri (string-append
19398 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
19399 version))
19400 (sha256
19401 (base32
19402 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
19403 (file-name (string-append "jube-" version ".tar.gz"))))
19404 (build-system python-build-system)
19405 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
19406 (synopsis "Benchmarking environment")
19407 (description
19408 "JUBE helps perform and analyze benchmarks in a systematic way. For each
19409 benchmarked application, benchmark data is stored in a format that allows JUBE
19410 to deduct the desired information. This data can be parsed by automatic pre-
19411 and post-processing scripts that draw information and store it more densely
19412 for manual interpretation.")
19413 (license license:gpl3+)))
19414
19415 (define-public python-pyroutelib3
19416 (package
19417 (name "python-pyroutelib3")
19418 (version "1.3.post1")
19419 (source
19420 (origin
19421 (method url-fetch)
19422 (uri (pypi-uri "pyroutelib3" version))
19423 (sha256
19424 (base32
19425 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
19426 (build-system python-build-system)
19427 (propagated-inputs
19428 `(("python-dateutil" ,python-dateutil)))
19429 (home-page "https://github.com/MKuranowski/pyroutelib3")
19430 (synopsis "Library for simple routing on OSM data")
19431 (description "Library for simple routing on OSM data")
19432 (license license:gpl3+)))
19433
19434 (define-public python-bibtexparser
19435 (package
19436 (name "python-bibtexparser")
19437 (version "1.1.0")
19438 (source
19439 (origin
19440 (method url-fetch)
19441 (uri (pypi-uri "bibtexparser" version))
19442 (sha256
19443 (base32
19444 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
19445 (build-system python-build-system)
19446 (propagated-inputs
19447 `(("python-pyparsing" ,python-pyparsing)))
19448 (native-inputs
19449 `(("python-future" ,python-future)))
19450 (home-page "https://github.com/sciunto-org/python-bibtexparser")
19451 (synopsis "Python library to parse BibTeX files")
19452 (description "BibtexParser is a Python library to parse BibTeX files.")
19453 (license (list license:bsd-3 license:lgpl3))))
19454
19455 (define-public python-distro
19456 (package
19457 (name "python-distro")
19458 (version "1.4.0")
19459 (source
19460 (origin
19461 (method url-fetch)
19462 (uri (pypi-uri "distro" version))
19463 (sha256
19464 (base32
19465 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
19466 (build-system python-build-system)
19467 (native-inputs
19468 `(("python-pytest" ,python-pytest)))
19469 (home-page "https://github.com/nir0s/distro")
19470 (synopsis
19471 "OS platform information API")
19472 (description
19473 "@code{distro} provides information about the OS distribution it runs on,
19474 such as a reliable machine-readable ID, or version information.
19475
19476 It is the recommended replacement for Python's original
19477 `platform.linux_distribution` function (which will be removed in Python 3.8).
19478 @code{distro} also provides a command-line interface to output the platform
19479 information in various formats.")
19480 (license license:asl2.0)))
19481
19482 (define-public python-cairosvg
19483 (package
19484 (name "python-cairosvg")
19485 (version "2.4.2")
19486 (source
19487 (origin
19488 (method url-fetch)
19489 (uri (pypi-uri "CairoSVG" version))
19490 (sha256
19491 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
19492 (build-system python-build-system)
19493 (arguments
19494 `(#:phases
19495 (modify-phases %standard-phases
19496 (replace 'check
19497 (lambda _ (invoke "pytest"))))))
19498 (propagated-inputs
19499 `(("python-cairocffi" ,python-cairocffi)
19500 ("python-cssselect2" ,python-cssselect2)
19501 ("python-defusedxml" ,python-defusedxml)
19502 ("python-pillow" ,python-pillow)
19503 ("python-tinycss2" ,python-tinycss2)))
19504 (native-inputs
19505 `(("python-pytest-flake8" ,python-pytest-flake8)
19506 ("python-pytest-isort" ,python-pytest-isort)
19507 ("python-pytest-runner" ,python-pytest-runner)))
19508 (home-page "https://cairosvg.org/")
19509 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
19510 (description "CairoSVG is a SVG converter based on Cairo. It can export
19511 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
19512 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
19513 parsed, the result is drawn to a Cairo surface that can be exported to
19514 qvarious formats: PDF, PostScript, PNG and even SVG.")
19515 (license license:lgpl3+)))
19516
19517 (define-public python-pyphen
19518 (package
19519 (name "python-pyphen")
19520 (version "0.9.5")
19521 (source
19522 (origin
19523 (method url-fetch)
19524 (uri (pypi-uri "Pyphen" version))
19525 (sha256
19526 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
19527 (build-system python-build-system)
19528 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
19529 ;; embedded set provided by upstream - like Debian does.
19530 (home-page "https://github.com/Kozea/Pyphen")
19531 (synopsis "Pure Python module to hyphenate text")
19532 (description "Pyphen is a pure Python module to hyphenate text using
19533 existing Hunspell hyphenation dictionaries.")
19534 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
19535
19536 (define-public python-intelhex
19537 (package
19538 (name "python-intelhex")
19539 (version "2.2.1")
19540 (source
19541 (origin
19542 (method url-fetch)
19543 (uri (pypi-uri "intelhex" version))
19544 (sha256
19545 (base32
19546 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
19547 (build-system python-build-system)
19548 (arguments '(#:tests? #f)) ;issue with version
19549 (home-page "https://pypi.org/project/IntelHex/")
19550 (synopsis "Python library for Intel HEX files manipulations")
19551 (description "The Intel HEX file format is widely used in microprocessors
19552 and microcontrollers area (embedded systems etc.) as the de facto standard for
19553 representation of code to be programmed into microelectronic devices. This
19554 package provides an intelhex Python library to read, write, create from
19555 scratch and manipulate data from Intel HEX file format. It also includes
19556 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
19557 converters and more, those based on the library itself.")
19558 (license license:bsd-3)))
19559
19560 (define-public python-pykwalify
19561 (package
19562 (name "python-pykwalify")
19563 (version "1.7.0")
19564 (source
19565 (origin
19566 (method url-fetch)
19567 (uri (pypi-uri "pykwalify" version))
19568 (sha256
19569 (base32
19570 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
19571 (build-system python-build-system)
19572 (arguments '(#:tests? #f)) ;missing dependencies
19573 (propagated-inputs
19574 `(("python-dateutil" ,python-dateutil)
19575 ("python-docopt" ,python-docopt)
19576 ("python-pyyaml" ,python-pyyaml)))
19577 (home-page "https://github.com/grokzen/pykwalify")
19578 (synopsis
19579 "Python lib/cli for JSON/YAML schema validation")
19580 (description
19581 "This package provides a parser, schema validator, and data binding tool
19582 for YAML and JSON.")
19583 (license license:expat)))
19584
19585 (define-public python-dbusmock
19586 (package
19587 (name "python-dbusmock")
19588 (version "0.18.3")
19589 (source
19590 (origin
19591 (method url-fetch)
19592 (uri (pypi-uri "python-dbusmock" version))
19593 (sha256
19594 (base32
19595 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
19596 (build-system python-build-system)
19597 (arguments
19598 '(#:phases
19599 (modify-phases %standard-phases
19600 (add-after 'unpack 'patch-shell-path
19601 (lambda _
19602 (substitute* "tests/test_code.py"
19603 (("/bin/bash") (which "bash")))
19604 #t)))))
19605 (native-inputs
19606 `(;; For tests.
19607 ("dbus" ,dbus) ; for dbus-daemon
19608 ("python-nose" ,python-nose)
19609 ("which" ,which)))
19610 (propagated-inputs
19611 `(("python-dbus" ,python-dbus)
19612 ("python-pygobject" ,python-pygobject)))
19613 (home-page "https://github.com/martinpitt/python-dbusmock")
19614 (synopsis "Python library for mock D-Bus objects")
19615 (description "python-dbusmock allows for the easy creation of mock objects on
19616 D-Bus. This is useful for writing tests for software which talks to D-Bus
19617 services such as upower, systemd, logind, gnome-session or others, and it is
19618 hard (or impossible without root privileges) to set the state of the real
19619 services to what you expect in your tests.")
19620 (license license:lgpl3+)))
19621
19622 (define-public python-ujson
19623 (package
19624 (name "python-ujson")
19625 (version "2.0.3")
19626 (source
19627 (origin
19628 (method url-fetch)
19629 (uri (pypi-uri "ujson" version))
19630 (sha256
19631 (base32
19632 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
19633 (modules '((guix build utils)))
19634 (snippet
19635 '(begin (delete-file-recursively "deps") #t))))
19636 (build-system python-build-system)
19637 (arguments
19638 `(#:phases
19639 (modify-phases %standard-phases
19640 (add-after 'unpack 'link-to-system-double-conversion
19641 (lambda* (#:key inputs #:allow-other-keys)
19642 (let ((d-c (assoc-ref inputs "double-conversion")))
19643 (substitute* "setup.py"
19644 (("./deps/double-conversion/double-conversion\"")
19645 (string-append d-c "/include/double-conversion\""))
19646 (("-lstdc++" stdc)
19647 (string-append "-L" d-c "/lib\","
19648 " \"-ldouble-conversion\","
19649 " \"" stdc)))
19650 #t)))
19651 (replace 'check
19652 (lambda* (#:key inputs outputs #:allow-other-keys)
19653 (add-installed-pythonpath inputs outputs)
19654 (invoke "pytest"))))))
19655 (native-inputs
19656 `(("double-conversion" ,double-conversion)
19657 ("python-setuptools-scm" ,python-setuptools-scm)
19658 ("python-pytest" ,python-pytest)))
19659 (home-page "https://github.com/ultrajson/ultrajson")
19660 (synopsis "Ultra fast JSON encoder and decoder for Python")
19661 (description
19662 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
19663 bindings for Python 3.")
19664 (license license:bsd-3)))
19665
19666 (define-public python-ujson-1
19667 (package
19668 (inherit python-ujson)
19669 (version "1.35")
19670 (source
19671 (origin
19672 (method url-fetch)
19673 (uri (pypi-uri "ujson" version))
19674 (sha256
19675 (base32
19676 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
19677 (arguments
19678 '(#:phases %standard-phases))
19679 (native-inputs '())
19680 (home-page "http://www.esn.me")
19681 (description
19682 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
19683 bindings for Python 2.5+ and 3.")))
19684
19685 (define-public python2-ujson-1
19686 (package-with-python2 python-ujson-1))
19687
19688 (define-public python-iocapture
19689 ;; The latest release is more than a year older than this commit.
19690 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
19691 (revision "1"))
19692 (package
19693 (name "python-iocapture")
19694 (version "0.1.2")
19695 (source
19696 (origin
19697 (method git-fetch)
19698 (uri (git-reference
19699 (url "https://github.com/oinume/iocapture")
19700 (commit commit)))
19701 (file-name (git-file-name name version))
19702 (sha256
19703 (base32
19704 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
19705 (build-system python-build-system)
19706 (arguments
19707 `(#:phases
19708 (modify-phases %standard-phases
19709 (delete 'check)
19710 (add-after 'install 'check
19711 (lambda* (#:key inputs outputs #:allow-other-keys)
19712 (add-installed-pythonpath inputs outputs)
19713 (invoke "py.test" "-v" "tests")
19714 #t)))))
19715 (propagated-inputs
19716 `(("python-flexmock" ,python-flexmock)
19717 ("python-pytest" ,python-pytest)
19718 ("python-pytest-cov" ,python-pytest-cov)
19719 ("python-six" ,python-six)))
19720 (home-page "https://github.com/oinume/iocapture")
19721 (synopsis "Python capturing tool for stdout and stderr")
19722 (description
19723 "This package helps you to capture the standard out (stdout) and the
19724 standard error channel (stderr) in your program.")
19725 (license license:expat))))
19726
19727 (define-public python-argh
19728 ;; There are 21 commits since the latest release containing important
19729 ;; improvements.
19730 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
19731 (revision "1"))
19732 (package
19733 (name "python-argh")
19734 (version (git-version "0.26.2" revision commit))
19735 (source
19736 (origin
19737 (method git-fetch)
19738 (uri (git-reference
19739 (url "https://github.com/neithere/argh")
19740 (commit commit)))
19741 (file-name (git-file-name name version))
19742 (sha256
19743 (base32
19744 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
19745 (build-system python-build-system)
19746 (propagated-inputs
19747 `(("python-iocapture" ,python-iocapture)
19748 ("python-mock" ,python-mock)
19749 ("python-pytest" ,python-pytest)
19750 ("python-pytest-cov" ,python-pytest-cov)
19751 ("python-pytest-xdist" ,python-pytest-xdist)
19752 ("python-tox" ,python-tox)))
19753 (home-page "https://github.com/neithere/argh/")
19754 (synopsis "Argparse wrapper with natural syntax")
19755 (description
19756 "python-argh is a small library that provides several layers of
19757 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
19758 always possible to declare a command with the highest possible (and least
19759 flexible) layer and then tune the behaviour with any of the lower layers
19760 including the native API of @code{python-argparse}.")
19761 (license license:lgpl3+))))
19762
19763 (define-public python-ppft
19764 (package
19765 (name "python-ppft")
19766 (version "1.6.6.1")
19767 (source
19768 (origin
19769 (method url-fetch)
19770 (uri (pypi-uri "ppft" version))
19771 (sha256
19772 (base32
19773 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
19774 (build-system python-build-system)
19775 (arguments '(#:tests? #f)) ; there are none
19776 (propagated-inputs
19777 `(("python-six" ,python-six)))
19778 (home-page "https://pypi.org/project/ppft/")
19779 (synopsis "Fork of Parallel Python")
19780 (description
19781 "This package is a fork of Parallel Python. The Parallel Python
19782 module (@code{pp}) provides an easy and efficient way to create
19783 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
19784 computers and clusters. It features cross-platform portability and dynamic
19785 load balancing.")
19786 (license license:bsd-3)))
19787
19788 (define-public python-pox
19789 (package
19790 (name "python-pox")
19791 (version "0.2.7")
19792 (source
19793 (origin
19794 (method url-fetch)
19795 (uri (pypi-uri "pox" version))
19796 (sha256
19797 (base32
19798 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
19799 (build-system python-build-system)
19800 (arguments
19801 `(#:phases
19802 (modify-phases %standard-phases
19803 (replace 'check
19804 (lambda _
19805 (mkdir-p "/tmp/guix")
19806 (setenv "SHELL" "bash")
19807 (setenv "USERNAME" "guix")
19808 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
19809 (invoke "py.test" "-vv")
19810 #t)))))
19811 (native-inputs
19812 `(("python-pytest" ,python-pytest)
19813 ("which" ,which)))
19814 (home-page "https://pypi.org/project/pox/")
19815 (synopsis "Python utilities for filesystem exploration and automated builds")
19816 (description
19817 "Pox provides a collection of utilities for navigating and manipulating
19818 filesystems. This module is designed to facilitate some of the low level
19819 operating system interactions that are useful when exploring a filesystem on a
19820 remote host. Pox provides Python equivalents of several shell commands such
19821 as @command{which} and @command{find}. These commands allow automated
19822 discovery of what has been installed on an operating system, and where the
19823 essential tools are located.")
19824 (license license:bsd-3)))
19825
19826 (define-public python-pathos
19827 (package
19828 (name "python-pathos")
19829 (version "0.2.5")
19830 (source
19831 (origin
19832 (method url-fetch)
19833 (uri (pypi-uri "pathos" version))
19834 (sha256
19835 (base32
19836 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
19837 (build-system python-build-system)
19838 (arguments
19839 '(#:phases
19840 (modify-phases %standard-phases
19841 (replace 'check
19842 (lambda _
19843 (setenv "PYTHONPATH"
19844 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
19845 (invoke "python" "./tests/__main__.py"))))))
19846 (propagated-inputs
19847 `(("python-dill" ,python-dill)
19848 ("python-multiprocess" ,python-multiprocess)
19849 ("python-pox" ,python-pox)
19850 ("python-ppft" ,python-ppft)))
19851 (native-inputs
19852 `(("python-pytest" ,python-pytest)))
19853 (home-page "https://pypi.org/project/pathos/")
19854 (synopsis
19855 "Parallel graph management and execution in heterogeneous computing")
19856 (description
19857 "Python-pathos is a framework for heterogeneous computing. It provides a
19858 consistent high-level interface for configuring and launching parallel
19859 computations across heterogeneous resources. Python-pathos provides configurable
19860 launchers for parallel and distributed computing, where each launcher contains
19861 the syntactic logic to configure and launch jobs in an execution environment.")
19862 (license license:bsd-3)))
19863
19864 (define-public python-flit
19865 (package
19866 (name "python-flit")
19867 (version "2.1.0")
19868 (source
19869 (origin
19870 (method url-fetch)
19871 (uri (pypi-uri "flit" version))
19872 (sha256
19873 (base32
19874 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
19875 (build-system python-build-system)
19876 (arguments
19877 `(#:tests? #f)) ; XXX: Check requires network access.
19878 (home-page "https://flit.readthedocs.io/")
19879 (synopsis
19880 "Simple packaging tool for simple packages")
19881 (description
19882 "Flit is a simple way to put Python packages and modules on PyPI. Flit
19883 packages a single importable module or package at a time, using the import
19884 name as the name on PyPI. All subpackages and data files within a package
19885 are included automatically.")
19886 (license license:bsd-3)))
19887
19888 (define-public python-pathtools
19889 (package
19890 (name "python-pathtools")
19891 (version "0.1.2")
19892 (source
19893 (origin
19894 (method url-fetch)
19895 (uri (pypi-uri "pathtools" version))
19896 (sha256
19897 (base32
19898 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
19899 (build-system python-build-system)
19900 (home-page
19901 "https://github.com/gorakhargosh/pathtools")
19902 (synopsis "Path utilities for Python")
19903 (description "Pattern matching and various utilities for file systems
19904 paths.")
19905 (license license:expat)))
19906
19907 (define-public python-fastentrypoints
19908 (package
19909 (name "python-fastentrypoints")
19910 (version "0.12")
19911 (source
19912 (origin
19913 (method url-fetch)
19914 (uri (pypi-uri "fastentrypoints" version))
19915 (sha256
19916 (base32
19917 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
19918 (build-system python-build-system)
19919 (home-page
19920 "https://github.com/ninjaaron/fast-entry_points")
19921 (synopsis
19922 "Makes entry_points specified in setup.py load more quickly")
19923 (description
19924 "Using entry_points in your setup.py makes scripts that start really
19925 slowly because it imports pkg_resources. This package allows such setup
19926 scripts to load entry points more quickly.")
19927 (license license:bsd-3)))
19928
19929 (define-public python-funcparserlib
19930 (package
19931 (name "python-funcparserlib")
19932 (version "0.3.6")
19933 (source
19934 (origin
19935 (method url-fetch)
19936 (uri (pypi-uri "funcparserlib" version))
19937 (sha256
19938 (base32
19939 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
19940 (native-inputs
19941 `(("python-tox" ,python-tox)))
19942 (arguments
19943 `(#:phases
19944 (modify-phases %standard-phases
19945 (replace 'check
19946 (lambda _
19947 (invoke "tox"))))))
19948 (build-system python-build-system)
19949 (home-page
19950 "https://github.com/vlasovskikh/funcparserlib")
19951 (synopsis
19952 "Recursive descent parsing library based on functional combinators")
19953 (description
19954 "This package is a recursive descent parsing library for Python based on
19955 functional combinators. Parser combinators are just higher-order functions
19956 that take parsers as their arguments and return them as result values.")
19957 (license license:expat)))
19958
19959 (define-public python-speg
19960 (package
19961 (name "python-speg")
19962 (version "0.3")
19963 (source
19964 (origin
19965 (method url-fetch)
19966 (uri (pypi-uri "speg" version ".zip"))
19967 (sha256
19968 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
19969 (arguments
19970 `(#:tests? #f)) ;FIXME: tests fail, not sure why
19971 (native-inputs
19972 `(("unzip" ,unzip)))
19973 (build-system python-build-system)
19974 (home-page "https://github.com/avakar/speg")
19975 (synopsis "PEG-based parser interpreter with memoization")
19976 (description "This package is a PEG-based parser and interpreter with
19977 memoization.")
19978 (license license:expat)))
19979
19980 (define-public python-cson
19981 (package
19982 (name "python-cson")
19983 (version "0.8")
19984 (source
19985 (origin
19986 (method url-fetch)
19987 (uri (pypi-uri "cson" version))
19988 (sha256
19989 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
19990 (build-system python-build-system)
19991 (propagated-inputs
19992 `(("python-speg" ,python-speg)))
19993 (home-page "https://github.com/avakar/pycson")
19994 (synopsis "Parser for Coffeescript Object Notation (CSON)")
19995 (description "This package is a parser for Coffeescript Object
19996 Notation (CSON).")
19997 (license license:expat)))
19998
19999 (define-public python-asynctest
20000 (package
20001 (name "python-asynctest")
20002 (version "0.13.0")
20003 (source
20004 (origin
20005 (method url-fetch)
20006 (uri (pypi-uri "asynctest" version))
20007 (sha256
20008 (base32
20009 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20010 (build-system python-build-system)
20011 (arguments
20012 '(#:phases
20013 (modify-phases %standard-phases
20014 (replace 'check
20015 (lambda _
20016 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20017 (add-after 'unpack 'disable-tests
20018 (lambda* _
20019 (substitute* "test/test_selector.py"
20020 ;; XXX: This test fails for unknown reason inside the build
20021 ;; environment.
20022 (("def test_events_watched_outside_test_are_ignored")
20023 "@unittest.skip('disabled by guix')
20024 def test_events_watched_outside_test_are_ignored")))))))
20025 (home-page "https://github.com/Martiusweb/asynctest")
20026 (synopsis "Extension of unittest for testing asyncio libraries")
20027 (description
20028 "The package asynctest is built on top of the standard unittest module
20029 and cuts down boilerplate code when testing libraries for asyncio.")
20030 (license license:asl2.0)))
20031
20032 (define-public python-aionotify
20033 (package
20034 (name "python-aionotify")
20035 (version "0.2.0")
20036 (source
20037 (origin
20038 ;; Source tarball on PyPi lacks tests
20039 (method git-fetch)
20040 (uri (git-reference
20041 (url "https://github.com/rbarrois/aionotify")
20042 (commit (string-append "v" version))))
20043 (file-name (git-file-name name version))
20044 (sha256
20045 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
20046 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
20047 (build-system python-build-system)
20048 (home-page "https://github.com/rbarrois/aionotify")
20049 (synopsis "Asyncio-powered inotify library")
20050 (description
20051 "@code{aionotify} is a simple, asyncio-based inotify library.")
20052 (license license:bsd-3)))
20053
20054 (define-public python-forbiddenfruit
20055 (package
20056 (name "python-forbiddenfruit")
20057 (version "0.1.3")
20058 (source
20059 (origin
20060 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
20061 (method git-fetch)
20062 (uri (git-reference
20063 (url "https://github.com/clarete/forbiddenfruit")
20064 (commit version)))
20065 (file-name (git-file-name name version))
20066 (sha256
20067 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
20068 (build-system python-build-system)
20069 (arguments
20070 '(#:phases
20071 (modify-phases %standard-phases
20072 (replace 'check
20073 (lambda _
20074 (invoke "make" "SKIP_DEPS=1"))))))
20075 (native-inputs
20076 `(("python-nose" ,python-nose)
20077 ("python-coverage" ,python-coverage)))
20078 (home-page "https://github.com/clarete/forbiddenfruit")
20079 (synopsis "Patch python built-in objects")
20080 (description "This project allows Python code to extend built-in types.")
20081 (license (list license:gpl3+ license:expat))))
20082
20083 (define-public python-shouldbe
20084 (package
20085 (name "python-shouldbe")
20086 (version "0.1.2")
20087 (source
20088 (origin
20089 (method url-fetch)
20090 (uri (pypi-uri "shouldbe" version))
20091 (sha256
20092 (base32
20093 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
20094 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
20095 (build-system python-build-system)
20096 (propagated-inputs
20097 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
20098 (native-inputs
20099 `(("python-nose" ,python-nose)))
20100 (home-page "https://github.com/directxman12/should_be")
20101 (synopsis "Python Assertion Helpers inspired by Shouldly")
20102 (description
20103 "Python Assertion Helpers inspired by Shouldly.")
20104 (license license:isc)))
20105
20106 (define-public python-k5test
20107 (package
20108 (name "python-k5test")
20109 (version "0.9.2")
20110 (source
20111 (origin
20112 (method url-fetch)
20113 (uri (pypi-uri "k5test" version))
20114 (sha256
20115 (base32
20116 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
20117 (build-system python-build-system)
20118 (propagated-inputs
20119 `(("python-six" ,python-six)
20120 ;; `which`, `kadmin.local` binaries called inside library
20121 ("which" ,which)
20122 ("mit-krb5" ,mit-krb5)))
20123 (native-inputs `(("mit-krb5" ,mit-krb5)))
20124 (arguments
20125 '(#:phases
20126 (modify-phases %standard-phases
20127 (add-after 'unpack 'patch-paths
20128 (lambda* _
20129 (substitute* "k5test/realm.py"
20130 (("'kadmin_local'") "'kadmin.local'")))))))
20131 (home-page "https://github.com/pythongssapi/k5test")
20132 (synopsis "Library for setting up self-contained Kerberos 5 environments")
20133 (description
20134 "@code{k5test} is a library for setting up self-contained Kerberos 5
20135 environments, and running Python unit tests inside those environments. It is
20136 based on the file of the same name found alongside the MIT Kerberos 5 unit
20137 tests.")
20138 (license license:isc)))
20139
20140 (define-public python-gssapi
20141 (package
20142 (name "python-gssapi")
20143 (version "1.6.5")
20144 (source
20145 (origin
20146 (method url-fetch)
20147 (uri (pypi-uri "gssapi" version))
20148 (sha256
20149 (base32
20150 "02i5s7998dg5kcr4m0xwamd8vjqk1816xbzldyp68l91f6bynwcr"))))
20151 (build-system python-build-system)
20152 (propagated-inputs
20153 `(("python-decorator" ,python-decorator)
20154 ("python-six" ,python-six)))
20155 (inputs
20156 `(("mit-krb5" ,mit-krb5)))
20157 ;; for tests
20158 (native-inputs
20159 `(("python-shouldbe" ,python-shouldbe)
20160 ("python-parameterized" ,python-parameterized)
20161 ("python-k5test" ,python-k5test)
20162 ("python-nose" ,python-nose)))
20163 (home-page "https://github.com/pythongssapi/python-gssapi")
20164 (synopsis "Python GSSAPI Wrapper")
20165 (description
20166 "Python-GSSAPI provides both low-level and high level wrappers around the
20167 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
20168 also be useable with other GSSAPI mechanisms.")
20169 (license license:isc)))
20170
20171 (define-public python-check-manifest
20172 (package
20173 (name "python-check-manifest")
20174 (version "0.37")
20175 (source
20176 (origin
20177 (method url-fetch)
20178 (uri (pypi-uri "check-manifest" version))
20179 (sha256
20180 (base32
20181 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
20182 (build-system python-build-system)
20183 (native-inputs
20184 `(("python-mock" ,python-mock)
20185 ("git" ,git)))
20186 (home-page "https://github.com/mgedmin/check-manifest")
20187 (synopsis "Check MANIFEST.in in a Python source package for completeness")
20188 (description "Python package can include a MANIFEST.in file to help with
20189 sending package files to the Python Package Index. This package checks that
20190 file to ensure it completely and accurately describes your project.")
20191 (license license:expat)))
20192
20193 (define-public python-android-stringslib
20194 (package
20195 (name "python-android-stringslib")
20196 (version "0.1.2")
20197 (source
20198 (origin
20199 (method git-fetch)
20200 (uri (git-reference
20201 (url "https://framagit.org/tyreunom/python-android-strings-lib")
20202 (commit (string-append "v" version))))
20203 (file-name (git-file-name name version))
20204 (sha256
20205 (base32
20206 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
20207 (build-system python-build-system)
20208 (arguments
20209 `(#:tests? #f))
20210 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
20211 (synopsis "Android strings.xml support")
20212 (description "Android Strings Lib provides support for android's strings.xml
20213 files. These files are used to translate strings in android apps.")
20214 (license license:expat)))
20215
20216 (define-public python-watchdog
20217 (package
20218 (name "python-watchdog")
20219 (version "0.9.0")
20220 (source
20221 (origin
20222 (method url-fetch)
20223 (uri (pypi-uri "watchdog" version))
20224 (sha256
20225 (base32
20226 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
20227 (build-system python-build-system)
20228 (arguments
20229 `(#:phases
20230 (modify-phases %standard-phases
20231 (add-before 'check 'remove-failing
20232 (lambda _
20233 (delete-file "tests/test_inotify_buffer.py")
20234 (delete-file "tests/test_snapshot_diff.py")
20235 #t)))))
20236 (propagated-inputs
20237 `(("python-argh" ,python-argh)
20238 ("python-pathtools" ,python-pathtools)
20239 ("python-pyyaml" ,python-pyyaml)))
20240 (native-inputs
20241 `(("python-pytest-cov" ,python-pytest-cov)
20242 ("python-pytest-timeout" ,python-pytest-timeout)))
20243 (home-page "https://github.com/gorakhargosh/watchdog")
20244 (synopsis "Filesystem events monitoring")
20245 (description "This package provides a way to monitor filesystem events
20246 such as a file modification and trigger an action. This is similar to inotify,
20247 but portable.")
20248 (license license:asl2.0)))
20249
20250 (define-public python-wget
20251 (package
20252 (name "python-wget")
20253 (version "3.2")
20254 (source
20255 (origin
20256 (method url-fetch)
20257 (uri (pypi-uri "wget" version ".zip"))
20258 (sha256
20259 (base32
20260 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
20261 (build-system python-build-system)
20262 (native-inputs `(("unzip" ,unzip)))
20263 (home-page "https://bitbucket.org/techtonik/python-wget/")
20264 (synopsis "Pure Python download utility")
20265 (description "The python-wget library provides an API to download files
20266 with features similar to the @command{wget} utility.")
20267 (license license:unlicense)))
20268
20269 (define-public offlate
20270 (package
20271 (name "offlate")
20272 (version "0.5")
20273 (source
20274 (origin
20275 (method git-fetch)
20276 (uri (git-reference
20277 (url "https://framagit.org/tyreunom/offlate")
20278 (commit version)))
20279 (file-name (git-file-name name version))
20280 (sha256
20281 (base32
20282 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
20283 (build-system python-build-system)
20284 (arguments
20285 ;; No tests
20286 `(#:tests? #f))
20287 (propagated-inputs
20288 `(("python-android-stringslib" ,python-android-stringslib)
20289 ("python-dateutil" ,python-dateutil)
20290 ("python-gitlab" ,python-gitlab)
20291 ("python-lxml" ,python-lxml)
20292 ("python-polib" ,python-polib)
20293 ("python-pyenchant" ,python-pyenchant)
20294 ("python-pygit2" ,python-pygit2)
20295 ("python-pygithub" ,python-pygithub)
20296 ("python-pyqt" ,python-pyqt)
20297 ("python-requests" ,python-requests)
20298 ("python-ruamel.yaml" ,python-ruamel.yaml)
20299 ("python-translation-finder" ,python-translation-finder)
20300 ("python-watchdog" ,python-watchdog)))
20301 (native-inputs
20302 `(("qttools" ,qttools)))
20303 (home-page "https://framagit.org/tyreunom/offlate")
20304 (synopsis "Offline translation interface for online translation tools")
20305 (description "Offlate offers a unified interface for different translation
20306 file formats, as well as many different online translation platforms. You can
20307 use it to get work from online platforms, specialized such as the Translation
20308 Project, or not such a gitlab instance when your upstream doesn't use any
20309 dedicated platform. The tool proposes a unified interface for any format and
20310 an upload option to send your work back to the platform.")
20311 (license license:gpl3+)))
20312
20313 (define-public python-titlecase
20314 (package
20315 (name "python-titlecase")
20316 (version "0.12.0")
20317 (source
20318 (origin
20319 (method url-fetch)
20320 (uri (pypi-uri "titlecase" version))
20321 (sha256
20322 (base32
20323 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
20324 (build-system python-build-system)
20325 (native-inputs
20326 `(("python-nose" ,python-nose)))
20327 (home-page "https://github.com/ppannuto/python-titlecase")
20328 (synopsis "Capitalize strings similar to book titles")
20329 (description
20330 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
20331 It capitalizes (predominantly English) strings in a way that is similar to
20332 book titles, using the New York Times Manual of Style to leave certain words
20333 lowercase.")
20334 (license license:expat)))
20335
20336 (define-public python-pypng
20337 (package
20338 (name "python-pypng")
20339 (version "0.0.20")
20340 (source
20341 (origin
20342 (method url-fetch)
20343 (uri (pypi-uri "pypng" version))
20344 (sha256
20345 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
20346 (build-system python-build-system)
20347 (home-page "https://github.com/drj11/pypng")
20348 (synopsis "Pure Python PNG image encoder/decoder")
20349 (description
20350 "The PyPNG module implements support for PNG images. It reads and writes
20351 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
20352 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
20353 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
20354 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
20355 A number of optional chunks can be specified (when writing) and
20356 understood (when reading): tRNS, bKGD, gAMA.
20357
20358 PyPNG is not a high level toolkit for image processing (like PIL) and does not
20359 aim at being a replacement or competitor. Its strength lies in fine-grained
20360 extensive support of PNG features. It can also read and write Netpbm PAM
20361 files, with a focus on its use as an intermediate format for implementing
20362 custom PNG processing.")
20363 (license license:expat)))
20364
20365 (define-public python-fuzzywuzzy
20366 (package
20367 (name "python-fuzzywuzzy")
20368 (version "0.18.0")
20369 (source
20370 (origin
20371 (method url-fetch)
20372 (uri (pypi-uri "fuzzywuzzy" version))
20373 (sha256
20374 (base32
20375 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
20376 (build-system python-build-system)
20377 (native-inputs
20378 `(("python-hypothesis" ,python-hypothesis)
20379 ("python-pycodestyle" ,python-pycodestyle)
20380 ("python-pytest" ,python-pytest)))
20381 (propagated-inputs
20382 `(("python-levenshtein" ,python-levenshtein)))
20383 (home-page "https://github.com/seatgeek/fuzzywuzzy")
20384 (synopsis "Fuzzy string matching in Python")
20385 (description "Approximate string matching using
20386 @emph{Levenshtein Distance} to calculate the differences between
20387 sequences.")
20388 (license license:gpl2)))
20389
20390 (define-public python2-fuzzywuzzy
20391 (package-with-python2 python-fuzzywuzzy))
20392
20393 (define-public python-block-tracing
20394 (package
20395 (name "python-block-tracing")
20396 (version "1.0.1")
20397 (source
20398 (origin
20399 (method url-fetch)
20400 (uri (pypi-uri "block_tracing" version))
20401 (sha256
20402 (base32
20403 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
20404 (build-system python-build-system)
20405 (arguments '(#:tests? #f)) ; no tests
20406 (home-page "https://github.com/rianhunter/block_tracing")
20407 (synopsis "Protect process memory")
20408 (description
20409 "@code{block_tracing} is a tiny Python library that can be used to
20410 prevent debuggers and other applications from inspecting the memory within
20411 your process.")
20412 (license license:expat)))
20413
20414 (define-public python-gcovr
20415 (package
20416 (name "python-gcovr")
20417 (version "4.2")
20418 (source
20419 (origin
20420 (method url-fetch)
20421 (uri (pypi-uri "gcovr" version))
20422 (sha256
20423 (base32
20424 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
20425 (build-system python-build-system)
20426 (propagated-inputs
20427 `(("python-lxml" ,python-lxml)
20428 ("python-jinja2" ,python-jinja2)))
20429 (home-page "https://gcovr.com/")
20430 (synopsis "Utility for generating code coverage results")
20431 (description
20432 "Gcovr provides a utility for managing the use of the GNU gcov
20433 utility and generating summarized code coverage results. It is inspired
20434 by the Python coverage.py package, which provides a similar utility for
20435 Python.")
20436 (license license:bsd-3)))
20437
20438 (define-public python-owslib
20439 (package
20440 (name "python-owslib")
20441 (version "0.19.2")
20442 (source
20443 (origin
20444 (method url-fetch)
20445 (uri (pypi-uri "OWSLib" version))
20446 (sha256
20447 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
20448 (build-system python-build-system)
20449 (arguments
20450 '(#:tests? #f)) ; TODO: package dependencies required for tests.
20451 (synopsis "Interface for Open Geospatial Consortium web service")
20452 (description
20453 "OWSLib is a Python package for client programming with Open Geospatial
20454 Consortium (OGC) web service (hence OWS) interface standards, and their related
20455 content models.")
20456 (home-page "https://geopython.github.io/OWSLib/")
20457 (license license:bsd-3)))
20458
20459 (define-public python-docusign-esign
20460 (package
20461 (name "python-docusign-esign")
20462 (version "3.1.0")
20463 (source (origin
20464 (method url-fetch)
20465 (uri (pypi-uri "docusign_esign" version))
20466 (sha256
20467 (base32
20468 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
20469 (build-system python-build-system)
20470 ;; Testing requires undocumented setup changes, and so testing is disabled here.
20471 (arguments `(#:tests? #f))
20472 (propagated-inputs
20473 `(("python-certifi", python-certifi)
20474 ("python-six", python-six)
20475 ("python-dateutil", python-dateutil)
20476 ("python-urllib3", python-urllib3)
20477 ("python-pyjwt", python-pyjwt)
20478 ("python-cryptography", python-cryptography)
20479 ("python-nose", python-nose)))
20480 (synopsis "DocuSign Python Client")
20481 (description "The Official DocuSign Python Client Library used to interact
20482 with the eSign REST API. Send, sign, and approve documents using this client.")
20483 (home-page "https://www.docusign.com/devcenter")
20484 (license license:expat)))
20485
20486 (define-public python-xattr
20487 (package
20488 (name "python-xattr")
20489 (version "0.9.7")
20490 (source
20491 (origin
20492 (method url-fetch)
20493 (uri (pypi-uri "xattr" version))
20494 (sha256
20495 (base32
20496 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
20497 (build-system python-build-system)
20498 (propagated-inputs
20499 `(("python-cffi" ,python-cffi)))
20500 (home-page "https://github.com/xattr/xattr")
20501 (synopsis
20502 "Python wrapper for extended filesystem attributes")
20503 (description "This package provides a Python wrapper for using extended
20504 filesystem attributes. Extended attributes extend the basic attributes of files
20505 and directories in the file system. They are stored as name:data pairs
20506 associated with file system objects (files, directories, symlinks, etc).")
20507 (license license:expat)))
20508
20509 (define-public python-json-logger
20510 (package
20511 (name "python-json-logger")
20512 (version "0.1.11")
20513 (source
20514 (origin
20515 (method url-fetch)
20516 (uri (pypi-uri "python-json-logger" version))
20517 (sha256
20518 (base32
20519 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
20520 (build-system python-build-system)
20521 (home-page
20522 "https://github.com/madzak/python-json-logger")
20523 (synopsis "JSON log formatter in Python")
20524 (description "This library allows standard Python logging to output log data
20525 as JSON objects. With JSON we can make our logs more readable by machines and
20526 we can stop writing custom parsers for syslog-type records.")
20527 (license license:bsd-3)))
20528
20529 (define-public python-daiquiri
20530 (package
20531 (name "python-daiquiri")
20532 (version "2.1.1")
20533 (source
20534 (origin
20535 (method url-fetch)
20536 (uri (pypi-uri "daiquiri" version))
20537 (sha256
20538 (base32
20539 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
20540 (build-system python-build-system)
20541 (propagated-inputs
20542 `(("python-json-logger" ,python-json-logger)))
20543 (native-inputs
20544 `(("python-mock" ,python-mock)
20545 ("python-pytest" ,python-pytest)
20546 ("python-setuptools-scm" ,python-setuptools-scm)
20547 ("python-six" ,python-six)))
20548 (home-page "https://github.com/jd/daiquiri")
20549 (synopsis
20550 "Library to configure Python logging easily")
20551 (description "The daiquiri library provides an easy way to configure
20552 logging in Python. It also provides some custom formatters and handlers.")
20553 (license license:asl2.0)))
20554
20555 (define-public python-pifpaf
20556 (package
20557 (name "python-pifpaf")
20558 (version "2.5.0")
20559 (source
20560 (origin
20561 (method url-fetch)
20562 (uri (pypi-uri "pifpaf" version))
20563 (sha256
20564 (base32
20565 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
20566 (build-system python-build-system)
20567 (arguments
20568 '(#:phases
20569 (modify-phases %standard-phases
20570 (replace 'check
20571 (lambda _
20572 (invoke "python" "setup.py" "testr" "--slowest"
20573 "--testr-args=until-failure"))))))
20574 (propagated-inputs
20575 `(("python-click" ,python-click)
20576 ("python-daiquiri" ,python-daiquiri)
20577 ("python-fixtures" ,python-fixtures)
20578 ("python-jinja2" ,python-jinja2)
20579 ("python-pbr" ,python-pbr)
20580 ("python-psutil" ,python-psutil)
20581 ("python-six" ,python-six)
20582 ("python-xattr" ,python-xattr)))
20583 (native-inputs
20584 `(("python-mock" ,python-mock)
20585 ("python-os-testr" ,python-os-testr)
20586 ("python-requests" ,python-requests)
20587 ("python-testrepository" ,python-testrepository)
20588 ("python-testtools" ,python-testtools)))
20589 (home-page "https://github.com/jd/pifpaf")
20590 (synopsis "Tools and fixtures to manage daemons for testing in Python")
20591 (description "Pifpaf is a suite of fixtures and a command-line tool that
20592 starts and stops daemons for a quick throw-away usage. This is typically
20593 useful when needing these daemons to run integration testing. It originally
20594 evolved from its precursor @code{overtest}.")
20595 (license license:asl2.0)))
20596
20597 (define-public python-pytest-check-links
20598 (package
20599 (name "python-pytest-check-links")
20600 (version "0.3.0")
20601 (source
20602 (origin
20603 (method url-fetch)
20604 ;; URI uses underscores
20605 (uri (pypi-uri "pytest_check_links" version))
20606 (sha256
20607 (base32
20608 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
20609 (build-system python-build-system)
20610 (propagated-inputs
20611 `(("python-docutils" ,python-docutils)
20612 ("python-html5lib" ,python-html5lib)
20613 ("python-nbconvert" ,python-nbconvert)
20614 ("python-nbformat" ,python-nbformat)
20615 ("python-pytest" ,python-pytest)
20616 ("python-six" ,python-six)))
20617 (native-inputs
20618 `(("python-pbr-minimal" ,python-pbr-minimal)))
20619 (home-page "https://github.com/minrk/pytest-check-links")
20620 (synopsis "Check links in files")
20621 (description "This package provides a pytest plugin that checks URLs for
20622 HTML-containing files.")
20623 (license license:bsd-3)))
20624
20625 (define-public python-json5
20626 (package
20627 (name "python-json5")
20628 (version "0.8.5")
20629 (source
20630 (origin
20631 ;; sample.json5 is missing from PyPi source tarball
20632 (method git-fetch)
20633 (uri (git-reference
20634 (url "https://github.com/dpranke/pyjson5")
20635 (commit (string-append "v" version))))
20636 (file-name (git-file-name name version))
20637 (sha256
20638 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
20639 (build-system python-build-system)
20640 (home-page "https://github.com/dpranke/pyjson5")
20641 (synopsis
20642 "Python implementation of the JSON5 data format")
20643 (description
20644 "JSON5 extends the JSON data interchange format to make it slightly more
20645 usable as a configuration language. This Python package implements parsing and
20646 dumping of JSON5 data structures.")
20647 (license license:asl2.0)))
20648
20649 (define-public python-frozendict
20650 (package
20651 (name "python-frozendict")
20652 (version "1.2")
20653 (source
20654 (origin
20655 (method url-fetch)
20656 (uri (pypi-uri "frozendict" version))
20657 (sha256
20658 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
20659 (build-system python-build-system)
20660 (home-page "https://github.com/slezica/python-frozendict")
20661 (synopsis "Simple immutable mapping for Python")
20662 (description
20663 "@dfn{frozendict} is an immutable wrapper around dictionaries that
20664 implements the complete mapping interface. It can be used as a drop-in
20665 replacement for dictionaries where immutability is desired.")
20666 (license license:expat)))
20667
20668 (define-public python-unpaddedbase64
20669 (package
20670 (name "python-unpaddedbase64")
20671 (version "1.1.0")
20672 (source
20673 (origin
20674 (method git-fetch)
20675 (uri (git-reference
20676 (url "https://github.com/matrix-org/python-unpaddedbase64")
20677 (commit (string-append "v" version))))
20678 (file-name (git-file-name name version))
20679 (sha256
20680 (base32
20681 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
20682 (build-system python-build-system)
20683 (home-page "https://pypi.org/project/unpaddedbase64/")
20684 (synopsis "Encode and decode Base64 without “=” padding")
20685 (description
20686 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
20687 using “=” characters. However this conveys no benefit so many protocols
20688 choose to use Base64 without the “=” padding.")
20689 (license license:asl2.0)))
20690
20691 (define-public python-py-cpuinfo
20692 (package
20693 (name "python-py-cpuinfo")
20694 (version "5.0.0")
20695 (source
20696 (origin
20697 (method url-fetch)
20698 (uri (pypi-uri "py-cpuinfo" version))
20699 (sha256
20700 (base32
20701 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
20702 (build-system python-build-system)
20703 (home-page "https://github.com/workhorsy/py-cpuinfo")
20704 (synopsis "Get CPU info with Python")
20705 (description
20706 "This Python module returns the CPU info by using the best sources of
20707 information for your operating system.")
20708 (license license:expat)))
20709
20710 (define-public python-canonicaljson
20711 (package
20712 (name "python-canonicaljson")
20713 (version "1.1.4")
20714 (source
20715 (origin
20716 (method url-fetch)
20717 (uri (pypi-uri "canonicaljson" version))
20718 (sha256
20719 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
20720 (build-system python-build-system)
20721 (propagated-inputs
20722 `(("python-six" ,python-six)
20723 ("python-frozendict" ,python-frozendict)
20724 ("python-simplejson" ,python-simplejson)))
20725 (home-page "https://github.com/matrix-org/python-canonicaljson")
20726 (synopsis "Canonical JSON")
20727 (description
20728 "Deterministically encode JSON.
20729
20730 @itemize
20731 @item Encodes objects and arrays as RFC 7159 JSON.
20732 @item Sorts object keys so that you get the same result each time.
20733 @item Has no insignificant whitespace to make the output as small as possible.
20734 @item Escapes only the characters that must be escaped, U+0000 to
20735 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
20736 @item Uses the shortest escape sequence for each escaped character.
20737 @item Encodes the JSON as UTF-8.
20738 @item Can encode frozendict immutable dictionaries.
20739 @end itemize")
20740 (license license:asl2.0)))
20741
20742 (define-public python-signedjson
20743 (package
20744 (name "python-signedjson")
20745 (version "1.1.1")
20746 (source
20747 (origin
20748 (method url-fetch)
20749 (uri (pypi-uri "signedjson" version))
20750 (sha256
20751 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
20752 (build-system python-build-system)
20753 (propagated-inputs
20754 `(("python-canonicaljson" ,python-canonicaljson)
20755 ("python-importlib-metadata" ,python-importlib-metadata)
20756 ("python-pynacl" ,python-pynacl)
20757 ("python-typing-extensions" ,python-typing-extensions)
20758 ("python-unpaddedbase64" ,python-unpaddedbase64)))
20759 (native-inputs
20760 `(("python-setuptools-scm" ,python-setuptools-scm)))
20761 (home-page "https://github.com/matrix-org/python-signedjson")
20762 (synopsis "Sign JSON objects with ED25519 signatures")
20763 (description
20764 "Sign JSON objects with ED25519 signatures.
20765
20766 @itemize
20767 @item More than one entity can sign the same object.
20768 @item Each entity can sign the object with more than one key making it easier to
20769 rotate keys
20770 @item ED25519 can be replaced with a different algorithm.
20771 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
20772 key.
20773 @end itemize")
20774 (license license:asl2.0)))
20775
20776 (define-public python-daemonize
20777 (package
20778 (name "python-daemonize")
20779 (version "2.5.0")
20780 (source
20781 (origin
20782 (method url-fetch)
20783 (uri (pypi-uri "daemonize" version))
20784 (sha256
20785 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
20786 (build-system python-build-system)
20787 (home-page "https://github.com/thesharp/daemonize")
20788 (synopsis "Library for writing system daemons in Python")
20789 (description "Daemonize is a library for writing system daemons in Python.")
20790 (license license:expat)))
20791
20792 (define-public python-pymacaroons
20793 (package
20794 (name "python-pymacaroons")
20795 (version "0.13.0")
20796 (source
20797 (origin
20798 (method url-fetch)
20799 (uri (pypi-uri "pymacaroons" version))
20800 (sha256
20801 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
20802 (build-system python-build-system)
20803 (propagated-inputs
20804 `(("python-six" ,python-six)
20805 ("python-pynacl" ,python-pynacl)))
20806 (home-page "https://github.com/ecordell/pymacaroons")
20807 (synopsis "Python Macaroon Library")
20808 (description
20809 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
20810 tokens, macaroons embed caveats that define specific authorization
20811 requirements for the target service, the service that issued the root macaroon
20812 and which is capable of verifying the integrity of macaroons it receives.
20813
20814 Macaroons allow for delegation and attenuation of authorization. They are
20815 simple and fast to verify, and decouple authorization policy from the
20816 enforcement of that policy.")
20817 (license license:expat)))
20818
20819 (define-public python-ldap3
20820 (package
20821 (name "python-ldap3")
20822 (version "2.7")
20823 (home-page "https://github.com/cannatag/ldap3")
20824 (source
20825 (origin
20826 (method git-fetch)
20827 (uri (git-reference (url home-page)
20828 (commit (string-append "v" version))))
20829 (file-name (git-file-name name version))
20830 (sha256
20831 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
20832 (build-system python-build-system)
20833 (arguments
20834 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
20835 #:phases (modify-phases %standard-phases
20836 (replace 'check
20837 (lambda* (#:key tests? #:allow-other-keys)
20838 (when tests?
20839 (invoke "nosetests" "-s" "test"))
20840 #t)))))
20841 (native-inputs
20842 `(("python-nose" ,python-nose)))
20843 (propagated-inputs
20844 `(("python-gssapi" ,python-gssapi)
20845 ("python-pyasn1" ,python-pyasn1)))
20846 (synopsis "Python LDAP client")
20847 (description
20848 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
20849 library.")
20850 (license license:lgpl3+)))
20851
20852 (define-public python-boltons
20853 (package
20854 (name "python-boltons")
20855 (version "20.0.0")
20856 (source
20857 (origin
20858 (method url-fetch)
20859 (uri (pypi-uri "boltons" version))
20860 (sha256
20861 (base32
20862 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
20863 (build-system python-build-system)
20864 (home-page "https://github.com/mahmoud/boltons")
20865 (synopsis "Extensions to the Python standard library")
20866 (description
20867 "Boltons is a set of over 230 pure-Python utilities in the same spirit
20868 as — and yet conspicuously missing from — the standard library, including:
20869
20870 @itemize
20871 @item Atomic file saving, bolted on with fileutils
20872 @item A highly-optimized OrderedMultiDict, in dictutils
20873 @item Two types of PriorityQueue, in queueutils
20874 @item Chunked and windowed iteration, in iterutils
20875 @item Recursive data structure iteration and merging, with iterutils.remap
20876 @item Exponential backoff functionality, including jitter, through
20877 iterutils.backoff
20878 @item A full-featured TracebackInfo type, for representing stack traces, in
20879 tbutils
20880 @end itemize")
20881 (license license:bsd-3)))
20882
20883 (define-public python-eliot
20884 (package
20885 (name "python-eliot")
20886 (version "1.12.0")
20887 (source
20888 (origin
20889 (method url-fetch)
20890 (uri (pypi-uri "eliot" version))
20891 (sha256
20892 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
20893 (build-system python-build-system)
20894 (arguments
20895 `(#:phases
20896 (modify-phases %standard-phases
20897 (add-after 'unpack 'remove-journald-support
20898 (lambda _
20899 (for-each delete-file
20900 '("eliot/tests/test_journald.py"
20901 "eliot/journald.py"))
20902 #t))
20903 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
20904 ;; remove command-line tool's tests. TODO eliot-prettyprint should
20905 ;; be installed and these tests should pass.
20906 (lambda _
20907 (delete-file "eliot/tests/test_prettyprint.py")
20908 #t)))))
20909 (propagated-inputs
20910 `(("python-boltons" ,python-boltons)
20911 ("python-pyrsistent" ,python-pyrsistent)
20912 ("python-six" ,python-six)
20913 ("python-zope-interface" ,python-zope-interface)))
20914 (native-inputs
20915 `(("python-black" ,python-black)
20916 ("python-coverage" ,python-coverage)
20917 ("python-dask" ,python-dask)
20918 ("python-flake8" ,python-flake8)
20919 ("python-hypothesis" ,python-hypothesis)
20920 ("python-pytest" ,python-pytest)
20921 ("python-setuptools" ,python-setuptools)
20922 ("python-sphinx" ,python-sphinx)
20923 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
20924 ("python-testtools" ,python-testtools)
20925 ("python-twine" ,python-twine)
20926 ("python-twisted" ,python-twisted)))
20927 (home-page "https://github.com/itamarst/eliot/")
20928 (synopsis "Eliot: the logging system that tells you why it happened")
20929 (description
20930 "@dfn{eliot} is a Python logging system that outputs causal chains of
20931 actions: actions can spawn other actions, and eventually they either succeed
20932 or fail. The resulting logs tell you the story of what your software did: what
20933 happened, and what caused it.")
20934 (license license:asl2.0)))
20935
20936 (define-public python-pem
20937 (package
20938 (name "python-pem")
20939 (version "20.1.0")
20940 (source
20941 (origin
20942 (method url-fetch)
20943 (uri (pypi-uri "pem" version))
20944 (sha256
20945 (base32
20946 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
20947 (build-system python-build-system)
20948 (native-inputs
20949 `(("python-certifi" ,python-certifi)
20950 ("python-coverage" ,python-coverage)
20951 ("python-pretend" ,python-pretend)
20952 ("python-pyopenssl" ,python-pyopenssl)
20953 ("python-pytest" ,python-pytest)
20954 ("python-sphinx" ,python-sphinx)
20955 ("python-twisted" ,python-twisted)))
20956 (home-page "https://pem.readthedocs.io/")
20957 (synopsis "Easy PEM file parsing in Python")
20958 (description
20959 "This package provides a Python module for parsing and splitting PEM files.")
20960 (license license:expat)))
20961
20962 (define-public python-txsni
20963 ;; We need a few commits on top of 0.1.9 for compatibility with newer
20964 ;; Python and OpenSSL.
20965 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
20966 (revision "0"))
20967 (package
20968 (name "python-txsni")
20969 (version (git-version "0.1.9" revision commit))
20970 (home-page "https://github.com/glyph/txsni")
20971 (source
20972 (origin
20973 (method git-fetch)
20974 (uri (git-reference (url home-page) (commit commit)))
20975 (file-name (git-file-name name version))
20976 (sha256
20977 (base32
20978 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
20979 (build-system python-build-system)
20980 (propagated-inputs
20981 `(("python-pyopenssl" ,python-pyopenssl)
20982 ("python-service-identity" ,python-service-identity)
20983 ("python-twisted" ,python-twisted)))
20984 (synopsis "Run TLS servers with Twisted")
20985 (description
20986 "This package provides an easy-to-use SNI endpoint for use
20987 with the Twisted web framework.")
20988 (license license:expat))))
20989
20990 (define-public python-txacme
20991 (package
20992 (name "python-txacme")
20993 (version "0.9.2")
20994 (source
20995 (origin
20996 (method url-fetch)
20997 (uri (pypi-uri "txacme" version))
20998 (sha256
20999 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
21000 (build-system python-build-system)
21001 (propagated-inputs
21002 `(("python-acme" ,python-acme)
21003 ("python-attrs" ,python-attrs)
21004 ("python-eliot" ,python-eliot)
21005 ("python-josepy" ,python-josepy)
21006 ("python-pem" ,python-pem)
21007 ("python-treq" ,python-treq)
21008 ("python-twisted" ,python-twisted)
21009 ("python-txsni" ,python-txsni)))
21010 (native-inputs
21011 `(("python-fixtures" ,python-fixtures)
21012 ("python-hypothesis" ,python-hypothesis)
21013 ("python-mock" ,python-mock)
21014 ("python-service-identity"
21015 ,python-service-identity)
21016 ("python-testrepository" ,python-testrepository)
21017 ("python-testscenarios" ,python-testscenarios)
21018 ("python-testtools" ,python-testtools)))
21019 (home-page "https://github.com/twisted/txacme")
21020 (synopsis "Twisted implexmentation of the ACME protocol")
21021 (description
21022 "ACME is Automatic Certificate Management Environment, a protocol that
21023 allows clients and certificate authorities to automate verification and
21024 certificate issuance. The ACME protocol is used by the free Let's Encrypt
21025 Certificate Authority.
21026
21027 txacme is an implementation of the protocol for Twisted, the event-driven
21028 networking engine for Python.")
21029 (license license:expat)))
21030
21031 (define-public python-pysaml2
21032 (package
21033 (name "python-pysaml2")
21034 (version "5.0.0")
21035 (source
21036 (origin
21037 (method url-fetch)
21038 (uri (pypi-uri "pysaml2" version))
21039 (sha256
21040 (base32
21041 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
21042 (build-system python-build-system)
21043 (propagated-inputs
21044 `(("python-cryptography" ,python-cryptography)
21045 ("python-dateutil" ,python-dateutil)
21046 ("python-defusedxml" ,python-defusedxml)
21047 ("python-pyopenssl" ,python-pyopenssl)
21048 ("python-pytz" ,python-pytz)
21049 ("python-requests" ,python-requests)
21050 ("python-six" ,python-six)))
21051 (home-page "https://idpy.org")
21052 (synopsis "Python implementation of SAML Version 2 Standard")
21053 (description
21054 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
21055 It contains all necessary pieces for building a SAML2 service provider or
21056 an identity provider. The distribution contains examples of both.
21057
21058 This package was originally written to work in a WSGI environment, but
21059 there are extensions that allow you to use it with other frameworks.")
21060 (license license:asl2.0)))
21061
21062 (define-public python-click-plugins
21063 (package
21064 (name "python-click-plugins")
21065 (version "1.1.1")
21066 (source
21067 (origin
21068 (method url-fetch)
21069 (uri (pypi-uri "click-plugins" version))
21070 (sha256
21071 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
21072 (build-system python-build-system)
21073 (native-inputs
21074 `(("python-pytest" ,python-pytest)))
21075 (propagated-inputs
21076 `(("python-click" ,python-click)))
21077 (synopsis "Extension for Click to register external CLI commands")
21078 (description "This package provides n extension module for Click to
21079 register external CLI commands via setuptools entry-points.")
21080 (home-page "https://github.com/click-contrib/click-plugins")
21081 (license license:bsd-3)))
21082
21083 (define-public python-diceware
21084 (package
21085 (name "python-diceware")
21086 (version "0.9.6")
21087 (source
21088 (origin
21089 (method url-fetch)
21090 (uri (pypi-uri "diceware" version))
21091 (sha256
21092 (base32
21093 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
21094 (build-system python-build-system)
21095 (native-inputs
21096 `(("python-coverage" ,python-coverage)
21097 ("python-pytest" ,python-pytest)
21098 ("python-pytest-runner" ,python-pytest-runner)))
21099 (home-page "https://github.com/ulif/diceware/")
21100 (synopsis "Generates memorable passphrases")
21101 (description "This package generates passphrases by concatenating words
21102 randomly picked from wordlists. It supports several sources of
21103 randomness (including real life dice) and different wordlists (including
21104 cryptographically signed ones).")
21105 (license license:gpl3+)))
21106
21107 (define-public pyzo
21108 (package
21109 (name "pyzo")
21110 (version "4.10.2")
21111 (source
21112 (origin
21113 (method url-fetch)
21114 (uri (pypi-uri "pyzo" version))
21115 (sha256
21116 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
21117 (build-system python-build-system)
21118 (arguments
21119 `(#:phases
21120 (modify-phases %standard-phases
21121 (add-before 'check 'fix-home-directory
21122 (lambda _
21123 ;; Tests fail with "Permission denied: '/homeless-shelter'".
21124 (setenv "HOME" "/tmp")
21125 #t)))
21126 ;; Tests fail with "Uncaught Python exception: invalid literal for
21127 ;; int() with base 10: 'test'".
21128 #:tests? #f))
21129 (propagated-inputs
21130 `(("python-pyqt" ,python-pyqt)))
21131 (home-page "https://pyzo.org")
21132 (synopsis
21133 "Python IDE for scientific computing")
21134 (description
21135 "Pyzo is a Python IDE focused on interactivity and introspection,
21136 which makes it very suitable for scientific computing. Its practical
21137 design is aimed at simplicity and efficiency.
21138
21139 It consists of two main components, the editor and the shell, and uses
21140 a set of pluggable tools to help the programmer in various ways. Some
21141 example tools are source structure, project manager, interactive help,
21142 workspace...")
21143 (license license:bsd-2)))
21144
21145 (define-public python-osc
21146 (package
21147 (name "python-osc")
21148 (version "1.7.4")
21149 (source
21150 (origin
21151 (method url-fetch)
21152 (uri (pypi-uri "python-osc" version))
21153 (sha256
21154 (base32
21155 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
21156 (build-system python-build-system)
21157 (home-page "https://github.com/attwad/python-osc")
21158 (synopsis "Open Sound Control server and client implementations")
21159 (description
21160 "@code{python-osc} is a pure Python library with no external
21161 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
21162 Open Sound Control 1.0} specification.")
21163 (license license:unlicense)))
21164
21165 (define-public python-voluptuous
21166 (package
21167 (name "python-voluptuous")
21168 (version "0.11.7")
21169 (source
21170 (origin
21171 (method url-fetch)
21172 (uri (pypi-uri "voluptuous" version))
21173 (sha256
21174 (base32
21175 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
21176 (build-system python-build-system)
21177 (native-inputs
21178 `(("python-nose" ,python-nose)))
21179 (home-page "https://github.com/alecthomas/voluptuous")
21180 (synopsis "Python data validation library")
21181 (description
21182 "Voluptuous is a Python data validation library. It is primarily
21183 intended for validating data coming into Python as JSON, YAML, etc.")
21184 (license license:bsd-3)))
21185
21186 (define-public python-cmd2
21187 (package
21188 (name "python-cmd2")
21189 (version "1.0.2")
21190 (source
21191 (origin
21192 (method url-fetch)
21193 (uri (pypi-uri "cmd2" version))
21194 (sha256
21195 (base32
21196 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
21197 (build-system python-build-system)
21198 (propagated-inputs
21199 `(("python-attrs" ,python-attrs)
21200 ("python-colorama" ,python-colorama)
21201 ("python-pyperclip" ,python-pyperclip)
21202 ("python-wcwidth" ,python-wcwidth)))
21203 (native-inputs
21204 `(("python-codecov" ,python-codecov)
21205 ("python-coverage" ,python-coverage)
21206 ("python-doc8" ,python-doc8)
21207 ("python-flake8" ,python-flake8)
21208 ("python-invoke" ,python-invoke)
21209 ("python-mock" ,python-mock)
21210 ("python-pytest" ,python-pytest)
21211 ("python-pytest-cov" ,python-pytest-cov)
21212 ("python-pytest-mock" ,python-pytest-mock)
21213 ("python-setuptools-scm" ,python-setuptools-scm)
21214 ("python-sphinx" ,python-sphinx)
21215 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
21216 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21217 ("python-tox" ,python-tox)
21218 ("python-twine" ,python-twine)
21219 ("which" ,which)))
21220 (home-page "https://github.com/python-cmd2/cmd2")
21221 (synopsis "Tool for building interactive command line applications")
21222 (description
21223 "Cmd2 is a tool for building interactive command line applications in
21224 Python. Its goal is to make it quick and easy for developers to build
21225 feature-rich and user-friendly interactive command line applications. It
21226 provides a simple API which is an extension of Python's built-in @code{cmd}
21227 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
21228 make your life easier and eliminates much of the boilerplate code which would
21229 be necessary when using @code{cmd}.")
21230 (license license:expat)))
21231
21232 (define-public python-pytidylib
21233 (package
21234 (name "python-pytidylib")
21235 (version "0.3.2")
21236 (source (origin
21237 (method url-fetch)
21238 (uri (pypi-uri "pytidylib" version))
21239 (sha256
21240 (base32
21241 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
21242 (build-system python-build-system)
21243 (arguments
21244 '(#:phases
21245 (modify-phases %standard-phases
21246 (add-before 'build 'qualify-libtidy
21247 (lambda* (#:key inputs #:allow-other-keys)
21248 (let ((libtidy (string-append (assoc-ref inputs "tidy")
21249 "/lib/libtidy.so")))
21250 (substitute* "tidylib/tidy.py"
21251 (("ctypes\\.util\\.find_library\\('tidy'\\)")
21252 (format #f "'~a'" libtidy)))
21253 #t))))))
21254 (inputs `(("tidy" ,tidy)))
21255 (home-page "https://github.com/countergram/pytidylib")
21256 (synopsis "Python wrapper for HTML Tidy library")
21257 (description
21258 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
21259 allows you, from Python code, to “fix” invalid (X)HTML markup.")
21260 (license license:expat)))
21261
21262 (define-public python2-pytidylib
21263 (package-with-python2 python-pytidylib))
21264
21265 (define-public python-mujson
21266 (package
21267 (name "python-mujson")
21268 (version "1.4")
21269 (source
21270 (origin
21271 (method url-fetch)
21272 (uri (pypi-uri "mujson" version))
21273 (sha256
21274 (base32
21275 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
21276 (build-system python-build-system)
21277 (home-page "https://github.com/mattgiles/mujson")
21278 (synopsis "Use the fastest JSON functions available at import time")
21279 (description "This packages selects the fastest JSON functions available
21280 at import time.")
21281 (license license:expat)))
21282
21283 (define-public python-bashlex
21284 (package
21285 (name "python-bashlex")
21286 (version "0.14")
21287 (source
21288 (origin
21289 (method url-fetch)
21290 (uri (pypi-uri "bashlex" version))
21291 (sha256
21292 (base32
21293 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
21294 (build-system python-build-system)
21295 (arguments
21296 `(#:phases
21297 (modify-phases %standard-phases
21298 (add-before 'build 'pregenerate-yacc-tables
21299 (lambda _
21300 ;; parser.py caches tables, which attempts to write to site lib
21301 ;; see https://github.com/idank/bashlex/issues/51
21302 (invoke "python" "-c" "import bashlex"))))))
21303 (home-page
21304 "https://github.com/idank/bashlex")
21305 (synopsis "Python parser for bash")
21306 (description "@code{bashlex} is a Python port of the parser used
21307 internally by GNU bash.
21308
21309 For the most part it's transliterated from C, the major differences are:
21310
21311 @itemize
21312 @item it does not execute anything
21313 @item it is reentrant
21314 @item it generates a complete AST
21315 @end itemize
21316 ")
21317 (license license:gpl3+)))
21318
21319 (define-public python-jinxed
21320 (package
21321 (name "python-jinxed")
21322 (version "1.0.0")
21323 (source
21324 (origin
21325 (method url-fetch)
21326 (uri (pypi-uri "jinxed" version))
21327 (sha256
21328 (base32
21329 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
21330 (build-system python-build-system)
21331 (arguments
21332 '(#:phases
21333 (modify-phases %standard-phases
21334 (add-before 'check 'set-environment-variables
21335 (lambda* (#:key inputs #:allow-other-keys)
21336 (let ((ncurses (assoc-ref inputs "ncurses")))
21337 (setenv "TERM" "LINUX")
21338 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
21339 #t))))
21340 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
21341 (native-inputs
21342 `(("ncurses" ,ncurses)))
21343 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
21344 (synopsis "Jinxed Terminal Library")
21345 (description
21346 "Jinxed is an implementation of a subset of the Python curses library.")
21347 (license license:mpl2.0)))
21348
21349 (define-public python-blessed
21350 (package
21351 (name "python-blessed")
21352 (version "1.17.8")
21353 (source
21354 (origin
21355 (method url-fetch)
21356 (uri (pypi-uri "blessed" version))
21357 (sha256
21358 (base32
21359 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
21360 (modules '((guix build utils)))
21361 (snippet
21362 '(begin
21363 ;; Don't get hung up on Windows test failures.
21364 (delete-file "blessed/win_terminal.py") #t))))
21365 (build-system python-build-system)
21366 (propagated-inputs
21367 `(("python-jinxed" ,python-jinxed)
21368 ("python-six" ,python-six)
21369 ("python-wcwidth" ,python-wcwidth)))
21370 (native-inputs
21371 `(("python-mock" ,python-mock)
21372 ("python-pytest" ,python-pytest)))
21373 (home-page "https://github.com/jquast/blessed")
21374 (synopsis "Wrapper around terminal capabilities")
21375 (description
21376 "Blessed is a thin, practical wrapper around terminal styling, screen
21377 positioning, and keyboard input.")
21378 (license license:expat)))
21379
21380 (define-public python-readme-renderer
21381 (package
21382 (name "python-readme-renderer")
21383 (version "26.0")
21384 (source
21385 (origin
21386 (method url-fetch)
21387 (uri (pypi-uri "readme_renderer" version))
21388 (sha256
21389 (base32
21390 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
21391 (build-system python-build-system)
21392 (propagated-inputs
21393 `(("python-bleach" ,python-bleach)
21394 ("python-docutils" ,python-docutils)
21395 ("python-pygments" ,python-pygments)
21396 ("python-six" ,python-six)))
21397 (native-inputs
21398 `(("python-mock" ,python-mock)
21399 ("python-pytest" ,python-pytest)))
21400 (home-page "https://github.com/pypa/readme_renderer")
21401 (synopsis "Render README files in Warehouse")
21402 (description
21403 "Readme Renderer is a library that will safely render arbitrary README
21404 files into HTML. It is designed to be used in Warehouse to render the
21405 @code{long_description} for packages. It can handle Markdown, reStructuredText,
21406 and plain text.")
21407 (license license:asl2.0)))
21408
21409 (define-public python-lazr-delegates
21410 (package
21411 (name "python-lazr-delegates")
21412 (version "2.0.4")
21413 (source
21414 (origin
21415 (method url-fetch)
21416 (uri (pypi-uri "lazr.delegates" version))
21417 (sha256
21418 (base32
21419 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
21420 (build-system python-build-system)
21421 (arguments
21422 '(#:phases
21423 (modify-phases %standard-phases
21424 (replace 'check
21425 (lambda _
21426 (invoke "python" "setup.py" "nosetests"))))))
21427 (native-inputs
21428 `(("python-nose" ,python-nose)))
21429 (propagated-inputs
21430 `(("python-zope-interface" ,python-zope-interface)))
21431 (home-page "https://launchpad.net/lazr.delegates")
21432 (synopsis "Easily write objects that delegate behavior")
21433 (description
21434 "The @code{lazr.delegates} package makes it easy to write objects that
21435 delegate behavior to another object. The new object adds some property or
21436 behavior on to the other object, while still providing the underlying interface,
21437 and delegating behavior.")
21438 (license license:lgpl3)))
21439
21440 (define-public python-lazr-config
21441 (package
21442 (name "python-lazr-config")
21443 (version "2.2.2")
21444 (source
21445 (origin
21446 (method url-fetch)
21447 (uri (pypi-uri "lazr.config" version))
21448 (sha256
21449 (base32
21450 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
21451 (build-system python-build-system)
21452 (arguments
21453 '(#:phases
21454 (modify-phases %standard-phases
21455 (replace 'check
21456 (lambda _
21457 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
21458 (native-inputs
21459 `(("python-nose" ,python-nose)))
21460 (propagated-inputs
21461 `(("python-lazr-delegates" ,python-lazr-delegates)
21462 ("python-zope-interface" ,python-zope-interface)))
21463 (home-page "https://launchpad.net/lazr.config")
21464 (synopsis "Create configuration schemas and process and validate configurations")
21465 (description
21466 "The LAZR config system is typically used to manage process configuration.
21467 Process configuration is for saying how things change when we run systems on
21468 different machines, or under different circumstances. This system uses ini-like
21469 file format of section, keys, and values. The config file supports inheritance
21470 to minimize duplication of information across files. The format supports schema
21471 validation.")
21472 (license license:lgpl3)))
21473
21474 (define-public python-flufl-bounce
21475 (package
21476 (name "python-flufl-bounce")
21477 (version "3.0.1")
21478 (source
21479 (origin
21480 (method url-fetch)
21481 (uri (pypi-uri "flufl.bounce" version))
21482 (sha256
21483 (base32
21484 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
21485 (build-system python-build-system)
21486 (propagated-inputs
21487 `(("python-atpublic" ,python-atpublic)
21488 ("python-zope-interface" ,python-zope-interface)))
21489 (native-inputs
21490 `(("python-nose2" ,python-nose2)))
21491 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
21492 (synopsis "Email bounce detectors")
21493 (description "The @code{flufl.bounce} library provides a set of heuristics
21494 and an API for detecting the original bouncing email addresses from a bounce
21495 message. Many formats found in the wild are supported, as are VERP and
21496 RFC 3464.")
21497 (license (list license:asl2.0
21498 license:lgpl3)))) ; only for setup_headers.py
21499
21500 (define-public python-flufl-i18n
21501 (package
21502 (name "python-flufl-i18n")
21503 (version "3.0")
21504 (source
21505 (origin
21506 (method url-fetch)
21507 (uri (pypi-uri "flufl.i18n" version))
21508 (sha256
21509 (base32
21510 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
21511 (build-system python-build-system)
21512 (propagated-inputs
21513 `(("python-atpublic" ,python-atpublic)))
21514 (home-page "https://flufli18n.readthedocs.io")
21515 (synopsis "API for Python internationalization")
21516 (description
21517 "This package provides a high level, convenient API for managing
21518 internationalization translation contexts in Python application. There is a
21519 simple API for single-context applications, such as command line scripts which
21520 only need to translate into one language during the entire course of thei
21521 execution. There is a more flexible, but still convenient API for multi-context
21522 applications, such as servers, which may need to switch language contexts for
21523 different tasks.")
21524 (license license:asl2.0)))
21525
21526 (define-public python-flufl-lock
21527 (package
21528 (name "python-flufl-lock")
21529 (version "4.0")
21530 (source
21531 (origin
21532 (method url-fetch)
21533 (uri (pypi-uri "flufl.lock" version))
21534 (sha256
21535 (base32
21536 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
21537 (build-system python-build-system)
21538 (propagated-inputs
21539 `(("python-atpublic" ,python-atpublic)
21540 ("python-psutil" ,python-psutil)))
21541 (home-page "https://flufllock.readthedocs.io")
21542 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
21543 (description
21544 "The @dfn{flufl.lock} package provides NFS-safe file locking with
21545 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
21546 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
21547 and have a maximum lifetime built-in.")
21548 (license (list license:asl2.0
21549 license:lgpl3)))) ; only for setup_helpers.py
21550
21551 (define-public python-flufl-testing
21552 (package
21553 (name "python-flufl-testing")
21554 (version "0.8")
21555 (source
21556 (origin
21557 (method url-fetch)
21558 (uri (pypi-uri "flufl.testing" version))
21559 (sha256
21560 (base32
21561 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
21562 (build-system python-build-system)
21563 (native-inputs
21564 `(("python-nose2" ,python-nose2)))
21565 (home-page "https://gitlab.com/warsaw/flufl.testing")
21566 (synopsis "Collection of test tool plugins")
21567 (description
21568 "This package contains a small collection of test tool plugins for
21569 @code{nose2} and @code{flake8}.")
21570 (license license:asl2.0)))
21571
21572 (define-public python-devtools
21573 (package
21574 (name "python-devtools")
21575 (version "0.6")
21576 (source
21577 (origin
21578 (method git-fetch)
21579 (uri (git-reference
21580 (url "https://github.com/samuelcolvin/python-devtools")
21581 (commit (string-append "v" version))))
21582 (file-name (git-file-name name version))
21583 (sha256
21584 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
21585 (build-system python-build-system)
21586 (native-inputs
21587 `(("python-pytest" ,python-pytest)
21588 ("python-pytest-mock" ,python-pytest-mock)))
21589 (propagated-inputs
21590 `(("python-pygments" ,python-pygments)))
21591 (arguments
21592 `(#:phases (modify-phases %standard-phases
21593 (replace 'check
21594 (lambda _
21595 (invoke "pytest")
21596 #t)))))
21597 (home-page "https://github.com/samuelcolvin/python-devtools")
21598 (synopsis "Debug command and development tools")
21599 (description
21600 "This package provides a debug print command and other development tools.
21601 It adds a simple and readable way to print stuff during development.")
21602 (license license:expat)))