projects/guix·blob version-1.1.0 · refs

19452 lines · 699.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <[email protected]>
4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <[email protected]>
5;;; Copyright © 2014, 2015 Mark H Weaver <[email protected]>
6;;; Copyright © 2014, 2017 Eric Bavier <[email protected]>
7;;; Copyright © 2014, 2015 Federico Beffa <[email protected]>
8;;; Copyright © 2015 Omar Radwan <[email protected]>
9;;; Copyright © 2015 Pierre-Antoine Rault <[email protected]>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <[email protected]>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <[email protected]>
12;;; Copyright © 2015 Eric Dvorsak <[email protected]>
13;;; Copyright © 2015, 2016 David Thompson <[email protected]>
14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <[email protected]>
15;;; Copyright © 2015, 2017 Ben Woodcroft <[email protected]>
16;;; Copyright © 2015, 2016 Erik Edrosa <[email protected]>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <[email protected]>
18;;; Copyright © 2015, 2017 Kyle Meyer <[email protected]>
19;;; Copyright © 2015, 2016 Chris Marusich <[email protected]>
20;;; Copyright © 2016 Danny Milosavljevic <[email protected]>
21;;; Copyright © 2016 Lukas Gradl <[email protected]>
22;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <[email protected]>
23;;; Copyright © 2016 Daniel Pimentel <[email protected]>
24;;; Copyright © 2016 Sou Bunnbu <[email protected]>
25;;; Copyright © 2016, 2017 Troy Sankey <[email protected]>
26;;; Copyright © 2016, 2017 ng0 <[email protected]>
27;;; Copyright © 2016 Dylan Jeffers <sapientech@[email protected]>
28;;; Copyright © 2016 David Craven <[email protected]>
29;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <[email protected]>
30;;; Copyright © 2016, 2017 Stefan Reichör <[email protected]>
31;;; Copyright © 2016, 2017, 2019 Alex Vong <[email protected]>
32;;; Copyright © 2016, 2017, 2018 Arun Isaac <[email protected]>
33;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <[email protected]>
34;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <[email protected]>
35;;; Copyright © 2016, 2017 Thomas Danckaert <[email protected]>
36;;; Copyright © 2017 Carlo Zancanaro <[email protected]>
37;;; Copyright © 2017 Frederick M. Muriithi <[email protected]>
38;;; Copyright © 2017, 2018 Adriano Peluso <[email protected]>
39;;; Copyright © 2017 Ben Sturmfels <[email protected]>
40;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <[email protected]>
41;;; Copyright © 2017 José Miguel Sánchez García <[email protected]>
42;;; Copyright © 2017 Roel Janssen <[email protected]>
43;;; Copyright © 2017, 2018, 2019 Kei Kebreau <[email protected]>
44;;; Copyright © 2017 Rutger Helling <[email protected]>
45;;; Copyright © 2017 Muriithi Frederick Muriuki <[email protected]>
46;;; Copyright © 2017, 2019 Brendan Tildesley <[email protected]>
47;;; Copyright © 2018 Ethan R. Jones <[email protected]
48;;; Copyright © 2018 Fis Trivial <[email protected]>
49;;; Copyright © 2018 Vijayalakshmi Vedantham <[email protected]>
50;;; Copyright © 2018 Mathieu Lirzin <[email protected]>
51;;; Copyright © 2018 Adam Massmann <[email protected]>
52;;; Copyright © 2016, 2018 Tomáš Čech <[email protected]>
53;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <[email protected]>
54;;; Copyright © 2018 Oleg Pykhalov <[email protected]>
55;;; Copyright © 2018, 2019 Clément Lassieur <[email protected]>
56;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <[email protected]>
57;;; Copyright © 2018 Luther Thompson <[email protected]>
58;;; Copyright © 2018 Vagrant Cascadian <[email protected]>
59;;; Copyright © 2019, 2020 Brett Gilio <[email protected]>
60;;; Copyright © 2019 Sam <[email protected]>
61;;; Copyright © 2019 Jack Hill <[email protected]>
62;;; Copyright © 2019, 2020 Guillaume Le Vaillant <[email protected]>
63;;; Copyright © 2019, 2020 Alex Griffin <[email protected]>
64;;; Copyright © 2019 Pierre Langlois <[email protected]>
65;;; Copyright © 2019 Jacob MacDonald <[email protected]>
66;;; Copyright © 2019 Giacomo Leidi <[email protected]>
67;;; Copyright © 2019 Wiktor Żelazny <[email protected]>
68;;; Copyright © 2019, 2020 Tanguy Le Carrour <[email protected]>
69;;; Copyright © 2019 Mădălin Ionel Patrașcu <[email protected]>
70;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
71;;; Copyright © 2020 sirgazil <[email protected]>
72;;; Copyright © 2020 Sebastian Schott <[email protected]>
73;;; Copyright © 2020 Alexandros Theodotou <[email protected]>
74;;; Copyright © 2020 Josh Marshall <[email protected]>
75;;; Copyright © 2020 Alexandros Theodotou <[email protected]>
76;;; Copyright © 2020 Lars-Dominik Braun <[email protected]>
77;;; Copyright © 2020 Alex ter Weele <[email protected]>
78;;;
79;;; This file is part of GNU Guix.
80;;;
81;;; GNU Guix is free software; you can redistribute it and/or modify it
82;;; under the terms of the GNU General Public License as published by
83;;; the Free Software Foundation; either version 3 of the License, or (at
84;;; your option) any later version.
85;;;
86;;; GNU Guix is distributed in the hope that it will be useful, but
87;;; WITHOUT ANY WARRANTY; without even the implied warranty of
88;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
89;;; GNU General Public License for more details.
90;;;
91;;; You should have received a copy of the GNU General Public License
92;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
93
94(define-module (gnu packages python-xyz)
95 #:use-module ((guix licenses) #:prefix license:)
96 #:use-module (gnu packages)
97 #:use-module (gnu packages algebra)
98 #:use-module (gnu packages adns)
99 #:use-module (gnu packages attr)
100 #:use-module (gnu packages backup)
101 #:use-module (gnu packages bash)
102 #:use-module (gnu packages check)
103 #:use-module (gnu packages compression)
104 #:use-module (gnu packages crypto)
105 #:use-module (gnu packages databases)
106 #:use-module (gnu packages dbm)
107 #:use-module (gnu packages enchant)
108 #:use-module (gnu packages file)
109 #:use-module (gnu packages fontutils)
110 #:use-module (gnu packages gcc)
111 #:use-module (gnu packages geo)
112 #:use-module (gnu packages ghostscript)
113 #:use-module (gnu packages gl)
114 #:use-module (gnu packages glib)
115 #:use-module (gnu packages gnome)
116 #:use-module (gnu packages graphviz)
117 #:use-module (gnu packages graphics)
118 #:use-module (gnu packages gsasl)
119 #:use-module (gnu packages gstreamer)
120 #:use-module (gnu packages gtk)
121 #:use-module (gnu packages icu4c)
122 #:use-module (gnu packages image)
123 #:use-module (gnu packages imagemagick)
124 #:use-module (gnu packages kerberos)
125 #:use-module (gnu packages libevent)
126 #:use-module (gnu packages libffi)
127 #:use-module (gnu packages linux)
128 #:use-module (gnu packages llvm)
129 #:use-module (gnu packages man)
130 #:use-module (gnu packages maths)
131 #:use-module (gnu packages monitoring)
132 #:use-module (gnu packages multiprecision)
133 #:use-module (gnu packages networking)
134 #:use-module (gnu packages ncurses)
135 #:use-module (gnu packages openstack)
136 #:use-module (gnu packages pcre)
137 #:use-module (gnu packages perl)
138 #:use-module (gnu packages photo)
139 #:use-module (gnu packages pkg-config)
140 #:use-module (gnu packages python)
141 #:use-module (gnu packages python-check)
142 #:use-module (gnu packages python-compression)
143 #:use-module (gnu packages python-crypto)
144 #:use-module (gnu packages python-science)
145 #:use-module (gnu packages python-web)
146 #:use-module (gnu packages qt)
147 #:use-module (gnu packages readline)
148 #:use-module (gnu packages sdl)
149 #:use-module (gnu packages search)
150 #:use-module (gnu packages shells)
151 #:use-module (gnu packages sphinx)
152 #:use-module (gnu packages ssh)
153 #:use-module (gnu packages terminals)
154 #:use-module (gnu packages tex)
155 #:use-module (gnu packages texinfo)
156 #:use-module (gnu packages time)
157 #:use-module (gnu packages tls)
158 #:use-module (gnu packages version-control)
159 #:use-module (gnu packages video)
160 #:use-module (gnu packages web)
161 #:use-module (gnu packages base)
162 #:use-module (gnu packages xml)
163 #:use-module (gnu packages xorg)
164 #:use-module (gnu packages xdisorg)
165 #:use-module (gnu packages tcl)
166 #:use-module (gnu packages bdw-gc)
167 #:use-module (gnu packages serialization)
168 #:use-module (guix packages)
169 #:use-module (guix download)
170 #:use-module (guix git-download)
171 #:use-module (guix hg-download)
172 #:use-module (guix utils)
173 #:use-module (guix build-system gnu)
174 #:use-module (guix build-system cmake)
175 #:use-module (guix build-system python)
176 #:use-module (guix build-system trivial)
177 #:use-module (srfi srfi-1)
178 #:use-module (srfi srfi-26))
179
180(define-public python-tenacity
181 (package
182 (name "python-tenacity")
183 (version "6.1.0")
184 (source (origin
185 (method url-fetch)
186 (uri (pypi-uri "tenacity" version))
187 (sha256
188 (base32
189 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
190 (build-system python-build-system)
191 (native-inputs
192 `(("python-setuptools-scm" ,python-setuptools-scm)
193 ("python-sphinx" ,python-sphinx)
194 ("python-tornado" ,python-tornado)
195 ("python-pytest" ,python-pytest)))
196 (propagated-inputs
197 `(("python-six" ,python-six)))
198 (arguments
199 `(#:phases (modify-phases %standard-phases
200 (replace 'check
201 (lambda _
202 (invoke "pytest")
203 #t)))))
204 (home-page "https://github.com/jd/tenacity")
205 (synopsis "Retrying library for python")
206 (description "Tenacity is a general-purpose python library to simplify the
207task of adding retry behavior to just about anything.")
208 (license license:asl2.0)))
209
210(define-public python-colorlog
211 (package
212 (name "python-colorlog")
213 (version "4.1.0")
214 (source (origin
215 (method url-fetch)
216 (uri (pypi-uri "colorlog" version))
217 (sha256
218 (base32
219 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
220 (build-system python-build-system)
221 (native-inputs
222 `(("python-pytest" ,python-pytest)))
223 (arguments
224 `(#:phases (modify-phases %standard-phases
225 (replace 'check
226 (lambda _
227 ;; Extend PYTHONPATH so the built package will be found.
228 (setenv "PYTHONPATH"
229 (string-append (getcwd) "/build/lib:"
230 (getenv "PYTHONPATH")))
231 (invoke "pytest" "-p" "no:logging")
232 #t)))))
233 (home-page "https://github.com/borntyping/python-colorlog")
234 (synopsis "Log formatting with colors for python")
235 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
236with Python's logging module that outputs records using terminal colors.")
237 (license license:expat)))
238
239(define-public python-pyprind
240 (package
241 (name "python-pyprind")
242 (version "2.11.2")
243 (source (origin
244 (method url-fetch)
245 (uri (pypi-uri "PyPrind" version))
246 (sha256
247 (base32
248 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
249 (build-system python-build-system)
250 (propagated-inputs
251 `(("python-psutil" ,python-psutil)))
252 (home-page "https://github.com/rasbt/pyprind")
253 (synopsis "Python Progress Bar and Percent Indicator Utility")
254 (description "The PyPrind (Python Progress Indicator) module provides a
255progress bar and a percentage indicator object that let you track the progress
256of a loop structure or other iterative computation.")
257 (license license:bsd-3)))
258
259(define-public python-gphoto2
260 (package
261 (name "python-gphoto2")
262 (version "2.2.1")
263 (source (origin
264 (method url-fetch)
265 (uri (pypi-uri "gphoto2" version))
266 (sha256
267 (base32
268 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
269 (build-system python-build-system)
270 (native-inputs
271 `(("pkg-config" ,pkg-config)))
272 (inputs
273 `(("libgphoto2" ,libgphoto2)))
274 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
275 (synopsis "Python interface to libgphoto2")
276 (description "@code{python-gphoto2} is a comprehensive Python interface
277(or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
278automatically generate the interface code.")
279 (license license:gpl3+)))
280
281(define-public python-colour
282 (package
283 (name "python-colour")
284 (version "0.1.5")
285 (source (origin
286 (method url-fetch)
287 (uri (pypi-uri "colour" version))
288 (sha256
289 (base32
290 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
291 (build-system python-build-system)
292 (native-inputs
293 `(("python-d2to1" ,python-d2to1)))
294 (home-page "https://github.com/vaab/colour")
295 (synopsis "Convert and manipulate various color representations")
296 (description "Pythonic way to manipulate color representations (HSL, RVB,
297web, X11, ...).")
298 (license license:expat)))
299
300(define-public python-d2to1
301 (package
302 (name "python-d2to1")
303 (version "0.2.12.post1")
304 (source (origin
305 (method url-fetch)
306 (uri (pypi-uri "d2to1" version))
307 (sha256
308 (base32
309 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
310 (build-system python-build-system)
311 (native-inputs
312 `(("python-nose" ,python-nose)))
313 (home-page "https://github.com/embray/d2to1")
314 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
315in python")
316 (description "The python package d2to1 (the d is for distutils) allows
317using distutils2-like setup.cfg files for a package's metadata with a
318distribute/setuptools setup.py script.")
319 (license license:bsd-2)))
320
321(define-public python-rawkit
322 (package
323 (name "python-rawkit")
324 (version "0.6.0")
325 (source (origin
326 (method url-fetch)
327 (uri (pypi-uri "rawkit" version))
328 (sha256
329 (base32
330 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
331 (build-system python-build-system)
332 (native-inputs
333 `(("python-pytest" ,python-pytest)
334 ("python-mock" ,python-mock)))
335 (inputs
336 `(("libraw" ,libraw)))
337 (home-page "https://rawkit.readthedocs.io")
338 (synopsis "Ctypes-based LibRaw binding for Python")
339 (description "The rawkit package provides two modules: rawkit and libraw.
340The rawkit module provides a high-level Pythonic interface for developing raw
341photos, while the libraw module provides a CTypes based interface for
342interacting with the low-level LibRaw C APIs.")
343 (license license:expat)))
344
345(define-public python-easygui
346 (package
347 (name "python-easygui")
348 (version "0.98.1")
349 (source (origin
350 (method url-fetch)
351 (uri (pypi-uri "easygui" version))
352 (sha256
353 (base32
354 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
355 (build-system python-build-system)
356 (propagated-inputs
357 `(("python-tkinter" ,python "tk")))
358 (home-page "https://github.com/robertlugg/easygui")
359 (synopsis "GUI programming module for Python")
360 (description "EasyGUI is a module for very simple, very easy GUI
361programming in Python. EasyGUI is different from other GUI generators in that
362EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
363simple function calls.")
364 (license license:bsd-3)))
365
366(define-public python-pymediainfo
367 (package
368 (name "python-pymediainfo")
369 (version "4.1")
370 (source
371 (origin
372 (method url-fetch)
373 (uri (pypi-uri "pymediainfo" version))
374 (sha256
375 (base32
376 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
377 (build-system python-build-system)
378 (native-inputs
379 `(("python-setuptools-scm" ,python-setuptools-scm)
380 ("python-pytest" ,python-pytest)))
381 (inputs
382 `(("libmediainfo" ,libmediainfo)))
383 (arguments
384 `(#:phases
385 (modify-phases %standard-phases
386 (add-after 'unpack 'patch-libmediainfo
387 (lambda _
388 (substitute* "pymediainfo/__init__.py"
389 (("libmediainfo.so.0")
390 (string-append (assoc-ref %build-inputs "libmediainfo")
391 "/lib/libmediainfo.so.0")))
392 #t))
393 (replace 'check
394 (lambda _
395 ;; Extend PYTHONPATH so the built package will be found.
396 (setenv "PYTHONPATH"
397 (string-append (getcwd) "/build/lib:"
398 (getenv "PYTHONPATH")))
399 ;; Skip the only failing test "test_parse_url"
400 (invoke "pytest" "-vv" "-k" "not test_parse_url")
401 #t)))))
402 (home-page
403 "https://github.com/sbraz/pymediainfo")
404 (synopsis
405 "Python wrapper for the mediainfo library")
406 (description
407 "Python wrapper for the mediainfo library to access the technical and tag
408data for video and audio files.")
409 (license license:expat)))
410
411(define-public python-psutil
412 (package
413 (name "python-psutil")
414 (version "5.6.5")
415 (source
416 (origin
417 (method url-fetch)
418 (uri (pypi-uri "psutil" version))
419 (sha256
420 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
421 (build-system python-build-system)
422 (arguments
423 ;; FIXME: some tests does not return and times out.
424 '(#:tests? #f))
425 (home-page "https://www.github.com/giampaolo/psutil")
426 (synopsis "Library for retrieving information on running processes")
427 (description
428 "psutil (Python system and process utilities) is a library for retrieving
429information on running processes and system utilization (CPU, memory, disks,
430network) in Python. It is useful mainly for system monitoring, profiling and
431limiting process resources and management of running processes. It implements
432many functionalities offered by command line tools such as: ps, top, lsof,
433netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
434pidof, tty, taskset, pmap.")
435 (properties `((python2-variant . ,(delay python2-psutil))))
436 (license license:bsd-3)))
437
438(define-public python2-psutil
439 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
440 (package
441 (inherit base)
442 (propagated-inputs
443 `(("python2-enum34" ,python2-enum34) ;optional
444 ,@(package-propagated-inputs base))))))
445
446(define-public python-shapely
447 (package
448 (name "python-shapely")
449 (version "1.6.4.post2")
450 (source
451 (origin
452 (method url-fetch)
453 (uri (pypi-uri "Shapely" version))
454 (sha256
455 (base32
456 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
457 (build-system python-build-system)
458 (native-inputs
459 `(("python-cython" ,python-cython)
460 ("python-matplotlib" ,python-matplotlib)
461 ("python-pytest" ,python-pytest)
462 ("python-pytest-cov" ,python-pytest-cov)))
463 (inputs
464 `(("geos" ,geos)))
465 (propagated-inputs
466 `(("python-numpy" ,python-numpy)))
467 (arguments
468 `(#:phases
469 (modify-phases %standard-phases
470 (add-after 'unpack 'patch-geos-path
471 (lambda* (#:key inputs #:allow-other-keys)
472 (let ((geos (assoc-ref inputs "geos"))
473 (glibc (assoc-ref inputs ,(if (%current-target-system)
474 "cross-libc" "libc"))))
475 (substitute* "shapely/geos.py"
476 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
477 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
478 geos "/lib/libgeos_c.so'])"))
479 (("free = load_dll\\('c'\\)\\.free")
480 (string-append "free = load_dll('c', fallbacks=['"
481 glibc "/lib/libc.so.6']).free"))))
482 #t)))))
483 (home-page "https://github.com/Toblerity/Shapely")
484 (synopsis "Library for the manipulation and analysis of geometric objects")
485 (description "Shapely is a Python package for manipulation and analysis of
486planar geometric objects. It is based on the @code{GEOS} library.")
487 (license license:bsd-3)))
488
489(define-public python-shortuuid
490 (package
491 (name "python-shortuuid")
492 (version "0.5.0")
493 (source
494 (origin
495 (method url-fetch)
496 (uri (pypi-uri "shortuuid" version))
497 (sha256
498 (base32
499 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
500 (build-system python-build-system)
501 (native-inputs
502 `(("python-pep8" ,python-pep8)))
503 (home-page "https://github.com/skorokithakis/shortuuid")
504 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
505 (description
506 "@code{shortuuid} is a Python library for generating concise, unambiguous
507and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
508module and then similar looking characters are removed.")
509 (license license:bsd-3)))
510
511(define-public python-logwrap
512 (package
513 (name "python-logwrap")
514 (version "3.2.1")
515 (source
516 (origin
517 (method url-fetch)
518 (uri (pypi-uri "logwrap" version ".zip"))
519 (sha256
520 (base32
521 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
522 (build-system python-build-system)
523 (propagated-inputs
524 `(("python-six" ,python-six)
525 ("python-typing" ,python-typing)))
526 (native-inputs
527 `(("unzip" ,unzip)
528 ("python-cython" ,python-cython)
529 ("python-pytest" ,python-pytest)
530 ("python-pytest-cov" ,python-pytest-cov)
531 ("python-pytest-runner" ,python-pytest-runner)))
532 (home-page "https://github.com/penguinolog/logwrap")
533 (synopsis "Decorator for logging function arguments")
534 (description "This package provides a decorator to log function arguments
535and function call return values in a human-readable way.")
536 (license license:asl2.0)))
537
538(define-public python2-shapely
539 (package-with-python2 python-shapely))
540
541(define-public python-clyent
542 (package
543 (name "python-clyent")
544 (version "1.2.1")
545 (source
546 (origin
547 (method url-fetch)
548 (uri (pypi-uri "clyent" version))
549 (sha256
550 (base32
551 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
552 (build-system python-build-system)
553 (native-inputs
554 `(("python-mock" ,python-mock)))
555 (home-page "https://github.com/binstar/clyent")
556 (synopsis "Command line client library")
557 (description "Clyent is a Python command line utiliy library. It is used
558by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
559 (license license:bsd-3)))
560
561(define-public python2-clyent
562 (package-with-python2 python-clyent))
563
564(define-public python-babel
565 (package
566 (name "python-babel")
567 (version "2.8.0")
568 (source
569 (origin
570 (method url-fetch)
571 (uri (pypi-uri "Babel" version))
572 (sha256
573 (base32
574 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
575 (build-system python-build-system)
576 (native-inputs
577 `(("python-freezegun" ,python-freezegun)
578 ("python-pytest" ,python-pytest)))
579 (propagated-inputs
580 `(("python-pytz" ,python-pytz)))
581 (arguments
582 `(#:phases (modify-phases %standard-phases
583 (replace 'check
584 (lambda _
585 (invoke "pytest" "-vv" "-k"
586 (string-append
587 ;; XXX: These tests fail when using Pytest 4.x and
588 ;; Babel 2.6.0. Try removing this for later versions.
589 "not test_no_inherit_metazone_marker_never_in_output"
590 " and not test_smoke_dates"
591 " and not test_smoke_numbers")))))))
592 (home-page "http://babel.pocoo.org/")
593 (synopsis
594 "Tools for internationalizing Python applications")
595 (description
596 "Babel is composed of two major parts:
597- tools to build and work with gettext message catalogs
598- a Python interface to the CLDR (Common Locale Data Repository), providing
599access to various locale display names, localized number and date formatting,
600etc. ")
601 (license license:bsd-3)))
602
603(define-public python2-babel
604 (package-with-python2 python-babel))
605
606;; Sphinx < 2.0 requires this version. Remove once no longer needed.
607(define-public python2-babel-2.6
608 (package
609 (inherit python2-babel)
610 (version "2.6.0")
611 (source (origin
612 (method url-fetch)
613 (uri (pypi-uri "Babel" version))
614 (sha256
615 (base32
616 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
617
618(define-public python2-backport-ssl-match-hostname
619 (package
620 (name "python2-backport-ssl-match-hostname")
621 (version "3.5.0.1")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (pypi-uri "backports.ssl_match_hostname" version))
626 (sha256
627 (base32
628 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
629 (build-system python-build-system)
630 (arguments
631 `(#:python ,python-2
632 #:tests? #f)) ; no test target
633 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
634 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
635 (description
636 "This backport brings the ssl.match_hostname() function to users of
637earlier versions of Python. The function checks the hostname in the
638certificate returned by the server to which a connection has been established,
639and verifies that it matches the intended target hostname.")
640 (license license:psfl)))
641
642(define-public python-boolean.py
643 (package
644 (name "python-boolean.py")
645 (version "3.6")
646 (source
647 (origin
648 ;; There's no source tarball on PyPI.
649 (method git-fetch)
650 (uri (git-reference
651 (url "https://github.com/bastikr/boolean.py")
652 (commit (string-append "v" version))))
653 (file-name (git-file-name name version))
654 (sha256
655 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
656 (build-system python-build-system)
657 (home-page "https://github.com/bastikr/boolean.py")
658 (synopsis "Boolean algebra in one Python module")
659 (description
660 "This is a small Python library that implements boolean algebra.
661It defines two base elements, @code{TRUE} and @code{FALSE}, and a
662@code{Symbol} class that can take on one of these two values. Calculations
663are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
664compositions like @code{XOR} and @code{NAND} are emulated on top of them.
665Expressions are constructed from parsed strings or directly in Python.")
666 (license license:bsd-2)))
667
668(define-public python-hdf4
669 (package
670 (name "python-hdf4")
671 (version "0.9")
672 (source
673 (origin
674 (method url-fetch)
675 (uri (pypi-uri name version))
676 (sha256
677 (base32
678 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
679 (build-system python-build-system)
680 (native-inputs `(("nose" ,python-nose)))
681 (propagated-inputs `(("numpy" ,python-numpy)))
682 (inputs
683 `(("hdf4" ,hdf4)
684 ("libjpeg" ,libjpeg)
685 ("zlib" ,zlib)))
686 (arguments
687 `(#:phases
688 (modify-phases %standard-phases
689 (replace 'check
690 (lambda _
691 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
692 ;; on to import numpy. Somehow this works on their CI system.
693 ;; Let's just manage PYTHONPATH here instead.
694 (substitute* "runexamples.sh"
695 (("export PYTHONPATH=.*") ""))
696 (setenv "PYTHONPATH"
697 (string-append (getcwd) ":"
698 (getenv "PYTHONPATH")))
699 (invoke "./runexamples.sh")
700 (invoke "nosetests" "-v"))))))
701 (home-page "https://github.com/fhs/python-hdf4")
702 (synopsis "Python interface to the NCSA HDF4 library")
703 (description
704 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
705which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
706NetCDF files can also be read and modified. Python-HDF4 is a fork of
707@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
708 (license license:expat)))
709
710(define-public python2-hdf4
711 (package-with-python2 python-hdf4))
712
713(define-public python-h5py
714 (package
715 (name "python-h5py")
716 (version "2.10.0")
717 (source
718 (origin
719 (method url-fetch)
720 (uri (pypi-uri "h5py" version))
721 (sha256
722 (base32
723 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
724 (build-system python-build-system)
725 (arguments
726 `(#:tests? #f ; no test target
727 #:phases
728 (modify-phases %standard-phases
729 (add-after 'unpack 'fix-hdf5-paths
730 (lambda* (#:key inputs #:allow-other-keys)
731 (let ((prefix (assoc-ref inputs "hdf5")))
732 (substitute* "setup_build.py"
733 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
734 (string-append "['" prefix "/lib" "']"))
735 (("'/opt/local/include', '/usr/local/include'")
736 (string-append "'" prefix "/include" "'")))
737 (substitute* "setup_configure.py"
738 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
739 (string-append "['" prefix "/lib" "']")))
740 #t))))))
741 (propagated-inputs
742 `(("python-six" ,python-six)
743 ("python-numpy" ,python-numpy)))
744 (inputs
745 `(("hdf5" ,hdf5-1.10)))
746 (native-inputs
747 `(("python-cython" ,python-cython)
748 ("python-pkgconfig" ,python-pkgconfig)
749 ("pkg-config" ,pkg-config)))
750 (home-page "https://www.h5py.org/")
751 (synopsis "Read and write HDF5 files from Python")
752 (description
753 "The h5py package provides both a high- and low-level interface to the
754HDF5 library from Python. The low-level interface is intended to be a
755complete wrapping of the HDF5 API, while the high-level component supports
756access to HDF5 files, datasets and groups using established Python and NumPy
757concepts.")
758 (license license:bsd-3)))
759
760(define-public python2-h5py
761 (package-with-python2 python-h5py))
762
763(define-public python-sh
764 (package
765 (name "python-sh")
766 (version "1.12.14")
767 (source
768 (origin
769 (method url-fetch)
770 (uri (pypi-uri "sh" version))
771 (sha256
772 (base32
773 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
774 (build-system python-build-system)
775 (arguments
776 '(#:phases
777 (modify-phases %standard-phases
778 (replace 'check
779 (lambda _
780 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
781 (setenv "HOME" "/tmp")
782 (invoke "python" "sh.py" "test"))))))
783 (native-inputs
784 `(("python-coverage" ,python-coverage)))
785 (home-page "https://github.com/amoffat/sh")
786 (synopsis "Python subprocess replacement")
787 (description "This package provides a replacement for Python's
788@code{subprocess} feature.")
789 (license license:expat)))
790
791(define-public python2-sh
792 (package-with-python2 python-sh))
793
794(define-public python-cftime
795 (package
796 (name "python-cftime")
797 (version "1.0.4.2")
798 (source
799 (origin
800 (method url-fetch)
801 (uri (pypi-uri "cftime" version))
802 (sha256
803 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
804 (build-system python-build-system)
805 (propagated-inputs
806 `(("python-numpy" ,python-numpy)))
807 (native-inputs
808 `(("python-coveralls" ,python-coveralls)
809 ("python-cython" ,python-cython)
810 ("python-pytest-cov" ,python-pytest-cov)))
811 (home-page "https://github.com/Unidata/cftime")
812 (synopsis "Library for time handling")
813 (description
814 "This package provides time-handling functionality that used to be part
815of the netcdf4 package before.")
816 ;; This package claims to include code under the GPLv3 but is released
817 ;; under ISC.
818 (license (list license:isc license:gpl3+))))
819
820(define-public python-netcdf4
821 (package
822 (name "python-netcdf4")
823 (version "1.4.2")
824 (source
825 (origin
826 (method url-fetch)
827 (uri (pypi-uri "netCDF4" version))
828 (sha256
829 (base32
830 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
831 (build-system python-build-system)
832 (arguments
833 '(#:phases
834 (modify-phases %standard-phases
835 (add-after 'unpack 'configure-locations
836 (lambda* (#:key inputs #:allow-other-keys)
837 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
838 #t)))))
839 (native-inputs
840 `(("python-cython" ,python-cython)))
841 (propagated-inputs
842 `(("python-numpy" ,python-numpy)
843 ("python-cftime" ,python-cftime)))
844 (inputs
845 `(("netcdf" ,netcdf)
846 ("hdf4" ,hdf4)
847 ("hdf5" ,hdf5)))
848 (home-page "https://github.com/Unidata/netcdf4-python")
849 (synopsis "Python/numpy interface to the netCDF library")
850 (description "Netcdf4-python is a Python interface to the netCDF C
851library. netCDF version 4 has many features not found in earlier
852versions of the library and is implemented on top of HDF5. This module
853can read and write files in both the new netCDF 4 and the old netCDF 3
854format, and can create files that are readable by HDF5 clients. The
855API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
856to users of that module.")
857 ;; The software is mainly ISC, but includes some files covered
858 ;; by the Expat license.
859 (license (list license:isc license:expat))))
860
861(define-public python2-netcdf4
862 (package-with-python2 python-netcdf4))
863
864(define-public python-license-expression
865 (package
866 (name "python-license-expression")
867 (version "0.999")
868 (source
869 (origin
870 (method url-fetch)
871 (uri (pypi-uri "license-expression" version))
872 (sha256
873 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
874 (build-system python-build-system)
875 (propagated-inputs
876 `(("python-boolean.py" ,python-boolean.py)))
877 (home-page "https://github.com/nexB/license-expression")
878 (synopsis "Apply boolean logic to license expressions")
879 (description
880 "This Python module defines a tiny language to evaluate and compare
881license expressions using boolean logic. Logical combinations of licenses can
882be tested for equality, containment, and equivalence. They can be normalised
883and simplified. It supports SPDX license expressions as well as other naming
884conventions and aliases in the same expression.")
885 (license license:gpl2+)))
886
887(define-public python-lockfile
888 (package
889 (name "python-lockfile")
890 (version "0.12.2")
891 (source
892 (origin
893 (method url-fetch)
894 (uri (pypi-uri "lockfile" version))
895 (sha256
896 (base32
897 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
898 (build-system python-build-system)
899 (arguments '(#:test-target "check"))
900 (native-inputs
901 `(("python-pbr" ,python-pbr)))
902 (home-page "https://launchpad.net/pylockfile")
903 (synopsis "Platform-independent file locking module")
904 (description
905 "The lockfile package exports a LockFile class which provides a simple
906API for locking files.")
907 (license license:expat)))
908
909(define-public python2-lockfile
910 (package-with-python2 python-lockfile))
911
912(define-public python-filelock
913 (package
914 (name "python-filelock")
915 (version "3.0.12")
916 (source
917 (origin
918 (method url-fetch)
919 (uri (pypi-uri "filelock" version))
920 (sha256
921 (base32
922 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
923 (build-system python-build-system)
924 (home-page
925 "https://github.com/benediktschmitt/py-filelock")
926 (synopsis "Platform independent file lock")
927 (description "@code{filelock} contains a single module implementing
928a platform independent file lock in Python, which provides a simple way of
929inter-process communication.")
930 (license license:unlicense)))
931
932(define-public python-semantic-version
933 (package
934 (name "python-semantic-version")
935 (version "2.6.0")
936 (source
937 (origin
938 (method url-fetch)
939 (uri (pypi-uri "semantic_version" version))
940 (sha256
941 (base32
942 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
943 (build-system python-build-system)
944 (arguments
945 `(#:tests? #f)) ; PyPI tarball lacks tests
946 (home-page "https://github.com/rbarrois/python-semanticversion")
947 (synopsis "Semantic versioning module for Python")
948 (description
949 "The @code{semantic_version} class is a small library for handling
950@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
951
952It can compare versions, generate a new version that represents a bump in one of
953the version levels, and check whether any given string is a proper semantic
954version identifier.")
955 (license license:bsd-3)))
956
957(define-public python2-semantic-version
958 (package-with-python2 python-semantic-version))
959
960(define-public python-serpent
961 (package
962 (name "python-serpent")
963 (version "1.28")
964 (source
965 (origin
966 (method url-fetch)
967 (uri (pypi-uri "serpent" version))
968 (sha256
969 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
970 (build-system python-build-system)
971 (native-inputs
972 `(("python-attrs" ,python-attrs)
973 ("python-pytz" ,python-pytz)))
974 (home-page "https://github.com/irmen/Serpent")
975 (synopsis "Serializer for literal Python expressions")
976 (description
977 "Serpent provides @code{ast.literal_eval()}-compatible object tree
978serialization. It serializes an object tree into bytes (an utf-8 encoded
979string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
980to rebuild the original object tree.
981
982Because only safe literals are encoded, it is safe to send serpent data to
983other machines, such as over the network.")
984 (license license:expat)))
985
986(define-public python-setuptools
987 (package
988 (name "python-setuptools")
989 (version "41.0.1")
990 (source
991 (origin
992 (method url-fetch)
993 (uri (pypi-uri "setuptools" version ".zip"))
994 (sha256
995 (base32
996 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
997 (modules '((guix build utils)))
998 (snippet
999 '(begin
1000 ;; Remove included binaries which are used to build self-extracting
1001 ;; installers for Windows.
1002 ;; TODO: Find some way to build them ourself so we can include them.
1003 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1004 #t))))
1005 (build-system python-build-system)
1006 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1007 ;; One could bootstrap with an internal untested setuptools.
1008 (arguments
1009 `(#:tests? #f))
1010 (home-page "https://pypi.org/project/setuptools/")
1011 (synopsis
1012 "Library designed to facilitate packaging Python projects")
1013 (description
1014 "Setuptools is a fully-featured, stable library designed to facilitate
1015packaging Python projects, where packaging includes:
1016Python package and module definitions,
1017distribution package metadata,
1018test hooks,
1019project installation,
1020platform-specific details,
1021Python 3 support.")
1022 ;; TODO: setuptools now bundles the following libraries:
1023 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1024 (license (list license:psfl ; setuptools itself
1025 license:expat ; six, appdirs, pyparsing
1026 license:asl2.0 ; packaging is dual ASL2/BSD-2
1027 license:bsd-2))))
1028
1029(define-public python2-setuptools
1030 (package-with-python2 python-setuptools))
1031
1032;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1033(define-public python-setuptools-for-tensorflow
1034 (hidden-package
1035 (package
1036 (inherit python-setuptools)
1037 (version "39.1.0")
1038 (source (origin
1039 (inherit (package-source python-setuptools))
1040 (uri (pypi-uri "setuptools" version ".zip"))
1041 (sha256
1042 (base32
1043 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1044
1045(define-public python-uniseg
1046 (package
1047 (name "python-uniseg")
1048 (version "0.7.1")
1049 (source
1050 (origin
1051 (method url-fetch)
1052 (uri (pypi-uri "uniseg" version ".zip"))
1053 (sha256
1054 (base32
1055 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1056 (build-system python-build-system)
1057 (arguments
1058 '(#:tests? #f)) ; The test suite requires network access.
1059 (native-inputs
1060 `(("unzip" ,unzip)))
1061 (home-page
1062 "https://bitbucket.org/emptypage/uniseg-python")
1063 (synopsis
1064 "Python library to determine Unicode text segmentations")
1065 (description
1066 "Uniseg is a Python package used to determine Unicode text segmentations.
1067Supported segmentations include:
1068@enumerate
1069@item @dfn{Code point} (any value in the Unicode codespace)
1070@item @dfn{Grapheme cluster} (user-perceived character made of a single or
1071multiple Unicode code points, e.g. \"G\" + acute-accent)
1072@item Word break
1073@item Sentence break
1074@item Line break
1075@end enumerate")
1076 (license license:expat)))
1077
1078(define-public python2-uniseg
1079 (package-with-python2 python-uniseg))
1080
1081(define-public python-humanfriendly
1082 (package
1083 (name "python-humanfriendly")
1084 (version "4.4.1")
1085 (source
1086 (origin
1087 (method url-fetch)
1088 (uri (pypi-uri "humanfriendly" version))
1089 (sha256
1090 (base32
1091 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1092 (build-system python-build-system)
1093 (arguments
1094 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1095 #:tests? #f))
1096 (propagated-inputs
1097 `(("python-monotonic" ,python-monotonic)))
1098 (home-page "https://humanfriendly.readthedocs.io")
1099 (synopsis "Human-friendly input and output in Python")
1100 (description
1101 "The functions and classes in @code{humanfriendly} can be used to make
1102text interfaces more user-friendly. It includes tools to parse and format
1103numbers, file sizes, and timespans, timers for long-running operations, menus
1104to allow the user to choose from a list of options, and terminal interaction
1105helpers.")
1106 (license license:expat)))
1107
1108(define-public python2-humanfriendly
1109 (package-with-python2 python-humanfriendly))
1110
1111(define-public python-textparser
1112 (package
1113 (name "python-textparser")
1114 (version "0.23.0")
1115 (source
1116 (origin
1117 (method url-fetch)
1118 (uri (pypi-uri "textparser" version))
1119 (sha256
1120 (base32
1121 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1122 (build-system python-build-system)
1123 (home-page "https://github.com/eerimoq/textparser")
1124 (synopsis "Fast text parser for Python")
1125 (description "This library provides a text parser written in the Python
1126language. It aims to be fast.")
1127 (license license:expat)))
1128
1129(define-public python-aenum
1130 (package
1131 (name "python-aenum")
1132 (version "2.2.3")
1133 (source
1134 (origin
1135 (method url-fetch)
1136 (uri (pypi-uri "aenum" version))
1137 (sha256
1138 (base32
1139 "1s3008rklv4n1kvmq6xdbdfyrpl0gf1rhqasmd27s5kwyjmlqcx4"))))
1140 (build-system python-build-system)
1141 (arguments
1142 `(#:phases (modify-phases %standard-phases
1143 (replace 'check
1144 (lambda _
1145 (format #t "current working dir ~s~%" (getcwd))
1146 (setenv "PYTHONPATH"
1147 (string-append ".:" (getenv "PYTHONPATH")))
1148 ;; We must run the test suite module directly, as it
1149 ;; fails to define the 'tempdir' variable in scope for
1150 ;; the tests otherwise
1151 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1152 ;; issues/32/running-tests-with-python-setuppy-test).
1153 (invoke "python3" "aenum/test.py")
1154 ;; This one fails with "NameError: name
1155 ;; 'test_pickle_dump_load' is not defined" (see:
1156 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1157 ;; /error-running-the-test_v3py-test-suite).
1158 ;; (invoke "python3" "aenum/test_v3.py")
1159 #t)))))
1160 (home-page "https://bitbucket.org/stoneleaf/aenum")
1161 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1162 (description "The aenum library includes an @code{Enum} base class, a
1163metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1164class.")
1165 (license license:bsd-3)))
1166
1167(define-public python-can
1168 (package
1169 (name "python-can")
1170 (version "3.3.2")
1171 (source
1172 (origin
1173 (method url-fetch)
1174 (uri (pypi-uri "python-can" version))
1175 (sha256
1176 (base32
1177 "0bkbxi45sckzir6s0j3h01pkfn4vkz3ymih2zjp7zw77wz0vbvsz"))))
1178 (build-system python-build-system)
1179 (arguments
1180 `(#:phases (modify-phases %standard-phases
1181 (add-after 'unpack 'fix-broken-tests
1182 ;; The tests try to run two scripts it expects should be
1183 ;; in PATH, but they aren't at this time (see:
1184 ;; https://github.com/hardbyte/python-can/issues/805).
1185 (lambda _
1186 (substitute* "test/test_scripts.py"
1187 (("\"can_logger\\.py --help\"") "")
1188 (("\"can_player\\.py --help\"") ""))
1189 #t)))))
1190 (propagated-inputs
1191 `(("python-aenum" ,python-aenum)
1192 ("python-wrapt" ,python-wrapt)))
1193 (native-inputs
1194 `(("python-codecov" ,python-codecov)
1195 ("python-future" ,python-future)
1196 ("python-hypothesis" ,python-hypothesis)
1197 ("python-mock" ,python-mock)
1198 ("python-pyserial" ,python-pyserial)
1199 ("python-pytest" ,python-pytest)
1200 ("python-pytest-cov" ,python-pytest-cov)
1201 ("python-pytest-runner" ,python-pytest-runner)
1202 ("python-pytest-timeout" ,python-pytest-timeout)))
1203 (home-page "https://github.com/hardbyte/python-can")
1204 (synopsis "Controller Area Network (CAN) interface module for Python")
1205 (description "This package defines the @code{can} module, which provides
1206controller area network (CAN) support for Python developers; providing common
1207abstractions to different hardware devices, and a suite of utilities for
1208sending and receiving messages on a CAN bus.")
1209 (license license:gpl3+)))
1210
1211(define-public python-diskcache
1212 (package
1213 (name "python-diskcache")
1214 (version "4.1.0")
1215 (source
1216 (origin
1217 (method url-fetch)
1218 (uri (pypi-uri "diskcache" version))
1219 (sha256
1220 (base32
1221 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1222 (build-system python-build-system)
1223 (arguments
1224 `(#:tests? #f)) ;test suite not included in the release
1225 (home-page "http://www.grantjenks.com/docs/diskcache/")
1226 (synopsis "Disk and file backed cache library")
1227 (description "DiskCache is a disk and file backed persistent cache.")
1228 (license license:asl2.0)))
1229
1230(define-public python-bitstruct
1231 (package
1232 (name "python-bitstruct")
1233 (version "8.9.0")
1234 (source
1235 (origin
1236 (method url-fetch)
1237 (uri (pypi-uri "bitstruct" version))
1238 (sha256
1239 (base32
1240 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1241 (build-system python-build-system)
1242 (home-page "https://github.com/eerimoq/bitstruct")
1243 (synopsis "Python values to and C bit field structs converter")
1244 (description "This module performs conversions between Python values and C
1245bit field structs represented as Python byte strings. It is intended to have
1246a similar interface as the @code{struct} module from Python, but working on
1247bits instead of primitive data types like @code{char}, @code{int}, etc.")
1248 (license license:expat)))
1249
1250(define-public python-cantools
1251 (package
1252 (name "python-cantools")
1253 (version "33.1.1")
1254 (source
1255 (origin
1256 ;; We take the sources from the Git repository as the documentation is
1257 ;; not included with the PyPI archive.
1258 (method git-fetch)
1259 (uri (git-reference
1260 (url "https://github.com/eerimoq/cantools.git")
1261 (commit version)))
1262 (file-name (git-file-name name version))
1263 (sha256
1264 (base32
1265 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1266 (build-system python-build-system)
1267 (arguments
1268 `(#:phases
1269 (modify-phases %standard-phases
1270 (add-after 'build 'build-doc
1271 (lambda _
1272 ;; See: https://github.com/eerimoq/cantools/issues/190.
1273 (substitute* "README.rst"
1274 (("https://github.com/eerimoq/cantools/raw/master\
1275/docs/monitor.png")
1276 "monitor.png"))
1277 (with-directory-excursion "docs"
1278 (invoke "make" "man" "info"))))
1279 (add-after 'install 'install-doc
1280 (lambda* (#:key outputs #:allow-other-keys)
1281 (let* ((out (assoc-ref outputs "out"))
1282 (info (string-append out "/share/info"))
1283 (man1 (string-append out "/share/man/man1")))
1284 (format #t "CWD: ~s~%" (getcwd))
1285 (install-file "docs/_build/texinfo/cantools.info" info)
1286 (install-file "docs/_build/man/cantools.1" man1)
1287 #t))))))
1288 (native-inputs
1289 `(("sphinx" ,python-sphinx)
1290 ("texinfo" ,texinfo)))
1291 (propagated-inputs
1292 `(("python-bitstruct" ,python-bitstruct)
1293 ("python-can" ,python-can)
1294 ("python-diskcache" ,python-diskcache)
1295 ("python-textparser" ,python-textparser)))
1296 (home-page "https://github.com/eerimoq/cantools")
1297 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1298 (description "This package includes Controller Area Network (CAN) related
1299tools that can be used to:
1300@itemize
1301@item parse DBC, KCD, SYM, ARXML 4 and CDD files
1302@item encode and decode CAN messages
1303@item multiplex simple and extended signals
1304@item diagnose DID encoding and decoding
1305@item dump the CAN decoder output
1306@item test CAN nodes
1307@item generate C source code
1308@item monitor the CAN bus
1309@end itemize")
1310 (license license:expat)))
1311
1312(define-public python-capturer
1313 (package
1314 (name "python-capturer")
1315 (version "2.4")
1316 (source
1317 (origin
1318 (method url-fetch)
1319 (uri (pypi-uri "capturer" version))
1320 (sha256
1321 (base32
1322 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1323 (build-system python-build-system)
1324 (arguments
1325 `(#:tests? #f))
1326 (propagated-inputs
1327 `(("python-humanfriendly" ,python-humanfriendly)))
1328 (home-page "https://capturer.readthedocs.io")
1329 (synopsis "Capture stdout and stderr streams of the current process")
1330 (description
1331 "The capturer package makes it easy to capture the stdout and stderr
1332streams of the current process and subprocesses. Output can be relayed
1333to the terminal in real time but is also available to the Python program
1334for additional processing.")
1335 (license license:expat)))
1336
1337(define-public python2-capturer
1338 (package-with-python2 python-capturer))
1339
1340(define-public python-case
1341 (package
1342 (name "python-case")
1343 (version "1.5.3")
1344 (source
1345 (origin
1346 (method url-fetch)
1347 (uri (pypi-uri "case" version))
1348 (sha256
1349 (base32
1350 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1351 (build-system python-build-system)
1352 (propagated-inputs
1353 `(("python-mock" ,python-mock)
1354 ("python-nose" ,python-nose)
1355 ("python-six" ,python-six)
1356 ("python-unittest2" ,python-unittest2)))
1357 (native-inputs
1358 `(("python-coverage" ,python-coverage)))
1359 (home-page "https://github.com/celery/case")
1360 (synopsis "Unittest utilities and convenience methods")
1361 (description
1362 "The @code{case} package provides utilities on top of unittest, including
1363some helpful Python 2 compatibility convenience methods.")
1364 (license license:bsd-3)))
1365
1366(define-public python-verboselogs
1367 (package
1368 (name "python-verboselogs")
1369 (version "1.7")
1370 (source
1371 (origin
1372 (method url-fetch)
1373 (uri (pypi-uri "verboselogs" version))
1374 (sha256
1375 (base32
1376 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1377 (build-system python-build-system)
1378 (arguments
1379 `(#:phases
1380 (modify-phases %standard-phases
1381 (replace 'check
1382 (lambda _
1383 ;; Do not run pylint plugin test, as astroid is an old
1384 ;; unsupported version.
1385 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1386 "verboselogs/tests.py"))))))
1387 (native-inputs
1388 `(("python-mock" ,python-mock)
1389 ("python-pytest" ,python-pytest)))
1390 (home-page "https://verboselogs.readthedocs.io")
1391 (synopsis "Verbose logging level for Python's logging module")
1392 (description
1393 "The @code{verboselogs} package extends Python's @code{logging} module to
1394add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1395 (license license:expat)))
1396
1397(define-public python2-verboselogs
1398 (package-with-python2 python-verboselogs))
1399
1400(define-public python-coloredlogs
1401 (package
1402 (name "python-coloredlogs")
1403 (version "10.0")
1404 (source
1405 (origin
1406 (method url-fetch)
1407 (uri (pypi-uri "coloredlogs" version))
1408 (sha256
1409 (base32
1410 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1411 (build-system python-build-system)
1412 (arguments
1413 `(;Tests require some updated modules
1414 #:tests? #f))
1415 (propagated-inputs
1416 `(("python-capturer" ,python-capturer)))
1417 (home-page "https://coloredlogs.readthedocs.io")
1418 (synopsis "Colored stream handler for Python's logging module")
1419 (description
1420 "The @code{coloredlogs} package enables colored terminal output for
1421Python's logging module. The @code{ColoredFormatter} class inherits from
1422@code{logging.Formatter} and uses ANSI escape sequences to render your logging
1423messages in color.")
1424 (license license:expat)))
1425
1426(define-public python2-coloredlogs
1427 (package-with-python2 python-coloredlogs))
1428
1429(define-public python-editorconfig
1430 (package
1431 (name "python-editorconfig")
1432 (version "0.12.2")
1433 (source
1434 (origin
1435 (method url-fetch)
1436 (uri (pypi-uri "EditorConfig" version))
1437 (sha256
1438 (base32
1439 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1440 (build-system python-build-system)
1441 (home-page "https://editorconfig.org/")
1442 (synopsis "EditorConfig bindings for python")
1443 (description "The EditorConfig project consists of a file format for
1444defining coding styles and a collection of text editor plugins that enable
1445editors to read the file format and adhere to defined styles. EditorConfig
1446files are easily readable and they work nicely with version control systems.")
1447 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1448 (license (list license:bsd-2 license:psfl))))
1449
1450(define-public python-et-xmlfile
1451 (package
1452 (name "python-et-xmlfile")
1453 (version "1.0.1")
1454 (source
1455 (origin
1456 (method url-fetch)
1457 (uri (pypi-uri "et_xmlfile" version))
1458 (sha256
1459 (base32
1460 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1461 (build-system python-build-system)
1462 (arguments
1463 `(#:phases (modify-phases %standard-phases
1464 (replace 'check
1465 (lambda _
1466 (invoke "pytest"))))))
1467 (native-inputs
1468 `(("python-pytest" ,python-pytest)
1469 ("python-lxml" ,python-lxml))) ;used for the tests
1470 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1471 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1472 (description "This Python library is based upon the @code{xmlfile} module
1473from @code{lxml}. It aims to provide a low memory, compatible implementation
1474of @code{xmlfile}.")
1475 (license license:expat)))
1476
1477(define-public python2-et-xmlfile
1478 (package-with-python2 python-et-xmlfile))
1479
1480(define-public python-openpyxl
1481 (package
1482 (name "python-openpyxl")
1483 (version "2.6.2")
1484 (source
1485 (origin
1486 ;; We use the upstream repository, as the tests are not included in the
1487 ;; PyPI releases.
1488 (method hg-fetch)
1489 (uri (hg-reference
1490 (url "https://bitbucket.org/openpyxl/openpyxl")
1491 (changeset version)))
1492 (file-name (string-append name "-" version "-checkout"))
1493 (sha256
1494 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1495 (build-system python-build-system)
1496 (arguments
1497 `(#:phases (modify-phases %standard-phases
1498 (replace 'check
1499 (lambda _
1500 (invoke "pytest"))))))
1501 (native-inputs
1502 ;; For the test suite.
1503 `(("python-lxml" ,python-lxml)
1504 ("python-pillow" ,python-pillow)
1505 ("python-pytest" ,python-pytest)))
1506 (propagated-inputs
1507 `(("python-et-xmlfile" ,python-et-xmlfile)
1508 ("python-jdcal" ,python-jdcal)))
1509 (home-page "https://openpyxl.readthedocs.io")
1510 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1511 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1512XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1513standard.")
1514 (license license:expat)))
1515
1516(define-public python-eventlet
1517 (package
1518 (name "python-eventlet")
1519 (version "0.25.1")
1520 (source
1521 (origin
1522 (method url-fetch)
1523 (uri (pypi-uri "eventlet" version))
1524 (sha256
1525 (base32
1526 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1527 (build-system python-build-system)
1528 (propagated-inputs
1529 `(("python-greenlet" ,python-greenlet)))
1530 (arguments
1531 ;; TODO: Requires unpackaged 'enum-compat'.
1532 '(#:tests? #f))
1533 (home-page "https://eventlet.net")
1534 (synopsis "Concurrent networking library for Python")
1535 (description
1536 "Eventlet is a concurrent networking library for Python that
1537allows you to change how you run your code, not how you write it.
1538It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1539Coroutines ensure that the developer uses a blocking style of programming
1540that is similar to threading, but provide the benefits of non-blocking I/O.
1541The event dispatch is implicit, which means you can easily use @code{Eventlet}
1542from the Python interpreter, or as a small part of a larger application.")
1543 (license license:expat)))
1544
1545(define-public python2-eventlet
1546 (let ((base (package-with-python2
1547 (strip-python2-variant python-eventlet))))
1548 (package (inherit base)
1549 (propagated-inputs
1550 `(("python2-enum34" ,python2-enum34)
1551 ,@(package-propagated-inputs base))))))
1552
1553(define-public python-six
1554 (package
1555 (name "python-six")
1556 (version "1.12.0")
1557 (source
1558 (origin
1559 (method url-fetch)
1560 (uri (pypi-uri "six" version))
1561 (sha256
1562 (base32
1563 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1564 (build-system python-build-system)
1565 (arguments
1566 `(#:phases
1567 (modify-phases %standard-phases
1568 (replace 'check
1569 (lambda _
1570 (invoke "py.test" "-v"))))))
1571 (native-inputs
1572 `(("python-py" ,python-py)
1573 ("python-pytest" ,python-pytest-bootstrap)))
1574 (home-page "https://pypi.org/project/six/")
1575 (synopsis "Python 2 and 3 compatibility utilities")
1576 (description
1577 "Six is a Python 2 and 3 compatibility library. It provides utility
1578functions for smoothing over the differences between the Python versions with
1579the goal of writing Python code that is compatible on both Python versions.
1580Six supports every Python version since 2.5. It is contained in only one
1581Python file, so it can be easily copied into your project.")
1582 (license license:x11)))
1583
1584(define-public python2-six
1585 (package-with-python2 python-six))
1586
1587(define-public python-six-bootstrap
1588 (package
1589 (inherit python-six)
1590 (name "python-six-bootstrap")
1591 (native-inputs `())
1592 (arguments `(#:tests? #f))))
1593
1594(define-public python2-six-bootstrap
1595 (package-with-python2 python-six-bootstrap))
1596
1597(define-public python-schedule
1598 (package
1599 (name "python-schedule")
1600 (version "0.4.3")
1601 (source
1602 (origin
1603 (method url-fetch)
1604 (uri (pypi-uri "schedule" version))
1605 (sha256
1606 (base32
1607 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1608 (build-system python-build-system)
1609 (native-inputs
1610 `(("python-pytest" ,python-pytest)
1611 ("python-mock" ,python-mock)))
1612 (home-page "https://github.com/dbader/schedule")
1613 (synopsis "Schedule periodic function calls in Python")
1614 (description
1615 "Schedule is an in-process scheduler for periodic jobs that uses the
1616builder pattern for configuration. Schedule lets you run Python functions (or
1617any other callable) periodically at pre-determined intervals using a simple,
1618human-friendly syntax.")
1619 (license license:expat)))
1620
1621(define-public python2-schedule
1622 (package-with-python2 python-schedule))
1623
1624(define-public python2-mechanize
1625 (package
1626 (name "python2-mechanize")
1627 (version "0.2.5")
1628 (source
1629 (origin
1630 (method url-fetch)
1631 (uri (pypi-uri "mechanize" version))
1632 (sha256
1633 (base32
1634 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1635 (build-system python-build-system)
1636 (arguments
1637 `(#:python ,python-2 ; apparently incompatible with Python 3
1638 #:tests? #f))
1639 ;; test fails with message
1640 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1641 ;; (python-3.3.2) or
1642 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1643 ;; (python-2.7.5).
1644 ;; The source code is from March 2011 and probably not up-to-date
1645 ;; with respect to python unit tests.
1646 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1647 (synopsis
1648 "Stateful programmatic web browsing in Python")
1649 (description
1650 "Mechanize implements stateful programmatic web browsing in Python,
1651after Andy Lester’s Perl module WWW::Mechanize.")
1652 (license (license:non-copyleft
1653 "file://COPYING"
1654 "See COPYING in the distribution."))))
1655
1656
1657(define-public python-simplejson
1658 (package
1659 (name "python-simplejson")
1660 (version "3.14.0")
1661 (source
1662 (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "simplejson" version))
1665 (sha256
1666 (base32
1667 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1668 (build-system python-build-system)
1669 (home-page "http://simplejson.readthedocs.org/en/latest/")
1670 (synopsis
1671 "Json library for Python")
1672 (description
1673 "JSON (JavaScript Object Notation) is a subset of JavaScript
1674syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1675format.
1676
1677Simplejson exposes an API familiar to users of the standard library marshal
1678and pickle modules. It is the externally maintained version of the json
1679library contained in Python 2.6, but maintains compatibility with Python 2.5
1680and (currently) has significant performance advantages, even without using
1681the optional C extension for speedups. Simplejson is also supported on
1682Python 3.3+.")
1683 (license license:x11)))
1684
1685(define-public python2-simplejson
1686 (package-with-python2 python-simplejson))
1687
1688
1689(define-public python-pyicu
1690 (package
1691 (name "python-pyicu")
1692 (version "2.3.1")
1693 (source
1694 (origin
1695 (method url-fetch)
1696 (uri (pypi-uri "PyICU" version))
1697 (sha256
1698 (base32
1699 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1700 (build-system python-build-system)
1701 (inputs
1702 `(("icu4c" ,icu4c)))
1703 (native-inputs
1704 `(("python-pytest" ,python-pytest)
1705 ("python-six" ,python-six)))
1706 (home-page "https://github.com/ovalhub/pyicu")
1707 (synopsis "Python extension wrapping the ICU C++ API")
1708 (description
1709 "PyICU is a python extension wrapping the ICU C++ API.")
1710 (properties `((python2-variant . ,(delay python2-pyicu))))
1711 (license license:x11)))
1712
1713(define-public python2-pyicu
1714 (let ((base (package-with-python2
1715 (strip-python2-variant python-pyicu))))
1716 (package
1717 (inherit base)
1718 (arguments
1719 `(,@(package-arguments base)
1720 #:phases
1721 (modify-phases %standard-phases
1722 (add-before 'check 'delete-failing-test
1723 (λ _
1724 ;; XXX: This fails due to Unicode issues unique to Python 2,
1725 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1726 (delete-file "test/test_Script.py")
1727 #t))))))))
1728
1729(define-public python2-dogtail
1730 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1731 ;; spaces in indentation" with Python 3.
1732 (package
1733 (name "python2-dogtail")
1734 (version "0.9.9")
1735 (source (origin
1736 (method url-fetch)
1737 (uri (pypi-uri "dogtail" version))
1738 (sha256
1739 (base32
1740 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1741 (build-system python-build-system)
1742 (arguments `(#:python ,python-2
1743 #:tests? #f)) ; invalid command "test"
1744 ;; Currently no offical homepage.
1745 (home-page "https://pypi.org/project/dogtail/")
1746 (synopsis "GUI test tool and automation framework written in Python")
1747 (description
1748 "Dogtail is a GUI test tool and automation framework written in Python.
1749It uses Accessibility (a11y) technologies to communicate with desktop
1750applications. dogtail scripts are written in Python and executed like any
1751other Python program.")
1752 (license license:gpl2+)))
1753
1754(define-public python-empy
1755 (package
1756 (name "python-empy")
1757 (version "3.3.3")
1758 (source (origin
1759 (method url-fetch)
1760 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1761 version ".tar.gz"))
1762 (sha256
1763 (base32
1764 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1765 (build-system python-build-system)
1766 (arguments
1767 `(#:tests? #f)) ; python2 only
1768 (home-page "http://www.alcyone.com/software/empy/")
1769 (synopsis "Templating system for Python")
1770 (description
1771 "EmPy is a system for embedding Python expressions and statements in
1772template text; it takes an EmPy source file, processes it, and produces
1773output. This is accomplished via expansions, which are special signals to the
1774EmPy system and are set off by a special prefix (by default the at sign, @@).
1775EmPy can expand arbitrary Python expressions and statements in this way, as
1776well as a variety of special forms. Textual data not explicitly delimited in
1777this way is sent unaffected to the output, allowing Python to be used in
1778effect as a markup language. Also supported are callbacks via hooks,
1779recording and playback via diversions, and dynamic, chainable filters. The
1780system is highly configurable via command line options and embedded
1781commands.")
1782 (license license:lgpl2.1+)))
1783
1784(define-public python2-empy
1785 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1786 (package
1787 (inherit base)
1788 (arguments `(,@(package-arguments base)
1789 #:tests? #t)))))
1790
1791(define-public python2-element-tree
1792 (package
1793 (name "python2-element-tree")
1794 (version "1.2.6")
1795 (source (origin
1796 (method url-fetch)
1797 (uri (string-append
1798 "http://effbot.org/media/downloads/elementtree-"
1799 version "-20050316.tar.gz"))
1800 (sha256
1801 (base32
1802 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1803 (build-system python-build-system)
1804 (arguments
1805 `(#:python ,python-2 ; seems to be part of Python 3
1806 #:tests? #f)) ; no 'test' sub-command
1807 (synopsis "Toolkit for XML processing in Python")
1808 (description
1809 "ElementTree is a Python library supporting lightweight XML processing.")
1810 (home-page "https://effbot.org/zone/element-index.htm")
1811 (license (license:x11-style
1812 "http://docs.python.org/2/license.html"
1813 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1814
1815(define-public python2-pybugz
1816 (package
1817 (name "python2-pybugz")
1818 (version "0.6.11")
1819 (source (origin
1820 (method url-fetch)
1821 (uri (string-append
1822 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1823 version ".tar.gz"))
1824 (sha256
1825 (base32
1826 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1827 (patches (search-patches "pybugz-stty.patch"
1828 "pybugz-encode-error.patch"))))
1829 (build-system python-build-system)
1830 (arguments
1831 `(#:python ,python-2 ; SyntaxError with Python 3
1832 #:tests? #f)) ; no 'test' sub-command
1833 (propagated-inputs
1834 `(("element-tree" ,python2-element-tree)))
1835 (synopsis "Python and command-line interface to Bugzilla")
1836 (description
1837 "PyBugz is a Python library and command-line tool to query the Bugzilla
1838bug tracking system. It is meant as an aid to speed up interaction with the
1839bug tracker.")
1840 (home-page "http://www.liquidx.net/pybugz/")
1841 (license license:gpl2)))
1842
1843(define-public python2-enum
1844 (package
1845 (name "python2-enum")
1846 (version "0.4.6")
1847 (source (origin
1848 (method url-fetch)
1849 (uri (pypi-uri "enum" version))
1850 (sha256
1851 (base32
1852 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1853 (build-system python-build-system)
1854 (arguments
1855 `(#:python ,python-2))
1856 (home-page "https://pypi.org/project/enum/")
1857 (synopsis "Robust enumerated type support in Python")
1858 (description
1859 "This provides a module for robust enumerations in Python. It has
1860been superseded by the Python standard library and is provided only for
1861compatibility.")
1862 ;; Choice of either license.
1863 (license (list license:gpl3+ license:psfl))))
1864
1865(define-public python-enum34
1866 (package
1867 (name "python-enum34")
1868 (version "1.1.6")
1869 (source
1870 (origin
1871 (method url-fetch)
1872 (uri (pypi-uri "enum34" version))
1873 (sha256
1874 (base32
1875 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1876 (build-system python-build-system)
1877 (home-page "https://pypi.org/project/enum34/")
1878 (synopsis "Backported Python 3.4 Enum")
1879 (description
1880 "Enum34 is the new Python stdlib enum module available in Python 3.4
1881backported for previous versions of Python from 2.4 to 3.3.")
1882 (license license:bsd-3)))
1883
1884(define-public python2-enum34
1885 (package-with-python2 python-enum34))
1886
1887(define-public python-parse-type
1888 (package
1889 (name "python-parse-type")
1890 (version "0.4.2")
1891 (source
1892 (origin
1893 (method url-fetch)
1894 (uri (pypi-uri "parse_type" version))
1895 (sha256
1896 (base32
1897 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1898 (build-system python-build-system)
1899 (propagated-inputs
1900 `(("python-six" ,python-six)
1901 ("python-parse" ,python-parse)))
1902 (native-inputs
1903 `(("python-pytest" ,python-pytest)
1904 ("python-pytest-runner" ,python-pytest-runner)))
1905 (home-page "https://github.com/jenisys/parse_type")
1906 (synopsis "Extended parse module")
1907 (description
1908 "Parse_type extends the python parse module.")
1909 (properties
1910 `((python2-variant . ,(delay python2-parse-type))))
1911 (license license:bsd-3)))
1912
1913(define-public python2-parse-type
1914 (let ((base (package-with-python2
1915 (strip-python2-variant python-parse-type))))
1916 (package (inherit base)
1917 (propagated-inputs
1918 `(("python2-enum34" ,python2-enum34)
1919 ,@(package-propagated-inputs base))))))
1920
1921(define-public python-parse
1922 (package
1923 (name "python-parse")
1924 (version "1.8.4")
1925 (source
1926 (origin
1927 (method url-fetch)
1928 (uri (pypi-uri "parse" version))
1929 (sha256
1930 (base32
1931 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1932 (build-system python-build-system)
1933 (arguments
1934 `(#:phases
1935 (modify-phases %standard-phases
1936 (replace 'check
1937 (lambda _ (invoke "python" "test_parse.py"))))))
1938 (home-page "https://github.com/r1chardj0n3s/parse")
1939 (synopsis "Parse strings")
1940 (description
1941 "Parse strings using a specification based on the Python @code{format()}
1942syntax.")
1943 (license license:x11)))
1944
1945(define-public python-polib
1946 (package
1947 (name "python-polib")
1948 (version "1.0.8")
1949 (source (origin
1950 (method url-fetch)
1951 (uri (pypi-uri "polib" version))
1952 (sha256
1953 (base32
1954 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1955 (build-system python-build-system)
1956 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1957 (synopsis "Manipulate, create and modify gettext files")
1958 (description "Polib can manipulate any gettext format (po, pot and mo)
1959files. It can be used to create po files from scratch or to modify
1960existing ones.")
1961 (license license:expat)))
1962
1963(define-public python2-polib
1964 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1965 (package
1966 (inherit base)
1967 (arguments `(,@(package-arguments base)
1968 ;; Tests don't work with python2.
1969 #:tests? #f)))))
1970
1971(define-public python-poyo
1972 (package
1973 (name "python-poyo")
1974 (version "0.5.0")
1975 (source
1976 (origin
1977 (method url-fetch)
1978 (uri (pypi-uri "poyo" version))
1979 (sha256
1980 (base32
1981 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1982 (build-system python-build-system)
1983 (home-page "https://github.com/hackebrot/poyo")
1984 (synopsis "Lightweight YAML Parser for Python")
1985 (description
1986 "This package provides a lightweight YAML Parser for Python. It supports
1987only a chosen subset of the YAML format that is required to parse cookiecutter
1988user configuration files. It does not have support for serializing into YAML
1989and is not compatible with JSON.")
1990 (license license:expat)))
1991
1992(define-public scons
1993 (package
1994 (name "scons")
1995 (version "3.0.4")
1996 (source (origin
1997 (method git-fetch)
1998 (uri (git-reference
1999 (url "https://github.com/SCons/scons.git")
2000 (commit version)))
2001 (file-name (git-file-name name version))
2002 (sha256
2003 (base32
2004 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2005 (build-system python-build-system)
2006 (arguments
2007 `(#:use-setuptools? #f ; still relies on distutils
2008 #:tests? #f ; no 'python setup.py test' command
2009 #:phases
2010 (modify-phases %standard-phases
2011 (add-before 'build 'bootstrap
2012 (lambda _
2013 (substitute* "src/engine/SCons/compat/__init__.py"
2014 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2015 "sys.modules[new] = __import__(old)"))
2016 (substitute* "src/engine/SCons/Platform/__init__.py"
2017 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2018 "mod = __import__(full_name)"))
2019 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2020 (chdir "build/scons")
2021 #t)))))
2022 (home-page "https://scons.org/")
2023 (synopsis "Software construction tool written in Python")
2024 (description
2025 "SCons is a software construction tool. Think of SCons as an improved,
2026cross-platform substitute for the classic Make utility with integrated
2027functionality similar to autoconf/automake and compiler caches such as ccache.
2028In short, SCons is an easier, more reliable and faster way to build
2029software.")
2030 (license license:x11)))
2031
2032(define-public scons-python2
2033 (package
2034 (inherit (package-with-python2 scons))
2035 (name "scons-python2")))
2036
2037(define-public python-extras
2038 (package
2039 (name "python-extras")
2040 (version "1.0.0")
2041 (source
2042 (origin
2043 (method url-fetch)
2044 (uri (pypi-uri "extras" version))
2045 (sha256
2046 (base32
2047 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2048 (build-system python-build-system)
2049 (arguments
2050 ;; FIXME: Circular dependency on testtools.
2051 '(#:tests? #f))
2052 (home-page "https://github.com/testing-cabal/extras")
2053 (synopsis "Useful extensions to the Python standard library")
2054 (description
2055 "Extras is a set of extensions to the Python standard library.")
2056 (license license:expat)))
2057
2058(define-public python2-extras
2059 (package-with-python2 python-extras))
2060
2061(define-public python-mimeparse
2062 (package
2063 (name "python-mimeparse")
2064 (version "1.6.0")
2065 (source
2066 (origin
2067 (method url-fetch)
2068 (uri (pypi-uri "python-mimeparse" version))
2069 (sha256
2070 (base32
2071 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2072 (build-system python-build-system)
2073 (arguments
2074 '(#:phases
2075 (modify-phases %standard-phases
2076 (replace 'check
2077 (lambda _
2078 (invoke "./mimeparse_test.py"))))))
2079 (home-page
2080 "https://github.com/dbtsai/python-mimeparse")
2081 (synopsis "Python library for parsing MIME types")
2082 (description
2083 "Mimeparse provides basic functions for parsing MIME type names and
2084matching them against a list of media-ranges.")
2085 (license license:expat)))
2086
2087(define-public python2-mimeparse
2088 (package-with-python2 python-mimeparse))
2089
2090(define-public python-miniboa
2091 (package
2092 (name "python-miniboa")
2093 (version "1.0.7")
2094 (source
2095 (origin
2096 (method url-fetch)
2097 (uri (pypi-uri "miniboa" version))
2098 (sha256
2099 (base32
2100 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2101 (build-system python-build-system)
2102 (home-page "https://github.com/shmup/miniboa")
2103 (synopsis "Simple, single-threaded Telnet server")
2104 (description
2105 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2106server.")
2107 (license license:asl2.0)))
2108
2109(define-public python2-miniboa
2110 (package-with-python2 python-miniboa))
2111
2112(define-public python-pafy
2113 (package
2114 (name "python-pafy")
2115 (version "0.5.3.1")
2116 (source
2117 (origin
2118 (method url-fetch)
2119 (uri (pypi-uri "pafy" version))
2120 (sha256
2121 (base32
2122 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2123 (build-system python-build-system)
2124 (arguments
2125 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2126 (propagated-inputs
2127 ;; Youtube-dl is a python package which is imported in the file
2128 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2129 `(("youtube-dl" ,youtube-dl)))
2130 (home-page "https://np1.github.io/pafy/")
2131 (synopsis "Retrieve YouTube content and metadata")
2132 (description
2133 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2134 (license license:lgpl3+)))
2135
2136(define-public python2-funcsigs
2137 (package
2138 (name "python2-funcsigs")
2139 (version "1.0.2")
2140 (source (origin
2141 (method url-fetch)
2142 (uri (pypi-uri "funcsigs" version))
2143 (sha256
2144 (base32
2145 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2146 (build-system python-build-system)
2147 (arguments
2148 `(#:python ,python-2))
2149 (native-inputs
2150 `(("python2-unittest2" ,python2-unittest2)))
2151 (home-page "http://funcsigs.readthedocs.org")
2152 (synopsis "Python function signatures from PEP362")
2153 (description
2154 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2155 (license license:asl2.0)))
2156
2157(define-public python2-funcsigs-bootstrap
2158 (package
2159 (inherit python2-funcsigs)
2160 (name "python2-funcsigs-bootstrap")
2161 (native-inputs `())
2162 (arguments
2163 `(#:tests? #f
2164 ,@(package-arguments python2-funcsigs)))))
2165
2166(define-public python-py
2167 (package
2168 (name "python-py")
2169 (version "1.8.0")
2170 (source
2171 (origin
2172 (method url-fetch)
2173 (uri (pypi-uri "py" version))
2174 (sha256
2175 (base32
2176 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
2177 (build-system python-build-system)
2178 (arguments
2179 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2180 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2181 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2182 ;; Is this module globally installed?"
2183 '(#:tests? #f))
2184 (native-inputs
2185 `(("python-setuptools-scm" ,python-setuptools-scm)))
2186 (home-page "https://github.com/pytest-dev/py")
2187 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2188 (description
2189 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2190code introspection, and logging.")
2191 (license license:expat)))
2192
2193(define-public python2-py
2194 (package-with-python2 python-py))
2195
2196;; Recent versions of python-fixtures and python-testrepository need
2197;; python-pbr for packaging, which itself needs these two packages for
2198;; testing.
2199;; To fix this circular dependency, we use a build of python-pbr, based on the
2200;; same source, just without any test dependencies and with tests disabled.
2201;; python-pbr-minmal is then used to package python-fixtures and
2202;; python-testrepository.
2203;; Strictly speaking we currently could remove the test-requirements from the
2204;; normal python-pbr package (and save this package) since test are disabled
2205;; there anyway. But this may change in future.
2206(define-public python-pbr-minimal
2207 (package
2208 (name "python-pbr-minimal")
2209 (version "3.0.1")
2210 (source
2211 (origin
2212 (method url-fetch)
2213 (uri (pypi-uri "pbr" version))
2214 (sha256
2215 (base32
2216 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2217 (build-system python-build-system)
2218 (arguments
2219 `(#:tests? #f))
2220 (home-page "https://docs.openstack.org/pbr/latest/")
2221 (synopsis "Minimal build of python-pbr used for bootstrapping")
2222 (description
2223 "Used only for bootstrapping python2-pbr, you should not need this.")
2224 (license license:asl2.0)))
2225
2226(define-public python2-pbr-minimal
2227 (package-with-python2 python-pbr-minimal))
2228
2229(define-public python-pbr
2230 (package
2231 (inherit python-pbr-minimal)
2232 (name "python-pbr")
2233 (arguments
2234 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2235 (propagated-inputs
2236 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2237 (native-inputs
2238 `(("python-fixtures" ,python-fixtures-bootstrap)
2239 ;; discover, coverage, hacking, subunit
2240 ("python-mock" ,python-mock)
2241 ("python-six" ,python-six)
2242 ("python-sphinx" ,python-sphinx)
2243 ("python-testrepository" ,python-testrepository-bootstrap)
2244 ("python-testresources" ,python-testresources-bootstrap)
2245 ("python-testscenarios" ,python-testscenarios-bootstrap)
2246 ("python-testtools" ,python-testtools-bootstrap)
2247 ("python-virtualenv" ,python-virtualenv)))
2248 (synopsis "Enhance the default behavior of Python’s setuptools")
2249 (description
2250 "Python Build Reasonableness (PBR) is a library that injects some useful
2251and sensible default behaviors into your setuptools run. It will set
2252versions, process requirements files and generate AUTHORS and ChangeLog file
2253from git information.
2254")))
2255
2256(define-public python2-pbr
2257 (package-with-python2 python-pbr))
2258
2259(define-public python-pyrsistent
2260 (package
2261 (name "python-pyrsistent")
2262 (version "0.15.7")
2263 (home-page "https://github.com/tobgu/pyrsistent")
2264 (source (origin
2265 (method url-fetch)
2266 (uri (pypi-uri "pyrsistent" version))
2267 (sha256
2268 (base32
2269 "103j63g6lb5dfspph96zxjdpnq9h991kazd4f09ddgkpxpivbiyd"))))
2270 (build-system python-build-system)
2271 (native-inputs
2272 `(("python-hypothesis" ,python-hypothesis)
2273 ("python-pytest" ,python-pytest)
2274 ("python-pytest-runner" ,python-pytest-runner)))
2275 (propagated-inputs
2276 `(("python-six" ,python-six)))
2277 (synopsis "Persistent data structures for Python")
2278 (description
2279 "Pyrsistent is a number of persistent collections (by some referred to as
2280functional data structures). Persistent in the sense that they are immutable.
2281
2282All methods on a data structure that would normally mutate it instead return a
2283new copy of the structure containing the requested updates. The original
2284structure is left untouched.")
2285 (license license:expat)))
2286
2287(define-public python2-pyrsistent
2288 (package-with-python2 python-pyrsistent))
2289
2290(define-public python-exif-read
2291 (package
2292 (name "python-exif-read")
2293 (version "2.1.2")
2294 (source (origin
2295 (method url-fetch)
2296 (uri (pypi-uri "ExifRead" version))
2297 (sha256
2298 (base32
2299 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2300 (build-system python-build-system)
2301 (arguments `(#:tests? #f)) ; no tests
2302 (home-page "https://github.com/ianare/exif-py")
2303 (synopsis "Python library to extract EXIF data from image files")
2304 (description
2305 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2306files.")
2307 (license license:bsd-3)))
2308
2309(define-public python2-exif-read
2310 (package-with-python2 python-exif-read))
2311
2312(define-public python-pyld
2313 (package
2314 (name "python-pyld")
2315 (version "1.0.5")
2316 (source (origin
2317 (method url-fetch)
2318 (uri (pypi-uri "PyLD" version))
2319 (sha256
2320 (base32
2321 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2322 (build-system python-build-system)
2323 (home-page "https://github.com/digitalbazaar/pyld")
2324 (synopsis "Python implementation of the JSON-LD specification")
2325 (description
2326 "PyLD is an implementation of the JSON-LD specification.")
2327 (license license:bsd-3)))
2328
2329(define-public python2-pyld
2330 (package-with-python2 python-pyld))
2331
2332(define-public python-click
2333 (package
2334 (name "python-click")
2335 (version "7.0")
2336 (source
2337 (origin
2338 (method url-fetch)
2339 (uri (pypi-uri "click" version))
2340 (sha256
2341 (base32
2342 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
2343 (build-system python-build-system)
2344 (arguments
2345 `(#:phases
2346 (modify-phases %standard-phases
2347 (add-after 'unpack 'fix-paths
2348 (lambda* (#:key inputs #:allow-other-keys)
2349 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2350 "cross-libc" "libc"))))
2351 (substitute* "click/_unicodefun.py"
2352 (("'locale'")
2353 (string-append "'" glibc "/bin/locale'"))))
2354 #t))
2355 (replace 'check
2356 (lambda _
2357 (invoke "python" "-m" "pytest"))))))
2358 (native-inputs
2359 `(("python-pytest" ,python-pytest)))
2360 (home-page "https://palletsprojects.com/p/click/")
2361 (synopsis "Command line library for Python")
2362 (description
2363 "Click is a Python package for creating command line interfaces in a
2364composable way with as little code as necessary. Its name stands for
2365\"Command Line Interface Creation Kit\". It's highly configurable but comes
2366with sensible defaults out of the box.")
2367 (license license:bsd-3)))
2368
2369(define-public python2-click
2370 (package-with-python2 python-click))
2371
2372(define-public python-wheel
2373 (package
2374 (name "python-wheel")
2375 (version "0.33.6")
2376 (source
2377 (origin
2378 (method url-fetch)
2379 (uri (pypi-uri "wheel" version))
2380 (sha256
2381 (base32
2382 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2383 (build-system python-build-system)
2384 (arguments
2385 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2386 ;; fails to find the newly-built bdist_wheel library, even though it is
2387 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2388 '(#:tests? #f))
2389 (home-page "https://bitbucket.org/pypa/wheel/")
2390 (synopsis "Format for built Python packages")
2391 (description
2392 "A wheel is a ZIP-format archive with a specially formatted filename and
2393the @code{.whl} extension. It is designed to contain all the files for a PEP
2394376 compatible install in a way that is very close to the on-disk format. Many
2395packages will be properly installed with only the @code{Unpack} step and the
2396unpacked archive preserves enough information to @code{Spread} (copy data and
2397scripts to their final locations) at any later time. Wheel files can be
2398installed with a newer @code{pip} or with wheel's own command line utility.")
2399 (license license:expat)))
2400
2401(define-public python2-wheel
2402 (package-with-python2 python-wheel))
2403
2404(define-public python-vcversioner
2405 (package
2406 (name "python-vcversioner")
2407 (version "2.16.0.0")
2408 (source
2409 (origin
2410 (method url-fetch)
2411 (uri (pypi-uri "vcversioner" version))
2412 (sha256
2413 (base32
2414 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2415 (build-system python-build-system)
2416 (synopsis "Python library for version number discovery")
2417 (description "Vcversioner is a Python library that inspects tagging
2418information in a variety of version control systems in order to discover
2419version numbers.")
2420 (home-page "https://github.com/habnabit/vcversioner")
2421 (license license:isc)))
2422
2423(define-public python2-vcversioner
2424 (package-with-python2 python-vcversioner))
2425
2426(define-public python-jdcal
2427 (package
2428 (name "python-jdcal")
2429 (version "1.4")
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "jdcal" version))
2434 (sha256
2435 (base32
2436 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2437 (build-system python-build-system)
2438 (arguments
2439 `(#:phases (modify-phases %standard-phases
2440 (replace 'check
2441 (lambda _
2442 (invoke "pytest"))))))
2443 (native-inputs
2444 `(("python-pytest" ,python-pytest)))
2445 (home-page "https://github.com/phn/jdcal")
2446 (synopsis "Functions to convert between Julian dates Gregorian dates")
2447 (description "This Python library provides functions for converting
2448between Julian dates and Gregorian dates.")
2449 (license license:bsd-2)))
2450
2451(define-public python2-jdcal
2452 (package-with-python2 python-jdcal))
2453
2454(define-public python-jsondiff
2455 (package
2456 (name "python-jsondiff")
2457 (version "1.2.0")
2458 (source
2459 (origin
2460 (method url-fetch)
2461 (uri (pypi-uri "jsondiff" version))
2462 (sha256
2463 (base32
2464 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2465 (build-system python-build-system)
2466 (native-inputs
2467 `(("python-nose" ,python-nose)
2468 ("python-nose-random" ,python-nose-random)))
2469 (home-page
2470 "https://github.com/fzumstein/jsondiff")
2471 (synopsis "Compare JSON and JSON-like structures in Python")
2472 (description "@code{jsondiff} is a Python library which lets you
2473compare, diff, and patch JSON and JSON-like structures in Python.")
2474 (license license:expat)))
2475
2476(define-public python-jsonschema
2477 (package
2478 (name "python-jsonschema")
2479 (version "3.2.0")
2480 (source (origin
2481 (method url-fetch)
2482 (uri (pypi-uri "jsonschema" version))
2483 (sha256
2484 (base32
2485 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2486 (build-system python-build-system)
2487 (arguments
2488 '(#:phases
2489 (modify-phases %standard-phases
2490 (replace 'check
2491 (lambda* (#:key inputs outputs #:allow-other-keys)
2492 (add-installed-pythonpath inputs outputs)
2493 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2494 (invoke "trial" "jsonschema"))))))
2495 (native-inputs
2496 `(("python-setuptools_scm" ,python-setuptools-scm)
2497 ("python-twisted" ,python-twisted)))
2498 (propagated-inputs
2499 `(("python-attrs" ,python-attrs)
2500 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2501 ("python-pyrsistent" ,python-pyrsistent)
2502 ("python-six" ,python-six)))
2503 (home-page "https://github.com/Julian/jsonschema")
2504 (synopsis "Implementation of JSON Schema for Python")
2505 (description
2506 "Jsonschema is an implementation of JSON Schema for Python.")
2507 (license license:expat)
2508 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2509
2510(define-public python2-jsonschema
2511 (let ((jsonschema (package-with-python2
2512 (strip-python2-variant python-jsonschema))))
2513 (package (inherit jsonschema)
2514 (propagated-inputs
2515 `(("python2-functools32" ,python2-functools32)
2516 ,@(package-propagated-inputs jsonschema))))))
2517
2518(define-public python-schema
2519 (package
2520 (name "python-schema")
2521 (version "0.6.6")
2522 (source
2523 (origin
2524 (method url-fetch)
2525 (uri (pypi-uri "schema" version))
2526 (sha256
2527 (base32
2528 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2529 (build-system python-build-system)
2530 (native-inputs
2531 `(("python-pytest" ,python-pytest)))
2532 (home-page "https://github.com/keleshev/schema")
2533 (synopsis "Simple data validation library")
2534 (description
2535 "@code{python-schema} is a library for validating Python data
2536structures, such as those obtained from config-files, forms, external
2537services or command-line parsing, converted from JSON/YAML (or
2538something else) to Python data-types.")
2539 (license license:psfl)))
2540
2541(define-public python2-schema
2542 (package-with-python2 python-schema))
2543
2544(define-public python-schema-0.5
2545 (package (inherit python-schema)
2546 (version "0.5.0")
2547 (source
2548 (origin
2549 (method url-fetch)
2550 (uri (pypi-uri "schema" version))
2551 (sha256
2552 (base32
2553 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2554
2555(define-public python2-schema-0.5
2556 (package-with-python2 python-schema-0.5))
2557
2558(define-public python-kitchen
2559 (package
2560 (name "python-kitchen")
2561 (version "1.2.5")
2562 (source
2563 (origin
2564 (method url-fetch)
2565 (uri (pypi-uri "kitchen" version))
2566 (sha256
2567 (base32
2568 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2569 (build-system python-build-system)
2570 (propagated-inputs
2571 `(("python-chardet" ,python-chardet)))
2572 (home-page "https://github.com/fedora-infra/kitchen")
2573 (synopsis "Python API for snippets")
2574 (description "@code{kitchen} module provides a python API for all sorts of
2575little useful snippets of code that everybody ends up writing for their projects
2576but never seem big enough to build an independent release. Use kitchen and stop
2577cutting and pasting that code over and over.")
2578 (license (list license:lgpl2.1+
2579 ;; subprocess.py, test_subprocess.py,
2580 ;; kitchen/pycompat25/defaultdict.py:
2581 license:psfl))))
2582
2583(define-public python2-kitchen
2584 (package-with-python2 python-kitchen))
2585
2586(define-public python-unidecode
2587 (package
2588 (name "python-unidecode")
2589 (version "1.1.1")
2590 (source (origin
2591 (method url-fetch)
2592 (uri (pypi-uri "Unidecode" version))
2593 (sha256
2594 (base32
2595 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2596 (build-system python-build-system)
2597 (home-page "https://pypi.org/project/Unidecode/")
2598 (synopsis "ASCII transliterations of Unicode text")
2599 (description
2600 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2601useful when integrating with legacy code that doesn't support Unicode, or for
2602ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2603machine identifiers from human-readable Unicode strings that should still be
2604somewhat intelligible.")
2605 (license license:gpl2+)))
2606
2607(define-public python2-unidecode
2608 (package-with-python2 python-unidecode))
2609
2610(define-public python-text-unidecode
2611 (package
2612 (name "python-text-unidecode")
2613 (version "1.3")
2614 (source (origin
2615 (method url-fetch)
2616 (uri (pypi-uri "text-unidecode" version))
2617 (sha256
2618 (base32
2619 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2620 (build-system python-build-system)
2621 (arguments
2622 '(#:phases (modify-phases %standard-phases
2623 (replace 'check
2624 (lambda _
2625 (setenv "PYTHONPATH"
2626 (string-append "./build/lib:"
2627 (getenv "PYTHONPATH")))
2628 (invoke "pytest" "-vv"))))))
2629 (native-inputs
2630 `(("python-pytest" ,python-pytest)))
2631 (home-page "https://github.com/kmike/text-unidecode/")
2632 (synopsis "Decode Unicode data")
2633 (description
2634 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2635Perl library. It can create ASCII representations of Unicode data. In general
2636users should prefer the @code{python-unidecode} package which offers better
2637memory usage and transliteration quality.")
2638 ;; The user can choose either license.
2639 (license (list license:clarified-artistic license:gpl2+))))
2640
2641(define-public python2-text-unidecode
2642 (package-with-python2 python-text-unidecode))
2643
2644(define-public python-pyjwt
2645 (package
2646 (name "python-pyjwt")
2647 (version "1.7.1")
2648 (source
2649 (origin
2650 (method url-fetch)
2651 (uri (pypi-uri "PyJWT" version))
2652 (sha256
2653 (base32
2654 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2655 (modules '((guix build utils)))
2656 (snippet
2657 '(begin
2658 (for-each delete-file-recursively
2659 (find-files "." "\\.pyc$"))
2660 #t))))
2661 (build-system python-build-system)
2662 (native-inputs
2663 `(("python-pytest" ,python-pytest)
2664 ("python-pytest-cov" ,python-pytest-cov)
2665 ("python-pytest-runner" ,python-pytest-runner)))
2666 (home-page "https://github.com/progrium/pyjwt")
2667 (synopsis "JSON Web Token implementation in Python")
2668 (description
2669 "PyJWT is a JSON Web Token implementation written in Python.")
2670 (license license:expat)))
2671
2672(define-public python2-pyjwt
2673 (package-with-python2 python-pyjwt))
2674
2675(define-public python-pykka
2676 (package
2677 (name "python-pykka")
2678 (version "1.2.1")
2679 (source
2680 (origin
2681 (method url-fetch)
2682 (uri (pypi-uri "Pykka" version))
2683 (sha256
2684 (base32
2685 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2686 (build-system python-build-system)
2687 (native-inputs
2688 `(("python-mock" ,python-mock)
2689 ("python-nose" ,python-nose)
2690 ("python-gevent" ,python-gevent)
2691 ("python-eventlet" ,python-eventlet)))
2692 (home-page "https://www.pykka.org/")
2693 (synopsis "Pykka is a Python implementation of the actor model")
2694 (description
2695 "Pykka is a Python implementation of the actor model.
2696The actor model introduces some simple rules to control the sharing
2697of state and cooperation between execution units, which makes it
2698easier to build concurrent applications.")
2699 (license license:asl2.0)))
2700
2701(define-public python2-pykka
2702 (package-with-python2 python-pykka))
2703
2704(define-public python-pymsgbox
2705 (package
2706 (name "python-pymsgbox")
2707 (version "1.0.6")
2708 (source
2709 (origin
2710 (method git-fetch)
2711 (uri (git-reference
2712 ;; LICENSE.txt is not present on pypi
2713 (url "https://github.com/asweigart/PyMsgBox")
2714 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2715 (file-name (git-file-name name version))
2716 (sha256
2717 (base32
2718 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2719 (arguments
2720 ;; Circular dependency to run tests:
2721 ;; Tests need pyautogui, which depends on pymsgbox.
2722 '(#:tests? #f))
2723 (build-system python-build-system)
2724 (home-page "https://github.com/asweigart/PyMsgBox")
2725 (synopsis "Python module for JavaScript-like message boxes")
2726 (description
2727 "PyMsgBox is a simple, cross-platform, pure Python module for
2728JavaScript-like message boxes. Types of dialog boxes include:
2729@enumerate
2730@item alert
2731@item confirm
2732@item prompt
2733@item password
2734@end enumerate
2735")
2736 (license license:bsd-3)))
2737
2738(define-public python-pympler
2739 (package
2740 (name "python-pympler")
2741 (home-page "https://pythonhosted.org/Pympler/")
2742 (version "0.8")
2743 (source (origin
2744 (method url-fetch)
2745 (uri (pypi-uri "Pympler" version))
2746 (sha256
2747 (base32
2748 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2749 (build-system python-build-system)
2750 (arguments
2751 `(#:phases (modify-phases %standard-phases
2752 (delete 'check)
2753 (add-after 'install 'check
2754 (lambda* (#:key inputs outputs #:allow-other-keys)
2755 (add-installed-pythonpath inputs outputs)
2756 (invoke "python" "setup.py" "test"))))))
2757 (synopsis "Measure, monitor and analyze memory behavior")
2758 (description
2759 "Pympler is a development tool to measure, monitor and analyze
2760the memory behavior of Python objects in a running Python application.
2761
2762By pympling a Python application, detailed insight in the size and the
2763lifetime of Python objects can be obtained. Undesirable or unexpected
2764runtime behavior like memory bloat and other @samp{pymples} can easily
2765be identified.
2766
2767A web profiling frontend exposes process statistics, garbage
2768visualisation and class tracker statistics.")
2769 (license license:asl2.0)))
2770
2771(define-public python2-pympler
2772 (package-with-python2 python-pympler))
2773
2774(define-public python-itsdangerous
2775 (package
2776 (name "python-itsdangerous")
2777 (version "1.1.0")
2778 (source
2779 (origin
2780 (method url-fetch)
2781 (uri (pypi-uri "itsdangerous" version))
2782 (sha256
2783 (base32
2784 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2785 (build-system python-build-system)
2786 (home-page "https://palletsprojects.com/p/itsdangerous/")
2787 (synopsis "Python library for passing data to/from untrusted environments")
2788 (description
2789 "Itsdangerous provides various helpers to pass trusted data to untrusted
2790environments and back.")
2791 (license license:bsd-3)))
2792
2793(define-public python2-itsdangerous
2794 (package-with-python2 python-itsdangerous))
2795
2796(define-public python-pyyaml
2797 (package
2798 (name "python-pyyaml")
2799 (version "5.3.1")
2800 (source
2801 (origin
2802 (method url-fetch)
2803 (uri (pypi-uri "PyYAML" version))
2804 (sha256
2805 (base32
2806 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
2807 (build-system python-build-system)
2808 (inputs
2809 `(("libyaml" ,libyaml)))
2810 (home-page "https://pyyaml.org")
2811 (synopsis "YAML parser and emitter for Python")
2812 (description
2813 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2814complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2815API, and sensible error messages. PyYAML supports standard YAML tags and
2816provides Python-specific tags that allow to represent an arbitrary Python
2817object.")
2818 (license license:expat)))
2819
2820(define-public python2-pyyaml
2821 (package-with-python2 python-pyyaml))
2822
2823(define-public python-vine
2824 (package
2825 (name "python-vine")
2826 (version "1.1.4")
2827 (source
2828 (origin
2829 (method url-fetch)
2830 (uri (pypi-uri "vine" version))
2831 (sha256
2832 (base32
2833 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2834 (build-system python-build-system)
2835 (native-inputs
2836 `(("python-pytest" ,python-pytest)
2837 ("python-case" ,python-case)))
2838 (home-page "https://github.com/celery/vine")
2839 (synopsis "Promises for Python")
2840 (description
2841 "@code{vine} provides a special implementation of promises in that it can
2842be used both for \"promise of a value\" and lazy evaluation. The biggest
2843upside for this is that everything in a promise can also be a promise,
2844e.g. filters, callbacks and errbacks can all be promises.")
2845 (license license:bsd-3)))
2846
2847(define-public python-virtualenv
2848 (package
2849 (name "python-virtualenv")
2850 (version "20.0.10")
2851 (source
2852 (origin
2853 (method url-fetch)
2854 (uri (pypi-uri "virtualenv" version))
2855 (sha256
2856 (base32
2857 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
2858 (build-system python-build-system)
2859 (native-inputs
2860 `(("python-mock" ,python-mock)
2861 ("python-pytest" ,python-pytest)
2862 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2863 ;; be an input at all". However, removing the input makes the build error:
2864 ;; File "setup.py", line 4, in <module>
2865 ;; raise RuntimeError("setuptools >= 41 required to build")
2866 ("python-setuptools" ,python-setuptools)
2867 ("python-setuptools-scm" ,python-setuptools-scm)))
2868 (propagated-inputs
2869 `(("python-appdirs" ,python-appdirs)
2870 ("python-distlib" ,python-distlib)
2871 ("python-filelock" ,python-filelock)
2872 ("python-six" ,python-six)
2873 ("python-importlib-metadata" ,python-importlib-metadata)))
2874 (home-page "https://virtualenv.pypa.io/")
2875 (synopsis "Virtual Python environment builder")
2876 (description
2877 "Virtualenv is a tool to create isolated Python environments.")
2878 (properties `((python2-variant . ,(delay python2-virtualenv))))
2879 (license license:expat)))
2880
2881(define-public python2-virtualenv
2882 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2883 (package
2884 (inherit base)
2885 (arguments
2886 `(#:python ,python-2
2887 #:phases
2888 (modify-phases %standard-phases
2889 (add-after 'set-paths 'adjust-PYTHONPATH
2890 (lambda* (#:key inputs #:allow-other-keys)
2891 (let* ((python (assoc-ref inputs "python"))
2892 (python-sitedir (string-append python "/lib/python2.7"
2893 "/site-packages")))
2894 ;; XXX: 'python2' always comes first on PYTHONPATH
2895 ;; and shadows the 'setuptools' input. Move python2
2896 ;; last: this should be fixed in python-build-system
2897 ;; in a future rebuild cycle.
2898 (setenv "PYTHONPATH"
2899 (string-append (string-join (delete python-sitedir
2900 (string-split
2901 (getenv "PYTHONPATH")
2902 #\:))
2903 ":")
2904 ":" python-sitedir))
2905 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2906 (getenv "PYTHONPATH"))
2907 #t))))))
2908 (propagated-inputs
2909 `(("python-contextlib2" ,python2-contextlib2)
2910 ,@(package-propagated-inputs base))))))
2911
2912(define-public python-markupsafe
2913 (package
2914 (name "python-markupsafe")
2915 (version "1.1.1")
2916 (source
2917 (origin
2918 (method url-fetch)
2919 (uri (pypi-uri "MarkupSafe" version))
2920 (sha256
2921 (base32
2922 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2923 (build-system python-build-system)
2924 (arguments
2925 `(#:modules ((ice-9 ftw)
2926 (srfi srfi-1)
2927 (srfi srfi-26)
2928 (guix build utils)
2929 (guix build python-build-system))
2930 #:phases (modify-phases %standard-phases
2931 (replace 'check
2932 (lambda _
2933 (let ((cwd (getcwd))
2934 (libdir (find (cut string-prefix? "lib." <>)
2935 (scandir "build"))))
2936 (setenv "PYTHONPATH"
2937 (string-append cwd "/build/" libdir ":"
2938 (getenv "PYTHONPATH")))
2939 (invoke "pytest" "-vv")))))))
2940 (native-inputs
2941 `(("python-pytest" ,python-pytest)))
2942 (home-page "https://github.com/mitsuhiko/markupsafe")
2943 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2944 (description
2945 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2946for Python.")
2947 (license license:bsd-3)))
2948
2949(define-public python2-markupsafe
2950 (package-with-python2 python-markupsafe))
2951
2952(define-public python-jinja2
2953 (package
2954 (name "python-jinja2")
2955 (version "2.11.1")
2956 (source
2957 (origin
2958 (method url-fetch)
2959 (uri (pypi-uri "Jinja2" version))
2960 (sha256
2961 (base32
2962 "0l72c11n959yzb8d3ankckb6yhjhm6x729zm7rkpk040qzxpy64k"))))
2963 (build-system python-build-system)
2964 (arguments
2965 '(#:phases (modify-phases %standard-phases
2966 (replace 'check
2967 (lambda* (#:key tests? #:allow-other-keys)
2968 (if tests?
2969 (begin
2970 (setenv "PYTHONPATH"
2971 (string-append "./build/lib:"
2972 (getenv "PYTHONPATH")))
2973 (invoke "pytest" "-vv"))
2974 (format #t "test suite not run~%"))
2975 #t)))))
2976 (native-inputs
2977 `(("python-pytest" ,python-pytest)))
2978 (propagated-inputs
2979 `(("python-markupsafe" ,python-markupsafe)))
2980 (home-page "http://jinja.pocoo.org/")
2981 (synopsis "Python template engine")
2982 (description
2983 "Jinja2 is a small but fast and easy to use stand-alone template engine
2984written in pure Python.")
2985 (license license:bsd-3)))
2986
2987(define-public python2-jinja2
2988 (package-with-python2 python-jinja2))
2989
2990(define-public python-jinja2-time
2991 (package
2992 (name "python-jinja2-time")
2993 (version "0.2.0")
2994 (source
2995 (origin
2996 (method url-fetch)
2997 (uri (pypi-uri "jinja2-time" version))
2998 (sha256
2999 (base32
3000 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3001 (build-system python-build-system)
3002 (propagated-inputs
3003 `(("python-arrow" ,python-arrow)
3004 ("python-jinja2" ,python-jinja2)))
3005 (home-page
3006 "https://github.com/hackebrot/jinja2-time")
3007 (synopsis "Jinja2 Extension for Dates and Times")
3008 (description
3009 "This package provides an extension for the template engine Jinja2. It
3010adds a 'now' tag providing a convenient access to the arrow.now() API from
3011templates. A format string can be provided to control the output.")
3012 (license license:expat)))
3013
3014(define-public python-pystache
3015 (package
3016 (name "python-pystache")
3017 (version "0.5.4")
3018 (source (origin
3019 (method url-fetch)
3020 (uri (pypi-uri "pystache" version))
3021 (sha256
3022 (base32
3023 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3024 (build-system python-build-system)
3025 (arguments
3026 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3027 (home-page "http://defunkt.io/pystache/")
3028 (synopsis "Python logic-less template engine")
3029 (description
3030 "Pystache is a Python implementation of the framework agnostic,
3031logic-free templating system Mustache.")
3032 (license license:expat)
3033 (properties `((python2-variant . ,(delay python2-pystache))))))
3034
3035(define-public python2-pystache
3036 (package (inherit (package-with-python2
3037 (strip-python2-variant python-pystache)))
3038 (arguments
3039 `(#:python ,python-2
3040 #:phases
3041 (modify-phases %standard-phases
3042 (replace 'check
3043 (lambda _
3044 (invoke "python" "test_pystache.py"))))))))
3045
3046(define-public python-joblib
3047 (package
3048 (name "python-joblib")
3049 (version "0.14.1")
3050 (source (origin
3051 (method url-fetch)
3052 (uri (pypi-uri "joblib" version))
3053 (sha256
3054 (base32
3055 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3056 (build-system python-build-system)
3057 (arguments
3058 `(#:phases
3059 (modify-phases %standard-phases
3060 (replace 'check
3061 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3062 (native-inputs
3063 `(("python-pytest" ,python-pytest)))
3064 (home-page "https://joblib.readthedocs.io/")
3065 (synopsis "Using Python functions as pipeline jobs")
3066 (description
3067 "Joblib is a set of tools to provide lightweight pipelining in Python.
3068In particular, joblib offers: transparent disk-caching of the output values
3069and lazy re-evaluation (memoize pattern), easy simple parallel computing
3070logging and tracing of the execution.")
3071 (license license:bsd-3)))
3072
3073(define-public python2-joblib
3074 (package-with-python2 python-joblib))
3075
3076(define-public python-daemon
3077 (package
3078 (name "python-daemon")
3079 (version "2.2.3")
3080 (source
3081 (origin
3082 (method url-fetch)
3083 (uri (pypi-uri "python-daemon" version))
3084 (sha256
3085 (base32
3086 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3087 (build-system python-build-system)
3088 (arguments
3089 `(#:phases
3090 (modify-phases %standard-phases
3091 (add-before 'check 'disable-tests
3092 (lambda _
3093 ;; FIXME: Determine why test fails
3094 (substitute* "test/test_daemon.py"
3095 (("test_detaches_process_context")
3096 "skip_test_detaches_process_context"))
3097 #t)))))
3098 (propagated-inputs
3099 `(("python-lockfile" ,python-lockfile)))
3100 (native-inputs
3101 `(("python-unittest2" ,python-unittest2)
3102 ("python-testtools" ,python-testtools)
3103 ("python-testscenarios" ,python-testscenarios)
3104 ("python-mock" ,python-mock)
3105 ("python-docutils" ,python-docutils)))
3106 (home-page "https://pagure.io/python-daemon/")
3107 (synopsis "Python library for making a Unix daemon process")
3108 (description "Python-daemon is a library that assists a Python program to
3109turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3110
3111This library provides a @code{DaemonContext} class that manages the following
3112important tasks for becoming a daemon process:
3113@enumerate
3114@item Detach the process into its own process group.
3115@item Set process environment appropriate for running inside a chroot.
3116@item Renounce suid and sgid privileges.
3117@item Close all open file descriptors.
3118@item Change the working directory, uid, gid, and umask.
3119@item Set appropriate signal handlers.
3120@item Open new file descriptors for stdin, stdout, and stderr.
3121@item Manage a specified PID lock file.
3122@item Register cleanup functions for at-exit processing.
3123@end enumerate")
3124 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3125 (license (list license:asl2.0 license:gpl3+))))
3126
3127(define-public python-anytree
3128 (package
3129 (name "python-anytree")
3130 (version "2.8.0")
3131 (source (origin
3132 (method url-fetch)
3133 (uri (pypi-uri "anytree" version))
3134 (sha256
3135 (base32
3136 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3137 (build-system python-build-system)
3138 (propagated-inputs
3139 `(("python-six" ,python-six)))
3140 (native-inputs
3141 `(;; For tests.
3142 ("graphviz" ,graphviz) ;for 'dot'
3143 ("python-nose" ,python-nose)))
3144 (home-page "https://github.com/c0fec0de/anytree")
3145 (synopsis "Lightweight tree data library")
3146 (description
3147 "@code{anytree} is a simple, lightweight, and extensible tree data
3148structure for Python.")
3149 (license license:asl2.0)))
3150
3151(define-public python-docutils
3152 (package
3153 (name "python-docutils")
3154 (version "0.16")
3155 (source
3156 (origin
3157 (method url-fetch)
3158 (uri (pypi-uri "docutils" version))
3159 (sha256
3160 (base32
3161 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3162 (build-system python-build-system)
3163 (arguments
3164 '(#:phases (modify-phases %standard-phases
3165 (replace 'check
3166 (lambda* (#:key tests? #:allow-other-keys)
3167 (if tests?
3168 (invoke "python" "test/alltests.py")
3169 (format #t "test suite not run~%"))
3170 #t)))))
3171 (home-page "http://docutils.sourceforge.net/")
3172 (synopsis "Python Documentation Utilities")
3173 (description
3174 "Docutils is a modular system for processing documentation into useful
3175formats, such as HTML, XML, and LaTeX. For input Docutils supports
3176reStructuredText.")
3177 ;; Most of the source code is public domain, but some source files are
3178 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3179 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3180
3181(define-public python2-docutils
3182 (package-with-python2 python-docutils))
3183
3184;; python2-sphinx fails its test suite with newer versions.
3185(define-public python2-docutils-0.14
3186 (package
3187 (inherit python2-docutils)
3188 (version "0.14")
3189 (source (origin
3190 (method url-fetch)
3191 (uri (pypi-uri "docutils" version))
3192 (sha256
3193 (base32
3194 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3195
3196(define-public python-pygments
3197 (package
3198 (name "python-pygments")
3199 (version "2.5.2")
3200 (source
3201 (origin
3202 (method url-fetch)
3203 (uri (pypi-uri "Pygments" version))
3204 (sha256
3205 (base32
3206 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
3207 (build-system python-build-system)
3208 (arguments
3209 ;; FIXME: Tests require sphinx, which depends on this.
3210 '(#:tests? #f))
3211 (home-page "https://pygments.org/")
3212 (synopsis "Syntax highlighting")
3213 (description
3214 "Pygments is a syntax highlighting package written in Python.")
3215 (license license:bsd-2)))
3216
3217(define-public python2-pygments
3218 (package-with-python2 python-pygments))
3219
3220(define-public python-bumpversion
3221 (package
3222 (name "python-bumpversion")
3223 (version "0.5.3")
3224 (source
3225 (origin
3226 (method url-fetch)
3227 (uri (pypi-uri "bumpversion" version))
3228 (sha256
3229 (base32
3230 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3231 (build-system python-build-system)
3232 (home-page "https://github.com/peritus/bumpversion")
3233 (synopsis "Tool to bump software version")
3234 (description "This tool provides a command-line interface (CLI) to bump a
3235software version simply.")
3236 (license license:expat)))
3237
3238(define-public python-deprecated
3239 (package
3240 (name "python-deprecated")
3241 (version "1.2.5")
3242 (source
3243 (origin
3244 (method git-fetch)
3245 (uri (git-reference
3246 (url "https://github.com/tantale/deprecated.git")
3247 (commit (string-append "v" version))))
3248 (file-name (git-file-name name version))
3249 (sha256
3250 (base32
3251 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3252 (build-system python-build-system)
3253 (arguments
3254 `(#:phases (modify-phases %standard-phases
3255 (replace 'check
3256 (lambda _
3257 (invoke "pytest"))))))
3258 (propagated-inputs
3259 `(("python-wrapt" ,python-wrapt)))
3260 (native-inputs
3261 `(("python-bumpversion" ,python-bumpversion)
3262 ("python-pytest" ,python-pytest)
3263 ("python-pytest-cov" ,python-pytest-cov)
3264 ("python-sphinx" ,python-sphinx)
3265 ("python-tox" ,python-tox)))
3266 (home-page "https://github.com/tantale/deprecated")
3267 (synopsis "Python decorator to deprecate classes, functions or methods")
3268 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3269to deprecate classes, functions or methods.")
3270 (license license:expat)))
3271
3272(define-public python-pygithub
3273 (package
3274 (name "python-pygithub")
3275 (version "1.43.8")
3276 (source
3277 ;; We fetch from the Git repo because there are no tests in the PyPI
3278 ;; archive.
3279 (origin
3280 (method git-fetch)
3281 (uri (git-reference
3282 (url "https://github.com/PyGithub/PyGithub.git")
3283 (commit (string-append "v" version))))
3284 (file-name (git-file-name name version))
3285 (sha256
3286 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3287 (build-system python-build-system)
3288 (arguments
3289 `(#:phases (modify-phases %standard-phases
3290 ;; Some tests rely on the network.
3291 (add-after 'unpack 'disable-failing-tests
3292 (lambda _
3293 (substitute* "tests/Issue142.py"
3294 (("testDecodeJson") "disabled_testDecodeJson"))
3295 #t))
3296 (add-before 'check 'prepare-for-tests
3297 (lambda _
3298 (for-each (lambda (f)
3299 (chmod f #o666))
3300 (find-files "./tests"))
3301 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3302 (setenv "PYTHONPATH"
3303 (string-append "./tests:" (getenv "PYTHONPATH")))
3304 #t)))))
3305 (propagated-inputs
3306 `(("python-deprecated" ,python-deprecated)
3307 ("python-pyjwt" ,python-pyjwt)
3308 ("python-requests" ,python-requests)))
3309 (native-inputs `(("python-httpretty" ,python-httpretty)))
3310 (home-page "https://pygithub.readthedocs.io/en/latest/")
3311 (synopsis "Python library for the GitHub API")
3312 (description "This library allows managing GitHub resources such as
3313repositories, user profiles, and organizations in your Python applications,
3314using version 3 of the GitHub application programming interface (API).")
3315 (license license:lgpl3+)))
3316
3317(define-public python-rellu
3318 (package
3319 (name "python-rellu")
3320 (version "0.7")
3321 (source
3322 (origin
3323 (method url-fetch)
3324 (uri (pypi-uri "rellu" version))
3325 (sha256
3326 (base32
3327 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3328 (build-system python-build-system)
3329 (propagated-inputs
3330 `(("python-invoke" ,python-invoke)
3331 ("python-pygithub" ,python-pygithub)))
3332 (home-page "https://github.com/robotframework/rellu")
3333 (synopsis "Utilities to create PyPI releases")
3334 (description "This collection of utilities contains tooling and templates
3335to assist in creating releases on GitHub and publishing them on PyPI. It is
3336designed to be used by Robot Framework and tools and libraries in its
3337ecosystem, but can naturally be used also by other projects.")
3338 (license license:asl2.0)))
3339
3340(define-public python-robotframework
3341 (package
3342 (name "python-robotframework")
3343 (version "3.1.2")
3344 ;; There are no tests in the PyPI archive.
3345 (source
3346 (origin
3347 (method git-fetch)
3348 (uri (git-reference
3349 (url "https://github.com/robotframework/robotframework.git")
3350 (commit (string-append "v" version))))
3351 (file-name (git-file-name name version))
3352 (sha256
3353 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
3354 (patches (search-patches
3355 "python-robotframework-honor-source-date-epoch.patch"))))
3356 (build-system python-build-system)
3357 (arguments
3358 `(#:phases (modify-phases %standard-phases
3359 (add-before 'build 'build-and-install-doc
3360 (lambda* (#:key outputs #:allow-other-keys)
3361 (let* ((doc-output (assoc-ref outputs "doc"))
3362 (doc (string-append doc-output "/share/"
3363 ,name "-" ,version "/")))
3364 (invoke "invoke" "library-docs" "all")
3365 (mkdir-p doc)
3366 (copy-recursively "doc/libraries"
3367 (string-append doc "/libraries"))
3368 #t)))
3369 (replace 'check
3370 (lambda _
3371 (invoke "python" "utest/run.py"))))))
3372 (native-inputs
3373 `(("python-invoke" ,python-invoke)
3374 ("python-rellu" ,python-rellu)
3375 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3376 (outputs '("out" "doc"))
3377 (home-page "https://robotframework.org")
3378 (synopsis "Generic automation framework")
3379 (description "Robot Framework is a generic automation framework for
3380acceptance testing, acceptance test driven development (ATDD), and robotic
3381process automation (RPA).")
3382 (license license:asl2.0)))
3383
3384(define-public python-robotframework-lint
3385 ;; There is no properly tagged release; the commit below seems to correspond
3386 ;; to the 0.9 stable release available from PyPI. The tests are not
3387 ;; included in the PyPI archive, so we fetch the sources from the upstream
3388 ;; Git repo.
3389 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3390 (revision "1"))
3391 (package
3392 (name "python-robotframework-lint")
3393 (version (git-version "0.9.0" revision commit))
3394 (source
3395 (origin
3396 (method git-fetch)
3397 (uri (git-reference
3398 (url "https://github.com/boakley/robotframework-lint.git")
3399 (commit commit)))
3400 (file-name (git-file-name name version))
3401 (sha256
3402 (base32
3403 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3404 (build-system python-build-system)
3405 (arguments
3406 `(#:phases
3407 (modify-phases %standard-phases
3408 (replace 'check
3409 (lambda _
3410 (invoke "python" "-m" "robot" "-A"
3411 "tests/conf/default.args" "tests"))))))
3412 (propagated-inputs
3413 `(("python-robotframework" ,python-robotframework)))
3414 (home-page "https://github.com/boakley/robotframework-lint/")
3415 (synopsis "Static analysis tool (linter) for Robot Framework")
3416 (description "This package provides the @code{rflint} command-line
3417utility, a static analysis tool (linter) for Robot Framework source files.")
3418 (license license:asl2.0))))
3419
3420(define-public python-robotframework-sshlibrary
3421 (package
3422 (name "python-robotframework-sshlibrary")
3423 (version "3.3.0")
3424 ;; There are no tests in the PyPI archive.
3425 (source
3426 (origin
3427 (method git-fetch)
3428 (uri (git-reference
3429 (url "https://github.com/robotframework/SSHLibrary.git")
3430 (commit (string-append "v" version))))
3431 (file-name (git-file-name name version))
3432 (sha256
3433 (base32
3434 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3435 (build-system python-build-system)
3436 (arguments
3437 `(#:phases
3438 (modify-phases %standard-phases
3439 (add-before 'build 'build-and-install-doc
3440 (lambda* (#:key outputs #:allow-other-keys)
3441 (let* ((doc-output (assoc-ref outputs "doc"))
3442 (doc (string-append doc-output "/share/"
3443 ,name "-" ,version "/")))
3444 (invoke "chmod" "-R" "+w" "docs")
3445 (invoke "invoke" "kw-docs" "project-docs")
3446 (mkdir-p doc)
3447 (for-each delete-file (find-files "docs" "\\.rst"))
3448 (copy-recursively "docs" doc)
3449 #t)))
3450 (replace 'check
3451 (lambda _
3452 ;; Some tests require an SSH server; we remove them.
3453 (delete-file "utest/test_client_api.py")
3454 (delete-file "utest/test_scp.py")
3455 (invoke "python" "utest/run.py"))))))
3456 (propagated-inputs
3457 `(("python-robotframework" ,python-robotframework)
3458 ("python-paramiko" ,python-paramiko)
3459 ("python-scp" ,python-scp)))
3460 (native-inputs
3461 `(("openssh" ,openssh)
3462 ("which" ,which)
3463 ;; To generate the documentation
3464 ("python-docutils" ,python-docutils)
3465 ("python-invoke" ,python-invoke)
3466 ("python-pygments" ,python-pygments)
3467 ("python-rellu" ,python-rellu)))
3468 (outputs '("out" "doc"))
3469 (home-page "https://github.com/robotframework/SSHLibrary")
3470 (synopsis "Robot Framework library for SSH and SFTP")
3471 (description "SSHLibrary is a Robot Framework library providing support
3472for SSH and SFTP. It has the following main usages:
3473@itemize @bullet
3474@item Executing commands on the remote machine, either blocking or non-blocking.
3475@item Writing and reading in an interactive shell.
3476@item Transferring files and directories over SFTP.
3477@item Ensuring that files and directories exist on the remote machine.
3478@end itemize")
3479 (license license:asl2.0)))
3480
3481(define-public python-rstr
3482 (package
3483 (name "python-rstr")
3484 (version "2.2.6")
3485 (source
3486 (origin
3487 (method url-fetch)
3488 (uri (pypi-uri "rstr" version))
3489 (sha256
3490 (base32
3491 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3492 (build-system python-build-system)
3493 (home-page
3494 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3495 (synopsis "Generate random strings in Python")
3496 (description "This package provides a python module for generating
3497random strings of various types. It could be useful for fuzz testing,
3498generating dummy data, or other applications. It has no dependencies
3499outside the standard library.")
3500 (license license:bsd-3)))
3501
3502(define-public python-scp
3503 (package
3504 (name "python-scp")
3505 (version "0.13.2")
3506 (source
3507 (origin
3508 (method url-fetch)
3509 (uri (pypi-uri "scp" version))
3510 (sha256
3511 (base32
3512 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3513 (build-system python-build-system)
3514 (arguments
3515 '(#:tests? #f)) ;tests require an SSH server
3516 (propagated-inputs
3517 `(("python-paramiko" ,python-paramiko)))
3518 (home-page "https://github.com/jbardin/scp.py")
3519 (synopsis "SCP protocol module for Python and Paramiko")
3520 (description "The scp module extends the Paramiko library to send and
3521receive files via the SCP1 protocol, as implemented by the OpenSSH
3522@command{scp} program.")
3523 (license license:gpl2+)))
3524
3525(define-public python-rst.linker
3526 (package
3527 (name "python-rst.linker")
3528 (version "1.11")
3529 (source
3530 (origin
3531 (method url-fetch)
3532 (uri (pypi-uri "rst.linker" version))
3533 (sha256
3534 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3535 (build-system python-build-system)
3536 (propagated-inputs
3537 `(("python-dateutil" ,python-dateutil)
3538 ("python-six" ,python-six)))
3539 (native-inputs
3540 `(("python-setuptools-scm" ,python-setuptools-scm)))
3541 ;; Test would require path.py, which would introduce a cyclic dependence.
3542 (arguments `(#:tests? #f))
3543 ;; Note: As of version 1.7 the documentation is not worth building.
3544 (home-page "https://github.com/jaraco/rst.linker")
3545 (synopsis "Sphinx plugin to add links and timestamps")
3546 (description "rst.linker allows to automatically replace text by a
3547reStructuredText external reference or timestamps. It's primary purpose is to
3548augment the changelog, but it can be used for other documents, too.")
3549 (license license:expat)))
3550
3551(define-public python2-rst.linker
3552 (package-with-python2 python-rst.linker))
3553
3554(define-public python-feedgenerator
3555 (package
3556 (name "python-feedgenerator")
3557 (version "1.9")
3558 (source
3559 (origin
3560 (method url-fetch)
3561 (uri (pypi-uri "feedgenerator" version))
3562 (sha256
3563 (base32
3564 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3565 (modules '((guix build utils)))
3566 (snippet
3567 '(begin
3568 ;; Remove pre-compiled .pyc files from source.
3569 (for-each delete-file-recursively
3570 (find-files "." "__pycache__" #:directories? #t))
3571 (for-each delete-file (find-files "." "\\.pyc$"))
3572 #t))))
3573 (build-system python-build-system)
3574 (propagated-inputs
3575 `(("python-pytz" ,python-pytz)
3576 ("python-six" ,python-six)))
3577 (home-page "https://github.com/getpelican/feedgenerator")
3578 (synopsis
3579 "Standalone version of Django's Atom/RSS feed generator")
3580 (description
3581 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3582which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3583 (license license:bsd-3)))
3584
3585(define-public python2-feedgenerator
3586 (package-with-python2 python-feedgenerator))
3587
3588(define-public python-toml
3589 (package
3590 (name "python-toml")
3591 (version "0.9.4")
3592 (source
3593 (origin
3594 (method url-fetch)
3595 (uri (pypi-uri "toml" version))
3596 (sha256
3597 (base32
3598 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3599 (build-system python-build-system)
3600 (arguments
3601 `(#:tests? #f)) ;no tests suite in release
3602 (home-page "https://github.com/uiri/toml")
3603 (synopsis "Library for TOML")
3604 (description
3605 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3606Language (TOML) configuration files.")
3607 (license license:expat)))
3608
3609(define-public python-jsonrpc-server
3610 (package
3611 (name "python-jsonrpc-server")
3612 (version "0.3.2")
3613 (source
3614 (origin
3615 (method url-fetch)
3616 (uri (pypi-uri "python-jsonrpc-server" version))
3617 (sha256
3618 (base32
3619 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3620 (build-system python-build-system)
3621 (propagated-inputs
3622 `(("python-future" ,python-future)
3623 ("python-mock" ,python-mock)
3624 ("python-pytest" ,python-pytest)
3625 ("python-ujson" ,python-ujson)))
3626 (home-page
3627 "https://github.com/palantir/python-jsonrpc-server")
3628 (synopsis "JSON RPC 2.0 server library")
3629 (description
3630 "This package provides a JSON RPC 2.0 server library for Python.")
3631 (license license:expat)))
3632
3633(define-public python-pydocstyle
3634 (package
3635 (name "python-pydocstyle")
3636 (version "3.0.0")
3637 (source
3638 (origin
3639 (method url-fetch)
3640 (uri (pypi-uri "pydocstyle" version))
3641 (sha256
3642 (base32
3643 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3644 (build-system python-build-system)
3645 (propagated-inputs
3646 `(("python-six" ,python-six)
3647 ("python-snowballstemmer" ,python-snowballstemmer)))
3648 (home-page
3649 "https://github.com/PyCQA/pydocstyle/")
3650 (synopsis "Python docstring style checker")
3651 (description
3652 "This package provides a style checker for the Python Language
3653Server (PLS).")
3654 (license license:expat)))
3655
3656(define-public python-language-server
3657 (package
3658 (name "python-language-server")
3659 (version "0.31.7")
3660 (source
3661 (origin
3662 (method url-fetch)
3663 (uri (pypi-uri "python-language-server" version))
3664 (sha256
3665 (base32
3666 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
3667 (build-system python-build-system)
3668 (propagated-inputs
3669 `(("python-pluggy" ,python-pluggy)
3670 ("python-jsonrpc-server" ,python-jsonrpc-server)
3671 ;; Note: Remove the special versions of Jedi and Parso when updating
3672 ;; this package.
3673 ("python-jedi" ,python-jedi-0.15)
3674 ("python-yapf" ,python-yapf)
3675 ("python-pyflakes" ,python-pyflakes)
3676 ("python-pydocstyle" ,python-pydocstyle)
3677 ("python-pycodestyle" ,python-pycodestyle)
3678 ("python-mccabe" ,python-mccabe)
3679 ("python-rope" ,python-rope)
3680 ("python-autopep8" ,python-autopep8)
3681 ("python-flake8" ,python-flake8)
3682 ("python-pylint" ,python-pylint)))
3683 (home-page "https://github.com/palantir/python-language-server")
3684 (synopsis "Python implementation of the Language Server Protocol")
3685 (description
3686 "The Python Language Server (pyls) is an implementation of the Python 3
3687language specification for the Language Server Protocol (LSP). This tool is
3688used in text editing environments to provide a complete and integrated
3689feature-set for programming Python effectively.")
3690 (license license:expat)))
3691
3692(define-public python-pathspec
3693 (package
3694 (name "python-pathspec")
3695 (version "0.7.0")
3696 (source
3697 (origin
3698 (method url-fetch)
3699 (uri (pypi-uri "pathspec" version))
3700 (sha256
3701 (base32
3702 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3703 (build-system python-build-system)
3704 (home-page "https://github.com/cpburnz/python-path-specification")
3705 (synopsis "Utility library for gitignore style pattern matching of file paths")
3706 (description
3707 "This package provides a utility library for gitignore style pattern
3708matching of file paths.")
3709 (license license:mpl2.0)))
3710
3711(define-public python-black
3712 (package
3713 (name "python-black")
3714 (version "19.10b0")
3715 (source
3716 (origin
3717 (method url-fetch)
3718 (uri (pypi-uri "black" version))
3719 (sha256
3720 (base32
3721 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
3722 (build-system python-build-system)
3723 (arguments
3724 `(#:phases
3725 (modify-phases %standard-phases
3726 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3727 (lambda _
3728 (let ((python3 (which "python3")))
3729 (substitute* '("tests/data/fmtonoff.py"
3730 "tests/data/string_prefixes.py"
3731 "tests/data/function.py"
3732 "tests/data/python37.py")
3733 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3734 (string-append "#!" python3 (if (string? minor-version)
3735 minor-version
3736 "")))))
3737 #t))
3738 (add-after 'unpack 'disable-broken-tests
3739 (lambda _
3740 ;; These tests are supposed to be skipped when the blackd
3741 ;; dependencies are missing, but this doesn't quite work.
3742 (substitute* "tests/test_black.py"
3743 (("( *)class BlackDTestCase.*" match indent)
3744 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3745 indent "class BlackDTestCase(unittest.TestCase):\n"))
3746 (("web.Application") "False")
3747 (("@unittest_run_loop") ""))
3748
3749 ;; Patching the above file breaks the self test
3750 (substitute* "tests/test_black.py"
3751 (("( *)def test_self" match indent)
3752 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3753 #t)))))
3754 (propagated-inputs
3755 `(("python-click" ,python-click)
3756 ("python-attrs" ,python-attrs)
3757 ("python-appdirs" ,python-appdirs)
3758 ("python-pathspec" ,python-pathspec)
3759 ("python-regex" ,python-regex)
3760 ("python-toml" ,python-toml)
3761 ("python-typed-ast" ,python-typed-ast)))
3762 (native-inputs
3763 `(("python-setuptools-scm" ,python-setuptools-scm)))
3764 (home-page "https://github.com/ambv/black")
3765 (synopsis "The uncompromising code formatter")
3766 (description "Black is the uncompromising Python code formatter.")
3767 (license license:expat)))
3768
3769(define-public python-blinker
3770 (package
3771 (name "python-blinker")
3772 (version "1.4")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "blinker" version))
3777 (sha256
3778 (base32
3779 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3780 (build-system python-build-system)
3781 (home-page "https://pythonhosted.org/blinker/")
3782 (synopsis "Fast, simple object-to-object and broadcast signaling")
3783 (description
3784 "Blinker provides a fast dispatching system that allows any number of
3785interested parties to subscribe to events, or \"signals\".")
3786 (license license:expat)))
3787
3788(define-public python2-blinker
3789 (package-with-python2 python-blinker))
3790
3791(define-public pelican
3792 (package
3793 (name "pelican")
3794 (version "4.2.0")
3795 (source
3796 (origin
3797 (method url-fetch)
3798 (uri (pypi-uri "pelican" version))
3799 (sha256
3800 (base32
3801 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3802 (build-system python-build-system)
3803 (propagated-inputs
3804 `(("python-blinker" ,python-blinker)
3805 ("python-dateutil" ,python-dateutil)
3806 ("python-docutils" ,python-docutils)
3807 ("python-feedgenerator" ,python-feedgenerator)
3808 ("python-jinja2" ,python-jinja2)
3809 ("python-markdown" ,python-markdown)
3810 ("python-pygments" ,python-pygments)
3811 ("python-pytz" ,python-pytz)
3812 ("python-six" ,python-six)
3813 ("python-unidecode" ,python-unidecode)))
3814 (home-page "https://getpelican.com/")
3815 (arguments
3816 `(;; XXX Requires a lot more packages to do unit tests :P
3817 #:tests? #f))
3818 (synopsis "Python-based static site publishing system")
3819 (description
3820 "Pelican is a tool to generate a static blog from reStructuredText,
3821Markdown input files, and more. Pelican uses Jinja2 for templating
3822and is very extensible.")
3823 (license license:agpl3+)))
3824
3825(define-public mallard-ducktype
3826 (package
3827 (name "mallard-ducktype")
3828 (version "1.0.2")
3829 (source
3830 (origin
3831 (method git-fetch)
3832 ;; git-reference because tests are not included in pypi source tarball
3833 ;; https://issues.guix.gnu.org/issue/36755#2
3834 (uri (git-reference
3835 (url "https://github.com/projectmallard/mallard-ducktype.git")
3836 (commit version)))
3837 (file-name (git-file-name name version))
3838 (sha256
3839 (base32
3840 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3841 (build-system python-build-system)
3842 (arguments
3843 '(#:phases
3844 (modify-phases %standard-phases
3845 (replace 'check
3846 (lambda _
3847 (with-directory-excursion "tests"
3848 (invoke "sh" "runtests")))))))
3849 (home-page "http://projectmallard.org")
3850 (synopsis "Convert Ducktype to Mallard documentation markup")
3851 (description
3852 "Ducktype is a lightweight syntax that can represent all the semantics
3853of the Mallard XML documentation system. Ducktype files can be converted to
3854Mallard using the @command{ducktype} tool. The yelp-tools package
3855provides additional functionality on the produced Mallard documents.")
3856 (license license:expat)))
3857
3858(define-public python-cython
3859 (package
3860 (name "python-cython")
3861 (version "0.29.15")
3862 (source
3863 (origin
3864 (method url-fetch)
3865 (uri (pypi-uri "Cython" version))
3866 (sha256
3867 (base32
3868 "0c5cjyxfvba6c0vih1fvhywp8bpz30vwvbjqdm1q1k55xzhmkn30"))))
3869 (build-system python-build-system)
3870 ;; we need the full python package and not just the python-wrapper
3871 ;; because we need libpython3.3m.so
3872 (inputs
3873 `(("python" ,python)))
3874 (arguments
3875 `(#:phases
3876 (modify-phases %standard-phases
3877 (add-before 'check 'set-HOME
3878 ;; some tests require access to "$HOME/.cython"
3879 (lambda _ (setenv "HOME" "/tmp") #t))
3880 (replace 'check
3881 (lambda _
3882 ;; Disable compiler optimizations to greatly reduce the running
3883 ;; time of the test suite.
3884 (setenv "CFLAGS" "-O0")
3885
3886 (invoke "python" "runtests.py" "-vv"
3887 "-j" (number->string (parallel-job-count))))))))
3888 (home-page "https://cython.org/")
3889 (synopsis "C extensions for Python")
3890 (description "Cython is an optimising static compiler for both the Python
3891programming language and the extended Cython programming language. It makes
3892writing C extensions for Python as easy as Python itself.")
3893 (license license:asl2.0)
3894 (properties `((python2-variant . ,(delay python2-cython))))))
3895
3896(define-public python2-cython
3897 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3898 (package
3899 (inherit base)
3900 (name "python2-cython")
3901 (inputs
3902 `(("python-2" ,python-2))) ;this is not automatically changed
3903 (arguments
3904 (substitute-keyword-arguments (package-arguments base)
3905 ((#:phases phases)
3906 `(modify-phases ,phases
3907 ;; XXX: On i686-linux, running the parallel tests fails on many-core
3908 ;; systems, see <https://github.com/cython/cython/issues/2807>.
3909 ;; TODO: Move this logic to the regular check phase in a future
3910 ;; rebuild cycle.
3911 ,@(if (string-prefix? "i686" (%current-system))
3912 '((replace 'check
3913 (lambda _
3914 (setenv "CFLAGS" "-O0")
3915 (invoke "python" "runtests.py" "-vv"
3916 "-j" (number->string (parallel-job-count))
3917 "-x" "run.parallel"))))
3918 '())
3919 (add-before 'check 'adjust-test_embed
3920 (lambda _
3921 (substitute* "runtests.py"
3922 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3923 ;; so it can give the right -L flag to GCC when embedding static
3924 ;; builds of Python. It is unaware that the Python "config"
3925 ;; directory (where the static library lives) was renamed in
3926 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3927 ;; which works fine, because that is where the shared library is.
3928 ;;
3929 ;; It also appears to be unaware that the Makefile in Demos/embed
3930 ;; already unconditionally pass the static library location to GCC,
3931 ;; after checking sysconfig.get_config_var('LIBPL).
3932 ;;
3933 ;; The effect is that the linker is unable to resolve libexpat
3934 ;; symbols when building for Python 2, because neither the Python 2
3935 ;; shared library nor Expat is available. To fix it, we can either
3936 ;; add Expat as an input and make it visible to the linker, or just
3937 ;; prevent it from overriding the Python shared library location.
3938 ;; The end result is identical, so we take the easy route.
3939 ((" or libname not in os\\.listdir\\(libdir\\)")
3940 ""))
3941 #t)))))))))
3942
3943;; The RPython toolchain currently does not support Python 3.
3944(define-public python2-rpython
3945 (package
3946 (name "python2-rpython")
3947 (version "0.2.1")
3948 (source
3949 (origin
3950 (method url-fetch)
3951 (uri (pypi-uri "rpython" version))
3952 (sha256
3953 (base32
3954 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3955 (build-system python-build-system)
3956 (arguments `(#:python ,python-2))
3957 (native-inputs
3958 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3959 (home-page "https://rpython.readthedocs.org")
3960 (synopsis "Framework for implementing interpreters and virtual machines")
3961 (description "RPython is a translation and support framework for
3962producing implementations of dynamic languages, emphasizing a clean separation
3963between language specification and implementation aspects.")
3964 (license license:expat)))
3965
3966;; NOTE: when upgrading numpy please make sure that python-pandas and
3967;; python-scipy still build, as these three packages are often used together.
3968(define-public python-numpy
3969 (package
3970 (name "python-numpy")
3971 (version "1.17.3")
3972 (source
3973 (origin
3974 (method url-fetch)
3975 (uri (string-append
3976 "https://github.com/numpy/numpy/releases/download/v"
3977 version "/numpy-" version ".tar.gz"))
3978 (sha256
3979 (base32
3980 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3981 (build-system python-build-system)
3982 (inputs
3983 `(("openblas" ,openblas)
3984 ("lapack" ,lapack)))
3985 (native-inputs
3986 `(("python-cython" ,python-cython)
3987 ("python-pytest" ,python-pytest)
3988 ("gfortran" ,gfortran)))
3989 (arguments
3990 `(#:phases
3991 (modify-phases %standard-phases
3992 (add-before 'build 'configure-blas-lapack
3993 (lambda* (#:key inputs #:allow-other-keys)
3994 (call-with-output-file "site.cfg"
3995 (lambda (port)
3996 (format port
3997 "[openblas]
3998libraries = openblas
3999library_dirs = ~a/lib
4000include_dirs = ~a/include
4001
4002# backslash-n to make emacs happy
4003\n[lapack]
4004lapack_libs = lapack
4005library_dirs = ~a/lib
4006include_dirs = ~a/include
4007"
4008 (assoc-ref inputs "openblas")
4009 (assoc-ref inputs "openblas")
4010 (assoc-ref inputs "lapack")
4011 (assoc-ref inputs "lapack"))))
4012 #t))
4013 (add-before 'build 'fix-executable-paths
4014 (lambda* (#:key inputs #:allow-other-keys)
4015 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4016 ;; instead of /bin/sh.
4017 (substitute* "numpy/distutils/exec_command.py"
4018 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4019 (string-append match-start (assoc-ref inputs "bash") match-end)))
4020 ;; Use "gcc" executable, not "cc".
4021 (substitute* "numpy/distutils/system_info.py"
4022 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4023 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4024 #t))
4025 ;; Tests can only be run after the library has been installed and not
4026 ;; within the source directory.
4027 (delete 'check)
4028 (add-after 'install 'check
4029 (lambda* (#:key outputs inputs #:allow-other-keys)
4030 ;; Make installed package available for running the tests
4031 (add-installed-pythonpath inputs outputs)
4032 ;; Make sure "f2py" etc is found.
4033 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4034 ":" (getenv "PATH")))
4035 (with-directory-excursion "/tmp"
4036 (invoke "python" "-c"
4037 "import numpy; numpy.test(verbose=2)")))))))
4038 (home-page "https://numpy.org")
4039 (synopsis "Fundamental package for scientific computing with Python")
4040 (description "NumPy is the fundamental package for scientific computing
4041with Python. It contains among other things: a powerful N-dimensional array
4042object, sophisticated (broadcasting) functions, tools for integrating C/C++
4043and Fortran code, useful linear algebra, Fourier transform, and random number
4044capabilities.")
4045 (properties `((python2-variant . ,(delay python2-numpy))))
4046 (license license:bsd-3)))
4047
4048;; Numpy 1.16.x are the last versions that support Python 2.
4049(define-public python2-numpy
4050 (let ((numpy (package-with-python2
4051 (strip-python2-variant python-numpy))))
4052 (package/inherit
4053 numpy
4054 (version "1.16.5")
4055 (source (origin
4056 (method url-fetch)
4057 (uri (string-append
4058 "https://github.com/numpy/numpy/releases/download/v"
4059 version "/numpy-" version ".tar.gz"))
4060 (sha256
4061 (base32
4062 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4063
4064;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4065;; interest only for legacy code going back to NumPy's predecessor
4066;; Numeric.
4067(define-public python2-numpy-1.8
4068 (package (inherit python2-numpy)
4069 (version "1.8.2")
4070 (source
4071 (origin
4072 (method git-fetch)
4073 (uri (git-reference
4074 (url "https://github.com/numpy/numpy")
4075 (commit (string-append "v" version))))
4076 (file-name (git-file-name "numpy" version))
4077 (sha256
4078 (base32
4079 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4080 (arguments
4081 (substitute-keyword-arguments (package-arguments python2-numpy)
4082 ((#:phases phases)
4083 `(modify-phases ,phases
4084 (replace 'configure-blas-lapack
4085 (lambda* (#:key inputs #:allow-other-keys)
4086 (call-with-output-file "site.cfg"
4087 (lambda (port)
4088 (format port
4089 "[openblas]
4090libraries = openblas,lapack
4091library_dirs = ~a/lib:~a/lib
4092include_dirs = ~a/include:~a/include
4093"
4094 (assoc-ref inputs "openblas")
4095 (assoc-ref inputs "lapack")
4096 (assoc-ref inputs "openblas")
4097 (assoc-ref inputs "lapack"))))
4098 #t))))))
4099 (native-inputs
4100 `(("python2-nose" ,python2-nose)))
4101 (description "NumPy is the fundamental package for scientific computing
4102with Python. It contains among other things: a powerful N-dimensional array
4103object, sophisticated (broadcasting) functions, tools for integrating C/C++
4104and Fortran code, useful linear algebra, Fourier transform, and random number
4105capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4106that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4107Numeric.")
4108 (license license:bsd-3)))
4109
4110(define-public python-munch
4111 (package
4112 (name "python-munch")
4113 (version "2.0.4")
4114 (source
4115 (origin
4116 (method url-fetch)
4117 (uri (pypi-uri "munch" version))
4118 (sha256
4119 (base32
4120 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4121 (build-system python-build-system)
4122 (home-page "https://github.com/Infinidat/munch")
4123 (synopsis "Dot-accessible dictionary")
4124 (description "Munch is a dot-accessible dictionary similar to JavaScript
4125objects.")
4126 (license license:expat)))
4127
4128(define-public python2-munch
4129 (package-with-python2 python-munch))
4130
4131(define-public python-colormath
4132 (package
4133 (name "python-colormath")
4134 (version "3.0.0")
4135 (source
4136 (origin
4137 (method url-fetch)
4138 (uri (pypi-uri "colormath" version))
4139 (sha256
4140 (base32
4141 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4142 (build-system python-build-system)
4143 (propagated-inputs
4144 `(("python-networkx" ,python-networkx)
4145 ("python-numpy" ,python-numpy)))
4146 (home-page "https://github.com/gtaylor/python-colormath")
4147 (synopsis "Color math and conversion library")
4148 (description
4149 "This is a Python library for color math and conversions.")
4150 (license license:bsd-3)))
4151
4152(define-public python2-colormath
4153 (package-with-python2 python-colormath))
4154
4155(define-public python-spectra
4156 (package
4157 (name "python-spectra")
4158 (version "0.0.11")
4159 (source
4160 (origin
4161 (method url-fetch)
4162 (uri (pypi-uri "spectra" version))
4163 (sha256
4164 (base32
4165 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4166 (build-system python-build-system)
4167 (arguments
4168 `(#:phases
4169 (modify-phases %standard-phases
4170 (replace 'check
4171 (lambda _ (invoke "nosetests" "-v"))))))
4172 (propagated-inputs
4173 `(("python-colormath" ,python-colormath)))
4174 (native-inputs
4175 `(("python-nose" ,python-nose)))
4176 (home-page "https://github.com/jsvine/spectra")
4177 (synopsis "Color scales and color conversion")
4178 (description
4179 "This package provides a Python library intended to make color math,
4180color scales, and color space conversion easy. It has support for:
4181
4182@enumerate
4183@item Color scales
4184@item Color ranges
4185@item Color blending
4186@item Brightening/darkening colors
4187@item Saturating/desaturating colors
4188@item Conversion to/from multiple color spaces.
4189@end enumerate\n")
4190 (license license:expat)))
4191
4192(define-public python2-spectra
4193 (package-with-python2 python-spectra))
4194
4195(define-public python-numpy-documentation
4196 (package
4197 (name "python-numpy-documentation")
4198 (version (package-version python-numpy))
4199 (source (package-source python-numpy))
4200 (build-system python-build-system)
4201 (native-inputs
4202 `(("python-matplotlib" ,python-matplotlib)
4203 ("python-numpy" ,python-numpy)
4204 ("pkg-config" ,pkg-config)
4205 ("python-sphinx" ,python-sphinx)
4206 ("python-numpydoc" ,python-numpydoc)
4207 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4208 texlive-fonts-ec
4209 texlive-generic-ifxetex
4210 texlive-generic-pdftex
4211 texlive-amsfonts
4212 texlive-latex-capt-of
4213 texlive-latex-cmap
4214 texlive-latex-environ
4215 texlive-latex-eqparbox
4216 texlive-latex-etoolbox
4217 texlive-latex-expdlist
4218 texlive-latex-fancyhdr
4219 texlive-latex-fancyvrb
4220 texlive-latex-fncychap
4221 texlive-latex-float
4222 texlive-latex-framed
4223 texlive-latex-geometry
4224 texlive-latex-graphics
4225 texlive-latex-hyperref
4226 texlive-latex-mdwtools
4227 texlive-latex-multirow
4228 texlive-latex-needspace
4229 texlive-latex-oberdiek
4230 texlive-latex-parskip
4231 texlive-latex-preview
4232 texlive-latex-tabulary
4233 texlive-latex-threeparttable
4234 texlive-latex-titlesec
4235 texlive-latex-trimspaces
4236 texlive-latex-ucs
4237 texlive-latex-upquote
4238 texlive-latex-url
4239 texlive-latex-varwidth
4240 texlive-latex-wrapfig)))
4241 ("texinfo" ,texinfo)
4242 ("perl" ,perl)
4243 ("scipy-sphinx-theme"
4244 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4245 (method git-fetch)
4246 (uri (git-reference
4247 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4248 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4249 (sha256
4250 (base32
4251 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4252 ,@(package-native-inputs python-numpy)))
4253 (arguments
4254 `(#:tests? #f ; we're only generating the documentation
4255 #:phases
4256 (modify-phases %standard-phases
4257 (delete 'build)
4258 (replace 'install
4259 (lambda* (#:key inputs outputs #:allow-other-keys)
4260 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4261 (doc (string-append
4262 data "/doc/" ,name "-"
4263 ,(package-version python-numpy)))
4264 (info-reader (string-append data "/info"))
4265 (html (string-append doc "/html"))
4266 (scipy-sphinx-theme "scipy-sphinx-theme")
4267 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4268 (pyver ,(string-append "PYVER=")))
4269
4270 ;; FIXME: this is needed to for texlive-union to generate
4271 ;; fonts, which are not found.
4272 (setenv "HOME" "/tmp")
4273
4274 (with-directory-excursion "doc"
4275 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4276 (mkdir-p html)
4277 (invoke "make" "html" pyver)
4278 (invoke "make" "latex" "PAPER=a4" pyver)
4279 (invoke "make" "-C" "build/latex"
4280 "all-pdf" "PAPER=a4" pyver)
4281 ;; FIXME: Generation of the info file fails.
4282 ;; (invoke "make" "info" pyver)
4283 ;; (mkdir-p info)
4284 ;; (copy-file "build/texinfo/numpy.info"
4285 ;; (string-append info "/numpy.info"))
4286 (for-each (lambda (file)
4287 (copy-file (string-append "build/latex" file)
4288 (string-append doc file)))
4289 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4290 (with-directory-excursion "build/html"
4291 (for-each (lambda (file)
4292 (let* ((dir (dirname file))
4293 (tgt-dir (string-append html "/" dir)))
4294 (unless (equal? "." dir)
4295 (mkdir-p tgt-dir))
4296 (install-file file html)))
4297 (find-files "." ".*")))))
4298 #t)))))
4299 (home-page (package-home-page python-numpy))
4300 (synopsis "Documentation for the python-numpy package")
4301 (description (package-description python-numpy))
4302 (license (package-license python-numpy))))
4303
4304(define-public python2-numpy-documentation
4305 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4306 (package
4307 (inherit numpy-documentation)
4308 (native-inputs `(("python2-functools32" ,python2-functools32)
4309 ,@(package-native-inputs numpy-documentation))))))
4310
4311(define-public python-pygit2
4312 (package
4313 (name "python-pygit2")
4314 (version "1.1.0")
4315 (source
4316 (origin
4317 (method url-fetch)
4318 (uri (pypi-uri "pygit2" version))
4319 (sha256
4320 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4321 (build-system python-build-system)
4322 (arguments
4323 '(#:tests? #f)) ; tests don't run correctly in our environment
4324 (propagated-inputs
4325 `(("python-cached-property" ,python-cached-property)
4326 ("python-cffi" ,python-cffi)
4327 ("libgit2" ,libgit2)))
4328 (native-inputs
4329 `(("python-pytest" ,python-pytest)))
4330 (home-page "https://github.com/libgit2/pygit2")
4331 (synopsis "Python bindings for libgit2")
4332 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4333library, libgit2 implements Git plumbing.")
4334 ;; GPL2.0 only, with linking exception.
4335 (license license:gpl2)))
4336
4337(define-public python-pyparsing
4338 (package
4339 (name "python-pyparsing")
4340 (version "2.3.1")
4341 (source
4342 (origin
4343 (method url-fetch)
4344 (uri (pypi-uri "pyparsing" version))
4345 (sha256
4346 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
4347 (build-system python-build-system)
4348 (outputs '("out" "doc"))
4349 (arguments
4350 `(#:tests? #f ; no test target
4351 #:phases
4352 (modify-phases %standard-phases
4353 (add-after 'install 'install-doc
4354 (lambda* (#:key outputs #:allow-other-keys)
4355 (let* ((doc (string-append (assoc-ref outputs "doc")
4356 "/share/doc/" ,name "-" ,version))
4357 (html-doc (string-append doc "/html"))
4358 (examples (string-append doc "/examples")))
4359 (mkdir-p html-doc)
4360 (mkdir-p examples)
4361 (for-each
4362 (lambda (dir tgt)
4363 (map (lambda (file)
4364 (install-file file tgt))
4365 (find-files dir ".*")))
4366 (list "docs" "htmldoc" "examples")
4367 (list doc html-doc examples))
4368 #t))))))
4369 (home-page "https://github.com/pyparsing/pyparsing")
4370 (synopsis "Python parsing class library")
4371 (description
4372 "The pyparsing module is an alternative approach to creating and
4373executing simple grammars, vs. the traditional lex/yacc approach, or the use
4374of regular expressions. The pyparsing module provides a library of classes
4375that client code uses to construct the grammar directly in Python code.")
4376 (license license:expat)))
4377
4378(define-public python2-pyparsing
4379 (package-with-python2 python-pyparsing))
4380
4381(define-public python-numpydoc
4382 (package
4383 (name "python-numpydoc")
4384 (version "0.8.0")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (pypi-uri "numpydoc" version))
4389 (sha256
4390 (base32
4391 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4392 (build-system python-build-system)
4393 (propagated-inputs
4394 `(("python-sphinx" ,python-sphinx)))
4395 (native-inputs
4396 `(("python-nose" ,python-nose)))
4397 (home-page "https://pypi.org/project/numpydoc/")
4398 (synopsis
4399 "Numpy's Sphinx extensions")
4400 (description
4401 "Sphinx extension to support docstrings in Numpy format.")
4402 (license license:bsd-2)))
4403
4404(define-public python2-numpydoc
4405 (package-with-python2 python-numpydoc))
4406
4407(define-public python-numexpr
4408 (package
4409 (name "python-numexpr")
4410 (version "2.6.5")
4411 (source
4412 (origin
4413 (method url-fetch)
4414 (uri (pypi-uri "numexpr" version))
4415 (sha256
4416 (base32
4417 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4418 (build-system python-build-system)
4419 (arguments `(#:tests? #f)) ; no tests included
4420 (propagated-inputs
4421 `(("python-numpy" ,python-numpy)))
4422 (home-page "https://github.com/pydata/numexpr")
4423 (synopsis "Fast numerical expression evaluator for NumPy")
4424 (description
4425 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4426expressions that operate on arrays are accelerated and use less memory than
4427doing the same calculation in Python. In addition, its multi-threaded
4428capabilities can make use of all your cores, which may accelerate
4429computations, most specially if they are not memory-bounded (e.g. those using
4430transcendental functions).")
4431 (license license:expat)))
4432
4433(define-public python2-numexpr
4434 (package-with-python2 python-numexpr))
4435
4436(define-public python-cycler
4437 (package
4438 (name "python-cycler")
4439 (version "0.10.0")
4440 (source (origin
4441 (method url-fetch)
4442 (uri (pypi-uri "cycler" version))
4443 (sha256
4444 (base32
4445 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4446 (build-system python-build-system)
4447 (arguments
4448 ;; XXX: The current version requires 'coveralls' which we don't have.
4449 ;; Enable this for the next release which uses 'python-pytest'.
4450 '(#:tests? #f))
4451 (propagated-inputs
4452 `(("python-six" ,python-six)))
4453 (home-page "http://matplotlib.org/cycler/")
4454 (synopsis "Composable keyword argument iterator")
4455 (description
4456 "When using @code{matplotlib} and plotting more than one line, it is
4457common to want to be able to want to be able to cycle over one or more artist
4458styles; but the plotting logic can quickly become involved.
4459To address this and enable easy cycling over arbitrary @code{kwargs}, the
4460@code{Cycler} class was developed.")
4461 (license license:bsd-3)))
4462
4463(define-public python2-cycler
4464 (package-with-python2 python-cycler))
4465
4466(define-public python-colorspacious
4467 (package
4468 (name "python-colorspacious")
4469 (version "1.1.2")
4470 (source
4471 (origin
4472 (method git-fetch)
4473 (uri (git-reference
4474 (url "https://github.com/njsmith/colorspacious.git")
4475 (commit (string-append "v" version))))
4476 (file-name (git-file-name name version))
4477 (sha256
4478 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4479 (build-system python-build-system)
4480 (propagated-inputs
4481 `(("python-numpy" ,python-numpy)))
4482 (native-inputs
4483 `(("python-nose" ,python-nose)))
4484 (arguments
4485 `(#:phases
4486 (modify-phases %standard-phases
4487 (replace 'check
4488 (lambda _
4489 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4490 (home-page "https://github.com/njsmith/colorspacious")
4491 (synopsis "Python library for colorspace conversions")
4492 (description "@code{colorspacious} is a Python library that lets you
4493convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4494 (license license:expat)))
4495
4496(define-public python2-colorspacious
4497 (package-with-python2 python-colorspacious))
4498
4499(define-public python-matplotlib
4500 (package
4501 (name "python-matplotlib")
4502 (version "3.1.2")
4503 (source
4504 (origin
4505 (method url-fetch)
4506 (uri (pypi-uri "matplotlib" version))
4507 (sha256
4508 (base32
4509 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4510 (build-system python-build-system)
4511 (propagated-inputs ; the following packages are all needed at run time
4512 `(("python-cycler" ,python-cycler)
4513 ("python-kiwisolver" ,python-kiwisolver)
4514 ("python-pyparsing" ,python-pyparsing)
4515 ("python-pygobject" ,python-pygobject)
4516 ("gobject-introspection" ,gobject-introspection)
4517 ("python-tkinter" ,python "tk")
4518 ("python-dateutil" ,python-dateutil)
4519 ("python-numpy" ,python-numpy)
4520 ("python-pillow" ,python-pillow)
4521 ("python-pytz" ,python-pytz)
4522 ("python-six" ,python-six)
4523 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4524 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4525 ;; object. For this reason we need to import both libraries.
4526 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4527 ("python-pycairo" ,python-pycairo)
4528 ("python-cairocffi" ,python-cairocffi)))
4529 (inputs
4530 `(("libpng" ,libpng)
4531 ("imagemagick" ,imagemagick)
4532 ("freetype" ,freetype)
4533 ("cairo" ,cairo)
4534 ("glib" ,glib)
4535 ;; FIXME: Add backends when available.
4536 ;("python-wxpython" ,python-wxpython)
4537 ("tcl" ,tcl)
4538 ("tk" ,tk)))
4539 (native-inputs
4540 `(("pkg-config" ,pkg-config)
4541 ("python-pytest" ,python-pytest)
4542 ("python-mock" ,python-mock)
4543 ("unzip" ,unzip)
4544 ("jquery-ui"
4545 ,(origin
4546 (method url-fetch)
4547 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4548 (sha256
4549 (base32
4550 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4551 (arguments
4552 `(#:phases
4553 (modify-phases %standard-phases
4554 ;; XXX We disable all image comparison tests because we're using a
4555 ;; newer version of FreeType than matplotlib expects. This leads to
4556 ;; minor differences throughout the tests.
4557 (add-after 'unpack 'fix-and-disable-failing-tests
4558 (lambda _
4559 (substitute* (append (find-files "lib/matplotlib/tests/"
4560 "test_.*\\.py$")
4561 (find-files "lib/mpl_toolkits/tests"
4562 "test_.*\\.py$"))
4563 (("^from matplotlib" match)
4564 (string-append "import pytest\n" match))
4565 (("( *)@image_comparison" match indent)
4566 (string-append indent
4567 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4568 match)))
4569 (substitute* "lib/matplotlib/tests/test_animation.py"
4570 (("/bin/sh") (which "sh")))
4571 (for-each delete-file
4572 ;; test_normal_axes, test_get_tightbbox_polar
4573 '("lib/matplotlib/tests/test_axes.py"
4574 ;; We don't use the webagg backend and this test forces it.
4575 "lib/matplotlib/tests/test_backend_webagg.py"
4576 ;; test_outward_ticks
4577 "lib/matplotlib/tests/test_tightlayout.py"
4578 ;; test_hidden_axes fails with minor extent
4579 ;; differences, possibly due to the use of a
4580 ;; different version of FreeType.
4581 "lib/matplotlib/tests/test_constrainedlayout.py"
4582 ;; Fontconfig returns no fonts.
4583 "lib/matplotlib/tests/test_font_manager.py"))
4584 #t))
4585 (add-before 'install 'install-jquery-ui
4586 (lambda* (#:key outputs inputs #:allow-other-keys)
4587 (let ((dir (string-append (assoc-ref outputs "out")
4588 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4589 (mkdir-p dir)
4590 (invoke "unzip"
4591 (assoc-ref inputs "jquery-ui")
4592 "-d" dir))
4593 #t))
4594 (replace 'check
4595 (lambda* (#:key outputs inputs #:allow-other-keys)
4596 (add-installed-pythonpath inputs outputs)
4597 (invoke "python" "tests.py" "-v"
4598 "-m" "not network and not webagg")))
4599 (add-before 'build 'configure-environment
4600 (lambda* (#:key outputs inputs #:allow-other-keys)
4601 (let ((cairo (assoc-ref inputs "cairo")))
4602 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4603 ;; has not effect.
4604 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4605 (setenv "HOME" (getcwd))
4606 (call-with-output-file "setup.cfg"
4607 (lambda (port)
4608 (format port "[directories]~%
4609basedirlist = ~a,~a~%
4610[packages]~%
4611tests = True~%"
4612 (assoc-ref inputs "tcl")
4613 (assoc-ref inputs "tk")))))
4614 #t)))))
4615 (home-page "https://matplotlib.org/")
4616 (synopsis "2D plotting library for Python")
4617 (description
4618 "Matplotlib is a Python 2D plotting library which produces publication
4619quality figures in a variety of hardcopy formats and interactive environments
4620across platforms. Matplotlib can be used in Python scripts, the python and
4621ipython shell, web application servers, and six graphical user interface
4622toolkits.")
4623 (license license:psfl)
4624 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4625
4626(define-public python2-matplotlib
4627 (let ((matplotlib (package-with-python2
4628 (strip-python2-variant python-matplotlib))))
4629 (package (inherit matplotlib)
4630 (version "2.2.4")
4631 (source
4632 (origin
4633 (method url-fetch)
4634 (uri (pypi-uri "matplotlib" version))
4635 (sha256
4636 (base32
4637 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4638 (arguments
4639 (substitute-keyword-arguments (package-arguments matplotlib)
4640 ((#:phases phases)
4641 `(modify-phases ,phases
4642 (replace 'install-jquery-ui
4643 (lambda* (#:key outputs inputs #:allow-other-keys)
4644 (let ((dir (string-append (assoc-ref outputs "out")
4645 "/lib/python2.7/site-packages/"
4646 "matplotlib/backends/web_backend/")))
4647 (mkdir-p dir)
4648 (invoke "unzip"
4649 (assoc-ref inputs "jquery-ui")
4650 "-d" dir))
4651 #t))
4652 (delete 'fix-and-disable-failing-tests)
4653 (delete 'check))))) ; These tests weren't run the the past.
4654 ;; Make sure to use special packages for Python 2 instead
4655 ;; of those automatically rewritten by package-with-python2.
4656 (propagated-inputs
4657 `(("python2-pycairo" ,python2-pycairo)
4658 ("python2-backports-functools-lru-cache"
4659 ,python2-backports-functools-lru-cache)
4660 ("python2-functools32" ,python2-functools32)
4661 ("python2-pygobject-2" ,python2-pygobject-2)
4662 ("python2-subprocess32" ,python2-subprocess32)
4663 ("python2-tkinter" ,python-2 "tk")
4664 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4665 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4666
4667(define-public python-matplotlib-documentation
4668 (package
4669 (name "python-matplotlib-documentation")
4670 (version (package-version python-matplotlib))
4671 (source (package-source python-matplotlib))
4672 (build-system python-build-system)
4673 (native-inputs
4674 `(("python-matplotlib" ,python-matplotlib)
4675 ("python-colorspacious" ,python-colorspacious)
4676 ("python-sphinx" ,python-sphinx)
4677 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4678 ("python-sphinx-gallery" ,python-sphinx-gallery)
4679 ("python-numpydoc" ,python-numpydoc)
4680 ("python-ipython" ,python-ipython)
4681 ("python-ipykernel" ,python-ipykernel)
4682 ("python-mock" ,python-mock)
4683 ("graphviz" ,graphviz)
4684 ("texlive" ,(texlive-union (list texlive-amsfonts
4685 texlive-latex-amsmath
4686 texlive-latex-enumitem
4687 texlive-latex-expdlist
4688 texlive-latex-geometry
4689 texlive-latex-preview
4690 texlive-latex-type1cm
4691 texlive-latex-ucs
4692
4693 texlive-generic-pdftex
4694
4695 texlive-fonts-ec
4696 texlive-fonts-adobe-times
4697 texlive-fonts-txfonts)))
4698 ("texinfo" ,texinfo)
4699 ,@(package-native-inputs python-matplotlib)))
4700 (arguments
4701 `(#:tests? #f ; we're only generating documentation
4702 #:phases
4703 (modify-phases %standard-phases
4704 ;; The tests in python-matplotlib are run after the install phase, so
4705 ;; we need to delete the extra phase here.
4706 (delete 'check)
4707 (replace 'build
4708 (lambda _
4709 (chdir "doc")
4710 (setenv "PYTHONPATH"
4711 (string-append (getenv "PYTHONPATH")
4712 ":" (getcwd) "/../examples/units"))
4713 (substitute* "conf.py"
4714 ;; Don't use git.
4715 (("^SHA = check_output.*")
4716 (string-append "SHA = \"" ,version "\"\n"))
4717 ;; Don't fetch intersphinx files from the Internet
4718 (("^explicit_order_folders" m)
4719 (string-append "intersphinx_mapping = {}\n" m))
4720 (("'sphinx.ext.intersphinx',") "")
4721 ;; Disable URL embedding which requires internet access.
4722 (("'https://docs.scipy.org/doc/numpy'") "None")
4723 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4724 (invoke "make"
4725 "SPHINXBUILD=sphinx-build"
4726 "SPHINXOPTS=" ; don't abort on warnings
4727 "html" "texinfo")))
4728 (replace 'install
4729 (lambda* (#:key inputs outputs #:allow-other-keys)
4730 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4731 (doc (string-append data "/doc/python-matplotlib-" ,version))
4732 (info (string-append data "/info"))
4733 (html (string-append doc "/html")))
4734 (mkdir-p html)
4735 (mkdir-p info)
4736 (copy-recursively "build/html" html)
4737 (symlink (string-append html "/_images")
4738 (string-append info "/matplotlib-figures"))
4739 (with-directory-excursion "build/texinfo"
4740 (substitute* "matplotlib.texi"
4741 (("@image\\{([^,]*)" all file)
4742 (string-append "@image{matplotlib-figures/" file)))
4743 (symlink (string-append html "/_images")
4744 "./matplotlib-figures")
4745 (invoke "makeinfo" "--no-split"
4746 "-o" "matplotlib.info" "matplotlib.texi"))
4747 (install-file "build/texinfo/matplotlib.info" info))
4748 #t)))))
4749 (home-page (package-home-page python-matplotlib))
4750 (synopsis "Documentation for the python-matplotlib package")
4751 (description (package-description python-matplotlib))
4752 (license (package-license python-matplotlib))))
4753
4754(define-public python2-matplotlib-documentation
4755 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4756 (package
4757 (inherit parent)
4758 (native-inputs
4759 (alist-delete "python-sphinx-copybutton"
4760 (package-native-inputs parent))))))
4761
4762(define-public python-matplotlib-venn
4763 (package
4764 (name "python-matplotlib-venn")
4765 (version "0.11.5")
4766 (source
4767 (origin
4768 (method url-fetch)
4769 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4770 (sha256
4771 (base32
4772 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4773 (build-system python-build-system)
4774 (arguments '(#:tests? #f)) ; tests are not included
4775 (propagated-inputs
4776 `(("python-matplotlib" ,python-matplotlib)
4777 ("python-numpy" ,python-numpy)
4778 ("python-scipy" ,python-scipy)))
4779 (native-inputs
4780 `(("unzip" ,unzip)))
4781 (home-page "https://github.com/konstantint/matplotlib-venn")
4782 (synopsis "Plot area-proportional Venn diagrams")
4783 (description
4784 "This package provides tools for plotting area-proportional two- and
4785three-way Venn diagrams in @code{matplotlib}.")
4786 (license license:expat)))
4787
4788(define-public python2-pysnptools
4789 (package
4790 (name "python2-pysnptools")
4791 (version "0.3.13")
4792 (source
4793 (origin
4794 (method url-fetch)
4795 (uri (pypi-uri "pysnptools" version))
4796 (sha256
4797 (base32
4798 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4799 (build-system python-build-system)
4800 (arguments
4801 `(#:python ,python-2 ; only Python 2.7 is supported
4802 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4803 (propagated-inputs
4804 `(("python2-numpy" ,python2-numpy)
4805 ("python2-scipy" ,python2-scipy)
4806 ("python2-pandas" ,python2-pandas)))
4807 (native-inputs
4808 `(("python2-cython" ,python2-cython)))
4809 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4810 (synopsis "Library for reading and manipulating genetic data")
4811 (description
4812 "PySnpTools is a library for reading and manipulating genetic data. It
4813can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4814those files. It can also efficiently manipulate ranges of integers using set
4815operators such as union, intersection, and difference.")
4816 (license license:asl2.0)))
4817
4818(define-public python-socksipy-branch
4819 (package
4820 (name "python-socksipy-branch")
4821 (version "1.01")
4822 (source
4823 (origin
4824 (method url-fetch)
4825 (uri (pypi-uri "SocksiPy-branch" version))
4826 (sha256
4827 (base32
4828 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4829 (build-system python-build-system)
4830 (arguments
4831 `(#:tests? #f)) ; There are no tests
4832 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4833 (synopsis "Python SOCKS module")
4834 (description
4835 "SocksiPy - A Python SOCKS client module. It provides a
4836socket-like interface that supports connections to any TCP
4837service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4838The original version was developed by Dan Haim, this is a
4839branch created by Mario Vilas to address some open issues,
4840as the original project seems to have been abandoned circa 2007.")
4841 (license license:bsd-3)))
4842
4843(define-public python2-socksipy-branch
4844 (package-with-python2 python-socksipy-branch))
4845
4846(define-public python-socksipychain
4847 (let ((commit "eb5ee8741ce006ac0c5c3e2e83204062c348c155")
4848 (revision "1")
4849 (version "2.1.1"))
4850 (package
4851 (name "python-socksipychain")
4852 (version (git-version version revision commit))
4853 (source
4854 (origin
4855 (method git-fetch)
4856 (uri (git-reference
4857 (url "https://github.com/pagekite/PySocksipyChain.git")
4858 (commit commit)))
4859 (file-name (git-file-name name version))
4860 (sha256
4861 (base32
4862 "0fpphn6xnpm7qk8a914s4abycsbq9w6qkci07my632v0fylnm5n7"))))
4863 (build-system python-build-system)
4864 (arguments
4865 `(#:tests? #f)) ; Tests try to access the network.
4866 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4867 (synopsis "Python SOCKS module with chained proxies support")
4868 (description
4869 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4870adds support for arbitrary chaining of proxy servers and various modes of
4871TLS/SSL encryption. It was developed for use in PageKite, and also includes
4872a simple netcat replacement with chaining support.")
4873 (license license:bsd-3))))
4874
4875(define-public python-pycodestyle
4876 (package
4877 (name "python-pycodestyle")
4878 (version "2.5.0")
4879 (source
4880 (origin
4881 (method url-fetch)
4882 (uri (pypi-uri "pycodestyle" version))
4883 (sha256
4884 (base32
4885 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4886 (build-system python-build-system)
4887 (home-page "https://pycodestyle.readthedocs.io/")
4888 (synopsis "Python style guide checker")
4889 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4890Python code against some of the style conventions in
4891@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4892 (license license:expat)))
4893
4894(define-public python2-pycodestyle
4895 (package-with-python2 python-pycodestyle))
4896
4897(define-public python-multidict
4898 (package
4899 (name "python-multidict")
4900 (version "4.7.5")
4901 (source
4902 (origin
4903 (method url-fetch)
4904 (uri (pypi-uri "multidict" version))
4905 (sha256
4906 (base32
4907 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
4908 (build-system python-build-system)
4909 (arguments
4910 '(#:modules ((ice-9 ftw)
4911 (srfi srfi-1)
4912 (srfi srfi-26)
4913 (guix build utils)
4914 (guix build python-build-system))
4915 #:phases (modify-phases %standard-phases
4916 (replace 'check
4917 (lambda* (#:key tests? #:allow-other-keys)
4918 (if tests?
4919 (begin
4920 (let ((libdir (find (cut string-prefix? "lib." <>)
4921 (scandir "build"))))
4922 (setenv "PYTHONPATH"
4923 (string-append "./build/" libdir ":"
4924 (getenv "PYTHONPATH")))
4925 (invoke "pytest" "-vv")))
4926 (format #t "test suite not run~%"))
4927 #t)))))
4928 (native-inputs
4929 `(("python-pytest" ,python-pytest)
4930 ("python-pytest-cov" ,python-pytest-cov)))
4931 (home-page "https://github.com/aio-libs/multidict/")
4932 (synopsis "Multidict implementation")
4933 (description "Multidict is dict-like collection of key-value pairs
4934where key might be occurred more than once in the container.")
4935 (license license:asl2.0)))
4936
4937(define-public python-orderedmultidict
4938 (package
4939 (name "python-orderedmultidict")
4940 (version "0.7.11")
4941 (source
4942 (origin
4943 (method url-fetch)
4944 (uri (pypi-uri "orderedmultidict" version))
4945 (sha256
4946 (base32
4947 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4948 (build-system python-build-system)
4949 (arguments
4950 `(#:phases
4951 (modify-phases %standard-phases
4952 (add-after 'unpack 'fix-tests
4953 (lambda _
4954 ;; The package uses nosetest for running the tests.
4955 ;; Adding this initfile allows to run the test suite
4956 ;; without requiring nosetest.
4957 (with-output-to-file "tests/__init__.py" newline)
4958 #t)))))
4959 (propagated-inputs
4960 `(("python-six" ,python-six)))
4961 (native-inputs
4962 `(("python-pycodestyle" ,python-pycodestyle)))
4963 (home-page "https://github.com/gruns/orderedmultidict")
4964 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4965 (description "This package contains a library for ordered multivalue
4966dictionaries. A multivalue dictionary is a dictionary that can store
4967multiple values for the same key. An ordered multivalue dictionary is a
4968multivalue dictionary that retains the order of insertions and deletions.")
4969 (license license:unlicense)))
4970
4971(define-public python2-orderedmultidict
4972 (package-with-python2 python-orderedmultidict))
4973
4974(define-public python-autopep8
4975 (package
4976 (name "python-autopep8")
4977 (version "1.3.5")
4978 (source
4979 (origin
4980 (method url-fetch)
4981 (uri (pypi-uri "autopep8" version))
4982 (sha256
4983 (base32
4984 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4985 (build-system python-build-system)
4986 (propagated-inputs
4987 `(("python-pycodestyle" ,python-pycodestyle)))
4988 (home-page "https://github.com/hhatto/autopep8")
4989 (synopsis "Format Python code according to the PEP 8 style guide")
4990 (description
4991 "@code{autopep8} automatically formats Python code to conform to
4992the PEP 8 style guide. It uses the pycodestyle utility to determine
4993what parts of the code needs to be formatted. @code{autopep8} is
4994capable of fixing most of the formatting issues that can be reported
4995by pycodestyle.")
4996 (license (license:non-copyleft
4997 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4998
4999(define-public python2-autopep8
5000 (package-with-python2 python-autopep8))
5001
5002(define-public python-distlib
5003 (package
5004 (name "python-distlib")
5005 (version "0.3.0")
5006 (source
5007 (origin
5008 (method url-fetch)
5009 (uri (pypi-uri "distlib" version ".zip"))
5010 (sha256
5011 (base32
5012 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5013 (build-system python-build-system)
5014 (arguments
5015 `(#:phases
5016 (modify-phases %standard-phases
5017 (add-before 'build 'no-/bin/sh
5018 (lambda _
5019 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5020 (("/bin/sh") (which "sh")))
5021 #t))
5022 (add-before 'check 'prepare-test-env
5023 (lambda _
5024 (setenv "HOME" "/tmp")
5025 ;; NOTE: Any value works, the variable just has to be present.
5026 (setenv "SKIP_ONLINE" "1")
5027 #t)))))
5028 (native-inputs `(("unzip" ,unzip)))
5029 (home-page "https://bitbucket.org/pypa/distlib")
5030 (synopsis "Distribution utilities")
5031 (description "Distlib is a library which implements low-level functions that
5032relate to packaging and distribution of Python software. It is intended to be
5033used as the basis for third-party packaging tools.")
5034 (license license:psfl)))
5035
5036(define-public python-distutils-extra
5037 (package
5038 (name "python-distutils-extra")
5039 (version "2.38")
5040 (source
5041 (origin
5042 (method url-fetch)
5043 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5044 version "/+download/python-distutils-extra-"
5045 version ".tar.gz"))
5046 (sha256
5047 (base32
5048 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5049 (build-system python-build-system)
5050 (home-page "https://launchpad.net/python-distutils-extra/")
5051 (synopsis "Enhancements to Python's distutils")
5052 (description
5053 "The python-distutils-extra module enables you to easily integrate
5054gettext support, themed icons, and scrollkeeper-based documentation into
5055Python's distutils.")
5056 (license license:gpl2)))
5057
5058(define-public python2-distutils-extra
5059 (package-with-python2 python-distutils-extra))
5060
5061(define-public python2-elib.intl
5062 (package
5063 (name "python2-elib.intl")
5064 (version "0.0.3")
5065 (source
5066 (origin
5067 ;; This project doesn't tag releases or publish tarballs, so we take
5068 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5069 (method git-fetch)
5070 (uri (git-reference
5071 (url "https://github.com/dieterv/elib.intl.git")
5072 (commit "d09997cfef")))
5073 (file-name (string-append name "-" version "-checkout"))
5074 (sha256
5075 (base32
5076 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5077 (build-system python-build-system)
5078 (arguments
5079 ;; incompatible with Python 3 (exception syntax)
5080 `(#:python ,python-2
5081 #:tests? #f))
5082 (home-page "https://github.com/dieterv/elib.intl")
5083 (synopsis "Enhanced internationalization for Python")
5084 (description
5085 "The elib.intl module provides enhanced internationalization (I18N)
5086services for your Python modules and applications.")
5087 (license license:lgpl3+)))
5088
5089(define-public python-olefile
5090 (package
5091 (name "python-olefile")
5092 (version "0.46")
5093 (source
5094 (origin
5095 (method url-fetch)
5096 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5097 "download/v" version "/olefile-" version ".tar.gz"))
5098 (file-name (string-append name "-" version ".tar.gz"))
5099 (sha256
5100 (base32
5101 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5102 (build-system python-build-system)
5103 (home-page "https://www.decalage.info/python/olefileio")
5104 (synopsis "Read and write Microsoft OLE2 files.")
5105 (description
5106 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5107Storage or Compound Document, Microsoft Office). It is an improved version of
5108the OleFileIO module from PIL, the Python Image Library.")
5109 (license license:bsd-3)))
5110
5111(define-public python2-olefile
5112 (package-with-python2 python-olefile))
5113
5114(define-public python-pillow
5115 (package
5116 (name "python-pillow")
5117 (version "6.2.1")
5118 (source
5119 (origin
5120 (method url-fetch)
5121 (uri (pypi-uri "Pillow" version))
5122 (sha256
5123 (base32
5124 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5125 (build-system python-build-system)
5126 (native-inputs
5127 `(("python-pytest" ,python-pytest)))
5128 (inputs
5129 `(("freetype" ,freetype)
5130 ("lcms" ,lcms)
5131 ("libjpeg" ,libjpeg)
5132 ("libtiff" ,libtiff)
5133 ("libwebp" ,libwebp)
5134 ("openjpeg" ,openjpeg)
5135 ("zlib" ,zlib)))
5136 (propagated-inputs
5137 `(("python-olefile" ,python-olefile)))
5138 (arguments
5139 `(#:phases
5140 (modify-phases %standard-phases
5141 (add-after 'unpack 'patch-ldconfig
5142 (lambda _
5143 (substitute* "setup.py"
5144 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5145 (replace 'check
5146 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5147 (if tests?
5148 (begin
5149 (setenv "HOME" (getcwd))
5150 ;; Make installed package available for running the tests.
5151 (add-installed-pythonpath inputs outputs)
5152 (invoke "python" "selftest.py" "--installed")
5153 (invoke "python" "-m" "pytest" "-vv"))
5154 #t))))))
5155 (home-page "https://python-pillow.org")
5156 (synopsis "Fork of the Python Imaging Library")
5157 (description
5158 "The Python Imaging Library adds image processing capabilities to your
5159Python interpreter. This library provides extensive file format support, an
5160efficient internal representation, and fairly powerful image processing
5161capabilities. The core image library is designed for fast access to data
5162stored in a few basic pixel formats. It should provide a solid foundation for
5163a general image processing tool.")
5164 (license (license:x11-style
5165 "http://www.pythonware.com/products/pil/license.htm"
5166 "The PIL Software License"))))
5167
5168(define-public python2-pillow
5169 (package-with-python2 python-pillow))
5170
5171(define-public python-pycparser
5172 (package
5173 (name "python-pycparser")
5174 (version "2.19")
5175 (source
5176 (origin
5177 (method url-fetch)
5178 (uri (pypi-uri "pycparser" version))
5179 (sha256
5180 (base32
5181 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
5182 (outputs '("out" "doc"))
5183 (build-system python-build-system)
5184 (native-inputs
5185 `(("pkg-config" ,pkg-config)))
5186 (arguments
5187 `(#:phases
5188 (modify-phases %standard-phases
5189 (replace 'check
5190 (lambda _
5191 (with-directory-excursion "tests"
5192 (invoke "python" "all_tests.py"))
5193 #t))
5194 (add-after 'install 'install-doc
5195 (lambda* (#:key outputs #:allow-other-keys)
5196 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5197 (doc (string-append data "/doc/" ,name "-" ,version))
5198 (examples (string-append doc "/examples")))
5199 (mkdir-p examples)
5200 (for-each (lambda (file)
5201 (copy-file (string-append "." file)
5202 (string-append doc file)))
5203 '("/README.rst" "/CHANGES" "/LICENSE"))
5204 (copy-recursively "examples" examples)
5205 #t))))))
5206 (home-page "https://github.com/eliben/pycparser")
5207 (synopsis "C parser in Python")
5208 (description
5209 "Pycparser is a complete parser of the C language, written in pure Python
5210using the PLY parsing library. It parses C code into an AST and can serve as
5211a front-end for C compilers or analysis tools.")
5212 (license license:bsd-3)))
5213
5214(define-public python2-pycparser
5215 (package-with-python2 python-pycparser))
5216
5217(define-public python-pywavelets
5218 (package
5219 (name "python-pywavelets")
5220 (version "1.0.1")
5221 (home-page "https://github.com/PyWavelets/pywt")
5222 (source (origin
5223 (method url-fetch)
5224 (uri (pypi-uri "PyWavelets" version))
5225 (sha256
5226 (base32
5227 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
5228 (build-system python-build-system)
5229 (arguments
5230 '(#:modules ((ice-9 ftw)
5231 (srfi srfi-1)
5232 (srfi srfi-26)
5233 (guix build utils)
5234 (guix build python-build-system))
5235 #:phases (modify-phases %standard-phases
5236 (replace 'check
5237 (lambda _
5238 (let ((cwd (getcwd))
5239 (libdir (find (cut string-prefix? "lib." <>)
5240 (scandir "build"))))
5241 (with-directory-excursion (string-append cwd "/build/" libdir)
5242 (invoke "nosetests" "-v" "."))))))))
5243 (native-inputs
5244 `(("python-matplotlib" ,python-matplotlib) ;for tests
5245 ("python-nose" ,python-nose)))
5246 (propagated-inputs
5247 `(("python-numpy" ,python-numpy)))
5248 (synopsis "Wavelet transforms in Python")
5249 (description
5250 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5251mathematical basis functions that are localized in both time and frequency.
5252Wavelet transforms are time-frequency transforms employing wavelets. They are
5253similar to Fourier transforms, the difference being that Fourier transforms are
5254localized only in frequency instead of in time and frequency.")
5255 (license license:expat)))
5256
5257(define-public python2-pywavelets
5258 (package-with-python2 python-pywavelets))
5259
5260(define-public python-pywinrm
5261 (package
5262 (name "python-pywinrm")
5263 (version "0.4.1")
5264 (source
5265 (origin
5266 (method url-fetch)
5267 (uri (pypi-uri "pywinrm" version))
5268 (sha256
5269 (base32
5270 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5271 (build-system python-build-system)
5272 (propagated-inputs
5273 `(("python-six" ,python-six)
5274 ("python-requests_ntlm" ,python-requests_ntlm)
5275 ("python-xmltodict" ,python-xmltodict)
5276 ("python-kerberos" ,python-kerberos)))
5277 (native-inputs
5278 `(("python-mock" ,python-mock)
5279 ("python-pytest" ,python-pytest)))
5280 (home-page "https://github.com/diyan/pywinrm/")
5281 (synopsis
5282 "Python library for Windows Remote Management (WinRM)")
5283 (description
5284 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5285service. It allows you to invoke commands on target Windows machines from
5286any machine that can run Python.")
5287 (license license:expat)))
5288
5289(define-public python-xcffib
5290 (package
5291 (name "python-xcffib")
5292 (version "0.6.0")
5293 (source
5294 (origin
5295 (method url-fetch)
5296 (uri (pypi-uri "xcffib" version))
5297 (sha256
5298 (base32
5299 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5300 (build-system python-build-system)
5301 (inputs
5302 `(("libxcb" ,libxcb)))
5303 (propagated-inputs
5304 `(("python-cffi" ,python-cffi) ; used at run time
5305 ("python-six" ,python-six)))
5306 (arguments
5307 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5308 #:tests? #f
5309 #:phases
5310 (modify-phases %standard-phases
5311 (add-after 'unpack 'fix-libxcb-path
5312 (lambda* (#:key inputs #:allow-other-keys)
5313 (let ((libxcb (assoc-ref inputs "libxcb")))
5314 (substitute* '("xcffib/__init__.py")
5315 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5316 #t)))
5317 (add-after 'install 'install-doc
5318 (lambda* (#:key outputs #:allow-other-keys)
5319 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5320 "/doc/" ,name "-" ,version)))
5321 (mkdir-p doc)
5322 (copy-file "README.md"
5323 (string-append doc "/README.md"))
5324 #t))))))
5325 (home-page "https://github.com/tych0/xcffib")
5326 (synopsis "XCB Python bindings")
5327 (description
5328 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5329support for Python 3 and PyPy. It is based on cffi.")
5330 (license license:expat)))
5331
5332(define-public python2-xcffib
5333 (package-with-python2 python-xcffib))
5334
5335(define-public python-cairocffi
5336 (package
5337 (name "python-cairocffi")
5338 (version "0.9.0")
5339 (source
5340 (origin
5341 (method url-fetch)
5342 (uri (pypi-uri "cairocffi" version))
5343 (sha256
5344 (base32
5345 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5346 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5347 (build-system python-build-system)
5348 (outputs '("out" "doc"))
5349 (inputs
5350 `(("glib" ,glib)
5351 ("gtk+" ,gtk+)
5352 ("gdk-pixbuf" ,gdk-pixbuf)
5353 ("cairo" ,cairo)
5354 ("pango" ,pango)))
5355 (native-inputs
5356 `(("pkg-config" ,pkg-config)
5357 ("python-pytest" ,python-pytest)
5358 ("python-pytest-cov" ,python-pytest-cov)
5359 ("python-pytest-runner" ,python-pytest-runner)
5360 ("python-sphinx" ,python-sphinx)
5361 ("python-docutils" ,python-docutils)))
5362 (propagated-inputs
5363 `(("python-xcffib" ,python-xcffib))) ; used at run time
5364 (arguments
5365 `(#:phases
5366 (modify-phases %standard-phases
5367 (add-after 'unpack 'patch-paths
5368 (lambda* (#:key inputs outputs #:allow-other-keys)
5369 (substitute* (find-files "." "\\.py$")
5370 (("dlopen\\(ffi, 'cairo'")
5371 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5372 "/lib/libcairo.so.2'"))
5373 (("dlopen\\(ffi, 'gdk-3'")
5374 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5375 "/lib/libgtk-3.so.0'"))
5376 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5377 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5378 "/lib/libgdk_pixbuf-2.0.so.0'"))
5379 (("dlopen\\(ffi, 'glib-2.0'")
5380 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5381 "/lib/libglib-2.0.so.0'"))
5382 (("dlopen\\(ffi, 'gobject-2.0'")
5383 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5384 "/lib/libgobject-2.0.so.0'"))
5385 (("dlopen\\(ffi, 'pangocairo-1.0'")
5386 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5387 "/lib/libpangocairo-1.0.so.0'"))
5388 (("dlopen\\(ffi, 'pango-1.0'")
5389 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5390 "/lib/libpango-1.0.so.0'")))
5391 #t))
5392 (add-after 'install 'install-doc
5393 (lambda* (#:key inputs outputs #:allow-other-keys)
5394 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5395 (doc (string-append data "/doc/" ,name "-" ,version))
5396 (html (string-append doc "/html")))
5397 (setenv "LD_LIBRARY_PATH"
5398 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5399 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5400 (setenv "LANG" "en_US.UTF-8")
5401 (mkdir-p html)
5402 (for-each (lambda (file)
5403 (copy-file (string-append "." file)
5404 (string-append doc file)))
5405 '("/README.rst" "/CHANGES" "/LICENSE"))
5406 (system* "python" "setup.py" "build_sphinx")
5407 (copy-recursively "docs/_build/html" html)
5408 #t))))))
5409 (home-page "https://github.com/Kozea/cairocffi")
5410 (synopsis "Python bindings and object-oriented API for Cairo")
5411 (description
5412 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5413Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5414graphics library with support for multiple backends including image buffers,
5415PNG, PostScript, PDF, and SVG file output.")
5416 (license license:bsd-3)))
5417
5418(define-public python2-cairocffi
5419 (package-with-python2 python-cairocffi))
5420
5421(define-public python-decorator
5422 (package
5423 (name "python-decorator")
5424 (version "4.3.0")
5425 (source
5426 (origin
5427 (method url-fetch)
5428 (uri (pypi-uri "decorator" version))
5429 (sha256
5430 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5431 (build-system python-build-system)
5432 (home-page "https://pypi.org/project/decorator/")
5433 (synopsis "Python module to simplify usage of decorators")
5434 (description
5435 "The aim of the decorator module is to simplify the usage of decorators
5436for the average programmer, and to popularize decorators usage giving examples
5437of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5438etc. The core of this module is a decorator factory.")
5439 (license license:expat)))
5440
5441(define-public python2-decorator
5442 (package-with-python2 python-decorator))
5443
5444(define-public python-drmaa
5445 (package
5446 (name "python-drmaa")
5447 (version "0.7.7")
5448 (source
5449 (origin
5450 (method url-fetch)
5451 (uri (pypi-uri "drmaa" version))
5452 (sha256
5453 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5454 (build-system python-build-system)
5455 ;; The test suite requires libdrmaa which is provided by the cluster
5456 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5457 ;; should be set to the path of the libdrmaa library.
5458 (arguments '(#:tests? #f))
5459 (native-inputs
5460 `(("python-nose" ,python-nose)))
5461 (home-page "https://pypi.org/project/drmaa/")
5462 (synopsis "Python bindings for the DRMAA library")
5463 (description
5464 "A Python package for Distributed Resource Management (DRM) job
5465submission and control. This package is an implementation of the DRMAA 1.0
5466Python language binding specification.")
5467 (license license:bsd-3)))
5468
5469(define-public python2-drmaa
5470 (package-with-python2 python-drmaa))
5471
5472(define-public python-grako
5473 (package
5474 (name "python-grako")
5475 (version "3.99.9")
5476 (source
5477 (origin
5478 (method url-fetch)
5479 (uri
5480 (pypi-uri "grako" version ".zip"))
5481 (sha256
5482 (base32
5483 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5484 (build-system python-build-system)
5485 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5486 (native-inputs
5487 `(("unzip" ,unzip)
5488 ("python-pytest" ,python-pytest)
5489 ("python-pytest-runner" ,python-pytest-runner)))
5490 (home-page "https://bitbucket.org/neogeny/grako")
5491 (synopsis "EBNF parser generator")
5492 (description
5493 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5494memoizing PEG/Packrat parser in Python.")
5495 (license license:bsd-3)))
5496
5497(define-public python2-grako
5498 (package-with-python2 python-grako))
5499
5500(define-public python-gridmap
5501 (package
5502 (name "python-gridmap")
5503 (version "0.13.0")
5504 (source
5505 (origin
5506 (method git-fetch)
5507 (uri (git-reference
5508 (url "https://github.com/pygridtools/gridmap.git")
5509 (commit (string-append "v" version))))
5510 (file-name (git-file-name name version))
5511 (sha256
5512 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
5513 (build-system python-build-system)
5514 (arguments
5515 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5516 (propagated-inputs
5517 `(("python-psutil" ,python-psutil)
5518 ("python-drmaa" ,python-drmaa)
5519 ("python-pyzmq" ,python-pyzmq)))
5520 (home-page "https://github.com/pygridtools/gridmap")
5521 (synopsis "Create jobs on a cluster directly from Python")
5522 (description
5523 "Gridmap is a Python package to allow you to easily create jobs on the
5524cluster directly from Python. You can directly map Python functions onto the
5525cluster without needing to write any wrapper code yourself.")
5526 (license license:gpl3+)))
5527
5528(define-public python2-gridmap
5529 (package-with-python2 python-gridmap))
5530
5531(define-public python-honcho
5532 (package
5533 (name "python-honcho")
5534 (version "1.0.1")
5535 (source
5536 (origin
5537 (method git-fetch)
5538 (uri (git-reference
5539 (url "https://github.com/nickstenning/honcho.git")
5540 (commit (string-append "v" version))))
5541 (file-name (git-file-name name version))
5542 (sha256
5543 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5544 (build-system python-build-system)
5545 (native-inputs
5546 `(("python-pytest" ,python-pytest)
5547 ("python-mock" ,python-mock)
5548 ("python-tox" ,python-tox)
5549 ("which" ,which))) ;for tests
5550 (propagated-inputs
5551 `(("python-jinja2" ,python-jinja2)))
5552 (arguments
5553 `(#:phases
5554 (modify-phases %standard-phases
5555 (delete 'check)
5556 (add-after 'install 'check
5557 (lambda* (#:key outputs inputs #:allow-other-keys)
5558 ;; fix honcho path in testsuite
5559 (substitute* "tests/conftest.py"
5560 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5561 "/bin/honcho" "'")))
5562 ;; It's easier to run tests after install.
5563 ;; Make installed package available for running the tests
5564 (add-installed-pythonpath inputs outputs)
5565 (invoke "py.test" "-v"))))))
5566 (home-page "https://github.com/nickstenning/honcho")
5567 (synopsis "Manage Procfile-based applications")
5568 (description
5569 "A Procfile is a file which describes how to run an application
5570consisting of several processes. honcho starts all listed processes.
5571The output of all running processes is collected by honcho and
5572displayed.")
5573 (license license:expat)))
5574
5575(define-public python2-honcho
5576 (package-with-python2 python-honcho))
5577
5578(define-public python-pexpect
5579 (package
5580 (name "python-pexpect")
5581 (version "4.8.0")
5582 (source
5583 (origin
5584 (method url-fetch)
5585 (uri (pypi-uri "pexpect" version))
5586 (sha256
5587 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
5588 (build-system python-build-system)
5589 (arguments
5590 `(#:phases
5591 (modify-phases %standard-phases
5592 (add-before 'check 'prepare-tests
5593 (lambda _
5594 (substitute* (find-files "tests")
5595 (("/bin/ls") (which "ls"))
5596 (("/bin/echo") (which "echo"))
5597 (("/bin/which") (which "which"))
5598 ;; Many tests try to use the /bin directory which
5599 ;; is not present in the build environment.
5600 ;; Use one that's non-empty and unlikely to change.
5601 (("/bin'") "/dev'")
5602 ;; Disable failing test. See upstream bug report
5603 ;; https://github.com/pexpect/pexpect/issues/568
5604 (("def test_bash") "def _test_bash"))
5605 ;; XXX: Socket connection test gets "Connection reset by peer".
5606 ;; Why does it not work? Delete for now.
5607 (delete-file "tests/test_socket.py")
5608 #t))
5609 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5610 (native-inputs
5611 `(("python-nose" ,python-nose)
5612 ("python-pytest" ,python-pytest)
5613 ("man-db" ,man-db)
5614 ("which" ,which)
5615 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5616 (propagated-inputs
5617 `(("python-ptyprocess" ,python-ptyprocess)))
5618 (home-page "http://pexpect.readthedocs.org/")
5619 (synopsis "Controlling interactive console applications")
5620 (description
5621 "Pexpect is a pure Python module for spawning child applications;
5622controlling them; and responding to expected patterns in their output.
5623Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5624child application and control it as if a human were typing commands.")
5625 (license license:isc)))
5626
5627(define-public python2-pexpect
5628 (package-with-python2 python-pexpect))
5629
5630(define-public python-setuptools-scm
5631 (package
5632 (name "python-setuptools-scm")
5633 (version "3.2.0")
5634 (source (origin
5635 (method url-fetch)
5636 (uri (pypi-uri "setuptools_scm" version))
5637 (sha256
5638 (base32
5639 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5640 (build-system python-build-system)
5641 (home-page "https://github.com/pypa/setuptools_scm/")
5642 (synopsis "Manage Python package versions in SCM metadata")
5643 (description
5644 "Setuptools_scm handles managing your Python package versions in
5645@dfn{software configuration management} (SCM) metadata instead of declaring
5646them as the version argument or in a SCM managed file.")
5647 (license license:expat)))
5648
5649;; Needed by python-lazy-object-proxy, remove on next update cycle.
5650(define-public python-setuptools-scm-3.3
5651 (package
5652 (inherit python-setuptools-scm)
5653 (version "3.3.3")
5654 (source (origin
5655 (method url-fetch)
5656 (uri (pypi-uri "setuptools_scm" version))
5657 (sha256
5658 (base32
5659 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5660
5661(define-public python2-setuptools-scm
5662 (package-with-python2 python-setuptools-scm))
5663
5664(define-public python-pathlib2
5665 (package
5666 (name "python-pathlib2")
5667 (version "2.3.3")
5668 (source
5669 (origin
5670 (method url-fetch)
5671 (uri (pypi-uri "pathlib2" version))
5672 (sha256
5673 (base32
5674 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5675 (build-system python-build-system)
5676 (propagated-inputs
5677 `(("python-scandir" ,python-scandir)
5678 ("python-six" ,python-six)))
5679 (home-page "https://pypi.org/project/pathlib2/")
5680 (synopsis "Object-oriented file system paths")
5681 (description "The goal of pathlib2 is to provide a backport of the
5682standard @code{pathlib} module which tracks the standard library module, so
5683all the newest features of the standard @code{pathlib} can be used also on
5684older Python versions.")
5685 (license license:expat)))
5686
5687(define-public python2-importlib-resources
5688 (package
5689 (name "python2-importlib-resources")
5690 (version "1.0.2")
5691 (source (origin
5692 (method url-fetch)
5693 (uri (pypi-uri "importlib_resources" version))
5694 (sha256
5695 (base32
5696 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5697 (build-system python-build-system)
5698 (arguments
5699 `(#:python ,python-2))
5700 (native-inputs
5701 `(("python-wheel" ,python2-wheel)))
5702 (propagated-inputs
5703 `(("python-pathlib2" ,python2-pathlib2)
5704 ("python-typing" ,python2-typing)))
5705 (home-page "https://gitlab.com/python-devs/importlib_resources")
5706 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5707 (description
5708 "This package provides an implementation of @code{importlib.resources}
5709for older versions of Python.")
5710 (license license:asl2.0)))
5711
5712(define-public python-importlib-metadata
5713 (package
5714 (name "python-importlib-metadata")
5715 (version "1.4.0")
5716 (source
5717 (origin
5718 (method url-fetch)
5719 (uri (pypi-uri "importlib_metadata" version))
5720 (sha256
5721 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
5722 (build-system python-build-system)
5723 (propagated-inputs
5724 `(("python-zipp" ,python-zipp)))
5725 (native-inputs
5726 `(("python-setuptools-scm" ,python-setuptools-scm)
5727 ("python-packaging" ,python-packaging)))
5728 (home-page "https://importlib-metadata.readthedocs.io/")
5729 (synopsis "Read metadata from Python packages")
5730 (description
5731 "@code{importlib_metadata} is a library which provides an API for
5732accessing an installed Python package's metadata, such as its entry points or
5733its top-level name. This functionality intends to replace most uses of
5734@code{pkg_resources} entry point API and metadata API. Along with
5735@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5736need to use the older and less efficient @code{pkg_resources} package.")
5737 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5738 (license license:asl2.0)))
5739
5740(define-public python2-importlib-metadata
5741 (let ((base (package-with-python2 (strip-python2-variant
5742 python-importlib-metadata))))
5743 (package/inherit
5744 base
5745 (name "python2-importlib-metadata")
5746 (propagated-inputs
5747 `(("python-configparser" ,python2-configparser)
5748 ("python-contextlib2" ,python2-contextlib2)
5749 ("python-importlib-resources" ,python2-importlib-resources)
5750 ("python-pathlib2" ,python2-pathlib2)
5751 ,@(package-propagated-inputs base))))))
5752
5753(define-public python-jaraco-packaging
5754 (package
5755 (name "python-jaraco-packaging")
5756 (version "6.1")
5757 (source
5758 (origin
5759 (method url-fetch)
5760 (uri (pypi-uri "jaraco.packaging" version))
5761 (sha256
5762 (base32
5763 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5764 (build-system python-build-system)
5765 (propagated-inputs
5766 `(("python-pytest" ,python-pytest)
5767 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5768 ("python-pytest-flake8" ,python-pytest-flake8)
5769 ("python-rst.linker" ,python-rst.linker)
5770 ("python-setuptools" ,python-setuptools)
5771 ("python-setuptools-scm" ,python-setuptools-scm)
5772 ("python-six" ,python-six)
5773 ("python-sphinx" ,python-sphinx)))
5774 (home-page "https://github.com/jaraco/jaraco.packaging")
5775 (synopsis "Tools to supplement packaging Python releases")
5776 (description
5777 "This package provides various tools to supplement packaging Python
5778releases.")
5779 (license license:expat)))
5780
5781(define-public python-pathpy
5782 (package
5783 (name "python-pathpy")
5784 (version "11.5.1")
5785 (source
5786 (origin
5787 (method url-fetch)
5788 (uri (pypi-uri "path.py" version))
5789 (sha256
5790 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5791 (outputs '("out" "doc"))
5792 (build-system python-build-system)
5793 (propagated-inputs
5794 `(("python-appdirs" ,python-appdirs)
5795 ("python-importlib-metadata" ,python-importlib-metadata)))
5796 (native-inputs
5797 `(("python-setuptools-scm" ,python-setuptools-scm)
5798 ("python-sphinx" ,python-sphinx)
5799 ("python-rst.linker" ,python-rst.linker)
5800 ("python-pytest" ,python-pytest)
5801 ("python-pytest-runner" ,python-pytest-runner)
5802 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5803 (arguments
5804 `(#:phases
5805 (modify-phases %standard-phases
5806 (add-after 'build 'build-doc
5807 (lambda _
5808 (setenv "LANG" "en_US.UTF-8")
5809 (invoke "python" "setup.py" "build_sphinx")))
5810 (add-after 'install 'install-doc
5811 (lambda* (#:key outputs #:allow-other-keys)
5812 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5813 (doc (string-append data "/doc/" ,name "-" ,version))
5814 (html (string-append doc "/html")))
5815 (mkdir-p html)
5816 (for-each (lambda (file)
5817 (copy-file file (string-append doc "/" file)))
5818 '("README.rst" "CHANGES.rst"))
5819 (copy-recursively "build/sphinx/html" html)
5820 #t)))
5821 (replace 'check
5822 (lambda _
5823 ;; The import time test aborts if an import takes longer than
5824 ;; 100ms. It may very well take a little longer than that.
5825 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5826 (home-page "https://github.com/jaraco/path.py")
5827 (synopsis "Python module wrapper for built-in os.path")
5828 (description
5829 "@code{path.py} implements path objects as first-class entities, allowing
5830common operations on files to be invoked on those path objects directly.")
5831 (license license:expat)))
5832
5833(define-public python2-pathpy
5834 (package-with-python2 python-pathpy))
5835
5836(define-public python-simplegeneric
5837 (package
5838 (name "python-simplegeneric")
5839 (version "0.8.1")
5840 (source
5841 (origin
5842 (method url-fetch)
5843 (uri (pypi-uri "simplegeneric" version ".zip"))
5844 (sha256
5845 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5846 (build-system python-build-system)
5847 (native-inputs
5848 `(("unzip" ,unzip)))
5849 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5850 (synopsis "Python module for simple generic functions")
5851 (description
5852 "The simplegeneric module lets you define simple single-dispatch generic
5853functions, akin to Python’s built-in generic functions like @code{len()},
5854@code{iter()} and so on. However, instead of using specially-named methods,
5855these generic functions use simple lookup tables, akin to those used by
5856e.g. @code{pickle.dump()} and other generic functions found in the Python
5857standard library.")
5858 (license license:zpl2.1)))
5859
5860(define-public python2-simplegeneric
5861 (package-with-python2 python-simplegeneric))
5862
5863(define-public python-ipython-genutils
5864 ;; TODO: This package is retired, check if can be removed, see description.
5865 (package
5866 (name "python-ipython-genutils")
5867 (version "0.1.0")
5868 (source
5869 (origin
5870 (method url-fetch)
5871 (uri (pypi-uri "ipython_genutils" version))
5872 (sha256
5873 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5874 (build-system python-build-system)
5875 (arguments `(#:tests? #f)) ; no tests
5876 (home-page "https://ipython.org")
5877 (synopsis "Vestigial utilities from IPython")
5878 (description
5879 "This package provides retired utilities from IPython. No packages
5880outside IPython/Jupyter should depend on it.
5881
5882This package shouldn't exist. It contains some common utilities shared by
5883Jupyter and IPython projects during The Big Split. As soon as possible, those
5884packages will remove their dependency on this, and this package will go
5885away.")
5886 (license license:bsd-3)))
5887
5888(define-public python2-ipython-genutils
5889 (package-with-python2 python-ipython-genutils))
5890
5891(define-public python-ipyparallel
5892 (package
5893 (name "python-ipyparallel")
5894 (version "6.2.4")
5895 (source
5896 (origin
5897 (method url-fetch)
5898 (uri (pypi-uri "ipyparallel" version))
5899 (sha256
5900 (base32
5901 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
5902 (build-system python-build-system)
5903 (arguments
5904 `(#:tests? #f ; RuntimeError: IO Loop failed to start
5905 #:phases
5906 (modify-phases %standard-phases
5907 (add-before 'check 'prepare-for-tests
5908 (lambda _
5909 (setenv "HOME" (getcwd))
5910 #t)))))
5911 (propagated-inputs
5912 `(("python-dateutil" ,python-dateutil)
5913 ("python-decorator" ,python-decorator)
5914 ("python-ipykernel" ,python-ipykernel)
5915 ("python-ipython" ,python-ipython)
5916 ("python-ipython-genutils" ,python-ipython-genutils)
5917 ("python-jupyter-client" ,python-jupyter-client)
5918 ("python-pyzmq" ,python-pyzmq)
5919 ("python-tornado" ,python-tornado)
5920 ("python-traitlets" ,python-traitlets)))
5921 (native-inputs
5922 `(("python-ipython" ,python-ipython)
5923 ("python-mock" ,python-mock)
5924 ("python-nose" ,python-nose)
5925 ("python-pytest" ,python-pytest)
5926 ("python-pytest-cov" ,python-pytest-cov)
5927 ("python-testpath" ,python-testpath)))
5928 (home-page "https://ipython.org/")
5929 (synopsis "Interactive Parallel Computing with IPython")
5930 (description
5931 "@code{ipyparallel} is a Python package and collection of CLI scripts for
5932controlling clusters for Jupyter. @code{ipyparallel} contains the following
5933CLI scripts:
5934@enumerate
5935@item ipcluster - start/stop a cluster
5936@item ipcontroller - start a scheduler
5937@item ipengine - start an engine
5938@end enumerate")
5939 (license license:bsd-3)))
5940
5941(define-public python2-ipyparallel
5942 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
5943 (package
5944 (inherit ipyparallel)
5945 (propagated-inputs
5946 `(("python2-futures" ,python2-futures)
5947 ,@(package-propagated-inputs ipyparallel))))))
5948
5949(define-public python-ipython-cluster-helper
5950 (package
5951 (name "python-ipython-cluster-helper")
5952 (version "0.6.4")
5953 (source
5954 (origin
5955 (method url-fetch)
5956 (uri (pypi-uri "ipython-cluster-helper" version))
5957 (sha256
5958 (base32
5959 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
5960 (modules '((guix build utils)))
5961 (snippet
5962 '(begin (substitute* "requirements.txt"
5963 (("ipython.*") "ipython\n"))
5964 #t))))
5965 (build-system python-build-system)
5966 (arguments
5967 `(#:tests? #f ; Test suite can't find IPython.
5968 #:phases
5969 (modify-phases %standard-phases
5970 (replace 'check
5971 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5972 (if tests?
5973 (begin
5974 (setenv "HOME" (getcwd))
5975 (add-installed-pythonpath inputs outputs)
5976 (invoke "python" "example/example.py" "--local"))
5977 #t))))))
5978 (propagated-inputs
5979 `(("python-ipyparallel" ,python-ipyparallel)
5980 ("python-ipython" ,python-ipython)
5981 ("python-netifaces" ,python-netifaces)
5982 ("python-pyzmq" ,python-pyzmq)
5983 ("python-setuptools" ,python-setuptools)
5984 ("python-six" ,python-six)))
5985 (home-page "https://github.com/roryk/ipython-cluster-helper")
5986 (synopsis
5987 "Simplify IPython cluster start up and use for multiple schedulers")
5988 (description
5989 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
5990profile, launches a cluster and returns a view. On program exit it shuts the
5991cluster down and deletes the throwaway profile.")
5992 (license license:expat)))
5993
5994(define-public python2-ipython-cluster-helper
5995 (package-with-python2 python-ipython-cluster-helper))
5996
5997(define-public python-traitlets
5998 (package
5999 (name "python-traitlets")
6000 (version "4.3.3")
6001 (source
6002 (origin
6003 (method url-fetch)
6004 (uri (pypi-uri "traitlets" version))
6005 (sha256
6006 (base32
6007 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6008 (build-system python-build-system)
6009 (arguments
6010 `(#:phases
6011 (modify-phases %standard-phases
6012 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6013 (propagated-inputs
6014 `(("python-ipython-genutils" ,python-ipython-genutils)
6015 ("python-decorator" ,python-decorator)))
6016 (native-inputs
6017 `(("python-pytest" ,python-pytest)))
6018 (properties `((python2-variant . ,(delay python2-traitlets))))
6019 (home-page "https://ipython.org")
6020 (synopsis "Configuration system for Python applications")
6021 (description
6022 "Traitlets is a framework that lets Python classes have attributes with
6023type checking, dynamically calculated default values, and ‘on change’
6024callbacks. The package also includes a mechanism to use traitlets for
6025configuration, loading values from files or from command line arguments. This
6026is a distinct layer on top of traitlets, so you can use traitlets in your code
6027without using the configuration machinery.")
6028 (license license:bsd-3)))
6029
6030(define-public python2-traitlets
6031 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6032 (package
6033 (inherit traitlets)
6034 (propagated-inputs
6035 `(("python2-enum34" ,python2-enum34)
6036 ,@(package-propagated-inputs traitlets))))))
6037
6038(define-public python-jupyter-core
6039 (package
6040 (name "python-jupyter-core")
6041 (version "4.4.0")
6042 (source
6043 (origin
6044 (method url-fetch)
6045 (uri (string-append (pypi-uri "jupyter_core" version)))
6046 (sha256
6047 (base32
6048 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6049 (build-system python-build-system)
6050 ;; FIXME: not sure how to run the tests
6051 (arguments `(#:tests? #f))
6052 (propagated-inputs
6053 `(("python-traitlets" ,python-traitlets)))
6054 (home-page "http://jupyter.org/")
6055 (synopsis "Jupyter base package")
6056 (description
6057 "Jupyter core is the base package on which Jupyter projects rely.")
6058 (license license:bsd-3)))
6059
6060(define-public python2-jupyter-core
6061 (package-with-python2 python-jupyter-core))
6062
6063(define-public python-jupyter-client
6064 (package
6065 (name "python-jupyter-client")
6066 (version "5.2.4")
6067 (source
6068 (origin
6069 (method url-fetch)
6070 (uri (pypi-uri "jupyter_client" version))
6071 (sha256
6072 (base32
6073 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6074 (build-system python-build-system)
6075 ;; Tests fail because of missing native python kernel which I assume is
6076 ;; provided by the ipython package, which we cannot use because it would
6077 ;; cause a dependency cycle.
6078 (arguments
6079 `(#:tests? #f
6080
6081 #:phases (modify-phases %standard-phases
6082 (add-after 'unpack 'set-tool-file-names
6083 (lambda* (#:key inputs #:allow-other-keys)
6084 (let ((iproute (assoc-ref inputs "iproute")))
6085 (substitute* "jupyter_client/localinterfaces.py"
6086 (("'ip'")
6087 (string-append "'" iproute "/sbin/ip'")))
6088 #t))))))
6089 (inputs
6090 `(("iproute" ,iproute)))
6091 (propagated-inputs
6092 `(("python-pyzmq" ,python-pyzmq)
6093 ("python-traitlets" ,python-traitlets)
6094 ("python-jupyter-core" ,python-jupyter-core)))
6095 (home-page "http://jupyter.org/")
6096 (synopsis "Jupyter protocol implementation and client libraries")
6097 (description
6098 "The @code{jupyter_client} package contains the reference implementation
6099of the Jupyter protocol. It also provides client and kernel management APIs
6100for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6101installing @code{kernelspec}s for use with Jupyter frontends.")
6102 (license license:bsd-3)))
6103
6104(define-public python2-jupyter-client
6105 (package-with-python2 python-jupyter-client))
6106
6107(define-public python-ipykernel
6108 (package
6109 (name "python-ipykernel")
6110 (version "5.1.3")
6111 (source
6112 (origin
6113 (method url-fetch)
6114 (uri (pypi-uri "ipykernel" version))
6115 (sha256
6116 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6117 (build-system python-build-system)
6118 (arguments
6119 `(#:phases
6120 (modify-phases %standard-phases
6121 (replace 'check
6122 (lambda _
6123 (setenv "HOME" "/tmp")
6124 (invoke "pytest" "-v")
6125 #t))
6126 (add-after 'install 'set-python-file-name
6127 (lambda* (#:key outputs #:allow-other-keys)
6128 ;; Record the absolute file name of the 'python' executable in
6129 ;; 'kernel.json'.
6130 (let ((out (assoc-ref outputs "out")))
6131 (substitute* (string-append out "/share/jupyter"
6132 "/kernels/python3/kernel.json")
6133 (("\"python\"")
6134 (string-append "\"" (which "python") "\"")))
6135 #t))))))
6136 (propagated-inputs
6137 `(("python-ipython" ,python-ipython)
6138 ;; imported at runtime during connect
6139 ("python-jupyter-client" ,python-jupyter-client)))
6140 (native-inputs
6141 `(("python-flaky" ,python-flaky)
6142 ("python-nose" ,python-nose)
6143 ("python-pytest" ,python-pytest)))
6144 (home-page "https://ipython.org")
6145 (synopsis "IPython Kernel for Jupyter")
6146 (description
6147 "This package provides the IPython kernel for Jupyter.")
6148 (properties `((python2-variant . ,(delay python2-ipykernel))))
6149 (license license:bsd-3)))
6150
6151;; Version 5.x and above no longer support Python 2.
6152(define-public python2-ipykernel
6153 (package
6154 (name "python2-ipykernel")
6155 (version "4.10.1")
6156 (source
6157 (origin
6158 (method url-fetch)
6159 (uri (pypi-uri "ipykernel" version))
6160 (sha256
6161 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6162 (build-system python-build-system)
6163 (arguments
6164 `(#:python ,python-2))
6165 (propagated-inputs
6166 `(("python2-ipython" ,python2-ipython)
6167 ;; imported at runtime during connect
6168 ("python2-jupyter-client" ,python2-jupyter-client)
6169 ("python2-tornado" ,python2-tornado)
6170 ("python2-traitlets" ,python2-traitlets)))
6171 (native-inputs
6172 `(("python2-mock" ,python2-mock)
6173 ("python2-nose" ,python2-nose)
6174 ("python2-pytest" ,python2-pytest)
6175 ("python2-pytest-cov" ,python2-pytest-cov)))
6176 (home-page "https://ipython.org")
6177 (synopsis "IPython Kernel for Jupyter")
6178 (description
6179 "This package provides the IPython kernel for Jupyter.")
6180 (license license:bsd-3)))
6181
6182(define-public python-pari-jupyter
6183 (package
6184 (name "python-pari-jupyter")
6185 (version "1.3.2")
6186 (source
6187 (origin
6188 (method url-fetch)
6189 (uri (pypi-uri "pari_jupyter" version))
6190 (sha256
6191 (base32
6192 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6193 (build-system python-build-system)
6194 (propagated-inputs
6195 `(("python-ipykernel" ,python-ipykernel)))
6196 (inputs
6197 `(("pari-gp" ,pari-gp)
6198 ("readline" ,readline)))
6199 (arguments
6200 `(#:tests? #f)) ; no test suite
6201 (home-page
6202 "https://github.com/jdemeyer/pari_jupyter")
6203 (synopsis "A Jupyter kernel for PARI/GP")
6204 (description "The package provides a PARI/GP kernel for Jupyter.")
6205 (license license:gpl3+)))
6206
6207(define-public python-backcall
6208 (package
6209 (name "python-backcall")
6210 (version "0.1.0")
6211 (source
6212 (origin
6213 (method url-fetch)
6214 (uri (pypi-uri "backcall" version))
6215 (sha256
6216 (base32
6217 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
6218 (build-system python-build-system)
6219 (home-page "https://github.com/takluyver/backcall/")
6220 (synopsis "Specifications for callback functions passed in to an API")
6221 (description
6222 "If your code lets other people supply callback functions, it's important
6223to specify the function signature you expect, and check that functions support
6224that. Adding extra parameters later would break other peoples code unless
6225you're careful. The @code{backcall} package provides a way of specifying the
6226callback signature using a prototype function.")
6227 (license license:bsd-3)))
6228
6229(define-public python-ipython
6230 (package
6231 (name "python-ipython")
6232 (version "7.9.0")
6233 (source
6234 (origin
6235 (method url-fetch)
6236 (uri (pypi-uri "ipython" version ".tar.gz"))
6237 (sha256
6238 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
6239 (build-system python-build-system)
6240 (propagated-inputs
6241 `(("python-backcall" ,python-backcall)
6242 ("python-pyzmq" ,python-pyzmq)
6243 ("python-prompt-toolkit" ,python-prompt-toolkit)
6244 ("python-terminado" ,python-terminado)
6245 ("python-matplotlib" ,python-matplotlib)
6246 ("python-numpy" ,python-numpy)
6247 ("python-numpydoc" ,python-numpydoc)
6248 ("python-jedi" ,python-jedi)
6249 ("python-jinja2" ,python-jinja2)
6250 ("python-mistune" ,python-mistune)
6251 ("python-pexpect" ,python-pexpect)
6252 ("python-pickleshare" ,python-pickleshare)
6253 ("python-simplegeneric" ,python-simplegeneric)
6254 ("python-jsonschema" ,python-jsonschema)
6255 ("python-traitlets" ,python-traitlets)
6256 ("python-nbformat" ,python-nbformat)
6257 ("python-pygments" ,python-pygments)))
6258 (inputs
6259 `(("readline" ,readline)
6260 ("which" ,which)))
6261 (native-inputs
6262 `(("graphviz" ,graphviz)
6263 ("pkg-config" ,pkg-config)
6264 ("python-requests" ,python-requests) ;; for tests
6265 ("python-testpath" ,python-testpath)
6266 ("python-nose" ,python-nose)))
6267 (arguments
6268 `(#:phases
6269 (modify-phases %standard-phases
6270 (add-after 'unpack 'make-docs-reproducible
6271 (lambda _
6272 (substitute* "IPython/sphinxext/ipython_directive.py"
6273 ((".*import datetime") "")
6274 ((".*datetime.datetime.now\\(\\)") "")
6275 (("%timeit") "# %timeit"))
6276 #t))
6277 ;; Tests can only be run after the library has been installed and not
6278 ;; within the source directory.
6279 (delete 'check)
6280 (add-after 'install 'check
6281 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6282 (if tests?
6283 (begin
6284 ;; Make installed package available for running the tests
6285 (add-installed-pythonpath inputs outputs)
6286 (setenv "HOME" "/tmp/") ;; required by a test
6287 ;; We only test the core because one of the other tests
6288 ;; tries to import ipykernel.
6289 (invoke "python" "IPython/testing/iptest.py"
6290 "-v" "IPython/core/tests"))
6291 #t)))
6292 (add-before 'check 'fix-tests
6293 (lambda* (#:key inputs #:allow-other-keys)
6294 (substitute* "./IPython/utils/_process_posix.py"
6295 (("/usr/bin/env', 'which") (which "which")))
6296 (substitute* "./IPython/core/tests/test_inputtransformer.py"
6297 (("#!/usr/bin/env python")
6298 (string-append "#!" (which "python"))))
6299 ;; This test introduces a circular dependency on ipykernel
6300 ;; (which depends on ipython).
6301 (delete-file "IPython/core/tests/test_display.py")
6302 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
6303 (delete-file "IPython/core/tests/test_interactiveshell.py")
6304 #t)))))
6305 (home-page "https://ipython.org")
6306 (synopsis "IPython is a tool for interactive computing in Python")
6307 (description
6308 "IPython provides a rich architecture for interactive computing with:
6309Powerful interactive shells, a browser-based notebook, support for interactive
6310data visualization, embeddable interpreters and tools for parallel
6311computing.")
6312 (properties `((python2-variant . ,(delay python2-ipython))))
6313 (license license:bsd-3)))
6314
6315;; This is the latest release of the LTS version of ipython with support for
6316;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
6317;; dropped support for Python 2.7.
6318(define-public python2-ipython
6319 (package
6320 (name "python2-ipython")
6321 (version "5.8.0")
6322 (source
6323 (origin
6324 (method url-fetch)
6325 (uri (pypi-uri "ipython" version ".tar.gz"))
6326 (sha256
6327 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
6328 (build-system python-build-system)
6329 (propagated-inputs
6330 `(("python2-backports-shutil-get-terminal-size"
6331 ,python2-backports-shutil-get-terminal-size)
6332 ("python2-pathlib2" ,python2-pathlib2)
6333 ("python2-pyzmq" ,python2-pyzmq)
6334 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
6335 ("python2-terminado" ,python2-terminado)
6336 ("python2-matplotlib" ,python2-matplotlib)
6337 ("python2-numpy" ,python2-numpy)
6338 ("python2-numpydoc" ,python2-numpydoc)
6339 ("python2-jinja2" ,python2-jinja2)
6340 ("python2-mistune" ,python2-mistune)
6341 ("python2-pexpect" ,python2-pexpect)
6342 ("python2-pickleshare" ,python2-pickleshare)
6343 ("python2-simplegeneric" ,python2-simplegeneric)
6344 ("python2-jsonschema" ,python2-jsonschema)
6345 ("python2-traitlets" ,python2-traitlets)
6346 ("python2-nbformat" ,python2-nbformat)
6347 ("python2-pygments" ,python2-pygments)))
6348 (inputs
6349 `(("readline" ,readline)
6350 ("which" ,which)))
6351 (native-inputs
6352 `(("graphviz" ,graphviz)
6353 ("pkg-config" ,pkg-config)
6354 ("python2-requests" ,python2-requests) ;; for tests
6355 ("python2-testpath" ,python2-testpath)
6356 ("python2-mock" ,python2-mock)
6357 ("python2-nose" ,python2-nose)))
6358 (arguments
6359 `(#:python ,python-2
6360 #:phases
6361 (modify-phases %standard-phases
6362 (add-before 'check 'delete-broken-tests
6363 (lambda* (#:key inputs #:allow-other-keys)
6364 ;; These tests throw errors for unknown reasons.
6365 (delete-file "IPython/core/tests/test_displayhook.py")
6366 (delete-file "IPython/core/tests/test_magic_terminal.py")
6367 (delete-file "IPython/core/tests/test_profile.py")
6368 #t)))))
6369 (home-page "https://ipython.org")
6370 (synopsis "IPython is a tool for interactive computing in Python")
6371 (description
6372 "IPython provides a rich architecture for interactive computing with:
6373Powerful interactive shells, a browser-based notebook, support for interactive
6374data visualization, embeddable interpreters and tools for parallel
6375computing.")
6376 (license license:bsd-3)))
6377
6378(define-public python-ipython-documentation
6379 (package
6380 (inherit python-ipython)
6381 (name "python-ipython-documentation")
6382 (version (package-version python-ipython))
6383 (arguments
6384 `(#:phases
6385 (modify-phases %standard-phases
6386 (delete 'build)
6387 (delete 'check)
6388 (replace 'install
6389 (lambda* (#:key outputs #:allow-other-keys)
6390 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6391 (doc (string-append data "/doc/" ,name "-" ,version))
6392 (html (string-append doc "/html"))
6393 (man1 (string-append data "/man/man1"))
6394 (info (string-append data "/info"))
6395 (examples (string-append doc "/examples"))
6396 (python-arg (string-append "PYTHON=" (which "python"))))
6397 (setenv "LANG" "en_US.utf8")
6398 (with-directory-excursion "docs"
6399 ;; FIXME: pdf fails to build
6400 ;;(system* "make" "pdf" "PAPER=a4")
6401 (system* "make" python-arg "html")
6402 ;; FIXME: the generated texi file contains ^@^@, which trips
6403 ;; up the parser.
6404 ;; (system* "make" python-arg "info")
6405 )
6406 (copy-recursively "docs/man" man1)
6407 (copy-recursively "examples" examples)
6408 (copy-recursively "docs/build/html" html)
6409 ;; (copy-file "docs/build/latex/ipython.pdf"
6410 ;; (string-append doc "/ipython.pdf"))
6411 (mkdir-p info)
6412 ;; (copy-file "docs/build/texinfo/ipython.info"
6413 ;; (string-append info "/ipython.info"))
6414 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6415 #t)))))
6416 (inputs
6417 `(("python-ipython" ,python-ipython)
6418 ("python-ipykernel" ,python-ipykernel)))
6419 (native-inputs
6420 `(("python-sphinx" ,python-sphinx)
6421 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6422 ;; FIXME: It's possible that a smaller union would work just as well.
6423 ("texlive" ,(texlive-union (list texlive-amsfonts
6424 texlive-fonts-ec
6425 texlive-generic-ifxetex
6426 texlive-generic-pdftex
6427 texlive-latex-capt-of
6428 texlive-latex-cmap
6429 texlive-latex-environ
6430 texlive-latex-eqparbox
6431 texlive-latex-etoolbox
6432 texlive-latex-expdlist
6433 texlive-latex-fancyhdr
6434 texlive-latex-fancyvrb
6435 texlive-latex-fncychap
6436 texlive-latex-float
6437 texlive-latex-framed
6438 texlive-latex-geometry
6439 texlive-latex-graphics
6440 texlive-latex-hyperref
6441 texlive-latex-mdwtools
6442 texlive-latex-multirow
6443 texlive-latex-needspace
6444 texlive-latex-oberdiek
6445 texlive-latex-parskip
6446 texlive-latex-preview
6447 texlive-latex-tabulary
6448 texlive-latex-threeparttable
6449 texlive-latex-titlesec
6450 texlive-latex-trimspaces
6451 texlive-latex-ucs
6452 texlive-latex-upquote
6453 texlive-latex-url
6454 texlive-latex-varwidth
6455 texlive-latex-wrapfig)))
6456 ("texinfo" ,texinfo)))))
6457
6458(define-public python-urwid
6459 (package
6460 (name "python-urwid")
6461 (version "2.0.1")
6462 (source
6463 (origin
6464 (method url-fetch)
6465 (uri (pypi-uri "urwid" version))
6466 (sha256
6467 (base32
6468 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
6469 (build-system python-build-system)
6470 (home-page "http://urwid.org")
6471 (synopsis "Console user interface library for Python")
6472 (description
6473 "Urwid is a curses-based UI/widget library for Python. It includes many
6474features useful for text console applications.")
6475 (license license:lgpl2.1+)))
6476
6477(define-public python2-urwid
6478 (package-with-python2 python-urwid))
6479
6480(define-public python-urwidtrees
6481 (package
6482 (name "python-urwidtrees")
6483 (version "1.0.2")
6484 (source
6485 (origin
6486 (method git-fetch)
6487 ;; package author intends on distributing via github rather than pypi:
6488 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6489 (uri (git-reference
6490 (url "https://github.com/pazz/urwidtrees")
6491 (commit version)))
6492 (file-name (git-file-name name version))
6493 (sha256
6494 (base32
6495 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
6496 (build-system python-build-system)
6497 (arguments
6498 '(#:use-setuptools? #f
6499 #:tests? #f)) ; no tests
6500 (propagated-inputs `(("python-urwid" ,python-urwid)))
6501 (home-page "https://github.com/pazz/urwidtrees")
6502 (synopsis "Tree widgets for urwid")
6503 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6504toolkit. Use it to build trees of widgets.")
6505 (license license:gpl3+)))
6506
6507(define-public python2-urwidtrees
6508 (package-with-python2 python-urwidtrees))
6509
6510(define-public python-ua-parser
6511 (package
6512 (name "python-ua-parser")
6513 (version "0.8.0")
6514 (source
6515 (origin
6516 (method url-fetch)
6517 (uri (pypi-uri "ua-parser" version))
6518 (sha256
6519 (base32
6520 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
6521 (build-system python-build-system)
6522 (arguments
6523 `(#:tests? #f)) ;no test suite in release
6524 (native-inputs
6525 `(("python-pyyaml" ,python-pyyaml)))
6526 (home-page "https://github.com/ua-parser/uap-python")
6527 (synopsis "User agent parser")
6528 (description
6529 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
6530 (license license:asl2.0)))
6531
6532(define-public python2-ua-parser
6533 (package-with-python2 python-ua-parser))
6534
6535(define-public python-user-agents
6536 (package
6537 (name "python-user-agents")
6538 (version "1.1.0")
6539 (source
6540 (origin
6541 (method url-fetch)
6542 (uri (pypi-uri "user-agents" version))
6543 (sha256
6544 (base32
6545 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
6546 (build-system python-build-system)
6547 (arguments
6548 `(#:tests? #f)) ;missing devices.json test file in release
6549 (propagated-inputs
6550 `(("python-ua-parser" ,python-ua-parser)))
6551 (home-page "https://github.com/selwin/python-user-agents")
6552 (synopsis "User Agent strings parsing library")
6553 (description
6554 "A library to identify devices (phones, tablets) and their capabilities by
6555parsing (browser/HTTP) user agent strings.")
6556 (license license:expat)))
6557
6558(define-public python2-user-agents
6559 (package-with-python2 python-user-agents))
6560
6561(define-public python-dbus
6562 (package
6563 (name "python-dbus")
6564 (version "1.2.14")
6565 (source
6566 (origin
6567 (method url-fetch)
6568 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
6569 "dbus-python-" version ".tar.gz"))
6570 (sha256
6571 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
6572 (build-system gnu-build-system)
6573 (native-inputs
6574 `(("pkg-config" ,pkg-config)))
6575 (inputs
6576 `(("python" ,python-wrapper)
6577 ("dbus-glib" ,dbus-glib)))
6578 (synopsis "Python bindings for D-bus")
6579 (description "python-dbus provides bindings for libdbus, the reference
6580implementation of D-Bus.")
6581 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
6582 (license license:expat)))
6583
6584(define-public python2-dbus
6585 (package (inherit python-dbus)
6586 (name "python2-dbus")
6587 (inputs `(("python" ,python-2)
6588 ,@(alist-delete "python"
6589 (package-inputs python-dbus)
6590 equal?)))))
6591
6592(define-public python-notify2
6593 (package
6594 (name "python-notify2")
6595 (version "0.3.1")
6596 (source
6597 (origin
6598 (method url-fetch)
6599 (uri (pypi-uri "notify2" version))
6600 (sha256
6601 (base32
6602 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
6603 (build-system python-build-system)
6604 (arguments `(#:tests? #f)) ; tests depend on system state
6605 (native-inputs
6606 `(("python-dbus" ,python-dbus)))
6607 (home-page "https://bitbucket.org/takluyver/pynotify2")
6608 (synopsis "Python interface to D-Bus notifications")
6609 (description
6610 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6611It is a reimplementation of pynotify in pure Python, and an alternative to
6612the GObject Introspection bindings to libnotify for non-GTK applications.")
6613 (license (list license:bsd-2
6614 license:lgpl2.1+))))
6615
6616(define-public python2-notify2
6617 (package-with-python2 python-notify2))
6618
6619;; beautifulsoup4 has a totally different namespace than 3.x,
6620;; and pypi seems to put it under its own name, so I guess we should too
6621(define-public python-beautifulsoup4
6622 (package
6623 (name "python-beautifulsoup4")
6624 (version "4.7.1")
6625 (source
6626 (origin
6627 (method url-fetch)
6628 (uri (pypi-uri "beautifulsoup4" version))
6629 (sha256
6630 (base32
6631 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
6632 (build-system python-build-system)
6633 (arguments
6634 `(#:phases
6635 (modify-phases %standard-phases
6636 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6637 ;; must use this conversion script when building with Python 3. The
6638 ;; conversion script also runs the tests.
6639 ;; For more information, see the file 'convert-py3k' in the source
6640 ;; distribution.
6641 (replace 'check
6642 (lambda _ (invoke "./convert-py3k"))))))
6643 (propagated-inputs
6644 `(("python-soupsieve" ,python-soupsieve)))
6645 (home-page
6646 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6647 (synopsis
6648 "Python screen-scraping library")
6649 (description
6650 "Beautiful Soup is a Python library designed for rapidly setting up
6651screen-scraping projects. It offers Pythonic idioms for navigating,
6652searching, and modifying a parse tree, providing a toolkit for
6653dissecting a document and extracting what you need. It automatically
6654converts incoming documents to Unicode and outgoing documents to UTF-8.")
6655 (license license:expat)
6656 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6657
6658(define-public python2-beautifulsoup4
6659 (package
6660 (inherit (package-with-python2
6661 (strip-python2-variant python-beautifulsoup4)))
6662 (arguments `(#:python ,python-2))))
6663
6664(define-public python-soupsieve
6665 (package
6666 (name "python-soupsieve")
6667 (version "1.9.5")
6668 (source
6669 (origin
6670 (method url-fetch)
6671 (uri (pypi-uri "soupsieve" version))
6672 (sha256
6673 (base32
6674 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
6675 (build-system python-build-system)
6676 (arguments `(#:tests? #f))
6677 ;;XXX: 2 tests fail currently despite claming they were to be
6678 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6679 ;;don't want to create a circular dependency.
6680 (home-page "https://github.com/facelessuser/soupsieve")
6681 (synopsis "CSS selector library")
6682 (description
6683 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6684Soup 4. It aims to provide selecting, matching, and filtering using modern
6685CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6686specifications up through the latest CSS level 4 drafts and beyond (though
6687some are not yet implemented).")
6688 (properties `((python2-variant . ,(delay python2-soupsieve))))
6689 (license license:expat)))
6690
6691(define-public python2-soupsieve
6692 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6693 (package
6694 (inherit base)
6695 (propagated-inputs
6696 `(("python2-backports-functools-lru-cache"
6697 ,python2-backports-functools-lru-cache)
6698 ,@(package-propagated-inputs base))))))
6699
6700(define-public python-netifaces
6701 (package
6702 (name "python-netifaces")
6703 (version "0.10.7")
6704 (source
6705 (origin
6706 (method url-fetch)
6707 (uri (pypi-uri "netifaces" version))
6708 (sha256
6709 (base32
6710 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6711 (build-system python-build-system)
6712 (home-page "https://github.com/al45tair/netifaces")
6713 (synopsis
6714 "Python module for portable network interface information")
6715 (description
6716 "Netifaces is a Python module providing information on network
6717interfaces in an easy and portable manner.")
6718 (license license:expat)))
6719
6720(define-public python2-netifaces
6721 (package-with-python2 python-netifaces))
6722
6723(define-public python-networkx
6724 (package
6725 (name "python-networkx")
6726 (version "2.4")
6727 (source
6728 (origin
6729 (method url-fetch)
6730 (uri (pypi-uri "networkx" version))
6731 (sha256
6732 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
6733 (build-system python-build-system)
6734 (arguments
6735 '(#:phases (modify-phases %standard-phases
6736 (replace 'check
6737 (lambda* (#:key tests? #:allow-other-keys)
6738 (if tests?
6739 (invoke "pytest" "-vv" "--pyargs" "networkx")
6740 (format #t "test suite not run~%"))
6741 #t)))))
6742 ;; python-decorator is needed at runtime.
6743 (propagated-inputs
6744 `(("python-decorator" ,python-decorator)))
6745 (native-inputs
6746 `(("python-pytest" ,python-pytest)))
6747 (home-page "https://networkx.github.io/")
6748 (synopsis "Python module for creating and manipulating graphs and networks")
6749 (description
6750 "NetworkX is a Python package for the creation, manipulation, and study
6751of the structure, dynamics, and functions of complex networks.")
6752 (properties `((python2-variant . ,(delay python2-networkx))))
6753 (license license:bsd-3)))
6754
6755;; NetworkX 2.2 is the last version with support for Python 2.
6756(define-public python2-networkx
6757 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
6758 (package
6759 (inherit base)
6760 (version "2.2")
6761 (source (origin
6762 (method url-fetch)
6763 (uri (pypi-uri "networkx" version ".zip"))
6764 (sha256
6765 (base32
6766 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6767 (arguments
6768 `(#:python ,python-2))
6769 (native-inputs
6770 `(("python-nose" ,python2-nose)
6771 ("unzip" ,unzip))))))
6772
6773(define-public python-datrie
6774 (package
6775 (name "python-datrie")
6776 (version "0.8")
6777 (source
6778 (origin
6779 (method url-fetch)
6780 (uri (pypi-uri "datrie" version))
6781 (sha256
6782 (base32
6783 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6784 (build-system python-build-system)
6785 (native-inputs
6786 `(("python-cython" ,python-cython)
6787 ("python-hypothesis" ,python-hypothesis)
6788 ("python-pytest" ,python-pytest)
6789 ("python-pytest-runner" ,python-pytest-runner)))
6790 (home-page "https://github.com/kmike/datrie")
6791 (synopsis "Fast, efficiently stored trie for Python")
6792 (description
6793 "This package provides a fast, efficiently stored trie implementation for
6794Python.")
6795 (license license:lgpl2.1+)))
6796
6797(define-public snakemake
6798 (package
6799 (name "snakemake")
6800 (version "5.7.1")
6801 (source
6802 (origin
6803 (method url-fetch)
6804 (uri (pypi-uri "snakemake" version))
6805 (sha256
6806 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6807 (build-system python-build-system)
6808 (arguments
6809 ;; TODO: Package missing test dependencies.
6810 '(#:tests? #f
6811 #:phases
6812 (modify-phases %standard-phases
6813 ;; For cluster execution Snakemake will call Python. Since there is
6814 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6815 ;; this by calling the snakemake wrapper instead.
6816 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6817 (lambda* (#:key outputs #:allow-other-keys)
6818 (substitute* "snakemake/executors.py"
6819 (("\\{sys.executable\\} -m snakemake")
6820 (string-append (assoc-ref outputs "out")
6821 "/bin/snakemake")))
6822 #t)))))
6823 (propagated-inputs
6824 `(("python-appdirs" ,python-appdirs)
6825 ("python-configargparse" ,python-configargparse)
6826 ("python-datrie" ,python-datrie)
6827 ("python-docutils" ,python-docutils)
6828 ("python-gitpython" ,python-gitpython)
6829 ("python-jinja2" ,python-jinja2)
6830 ("python-jsonschema" ,python-jsonschema)
6831 ("python-networkx" ,python-networkx)
6832 ("python-psutil" ,python-psutil)
6833 ("python-pyyaml" ,python-pyyaml)
6834 ("python-ratelimiter" ,python-ratelimiter)
6835 ("python-requests" ,python-requests)
6836 ("python-wrapt" ,python-wrapt)))
6837 (home-page "https://snakemake.readthedocs.io")
6838 (synopsis "Python-based execution environment for make-like workflows")
6839 (description
6840 "Snakemake aims to reduce the complexity of creating workflows by
6841providing a clean and modern domain specific specification language (DSL) in
6842Python style, together with a fast and comfortable execution environment.")
6843 (license license:expat)))
6844
6845(define-public python-pyqrcode
6846 (package
6847 (name "python-pyqrcode")
6848 (version "1.2.1")
6849 (source
6850 (origin
6851 (method url-fetch)
6852 (uri (pypi-uri "PyQRCode" version))
6853 (sha256
6854 (base32
6855 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6856 (build-system python-build-system)
6857 (home-page
6858 "https://github.com/mnooner256/pyqrcode")
6859 (synopsis "QR code generator")
6860 (description
6861 "Pyqrcode is a QR code generator written purely in Python with
6862SVG, EPS, PNG and terminal output.")
6863 (license license:bsd-3)))
6864
6865(define-public python-seaborn
6866 (package
6867 (name "python-seaborn")
6868 (version "0.10.0")
6869 (source
6870 (origin
6871 (method url-fetch)
6872 (uri (pypi-uri "seaborn" version))
6873 (sha256
6874 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
6875 (build-system python-build-system)
6876 (arguments
6877 `(#:phases
6878 (modify-phases %standard-phases
6879 (add-before 'check 'start-xserver
6880 (lambda* (#:key inputs #:allow-other-keys)
6881 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6882 ;; There must be a running X server and make check doesn't
6883 ;; start one. Therefore we must do it.
6884 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6885 (setenv "DISPLAY" ":1")
6886 #t)))
6887 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6888 (propagated-inputs
6889 `(("python-pandas" ,python-pandas)
6890 ("python-matplotlib" ,python-matplotlib)
6891 ("python-numpy" ,python-numpy)
6892 ("python-scipy" ,python-scipy)))
6893 (native-inputs
6894 `(("python-pytest" ,python-pytest)
6895 ("xorg-server" ,xorg-server-for-tests)))
6896 (home-page "https://seaborn.pydata.org/")
6897 (synopsis "Statistical data visualization")
6898 (description
6899 "Seaborn is a library for making attractive and informative statistical
6900graphics in Python. It is built on top of matplotlib and tightly integrated
6901with the PyData stack, including support for numpy and pandas data structures
6902and statistical routines from scipy and statsmodels.")
6903 (properties `((python2-variant . ,(delay python2-seaborn))))
6904 (license license:bsd-3)))
6905
6906;; 0.9.1 is the last release with support for Python 2.
6907(define-public python2-seaborn
6908 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6909 (package
6910 (inherit base)
6911 (version "0.9.1")
6912 (source (origin
6913 (method url-fetch)
6914 (uri (pypi-uri "seaborn" version))
6915 (sha256
6916 (base32
6917 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
6918
6919(define-public python-mpmath
6920 (package
6921 (name "python-mpmath")
6922 (version "0.19")
6923 (source (origin
6924 (method url-fetch)
6925 (uri (string-append "http://mpmath.org/files/mpmath-"
6926 version ".tar.gz"))
6927 (sha256
6928 (base32
6929 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6930 (build-system python-build-system)
6931 (arguments
6932 '(#:phases
6933 (modify-phases %standard-phases
6934 (replace 'check
6935 (lambda _
6936 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6937 (home-page "http://mpmath.org")
6938 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6939 (description
6940 "@code{mpmath} can be used as an arbitrary-precision substitute for
6941Python's float/complex types and math/cmath modules, but also does much
6942more advanced mathematics.")
6943 (license license:bsd-3)))
6944
6945(define-public python2-mpmath
6946 (package-with-python2 python-mpmath))
6947
6948(define-public python-bigfloat
6949 (package
6950 (name "python-bigfloat")
6951 (version "0.3.0")
6952 (source
6953 (origin
6954 (method url-fetch)
6955 (uri (pypi-uri "bigfloat" version))
6956 (sha256
6957 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6958 (build-system python-build-system)
6959 (inputs
6960 `(("mpfr" ,mpfr)))
6961 (home-page "https://github.com/mdickinson/bigfloat")
6962 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6963 (description
6964 "This package provides a Python interface to the MPFR library for
6965multiprecision arithmetic.")
6966 (license license:lgpl3+)))
6967
6968(define-public python2-bigfloat
6969 (package-with-python2 python-bigfloat))
6970
6971(define-public python-sympy
6972 (package
6973 (name "python-sympy")
6974 (version "1.1.1")
6975 (source
6976 (origin
6977 (method url-fetch)
6978 (uri (string-append
6979 "https://github.com/sympy/sympy/releases/download/sympy-"
6980 version "/sympy-" version ".tar.gz"))
6981 (sha256
6982 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6983 (build-system python-build-system)
6984 (arguments
6985 `(#:phases
6986 (modify-phases %standard-phases
6987 ;; Run the core tests after installation. By default it would run
6988 ;; *all* tests, which take a very long time to complete and are known
6989 ;; to be flaky.
6990 (delete 'check)
6991 (add-after 'install 'check
6992 (lambda* (#:key outputs #:allow-other-keys)
6993 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6994 #t)))))
6995 (propagated-inputs
6996 `(("python-mpmath" ,python-mpmath)))
6997 (home-page "https://www.sympy.org/")
6998 (synopsis "Python library for symbolic mathematics")
6999 (description
7000 "SymPy is a Python library for symbolic mathematics. It aims to become a
7001full-featured computer algebra system (CAS) while keeping the code as simple
7002as possible in order to be comprehensible and easily extensible.")
7003 (license license:bsd-3)))
7004
7005(define-public python2-sympy
7006 (package
7007 (inherit (package-with-python2 python-sympy))
7008 (arguments
7009 `(#:phases
7010 (modify-phases %standard-phases
7011 ;; Run the core tests after installation. By default it would run
7012 ;; *all* tests, which take a very long time to complete and are known
7013 ;; to be flaky.
7014 (delete 'check)
7015 (add-after 'install 'check
7016 (lambda* (#:key outputs #:allow-other-keys)
7017 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
7018 #t)))))))
7019
7020(define-public python-q
7021 (package
7022 (name "python-q")
7023 (version "2.6")
7024 (source
7025 (origin
7026 (method url-fetch)
7027 (uri (pypi-uri "q" version))
7028 (sha256
7029 (base32
7030 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7031 (build-system python-build-system)
7032 (home-page "https://github.com/zestyping/q")
7033 (synopsis "Quick-and-dirty debugging output for tired programmers")
7034 (description
7035 "q is a Python module for \"print\" style of debugging Python code. It
7036provides convenient short API for print out of values, tracebacks, and
7037falling into the Python interpreter.")
7038 (license license:asl2.0)))
7039
7040(define-public python2-q
7041 (package-with-python2 python-q))
7042
7043(define-public python2-xlib
7044 (package
7045 (name "python2-xlib")
7046 (version "0.14")
7047 (source (origin
7048 (method url-fetch)
7049 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
7050 "/" version "/"
7051 "python-xlib-" version ".tar.gz"))
7052 (sha256
7053 (base32
7054 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
7055 (build-system python-build-system)
7056 (arguments
7057 `(#:python ,python-2 ;Python 2 only
7058 #:tests? #f)) ;no tests
7059 (home-page "http://python-xlib.sourceforge.net/")
7060 (synopsis "Python X11 client library")
7061 (description
7062 "The Python X Library is intended to be a fully functional X client
7063library for Python programs. It is useful to implement low-level X clients.
7064It is written entirely in Python.")
7065 (license license:gpl2+)))
7066
7067(define-public python-singledispatch
7068 (package
7069 (name "python-singledispatch")
7070 (version "3.4.0.3")
7071 (source
7072 (origin
7073 (method url-fetch)
7074 (uri (pypi-uri "singledispatch" version))
7075 (sha256
7076 (base32
7077 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7078 (build-system python-build-system)
7079 (native-inputs
7080 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7081 (home-page
7082 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7083 (synopsis "Backport of singledispatch feature from Python 3.4")
7084 (description
7085 "This library brings functools.singledispatch from Python 3.4 to Python
70862.6-3.3.")
7087 (license license:expat)))
7088
7089(define-public python2-singledispatch
7090 (package-with-python2 python-singledispatch))
7091
7092;; the python- version can be removed with python-3.5
7093(define-public python-backports-abc
7094 (package
7095 (name "python-backports-abc")
7096 (version "0.5")
7097 (source
7098 (origin
7099 (method url-fetch)
7100 (uri (pypi-uri "backports_abc" version))
7101 (sha256
7102 (base32
7103 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7104 (build-system python-build-system)
7105 (home-page "https://github.com/cython/backports_abc")
7106 (synopsis "Backport of additions to the 'collections.abc' module")
7107 (description
7108 "Python-backports-abc provides a backport of additions to the
7109@code{collections.abc} module in Python-3.5.")
7110 (license license:psfl)))
7111
7112(define-public python2-backports-abc
7113 (package-with-python2 python-backports-abc))
7114
7115(define-public python-backports-csv
7116 (package
7117 (name "python-backports-csv")
7118 (version "1.0.5")
7119 (source
7120 (origin
7121 (method url-fetch)
7122 (uri (pypi-uri "backports.csv" version))
7123 (sha256
7124 (base32
7125 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
7126 (build-system python-build-system)
7127 (home-page "https://github.com/ryanhiebert/backports.csv")
7128 (synopsis "Backport of Python 3's csv module for Python 2")
7129 (description
7130 "Provides a backport of Python 3's @code{csv} module for parsing
7131comma separated values. The API of the @code{csv} module in Python 2
7132is drastically different from the @code{csv} module in Python 3.
7133This is due, for the most part, to the difference between str in
7134Python 2 and Python 3.")
7135 (license license:psfl)))
7136
7137(define-public python2-backports-csv
7138 (package-with-python2 python-backports-csv))
7139
7140(define-public python2-backports-shutil-get-terminal-size
7141 (package
7142 (name "python2-backports-shutil-get-terminal-size")
7143 (version "1.0.0")
7144 (source
7145 (origin
7146 (method url-fetch)
7147 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7148 (sha256
7149 (base32
7150 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7151 (build-system python-build-system)
7152 (arguments
7153 `(#:python ,python-2
7154 #:phases
7155 (modify-phases %standard-phases
7156 (replace 'check
7157 (lambda _
7158 (invoke "py.test" "-v"))))))
7159 (native-inputs
7160 `(("python2-pytest" ,python2-pytest)))
7161 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7162 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7163 (description
7164 "This package provides a backport of the @code{get_terminal_size
7165function} from Python 3.3's @code{shutil}.
7166Unlike the original version it is written in pure Python rather than C,
7167so it might be a tiny bit slower.")
7168 (license license:expat)))
7169
7170(define-public python-waf
7171 (package
7172 (name "python-waf")
7173 (version "2.0.19")
7174 (source (origin
7175 (method url-fetch)
7176 (uri (string-append "https://waf.io/"
7177 "waf-" version ".tar.bz2"))
7178 (sha256
7179 (base32
7180 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7181 (build-system python-build-system)
7182 (arguments
7183 '(#:phases
7184 (modify-phases %standard-phases
7185 (replace 'build
7186 (lambda _
7187 ;; XXX: Find a way to add all extra tools.
7188 (let ((tools '("gccdeps"
7189 "clang_compilation_database")))
7190 (invoke "python" "waf-light" "configure" "build"
7191 (string-append "--tools="
7192 (string-join tools ","))))))
7193 (replace 'check
7194 (lambda _
7195 (invoke "python" "waf" "--version")))
7196 (replace 'install
7197 (lambda* (#:key outputs #:allow-other-keys)
7198 (let ((out (assoc-ref outputs "out")))
7199 (install-file "waf" (string-append out "/bin")))
7200 #t))
7201 ;; waf breaks when it is wrapped.
7202 (delete 'wrap))))
7203 (home-page "https://waf.io/")
7204 (synopsis "Python-based build system")
7205 (description
7206 "Waf is a Python-based framework for configuring, compiling and installing
7207applications.")
7208 (license license:bsd-3)))
7209
7210(define-public python2-waf
7211 (package-with-python2 python-waf))
7212
7213(define-public python-pyzmq
7214 (package
7215 (name "python-pyzmq")
7216 (version "17.1.2")
7217 (source
7218 (origin
7219 (method url-fetch)
7220 (uri (pypi-uri "pyzmq" version))
7221 (sha256
7222 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
7223 (build-system python-build-system)
7224 (arguments
7225 `(#:configure-flags
7226 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
7227 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
7228 ;; --inplace' for 'python setup.py test' to work.
7229 #:tests? #f))
7230 (inputs
7231 `(("zeromq" ,zeromq)))
7232 (native-inputs
7233 `(("pkg-config" ,pkg-config)
7234 ("python-nose" ,python-nose)))
7235 (home-page "https://github.com/zeromq/pyzmq")
7236 (synopsis "Python bindings for 0MQ")
7237 (description
7238 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
7239 (license license:bsd-4)))
7240
7241(define-public python2-pyzmq
7242 (package-with-python2 python-pyzmq))
7243
7244(define-public python-pep8
7245 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
7246 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
7247 ;; some dependents' test suites, and nothing more.
7248 (package
7249 (name "python-pep8")
7250 (version "1.7.0")
7251 (source
7252 (origin
7253 (method url-fetch)
7254 (uri (pypi-uri "pep8" version))
7255 (sha256
7256 (base32
7257 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
7258 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
7259 (build-system python-build-system)
7260 (home-page "https://pep8.readthedocs.org/")
7261 (synopsis "Python style guide checker")
7262 (description
7263 "This tools checks Python code against some of the style conventions in
7264PEP 8.")
7265 (license license:expat)))
7266
7267(define-public python2-pep8
7268 (package-with-python2 python-pep8))
7269
7270(define-public python-pyflakes
7271 (package
7272 (name "python-pyflakes")
7273 (version "2.1.1")
7274 (source
7275 (origin
7276 (method url-fetch)
7277 (uri (pypi-uri "pyflakes" version))
7278 (sha256
7279 (base32
7280 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
7281 (build-system python-build-system)
7282 (home-page
7283 "https://github.com/pyflakes/pyflakes")
7284 (synopsis "Passive checker of Python programs")
7285 (description
7286 "Pyflakes statically checks Python source code for common errors.")
7287 (license license:expat)))
7288
7289(define-public python2-pyflakes
7290 (package-with-python2 python-pyflakes))
7291
7292(define-public python-mccabe
7293 (package
7294 (name "python-mccabe")
7295 (version "0.6.1")
7296 (source
7297 (origin
7298 (method url-fetch)
7299 (uri (pypi-uri "mccabe" version))
7300 (sha256
7301 (base32
7302 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
7303 (build-system python-build-system)
7304 (native-inputs
7305 `(("python-pytest" ,python-pytest-bootstrap)
7306 ("python-pytest-runner" ,python-pytest-runner)))
7307 (home-page "https://github.com/flintwork/mccabe")
7308 (synopsis "McCabe checker, plugin for flake8")
7309 (description
7310 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7311complexity of Python source code.")
7312 (license license:expat)))
7313
7314(define-public python2-mccabe
7315 (package-with-python2 python-mccabe))
7316
7317(define-public python-mccabe-0.2.1
7318 (package (inherit python-mccabe)
7319 (version "0.2.1")
7320 (source
7321 (origin
7322 (method url-fetch)
7323 (uri (pypi-uri "mccabe" version))
7324 (sha256
7325 (base32
7326 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7327
7328(define-public python2-mccabe-0.2.1
7329 (package-with-python2 python-mccabe-0.2.1))
7330
7331;; Flake8 2.4.1 requires an older version of pep8.
7332;; This should be removed ASAP.
7333(define-public python-pep8-1.5.7
7334 (package (inherit python-pep8)
7335 (version "1.5.7")
7336 (source
7337 (origin
7338 (method url-fetch)
7339 (uri (pypi-uri "pep8" version))
7340 (sha256
7341 (base32
7342 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7343 (arguments
7344 ;; XXX Tests not compatible with Python 3.5.
7345 '(#:tests? #f))))
7346
7347(define-public python2-pep8-1.5.7
7348 (package-with-python2 python-pep8-1.5.7))
7349
7350;; Flake8 2.4.1 requires an older version of pyflakes.
7351;; This should be removed ASAP.
7352(define-public python-pyflakes-0.8.1
7353 (package (inherit python-pyflakes)
7354 (version "0.8.1")
7355 (source
7356 (origin
7357 (method url-fetch)
7358 (uri (pypi-uri "pyflakes" version))
7359 (sha256
7360 (base32
7361 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
7362 (arguments
7363 ;; XXX Tests not compatible with Python 3.5.
7364 '(#:tests? #f))))
7365
7366(define-public python2-pyflakes-0.8.1
7367 (package-with-python2 python-pyflakes-0.8.1))
7368
7369(define-public python-flake8
7370 (package
7371 (name "python-flake8")
7372 (version "3.7.7")
7373 (source (origin
7374 (method url-fetch)
7375 (uri (pypi-uri "flake8" version))
7376 (sha256
7377 (base32
7378 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
7379 (build-system python-build-system)
7380 (arguments
7381 `(#:phases
7382 (modify-phases %standard-phases
7383 (delete 'check)
7384 (add-after 'install 'check
7385 (lambda* (#:key inputs outputs #:allow-other-keys)
7386 (add-installed-pythonpath inputs outputs)
7387 (invoke "pytest" "-v")
7388 #t)))))
7389 (propagated-inputs
7390 `(("python-pycodestyle" ,python-pycodestyle)
7391 ("python-entrypoints" ,python-entrypoints)
7392 ("python-pyflakes" ,python-pyflakes)
7393 ("python-mccabe" ,python-mccabe)))
7394 (native-inputs
7395 `(("python-mock" ,python-mock)
7396 ("python-pytest" ,python-pytest-bootstrap)
7397 ("python-pytest-runner" ,python-pytest-runner)))
7398 (home-page "https://gitlab.com/pycqa/flake8")
7399 (synopsis
7400 "The modular source code checker: pep8, pyflakes and co")
7401 (description
7402 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7403 (properties `((python2-variant . ,(delay python2-flake8))))
7404 (license license:expat)))
7405
7406(define-public python2-flake8
7407 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
7408 (package (inherit base)
7409 (propagated-inputs
7410 `(("python2-configparser" ,python2-configparser)
7411 ("python2-enum34" ,python2-enum34)
7412 ("python2-functools32" ,python2-functools32)
7413 ("python2-typing" ,python2-typing)
7414 ,@(package-propagated-inputs base))))))
7415
7416;; python-hacking requires flake8 <2.6.0.
7417(define-public python-flake8-2.5
7418 (package
7419 (inherit python-flake8)
7420 (version "2.5.5")
7421 (source (origin
7422 (method url-fetch)
7423 (uri (pypi-uri "flake8" version))
7424 (sha256
7425 (base32
7426 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
7427 (propagated-inputs
7428 `(("python-pep8" ,python-pep8)
7429 ,@(package-propagated-inputs python-flake8)))
7430 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
7431
7432(define-public python2-flake8-2.5
7433 (package
7434 (inherit python2-flake8)
7435 (version (package-version python-flake8-2.5))
7436 (source (origin
7437 (inherit (package-source python-flake8-2.5))))
7438 (propagated-inputs
7439 `(("python2-pep8" ,python2-pep8)
7440 ,@(package-propagated-inputs python2-flake8)))))
7441
7442(define-public python-flake8-polyfill
7443 (package
7444 (name "python-flake8-polyfill")
7445 (version "1.0.2")
7446 (source
7447 (origin
7448 (method url-fetch)
7449 (uri (pypi-uri "flake8-polyfill" version))
7450 (sha256
7451 (base32
7452 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7453 (build-system python-build-system)
7454 (arguments
7455 '(#:phases
7456 (modify-phases %standard-phases
7457 (replace 'check
7458 (lambda _
7459 ;; Be compatible with Pytest 4:
7460 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7461 (substitute* "setup.cfg"
7462 (("\\[pytest\\]")
7463 "[tool:pytest]"))
7464
7465 (setenv "PYTHONPATH"
7466 (string-append (getcwd) "/build/lib:"
7467 (getenv "PYTHONPATH")))
7468 (invoke "py.test" "-v"))))))
7469 (native-inputs
7470 `(("python-flake8" ,python-flake8)
7471 ("python-mock" ,python-mock)
7472 ("python-pep8" ,python-pep8)
7473 ("python-pycodestyle" ,python-pycodestyle)
7474 ("python-pytest" ,python-pytest)))
7475 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7476 (synopsis "Polyfill package for Flake8 plugins")
7477 (description
7478 "This package that provides some compatibility helpers for Flake8
7479plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7480 (license license:expat)))
7481
7482(define-public python2-flake8-polyfill
7483 (package-with-python2 python-flake8-polyfill))
7484
7485(define-public python-mistune
7486 (package
7487 (name "python-mistune")
7488 (version "0.8.4")
7489 (source
7490 (origin
7491 (method url-fetch)
7492 (uri (pypi-uri "mistune" version))
7493 (sha256
7494 (base32
7495 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7496 (build-system python-build-system)
7497 (native-inputs
7498 `(("python-nose" ,python-nose)
7499 ("python-cython" ,python-cython)))
7500 (home-page "https://github.com/lepture/mistune")
7501 (synopsis "Markdown parser in pure Python")
7502 (description "This package provides a fast markdown parser in pure
7503Python.")
7504 (license license:bsd-3)))
7505
7506(define-public python2-mistune
7507 (package-with-python2 python-mistune))
7508
7509(define-public python-markdown
7510 (package
7511 (name "python-markdown")
7512 (version "3.2.1")
7513 (source
7514 (origin
7515 (method url-fetch)
7516 (uri (pypi-uri "Markdown" version))
7517 (sha256
7518 (base32
7519 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
7520 (build-system python-build-system)
7521 (native-inputs
7522 `(("python-nose" ,python-nose)
7523 ("python-pyyaml" ,python-pyyaml)))
7524 (home-page "https://python-markdown.github.io/")
7525 (synopsis "Python implementation of Markdown")
7526 (description
7527 "This package provides a Python implementation of John Gruber's
7528Markdown. The library features international input, various Markdown
7529extensions, and several HTML output formats. A command line wrapper
7530markdown_py is also provided to convert Markdown files to HTML.")
7531 (properties `((python2-variant . ,(delay python2-markdown))))
7532 (license license:bsd-3)))
7533
7534;; Markdown 3.2 dropped support for Python 2.
7535(define-public python2-markdown
7536 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7537 (package/inherit
7538 base
7539 (version "3.1.1")
7540 (source (origin
7541 (method url-fetch)
7542 (uri (pypi-uri "Markdown" version))
7543 (sha256
7544 (base32
7545 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
7546
7547(define-public python-ptyprocess
7548 (package
7549 (name "python-ptyprocess")
7550 (version "0.5.2")
7551 (source
7552 (origin
7553 (method url-fetch)
7554 (uri (pypi-uri "ptyprocess" version))
7555 (sha256
7556 (base32
7557 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7558 (build-system python-build-system)
7559 (native-inputs
7560 `(("python-nose" ,python-nose)))
7561 (arguments
7562 `(#:phases
7563 (modify-phases %standard-phases
7564 (replace 'check
7565 (lambda _ (invoke "nosetests"))))))
7566 (home-page "https://github.com/pexpect/ptyprocess")
7567 (synopsis "Run a subprocess in a pseudo terminal")
7568 (description
7569 "This package provides a Python library used to launch a subprocess in a
7570pseudo terminal (pty), and interact with both the process and its pty.")
7571 (license license:isc)))
7572
7573(define-public python2-ptyprocess
7574 (package-with-python2 python-ptyprocess))
7575
7576(define-public python-cram
7577 (package
7578 (name "python-cram")
7579 (version "0.7")
7580 (home-page "https://bitheap.org/cram/")
7581 (source (origin
7582 (method url-fetch)
7583 (uri (list (string-append home-page "cram-"
7584 version ".tar.gz")
7585 (pypi-uri "cram" version)))
7586 (sha256
7587 (base32
7588 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7589 (arguments
7590 '(#:phases
7591 (modify-phases %standard-phases
7592 (add-after 'unpack 'patch-source
7593 (lambda _
7594 (substitute* (find-files "cram" ".*\\.py$")
7595 ;; Replace default shell path.
7596 (("/bin/sh") (which "sh")))
7597 (substitute* (find-files "tests" ".*\\.t$")
7598 (("md5") "md5sum")
7599 (("/bin/bash") (which "bash"))
7600 (("/bin/sh") (which "sh")))
7601 (substitute* "cram/_test.py"
7602 ;; This hack works around a bug triggered by substituting
7603 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7604 ;; "cram -h", which breaks the output at 80 characters. This
7605 ;; causes the line showing the default shell to break into two
7606 ;; lines, but the test expects a single line...
7607 (("env\\['COLUMNS'\\] = '80'")
7608 "env['COLUMNS'] = '160'"))
7609
7610 (substitute* "Makefile"
7611 ;; Recent versions of python-coverage have caused the test
7612 ;; coverage to decrease (as of version 0.7). Allow that.
7613 (("--fail-under=100")
7614 "--fail-under=90"))
7615
7616 #t))
7617 (replace 'check
7618 ;; The test phase uses the built library and executable.
7619 (lambda* (#:key inputs outputs #:allow-other-keys)
7620 (add-installed-pythonpath inputs outputs)
7621 (setenv "PATH" (string-append (getenv "PATH") ":"
7622 (assoc-ref outputs "out") "/bin"))
7623 (invoke "make" "test"))))))
7624 (build-system python-build-system)
7625 (native-inputs
7626 `(("python-coverage" ,python-coverage)
7627 ("which" ,which)))
7628 (synopsis "Simple testing framework for command line applications")
7629 (description
7630 "Cram is a functional testing framework for command line applications.
7631Cram tests look like snippets of interactive shell sessions. Cram runs each
7632command and compares the command output in the test with the command’s actual
7633output.")
7634 (license license:gpl2+)))
7635
7636(define-public python2-cram
7637 (package-with-python2 python-cram))
7638
7639(define-public python-straight-plugin
7640 (package
7641 (name "python-straight-plugin")
7642 (version "1.4.1")
7643 (source
7644 (origin
7645 (method url-fetch)
7646 (uri (pypi-uri "straight.plugin" version))
7647 (sha256
7648 (base32
7649 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7650 (build-system python-build-system)
7651 (home-page "https://github.com/ironfroggy/straight.plugin")
7652 (synopsis "Simple namespaced plugin facility")
7653 (description "Straight Plugin provides a type of plugin you can create from
7654almost any existing Python modules, and an easy way for outside developers to
7655add functionality and customization to your projects with their own plugins.")
7656 (license license:expat)))
7657
7658(define-public python2-straight-plugin
7659 (package-with-python2 python-straight-plugin))
7660
7661(define-public python-fonttools
7662 (package
7663 (name "python-fonttools")
7664 (version "3.38.0")
7665 (source (origin
7666 (method url-fetch)
7667 (uri (pypi-uri "fonttools" version ".zip"))
7668 (sha256
7669 (base32
7670 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
7671 (build-system python-build-system)
7672 (native-inputs
7673 `(("unzip" ,unzip)
7674 ("python-pytest" ,python-pytest)
7675 ("python-pytest-runner" ,python-pytest-runner)))
7676 (home-page "https://github.com/fonttools/fonttools")
7677 (synopsis "Tools to manipulate font files")
7678 (description
7679 "FontTools/TTX is a library to manipulate font files from Python. It
7680supports reading and writing of TrueType/OpenType fonts, reading and writing
7681of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7682also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7683from an XML-based format.")
7684 (license license:expat)))
7685
7686(define-public python2-fonttools
7687 (package-with-python2 python-fonttools))
7688
7689(define-public python-ly
7690 (package
7691 (name "python-ly")
7692 (version "0.9.5")
7693 (source
7694 (origin
7695 (method url-fetch)
7696 (uri (pypi-uri name version))
7697 (sha256
7698 (base32
7699 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7700 (build-system python-build-system)
7701 (arguments
7702 ;; FIXME: Some tests need network access.
7703 '(#:tests? #f))
7704 (synopsis "Tool and library for manipulating LilyPond files")
7705 (description "This package provides a Python library to parse, manipulate
7706or create documents in LilyPond format. A command line program ly is also
7707provided that can be used to do various manipulations with LilyPond files.")
7708 (home-page "https://pypi.org/project/python-ly/")
7709 (license license:gpl2+)))
7710
7711(define-public python-appdirs
7712 (package
7713 (name "python-appdirs")
7714 (version "1.4.3")
7715 (source
7716 (origin
7717 (method url-fetch)
7718 (uri (pypi-uri "appdirs" version))
7719 (sha256
7720 (base32
7721 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7722 (build-system python-build-system)
7723 (home-page "https://github.com/ActiveState/appdirs")
7724 (synopsis
7725 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7726 (description
7727 "This module provides a portable way of finding out where user data
7728should be stored on various operating systems.")
7729 (license license:expat)))
7730
7731(define-public python2-appdirs
7732 (package-with-python2 python-appdirs))
7733
7734(define-public python-llfuse
7735 (package
7736 (name "python-llfuse")
7737 (version "1.3.5")
7738 (source (origin
7739 (method url-fetch)
7740 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7741 (sha256
7742 (base32
7743 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7744 (build-system python-build-system)
7745 (inputs
7746 `(("fuse" ,fuse)
7747 ("attr" ,attr)))
7748 (native-inputs
7749 `(("pkg-config" ,pkg-config)))
7750 (synopsis "Python bindings for FUSE")
7751 (description
7752 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7753 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7754 (license license:lgpl2.0+)
7755 (properties `((python2-variant . ,(delay python2-llfuse))))))
7756
7757(define-public python2-llfuse
7758 (package (inherit (package-with-python2
7759 (strip-python2-variant python-llfuse)))
7760 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7761
7762;; For attic-0.16
7763(define-public python-llfuse-0.41
7764 (package (inherit python-llfuse)
7765 (version "0.41.1")
7766 (source (origin
7767 (method url-fetch)
7768 (uri (string-append
7769 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7770 "llfuse-" version ".tar.bz2"))
7771 (sha256
7772 (base32
7773 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7774 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7775 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7776 (license (list license:expat license:lgpl2.0+))))
7777
7778(define-public python-msgpack
7779 (package
7780 (name "python-msgpack")
7781 (version "1.0.0")
7782 (source (origin
7783 (method url-fetch)
7784 (uri (pypi-uri "msgpack" version))
7785 (sha256
7786 (base32
7787 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
7788 (build-system python-build-system)
7789 (arguments
7790 `(#:modules ((guix build utils)
7791 (guix build python-build-system)
7792 (ice-9 ftw)
7793 (srfi srfi-1)
7794 (srfi srfi-26))
7795 #:phases
7796 (modify-phases %standard-phases
7797 (replace 'check
7798 (lambda _
7799 (let ((cwd (getcwd)))
7800 (setenv "PYTHONPATH"
7801 (string-append cwd "/build/"
7802 (find (cut string-prefix? "lib" <>)
7803 (scandir (string-append cwd "/build")))
7804 ":"
7805 (getenv "PYTHONPATH")))
7806 (invoke "pytest" "-v" "test")))))))
7807 (native-inputs
7808 `(("python-pytest" ,python-pytest)))
7809 (synopsis "MessagePack (de)serializer")
7810 (description "MessagePack is a fast, compact binary serialization format,
7811suitable for similar data to JSON. This package provides CPython bindings for
7812reading and writing MessagePack data.")
7813 (home-page "https://pypi.org/project/msgpack/")
7814 (license license:asl2.0)))
7815
7816;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7817;; release 0.5. Some packages like borg still call it by the old name for now.
7818;; <https://bugs.gnu.org/30662>
7819(define-public python-msgpack-transitional
7820 (package
7821 (inherit python-msgpack)
7822 (name "python-msgpack-transitional")
7823 (version "0.5.6")
7824 (source (origin
7825 (method url-fetch)
7826 (uri (pypi-uri "msgpack" version))
7827 (sha256
7828 (base32
7829 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7830 (arguments
7831 (substitute-keyword-arguments (package-arguments python-msgpack)
7832 ((#:phases phases)
7833 `(modify-phases ,phases
7834 (add-after 'unpack 'configure-transitional
7835 (lambda _
7836 ;; Keep using the old name.
7837 (substitute* "setup.py"
7838 (("TRANSITIONAL = False")
7839 "TRANSITIONAL = 1"))
7840 #t))))))))
7841
7842(define-public python2-msgpack
7843 (package-with-python2 python-msgpack))
7844
7845(define-public python-netaddr
7846 (package
7847 (name "python-netaddr")
7848 (version "0.7.19")
7849 (source
7850 (origin
7851 (method url-fetch)
7852 (uri (pypi-uri "netaddr" version))
7853 (sha256
7854 (base32
7855 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7856 (build-system python-build-system)
7857 (arguments `(#:tests? #f)) ;; No tests.
7858 (home-page "https://github.com/drkjam/netaddr/")
7859 (synopsis "Pythonic manipulation of network addresses")
7860 (description
7861 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7862and MAC network addresses.")
7863 (license license:bsd-3)))
7864
7865(define-public python2-netaddr
7866 (package-with-python2 python-netaddr))
7867
7868(define-public python2-pyroute2
7869 (package
7870 (name "python2-pyroute2")
7871 (version "0.5.6")
7872 (source
7873 (origin
7874 (method url-fetch)
7875 (uri (pypi-uri "pyroute2" version))
7876 (sha256
7877 (base32
7878 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7879 (build-system python-build-system)
7880 (arguments
7881 `(#:python ,python-2)) ;Python 3.x is not supported
7882 (home-page "https://github.com/svinota/pyroute2")
7883 (synopsis "Python netlink library")
7884 (description
7885 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7886Supported netlink families and protocols include:
7887@itemize
7888@item rtnl, network settings - addresses, routes, traffic controls
7889@item nfnetlink - netfilter API: ipset, nftables, ...
7890@item ipq - simplest userspace packet filtering, iptables QUEUE target
7891@item devlink - manage and monitor devlink-enabled hardware
7892@item generic - generic netlink families
7893 @itemize
7894 @item nl80211 - wireless functions API (basic support)
7895 @item taskstats - extended process statistics
7896 @item acpi_events - ACPI events monitoring
7897 @item thermal_events - thermal events monitoring
7898 @item VFS_DQUOT - disk quota events monitoring
7899 @end itemize
7900@end itemize")
7901 (license license:gpl2+)))
7902
7903(define-public python-wrapt
7904 (package
7905 (name "python-wrapt")
7906 (version "1.11.2")
7907 (source
7908 (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "wrapt" version))
7911 (sha256
7912 (base32
7913 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7914 (build-system python-build-system)
7915 (arguments
7916 ;; Tests are not included in the tarball, they are only available in the
7917 ;; git repository.
7918 `(#:tests? #f))
7919 (home-page "https://github.com/GrahamDumpleton/wrapt")
7920 (synopsis "Module for decorators, wrappers and monkey patching")
7921 (description
7922 "The aim of the wrapt module is to provide a transparent object proxy for
7923 Python, which can be used as the basis for the construction of function
7924 wrappers and decorator functions.")
7925 (license license:bsd-2)))
7926
7927(define-public python2-wrapt
7928 (package-with-python2 python-wrapt))
7929
7930(define-public python-xlrd
7931 (package
7932 (name "python-xlrd")
7933 (version "1.2.0")
7934 (source (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "xlrd" version))
7937 (sha256
7938 (base32
7939 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7940 (build-system python-build-system)
7941 (arguments
7942 `(#:phases
7943 (modify-phases %standard-phases
7944 ;; Some tests depend on writing a temporary file to the user's home
7945 ;; directory.
7946 (add-after 'unpack 'fix-tests
7947 (lambda _
7948 (delete-file "tests/test_open_workbook.py")
7949 #t)))))
7950 (home-page "http://www.python-excel.org/")
7951 (synopsis "Library for extracting data from Excel files")
7952 (description "This package provides a library to extract data from
7953spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7954@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7955Unicode-aware. It is not intended as an end-user tool.")
7956 (license license:bsd-3)))
7957
7958(define-public python2-xlrd
7959 (package-with-python2 python-xlrd))
7960
7961(define-public python-prettytable
7962 (package
7963 (name "python-prettytable")
7964 (version "0.7.2")
7965 (source
7966 (origin
7967 (method url-fetch)
7968 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7969 (sha256
7970 (base32
7971 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7972 (build-system python-build-system)
7973 (home-page "https://code.google.com/archive/p/prettytable/")
7974 (synopsis "Display tabular data in an ASCII table format")
7975 (description
7976 "A library designed to represent tabular data in visually appealing ASCII
7977tables. PrettyTable allows for selection of which columns are to be printed,
7978independent alignment of columns (left or right justified or centred) and
7979printing of sub-tables by specifying a row range.")
7980 (license license:bsd-3)))
7981
7982(define-public python2-prettytable
7983 (package-with-python2 python-prettytable))
7984
7985(define-public python-tables
7986 (package
7987 (name "python-tables")
7988 (version "3.4.4")
7989 (source
7990 (origin
7991 (method url-fetch)
7992 (uri (pypi-uri "tables" version))
7993 (sha256
7994 (base32
7995 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7996 (modules '((guix build utils)))
7997 (snippet
7998 '(begin
7999 ;; Remove pre-compiled .pyc files from source.
8000 (for-each delete-file-recursively
8001 (find-files "." "__pycache__" #:directories? #t))
8002 (for-each delete-file (find-files "." "\\.pyc$"))
8003 #t))))
8004 (build-system python-build-system)
8005 (arguments
8006 `(;; FIXME: python-build-system does not pass configure-flags to "build"
8007 ;; or "check", so we must override the build and check phases.
8008 #:phases
8009 (modify-phases %standard-phases
8010 (add-after 'unpack 'use-gcc
8011 (lambda _
8012 (substitute* "setup.py"
8013 (("compiler = new_compiler\\(\\)" line)
8014 (string-append line
8015 "\ncompiler.set_executables(compiler='gcc',"
8016 "compiler_so='gcc',"
8017 "linker_exe='gcc',"
8018 "linker_so='gcc -shared')")))
8019 #t))
8020 (add-after 'unpack 'disable-tuning
8021 (lambda _
8022 (substitute* "setup.py"
8023 (("cpu_flags = .*")
8024 "cpu_flags = ['sse2']\n"))
8025 #t))
8026 (replace 'build
8027 (lambda* (#:key inputs #:allow-other-keys)
8028 (invoke "python" "setup.py" "build"
8029 (string-append "--hdf5="
8030 (assoc-ref inputs "hdf5")))))
8031 (replace 'check
8032 (lambda* (#:key inputs #:allow-other-keys)
8033 (invoke "python" "setup.py" "check"
8034 (string-append "--hdf5="
8035 (assoc-ref inputs "hdf5"))))))))
8036 (propagated-inputs
8037 `(("python-numexpr" ,python-numexpr)
8038 ("python-numpy" ,python-numpy)))
8039 (native-inputs
8040 `(("python-cython" ,python-cython)
8041 ("pkg-config" ,pkg-config)))
8042 (inputs
8043 `(("hdf5" ,hdf5-1.10)
8044 ("bzip2" ,bzip2)
8045 ("zlib" ,zlib)))
8046 (home-page "https://www.pytables.org/")
8047 (synopsis "Hierarchical datasets for Python")
8048 (description "PyTables is a package for managing hierarchical datasets and
8049designed to efficiently cope with extremely large amounts of data.")
8050 (license license:bsd-3)))
8051
8052(define-public python2-tables
8053 (package-with-python2 python-tables))
8054
8055(define-public python-pytest-black
8056 (package
8057 (name "python-pytest-black")
8058 (version "0.3.8")
8059 (source
8060 (origin
8061 (method url-fetch)
8062 (uri (pypi-uri "pytest-black" version))
8063 (sha256
8064 (base32
8065 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
8066 (build-system python-build-system)
8067 (propagated-inputs
8068 `(("python-pytest" ,python-pytest)
8069 ("python-black" ,python-black)
8070 ("python-toml" ,python-toml)))
8071 (native-inputs
8072 `(("python-setuptools-scm" ,python-setuptools-scm)))
8073 (home-page "https://github.com/shopkeep/pytest-black")
8074 (synopsis "Pytest plugin to enable format checking with black")
8075 (description
8076 "This package provides a pytest plugin to enable format checking with the
8077Python code formatter \"black\".")
8078 (license license:expat)))
8079
8080(define-public python-get-version
8081 (package
8082 (name "python-get-version")
8083 (version "2.1")
8084 (source
8085 (origin
8086 (method url-fetch)
8087 (uri (pypi-uri "get_version" version))
8088 (sha256
8089 (base32
8090 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
8091 (build-system python-build-system)
8092 (propagated-inputs
8093 `(("python-pygments" ,python-pygments)
8094 ("python-pytest" ,python-pytest)
8095 ("python-pytest-black" ,python-pytest-black)
8096 ("python-pytest-cov" ,python-pytest-cov)
8097 ("python-setuptools" ,python-setuptools)
8098 ("python-testpath" ,python-testpath)))
8099 (home-page "https://github.com/flying-sheep/get_version")
8100 (synopsis "Version helper in the spirit of versioneer")
8101 (description
8102 "This package provides a version helper that lets you automatically use
8103the latest @code{vX.X.X} Git tag as the version in your Python package. It
8104also supports getting the version from Python source distributions or, once
8105your package is installed, via @code{pkg_resources} (part of
8106@code{setuptools}).")
8107 (license license:gpl3+)))
8108
8109(define-public python-legacy-api-wrap
8110 (package
8111 (name "python-legacy-api-wrap")
8112 (version "1.2")
8113 (source
8114 (origin
8115 (method url-fetch)
8116 (uri (pypi-uri "legacy-api-wrap" version))
8117 (sha256
8118 (base32
8119 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
8120 (build-system python-build-system)
8121 (propagated-inputs
8122 `(("python-get-version" ,python-get-version)
8123 ("python-pytest" ,python-pytest)
8124 ("python-pytest-black" ,python-pytest-black)
8125 ("python-pytest-cov" ,python-pytest-cov)
8126 ("python-setuptools" ,python-setuptools)))
8127 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
8128 (synopsis "Legacy API wrapper")
8129 (description "This module defines a decorator to wrap legacy APIs. The
8130primary use case is APIs defined before keyword-only parameters existed.")
8131 (license license:gpl3+)))
8132
8133(define-public python-pyasn1
8134 (package
8135 (name "python-pyasn1")
8136 (version "0.4.8")
8137 (source
8138 (origin
8139 (method url-fetch)
8140 (uri (pypi-uri "pyasn1" version))
8141 (sha256
8142 (base32
8143 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
8144 (build-system python-build-system)
8145 (home-page "http://pyasn1.sourceforge.net/")
8146 (synopsis "ASN.1 types and codecs")
8147 (description
8148 "This is an implementation of ASN.1 types and codecs in Python. It is
8149suitable for a wide range of protocols based on the ASN.1 specification.")
8150 (license license:bsd-2)))
8151
8152(define-public python2-pyasn1
8153 (package-with-python2 python-pyasn1))
8154
8155(define-public python-pyasn1-modules
8156 (package
8157 (name "python-pyasn1-modules")
8158 (version "0.2.2")
8159 (source
8160 (origin
8161 (method url-fetch)
8162 (uri (pypi-uri "pyasn1-modules" version))
8163 (sha256
8164 (base32
8165 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
8166 (build-system python-build-system)
8167 (propagated-inputs
8168 `(("python-pyasn1" ,python-pyasn1)))
8169 (home-page "https://sourceforge.net/projects/pyasn1/")
8170 (synopsis "ASN.1 codec implementations")
8171 (description
8172 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
8173implementations of ASN.1-based codecs and protocols.")
8174 (license license:bsd-3)))
8175
8176(define-public python2-pyasn1-modules
8177 (package-with-python2 python-pyasn1-modules))
8178
8179(define-public python-ipaddress
8180 (package
8181 (name "python-ipaddress")
8182 (version "1.0.22")
8183 (source (origin
8184 (method url-fetch)
8185 (uri (pypi-uri "ipaddress" version))
8186 (sha256
8187 (base32
8188 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
8189 (build-system python-build-system)
8190 (home-page "https://github.com/phihag/ipaddress")
8191 (synopsis "IP address manipulation library")
8192 (description
8193 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
8194 in Python. This library is used to create, poke at, and manipulate IPv4 and
8195 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
8196 module to older versions of Python.")
8197 (license license:psfl)))
8198
8199(define-public python2-ipaddress
8200 (package-with-python2 python-ipaddress))
8201
8202(define-public python2-ipaddr
8203 (package
8204 (name "python2-ipaddr")
8205 (version "2.1.11")
8206 (source
8207 (origin
8208 (method url-fetch)
8209 (uri (pypi-uri "ipaddr" version))
8210 (sha256
8211 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
8212 (build-system python-build-system)
8213 (arguments
8214 `(#:python ,python-2 ;version 2 only
8215 #:phases
8216 (modify-phases %standard-phases
8217 (replace 'check
8218 (lambda _ (invoke "python" "ipaddr_test.py"))))))
8219 (home-page "https://github.com/google/ipaddr-py")
8220 (synopsis "IP address manipulation library")
8221 (description
8222 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
8223IPv6 addresses and networks.
8224
8225For new implementations you may prefer to use the standard module
8226@code{ipaddress}, which was introduced in Python 3.3 and backported to older
8227versions of Python.")
8228 (license license:asl2.0)))
8229
8230(define-public python-idna
8231 (package
8232 (name "python-idna")
8233 (version "2.8")
8234 (source
8235 (origin
8236 (method url-fetch)
8237 (uri (pypi-uri "idna" version))
8238 (sha256
8239 (base32
8240 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
8241 (build-system python-build-system)
8242 (home-page "https://github.com/kjd/idna")
8243 (synopsis "Internationalized domain names in applications")
8244 (description
8245 "This is a library to support the Internationalised Domain Names in
8246Applications (IDNA) protocol as specified in RFC 5891. This version of the
8247protocol is often referred to as “IDNA2008” and can produce different results
8248from the earlier standard from 2003. The library is also intended to act as a
8249suitable drop-in replacement for the “encodings.idna” module that comes with
8250the Python standard library but currently only supports the older 2003
8251specification.")
8252 (license license:bsd-4)))
8253
8254(define-public python-idna-2.7
8255 (package (inherit python-idna)
8256 (version "2.7")
8257 (source (origin
8258 (method url-fetch)
8259 (uri (pypi-uri "idna" version))
8260 (sha256
8261 (base32
8262 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
8263
8264
8265(define-public python2-idna
8266 (package-with-python2 python-idna))
8267
8268(define-public python-idna-ssl
8269 (package
8270 (name "python-idna-ssl")
8271 (version "1.0.1")
8272 (source
8273 (origin
8274 (method url-fetch)
8275 (uri (pypi-uri "idna-ssl" version))
8276 (sha256
8277 (base32
8278 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
8279 (build-system python-build-system)
8280 (arguments
8281 `(#:tests? #f)) ;circular dependency with python-aiohttp
8282 (home-page "https://github.com/aio-libs/idna-ssl")
8283 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
8284 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
8285domains support.")
8286 (license license:expat)))
8287
8288(define-public python-pretend
8289 (package
8290 (name "python-pretend")
8291 (version "1.0.9")
8292 (source
8293 (origin
8294 (method url-fetch)
8295 (uri (pypi-uri "pretend" version))
8296 (sha256
8297 (base32
8298 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
8299 (build-system python-build-system)
8300 (home-page "https://github.com/alex/pretend")
8301 (synopsis "Library for stubbing in Python")
8302 (description
8303 "Pretend is a library to make stubbing with Python easier. Stubbing is a
8304technique for writing tests. You may hear the term mixed up with mocks,
8305fakes, or doubles. Basically, a stub is an object that returns pre-canned
8306responses, rather than doing any computation.")
8307 (license license:bsd-3)))
8308
8309(define-public python2-pretend
8310 (package-with-python2 python-pretend))
8311
8312(define-public python-pip
8313 (package
8314 (name "python-pip")
8315 (version "20.0.2")
8316 (source
8317 (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "pip" version))
8320 (sha256
8321 (base32
8322 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
8323 (build-system python-build-system)
8324 (arguments
8325 '(#:tests? #f)) ; there are no tests in the pypi archive.
8326 (home-page "https://pip.pypa.io/")
8327 (synopsis "Package manager for Python software")
8328 (description
8329 "Pip is a package manager for Python software, that finds packages on the
8330Python Package Index (PyPI).")
8331 (license license:expat)))
8332
8333(define-public python2-pip
8334 (package-with-python2 python-pip))
8335
8336(define-public python-tlsh
8337 (package
8338 (name "python-tlsh")
8339 (version "3.4.5")
8340 (home-page "https://github.com/trendmicro/tlsh")
8341 (source
8342 (origin
8343 (method git-fetch)
8344 (uri (git-reference
8345 (url "https://github.com/trendmicro/tlsh.git")
8346 (commit (string-append "v" version))))
8347 (file-name (git-file-name name version))
8348 (sha256
8349 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
8350 (build-system cmake-build-system)
8351 (arguments
8352 '(#:out-of-source? #f
8353 #:phases (modify-phases %standard-phases
8354 (replace
8355 'install
8356 (lambda* (#:key outputs #:allow-other-keys)
8357 ;; Build and install the Python bindings. The underlying
8358 ;; C++ library is apparently not meant to be installed.
8359 (let ((out (assoc-ref outputs "out")))
8360 (with-directory-excursion "py_ext"
8361 (and (system* "python" "setup.py" "build")
8362 (system* "python" "setup.py" "install"
8363 (string-append "--prefix=" out))))))))))
8364 (inputs `(("python" ,python-wrapper))) ;for the bindings
8365 (synopsis "Fuzzy matching library for Python")
8366 (description
8367 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8368Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8369value which can be used for similarity comparisons. Similar objects have
8370similar hash values, which allows for the detection of similar objects by
8371comparing their hash values. The byte stream should have a sufficient amount
8372of complexity; for example, a byte stream of identical bytes will not generate
8373a hash value.")
8374 (license license:asl2.0)))
8375
8376(define-public python2-tlsh
8377 (package
8378 (inherit python-tlsh)
8379 (name "python2-tlsh")
8380 (inputs `(("python" ,python-2)))))
8381
8382(define-public python-termcolor
8383 (package
8384 (name "python-termcolor")
8385 (version "1.1.0")
8386 (source
8387 (origin
8388 (method url-fetch)
8389 (uri (pypi-uri "termcolor" version))
8390 (sha256
8391 (base32
8392 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8393 (build-system python-build-system)
8394 (arguments
8395 ;; There are no tests.
8396 `(#:tests? #f))
8397 (home-page "https://pypi.org/project/termcolor/")
8398 (synopsis "ANSII Color formatting for terminal output")
8399 (description
8400 "This package provides ANSII Color formatting for output in terminals.")
8401 (license license:expat)))
8402
8403(define-public python2-termcolor
8404 (package-with-python2 python-termcolor))
8405
8406(define-public python-libarchive-c
8407 (package
8408 (name "python-libarchive-c")
8409 (version "2.9")
8410 (source (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "libarchive-c" version))
8413 (sha256
8414 (base32
8415 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
8416 (build-system python-build-system)
8417 (arguments
8418 '(#:phases (modify-phases %standard-phases
8419 (add-before
8420 'build 'reference-libarchive
8421 (lambda* (#:key inputs #:allow-other-keys)
8422 ;; Retain the absolute file name of libarchive.so.
8423 (let ((libarchive (assoc-ref inputs "libarchive")))
8424 (substitute* "libarchive/ffi.py"
8425 (("find_library\\('archive'\\)")
8426 (string-append "'" libarchive
8427 "/lib/libarchive.so'"))))))
8428 (replace 'check
8429 (lambda _ (invoke "pytest" "-vv"))))))
8430 (native-inputs
8431 `(("python-mock" ,python-mock)
8432 ("python-pytest" ,python-pytest)))
8433 (inputs
8434 `(("libarchive" ,libarchive)))
8435 (home-page "https://github.com/Changaco/python-libarchive-c")
8436 (synopsis "Python interface to libarchive")
8437 (description
8438 "This package provides Python bindings to libarchive, a C library to
8439access possibly compressed archives in many different formats. It uses
8440Python's @code{ctypes} foreign function interface (FFI).")
8441 (license license:lgpl2.0+)))
8442
8443(define-public python2-libarchive-c
8444 (package-with-python2 python-libarchive-c))
8445
8446(define-public python-file
8447 (package
8448 (inherit file)
8449 (name "python-file")
8450 (build-system python-build-system)
8451 (arguments
8452 '(#:tests? #f ;no tests
8453 #:configure-flags '("--single-version-externally-managed" "--root=/")
8454 #:phases (modify-phases %standard-phases
8455 (add-before 'build 'change-directory
8456 (lambda _
8457 (chdir "python")
8458 #t))
8459 (add-before 'build 'set-library-file-name
8460 (lambda* (#:key inputs #:allow-other-keys)
8461 (let ((file (assoc-ref inputs "file")))
8462 (substitute* "magic.py"
8463 (("find_library\\('magic'\\)")
8464 (string-append "'" file "/lib/libmagic.so'")))
8465 #t))))))
8466 (inputs `(("file" ,file)))
8467 (native-inputs (if (%current-target-system)
8468 `(("self" ,this-package))
8469 '()))
8470 (synopsis "Python bindings to the libmagic file type guesser. Note that
8471this module and the python-magic module both provide a \"magic.py\" file;
8472these two modules, which are different and were developed separately, both
8473serve the same purpose: provide Python bindings for libmagic.")))
8474
8475(define-public python2-file
8476 (package-with-python2 python-file))
8477
8478(define-public python-debian
8479 (package
8480 (name "python-debian")
8481 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
8482 (version "0.1.36")
8483 (source
8484 (origin
8485 ;; Use git-fetch, as pypi doesn't include test suite.
8486 (method git-fetch)
8487 (uri (git-reference
8488 (url home-page)
8489 (commit version)))
8490 (file-name (git-file-name name version))
8491 (sha256
8492 (base32
8493 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
8494 (build-system python-build-system)
8495 (arguments
8496 `(#:phases (modify-phases %standard-phases
8497 (add-after 'unpack 'remove-debian-specific-tests
8498 ;; python-apt, apt and dpkg are not yet available in guix,
8499 ;; and these tests heavily depend on them.
8500 (lambda _
8501 (delete-file "lib/debian/tests/test_deb822.py")
8502 (delete-file "lib/debian/tests/test_debfile.py")
8503 #t)))))
8504 (propagated-inputs
8505 `(("python-six" ,python-six)
8506 ("python-chardet" ,python-chardet)))
8507 (synopsis "Debian package related modules")
8508 (description
8509 ;; XXX: Use @enumerate instead of @itemize to work around
8510 ;; <http://bugs.gnu.org/21772>.
8511 "This package provides Python modules that abstract many formats of
8512Debian-related files, such as:
8513
8514@enumerate
8515@item Debtags information;
8516@item @file{debian/changelog} files;
8517@item packages files, pdiffs;
8518@item control files of single or multiple RFC822-style paragraphs---e.g.
8519 @file{debian/control}, @file{.changes}, @file{.dsc};
8520@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8521 contained files and meta-information.
8522@end enumerate\n")
8523
8524 ;; Modules are either GPLv2+ or GPLv3+.
8525 (license license:gpl3+)))
8526
8527(define-public python-nbformat
8528 (package
8529 (name "python-nbformat")
8530 (version "4.4.0")
8531 (source
8532 (origin
8533 (method url-fetch)
8534 (uri (pypi-uri "nbformat" version))
8535 (sha256
8536 (base32
8537 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8538 (build-system python-build-system)
8539 (arguments `(#:tests? #f)) ; no test target
8540 (propagated-inputs
8541 `(("python-ipython-genutils" ,python-ipython-genutils)
8542 ("python-jsonschema" ,python-jsonschema)
8543 ("python-jupyter-core" ,python-jupyter-core)
8544 ("python-traitlets" ,python-traitlets)))
8545 (home-page "http://jupyter.org")
8546 (synopsis "Jupyter Notebook format")
8547 (description "This package provides the reference implementation of the
8548Jupyter Notebook format and Python APIs for working with notebooks.")
8549 (license license:bsd-3)))
8550
8551(define-public python2-nbformat
8552 (package-with-python2 python-nbformat))
8553
8554(define-public python-bleach
8555 (package
8556 (name "python-bleach")
8557 (version "3.1.3")
8558 (source
8559 (origin
8560 (method url-fetch)
8561 (uri (pypi-uri "bleach" version))
8562 (sha256
8563 (base32
8564 "0al437aw4p2xp83az5hhlrp913nsf0cg6kg4qj3fjhv4wakxipzq"))))
8565 (build-system python-build-system)
8566 (propagated-inputs
8567 `(("python-webencodings" ,python-webencodings)
8568 ("python-six" ,python-six)))
8569 (native-inputs
8570 `(("python-datrie" ,python-datrie)
8571 ("python-genshi" ,python-genshi)
8572 ("python-lxml" ,python-lxml)
8573 ("python-pytest" ,python-pytest)))
8574 (home-page "https://github.com/mozilla/bleach")
8575 (synopsis "Whitelist-based HTML-sanitizing tool")
8576 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8577 (license license:asl2.0)))
8578
8579(define-public python2-bleach
8580 (package-with-python2 python-bleach))
8581
8582(define-public python-entrypoints
8583 (package
8584 (name "python-entrypoints")
8585 (version "0.3")
8586 (source
8587 (origin
8588 (method url-fetch)
8589 (uri (pypi-uri "entrypoints" version))
8590 (sha256
8591 (base32
8592 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
8593 (build-system python-build-system)
8594 ;; The package does not come with a setup.py file, so we have to generate
8595 ;; one ourselves.
8596 (arguments
8597 `(#:tests? #f
8598 #:phases
8599 (modify-phases %standard-phases
8600 (add-after 'unpack 'create-setup.py
8601 (lambda _
8602 (call-with-output-file "setup.py"
8603 (lambda (port)
8604 (format port "\
8605from setuptools import setup
8606setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8607" ,version))))))))
8608 (home-page "https://github.com/takluyver/entrypoints")
8609 (synopsis "Discover and load entry points from installed Python packages")
8610 (description "Entry points are a way for Python packages to advertise
8611objects with some common interface. The most common examples are
8612@code{console_scripts} entry points, which define shell commands by
8613identifying a Python function to run. The @code{entrypoints} module contains
8614functions to find and load entry points.")
8615 (license license:expat)))
8616
8617(define-public python2-entrypoints
8618 (package-with-python2 python-entrypoints))
8619
8620(define-public python-nbconvert
8621 (package
8622 (name "python-nbconvert")
8623 (version "5.0.0b1")
8624 (source
8625 (origin
8626 (method url-fetch)
8627 (uri (pypi-uri "nbconvert" version))
8628 (sha256
8629 (base32
8630 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8631 (build-system python-build-system)
8632 (arguments
8633 `(;; The "bdist_egg" target is disabled by default, causing the installation
8634 ;; to fail.
8635 #:configure-flags (list "bdist_egg")
8636 ;; FIXME: 5 failures, 40 errors.
8637 #:tests? #f))
8638 ;; #:phases
8639 ;; (modify-phases %standard-phases
8640 ;; (replace 'check
8641 ;; (lambda _
8642 ;; (zero? (system* "py.test" "-v")))))
8643 (native-inputs
8644 `(("python-pytest" ,python-pytest)))
8645 (propagated-inputs
8646 `(("python-bleach" ,python-bleach)
8647 ("python-entrypoints" ,python-entrypoints)
8648 ("python-jinja2" ,python-jinja2)
8649 ("python-jupyter-core" ,python-jupyter-core)
8650 ("python-mistune" ,python-mistune)
8651 ("python-nbformat" ,python-nbformat)
8652 ("python-pygments" ,python-pygments)
8653 ("python-traitlets" ,python-traitlets)))
8654 (home-page "http://jupyter.org")
8655 (synopsis "Converting Jupyter Notebooks")
8656 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8657notebooks to various other formats via Jinja templates. It allows you to
8658convert an @code{.ipynb} notebook file into various static formats including:
8659
8660@enumerate
8661@item HTML
8662@item LaTeX
8663@item PDF
8664@item Reveal JS
8665@item Markdown (md)
8666@item ReStructured Text (rst)
8667@item executable script
8668@end enumerate\n")
8669 (license license:bsd-3)))
8670
8671(define-public python2-nbconvert
8672 (package-with-python2 python-nbconvert))
8673
8674(define-public python-notebook
8675 (package
8676 (name "python-notebook")
8677 (version "5.7.4")
8678 (source (origin
8679 (method url-fetch)
8680 (uri (pypi-uri "notebook" version))
8681 (sha256
8682 (base32
8683 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8684 (build-system python-build-system)
8685 (arguments
8686 `(#:phases
8687 (modify-phases %standard-phases
8688 (replace 'check
8689 (lambda _
8690 ;; These tests require a browser
8691 (delete-file-recursively "notebook/tests/selenium")
8692 ;; Some tests need HOME
8693 (setenv "HOME" "/tmp")
8694 ;; This file contains "warningfilters", which are not supported
8695 ;; by this version of nose.
8696 (delete-file "setup.cfg")
8697 (with-directory-excursion "/tmp"
8698 (invoke "nosetests" "-v"))
8699 #t)))))
8700 (propagated-inputs
8701 `(("python-jupyter-core" ,python-jupyter-core)
8702 ("python-nbformat" ,python-nbformat)
8703 ("python-nbconvert" ,python-nbconvert)
8704 ("python-prometheus-client" ,python-prometheus-client)
8705 ("python-send2trash" ,python-send2trash)
8706 ("python-terminado" ,python-terminado)))
8707 (native-inputs
8708 `(("python-nose" ,python-nose)
8709 ("python-sphinx" ,python-sphinx)
8710 ("python-requests" ,python-requests)))
8711 (home-page "http://jupyter.org/")
8712 (synopsis "Web-based notebook environment for interactive computing")
8713 (description
8714 "The Jupyter HTML notebook is a web-based notebook environment for
8715interactive computing.")
8716 (properties `((python2-variant . ,(delay python2-notebook))))
8717 (license license:bsd-3)))
8718
8719(define-public python2-notebook
8720 (let ((base (package-with-python2
8721 (strip-python2-variant python-notebook))))
8722 (package (inherit base)
8723 (native-inputs
8724 `(("python2-mock" ,python2-mock)
8725 ,@(package-native-inputs base)))
8726 (arguments
8727 (substitute-keyword-arguments (package-arguments base)
8728 ((#:phases phases)
8729 `(modify-phases ,phases
8730 (add-before 'check 'disable-test-case
8731 ;; The test requires network access to localhost. Curiously it
8732 ;; fails with Python 2 only. Simply make the test-case return
8733 ;; immediately.
8734 (lambda _
8735 (substitute*
8736 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8737 (("formats = self.nbconvert_api") "return #")))))))))))
8738
8739(define-public python-widgetsnbextension
8740 (package
8741 (name "python-widgetsnbextension")
8742 (version "3.4.2")
8743 (source
8744 (origin
8745 (method url-fetch)
8746 (uri (pypi-uri "widgetsnbextension" version))
8747 (sha256
8748 (base32
8749 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8750 (build-system python-build-system)
8751 (propagated-inputs
8752 `(("python-ipykernel" ,python-ipykernel)
8753 ("python-notebook" ,python-notebook)))
8754 (native-inputs
8755 `(("python-certifi" ,python-certifi)
8756 ("python-nose" ,python-nose)))
8757 (home-page "https://ipython.org")
8758 (synopsis "IPython HTML widgets for Jupyter")
8759 (description "This package provides interactive HTML widgets for Jupyter
8760notebooks.")
8761 (license license:bsd-3)))
8762
8763(define-public python2-widgetsnbextension
8764 (package-with-python2 python-widgetsnbextension))
8765
8766(define-public python-ipywidgets
8767 (package
8768 (name "python-ipywidgets")
8769 (version "5.2.2")
8770 (source
8771 (origin
8772 (method url-fetch)
8773 (uri (pypi-uri "ipywidgets" version))
8774 (sha256
8775 (base32
8776 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8777 (build-system python-build-system)
8778 (propagated-inputs
8779 `(("python-ipython" ,python-ipython)
8780 ("python-traitlets" ,python-traitlets)
8781 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8782 (native-inputs
8783 `(("python-nose" ,python-nose)
8784 ("python-pytest" ,python-pytest)))
8785 (home-page "https://ipython.org")
8786 (synopsis "IPython HTML widgets for Jupyter")
8787 (description "Ipywidgets are interactive HTML widgets for Jupyter
8788notebooks and the IPython kernel. Notebooks come alive when interactive
8789widgets are used. Users gain control of their data and can visualize changes
8790in the data.")
8791 (license license:bsd-3)))
8792
8793(define-public python2-ipywidgets
8794 (package-with-python2 python-ipywidgets))
8795
8796(define-public python-jupyter-console
8797 (package
8798 (name "python-jupyter-console")
8799 (version "6.0.0")
8800 (source
8801 (origin
8802 (method url-fetch)
8803 (uri (pypi-uri "jupyter_console" version))
8804 (sha256
8805 (base32
8806 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8807 (build-system python-build-system)
8808 (propagated-inputs
8809 `(("python-ipykernel" ,python-ipykernel)
8810 ("python-jupyter-client" ,python-jupyter-client)
8811 ("python-prompt-toolkit" ,python-prompt-toolkit)
8812 ("python-pygments" ,python-pygments)))
8813 (native-inputs
8814 `(("python-nose" ,python-nose)))
8815 (home-page "https://jupyter.org")
8816 (synopsis "Jupyter terminal console")
8817 (description "This package provides a terminal-based console frontend for
8818Jupyter kernels. It also allows for console-based interaction with non-Python
8819Jupyter kernels such as IJulia and IRKernel.")
8820 (properties `((python2-variant . ,(delay python2-jupyter-console))))
8821 (license license:bsd-3)))
8822
8823(define-public python2-jupyter-console
8824 (package
8825 (name "python2-jupyter-console")
8826 (version "5.2.0")
8827 (source
8828 (origin
8829 (method url-fetch)
8830 (uri (pypi-uri "jupyter_console" version))
8831 (sha256
8832 (base32
8833 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8834 (build-system python-build-system)
8835 (arguments
8836 `(#:python ,python-2
8837 #:tests? #f)) ; Tests only run in a TTY.
8838 (propagated-inputs
8839 `(("python2-ipykernel" ,python2-ipykernel)
8840 ("python2-jupyter-client" ,python2-jupyter-client)
8841 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8842 ("python2-pygments" ,python2-pygments)))
8843 (native-inputs
8844 `(("python2-nose" ,python2-nose)))
8845 (home-page "https://jupyter.org")
8846 (synopsis "Jupyter terminal console")
8847 (description "This package provides a terminal-based console frontend for
8848Jupyter kernels. It also allows for console-based interaction with non-Python
8849Jupyter kernels such as IJulia and IRKernel.")
8850 (license license:bsd-3)))
8851
8852;; The python-ipython and python-jupyter-console require each other. To get
8853;; the functionality in both packages working, strip down the
8854;; python-jupyter-console package when using it as an input to python-ipython.
8855(define python-jupyter-console-minimal
8856 (package
8857 (inherit python-jupyter-console)
8858 (name "python-jupyter-console-minimal")
8859 (arguments
8860 (substitute-keyword-arguments
8861 (package-arguments python-jupyter-console)
8862 ((#:phases phases)
8863 `(modify-phases ,phases
8864 (add-after 'install 'delete-bin
8865 (lambda* (#:key outputs #:allow-other-keys)
8866 ;; Delete the bin files, to avoid conflicts in profiles
8867 ;; where python-ipython and python-jupyter-console are
8868 ;; both present.
8869 (delete-file-recursively
8870 (string-append
8871 (assoc-ref outputs "out") "/bin"))))))))
8872 ;; Remove the python-ipython propagated input, to avoid the cycle
8873 (propagated-inputs
8874 (alist-delete
8875 "python-ipython"
8876 (package-propagated-inputs python-jupyter-console)))))
8877
8878(define-public python-qtconsole
8879 (package
8880 (name "python-qtconsole")
8881 (version "4.4.3")
8882 (source
8883 (origin
8884 (method url-fetch)
8885 (uri (pypi-uri "qtconsole" version))
8886 (sha256
8887 (base32
8888 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8889 (build-system python-build-system)
8890 (arguments
8891 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8892 ;; but we only have the LTS version 5.x. This means that there might be
8893 ;; runtime errors, but since this is a dependency of the Jupyter package,
8894 ;; and Jupyter can be used without the qtconsole we can overlook this for
8895 ;; now.
8896 `(#:tests? #f
8897 #:phases
8898 (modify-phases %standard-phases
8899 (add-before 'check 'pre-check
8900 (lambda _
8901 (setenv "QT_QPA_PLATFORM" "offscreen")
8902 #t)))))
8903 (propagated-inputs
8904 `(("python-ipykernel" ,python-ipykernel)
8905 ("python-ipython" ,python-ipython)))
8906 (native-inputs
8907 `(("python-pytest" ,python-pytest)))
8908 (home-page "http://jupyter.org")
8909 (synopsis "Jupyter Qt console")
8910 (description "This package provides a Qt-based console for Jupyter with
8911support for rich media output.")
8912 (license license:bsd-3)))
8913
8914(define-public python-jsbeautifier
8915 (package
8916 (name "python-jsbeautifier")
8917 (version "1.10.2")
8918 (home-page "https://github.com/beautify-web/js-beautify")
8919 (source (origin
8920 (method git-fetch)
8921 (uri (git-reference
8922 (url home-page)
8923 (commit (string-append "v" version))))
8924 (file-name (git-file-name name version))
8925 (sha256
8926 (base32
8927 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8928 (build-system python-build-system)
8929 (arguments
8930 `(#:phases (modify-phases %standard-phases
8931 (add-after 'unpack 'chdir
8932 (lambda _
8933 ;; The upstream Git repository contains all the code,
8934 ;; but this package only builds the python code.
8935 (chdir "python")
8936 #t))
8937 (add-after 'unpack 'patch-python-six-requirements
8938 (lambda _
8939 (substitute* "python/setup.py"
8940 (("six>=1.12.0")
8941 "six>=1.11.0"))
8942 #t)))))
8943 (propagated-inputs
8944 `(("python-editorconfig" ,python-editorconfig)
8945 ("python-six" ,python-six)))
8946 (native-inputs
8947 `(("python-pytest" ,python-pytest)))
8948 (synopsis "JavaScript unobfuscator and beautifier")
8949 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8950popular online obfuscators.")
8951 (license license:expat)))
8952
8953(define-public jupyter
8954 (package
8955 (name "jupyter")
8956 (version "1.0.0")
8957 (source
8958 (origin
8959 (method url-fetch)
8960 (uri (pypi-uri "jupyter" version))
8961 (sha256
8962 (base32
8963 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8964 (build-system python-build-system)
8965 (arguments '(#:tests? #f)) ; there are none.
8966 (propagated-inputs
8967 `(("python-ipykernel" ,python-ipykernel)
8968 ("python-ipywidgets" ,python-ipywidgets)
8969 ("python-jupyter-console" ,python-jupyter-console)
8970 ("python-nbconvert" ,python-nbconvert)
8971 ("python-notebook" ,python-notebook)
8972 ("python-qtconsole" ,python-qtconsole)))
8973 (native-search-paths
8974 (list (search-path-specification
8975 (variable "JUPYTER_PATH")
8976 (files '("share/jupyter")))))
8977 (home-page "https://jupyter.org")
8978 (synopsis "Web application for interactive documents")
8979 (description
8980 "The Jupyter Notebook is a web application that allows you to create and
8981share documents that contain live code, equations, visualizations and
8982explanatory text. Uses include: data cleaning and transformation, numerical
8983simulation, statistical modeling, machine learning and much more.")
8984 (license license:bsd-3)))
8985
8986(define-public python-chardet
8987 (package
8988 (name "python-chardet")
8989 (version "3.0.4")
8990 (source
8991 (origin
8992 (method url-fetch)
8993 (uri (pypi-uri "chardet" version))
8994 (sha256
8995 (base32
8996 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8997 (native-inputs
8998 `(("python-hypothesis" ,python-hypothesis)
8999 ("python-pytest" ,python-pytest)
9000 ("python-pytest-runner" ,python-pytest-runner)))
9001 (build-system python-build-system)
9002 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
9003 (arguments `(#:tests? #f))
9004 (home-page "https://github.com/chardet/chardet")
9005 (synopsis "Universal encoding detector for Python 2 and 3")
9006 (description
9007 "This package provides @code{chardet}, a Python module that can
9008automatically detect a wide range of file encodings.")
9009 (license license:lgpl2.1+)))
9010
9011(define-public python2-chardet
9012 (package-with-python2 python-chardet))
9013
9014(define-public python-docopt
9015 (package
9016 (name "python-docopt")
9017 (version "0.6.2")
9018 (source
9019 (origin
9020 (method git-fetch)
9021 ;; The release on PyPI does not include tests.
9022 (uri (git-reference
9023 (url "https://github.com/docopt/docopt")
9024 (commit version)))
9025 (file-name (git-file-name name version))
9026 (sha256
9027 (base32
9028 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
9029 (build-system python-build-system)
9030 (native-inputs
9031 `(("python-pytest" ,python-pytest)))
9032 (arguments
9033 `(#:phases
9034 (modify-phases %standard-phases
9035 (replace 'check
9036 (lambda _ (invoke "py.test"))))))
9037 (home-page "http://docopt.org")
9038 (synopsis "Command-line interface description language for Python")
9039 (description "This library allows the user to define a command-line
9040interface from a program's help message rather than specifying it
9041programmatically with command-line parsers like @code{getopt} and
9042@code{argparse}.")
9043 (license license:expat)))
9044
9045(define-public python2-docopt
9046 (package-with-python2 python-docopt))
9047
9048(define-public python-pythondialog
9049 (package
9050 (name "python-pythondialog")
9051 (version "3.4.0")
9052 (source
9053 (origin
9054 (method url-fetch)
9055 (uri (pypi-uri "pythondialog" version))
9056 (sha256
9057 (base32
9058 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
9059 (build-system python-build-system)
9060 (arguments
9061 `(#:phases
9062 (modify-phases %standard-phases
9063 (add-after 'unpack 'patch-path
9064 (lambda* (#:key inputs #:allow-other-keys)
9065 (let* ((dialog (assoc-ref inputs "dialog")))
9066 ;; Since this library really wants to grovel the search path, we
9067 ;; must hardcode dialog's store path into it.
9068 (substitute* "dialog.py"
9069 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
9070 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
9071 #t))))
9072 #:tests? #f)) ; no test suite
9073 (propagated-inputs
9074 `(("dialog" ,dialog)))
9075 (home-page "http://pythondialog.sourceforge.net/")
9076 (synopsis "Python interface to the UNIX dialog utility")
9077 (description "A Python wrapper for the dialog utility. Its purpose is to
9078provide an easy to use, pythonic and comprehensive Python interface to dialog.
9079This allows one to make simple text-mode user interfaces on Unix-like systems")
9080 (license license:lgpl2.1)
9081 (properties `((python2-variant . ,(delay python2-pythondialog))))))
9082
9083(define-public python2-pythondialog
9084 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
9085 (package
9086 (inherit base)
9087 (version (package-version python-pythondialog))
9088 (source (origin
9089 (method url-fetch)
9090 (uri (pypi-uri "python2-pythondialog" version))
9091 (sha256
9092 (base32
9093 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
9094
9095(define-public python-configobj
9096 (package
9097 (name "python-configobj")
9098 (version "5.0.6")
9099 (source (origin
9100 (method url-fetch)
9101 (uri (pypi-uri "configobj" version))
9102 (sha256
9103 (base32
9104 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9105 ;; Patch setup.py so it looks for python-setuptools, which is
9106 ;; required to parse the keyword 'install_requires' in setup.py.
9107 (patches (search-patches "python-configobj-setuptools.patch"))))
9108 (build-system python-build-system)
9109 (propagated-inputs
9110 `(("python-six" ,python-six)))
9111 (synopsis "Config file reading, writing and validation")
9112 (description "ConfigObj is a simple but powerful config file reader and
9113writer: an ini file round tripper. Its main feature is that it is very easy to
9114use, with a straightforward programmer’s interface and a simple syntax for
9115config files.")
9116 (home-page "https://github.com/DiffSK/configobj")
9117 (license license:bsd-3)))
9118
9119(define-public python2-configobj
9120 (package-with-python2 python-configobj))
9121
9122(define-public python-configargparse
9123 (package
9124 (name "python-configargparse")
9125 (version "0.14.0")
9126 (source (origin
9127 (method url-fetch)
9128 (uri (pypi-uri "ConfigArgParse" version))
9129 (sha256
9130 (base32
9131 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
9132 (build-system python-build-system)
9133 (native-inputs
9134 `(("python-pyyaml" ,python-pyyaml)))
9135 (arguments
9136 `(#:phases
9137 (modify-phases %standard-phases
9138 (replace 'check
9139 (lambda _
9140 ;; Bypass setuptools-shim because one test relies on "setup.py"
9141 ;; being the first argument passed to the python call.
9142 ;;
9143 ;; NOTE: Many tests do not run because they rely on Python's
9144 ;; built-in test.test_argparse, but we remove the unit tests from
9145 ;; our Python installation.
9146 (invoke "python" "setup.py" "test"))))))
9147 (synopsis "Replacement for argparse")
9148 (description "A drop-in replacement for argparse that allows options to also
9149be set via config files and/or environment variables.")
9150 (home-page "https://github.com/bw2/ConfigArgParse")
9151 (license license:expat)))
9152
9153(define-public python2-configargparse
9154 (package-with-python2 python-configargparse))
9155
9156(define-public python-argparse-manpage
9157 (package
9158 (name "python-argparse-manpage")
9159 (version "1.1")
9160 (source
9161 (origin
9162 (method url-fetch)
9163 (uri (pypi-uri "argparse-manpage" version))
9164 (sha256
9165 (base32
9166 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
9167 (build-system python-build-system)
9168 (home-page "https://github.com/praiskup/argparse-manpage")
9169 (synopsis "Build manual page from Python's ArgumentParser object")
9170 (description
9171 "This package provides tools to build manual pages from Python's
9172@code{ArgumentParser} object.")
9173 (license license:asl2.0)))
9174
9175(define-public python-contextlib2
9176 (package
9177 (name "python-contextlib2")
9178 (version "0.6.0.post1")
9179 (source
9180 (origin
9181 (method url-fetch)
9182 (uri (pypi-uri "contextlib2" version))
9183 (sha256
9184 (base32
9185 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
9186 (build-system python-build-system)
9187 (home-page "https://contextlib2.readthedocs.org/")
9188 (synopsis "Tools for decorators and context managers")
9189 (description "This module is primarily a backport of the Python
91903.2 contextlib to earlier Python versions. Like contextlib, it
9191provides utilities for common tasks involving decorators and context
9192managers. It also contains additional features that are not part of
9193the standard library.")
9194 (properties `((python2-variant . ,(delay python2-contextlib2))))
9195 (license license:psfl)))
9196
9197(define-public python2-contextlib2
9198 (let ((base (package-with-python2
9199 (strip-python2-variant python-contextlib2))))
9200 (package
9201 (inherit base)
9202 (arguments
9203 (substitute-keyword-arguments (package-arguments base)
9204 ((#:phases phases)
9205 `(modify-phases ,phases
9206 (replace 'check
9207 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
9208 (native-inputs
9209 `(("python2-unittest2" ,python2-unittest2))))))
9210
9211(define-public python-texttable
9212 (package
9213 (name "python-texttable")
9214 (version "1.6.2")
9215 (source
9216 (origin
9217 (method url-fetch)
9218 (uri (pypi-uri "texttable" version))
9219 (sha256
9220 (base32
9221 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
9222 (build-system python-build-system)
9223 (arguments
9224 `(#:phases
9225 (modify-phases %standard-phases
9226 (replace 'check
9227 (lambda _ (invoke "pytest" "tests.py"))))))
9228 (native-inputs
9229 `(("python-pytest" ,python-pytest)))
9230 (home-page "https://github.com/foutaise/texttable/")
9231 (synopsis "Python module for creating simple ASCII tables")
9232 (description "Texttable is a Python module for creating simple ASCII
9233tables.")
9234 (license license:expat)))
9235
9236(define-public python2-texttable
9237 (package-with-python2 python-texttable))
9238
9239(define-public python-atomicwrites
9240 (package
9241 (name "python-atomicwrites")
9242 (version "1.3.0")
9243 (source (origin
9244 (method url-fetch)
9245 (uri (pypi-uri "atomicwrites" version))
9246 (sha256
9247 (base32
9248 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
9249 (build-system python-build-system)
9250 (synopsis "Atomic file writes in Python")
9251 (description "Library for atomic file writes using platform dependent tools
9252for atomic file system operations.")
9253 (home-page "https://github.com/untitaker/python-atomicwrites")
9254 (license license:expat)))
9255
9256(define-public python2-atomicwrites
9257 (package-with-python2 python-atomicwrites))
9258
9259(define-public python-click-threading
9260 (package
9261 (name "python-click-threading")
9262 (version "0.4.4")
9263 (source (origin
9264 (method url-fetch)
9265 (uri (pypi-uri "click-threading" version))
9266 (sha256
9267 (base32
9268 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
9269 (build-system python-build-system)
9270 (propagated-inputs
9271 `(("python-click" ,python-click)))
9272 (synopsis "Utilities for multithreading in Click")
9273 (description "This package provides utilities for multithreading in Click
9274applications.")
9275 (home-page "https://github.com/click-contrib/click-threading")
9276 (license license:expat)))
9277
9278(define-public python-click-log
9279 (package
9280 (name "python-click-log")
9281 (version "0.3.2")
9282 (source (origin
9283 (method url-fetch)
9284 (uri (pypi-uri "click-log" version))
9285 (sha256
9286 (base32
9287 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
9288 (build-system python-build-system)
9289 (propagated-inputs
9290 `(("python-click" ,python-click)))
9291 (synopsis "Logging for click applications")
9292 (description "This package provides a Python library for logging Click
9293applications.")
9294 (home-page "https://github.com/click-contrib/click-log")
9295 (license license:expat)))
9296
9297(define-public python-apipkg
9298 (package
9299 (name "python-apipkg")
9300 (version "1.4")
9301 (source (origin
9302 (method url-fetch)
9303 (uri (pypi-uri "apipkg" version))
9304 (sha256
9305 (base32
9306 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9307 (build-system python-build-system)
9308 (native-inputs
9309 `(("python-pytest" ,python-pytest)))
9310 (synopsis "Namespace control and lazy-import mechanism")
9311 (description "With apipkg you can control the exported namespace of a Python
9312package and greatly reduce the number of imports for your users. It is a small
9313pure Python module that works on virtually all Python versions.")
9314 (home-page "https://github.com/pytest-dev/apipkg")
9315 (license license:expat)))
9316
9317(define-public python2-apipkg
9318 (package-with-python2 python-apipkg))
9319
9320(define-public python-execnet
9321 (package
9322 (name "python-execnet")
9323 (version "1.4.1")
9324 (source (origin
9325 (method url-fetch)
9326 (uri (pypi-uri "execnet" version))
9327 (sha256
9328 (base32
9329 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9330 (build-system python-build-system)
9331 (arguments
9332 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9333 ;; The two test failures are caused by the lack of an `ssh` executable.
9334 ;; The test suite can be run with pytest after the 'install' phase.
9335 #:tests? #f))
9336 (native-inputs
9337 `(("python-pytest" ,python-pytest)
9338 ("python-setuptools-scm" ,python-setuptools-scm)))
9339 (propagated-inputs
9340 `(("python-apipkg" ,python-apipkg)))
9341 (synopsis "Rapid multi-Python deployment")
9342 (description "Execnet provides a share-nothing model with
9343channel-send/receive communication for distributing execution across many
9344Python interpreters across version, platform and network barriers. It has a
9345minimal and fast API targeting the following uses:
9346@enumerate
9347@item distribute tasks to (many) local or remote CPUs
9348@item write and deploy hybrid multi-process applications
9349@item write scripts to administer multiple environments
9350@end enumerate")
9351 (home-page "https://codespeak.net/execnet/")
9352 (license license:expat)))
9353
9354(define-public python2-execnet
9355 (package-with-python2 python-execnet))
9356
9357(define-public python-icalendar
9358 (package
9359 (name "python-icalendar")
9360 (version "4.0.4")
9361 (source (origin
9362 (method url-fetch)
9363 (uri (pypi-uri "icalendar" version))
9364 (sha256
9365 (base32
9366 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
9367 (build-system python-build-system)
9368 (propagated-inputs
9369 `(("python-dateutil" ,python-dateutil)
9370 ("python-pytz" ,python-pytz)))
9371 (synopsis "Python library for parsing iCalendar files")
9372 (description "The icalendar package is a parser/generator of iCalendar
9373files for use with Python.")
9374 (home-page "https://github.com/collective/icalendar")
9375 (license license:bsd-2)))
9376
9377(define-public python-args
9378 (package
9379 (name "python-args")
9380 (version "0.1.0")
9381 (source (origin
9382 (method url-fetch)
9383 (uri (pypi-uri "args" version))
9384 (sha256
9385 (base32
9386 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9387 (build-system python-build-system)
9388 (home-page "https://github.com/kennethreitz/args")
9389 (synopsis "Command-line argument parser")
9390 (description
9391 "This library provides a Python module to parse command-line arguments.")
9392 (license license:bsd-3)))
9393
9394(define-public python2-args
9395 (package-with-python2 python-args))
9396
9397(define-public python-clint
9398 (package
9399 (name "python-clint")
9400 (version "0.5.1")
9401 (source (origin
9402 (method url-fetch)
9403 (uri (pypi-uri "clint" version))
9404 (sha256
9405 (base32
9406 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9407 (build-system python-build-system)
9408 (arguments
9409 '(#:phases
9410 (modify-phases %standard-phases
9411 (replace 'check
9412 (lambda _ (invoke "py.test" "-v"))))))
9413 (native-inputs
9414 `(("python-pytest" ,python-pytest)))
9415 (propagated-inputs
9416 `(("python-args" ,python-args)))
9417 (home-page "https://github.com/kennethreitz/clint")
9418 (synopsis "Command-line interface tools")
9419 (description
9420 "Clint is a Python module filled with a set of tools for developing
9421command-line applications, including tools for colored and indented
9422output, progress bar display, and pipes.")
9423 (license license:isc)))
9424
9425(define-public python2-clint
9426 (package-with-python2 python-clint))
9427
9428(define-public python-rply
9429 (package
9430 (name "python-rply")
9431 (version "0.7.5")
9432 (source (origin
9433 (method url-fetch)
9434 (uri (pypi-uri "rply" version))
9435 (sha256
9436 (base32
9437 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9438 (build-system python-build-system)
9439 (propagated-inputs
9440 `(("python-appdirs" ,python-appdirs)))
9441 (home-page "https://github.com/alex/rply")
9442 (synopsis "Parser generator for Python")
9443 (description
9444 "This package provides a pure Python based parser generator, that also
9445works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9446with a new public API, and RPython support.")
9447 (license license:bsd-3)))
9448
9449(define-public python2-rply
9450 (package-with-python2 python-rply))
9451
9452(define-public python-hy
9453 (package
9454 (name "python-hy")
9455 (version "0.17.0")
9456 (source (origin
9457 (method url-fetch)
9458 (uri (pypi-uri "hy" version))
9459 (sha256
9460 (base32
9461 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
9462 (build-system python-build-system)
9463 (arguments
9464 '(#:phases
9465 (modify-phases %standard-phases
9466 (add-before 'install 'set-HOME
9467 (lambda _
9468 (setenv "HOME" "/tmp")))
9469 (replace 'check
9470 (lambda _
9471 ;; Tests require write access to HOME.
9472 (setenv "HOME" "/tmp")
9473 (invoke "nosetests"))))))
9474 (native-inputs
9475 `(("python-coverage" ,python-coverage)
9476 ("python-nose" ,python-nose)))
9477 (propagated-inputs
9478 `(("python-astor" ,python-astor)
9479 ("python-clint" ,python-clint)
9480 ("python-rply" ,python-rply)
9481 ("python-fastentrypoints"
9482 ,python-fastentrypoints)
9483 ("python-funcparserlib"
9484 ,python-funcparserlib)))
9485 (home-page "http://hylang.org/")
9486 (synopsis "Lisp frontend to Python")
9487 (description
9488 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9489its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9490Python at your fingertips, in Lisp form.")
9491 (license license:expat)))
9492
9493(define-public python2-hy
9494 (package-with-python2 python-hy))
9495
9496(define-public python2-functools32
9497 (package
9498 (name "python2-functools32")
9499 (version "3.2.3-2")
9500 (source
9501 (origin
9502 (method url-fetch)
9503 (uri (pypi-uri "functools32" version))
9504 (sha256
9505 (base32
9506 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9507 (build-system python-build-system)
9508 (arguments
9509 `(#:python ,python-2
9510 #:tests? #f)) ; no test target
9511 (home-page "https://github.com/MiCHiLU/python-functools32")
9512 (synopsis
9513 "Backport of the functools module from Python 3.2.3")
9514 (description
9515 "This package is a backport of the @code{functools} module from Python
95163.2.3 for use with older versions of Python and PyPy.")
9517 (license license:expat)))
9518
9519(define-public python2-subprocess32
9520 (package
9521 (name "python2-subprocess32")
9522 (version "3.2.7")
9523 (source (origin
9524 (method url-fetch)
9525 (uri (pypi-uri "subprocess32" version))
9526 (sha256
9527 (base32
9528 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9529 (patches
9530 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9531 (build-system python-build-system)
9532 (arguments
9533 `(#:python ,python-2
9534 ;; The test suite fails with Python > 2.7.13:
9535 ;; import test.support
9536 ;; ImportError: No module named support
9537 #:tests? #f
9538 #:phases
9539 (modify-phases %standard-phases
9540 (add-after 'unpack 'patch-/bin/sh
9541 (lambda _
9542 (substitute* '("subprocess32.py"
9543 "test_subprocess32.py")
9544 (("/bin/sh") (which "sh")))
9545 #t)))))
9546 (home-page "https://github.com/google/python-subprocess32")
9547 (synopsis "Backport of the subprocess module from Python 3.2")
9548 (description
9549 "This is a backport of the @code{subprocess} standard library module
9550from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9551new features. On POSIX systems it is guaranteed to be reliable when used
9552in threaded applications. It includes timeout support from Python 3.3 but
9553otherwise matches 3.2’s API.")
9554 (license license:psfl)))
9555
9556(define-public python2-futures
9557 (package
9558 (name "python2-futures")
9559 (version "3.2.0")
9560 (source
9561 (origin
9562 (method url-fetch)
9563 (uri (pypi-uri "futures" version))
9564 (sha256
9565 (base32
9566 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9567 (build-system python-build-system)
9568 (arguments
9569 `(#:python ,python-2
9570 #:phases
9571 (modify-phases %standard-phases
9572 (replace 'check
9573 (lambda _
9574 (invoke "python" "test_futures.py")
9575 #t)))))
9576 (home-page "https://github.com/agronholm/pythonfutures")
9577 (synopsis
9578 "Backport of the concurrent.futures package from Python 3.2")
9579 (description
9580 "The concurrent.futures module provides a high-level interface for
9581asynchronously executing callables. This package backports the
9582concurrent.futures package from Python 3.2")
9583 (license license:bsd-3)))
9584
9585(define-public python-promise
9586 (package
9587 (name "python-promise")
9588 (version "0.4.2")
9589 (source
9590 (origin
9591 (method url-fetch)
9592 (uri (pypi-uri "promise" version))
9593 (sha256
9594 (base32
9595 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9596 (build-system python-build-system)
9597 ;; Tests wants python-futures, which is a python2 only program, and
9598 ;; can't be found by python-promise at test time.
9599 (arguments `(#:tests? #f))
9600 (home-page "https://github.com/syrusakbary/promise")
9601 (synopsis "Promises/A+ implementation for Python")
9602 (description
9603 "Promises/A+ implementation for Python")
9604 (properties `((python2-variant . ,(delay python2-promise))))
9605 (license license:expat)))
9606
9607(define-public python2-promise
9608 (let ((promise (package-with-python2
9609 (strip-python2-variant python-promise))))
9610 (package (inherit promise)
9611 (arguments (substitute-keyword-arguments (package-arguments promise)
9612 ((#:tests? _) #t)))
9613 (native-inputs
9614 `(("python2-futures" ,python2-futures)
9615 ("python2-pytest" ,python2-pytest)
9616 ,@(package-native-inputs promise))))))
9617
9618(define-public python-progressbar33
9619 (package
9620 (name "python-progressbar33")
9621 (version "2.4")
9622 (source
9623 (origin
9624 (method url-fetch)
9625 (uri (pypi-uri "progressbar33" version))
9626 (sha256
9627 (base32
9628 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
9629 (build-system python-build-system)
9630 (home-page "http://github.com/germangh/python-progressbar")
9631 (synopsis "Text progress bar library for Python")
9632 (description
9633 "This package provides a text progress bar library for Python. This
9634version only differs from the original @code{progressbar} package in that it
9635uses relative package imports instead of absolute imports, which is necessary
9636for the module to work under Python 3.3.")
9637 ;; Either or both of these licenses may be selected.
9638 (license (list license:lgpl2.1+ license:bsd-3))))
9639
9640(define-public python-colorama
9641 (package
9642 (name "python-colorama")
9643 (version "0.4.3")
9644 (source
9645 (origin
9646 (method url-fetch)
9647 (uri (pypi-uri "colorama" version))
9648 (sha256
9649 (base32
9650 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
9651 (build-system python-build-system)
9652 (synopsis "Colored terminal text rendering for Python")
9653 (description "Colorama is a Python library for rendering colored terminal
9654text.")
9655 (home-page "https://pypi.org/project/colorama/")
9656 (license license:bsd-3)))
9657
9658(define-public python2-colorama
9659 (package-with-python2 python-colorama))
9660
9661(define-public python-rsa
9662 (package
9663 (name "python-rsa")
9664 (version "3.4.2")
9665 (source
9666 (origin
9667 (method url-fetch)
9668 (uri (pypi-uri "rsa" version))
9669 (sha256
9670 (base32
9671 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9672 (build-system python-build-system)
9673 (propagated-inputs
9674 `(("python-pyasn1" ,python-pyasn1)))
9675 (synopsis "Pure-Python RSA implementation")
9676 (description "Python-RSA is a pure-Python RSA implementation. It supports
9677encryption and decryption, signing and verifying signatures, and key
9678generation according to PKCS#1 version 1.5. It can be used as a Python
9679library as well as on the command line.")
9680 (home-page "https://stuvel.eu/rsa")
9681 (license license:asl2.0)))
9682
9683(define-public python2-rsa
9684 (package-with-python2 python-rsa))
9685
9686(define-public python-pluggy
9687 (package
9688 (name "python-pluggy")
9689 (version "0.11.0")
9690 (source
9691 (origin
9692 (method url-fetch)
9693 (uri (pypi-uri "pluggy" version))
9694 (sha256
9695 (base32
9696 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
9697 (build-system python-build-system)
9698 (native-inputs
9699 `(("python-setuptools-scm" ,python-setuptools-scm)))
9700 (synopsis "Plugin and hook calling mechanism for Python")
9701 (description "Pluggy is an extraction of the plugin manager as used by
9702Pytest but stripped of Pytest specific details.")
9703 (home-page "https://pypi.org/project/pluggy/")
9704 (license license:expat)))
9705
9706(define-public python2-pluggy
9707 (package-with-python2 python-pluggy))
9708
9709(define-public python-tox
9710 (package
9711 (name "python-tox")
9712 (version "2.8.1")
9713 (source
9714 (origin
9715 (method url-fetch)
9716 (uri (pypi-uri "tox" version))
9717 (sha256
9718 (base32
9719 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9720 (build-system python-build-system)
9721 (arguments
9722 ;; FIXME: Tests require pytest-timeout, which itself requires
9723 ;; pytest>=2.8.0 for installation.
9724 '(#:tests? #f))
9725 (propagated-inputs
9726 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9727 ("python-py" ,python-py)
9728 ("python-virtualenv" ,python-virtualenv)))
9729 (native-inputs
9730 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9731 ("python-pytest" ,python-pytest) ; >= 2.3.5
9732 ("python-setuptools-scm" ,python-setuptools-scm)))
9733 (home-page "https://tox.readthedocs.io")
9734 (synopsis "Virtualenv-based automation of test activities")
9735 (description "Tox is a generic virtualenv management and test command line
9736tool. It can be used to check that a package installs correctly with
9737different Python versions and interpreters, or run tests in each type of
9738supported environment, or act as a frontend to continuous integration
9739servers.")
9740 (license license:expat)))
9741
9742(define-public python2-tox
9743 (package-with-python2 python-tox))
9744
9745(define-public python-jmespath
9746 (package
9747 (name "python-jmespath")
9748 (version "0.9.4")
9749 (source
9750 (origin
9751 (method url-fetch)
9752 (uri (pypi-uri "jmespath" version))
9753 (sha256
9754 (base32
9755 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
9756 (build-system python-build-system)
9757 (native-inputs
9758 `(("python-nose" ,python-nose)))
9759 (synopsis "JSON Matching Expressions")
9760 (description "JMESPath (pronounced “james path”) is a Python library that
9761allows one to declaratively specify how to extract elements from a JSON
9762document.")
9763 (home-page "https://github.com/jmespath/jmespath.py")
9764 (license license:expat)))
9765
9766(define-public python2-jmespath
9767 (package-with-python2 python-jmespath))
9768
9769(define-public python-botocore
9770 (package
9771 (name "python-botocore")
9772 (version "1.15.26")
9773 (source
9774 (origin
9775 (method url-fetch)
9776 (uri (pypi-uri "botocore" version))
9777 (sha256
9778 (base32
9779 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
9780 (build-system python-build-system)
9781 (arguments
9782 ;; FIXME: Many tests are failing.
9783 '(#:tests? #f))
9784 (propagated-inputs
9785 `(("python-dateutil" ,python-dateutil)
9786 ("python-docutils" ,python-docutils)
9787 ("python-jmespath" ,python-jmespath)))
9788 (native-inputs
9789 `(("python-mock" ,python-mock)
9790 ("python-nose" ,python-nose)
9791 ("behave" ,behave)
9792 ("python-tox" ,python-tox)
9793 ("python-urllib3" ,python-urllib3)
9794 ("python-wheel" ,python-wheel)))
9795 (home-page "https://github.com/boto/botocore")
9796 (synopsis "Low-level interface to AWS")
9797 (description "Botocore is a Python library that provides a low-level
9798interface to the Amazon Web Services (AWS) API.")
9799 (license license:asl2.0)))
9800
9801(define-public python2-botocore
9802 (package-with-python2 python-botocore))
9803
9804(define-public python-xdo
9805 (package
9806 (name "python-xdo")
9807 (version "0.3")
9808 (source (origin
9809 (method url-fetch)
9810 (uri (string-append
9811 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9812 "python-xdo_" version ".orig.tar.gz"))
9813 (sha256
9814 (base32
9815 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9816 (build-system python-build-system)
9817 (arguments
9818 '(#:phases
9819 (modify-phases %standard-phases
9820 (add-before 'install 'patch-libxdo-path
9821 ;; Hardcode the path of dynamically loaded libxdo library.
9822 (lambda* (#:key inputs #:allow-other-keys)
9823 (let ((libxdo (string-append
9824 (assoc-ref inputs "xdotool")
9825 "/lib/libxdo.so")))
9826 (substitute* "xdo/_xdo.py"
9827 (("find_library\\(\"xdo\"\\)")
9828 (simple-format #f "\"~a\"" libxdo)))
9829 #t))))
9830 #:tests? #f)) ; no tests provided
9831 (propagated-inputs
9832 `(("python-six" ,python-six)))
9833 (inputs
9834 `(("xdotool" ,xdotool)
9835 ("libX11" ,libx11)))
9836 (home-page "https://tracker.debian.org/pkg/python-xdo")
9837 (synopsis "Python library for simulating X11 keyboard/mouse input")
9838 (description "Provides bindings to libxdo for manipulating X11 via simulated
9839input. (Note that this is mostly a legacy library; you may wish to look at
9840python-xdo for newer bindings.)")
9841 (license license:bsd-3)))
9842
9843(define-public python2-xdo
9844 (package-with-python2 python-xdo))
9845
9846(define-public python-mako
9847 (package
9848 (name "python-mako")
9849 (version "1.1.1")
9850 (source
9851 (origin
9852 (method url-fetch)
9853 (uri (pypi-uri "Mako" version))
9854 (sha256
9855 (base32
9856 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
9857 (build-system python-build-system)
9858 (arguments
9859 `(#:phases (modify-phases %standard-phases
9860 (replace 'check
9861 (lambda _
9862 (invoke "pytest" "-vv"))))))
9863 (propagated-inputs
9864 `(("python-markupsafe" ,python-markupsafe)))
9865 (native-inputs
9866 `(("python-mock" ,python-mock)
9867 ("python-pytest" ,python-pytest)))
9868 (home-page "https://www.makotemplates.org/")
9869 (synopsis "Templating language for Python")
9870 (description "Mako is a templating language for Python that compiles
9871templates into Python modules.")
9872 (license license:expat)))
9873
9874(define-public python2-mako
9875 (package-with-python2 python-mako))
9876
9877(define-public python-waitress
9878 (package
9879 (name "python-waitress")
9880 (version "1.1.0")
9881 (source
9882 (origin
9883 (method url-fetch)
9884 (uri (pypi-uri "waitress" version))
9885 (patches (search-patches "python-waitress-fix-tests.patch"))
9886 (sha256
9887 (base32
9888 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9889 (build-system python-build-system)
9890 (home-page "https://github.com/Pylons/waitress")
9891 (synopsis "Waitress WSGI server")
9892 (description "Waitress is meant to be a production-quality pure-Python WSGI
9893server with very acceptable performance.")
9894 (license license:zpl2.1)))
9895
9896(define-public python2-waitress
9897 (package-with-python2 python-waitress))
9898
9899(define-public python-whichcraft
9900 (package
9901 (name "python-whichcraft")
9902 (version "0.6.1")
9903 (source
9904 (origin
9905 (method url-fetch)
9906 (uri (pypi-uri "whichcraft" version))
9907 (sha256
9908 (base32
9909 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9910 (build-system python-build-system)
9911 (native-inputs
9912 `(("python-pytest" ,python-pytest)))
9913 (home-page "https://github.com/pydanny/whichcraft")
9914 (synopsis "Cross-platform cross-python shutil.which functionality")
9915 (description
9916 "This package provides a shim of the shutil.which function that's
9917designed to work across multiple versions of Python.")
9918 (license license:bsd-3)))
9919
9920(define-public python-cookiecutter
9921 (package
9922 (name "python-cookiecutter")
9923 (version "1.6.0")
9924 (source
9925 (origin
9926 (method url-fetch)
9927 (uri (pypi-uri "cookiecutter" version))
9928 (sha256
9929 (base32
9930 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9931 (build-system python-build-system)
9932 (native-inputs
9933 `(("python-freezegun" ,python-freezegun)
9934 ("python-pytest" ,python-pytest)
9935 ("python-pytest-catchlog" ,python-pytest-catchlog)
9936 ("python-pytest-cov" ,python-pytest-cov)
9937 ("python-pytest-mock" ,python-pytest-mock)))
9938 (propagated-inputs
9939 `(("python-binaryornot" ,python-binaryornot)
9940 ("python-click" ,python-click)
9941 ("python-future" ,python-future)
9942 ("python-jinja2" ,python-jinja2)
9943 ("python-jinja2-time" ,python-jinja2-time)
9944 ("python-poyo" ,python-poyo)
9945 ("python-requests" ,python-requests)
9946 ("python-whichcraft" ,python-whichcraft)))
9947 (home-page "https://github.com/audreyr/cookiecutter")
9948 (synopsis
9949 "Command-line utility that creates projects from project templates")
9950 (description
9951 "This package provides a command-line utility that creates projects from
9952project templates, e.g. creating a Python package project from a Python package
9953project template.")
9954 (license license:bsd-3)))
9955
9956(define-public python-pyquery
9957 (package
9958 (name "python-pyquery")
9959 (version "1.2.17")
9960 (source
9961 (origin
9962 (method url-fetch)
9963 (uri (pypi-uri "pyquery" version))
9964 (sha256
9965 (base32
9966 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9967 (build-system python-build-system)
9968 (native-inputs
9969 `(("python-webob" ,python-webob)
9970 ("python-webtest" ,python-webtest)))
9971 (propagated-inputs
9972 `(("python-lxml" ,python-lxml)
9973 ("python-cssselect" ,python-cssselect)))
9974 (home-page "https://github.com/gawel/pyquery")
9975 (synopsis "Make jQuery-like queries on xml documents")
9976 (description "pyquery allows you to make jQuery queries on xml documents.
9977The API is as much as possible the similar to jQuery. pyquery uses lxml for
9978fast xml and html manipulation.")
9979 (license license:bsd-3)))
9980
9981(define-public python-anyjson
9982 (package
9983 (name "python-anyjson")
9984 (version "0.3.3")
9985 (source
9986 (origin
9987 (method url-fetch)
9988 (uri (pypi-uri "anyjson" version))
9989 (sha256
9990 (base32
9991 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9992 (build-system python-build-system)
9993 (arguments
9994 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9995 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9996 ;; whatever) so this transformation needs to be done before the tests
9997 ;; can be run. Maybe we could add a build step to transform beforehand
9998 ;; but it could be annoying/difficult.
9999 ;; We can enable tests for the Python 2 version, though, and do below.
10000 #:tests? #f))
10001 (home-page "https://bitbucket.org/runeh/anyjson/")
10002 (synopsis
10003 "Wraps best available JSON implementation in a common interface")
10004 (description
10005 "Anyjson loads whichever is the fastest JSON module installed
10006and provides a uniform API regardless of which JSON implementation is used.")
10007 (license license:bsd-3)
10008 (properties `((python2-variant . ,(delay python2-anyjson))))))
10009
10010(define-public python2-anyjson
10011 (let ((anyjson (package-with-python2
10012 (strip-python2-variant python-anyjson))))
10013 (package
10014 (inherit anyjson)
10015 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10016 #:tests? #t
10017 ,@(package-arguments anyjson)))
10018 (native-inputs `(("python2-nose" ,python2-nose))))))
10019
10020(define-public python-amqp
10021 (package
10022 (name "python-amqp")
10023 (version "2.3.2")
10024 (source
10025 (origin
10026 (method url-fetch)
10027 (uri (pypi-uri "amqp" version))
10028 (sha256
10029 (base32
10030 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
10031 (build-system python-build-system)
10032 (native-inputs
10033 `(("python-case" ,python-case)
10034 ("python-pytest-sugar" ,python-pytest-sugar)
10035 ("python-mock" ,python-mock)))
10036 (propagated-inputs
10037 `(("python-vine" ,python-vine)))
10038 (home-page "https://github.com/celery/py-amqp")
10039 (synopsis
10040 "Low-level AMQP client for Python (fork of amqplib)")
10041 (description
10042 "This is a fork of amqplib which was originally written by Barry Pederson.
10043It is maintained by the Celery project, and used by kombu as a pure python
10044alternative when librabbitmq is not available.")
10045 (license license:lgpl2.1+)
10046 (properties `((python2-variant . ,(delay python2-amqp))))))
10047
10048(define-public python2-amqp
10049 (let ((amqp (package-with-python2
10050 (strip-python2-variant python-amqp))))
10051 (package
10052 (inherit amqp)
10053 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10054 ;; unmaintained. Weirdly, does not do this on the python 3
10055 ;; version?
10056 #:tests? #f
10057 ,@(package-arguments amqp))))))
10058
10059(define-public python-txamqp
10060 (package
10061 (name "python-txamqp")
10062 (version "0.8.2")
10063 (source
10064 (origin
10065 (method url-fetch)
10066 (uri (pypi-uri "txAMQP" version))
10067 (sha256
10068 (base32
10069 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
10070 (build-system python-build-system)
10071 (propagated-inputs
10072 `(("python-six" ,python-six)
10073 ("python-twisted" ,python-twisted)))
10074 (home-page "https://github.com/txamqp/txamqp")
10075 (synopsis "Communicate with AMQP peers and brokers using Twisted")
10076 (description
10077 "This package provides a Python library for communicating with AMQP peers
10078and brokers using the asynchronous networking framework Twisted. It contains
10079all the necessary code to connect, send and receive messages to/from an
10080AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
10081also includes support for using Thrift RPC over AMQP in Twisted
10082applications.")
10083 (license license:asl2.0)))
10084
10085(define-public python2-txamqp
10086 (package-with-python2 python-txamqp))
10087
10088(define-public python-kombu
10089 (package
10090 (name "python-kombu")
10091 (version "4.2.2")
10092 (source
10093 (origin
10094 (method url-fetch)
10095 (uri (pypi-uri "kombu" version))
10096 (sha256
10097 (base32
10098 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
10099 (build-system python-build-system)
10100 (native-inputs
10101 `(("python-mock" ,python-mock)
10102 ("python-case" ,python-case)
10103 ("python-pyro4" ,python-pyro4)
10104 ("python-pytest-sugar" ,python-pytest-sugar)
10105 ("python-pytz" ,python-pytz)))
10106 (propagated-inputs
10107 `(("python-anyjson" ,python-anyjson)
10108 ("python-amqp" ,python-amqp)
10109 ("python-redis" ,python-redis)))
10110 (home-page "https://kombu.readthedocs.io")
10111 (synopsis "Message passing library for Python")
10112 (description "The aim of Kombu is to make messaging in Python as easy as
10113possible by providing an idiomatic high-level interface for the AMQ protocol,
10114and also provide proven and tested solutions to common messaging problems.
10115AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10116message orientation, queuing, routing, reliability and security, for which the
10117RabbitMQ messaging server is the most popular implementation.")
10118 (license license:bsd-3)
10119 (properties `((python2-variant . ,(delay python2-kombu))))))
10120
10121(define-public python2-kombu
10122 (let ((kombu (package-with-python2
10123 (strip-python2-variant python-kombu))))
10124 (package
10125 (inherit kombu)
10126 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10127 ;; It works fine on the python3 variant.
10128 #:tests? #f
10129 ,@(package-arguments kombu)))
10130 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10131 ,@(package-native-inputs kombu))))))
10132
10133(define-public python-billiard
10134 (package
10135 (name "python-billiard")
10136 (version "3.5.0.5")
10137 (source
10138 (origin
10139 (method url-fetch)
10140 (uri (pypi-uri "billiard" version))
10141 (sha256
10142 (base32
10143 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
10144 (build-system python-build-system)
10145 (native-inputs
10146 `(("python-case" ,python-case)
10147 ("python-pytest" ,python-pytest)))
10148 (home-page "https://github.com/celery/billiard")
10149 (synopsis
10150 "Python multiprocessing fork with improvements and bugfixes")
10151 (description
10152 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10153multiprocessing package itself is a renamed and updated version of R Oudkerk's
10154pyprocessing package. This standalone variant is intended to be compatible with
10155Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10156 (license license:bsd-3)
10157 (properties `((python2-variant . ,(delay python2-billiard))))))
10158
10159(define-public python2-billiard
10160 (let ((billiard (package-with-python2
10161 (strip-python2-variant python-billiard))))
10162 (package
10163 (inherit billiard)
10164 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10165 ("python2-mock" ,python2-mock)
10166 ,@(package-native-inputs billiard))))))
10167
10168(define-public python-celery
10169 (package
10170 (name "python-celery")
10171 (version "4.2.1")
10172 (source
10173 (origin
10174 (method url-fetch)
10175 (uri (pypi-uri "celery" version))
10176 (sha256
10177 (base32
10178 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
10179 (build-system python-build-system)
10180 (arguments
10181 '(;; TODO The tests fail with Python 3.7
10182 ;; https://github.com/celery/celery/issues/4849
10183 #:tests? #f
10184 #:phases
10185 (modify-phases %standard-phases
10186 (add-after 'unpack 'patch-requirements
10187 (lambda _
10188 (substitute* "requirements/test.txt"
10189 (("pytest>=3\\.0,<3\\.3")
10190 "pytest>=3.0"))
10191 #t)))))
10192 (native-inputs
10193 `(("python-case" ,python-case)
10194 ("python-pytest" ,python-pytest)))
10195 (propagated-inputs
10196 `(("python-pytz" ,python-pytz)
10197 ("python-billiard" ,python-billiard)
10198 ("python-kombu" ,python-kombu)))
10199 (home-page "https://celeryproject.org")
10200 (synopsis "Distributed Task Queue")
10201 (description "Celery is an asynchronous task queue/job queue based on
10202distributed message passing. It is focused on real-time operation, but
10203supports scheduling as well. The execution units, called tasks, are executed
10204concurrently on a single or more worker servers using multiprocessing,
10205Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10206synchronously (wait until ready).")
10207 (license license:bsd-3)
10208 (properties `((python2-variant . ,(delay python2-celery))))))
10209
10210(define-public python2-celery
10211 (let ((celery (package-with-python2
10212 (strip-python2-variant python-celery))))
10213 (package
10214 (inherit celery)
10215 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10216 ("python2-mock" ,python2-mock)
10217 ,@(package-native-inputs celery))))))
10218
10219(define-public python-translitcodec
10220 (package
10221 (name "python-translitcodec")
10222 (version "0.4.0")
10223 (source
10224 (origin
10225 (method url-fetch)
10226 (uri (pypi-uri "translitcodec" version))
10227 (sha256
10228 (base32
10229 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10230 (build-system python-build-system)
10231 (arguments
10232 `(#:tests? #f)) ; no tests provided
10233 (home-page
10234 "https://github.com/claudep/translitcodec")
10235 (synopsis
10236 "Unicode to 8-bit charset transliteration codec")
10237 (description
10238 "This package contains codecs for transliterating ISO 10646 texts into
10239best-effort representations using smaller coded character sets (ASCII,
10240ISO 8859, etc.).")
10241 (license license:expat)))
10242
10243(define-public python2-translitcodec
10244 (package-with-python2 python-translitcodec))
10245
10246(define-public python-editor
10247 (package
10248 (name "python-editor")
10249 (version "1.0.4")
10250 (source
10251 (origin
10252 (method url-fetch)
10253 (uri (pypi-uri "python-editor" version))
10254 (sha256
10255 (base32
10256 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
10257 (build-system python-build-system)
10258 (arguments
10259 '(#:tests? #f)) ;XXX: needs a TTY and an editor
10260 (home-page "https://github.com/fmoo/python-editor")
10261 (synopsis "Programmatically open an editor, capture the result")
10262 (description
10263 "python-editor is a library that provides the editor module for
10264programmatically interfacing with your system's $EDITOR.")
10265 (license license:asl2.0)))
10266
10267(define-public python2-editor
10268 (package-with-python2 python-editor))
10269
10270(define-public python-vobject
10271 (package
10272 (name "python-vobject")
10273 (version "0.9.5")
10274 (source (origin
10275 (method url-fetch)
10276 (uri (pypi-uri "vobject" version))
10277 (sha256
10278 (base32
10279 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
10280 (build-system python-build-system)
10281 (arguments
10282 '(;; The test suite relies on some non-portable Windows interfaces.
10283 #:tests? #f))
10284 (propagated-inputs
10285 `(("python-dateutil" ,python-dateutil)
10286 ("python-pyicu" ,python-pyicu)))
10287 (synopsis "Parse and generate vCard and vCalendar files")
10288 (description "Vobject is intended to be a full featured Python package for
10289parsing and generating vCard and vCalendar files. Currently, iCalendar files
10290are supported and well tested. vCard 3.0 files are supported, and all data
10291should be imported, but only a few components are understood in a sophisticated
10292way.")
10293 (home-page "https://eventable.github.io/vobject/")
10294 (license license:asl2.0)))
10295
10296(define-public python2-vobject
10297 (package-with-python2 python-vobject))
10298
10299(define-public python-munkres
10300 (package
10301 (name "python-munkres")
10302 (version "1.0.8")
10303 (source (origin
10304 (method url-fetch)
10305 (uri (pypi-uri "munkres" version))
10306 (sha256
10307 (base32
10308 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10309 (build-system python-build-system)
10310 (arguments
10311 '(#:tests? #f)) ; no test suite
10312 (home-page "https://software.clapper.org/munkres/")
10313 (synopsis "Implementation of the Munkres algorithm")
10314 (description "The Munkres module provides an implementation of the Munkres
10315algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10316useful for solving the Assignment Problem.")
10317 (license license:bsd-3)))
10318
10319(define-public python2-munkres
10320 (package-with-python2 python-munkres))
10321
10322(define-public python-whoosh
10323 (package
10324 (name "python-whoosh")
10325 (version "2.7.4")
10326 (source
10327 (origin
10328 (method url-fetch)
10329 (uri (pypi-uri "Whoosh" version))
10330 (sha256
10331 (base32
10332 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10333 (build-system python-build-system)
10334 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
10335 (native-inputs
10336 `(("python-pytest" ,python-pytest)))
10337 (home-page "https://bitbucket.org/mchaput/whoosh")
10338 (synopsis "Full text indexing, search, and spell checking library")
10339 (description
10340 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10341checking library.")
10342 (license license:bsd-2)))
10343
10344(define-public python2-whoosh
10345 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10346 (package (inherit whoosh)
10347 (propagated-inputs
10348 `(("python2-backport-ssl-match-hostname"
10349 ,python2-backport-ssl-match-hostname)
10350 ,@(package-propagated-inputs whoosh))))))
10351
10352(define-public python-pathlib
10353 (package
10354 (name "python-pathlib")
10355 (version "1.0.1")
10356 (source (origin
10357 (method url-fetch)
10358 (uri (pypi-uri "pathlib" version))
10359 (sha256
10360 (base32
10361 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10362 (build-system python-build-system)
10363 ;; The tests depend on the internal "test" module, which does not provide
10364 ;; a stable interface.
10365 (arguments `(#:tests? #f))
10366 (home-page "https://pathlib.readthedocs.org/")
10367 (synopsis "Object-oriented file system paths")
10368 (description "Pathlib offers a set of classes to handle file system paths.
10369It offers the following advantages over using string objects:
10370
10371@enumerate
10372@item No more cumbersome use of os and os.path functions. Everything can
10373be done easily through operators, attribute accesses, and method calls.
10374@item Embodies the semantics of different path types. For example,
10375comparing Windows paths ignores casing.
10376@item Well-defined semantics, eliminating any inconsistencies or
10377ambiguities (forward vs. backward slashes, etc.).
10378@end enumerate
10379
10380Note: In Python 3.4, pathlib is now part of the standard library. For other
10381Python versions please consider python-pathlib2 instead, which tracks the
10382standard library module. This module (python-pathlib) isn't maintained
10383anymore.")
10384 (license license:expat)))
10385
10386(define-public python2-pathlib
10387 (package-with-python2 python-pathlib))
10388
10389(define-public python2-pathlib2
10390 (package
10391 (name "python2-pathlib2")
10392 (version "2.3.3")
10393 (source (origin
10394 (method url-fetch)
10395 (uri (pypi-uri "pathlib2" version))
10396 (sha256
10397 (base32
10398 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
10399 (build-system python-build-system)
10400 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10401 ;; version is 3.4 which already includes this package as part of the
10402 ;; standard library.
10403 (arguments
10404 `(#:python ,python-2))
10405 (propagated-inputs
10406 `(("python2-scandir" ,python2-scandir)
10407 ("python2-six" ,python2-six)))
10408 (home-page "https://pypi.org/project/pathlib2/")
10409 (synopsis "Object-oriented file system paths - backport of standard
10410pathlib module")
10411 (description "The goal of pathlib2 is to provide a backport of standard
10412pathlib module which tracks the standard library module, so all the newest
10413features of the standard pathlib can be used also on older Python versions.
10414
10415Pathlib offers a set of classes to handle file system paths. It offers the
10416following advantages over using string objects:
10417
10418@enumerate
10419@item No more cumbersome use of os and os.path functions. Everything can
10420be done easily through operators, attribute accesses, and method calls.
10421@item Embodies the semantics of different path types. For example,
10422comparing Windows paths ignores casing.
10423@item Well-defined semantics, eliminating any inconsistencies or
10424ambiguities (forward vs. backward slashes, etc.).
10425@end enumerate")
10426 (license license:expat)))
10427
10428(define-public python2-pathlib2-bootstrap
10429 (hidden-package
10430 (package
10431 (inherit python2-pathlib2)
10432 (name "python2-pathlib2-bootstrap")
10433 (propagated-inputs
10434 `(("python2-scandir" ,python2-scandir)
10435 ("python2-six" ,python2-six-bootstrap))))))
10436
10437(define-public python-jellyfish
10438 (package
10439 (name "python-jellyfish")
10440 (version "0.5.6")
10441 (source (origin
10442 (method url-fetch)
10443 (uri (pypi-uri "jellyfish" version))
10444 (sha256
10445 (base32
10446 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10447 (build-system python-build-system)
10448 (native-inputs
10449 `(("python-pytest" ,python-pytest)))
10450 (home-page "https://github.com/jamesturk/jellyfish")
10451 (synopsis "Approximate and phonetic matching of strings")
10452 (description "Jellyfish uses a variety of string comparison and phonetic
10453encoding algorithms to do fuzzy string matching.")
10454 (license license:bsd-2)
10455 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10456
10457(define-public python2-jellyfish
10458 (let ((jellyfish (package-with-python2
10459 (strip-python2-variant python-jellyfish))))
10460 (package (inherit jellyfish)
10461 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10462 ,@(package-native-inputs jellyfish))))))
10463
10464(define-public python2-unicodecsv
10465 (package
10466 (name "python2-unicodecsv")
10467 (version "0.14.1")
10468 (source (origin
10469 (method git-fetch)
10470 ;; The test suite is not included in the PyPi release.
10471 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10472 (uri (git-reference
10473 (url "https://github.com/jdunck/python-unicodecsv")
10474 (commit version)))
10475 (file-name (git-file-name name version))
10476 (sha256
10477 (base32
10478 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
10479 (build-system python-build-system)
10480 (arguments
10481 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10482 #:python ,python-2))
10483 (native-inputs
10484 `(("python2-unittest2" ,python2-unittest2)))
10485 (home-page "https://github.com/jdunck/python-unicodecsv")
10486 (synopsis "Unicode CSV module for Python 2")
10487 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10488module, adding support for Unicode strings.")
10489 (license license:bsd-2)))
10490
10491(define-public python-rarfile
10492 (package
10493 (name "python-rarfile")
10494 (version "2.8")
10495 (source (origin
10496 (method url-fetch)
10497 (uri (pypi-uri "rarfile" version))
10498 (sha256
10499 (base32
10500 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10501 (build-system python-build-system)
10502 (arguments
10503 '(#:phases
10504 (modify-phases %standard-phases
10505 (replace 'check
10506 ;; Many tests fail, but the installation proceeds.
10507 (lambda _ (invoke "make" "-C" "test" "test"))))))
10508 (native-inputs
10509 `(("which" ,which))) ; required for tests
10510 (propagated-inputs
10511 `(("libarchive" ,libarchive)))
10512 (home-page "https://github.com/markokr/rarfile")
10513 (synopsis "RAR archive reader for Python")
10514 (description "This is Python module for RAR archive reading. The interface
10515is made as zipfile like as possible.")
10516 (license license:isc)))
10517
10518(define-public python2-rarfile
10519 (package-with-python2 python-rarfile))
10520
10521(define-public python-magic
10522 (package
10523 (name "python-magic")
10524 (version "0.4.15")
10525 (source
10526 (origin
10527 (method url-fetch)
10528 (uri (pypi-uri "python-magic" version))
10529 (sha256
10530 (base32
10531 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
10532 (file-name (string-append name "-" version "-checkout"))))
10533 (build-system python-build-system)
10534 (arguments
10535 ;; The tests are unreliable, so don't run them. The tests fail
10536 ;; under Python3 because they were written for Python2 and
10537 ;; contain import statements that do not work in Python3. One of
10538 ;; the tests fails under Python2 because its assertions are
10539 ;; overly stringent; it relies on comparing output strings which
10540 ;; are brittle and can change depending on the version of
10541 ;; libmagic being used and the system on which the test is
10542 ;; running. In my case, under GuixSD 0.10.0, only one test
10543 ;; failed, and it seems to have failed only because the version
10544 ;; of libmagic that is packaged in Guix outputs a slightly
10545 ;; different (but not wrong) string than the one that the test
10546 ;; expected.
10547 '(#:tests? #f
10548 #:phases (modify-phases %standard-phases
10549 ;; Replace a specific method call with a hard-coded
10550 ;; path to the necessary libmagic.so file in the
10551 ;; store. If we don't do this, then the method call
10552 ;; will fail to find the libmagic.so file, which in
10553 ;; turn will cause any application using
10554 ;; python-magic to fail.
10555 (add-before 'build 'hard-code-path-to-libmagic
10556 (lambda* (#:key inputs #:allow-other-keys)
10557 (let ((file (assoc-ref inputs "file")))
10558 (substitute* "magic.py"
10559 (("ctypes.util.find_library\\('magic'\\)")
10560 (string-append "'" file "/lib/libmagic.so'")))
10561 #t)))
10562 (add-before 'install 'disable-egg-compression
10563 (lambda _
10564 (let ((port (open-file "setup.cfg" "a")))
10565 (display "\n[easy_install]\nzip_ok = 0\n"
10566 port)
10567 (close-port port)
10568 #t))))))
10569 (inputs
10570 ;; python-magic needs to be able to find libmagic.so.
10571 `(("file" ,file)))
10572 (home-page
10573 "https://github.com/ahupp/python-magic")
10574 (synopsis
10575 "File type identification using libmagic")
10576 (description
10577 "This module uses ctypes to access the libmagic file type
10578identification library. It makes use of the local magic database and
10579supports both textual and MIME-type output. Note that this module and
10580the python-file module both provide a \"magic.py\" file; these two
10581modules, which are different and were developed separately, both serve
10582the same purpose: to provide Python bindings for libmagic.")
10583 (license license:expat)))
10584
10585(define-public python2-magic
10586 (package-with-python2 python-magic))
10587
10588(define-public python2-s3cmd
10589 (package
10590 (name "python2-s3cmd")
10591 (version "1.6.1")
10592 (source
10593 (origin
10594 (method url-fetch)
10595 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10596 "s3cmd-" version ".tar.gz"))
10597 (sha256
10598 (base32
10599 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10600 (build-system python-build-system)
10601 (arguments
10602 ;; s3cmd is written for python2 only and contains no tests.
10603 `(#:python ,python-2
10604 #:tests? #f))
10605 (propagated-inputs
10606 `(("python2-dateutil" ,python2-dateutil)
10607 ;; The python-file package also provides a magic.py module.
10608 ;; This is an unfortunate state of affairs; however, s3cmd
10609 ;; fails to install if it cannot find specifically the
10610 ;; python-magic package. Thus we include it, instead of using
10611 ;; python-file. Ironically, s3cmd sometimes works better
10612 ;; without libmagic bindings at all:
10613 ;; https://github.com/s3tools/s3cmd/issues/198
10614 ("python2-magic" ,python2-magic)))
10615 (home-page "https://s3tools.org/s3cmd")
10616 (synopsis "Command line tool for S3-compatible storage services")
10617 (description
10618 "S3cmd is a command line tool for uploading, retrieving and managing data
10619in storage services that are compatible with the Amazon Simple Storage
10620Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10621GnuPG encryption, and more. It also supports management of Amazon's
10622CloudFront content delivery network.")
10623 (license license:gpl2+)))
10624
10625(define-public python-pkgconfig
10626 (package
10627 (name "python-pkgconfig")
10628 (version "1.3.1")
10629 (source
10630 (origin
10631 (method url-fetch)
10632 (uri (pypi-uri "pkgconfig" version))
10633 (sha256
10634 (base32
10635 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10636 (build-system python-build-system)
10637 (native-inputs
10638 `(("python-nose" ,python-nose)))
10639 (inputs
10640 `(("pkg-config" ,pkg-config)))
10641 (arguments
10642 `(#:phases
10643 (modify-phases %standard-phases
10644 (add-before 'build 'patch
10645 ;; Hard-code the path to pkg-config.
10646 (lambda _
10647 (substitute* "pkgconfig/pkgconfig.py"
10648 (("cmd = 'pkg-config")
10649 (string-append "cmd = '" (which "pkg-config"))))
10650 #t))
10651 (replace 'check
10652 (lambda _
10653 (invoke "nosetests" "test.py"))))))
10654 (home-page "https://github.com/matze/pkgconfig")
10655 (synopsis "Python interface for pkg-config")
10656 (description "This module provides a Python interface to pkg-config. It
10657can be used to find all pkg-config packages, check if a package exists,
10658check if a package meets certain version requirements, query CFLAGS and
10659LDFLAGS and parse the output to build extensions with setup.py.")
10660 (license license:expat)))
10661
10662(define-public python2-pkgconfig
10663 (package-with-python2 python-pkgconfig))
10664
10665(define-public python-bz2file
10666 (package
10667 (name "python-bz2file")
10668 (version "0.98")
10669 (source
10670 (origin
10671 (method url-fetch)
10672 (uri (pypi-uri "bz2file" version))
10673 (sha256
10674 (base32
10675 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10676 (build-system python-build-system)
10677 (arguments
10678 `(#:tests? #f)) ; Tests use deprecated python modules.
10679 (home-page "https://github.com/nvawda/bz2file")
10680 (synopsis "Read and write bzip2-compressed files")
10681 (description
10682 "Bz2file is a Python library for reading and writing bzip2-compressed
10683files. It contains a drop-in replacement for the I/O interface in the
10684standard library's @code{bz2} module, including features from the latest
10685development version of CPython that are not available in older releases.")
10686 (license license:asl2.0)))
10687
10688(define-public python2-bz2file
10689 (package-with-python2 python-bz2file))
10690
10691(define-public python-future
10692 (package
10693 (name "python-future")
10694 (version "0.17.1")
10695 (source
10696 (origin
10697 (method url-fetch)
10698 (uri (pypi-uri "future" version))
10699 (sha256
10700 (base32
10701 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
10702 (build-system python-build-system)
10703 ;; Many tests connect to the network or are otherwise flawed.
10704 ;; https://github.com/PythonCharmers/python-future/issues/210
10705 (arguments
10706 `(#:tests? #f))
10707 (home-page "https://python-future.org")
10708 (synopsis "Single-source support for Python 3 and 2")
10709 (description
10710 "@code{python-future} is the missing compatibility layer between Python 2 and
10711Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10712to support both Python 2 and Python 3 with minimal overhead.")
10713 (license license:expat)))
10714
10715(define-public python2-future
10716 (package-with-python2 python-future))
10717
10718(define-public python-cysignals
10719 (package
10720 (name "python-cysignals")
10721 (version "1.9.0")
10722 (source
10723 (origin
10724 (method url-fetch)
10725 (uri (pypi-uri "cysignals" version))
10726 (sha256
10727 (base32
10728 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
10729 (build-system python-build-system)
10730 (native-inputs
10731 `(("python-cython" ,python-cython)
10732 ("python-sphinx" ,python-sphinx)))
10733 (inputs
10734 `(("pari-gp" ,pari-gp)))
10735 (arguments
10736 `(#:modules ((guix build python-build-system)
10737 ((guix build gnu-build-system) #:prefix gnu:)
10738 (guix build utils))
10739 ;; FIXME: Tests are executed after installation and currently fail
10740 ;; when not installing into standard locations; the author is working
10741 ;; on a fix.
10742 #:tests? #f
10743 #:phases
10744 (modify-phases %standard-phases
10745 (add-before
10746 'build 'configure
10747 (assoc-ref gnu:%standard-phases 'configure)))))
10748 (home-page
10749 "https://github.com/sagemath/cysignals")
10750 (synopsis
10751 "Handling of interrupts and signals for Cython")
10752 (description
10753 "The cysignals package provides mechanisms to handle interrupts (and
10754other signals and errors) in Cython code, using two related approaches,
10755for mixed Cython/Python code or external C libraries and pure Cython code,
10756respectively.")
10757 (license license:lgpl3+)))
10758
10759(define-public python2-cysignals
10760 (package-with-python2 python-cysignals))
10761
10762(define-public python2-shedskin
10763 (package
10764 (name "python2-shedskin")
10765 (version "0.9.4")
10766 (source
10767 (origin
10768 (method url-fetch)
10769 (uri (string-append "https://github.com/shedskin/shedskin/"
10770 "releases/download/v" version
10771 "/shedskin-" version ".tgz"))
10772 (sha256
10773 (base32
10774 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10775 (build-system python-build-system)
10776 (arguments
10777 `(#:python ,python-2
10778 #:phases (modify-phases %standard-phases
10779 (add-after 'unpack 'fix-resulting-include-libs
10780 (lambda* (#:key inputs #:allow-other-keys)
10781 (let ((libgc (assoc-ref inputs "libgc"))
10782 (pcre (assoc-ref inputs "pcre")))
10783 (substitute* "shedskin/makefile.py"
10784 (("variable == 'CCFLAGS':[ ]*")
10785 (string-append "variable == 'CCFLAGS':\n"
10786 " line += ' -I " pcre "/include"
10787 " -I " libgc "/include'"))
10788 (("variable == 'LFLAGS':[ ]*")
10789 (string-append "variable == 'LFLAGS':\n"
10790 " line += ' -L" pcre "/lib"
10791 " -L " libgc "/lib'")))
10792 #t))))))
10793 (inputs `(("pcre" ,pcre)
10794 ("libgc" ,libgc)))
10795 (home-page "https://shedskin.github.io/")
10796 (synopsis "Experimental Python-2 to C++ Compiler")
10797 (description (string-append "This is an experimental compiler for a subset of
10798Python. It generates C++ code and a Makefile."))
10799 (license (list license:gpl3 license:bsd-3 license:expat))))
10800
10801(define-public python2-rope
10802 (package
10803 (name "python2-rope")
10804 (version "0.11.0")
10805 (source
10806 (origin
10807 (method url-fetch)
10808 (uri (pypi-uri "rope" version))
10809 (sha256
10810 (base32
10811 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10812 (arguments
10813 ;; Rope has only partial python3 support, see `python-rope'
10814 `(#:python ,python-2))
10815 (build-system python-build-system)
10816 (native-inputs
10817 `(("python2-unittest2" ,python2-unittest2)))
10818 (home-page "https://github.com/python-rope/rope")
10819 (synopsis "Refactoring library for Python")
10820 (description "Rope is a refactoring library for Python. It facilitates
10821the renaming, moving and extracting of attributes, functions, modules, fields
10822and parameters in Python 2 source code. These refactorings can also be applied
10823to occurrences in strings and comments.")
10824 (license license:gpl2)))
10825
10826(define-public python-rope
10827 (package
10828 (inherit python2-rope)
10829 (name "python-rope")
10830 (arguments `(#:python ,python-wrapper
10831 ;; XXX: Only partial python3 support, results in some failing
10832 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10833 #:tests? #f))
10834 (properties `((python2-variant . ,(delay python2-rope))))))
10835
10836(define-public python-py3status
10837 (package
10838 (name "python-py3status")
10839 (version "3.21")
10840 (source
10841 (origin
10842 (method url-fetch)
10843 (uri (pypi-uri "py3status" version))
10844 (sha256
10845 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10846 (build-system python-build-system)
10847 (inputs
10848 `(("file" ,file)))
10849 (arguments
10850 '(#:phases
10851 (modify-phases %standard-phases
10852 ;; 'file' is used for detection of configuration file encoding
10853 ;; let's make link the dependency to particular input
10854 (add-before 'build 'patch-file-path
10855 (lambda* (#:key inputs #:allow-other-keys)
10856 (let ((file-path (assoc-ref inputs "file")))
10857 (substitute* "py3status/parse_config.py"
10858 (("\\[\"file\", \"-b\"")
10859 (string-append "['" file-path "/bin/file', '-b'")))
10860 #t))))
10861 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10862 (home-page "https://github.com/ultrabug/py3status")
10863 (synopsis "Extensible i3status wrapper written in Python")
10864 (description "py3status is an i3status wrapper which extends i3status
10865functionality in a modular way, allowing you to extend your panel with your
10866own code, responding to click events and updating clock every second.")
10867 (license license:bsd-3)))
10868
10869(define-public python-tblib
10870 (package
10871 (name "python-tblib")
10872 (version "1.6.0")
10873 (source (origin
10874 (method url-fetch)
10875 (uri (pypi-uri "tblib" version))
10876 (sha256
10877 (base32
10878 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
10879 (build-system python-build-system)
10880 (arguments
10881 `(#:phases
10882 (modify-phases %standard-phases
10883 (replace 'check
10884 (lambda _
10885 ;; Upstream runs tests after installation and the package itself
10886 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10887 ;; found.
10888 (setenv "PYTHONPATH"
10889 (string-append (getcwd) "/build/lib:"
10890 (getenv "PYTHONPATH")))
10891 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10892 (native-inputs
10893 `(("python-pytest" ,python-pytest)
10894 ("python-six" ,python-six)))
10895 (home-page "https://github.com/ionelmc/python-tblib")
10896 (synopsis "Traceback serialization library")
10897 (description
10898 "Traceback serialization allows you to:
10899
10900@enumerate
10901@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10902different processes. This allows better error handling when running code over
10903multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10904
10905@item Parse traceback strings and raise with the parsed tracebacks.
10906@end enumerate\n")
10907 (license license:bsd-3)))
10908
10909(define-public python2-tblib
10910 (package-with-python2 python-tblib))
10911
10912(define-public python-greenlet
10913 (package
10914 (name "python-greenlet")
10915 (version "0.4.15")
10916 (source (origin
10917 (method url-fetch)
10918 (uri (pypi-uri "greenlet" version))
10919 (sha256
10920 (base32
10921 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10922 (build-system python-build-system)
10923 (home-page "https://greenlet.readthedocs.io/")
10924 (synopsis "Lightweight in-process concurrent programming")
10925 (description
10926 "Greenlet package is a spin-off of Stackless, a version of CPython
10927that supports micro-threads called \"tasklets\". Tasklets run
10928pseudo-concurrently (typically in a single or a few OS-level threads) and
10929are synchronized with data exchanges on \"channels\".")
10930 (license (list license:psfl license:expat))))
10931
10932(define-public python2-greenlet
10933 (package-with-python2 python-greenlet))
10934
10935(define-public python-objgraph
10936 (package
10937 (name "python-objgraph")
10938 (version "3.4.1")
10939 (source
10940 (origin
10941 (method url-fetch)
10942 (uri (pypi-uri "objgraph" version))
10943 (sha256
10944 (base32
10945 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
10946 (build-system python-build-system)
10947 (propagated-inputs
10948 `(("python-graphviz" ,python-graphviz)))
10949 (native-inputs
10950 `(("python-mock" ,python-mock)
10951 ("graphviz" ,graphviz)))
10952 (home-page "https://mg.pov.lt/objgraph/")
10953 (synopsis "Draw Python object reference graphs with graphviz")
10954 (description
10955 "This package provides tools to draw Python object reference graphs with
10956graphviz.")
10957 (license license:expat)))
10958
10959(define-public python2-objgraph
10960 (package-with-python2 python-objgraph))
10961
10962(define-public python-gevent
10963 (package
10964 (name "python-gevent")
10965 (version "1.4.0")
10966 (source (origin
10967 (method url-fetch)
10968 (uri (pypi-uri "gevent" version))
10969 (sha256
10970 (base32
10971 "1lchr4akw2jkm5v4kz7bdm4wv3knkfhbfn9vkkz4s5yrkcxzmdqy"))
10972 (modules '((guix build utils)))
10973 (snippet
10974 '(begin
10975 ;; unbunding libev and c-ares
10976 (delete-file-recursively "deps")
10977 #t))))
10978 (build-system python-build-system)
10979 (arguments
10980 `(#:modules ((ice-9 ftw)
10981 (ice-9 match)
10982 (srfi srfi-26)
10983 (guix build utils)
10984 (guix build python-build-system))
10985 #:phases (modify-phases %standard-phases
10986 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10987 (lambda _
10988 (substitute* "src/gevent/subprocess.py"
10989 (("/bin/sh") (which "sh")))
10990 (for-each (lambda (file)
10991 (substitute* file
10992 (("/bin/sh") (which "sh"))
10993 (("/bin/true") (which "true"))))
10994 (find-files "src/greentest" "\\.py$"))
10995 #t))
10996 (add-before 'build 'do-not-use-bundled-sources
10997 (lambda* (#:key inputs #:allow-other-keys)
10998 (setenv "GEVENTSETUP_EMBED" "0")
10999
11000 ;; Prevent building bundled libev.
11001 (substitute* "setup.py"
11002 (("run_make=_BUILDING")
11003 "run_make=False"))
11004
11005 (let ((greenlet (string-append
11006 (assoc-ref inputs "python-greenlet")
11007 "/include")))
11008 (match (scandir greenlet
11009 (lambda (item)
11010 (string-prefix? "python" item)))
11011 ((python)
11012 (setenv "C_INCLUDE_PATH"
11013 (string-append greenlet "/" python ":"
11014 (or (getenv "C_INCLUDE_PATH")
11015 ""))))))
11016 #t))
11017 (add-before 'check 'pretend-to-be-CI
11018 (lambda _
11019 ;; A few tests are skipped due to network constraints or
11020 ;; get longer timeouts when running in a CI environment.
11021 ;; Piggy-back on that, as we need the same adjustments.
11022 (setenv "TRAVIS" "1")
11023 (setenv "APPVEYOR" "1")
11024 #t))
11025 (add-before 'check 'adjust-tests
11026 (lambda _
11027 (let ((disabled-tests
11028 '(;; These tests rely on networking which is not
11029 ;; available in the build container.
11030 "test_urllib2net.py"
11031 "test__server.py"
11032 "test__server_pywsgi.py"
11033 "test_socket.py"
11034 "test__socket.py"
11035 "test__socket_ssl.py"
11036 "test__socket_dns.py"
11037 "test__socket_dns6.py"
11038 "test___example_servers.py"
11039 "test__getaddrinfo_import.py"
11040 "test__examples.py"
11041 "test_httplib.py"
11042 "test_https.py"
11043 "test_urllib2_localnet.py"
11044 "test_ssl.py"
11045 "test__ssl.py"
11046 ;; XXX: These tests borrow functionality from the
11047 ;; Python builtin 'test' module, but it is not
11048 ;; installed with the Guix Python distribution.
11049 "test_smtpd.py"
11050 "test_wsgiref.py"
11051 "test_urllib2.py"
11052 "test_thread.py"
11053 "test_threading.py"
11054 "test__threading_2.py"
11055 ;; FIXME: test_patch_twice_warning_events fails for
11056 ;; no apparent reason. Needs more investigation!
11057 "test__monkey.py"
11058 ;; These tests rely on KeyboardInterrupts which do not
11059 ;; work inside the build container for some reason
11060 ;; (lack of controlling terminal?).
11061 "test_subprocess.py"
11062 "test__issues461_471.py"
11063 ;; TODO: Patch out the tests that use getprotobyname, etc
11064 ;; instead of disabling all the tests from these files.
11065 "test__all__.py"
11066 "test___config.py"
11067 "test__execmodules.py")))
11068 (call-with-output-file "skipped_tests.txt"
11069 (lambda (port)
11070 (display (string-join disabled-tests "\n") port)))
11071 #t)))
11072 (replace 'check
11073 (lambda _
11074 ;; Make sure the build directory is on PYTHONPATH.
11075 (setenv "PYTHONPATH"
11076 (string-append
11077 (getenv "PYTHONPATH") ":"
11078 (getcwd) "/build/"
11079 (car (scandir "build" (cut string-prefix? "lib." <>)))))
11080
11081 ;; Use the build daemons configured number of workers.
11082 (setenv "NWORKERS" (number->string (parallel-job-count)))
11083
11084 (invoke "python" "-m" "gevent.tests" "--config"
11085 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
11086 (propagated-inputs
11087 `(("python-greenlet" ,python-greenlet)
11088 ("python-objgraph" ,python-objgraph)))
11089 (native-inputs
11090 `(("python-six" ,python-six)
11091
11092 ;; For tests.
11093 ("python-dnspython" ,python-dnspython)
11094 ("python-psutil" ,python-psutil)
11095 ("python-zope.event" ,python-zope-event)
11096 ("python-zope.interface" ,python-zope-interface)))
11097 (inputs
11098 `(("c-ares" ,c-ares)
11099 ("libev" ,libev)))
11100 (home-page "http://www.gevent.org/")
11101 (synopsis "Coroutine-based network library")
11102 (description
11103 "gevent is a coroutine-based Python networking library that uses greenlet
11104to provide a high-level synchronous API on top of the libev event loop.")
11105 (license license:expat)
11106 (properties `((python2-variant . ,(delay python2-gevent))))))
11107
11108(define-public python2-gevent
11109 (let ((base (package-with-python2
11110 (strip-python2-variant python-gevent))))
11111 (package
11112 (inherit base)
11113 (native-inputs `(,@(package-native-inputs base)
11114 ("python-mock" ,python2-mock))))))
11115
11116(define-public python-fastimport
11117 (package
11118 (name "python-fastimport")
11119 (version "0.9.6")
11120 (source
11121 (origin
11122 (method url-fetch)
11123 (uri (pypi-uri "fastimport" version))
11124 (sha256
11125 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11126 (build-system python-build-system)
11127 (home-page "https://github.com/jelmer/python-fastimport")
11128 (synopsis "VCS fastimport parser and generator in Python")
11129 (description "This package provides a parser for and generator of the Git
11130@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11131format.")
11132 (license license:gpl2+)))
11133
11134(define-public python2-fastimport
11135 (package-with-python2 python-fastimport))
11136
11137(define-public python-twisted
11138 (package
11139 (name "python-twisted")
11140 (version "19.7.0")
11141 (source (origin
11142 (method url-fetch)
11143 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11144 (sha256
11145 (base32
11146 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
11147 (build-system python-build-system)
11148 (arguments
11149 '(#:tests? #f)) ; FIXME: some tests fail
11150 (propagated-inputs
11151 `(("python-zope-interface" ,python-zope-interface)
11152 ("python-pyhamcrest" ,python-pyhamcrest)
11153 ("python-incremental" ,python-incremental)
11154 ("python-hyperlink" ,python-hyperlink)
11155 ("python-constantly" ,python-constantly)
11156 ("python-automat" ,python-automat)))
11157 (home-page "https://twistedmatrix.com/")
11158 (synopsis "Asynchronous networking framework written in Python")
11159 (description
11160 "Twisted is an extensible framework for Python programming, with special
11161focus on event-based network programming and multiprotocol integration.")
11162 (license license:expat)))
11163
11164(define-public python2-twisted
11165 (package-with-python2 python-twisted))
11166
11167(define-public python-pika
11168 (package
11169 (name "python-pika")
11170 (version "0.12.0")
11171 (source
11172 (origin
11173 (method url-fetch)
11174 (uri (pypi-uri "pika" version))
11175 (sha256
11176 (base32
11177 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
11178 (build-system python-build-system)
11179 (native-inputs
11180 `(("python-pyev" ,python-pyev)
11181 ("python-tornado" ,python-tornado)
11182 ("python-twisted" ,python-twisted)))
11183 (home-page "https://pika.readthedocs.org")
11184 (synopsis "Pure Python AMQP Client Library")
11185 (description
11186 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11187Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11188network support library.")
11189 (license license:bsd-3)))
11190
11191(define-public python2-pika
11192 (package-with-python2 python-pika))
11193
11194(define-public python-ply
11195 (package
11196 (name "python-ply")
11197 (version "3.10")
11198 (source
11199 (origin
11200 (method url-fetch)
11201 (uri (pypi-uri "ply" version))
11202 (sha256
11203 (base32
11204 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
11205 (build-system python-build-system)
11206 (home-page "http://www.dabeaz.com/ply/")
11207 (synopsis "Python Lex & Yacc")
11208 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11209It uses LR parsing and does extensive error checking.")
11210 (license license:bsd-3)))
11211
11212(define-public python2-ply
11213 (package-with-python2 python-ply))
11214
11215(define-public python-tabulate
11216 (package
11217 (name "python-tabulate")
11218 (version "0.7.7")
11219 (source (origin
11220 (method url-fetch)
11221 (uri (pypi-uri "tabulate" version))
11222 (sha256
11223 (base32
11224 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11225 (build-system python-build-system)
11226 (arguments
11227 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11228 ;; and the latest release is not tagged in the upstream repository.
11229 '(#:tests? #f))
11230 (home-page "https://bitbucket.org/astanin/python-tabulate")
11231 (synopsis "Pretty-print tabular data")
11232 (description
11233 "Tabulate is a library and command-line utility to pretty-print tabular
11234data in Python.")
11235 (license license:expat)))
11236
11237(define-public python2-tabulate
11238 (package-with-python2 python-tabulate))
11239
11240(define-public python-kazoo
11241 (package
11242 (name "python-kazoo")
11243 (version "2.4.0")
11244 (source
11245 (origin
11246 (method url-fetch)
11247 (uri (pypi-uri "kazoo" version))
11248 (sha256
11249 (base32
11250 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
11251 (build-system python-build-system)
11252 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11253 (propagated-inputs
11254 `(("python-six" ,python-six)))
11255 (home-page "https://kazoo.readthedocs.org")
11256 (synopsis "High-level Zookeeper client library")
11257 (description
11258 "Kazoo is a Python client library for the Apache Zookeeper distributed
11259application service. It is designed to be easy to use and to avoid common
11260programming errors.")
11261 (license license:asl2.0)))
11262
11263(define-public python2-kazoo
11264 (package-with-python2 python-kazoo))
11265
11266(define-public python-pykafka
11267 (package
11268 (name "python-pykafka")
11269 (version "2.4.0")
11270 (source (origin
11271 (method url-fetch)
11272 (uri (pypi-uri "pykafka" version))
11273 (sha256
11274 (base32
11275 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11276 (build-system python-build-system)
11277 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11278 (propagated-inputs
11279 `(("python-gevent" ,python-gevent)
11280 ("python-kazoo" ,python-kazoo)
11281 ("python-tabulate" ,python-tabulate)))
11282 (inputs
11283 `(("librdkafka" ,librdkafka)))
11284 (home-page "https://pykafka.readthedocs.io/")
11285 (synopsis "Apache Kafka client for Python")
11286 (description
11287 "PyKafka is a client for the Apache Kafka distributed messaging system.
11288It includes Python implementations of Kafka producers and consumers, which
11289are optionally backed by a C extension built on librdkafka.")
11290 (license license:asl2.0)))
11291
11292(define-public python2-pykafka
11293 (package-with-python2 python-pykafka))
11294
11295(define-public python-wcwidth
11296 (package
11297 (name "python-wcwidth")
11298 (version "0.1.8")
11299 (source (origin
11300 (method url-fetch)
11301 (uri (pypi-uri "wcwidth" version))
11302 (sha256
11303 (base32
11304 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
11305 (build-system python-build-system)
11306 (home-page "https://github.com/jquast/wcwidth")
11307 (synopsis "Measure number of terminal column cells of wide-character codes")
11308 (description "Wcwidth measures the number of terminal column cells of
11309wide-character codes. It is useful for those implementing a terminal emulator,
11310or programs that carefully produce output to be interpreted by one. It is a
11311Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11312specified in POSIX.1-2001 and POSIX.1-2008.")
11313 (license license:expat)))
11314
11315(define-public python2-wcwidth
11316 (package-with-python2 python-wcwidth))
11317
11318(define-public python2-jsonrpclib
11319 (package
11320 (name "python2-jsonrpclib")
11321 (version "0.1.7")
11322 (source (origin
11323 (method url-fetch)
11324 (uri (pypi-uri "jsonrpclib" version))
11325 (sha256
11326 (base32
11327 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11328 (build-system python-build-system)
11329 (arguments
11330 `(#:tests? #f
11331 #:python ,python-2))
11332 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11333 (synopsis "Implementation of JSON-RPC specification for Python")
11334 (description
11335 "This library is an implementation of the JSON-RPC specification.
11336It supports both the original 1.0 specification, as well as the
11337new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11338etc.")
11339 (license license:asl2.0)))
11340
11341(define-public python-chai
11342 (package
11343 (name "python-chai")
11344 (version "1.1.2")
11345 (source (origin
11346 (method url-fetch)
11347 (uri (pypi-uri "chai" version))
11348 (sha256
11349 (base32
11350 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
11351 (build-system python-build-system)
11352 (home-page "https://github.com/agoragames/chai")
11353 (synopsis "Mocking framework for Python")
11354 (description
11355 "Chai provides an api for mocking, stubbing and spying your python
11356objects, patterned after the Mocha library for Ruby.")
11357 (license license:bsd-3)))
11358
11359(define-public python2-chai
11360 (package-with-python2 python-chai))
11361
11362(define-public python-inflection
11363 (package
11364 (name "python-inflection")
11365 (version "0.3.1")
11366 (source
11367 (origin (method url-fetch)
11368 (uri (pypi-uri "inflection" version))
11369 (sha256
11370 (base32
11371 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11372 (build-system python-build-system)
11373 (native-inputs
11374 `(("python-pytest" ,python-pytest)))
11375 (home-page "https://github.com/jpvanhal/inflection")
11376 (synopsis "Python string transformation library")
11377 (description
11378 "Inflection is a string transformation library. It singularizes
11379and pluralizes English words, and transforms strings from CamelCase to
11380underscored string.")
11381 (license license:expat)))
11382
11383(define-public python2-inflection
11384 (package-with-python2 python-inflection))
11385
11386(define-public python-pylev
11387 (package
11388 (name "python-pylev")
11389 (version "1.3.0")
11390 (source (origin
11391 (method url-fetch)
11392 (uri (pypi-uri "pylev" version))
11393 (sha256
11394 (base32
11395 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11396 (build-system python-build-system)
11397 (home-page "https://github.com/toastdriven/pylev")
11398 (synopsis "Levenshtein distance implementation in Python")
11399 (description "Pure Python Levenshtein implementation, based off the
11400Wikipedia code samples at
11401@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11402 (license license:bsd-3)))
11403
11404(define-public python2-pylev
11405 (package-with-python2 python-pylev))
11406
11407(define-public python-cleo
11408 (package
11409 (name "python-cleo")
11410 (version "0.7.6")
11411 (source (origin
11412 (method url-fetch)
11413 (uri (pypi-uri "cleo" version))
11414 (sha256
11415 (base32
11416 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
11417 (build-system python-build-system)
11418 (native-inputs
11419 `( ;; For testing
11420 ("python-mock" ,python-mock)
11421 ("python-pytest-mock" ,python-pytest-mock)
11422 ("python-pytest" ,python-pytest)))
11423 (propagated-inputs
11424 `(("python-backpack" ,python-backpack)
11425 ("python-clikit" ,python-clikit)
11426 ("python-pastel" ,python-pastel)
11427 ("python-pylev" ,python-pylev)))
11428 (home-page "https://github.com/sdispater/cleo")
11429 (synopsis "Command-line arguments library for Python")
11430 (description
11431 "Cleo allows you to create command-line commands with signature in
11432docstring and colored output.")
11433 (license license:expat)))
11434
11435(define-public python2-cleo
11436 (package-with-python2 python-cleo))
11437
11438(define-public python-tomlkit
11439 (package
11440 (name "python-tomlkit")
11441 (version "0.5.11")
11442 (source
11443 (origin
11444 (method url-fetch)
11445 (uri (pypi-uri "tomlkit" version))
11446 (sha256
11447 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
11448 (build-system python-build-system)
11449 (native-inputs
11450 `(("python-pytest" ,python-pytest)))
11451 (home-page "https://github.com/sdispater/tomlkit")
11452 (synopsis "Style-preserving TOML library")
11453 (description
11454 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11455preserves all comments, indentations, whitespace and internal element ordering,
11456and makes them accessible and editable via an intuitive API. It can also
11457create new TOML documents from scratch using the provided helpers. Part of the
11458implementation has been adapted, improved, and fixed from Molten.")
11459 (license license:expat)))
11460
11461(define-public python-shellingham
11462 (package
11463 (name "python-shellingham")
11464 (version "1.3.1")
11465 (source
11466 (origin
11467 (method url-fetch)
11468 (uri (pypi-uri "shellingham" version))
11469 (sha256
11470 (base32
11471 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
11472 (build-system python-build-system)
11473 (home-page
11474 "https://github.com/sarugaku/shellingham")
11475 (synopsis "Tool to detect surrounding shell")
11476 (description
11477 "Shellingham detects what shell the current Python executable is
11478running in.")
11479 (license license:isc)))
11480
11481(define-public python-memcached
11482 (package
11483 (name "python-memcached")
11484 (version "1.59")
11485 (source
11486 (origin
11487 (method url-fetch)
11488 (uri (pypi-uri "python-memcached" version))
11489 (sha256
11490 (base32
11491 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
11492 (build-system python-build-system)
11493 (propagated-inputs `(("python-six" ,python-six)))
11494 (home-page
11495 "https://github.com/linsomniac/python-memcached")
11496 (synopsis "Pure python memcached client")
11497 (description
11498 "This software is a pure Python interface to the memcached memory cache
11499daemon. It is the client side software which allows storing values in one or
11500more, possibly remote, memcached servers.")
11501 (license license:psfl)))
11502
11503(define-public python-clikit
11504 (package
11505 (name "python-clikit")
11506 (version "0.4.2")
11507 (source
11508 (origin
11509 (method url-fetch)
11510 (uri (pypi-uri "clikit" version))
11511 (sha256
11512 (base32
11513 "1jnnr21hvzx4i29nbph1z96ympv0njiwyvngjq48w1q05133cwzn"))))
11514 (build-system python-build-system)
11515 (propagated-inputs
11516 `(("python-pastel" ,python-pastel)
11517 ("python-pylev" ,python-pylev)))
11518 (home-page "https://github.com/sdispater/clikit")
11519 (synopsis "Group of utilities to build command line interfaces")
11520 (description
11521 "CliKit is a group of utilities to build testable command line
11522interfaces.")
11523 (properties `((python2-variant . ,(delay python2-clikit))))
11524 (license license:expat)))
11525
11526(define-public python2-clikit
11527 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
11528 (package/inherit
11529 base
11530 (propagated-inputs
11531 `(("python-enum34" ,python2-enum34)
11532 ("python-typing" ,python2-typing)
11533 ,@(package-propagated-inputs base))))))
11534
11535(define-public python-msgpack-python
11536 (package
11537 (name "python-msgpack-python")
11538 (version "0.5.6")
11539 (source
11540 (origin
11541 (method url-fetch)
11542 (uri (pypi-uri "msgpack-python" version))
11543 (sha256
11544 (base32
11545 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
11546 (build-system python-build-system)
11547 (home-page "http://msgpack.org/")
11548 (synopsis "Package to deserialize messages in MessagePack binary format")
11549 (description
11550 "MessagePack is an efficient binary serialization format. It lets you
11551exchange data among multiple languages like JSON. But it's faster and
11552smaller. Small integers are encoded into a single byte, and typical short
11553strings require only one extra byte in addition to the strings themselves.")
11554 (license license:asl2.0)))
11555
11556(define-public python-cachy
11557 (package
11558 (name "python-cachy")
11559 (version "0.3.0")
11560 (source
11561 (origin
11562 (method url-fetch)
11563 (uri (pypi-uri "cachy" version))
11564 (sha256
11565 (base32
11566 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
11567 (build-system python-build-system)
11568 (arguments
11569 '(#:phases
11570 (modify-phases %standard-phases
11571 (replace 'check
11572 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
11573 "pytest"))))))
11574 (native-inputs
11575 `(("memcached" ,memcached)
11576 ("python-fakeredis" ,python-fakeredis)
11577 ("python-flexmock" ,python-flexmock)
11578 ("python-pifpaf" ,python-pifpaf)
11579 ("python-pytest" ,python-pytest)))
11580 (propagated-inputs
11581 `(("python-memcached" ,python-memcached)
11582 ("python-msgpack-python" ,python-msgpack-python)
11583 ("python-redis" ,python-redis)))
11584 (home-page "https://github.com/sdispater/cachy")
11585 (synopsis "Simple yet effective caching library")
11586 (description
11587 "Cachy provides a simple yet effective caching library. A simple but
11588powerful API: thread-safety; decorator syntax; support for memcached, redis,
11589database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
11590 (license license:expat)))
11591
11592(define-public poetry
11593 (package
11594 (name "poetry")
11595 (version "1.0.5")
11596 ;; Poetry can only be built from source with Poetry.
11597 (source
11598 (origin
11599 (method url-fetch)
11600 (uri (pypi-uri "poetry" version))
11601 (sha256
11602 (base32
11603 "02h387k0xssvv78yy82pcpknpq4w5ym2in1zl8cg9r5wljl5w6cf"))))
11604 (build-system python-build-system)
11605 (arguments
11606 `(#:tests? #f ;; Pypi does not have tests.
11607 #:phases
11608 (modify-phases %standard-phases
11609 (add-before 'build 'patch-setup-py
11610 (lambda _
11611 (substitute* "setup.py"
11612 ;; poetry won't update version as 21.0.0 relies on python > 3.6
11613 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
11614 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.16.0")
11615 (("importlib-metadata>=1.1.3,<1.2.0") "importlib-metadata>=1.1.3,<1.5.0"))
11616 #t)))))
11617 (propagated-inputs
11618 `(("python-cachecontrol" ,python-cachecontrol)
11619 ("python-cachy" ,python-cachy)
11620 ("python-cleo" ,python-cleo)
11621 ("python-clikit" ,python-clikit)
11622 ("python-html5lib" ,python-html5lib)
11623 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
11624 ("python-jsonschema" ,python-jsonschema)
11625 ("python-keyring" ,python-keyring)
11626 ("python-pexpect" ,python-pexpect)
11627 ("python-pkginfo" ,python-pkginfo)
11628 ("python-pyparsing" ,python-pyparsing)
11629 ("python-pyrsistent" ,python-pyrsistent)
11630 ("python-requests" ,python-requests)
11631 ("python-requests-toolbelt" ,python-requests-toolbelt)
11632 ("python-shellingham" ,python-shellingham)
11633 ("python-tomlkit" ,python-tomlkit)
11634 ("python-virtualenv" ,python-virtualenv)))
11635 (home-page "https://python-poetry.org")
11636 (synopsis "Python dependency management and packaging made easy")
11637 (description "Poetry is a tool for dependency management and packaging
11638in Python. It allows you to declare the libraries your project depends on and
11639it will manage (install/update) them for you.")
11640 (license license:expat)))
11641
11642(define-public python-lazy-object-proxy
11643 (package
11644 (name "python-lazy-object-proxy")
11645 (version "1.4.3")
11646 (source (origin
11647 (method url-fetch)
11648 (uri (pypi-uri "lazy-object-proxy" version))
11649 (sha256
11650 (base32
11651 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
11652 (native-inputs
11653 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
11654 (build-system python-build-system)
11655 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11656 (synopsis "Lazy object proxy for python")
11657 (description
11658 "Lazy object proxy is an object that wraps a callable but defers the call
11659until the object is actually required, and caches the result of said call.")
11660 (license license:bsd-2)))
11661
11662(define-public python2-lazy-object-proxy
11663 (package-with-python2 python-lazy-object-proxy))
11664
11665(define-public python-dnspython
11666 (package
11667 (name "python-dnspython")
11668 (version "1.15.0")
11669 (source (origin
11670 (method url-fetch)
11671 (uri (string-append "http://www.dnspython.org/kits/"
11672 version "/dnspython-" version ".tar.gz"))
11673 (sha256
11674 (base32
11675 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11676 (build-system python-build-system)
11677 (arguments '(#:tests? #f)) ; XXX: requires internet access
11678 (home-page "http://www.dnspython.org")
11679 (synopsis "DNS toolkit for Python")
11680 (description
11681 "dnspython is a DNS toolkit for Python. It supports almost all record
11682types. It can be used for queries, zone transfers, and dynamic updates.
11683It supports TSIG authenticated messages and EDNS0.")
11684 (license license:expat)))
11685
11686(define-public python2-dnspython
11687 (package-with-python2 python-dnspython))
11688
11689(define-public python-email-validator
11690 (package
11691 (name "python-email-validator")
11692 (version "1.0.2")
11693 (source
11694 (origin (method url-fetch)
11695 (uri (pypi-uri "email_validator" version))
11696 (sha256
11697 (base32
11698 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11699 (build-system python-build-system)
11700 (arguments
11701 '(#:phases
11702 (modify-phases %standard-phases
11703 (add-before 'build 'use-dnspython
11704 (lambda _
11705 (substitute* "setup.py"
11706 (("dnspython3") "dnspython"))
11707 #t)))))
11708 (propagated-inputs
11709 `(("python-dnspython" ,python-dnspython)
11710 ("python-idna" ,python-idna)))
11711 (home-page "https://github.com/JoshData/python-email-validator")
11712 (synopsis "Email address validation library for Python")
11713 (description
11714 "This library validates email address syntax and deliverability.")
11715 (license license:cc0)))
11716
11717(define-public python2-email-validator
11718 (package-with-python2 python-email-validator))
11719
11720(define-public python-ukpostcodeparser
11721 (package
11722 (name "python-ukpostcodeparser")
11723 (version "1.0.3")
11724 (source (origin
11725 (method url-fetch)
11726 (uri (pypi-uri "UkPostcodeParser" version))
11727 (sha256
11728 (base32
11729 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11730 (build-system python-build-system)
11731 (home-page "https://github.com/hamstah/ukpostcodeparser")
11732 (synopsis "UK Postcode parser for Python")
11733 (description
11734 "This library provides the @code{parse_uk_postcode} function for
11735parsing UK postcodes.")
11736 (license license:expat)))
11737
11738(define-public python2-ukpostcodeparser
11739 (package-with-python2 python-ukpostcodeparser))
11740
11741(define-public python-faker
11742 (package
11743 (name "python-faker")
11744 (version "4.0.2")
11745 (source (origin
11746 (method url-fetch)
11747 (uri (pypi-uri "Faker" version))
11748 (sha256
11749 (base32
11750 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
11751 (build-system python-build-system)
11752 (arguments
11753 '(#:phases
11754 (modify-phases %standard-phases
11755 (replace 'check
11756 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
11757 (native-inputs
11758 `(;; For testing
11759 ("python-freezegun" ,python-freezegun)
11760 ("python-pytest" ,python-pytest)
11761 ("python-random2" ,python-random2)
11762 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
11763 ("python-validators" ,python-validators)))
11764 (propagated-inputs
11765 `(("python-dateutil" ,python-dateutil)
11766 ("python-text-unidecode" ,python-text-unidecode)))
11767 (home-page "https://github.com/joke2k/faker")
11768 (synopsis "Python package that generates fake data")
11769 (description
11770 "Faker is a Python package that generates fake data such as names,
11771addresses, and phone numbers.")
11772 (license license:expat)
11773 (properties `((python2-variant . ,(delay python2-faker))))))
11774
11775;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
11776(define-public python2-faker
11777 (let ((base (package-with-python2 (strip-python2-variant
11778 python-faker))))
11779 (package
11780 (inherit base)
11781 (version "3.0.1")
11782 (source (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "Faker" version))
11785 (sha256
11786 (base32
11787 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
11788 (native-inputs
11789 `(("python-mock" ,python2-mock)
11790 ,@(package-native-inputs base)))
11791 (propagated-inputs
11792 `(("python2-ipaddress" ,python2-ipaddress)
11793 ("python2-six" ,python2-six)
11794 ,@(package-propagated-inputs base))))))
11795
11796(define-public python-pyaml
11797 (package
11798 (name "python-pyaml")
11799 (version "18.11.0")
11800 (source (origin
11801 (method url-fetch)
11802 (uri (pypi-uri "pyaml" version))
11803 (sha256
11804 (base32
11805 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11806 (build-system python-build-system)
11807 (native-inputs
11808 `(("python-unidecode" ,python-unidecode)))
11809 (propagated-inputs
11810 `(("python-pyyaml" ,python-pyyaml)))
11811 (home-page "https://github.com/mk-fg/pretty-yaml")
11812 (synopsis "YAML pretty-print library for Python")
11813 (description
11814 "pyaml is a PyYAML based python module to produce pretty and readable
11815YAML-serialized data.")
11816 (license license:wtfpl2)))
11817
11818(define-public python2-pyaml
11819 (package-with-python2 python-pyaml))
11820
11821(define-public python-backpack
11822 (package
11823 (name "python-backpack")
11824 (version "0.1")
11825 (source
11826 (origin
11827 (method url-fetch)
11828 (uri (pypi-uri "backpack" version))
11829 (sha256
11830 (base32
11831 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11832 (build-system python-build-system)
11833 (native-inputs
11834 `(("python-pytest" ,python-pytest)
11835 ("python-nose" ,python-nose)))
11836 (propagated-inputs
11837 `(("python-simplejson" ,python-simplejson)))
11838 (home-page "https://github.com/sdispater/backpack")
11839 (synopsis "Utilities for working with Python collections")
11840 (description "Backpack provides some useful utilities for working with
11841collections of data.")
11842 (license license:expat)))
11843
11844(define-public python2-backpack
11845 (package-with-python2 python-backpack))
11846
11847(define-public python-prompt-toolkit
11848 (package
11849 (name "python-prompt-toolkit")
11850 (version "2.0.7")
11851 (source
11852 (origin
11853 (method url-fetch)
11854 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11855 (sha256
11856 (base32
11857 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11858 (build-system python-build-system)
11859 (arguments
11860 `(#:phases
11861 (modify-phases %standard-phases
11862 (delete 'check)
11863 (add-after 'install 'post-install-check
11864 (lambda* (#:key inputs outputs #:allow-other-keys)
11865 ;; HOME is needed for the test
11866 ;; "test_pathcompleter_can_expanduser".
11867 (setenv "HOME" "/tmp")
11868 (add-installed-pythonpath inputs outputs)
11869 (invoke "py.test"))))))
11870 (propagated-inputs
11871 `(("python-wcwidth" ,python-wcwidth)
11872 ("python-six" ,python-six)
11873 ("python-pygments" ,python-pygments)))
11874 (native-inputs
11875 `(("python-pytest" ,python-pytest)))
11876 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11877 (synopsis "Library for building command line interfaces in Python")
11878 (description
11879 "Prompt-Toolkit is a library for building interactive command line
11880interfaces in Python. It's like GNU Readline but it also features syntax
11881highlighting while typing, out-of-the-box multi-line input editing, advanced
11882code completion, incremental search, support for Chinese double-width
11883characters, mouse support, and auto suggestions.")
11884 (license license:bsd-3)))
11885
11886(define-public python2-prompt-toolkit
11887 (package-with-python2 python-prompt-toolkit))
11888
11889(define-public python-prompt-toolkit-1
11890 (package (inherit python-prompt-toolkit)
11891 (version "1.0.15")
11892 (source
11893 (origin
11894 (method url-fetch)
11895 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11896 (sha256
11897 (base32
11898 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11899
11900(define-public python2-prompt-toolkit-1
11901 (package-with-python2 python-prompt-toolkit-1))
11902
11903(define-public python-jedi
11904 (package
11905 (name "python-jedi")
11906 (version "0.16.0")
11907 (source
11908 (origin
11909 (method url-fetch)
11910 (uri (pypi-uri "jedi" version))
11911 (patches (search-patches "python-jedi-deleted-variables.patch"))
11912 (sha256
11913 (base32
11914 "1mb5kmrk9bkc3kwzx02j62cdan1jqd92q1z7h7wi9d30jg5p3j6m"))))
11915 (build-system python-build-system)
11916 (arguments
11917 `(#:phases
11918 (modify-phases %standard-phases
11919 (replace 'check
11920 (lambda _
11921 (setenv "HOME" "/tmp")
11922 (invoke "python" "-m" "pytest"))))))
11923 (native-inputs
11924 `(("python-pytest" ,python-pytest)
11925 ("python-docopt" ,python-docopt)))
11926 (propagated-inputs
11927 `(("python-parso" ,python-parso)))
11928 (home-page "https://github.com/davidhalter/jedi")
11929 (synopsis "Autocompletion and static analysis library for Python")
11930 (description
11931 "Jedi is a static analysis tool for Python that can be used in Integrated
11932Development Environments (@dfn{IDE}s) and text editors. It understands Python
11933on a deeper level than many other static analysis frameworks for Python.
11934
11935Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11936well.")
11937 (license license:expat)))
11938
11939(define-public python2-jedi
11940 (package-with-python2 python-jedi))
11941
11942;; python-language-server requires 0.15 specifically. Remove once unused.
11943(define-public python-jedi-0.15
11944 (package
11945 (inherit python-jedi)
11946 (version "0.15.2")
11947 (source (origin
11948 (method url-fetch)
11949 (uri (pypi-uri "jedi" version))
11950 (sha256
11951 (base32
11952 "01zqasl690x1i6dq4mvh13pz0cw8i276xsivsrnn00x90iqm42g9"))))
11953 (propagated-inputs
11954 `(("python-parso" ,python-parso-0.5)))))
11955
11956(define-public ptpython
11957 (package
11958 (name "ptpython")
11959 (version "0.34")
11960 (source (origin
11961 (method url-fetch)
11962 (uri (pypi-uri "ptpython" version))
11963 (sha256
11964 (base32
11965 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11966 (build-system python-build-system)
11967 (arguments
11968 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11969 (propagated-inputs
11970 `(("python-docopt" ,python-docopt)
11971 ("python-jedi" ,python-jedi)
11972 ("python-prompt-toolkit" ,python-prompt-toolkit)
11973 ("python-pygments" ,python-pygments)))
11974 (home-page "https://github.com/jonathanslenders/ptpython")
11975 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11976 (description
11977 "ptpython is a Python read-eval-print loop with IDE-like features.
11978It supports syntax highlighting, multiline editing, autocompletion, mouse,
11979color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11980etc.")
11981 (license license:bsd-3)
11982 (properties `((python2-variant . ,(delay ptpython-2))))))
11983
11984(define-public ptpython-2
11985 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11986 (package
11987 (inherit base)
11988 (name "ptpython2"))))
11989
11990(define-public python-stem
11991 (package
11992 (name "python-stem")
11993 (version "1.8.0")
11994 (source
11995 (origin
11996 (method url-fetch)
11997 (uri (pypi-uri "stem" version))
11998 (sha256
11999 (base32
12000 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
12001 (build-system python-build-system)
12002 (arguments
12003 `(#:phases
12004 (modify-phases %standard-phases
12005 (replace 'check
12006 (lambda _
12007 (invoke "./run_tests.py" "--unit")
12008 #t)))))
12009 (native-inputs
12010 `(("python-mock" ,python-mock)
12011 ("python-pycodestyle" ,python-pycodestyle)
12012 ("python-pyflakes" ,python-pyflakes)))
12013 (home-page "https://stem.torproject.org/")
12014 (synopsis
12015 "Python controller library that allows applications to interact with Tor")
12016 (description
12017 "Stem is a Python controller library for Tor. With it you can use Tor's
12018control protocol to script against the Tor process and read descriptor data
12019relays publish about themselves.")
12020 (license license:lgpl3)))
12021
12022(define-public python2-stem
12023 (package-with-python2 python-stem))
12024
12025(define-public python-pyserial
12026 (package
12027 (name "python-pyserial")
12028 (version "3.4")
12029 (source
12030 (origin
12031 (method url-fetch)
12032 (uri (pypi-uri "pyserial" version))
12033 (sha256
12034 (base32
12035 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
12036 (build-system python-build-system)
12037 (arguments
12038 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12039 ;; #:phases
12040 ;; (modify-phases %standard-phases
12041 ;; (replace 'check
12042 ;; (lambda _
12043 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12044 (home-page
12045 "https://github.com/pyserial/pyserial")
12046 (synopsis "Python Serial Port Bindings")
12047 (description "@code{pyserial} provide serial port bindings for Python. It
12048supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12049and/or Xon/Xoff. The port is accessed in RAW mode.")
12050 (license license:bsd-3)))
12051
12052(define-public python2-pyserial
12053 (package-with-python2 python-pyserial))
12054
12055(define-public python-kivy
12056 (package
12057 (name "python-kivy")
12058 (version "1.10.1")
12059 (source
12060 (origin
12061 (method url-fetch)
12062 (uri (pypi-uri "Kivy" version))
12063 (file-name (string-append name "-" version ".tar.gz"))
12064 (sha256
12065 (base32
12066 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
12067 (build-system python-build-system)
12068 (arguments
12069 `(#:tests? #f ; Tests require many optional packages
12070 #:phases
12071 (modify-phases %standard-phases
12072 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12073 (lambda* (#:key inputs #:allow-other-keys)
12074 (setenv "KIVY_SDL2_PATH"
12075 (string-append (assoc-ref inputs "sdl-union")
12076 "/include/SDL2"))
12077 #t)))))
12078 (native-inputs
12079 `(("pkg-config" ,pkg-config)
12080 ("python-cython" ,python-cython)))
12081 (inputs
12082 `(("gstreamer" ,gstreamer)
12083 ("mesa" ,mesa)
12084 ("sdl-union"
12085 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12086 (home-page "https://kivy.org")
12087 (synopsis
12088 "Multitouch application framework")
12089 (description
12090 "A software library for rapid development of
12091hardware-accelerated multitouch applications.")
12092 (license license:expat)))
12093
12094(define-public python2-kivy
12095 (package-with-python2 python-kivy))
12096
12097(define-public python-binaryornot
12098 (package
12099 (name "python-binaryornot")
12100 (version "0.4.4")
12101 (source (origin
12102 (method url-fetch)
12103 (uri (pypi-uri "binaryornot" version))
12104 (sha256
12105 (base32
12106 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
12107 (build-system python-build-system)
12108 (arguments
12109 `(#:phases
12110 (modify-phases %standard-phases
12111 (add-after 'unpack 'patch-tests
12112 (lambda _
12113 ;; TypeError: binary() got an unexpected keyword argument
12114 ;; 'average_size'.
12115 (substitute* "tests/test_check.py"
12116 (("average_size=512") ""))
12117 #t)))))
12118 (propagated-inputs
12119 `(("python-chardet" ,python-chardet)
12120 ("python-hypothesis" ,python-hypothesis)))
12121 (home-page "https://github.com/audreyr/binaryornot")
12122 (synopsis "Package to check if a file is binary or text")
12123 (description "Ultra-lightweight pure Python package to check if a file is
12124binary or text.")
12125 (license license:bsd-3)
12126 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12127
12128(define-public python2-binaryornot
12129 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12130 (package (inherit base)
12131 (propagated-inputs
12132 `(("python2-enum34" ,python2-enum34)
12133 ,@(package-propagated-inputs base))))))
12134
12135(define-public python-binwalk
12136 (package
12137 (name "python-binwalk")
12138 (version "2.2.0")
12139 (source
12140 (origin
12141 (method git-fetch)
12142 (uri (git-reference
12143 (url "https://github.com/ReFirmLabs/binwalk")
12144 (commit (string-append "v" version))))
12145 (file-name (git-file-name name version))
12146 (sha256
12147 (base32
12148 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
12149 (build-system python-build-system)
12150 (arguments
12151 `(#:phases
12152 (modify-phases %standard-phases
12153 (add-before 'check 'set-pythonpath
12154 (lambda _
12155 (setenv "PYTHONPATH"
12156 (string-append
12157 (getcwd) "/src/"
12158 ":" (getenv "PYTHONPATH")))
12159 (setenv "HOME" "")
12160 #t)))))
12161 (native-inputs
12162 `(("python-coverage" ,python-coverage)
12163 ("python-nose" ,python-nose)))
12164 (home-page "https://github.com/ReFirmLabs/binwalk")
12165 (synopsis "Firmware analysis tool")
12166 (description "Binwalk is a tool for analyzing, reverse engineering, and
12167extracting firmware images")
12168 (license license:expat)))
12169
12170(define-public python-nltk
12171 (package
12172 (name "python-nltk")
12173 (version "3.2.1")
12174 (source (origin
12175 (method url-fetch)
12176 (uri (pypi-uri "nltk" version))
12177 (sha256
12178 (base32
12179 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12180 (build-system python-build-system)
12181 (arguments
12182 '(;; The tests require some extra resources to be downloaded.
12183 ;; TODO Try packaging these resources.
12184 #:tests? #f))
12185 (home-page "http://nltk.org/")
12186 (synopsis "Natural Language Toolkit")
12187 (description "It provides interfaces to over 50 corpora and lexical
12188resources such as WordNet, along with a suite of text processing libraries
12189for classification, tokenization, stemming, tagging, parsing, and semantic
12190reasoning, wrappers for natural language processing libraries.")
12191 (license license:asl2.0)))
12192
12193(define-public python2-nltk
12194 (package-with-python2 python-nltk))
12195
12196(define-public python-pymongo
12197 (package
12198 (name "python-pymongo")
12199 (version "3.7.2")
12200 (source (origin
12201 (method url-fetch)
12202 (uri (pypi-uri "pymongo" version))
12203 (sha256
12204 (base32
12205 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
12206 (build-system python-build-system)
12207 (propagated-inputs
12208 `(("python-certifi" ,python-certifi)))
12209 (home-page "https://github.com/mongodb/mongo-python-driver")
12210 (synopsis "Python driver for MongoDB")
12211 (description "Python driver for MongoDB.")
12212 (license license:asl2.0)))
12213
12214(define-public python2-pymongo
12215 (package-with-python2 python-pymongo))
12216
12217(define-public python-consul
12218 (package
12219 (name "python-consul")
12220 (version "0.6.1")
12221 (source
12222 (origin
12223 (method url-fetch)
12224 (uri (pypi-uri "python-consul" version))
12225 (sha256
12226 (base32
12227 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12228 (build-system python-build-system)
12229 (arguments
12230 '(#:tests? #f)) ; The tests are not distributed
12231 (propagated-inputs
12232 `(("python-requests" ,python-requests)
12233 ("python-six" ,python-six)))
12234 (home-page "https://github.com/cablehead/python-consul")
12235 (synopsis "Python client for Consul")
12236 (description
12237 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12238discovery, monitoring and configuration.")
12239 (license license:expat)))
12240
12241(define-public python2-consul
12242 (package-with-python2 python-consul))
12243
12244(define-public python-schematics
12245 (package
12246 (name "python-schematics")
12247 (version "1.1.1")
12248 (source
12249 (origin
12250 (method git-fetch)
12251 (uri (git-reference
12252 (url "https://github.com/schematics/schematics.git")
12253 (commit (string-append "v" version))))
12254 (file-name (git-file-name name version))
12255 (sha256
12256 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
12257 (build-system python-build-system)
12258 (propagated-inputs
12259 `(("python-six" ,python-six)))
12260 (arguments
12261 ;; The tests require a bunch of not very nice packages with fixed
12262 ;; version requirements (e.g. python-coveralls).
12263 `(#:tests? #f))
12264 (home-page "https://github.com/schematics/schematics")
12265 (synopsis "Python Data Structures for Humans")
12266 (description "Python Data Structures for Humans.")
12267 (license license:bsd-3)))
12268
12269(define-public python2-schematics
12270 (package-with-python2 python-schematics))
12271
12272(define-public python-odfpy
12273 (package
12274 (name "python-odfpy")
12275 (version "1.3.3")
12276 (source (origin
12277 (method url-fetch)
12278 (uri (pypi-uri "odfpy" version))
12279 (sha256
12280 (base32
12281 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12282 (arguments
12283 `(#:modules ((srfi srfi-1)
12284 (guix build python-build-system)
12285 (guix build utils))
12286 #:phases
12287 (modify-phases %standard-phases
12288 (replace 'check
12289 ;; The test runner invokes python2 and python3 for test*.py.
12290 ;; To avoid having both in inputs, we replicate it here.
12291 (lambda _
12292 (for-each (lambda (test-file) (invoke "python" test-file))
12293 (find-files "tests" "^test.*\\.py$"))
12294 #t)))))
12295 (build-system python-build-system)
12296 (home-page "https://github.com/eea/odfpy")
12297 (synopsis "Python API and tools to manipulate OpenDocument files")
12298 (description "Collection of libraries and utility programs written in
12299Python to manipulate OpenDocument 1.2 files.")
12300 (license
12301 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12302 ;; number of files with other licenses.
12303 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12304
12305(define-public python2-odfpy
12306 (package-with-python2 python-odfpy))
12307
12308(define-public python-natsort
12309 (package
12310 (name "python-natsort")
12311 (version "7.0.1")
12312 (source (origin
12313 (method url-fetch)
12314 (uri (pypi-uri "natsort" version))
12315 (sha256
12316 (base32
12317 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
12318 (build-system python-build-system)
12319 (arguments
12320 `(#:modules ((guix build utils)
12321 (guix build python-build-system)
12322 (srfi srfi-1)
12323 (srfi srfi-26)
12324 (ice-9 ftw))
12325 #:phases
12326 (modify-phases %standard-phases
12327 (add-before 'check 'set-cachedir
12328 ;; Tests require write access to $HOME by default
12329 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
12330 (replace 'check
12331 (lambda _
12332 (let ((cwd (getcwd)))
12333 (setenv "PYTHONPATH"
12334 (string-append
12335 cwd "/build/"
12336 (find (cut string-prefix? "lib" <>)
12337 (scandir (string-append cwd "/build")))
12338 ":"
12339 (getenv "PYTHONPATH")))
12340 (invoke "pytest" "-v")))))))
12341 (native-inputs
12342 `(("python-hypothesis" ,python-hypothesis)
12343 ("python-pytest-cov" ,python-pytest-cov)
12344 ("python-pytest-mock" ,python-pytest-mock)
12345 ("python-pytest" ,python-pytest)))
12346 (propagated-inputs ; TODO: Add python-fastnumbers.
12347 `(("python-pyicu" ,python-pyicu)))
12348 (home-page "https://github.com/SethMMorton/natsort")
12349 (synopsis "Natural sorting for python and shell")
12350 (description
12351 "Natsort lets you apply natural sorting on lists instead of
12352lexicographical. If you use the built-in @code{sorted} method in python
12353on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
12354@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
12355@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
12356identifies numbers and sorts them separately from strings. It can also sort
12357version numbers, real numbers, mixed types and more, and comes with a shell
12358command @command{natsort} that exposes this functionality in the command line.")
12359 (license license:expat)
12360 (properties `((python2-variant . ,(delay python2-natsort))))))
12361
12362;; Natsort 6.x are the last versions with support for Python 2.
12363(define-public python2-natsort
12364 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12365 (package (inherit base)
12366 (version "6.2.1")
12367 (source (origin
12368 (method url-fetch)
12369 (uri (pypi-uri "natsort" version))
12370 (sha256
12371 (base32
12372 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
12373 (native-inputs
12374 `(("python2-pathlib" ,python2-pathlib)
12375 ,@(package-native-inputs base))))))
12376
12377(define-public glances
12378 (package
12379 (name "glances")
12380 (version "3.1.4")
12381 (source
12382 (origin
12383 (method url-fetch)
12384 (uri (pypi-uri "Glances" version))
12385 (sha256
12386 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
12387 (modules '((guix build utils)))
12388 (snippet
12389 '(begin
12390 ;; Glances phones PyPI for weekly update checks by default.
12391 ;; Disable these. The user can re-enable them if desired.
12392 (substitute* "glances/outdated.py"
12393 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
12394 (string-append indentation
12395 "self.args.disable_check_update = True\n"
12396 line)))
12397 #t))))
12398 (build-system python-build-system)
12399 (propagated-inputs
12400 `(("python-future" ,python-future)
12401 ("python-psutil" ,python-psutil)))
12402 (home-page "https://github.com/nicolargo/glances")
12403 (synopsis "Cross-platform curses-based monitoring tool")
12404 (description
12405 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12406Glances uses the PsUtil library to get information from your system. It
12407monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12408 (license license:lgpl3+)))
12409
12410(define-public python-glances
12411 (deprecated-package "python-glances" glances))
12412
12413(define-public python-graphql-core
12414 (package
12415 (name "python-graphql-core")
12416 (version "0.5.3")
12417 (source
12418 (origin
12419 (method url-fetch)
12420 (uri (pypi-uri "graphql-core" version))
12421 (sha256
12422 (base32
12423 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12424 (build-system python-build-system)
12425 (arguments
12426 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12427 #:phases
12428 (modify-phases %standard-phases
12429 (add-after 'unpack 'patch-hardcoded-version
12430 (lambda _ (substitute*
12431 "setup.py"
12432 (("'gevent==1.1rc1'") "'gevent'"))
12433 #t)))))
12434 (native-inputs
12435 `(("python-gevent" ,python-gevent)
12436 ("python-mock" ,python-mock)
12437 ("python-pytest-mock" ,python-pytest-mock)))
12438 (propagated-inputs
12439 `(("python-promise" ,python-promise)
12440 ("python-six" ,python-six)))
12441 (home-page "https://github.com/graphql-python/graphql-core")
12442 (synopsis "GraphQL implementation for Python")
12443 (description
12444 "GraphQL implementation for Python. GraphQL is a data query language and
12445runtime designed and used to request and deliver data to mobile and web apps.
12446This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12447to Python.")
12448 (license license:expat)))
12449
12450(define-public python2-graphql-core
12451 (package-with-python2 python-graphql-core))
12452
12453(define-public python-graphql-relay
12454 (package
12455 (name "python-graphql-relay")
12456 (version "0.4.5")
12457 (source
12458 (origin
12459 (method url-fetch)
12460 (uri (pypi-uri "graphql-relay" version))
12461 (sha256
12462 (base32
12463 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12464 (build-system python-build-system)
12465 (arguments
12466 '(#:tests? #f)) ; The tests are not distributed
12467 (propagated-inputs
12468 `(("python-graphql-core" ,python-graphql-core)
12469 ("python-promise" ,python-promise)
12470 ("python-six" ,python-six)))
12471 (home-page "https://github.com/graphql-python/graphql-relay-py")
12472 (synopsis "Relay implementation for Python")
12473 (description
12474 "This is a library to allow the easy creation of Relay-compliant servers
12475using the GraphQL Python reference implementation of a GraphQL server. It
12476should be noted that the code is a exact port of the original
12477@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12478from Facebook.")
12479 (license license:expat)))
12480
12481(define-public python2-graphql-relay
12482 (package-with-python2 python-graphql-relay))
12483
12484(define-public python-graphene
12485 (package
12486 (name "python-graphene")
12487 (version "0.10.2")
12488 (source
12489 (origin
12490 (method url-fetch)
12491 (uri (pypi-uri "graphene" version))
12492 (sha256
12493 (base32
12494 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12495 (build-system python-build-system)
12496 (propagated-inputs
12497 `(("python-graphql-core" ,python-graphql-core)
12498 ("python-graphql-relay" ,python-graphql-relay)
12499 ("python-iso8601" ,python-iso8601)
12500 ("python-promise" ,python-promise)
12501 ("python-six" ,python-six)))
12502 (arguments
12503 `(#:tests? #f)) ; no tests/ in the PyPI tarball
12504 (home-page "https://graphene-python.org/")
12505 (synopsis "GraphQL Framework for Python")
12506 (description
12507 "Graphene is a Python library for building GraphQL schemas/types.
12508A GraphQL schema describes your data model, and provides a GraphQL server
12509with an associated set of resolve methods that know how to fetch data.")
12510 (properties `((python2-variant . ,(delay python2-graphene))))
12511 (license license:expat)))
12512
12513(define-public python2-graphene
12514 (let ((base (package-with-python2
12515 (strip-python2-variant python-graphene))))
12516 (package (inherit base)
12517 (native-inputs
12518 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12519 ,@(package-native-inputs base))))))
12520
12521(define-public python-nautilus
12522 (package
12523 (name "python-nautilus")
12524 (version "0.4.9")
12525 (source
12526 (origin
12527 (method url-fetch)
12528 (uri (pypi-uri "nautilus" version))
12529 (sha256
12530 (base32
12531 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12532 (build-system python-build-system)
12533 (arguments `(#:tests? #f)) ; fails to import test modules
12534 (propagated-inputs
12535 `(("python-bcrypt" ,python-bcrypt)
12536 ("python-click" ,python-click)
12537 ("python-consul" ,python-consul)
12538 ("python-graphene" ,python-graphene)
12539 ("python-jinja2" ,python-jinja2)
12540 ("python-peewee" ,python-peewee)
12541 ("python-pika" ,python-pika)
12542 ("python-tornado" ,python-tornado)
12543 ("python-wtforms" ,python-wtforms)))
12544 (native-inputs
12545 `(("python-nose2" ,python-nose2)))
12546 (home-page "https://github.com/AlecAivazis/nautilus")
12547 (synopsis "Library for creating microservice applications")
12548 (description
12549 "Nautilus is a framework for flux based microservices that looks to
12550provide extendible implementations of common aspects of a cloud so that you can
12551focus on building massively scalable web applications.")
12552 (license license:expat)))
12553
12554(define-public python-random2
12555 (package
12556 (name "python-random2")
12557 (version "1.0.1")
12558 (source (origin
12559 (method url-fetch)
12560 (uri (pypi-uri "random2" version ".zip"))
12561 (sha256
12562 (base32
12563 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
12564 (build-system python-build-system)
12565 (native-inputs `(("unzip" ,unzip)))
12566 (home-page "http://pypi.python.org/pypi/random2")
12567 (synopsis "Python 3 version of the Python 2 @code{random} module")
12568 (description
12569 "This package provides a Python 3 ported version of Python 2.7’s
12570@code{random} module. It has also been back-ported to work in Python 2.6.
12571
12572In Python 3, the implementation of @code{randrange()} was changed, so that
12573even with the same seed you get different sequences in Python 2 and 3.
12574
12575This package closes that gap, allowing stable random number generation
12576between the different Python versions.")
12577 (license license:psfl)))
12578
12579(define-public python2-random2
12580 (package-with-python2 python-random2))
12581
12582(define-public python-snowballstemmer
12583 (package
12584 (name "python-snowballstemmer")
12585 (version "2.0.0")
12586 (source (origin
12587 (method url-fetch)
12588 (uri (pypi-uri "snowballstemmer" version))
12589 (sha256
12590 (base32
12591 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
12592 (build-system python-build-system)
12593 (arguments
12594 `(;; No tests exist
12595 #:tests? #f))
12596 (home-page "https://github.com/shibukawa/snowball_py")
12597 (synopsis "Snowball stemming library collection for Python")
12598 (description "This package provides 16 word stemmer algorithms generated
12599from Snowball algorithms. It includes the 15 original ones plus the Poerter
12600English stemmer.")
12601 (license license:bsd-3)))
12602
12603(define-public python2-snowballstemmer
12604 (package-with-python2 python-snowballstemmer))
12605
12606(define-public python-setproctitle
12607(package
12608 (name "python-setproctitle")
12609 (version "1.1.10")
12610 (source
12611 (origin
12612 (method url-fetch)
12613 (uri (pypi-uri "setproctitle" version))
12614 (sha256
12615 (base32
12616 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12617 (build-system python-build-system)
12618 (arguments
12619 '(#:phases
12620 (modify-phases %standard-phases
12621 (add-before 'check 'patch-Makefile
12622 ;; Stricly this is only required for the python2 variant.
12623 ;; But adding a phase in an inherited package seems to be
12624 ;; cumbersum. So we patch even for python3.
12625 (lambda _
12626 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12627 (when nose
12628 (substitute* "Makefile"
12629 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12630 (string-append nose "/bin/nosetests "))))
12631 #t)))
12632 (replace 'check
12633 (lambda _
12634 (setenv "PYTHON" (or (which "python3") (which "python")))
12635 (setenv "PYCONFIG" (or (which "python3-config")
12636 (which "python-config")))
12637 (setenv "CC" "gcc")
12638 ;; No need to extend PYTHONPATH to find the built package, since
12639 ;; the Makefile will build anyway
12640 (invoke "make" "check"))))))
12641 (native-inputs
12642 `(("procps" ,procps))) ; required for tests
12643 (home-page
12644 "https://github.com/dvarrazzo/py-setproctitle")
12645 (synopsis
12646 "Setproctitle implementation for Python to customize the process title")
12647 (description "The library allows a process to change its title (as displayed
12648by system tools such as ps and top).
12649
12650Changing the title is mostly useful in multi-process systems, for
12651example when a master process is forked: changing the children's title
12652allows to identify the task each process is busy with. The technique
12653is used by PostgreSQL and the OpenSSH Server for example.")
12654 (license license:bsd-3)
12655 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12656
12657(define-public python2-setproctitle
12658 (let ((base (package-with-python2
12659 (strip-python2-variant python-setproctitle))))
12660 (package
12661 (inherit base)
12662 (native-inputs `(("python2-nose" ,python2-nose)
12663 ,@(package-native-inputs base))))))
12664
12665(define-public python-validictory
12666 (package
12667 (name "python-validictory")
12668 (version "1.0.1")
12669 (source
12670 (origin
12671 (method url-fetch)
12672 (uri (pypi-uri "validictory" version))
12673 (sha256
12674 (base32
12675 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12676 (build-system python-build-system)
12677 (arguments
12678 '(#:phases
12679 (modify-phases %standard-phases
12680 (add-after 'unpack 'bootstrap
12681 ;; Move the tests out of the package directory to avoid
12682 ;; packaging them.
12683 (lambda* _
12684 (rename-file "validictory/tests" "tests")
12685 (delete-file "tests/__init__.py")))
12686 (replace 'check
12687 (lambda _
12688 ;; Extend PYTHONPATH so the built package will be found.
12689 (setenv "PYTHONPATH"
12690 (string-append (getcwd) "/build/lib:"
12691 (getenv "PYTHONPATH")))
12692 (invoke "py.test" "-vv" ))))))
12693 (native-inputs
12694 `(("python-pytest" ,python-pytest)))
12695 (home-page
12696 "https://github.com/jamesturk/validictory")
12697 (synopsis "General purpose Python data validator")
12698 (description "It allows validation of arbitrary Python data structures.
12699
12700The schema format is based on the JSON Schema
12701proposal (http://json-schema.org), so combined with json the library is also
12702useful as a validator for JSON data.")
12703 (license license:expat)))
12704
12705(define-public python2-validictory
12706 (package-with-python2 python-validictory))
12707
12708(define-public python-pyelftools
12709 (package
12710 (name "python-pyelftools")
12711 (version "0.25")
12712 (source
12713 (origin
12714 (method url-fetch)
12715 (uri (pypi-uri "pyelftools" version))
12716 (sha256
12717 (base32
12718 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
12719 (build-system python-build-system)
12720 (arguments
12721 `(#:phases
12722 (modify-phases %standard-phases
12723 (add-before 'check 'set-pythonpath
12724 (lambda _
12725 (setenv "PYTHONPATH"
12726 (string-append
12727 (getcwd) "/test/"
12728 ":" (getenv "PYTHONPATH")))
12729 #t)))))
12730 (home-page
12731 "https://github.com/eliben/pyelftools")
12732 (synopsis
12733 "Analyze binary and library file information")
12734 (description "This Python library provides interfaces for parsing and
12735analyzing two binary and library file formats; the Executable and Linking
12736Format (ELF), and debugging information in the Debugging With Attributed
12737Record Format (DWARF).")
12738 (license license:public-domain)))
12739
12740(define-public python-pyev
12741 (package
12742 (name "python-pyev")
12743 (version "0.9.0")
12744 (source
12745 (origin
12746 (method url-fetch)
12747 (uri (pypi-uri "pyev" version))
12748 (sha256
12749 (base32
12750 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12751 (build-system python-build-system)
12752 (arguments
12753 `(#:tests? #f ; no test suite
12754 #:phases
12755 (modify-phases %standard-phases
12756 (add-after 'unpack 'patch
12757 (lambda* (#:key inputs #:allow-other-keys)
12758 (let ((libev (string-append (assoc-ref inputs "libev")
12759 "/lib/libev.so.4")))
12760 (substitute* "setup.py"
12761 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12762 (string-append "libev_dll_name = \"" libev "\"")))))))))
12763 (inputs
12764 `(("libev" ,libev)))
12765 (home-page "http://pythonhosted.org/pyev/")
12766 (synopsis "Python libev interface")
12767 (description "Pyev provides a Python interface to libev.")
12768 (license license:gpl3)))
12769
12770(define-public python2-pyev
12771 (package-with-python2 python-pyev))
12772
12773(define-public python-imagesize
12774 (package
12775 (name "python-imagesize")
12776 (version "1.2.0")
12777 (source
12778 (origin
12779 (method url-fetch)
12780 (uri (pypi-uri "imagesize" version))
12781 (sha256
12782 (base32
12783 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
12784 (build-system python-build-system)
12785 (home-page "https://github.com/shibukawa/imagesize_py")
12786 (synopsis "Gets image size of files in various formats in Python")
12787 (description
12788 "This package allows determination of image size from
12789PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12790 (license license:expat)))
12791
12792(define-public python2-imagesize
12793 (package-with-python2 python-imagesize))
12794
12795(define-public python-termstyle
12796 (package
12797 (name "python-termstyle")
12798 (version "0.1.11")
12799 (source
12800 (origin
12801 (method url-fetch)
12802 (uri (pypi-uri "termstyle" version))
12803 (sha256
12804 (base32
12805 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12806 (build-system python-build-system)
12807 (arguments
12808 '(#:phases
12809 (modify-phases %standard-phases
12810 (replace 'check
12811 (lambda _
12812 (invoke "python" "test3.py"))))))
12813 (home-page "https://github.com/gfxmonk/termstyle")
12814 (synopsis "Console text coloring for Python")
12815 (description "This package provides console text coloring for Python.")
12816 (license license:bsd-3)))
12817
12818(define-public python-argcomplete
12819 (package
12820 (name "python-argcomplete")
12821 (version "1.10.3")
12822 (source
12823 (origin
12824 (method url-fetch)
12825 (uri (pypi-uri "argcomplete" version))
12826 (sha256
12827 (base32
12828 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
12829 (build-system python-build-system)
12830 (arguments
12831 `(#:phases
12832 (modify-phases %standard-phases
12833 (add-after 'unpack 'embed-tool-references
12834 (lambda _
12835 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12836 ((" grep")
12837 (string-append " " (which "grep")))
12838 ((" egrep")
12839 (string-append " " (which "egrep")))
12840 (("elif which")
12841 (string-append "elif " (which "which")))
12842 (("\\$\\(which")
12843 (string-append "$(" (which "which"))))
12844 #t)))))
12845 (inputs
12846 `(("grep" ,grep)
12847 ("which" ,which)))
12848 (native-inputs
12849 `(("python-coverage" ,python-coverage)
12850 ("python-flake8" ,python-flake8)
12851 ("python-pexpect" ,python-pexpect)
12852 ("python-wheel" ,python-wheel)
12853 ("tcsh" ,tcsh)
12854 ("fish" ,fish)
12855 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
12856 (home-page "https://github.com/kislyuk/argcomplete")
12857 (synopsis "Shell tab completion for Python argparse")
12858 (description "argcomplete provides extensible command line tab completion
12859of arguments and options for Python scripts using @code{argparse}. It's
12860particularly useful for programs with many options or sub-parsers that can
12861dynamically suggest completions; for example, when browsing resources over the
12862network.")
12863 (license license:asl2.0)))
12864
12865(define-public python2-argcomplete
12866 (package-with-python2 python-argcomplete))
12867
12868(define-public python-xopen
12869 (package
12870 (name "python-xopen")
12871 (version "0.5.0")
12872 (source
12873 (origin
12874 (method url-fetch)
12875 (uri (pypi-uri "xopen" version))
12876 (sha256
12877 (base32
12878 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
12879 (build-system python-build-system)
12880 (propagated-inputs
12881 `(("python-setuptools-scm" ,python-setuptools-scm)))
12882 (home-page "https://github.com/marcelm/xopen/")
12883 (synopsis "Open compressed files transparently")
12884 (description "This module provides an @code{xopen} function that works like
12885Python's built-in @code{open} function, but can also deal with compressed files.
12886Supported compression formats are gzip, bzip2 and, xz, and are automatically
12887recognized by their file extensions. The focus is on being as efficient as
12888possible on all supported Python versions.")
12889 (license license:expat)))
12890
12891(define-public python2-xopen
12892 (let ((base (package-with-python2
12893 (strip-python2-variant python-xopen))))
12894 (package
12895 (inherit base)
12896 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12897 ,@(package-propagated-inputs base))))))
12898
12899(define-public python-cheetah
12900 (package
12901 (name "python-cheetah")
12902 (version "3.1.0")
12903 (source
12904 (origin
12905 (method url-fetch)
12906 (uri (pypi-uri "Cheetah3" version))
12907 (sha256
12908 (base32
12909 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12910 (build-system python-build-system)
12911 (arguments
12912 `(#:modules ((guix build utils)
12913 (guix build python-build-system)
12914 (ice-9 ftw)
12915 (srfi srfi-1)
12916 (srfi srfi-26))
12917 #:phases (modify-phases %standard-phases
12918 (add-after 'unpack 'use-absolute-python
12919 (lambda _
12920 (substitute* "Cheetah/CheetahWrapper.py"
12921 (("#!/usr/bin/env python")
12922 (string-append "#!" (which "python"))))
12923 #t))
12924 (replace 'check
12925 (lambda _
12926 (let ((cwd (getcwd)))
12927 (setenv "PYTHONPATH"
12928 (string-append
12929 cwd "/build/"
12930 (find (cut string-prefix? "lib" <>)
12931 (scandir (string-append cwd "/build")))
12932 ":" (getenv "PYTHONPATH")))
12933 (setenv "PATH"
12934 (string-append (getenv "PATH")
12935 ":" cwd "/bin"))
12936 (setenv "TMPDIR" "/tmp")
12937
12938 (substitute* "Cheetah/Tests/Test.py"
12939 (("unittest.TextTestRunner\\(\\)")
12940 "unittest.TextTestRunner(verbosity=2)"))
12941
12942 (invoke "python" "Cheetah/Tests/Test.py")))))))
12943 (propagated-inputs
12944 `(("python-markdown" ,python-markdown))) ;optional
12945 (home-page "https://cheetahtemplate.org/")
12946 (synopsis "Template engine")
12947 (description "Cheetah is a text-based template engine and Python code
12948generator.
12949
12950Cheetah can be used as a standalone templating utility or referenced as
12951a library from other Python applications. It has many potential uses,
12952but web developers looking for a viable alternative to ASP, JSP, PHP and
12953PSP are expected to be its principle user group.
12954
12955Features:
12956@enumerate
12957@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12958 text-based format.
12959@item Cleanly separates content, graphic design, and program code.
12960@item Blends the power and flexibility of Python with a simple template language
12961 that non-programmers can understand.
12962@item Gives template writers full access to any Python data structure, module,
12963 function, object, or method in their templates.
12964@item Makes code reuse easy by providing an object-orientated interface to
12965 templates that is accessible from Python code or other Cheetah templates.
12966 One template can subclass another and selectively reimplement sections of it.
12967@item Provides a simple, yet powerful, caching mechanism that can dramatically
12968 improve the performance of a dynamic website.
12969@item Compiles templates into optimized, yet readable, Python code.
12970@end enumerate")
12971 (license (license:x11-style "file://LICENSE"))))
12972
12973(define-public python2-cheetah
12974 (package-with-python2 python-cheetah))
12975
12976(define-public python-dulwich
12977 (package
12978 (name "python-dulwich")
12979 (version "0.18.6")
12980 (source
12981 (origin
12982 (method url-fetch)
12983 (uri (list (string-append "https://www.dulwich.io/releases/"
12984 "dulwich-" version ".tar.gz")
12985 (pypi-uri "dulwich" version)))
12986 (sha256
12987 (base32
12988 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12989 (build-system python-build-system)
12990 (arguments
12991 `(#:phases
12992 (modify-phases %standard-phases
12993 (add-before 'check 'fix-tests
12994 (lambda* (#:key inputs #:allow-other-keys)
12995 ;; The tests use Popen with a custom environment which doesn't
12996 ;; include PATH.
12997 (substitute* "dulwich/tests/compat/utils.py"
12998 (("'git'") (string-append "'"
12999 (which "git")
13000 "'")))
13001 (substitute* '("dulwich/tests/test_repository.py"
13002 "dulwich/tests/test_hooks.py")
13003 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13004 (setenv "TEST_RUNNER" "unittest")
13005 (setenv "PYTHONHASHSEED" "random")
13006 #t)))))
13007 (propagated-inputs
13008 `(("python-fastimport" ,python-fastimport)))
13009 (native-inputs
13010 `(("python-mock" ,python-mock)
13011 ("python-geventhttpclient" ,python-geventhttpclient)
13012 ("git" ,git)))
13013 (home-page "https://www.dulwich.io/")
13014 (synopsis "Git implementation in Python")
13015 (description "Dulwich is an implementation of the Git file formats and
13016protocols written in pure Python.")
13017 ;; Can be used with either license.
13018 (license (list license:asl2.0 license:gpl2+))))
13019
13020(define-public python2-dulwich
13021 (package-with-python2 python-dulwich))
13022
13023(define-public python-pbkdf2
13024 (package
13025 (name "python-pbkdf2")
13026 (version "1.3")
13027 (source
13028 (origin
13029 (method url-fetch)
13030 (uri (pypi-uri "pbkdf2" version))
13031 (sha256
13032 (base32
13033 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13034 (build-system python-build-system)
13035 (arguments
13036 '(#:phases
13037 (modify-phases %standard-phases
13038 (replace 'check
13039 (lambda _
13040 (setenv "PYTHONPATH"
13041 (string-append (getcwd) "/build/lib:"
13042 (getenv "PYTHONPATH")))
13043 (invoke "python" "test/test_pbkdf2.py"))))))
13044 (propagated-inputs
13045 `(("python-pycrypto" ,python-pycrypto))) ; optional
13046 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
13047 (synopsis "Password-based key derivation")
13048 (description "This module implements the password-based key derivation
13049function, PBKDF2, specified in RSA PKCS#5 v2.0.
13050
13051PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13052is part of the RSA Public Key Cryptography Standards series. The provided
13053implementation takes a password or a passphrase and a salt value (and
13054optionally a iteration count, a digest module, and a MAC module) and provides
13055a file-like object from which an arbitrarly-sized key can be read.")
13056 (license license:expat)))
13057
13058(define-public python2-pbkdf2
13059 (package-with-python2 python-pbkdf2))
13060
13061(define-public python-qrcode
13062 (package
13063 (name "python-qrcode")
13064 (version "6.1")
13065 (source
13066 (origin
13067 (method url-fetch)
13068 (uri (pypi-uri "qrcode" version))
13069 (sha256
13070 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
13071 (build-system python-build-system)
13072 (arguments
13073 ;; FIXME: Tests require packaging 'pymaging'.
13074 '(#:tests? #f))
13075 (propagated-inputs
13076 `(("python-lxml" ,python-lxml) ; for SVG output
13077 ("python-pillow" ,python-pillow) ; for PNG output
13078 ("python-six" ,python-six)))
13079 (home-page "https://github.com/lincolnloop/python-qrcode")
13080 (synopsis "QR Code image generator")
13081 (description "This package provides a pure Python QR Code generator
13082module. It uses the Python Imaging Library (PIL) to allow for the generation
13083of QR Codes.
13084
13085In addition this package provides a command line tool to generate QR codes and
13086either write these QR codes to a file or do the output as ascii art at the
13087console.")
13088 (license license:bsd-3)))
13089
13090(define-public python2-qrcode
13091 (package-with-python2 python-qrcode))
13092
13093(define-public python-rst2ansi
13094 (package
13095 (name "python-rst2ansi")
13096 (version "0.1.5")
13097 (source
13098 (origin
13099 (method url-fetch)
13100 (uri (pypi-uri "rst2ansi" version))
13101 (sha256
13102 (base32
13103 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13104 (build-system python-build-system)
13105 (propagated-inputs
13106 `(("python-docutils" ,python-docutils)))
13107 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13108 (synopsis "Convert RST to ANSI-decorated console output")
13109 (description
13110 "Python module dedicated to rendering RST (reStructuredText) documents
13111to ansi-escaped strings suitable for display in a terminal.")
13112 (license license:expat)))
13113
13114(define-public python-ansi2html
13115 (package
13116 (name "python-ansi2html")
13117 (version "1.2.0")
13118 (source
13119 (origin
13120 (method url-fetch)
13121 (uri (pypi-uri "ansi2html" version))
13122 (sha256
13123 (base32
13124 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13125 (build-system python-build-system)
13126 (native-inputs
13127 `(("python-mock" ,python-mock)
13128 ("python-nose" ,python-nose)))
13129 (propagated-inputs
13130 `(("python-six" ,python-six)))
13131 (home-page "https://github.com/ralphbean/ansi2html")
13132 (synopsis "Convert ANSI-decorated console output to HTML")
13133 (description
13134 "@command{ansi2html} is a Python library and command line utility for
13135convering text with ANSI color codes to HTML or LaTeX.")
13136 (license license:gpl3+)))
13137
13138(define-public python2-ansi2html
13139 (package-with-python2 python-ansi2html))
13140
13141(define-public python-ddt
13142 (package
13143 (name "python-ddt")
13144 (version "1.1.3")
13145 (source
13146 (origin
13147 (method url-fetch)
13148 (uri (pypi-uri "ddt" version))
13149 (sha256
13150 (base32
13151 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
13152 (build-system python-build-system)
13153 (native-inputs
13154 `(("python-mock" ,python-mock)
13155 ("python-nose" ,python-nose)))
13156 (propagated-inputs
13157 `(("python-six" ,python-six)
13158 ("python-pyyaml" ,python-pyyaml)))
13159 (home-page "https://github.com/txels/ddt")
13160 (synopsis "Data-Driven Tests")
13161 (description
13162 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
13163running it with different test data, and make it appear as multiple test
13164cases.")
13165 (license license:expat)))
13166
13167(define-public python2-ddt
13168 (package-with-python2 python-ddt))
13169
13170(define-public python-pycountry
13171 (package
13172 (name "python-pycountry")
13173 (version "18.5.26")
13174 (source
13175 (origin
13176 (method url-fetch)
13177 (uri (pypi-uri "pycountry" version))
13178 (sha256
13179 (base32
13180 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
13181 (build-system python-build-system)
13182 (home-page "https://bitbucket.org/flyingcircus/pycountry")
13183 (synopsis "ISO databases for languages, countries, currencies, etc.")
13184 (description
13185 "@code{pycountry} provides the ISO databases for the standards:
13186@enumerate
13187@item 639-3 (Languages)
13188@item 3166 (Countries)
13189@item 3166-3 (Deleted Countries)
13190@item 3166-2 (Subdivisions of countries)
13191@item 4217 (Currencies)
13192@item 15924 (Scripts)
13193@end enumerate
13194It includes a copy from Debian’s pkg-isocodes and makes the data accessible
13195through a Python API.")
13196 (license license:lgpl2.1+)))
13197
13198(define-public python2-pycountry
13199 (package-with-python2 python-pycountry))
13200
13201(define-public python-pycosat
13202 (package
13203 (name "python-pycosat")
13204 (version "0.6.1")
13205 (source
13206 (origin
13207 (method url-fetch)
13208 (uri (pypi-uri "pycosat" version))
13209 (sha256
13210 (base32
13211 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13212 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13213 (build-system python-build-system)
13214 (home-page "https://github.com/ContinuumIO/pycosat")
13215 (synopsis "Bindings to picosat (a SAT solver)")
13216 (description
13217 "This package provides efficient Python bindings to @code{picosat} on
13218the C level. When importing pycosat, the @code{picosat} solver becomes part
13219of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13220Problem} (SAT) solver.")
13221 (license license:expat)))
13222
13223(define-public python2-pycosat
13224 (package-with-python2 python-pycosat))
13225
13226(define-public python2-ruamel.ordereddict
13227 (package
13228 (name "python2-ruamel.ordereddict")
13229 (version "0.4.9")
13230 (source
13231 (origin
13232 (method url-fetch)
13233 (uri (pypi-uri "ruamel.ordereddict" version))
13234 (sha256
13235 (base32
13236 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13237 (build-system python-build-system)
13238 (arguments
13239 `(#:python ,python-2
13240 #:phases
13241 (modify-phases %standard-phases
13242 (delete 'check)
13243 (add-after 'install 'check
13244 (lambda* (#:key inputs outputs #:allow-other-keys)
13245 (add-installed-pythonpath inputs outputs)
13246 (invoke "python" "test/testordereddict.py"))))))
13247 (home-page "https://bitbucket.org/ruamel/ordereddict")
13248 (synopsis "Version of dict that keeps keys in insertion order")
13249 (description
13250 "This is an implementation of an ordered dictionary with @dfn{Key
13251Insertion Order} (KIO: updates of values do not affect the position of the
13252key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13253removed and put at the back). The standard library module @code{OrderedDict},
13254implemented later, implements a subset of @code{ordereddict} functionality.
13255Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13256Order} (KSO, no sorting function can be specified, but a transform can be
13257specified to apply on the key before comparison (e.g. @code{string.lower})).")
13258 (license license:expat)))
13259
13260(define-public python-pypeg2
13261 (package
13262 (name "python-pypeg2")
13263 (version "2.15.2")
13264 (source
13265 (origin
13266 (method url-fetch)
13267 (uri (pypi-uri "pyPEG2" version))
13268 (sha256
13269 (base32
13270 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13271 (build-system python-build-system)
13272 (propagated-inputs `(("python-lxml" ,python-lxml)))
13273 (arguments
13274 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13275 '(#:tests? #f))
13276 (home-page "https://fdik.org/pyPEG/")
13277 (synopsis "Parsering Expression Grammars in Python")
13278 (description "PyPEG is an intrinsic parser interpreter framework for
13279Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13280parse many formal languages.")
13281 (license license:gpl2)))
13282
13283(define-public python-incremental
13284 (package
13285 (name "python-incremental")
13286 (version "17.5.0")
13287 (source
13288 (origin
13289 (method url-fetch)
13290 (uri (pypi-uri "incremental" version))
13291 (sha256
13292 (base32
13293 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
13294 (build-system python-build-system)
13295 (home-page "https://github.com/hawkowl/incremental")
13296 (synopsis "Library for versioning Python projects")
13297 (description "Incremental is a small library that versions your Python
13298projects.")
13299 (license license:expat)))
13300
13301(define-public python2-incremental
13302 (package-with-python2 python-incremental))
13303
13304(define-public python-invoke
13305 (package
13306 (name "python-invoke")
13307 (home-page "https://www.pyinvoke.org/")
13308 (version "1.3.0")
13309 (source (origin
13310 (method url-fetch)
13311 (uri (pypi-uri "invoke" version))
13312 (sha256
13313 (base32
13314 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
13315 (build-system python-build-system)
13316 (arguments
13317 ;; XXX: Requires many dependencies that are not yet in Guix.
13318 `(#:tests? #f))
13319 (synopsis "Pythonic task execution")
13320 (description
13321 "Invoke is a Python task execution tool and library, drawing inspiration
13322from various sources to arrive at a powerful and clean feature set. It is
13323evolved from the Fabric project, but focuses on local and abstract concerns
13324instead of servers and network commands.")
13325 (license license:bsd-3)))
13326
13327(define-public python2-invoke
13328 (package-with-python2 python-invoke))
13329
13330(define-public python-automat
13331 (package
13332 (name "python-automat")
13333 (version "0.7.0")
13334 (source (origin
13335 (method url-fetch)
13336 (uri (pypi-uri "Automat" version))
13337 (sha256
13338 (base32
13339 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
13340 (build-system python-build-system)
13341 ;; We disable the tests because they require python-twisted, while
13342 ;; python-twisted depends on python-automat. Twisted is optional, but the
13343 ;; tests fail if it is not available. Also see
13344 ;; <https://github.com/glyph/automat/issues/71>.
13345 (arguments '(#:tests? #f))
13346 (native-inputs
13347 `(("python-m2r" ,python-m2r)
13348 ("python-setuptools-scm" ,python-setuptools-scm)
13349 ("python-graphviz" ,python-graphviz)))
13350 (propagated-inputs
13351 `(("python-six" ,python-six)
13352 ("python-attrs" ,python-attrs)))
13353 (home-page "https://github.com/glyph/Automat")
13354 (synopsis "Self-service finite-state machines")
13355 (description "Automat is a library for concise, idiomatic Python
13356expression of finite-state automata (particularly deterministic finite-state
13357transducers).")
13358 (license license:expat)))
13359
13360(define-public python2-automat
13361 (package-with-python2 python-automat))
13362
13363(define-public python-m2r
13364 (package
13365 (name "python-m2r")
13366 (version "0.2.1")
13367 (source (origin
13368 (method url-fetch)
13369 (uri (pypi-uri "m2r" version))
13370 (sha256
13371 (base32
13372 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
13373 (build-system python-build-system)
13374 (propagated-inputs
13375 `(("python-docutils" ,python-docutils)
13376 ("python-mistune" ,python-mistune)))
13377 (native-inputs
13378 `(("python-pygments" ,python-pygments)
13379 ("python-mock" ,python-mock)))
13380 (home-page "https://github.com/miyakogi/m2r")
13381 (synopsis "Markdown to reStructuredText converter")
13382 (description "M2R converts a markdown file including reST markups to valid
13383reST format.")
13384 (license license:expat)))
13385
13386(define-public python2-m2r
13387 (package-with-python2 python-m2r))
13388
13389(define-public python-constantly
13390 (package
13391 (name "python-constantly")
13392 (version "15.1.0")
13393 (source (origin
13394 (method url-fetch)
13395 (uri (pypi-uri "constantly" version))
13396 (sha256
13397 (base32
13398 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
13399 (build-system python-build-system)
13400 (home-page "https://github.com/twisted/constantly")
13401 (synopsis "Symbolic constants in Python")
13402 (description "Constantly is a Python library that provides symbolic
13403constant support. It includes collections and constants with text, numeric,
13404and bit flag values.")
13405 (license license:expat)))
13406
13407(define-public python2-constantly
13408 (package-with-python2 python-constantly))
13409
13410(define-public python-attrs
13411 (package
13412 (name "python-attrs")
13413 (version "19.1.0")
13414 (source (origin
13415 (method url-fetch)
13416 (uri (pypi-uri "attrs" version))
13417 (sha256
13418 (base32
13419 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
13420 (build-system python-build-system)
13421 (arguments
13422 `(#:modules ((guix build utils)
13423 (guix build python-build-system)
13424 (ice-9 ftw)
13425 (srfi srfi-1)
13426 (srfi srfi-26))
13427 #:phases (modify-phases %standard-phases
13428 (replace 'check
13429 (lambda _
13430 (let ((cwd (getcwd)))
13431 (setenv "PYTHONPATH"
13432 (string-append
13433 cwd "/build/"
13434 (find (cut string-prefix? "lib" <>)
13435 (scandir (string-append cwd "/build")))
13436 ":"
13437 (getenv "PYTHONPATH")))
13438 (invoke "python" "-m" "pytest")))))))
13439 (native-inputs
13440 `(("python-coverage" ,python-coverage)
13441 ("python-hypothesis" ,python-hypothesis)
13442 ("python-pympler" ,python-pympler)
13443 ("python-pytest" ,python-pytest)
13444 ("python-six" ,python-six)
13445 ("python-sphinx" ,python-sphinx)
13446 ("python-zope-interface" ,python-zope-interface)))
13447 (home-page "https://github.com/python-attrs/attrs/")
13448 (synopsis "Attributes without boilerplate")
13449 (description "@code{attrs} is a Python package with class decorators that
13450ease the chores of implementing the most common attribute-related object
13451protocols.")
13452 (license license:expat)))
13453
13454(define-public python2-attrs
13455 (package-with-python2 python-attrs))
13456
13457(define-public python-attrs-bootstrap
13458 (package
13459 (inherit python-attrs)
13460 (name "python-attrs-bootstrap")
13461 (native-inputs `())
13462 (arguments `(#:tests? #f))))
13463
13464(define-public python2-attrs-bootstrap
13465 (package-with-python2 python-attrs-bootstrap))
13466
13467(define-public python2-cliapp
13468 (package
13469 (name "python2-cliapp")
13470 (version "1.20180812.1")
13471 (source
13472 (origin
13473 (method url-fetch)
13474 (uri (string-append
13475 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13476 version ".tar.gz"))
13477 (sha256
13478 (base32
13479 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
13480 (build-system python-build-system)
13481 (arguments
13482 `(#:python ,python-2
13483 #:phases
13484 (modify-phases %standard-phases
13485 ;; check phase needs to be run before the build phase. If not,
13486 ;; coverage-test-runner looks for tests for the built source files,
13487 ;; and fails.
13488 (delete 'check)
13489 (add-before 'build 'check
13490 (lambda _
13491 ;; Disable python3 tests
13492 (substitute* "check"
13493 (("python3") "# python3"))
13494 (invoke "./check"))))))
13495 (native-inputs
13496 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13497 ("python2-pep8" ,python2-pep8)))
13498 (propagated-inputs
13499 `(("python2-pyaml" ,python2-pyaml)))
13500 (home-page "https://liw.fi/cliapp/")
13501 (synopsis "Python framework for command line programs")
13502 (description "@code{python2-cliapp} is a python framework for
13503command line programs. It contains the typical stuff such programs
13504need to do, such as parsing the command line for options, and
13505iterating over input files.")
13506 (license license:gpl2+)))
13507
13508(define-public python2-ttystatus
13509 (package
13510 (name "python2-ttystatus")
13511 (version "0.36")
13512 (source
13513 (origin
13514 (method url-fetch)
13515 (uri (string-append
13516 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13517 version ".tar.gz"))
13518 (sha256
13519 (base32
13520 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
13521 (build-system python-build-system)
13522 (native-inputs
13523 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13524 ("python2-pep8" ,python2-pep8)))
13525 (arguments
13526 `(#:python ,python-2
13527 #:phases
13528 (modify-phases %standard-phases
13529 ;; check phase needs to be run before the build phase. If not,
13530 ;; coverage-test-runner looks for tests for the built source files,
13531 ;; and fails.
13532 (delete 'check)
13533 (add-before 'build 'check
13534 (lambda _ (invoke "make" "check"))))))
13535 (home-page "https://liw.fi/ttystatus/")
13536 (synopsis "Python library for showing progress reporting and
13537status updates on terminals")
13538 (description "@code{python2-ttystatus} is a python library for
13539showing progress reporting and status updates on terminals, for
13540command line programs. Output is automatically adapted to the width
13541of the terminal: truncated if it does not fit, and resized if the
13542terminal size changes.")
13543 (license license:gpl3+)))
13544
13545(define-public python2-tracing
13546 (package
13547 (name "python2-tracing")
13548 (version "0.10")
13549 (source
13550 (origin
13551 (method url-fetch)
13552 (uri (string-append
13553 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13554 version ".tar.gz"))
13555 (sha256
13556 (base32
13557 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13558 (build-system python-build-system)
13559 (arguments
13560 `(#:python ,python-2))
13561 (home-page "https://liw.fi/tracing/")
13562 (synopsis "Python debug logging helper")
13563 (description "@code{python2-tracing} is a python library for
13564logging debug messages. It provides a way to turn debugging messages
13565on and off, based on the filename they occur in. It is much faster
13566than using @code{logging.Filter} to accomplish the same thing, which
13567matters when code is run in production mode. The actual logging still
13568happens using the @code{logging} library.")
13569 (license license:gpl3+)))
13570
13571(define-public python2-larch
13572 (package
13573 (name "python2-larch")
13574 (version "1.20151025")
13575 (source
13576 (origin
13577 (method url-fetch)
13578 (uri (string-append
13579 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13580 version ".tar.gz"))
13581 (patches (search-patches
13582 "python2-larch-coverage-4.0a6-compatibility.patch"))
13583 (sha256
13584 (base32
13585 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13586 (build-system python-build-system)
13587 (arguments
13588 `(#:python ,python-2
13589 #:phases
13590 (modify-phases %standard-phases
13591 ;; check phase needs to be run before the build phase. If not,
13592 ;; coverage-test-runner looks for tests for the built source files,
13593 ;; and fails.
13594 (delete 'check)
13595 (add-before 'build 'check
13596 (lambda _ (invoke "make" "check"))))))
13597 (native-inputs
13598 `(("cmdtest" ,cmdtest)
13599 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13600 (propagated-inputs
13601 `(("python2-tracing" ,python2-tracing)))
13602 (home-page "https://liw.fi/larch/")
13603 (synopsis "Python copy-on-write B-tree library")
13604 (description "@code{python2-larch} is an implementation of
13605particular kind of B-tree, based on research by Ohad Rodeh. See
13606@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13607on the data structure.
13608
13609The distinctive feature of this B-tree is that a node is never
13610(conceptually) modified. Instead, all updates are done by
13611copy-on-write. This makes it easy to clone a tree, and modify only the
13612clone, while other processes access the original tree.")
13613 (license license:gpl3+)))
13614
13615(define-public python-astroid
13616 (package
13617 (name "python-astroid")
13618 (version "2.3.3")
13619 (source
13620 (origin
13621 (method url-fetch)
13622 (uri (pypi-uri "astroid" version))
13623 (sha256
13624 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
13625 (build-system python-build-system)
13626 (propagated-inputs
13627 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13628 ("python-six" ,python-six)
13629 ("python-typed-ast" ,python-typed-ast)
13630 ("python-wrapt" ,python-wrapt)))
13631 (native-inputs
13632 `(("python-dateutil" ,python-dateutil)
13633 ("python-nose" ,python-nose)
13634 ("python-pytest" ,python-pytest)
13635 ("python-pytest-runner" ,python-pytest-runner)))
13636 (arguments
13637 `(#:phases
13638 (modify-phases %standard-phases
13639 (add-after 'unpack 'remove-spurious-test
13640 (lambda _
13641 ;; This can be removed after upgrading from python-3.7
13642 ;; https://github.com/PyCQA/astroid/issues/593
13643 ;; https://bugs.python.org/issue34056
13644 (delete-file "astroid/tests/unittest_modutils.py")
13645 #t))
13646 (replace 'check
13647 (lambda _
13648 (invoke "pytest" "astroid"))))))
13649 (home-page "https://github.com/PyCQA/astroid")
13650 (synopsis "Common base representation of python source code for pylint and
13651other projects")
13652 (description "@code{python-astroid} provides a common base representation
13653of python source code for projects such as pychecker, pyreverse, pylint, etc.
13654
13655It provides a compatible representation which comes from the _ast module. It
13656rebuilds the tree generated by the builtin _ast module by recursively walking
13657down the AST and building an extended ast. The new node classes have
13658additional methods and attributes for different usages. They include some
13659support for static inference and local name scopes. Furthermore, astroid
13660builds partial trees by inspecting living objects.")
13661 (license license:lgpl2.1+)
13662 (properties `((python2-variant . ,(delay python2-astroid))))))
13663
13664(define-public python2-astroid
13665 (let ((base (package-with-python2
13666 (strip-python2-variant python-astroid))))
13667 (package (inherit base)
13668 ;; Version 2.x removes python2 support.
13669 (version "1.6.5")
13670 (source
13671 (origin
13672 (method url-fetch)
13673 (uri (pypi-uri "astroid" version))
13674 (sha256
13675 (base32
13676 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13677 (arguments
13678 (substitute-keyword-arguments (package-arguments base)
13679 ((#:phases phases)
13680 `(modify-phases ,phases
13681 (add-after 'unpack 'remove-spurious-test
13682 (lambda _
13683 ;; https://github.com/PyCQA/astroid/issues/276
13684 (delete-file "astroid/tests/unittest_brain.py")
13685 #t))
13686 (replace 'check
13687 (lambda _
13688 (invoke"python" "-m" "unittest" "discover"
13689 "-p" "unittest*.py")))))))
13690 (native-inputs `())
13691 (propagated-inputs
13692 `(("python2-backports-functools-lru-cache"
13693 ,python2-backports-functools-lru-cache)
13694 ("python2-enum34" ,python2-enum34)
13695 ("python2-singledispatch" ,python2-singledispatch)
13696 ,@(alist-delete "python-typed-ast"
13697 (package-propagated-inputs base)))))))
13698
13699(define-public python-isort
13700 (package
13701 (name "python-isort")
13702 (version "4.3.4")
13703 (source
13704 (origin
13705 (method git-fetch)
13706 (uri (git-reference
13707 ;; Tests pass only from the Github sources
13708 (url "https://github.com/timothycrosley/isort")
13709 (commit version)))
13710 (file-name (git-file-name name version))
13711 (sha256
13712 (base32
13713 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
13714 (build-system python-build-system)
13715 (native-inputs
13716 `(("python-mock" ,python-mock)
13717 ("python-pytest" ,python-pytest)))
13718 (home-page "https://github.com/timothycrosley/isort")
13719 (synopsis "Python utility/library to sort python imports")
13720 (description "@code{python-isort} is a python utility/library to sort
13721imports alphabetically, and automatically separated into sections. It
13722provides a command line utility, a python library and plugins for various
13723editors.")
13724 (license license:expat)
13725 (properties `((python2-variant . ,(delay python2-isort))))))
13726
13727(define-public python2-isort
13728 (let ((base (package-with-python2
13729 (strip-python2-variant python-isort))))
13730 (package (inherit base)
13731 (native-inputs
13732 `(("python2-futures" ,python2-futures)
13733 ,@(package-native-inputs base))))))
13734
13735(define-public python2-backports-functools-lru-cache
13736 (package
13737 (name "python2-backports-functools-lru-cache")
13738 (version "1.5")
13739 (source
13740 (origin
13741 (method url-fetch)
13742 ;; only the pypi tarballs contain the necessary metadata
13743 (uri (pypi-uri "backports.functools_lru_cache" version))
13744 (sha256
13745 (base32
13746 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
13747 (build-system python-build-system)
13748 (native-inputs
13749 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13750 (arguments
13751 `(#:python ,python-2))
13752 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13753 (synopsis "Backport of functools.lru_cache from Python 3.3")
13754 (description "@code{python2-backports-functools-lru-cache} is a backport
13755of @code{functools.lru_cache} from python 3.3.")
13756 (license license:expat)))
13757
13758(define-public python-configparser
13759 (package
13760 (name "python-configparser")
13761 (version "3.7.1")
13762 (source
13763 (origin
13764 (method url-fetch)
13765 (uri (pypi-uri "configparser" version))
13766 (sha256
13767 (base32
13768 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
13769 (build-system python-build-system)
13770 (home-page "https://github.com/jaraco/configparser/")
13771 (synopsis "Backport of configparser from python 3.5")
13772 (description "@code{python-configparser} is a backport of
13773@code{configparser} from Python 3.5 so that it can be used directly
13774in other versions.")
13775 (license license:expat)))
13776
13777(define-public python2-configparser
13778 (package-with-python2 python-configparser))
13779
13780(define-public python-mando
13781 (package
13782 (name "python-mando")
13783 (version "0.6.4")
13784 (source (origin
13785 (method url-fetch)
13786 (uri (pypi-uri "mando" version))
13787 (sha256
13788 (base32
13789 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13790 (build-system python-build-system)
13791 (propagated-inputs
13792 `(("python-rst2ansi" ,python-rst2ansi)
13793 ("python-six" ,python-six)))
13794 (native-inputs
13795 `(("python-pytest" ,python-pytest)))
13796 (home-page "https://mando.readthedocs.org/")
13797 (synopsis
13798 "Wrapper around argparse, allowing creation of complete CLI applications")
13799 (description
13800 "This package is a wrapper around argparse, allowing you to write complete CLI
13801applications in seconds while maintaining all the flexibility.")
13802 (license license:expat)))
13803
13804(define-public python2-mando
13805 (package-with-python2 python-mando))
13806
13807(define-public python2-argparse
13808 (package
13809 (name "python2-argparse")
13810 (version "1.4.0")
13811 (source
13812 (origin
13813 (method url-fetch)
13814 (uri (pypi-uri "argparse" version))
13815 (sha256
13816 (base32
13817 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13818 (build-system python-build-system)
13819 (arguments
13820 `(#:python ,python-2))
13821 (home-page "https://github.com/ThomasWaldmann/argparse/")
13822 (synopsis "Python command-line parsing library")
13823 (description
13824 "This package is mostly for people who want to have @code{argparse} on
13825older Pythons because it was not part of the standard library back then.")
13826 (license license:psfl)))
13827
13828(define-public python-fudge
13829 (package
13830 (name "python-fudge")
13831 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13832 ;; package, which is currently the only use of this package.
13833 (version "0.9.6")
13834 (source
13835 (origin
13836 (method url-fetch)
13837 (uri (pypi-uri "fudge" version))
13838 (sha256
13839 (base32
13840 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13841 (build-system python-build-system)
13842 (arguments
13843 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13844 (home-page "https://github.com/fudge-py/fudge")
13845 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13846 (description
13847 "Fudge is a Python module for using fake objects (mocks and stubs) to
13848test real ones.
13849
13850In readable Python code, you declare the methods available on your fake object
13851and how they should be called. Then you inject that into your application and
13852start testing. This declarative approach means you don’t have to record and
13853playback actions and you don’t have to inspect your fakes after running code.
13854If the fake object was used incorrectly then you’ll see an informative
13855exception message with a traceback that points to the culprit.")
13856 (license license:expat)))
13857
13858(define-public python2-fudge
13859 (package-with-python2 python-fudge))
13860
13861(define-public python-mwclient
13862 (package
13863 (name "python-mwclient")
13864 (version "0.10.0")
13865 (source
13866 (origin
13867 (method git-fetch)
13868 ;; The PyPI version wouldn't contain tests.
13869 (uri (git-reference
13870 (url "https://github.com/mwclient/mwclient")
13871 (commit (string-append "v" version))))
13872 (file-name (git-file-name name version))
13873 (sha256
13874 (base32
13875 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
13876 (build-system python-build-system)
13877 (propagated-inputs
13878 `(("python-requests-oauthlib" ,python-requests-oauthlib)
13879 ("python-six" ,python-six)))
13880 (native-inputs
13881 `(("python-mock" ,python-mock)
13882 ("python-pytest" ,python-pytest)
13883 ("python-pytest-cov" ,python-pytest-cov)
13884 ("python-pytest-runner" ,python-pytest-runner)
13885 ("python-responses" ,python-responses)))
13886 (home-page "https://github.com/btongminh/mwclient")
13887 (synopsis "MediaWiki API client")
13888 (description "This package provides a MediaWiki API client.")
13889 (license license:expat)))
13890
13891(define-public python2-mwclient
13892 (package-with-python2 python-mwclient))
13893
13894(define-public python-utils
13895 (package
13896 (name "python-utils")
13897 (version "2.1.0")
13898 (source (origin
13899 (method url-fetch)
13900 (uri (pypi-uri "python-utils" version))
13901 (sha256
13902 (base32
13903 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13904 (build-system python-build-system)
13905 (native-inputs
13906 `(("pytest-runner" ,python-pytest-runner)
13907 ("pytest" ,python-pytest)
13908 ("six" ,python-six)))
13909 (home-page "https://github.com/WoLpH/python-utils")
13910 (synopsis "Convenient utilities not included with the standard Python install")
13911 (description
13912 "Python Utils is a collection of small Python functions and classes which
13913make common patterns shorter and easier.")
13914 (license license:bsd-2)))
13915
13916(define-public python2-utils
13917 (package-with-python2 python-utils))
13918
13919(define-public python-diff-match-patch
13920 (package
13921 (name "python-diff-match-patch")
13922 (version "20121119")
13923 (source
13924 (origin
13925 (method url-fetch)
13926 (uri (pypi-uri "diff-match-patch" version))
13927 (sha256
13928 (base32
13929 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13930 (build-system python-build-system)
13931 (home-page "https://code.google.com/p/google-diff-match-patch")
13932 (synopsis "Synchronize plain text")
13933 (description "Diff Match and Patch libraries offer robust algorithms to
13934perform the operations required for synchronizing plain text.")
13935 (license license:asl2.0)))
13936
13937(define-public python2-diff-match-patch
13938 (package-with-python2 python-diff-match-patch))
13939
13940(define-public python-dirsync
13941 (package
13942 (name "python-dirsync")
13943 (version "2.2.3")
13944 (source
13945 (origin
13946 (method url-fetch)
13947 (uri (pypi-uri "dirsync" version))
13948 (sha256
13949 (base32
13950 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13951 (build-system python-build-system)
13952 (propagated-inputs
13953 `(("six" ,python-six)))
13954 (home-page "https://bitbucket.org/tkhyn/dirsync")
13955 (synopsis "Advanced directory tree synchronisation tool")
13956 (description "Advanced directory tree synchronisation tool.")
13957 (license license:expat)))
13958
13959(define-public python2-dirsync
13960 (package-with-python2 python-dirsync))
13961
13962(define-public python-levenshtein
13963 (package
13964 (name "python-levenshtein")
13965 (version "0.12.0")
13966 (source
13967 (origin
13968 (method url-fetch)
13969 (uri (pypi-uri "python-Levenshtein" version))
13970 (sha256
13971 (base32
13972 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13973 (build-system python-build-system)
13974 (home-page "https://github.com/ztane/python-Levenshtein")
13975 (synopsis "Fast computation of Levenshtein distance and string similarity")
13976 (description
13977 "The Levenshtein Python C extension module contains functions for fast computation of
13978@enumerate
13979@item Levenshtein (edit) distance, and edit operations
13980@item string similarity
13981@item approximate median strings, and generally string averaging
13982@item string sequence and set similarity
13983@end enumerate
13984It supports both normal and Unicode strings.")
13985 (license license:gpl2+)))
13986
13987(define-public python2-levenshtein
13988 (package-with-python2 python-levenshtein))
13989
13990(define-public python-scandir
13991 (package
13992 (name "python-scandir")
13993 (version "1.9.0")
13994 (source
13995 (origin
13996 (method url-fetch)
13997 (uri (pypi-uri "scandir" version))
13998 (sha256
13999 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
14000 (build-system python-build-system)
14001 (arguments
14002 `(#:phases (modify-phases %standard-phases
14003 (replace 'check
14004 (lambda _
14005 (invoke "python" "test/run_tests.py"))))))
14006 (home-page "https://github.com/benhoyt/scandir")
14007 (synopsis "Directory iteration function")
14008 (description
14009 "Directory iteration function like os.listdir(), except that instead of
14010returning a list of bare filenames, it yields DirEntry objects that include
14011file type and stat information along with the name. Using scandir() increases
14012the speed of os.walk() by 2-20 times (depending on the platform and file
14013system) by avoiding unnecessary calls to os.stat() in most cases.
14014
14015This package is part of the Python standard library since version 3.5.")
14016 (license license:bsd-3)))
14017
14018(define-public python2-scandir
14019 (package-with-python2 python-scandir))
14020
14021(define-public python2-stemming
14022 (package
14023 (name "python2-stemming")
14024 (version "1.0.1")
14025 (source
14026 (origin
14027 (method url-fetch)
14028 (uri (pypi-uri "stemming" version))
14029 (sha256
14030 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14031 (build-system python-build-system)
14032 (arguments
14033 `(#:python ,python-2))
14034 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14035 (synopsis "Python implementations of various stemming algorithms")
14036 (description
14037 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14038stemming algorithms for English. These implementations are straightforward and
14039efficient, unlike some Python versions of the same algorithms available on the
14040Web. This package is an extraction of the stemming code included in the Whoosh
14041search engine.")
14042 (license license:public-domain)))
14043
14044(define-public python-factory-boy
14045 (package
14046 (name "python-factory-boy")
14047 (version "2.8.1")
14048 (source
14049 (origin
14050 (method url-fetch)
14051 (uri (pypi-uri "factory_boy" version))
14052 (sha256
14053 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14054 (build-system python-build-system)
14055 (arguments
14056 ;; Tests are not included in the tarball.
14057 `(#:tests? #f))
14058 (propagated-inputs
14059 `(("faker" ,python-faker)))
14060 (home-page "https://github.com/benhoyt/scandir")
14061 (synopsis "Versatile test fixtures replacement")
14062 (description
14063 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14064
14065As a fixtures replacement tool, it aims to replace static, hard to maintain
14066fixtures with easy-to-use factories for complex object.
14067
14068Instead of building an exhaustive test setup with every possible combination
14069of corner cases, factory_boy allows you to use objects customized for the
14070current test, while only declaring the test-specific fields")
14071 (license license:expat)))
14072
14073(define-public python2-factory-boy
14074 (package-with-python2 python-factory-boy))
14075
14076(define-public python-translate-toolkit
14077 (package
14078 (name "python-translate-toolkit")
14079 (version "2.1.0")
14080 (source
14081 (origin
14082 (method url-fetch)
14083 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14084 (sha256
14085 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14086 (build-system python-build-system)
14087 (native-inputs
14088 `(("python-pytest" ,python-pytest)
14089 ("python-sphinx" ,python-sphinx)))
14090 (propagated-inputs
14091 `(("python-babel" ,python-babel)
14092 ("python-beautifulsoup4" ,python-beautifulsoup4)
14093 ("python-chardet" ,python-chardet)
14094 ("python-diff-match-patch" ,python-diff-match-patch)
14095 ("python-levenshtein" ,python-levenshtein)
14096 ("python-lxml" ,python-lxml)
14097 ("python-six" ,python-six)
14098 ("python-vobject" ,python-vobject)
14099 ("python-pyyaml" ,python-pyyaml)))
14100 (arguments
14101 ;; TODO: tests are not run, because they end with
14102 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14103 ;; 'parse_funcs'
14104 ;; during test setup.
14105 `(#:tests? #f))
14106 (home-page "https://toolkit.translatehouse.org")
14107 (synopsis "Tools and API for translation and localization engineering")
14108 (description
14109 "Tools and API for translation and localization engineering. It contains
14110several utilities, as well as an API for building localization tools.")
14111 (license license:gpl2+)))
14112
14113(define-public python2-translate-toolkit
14114 (package-with-python2 python-translate-toolkit))
14115
14116(define-public python-packaging
14117 (package
14118 (name "python-packaging")
14119 (version "20.0")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (pypi-uri "packaging" version))
14124 ;; XXX: The URL in the patch file is wrong, it should be
14125 ;; <https://github.com/pypa/packaging/pull/256>.
14126 (patches (search-patches "python-packaging-test-arch.patch"))
14127 (sha256
14128 (base32
14129 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
14130 (build-system python-build-system)
14131 (arguments
14132 `(#:phases (modify-phases %standard-phases
14133 (replace 'check
14134 (lambda _ (invoke "py.test" "-vv"))))))
14135 (native-inputs
14136 `(("python-pretend" ,python-pretend)
14137 ("python-pytest" ,python-pytest)))
14138 (propagated-inputs
14139 `(("python-pyparsing" ,python-pyparsing)
14140 ("python-six" ,python-six)))
14141 (home-page "https://github.com/pypa/packaging")
14142 (synopsis "Core utilities for Python packages")
14143 (description "Packaging is a Python module for dealing with Python packages.
14144It offers an interface for working with package versions, names, and dependency
14145information.")
14146 ;; From 'LICENSE': This software is made available under the terms of
14147 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14148 ;; Contributions to this software is made under the terms of *both* these
14149 ;; licenses.
14150 (license (list license:asl2.0 license:bsd-2))))
14151
14152(define-public python2-packaging
14153 (package-with-python2 python-packaging))
14154
14155(define-public python-relatorio
14156 (package
14157 (name "python-relatorio")
14158 (version "0.8.0")
14159 (source
14160 (origin
14161 (method url-fetch)
14162 (uri (pypi-uri "relatorio" version))
14163 (sha256
14164 (base32
14165 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
14166 (build-system python-build-system)
14167 (propagated-inputs
14168 `(("python-lxml" ,python-lxml)
14169 ("python-genshi" ,python-genshi)))
14170 (native-inputs
14171 `(("python-magic" ,python-magic)))
14172 (home-page "https://relatorio.tryton.org/")
14173 (synopsis "Templating library able to output ODT and PDF files")
14174 (description "Relatorio is a templating library which provides a way to
14175easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14176for more filetypes can be easily added by creating plugins for them.")
14177 (license license:gpl3+)))
14178
14179(define-public python2-relatorio
14180 (package-with-python2 python-relatorio))
14181
14182(define-public python-radon
14183 (package
14184 (name "python-radon")
14185 (version "4.1.0")
14186 (source
14187 (origin
14188 (method url-fetch)
14189 (uri (pypi-uri "radon" version))
14190 (sha256
14191 (base32
14192 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
14193 (build-system python-build-system)
14194 (arguments
14195 `(#:phases (modify-phases %standard-phases
14196 (replace 'check
14197 (lambda _
14198 (invoke "python" "radon/tests/run.py"))))))
14199 (propagated-inputs
14200 `(("python-colorama" ,python-colorama)
14201 ("python-flake8-polyfill" ,python-flake8-polyfill)
14202 ("python-mando" ,python-mando)))
14203 (native-inputs
14204 `(("python-pytest" ,python-pytest)
14205 ("python-pytest-mock" ,python-pytest-mock)))
14206 (home-page "https://radon.readthedocs.org/")
14207 (synopsis "Code Metrics in Python")
14208 (description "Radon is a Python tool which computes various code metrics.
14209Supported metrics are:
14210@itemize @bullet
14211@item raw metrics: SLOC, comment lines, blank lines, &c.
14212@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14213@item Halstead metrics (all of them)
14214@item the Maintainability Index (a Visual Studio metric)
14215@end itemize")
14216 (properties `((python2-variant . ,(delay python2-radon))))
14217 (license license:expat)))
14218
14219(define-public python2-radon
14220 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
14221 (package
14222 (inherit base)
14223 (propagated-inputs
14224 `(("python-configparser" ,python2-configparser)
14225 ("python-future" ,python2-future)
14226 ,@(package-propagated-inputs base))))))
14227
14228(define-public python-sure
14229 (package
14230 (name "python-sure")
14231 (version "1.4.11")
14232 (source
14233 (origin
14234 (method url-fetch)
14235 (uri (pypi-uri "sure" version))
14236 (sha256
14237 (base32
14238 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
14239 (build-system python-build-system)
14240 (propagated-inputs
14241 `(("python-mock" ,python-mock)
14242 ("python-six" ,python-six)))
14243 (native-inputs
14244 `(("python-nose" ,python-nose)))
14245 (home-page "https://github.com/gabrielfalcao/sure")
14246 (synopsis "Automated testing library in python for python")
14247 (description
14248 "Sure is a python library that leverages a DSL for writing assertions.
14249Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
14250 (license license:gpl3+)))
14251
14252(define-public python2-sure
14253 (package-with-python2 python-sure))
14254
14255(define-public python2-couleur
14256 ;; This package does not seem to support python3 at all, hence,
14257 ;; only the python2 variant definition is provided.
14258 (package
14259 (name "python2-couleur")
14260 (version "0.6.2")
14261 (source
14262 (origin
14263 (method url-fetch)
14264 (uri (pypi-uri "couleur" version))
14265 (sha256
14266 (base32
14267 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
14268 (build-system python-build-system)
14269 (arguments
14270 `(#:python ,python-2))
14271 (home-page "https://github.com/gabrielfalcao/couleur")
14272 (synopsis
14273 "ANSI terminal tool for python, colored shell and other handy fancy features")
14274 (description
14275 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
14276terminal such as coloured output in the shell, overwriting output, indentation, etc.")
14277 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
14278 ;; https://github.com/gabrielfalcao/couleur/issues/11
14279 (license license:lgpl3+)))
14280
14281(define-public python-misaka
14282 (package
14283 (name "python-misaka")
14284 (version "2.1.1")
14285 (source
14286 (origin
14287 (method url-fetch)
14288 (uri (pypi-uri "misaka" version))
14289 (sha256
14290 (base32
14291 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
14292 (build-system python-build-system)
14293 (arguments
14294 `(;; Line 37 of setup.py calls self.run_command('develop')
14295 ;; in the 'check' phase. This command seems to be trying
14296 ;; to write to
14297 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
14298 ;; for which it does not have the permission to write.
14299 #:tests? #f))
14300 (propagated-inputs
14301 `(("python-cffi" ,python-cffi)))
14302 (home-page "https://github.com/FSX/misaka")
14303 (synopsis "Python binding for Hoedown")
14304 (description
14305 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
14306library written in C. It features a fast HTML renderer and functionality to make custom
14307renderers (e.g. man pages or LaTeX).")
14308 (license license:expat)))
14309
14310(define-public python2-misaka
14311 (package-with-python2 python-misaka))
14312
14313(define-public python2-steadymark
14314 ;; This is forced into being a python2 only variant
14315 ;; due to its dependence on couleur that has no support
14316 ;; for python3
14317 (package
14318 (name "python2-steadymark")
14319 (version "0.7.3")
14320 (source
14321 (origin
14322 (method url-fetch)
14323 (uri (pypi-uri "steadymark" version))
14324 (sha256
14325 (base32
14326 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
14327 (build-system python-build-system)
14328 (native-inputs
14329 `(("python-couleur" ,python2-couleur)
14330 ("python-sure" ,python2-sure)
14331 ("python-misaka" ,python2-misaka)))
14332 (arguments
14333 `(#:python ,python-2
14334 #:phases
14335 (modify-phases %standard-phases
14336 (add-before 'build 'patch-setup-py
14337 (lambda _
14338 ;; Update requirements from dependency==version
14339 ;; to dependency>=version
14340 (substitute* "setup.py"
14341 (("==") ">="))
14342 #t)))))
14343 (home-page "https://github.com/gabrielfalcao/steadymark")
14344 (synopsis "Markdown-based test runner for python")
14345 (description
14346 "@code{Steadymark} allows documentation to be written in github-flavoured
14347markdown. The documentation may contain snippets of code surrounded by python
14348code blocks and @code{Steadymark} will find these snippets and run them, making
14349sure that there are no old malfunctional examples in the documentation examples.")
14350 (license license:expat)))
14351
14352(define-public python-jsonpointer
14353 (package
14354 (name "python-jsonpointer")
14355 (version "1.10")
14356 (source
14357 (origin
14358 (method url-fetch)
14359 (uri (pypi-uri "jsonpointer" version))
14360 (sha256
14361 (base32
14362 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
14363 (build-system python-build-system)
14364 (home-page "https://github.com/stefankoegl/python-json-pointer")
14365 (synopsis "Identify specific nodes in a JSON document")
14366 (description "@code{jsonpointer} allows you to access specific nodes
14367by path in a JSON document (see RFC 6901).")
14368 (license license:bsd-3)))
14369
14370(define-public python2-jsonpointer
14371 (package-with-python2 python-jsonpointer))
14372
14373(define-public python-jsonpatch
14374 (package
14375 (name "python-jsonpatch")
14376 (version "1.16")
14377 (source
14378 (origin
14379 (method git-fetch)
14380 ;; pypi version lacks tests.js
14381 (uri (git-reference
14382 (url "https://github.com/stefankoegl/python-json-patch")
14383 (commit (string-append "v" version))))
14384 (file-name (git-file-name name version))
14385 (sha256
14386 (base32
14387 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
14388 (build-system python-build-system)
14389 (native-inputs
14390 `(("python-jsonpointer" ,python-jsonpointer)))
14391 (home-page "https://github.com/stefankoegl/python-json-patch")
14392 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
14393 (description "@code{jsonpatch} is a library and program that allows
14394applying JSON Patches according to RFC 6902.")
14395 (license license:bsd-3)))
14396
14397(define-public python2-jsonpatch
14398 (package-with-python2 python-jsonpatch))
14399
14400(define-public python-jsonpatch-0.4
14401 (package (inherit python-jsonpatch)
14402 (name "python-jsonpatch")
14403 (version "0.4")
14404 (source
14405 (origin
14406 (method git-fetch)
14407 (uri (git-reference
14408 (url "https://github.com/stefankoegl/python-json-patch")
14409 (commit (string-append "v" version))))
14410 (file-name (git-file-name name version))
14411 (sha256
14412 (base32
14413 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
14414
14415(define-public python2-jsonpatch-0.4
14416 (package-with-python2 python-jsonpatch-0.4))
14417
14418(define-public python-rfc3986
14419 (package
14420 (name "python-rfc3986")
14421 (version "1.1.0")
14422 (source (origin
14423 (method url-fetch)
14424 (uri (pypi-uri "rfc3986" version))
14425 (sha256
14426 (base32
14427 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
14428 (build-system python-build-system)
14429 (arguments
14430 `(#:modules ((guix build utils)
14431 (guix build python-build-system)
14432 (ice-9 ftw)
14433 (srfi srfi-1)
14434 (srfi srfi-26))
14435 #:phases
14436 (modify-phases %standard-phases
14437 (replace 'check
14438 (lambda _
14439 (let ((cwd (getcwd)))
14440 (setenv "PYTHONPATH"
14441 (string-append cwd "/build/"
14442 (find (cut string-prefix? "lib" <>)
14443 (scandir (string-append cwd "/build")))
14444 ":"
14445 (getenv "PYTHONPATH")))
14446 (invoke "pytest" "-v")))))))
14447 (native-inputs
14448 `(("python-pytest" ,python-pytest)))
14449 (home-page "https://rfc3986.readthedocs.io/")
14450 (synopsis "Parse and validate URI references")
14451 (description
14452 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14453validation and authority parsing. This module also supports RFC@tie{}6874
14454which adds support for zone identifiers to IPv6 addresses.")
14455 (license license:asl2.0)))
14456
14457(define-public python2-rfc3986
14458 (package-with-python2 python-rfc3986))
14459
14460(define-public python-rfc3987
14461 (package
14462 (name "python-rfc3987")
14463 (version "1.3.7")
14464 (source
14465 (origin
14466 (method url-fetch)
14467 (uri (pypi-uri "rfc3987" version))
14468 (sha256
14469 (base32
14470 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14471 (build-system python-build-system)
14472 (home-page "https://pypi.org/project/rfc3987/")
14473 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14474 (description "@code{rfc3987} provides routines for parsing and
14475validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14476 (license license:gpl3+)))
14477
14478(define-public python2-rfc3987
14479 (package-with-python2 python-rfc3987))
14480
14481(define-public python-validators
14482 (package
14483 (name "python-validators")
14484 (version "0.14.2")
14485 (source (origin
14486 (method url-fetch)
14487 (uri (pypi-uri "validators" version))
14488 (sha256
14489 (base32
14490 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
14491 (build-system python-build-system)
14492 (arguments
14493 '(#:phases (modify-phases %standard-phases
14494 (replace 'check
14495 (lambda _
14496 (invoke "pytest" "-vv"))))))
14497 (propagated-inputs
14498 `(("python-decorator" ,python-decorator)
14499 ("python-six" ,python-six)))
14500 (native-inputs
14501 `(("python-flake8" ,python-flake8)
14502 ("python-isort" ,python-isort)
14503 ("python-pytest" ,python-pytest)))
14504 (home-page "https://github.com/kvesteri/validators")
14505 (synopsis "Data validation library")
14506 (description
14507 "This package contains validators for different things such as email
14508addresses, IP addresses, URLs, hashes and more. It has been designed to
14509be easy to use and not require defining a schema or form just to validate
14510some input.")
14511 (license license:expat)))
14512
14513(define-public python2-validators
14514 (package-with-python2 python-validators))
14515
14516(define-public python-validate-email
14517 (package
14518 (name "python-validate-email")
14519 (version "1.3")
14520 (source
14521 (origin
14522 (method url-fetch)
14523 (uri (pypi-uri "validate_email" version))
14524 (sha256
14525 (base32
14526 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14527 (build-system python-build-system)
14528 (home-page "https://github.com/syrusakbary/validate_email")
14529 (synopsis "Verifies if an email address is valid and really exists")
14530 (description "@code{validate_email} can be used to verify if an email
14531address is valid and really exists.")
14532 (license license:lgpl3+)))
14533
14534(define-public python2-validate-email
14535 (package-with-python2 python-validate-email))
14536
14537(define-public python-flex
14538 (package
14539 (name "python-flex")
14540 (version "6.10.0")
14541 (source
14542 (origin
14543 (method url-fetch)
14544 (uri (pypi-uri "flex" version))
14545 (sha256
14546 (base32
14547 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14548 (build-system python-build-system)
14549 (propagated-inputs
14550 `(("python-click" ,python-click)
14551 ("python-iso8601" ,python-iso8601)
14552 ("python-jsonpointer" ,python-jsonpointer)
14553 ("python-pyyaml" ,python-pyyaml)
14554 ("python-requests" ,python-requests)
14555 ("python-rfc3987" ,python-rfc3987)
14556 ("python-six" ,python-six)
14557 ("python-validate-email" ,python-validate-email)))
14558 (home-page "https://github.com/pipermerriam/flex")
14559 (synopsis "Validates Swagger schemata")
14560 (description "@code{flex} can be used to validate Swagger schemata.")
14561 (license license:bsd-3)))
14562
14563(define-public python2-flex
14564 (package-with-python2 python-flex))
14565
14566(define-public python-marshmallow
14567 (package
14568 (name "python-marshmallow")
14569 (version "3.0.0b14")
14570 (source
14571 (origin
14572 (method url-fetch)
14573 (uri (pypi-uri "marshmallow" version))
14574 (sha256
14575 (base32
14576 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14577 (build-system python-build-system)
14578 (propagated-inputs
14579 `(("python-dateutil" ,python-dateutil)
14580 ("python-simplejson" ,python-simplejson)))
14581 (native-inputs
14582 `(("python-pytest" ,python-pytest)
14583 ("python-pytz" ,python-pytz)))
14584 (home-page "https://github.com/marshmallow-code/marshmallow")
14585 (synopsis "Convert complex datatypes to and from native
14586Python datatypes.")
14587 (description "@code{marshmallow} provides a library for converting
14588complex datatypes to and from native Python datatypes.")
14589 (license license:expat)))
14590
14591(define-public python2-marshmallow
14592 (package-with-python2 python-marshmallow))
14593
14594(define-public python-apispec
14595 (package
14596 (name "python-apispec")
14597 (version "0.25.3")
14598 (source
14599 (origin
14600 (method url-fetch)
14601 (uri (pypi-uri "apispec" version))
14602 (sha256
14603 (base32
14604 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14605 (build-system python-build-system)
14606 (propagated-inputs
14607 `(("python-pyyaml" ,python-pyyaml)))
14608 (native-inputs
14609 `(("python-pytest" ,python-pytest)
14610 ("python-flask" ,python-flask)
14611 ("python-marshmallow" ,python-marshmallow)
14612 ("python-tornado" ,python-tornado)
14613 ("python-bottle" ,python-bottle)
14614 ("python-mock" ,python-mock)))
14615 (home-page "https://github.com/marshmallow-code/apispec")
14616 (synopsis "Swagger 2.0 API specification generator")
14617 (description "@code{python-apispec} is a pluggable API specification
14618generator. Currently supports the OpenAPI specification (f.k.a.
14619Swagger 2.0).")
14620 (license license:expat)))
14621
14622(define-public python2-apispec
14623 (package-with-python2 python-apispec))
14624
14625(define-public python-flasgger
14626 (package
14627 (name "python-flasgger")
14628 (version "0.6.3")
14629 (source
14630 (origin
14631 (method git-fetch)
14632 (uri (git-reference
14633 (url "https://github.com/rochacbruno/flasgger.git")
14634 (commit version)))
14635 (file-name (git-file-name name version))
14636 (sha256
14637 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
14638 (build-system python-build-system)
14639 (arguments
14640 `(#:phases
14641 (modify-phases %standard-phases
14642 (replace 'check
14643 (lambda* (#:key inputs outputs #:allow-other-keys)
14644 (substitute* "Makefile"
14645 (("flake8 flasgger --ignore=F403")
14646 "flake8 flasgger --ignore=E731,F403"))
14647 (setenv "PYTHONPATH" (string-append (getcwd)
14648 ":"
14649 (getenv "PYTHONPATH")))
14650 (invoke "py.test"))))))
14651 (propagated-inputs
14652 `(("python-flask" ,python-flask)
14653 ("python-pyyaml" ,python-pyyaml)
14654 ("python-jsonschema" ,python-jsonschema)
14655 ("python-mistune" ,python-mistune)
14656 ("python-six" ,python-six)))
14657 (native-inputs
14658 `(("python-decorator" ,python-decorator)
14659 ("python-flake8" ,python-flake8)
14660 ("python-flask-restful" ,python-flask-restful)
14661 ("python-flex" ,python-flex)
14662 ("python-pytest" ,python-pytest)
14663 ("python-pytest-cov" ,python-pytest-cov)
14664 ("python-marshmallow" ,python-marshmallow)
14665 ("python-apispec" ,python-apispec)))
14666 (home-page "https://github.com/rochacbruno/flasgger/")
14667 (synopsis "Extract Swagger specs from your Flask project")
14668 (description "@code{python-flasgger} allows extracting Swagger specs
14669from your Flask project. It is a fork of Flask-Swagger.")
14670 (license license:expat)))
14671
14672(define-public python2-flasgger
14673 (package-with-python2 python-flasgger))
14674
14675(define-public python-swagger-spec-validator
14676 (package
14677 (name "python-swagger-spec-validator")
14678 (version "2.4.3")
14679 (source
14680 (origin
14681 (method url-fetch)
14682 (uri (pypi-uri "swagger-spec-validator" version))
14683 (sha256
14684 (base32
14685 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
14686 (build-system python-build-system)
14687 (propagated-inputs
14688 `(("python-jsonschema" ,python-jsonschema)
14689 ("python-pyyaml" ,python-pyyaml)
14690 ("python-six" ,python-six)))
14691 (home-page
14692 "https://github.com/Yelp/swagger_spec_validator")
14693 (synopsis "Validation of Swagger specifications")
14694 (description "@code{swagger_spec_validator} provides a library for
14695validating Swagger API specifications.")
14696 (license license:asl2.0)))
14697
14698(define-public python2-swagger-spec-validator
14699 (package-with-python2 python-swagger-spec-validator))
14700
14701(define-public python-apache-libcloud
14702 (package
14703 (name "python-apache-libcloud")
14704 (version "2.4.0")
14705 (source
14706 (origin
14707 (method url-fetch)
14708 (uri (pypi-uri "apache-libcloud" version))
14709 (sha256
14710 (base32
14711 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
14712 (build-system python-build-system)
14713 (arguments
14714 `(#:phases
14715 (modify-phases %standard-phases
14716 (add-after 'unpack 'patch-ssh
14717 (lambda* (#:key inputs #:allow-other-keys)
14718 (substitute* "libcloud/compute/ssh.py"
14719 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
14720 "/bin/ssh" "'")))
14721 #t))
14722 (add-after 'unpack 'patch-tests
14723 (lambda _
14724 (substitute* "./libcloud/test/test_file_fixtures.py"
14725 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
14726 (("def _ascii") "def _raw_data(self, method, url, body, headers):
14727 return (httplib.OK,
14728 \"1234abcd\",
14729 {\"test\": \"value\"},
14730 httplib.responses[httplib.OK])
14731 def _ascii"))
14732 (substitute* "libcloud/test/compute/test_ssh_client.py"
14733 (("class ShellOutSSHClientTests")
14734 "@unittest.skip(\"Guix container doesn't have ssh service\")
14735class ShellOutSSHClientTests")
14736 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
14737 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
14738 (("'.xF0', '.x90', '.x8D', '.x88'")
14739 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
14740 #t))
14741 (add-before 'check 'copy-secret
14742 (lambda _
14743 (copy-file "libcloud/test/secrets.py-dist"
14744 "libcloud/test/secrets.py")
14745 #t)))))
14746 (inputs
14747 `(("openssh" ,openssh)))
14748 (propagated-inputs
14749 `(("python-paramiko" ,python-paramiko)
14750 ("python-requests" ,python-requests)))
14751 (native-inputs
14752 `(("python-lockfile" ,python-lockfile)
14753 ("python-mock" ,python-mock)
14754 ("python-pytest" ,python-pytest)
14755 ("python-pytest-runner" ,python-pytest-runner)
14756 ("python-requests-mock" ,python-requests-mock)))
14757 (home-page "https://libcloud.apache.org/")
14758 (synopsis "Unified Cloud API")
14759 (description "@code{libcloud} is a Python library for interacting with
14760many of the popular cloud service providers using a unified API.")
14761 (license license:asl2.0)))
14762
14763(define-public python2-apache-libcloud
14764 (package-with-python2 python-apache-libcloud))
14765
14766(define-public python-smmap
14767 (package
14768 (name "python-smmap")
14769 (version "3.0.1")
14770 (source
14771 (origin
14772 (method url-fetch)
14773 (uri (pypi-uri "smmap" version))
14774 (sha256
14775 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
14776 (build-system python-build-system)
14777 (native-inputs
14778 `(("python-nosexcover" ,python-nosexcover)))
14779 (home-page "https://github.com/Byron/smmap")
14780 (synopsis "Python sliding window memory map manager")
14781 (description "@code{smmap} is a pure Python implementation of a sliding
14782window memory map manager.")
14783 (license license:bsd-3)))
14784
14785(define-public python-smmap2
14786 (deprecated-package "python-smmap2" python-smmap))
14787
14788(define-public python2-smmap
14789 (package-with-python2 python-smmap))
14790
14791(define-public python2-smmap2
14792 (deprecated-package "python2-smmap2" python2-smmap))
14793
14794(define-public python-regex
14795 (package
14796 (name "python-regex")
14797 (version "2019.04.14")
14798 (source (origin
14799 (method url-fetch)
14800 (uri (pypi-uri "regex" version))
14801 (sha256
14802 (base32
14803 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
14804 ;; TODO: Fix and enable regex_test.py tests that complain about the
14805 ;; test.support module not existing.
14806 (build-system python-build-system)
14807 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
14808 (synopsis "Alternative regular expression module")
14809 (description "This regular expression implementation is backwards-
14810compatible with the standard @code{re} module, but offers additional
14811functionality like full case-folding for case-insensitive matches in Unicode.")
14812 (license license:psfl)))
14813
14814(define-public python2-regex
14815 (package-with-python2 python-regex))
14816
14817(define-public python2-pyopengl
14818 (package
14819 (name "python2-pyopengl")
14820 (version "3.1.0")
14821 (source
14822 (origin
14823 (method url-fetch)
14824 (uri (pypi-uri "PyOpenGL" version))
14825 (sha256
14826 (base32
14827 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14828 (arguments
14829 `(#:python ,python-2))
14830 (build-system python-build-system)
14831 (home-page "http://pyopengl.sourceforge.net")
14832 (synopsis "Standard OpenGL bindings for Python")
14833 (description
14834 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14835related APIs. The binding is created using the standard @code{ctypes}
14836library.")
14837 (license license:bsd-3)))
14838
14839(define-public python2-pyopengl-accelerate
14840 (package
14841 (inherit python2-pyopengl)
14842 (name "python2-pyopengl-accelerate")
14843 (version "3.1.0")
14844 (source
14845 (origin
14846 (method url-fetch)
14847 (uri (pypi-uri "PyOpenGL-accelerate" version))
14848 (sha256
14849 (base32
14850 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14851 (synopsis "Acceleration code for PyOpenGL")
14852 (description
14853 "This is the Cython-coded accelerator module for PyOpenGL.")))
14854
14855(define-public python-rencode
14856 (package
14857 (name "python-rencode")
14858 (version "1.0.5")
14859 (source
14860 (origin
14861 (method url-fetch)
14862 (uri (pypi-uri "rencode" version))
14863 (sha256
14864 (base32
14865 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14866 (build-system python-build-system)
14867 (arguments
14868 `(#:phases
14869 (modify-phases %standard-phases
14870 (add-before 'check 'delete-bogus-test
14871 ;; This test requires /home/aresch/Downloads, which is not provided by
14872 ;; the build environment.
14873 (lambda _
14874 (delete-file "rencode/t.py")
14875 #t)))))
14876 (native-inputs `(("pkg-config" ,pkg-config)
14877 ("python-cython" ,python-cython)))
14878 (home-page "https://github.com/aresch/rencode")
14879 (synopsis "Serialization of heterogeneous data structures")
14880 (description
14881 "The @code{rencode} module is a data structure serialization library,
14882similar to @code{bencode} from the BitTorrent project. For complex,
14883heterogeneous data structures with many small elements, r-encoding stake up
14884significantly less space than b-encodings. This version of rencode is a
14885complete rewrite in Cython to attempt to increase the performance over the
14886pure Python module.")
14887 (license license:bsd-3)))
14888
14889(define-public python2-rencode
14890 (package-with-python2 python-rencode))
14891
14892(define-public python-xenon
14893 (package
14894 (name "python-xenon")
14895 (version "0.7.0")
14896 (source
14897 (origin
14898 (method url-fetch)
14899 (uri (pypi-uri "xenon" version))
14900 (sha256
14901 (base32
14902 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
14903 (build-system python-build-system)
14904 (native-inputs
14905 `(("python-pyyaml" ,python-pyyaml)
14906 ("python-radon" ,python-radon)
14907 ("python-requests" ,python-requests)
14908 ("python-flake8" ,python-flake8)
14909 ("python-tox" ,python-tox)))
14910 (arguments
14911 `(#:tests? #f ;test suite not shipped with the PyPI archive
14912 #:phases
14913 (modify-phases %standard-phases
14914 (add-before 'build 'patch-test-requirements
14915 (lambda _
14916 ;; Remove httpretty dependency for tests.
14917 (substitute* "setup.py"
14918 (("httpretty") ""))
14919 #t)))))
14920 (home-page "https://xenon.readthedocs.org/")
14921 (synopsis "Monitor code metrics for Python on your CI server")
14922 (description
14923 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14924Ideally, @code{xenon} is run every time code is committed. Through command
14925line options, various thresholds can be set for the complexity of code. It
14926will fail (i.e. it will exit with a non-zero exit code) when any of these
14927requirements is not met.")
14928 (license license:expat)))
14929
14930(define-public python2-xenon
14931 (package-with-python2 python-xenon))
14932
14933(define-public python-pysocks
14934 (package
14935 (name "python-pysocks")
14936 (version "1.7.0")
14937 (source
14938 (origin
14939 (method url-fetch)
14940 (uri (pypi-uri "PySocks" version))
14941 (sha256
14942 (base32
14943 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
14944 (build-system python-build-system)
14945 (arguments `(#:tests? #f))
14946 (home-page "https://github.com/Anorov/PySocks")
14947 (synopsis "SOCKS client module")
14948 (description "@code{pysocks} is an updated and semi-actively maintained
14949version of @code{SocksiPy} with bug fixes and extra features.")
14950 (license license:bsd-3)))
14951
14952(define-public python2-pysocks
14953 (package-with-python2 python-pysocks))
14954
14955(define-public python-pydiff
14956 (package
14957 (name "python-pydiff")
14958 (version "0.2")
14959 (source
14960 (origin
14961 (method url-fetch)
14962 (uri (pypi-uri "pydiff" version))
14963 (sha256
14964 (base32
14965 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14966 (build-system python-build-system)
14967 (home-page "https://github.com/myint/pydiff")
14968 (synopsis "Library to diff two Python files at the bytecode level")
14969 (description
14970 "@code{pydiff} makes it easy to look for actual code changes while
14971ignoring formatting changes.")
14972 (license license:expat)))
14973
14974(define-public python2-pydiff
14975 (package-with-python2 python-pydiff))
14976
14977(define-public python-tqdm
14978 (package
14979 (name "python-tqdm")
14980 (version "4.43.0")
14981 (source
14982 (origin
14983 (method url-fetch)
14984 (uri (pypi-uri "tqdm" version))
14985 (sha256
14986 (base32
14987 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
14988 (build-system python-build-system)
14989 (arguments
14990 '(#:phases (modify-phases %standard-phases
14991 (replace 'check
14992 (lambda* (#:key inputs outputs #:allow-other-keys)
14993 (add-installed-pythonpath inputs outputs)
14994 ;; This invokation is taken from tox.ini.
14995 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
14996 "-d" "-v" "tqdm/"))))))
14997 (native-inputs
14998 `(("python-nose" ,python-nose)))
14999 (home-page "https://github.com/tqdm/tqdm")
15000 (synopsis "Fast, extensible progress meter")
15001 (description
15002 "Make loops show a progress bar on the console by just wrapping any
15003iterable with @code{|tqdm(iterable)|}. Offers many options to define
15004design and layout.")
15005 (license (list license:mpl2.0 license:expat))))
15006
15007(define-public python2-tqdm
15008 (package-with-python2 python-tqdm))
15009
15010(define-public python-pkginfo
15011 (package
15012 (name "python-pkginfo")
15013 (version "1.4.2")
15014 (source
15015 (origin
15016 (method url-fetch)
15017 (uri (pypi-uri "pkginfo" version))
15018 (sha256
15019 (base32
15020 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
15021 (build-system python-build-system)
15022 (arguments
15023 ;; The tests are broken upstream.
15024 '(#:tests? #f))
15025 (home-page
15026 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
15027 (synopsis
15028 "Query metadatdata from sdists, bdists, and installed packages")
15029 (description
15030 "API to query the distutils metadata written in @file{PKG-INFO} inside a
15031source distriubtion (an sdist) or a binary distribution (e.g., created by
15032running bdist_egg). It can also query the EGG-INFO directory of an installed
15033distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
15034created by running @code{python setup.py develop}).")
15035 (license license:expat)))
15036
15037(define-public python2-pkginfo
15038 (package-with-python2 python-pkginfo))
15039
15040(define-public python-twine
15041 (package
15042 (name "python-twine")
15043 (version "1.9.1")
15044 (source
15045 (origin
15046 (method url-fetch)
15047 (uri (pypi-uri "twine" version))
15048 (sha256
15049 (base32
15050 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
15051 (build-system python-build-system)
15052 (propagated-inputs
15053 `(("python-tqdm" ,python-tqdm)
15054 ("python-pkginfo" ,python-pkginfo)
15055 ("python-requests" ,python-requests)
15056 ("python-requests-toolbelt" ,python-requests-toolbelt)))
15057 (home-page "https://github.com/pypa/twine")
15058 (synopsis "Collection of utilities for interacting with PyPI")
15059 (description
15060 "@code{twine} currently supports registering projects and uploading
15061distributions. It authenticates the user over HTTPS, allows them to pre-sign
15062their files and supports any packaging format (including wheels).")
15063 (license license:asl2.0)))
15064
15065(define-public python2-twine
15066 (package-with-python2 python-twine))
15067
15068(define-public python-linecache2
15069 (package
15070 (name "python-linecache2")
15071 (version "1.0.0")
15072 (source
15073 (origin
15074 (method url-fetch)
15075 (uri (pypi-uri "linecache2" version))
15076 (sha256
15077 (base32
15078 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
15079 (build-system python-build-system)
15080 (arguments
15081 `(;; The tests depend on unittest2, and our version is a bit too old.
15082 #:tests? #f))
15083 (native-inputs
15084 `(("python-pbr" ,python-pbr-minimal)))
15085 (home-page
15086 "https://github.com/testing-cabal/linecache2")
15087 (synopsis "Backports of the linecache module")
15088 (description
15089 "The linecache module allows one to get any line from any file, while
15090attempting to optimize internally, using a cache, the common case where many
15091lines are read from a single file.")
15092 (license license:psfl)))
15093
15094(define-public python2-linecache2
15095 (package-with-python2 python-linecache2))
15096
15097(define-public python-traceback2
15098 (package
15099 (name "python-traceback2")
15100 (version "1.4.0")
15101 (source
15102 (origin
15103 (method url-fetch)
15104 (uri (pypi-uri "traceback2" version))
15105 (sha256
15106 (base32
15107 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
15108 (build-system python-build-system)
15109 (arguments
15110 `(;; python-traceback2 and python-unittest2 depend on one another.
15111 #:tests? #f))
15112 (native-inputs
15113 `(("python-pbr" ,python-pbr-minimal)))
15114 (propagated-inputs
15115 `(("python-linecache2" ,python-linecache2)))
15116 (home-page
15117 "https://github.com/testing-cabal/traceback2")
15118 (synopsis "Backports of the traceback module")
15119 (description
15120 "This module provides a standard interface to extract, format and print
15121stack traces of Python programs. It exactly mimics the behavior of the Python
15122interpreter when it prints a stack trace.")
15123 (license license:psfl)))
15124
15125(define-public python2-traceback2
15126 (package-with-python2 python-traceback2))
15127
15128(define-public python-ratelimiter
15129 (package
15130 (name "python-ratelimiter")
15131 (version "1.2.0")
15132 (source
15133 (origin
15134 (method url-fetch)
15135 (uri (pypi-uri "ratelimiter" version))
15136 (sha256
15137 (base32
15138 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
15139 (build-system python-build-system)
15140 (arguments
15141 '(#:tests? #f)) ; There are no tests in the pypi archive.
15142 (home-page "https://github.com/RazerM/ratelimiter")
15143 (synopsis "Simple rate limiting object")
15144 (description
15145 "The @code{ratelimiter} module ensures that an operation will not be
15146executed more than a given number of times during a given period.")
15147 (license license:asl2.0)))
15148
15149(define-public python2-ratelimiter
15150 (package-with-python2 python-ratelimiter))
15151
15152(define-public python-dukpy
15153 (package
15154 (name "python-dukpy")
15155 (version "0.3")
15156 (source
15157 (origin
15158 (method git-fetch)
15159 (uri (git-reference
15160 (url "https://github.com/kovidgoyal/dukpy.git")
15161 (commit (string-append "v" version))))
15162 (file-name (git-file-name name version))
15163 (sha256
15164 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
15165 (build-system python-build-system)
15166 (home-page "https://github.com/kovidgoyal/dukpy")
15167 (synopsis "Run JavaScript in python")
15168 (description
15169 "dukpy is a JavaScript runtime environment for Python using the duktape
15170embeddable JavaScript engine.")
15171 ;; Dukpy is licensed under MIT like the embedded duktape library,
15172 ;; with 'errors.c' as GPL3.
15173 (license (list license:expat license:gpl3))))
15174
15175(define-public python2-dukpy
15176 (package-with-python2 python-dukpy))
15177
15178(define-public python-jsonrpclib-pelix
15179 (package
15180 (name "python-jsonrpclib-pelix")
15181 (version "0.3.2")
15182 (source
15183 (origin
15184 (method url-fetch)
15185 (uri (pypi-uri "jsonrpclib-pelix" version))
15186 (sha256
15187 (base32
15188 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
15189 (build-system python-build-system)
15190 (arguments
15191 `(#:tests? #f)) ; no tests in PyPI tarball
15192 (home-page "https://github.com/tcalmant/jsonrpclib/")
15193 (synopsis "JSON-RPC 2.0 client library for Python")
15194 (description
15195 "This library implements the JSON-RPC v2.0
15196specification (backwards-compatible) as a client library for Python. This
15197version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
15198services.")
15199 (license license:asl2.0)))
15200
15201(define-public python2-jsonrpclib-pelix
15202 (package-with-python2 python-jsonrpclib-pelix))
15203
15204(define-public python-setuptools-scm-git-archive
15205 (package
15206 (name "python-setuptools-scm-git-archive")
15207 (version "1.0")
15208 (source
15209 (origin
15210 (method url-fetch)
15211 (uri (pypi-uri "setuptools_scm_git_archive" version))
15212 (sha256
15213 (base32
15214 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
15215 (build-system python-build-system)
15216 (native-inputs
15217 `(("python-pytest" ,python-pytest)))
15218 (propagated-inputs
15219 `(("python-setuptools-scm" ,python-setuptools-scm)))
15220 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
15221 (synopsis "Setuptools_scm plugin for git archives")
15222 (description
15223 "The setuptools_scm_git_archive package is a plugin to
15224setuptools_scm, which supports obtaining versions from git archives that
15225belong to tagged versions.")
15226 (license license:expat)))
15227
15228(define-public python2-setuptools-scm-git-archive
15229 (package-with-python2 python-setuptools-scm-git-archive))
15230
15231(define-public python-setuptools-git
15232 (package
15233 (name "python-setuptools-git")
15234 (version "1.2")
15235 (source
15236 (origin
15237 (method url-fetch)
15238 (uri (pypi-uri "setuptools-git" version))
15239 (sha256
15240 (base32
15241 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
15242 (build-system python-build-system)
15243 (arguments
15244 `(#:phases
15245 (modify-phases %standard-phases
15246 ;; This is needed for tests.
15247 (add-after 'unpack 'configure-git
15248 (lambda _
15249 (setenv "HOME" "/tmp")
15250 (invoke "git" "config" "--global" "user.email" "guix")
15251 (invoke "git" "config" "--global" "user.name" "guix")
15252 #t)))))
15253 (native-inputs
15254 `(("git" ,git-minimal)))
15255 (home-page "https://github.com/msabramo/setuptools-git")
15256 (synopsis "Setuptools revision control system plugin for Git")
15257 (description
15258 "This package provides a plugin for Setuptools for revision control with
15259Git.")
15260 (license license:bsd-3)))
15261
15262(define-public python-pyclipper
15263 (package
15264 (name "python-pyclipper")
15265 (version "1.1.0.post3")
15266 (source
15267 (origin
15268 (method url-fetch)
15269 (uri (pypi-uri "pyclipper" version ".zip"))
15270 (sha256
15271 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
15272 (modules '((guix build utils)))
15273 (snippet
15274 '(begin
15275 ;; This file is generated by Cython.
15276 (delete-file "pyclipper/pyclipper.cpp") #t))))
15277 (build-system python-build-system)
15278 (arguments
15279 `(#:phases
15280 (modify-phases %standard-phases
15281 (add-before 'build 'cythonize-sources
15282 (lambda _
15283 (with-directory-excursion "pyclipper"
15284 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
15285 (propagated-inputs
15286 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
15287 (native-inputs
15288 `(("python-cython" ,python-cython)
15289 ("python-pytest" ,python-pytest)
15290 ("python-pytest-runner" ,python-pytest-runner)
15291 ("python-unittest2" ,python-unittest2)
15292 ("unzip" ,unzip)))
15293 (home-page "https://github.com/greginvm/pyclipper")
15294 (synopsis "Wrapper for Angus Johnson's Clipper library")
15295 (description
15296 "Pyclipper is a Cython wrapper for the C++ translation of the
15297Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
15298 (license license:expat)))
15299
15300(define-public python2-pyclipper
15301 (package-with-python2 python-pyclipper))
15302
15303(define-public python2-booleanoperations
15304 (package
15305 (name "python2-booleanoperations")
15306 (version "0.7.1")
15307 (source
15308 (origin
15309 (method url-fetch)
15310 (uri (pypi-uri "booleanOperations" version ".zip"))
15311 (sha256
15312 (base32
15313 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
15314 (build-system python-build-system)
15315 (arguments
15316 `(#:python ,python-2))
15317 (native-inputs
15318 `(("unzip" ,unzip)
15319 ("python2-pytest" ,python2-pytest)
15320 ("python2-pytest-runner" ,python2-pytest-runner)))
15321 (propagated-inputs
15322 `(("python-fonttools" ,python2-fonttools)
15323 ("python-pyclipper" ,python2-pyclipper)
15324 ("python-ufolib" ,python2-ufolib)))
15325 (home-page "https://github.com/typemytype/booleanOperations")
15326 (synopsis "Boolean operations on paths")
15327 (description
15328 "BooleanOperations provides a Python library that enables
15329boolean operations on paths.")
15330 (license license:expat)))
15331
15332(define-public python-tempdir
15333 (package
15334 (name "python-tempdir")
15335 (version "0.7.1")
15336 (source
15337 (origin
15338 (method url-fetch)
15339 (uri (pypi-uri "tempdir" version))
15340 (sha256
15341 (base32
15342 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
15343 (build-system python-build-system)
15344 (home-page "https://pypi.org/project/tempdir/")
15345 (arguments
15346 ;; the package has no tests
15347 '(#:tests? #f))
15348 (synopsis "Python library for managing temporary directories")
15349 (description
15350 "This library manages temporary directories that are automatically
15351deleted with all their contents when they are no longer needed. It is
15352particularly convenient for use in tests.")
15353 (license license:expat)))
15354
15355(define-public python2-tempdir
15356 (package-with-python2 python-tempdir))
15357
15358(define-public python-activepapers
15359 (package
15360 (name "python-activepapers")
15361 (version "0.2.2")
15362 (source
15363 (origin
15364 (method url-fetch)
15365 (uri (pypi-uri "ActivePapers.Py" version))
15366 (sha256
15367 (base32
15368 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
15369 (build-system python-build-system)
15370 (arguments
15371 `(#:modules ((ice-9 ftw)
15372 (srfi srfi-1)
15373 (guix build utils)
15374 (guix build python-build-system))
15375
15376 #:phases
15377 (modify-phases %standard-phases
15378 (add-after 'unpack 'delete-python2-code
15379 (lambda _
15380 (for-each delete-file
15381 '("lib/activepapers/builtins2.py"
15382 "lib/activepapers/standardlib2.py"
15383 "lib/activepapers/utility2.py"))))
15384 (replace 'check
15385 (lambda _
15386 ;; Deactivate the test cases that download files
15387 (setenv "NO_NETWORK_ACCESS" "1")
15388 ;; For some strange reason, some tests fail if nosetests runs all
15389 ;; test modules in a single execution. They pass if each test
15390 ;; module is run individually.
15391 (for-each (lambda (filename)
15392 (invoke "nosetests"
15393 (string-append "tests/" filename)))
15394 (scandir "tests"
15395 (lambda (filename)
15396 (string-suffix? ".py" filename)))))))))
15397 (native-inputs
15398 `(("python-tempdir" ,python-tempdir)
15399 ("python-nose" ,python-nose)))
15400 (propagated-inputs
15401 `(("python-h5py" ,python-h5py)))
15402 (home-page "https://www.activepapers.org/")
15403 (synopsis "Executable papers for scientific computing")
15404 (description
15405 "ActivePapers is a tool for working with executable papers, which
15406combine data, code, and documentation in single-file packages,
15407suitable for publication as supplementary material or on repositories
15408such as figshare or Zenodo.")
15409 (properties `((python2-variant . ,(delay python2-activepapers))))
15410 (license license:bsd-3)))
15411
15412(define-public python2-activepapers
15413 (let ((base (package-with-python2
15414 (strip-python2-variant python-activepapers))))
15415 (package
15416 (inherit base)
15417 (arguments
15418 (substitute-keyword-arguments (package-arguments base)
15419 ((#:phases phases)
15420 `(modify-phases ,phases
15421 (delete 'delete-python2-code)
15422 (add-after 'unpack 'delete-python3-code
15423 (lambda _
15424 (for-each delete-file
15425 '("lib/activepapers/builtins3.py"
15426 "lib/activepapers/standardlib3.py"
15427 "lib/activepapers/utility3.py")))))))))))
15428
15429(define-public python-semver
15430 (package
15431 (name "python-semver")
15432 (version "2.9.0")
15433 (source
15434 (origin
15435 (method url-fetch)
15436 (uri (pypi-uri "semver" version))
15437 (sha256
15438 (base32
15439 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
15440 (build-system python-build-system)
15441 (native-inputs
15442 `(("python-appdirs" ,python-appdirs)
15443 ("python-distlib" ,python-distlib)
15444 ("python-importlib-metadata" ,python-importlib-metadata)
15445 ("python-filelock" ,python-filelock)
15446 ("python-six" ,python-six)
15447 ("python-tox" ,python-tox)
15448 ("python-virtualenv" ,python-virtualenv)))
15449 (home-page "https://github.com/k-bx/python-semver")
15450 (synopsis "Python helper for Semantic Versioning")
15451 (description "This package provides a Python library for
15452@url{Semantic Versioning, http://semver.org/}.")
15453 (license license:bsd-3)))
15454
15455(define-public python2-semver
15456 (package-with-python2 python-semver))
15457
15458(define-public python-pyro4
15459 (package
15460 (name "python-pyro4")
15461 (version "4.77")
15462 (source
15463 (origin
15464 (method url-fetch)
15465 (uri (pypi-uri "Pyro4" version))
15466 (sha256
15467 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
15468 (build-system python-build-system)
15469 (arguments
15470 '(#:tests? #f)) ;FIXME: Some tests require network access.
15471 (native-inputs
15472 `(("python-cloudpickle" ,python-cloudpickle)
15473 ("python-dill" ,python-dill)
15474 ("python-msgpack" ,python-msgpack)))
15475 (propagated-inputs
15476 `(("python-serpent" ,python-serpent)))
15477 (home-page "https://pyro4.readthedocs.io")
15478 (synopsis "Distributed object middleware for Python")
15479 (description
15480 "Pyro enables you to build applications in which objects can talk to each
15481other over the network. You can just use normal Python method calls to call
15482objects on other machines, also known as remote procedure calls (RPC).")
15483 (license license:expat)))
15484
15485(define-public python2-pyro
15486 (package
15487 (name "python2-pyro")
15488 (version "3.16")
15489 (source
15490 (origin
15491 (method url-fetch)
15492 (uri (pypi-uri "Pyro" version))
15493 (file-name (string-append "Pyro-" version ".tar.gz"))
15494 (sha256
15495 (base32
15496 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15497 (build-system python-build-system)
15498 (arguments
15499 ;; Pyro is not compatible with Python 3
15500 `(#:python ,python-2
15501 ;; Pyro has no test cases for automatic execution
15502 #:tests? #f))
15503 (home-page "https://pythonhosted.org/Pyro/")
15504 (synopsis "Distributed object manager for Python")
15505 (description "Pyro is a Distributed Object Technology system
15506written in Python that is designed to be easy to use. It resembles
15507Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15508which is a system and language independent Distributed Object Technology
15509and has much more to offer than Pyro or RMI. Pyro 3.x is no
15510longer maintained. New projects should use Pyro4 instead, which
15511is the new Pyro version that is actively developed.")
15512 (license license:expat)))
15513
15514(define-public python2-scientific
15515 (package
15516 (name "python2-scientific")
15517 (version "2.9.4")
15518 (source
15519 (origin
15520 (method git-fetch)
15521 (uri (git-reference
15522 (url "https://github.com/khinsen/ScientificPython")
15523 (commit (string-append "rel" version))))
15524 (file-name (git-file-name name version))
15525 (sha256
15526 (base32
15527 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
15528 (build-system python-build-system)
15529 (inputs
15530 `(("netcdf" ,netcdf)))
15531 (propagated-inputs
15532 `(("python-numpy" ,python2-numpy-1.8)
15533 ("python-pyro" ,python2-pyro)))
15534 (arguments
15535 ;; ScientificPython is not compatible with Python 3
15536 `(#:python ,python-2
15537 #:tests? #f ; No test suite
15538 #:phases
15539 (modify-phases %standard-phases
15540 (replace 'build
15541 (lambda* (#:key inputs #:allow-other-keys)
15542 (invoke "python" "setup.py" "build"
15543 (string-append "--netcdf_prefix="
15544 (assoc-ref inputs "netcdf"))))))))
15545 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
15546 (synopsis "Python modules for scientific computing")
15547 (description "ScientificPython is a collection of Python modules that are
15548useful for scientific computing. Most modules are rather general (Geometry,
15549physical units, automatic derivatives, ...) whereas others are more
15550domain-specific (e.g. netCDF and PDB support). The library is currently
15551not actively maintained and works only with Python 2 and NumPy < 1.9.")
15552 (license license:cecill-c)))
15553
15554(define-public python2-mmtk
15555 (package
15556 (name "python2-mmtk")
15557 (version "2.7.12")
15558 (source
15559 (origin
15560 (method git-fetch)
15561 (uri (git-reference
15562 (url "https://github.com/khinsen/MMTK")
15563 (commit (string-append "rel" version))))
15564 (file-name (git-file-name name version))
15565 (sha256
15566 (base32
15567 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
15568 (build-system python-build-system)
15569 (native-inputs
15570 `(("netcdf" ,netcdf)))
15571 (propagated-inputs
15572 `(("python-scientific" ,python2-scientific)
15573 ("python-tkinter" ,python-2 "tk")))
15574 (arguments
15575 `(#:python ,python-2
15576 #:tests? #f
15577 #:phases
15578 (modify-phases %standard-phases
15579 (add-before 'build 'includes-from-scientific
15580 (lambda* (#:key inputs #:allow-other-keys)
15581 (mkdir-p "Include/Scientific")
15582 (copy-recursively
15583 (string-append
15584 (assoc-ref inputs "python-scientific")
15585 "/include/python2.7/Scientific")
15586 "Include/Scientific"))))))
15587 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15588 (synopsis "Python library for molecular simulation")
15589 (description "MMTK is a library for molecular simulations with an emphasis
15590on biomolecules. It provides widely used methods such as Molecular Dynamics
15591and normal mode analysis, but also basic routines for implementing new methods
15592for simulation and analysis. The library is currently not actively maintained
15593and works only with Python 2 and NumPy < 1.9.")
15594 (license license:cecill-c)))
15595
15596(define-public python-phonenumbers
15597 (package
15598 (name "python-phonenumbers")
15599 (version "8.9.1")
15600 (source
15601 (origin
15602 (method url-fetch)
15603 (uri (pypi-uri "phonenumbers" version))
15604 (sha256
15605 (base32
15606 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15607 (build-system python-build-system)
15608 (home-page
15609 "https://github.com/daviddrysdale/python-phonenumbers")
15610 (synopsis
15611 "Python library for dealing with international phone numbers")
15612 (description
15613 "This package provides a Python port of Google's libphonenumber library.")
15614 (license license:asl2.0)))
15615
15616(define-public python2-phonenumbers
15617 (package-with-python2 python-phonenumbers))
15618
15619(define-public python-send2trash
15620 (package
15621 (name "python-send2trash")
15622 (version "1.5.0")
15623 (source
15624 (origin (method git-fetch)
15625 ;; Source tarball on PyPI doesn't include tests.
15626 (uri (git-reference
15627 (url "https://github.com/hsoft/send2trash.git")
15628 (commit version)))
15629 (file-name (git-file-name name version))
15630 (sha256
15631 (base32
15632 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
15633 (build-system python-build-system)
15634 (arguments
15635 '(#:phases
15636 (modify-phases %standard-phases
15637 (add-before 'check 'pre-check
15638 (lambda _
15639 (mkdir-p "/tmp/foo")
15640 (setenv "HOME" "/tmp/foo")
15641 #t)))))
15642 (home-page "https://github.com/hsoft/send2trash")
15643 (synopsis "Send files to the user's @file{~/Trash} directory")
15644 (description "This package provides a Python library to send files to the
15645user's @file{~/Trash} directory.")
15646 (properties `((python2-variant . ,(delay python2-send2trash))))
15647 (license license:bsd-3)))
15648
15649(define-public python2-send2trash
15650 (package
15651 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
15652 (arguments
15653 (substitute-keyword-arguments (package-arguments python-send2trash)
15654 ((#:phases phases)
15655 `(modify-phases ,phases
15656 (add-before 'check 'setenv
15657 (lambda _
15658 (setenv "PYTHONPATH"
15659 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
15660 #t))))))))
15661
15662(define-public python-yapf
15663 (package
15664 (name "python-yapf")
15665 (version "0.29.0")
15666 (source
15667 (origin
15668 (method url-fetch)
15669 (uri (pypi-uri "yapf" version))
15670 (sha256
15671 (base32
15672 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
15673 (build-system python-build-system)
15674 (home-page "https://github.com/google/yapf")
15675 (synopsis "Formatter for Python code")
15676 (description "YAPF is a formatter for Python code. It's based off of
15677@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15678takes the code and reformats it to the best formatting that conforms to the
15679style guide, even if the original code didn't violate the style guide.")
15680 (license license:asl2.0)))
15681
15682(define-public python2-yapf
15683 (package-with-python2 python-yapf))
15684
15685(define-public python-gyp
15686 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
15687 (revision "0"))
15688 (package
15689 (name "python-gyp")
15690 ;; Google does not release versions,
15691 ;; based on second most recent commit date.
15692 (version (git-version "0.0.0" revision commit))
15693 (source
15694 (origin
15695 ;; Google does not release tarballs,
15696 ;; git checkout is needed.
15697 (method git-fetch)
15698 (uri (git-reference
15699 (url "https://chromium.googlesource.com/external/gyp")
15700 (commit commit)))
15701 (file-name (git-file-name name version))
15702 (sha256
15703 (base32
15704 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
15705 (build-system python-build-system)
15706 (home-page "https://gyp.gsrc.io/")
15707 (synopsis "GYP is a Meta-Build system")
15708 (description
15709 "GYP builds build systems for large, cross platform applications.
15710It can be used to generate XCode projects, Visual Studio projects, Ninja build
15711files, and Makefiles.")
15712 (license license:bsd-3))))
15713
15714(define-public python2-gyp
15715 (package-with-python2 python-gyp))
15716
15717(define-public python-whatever
15718 (package
15719 (name "python-whatever")
15720 (version "0.6")
15721 (source
15722 (origin
15723 (method git-fetch)
15724 (uri (git-reference
15725 (url "https://github.com/Suor/whatever")
15726 (commit version)))
15727 (file-name (git-file-name name version))
15728 (sha256
15729 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
15730 (build-system python-build-system)
15731 (arguments
15732 `(#:phases
15733 (modify-phases %standard-phases
15734 (replace 'check
15735 (lambda _
15736 (invoke "py.test"))))))
15737 (native-inputs
15738 `(("python-pytest" ,python-pytest)))
15739 (home-page "http://github.com/Suor/whatever")
15740 (synopsis "Make anonymous functions by partial application of operators")
15741 (description "@code{whatever} provides an easy way to make anonymous
15742functions by partial application of operators.")
15743 (license license:bsd-3)))
15744
15745(define-public python2-whatever
15746 (package-with-python2 python-whatever))
15747
15748(define-public python-funcy
15749 (package
15750 (name "python-funcy")
15751 (version "1.11")
15752 (source
15753 (origin
15754 (method git-fetch)
15755 (uri (git-reference
15756 (url "https://github.com/Suor/funcy.git")
15757 (commit version)))
15758 (sha256
15759 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
15760 (file-name (git-file-name name version))))
15761 (build-system python-build-system)
15762 (arguments
15763 `(#:phases
15764 (modify-phases %standard-phases
15765 (replace 'check
15766 (lambda _
15767 (invoke "py.test"))))))
15768 (native-inputs
15769 `(("python-pytest" ,python-pytest)
15770 ("python-whatever" ,python-whatever)))
15771 (home-page "http://github.com/Suor/funcy")
15772 (synopsis "Functional tools")
15773 (description "@code{funcy} is a library that provides functional tools.
15774Examples are:
15775@enumerate
15776@item merge - Merges collections of the same type
15777@item walk - Type-preserving map
15778@item select - Selects a part of a collection
15779@item take - Takes the first n items of a collection
15780@item first - Takes the first item of a collection
15781@item remove - Predicated-removes items of a collection
15782@item concat - Concatenates two collections
15783@item flatten - Flattens a collection with subcollections
15784@item distinct - Returns only distinct items
15785@item split - Predicated-splits a collection
15786@item split_at - Splits a collection at a given item
15787@item group_by - Groups items by group
15788@item pairwise - Pairs off adjacent items
15789@item partial - Partially-applies a function
15790@item curry - Curries a function
15791@item compose - Composes functions
15792@item complement - Complements a predicate
15793@item all_fn - \"all\" with predicate
15794@end enumerate")
15795 (license license:bsd-3)))
15796
15797(define-public python2-funcy
15798 (package-with-python2 python-funcy))
15799
15800(define-public python-isoweek
15801 (package
15802 (name "python-isoweek")
15803 (version "1.3.3")
15804 (source
15805 (origin
15806 (method url-fetch)
15807 (uri (pypi-uri "isoweek" version))
15808 (sha256
15809 (base32
15810 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
15811 (build-system python-build-system)
15812 (home-page "https://github.com/gisle/isoweek")
15813 (synopsis "Objects representing a week")
15814 (description "The @code{isoweek} module provide the class Week that
15815implements the week definition of ISO 8601. This standard also defines
15816a notation for identifying weeks; yyyyWww (where the W is a literal).
15817Week instances stringify to this form.")
15818 (license license:bsd-3)))
15819
15820(define-public python2-isoweek
15821 (package-with-python2 python-isoweek))
15822
15823(define-public python-tokenize-rt
15824 (package
15825 (name "python-tokenize-rt")
15826 (version "2.0.1")
15827 (source
15828 (origin
15829 (method url-fetch)
15830 (uri (pypi-uri "tokenize-rt" version))
15831 (sha256
15832 (base32
15833 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15834 (build-system python-build-system)
15835 (home-page "https://github.com/asottile/tokenize-rt")
15836 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15837 (description
15838 "This Python library is a wrapper around @code{tokenize} from the Python
15839standard library. It provides two additional tokens @code{ESCAPED_NL} and
15840@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15841and @code{tokens_to_src} to roundtrip.")
15842 (license license:expat)))
15843
15844(define-public python-future-fstrings
15845 (package
15846 (name "python-future-fstrings")
15847 (version "0.4.1")
15848 (source
15849 (origin
15850 (method url-fetch)
15851 (uri (pypi-uri "future_fstrings" version))
15852 (sha256
15853 (base32
15854 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15855 (build-system python-build-system)
15856 (propagated-inputs
15857 `(("python-tokenize-rt" ,python-tokenize-rt)))
15858 (home-page "https://github.com/asottile/future-fstrings")
15859 (synopsis "Backport of fstrings to Python < 3.6")
15860 (description
15861 "This package provides a UTF-8 compatible encoding
15862@code{future_fstrings}, which performs source manipulation. It decodes the
15863source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15864@code{f} strings.")
15865 (license license:expat)))
15866
15867(define-public python-typed-ast
15868 (package
15869 (name "python-typed-ast")
15870 (version "1.4.0")
15871 (source
15872 (origin
15873 (method git-fetch)
15874 (uri (git-reference
15875 (url "https://github.com/python/typed_ast.git")
15876 (commit version)))
15877 (sha256
15878 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15879 (file-name (git-file-name name version))))
15880 (build-system python-build-system)
15881 (arguments
15882 `(#:modules ((guix build utils)
15883 (guix build python-build-system)
15884 (ice-9 ftw)
15885 (srfi srfi-1)
15886 (srfi srfi-26))
15887 #:phases
15888 (modify-phases %standard-phases
15889 (replace 'check
15890 (lambda _
15891 (let ((cwd (getcwd)))
15892 (setenv "PYTHONPATH"
15893 (string-append cwd "/build/"
15894 (find (cut string-prefix? "lib" <>)
15895 (scandir (string-append cwd "/build")))
15896 ":"
15897 (getenv "PYTHONPATH"))))
15898 (invoke "pytest")
15899 #t)))))
15900 (native-inputs `(("python-pytest" ,python-pytest)))
15901 (home-page "https://github.com/python/typed_ast")
15902 (synopsis "Fork of Python @code{ast} modules with type comment support")
15903 (description "This package provides a parser similar to the standard
15904@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15905include PEP 484 type comments and are independent of the version of Python
15906under which they are run. The @code{typed_ast} parsers produce the standard
15907Python AST (plus type comments), and are both fast and correct, as they are
15908based on the CPython 2.7 and 3.7 parsers.")
15909 ;; See the file "LICENSE" for the details.
15910 (license (list license:psfl
15911 license:asl2.0
15912 license:expat)))) ;ast27/Parser/spark.py
15913
15914(define-public python-typing
15915 (package
15916 (name "python-typing")
15917 (version "3.6.6")
15918 (source
15919 (origin
15920 (method url-fetch)
15921 (uri (pypi-uri "typing" version))
15922 (sha256
15923 (base32
15924 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15925 (build-system python-build-system)
15926 (home-page "https://docs.python.org/3/library/typing.html")
15927 (synopsis "Type hints for Python")
15928 (description "This is a backport of the standard library @code{typing}
15929module to Python versions older than 3.5. Typing defines a standard notation
15930for Python function and variable type annotations. The notation can be used
15931for documenting code in a concise, standard format, and it has been designed
15932to also be used by static and runtime type checkers, static analyzers, IDEs
15933and other tools.")
15934 (license license:psfl)))
15935
15936(define-public python2-typing
15937 (package-with-python2 python-typing))
15938
15939(define-public python-typing-extensions
15940 (package
15941 (name "python-typing-extensions")
15942 (version "3.7.4.1")
15943 (source
15944 (origin
15945 (method url-fetch)
15946 (uri (pypi-uri "typing_extensions" version))
15947 (sha256
15948 (base32
15949 "1wj1vcgbnm20aiinmphyxfrbv3qi9xdhvw89ab3qm42y9n4wq7h9"))))
15950 (build-system python-build-system)
15951 (home-page
15952 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15953 (synopsis "Experimental type hints for Python")
15954 (description
15955 "The typing_extensions module contains additional @code{typing} hints not
15956yet present in the of the @code{typing} standard library.
15957Included are implementations of:
15958@enumerate
15959@item ClassVar
15960@item ContextManager
15961@item Counter
15962@item DefaultDict
15963@item Deque
15964@item NewType
15965@item NoReturn
15966@item overload
15967@item Protocol
15968@item runtime
15969@item Text
15970@item Type
15971@item TYPE_CHECKING
15972@item AsyncGenerator
15973@end enumerate\n")
15974 (license license:psfl)))
15975
15976(define-public bpython
15977 (package
15978 (name "bpython")
15979 (version "0.18")
15980 (source
15981 (origin
15982 (method url-fetch)
15983 (uri (pypi-uri "bpython" version))
15984 (sha256
15985 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
15986 (build-system python-build-system)
15987 (arguments
15988 `(#:phases
15989 (modify-phases %standard-phases
15990 (add-after 'unpack 'remove-failing-test
15991 (lambda _
15992 ;; Remove failing test. FIXME: make it pass
15993 (delete-file "bpython/test/test_args.py")
15994 #t))
15995 (add-after 'wrap 'add-aliases
15996 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15997 (lambda* (#:key outputs #:allow-other-keys)
15998 (let ((out (assoc-ref outputs "out")))
15999 (for-each
16000 (lambda (old new)
16001 (symlink old (string-append out "/bin/" new)))
16002 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
16003 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
16004 #t)))))
16005 (propagated-inputs
16006 `(("python-pygments" ,python-pygments)
16007 ("python-requests" ,python-requests)
16008 ("python-babel" ,python-babel) ; optional, for internationalization
16009 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
16010 ("python-greenlet" ,python-greenlet)
16011 ("python-urwid" ,python-urwid) ; for bpython-urwid only
16012 ("python-six" ,python-six)))
16013 (native-inputs
16014 `(("python-sphinx" ,python-sphinx)
16015 ("python-mock" ,python-mock)))
16016 (home-page "https://bpython-interpreter.org/")
16017 (synopsis "Fancy interface to the Python interpreter")
16018 (description "Bpython is a fancy interface to the Python
16019interpreter. bpython's main features are
16020
16021@enumerate
16022@item in-line syntax highlighting,
16023@item readline-like autocomplete with suggestions displayed as you type,
16024@item expected parameter list for any Python function,
16025@item \"rewind\" function to pop the last line of code from memory and
16026 re-evaluate,
16027@item send the code you've entered off to a pastebin,
16028@item save the code you've entered to a file, and
16029@item auto-indentation.
16030@end enumerate")
16031 (license license:expat)))
16032
16033(define-public bpython2
16034 (let ((base (package-with-python2
16035 (strip-python2-variant bpython))))
16036 (package (inherit base)
16037 (name "bpython2")
16038 (arguments
16039 `(#:python ,python-2
16040 #:phases
16041 (modify-phases %standard-phases
16042 (add-after 'unpack 'remove-failing-test
16043 (lambda _
16044 ;; Remove failing test. FIXME: make it pass
16045 (delete-file "bpython/test/test_args.py")
16046 ;; Disable failing test-cases (renaming inhibits they are
16047 ;; discovered)
16048 (substitute* "bpython/test/test_curtsies_repl.py"
16049 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
16050 (string-append a "xxx_off_" b))
16051 (("^(\\s*def )(test_complex\\W)" _ a b)
16052 (string-append a "xxx_off_" b)))
16053 #t))
16054 (add-before 'build 'rename-scripts
16055 ;; rename the scripts to bypthon2, bpdb2, etc.
16056 (lambda _
16057 (substitute* "setup.py"
16058 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
16059 (string-append name "2" rest "\n"))
16060 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
16061 (string-append name "2" (or sub "") rest "\n")))
16062 #t))))))))
16063
16064(define-public python-pyinotify
16065 (package
16066 (name "python-pyinotify")
16067 (version "0.9.6")
16068 (source (origin
16069 (method url-fetch)
16070 (uri (pypi-uri "pyinotify" version))
16071 (sha256
16072 (base32
16073 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
16074 (build-system python-build-system)
16075 (arguments `(#:tests? #f)) ;no tests
16076 (home-page "https://github.com/seb-m/pyinotify")
16077 (synopsis "Python library for monitoring inotify events")
16078 (description
16079 "@code{pyinotify} provides a Python interface for monitoring
16080file system events on Linux.")
16081 (license license:expat)))
16082
16083(define-public python2-pyinotify
16084 (package-with-python2 python-pyinotify))
16085
16086;; Ada parser uses this version.
16087(define-public python2-quex-0.67.3
16088 (package
16089 (name "python2-quex")
16090 (version "0.67.3")
16091 (source
16092 (origin
16093 (method url-fetch)
16094 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
16095 (version-major+minor version)
16096 "/quex-" version ".zip"))
16097 (sha256
16098 (base32
16099 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
16100 (build-system python-build-system)
16101 (native-inputs
16102 `(("unzip" ,unzip)))
16103 (arguments
16104 `(#:python ,python-2
16105 #:tests? #f
16106 #:phases
16107 (modify-phases %standard-phases
16108 (delete 'configure)
16109 (delete 'build)
16110 (replace 'install
16111 (lambda* (#:key outputs #:allow-other-keys)
16112 (let* ((out (assoc-ref outputs "out"))
16113 (share/quex (string-append out "/share/quex"))
16114 (bin (string-append out "/bin")))
16115 (copy-recursively "." share/quex)
16116 (mkdir-p bin)
16117 (symlink (string-append share/quex "/quex-exe.py")
16118 (string-append bin "/quex"))
16119 #t))))))
16120 (native-search-paths
16121 (list (search-path-specification
16122 (variable "QUEX_PATH")
16123 (files '("share/quex")))))
16124 (home-page "http://quex.sourceforge.net/")
16125 (synopsis "Lexical analyzer generator in Python")
16126 (description "@code{quex} is a lexical analyzer generator in Python.")
16127 (license license:lgpl2.1+))) ; Non-military
16128
16129(define-public python2-quex
16130 (package (inherit python2-quex-0.67.3)
16131 (name "python2-quex")
16132 (version "0.68.1")
16133 (source
16134 (origin
16135 (method url-fetch)
16136 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
16137 (sha256
16138 (base32
16139 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
16140 (file-name (string-append name "-" version ".tar.gz"))))))
16141
16142(define-public python-more-itertools
16143 (package
16144 (name "python-more-itertools")
16145 (version "7.1.0")
16146 (source
16147 (origin
16148 (method url-fetch)
16149 (uri (pypi-uri "more-itertools" version))
16150 (sha256
16151 (base32
16152 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
16153 (build-system python-build-system)
16154 (home-page "https://github.com/erikrose/more-itertools")
16155 (synopsis "More routines for operating on iterables, beyond itertools")
16156 (description "Python's built-in @code{itertools} module implements a
16157number of iterator building blocks inspired by constructs from APL, Haskell,
16158and SML. @code{more-itertools} includes additional building blocks for
16159working with iterables.")
16160 (properties `((python2-variant . ,(delay python2-more-itertools))))
16161 (license license:expat)))
16162
16163;; The 5.x series are the last versions supporting Python 2.7.
16164(define-public python2-more-itertools
16165 (package
16166 (inherit python-more-itertools)
16167 (name "python2-more-itertools")
16168 (version "5.0.0")
16169 (source (origin
16170 (method url-fetch)
16171 (uri (pypi-uri "more-itertools" version))
16172 (sha256
16173 (base32
16174 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
16175 (arguments
16176 `(#:python ,python2-minimal))
16177 (propagated-inputs
16178 `(("python2-six" ,python2-six-bootstrap)))))
16179
16180(define-public python-latexcodec
16181 (package
16182 (name "python-latexcodec")
16183 (version "1.0.7")
16184 (source
16185 (origin
16186 (method url-fetch)
16187 (uri (pypi-uri "latexcodec" version))
16188 (sha256
16189 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
16190 (build-system python-build-system)
16191 (inputs
16192 `(("python-six" ,python-six)))
16193 (home-page "https://readthedocs.org/projects/latexcodec/")
16194 (synopsis "Work with LaTeX code in Python")
16195 (description "Lexer and codec to work with LaTeX code in Python.")
16196 (license license:expat)))
16197
16198(define-public python-pybtex
16199 (package
16200 (name "python-pybtex")
16201 (version "0.22.2")
16202 (source
16203 (origin
16204 (method url-fetch)
16205 (uri (pypi-uri "pybtex" version))
16206 (sha256
16207 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
16208 (build-system python-build-system)
16209 (native-inputs
16210 `(("python-nose" ,python-nose)))
16211 (inputs
16212 `(("python-latexcodec" ,python-latexcodec)
16213 ("python-pyyaml" ,python-pyyaml)
16214 ("python-six" ,python-six)))
16215 (arguments
16216 `(#:test-target "nosetests"))
16217 (home-page "https://pybtex.org/")
16218 (synopsis "BibTeX-compatible bibliography processor")
16219 (description "Pybtex is a BibTeX-compatible bibliography processor written
16220in Python. You can simply type pybtex instead of bibtex.")
16221 (license license:expat)))
16222
16223(define-public python-onetimepass
16224 (package
16225 (name "python-onetimepass")
16226 (version "1.0.1")
16227 (source
16228 (origin
16229 (method url-fetch)
16230 (uri (pypi-uri "onetimepass" version))
16231 (sha256
16232 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
16233 (build-system python-build-system)
16234 (propagated-inputs `(("python-six" ,python-six)))
16235 (home-page "https://github.com/tadeck/onetimepass/")
16236 (synopsis "One-time password library")
16237 (description "Python one-time password library for HMAC-based (HOTP) and
16238time-based (TOTP) passwords.")
16239 (license license:expat)))
16240
16241(define-public python-parso
16242 (package
16243 (name "python-parso")
16244 (version "0.6.2")
16245 (source
16246 (origin
16247 (method url-fetch)
16248 (uri (pypi-uri "parso" version))
16249 (sha256
16250 (base32
16251 "0mr1j4ijqnrihz1yap34g6i8vjldg5lz814sz4v0d8pbqvh5jmhc"))))
16252 (native-inputs
16253 `(("python-pytest" ,python-pytest)))
16254 (build-system python-build-system)
16255 (arguments
16256 `(#:phases (modify-phases %standard-phases
16257 (replace 'check
16258 (lambda _ (invoke "pytest" "-vv"))))))
16259 (home-page "https://github.com/davidhalter/parso")
16260 (synopsis "Python Parser")
16261 (description "Parso is a Python parser that supports error recovery and
16262round-trip parsing for different Python versions (in multiple Python versions).
16263Parso is also able to list multiple syntax errors in your Python file.")
16264 (license license:expat)))
16265
16266(define-public python2-parso
16267 (package-with-python2 python-parso))
16268
16269;; This version is required for [email protected], which in turn is needed for
16270;; python-language-server.
16271(define-public python-parso-0.5
16272 (package
16273 (inherit python-parso)
16274 (version "0.5.2")
16275 (source (origin
16276 (method url-fetch)
16277 (uri (pypi-uri "parso" version))
16278 (sha256
16279 (base32
16280 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))))
16281
16282(define-public python-async-generator
16283 (package
16284 (name "python-async-generator")
16285 (version "1.10")
16286 (source
16287 (origin
16288 (method url-fetch)
16289 (uri (pypi-uri "async_generator" version))
16290 (sha256
16291 (base32
16292 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
16293 (build-system python-build-system)
16294 (native-inputs
16295 `(("python-pytest" ,python-pytest)))
16296 (home-page "https://github.com/python-trio/async_generator")
16297 (synopsis "Async generators and context managers for Python 3.5+")
16298 (description "@code{async_generator} back-ports Python 3.6's native async
16299generators and Python 3.7's context managers into Python 3.5.")
16300 ;; Dual licensed.
16301 (license (list license:expat license:asl2.0))))
16302
16303(define-public python-async-timeout
16304 (package
16305 (name "python-async-timeout")
16306 (version "3.0.1")
16307 (source
16308 (origin
16309 (method url-fetch)
16310 (uri (pypi-uri "async-timeout" version))
16311 (sha256
16312 (base32
16313 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
16314 (build-system python-build-system)
16315 (home-page "https://github.com/aio-libs/async_timeout/")
16316 (synopsis "Timeout context manager for asyncio programs")
16317 (description "@code{async-timeout} provides a timeout timeout context
16318manager compatible with @code{asyncio}.")
16319 (license license:asl2.0)))
16320
16321(define-public python-glob2
16322 (package
16323 (name "python-glob2")
16324 (version "0.7")
16325 (source
16326 (origin
16327 (method git-fetch)
16328 (uri (git-reference
16329 (url "https://github.com/miracle2k/python-glob2.git")
16330 (commit (string-append "v" version))))
16331 (file-name (git-file-name name version))
16332 (sha256
16333 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
16334 (build-system python-build-system)
16335 (home-page "https://github.com/miracle2k/python-glob2/")
16336 (synopsis "Extended Version of the python buildin glob module")
16337 (description "This is an extended version of the Python
16338@url{http://docs.python.org/library/glob.html, built-in glob module} which
16339adds:
16340
16341@itemize
16342@item The ability to capture the text matched by glob patterns, and return
16343those matches alongside the file names.
16344@item A recursive @code{**} globbing syntax, akin for example to the
16345@code{globstar} option of Bash.
16346@item The ability to replace the file system functions used, in order to glob
16347on virtual file systems.
16348@item Compatible with Python 2 and Python 3 (tested with 3.3).
16349@end itemize
16350
16351Glob2 currently based on the glob code from Python 3.3.1.")
16352 (license license:bsd-2)))
16353
16354(define-public python2-glob2
16355 (package-with-python2 python-glob2))
16356
16357(define-public python-gipc
16358 (package
16359 (name "python-gipc")
16360 (version "0.6.0")
16361 (source
16362 (origin
16363 (method url-fetch)
16364 (uri (pypi-uri "gipc" version ".zip"))
16365 (sha256
16366 (base32
16367 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
16368 (build-system python-build-system)
16369 (native-inputs
16370 `(("unzip" ,unzip)))
16371 (propagated-inputs
16372 `(("python-gevent" ,python-gevent)))
16373 (home-page "https://gehrcke.de/gipc/")
16374 (synopsis "Child process management in the context of gevent")
16375 (description "Usage of Python's multiprocessing package in a
16376gevent-powered application may raise problems. With @code{gipc},
16377process-based child processes can safely be created anywhere within a
16378gevent-powered application.")
16379 (license license:expat)))
16380
16381(define-public python2-gipc
16382 (package-with-python2 python-gipc))
16383
16384(define-public python-fusepy
16385 (package
16386 (name "python-fusepy")
16387 (version "2.0.4")
16388 (source
16389 (origin
16390 (method url-fetch)
16391 (uri (pypi-uri "fusepy" version))
16392 (sha256
16393 (base32
16394 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
16395 (build-system python-build-system)
16396 (arguments
16397 `(#:phases
16398 (modify-phases %standard-phases
16399 (add-before 'build 'set-library-file-name
16400 (lambda* (#:key inputs #:allow-other-keys)
16401 (let ((fuse (assoc-ref inputs "fuse")))
16402 (substitute* "fuse.py"
16403 (("find_library\\('fuse'\\)")
16404 (string-append "'" fuse "/lib/libfuse.so'")))
16405 #t))))))
16406 (propagated-inputs
16407 `(("fuse" ,fuse)))
16408 (home-page "https://github.com/fusepy/fusepy")
16409 (synopsis "Simple ctypes bindings for FUSE")
16410 (description "Python module that provides a simple interface to FUSE and
16411MacFUSE. The binding is created using the standard @code{ctypes} library.")
16412 (license license:isc)))
16413
16414(define-public python2-fusepy
16415 (package-with-python2 python-fusepy))
16416
16417(define-public python-fusepyng
16418 (package
16419 (name "python-fusepyng")
16420 (version "1.0.7")
16421 (source
16422 (origin
16423 (method url-fetch)
16424 (uri (pypi-uri "fusepyng" version))
16425 (sha256
16426 (base32
16427 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
16428 (build-system python-build-system)
16429 (arguments
16430 '(#:phases
16431 (modify-phases %standard-phases
16432 (add-after 'unpack 'set-libfuse-path
16433 (lambda* (#:key inputs #:allow-other-keys)
16434 (let ((fuse (assoc-ref inputs "fuse")))
16435 (substitute* "fusepyng.py"
16436 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
16437 (string-append "\"" fuse "/lib/libfuse.so\""))))
16438 #t)))))
16439 (inputs
16440 `(("fuse" ,fuse)))
16441 (propagated-inputs
16442 `(("python-paramiko" ,python-paramiko)))
16443 (home-page "https://github.com/rianhunter/fusepyng")
16444 (synopsis "Simple ctypes bindings for FUSE")
16445 (description "@code{fusepyng} is a Python module that provides a simple
16446interface to FUSE on various operating systems. It's just one file and is
16447implemented using @code{ctypes}.")
16448 (license license:isc)))
16449
16450(define-public python2-gdrivefs
16451 (package
16452 (name "python2-gdrivefs")
16453 (version "0.14.9")
16454 (source
16455 (origin
16456 (method url-fetch)
16457 (uri (pypi-uri "gdrivefs" version))
16458 (sha256
16459 (base32
16460 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
16461 (build-system python-build-system)
16462 (arguments
16463 `(#:python ,python-2
16464 #:phases
16465 (modify-phases %standard-phases
16466 (add-before 'build 'patch-setup-py
16467 (lambda _
16468 ;; Update requirements from dependency==version
16469 ;; to dependency>=version
16470 (substitute* "gdrivefs/resources/requirements.txt"
16471 (("==") ">="))
16472 #t)))))
16473 (native-inputs
16474 `(("python2-gipc" ,python2-gipc)
16475 ("python2-gevent" ,python2-gevent)
16476 ("python2-greenlet" ,python2-greenlet)
16477 ("python2-httplib2" ,python2-httplib2)
16478 ("python2-uritemplate" ,python2-uritemplate)
16479 ("python2-oauth2client" ,python2-oauth2client)
16480 ("python2-six" ,python2-six)))
16481 (propagated-inputs
16482 `(("python2-dateutil" ,python2-dateutil)
16483 ("python2-fusepy" ,python2-fusepy)
16484 ("python2-google-api-client" ,python2-google-api-client)))
16485 (home-page "https://github.com/dsoprea/GDriveFS")
16486 (synopsis "Mount Google Drive as a local file system")
16487 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
16488under Python 2.7.")
16489 (license license:gpl2)))
16490
16491(define-public python-userspacefs
16492 (package
16493 (name "python-userspacefs")
16494 (version "1.0.13")
16495 (source
16496 (origin
16497 (method url-fetch)
16498 (uri (pypi-uri "userspacefs" version))
16499 (sha256
16500 (base32
16501 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
16502 (build-system python-build-system)
16503 (propagated-inputs
16504 `(("python-fusepyng" ,python-fusepyng)))
16505 (home-page "https://github.com/rianhunter/userspacefs")
16506 (synopsis "User-space file systems for Python")
16507 (description
16508 "@code{userspacefs} is a library that allows you to easily write
16509user-space file systems in Python.")
16510 (license license:gpl3+)))
16511
16512(define-public pybind11
16513 (package
16514 (name "pybind11")
16515 (version "2.4.3")
16516 (source (origin
16517 (method git-fetch)
16518 (uri (git-reference
16519 (url "https://github.com/pybind/pybind11.git")
16520 (commit (string-append "v" version))))
16521 (sha256
16522 (base32
16523 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
16524 (file-name (git-file-name name version))))
16525 (build-system cmake-build-system)
16526 (native-inputs
16527 `(("python" ,python-wrapper)
16528
16529 ;; The following dependencies are used for tests.
16530 ("python-pytest" ,python-pytest)
16531 ("catch" ,catch-framework2-1)
16532 ("eigen" ,eigen)))
16533 (arguments
16534 `(#:configure-flags
16535 (list (string-append "-DCATCH_INCLUDE_DIR="
16536 (assoc-ref %build-inputs "catch")
16537 "/include/catch"))
16538
16539 #:phases (modify-phases %standard-phases
16540 (add-after 'install 'install-python
16541 (lambda* (#:key outputs #:allow-other-keys)
16542 (let ((out (assoc-ref outputs "out")))
16543 (with-directory-excursion "../source"
16544 (setenv "PYBIND11_USE_CMAKE" "yes")
16545 (invoke "python" "setup.py" "install"
16546 "--single-version-externally-managed"
16547 "--root=/"
16548 (string-append "--prefix=" out)))))))
16549
16550 #:test-target "check"))
16551 (home-page "https://github.com/pybind/pybind11/")
16552 (synopsis "Seamless operability between C++11 and Python")
16553 (description
16554 "@code{pybind11} is a lightweight header-only library that exposes C++
16555types in Python and vice versa, mainly to create Python bindings of existing
16556C++ code. Its goals and syntax are similar to the @code{Boost.Python}
16557library: to minimize boilerplate code in traditional extension modules by
16558inferring type information using compile-time introspection.")
16559 (license license:bsd-3)))
16560
16561(define-public python-fasteners
16562 (package
16563 (name "python-fasteners")
16564 (version "0.14.1")
16565 (source
16566 (origin
16567 (method url-fetch)
16568 (uri (pypi-uri "fasteners" version))
16569 (sha256
16570 (base32
16571 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16572 (build-system python-build-system)
16573 (propagated-inputs
16574 `(("python-monotonic" ,python-monotonic)
16575 ("python-six" ,python-six)
16576 ("python-testtools" ,python-testtools)))
16577 (home-page "https://github.com/harlowja/fasteners")
16578 (synopsis "Python package that provides useful locks")
16579 (description
16580 "This package provides a Python program that provides following locks:
16581
16582@itemize
16583@item Locking decorator
16584@item Reader-writer locks
16585@item Inter-process locks
16586@item Generic helpers
16587@end itemize\n")
16588 (properties `((python2-variant . ,(delay python2-fasteners))))
16589 (license license:asl2.0)))
16590
16591(define-public python2-fasteners
16592 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16593 (package
16594 (inherit base)
16595 (propagated-inputs
16596 `(("python2-futures" ,python2-futures)
16597 ,@(package-propagated-inputs base))))))
16598
16599(define-public python-requests-file
16600 (package
16601 (name "python-requests-file")
16602 (version "1.4.3")
16603 (source
16604 (origin
16605 (method url-fetch)
16606 (uri (pypi-uri "requests-file" version))
16607 (sha256
16608 (base32
16609 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16610 (build-system python-build-system)
16611 (propagated-inputs
16612 `(("python-requests" ,python-requests)
16613 ("python-six" ,python-six)))
16614 (home-page
16615 "https://github.com/dashea/requests-file")
16616 (synopsis "File transport adapter for Requests")
16617 (description
16618 "Requests-File is a transport adapter for use with the Requests Python
16619library to allow local file system access via @code{file://} URLs.")
16620 (license license:asl2.0)))
16621
16622(define-public python2-requests-file
16623 (package-with-python2 python-requests-file))
16624
16625(define-public python-tldextract
16626 (package
16627 (name "python-tldextract")
16628 (version "2.2.0")
16629 (source
16630 (origin
16631 (method url-fetch)
16632 (uri (pypi-uri "tldextract" version))
16633 (sha256
16634 (base32
16635 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16636 (build-system python-build-system)
16637 (native-inputs
16638 `(("python-pytest" ,python-pytest)
16639 ("python-responses" ,python-responses)))
16640 (propagated-inputs
16641 `(("python-idna" ,python-idna)
16642 ("python-requests" ,python-requests)
16643 ("python-requests-file" ,python-requests-file)))
16644 (home-page
16645 "https://github.com/john-kurkowski/tldextract")
16646 (synopsis
16647 "Separate the TLD from the registered domain and subdomains of a URL")
16648 (description
16649 "TLDExtract accurately separates the TLD from the registered domain and
16650subdomains of a URL, using the Public Suffix List. By default, this includes
16651the public ICANN TLDs and their exceptions. It can optionally support the
16652Public Suffix List's private domains as well.")
16653 (license license:bsd-3)))
16654
16655(define-public python2-tldextract
16656 (package-with-python2 python-tldextract))
16657
16658(define-public python-pynamecheap
16659 (package
16660 (name "python-pynamecheap")
16661 (version "0.0.3")
16662 (source
16663 (origin
16664 (method url-fetch)
16665 (uri (pypi-uri "PyNamecheap" version))
16666 (sha256
16667 (base32
16668 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16669 (build-system python-build-system)
16670 (propagated-inputs
16671 `(("python-requests" ,python-requests)))
16672 (home-page
16673 "https://github.com/Bemmu/PyNamecheap")
16674 (synopsis
16675 "Namecheap API client in Python")
16676 (description
16677 "PyNamecheap is a Namecheap API client in Python.")
16678 (license license:expat)))
16679
16680(define-public python2-pynamecheap
16681 (package-with-python2 python-pynamecheap))
16682
16683(define-public python-dns-lexicon
16684 (package
16685 (name "python-dns-lexicon")
16686 (version "2.4.0")
16687 (source
16688 (origin
16689 (method url-fetch)
16690 (uri (pypi-uri "dns-lexicon" version))
16691 (sha256
16692 (base32
16693 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16694 (build-system python-build-system)
16695 (arguments
16696 `(#:tests? #f)) ;requires internet access
16697 (propagated-inputs
16698 `(("python-future" ,python-future)
16699 ("python-pynamecheap" ,python-pynamecheap)
16700 ("python-requests" ,python-requests)
16701 ("python-tldextract" ,python-tldextract)
16702 ("python-urllib3" ,python-urllib3)))
16703 (home-page "https://github.com/AnalogJ/lexicon")
16704 (synopsis
16705 "Manipulate DNS records on various DNS providers")
16706 (description
16707 "Lexicon provides a way to manipulate DNS records on multiple DNS
16708providers in a standardized way. It has a CLI but it can also be used as a
16709Python library. It was designed to be used in automation, specifically with
16710Let's Encrypt.")
16711 (license license:expat)))
16712
16713(define-public python2-dns-lexicon
16714 (package-with-python2 python-dns-lexicon))
16715
16716(define-public python-commandlines
16717 (package
16718 (name "python-commandlines")
16719 (version "0.4.1")
16720 (source
16721 (origin
16722 (method url-fetch)
16723 (uri (pypi-uri "commandlines" version))
16724 (sha256
16725 (base32
16726 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
16727 (build-system python-build-system)
16728 (home-page "https://github.com/chrissimpkins/commandlines")
16729 (synopsis "Command line argument to object parsing library")
16730 (description
16731 "@code{Commandlines} is a Python library for command line application
16732development that supports command line argument parsing, command string
16733validation testing and application logic.")
16734 (license license:expat)))
16735
16736;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
16737;; python-numba. They have a very unflexible relationship.
16738(define-public python-numba
16739 (package
16740 (name "python-numba")
16741 (version "0.46.0")
16742 (source
16743 (origin
16744 (method url-fetch)
16745 (uri (pypi-uri "numba" version))
16746 (sha256
16747 (base32
16748 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
16749 (build-system python-build-system)
16750 (arguments
16751 `(#:modules ((guix build utils)
16752 (guix build python-build-system)
16753 (ice-9 ftw)
16754 (srfi srfi-1)
16755 (srfi srfi-26))
16756 #:phases
16757 (modify-phases %standard-phases
16758 (add-after 'unpack 'disable-proprietary-features
16759 (lambda _
16760 (setenv "NUMBA_DISABLE_HSA" "1")
16761 (setenv "NUMBA_DISABLE_CUDA" "1")
16762 #t))
16763 (add-after 'unpack 'remove-failing-tests
16764 (lambda _
16765 ;; FIXME: These tests fail for unknown reasons:
16766 ;; test_non_writable_pycache, test_non_creatable_pycache, and
16767 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
16768 (substitute* "numba/tests/test_dispatcher.py"
16769 (("def test(_non_writable_pycache)" _ m)
16770 (string-append "def guix_skip" m))
16771 (("def test(_non_creatable_pycache)" _ m)
16772 (string-append "def guix_skip" m))
16773 (("def test(_frozen)" _ m)
16774 (string-append "def guix_skip" m)))
16775
16776 ;; These tests fail because we don't run the tests from the build
16777 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
16778 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
16779 (substitute* "numba/tests/test_pycc.py"
16780 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
16781 (string-append "def guix_skip" m)))
16782
16783 ;; These tests fail because our version of Python does not have
16784 ;; a recognizable front-end for the Numba distribution to use
16785 ;; to check against.
16786 (substitute* "numba/tests/test_entrypoints.py"
16787 (("def test(_init_entrypoint)" _ m)
16788 (string-append "def guix_skip" m)))
16789 (substitute* "numba/tests/test_jitclasses.py"
16790 (("def test(_jitclass_longlabel_not_truncated)" _ m)
16791 (string-append "def guix_skip" m)))
16792 #t))
16793 (replace 'check
16794 (lambda _
16795 (let ((cwd (getcwd)))
16796 (setenv "PYTHONPATH"
16797 (string-append cwd "/build/"
16798 (find (cut string-prefix? "lib" <>)
16799 (scandir (string-append cwd "/build")))
16800 ":"
16801 (getenv "PYTHONPATH")))
16802 ;; Something is wrong with the PYTHONPATH when running the
16803 ;; tests from the build directory, as it complains about not being
16804 ;; able to import certain modules.
16805 (with-directory-excursion "/tmp"
16806 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
16807 #t)))))
16808 (propagated-inputs
16809 `(("python-llvmlite" ,python-llvmlite)
16810 ("python-numpy" ,python-numpy)
16811 ("python-singledispatch" ,python-singledispatch)))
16812 ;; Needed for tests.
16813 (inputs
16814 `(("python-jinja2" ,python-jinja2)
16815 ("python-pygments" ,python-pygments)))
16816 (home-page "https://numba.pydata.org")
16817 (synopsis "Compile Python code using LLVM")
16818 (description "Numba gives you the power to speed up your applications with
16819high performance functions written directly in Python. With a few
16820annotations, array-oriented and math-heavy Python code can be just-in-time
16821compiled to native machine instructions, similar in performance to C, C++ and
16822Fortran, without having to switch languages or Python interpreters.
16823
16824Numba works by generating optimized machine code using the LLVM compiler
16825infrastructure at import time, runtime, or statically (using the included pycc
16826tool).")
16827 (license license:bsd-3)))
16828
16829(define-public python-numcodecs
16830 (package
16831 (name "python-numcodecs")
16832 (version "0.6.4")
16833 (source
16834 (origin
16835 (method url-fetch)
16836 (uri (pypi-uri "numcodecs" version))
16837 (sha256
16838 (base32
16839 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
16840 (build-system python-build-system)
16841 (propagated-inputs
16842 `(("python-numpy" ,python-numpy)
16843 ("python-msgpack" ,python-msgpack)))
16844 (native-inputs
16845 `(("python-pytest" ,python-pytest)
16846 ("python-setuptools-scm" ,python-setuptools-scm)))
16847 (home-page "https://github.com/zarr-developers/numcodecs")
16848 (synopsis "Buffer compression and transformation codecs")
16849 (description
16850 "This Python package provides buffer compression and transformation
16851codecs for use in data storage and communication applications.")
16852 (license license:expat)))
16853
16854(define-public python-asciitree
16855 (package
16856 (name "python-asciitree")
16857 (version "0.3.3")
16858 (source
16859 (origin
16860 (method url-fetch)
16861 (uri (pypi-uri "asciitree" version))
16862 (sha256
16863 (base32
16864 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
16865 (build-system python-build-system)
16866 (home-page "https://github.com/mbr/asciitree")
16867 (synopsis "Draws ASCII trees")
16868 (description "This package draws tree structures using characters.")
16869 (license license:expat)))
16870
16871(define-public python-zarr
16872 (package
16873 (name "python-zarr")
16874 (version "2.4.0")
16875 (source
16876 (origin
16877 (method url-fetch)
16878 (uri (pypi-uri "zarr" version))
16879 (sha256
16880 (base32
16881 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
16882 (build-system python-build-system)
16883 (arguments
16884 `(#:phases
16885 (modify-phases %standard-phases
16886 (add-after 'unpack 'disable-service-tests
16887 (lambda _
16888 (setenv "ZARR_TEST_ABS" "0")
16889 (setenv "ZARR_TEST_MONGO" "0")
16890 (setenv "ZARR_TEST_REDIS" "0")
16891 #t))
16892 (replace 'check
16893 (lambda _
16894 (invoke "pytest" "-vv" "-k" "not lmdb")
16895 #t)))))
16896 (propagated-inputs
16897 `(("python-asciitree" ,python-asciitree)
16898 ("python-fasteners" ,python-fasteners)
16899 ("python-numcodecs" ,python-numcodecs)
16900 ("python-numpy" ,python-numpy)))
16901 (native-inputs
16902 `(("python-pytest" ,python-pytest)
16903 ("python-setuptools-scm" ,python-setuptools-scm)))
16904 (home-page "https://github.com/zarr-developers/zarr-python")
16905 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16906 (description
16907 "This package provides an implementation of chunked, compressed,
16908N-dimensional arrays for Python.")
16909 (license license:expat)))
16910
16911(define-public python-anndata
16912 (package
16913 (name "python-anndata")
16914 (version "0.7.1")
16915 (source
16916 (origin
16917 (method url-fetch)
16918 (uri (pypi-uri "anndata" version))
16919 (sha256
16920 (base32
16921 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
16922 (build-system python-build-system)
16923 (arguments
16924 `(#:phases
16925 (modify-phases %standard-phases
16926 (add-after 'unpack 'delete-inconvenient-tests
16927 (lambda _
16928 ;; This test depends on python-scikit-learn.
16929 (delete-file "anndata/tests/test_inplace_subset.py")
16930 #t))
16931 (delete 'check)
16932 (add-after 'install 'check
16933 (lambda* (#:key inputs outputs #:allow-other-keys)
16934 (add-installed-pythonpath inputs outputs)
16935 (invoke "pytest" "-vv"))))))
16936 (propagated-inputs
16937 `(("python-h5py" ,python-h5py)
16938 ("python-importlib-metadata" ,python-importlib-metadata)
16939 ("python-natsort" ,python-natsort)
16940 ("python-numcodecs" ,python-numcodecs)
16941 ("python-packaging" ,python-packaging)
16942 ("python-pandas" ,python-pandas)
16943 ("python-scipy" ,python-scipy)
16944 ("python-zarr" ,python-zarr)))
16945 (native-inputs
16946 `(("python-joblib" ,python-joblib)
16947 ("python-pytest" ,python-pytest)
16948 ("python-setuptools-scm" ,python-setuptools-scm)))
16949 (home-page "https://github.com/theislab/anndata")
16950 (synopsis "Annotated data for data analysis pipelines")
16951 (description "Anndata is a package for simple (functional) high-level APIs
16952for data analysis pipelines. In this context, it provides an efficient,
16953scalable way of keeping track of data together with learned annotations and
16954reduces the code overhead typically encountered when using a mostly
16955object-oriented library such as @code{scikit-learn}.")
16956 (license license:bsd-3)))
16957
16958(define-public python-dill
16959 (package
16960 (name "python-dill")
16961 (version "0.3.1.1")
16962 (source
16963 (origin
16964 (method url-fetch)
16965 (uri (pypi-uri "dill" version))
16966 (sha256
16967 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
16968 (build-system python-build-system)
16969 (arguments
16970 `(#:phases
16971 (modify-phases %standard-phases
16972 (replace 'check
16973 (lambda _
16974 (with-directory-excursion "/tmp"
16975 (invoke "nosetests" "-v"))
16976 #t)))))
16977 (native-inputs
16978 `(("python-nose" ,python-nose)))
16979 (home-page "https://pypi.org/project/dill/")
16980 (synopsis "Serialize all of Python")
16981 (description "Dill extends Python's @code{pickle} module for serializing
16982and de-serializing Python objects to the majority of the built-in Python
16983types. Dill provides the user the same interface as the @code{pickle} module,
16984and also includes some additional features. In addition to pickling Python
16985objects, @code{dill} provides the ability to save the state of an interpreter
16986session in a single command. Hence, it would be feasible to save a
16987interpreter session, close the interpreter, ship the pickled file to another
16988computer, open a new interpreter, unpickle the session and thus continue from
16989the saved state of the original interpreter session.")
16990 (license license:bsd-3)))
16991
16992(define-public python-multiprocess
16993 (package
16994 (name "python-multiprocess")
16995 (version "0.70.9")
16996 (source
16997 (origin
16998 (method url-fetch)
16999 (uri (pypi-uri "multiprocess" version))
17000 (sha256
17001 (base32
17002 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
17003 (build-system python-build-system)
17004 (arguments
17005 `(#:phases
17006 (modify-phases %standard-phases
17007 (add-after 'unpack 'disable-broken-tests
17008 (lambda _
17009 ;; This test is broken as there is no keyboard interrupt.
17010 (substitute* "py3.7/multiprocess/tests/__init__.py"
17011 (("^(.*)def test_wait_result"
17012 line indent)
17013 (string-append indent
17014 "@unittest.skip(\"Disabled by Guix\")\n"
17015 line)))
17016 #t))
17017 ;; Tests must be run after installation.
17018 (delete 'check)
17019 (add-after 'install 'check
17020 (lambda* (#:key inputs outputs #:allow-other-keys)
17021 (add-installed-pythonpath inputs outputs)
17022 (invoke "python" "-m" "multiprocess.tests")
17023 #t)))))
17024 (propagated-inputs
17025 `(("python-dill" ,python-dill)))
17026 (home-page "https://pypi.org/project/multiprocess/")
17027 (synopsis "Multiprocessing and multithreading in Python")
17028 (description
17029 "This package is a fork of the multiprocessing Python package, a package
17030which supports the spawning of processes using the API of the standard
17031library's @code{threading} module.")
17032 (license license:bsd-3)))
17033
17034(define-public python-toolz
17035 (package
17036 (name "python-toolz")
17037 (version "0.9.0")
17038 (source
17039 (origin
17040 (method url-fetch)
17041 (uri (pypi-uri "toolz" version))
17042 (sha256
17043 (base32
17044 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
17045 (build-system python-build-system)
17046 ;; FIXME: tests cannot be computed: "Can't perform this operation for
17047 ;; unregistered loader type"
17048 (arguments '(#:tests? #f))
17049 (home-page "https://github.com/pytoolz/toolz/")
17050 (synopsis "List processing tools and functional utilities")
17051 (description
17052 "This package provides a set of utility functions for iterators,
17053functions, and dictionaries.")
17054 (license license:bsd-3)))
17055
17056(define-public python2-toolz
17057 (package-with-python2 python-toolz))
17058
17059(define-public python-cytoolz
17060 (package
17061 (name "python-cytoolz")
17062 (version "0.9.0.1")
17063 (source
17064 (origin
17065 (method url-fetch)
17066 (uri (pypi-uri "cytoolz" version))
17067 (sha256
17068 (base32
17069 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
17070 (build-system python-build-system)
17071 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
17072 ;; 'exceptions'"
17073 (arguments '(#:tests? #f))
17074 (propagated-inputs
17075 `(("python-toolz" ,python-toolz)))
17076 (native-inputs
17077 `(("python-cython" ,python-cython)))
17078 (home-page "https://github.com/pytoolz/cytoolz")
17079 (synopsis "High performance functional utilities")
17080 (description
17081 "The cytoolz package implements the same API as provided by toolz. The
17082main differences are that @code{cytoolz} is faster and cytoolz offers a C API
17083that is accessible to other projects developed in Cython.")
17084 (license license:bsd-3)))
17085
17086(define-public python-sortedcontainers
17087 (package
17088 (name "python-sortedcontainers")
17089 (version "2.1.0")
17090 (source
17091 (origin
17092 (method url-fetch)
17093 (uri (pypi-uri "sortedcontainers" version))
17094 (sha256
17095 (base32
17096 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
17097 (build-system python-build-system)
17098 (native-inputs
17099 `(("python-tox" ,python-tox)))
17100 (propagated-inputs
17101 `(("python-appdirs" ,python-appdirs)
17102 ("python-distlib" ,python-distlib)
17103 ("python-filelock" ,python-filelock)
17104 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
17105 ("python-six" ,python-six)))
17106 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
17107 (synopsis "Sorted List, Sorted Dict, Sorted Set")
17108 (description
17109 "This package provides a sorted collections library, written in
17110pure-Python.")
17111 (license license:asl2.0)))
17112
17113(define-public python-cloudpickle
17114 (package
17115 (name "python-cloudpickle")
17116 (version "0.6.1")
17117 (source
17118 (origin
17119 (method url-fetch)
17120 (uri (pypi-uri "cloudpickle" version))
17121 (sha256
17122 (base32
17123 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
17124 (build-system python-build-system)
17125 ;; FIXME: there are 5 errors in 122 tests:
17126 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
17127 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
17128 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
17129 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
17130 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
17131 ;; TypeError: cannot serialize '_io.BufferedRandom' object
17132 (arguments '(#:tests? #f))
17133 (native-inputs
17134 `(("python-pytest" ,python-pytest)
17135 ("python-mock" ,python-mock)
17136 ("python-tornado" ,python-tornado)))
17137 (home-page "https://github.com/cloudpipe/cloudpickle")
17138 (synopsis "Extended pickling support for Python objects")
17139 (description
17140 "Cloudpickle makes it possible to serialize Python constructs not
17141supported by the default pickle module from the Python standard library. It
17142is especially useful for cluster computing where Python expressions are
17143shipped over the network to execute on remote hosts, possibly close to the
17144data.")
17145 (license license:bsd-3)))
17146
17147(define-public python2-cloudpickle
17148 (package-with-python2 python-cloudpickle))
17149
17150(define-public python-locket
17151 (package
17152 (name "python-locket")
17153 (version "0.2.0")
17154 (source
17155 (origin
17156 (method url-fetch)
17157 (uri (pypi-uri "locket" version))
17158 (sha256
17159 (base32
17160 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
17161 (build-system python-build-system)
17162 (home-page "https://github.com/mwilliamson/locket.py")
17163 (synopsis "File-based locks for Python")
17164 (description
17165 "Locket implements a lock that can be used by multiple processes provided
17166they use the same path.")
17167 (license license:bsd-2)))
17168
17169(define-public python2-locket
17170 (package-with-python2 python-locket))
17171
17172(define-public python-blosc
17173 (package
17174 (name "python-blosc")
17175 (version "1.5.1")
17176 (source
17177 (origin
17178 (method url-fetch)
17179 (uri (pypi-uri "blosc" version))
17180 (sha256
17181 (base32
17182 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
17183 (build-system python-build-system)
17184 ;; FIXME: all tests pass, but then this error is printed:
17185 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
17186 (arguments '(#:tests? #f))
17187 (propagated-inputs
17188 `(("python-numpy" ,python-numpy)))
17189 (home-page "https://github.com/blosc/python-blosc")
17190 (synopsis "Python wrapper for the Blosc data compressor library")
17191 (description "Blosc is a high performance compressor optimized for binary
17192data. It has been designed to transmit data to the processor cache faster
17193than the traditional, non-compressed, direct memory fetch approach via a
17194@code{memcpy()} system call.
17195
17196Blosc works well for compressing numerical arrays that contains data with
17197relatively low entropy, like sparse data, time series, grids with
17198regular-spaced values, etc.
17199
17200This Python package wraps the Blosc library.")
17201 (license license:bsd-3)))
17202
17203(define-public python2-blosc
17204 (package-with-python2 python-blosc))
17205
17206(define-public python-partd
17207 (package
17208 (name "python-partd")
17209 (version "0.3.9")
17210 (source
17211 (origin
17212 (method url-fetch)
17213 (uri (pypi-uri "partd" version))
17214 (sha256
17215 (base32
17216 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
17217 (build-system python-build-system)
17218 (propagated-inputs
17219 `(("python-blosc" ,python-blosc)
17220 ("python-locket" ,python-locket)
17221 ("python-numpy" ,python-numpy)
17222 ("python-pandas" ,python-pandas)
17223 ("python-pyzmq" ,python-pyzmq)
17224 ("python-toolz" ,python-toolz)))
17225 (home-page "https://github.com/dask/partd/")
17226 (synopsis "Appendable key-value storage")
17227 (description "Partd stores key-value pairs. Values are raw bytes. We
17228append on old values. Partd excels at shuffling operations.")
17229 (license license:bsd-3)))
17230
17231(define-public python2-partd
17232 (package-with-python2 python-partd))
17233
17234(define-public python-fsspec
17235 (package
17236 (name "python-fsspec")
17237 (version "0.6.1")
17238 (source
17239 (origin
17240 (method url-fetch)
17241 (uri (pypi-uri "fsspec" version))
17242 (sha256
17243 (base32
17244 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
17245 (build-system python-build-system)
17246 (arguments '(#:tests? #f)) ; there are none
17247 (home-page "https://github.com/intake/filesystem_spec")
17248 (synopsis "File-system specification")
17249 (description "The purpose of this package is to produce a template or
17250specification for a file-system interface, that specific implementations
17251should follow, so that applications making use of them can rely on a common
17252behavior and not have to worry about the specific internal implementation
17253decisions with any given backend.")
17254 (license license:bsd-3)))
17255
17256(define-public python-dask
17257 (package
17258 (name "python-dask")
17259 (version "2.9.0")
17260 (source
17261 (origin
17262 (method url-fetch)
17263 (uri (pypi-uri "dask" version))
17264 (sha256
17265 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
17266 (build-system python-build-system)
17267 (arguments
17268 `(#:phases
17269 (modify-phases %standard-phases
17270 (add-after 'unpack 'disable-broken-tests
17271 (lambda _
17272 ;; This test is marked as xfail when pytest-xdist is used.
17273 (substitute* "dask/tests/test_threaded.py"
17274 (("def test_interrupt\\(\\)" m)
17275 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
17276 m)))
17277 ;; This one fails with a type error:
17278 ;; TypeError: Already tz-aware, use tz_convert to convert.
17279 (substitute* "dask/dataframe/tests/test_shuffle.py"
17280 (("def test_set_index_timestamp\\(\\)" m)
17281 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
17282 m)))
17283 #t))
17284 (replace 'check
17285 (lambda _ (invoke "pytest" "-vv"))))))
17286 (propagated-inputs
17287 `(("python-cloudpickle" ,python-cloudpickle)
17288 ("python-fsspec" ,python-fsspec)
17289 ("python-numpy" ,python-numpy)
17290 ("python-packaging" ,python-packaging)
17291 ("python-pandas" ,python-pandas)
17292 ("python-partd" ,python-partd)
17293 ("python-toolz" ,python-toolz)
17294 ("python-pyyaml" ,python-pyyaml)))
17295 (native-inputs
17296 `(("python-pytest" ,python-pytest)
17297 ("python-pytest-runner" ,python-pytest-runner)))
17298 (home-page "https://github.com/dask/dask/")
17299 (synopsis "Parallel computing with task scheduling")
17300 (description
17301 "Dask is a flexible parallel computing library for analytics. It
17302consists of two components: dynamic task scheduling optimized for computation,
17303and large data collections like parallel arrays, dataframes, and lists that
17304extend common interfaces like NumPy, Pandas, or Python iterators to
17305larger-than-memory or distributed environments. These parallel collections
17306run on top of the dynamic task schedulers. ")
17307 (license license:bsd-3)))
17308
17309(define-public python-ilinkedlist
17310 (package
17311 (name "python-ilinkedlist")
17312 (version "0.4.0")
17313 (source
17314 (origin
17315 (method url-fetch)
17316 (uri (pypi-uri "ilinkedlist" version))
17317 (sha256
17318 (base32
17319 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
17320 (build-system python-build-system)
17321 (native-inputs `(("python-pytest" ,python-pytest)))
17322 (inputs `(("python" ,python)))
17323 (home-page "https://github.com/luther9/ilinkedlist-py")
17324 (synopsis "Immutable linked list library")
17325 (description
17326 "This is a implementation of immutable linked lists for Python. It
17327contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
17328Since a linked list is treated as immutable, it is hashable, and its length
17329can be retrieved in constant time. Some of the terminology is inspired by
17330LISP. It is possible to create an improper list by creating a @code{Pair}
17331with a non-list @code{cdr}.")
17332 (license license:gpl3+)))
17333
17334(define-public python-readlike
17335 (package
17336 (name "python-readlike")
17337 (version "0.1.3")
17338 (source
17339 (origin
17340 (method url-fetch)
17341 (uri (pypi-uri "readlike" version))
17342 (sha256
17343 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
17344 (build-system python-build-system)
17345 (home-page "https://github.com/jangler/readlike")
17346 (synopsis "GNU Readline-like line editing module")
17347 (description
17348 "This Python module provides line editing functions similar to the default
17349Emacs-style ones of GNU Readline. Unlike the Python standard library's
17350@code{readline} package, this one allows access to those capabilties in settings
17351outside of a standard command-line interface. It is especially well-suited to
17352interfacing with Urwid, due to a shared syntax for describing key inputs.
17353
17354Currently, all stateless Readline commands are implemented. Yanking and history
17355are not supported.")
17356 (license license:expat)))
17357
17358(define-public python2-readlike
17359 (package-with-python2 python-readlike))
17360
17361(define-public python-reparser
17362 (package
17363 (name "python-reparser")
17364 (version "1.4.3")
17365 (source
17366 (origin
17367 (method url-fetch)
17368 (uri (pypi-uri "ReParser" version))
17369 (sha256
17370 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
17371 (build-system python-build-system)
17372 (home-page "https://github.com/xmikos/reparser")
17373 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
17374 (description
17375 "This Python library provides a simple lexer/parser for inline markup based
17376on regular expressions.")
17377 (license license:expat)))
17378
17379(define-public python2-reparser
17380 (let ((reparser (package-with-python2
17381 (strip-python2-variant python-reparser))))
17382 (package (inherit reparser)
17383 (propagated-inputs
17384 `(("python2-enum34" ,python2-enum34)
17385 ,@(package-propagated-inputs reparser))))))
17386
17387(define-public python-precis-i18n
17388 (package
17389 (name "python-precis-i18n")
17390 (version "1.0.0")
17391 (source
17392 (origin
17393 (method url-fetch)
17394 (uri (pypi-uri "precis_i18n" version))
17395 (sha256
17396 (base32
17397 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
17398 (build-system python-build-system)
17399 (home-page "https://github.com/byllyfish/precis_i18n")
17400 (synopsis "Implementation of the PRECIS framework")
17401 (description
17402 "This module implements the PRECIS Framework as described in RFC 8264,
17403RFC 8265 and RFC 8266.")
17404 (license license:expat)))
17405
17406(define-public python-absl-py
17407 (package
17408 (name "python-absl-py")
17409 (version "0.6.1")
17410 (source
17411 (origin
17412 (method url-fetch)
17413 (uri (pypi-uri "absl-py" version))
17414 (sha256
17415 (base32
17416 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
17417 (build-system python-build-system)
17418 (propagated-inputs
17419 `(("python-six" ,python-six)))
17420 (home-page "https://github.com/abseil/abseil-py")
17421 (synopsis "Abseil Python common libraries")
17422 (description
17423 "This package provides the Abseil Python Common Libraries, a collection
17424of Python libraries for building Python applications.")
17425 (license license:asl2.0)))
17426
17427(define-public python-astor
17428 (package
17429 (name "python-astor")
17430 (version "0.7.1")
17431 (source
17432 (origin
17433 (method url-fetch)
17434 (uri (pypi-uri "astor" version))
17435 (sha256
17436 (base32
17437 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
17438 (build-system python-build-system)
17439 ;; FIXME: There are two errors and two test failures.
17440 (arguments `(#:tests? #f))
17441 (home-page "https://github.com/berkerpeksag/astor")
17442 (synopsis "Read and write Python ASTs")
17443 (description "Astor is designed to allow easy manipulation of Python
17444source via the Abstract Syntax Tree.")
17445 (license license:bsd-3)))
17446
17447(define-public python2-astor
17448 (package-with-python2 python-astor))
17449
17450(define-public python-astunparse
17451 (package
17452 (name "python-astunparse")
17453 (version "1.6.2")
17454 (source
17455 (origin
17456 (method url-fetch)
17457 (uri (pypi-uri "astunparse" version))
17458 (sha256
17459 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
17460 (build-system python-build-system)
17461 (arguments '(#:tests? #f)) ; there are none
17462 (propagated-inputs
17463 `(("python-six" ,python-six)
17464 ("python-wheel" ,python-wheel)))
17465 (home-page "https://github.com/simonpercivall/astunparse")
17466 (synopsis "AST unparser for Python")
17467 (description "This package provides an AST unparser for Python. It is a
17468factored out version of @code{unparse} found in the Python source
17469distribution.")
17470 (license license:bsd-3)))
17471
17472(define-public python-gast
17473 (package
17474 (name "python-gast")
17475 (version "0.3.3")
17476 (source
17477 (origin
17478 (method url-fetch)
17479 (uri (pypi-uri "gast" version))
17480 (sha256
17481 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
17482 (build-system python-build-system)
17483 (propagated-inputs
17484 `(("python-astunparse" ,python-astunparse)))
17485 (home-page "https://pypi.org/project/gast/")
17486 (synopsis "Generic Python AST that abstracts the underlying Python version")
17487 (description
17488 "GAST provides a compatibility layer between the AST of various Python
17489versions, as produced by @code{ast.parse} from the standard @code{ast}
17490module.")
17491 (license license:bsd-3)))
17492
17493(define-public python-wikidata
17494 (package
17495 (name "python-wikidata")
17496 (version "0.6.1")
17497 (source
17498 (origin
17499 (method url-fetch)
17500 (uri (pypi-uri "Wikidata" version))
17501 (sha256
17502 (base32
17503 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
17504 (build-system python-build-system)
17505 (propagated-inputs
17506 `(("python-babel" ,python-babel)))
17507 (home-page "https://github.com/dahlia/wikidata")
17508 (synopsis "Wikidata client library")
17509 (description
17510 "This package provides a Python interface to
17511@url{https://www.wikidata.org/, Wikidata}.")
17512 (properties '((upstream-name . "Wikidata")))
17513 (license license:gpl3+)))
17514
17515(define-public python-doctest-ignore-unicode
17516 (package
17517 (name "python-doctest-ignore-unicode")
17518 (version "0.1.2")
17519 (source
17520 (origin
17521 (method url-fetch)
17522 (uri (pypi-uri "doctest-ignore-unicode" version))
17523 (sha256
17524 (base32
17525 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
17526 (build-system python-build-system)
17527 (native-inputs
17528 `(("python-nose" ,python-nose)))
17529 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
17530 (synopsis "Ignore Unicode literal prefixes in doctests")
17531 (description
17532 "This package adds support for a flag to ignore Unicode literal prefixes
17533in doctests.")
17534 (license license:asl2.0)))
17535
17536(define-public python-attr
17537 (package
17538 (name "python-attr")
17539 (version "0.3.1")
17540 (source
17541 (origin
17542 (method url-fetch)
17543 (uri (pypi-uri "attr" version))
17544 (sha256
17545 (base32
17546 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
17547 (build-system python-build-system)
17548 (home-page "https://github.com/denis-ryzhkov/attr")
17549 (synopsis "Decorator for attributes of target function or class")
17550 (description "Simple decorator to set attributes of target function or
17551class in a @acronym{DRY, Don't Repeat Yourself} way.")
17552 (license license:expat)))
17553
17554(define-public python-construct
17555 (package
17556 (name "python-construct")
17557 (version "2.10.56")
17558 (source
17559 (origin
17560 (method url-fetch)
17561 (uri (pypi-uri "construct" version))
17562 (sha256
17563 (base32
17564 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
17565 (build-system python-build-system)
17566 (arguments
17567 `(#:tests? #f)) ; No tests exist.
17568 (propagated-inputs
17569 `(("python-extras" ,python-extras)
17570 ("python-arrow" ,python-arrow)
17571 ("python-numpy" ,python-numpy)
17572 ("python-ruamel.yaml" ,python-ruamel.yaml)))
17573 (home-page "https://construct.readthedocs.io")
17574 (synopsis "Declarative and symmetrical parser and builder for binary data")
17575 (description
17576 "This package provides both simple, atomic constructs (such as
17577integers of various sizes), as well as composite ones which allow you
17578form hierarchical and sequential structures of increasing complexity.
17579It features bit and byte granularity, easy debugging and testing, an
17580easy-to-extend subclass system, and lots of primitive constructs to
17581make your work easier.")
17582 (license license:expat)))
17583
17584(define-public python-humanize
17585 (package
17586 (name "python-humanize")
17587 (version "0.5.1")
17588 (source
17589 (origin
17590 (method url-fetch)
17591 (uri (pypi-uri "humanize" version))
17592 (sha256
17593 (base32
17594 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17595 (arguments
17596 '(#:tests? #f)) ; tests not in pypi archive
17597 (build-system python-build-system)
17598 (home-page "https://github.com/jmoiron/humanize")
17599 (synopsis "Print numerical information in a human-readable form")
17600 (description "This package provides a Python module that displays numbers
17601and dates in \"human readable\" forms. For example, it would display
17602\"12345591313\" as \"12.3 billion\".")
17603 (license license:expat)))
17604
17605(define-public python-txaio
17606 (package
17607 (name "python-txaio")
17608 (version "18.8.1")
17609 (source
17610 (origin
17611 (method url-fetch)
17612 (uri (pypi-uri "txaio" version))
17613 (sha256
17614 (base32
17615 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17616 (build-system python-build-system)
17617 (propagated-inputs
17618 `(("python-twisted" ,python-twisted)
17619 ("python-six" ,python-six)))
17620 (home-page "https://github.com/crossbario/txaio")
17621 (synopsis "Compatibility layer between Python asyncio and Twisted")
17622 (description "Txaio provides a compatibility layer between the Python
17623@code{asyncio} module and @code{Twisted}.")
17624 (license license:expat)))
17625
17626(define-public python-toolshed
17627 (package
17628 (name "python-toolshed")
17629 (version "0.4.6")
17630 (source
17631 (origin
17632 (method url-fetch)
17633 (uri (pypi-uri "toolshed" version))
17634 (sha256
17635 (base32
17636 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17637 (build-system python-build-system)
17638 (native-inputs
17639 `(("python-nose" ,python-nose)))
17640 (home-page "https://github.com/brentp/toolshed/")
17641 (synopsis "Collection of modules and functions for working with data")
17642 (description "This is a collection of well-tested, simple modules and
17643functions that aim to reduce boilerplate when working with data.")
17644 (license license:bsd-2)))
17645
17646(define-public python-annoy
17647 (package
17648 (name "python-annoy")
17649 (version "1.15.1")
17650 (source
17651 (origin
17652 (method url-fetch)
17653 (uri (pypi-uri "annoy" version))
17654 (sha256
17655 (base32
17656 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17657 (build-system python-build-system)
17658 (native-inputs
17659 `(("python-nose" ,python-nose)))
17660 (home-page "https://github.com/spotify/annoy/")
17661 (synopsis "Approximate nearest neighbors library")
17662 (description
17663 "Annoy is a C++ library with Python bindings to search for points in
17664space that are close to a given query point. It also creates large read-only
17665file-based data structures that are @code{mmap}ped into memory so that many
17666processes may share the same data.")
17667 (license license:asl2.0)))
17668
17669(define-public python-pylzma
17670 (package
17671 (name "python-pylzma")
17672 (version "0.5.0")
17673 (source
17674 (origin
17675 (method url-fetch)
17676 (uri (pypi-uri "pylzma" version))
17677 (sha256
17678 (base32
17679 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
17680 (build-system python-build-system)
17681 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
17682 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
17683 (description "This package provides Python bindings for the LZMA library
17684by Igor Pavlov.")
17685 (license license:lgpl2.1+)))
17686
17687(define-public python2-pylzma
17688 (package-with-python2 python-pylzma))
17689
17690(define-public python2-zeroconf
17691 (package
17692 (name "python2-zeroconf")
17693
17694 ;; This is the last version that supports Python 2.x.
17695 (version "0.19.1")
17696 (source
17697 (origin
17698 (method url-fetch)
17699 (uri (pypi-uri "zeroconf" version))
17700 (sha256
17701 (base32
17702 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
17703 (build-system python-build-system)
17704 (arguments
17705 `(#:python ,python-2
17706 #:phases
17707 (modify-phases %standard-phases
17708 (add-after 'unpack 'patch-requires
17709 (lambda* (#:key inputs #:allow-other-keys)
17710 (substitute* "setup.py"
17711 (("enum-compat")
17712 "enum34"))
17713 #t)))))
17714 (native-inputs
17715 `(("python2-six" ,python2-six)
17716 ("python2-enum32" ,python2-enum34)
17717 ("python2-netifaces" ,python2-netifaces)
17718 ("python2-typing" ,python2-typing)))
17719 (home-page "https://github.com/jstasiak/python-zeroconf")
17720 (synopsis "Pure Python mDNS service discovery")
17721 (description
17722 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
17723compatible).")
17724 (license license:lgpl2.1+)))
17725
17726(define-public python-bsddb3
17727 (package
17728 (name "python-bsddb3")
17729 (version "6.2.6")
17730 (source
17731 (origin
17732 (method url-fetch)
17733 (uri (pypi-uri "bsddb3" version))
17734 (sha256
17735 (base32
17736 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
17737 (build-system python-build-system)
17738 (inputs
17739 `(("bdb" ,bdb)))
17740 (arguments
17741 '(#:phases
17742 (modify-phases %standard-phases
17743 (add-after 'unpack 'configure-locations
17744 (lambda* (#:key inputs #:allow-other-keys)
17745 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
17746 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
17747 #t))
17748 (replace 'check
17749 (lambda _
17750 (invoke "python3" "test3.py" "-v"))))))
17751 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
17752 (synopsis "Python bindings for Oracle Berkeley DB")
17753 (description
17754 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
17755C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
17756Transaction objects, and each of these is exposed as a Python type in the
17757bsddb3.db module. The database objects can use various access methods: btree,
17758hash, recno, and queue. Complete support of Berkeley DB distributed
17759transactions. Complete support for Berkeley DB Replication Manager.
17760Complete support for Berkeley DB Base Replication. Support for RPC.")
17761 (license license:bsd-3)))
17762
17763(define-public python-dbfread
17764 (package
17765 (name "python-dbfread")
17766 (version "2.0.7")
17767 (source (origin
17768 (method url-fetch)
17769 (uri (pypi-uri "dbfread" version))
17770 (sha256
17771 (base32
17772 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
17773 (build-system python-build-system)
17774 (native-inputs
17775 `(("python-pytest" ,python-pytest)))
17776 (home-page "https://dbfread.readthedocs.io")
17777 (synopsis "Read DBF Files with Python")
17778 (description
17779 "This library reads DBF files and returns the data as native Python data
17780types for further processing. It is primarily intended for batch jobs and
17781one-off scripts.")
17782 (license license:expat)))
17783
17784(define-public python-cached-property
17785 (package
17786 (name "python-cached-property")
17787 (version "1.5.1")
17788 (source
17789 (origin
17790 (method url-fetch)
17791 (uri (pypi-uri "cached-property" version))
17792 (sha256
17793 (base32
17794 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
17795 (build-system python-build-system)
17796 (arguments
17797 `(#:phases
17798 (modify-phases %standard-phases
17799 ;; https://github.com/pydanny/cached-property/issues/131
17800 ;; recent versions of freezegun break one test
17801 (add-after 'unpack 'disable-broken-test
17802 (lambda _
17803 (substitute* "tests/test_cached_property.py"
17804 (("def test_threads_ttl_expiry\\(self\\)" m)
17805 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
17806 " " m)))
17807 #t)))))
17808 (native-inputs
17809 `(("python-freezegun" ,python-freezegun)))
17810 (home-page
17811 "https://github.com/pydanny/cached-property")
17812 (synopsis
17813 "Decorator for caching properties in classes")
17814 (description
17815 "This package provides a decorator which makes caching
17816time-or-computationally-expensive properties quick and easy and works in Python
178172 or 3.")
17818 (license license:bsd-3)))
17819
17820(define-public python-folium
17821 (package
17822 (name "python-folium")
17823 (version "0.10.1")
17824 (source
17825 (origin
17826 (method url-fetch)
17827 (uri (pypi-uri "folium" version))
17828 (sha256
17829 (base32
17830 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
17831 (build-system python-build-system)
17832 (propagated-inputs
17833 `(("python-branca" ,python-branca)
17834 ("python-jinja2" ,python-jinja2)
17835 ("python-numpy" ,python-numpy)
17836 ("python-requests" ,python-requests)))
17837 (native-inputs
17838 `(("python-pytest" ,python-pytest)))
17839 (home-page "https://github.com/python-visualization/folium")
17840 (synopsis "Make beautiful maps with Leaflet.js & Python")
17841 (description "@code{folium} makes it easy to visualize data that’s been
17842manipulated in Python on an interactive leaflet map. It enables both the
17843binding of data to a map for @code{choropleth} visualizations as well as
17844passing rich vector/raster/HTML visualizations as markers on the map.
17845
17846The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
17847Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
17848supports Image, Video, GeoJSON and TopoJSON overlays.")
17849 (license license:expat)))
17850
17851(define-public jube
17852 (package
17853 ;; This is a command-line tool, so no "python-" prefix.
17854 (name "jube")
17855 (version "2.2.2")
17856 (source (origin
17857 (method url-fetch)
17858 (uri (string-append
17859 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
17860 version))
17861 (sha256
17862 (base32
17863 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
17864 (file-name (string-append "jube-" version ".tar.gz"))))
17865 (build-system python-build-system)
17866 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
17867 (synopsis "Benchmarking environment")
17868 (description
17869 "JUBE helps perform and analyze benchmarks in a systematic way. For each
17870benchmarked application, benchmark data is stored in a format that allows JUBE
17871to deduct the desired information. This data can be parsed by automatic pre-
17872and post-processing scripts that draw information and store it more densely
17873for manual interpretation.")
17874 (license license:gpl3+)))
17875
17876(define-public python-pyroutelib3
17877 (package
17878 (name "python-pyroutelib3")
17879 (version "1.3.post1")
17880 (source
17881 (origin
17882 (method url-fetch)
17883 (uri (pypi-uri "pyroutelib3" version))
17884 (sha256
17885 (base32
17886 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17887 (build-system python-build-system)
17888 (propagated-inputs
17889 `(("python-dateutil" ,python-dateutil)))
17890 (home-page "https://github.com/MKuranowski/pyroutelib3")
17891 (synopsis "Library for simple routing on OSM data")
17892 (description "Library for simple routing on OSM data")
17893 (license license:gpl3+)))
17894
17895(define-public python-bibtexparser
17896 (package
17897 (name "python-bibtexparser")
17898 (version "1.1.0")
17899 (source
17900 (origin
17901 (method url-fetch)
17902 (uri (pypi-uri "bibtexparser" version))
17903 (sha256
17904 (base32
17905 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17906 (build-system python-build-system)
17907 (propagated-inputs
17908 `(("python-pyparsing" ,python-pyparsing)))
17909 (native-inputs
17910 `(("python-future" ,python-future)))
17911 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17912 (synopsis "Python library to parse BibTeX files")
17913 (description "BibtexParser is a Python library to parse BibTeX files.")
17914 (license (list license:bsd-3 license:lgpl3))))
17915
17916(define-public python-distro
17917 (package
17918 (name "python-distro")
17919 (version "1.4.0")
17920 (source
17921 (origin
17922 (method url-fetch)
17923 (uri (pypi-uri "distro" version))
17924 (sha256
17925 (base32
17926 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17927 (build-system python-build-system)
17928 (native-inputs
17929 `(("python-pytest" ,python-pytest)))
17930 (home-page "https://github.com/nir0s/distro")
17931 (synopsis
17932 "OS platform information API")
17933 (description
17934 "@code{distro} provides information about the OS distribution it runs on,
17935such as a reliable machine-readable ID, or version information.
17936
17937It is the recommended replacement for Python's original
17938`platform.linux_distribution` function (which will be removed in Python 3.8).
17939@code{distro} also provides a command-line interface to output the platform
17940information in various formats.")
17941 (license license:asl2.0)))
17942
17943(define-public python-cairosvg
17944 (package
17945 (name "python-cairosvg")
17946 (version "2.4.2")
17947 (source
17948 (origin
17949 (method url-fetch)
17950 (uri (pypi-uri "CairoSVG" version))
17951 (sha256
17952 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17953 (build-system python-build-system)
17954 (arguments
17955 `(#:phases
17956 (modify-phases %standard-phases
17957 (replace 'check
17958 (lambda _ (invoke "pytest"))))))
17959 (propagated-inputs
17960 `(("python-cairocffi" ,python-cairocffi)
17961 ("python-cssselect2" ,python-cssselect2)
17962 ("python-defusedxml" ,python-defusedxml)
17963 ("python-pillow" ,python-pillow)
17964 ("python-tinycss2" ,python-tinycss2)))
17965 (native-inputs
17966 `(("python-pytest-flake8" ,python-pytest-flake8)
17967 ("python-pytest-isort" ,python-pytest-isort)
17968 ("python-pytest-runner" ,python-pytest-runner)))
17969 (home-page "https://cairosvg.org/")
17970 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17971 (description "CairoSVG is a SVG converter based on Cairo. It can export
17972SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17973SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17974parsed, the result is drawn to a Cairo surface that can be exported to
17975qvarious formats: PDF, PostScript, PNG and even SVG.")
17976 (license license:lgpl3+)))
17977
17978(define-public python-pyphen
17979 (package
17980 (name "python-pyphen")
17981 (version "0.9.5")
17982 (source
17983 (origin
17984 (method url-fetch)
17985 (uri (pypi-uri "Pyphen" version))
17986 (sha256
17987 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17988 (build-system python-build-system)
17989 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17990 ;; embedded set provided by upstream - like Debian does.
17991 (home-page "https://github.com/Kozea/Pyphen")
17992 (synopsis "Pure Python module to hyphenate text")
17993 (description "Pyphen is a pure Python module to hyphenate text using
17994existing Hunspell hyphenation dictionaries.")
17995 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
17996
17997(define-public python-intelhex
17998 (package
17999 (name "python-intelhex")
18000 (version "2.2.1")
18001 (source
18002 (origin
18003 (method url-fetch)
18004 (uri (pypi-uri "intelhex" version))
18005 (sha256
18006 (base32
18007 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
18008 (build-system python-build-system)
18009 (arguments '(#:tests? #f)) ;issue with version
18010 (home-page "https://pypi.org/project/IntelHex/")
18011 (synopsis "Python library for Intel HEX files manipulations")
18012 (description "The Intel HEX file format is widely used in microprocessors
18013and microcontrollers area (embedded systems etc.) as the de facto standard for
18014representation of code to be programmed into microelectronic devices. This
18015package provides an intelhex Python library to read, write, create from
18016scratch and manipulate data from Intel HEX file format. It also includes
18017several convenience Python scripts, including \"classic\" hex2bin and bin2hex
18018converters and more, those based on the library itself.")
18019 (license license:bsd-3)))
18020
18021(define-public python-pykwalify
18022 (package
18023 (name "python-pykwalify")
18024 (version "1.7.0")
18025 (source
18026 (origin
18027 (method url-fetch)
18028 (uri (pypi-uri "pykwalify" version))
18029 (sha256
18030 (base32
18031 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
18032 (build-system python-build-system)
18033 (arguments '(#:tests? #f)) ;missing dependencies
18034 (propagated-inputs
18035 `(("python-dateutil" ,python-dateutil)
18036 ("python-docopt" ,python-docopt)
18037 ("python-pyyaml" ,python-pyyaml)))
18038 (home-page "https://github.com/grokzen/pykwalify")
18039 (synopsis
18040 "Python lib/cli for JSON/YAML schema validation")
18041 (description
18042 "This package provides a parser, schema validator, and data binding tool
18043for YAML and JSON.")
18044 (license license:expat)))
18045
18046(define-public python-dbusmock
18047 (package
18048 (name "python-dbusmock")
18049 (version "0.18.3")
18050 (source
18051 (origin
18052 (method url-fetch)
18053 (uri (pypi-uri "python-dbusmock" version))
18054 (sha256
18055 (base32
18056 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
18057 (build-system python-build-system)
18058 (arguments
18059 '(#:phases
18060 (modify-phases %standard-phases
18061 (add-after 'unpack 'patch-shell-path
18062 (lambda _
18063 (substitute* "tests/test_code.py"
18064 (("/bin/bash") (which "bash")))
18065 #t)))))
18066 (native-inputs
18067 `(;; For tests.
18068 ("dbus" ,dbus) ; for dbus-daemon
18069 ("python-nose" ,python-nose)
18070 ("which" ,which)))
18071 (propagated-inputs
18072 `(("python-dbus" ,python-dbus)
18073 ("python-pygobject" ,python-pygobject)))
18074 (home-page "https://github.com/martinpitt/python-dbusmock")
18075 (synopsis "Python library for mock D-Bus objects")
18076 (description "python-dbusmock allows for the easy creation of mock objects on
18077D-Bus. This is useful for writing tests for software which talks to D-Bus
18078services such as upower, systemd, logind, gnome-session or others, and it is
18079hard (or impossible without root privileges) to set the state of the real
18080services to what you expect in your tests.")
18081 (license license:lgpl3+)))
18082
18083(define-public python-ujson
18084 (package
18085 (name "python-ujson")
18086 (version "1.35")
18087 (source
18088 (origin
18089 (method url-fetch)
18090 (uri (pypi-uri "ujson" version))
18091 (sha256
18092 (base32
18093 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
18094 (build-system python-build-system)
18095 (home-page "http://www.esn.me")
18096 (synopsis
18097 "Ultra fast JSON encoder and decoder for Python")
18098 (description
18099 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
18100 bindings for Python 2.5+ and 3.")
18101 (license license:bsd-3)))
18102
18103(define-public python2-ujson
18104 (package-with-python2 python-ujson))
18105
18106(define-public python-iocapture
18107 ;; The latest release is more than a year older than this commit.
18108 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
18109 (revision "1"))
18110 (package
18111 (name "python-iocapture")
18112 (version "0.1.2")
18113 (source
18114 (origin
18115 (method git-fetch)
18116 (uri (git-reference
18117 (url "https://github.com/oinume/iocapture.git")
18118 (commit commit)))
18119 (file-name (git-file-name name version))
18120 (sha256
18121 (base32
18122 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
18123 (build-system python-build-system)
18124 (arguments
18125 `(#:phases
18126 (modify-phases %standard-phases
18127 (delete 'check)
18128 (add-after 'install 'check
18129 (lambda* (#:key inputs outputs #:allow-other-keys)
18130 (add-installed-pythonpath inputs outputs)
18131 (invoke "py.test" "-v" "tests")
18132 #t)))))
18133 (propagated-inputs
18134 `(("python-flexmock" ,python-flexmock)
18135 ("python-pytest" ,python-pytest)
18136 ("python-pytest-cov" ,python-pytest-cov)
18137 ("python-six" ,python-six)))
18138 (home-page "https://github.com/oinume/iocapture")
18139 (synopsis "Python capturing tool for stdout and stderr")
18140 (description
18141 "This package helps you to capture the standard out (stdout) and the
18142standard error channel (stderr) in your program.")
18143 (license license:expat))))
18144
18145(define-public python-argh
18146 ;; There are 21 commits since the latest release containing important
18147 ;; improvements.
18148 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
18149 (revision "1"))
18150 (package
18151 (name "python-argh")
18152 (version (git-version "0.26.2" revision commit))
18153 (source
18154 (origin
18155 (method git-fetch)
18156 (uri (git-reference
18157 (url "https://github.com/neithere/argh.git")
18158 (commit commit)))
18159 (file-name (git-file-name name version))
18160 (sha256
18161 (base32
18162 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
18163 (build-system python-build-system)
18164 (propagated-inputs
18165 `(("python-iocapture" ,python-iocapture)
18166 ("python-mock" ,python-mock)
18167 ("python-pytest" ,python-pytest)
18168 ("python-pytest-cov" ,python-pytest-cov)
18169 ("python-pytest-xdist" ,python-pytest-xdist)
18170 ("python-tox" ,python-tox)))
18171 (home-page "https://github.com/neithere/argh/")
18172 (synopsis "Argparse wrapper with natural syntax")
18173 (description
18174 "python-argh is a small library that provides several layers of
18175abstraction on top of @code{python-argparse}. The layers can be mixed. It is
18176always possible to declare a command with the highest possible (and least
18177flexible) layer and then tune the behaviour with any of the lower layers
18178including the native API of @code{python-argparse}.")
18179 (license license:lgpl3+))))
18180
18181(define-public python-ppft
18182 (package
18183 (name "python-ppft")
18184 (version "1.6.6.1")
18185 (source
18186 (origin
18187 (method url-fetch)
18188 (uri (pypi-uri "ppft" version))
18189 (sha256
18190 (base32
18191 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
18192 (build-system python-build-system)
18193 (arguments '(#:tests? #f)) ; there are none
18194 (propagated-inputs
18195 `(("python-six" ,python-six)))
18196 (home-page "https://pypi.org/project/ppft/")
18197 (synopsis "Fork of Parallel Python")
18198 (description
18199 "This package is a fork of Parallel Python. The Parallel Python
18200module (@code{pp}) provides an easy and efficient way to create
18201parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
18202computers and clusters. It features cross-platform portability and dynamic
18203load balancing.")
18204 (license license:bsd-3)))
18205
18206(define-public python-pox
18207 (package
18208 (name "python-pox")
18209 (version "0.2.7")
18210 (source
18211 (origin
18212 (method url-fetch)
18213 (uri (pypi-uri "pox" version))
18214 (sha256
18215 (base32
18216 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
18217 (build-system python-build-system)
18218 (arguments
18219 `(#:phases
18220 (modify-phases %standard-phases
18221 (replace 'check
18222 (lambda _
18223 (mkdir-p "/tmp/guix")
18224 (setenv "SHELL" "bash")
18225 (setenv "USERNAME" "guix")
18226 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
18227 (invoke "py.test" "-vv")
18228 #t)))))
18229 (native-inputs
18230 `(("python-pytest" ,python-pytest)
18231 ("which" ,which)))
18232 (home-page "https://pypi.org/project/pox/")
18233 (synopsis "Python utilities for filesystem exploration and automated builds")
18234 (description
18235 "Pox provides a collection of utilities for navigating and manipulating
18236filesystems. This module is designed to facilitate some of the low level
18237operating system interactions that are useful when exploring a filesystem on a
18238remote host. Pox provides Python equivalents of several shell commands such
18239as @command{which} and @command{find}. These commands allow automated
18240discovery of what has been installed on an operating system, and where the
18241essential tools are located.")
18242 (license license:bsd-3)))
18243
18244(define-public python-pathos
18245 (package
18246 (name "python-pathos")
18247 (version "0.2.5")
18248 (source
18249 (origin
18250 (method url-fetch)
18251 (uri (pypi-uri "pathos" version))
18252 (sha256
18253 (base32
18254 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
18255 (build-system python-build-system)
18256 (arguments
18257 '(#:phases
18258 (modify-phases %standard-phases
18259 (replace 'check
18260 (lambda _
18261 (setenv "PYTHONPATH"
18262 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18263 (invoke "python" "./tests/__main__.py"))))))
18264 (propagated-inputs
18265 `(("python-dill" ,python-dill)
18266 ("python-multiprocess" ,python-multiprocess)
18267 ("python-pox" ,python-pox)
18268 ("python-ppft" ,python-ppft)))
18269 (native-inputs
18270 `(("python-pytest" ,python-pytest)))
18271 (home-page "https://pypi.org/project/pathos/")
18272 (synopsis
18273 "Parallel graph management and execution in heterogeneous computing")
18274 (description
18275 "Python-pathos is a framework for heterogenous computing. It provides a
18276consistent high-level interface for configuring and launching parallel
18277computations across heterogenous resources. Python-pathos provides configurable
18278launchers for parallel and distributed computing, where each launcher contains
18279the syntactic logic to configure and launch jobs in an execution environment.")
18280 (license license:bsd-3)))
18281
18282(define-public python-flit
18283 (package
18284 (name "python-flit")
18285 (version "2.1.0")
18286 (source
18287 (origin
18288 (method url-fetch)
18289 (uri (pypi-uri "flit" version))
18290 (sha256
18291 (base32
18292 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
18293 (build-system python-build-system)
18294 (arguments
18295 `(#:tests? #f)) ; XXX: Check requires network access.
18296 (home-page "https://flit.readthedocs.io/")
18297 (synopsis
18298 "Simple packaging tool for simple packages")
18299 (description
18300 "Flit is a simple way to put Python packages and modules on PyPI. Flit
18301packages a single importable module or package at a time, using the import
18302name as the name on PyPI. All subpackages and data files within a package
18303are included automatically.")
18304 (license license:bsd-3)))
18305
18306(define-public python-pathtools
18307 (package
18308 (name "python-pathtools")
18309 (version "0.1.2")
18310 (source
18311 (origin
18312 (method url-fetch)
18313 (uri (pypi-uri "pathtools" version))
18314 (sha256
18315 (base32
18316 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
18317 (build-system python-build-system)
18318 (home-page
18319 "https://github.com/gorakhargosh/pathtools")
18320 (synopsis "Path utilities for Python")
18321 (description "Pattern matching and various utilities for file systems
18322paths.")
18323 (license license:expat)))
18324
18325(define-public python-fastentrypoints
18326 (package
18327 (name "python-fastentrypoints")
18328 (version "0.12")
18329 (source
18330 (origin
18331 (method url-fetch)
18332 (uri (pypi-uri "fastentrypoints" version))
18333 (sha256
18334 (base32
18335 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
18336 (build-system python-build-system)
18337 (home-page
18338 "https://github.com/ninjaaron/fast-entry_points")
18339 (synopsis
18340 "Makes entry_points specified in setup.py load more quickly")
18341 (description
18342 "Using entry_points in your setup.py makes scripts that start really
18343slowly because it imports pkg_resources. This package allows such setup
18344scripts to load entry points more quickly.")
18345 (license license:bsd-3)))
18346
18347(define-public python-funcparserlib
18348 (package
18349 (name "python-funcparserlib")
18350 (version "0.3.6")
18351 (source
18352 (origin
18353 (method url-fetch)
18354 (uri (pypi-uri "funcparserlib" version))
18355 (sha256
18356 (base32
18357 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
18358 (native-inputs
18359 `(("python-tox" ,python-tox)))
18360 (arguments
18361 `(#:phases
18362 (modify-phases %standard-phases
18363 (replace 'check
18364 (lambda _
18365 (invoke "tox"))))))
18366 (build-system python-build-system)
18367 (home-page
18368 "https://github.com/vlasovskikh/funcparserlib")
18369 (synopsis
18370 "Recursive descent parsing library based on functional combinators")
18371 (description
18372 "This package is a recursive descent parsing library for Python based on
18373functional combinators. Parser combinators are just higher-order functions
18374that take parsers as their arguments and return them as result values.")
18375 (license license:expat)))
18376
18377(define-public python-speg
18378 (package
18379 (name "python-speg")
18380 (version "0.3")
18381 (source
18382 (origin
18383 (method url-fetch)
18384 (uri (pypi-uri "speg" version ".zip"))
18385 (sha256
18386 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
18387 (arguments
18388 `(#:tests? #f)) ;FIXME: tests fail, not sure why
18389 (native-inputs
18390 `(("unzip" ,unzip)))
18391 (build-system python-build-system)
18392 (home-page "https://github.com/avakar/speg")
18393 (synopsis "PEG-based parser interpreter with memoization")
18394 (description "This package is a PEG-based parser and interpreter with
18395memoization.")
18396 (license license:expat)))
18397
18398(define-public python-cson
18399 (package
18400 (name "python-cson")
18401 (version "0.8")
18402 (source
18403 (origin
18404 (method url-fetch)
18405 (uri (pypi-uri "cson" version))
18406 (sha256
18407 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
18408 (build-system python-build-system)
18409 (propagated-inputs
18410 `(("python-speg" ,python-speg)))
18411 (home-page "https://github.com/avakar/pycson")
18412 (synopsis "Parser for Coffeescript Object Notation (CSON)")
18413 (description "This package is a parser for Coffeescript Object
18414Notation (CSON).")
18415 (license license:expat)))
18416
18417(define-public python-asynctest
18418 (package
18419 (name "python-asynctest")
18420 (version "0.13.0")
18421 (source
18422 (origin
18423 (method url-fetch)
18424 (uri (pypi-uri "asynctest" version))
18425 (sha256
18426 (base32
18427 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
18428 (build-system python-build-system)
18429 (arguments
18430 '(#:phases
18431 (modify-phases %standard-phases
18432 (replace 'check
18433 (lambda _
18434 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
18435 (add-after 'unpack 'disable-tests
18436 (lambda* _
18437 (substitute* "test/test_selector.py"
18438 ;; XXX: This test fails for unknown reason inside the build
18439 ;; environment.
18440 (("def test_events_watched_outside_test_are_ignored")
18441 "@unittest.skip('disabled by guix')
18442 def test_events_watched_outside_test_are_ignored")))))))
18443 (home-page "https://github.com/Martiusweb/asynctest")
18444 (synopsis "Extension of unittest for testing asyncio libraries")
18445 (description
18446 "The package asynctest is built on top of the standard unittest module
18447and cuts down boilerplate code when testing libraries for asyncio.")
18448 (license license:asl2.0)))
18449
18450(define-public python-aionotify
18451 (package
18452 (name "python-aionotify")
18453 (version "0.2.0")
18454 (source
18455 (origin
18456 ;; Source tarball on PyPi lacks tests
18457 (method git-fetch)
18458 (uri (git-reference
18459 (url "https://github.com/rbarrois/aionotify")
18460 (commit (string-append "v" version))))
18461 (file-name (git-file-name name version))
18462 (sha256
18463 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
18464 (build-system python-build-system)
18465 (native-inputs `(("python-asynctest" ,python-asynctest)))
18466 (home-page "https://github.com/rbarrois/aionotify")
18467 (synopsis "Asyncio-powered inotify library")
18468 (description
18469 "@code{aionotify} is a simple, asyncio-based inotify library.")
18470 (license license:bsd-3)))
18471
18472(define-public python-forbiddenfruit
18473 (package
18474 (name "python-forbiddenfruit")
18475 (version "0.1.3")
18476 (source
18477 (origin
18478 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
18479 (method git-fetch)
18480 (uri (git-reference
18481 (url "https://github.com/clarete/forbiddenfruit")
18482 (commit version)))
18483 (file-name (git-file-name name version))
18484 (sha256
18485 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
18486 (build-system python-build-system)
18487 (arguments
18488 '(#:phases
18489 (modify-phases %standard-phases
18490 (replace 'check
18491 (lambda _
18492 (invoke "make" "SKIP_DEPS=1"))))))
18493 (native-inputs
18494 `(("python-nose" ,python-nose)
18495 ("python-coverage" ,python-coverage)))
18496 (home-page "https://github.com/clarete/forbiddenfruit")
18497 (synopsis "Patch python built-in objects")
18498 (description "This project allows Python code to extend built-in types.")
18499 (license (list license:gpl3+ license:expat))))
18500
18501(define-public python-shouldbe
18502 (package
18503 (name "python-shouldbe")
18504 (version "0.1.2")
18505 (source
18506 (origin
18507 (method url-fetch)
18508 (uri (pypi-uri "shouldbe" version))
18509 (sha256
18510 (base32
18511 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
18512 (build-system python-build-system)
18513 (propagated-inputs
18514 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
18515 (native-inputs
18516 `(("python-nose" ,python-nose)))
18517 (home-page "https://github.com/directxman12/should_be")
18518 (synopsis "Python Assertion Helpers inspired by Shouldly")
18519 (description
18520 "Python Assertion Helpers inspired by Shouldly.")
18521 (license license:isc)))
18522
18523(define-public python-k5test
18524 (package
18525 (name "python-k5test")
18526 (version "0.9.2")
18527 (source
18528 (origin
18529 (method url-fetch)
18530 (uri (pypi-uri "k5test" version))
18531 (sha256
18532 (base32
18533 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
18534 (build-system python-build-system)
18535 (propagated-inputs
18536 `(("python-six" ,python-six)
18537 ;; `which`, `kadmin.local` binaries called inside library
18538 ("which" ,which)
18539 ("mit-krb5" ,mit-krb5)))
18540 (native-inputs `(("mit-krb5" ,mit-krb5)))
18541 (arguments
18542 '(#:phases
18543 (modify-phases %standard-phases
18544 (add-after 'unpack 'patch-paths
18545 (lambda* _
18546 (substitute* "k5test/realm.py"
18547 (("'kadmin_local'") "'kadmin.local'")))))))
18548 (home-page "https://github.com/pythongssapi/k5test")
18549 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18550 (description
18551 "@code{k5test} is a library for setting up self-contained Kerberos 5
18552environments, and running Python unit tests inside those environments. It is
18553based on the file of the same name found alongside the MIT Kerberos 5 unit
18554tests.")
18555 (license license:isc)))
18556
18557(define-public python-gssapi
18558 (package
18559 (name "python-gssapi")
18560 (version "1.6.1")
18561 (source
18562 (origin
18563 (method url-fetch)
18564 (uri (pypi-uri "gssapi" version))
18565 (sha256
18566 (base32
18567 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
18568 (build-system python-build-system)
18569 (propagated-inputs
18570 `(("python-decorator" ,python-decorator)
18571 ("python-six" ,python-six)))
18572 (inputs
18573 `(("mit-krb5" ,mit-krb5)))
18574 ;; for tests
18575 (native-inputs
18576 `(("python-shouldbe" ,python-shouldbe)
18577 ("python-parameterized" ,python-parameterized)
18578 ("python-k5test" ,python-k5test)
18579 ("python-nose" ,python-nose)))
18580 (home-page "https://github.com/pythongssapi/python-gssapi")
18581 (synopsis "Python GSSAPI Wrapper")
18582 (description
18583 "Python-GSSAPI provides both low-level and high level wrappers around the
18584GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18585also be useable with other GSSAPI mechanisms.")
18586 (license license:isc)))
18587
18588(define-public python-check-manifest
18589 (package
18590 (name "python-check-manifest")
18591 (version "0.37")
18592 (source
18593 (origin
18594 (method url-fetch)
18595 (uri (pypi-uri "check-manifest" version))
18596 (sha256
18597 (base32
18598 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18599 (build-system python-build-system)
18600 (native-inputs
18601 `(("python-mock" ,python-mock)
18602 ("git" ,git)))
18603 (home-page "https://github.com/mgedmin/check-manifest")
18604 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18605 (description "Python package can include a MANIFEST.in file to help with
18606sending package files to the Python Package Index. This package checks that
18607file to ensure it completely and accurately describes your project.")
18608 (license license:expat)))
18609
18610(define-public python-android-stringslib
18611 (package
18612 (name "python-android-stringslib")
18613 (version "0.1.2")
18614 (source
18615 (origin
18616 (method git-fetch)
18617 (uri (git-reference
18618 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18619 (commit (string-append "v" version))))
18620 (file-name (git-file-name name version))
18621 (sha256
18622 (base32
18623 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18624 (build-system python-build-system)
18625 (arguments
18626 `(#:tests? #f))
18627 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18628 (synopsis "Android strings.xml support")
18629 (description "Android Strings Lib provides support for android's strings.xml
18630files. These files are used to translate strings in android apps.")
18631 (license license:expat)))
18632
18633(define-public python-watchdog
18634 (package
18635 (name "python-watchdog")
18636 (version "0.9.0")
18637 (source
18638 (origin
18639 (method url-fetch)
18640 (uri (pypi-uri "watchdog" version))
18641 (sha256
18642 (base32
18643 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
18644 (build-system python-build-system)
18645 (arguments
18646 `(#:phases
18647 (modify-phases %standard-phases
18648 (add-before 'check 'remove-failing
18649 (lambda _
18650 (delete-file "tests/test_inotify_buffer.py")
18651 (delete-file "tests/test_snapshot_diff.py")
18652 #t)))))
18653 (propagated-inputs
18654 `(("python-argh" ,python-argh)
18655 ("python-pathtools" ,python-pathtools)
18656 ("python-pyyaml" ,python-pyyaml)))
18657 (native-inputs
18658 `(("python-pytest-cov" ,python-pytest-cov)
18659 ("python-pytest-timeout" ,python-pytest-timeout)))
18660 (home-page "https://github.com/gorakhargosh/watchdog")
18661 (synopsis "Filesystem events monitoring")
18662 (description "This package provides a way to monitor filesystem events
18663such as a file modification and trigger an action. This is similar to inotify,
18664but portable.")
18665 (license license:asl2.0)))
18666
18667(define-public python-wget
18668 (package
18669 (name "python-wget")
18670 (version "3.2")
18671 (source
18672 (origin
18673 (method url-fetch)
18674 (uri (pypi-uri "wget" version ".zip"))
18675 (sha256
18676 (base32
18677 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
18678 (build-system python-build-system)
18679 (native-inputs `(("unzip" ,unzip)))
18680 (home-page "https://bitbucket.org/techtonik/python-wget/")
18681 (synopsis "Pure Python download utility")
18682 (description "The python-wget library provides an API to download files
18683with features similar to the @command{wget} utility.")
18684 (license license:unlicense)))
18685
18686(define-public offlate
18687 (package
18688 (name "offlate")
18689 (version "0.5")
18690 (source
18691 (origin
18692 (method git-fetch)
18693 (uri (git-reference
18694 (url "https://framagit.org/tyreunom/offlate")
18695 (commit version)))
18696 (file-name (git-file-name name version))
18697 (sha256
18698 (base32
18699 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
18700 (build-system python-build-system)
18701 (arguments
18702 ;; No tests
18703 `(#:tests? #f))
18704 (propagated-inputs
18705 `(("python-android-stringslib" ,python-android-stringslib)
18706 ("python-dateutil" ,python-dateutil)
18707 ("python-gitlab" ,python-gitlab)
18708 ("python-lxml" ,python-lxml)
18709 ("python-polib" ,python-polib)
18710 ("python-pyenchant" ,python-pyenchant)
18711 ("python-pygit2" ,python-pygit2)
18712 ("python-pygithub" ,python-pygithub)
18713 ("python-pyqt" ,python-pyqt)
18714 ("python-requests" ,python-requests)
18715 ("python-ruamel.yaml" ,python-ruamel.yaml)
18716 ("python-translation-finder" ,python-translation-finder)
18717 ("python-watchdog" ,python-watchdog)))
18718 (native-inputs
18719 `(("qttools" ,qttools)))
18720 (home-page "https://framagit.org/tyreunom/offlate")
18721 (synopsis "Offline translation interface for online translation tools")
18722 (description "Offlate offers a unified interface for different translation
18723file formats, as well as many different online translation platforms. You can
18724use it to get work from online platforms, specialized such as the Translation
18725Project, or not such a gitlab instance when your upstream doesn't use any
18726dedicated platform. The tool proposes a unified interface for any format and
18727an upload option to send your work back to the platform.")
18728 (license license:gpl3+)))
18729
18730(define-public python-pypng
18731 (package
18732 (name "python-pypng")
18733 (version "0.0.20")
18734 (source
18735 (origin
18736 (method url-fetch)
18737 (uri (pypi-uri "pypng" version))
18738 (sha256
18739 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
18740 (build-system python-build-system)
18741 (home-page "https://github.com/drj11/pypng")
18742 (synopsis "Pure Python PNG image encoder/decoder")
18743 (description
18744 "The PyPNG module implements support for PNG images. It reads and writes
18745PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
18746pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
18747LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
18748images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
18749A number of optional chunks can be specified (when writing) and
18750understood (when reading): tRNS, bKGD, gAMA.
18751
18752PyPNG is not a high level toolkit for image processing (like PIL) and does not
18753aim at being a replacement or competitor. Its strength lies in fine-grained
18754extensive support of PNG features. It can also read and write Netpbm PAM
18755files, with a focus on its use as an intermediate format for implementing
18756custom PNG processing.")
18757 (license license:expat)))
18758
18759(define-public python-fuzzywuzzy
18760 (package
18761 (name "python-fuzzywuzzy")
18762 (version "0.18.0")
18763 (source
18764 (origin
18765 (method url-fetch)
18766 (uri (pypi-uri "fuzzywuzzy" version))
18767 (sha256
18768 (base32
18769 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
18770 (build-system python-build-system)
18771 (native-inputs
18772 `(("python-hypothesis" ,python-hypothesis)
18773 ("python-pycodestyle" ,python-pycodestyle)
18774 ("python-pytest" ,python-pytest)))
18775 (propagated-inputs
18776 `(("python-levenshtein" ,python-levenshtein)))
18777 (home-page "https://github.com/seatgeek/fuzzywuzzy")
18778 (synopsis "Fuzzy string matching in Python")
18779 (description "Approximate string matching using
18780@emph{Levenshtein Distance} to calculate the differences between
18781sequences.")
18782 (license license:gpl2)))
18783
18784(define-public python2-fuzzywuzzy
18785 (package-with-python2 python-fuzzywuzzy))
18786
18787(define-public python-block-tracing
18788 (package
18789 (name "python-block-tracing")
18790 (version "1.0.1")
18791 (source
18792 (origin
18793 (method url-fetch)
18794 (uri (pypi-uri "block_tracing" version))
18795 (sha256
18796 (base32
18797 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
18798 (build-system python-build-system)
18799 (arguments '(#:tests? #f)) ; no tests
18800 (home-page "https://github.com/rianhunter/block_tracing")
18801 (synopsis "Protect process memory")
18802 (description
18803 "@code{block_tracing} is a tiny Python library that can be used to
18804prevent debuggers and other applications from inspecting the memory within
18805your process.")
18806 (license license:expat)))
18807
18808(define-public python-gcovr
18809 (package
18810 (name "python-gcovr")
18811 (version "4.2")
18812 (source
18813 (origin
18814 (method url-fetch)
18815 (uri (pypi-uri "gcovr" version))
18816 (sha256
18817 (base32
18818 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
18819 (build-system python-build-system)
18820 (propagated-inputs
18821 `(("python-lxml" ,python-lxml)
18822 ("python-jinja2" ,python-jinja2)))
18823 (home-page "https://gcovr.com/")
18824 (synopsis "Utility for generating code coverage results")
18825 (description
18826 "Gcovr provides a utility for managing the use of the GNU gcov
18827utility and generating summarized code coverage results. It is inspired
18828by the Python coverage.py package, which provides a similar utility for
18829Python.")
18830 (license license:bsd-3)))
18831
18832(define-public python-owslib
18833 (package
18834 (name "python-owslib")
18835 (version "0.19.2")
18836 (source
18837 (origin
18838 (method url-fetch)
18839 (uri (pypi-uri "OWSLib" version))
18840 (sha256
18841 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
18842 (build-system python-build-system)
18843 (arguments
18844 '(#:tests? #f)) ; TODO: package dependencies required for tests.
18845 (synopsis "Interface for Open Geospatial Consortium web service")
18846 (description
18847 "OWSLib is a Python package for client programming with Open Geospatial
18848Consortium (OGC) web service (hence OWS) interface standards, and their related
18849content models.")
18850 (home-page "https://geopython.github.io/OWSLib/")
18851 (license license:bsd-3)))
18852
18853(define-public python-docusign-esign
18854 (package
18855 (name "python-docusign-esign")
18856 (version "3.1.0")
18857 (source (origin
18858 (method url-fetch)
18859 (uri (pypi-uri "docusign_esign" version))
18860 (sha256
18861 (base32
18862 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
18863 (build-system python-build-system)
18864 ;; Testing requires undocumented setup changes, and so testing is disabled here.
18865 (arguments `(#:tests? #f))
18866 (propagated-inputs
18867 `(("python-certifi", python-certifi)
18868 ("python-six", python-six)
18869 ("python-dateutil", python-dateutil)
18870 ("python-urllib3", python-urllib3)
18871 ("python-pyjwt", python-pyjwt)
18872 ("python-cryptography", python-cryptography)
18873 ("python-nose", python-nose)))
18874 (synopsis "DocuSign Python Client")
18875 (description "The Official DocuSign Python Client Library used to interact
18876 with the eSign REST API. Send, sign, and approve documents using this client.")
18877 (home-page "https://www.docusign.com/devcenter")
18878 (license license:expat)))
18879
18880(define-public python-xattr
18881 (package
18882 (name "python-xattr")
18883 (version "0.9.7")
18884 (source
18885 (origin
18886 (method url-fetch)
18887 (uri (pypi-uri "xattr" version))
18888 (sha256
18889 (base32
18890 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
18891 (build-system python-build-system)
18892 (propagated-inputs
18893 `(("python-cffi" ,python-cffi)))
18894 (home-page "https://github.com/xattr/xattr")
18895 (synopsis
18896 "Python wrapper for extended filesystem attributes")
18897 (description "This package provides a Python wrapper for using extended
18898filesystem attributes. Extended attributes extend the basic attributes of files
18899and directories in the file system. They are stored as name:data pairs
18900associated with file system objects (files, directories, symlinks, etc).")
18901 (license license:expat)))
18902
18903(define-public python-json-logger
18904 (package
18905 (name "python-json-logger")
18906 (version "0.1.11")
18907 (source
18908 (origin
18909 (method url-fetch)
18910 (uri (pypi-uri "python-json-logger" version))
18911 (sha256
18912 (base32
18913 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
18914 (build-system python-build-system)
18915 (home-page
18916 "https://github.com/madzak/python-json-logger")
18917 (synopsis "JSON log formatter in Python")
18918 (description "This library allows standard Python logging to output log data
18919as JSON objects. With JSON we can make our logs more readable by machines and
18920we can stop writing custom parsers for syslog-type records.")
18921 (license license:bsd-3)))
18922
18923(define-public python-daiquiri
18924 (package
18925 (name "python-daiquiri")
18926 (version "2.1.1")
18927 (source
18928 (origin
18929 (method url-fetch)
18930 (uri (pypi-uri "daiquiri" version))
18931 (sha256
18932 (base32
18933 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
18934 (build-system python-build-system)
18935 (propagated-inputs
18936 `(("python-json-logger" ,python-json-logger)))
18937 (native-inputs
18938 `(("python-mock" ,python-mock)
18939 ("python-pytest" ,python-pytest)
18940 ("python-setuptools-scm" ,python-setuptools-scm)
18941 ("python-six" ,python-six)))
18942 (home-page "https://github.com/jd/daiquiri")
18943 (synopsis
18944 "Library to configure Python logging easily")
18945 (description "The daiquiri library provides an easy way to configure
18946logging in Python. It also provides some custom formatters and handlers.")
18947 (license license:asl2.0)))
18948
18949(define-public python-pifpaf
18950 (package
18951 (name "python-pifpaf")
18952 (version "2.4.0")
18953 (source
18954 (origin
18955 (method url-fetch)
18956 (uri (pypi-uri "pifpaf" version))
18957 (sha256
18958 (base32
18959 "150av2pylsjy8ykrpyi0vzy2q24s9rhh2ya01zvwnvj9j5dspviz"))))
18960 (build-system python-build-system)
18961 (arguments
18962 `(#:tests? #f))
18963 (propagated-inputs
18964 `(("python-click" ,python-click)
18965 ("python-daiquiri" ,python-daiquiri)
18966 ("python-fixtures" ,python-fixtures)
18967 ("python-jinja2" ,python-jinja2)
18968 ("python-pbr" ,python-pbr)
18969 ("python-psutil" ,python-psutil)
18970 ("python-six" ,python-six)
18971 ("python-xattr" ,python-xattr)))
18972 (native-inputs
18973 `(("python-mock" ,python-mock)
18974 ("python-os-testr" ,python-os-testr)
18975 ("python-requests" ,python-requests)
18976 ("python-testrepository" ,python-testrepository)
18977 ("python-testtools" ,python-testtools)))
18978 (home-page "https://github.com/jd/pifpaf")
18979 (synopsis "Tools and fixtures to manage daemons for testing in Python")
18980 (description "Pifpaf is a suite of fixtures and a command-line tool that
18981allows to start and stop daemons for a quick throw-away usage. This is typically
18982useful when needing these daemons to run integration testing. It originally
18983evolved from its precursor @code{overtest}.")
18984 (license license:asl2.0)))
18985
18986(define-public python-pytest-check-links
18987 (package
18988 (name "python-pytest-check-links")
18989 (version "0.3.0")
18990 (source
18991 (origin
18992 (method url-fetch)
18993 ;; URI uses underscores
18994 (uri (pypi-uri "pytest_check_links" version))
18995 (sha256
18996 (base32
18997 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
18998 (build-system python-build-system)
18999 (propagated-inputs
19000 `(("python-docutils" ,python-docutils)
19001 ("python-html5lib" ,python-html5lib)
19002 ("python-nbconvert" ,python-nbconvert)
19003 ("python-nbformat" ,python-nbformat)
19004 ("python-pytest" ,python-pytest)
19005 ("python-six" ,python-six)))
19006 (native-inputs
19007 `(("python-pbr-minimal" ,python-pbr-minimal)))
19008 (home-page "https://github.com/minrk/pytest-check-links")
19009 (synopsis "Check links in files")
19010 (description "This package provides a pytest plugin that checks URLs for
19011HTML-containing files.")
19012 (license license:bsd-3)))
19013
19014(define-public python-json5
19015 (package
19016 (name "python-json5")
19017 (version "0.8.5")
19018 (source
19019 (origin
19020 ;; sample.json5 is missing from PyPi source tarball
19021 (method git-fetch)
19022 (uri (git-reference
19023 (url "https://github.com/dpranke/pyjson5.git")
19024 (commit (string-append "v" version))))
19025 (file-name (git-file-name name version))
19026 (sha256
19027 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
19028 (build-system python-build-system)
19029 (home-page "https://github.com/dpranke/pyjson5")
19030 (synopsis
19031 "Python implementation of the JSON5 data format")
19032 (description
19033 "JSON5 extends the JSON data interchange format to make it slightly more
19034usable as a configuration language. This Python package implements parsing and
19035dumping of JSON5 data structures.")
19036 (license license:asl2.0)))
19037
19038(define-public python-frozendict
19039 (package
19040 (name "python-frozendict")
19041 (version "1.2")
19042 (source
19043 (origin
19044 (method url-fetch)
19045 (uri (pypi-uri "frozendict" version))
19046 (sha256
19047 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
19048 (build-system python-build-system)
19049 (home-page "https://github.com/slezica/python-frozendict")
19050 (synopsis "Simple immutable mapping for Python")
19051 (description
19052 "@dfn{frozendict} is an immutable wrapper around dictionaries that
19053implements the complete mapping interface. It can be used as a drop-in
19054replacement for dictionaries where immutability is desired.")
19055 (license license:expat)))
19056
19057(define-public python-unpaddedbase64
19058 (package
19059 (name "python-unpaddedbase64")
19060 (version "1.1.0")
19061 (source
19062 (origin
19063 (method git-fetch)
19064 (uri (git-reference
19065 (url "https://github.com/matrix-org/python-unpaddedbase64.git")
19066 (commit (string-append "v" version))))
19067 (file-name (git-file-name name version))
19068 (sha256
19069 (base32
19070 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
19071 (build-system python-build-system)
19072 (home-page "https://pypi.org/project/unpaddedbase64/")
19073 (synopsis "Encode and decode Base64 without “=” padding")
19074 (description
19075 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
19076using “=” characters. However this conveys no benefit so many protocols
19077choose to use Base64 without the “=” padding.")
19078 (license license:asl2.0)))
19079
19080(define-public python-canonicaljson
19081 (package
19082 (name "python-canonicaljson")
19083 (version "1.1.4")
19084 (source
19085 (origin
19086 (method url-fetch)
19087 (uri (pypi-uri "canonicaljson" version))
19088 (sha256
19089 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
19090 (build-system python-build-system)
19091 (propagated-inputs
19092 `(("python-six" ,python-six)
19093 ("python-frozendict" ,python-frozendict)
19094 ("python-simplejson" ,python-simplejson)))
19095 (home-page "https://github.com/matrix-org/python-canonicaljson")
19096 (synopsis "Canonical JSON")
19097 (description
19098 "Deterministically encode JSON.
19099
19100@itemize
19101@item Encodes objects and arrays as RFC 7159 JSON.
19102@item Sorts object keys so that you get the same result each time.
19103@item Has no insignificant whitespace to make the output as small as possible.
19104@item Escapes only the characters that must be escaped, U+0000 to
19105 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
19106@item Uses the shortest escape sequence for each escaped character.
19107@item Encodes the JSON as UTF-8.
19108@item Can encode frozendict immutable dictionaries.
19109@end itemize")
19110 (license license:asl2.0)))
19111
19112(define-public python-signedjson
19113 (package
19114 (name "python-signedjson")
19115 (version "1.1.1")
19116 (source
19117 (origin
19118 (method url-fetch)
19119 (uri (pypi-uri "signedjson" version))
19120 (sha256
19121 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
19122 (build-system python-build-system)
19123 (propagated-inputs
19124 `(("python-canonicaljson" ,python-canonicaljson)
19125 ("python-importlib-metadata" ,python-importlib-metadata)
19126 ("python-pynacl" ,python-pynacl)
19127 ("python-typing-extensions" ,python-typing-extensions)
19128 ("python-unpaddedbase64" ,python-unpaddedbase64)))
19129 (native-inputs
19130 `(("python-setuptools-scm" ,python-setuptools-scm)))
19131 (home-page "https://github.com/matrix-org/python-signedjson")
19132 (synopsis "Sign JSON objects with ED25519 signatures")
19133 (description
19134 "Sign JSON objects with ED25519 signatures.
19135
19136@itemize
19137@item More than one entity can sign the same object.
19138@item Each entity can sign the object with more than one key making it easier to
19139rotate keys
19140@item ED25519 can be replaced with a different algorithm.
19141@item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
19142key.
19143@end itemize")
19144 (license license:asl2.0)))
19145
19146(define-public python-daemonize
19147 (package
19148 (name "python-daemonize")
19149 (version "2.5.0")
19150 (source
19151 (origin
19152 (method url-fetch)
19153 (uri (pypi-uri "daemonize" version))
19154 (sha256
19155 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
19156 (build-system python-build-system)
19157 (home-page "https://github.com/thesharp/daemonize")
19158 (synopsis "Library for writing system daemons in Python")
19159 (description "Daemonize is a library for writing system daemons in Python.")
19160 (license license:expat)))
19161
19162(define-public python-pymacaroons
19163 (package
19164 (name "python-pymacaroons")
19165 (version "0.13.0")
19166 (source
19167 (origin
19168 (method url-fetch)
19169 (uri (pypi-uri "pymacaroons" version))
19170 (sha256
19171 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
19172 (build-system python-build-system)
19173 (propagated-inputs
19174 `(("python-six" ,python-six)
19175 ("python-pynacl" ,python-pynacl)))
19176 (home-page "https://github.com/ecordell/pymacaroons")
19177 (synopsis "Python Macaroon Library")
19178 (description
19179 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
19180tokens, macaroons embed caveats that define specific authorization
19181requirements for the target service, the service that issued the root macaroon
19182and which is capable of verifying the integrity of macaroons it receives.
19183
19184Macaroons allow for delegation and attenuation of authorization. They are
19185simple and fast to verify, and decouple authorization policy from the
19186enforcement of that policy.")
19187 (license license:expat)))
19188
19189(define-public python-prometheus-client
19190 (package
19191 (name "python-prometheus-client")
19192 (version "0.7.1")
19193 (source
19194 (origin
19195 (method url-fetch)
19196 (uri (pypi-uri "prometheus_client" version))
19197 (sha256
19198 (base32 "1ni2yv4ixwz32nz39ckia76lvggi7m19y5f702w5qczbnfi29kbi"))))
19199 (build-system python-build-system)
19200 (arguments
19201 ;; TODO: No tests in the PyPI distribution.
19202 `(#:tests? #f))
19203 (propagated-inputs
19204 `(("python-twisted" ,python-twisted)))
19205 (home-page "https://github.com/prometheus/client_python")
19206 (synopsis "Prometheus instrumentation library")
19207 (description
19208 "This is the official Python client for the Prometheus monitoring server.")
19209 (license license:asl2.0)))
19210
19211(define-public python-ldap3
19212 (package
19213 (name "python-ldap3")
19214 (version "2.7")
19215 (home-page "https://github.com/cannatag/ldap3")
19216 (source
19217 (origin
19218 (method git-fetch)
19219 (uri (git-reference (url home-page)
19220 (commit (string-append "v" version))))
19221 (file-name (git-file-name name version))
19222 (sha256
19223 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
19224 (build-system python-build-system)
19225 (arguments
19226 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
19227 #:phases (modify-phases %standard-phases
19228 (replace 'check
19229 (lambda* (#:key tests? #:allow-other-keys)
19230 (when tests?
19231 (invoke "nosetests" "-s" "test"))
19232 #t)))))
19233 (native-inputs
19234 `(("python-nose" ,python-nose)))
19235 (propagated-inputs
19236 `(("python-gssapi" ,python-gssapi)
19237 ("python-pyasn1" ,python-pyasn1)))
19238 (synopsis "Python LDAP client")
19239 (description
19240 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
19241library.")
19242 (license license:lgpl3+)))
19243
19244(define-public python-boltons
19245 (package
19246 (name "python-boltons")
19247 (version "20.0.0")
19248 (source
19249 (origin
19250 (method url-fetch)
19251 (uri (pypi-uri "boltons" version))
19252 (sha256
19253 (base32
19254 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
19255 (build-system python-build-system)
19256 (home-page "https://github.com/mahmoud/boltons")
19257 (synopsis "Extensions to the Python standard library")
19258 (description
19259 "Boltons is a set of over 230 pure-Python utilities in the same spirit
19260as — and yet conspicuously missing from — the standard library, including:
19261
19262@itemize
19263@item Atomic file saving, bolted on with fileutils
19264@item A highly-optimized OrderedMultiDict, in dictutils
19265@item Two types of PriorityQueue, in queueutils
19266@item Chunked and windowed iteration, in iterutils
19267@item Recursive data structure iteration and merging, with iterutils.remap
19268@item Exponential backoff functionality, including jitter, through
19269iterutils.backoff
19270@item A full-featured TracebackInfo type, for representing stack traces, in
19271tbutils
19272@end itemize")
19273 (license license:bsd-3)))
19274
19275(define-public python-eliot
19276 (package
19277 (name "python-eliot")
19278 (version "1.12.0")
19279 (source
19280 (origin
19281 (method url-fetch)
19282 (uri (pypi-uri "eliot" version))
19283 (sha256
19284 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
19285 (build-system python-build-system)
19286 (arguments
19287 `(#:phases
19288 (modify-phases %standard-phases
19289 (add-after 'unpack 'remove-journald-support
19290 (lambda _
19291 (for-each delete-file
19292 '("eliot/tests/test_journald.py"
19293 "eliot/journald.py"))
19294 #t))
19295 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
19296 ;; remove command-line tool's tests. TODO eliot-prettyprint should
19297 ;; be installed and these tests should pass.
19298 (lambda _
19299 (delete-file "eliot/tests/test_prettyprint.py")
19300 #t)))))
19301 (propagated-inputs
19302 `(("python-boltons" ,python-boltons)
19303 ("python-pyrsistent" ,python-pyrsistent)
19304 ("python-six" ,python-six)
19305 ("python-zope-interface" ,python-zope-interface)))
19306 (native-inputs
19307 `(("python-black" ,python-black)
19308 ("python-coverage" ,python-coverage)
19309 ("python-dask" ,python-dask)
19310 ("python-flake8" ,python-flake8)
19311 ("python-hypothesis" ,python-hypothesis)
19312 ("python-pytest" ,python-pytest)
19313 ("python-setuptools" ,python-setuptools)
19314 ("python-sphinx" ,python-sphinx)
19315 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
19316 ("python-testtools" ,python-testtools)
19317 ("python-twine" ,python-twine)
19318 ("python-twisted" ,python-twisted)))
19319 (home-page "https://github.com/itamarst/eliot/")
19320 (synopsis "Eliot: the logging system that tells you why it happened")
19321 (description
19322 "@dfn{eliot} is a Python logging system that outputs causal chains of
19323actions: actions can spawn other actions, and eventually they either succeed
19324or fail. The resulting logs tell you the story of what your software did: what
19325happened, and what caused it.")
19326 (license license:asl2.0)))
19327
19328(define-public python-pem
19329 (package
19330 (name "python-pem")
19331 (version "20.1.0")
19332 (source
19333 (origin
19334 (method url-fetch)
19335 (uri (pypi-uri "pem" version))
19336 (sha256
19337 (base32
19338 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
19339 (build-system python-build-system)
19340 (native-inputs
19341 `(("python-certifi" ,python-certifi)
19342 ("python-coverage" ,python-coverage)
19343 ("python-pretend" ,python-pretend)
19344 ("python-pyopenssl" ,python-pyopenssl)
19345 ("python-pytest" ,python-pytest)
19346 ("python-sphinx" ,python-sphinx)
19347 ("python-twisted" ,python-twisted)))
19348 (home-page "https://pem.readthedocs.io/")
19349 (synopsis "Easy PEM file parsing in Python")
19350 (description
19351 "This package provides a Python module for parsing and splitting PEM files.")
19352 (license license:expat)))
19353
19354(define-public python-txsni
19355 ;; We need a few commits on top of 0.1.9 for compatibility with newer
19356 ;; Python and OpenSSL.
19357 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
19358 (revision "0"))
19359 (package
19360 (name "python-txsni")
19361 (version (git-version "0.1.9" revision commit))
19362 (home-page "https://github.com/glyph/txsni")
19363 (source
19364 (origin
19365 (method git-fetch)
19366 (uri (git-reference (url home-page) (commit commit)))
19367 (file-name (git-file-name name version))
19368 (sha256
19369 (base32
19370 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
19371 (build-system python-build-system)
19372 (propagated-inputs
19373 `(("python-pyopenssl" ,python-pyopenssl)
19374 ("python-service-identity" ,python-service-identity)
19375 ("python-twisted" ,python-twisted)))
19376 (synopsis "Run TLS servers with Twisted")
19377 (description
19378 "This package provides an easy-to-use SNI endpoint for use
19379with the Twisted web framework.")
19380 (license license:expat))))
19381
19382(define-public python-txacme
19383 (package
19384 (name "python-txacme")
19385 (version "0.9.2")
19386 (source
19387 (origin
19388 (method url-fetch)
19389 (uri (pypi-uri "txacme" version))
19390 (sha256
19391 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
19392 (build-system python-build-system)
19393 (propagated-inputs
19394 `(("python-acme" ,python-acme)
19395 ("python-attrs" ,python-attrs)
19396 ("python-eliot" ,python-eliot)
19397 ("python-josepy" ,python-josepy)
19398 ("python-pem" ,python-pem)
19399 ("python-treq" ,python-treq)
19400 ("python-twisted" ,python-twisted)
19401 ("python-txsni" ,python-txsni)))
19402 (native-inputs
19403 `(("python-fixtures" ,python-fixtures)
19404 ("python-hypothesis" ,python-hypothesis)
19405 ("python-mock" ,python-mock)
19406 ("python-service-identity"
19407 ,python-service-identity)
19408 ("python-testrepository" ,python-testrepository)
19409 ("python-testscenarios" ,python-testscenarios)
19410 ("python-testtools" ,python-testtools)))
19411 (home-page "https://github.com/twisted/txacme")
19412 (synopsis "Twisted implexmentation of the ACME protocol")
19413 (description
19414 "ACME is Automatic Certificate Management Environment, a protocol that
19415allows clients and certificate authorities to automate verification and
19416certificate issuance. The ACME protocol is used by the free Let's Encrypt
19417Certificate Authority.
19418
19419txacme is an implementation of the protocol for Twisted, the event-driven
19420networking engine for Python.")
19421 (license license:expat)))
19422
19423(define-public python-pysaml2
19424 (package
19425 (name "python-pysaml2")
19426 (version "5.0.0")
19427 (source
19428 (origin
19429 (method url-fetch)
19430 (uri (pypi-uri "pysaml2" version))
19431 (sha256
19432 (base32
19433 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
19434 (build-system python-build-system)
19435 (propagated-inputs
19436 `(("python-cryptography" ,python-cryptography)
19437 ("python-dateutil" ,python-dateutil)
19438 ("python-defusedxml" ,python-defusedxml)
19439 ("python-pyopenssl" ,python-pyopenssl)
19440 ("python-pytz" ,python-pytz)
19441 ("python-requests" ,python-requests)
19442 ("python-six" ,python-six)))
19443 (home-page "https://idpy.org")
19444 (synopsis "Python implementation of SAML Version 2 Standard")
19445 (description
19446 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
19447It contains all necessary pieces for building a SAML2 service provider or
19448an identity provider. The distribution contains examples of both.
19449
19450This package was originally written to work in a WSGI environment, but
19451there are extensions that allow you to use it with other frameworks.")
19452 (license license:asl2.0)))