projects/guix·blob version-1.2.0 · refs

22674 lines · 814.4 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, 2020 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 Nikita <[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, 2020 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, 2020 Pierre Langlois <[email protected]>
65;;; Copyright © 2019 Jacob MacDonald <[email protected]>
66;;; Copyright © 2019, 2020 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 Riku Viitanen <[email protected]>
71;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
72;;; Copyright © 2020 sirgazil <[email protected]>
73;;; Copyright © 2020 Sebastian Schott <[email protected]>
74;;; Copyright © 2020 Alexandros Theodotou <[email protected]>
75;;; Copyright © 2020 Josh Marshall <[email protected]>
76;;; Copyright © 2020 Alexandros Theodotou <[email protected]>
77;;; Copyright © 2020 Lars-Dominik Braun <[email protected]>
78;;; Copyright © 2020 Alex ter Weele <[email protected]>
79;;; Copyright © 2020 Matthew Kraai <[email protected]>
80;;; Copyright © 2020 Ryan Prior <[email protected]>
81;;; Copyright © 2020 Josh Holland <[email protected]>
82;;; Copyright © 2020 Yuval Kogman <[email protected]>
83;;; Copyright © 2020 Michael Rohleder <[email protected]>
84;;; Copyright © 2020 Vinicius Monego <[email protected]>
85;;; Copyright © 2020 Guy Fleury Iteriteka <[email protected]>
86;;; Copyright © 2020 Hendursaga <[email protected]>
87;;; Copyright © 2020 Malte Frank Gerdes <[email protected]>
88;;; Copyright © 2020 Joseph LaFreniere <[email protected]>
89;;; Copyright © 2020 Tim Gesthuizen <[email protected]>
90;;; Copyright © 2020 Bonface Munyoki Kilyungi <[email protected]>
91;;; Copyright © 2020 Ekaitz Zarraga <[email protected]>
92;;;
93;;; This file is part of GNU Guix.
94;;;
95;;; GNU Guix is free software; you can redistribute it and/or modify it
96;;; under the terms of the GNU General Public License as published by
97;;; the Free Software Foundation; either version 3 of the License, or (at
98;;; your option) any later version.
99;;;
100;;; GNU Guix is distributed in the hope that it will be useful, but
101;;; WITHOUT ANY WARRANTY; without even the implied warranty of
102;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
103;;; GNU General Public License for more details.
104;;;
105;;; You should have received a copy of the GNU General Public License
106;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
107
108(define-module (gnu packages python-xyz)
109 #:use-module ((guix licenses) #:prefix license:)
110 #:use-module (gnu packages)
111 #:use-module (gnu packages algebra)
112 #:use-module (gnu packages adns)
113 #:use-module (gnu packages aidc)
114 #:use-module (gnu packages attr)
115 #:use-module (gnu packages backup)
116 #:use-module (gnu packages bash)
117 #:use-module (gnu packages check)
118 #:use-module (gnu packages cmake)
119 #:use-module (gnu packages compression)
120 #:use-module (gnu packages crypto)
121 #:use-module (gnu packages databases)
122 #:use-module (gnu packages dbm)
123 #:use-module (gnu packages enchant)
124 #:use-module (gnu packages file)
125 #:use-module (gnu packages fontutils)
126 #:use-module (gnu packages gcc)
127 #:use-module (gnu packages geo)
128 #:use-module (gnu packages ghostscript)
129 #:use-module (gnu packages gl)
130 #:use-module (gnu packages glib)
131 #:use-module (gnu packages gnome)
132 #:use-module (gnu packages gnupg)
133 #:use-module (gnu packages graphviz)
134 #:use-module (gnu packages graphics)
135 #:use-module (gnu packages gsasl)
136 #:use-module (gnu packages gstreamer)
137 #:use-module (gnu packages gtk)
138 #:use-module (gnu packages haskell-xyz)
139 #:use-module (gnu packages icu4c)
140 #:use-module (gnu packages image)
141 #:use-module (gnu packages imagemagick)
142 #:use-module (gnu packages kerberos)
143 #:use-module (gnu packages libevent)
144 #:use-module (gnu packages libffi)
145 #:use-module (gnu packages libidn)
146 #:use-module (gnu packages linux)
147 #:use-module (gnu packages llvm)
148 #:use-module (gnu packages man)
149 #:use-module (gnu packages maths)
150 #:use-module (gnu packages monitoring)
151 #:use-module (gnu packages multiprecision)
152 #:use-module (gnu packages networking)
153 #:use-module (gnu packages ncurses)
154 #:use-module (gnu packages openstack)
155 #:use-module (gnu packages pcre)
156 #:use-module (gnu packages perl)
157 #:use-module (gnu packages photo)
158 #:use-module (gnu packages pkg-config)
159 #:use-module (gnu packages python)
160 #:use-module (gnu packages python-check)
161 #:use-module (gnu packages python-compression)
162 #:use-module (gnu packages python-crypto)
163 #:use-module (gnu packages python-science)
164 #:use-module (gnu packages python-web)
165 #:use-module (gnu packages qt)
166 #:use-module (gnu packages readline)
167 #:use-module (gnu packages sdl)
168 #:use-module (gnu packages search)
169 #:use-module (gnu packages shells)
170 #:use-module (gnu packages sphinx)
171 #:use-module (gnu packages ssh)
172 #:use-module (gnu packages terminals)
173 #:use-module (gnu packages tex)
174 #:use-module (gnu packages texinfo)
175 #:use-module (gnu packages textutils)
176 #:use-module (gnu packages time)
177 #:use-module (gnu packages tls)
178 #:use-module (gnu packages version-control)
179 #:use-module (gnu packages video)
180 #:use-module (gnu packages web)
181 #:use-module (gnu packages base)
182 #:use-module (gnu packages xml)
183 #:use-module (gnu packages xorg)
184 #:use-module (gnu packages xdisorg)
185 #:use-module (gnu packages tcl)
186 #:use-module (gnu packages bdw-gc)
187 #:use-module (gnu packages serialization)
188 #:use-module (guix packages)
189 #:use-module (guix download)
190 #:use-module (guix git-download)
191 #:use-module (guix hg-download)
192 #:use-module (guix utils)
193 #:use-module (guix build-system gnu)
194 #:use-module (guix build-system cmake)
195 #:use-module (guix build-system python)
196 #:use-module (guix build-system trivial)
197 #:use-module (srfi srfi-1)
198 #:use-module (srfi srfi-26))
199
200(define-public python-slixmpp
201 (package
202 (name "python-slixmpp")
203 (version "1.5.2")
204 (source
205 (origin
206 (method git-fetch)
207 (uri
208 (git-reference
209 (url "https://lab.louiz.org/poezio/slixmpp.git")
210 (commit
211 (string-append "slix-" version))))
212 (file-name
213 (git-file-name name version))
214 (sha256
215 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
216 (build-system python-build-system)
217 (arguments
218 `(#:phases
219 (modify-phases %standard-phases
220 (add-after 'unpack 'patch
221 (lambda _
222 (substitute* "setup.py"
223 (("'CC', 'cc'")
224 "'CC', 'gcc'"))
225 #t)))))
226 (native-inputs
227 `(("cython" ,python-cython)
228 ("gnupg" ,gnupg)
229 ("pkg-config" ,pkg-config)))
230 (propagated-inputs
231 `(("python-aiodns" ,python-aiodns)
232 ("python-aiohttp" ,python-aiohttp)
233 ("python-pyasn1" ,python-pyasn1)
234 ("python-pyasn1-modules" ,python-pyasn1-modules)))
235 (inputs
236 `(("libidn" ,libidn)
237 ("python" ,python))) ; We are building a Python extension.
238 (synopsis "XMPP library without threads")
239 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
240SleekXMPP. Its goal is to only rewrite the core of the library (the low level
241socket handling, the timers, the events dispatching) in order to remove all
242threads.")
243 (home-page "https://lab.louiz.org/poezio/slixmpp")
244 (license license:expat)))
245
246(define-public python-tenacity
247 (package
248 (name "python-tenacity")
249 (version "6.1.0")
250 (source (origin
251 (method url-fetch)
252 (uri (pypi-uri "tenacity" version))
253 (sha256
254 (base32
255 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
256 (build-system python-build-system)
257 (native-inputs
258 `(("python-setuptools-scm" ,python-setuptools-scm)
259 ("python-sphinx" ,python-sphinx)
260 ("python-tornado" ,python-tornado)
261 ("python-pytest" ,python-pytest)))
262 (propagated-inputs
263 `(("python-six" ,python-six)))
264 (arguments
265 `(#:phases (modify-phases %standard-phases
266 (replace 'check
267 (lambda _
268 (invoke "pytest")
269 #t)))))
270 (home-page "https://github.com/jd/tenacity")
271 (synopsis "Retrying library for python")
272 (description "Tenacity is a general-purpose python library to simplify the
273task of adding retry behavior to just about anything.")
274 (license license:asl2.0)))
275
276(define-public python-colorlog
277 (package
278 (name "python-colorlog")
279 (version "4.1.0")
280 (source (origin
281 (method url-fetch)
282 (uri (pypi-uri "colorlog" version))
283 (sha256
284 (base32
285 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
286 (build-system python-build-system)
287 (native-inputs
288 `(("python-pytest" ,python-pytest)))
289 (arguments
290 `(#:phases (modify-phases %standard-phases
291 (replace 'check
292 (lambda _
293 ;; Extend PYTHONPATH so the built package will be found.
294 (setenv "PYTHONPATH"
295 (string-append (getcwd) "/build/lib:"
296 (getenv "PYTHONPATH")))
297 (invoke "pytest" "-p" "no:logging")
298 #t)))))
299 (home-page "https://github.com/borntyping/python-colorlog")
300 (synopsis "Log formatting with colors for python")
301 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
302with Python's logging module that outputs records using terminal colors.")
303 (license license:expat)))
304
305(define-public python-pyprind
306 (package
307 (name "python-pyprind")
308 (version "2.11.2")
309 (source (origin
310 (method url-fetch)
311 (uri (pypi-uri "PyPrind" version))
312 (sha256
313 (base32
314 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
315 (build-system python-build-system)
316 (propagated-inputs
317 `(("python-psutil" ,python-psutil)))
318 (home-page "https://github.com/rasbt/pyprind")
319 (synopsis "Python Progress Bar and Percent Indicator Utility")
320 (description "The PyPrind (Python Progress Indicator) module provides a
321progress bar and a percentage indicator object that let you track the progress
322of a loop structure or other iterative computation.")
323 (license license:bsd-3)))
324
325(define-public python-gphoto2
326 (package
327 (name "python-gphoto2")
328 (version "2.2.1")
329 (source (origin
330 (method url-fetch)
331 (uri (pypi-uri "gphoto2" version))
332 (sha256
333 (base32
334 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
335 (build-system python-build-system)
336 (native-inputs
337 `(("pkg-config" ,pkg-config)))
338 (inputs
339 `(("libgphoto2" ,libgphoto2)))
340 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
341 (synopsis "Python interface to libgphoto2")
342 (description "@code{python-gphoto2} is a comprehensive Python interface
343(or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
344automatically generate the interface code.")
345 (license license:gpl3+)))
346
347(define-public python-colour
348 (package
349 (name "python-colour")
350 (version "0.1.5")
351 (source (origin
352 (method url-fetch)
353 (uri (pypi-uri "colour" version))
354 (sha256
355 (base32
356 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
357 (build-system python-build-system)
358 (native-inputs
359 `(("python-d2to1" ,python-d2to1)))
360 (home-page "https://github.com/vaab/colour")
361 (synopsis "Convert and manipulate various color representations")
362 (description "Pythonic way to manipulate color representations (HSL, RVB,
363web, X11, ...).")
364 (license license:expat)))
365
366(define-public python-d2to1
367 (package
368 (name "python-d2to1")
369 (version "0.2.12.post1")
370 (source (origin
371 (method url-fetch)
372 (uri (pypi-uri "d2to1" version))
373 (sha256
374 (base32
375 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
376 (build-system python-build-system)
377 (native-inputs
378 `(("python-nose" ,python-nose)))
379 (home-page "https://github.com/embray/d2to1")
380 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
381in python")
382 (description "The python package d2to1 (the d is for distutils) allows
383using distutils2-like setup.cfg files for a package's metadata with a
384distribute/setuptools setup.py script.")
385 (license license:bsd-2)))
386
387(define-public python-rawkit
388 (package
389 (name "python-rawkit")
390 (version "0.6.0")
391 (source (origin
392 (method url-fetch)
393 (uri (pypi-uri "rawkit" version))
394 (sha256
395 (base32
396 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
397 (build-system python-build-system)
398 (native-inputs
399 `(("python-pytest" ,python-pytest)
400 ("python-mock" ,python-mock)))
401 (inputs
402 `(("libraw" ,libraw)))
403 (home-page "https://rawkit.readthedocs.io")
404 (synopsis "Ctypes-based LibRaw binding for Python")
405 (description "The rawkit package provides two modules: rawkit and libraw.
406The rawkit module provides a high-level Pythonic interface for developing raw
407photos, while the libraw module provides a CTypes based interface for
408interacting with the low-level LibRaw C APIs.")
409 (license license:expat)))
410
411(define-public python-easygui
412 (package
413 (name "python-easygui")
414 (version "0.98.1")
415 (source (origin
416 (method url-fetch)
417 (uri (pypi-uri "easygui" version))
418 (sha256
419 (base32
420 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
421 (build-system python-build-system)
422 (propagated-inputs
423 `(("python-tkinter" ,python "tk")))
424 (home-page "https://github.com/robertlugg/easygui")
425 (synopsis "GUI programming module for Python")
426 (description "EasyGUI is a module for very simple, very easy GUI
427programming in Python. EasyGUI is different from other GUI generators in that
428EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
429simple function calls.")
430 (license license:bsd-3)))
431
432(define-public python-pymediainfo
433 (package
434 (name "python-pymediainfo")
435 (version "4.1")
436 (source
437 (origin
438 (method url-fetch)
439 (uri (pypi-uri "pymediainfo" version))
440 (sha256
441 (base32
442 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
443 (build-system python-build-system)
444 (native-inputs
445 `(("python-setuptools-scm" ,python-setuptools-scm)
446 ("python-pytest" ,python-pytest)))
447 (inputs
448 `(("libmediainfo" ,libmediainfo)))
449 (arguments
450 `(#:phases
451 (modify-phases %standard-phases
452 (add-after 'unpack 'patch-libmediainfo
453 (lambda _
454 (substitute* "pymediainfo/__init__.py"
455 (("libmediainfo.so.0")
456 (string-append (assoc-ref %build-inputs "libmediainfo")
457 "/lib/libmediainfo.so.0")))
458 #t))
459 (replace 'check
460 (lambda _
461 ;; Extend PYTHONPATH so the built package will be found.
462 (setenv "PYTHONPATH"
463 (string-append (getcwd) "/build/lib:"
464 (getenv "PYTHONPATH")))
465 ;; Skip the only failing test "test_parse_url"
466 (invoke "pytest" "-vv" "-k" "not test_parse_url")
467 #t)))))
468 (home-page
469 "https://github.com/sbraz/pymediainfo")
470 (synopsis
471 "Python wrapper for the mediainfo library")
472 (description
473 "Python wrapper for the mediainfo library to access the technical and tag
474data for video and audio files.")
475 (license license:expat)))
476
477(define-public python-psutil
478 (package
479 (name "python-psutil")
480 (version "5.7.2")
481 (source
482 (origin
483 (method url-fetch)
484 (uri (pypi-uri "psutil" version))
485 (sha256
486 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
487 (build-system python-build-system)
488 (arguments
489 ;; FIXME: some tests do not return and time out. Some tests fail because
490 ;; some processes survive kill().
491 '(#:tests? #f))
492 (home-page "https://www.github.com/giampaolo/psutil")
493 (synopsis "Library for retrieving information on running processes")
494 (description
495 "psutil (Python system and process utilities) is a library for retrieving
496information on running processes and system utilization (CPU, memory, disks,
497network) in Python. It is useful mainly for system monitoring, profiling and
498limiting process resources and management of running processes. It implements
499many functionalities offered by command line tools such as: ps, top, lsof,
500netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
501pidof, tty, taskset, pmap.")
502 (properties `((python2-variant . ,(delay python2-psutil))))
503 (license license:bsd-3)))
504
505(define-public python2-psutil
506 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
507 (package
508 (inherit base)
509 (propagated-inputs
510 `(("python2-enum34" ,python2-enum34) ;optional
511 ,@(package-propagated-inputs base))))))
512
513(define-public python-shapely
514 (package
515 (name "python-shapely")
516 (version "1.7.1")
517 (source
518 (origin
519 (method url-fetch)
520 (uri (pypi-uri "Shapely" version))
521 (sha256
522 (base32
523 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
524 (modules '((guix build utils)))
525 (snippet
526 '(begin
527 (delete-file "shapely/speedups/_speedups.c")
528 (delete-file "shapely/vectorized/_vectorized.c")
529 #t))))
530 (build-system python-build-system)
531 (native-inputs
532 `(("python-cython" ,python-cython)
533 ("python-matplotlib" ,python-matplotlib)
534 ("python-pytest" ,python-pytest)
535 ("python-pytest-cov" ,python-pytest-cov)))
536 (inputs
537 `(("geos" ,geos)))
538 (propagated-inputs
539 `(("python-numpy" ,python-numpy)))
540 (arguments
541 `(#:phases
542 (modify-phases %standard-phases
543 (add-after 'unpack 'patch-geos-path
544 (lambda* (#:key inputs #:allow-other-keys)
545 (let ((geos (assoc-ref inputs "geos"))
546 (glibc (assoc-ref inputs ,(if (%current-target-system)
547 "cross-libc" "libc"))))
548 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
549 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
550 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
551 geos "/lib/libgeos_c.so'])"))
552 (("free = load_dll\\('c'\\)\\.free")
553 (string-append "free = load_dll('c', fallbacks=['"
554 glibc "/lib/libc.so.6']).free"))
555 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
556 (string-append "free = load_dll('c', fallbacks=['"
557 glibc "/lib/libc.so.6']).free"))))
558 #t)))))
559 (home-page "https://github.com/Toblerity/Shapely")
560 (synopsis "Library for the manipulation and analysis of geometric objects")
561 (description "Shapely is a Python package for manipulation and analysis of
562planar geometric objects. It is based on the @code{GEOS} library.")
563 (license license:bsd-3)))
564
565(define-public python-shortuuid
566 (package
567 (name "python-shortuuid")
568 (version "0.5.0")
569 (source
570 (origin
571 (method url-fetch)
572 (uri (pypi-uri "shortuuid" version))
573 (sha256
574 (base32
575 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
576 (build-system python-build-system)
577 (native-inputs
578 `(("python-pep8" ,python-pep8)))
579 (home-page "https://github.com/skorokithakis/shortuuid")
580 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
581 (description
582 "@code{shortuuid} is a Python library for generating concise, unambiguous
583and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
584module and then similar looking characters are removed.")
585 (license license:bsd-3)))
586
587(define-public python-logwrap
588 (package
589 (name "python-logwrap")
590 (version "3.2.1")
591 (source
592 (origin
593 (method url-fetch)
594 (uri (pypi-uri "logwrap" version ".zip"))
595 (sha256
596 (base32
597 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
598 (build-system python-build-system)
599 (propagated-inputs
600 `(("python-six" ,python-six)
601 ("python-typing" ,python-typing)))
602 (native-inputs
603 `(("unzip" ,unzip)
604 ("python-cython" ,python-cython)
605 ("python-pytest" ,python-pytest)
606 ("python-pytest-cov" ,python-pytest-cov)
607 ("python-pytest-runner" ,python-pytest-runner)))
608 (home-page "https://github.com/penguinolog/logwrap")
609 (synopsis "Decorator for logging function arguments")
610 (description "This package provides a decorator to log function arguments
611and function call return values in a human-readable way.")
612 (license license:asl2.0)))
613
614(define-public python2-shapely
615 (package-with-python2 python-shapely))
616
617(define-public python-clyent
618 (package
619 (name "python-clyent")
620 (version "1.2.1")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "clyent" version))
625 (sha256
626 (base32
627 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
628 (build-system python-build-system)
629 (native-inputs
630 `(("python-mock" ,python-mock)))
631 (home-page "https://github.com/Anaconda-Platform/clyent")
632 (synopsis "Command line client library")
633 (description "Clyent is a Python command line utility library. It is used
634by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
635 (license license:bsd-3)))
636
637(define-public python2-clyent
638 (package-with-python2 python-clyent))
639
640(define-public python-babel
641 (package
642 (name "python-babel")
643 (version "2.8.0")
644 (source
645 (origin
646 (method url-fetch)
647 (uri (pypi-uri "Babel" version))
648 (sha256
649 (base32
650 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
651 (build-system python-build-system)
652 (native-inputs
653 `(("python-freezegun" ,python-freezegun)
654 ("python-pytest" ,python-pytest)))
655 (propagated-inputs
656 `(("python-pytz" ,python-pytz)))
657 (arguments
658 `(#:phases (modify-phases %standard-phases
659 (replace 'check
660 (lambda _
661 (invoke "pytest" "-vv" "-k"
662 (string-append
663 ;; XXX: These tests fail when using Pytest 4.x and
664 ;; Babel 2.6.0. Try removing this for later versions.
665 "not test_no_inherit_metazone_marker_never_in_output"
666 " and not test_smoke_dates"
667 " and not test_smoke_numbers")))))))
668 (home-page "http://babel.pocoo.org/")
669 (synopsis
670 "Tools for internationalizing Python applications")
671 (description
672 "Babel is composed of two major parts:
673- tools to build and work with gettext message catalogs
674- a Python interface to the CLDR (Common Locale Data Repository), providing
675access to various locale display names, localized number and date formatting,
676etc. ")
677 (license license:bsd-3)))
678
679(define-public python2-babel
680 (package-with-python2 python-babel))
681
682;; Sphinx < 2.0 requires this version. Remove once no longer needed.
683(define-public python2-babel-2.6
684 (package
685 (inherit python2-babel)
686 (version "2.6.0")
687 (source (origin
688 (method url-fetch)
689 (uri (pypi-uri "Babel" version))
690 (sha256
691 (base32
692 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
693
694(define-public python2-backport-ssl-match-hostname
695 (package
696 (name "python2-backport-ssl-match-hostname")
697 (version "3.5.0.1")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "backports.ssl_match_hostname" version))
702 (sha256
703 (base32
704 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
705 (build-system python-build-system)
706 (arguments
707 `(#:python ,python-2
708 #:tests? #f)) ; no test target
709 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
710 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
711 (description
712 "This backport brings the ssl.match_hostname() function to users of
713earlier versions of Python. The function checks the hostname in the
714certificate returned by the server to which a connection has been established,
715and verifies that it matches the intended target hostname.")
716 (license license:psfl)))
717
718(define-public python-bitarray
719 (package
720 (name "python-bitarray")
721 (version "1.4.0")
722 (source (origin
723 (method url-fetch)
724 (uri (pypi-uri "bitarray" version))
725 (sha256
726 (base32
727 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
728 (build-system python-build-system)
729 (home-page "https://github.com/ilanschnell/bitarray")
730 (synopsis "Efficient arrays of booleans")
731 (description "This package provides an object type which efficiently
732represents an array of booleans. Bitarrays are sequence types and behave very
733much like usual lists. Eight bits are represented by one byte in a contiguous
734block of memory. The user can select between two representations:
735little-endian and big-endian. All of the functionality is implemented in C.
736Methods for accessing the machine representation are provided. This can be
737useful when bit level access to binary files is required, such as portable
738bitmap image files. Also, when dealing with compressed data which uses
739variable bit length encoding, you may find this module useful.")
740 (license license:psfl)))
741
742(define-public python-boolean.py
743 (package
744 (name "python-boolean.py")
745 (version "3.6")
746 (source
747 (origin
748 ;; There's no source tarball on PyPI.
749 (method git-fetch)
750 (uri (git-reference
751 (url "https://github.com/bastikr/boolean.py")
752 (commit (string-append "v" version))))
753 (file-name (git-file-name name version))
754 (sha256
755 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
756 (build-system python-build-system)
757 (home-page "https://github.com/bastikr/boolean.py")
758 (synopsis "Boolean algebra in one Python module")
759 (description
760 "This is a small Python library that implements boolean algebra.
761It defines two base elements, @code{TRUE} and @code{FALSE}, and a
762@code{Symbol} class that can take on one of these two values. Calculations
763are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
764compositions like @code{XOR} and @code{NAND} are emulated on top of them.
765Expressions are constructed from parsed strings or directly in Python.")
766 (license license:bsd-2)))
767
768(define-public python-hdf4
769 (package
770 (name "python-hdf4")
771 (version "0.9")
772 (source
773 (origin
774 (method url-fetch)
775 (uri (pypi-uri name version))
776 (sha256
777 (base32
778 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
779 (build-system python-build-system)
780 (native-inputs `(("nose" ,python-nose)))
781 (propagated-inputs `(("numpy" ,python-numpy)))
782 (inputs
783 `(("hdf4" ,hdf4)
784 ("libjpeg" ,libjpeg-turbo)
785 ("zlib" ,zlib)))
786 (arguments
787 `(#:phases
788 (modify-phases %standard-phases
789 (replace 'check
790 (lambda _
791 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
792 ;; on to import numpy. Somehow this works on their CI system.
793 ;; Let's just manage PYTHONPATH here instead.
794 (substitute* "runexamples.sh"
795 (("export PYTHONPATH=.*") ""))
796 (setenv "PYTHONPATH"
797 (string-append (getcwd) ":"
798 (getenv "PYTHONPATH")))
799 (invoke "./runexamples.sh")
800 (invoke "nosetests" "-v"))))))
801 (home-page "https://github.com/fhs/python-hdf4")
802 (synopsis "Python interface to the NCSA HDF4 library")
803 (description
804 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
805which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
806NetCDF files can also be read and modified. Python-HDF4 is a fork of
807@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
808 (license license:expat)))
809
810(define-public python2-hdf4
811 (package-with-python2 python-hdf4))
812
813(define-public python-h5py
814 (package
815 (name "python-h5py")
816 (version "2.10.0")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (pypi-uri "h5py" version))
821 (sha256
822 (base32
823 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
824 (build-system python-build-system)
825 (arguments
826 `(#:tests? #f ; no test target
827 #:phases
828 (modify-phases %standard-phases
829 (add-after 'unpack 'fix-hdf5-paths
830 (lambda* (#:key inputs #:allow-other-keys)
831 (let ((prefix (assoc-ref inputs "hdf5")))
832 (substitute* "setup_build.py"
833 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
834 (string-append "['" prefix "/lib" "']"))
835 (("'/opt/local/include', '/usr/local/include'")
836 (string-append "'" prefix "/include" "'")))
837 (substitute* "setup_configure.py"
838 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
839 (string-append "['" prefix "/lib" "']")))
840 #t))))))
841 (propagated-inputs
842 `(("python-six" ,python-six)
843 ("python-numpy" ,python-numpy)))
844 (inputs
845 `(("hdf5" ,hdf5-1.10)))
846 (native-inputs
847 `(("python-cython" ,python-cython)
848 ("python-pkgconfig" ,python-pkgconfig)
849 ("pkg-config" ,pkg-config)))
850 (home-page "https://www.h5py.org/")
851 (synopsis "Read and write HDF5 files from Python")
852 (description
853 "The h5py package provides both a high- and low-level interface to the
854HDF5 library from Python. The low-level interface is intended to be a
855complete wrapping of the HDF5 API, while the high-level component supports
856access to HDF5 files, datasets and groups using established Python and NumPy
857concepts.")
858 (license license:bsd-3)))
859
860(define-public python2-h5py
861 (package-with-python2 python-h5py))
862
863(define-public python-sh
864 (package
865 (name "python-sh")
866 (version "1.12.14")
867 (source
868 (origin
869 (method url-fetch)
870 (uri (pypi-uri "sh" version))
871 (sha256
872 (base32
873 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
874 (build-system python-build-system)
875 (arguments
876 '(#:phases
877 (modify-phases %standard-phases
878 (replace 'check
879 (lambda _
880 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
881 (setenv "HOME" "/tmp")
882 (invoke "python" "sh.py" "test"))))))
883 (native-inputs
884 `(("python-coverage" ,python-coverage)))
885 (home-page "https://github.com/amoffat/sh")
886 (synopsis "Python subprocess replacement")
887 (description "This package provides a replacement for Python's
888@code{subprocess} feature.")
889 (license license:expat)))
890
891(define-public python2-sh
892 (package-with-python2 python-sh))
893
894(define-public python-cftime
895 (package
896 (name "python-cftime")
897 (version "1.0.4.2")
898 (source
899 (origin
900 (method url-fetch)
901 (uri (pypi-uri "cftime" version))
902 (sha256
903 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
904 (build-system python-build-system)
905 (propagated-inputs
906 `(("python-numpy" ,python-numpy)))
907 (native-inputs
908 `(("python-coveralls" ,python-coveralls)
909 ("python-cython" ,python-cython)
910 ("python-pytest-cov" ,python-pytest-cov)))
911 (home-page "https://github.com/Unidata/cftime")
912 (synopsis "Library for time handling")
913 (description
914 "This package provides time-handling functionality that used to be part
915of the netcdf4 package before.")
916 ;; This package claims to include code under the GPLv3 but is released
917 ;; under ISC.
918 (license (list license:isc license:gpl3+))))
919
920(define-public python-netcdf4
921 (package
922 (name "python-netcdf4")
923 (version "1.5.3")
924 (source
925 (origin
926 (method url-fetch)
927 (uri (pypi-uri "netCDF4" version))
928 (sha256
929 (base32
930 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
931 (build-system python-build-system)
932 (arguments
933 '(#:phases
934 (modify-phases %standard-phases
935 (add-after 'unpack 'configure-locations
936 (lambda* (#:key inputs #:allow-other-keys)
937 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
938 #t)))))
939 (native-inputs
940 `(("python-cython" ,python-cython)))
941 (propagated-inputs
942 `(("python-numpy" ,python-numpy)
943 ("python-cftime" ,python-cftime)))
944 (inputs
945 `(("netcdf" ,netcdf)
946 ("hdf4" ,hdf4)
947 ("hdf5" ,hdf5)))
948 (home-page "https://github.com/Unidata/netcdf4-python")
949 (synopsis "Python/numpy interface to the netCDF library")
950 (description "Netcdf4-python is a Python interface to the netCDF C
951library. netCDF version 4 has many features not found in earlier
952versions of the library and is implemented on top of HDF5. This module
953can read and write files in both the new netCDF 4 and the old netCDF 3
954format, and can create files that are readable by HDF5 clients. The
955API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
956to users of that module.")
957 ;; The software is mainly ISC, but includes some files covered
958 ;; by the Expat license.
959 (license (list license:isc license:expat))))
960
961(define-public python-license-expression
962 (package
963 (name "python-license-expression")
964 (version "0.999")
965 (source
966 (origin
967 (method url-fetch)
968 (uri (pypi-uri "license-expression" version))
969 (sha256
970 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
971 (build-system python-build-system)
972 (propagated-inputs
973 `(("python-boolean.py" ,python-boolean.py)))
974 (home-page "https://github.com/nexB/license-expression")
975 (synopsis "Apply boolean logic to license expressions")
976 (description
977 "This Python module defines a tiny language to evaluate and compare
978license expressions using boolean logic. Logical combinations of licenses can
979be tested for equality, containment, and equivalence. They can be normalised
980and simplified. It supports SPDX license expressions as well as other naming
981conventions and aliases in the same expression.")
982 (license license:gpl2+)))
983
984(define-public python-lockfile
985 (package
986 (name "python-lockfile")
987 (version "0.12.2")
988 (source
989 (origin
990 (method url-fetch)
991 (uri (pypi-uri "lockfile" version))
992 (sha256
993 (base32
994 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
995 (build-system python-build-system)
996 (arguments '(#:test-target "check"))
997 (native-inputs
998 `(("python-pbr" ,python-pbr)))
999 (home-page "https://launchpad.net/pylockfile")
1000 (synopsis "Platform-independent file locking module")
1001 (description
1002 "The lockfile package exports a LockFile class which provides a simple
1003API for locking files.")
1004 (license license:expat)))
1005
1006(define-public python2-lockfile
1007 (package-with-python2 python-lockfile))
1008
1009(define-public python-filelock
1010 (package
1011 (name "python-filelock")
1012 (version "3.0.12")
1013 (source
1014 (origin
1015 (method url-fetch)
1016 (uri (pypi-uri "filelock" version))
1017 (sha256
1018 (base32
1019 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1020 (build-system python-build-system)
1021 (home-page
1022 "https://github.com/benediktschmitt/py-filelock")
1023 (synopsis "Platform independent file lock")
1024 (description "@code{filelock} contains a single module implementing
1025a platform independent file lock in Python, which provides a simple way of
1026inter-process communication.")
1027 (license license:unlicense)))
1028
1029(define-public python-semantic-version
1030 (package
1031 (name "python-semantic-version")
1032 (version "2.6.0")
1033 (source
1034 (origin
1035 (method url-fetch)
1036 (uri (pypi-uri "semantic_version" version))
1037 (sha256
1038 (base32
1039 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1040 (build-system python-build-system)
1041 (arguments
1042 `(#:tests? #f)) ; PyPI tarball lacks tests
1043 (home-page "https://github.com/rbarrois/python-semanticversion")
1044 (synopsis "Semantic versioning module for Python")
1045 (description
1046 "The @code{semantic_version} class is a small library for handling
1047@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1048
1049It can compare versions, generate a new version that represents a bump in one of
1050the version levels, and check whether any given string is a proper semantic
1051version identifier.")
1052 (license license:bsd-3)))
1053
1054(define-public python2-semantic-version
1055 (package-with-python2 python-semantic-version))
1056
1057(define-public python-serpent
1058 (package
1059 (name "python-serpent")
1060 (version "1.28")
1061 (source
1062 (origin
1063 (method url-fetch)
1064 (uri (pypi-uri "serpent" version))
1065 (sha256
1066 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1067 (build-system python-build-system)
1068 (native-inputs
1069 `(("python-attrs" ,python-attrs)
1070 ("python-pytz" ,python-pytz)))
1071 (home-page "https://github.com/irmen/Serpent")
1072 (synopsis "Serializer for literal Python expressions")
1073 (description
1074 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1075serialization. It serializes an object tree into bytes (an utf-8 encoded
1076string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1077to rebuild the original object tree.
1078
1079Because only safe literals are encoded, it is safe to send serpent data to
1080other machines, such as over the network.")
1081 (properties `((python2-variant . ,(delay python2-serpent))))
1082 (license license:expat)))
1083
1084(define-public python2-serpent
1085 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1086 (package
1087 (inherit base)
1088 (propagated-inputs
1089 `(("python-enum34" ,python2-enum34)
1090 ,@(package-propagated-inputs base))))))
1091
1092(define-public python-setuptools
1093 (package
1094 (name "python-setuptools")
1095 (version "41.0.1")
1096 (source
1097 (origin
1098 (method url-fetch)
1099 (uri (pypi-uri "setuptools" version ".zip"))
1100 (sha256
1101 (base32
1102 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1103 (modules '((guix build utils)))
1104 (snippet
1105 '(begin
1106 ;; Remove included binaries which are used to build self-extracting
1107 ;; installers for Windows.
1108 ;; TODO: Find some way to build them ourself so we can include them.
1109 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1110 #t))))
1111 (build-system python-build-system)
1112 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1113 ;; One could bootstrap with an internal untested setuptools.
1114 (arguments
1115 `(#:tests? #f))
1116 (home-page "https://pypi.org/project/setuptools/")
1117 (synopsis
1118 "Library designed to facilitate packaging Python projects")
1119 (description
1120 "Setuptools is a fully-featured, stable library designed to facilitate
1121packaging Python projects, where packaging includes:
1122Python package and module definitions,
1123distribution package metadata,
1124test hooks,
1125project installation,
1126platform-specific details,
1127Python 3 support.")
1128 ;; TODO: setuptools now bundles the following libraries:
1129 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1130 (license (list license:psfl ; setuptools itself
1131 license:expat ; six, appdirs, pyparsing
1132 license:asl2.0 ; packaging is dual ASL2/BSD-2
1133 license:bsd-2))))
1134
1135(define-public python2-setuptools
1136 (package-with-python2 python-setuptools))
1137
1138;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1139(define-public python-setuptools-for-tensorflow
1140 (hidden-package
1141 (package
1142 (inherit python-setuptools)
1143 (version "39.1.0")
1144 (source (origin
1145 (inherit (package-source python-setuptools))
1146 (uri (pypi-uri "setuptools" version ".zip"))
1147 (sha256
1148 (base32
1149 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1150
1151(define-public python-uniseg
1152 (package
1153 (name "python-uniseg")
1154 (version "0.7.1")
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (pypi-uri "uniseg" version ".zip"))
1159 (sha256
1160 (base32
1161 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1162 (build-system python-build-system)
1163 (arguments
1164 '(#:tests? #f)) ; The test suite requires network access.
1165 (native-inputs
1166 `(("unzip" ,unzip)))
1167 (home-page
1168 "https://bitbucket.org/emptypage/uniseg-python")
1169 (synopsis
1170 "Python library to determine Unicode text segmentations")
1171 (description
1172 "Uniseg is a Python package used to determine Unicode text segmentations.
1173Supported segmentations include:
1174@enumerate
1175@item @dfn{Code point} (any value in the Unicode codespace)
1176@item @dfn{Grapheme cluster} (user-perceived character made of a single or
1177multiple Unicode code points, e.g. \"G\" + acute-accent)
1178@item Word break
1179@item Sentence break
1180@item Line break
1181@end enumerate")
1182 (license license:expat)))
1183
1184(define-public python2-uniseg
1185 (package-with-python2 python-uniseg))
1186
1187(define-public python-humanfriendly
1188 (package
1189 (name "python-humanfriendly")
1190 (version "8.2")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (pypi-uri "humanfriendly" version))
1195 (sha256
1196 (base32
1197 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1198 (build-system python-build-system)
1199 (arguments
1200 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1201 #:tests? #f))
1202 (home-page "https://humanfriendly.readthedocs.io")
1203 (synopsis "Human-friendly input and output in Python")
1204 (description
1205 "The functions and classes in @code{humanfriendly} can be used to make
1206text interfaces more user-friendly. It includes tools to parse and format
1207numbers, file sizes, and timespans, timers for long-running operations, menus
1208to allow the user to choose from a list of options, and terminal interaction
1209helpers.")
1210 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1211 (license license:expat)))
1212
1213(define-public python2-humanfriendly
1214 (let ((base (package-with-python2
1215 (strip-python2-variant python-humanfriendly))))
1216 (package (inherit base)
1217 (propagated-inputs
1218 `(("python2-monotonic" ,python2-monotonic)
1219 ,@(package-propagated-inputs base))))))
1220
1221(define-public python-textparser
1222 (package
1223 (name "python-textparser")
1224 (version "0.23.0")
1225 (source
1226 (origin
1227 (method url-fetch)
1228 (uri (pypi-uri "textparser" version))
1229 (sha256
1230 (base32
1231 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1232 (build-system python-build-system)
1233 (home-page "https://github.com/eerimoq/textparser")
1234 (synopsis "Fast text parser for Python")
1235 (description "This library provides a text parser written in the Python
1236language. It aims to be fast.")
1237 (license license:expat)))
1238
1239(define-public python-aenum
1240 (package
1241 (name "python-aenum")
1242 (version "2.2.4")
1243 (source
1244 (origin
1245 (method url-fetch)
1246 (uri (pypi-uri "aenum" version))
1247 (sha256
1248 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1249 (build-system python-build-system)
1250 (arguments
1251 `(#:phases (modify-phases %standard-phases
1252 (replace 'check
1253 (lambda _
1254 (format #t "current working dir ~s~%" (getcwd))
1255 (setenv "PYTHONPATH"
1256 (string-append ".:" (getenv "PYTHONPATH")))
1257 ;; We must run the test suite module directly, as it
1258 ;; fails to define the 'tempdir' variable in scope for
1259 ;; the tests otherwise
1260 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1261 ;; issues/32/running-tests-with-python-setuppy-test).
1262 (invoke "python3" "aenum/test.py")
1263 ;; This one fails with "NameError: name
1264 ;; 'test_pickle_dump_load' is not defined" (see:
1265 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1266 ;; /error-running-the-test_v3py-test-suite).
1267 ;; (invoke "python3" "aenum/test_v3.py")
1268 #t)))))
1269 (home-page "https://bitbucket.org/stoneleaf/aenum")
1270 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1271 (description "The aenum library includes an @code{Enum} base class, a
1272metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1273class.")
1274 (license license:bsd-3)))
1275
1276(define-public python-can
1277 (package
1278 (name "python-can")
1279 (version "3.3.3")
1280 (source
1281 (origin
1282 (method url-fetch)
1283 (uri (pypi-uri "python-can" version))
1284 (sha256
1285 (base32
1286 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1287 (build-system python-build-system)
1288 (arguments
1289 `(#:phases (modify-phases %standard-phases
1290 (add-after 'unpack 'relax-version-requirements
1291 (lambda _
1292 (substitute* "setup.py"
1293 (("mock~=2\\.0") "mock")
1294 (("coverage<5") "coverage")
1295 (("pytest~=4\\.3") "pytest")
1296 (("hypothesis~=4\\.56") "hypothesis"))
1297 #t))
1298 (add-after 'unpack 'fix-broken-tests
1299 ;; The tests try to run two scripts it expects should be
1300 ;; in PATH, but they aren't at this time (see:
1301 ;; https://github.com/hardbyte/python-can/issues/805).
1302 (lambda _
1303 (substitute* "test/test_scripts.py"
1304 (("\"can_logger\\.py --help\"") "")
1305 (("\"can_player\\.py --help\"") ""))
1306 #t)))))
1307 (propagated-inputs
1308 `(("python-aenum" ,python-aenum)
1309 ("python-wrapt" ,python-wrapt)))
1310 (native-inputs
1311 `(("python-codecov" ,python-codecov)
1312 ("python-coverage" ,python-coverage)
1313 ("python-future" ,python-future)
1314 ("python-hypothesis" ,python-hypothesis)
1315 ("python-mock" ,python-mock)
1316 ("python-pyserial" ,python-pyserial)
1317 ("python-pytest" ,python-pytest)
1318 ("python-pytest-cov" ,python-pytest-cov)
1319 ("python-pytest-runner" ,python-pytest-runner)
1320 ("python-pytest-timeout" ,python-pytest-timeout)))
1321 (home-page "https://github.com/hardbyte/python-can")
1322 (synopsis "Controller Area Network (CAN) interface module for Python")
1323 (description "This package defines the @code{can} module, which provides
1324controller area network (CAN) support for Python developers; providing common
1325abstractions to different hardware devices, and a suite of utilities for
1326sending and receiving messages on a CAN bus.")
1327 (license license:lgpl3+)))
1328
1329(define-public python-diskcache
1330 (package
1331 (name "python-diskcache")
1332 (version "4.1.0")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (pypi-uri "diskcache" version))
1337 (sha256
1338 (base32
1339 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:tests? #f)) ;test suite not included in the release
1343 (home-page "http://www.grantjenks.com/docs/diskcache/")
1344 (synopsis "Disk and file backed cache library")
1345 (description "DiskCache is a disk and file backed persistent cache.")
1346 (license license:asl2.0)))
1347
1348(define-public python-bitstruct
1349 (package
1350 (name "python-bitstruct")
1351 (version "8.9.0")
1352 (source
1353 (origin
1354 (method url-fetch)
1355 (uri (pypi-uri "bitstruct" version))
1356 (sha256
1357 (base32
1358 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1359 (build-system python-build-system)
1360 (home-page "https://github.com/eerimoq/bitstruct")
1361 (synopsis "Python values to and C bit field structs converter")
1362 (description "This module performs conversions between Python values and C
1363bit field structs represented as Python byte strings. It is intended to have
1364a similar interface as the @code{struct} module from Python, but working on
1365bits instead of primitive data types like @code{char}, @code{int}, etc.")
1366 (license license:expat)))
1367
1368(define-public python-cantools
1369 (package
1370 (name "python-cantools")
1371 (version "33.1.1")
1372 (source
1373 (origin
1374 ;; We take the sources from the Git repository as the documentation is
1375 ;; not included with the PyPI archive.
1376 (method git-fetch)
1377 (uri (git-reference
1378 (url "https://github.com/eerimoq/cantools")
1379 (commit version)))
1380 (file-name (git-file-name name version))
1381 (sha256
1382 (base32
1383 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1384 (build-system python-build-system)
1385 (arguments
1386 `(#:phases
1387 (modify-phases %standard-phases
1388 (add-after 'build 'build-doc
1389 (lambda _
1390 ;; See: https://github.com/eerimoq/cantools/issues/190.
1391 (substitute* "README.rst"
1392 (("https://github.com/eerimoq/cantools/raw/master\
1393/docs/monitor.png")
1394 "monitor.png"))
1395 (with-directory-excursion "docs"
1396 (invoke "make" "man" "info"))))
1397 (add-after 'install 'install-doc
1398 (lambda* (#:key outputs #:allow-other-keys)
1399 (let* ((out (assoc-ref outputs "out"))
1400 (info (string-append out "/share/info"))
1401 (man1 (string-append out "/share/man/man1")))
1402 (format #t "CWD: ~s~%" (getcwd))
1403 (install-file "docs/_build/texinfo/cantools.info" info)
1404 (install-file "docs/_build/man/cantools.1" man1)
1405 #t))))))
1406 (native-inputs
1407 `(("sphinx" ,python-sphinx)
1408 ("texinfo" ,texinfo)))
1409 (propagated-inputs
1410 `(("python-bitstruct" ,python-bitstruct)
1411 ("python-can" ,python-can)
1412 ("python-diskcache" ,python-diskcache)
1413 ("python-textparser" ,python-textparser)))
1414 (home-page "https://github.com/eerimoq/cantools")
1415 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1416 (description "This package includes Controller Area Network (CAN) related
1417tools that can be used to:
1418@itemize
1419@item parse DBC, KCD, SYM, ARXML 4 and CDD files
1420@item encode and decode CAN messages
1421@item multiplex simple and extended signals
1422@item diagnose DID encoding and decoding
1423@item dump the CAN decoder output
1424@item test CAN nodes
1425@item generate C source code
1426@item monitor the CAN bus
1427@end itemize")
1428 (license license:expat)))
1429
1430(define-public python-capturer
1431 (package
1432 (name "python-capturer")
1433 (version "2.4")
1434 (source
1435 (origin
1436 (method url-fetch)
1437 (uri (pypi-uri "capturer" version))
1438 (sha256
1439 (base32
1440 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1441 (build-system python-build-system)
1442 (arguments
1443 `(#:tests? #f))
1444 (propagated-inputs
1445 `(("python-humanfriendly" ,python-humanfriendly)))
1446 (home-page "https://capturer.readthedocs.io")
1447 (synopsis "Capture stdout and stderr streams of the current process")
1448 (description
1449 "The capturer package makes it easy to capture the stdout and stderr
1450streams of the current process and subprocesses. Output can be relayed
1451to the terminal in real time but is also available to the Python program
1452for additional processing.")
1453 (license license:expat)))
1454
1455(define-public python2-capturer
1456 (package-with-python2 python-capturer))
1457
1458(define-public python-case
1459 (package
1460 (name "python-case")
1461 (version "1.5.3")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "case" version))
1466 (sha256
1467 (base32
1468 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1469 (build-system python-build-system)
1470 (propagated-inputs
1471 `(("python-mock" ,python-mock)
1472 ("python-nose" ,python-nose)
1473 ("python-six" ,python-six)
1474 ("python-unittest2" ,python-unittest2)))
1475 (native-inputs
1476 `(("python-coverage" ,python-coverage)))
1477 (home-page "https://github.com/celery/case")
1478 (synopsis "Unittest utilities and convenience methods")
1479 (description
1480 "The @code{case} package provides utilities on top of unittest, including
1481some helpful Python 2 compatibility convenience methods.")
1482 (license license:bsd-3)))
1483
1484(define-public python-verboselogs
1485 (package
1486 (name "python-verboselogs")
1487 (version "1.7")
1488 (source
1489 (origin
1490 (method url-fetch)
1491 (uri (pypi-uri "verboselogs" version))
1492 (sha256
1493 (base32
1494 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1495 (build-system python-build-system)
1496 (arguments
1497 `(#:phases
1498 (modify-phases %standard-phases
1499 (replace 'check
1500 (lambda _
1501 ;; Do not run pylint plugin test, as astroid is an old
1502 ;; unsupported version.
1503 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1504 "verboselogs/tests.py"))))))
1505 (native-inputs
1506 `(("python-mock" ,python-mock)
1507 ("python-pytest" ,python-pytest)))
1508 (home-page "https://verboselogs.readthedocs.io")
1509 (synopsis "Verbose logging level for Python's logging module")
1510 (description
1511 "The @code{verboselogs} package extends Python's @code{logging} module to
1512add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1513 (license license:expat)))
1514
1515(define-public python2-verboselogs
1516 (package-with-python2 python-verboselogs))
1517
1518(define-public python-coloredlogs
1519 (package
1520 (name "python-coloredlogs")
1521 (version "10.0")
1522 (source
1523 (origin
1524 (method url-fetch)
1525 (uri (pypi-uri "coloredlogs" version))
1526 (sha256
1527 (base32
1528 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1529 (build-system python-build-system)
1530 (arguments
1531 `(;Tests require some updated modules
1532 #:tests? #f))
1533 (propagated-inputs
1534 `(("python-capturer" ,python-capturer)))
1535 (home-page "https://coloredlogs.readthedocs.io")
1536 (synopsis "Colored stream handler for Python's logging module")
1537 (description
1538 "The @code{coloredlogs} package enables colored terminal output for
1539Python's logging module. The @code{ColoredFormatter} class inherits from
1540@code{logging.Formatter} and uses ANSI escape sequences to render your logging
1541messages in color.")
1542 (license license:expat)))
1543
1544(define-public python2-coloredlogs
1545 (package-with-python2 python-coloredlogs))
1546
1547(define-public python-editorconfig
1548 (package
1549 (name "python-editorconfig")
1550 (version "0.12.2")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (pypi-uri "EditorConfig" version))
1555 (sha256
1556 (base32
1557 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1558 (build-system python-build-system)
1559 (home-page "https://editorconfig.org/")
1560 (synopsis "EditorConfig bindings for python")
1561 (description "The EditorConfig project consists of a file format for
1562defining coding styles and a collection of text editor plugins that enable
1563editors to read the file format and adhere to defined styles. EditorConfig
1564files are easily readable and they work nicely with version control systems.")
1565 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1566 (license (list license:bsd-2 license:psfl))))
1567
1568(define-public dosage
1569 (package
1570 (name "dosage")
1571 (version "2.17")
1572 (source
1573 (origin
1574 (method url-fetch)
1575 (uri (pypi-uri "dosage" version))
1576 (sha256
1577 (base32
1578 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1579 (build-system python-build-system)
1580 (propagated-inputs
1581 `(("python2-backports-functools-lru-cache"
1582 ,python2-backports-functools-lru-cache)
1583 ("python2-backports-shutil-get-terminal-size"
1584 ,python2-backports-shutil-get-terminal-size)
1585 ("python-cached-property" ,python-cached-property)
1586 ("python-colorama" ,python-colorama)
1587 ("python-imagesize" ,python-imagesize)
1588 ("python-importlib-metadata" ,python-importlib-metadata)
1589 ("python-lxml" ,python-lxml)
1590 ("python-requests" ,python-requests)
1591 ("python-six" ,python-six)))
1592 (native-inputs
1593 `(("python-pytest-cov" ,python-pytest-cov)
1594 ("python-pytest-xdist" ,python-pytest-xdist)
1595 ("python-responses" ,python-responses)
1596 ("python-setuptools-scm" ,python-setuptools-scm)))
1597 (home-page "https://github.com/webcomics/dosage")
1598 (synopsis "Comic strip downloader and archiver")
1599 (description "Dosage is designed to keep a local copy of specific webcomics and other
1600picture-based content such as Picture of the Day sites. With the @command{dosage}
1601command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1602downloaded, or download a strip for a particular date or index, if possible.")
1603 (license license:expat)))
1604
1605(define-public python-et-xmlfile
1606 (package
1607 (name "python-et-xmlfile")
1608 (version "1.0.1")
1609 (source
1610 (origin
1611 (method url-fetch)
1612 (uri (pypi-uri "et_xmlfile" version))
1613 (sha256
1614 (base32
1615 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1616 (build-system python-build-system)
1617 (arguments
1618 `(#:phases (modify-phases %standard-phases
1619 (replace 'check
1620 (lambda _
1621 (invoke "pytest"))))))
1622 (native-inputs
1623 `(("python-pytest" ,python-pytest)
1624 ("python-lxml" ,python-lxml))) ;used for the tests
1625 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1626 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1627 (description "This Python library is based upon the @code{xmlfile} module
1628from @code{lxml}. It aims to provide a low memory, compatible implementation
1629of @code{xmlfile}.")
1630 (license license:expat)))
1631
1632(define-public python2-et-xmlfile
1633 (package-with-python2 python-et-xmlfile))
1634
1635(define-public python-openpyxl
1636 (package
1637 (name "python-openpyxl")
1638 (version "3.0.5")
1639 (source
1640 (origin
1641 ;; We use the upstream repository, as the tests are not included in the
1642 ;; PyPI releases.
1643 (method hg-fetch)
1644 (uri (hg-reference
1645 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1646 (changeset version)))
1647 (file-name (string-append name "-" version "-checkout"))
1648 (sha256
1649 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1650 (build-system python-build-system)
1651 (arguments
1652 `(#:phases (modify-phases %standard-phases
1653 (replace 'check
1654 (lambda _
1655 (invoke "pytest"))))))
1656 (native-inputs
1657 ;; For the test suite.
1658 `(("python-lxml" ,python-lxml)
1659 ("python-pillow" ,python-pillow)
1660 ("python-pytest" ,python-pytest)))
1661 (propagated-inputs
1662 `(("python-et-xmlfile" ,python-et-xmlfile)
1663 ("python-jdcal" ,python-jdcal)))
1664 (home-page "https://openpyxl.readthedocs.io")
1665 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1666 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1667XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1668standard.")
1669 (properties `((python2-variant . ,(delay python2-openpyxl))))
1670 (license license:expat)))
1671
1672(define-public python2-openpyxl
1673 (let ((base (package-with-python2
1674 (strip-python2-variant python-openpyxl))))
1675 (package
1676 (inherit base)
1677 ;; This is the latest version that has python2 support
1678 (version "2.6.4")
1679 (source
1680 (origin
1681 (method url-fetch)
1682 (uri (pypi-uri "openpyxl" version))
1683 (sha256
1684 (base32
1685 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1686 (arguments '(#:tests? #f))))) ; No test suite.
1687
1688(define-public python-eventlet
1689 (package
1690 (name "python-eventlet")
1691 (version "0.25.1")
1692 (source
1693 (origin
1694 (method url-fetch)
1695 (uri (pypi-uri "eventlet" version))
1696 (sha256
1697 (base32
1698 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1699 (build-system python-build-system)
1700 (propagated-inputs
1701 `(("python-greenlet" ,python-greenlet)))
1702 (arguments
1703 ;; TODO: Requires unpackaged 'enum-compat'.
1704 '(#:tests? #f))
1705 (home-page "https://eventlet.net")
1706 (synopsis "Concurrent networking library for Python")
1707 (description
1708 "Eventlet is a concurrent networking library for Python that
1709allows you to change how you run your code, not how you write it.
1710It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1711Coroutines ensure that the developer uses a blocking style of programming
1712that is similar to threading, but provide the benefits of non-blocking I/O.
1713The event dispatch is implicit, which means you can easily use @code{Eventlet}
1714from the Python interpreter, or as a small part of a larger application.")
1715 (license license:expat)))
1716
1717(define-public python2-eventlet
1718 (let ((base (package-with-python2
1719 (strip-python2-variant python-eventlet))))
1720 (package (inherit base)
1721 (propagated-inputs
1722 `(("python2-enum34" ,python2-enum34)
1723 ,@(package-propagated-inputs base))))))
1724
1725(define-public python-six
1726 (package
1727 (name "python-six")
1728 (version "1.14.0")
1729 (source
1730 (origin
1731 (method url-fetch)
1732 (uri (pypi-uri "six" version))
1733 (sha256
1734 (base32
1735 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1736 (build-system python-build-system)
1737 (arguments
1738 `(#:phases
1739 (modify-phases %standard-phases
1740 (replace 'check
1741 (lambda _
1742 (invoke "py.test" "-v"))))))
1743 (native-inputs
1744 `(("python-pytest" ,python-pytest-bootstrap)))
1745 (home-page "https://pypi.org/project/six/")
1746 (synopsis "Python 2 and 3 compatibility utilities")
1747 (description
1748 "Six is a Python 2 and 3 compatibility library. It provides utility
1749functions for smoothing over the differences between the Python versions with
1750the goal of writing Python code that is compatible on both Python versions.
1751Six supports every Python version since 2.5. It is contained in only one
1752Python file, so it can be easily copied into your project.")
1753 (license license:x11)))
1754
1755(define-public python2-six
1756 (package-with-python2 python-six))
1757
1758(define-public python-six-bootstrap
1759 (package
1760 (inherit python-six)
1761 (name "python-six-bootstrap")
1762 (native-inputs `())
1763 (arguments `(#:tests? #f))))
1764
1765(define-public python2-six-bootstrap
1766 (package-with-python2 python-six-bootstrap))
1767
1768(define-public python-schedule
1769 (package
1770 (name "python-schedule")
1771 (version "0.4.3")
1772 (source
1773 (origin
1774 (method url-fetch)
1775 (uri (pypi-uri "schedule" version))
1776 (sha256
1777 (base32
1778 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1779 (build-system python-build-system)
1780 (native-inputs
1781 `(("python-pytest" ,python-pytest)
1782 ("python-mock" ,python-mock)))
1783 (home-page "https://github.com/dbader/schedule")
1784 (synopsis "Schedule periodic function calls in Python")
1785 (description
1786 "Schedule is an in-process scheduler for periodic jobs that uses the
1787builder pattern for configuration. Schedule lets you run Python functions (or
1788any other callable) periodically at pre-determined intervals using a simple,
1789human-friendly syntax.")
1790 (license license:expat)))
1791
1792(define-public python2-schedule
1793 (package-with-python2 python-schedule))
1794
1795(define-public python-scour
1796 (package
1797 (name "python-scour")
1798 (version "038.1")
1799 (source
1800 (origin
1801 (method git-fetch)
1802 (uri
1803 (git-reference
1804 (url "https://github.com/scour-project/scour")
1805 (commit
1806 (string-append "v" version))))
1807 (file-name (git-file-name name version))
1808 (sha256
1809 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1810 (propagated-inputs
1811 `(("python-six" ,python-six)))
1812 (build-system python-build-system)
1813 (home-page "https://github.com/scour-project/scour")
1814 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1815 (description "The goal of Scour is to output a file that renderes
1816identically at a fraction of the size by removing a lot of redundant
1817information created by most SVG editors. Optimization options are typically
1818lossless but can be tweaked for more aggressive cleaning.")
1819 (license license:asl2.0)))
1820
1821(define-public python-mechanize
1822 (package
1823 (name "python-mechanize")
1824 (version "0.4.5")
1825 (source
1826 (origin
1827 (method url-fetch)
1828 (uri (pypi-uri "mechanize" version))
1829 (sha256
1830 (base32
1831 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1832 (build-system python-build-system)
1833 (propagated-inputs
1834 `(("python-html5lib" ,python-html5lib)))
1835 (home-page "https://github.com/python-mechanize/mechanize")
1836 (synopsis
1837 "Stateful programmatic web browsing in Python")
1838 (description
1839 "Mechanize implements stateful programmatic web browsing in Python,
1840after Andy Lester’s Perl module WWW::Mechanize.")
1841 (license license:bsd-3)))
1842
1843(define-public python2-mechanize
1844 (package-with-python2 python-mechanize))
1845
1846(define-public python-simpleaudio
1847 (package
1848 (name "python-simpleaudio")
1849 (version "1.0.4")
1850 (source
1851 (origin
1852 (method url-fetch)
1853 (uri (pypi-uri "simpleaudio" version))
1854 (sha256
1855 (base32
1856 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1857 (build-system python-build-system)
1858 (arguments
1859 `(#:tests? #f))
1860 (inputs
1861 `(("alsa-lib" ,alsa-lib)))
1862 (home-page
1863 "https://github.com/hamiltron/py-simple-audio")
1864 (synopsis "Simple, asynchronous audio playback for Python 3")
1865 (description
1866 "The @code{simplaudio} package provides cross-platform, dependency-free
1867audio playback capability for Python 3 on OSX, Windows, and Linux.")
1868 (license license:expat))) ; MIT license
1869
1870(define-public python-simplejson
1871 (package
1872 (name "python-simplejson")
1873 (version "3.17.0")
1874 (source
1875 (origin
1876 (method url-fetch)
1877 (uri (pypi-uri "simplejson" version))
1878 (sha256
1879 (base32
1880 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1881 (build-system python-build-system)
1882 (home-page "http://simplejson.readthedocs.org/en/latest/")
1883 (synopsis
1884 "Json library for Python")
1885 (description
1886 "JSON (JavaScript Object Notation) is a subset of JavaScript
1887syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1888format.
1889
1890Simplejson exposes an API familiar to users of the standard library marshal
1891and pickle modules. It is the externally maintained version of the json
1892library contained in Python 2.6, but maintains compatibility with Python 2.5
1893and (currently) has significant performance advantages, even without using
1894the optional C extension for speedups. Simplejson is also supported on
1895Python 3.3+.")
1896 (license license:x11)))
1897
1898(define-public python2-simplejson
1899 (package-with-python2 python-simplejson))
1900
1901
1902(define-public python-pyicu
1903 (package
1904 (name "python-pyicu")
1905 (version "2.4.3")
1906 (source
1907 (origin
1908 (method url-fetch)
1909 (uri (pypi-uri "PyICU" version))
1910 (sha256
1911 (base32
1912 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1913 (build-system python-build-system)
1914 (inputs
1915 `(("icu4c" ,icu4c)))
1916 (native-inputs
1917 `(("python-pytest" ,python-pytest)
1918 ("python-six" ,python-six)))
1919 (home-page "https://github.com/ovalhub/pyicu")
1920 (synopsis "Python extension wrapping the ICU C++ API")
1921 (description
1922 "PyICU is a python extension wrapping the ICU C++ API.")
1923 (license license:x11)))
1924
1925(define-public python2-pyicu
1926 (package-with-python2 python-pyicu))
1927
1928(define-public python-dogtail
1929 (package
1930 (name "python-dogtail")
1931 (version "0.9.11")
1932 (source (origin
1933 (method url-fetch)
1934 (uri
1935 (string-append
1936 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1937 "dogtail-" version ".tar.gz"))
1938 (sha256
1939 (base32
1940 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1941 (build-system python-build-system)
1942 (arguments
1943 `(#:tests? #f ; TODO Launching dbus for the tests
1944 ; fails
1945 #:phases
1946 (modify-phases %standard-phases
1947 (replace 'check
1948 (lambda* (#:key tests? #:allow-other-keys)
1949 (when tests?
1950 (system "Xvfb :1 &")
1951 (setenv "DISPLAY" ":1")
1952 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1953 #t)))))
1954 (propagated-inputs
1955 `(("python-pygobject" ,python-pygobject)
1956 ("python-pycairo" ,python-pycairo)
1957 ("python-pyatspi" ,python-pyatspi)))
1958 (native-inputs
1959 `(("python-nose" ,python-nose)
1960 ("gtk+" ,gtk+)
1961 ("xvfb" ,xorg-server)
1962 ("dbus" ,dbus)
1963 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1964 ("gobject-introspection" ,gobject-introspection)))
1965 (home-page "https://gitlab.com/dogtail/dogtail/")
1966 (synopsis "GUI test tool and automation framework written in Python")
1967 (description
1968 "Dogtail is a GUI test tool and automation framework written in Python.
1969It uses Accessibility (a11y) technologies to communicate with desktop
1970applications. dogtail scripts are written in Python and executed like any
1971other Python program.")
1972 (license license:gpl2+)))
1973
1974(define-public python2-dogtail
1975 (package-with-python2 python-dogtail))
1976
1977(define-public python-empy
1978 (package
1979 (name "python-empy")
1980 (version "3.3.3")
1981 (source (origin
1982 (method url-fetch)
1983 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1984 version ".tar.gz"))
1985 (sha256
1986 (base32
1987 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1988 (build-system python-build-system)
1989 (arguments
1990 `(#:tests? #f)) ; python2 only
1991 (home-page "http://www.alcyone.com/software/empy/")
1992 (synopsis "Templating system for Python")
1993 (description
1994 "EmPy is a system for embedding Python expressions and statements in
1995template text; it takes an EmPy source file, processes it, and produces
1996output. This is accomplished via expansions, which are special signals to the
1997EmPy system and are set off by a special prefix (by default the at sign, @@).
1998EmPy can expand arbitrary Python expressions and statements in this way, as
1999well as a variety of special forms. Textual data not explicitly delimited in
2000this way is sent unaffected to the output, allowing Python to be used in
2001effect as a markup language. Also supported are callbacks via hooks,
2002recording and playback via diversions, and dynamic, chainable filters. The
2003system is highly configurable via command line options and embedded
2004commands.")
2005 (license license:lgpl2.1+)))
2006
2007(define-public python2-empy
2008 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2009 (package
2010 (inherit base)
2011 (arguments `(,@(package-arguments base)
2012 #:tests? #t)))))
2013
2014(define-public python2-element-tree
2015 (package
2016 (name "python2-element-tree")
2017 (version "1.2.6")
2018 (source (origin
2019 (method url-fetch)
2020 (uri (string-append
2021 "http://effbot.org/media/downloads/elementtree-"
2022 version "-20050316.tar.gz"))
2023 (sha256
2024 (base32
2025 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2026 (build-system python-build-system)
2027 (arguments
2028 `(#:python ,python-2 ; seems to be part of Python 3
2029 #:tests? #f)) ; no 'test' sub-command
2030 (synopsis "Toolkit for XML processing in Python")
2031 (description
2032 "ElementTree is a Python library supporting lightweight XML processing.")
2033 (home-page "https://effbot.org/zone/element-index.htm")
2034 (license (license:x11-style
2035 "http://docs.python.org/2/license.html"
2036 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2037
2038(define-public python2-pybugz
2039 (package
2040 (name "python2-pybugz")
2041 (version "0.6.11")
2042 (source (origin
2043 (method url-fetch)
2044 (uri (string-append
2045 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2046 version ".tar.gz"))
2047 (sha256
2048 (base32
2049 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2050 (patches (search-patches "pybugz-stty.patch"
2051 "pybugz-encode-error.patch"))))
2052 (build-system python-build-system)
2053 (arguments
2054 `(#:python ,python-2 ; SyntaxError with Python 3
2055 #:tests? #f)) ; no 'test' sub-command
2056 (propagated-inputs
2057 `(("element-tree" ,python2-element-tree)))
2058 (synopsis "Python and command-line interface to Bugzilla")
2059 (description
2060 "PyBugz is a Python library and command-line tool to query the Bugzilla
2061bug tracking system. It is meant as an aid to speed up interaction with the
2062bug tracker.")
2063 (home-page "http://www.liquidx.net/pybugz/")
2064 (license license:gpl2)))
2065
2066(define-public python2-enum
2067 (package
2068 (name "python2-enum")
2069 (version "0.4.6")
2070 (source (origin
2071 (method url-fetch)
2072 (uri (pypi-uri "enum" version))
2073 (sha256
2074 (base32
2075 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2076 (build-system python-build-system)
2077 (arguments
2078 `(#:python ,python-2))
2079 (home-page "https://pypi.org/project/enum/")
2080 (synopsis "Robust enumerated type support in Python")
2081 (description
2082 "This provides a module for robust enumerations in Python. It has
2083been superseded by the Python standard library and is provided only for
2084compatibility.")
2085 ;; Choice of either license.
2086 (license (list license:gpl3+ license:psfl))))
2087
2088(define-public python-enum34
2089 (package
2090 (name "python-enum34")
2091 (version "1.1.6")
2092 (source
2093 (origin
2094 (method url-fetch)
2095 (uri (pypi-uri "enum34" version))
2096 (sha256
2097 (base32
2098 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2099 (build-system python-build-system)
2100 (home-page "https://pypi.org/project/enum34/")
2101 (synopsis "Backported Python 3.4 Enum")
2102 (description
2103 "Enum34 is the new Python stdlib enum module available in Python 3.4
2104backported for previous versions of Python from 2.4 to 3.3.")
2105 (license license:bsd-3)))
2106
2107(define-public python2-enum34
2108 (package-with-python2 python-enum34))
2109
2110(define-public python-parse-type
2111 (package
2112 (name "python-parse-type")
2113 (version "0.4.2")
2114 (source
2115 (origin
2116 (method url-fetch)
2117 (uri (pypi-uri "parse_type" version))
2118 (sha256
2119 (base32
2120 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2121 (build-system python-build-system)
2122 (propagated-inputs
2123 `(("python-six" ,python-six)
2124 ("python-parse" ,python-parse)))
2125 (native-inputs
2126 `(("python-pytest" ,python-pytest)
2127 ("python-pytest-runner" ,python-pytest-runner)))
2128 (home-page "https://github.com/jenisys/parse_type")
2129 (synopsis "Extended parse module")
2130 (description
2131 "Parse_type extends the python parse module.")
2132 (properties
2133 `((python2-variant . ,(delay python2-parse-type))))
2134 (license license:bsd-3)))
2135
2136(define-public python2-parse-type
2137 (let ((base (package-with-python2
2138 (strip-python2-variant python-parse-type))))
2139 (package (inherit base)
2140 (propagated-inputs
2141 `(("python2-enum34" ,python2-enum34)
2142 ,@(package-propagated-inputs base))))))
2143
2144(define-public python-parse
2145 (package
2146 (name "python-parse")
2147 (version "1.8.4")
2148 (source
2149 (origin
2150 (method url-fetch)
2151 (uri (pypi-uri "parse" version))
2152 (sha256
2153 (base32
2154 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
2155 (build-system python-build-system)
2156 (arguments
2157 `(#:phases
2158 (modify-phases %standard-phases
2159 (replace 'check
2160 (lambda _ (invoke "python" "test_parse.py"))))))
2161 (home-page "https://github.com/r1chardj0n3s/parse")
2162 (synopsis "Parse strings")
2163 (description
2164 "Parse strings using a specification based on the Python @code{format()}
2165syntax.")
2166 (license license:x11)))
2167
2168(define-public python-polib
2169 (package
2170 (name "python-polib")
2171 (version "1.0.8")
2172 (source (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "polib" version))
2175 (sha256
2176 (base32
2177 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2178 (build-system python-build-system)
2179 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2180 (synopsis "Manipulate, create and modify gettext files")
2181 (description "Polib can manipulate any gettext format (po, pot and mo)
2182files. It can be used to create po files from scratch or to modify
2183existing ones.")
2184 (license license:expat)))
2185
2186(define-public python2-polib
2187 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2188 (package
2189 (inherit base)
2190 (arguments `(,@(package-arguments base)
2191 ;; Tests don't work with python2.
2192 #:tests? #f)))))
2193
2194(define-public python-poyo
2195 (package
2196 (name "python-poyo")
2197 (version "0.5.0")
2198 (source
2199 (origin
2200 (method url-fetch)
2201 (uri (pypi-uri "poyo" version))
2202 (sha256
2203 (base32
2204 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2205 (build-system python-build-system)
2206 (home-page "https://github.com/hackebrot/poyo")
2207 (synopsis "Lightweight YAML Parser for Python")
2208 (description
2209 "This package provides a lightweight YAML Parser for Python. It supports
2210only a chosen subset of the YAML format that is required to parse cookiecutter
2211user configuration files. It does not have support for serializing into YAML
2212and is not compatible with JSON.")
2213 (license license:expat)))
2214
2215(define-public scons
2216 (package
2217 (name "scons")
2218 (version "3.0.4")
2219 (source (origin
2220 (method git-fetch)
2221 (uri (git-reference
2222 (url "https://github.com/SCons/scons")
2223 (commit version)))
2224 (file-name (git-file-name name version))
2225 (sha256
2226 (base32
2227 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2228 (build-system python-build-system)
2229 (arguments
2230 `(#:use-setuptools? #f ; still relies on distutils
2231 #:tests? #f ; no 'python setup.py test' command
2232 #:phases
2233 (modify-phases %standard-phases
2234 (add-before 'build 'bootstrap
2235 (lambda _
2236 (substitute* "src/engine/SCons/compat/__init__.py"
2237 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2238 "sys.modules[new] = __import__(old)"))
2239 (substitute* "src/engine/SCons/Platform/__init__.py"
2240 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2241 "mod = __import__(full_name)"))
2242 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2243 (chdir "build/scons")
2244 #t)))))
2245 (home-page "https://scons.org/")
2246 (synopsis "Software construction tool written in Python")
2247 (description
2248 "SCons is a software construction tool. Think of SCons as an improved,
2249cross-platform substitute for the classic Make utility with integrated
2250functionality similar to autoconf/automake and compiler caches such as ccache.
2251In short, SCons is an easier, more reliable and faster way to build
2252software.")
2253 (license license:x11)))
2254
2255(define-public scons-python2
2256 (package
2257 (inherit (package-with-python2 scons))
2258 (name "scons-python2")))
2259
2260(define-public python-extras
2261 (package
2262 (name "python-extras")
2263 (version "1.0.0")
2264 (source
2265 (origin
2266 (method url-fetch)
2267 (uri (pypi-uri "extras" version))
2268 (sha256
2269 (base32
2270 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2271 (build-system python-build-system)
2272 (arguments
2273 ;; FIXME: Circular dependency on testtools.
2274 '(#:tests? #f))
2275 (home-page "https://github.com/testing-cabal/extras")
2276 (synopsis "Useful extensions to the Python standard library")
2277 (description
2278 "Extras is a set of extensions to the Python standard library.")
2279 (license license:expat)))
2280
2281(define-public python2-extras
2282 (package-with-python2 python-extras))
2283
2284(define-public python-mimeparse
2285 (package
2286 (name "python-mimeparse")
2287 (version "1.6.0")
2288 (source
2289 (origin
2290 (method url-fetch)
2291 (uri (pypi-uri "python-mimeparse" version))
2292 (sha256
2293 (base32
2294 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2295 (build-system python-build-system)
2296 (arguments
2297 '(#:phases
2298 (modify-phases %standard-phases
2299 (replace 'check
2300 (lambda _
2301 (invoke "./mimeparse_test.py"))))))
2302 (home-page
2303 "https://github.com/dbtsai/python-mimeparse")
2304 (synopsis "Python library for parsing MIME types")
2305 (description
2306 "Mimeparse provides basic functions for parsing MIME type names and
2307matching them against a list of media-ranges.")
2308 (license license:expat)))
2309
2310(define-public python2-mimeparse
2311 (package-with-python2 python-mimeparse))
2312
2313(define-public python-miniboa
2314 (package
2315 (name "python-miniboa")
2316 (version "1.0.7")
2317 (source
2318 (origin
2319 (method url-fetch)
2320 (uri (pypi-uri "miniboa" version))
2321 (sha256
2322 (base32
2323 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2324 (build-system python-build-system)
2325 (home-page "https://github.com/shmup/miniboa")
2326 (synopsis "Simple, single-threaded Telnet server")
2327 (description
2328 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2329server.")
2330 (license license:asl2.0)))
2331
2332(define-public python2-miniboa
2333 (package-with-python2 python-miniboa))
2334
2335(define-public python-pafy
2336 (package
2337 (name "python-pafy")
2338 (version "0.5.3.1")
2339 (source
2340 (origin
2341 (method url-fetch)
2342 (uri (pypi-uri "pafy" version))
2343 (sha256
2344 (base32
2345 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2346 (build-system python-build-system)
2347 (arguments
2348 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2349 (propagated-inputs
2350 ;; Youtube-dl is a python package which is imported in the file
2351 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2352 `(("youtube-dl" ,youtube-dl)))
2353 (home-page "https://np1.github.io/pafy/")
2354 (synopsis "Retrieve YouTube content and metadata")
2355 (description
2356 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2357 (license license:lgpl3+)))
2358
2359(define-public python2-funcsigs
2360 (package
2361 (name "python2-funcsigs")
2362 (version "1.0.2")
2363 (source (origin
2364 (method url-fetch)
2365 (uri (pypi-uri "funcsigs" version))
2366 (sha256
2367 (base32
2368 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2369 (build-system python-build-system)
2370 (arguments
2371 `(#:python ,python-2))
2372 (native-inputs
2373 `(("python2-unittest2" ,python2-unittest2)))
2374 (home-page "http://funcsigs.readthedocs.org")
2375 (synopsis "Python function signatures from PEP362")
2376 (description
2377 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2378 (license license:asl2.0)))
2379
2380(define-public python2-funcsigs-bootstrap
2381 (package
2382 (inherit python2-funcsigs)
2383 (name "python2-funcsigs-bootstrap")
2384 (native-inputs `())
2385 (arguments
2386 `(#:tests? #f
2387 ,@(package-arguments python2-funcsigs)))))
2388
2389(define-public python-py
2390 (package
2391 (name "python-py")
2392 (version "1.8.1")
2393 (source
2394 (origin
2395 (method url-fetch)
2396 (uri (pypi-uri "py" version))
2397 (sha256
2398 (base32
2399 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2400 (build-system python-build-system)
2401 (arguments
2402 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2403 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2404 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2405 ;; Is this module globally installed?"
2406 '(#:tests? #f))
2407 (native-inputs
2408 `(("python-setuptools-scm" ,python-setuptools-scm)))
2409 (home-page "https://github.com/pytest-dev/py")
2410 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2411 (description
2412 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2413code introspection, and logging.")
2414 (license license:expat)))
2415
2416(define-public python2-py
2417 (package-with-python2 python-py))
2418
2419;; Recent versions of python-fixtures and python-testrepository need
2420;; python-pbr for packaging, which itself needs these two packages for
2421;; testing.
2422;; To fix this circular dependency, we use a build of python-pbr, based on the
2423;; same source, just without any test dependencies and with tests disabled.
2424;; python-pbr-minmal is then used to package python-fixtures and
2425;; python-testrepository.
2426;; Strictly speaking we currently could remove the test-requirements from the
2427;; normal python-pbr package (and save this package) since test are disabled
2428;; there anyway. But this may change in future.
2429(define-public python-pbr-minimal
2430 (package
2431 (name "python-pbr-minimal")
2432 (version "3.0.1")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (pypi-uri "pbr" version))
2437 (sha256
2438 (base32
2439 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2440 (build-system python-build-system)
2441 (arguments
2442 `(#:tests? #f))
2443 (home-page "https://docs.openstack.org/pbr/latest/")
2444 (synopsis "Minimal build of python-pbr used for bootstrapping")
2445 (description
2446 "Used only for bootstrapping python2-pbr, you should not need this.")
2447 (license license:asl2.0)))
2448
2449(define-public python2-pbr-minimal
2450 (package-with-python2 python-pbr-minimal))
2451
2452(define-public python-pbr
2453 (package
2454 (inherit python-pbr-minimal)
2455 (name "python-pbr")
2456 (arguments
2457 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2458 (propagated-inputs
2459 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2460 (native-inputs
2461 `(("python-fixtures" ,python-fixtures-bootstrap)
2462 ;; discover, coverage, hacking, subunit
2463 ("python-mock" ,python-mock)
2464 ("python-six" ,python-six)
2465 ("python-sphinx" ,python-sphinx)
2466 ("python-testrepository" ,python-testrepository-bootstrap)
2467 ("python-testresources" ,python-testresources-bootstrap)
2468 ("python-testscenarios" ,python-testscenarios-bootstrap)
2469 ("python-testtools" ,python-testtools-bootstrap)
2470 ("python-virtualenv" ,python-virtualenv)))
2471 (synopsis "Enhance the default behavior of Python’s setuptools")
2472 (description
2473 "Python Build Reasonableness (PBR) is a library that injects some useful
2474and sensible default behaviors into your setuptools run. It will set
2475versions, process requirements files and generate AUTHORS and ChangeLog file
2476from git information.
2477")))
2478
2479(define-public python2-pbr
2480 (package-with-python2 python-pbr))
2481
2482(define-public python-pyrsistent
2483 (package
2484 (name "python-pyrsistent")
2485 (version "0.16.0")
2486 (home-page "https://github.com/tobgu/pyrsistent")
2487 (source (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "pyrsistent" version))
2490 (sha256
2491 (base32
2492 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2493 (build-system python-build-system)
2494 (arguments
2495 '(#:phases (modify-phases %standard-phases
2496 ;; The package works fine with newer Pytest and Hypothesis, but
2497 ;; has pinned older versions to stay compatible with Python 2.
2498 (add-before 'check 'loosen-pytest-requirement
2499 (lambda _
2500 (substitute* "setup.py"
2501 (("pytest<5") "pytest")
2502 (("hypothesis<5") "hypothesis"))
2503 #t)))))
2504 (native-inputs
2505 `(("python-hypothesis" ,python-hypothesis)
2506 ("python-pytest" ,python-pytest)
2507 ("python-pytest-runner" ,python-pytest-runner)))
2508 (propagated-inputs
2509 `(("python-six" ,python-six)))
2510 (synopsis "Persistent data structures for Python")
2511 (description
2512 "Pyrsistent is a number of persistent collections (by some referred to as
2513functional data structures). Persistent in the sense that they are immutable.
2514
2515All methods on a data structure that would normally mutate it instead return a
2516new copy of the structure containing the requested updates. The original
2517structure is left untouched.")
2518 (license license:expat)))
2519
2520(define-public python2-pyrsistent
2521 (package-with-python2 python-pyrsistent))
2522
2523(define-public python-exif-read
2524 (package
2525 (name "python-exif-read")
2526 (version "2.1.2")
2527 (source (origin
2528 (method url-fetch)
2529 (uri (pypi-uri "ExifRead" version))
2530 (sha256
2531 (base32
2532 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2533 (build-system python-build-system)
2534 (arguments `(#:tests? #f)) ; no tests
2535 (home-page "https://github.com/ianare/exif-py")
2536 (synopsis "Python library to extract EXIF data from image files")
2537 (description
2538 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2539files.")
2540 (license license:bsd-3)))
2541
2542(define-public python2-exif-read
2543 (package-with-python2 python-exif-read))
2544
2545(define-public python-pyld
2546 (package
2547 (name "python-pyld")
2548 (version "1.0.5")
2549 (source (origin
2550 (method url-fetch)
2551 (uri (pypi-uri "PyLD" version))
2552 (sha256
2553 (base32
2554 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2555 (build-system python-build-system)
2556 (home-page "https://github.com/digitalbazaar/pyld")
2557 (synopsis "Python implementation of the JSON-LD specification")
2558 (description
2559 "PyLD is an implementation of the JSON-LD specification.")
2560 (license license:bsd-3)))
2561
2562(define-public python2-pyld
2563 (package-with-python2 python-pyld))
2564
2565(define-public python-cli-helpers
2566 (package
2567 (name "python-cli-helpers")
2568 (version "2.0.1")
2569 (source
2570 (origin
2571 ;; There's no source tarball on PyPI.
2572 (method git-fetch)
2573 (uri (git-reference
2574 (url "https://github.com/dbcli/cli_helpers")
2575 (commit (string-append "v" version))))
2576 (file-name (git-file-name name version))
2577 (sha256
2578 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2579 (build-system python-build-system)
2580 (native-inputs
2581 `(("python-pytest" ,python-pytest)))
2582 (propagated-inputs
2583 `(("python-wcwidth" ,python-wcwidth)
2584 ("python-configobj" ,python-configobj)
2585 ("python-tabulate" ,python-tabulate)
2586 ("python-terminaltables" ,python-terminaltables)))
2587 (home-page "https://github.com/dbcli/cli_helpers")
2588 (synopsis "Helpers for building command-line apps")
2589 (description
2590 "CLI Helpers is a Python package that makes it easy to perform common
2591tasks when building command-line apps. It's a helper library for command-line
2592interfaces.")
2593 (license license:bsd-3)))
2594
2595(define-public python-click
2596 (package
2597 (name "python-click")
2598 (version "7.1.2")
2599 (source
2600 (origin
2601 (method url-fetch)
2602 (uri (pypi-uri "click" version))
2603 (sha256
2604 (base32
2605 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2606 (build-system python-build-system)
2607 (arguments
2608 `(#:phases
2609 (modify-phases %standard-phases
2610 (add-after 'unpack 'fix-paths
2611 (lambda* (#:key inputs #:allow-other-keys)
2612 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2613 "cross-libc" "libc"))))
2614 (substitute* "src/click/_unicodefun.py"
2615 (("'locale'")
2616 (string-append "'" glibc "/bin/locale'"))))
2617 #t))
2618 (replace 'check
2619 (lambda _
2620 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2621 (invoke "python" "-m" "pytest"))))))
2622 (native-inputs
2623 `(("python-pytest" ,python-pytest)))
2624 (home-page "https://palletsprojects.com/p/click/")
2625 (synopsis "Command line library for Python")
2626 (description
2627 "Click is a Python package for creating command line interfaces in a
2628composable way with as little code as necessary. Its name stands for
2629\"Command Line Interface Creation Kit\". It's highly configurable but comes
2630with sensible defaults out of the box.")
2631 (license license:bsd-3)))
2632
2633(define-public python2-click
2634 (package-with-python2 python-click))
2635
2636(define-public python-click-5
2637 (package (inherit python-click)
2638 (name "python-click")
2639 (version "5.1")
2640 (source
2641 (origin
2642 (method url-fetch)
2643 (uri (pypi-uri "click" version))
2644 (sha256
2645 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2646 (arguments `())))
2647
2648(define-public python-wheel
2649 (package
2650 (name "python-wheel")
2651 (version "0.33.6")
2652 (source
2653 (origin
2654 (method url-fetch)
2655 (uri (pypi-uri "wheel" version))
2656 (sha256
2657 (base32
2658 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2659 (build-system python-build-system)
2660 (arguments
2661 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2662 ;; fails to find the newly-built bdist_wheel library, even though it is
2663 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2664 '(#:tests? #f))
2665 (home-page "https://bitbucket.org/pypa/wheel/")
2666 (synopsis "Format for built Python packages")
2667 (description
2668 "A wheel is a ZIP-format archive with a specially formatted filename and
2669the @code{.whl} extension. It is designed to contain all the files for a PEP
2670376 compatible install in a way that is very close to the on-disk format. Many
2671packages will be properly installed with only the @code{Unpack} step and the
2672unpacked archive preserves enough information to @code{Spread} (copy data and
2673scripts to their final locations) at any later time. Wheel files can be
2674installed with a newer @code{pip} or with wheel's own command line utility.")
2675 (license license:expat)))
2676
2677(define-public python2-wheel
2678 (package-with-python2 python-wheel))
2679
2680(define-public python-vcversioner
2681 (package
2682 (name "python-vcversioner")
2683 (version "2.16.0.0")
2684 (source
2685 (origin
2686 (method url-fetch)
2687 (uri (pypi-uri "vcversioner" version))
2688 (sha256
2689 (base32
2690 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2691 (build-system python-build-system)
2692 (synopsis "Python library for version number discovery")
2693 (description "Vcversioner is a Python library that inspects tagging
2694information in a variety of version control systems in order to discover
2695version numbers.")
2696 (home-page "https://github.com/habnabit/vcversioner")
2697 (license license:isc)))
2698
2699(define-public python2-vcversioner
2700 (package-with-python2 python-vcversioner))
2701
2702(define-public python-jdcal
2703 (package
2704 (name "python-jdcal")
2705 (version "1.4")
2706 (source
2707 (origin
2708 (method url-fetch)
2709 (uri (pypi-uri "jdcal" version))
2710 (sha256
2711 (base32
2712 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2713 (build-system python-build-system)
2714 (arguments
2715 `(#:phases (modify-phases %standard-phases
2716 (replace 'check
2717 (lambda _
2718 (invoke "pytest"))))))
2719 (native-inputs
2720 `(("python-pytest" ,python-pytest)))
2721 (home-page "https://github.com/phn/jdcal")
2722 (synopsis "Functions to convert between Julian dates Gregorian dates")
2723 (description "This Python library provides functions for converting
2724between Julian dates and Gregorian dates.")
2725 (license license:bsd-2)))
2726
2727(define-public python2-jdcal
2728 (package-with-python2 python-jdcal))
2729
2730(define-public python-jsondiff
2731 (package
2732 (name "python-jsondiff")
2733 (version "1.2.0")
2734 (source
2735 (origin
2736 (method url-fetch)
2737 (uri (pypi-uri "jsondiff" version))
2738 (sha256
2739 (base32
2740 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2741 (build-system python-build-system)
2742 (native-inputs
2743 `(("python-nose" ,python-nose)
2744 ("python-nose-random" ,python-nose-random)))
2745 (home-page
2746 "https://github.com/fzumstein/jsondiff")
2747 (synopsis "Compare JSON and JSON-like structures in Python")
2748 (description "@code{jsondiff} is a Python library which lets you
2749compare, diff, and patch JSON and JSON-like structures in Python.")
2750 (license license:expat)))
2751
2752(define-public python-jsonschema
2753 (package
2754 (name "python-jsonschema")
2755 (version "3.2.0")
2756 (source (origin
2757 (method url-fetch)
2758 (uri (pypi-uri "jsonschema" version))
2759 (sha256
2760 (base32
2761 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2762 (build-system python-build-system)
2763 (arguments
2764 '(#:phases
2765 (modify-phases %standard-phases
2766 (replace 'check
2767 (lambda* (#:key inputs outputs #:allow-other-keys)
2768 (add-installed-pythonpath inputs outputs)
2769 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2770 (invoke "trial" "jsonschema"))))))
2771 (native-inputs
2772 `(("python-setuptools_scm" ,python-setuptools-scm)
2773 ("python-twisted" ,python-twisted)))
2774 (propagated-inputs
2775 `(("python-attrs" ,python-attrs)
2776 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2777 ("python-pyrsistent" ,python-pyrsistent)
2778 ("python-six" ,python-six)))
2779 (home-page "https://github.com/Julian/jsonschema")
2780 (synopsis "Implementation of JSON Schema for Python")
2781 (description
2782 "Jsonschema is an implementation of JSON Schema for Python.")
2783 (license license:expat)
2784 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2785
2786(define-public python2-jsonschema
2787 (let ((jsonschema (package-with-python2
2788 (strip-python2-variant python-jsonschema))))
2789 (package (inherit jsonschema)
2790 (propagated-inputs
2791 `(("python2-functools32" ,python2-functools32)
2792 ,@(package-propagated-inputs jsonschema))))))
2793
2794(define-public python-schema
2795 (package
2796 (name "python-schema")
2797 (version "0.6.6")
2798 (source
2799 (origin
2800 (method url-fetch)
2801 (uri (pypi-uri "schema" version))
2802 (sha256
2803 (base32
2804 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2805 (build-system python-build-system)
2806 (native-inputs
2807 `(("python-pytest" ,python-pytest)))
2808 (home-page "https://github.com/keleshev/schema")
2809 (synopsis "Simple data validation library")
2810 (description
2811 "@code{python-schema} is a library for validating Python data
2812structures, such as those obtained from config-files, forms, external
2813services or command-line parsing, converted from JSON/YAML (or
2814something else) to Python data-types.")
2815 (license license:psfl)))
2816
2817(define-public python2-schema
2818 (package-with-python2 python-schema))
2819
2820(define-public python-schema-0.5
2821 (package (inherit python-schema)
2822 (version "0.5.0")
2823 (source
2824 (origin
2825 (method url-fetch)
2826 (uri (pypi-uri "schema" version))
2827 (sha256
2828 (base32
2829 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2830
2831(define-public python2-schema-0.5
2832 (package-with-python2 python-schema-0.5))
2833
2834(define-public python-kitchen
2835 (package
2836 (name "python-kitchen")
2837 (version "1.2.5")
2838 (source
2839 (origin
2840 (method url-fetch)
2841 (uri (pypi-uri "kitchen" version))
2842 (sha256
2843 (base32
2844 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2845 (build-system python-build-system)
2846 (propagated-inputs
2847 `(("python-chardet" ,python-chardet)))
2848 (home-page "https://github.com/fedora-infra/kitchen")
2849 (synopsis "Python API for snippets")
2850 (description "@code{kitchen} module provides a python API for all sorts of
2851little useful snippets of code that everybody ends up writing for their projects
2852but never seem big enough to build an independent release. Use kitchen and stop
2853cutting and pasting that code over and over.")
2854 (license (list license:lgpl2.1+
2855 ;; subprocess.py, test_subprocess.py,
2856 ;; kitchen/pycompat25/defaultdict.py:
2857 license:psfl))))
2858
2859(define-public python2-kitchen
2860 (package-with-python2 python-kitchen))
2861
2862(define-public python-unidecode
2863 (package
2864 (name "python-unidecode")
2865 (version "1.1.1")
2866 (source (origin
2867 (method url-fetch)
2868 (uri (pypi-uri "Unidecode" version))
2869 (sha256
2870 (base32
2871 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2872 (build-system python-build-system)
2873 (home-page "https://pypi.org/project/Unidecode/")
2874 (synopsis "ASCII transliterations of Unicode text")
2875 (description
2876 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2877useful when integrating with legacy code that doesn't support Unicode, or for
2878ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2879machine identifiers from human-readable Unicode strings that should still be
2880somewhat intelligible.")
2881 (license license:gpl2+)))
2882
2883(define-public python2-unidecode
2884 (package-with-python2 python-unidecode))
2885
2886(define-public python-text-unidecode
2887 (package
2888 (name "python-text-unidecode")
2889 (version "1.3")
2890 (source (origin
2891 (method url-fetch)
2892 (uri (pypi-uri "text-unidecode" version))
2893 (sha256
2894 (base32
2895 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2896 (build-system python-build-system)
2897 (arguments
2898 '(#:phases (modify-phases %standard-phases
2899 (replace 'check
2900 (lambda _
2901 (setenv "PYTHONPATH"
2902 (string-append "./build/lib:"
2903 (getenv "PYTHONPATH")))
2904 (invoke "pytest" "-vv"))))))
2905 (native-inputs
2906 `(("python-pytest" ,python-pytest)))
2907 (home-page "https://github.com/kmike/text-unidecode/")
2908 (synopsis "Decode Unicode data")
2909 (description
2910 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2911Perl library. It can create ASCII representations of Unicode data. In general
2912users should prefer the @code{python-unidecode} package which offers better
2913memory usage and transliteration quality.")
2914 ;; The user can choose either license.
2915 (license (list license:clarified-artistic license:gpl2+))))
2916
2917(define-public python2-text-unidecode
2918 (package-with-python2 python-text-unidecode))
2919
2920(define-public python-pyjwt
2921 (package
2922 (name "python-pyjwt")
2923 (version "1.7.1")
2924 (source
2925 (origin
2926 (method url-fetch)
2927 (uri (pypi-uri "PyJWT" version))
2928 (sha256
2929 (base32
2930 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2931 (modules '((guix build utils)))
2932 (snippet
2933 '(begin
2934 (for-each delete-file-recursively
2935 (find-files "." "\\.pyc$"))
2936 #t))))
2937 (build-system python-build-system)
2938 (arguments
2939 '(#:phases (modify-phases %standard-phases
2940 (replace 'check
2941 (lambda _
2942 ;; Mimic upstream commit 3a20892442b34c7 to get
2943 ;; rid of dependency on pytest-runner < 5.0.
2944 ;; Remove substitution for PyJWT > 1.7.1.
2945 (substitute* "setup.py"
2946 ((".*pytest-runner.*")
2947 ""))
2948 (invoke "pytest" "-vv"))))))
2949 (native-inputs
2950 `(("python-pytest" ,python-pytest)
2951 ("python-pytest-cov" ,python-pytest-cov)))
2952 (home-page "https://github.com/progrium/pyjwt")
2953 (synopsis "JSON Web Token implementation in Python")
2954 (description
2955 "PyJWT is a JSON Web Token implementation written in Python.")
2956 (license license:expat)))
2957
2958(define-public python2-pyjwt
2959 (package-with-python2 python-pyjwt))
2960
2961(define-public python-pykka
2962 (package
2963 (name "python-pykka")
2964 (version "1.2.1")
2965 (source
2966 (origin
2967 (method url-fetch)
2968 (uri (pypi-uri "Pykka" version))
2969 (sha256
2970 (base32
2971 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2972 (build-system python-build-system)
2973 (native-inputs
2974 `(("python-mock" ,python-mock)
2975 ("python-nose" ,python-nose)
2976 ("python-gevent" ,python-gevent)
2977 ("python-eventlet" ,python-eventlet)))
2978 (home-page "https://www.pykka.org/")
2979 (synopsis "Pykka is a Python implementation of the actor model")
2980 (description
2981 "Pykka is a Python implementation of the actor model.
2982The actor model introduces some simple rules to control the sharing
2983of state and cooperation between execution units, which makes it
2984easier to build concurrent applications.")
2985 (license license:asl2.0)))
2986
2987(define-public python2-pykka
2988 (package-with-python2 python-pykka))
2989
2990(define-public python-pymsgbox
2991 (package
2992 (name "python-pymsgbox")
2993 (version "1.0.6")
2994 (source
2995 (origin
2996 (method git-fetch)
2997 (uri (git-reference
2998 ;; LICENSE.txt is not present on pypi
2999 (url "https://github.com/asweigart/PyMsgBox")
3000 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3001 (file-name (git-file-name name version))
3002 (sha256
3003 (base32
3004 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3005 (arguments
3006 ;; Circular dependency to run tests:
3007 ;; Tests need pyautogui, which depends on pymsgbox.
3008 '(#:tests? #f))
3009 (build-system python-build-system)
3010 (home-page "https://github.com/asweigart/PyMsgBox")
3011 (synopsis "Python module for JavaScript-like message boxes")
3012 (description
3013 "PyMsgBox is a simple, cross-platform, pure Python module for
3014JavaScript-like message boxes. Types of dialog boxes include:
3015@enumerate
3016@item alert
3017@item confirm
3018@item prompt
3019@item password
3020@end enumerate
3021")
3022 (license license:bsd-3)))
3023
3024(define-public python-pympler
3025 (package
3026 (name "python-pympler")
3027 (home-page "https://pythonhosted.org/Pympler/")
3028 (version "0.8")
3029 (source (origin
3030 (method url-fetch)
3031 (uri (pypi-uri "Pympler" version))
3032 (sha256
3033 (base32
3034 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3035 (build-system python-build-system)
3036 (arguments
3037 `(#:phases (modify-phases %standard-phases
3038 (delete 'check)
3039 (add-after 'install 'check
3040 (lambda* (#:key inputs outputs #:allow-other-keys)
3041 (add-installed-pythonpath inputs outputs)
3042 (invoke "python" "setup.py" "test"))))))
3043 (synopsis "Measure, monitor and analyze memory behavior")
3044 (description
3045 "Pympler is a development tool to measure, monitor and analyze
3046the memory behavior of Python objects in a running Python application.
3047
3048By pympling a Python application, detailed insight in the size and the
3049lifetime of Python objects can be obtained. Undesirable or unexpected
3050runtime behavior like memory bloat and other @samp{pymples} can easily
3051be identified.
3052
3053A web profiling frontend exposes process statistics, garbage
3054visualisation and class tracker statistics.")
3055 (license license:asl2.0)))
3056
3057(define-public python2-pympler
3058 (package-with-python2 python-pympler))
3059
3060(define-public python-itsdangerous
3061 (package
3062 (name "python-itsdangerous")
3063 (version "1.1.0")
3064 (source
3065 (origin
3066 (method url-fetch)
3067 (uri (pypi-uri "itsdangerous" version))
3068 (sha256
3069 (base32
3070 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3071 (build-system python-build-system)
3072 (home-page "https://palletsprojects.com/p/itsdangerous/")
3073 (synopsis "Python library for passing data to/from untrusted environments")
3074 (description
3075 "Itsdangerous provides various helpers to pass trusted data to untrusted
3076environments and back.")
3077 (license license:bsd-3)))
3078
3079(define-public python2-itsdangerous
3080 (package-with-python2 python-itsdangerous))
3081
3082(define-public python-pyyaml
3083 (package
3084 (name "python-pyyaml")
3085 (version "5.3.1")
3086 (source
3087 (origin
3088 (method url-fetch)
3089 (uri (pypi-uri "PyYAML" version))
3090 (sha256
3091 (base32
3092 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3093 (build-system python-build-system)
3094 (inputs
3095 `(("libyaml" ,libyaml)))
3096 (home-page "https://pyyaml.org")
3097 (synopsis "YAML parser and emitter for Python")
3098 (description
3099 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3100complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3101API, and sensible error messages. PyYAML supports standard YAML tags and
3102provides Python-specific tags that represent an arbitrary Python object.")
3103 (license license:expat)))
3104
3105(define-public python2-pyyaml
3106 (package-with-python2 python-pyyaml))
3107
3108(define-public python-vine
3109 (package
3110 (name "python-vine")
3111 (version "1.1.4")
3112 (source
3113 (origin
3114 (method url-fetch)
3115 (uri (pypi-uri "vine" version))
3116 (sha256
3117 (base32
3118 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3119 (build-system python-build-system)
3120 (native-inputs
3121 `(("python-pytest" ,python-pytest)
3122 ("python-case" ,python-case)))
3123 (home-page "https://github.com/celery/vine")
3124 (synopsis "Promises for Python")
3125 (description
3126 "@code{vine} provides a special implementation of promises in that it can
3127be used both for \"promise of a value\" and lazy evaluation. The biggest
3128upside for this is that everything in a promise can also be a promise,
3129e.g. filters, callbacks and errbacks can all be promises.")
3130 (license license:bsd-3)))
3131
3132(define-public python-virtualenv
3133 (package
3134 (name "python-virtualenv")
3135 (version "20.0.10")
3136 (source
3137 (origin
3138 (method url-fetch)
3139 (uri (pypi-uri "virtualenv" version))
3140 (sha256
3141 (base32
3142 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
3143 (build-system python-build-system)
3144 (native-inputs
3145 `(("python-mock" ,python-mock)
3146 ("python-pytest" ,python-pytest)
3147 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3148 ;; be an input at all". However, removing the input makes the build error:
3149 ;; File "setup.py", line 4, in <module>
3150 ;; raise RuntimeError("setuptools >= 41 required to build")
3151 ("python-setuptools" ,python-setuptools)
3152 ("python-setuptools-scm" ,python-setuptools-scm)))
3153 (propagated-inputs
3154 `(("python-appdirs" ,python-appdirs)
3155 ("python-distlib" ,python-distlib)
3156 ("python-filelock" ,python-filelock)
3157 ("python-six" ,python-six)
3158 ("python-importlib-metadata" ,python-importlib-metadata)))
3159 (home-page "https://virtualenv.pypa.io/")
3160 (synopsis "Virtual Python environment builder")
3161 (description
3162 "Virtualenv is a tool to create isolated Python environments.")
3163 (properties `((python2-variant . ,(delay python2-virtualenv))))
3164 (license license:expat)))
3165
3166(define-public python2-virtualenv
3167 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3168 (package
3169 (inherit base)
3170 (arguments
3171 `(#:python ,python-2
3172 #:phases
3173 (modify-phases %standard-phases
3174 (add-after 'set-paths 'adjust-PYTHONPATH
3175 (lambda* (#:key inputs #:allow-other-keys)
3176 (let* ((python (assoc-ref inputs "python"))
3177 (python-sitedir (string-append python "/lib/python2.7"
3178 "/site-packages")))
3179 ;; XXX: 'python2' always comes first on PYTHONPATH
3180 ;; and shadows the 'setuptools' input. Move python2
3181 ;; last: this should be fixed in python-build-system
3182 ;; in a future rebuild cycle.
3183 (setenv "PYTHONPATH"
3184 (string-append (string-join (delete python-sitedir
3185 (string-split
3186 (getenv "PYTHONPATH")
3187 #\:))
3188 ":")
3189 ":" python-sitedir))
3190 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3191 (getenv "PYTHONPATH"))
3192 #t))))))
3193 (propagated-inputs
3194 `(("python-contextlib2" ,python2-contextlib2)
3195 ,@(package-propagated-inputs base))))))
3196
3197(define-public python-markupsafe
3198 (package
3199 (name "python-markupsafe")
3200 (version "1.1.1")
3201 (source
3202 (origin
3203 (method url-fetch)
3204 (uri (pypi-uri "MarkupSafe" version))
3205 (sha256
3206 (base32
3207 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3208 (build-system python-build-system)
3209 (arguments
3210 `(#:modules ((ice-9 ftw)
3211 (srfi srfi-1)
3212 (srfi srfi-26)
3213 (guix build utils)
3214 (guix build python-build-system))
3215 #:phases (modify-phases %standard-phases
3216 (replace 'check
3217 (lambda _
3218 (let ((cwd (getcwd))
3219 (libdir (find (cut string-prefix? "lib." <>)
3220 (scandir "build"))))
3221 (setenv "PYTHONPATH"
3222 (string-append cwd "/build/" libdir ":"
3223 (getenv "PYTHONPATH")))
3224 (invoke "pytest" "-vv")))))))
3225 (native-inputs
3226 `(("python-pytest" ,python-pytest)))
3227 (home-page "https://github.com/mitsuhiko/markupsafe")
3228 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3229 (description
3230 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3231for Python.")
3232 (license license:bsd-3)))
3233
3234(define-public python2-markupsafe
3235 (package-with-python2 python-markupsafe))
3236
3237(define-public python-jinja2
3238 (package
3239 (name "python-jinja2")
3240 (version "2.11.2")
3241 (source
3242 (origin
3243 (method url-fetch)
3244 (uri (pypi-uri "Jinja2" version))
3245 (sha256
3246 (base32
3247 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3248 (build-system python-build-system)
3249 (arguments
3250 '(#:phases (modify-phases %standard-phases
3251 (replace 'check
3252 (lambda* (#:key tests? #:allow-other-keys)
3253 (if tests?
3254 (begin
3255 (setenv "PYTHONPATH"
3256 (string-append "./build/lib:"
3257 (getenv "PYTHONPATH")))
3258 (invoke "pytest" "-vv"))
3259 (format #t "test suite not run~%"))
3260 #t)))))
3261 (native-inputs
3262 `(("python-pytest" ,python-pytest)))
3263 (propagated-inputs
3264 `(("python-markupsafe" ,python-markupsafe)))
3265 (home-page "http://jinja.pocoo.org/")
3266 (synopsis "Python template engine")
3267 (description
3268 "Jinja2 is a small but fast and easy to use stand-alone template engine
3269written in pure Python.")
3270 (license license:bsd-3)))
3271
3272(define-public python2-jinja2
3273 (package-with-python2 python-jinja2))
3274
3275(define-public python-jinja2-time
3276 (package
3277 (name "python-jinja2-time")
3278 (version "0.2.0")
3279 (source
3280 (origin
3281 (method url-fetch)
3282 (uri (pypi-uri "jinja2-time" version))
3283 (sha256
3284 (base32
3285 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3286 (build-system python-build-system)
3287 (propagated-inputs
3288 `(("python-arrow" ,python-arrow)
3289 ("python-jinja2" ,python-jinja2)))
3290 (home-page
3291 "https://github.com/hackebrot/jinja2-time")
3292 (synopsis "Jinja2 Extension for Dates and Times")
3293 (description
3294 "This package provides an extension for the template engine Jinja2. It
3295adds a 'now' tag providing a convenient access to the arrow.now() API from
3296templates. A format string can be provided to control the output.")
3297 (license license:expat)))
3298
3299(define-public python-pystache
3300 (package
3301 (name "python-pystache")
3302 (version "0.5.4")
3303 (source (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "pystache" version))
3306 (sha256
3307 (base32
3308 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3309 (build-system python-build-system)
3310 (arguments
3311 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3312 (home-page "http://defunkt.io/pystache/")
3313 (synopsis "Python logic-less template engine")
3314 (description
3315 "Pystache is a Python implementation of the framework agnostic,
3316logic-free templating system Mustache.")
3317 (license license:expat)
3318 (properties `((python2-variant . ,(delay python2-pystache))))))
3319
3320(define-public python2-pystache
3321 (package (inherit (package-with-python2
3322 (strip-python2-variant python-pystache)))
3323 (arguments
3324 `(#:python ,python-2
3325 #:phases
3326 (modify-phases %standard-phases
3327 (replace 'check
3328 (lambda _
3329 (invoke "python" "test_pystache.py"))))))))
3330
3331(define-public python-joblib
3332 (package
3333 (name "python-joblib")
3334 (version "0.14.1")
3335 (source (origin
3336 (method url-fetch)
3337 (uri (pypi-uri "joblib" version))
3338 (sha256
3339 (base32
3340 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3341 (build-system python-build-system)
3342 (arguments
3343 `(#:phases
3344 (modify-phases %standard-phases
3345 (replace 'check
3346 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3347 (native-inputs
3348 `(("python-pytest" ,python-pytest)))
3349 (home-page "https://joblib.readthedocs.io/")
3350 (synopsis "Using Python functions as pipeline jobs")
3351 (description
3352 "Joblib is a set of tools to provide lightweight pipelining in Python.
3353In particular, joblib offers: transparent disk-caching of the output values
3354and lazy re-evaluation (memoize pattern), easy simple parallel computing
3355logging and tracing of the execution.")
3356 (license license:bsd-3)))
3357
3358(define-public python2-joblib
3359 (package-with-python2 python-joblib))
3360
3361(define-public python-daemon
3362 (package
3363 (name "python-daemon")
3364 (version "2.2.3")
3365 (source
3366 (origin
3367 (method url-fetch)
3368 (uri (pypi-uri "python-daemon" version))
3369 (sha256
3370 (base32
3371 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3372 (build-system python-build-system)
3373 (arguments
3374 `(#:phases
3375 (modify-phases %standard-phases
3376 (add-before 'check 'disable-tests
3377 (lambda _
3378 ;; FIXME: Determine why test fails
3379 (substitute* "test/test_daemon.py"
3380 (("test_detaches_process_context")
3381 "skip_test_detaches_process_context"))
3382 #t)))))
3383 (propagated-inputs
3384 `(("python-lockfile" ,python-lockfile)))
3385 (native-inputs
3386 `(("python-unittest2" ,python-unittest2)
3387 ("python-testtools" ,python-testtools)
3388 ("python-testscenarios" ,python-testscenarios)
3389 ("python-mock" ,python-mock)
3390 ("python-docutils" ,python-docutils)))
3391 (home-page "https://pagure.io/python-daemon/")
3392 (synopsis "Python library for making a Unix daemon process")
3393 (description "Python-daemon is a library that assists a Python program to
3394turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3395
3396This library provides a @code{DaemonContext} class that manages the following
3397important tasks for becoming a daemon process:
3398@enumerate
3399@item Detach the process into its own process group.
3400@item Set process environment appropriate for running inside a chroot.
3401@item Renounce suid and sgid privileges.
3402@item Close all open file descriptors.
3403@item Change the working directory, uid, gid, and umask.
3404@item Set appropriate signal handlers.
3405@item Open new file descriptors for stdin, stdout, and stderr.
3406@item Manage a specified PID lock file.
3407@item Register cleanup functions for at-exit processing.
3408@end enumerate")
3409 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3410 (license (list license:asl2.0 license:gpl3+))))
3411
3412(define-public python-anytree
3413 (package
3414 (name "python-anytree")
3415 (version "2.8.0")
3416 (source (origin
3417 (method url-fetch)
3418 (uri (pypi-uri "anytree" version))
3419 (sha256
3420 (base32
3421 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3422 (build-system python-build-system)
3423 (propagated-inputs
3424 `(("python-six" ,python-six)))
3425 (native-inputs
3426 `(;; For tests.
3427 ("graphviz" ,graphviz) ;for 'dot'
3428 ("python-nose" ,python-nose)))
3429 (home-page "https://github.com/c0fec0de/anytree")
3430 (synopsis "Lightweight tree data library")
3431 (description
3432 "@code{anytree} is a simple, lightweight, and extensible tree data
3433structure for Python.")
3434 (license license:asl2.0)))
3435
3436(define-public python-docutils
3437 (package
3438 (name "python-docutils")
3439 (version "0.16")
3440 (source
3441 (origin
3442 (method url-fetch)
3443 (uri (pypi-uri "docutils" version))
3444 (sha256
3445 (base32
3446 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3447 (build-system python-build-system)
3448 (arguments
3449 '(#:phases (modify-phases %standard-phases
3450 (replace 'check
3451 (lambda* (#:key tests? #:allow-other-keys)
3452 (if tests?
3453 (invoke "python" "test/alltests.py")
3454 (format #t "test suite not run~%"))
3455 #t)))))
3456 (home-page "http://docutils.sourceforge.net/")
3457 (synopsis "Python Documentation Utilities")
3458 (description
3459 "Docutils is a modular system for processing documentation into useful
3460formats, such as HTML, XML, and LaTeX. For input Docutils supports
3461reStructuredText.")
3462 ;; Most of the source code is public domain, but some source files are
3463 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3464 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3465
3466(define-public python2-docutils
3467 (package-with-python2 python-docutils))
3468
3469;; python2-sphinx fails its test suite with newer versions.
3470(define-public python2-docutils-0.14
3471 (package
3472 (inherit python2-docutils)
3473 (version "0.14")
3474 (source (origin
3475 (method url-fetch)
3476 (uri (pypi-uri "docutils" version))
3477 (sha256
3478 (base32
3479 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3480
3481(define-public python-restructuredtext-lint
3482 (package
3483 (name "python-restructuredtext-lint")
3484 (version "1.3.0")
3485 (source
3486 (origin
3487 (method url-fetch)
3488 (uri (pypi-uri "restructuredtext-lint" version))
3489 (sha256
3490 (base32
3491 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3492 (build-system python-build-system)
3493 (arguments
3494 `(#:phases
3495 (modify-phases %standard-phases
3496 (delete 'check)
3497 (add-after 'install 'check
3498 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3499 (when tests?
3500 (add-installed-pythonpath inputs outputs)
3501 (invoke "nosetests" "-v"))
3502 #t)))))
3503 (propagated-inputs
3504 `(("python-docutils" ,python-docutils)))
3505 (native-inputs
3506 `(("python-nose" ,python-nose)))
3507 (home-page "https://github.com/twolfson/restructuredtext-lint")
3508 (synopsis "reStructuredText linter")
3509 (description "This package provides a linter for the reStructuredText
3510format.")
3511 (license license:unlicense)))
3512
3513(define-public python-doc8
3514 (package
3515 (name "python-doc8")
3516 (version "0.8.0")
3517 (source
3518 (origin
3519 (method url-fetch)
3520 (uri (pypi-uri "doc8" version))
3521 (sha256
3522 (base32
3523 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3524 (build-system python-build-system)
3525 (arguments
3526 `(#:phases
3527 (modify-phases %standard-phases
3528 (delete 'check)
3529 (add-after 'install 'check
3530 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3531 (when tests?
3532 (add-installed-pythonpath inputs outputs)
3533 (invoke "pytest" "-v"))
3534 #t)))))
3535 (propagated-inputs
3536 `(("python-chardet" ,python-chardet)
3537 ("python-docutils" ,python-docutils)
3538 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3539 ("python-six" ,python-six)
3540 ("python-stevedore" ,python-stevedore)))
3541 (native-inputs
3542 `(("python-testtools" ,python-testtools)
3543 ("python-pytest" ,python-pytest)))
3544 (home-page "https://launchpad.net/doc8")
3545 (synopsis
3546 "Style checker for Sphinx (or other) RST documentation")
3547 (description
3548 "Doc8 is an opinionated style checker for reStructured Text and plain
3549text styles of documentation.")
3550 (license license:asl2.0)))
3551
3552(define-public python-pygments
3553 (package
3554 (name "python-pygments")
3555 (version "2.5.2")
3556 (source
3557 (origin
3558 (method url-fetch)
3559 (uri (pypi-uri "Pygments" version))
3560 (sha256
3561 (base32
3562 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
3563 (build-system python-build-system)
3564 (arguments
3565 ;; FIXME: Tests require sphinx, which depends on this.
3566 '(#:tests? #f))
3567 (home-page "https://pygments.org/")
3568 (synopsis "Syntax highlighting")
3569 (description
3570 "Pygments is a syntax highlighting package written in Python.")
3571 (license license:bsd-2)))
3572
3573(define-public python2-pygments
3574 (package-with-python2 python-pygments))
3575
3576(define-public python-bumpversion
3577 (package
3578 (name "python-bumpversion")
3579 (version "0.5.3")
3580 (source
3581 (origin
3582 (method url-fetch)
3583 (uri (pypi-uri "bumpversion" version))
3584 (sha256
3585 (base32
3586 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3587 (build-system python-build-system)
3588 (home-page "https://github.com/peritus/bumpversion")
3589 (synopsis "Tool to bump software version")
3590 (description "This tool provides a command-line interface (CLI) to bump a
3591software version simply.")
3592 (license license:expat)))
3593
3594(define-public python-deprecated
3595 (package
3596 (name "python-deprecated")
3597 (version "1.2.5")
3598 (source
3599 (origin
3600 (method git-fetch)
3601 (uri (git-reference
3602 (url "https://github.com/tantale/deprecated")
3603 (commit (string-append "v" version))))
3604 (file-name (git-file-name name version))
3605 (sha256
3606 (base32
3607 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3608 (build-system python-build-system)
3609 (arguments
3610 `(#:phases (modify-phases %standard-phases
3611 (replace 'check
3612 (lambda _
3613 (invoke "pytest"))))))
3614 (propagated-inputs
3615 `(("python-wrapt" ,python-wrapt)))
3616 (native-inputs
3617 `(("python-bumpversion" ,python-bumpversion)
3618 ("python-pytest" ,python-pytest)
3619 ("python-pytest-cov" ,python-pytest-cov)
3620 ("python-sphinx" ,python-sphinx)
3621 ("python-tox" ,python-tox)))
3622 (home-page "https://github.com/tantale/deprecated")
3623 (synopsis "Python decorator to deprecate classes, functions or methods")
3624 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3625to deprecate classes, functions or methods.")
3626 (license license:expat)))
3627
3628(define-public python-pygithub
3629 (package
3630 (name "python-pygithub")
3631 (version "1.43.8")
3632 (source
3633 ;; We fetch from the Git repo because there are no tests in the PyPI
3634 ;; archive.
3635 (origin
3636 (method git-fetch)
3637 (uri (git-reference
3638 (url "https://github.com/PyGithub/PyGithub")
3639 (commit (string-append "v" version))))
3640 (file-name (git-file-name name version))
3641 (sha256
3642 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3643 (build-system python-build-system)
3644 (arguments
3645 `(#:phases (modify-phases %standard-phases
3646 ;; Some tests rely on the network.
3647 (add-after 'unpack 'disable-failing-tests
3648 (lambda _
3649 (substitute* "tests/Issue142.py"
3650 (("testDecodeJson") "disabled_testDecodeJson"))
3651 #t))
3652 (add-before 'check 'prepare-for-tests
3653 (lambda _
3654 (for-each (lambda (f)
3655 (chmod f #o666))
3656 (find-files "./tests"))
3657 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3658 (setenv "PYTHONPATH"
3659 (string-append "./tests:" (getenv "PYTHONPATH")))
3660 #t)))))
3661 (propagated-inputs
3662 `(("python-deprecated" ,python-deprecated)
3663 ("python-pyjwt" ,python-pyjwt)
3664 ("python-requests" ,python-requests)))
3665 (native-inputs `(("python-httpretty" ,python-httpretty)))
3666 (home-page "https://pygithub.readthedocs.io/en/latest/")
3667 (synopsis "Python library for the GitHub API")
3668 (description "This library allows managing GitHub resources such as
3669repositories, user profiles, and organizations in your Python applications,
3670using version 3 of the GitHub application programming interface (API).")
3671 (license license:lgpl3+)))
3672
3673(define-public python-rellu
3674 (package
3675 (name "python-rellu")
3676 (version "0.7")
3677 (source
3678 (origin
3679 (method url-fetch)
3680 (uri (pypi-uri "rellu" version))
3681 (sha256
3682 (base32
3683 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3684 (build-system python-build-system)
3685 (propagated-inputs
3686 `(("python-invoke" ,python-invoke)
3687 ("python-pygithub" ,python-pygithub)))
3688 (home-page "https://github.com/robotframework/rellu")
3689 (synopsis "Utilities to create PyPI releases")
3690 (description "This collection of utilities contains tooling and templates
3691to assist in creating releases on GitHub and publishing them on PyPI. It is
3692designed to be used by Robot Framework and tools and libraries in its
3693ecosystem, but can naturally be used also by other projects.")
3694 (license license:asl2.0)))
3695
3696(define-public python-robotframework
3697 (package
3698 (name "python-robotframework")
3699 (version "3.2.2")
3700 ;; There are no tests in the PyPI archive.
3701 (source
3702 (origin
3703 (method git-fetch)
3704 (uri (git-reference
3705 (url "https://github.com/robotframework/robotframework")
3706 (commit (string-append "v" version))))
3707 (file-name (git-file-name name version))
3708 (sha256
3709 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3710 (patches (search-patches
3711 "python-robotframework-source-date-epoch.patch"))))
3712 (build-system python-build-system)
3713 (arguments
3714 `(#:phases (modify-phases %standard-phases
3715 (add-before 'build 'build-and-install-doc
3716 (lambda* (#:key outputs #:allow-other-keys)
3717 (let* ((doc-output (assoc-ref outputs "doc"))
3718 (doc (string-append doc-output "/share/"
3719 ,name "-" ,version "/")))
3720 (invoke "invoke" "library-docs" "all")
3721 (mkdir-p doc)
3722 (copy-recursively "doc/libraries"
3723 (string-append doc "/libraries"))
3724 #t)))
3725 (replace 'check
3726 (lambda* (#:key inputs #:allow-other-keys)
3727 ;; Some tests require timezone data. Otherwise, they
3728 ;; look up /etc/localtime, which doesn't exist, and fail
3729 ;; with:
3730 ;;
3731 ;; OverflowError: mktime argument out of range
3732 (setenv "TZDIR"
3733 (string-append (assoc-ref inputs "tzdata")
3734 "/share/zoneinfo"))
3735 (setenv "TZ" "Europe/Paris")
3736
3737 (invoke "python" "utest/run.py"))))))
3738 (native-inputs
3739 `(("python-invoke" ,python-invoke)
3740 ("python-rellu" ,python-rellu)
3741 ("python:tk" ,python "tk") ;used when building the HTML doc
3742 ("tzdata" ,tzdata-for-tests)))
3743 (outputs '("out" "doc"))
3744 (home-page "https://robotframework.org")
3745 (synopsis "Generic automation framework")
3746 (description "Robot Framework is a generic automation framework for
3747acceptance testing, acceptance test driven development (ATDD), and robotic
3748process automation (RPA).")
3749 (license license:asl2.0)))
3750
3751(define-public python-robotframework-lint
3752 ;; There is no properly tagged release; the commit below seems to correspond
3753 ;; to the 0.9 stable release available from PyPI. The tests are not
3754 ;; included in the PyPI archive, so we fetch the sources from the upstream
3755 ;; Git repo.
3756 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3757 (revision "0"))
3758 (package
3759 (name "python-robotframework-lint")
3760 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3761 revision commit))
3762 (source
3763 (origin
3764 (method git-fetch)
3765 (uri (git-reference
3766 (url "https://github.com/boakley/robotframework-lint")
3767 (commit commit)))
3768 (file-name (git-file-name name version))
3769 (sha256
3770 (base32
3771 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3772 (build-system python-build-system)
3773 (arguments
3774 `(#:phases
3775 (modify-phases %standard-phases
3776 (replace 'check
3777 (lambda _
3778 (invoke "python" "-m" "robot" "-A"
3779 "tests/conf/default.args" "tests"))))))
3780 (propagated-inputs
3781 `(("python-robotframework" ,python-robotframework)))
3782 (home-page "https://github.com/boakley/robotframework-lint/")
3783 (synopsis "Static analysis tool (linter) for Robot Framework")
3784 (description "This package provides the @code{rflint} command-line
3785utility, a static analysis tool (linter) for Robot Framework source files.")
3786 (license license:asl2.0))))
3787
3788(define-public python-robotframework-sshlibrary
3789 (package
3790 (name "python-robotframework-sshlibrary")
3791 (version "3.3.0")
3792 ;; There are no tests in the PyPI archive.
3793 (source
3794 (origin
3795 (method git-fetch)
3796 (uri (git-reference
3797 (url "https://github.com/robotframework/SSHLibrary")
3798 (commit (string-append "v" version))))
3799 (file-name (git-file-name name version))
3800 (sha256
3801 (base32
3802 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3803 (build-system python-build-system)
3804 (arguments
3805 `(#:phases
3806 (modify-phases %standard-phases
3807 (add-before 'build 'build-and-install-doc
3808 (lambda* (#:key outputs #:allow-other-keys)
3809 (let* ((doc-output (assoc-ref outputs "doc"))
3810 (doc (string-append doc-output "/share/"
3811 ,name "-" ,version "/")))
3812 (invoke "chmod" "-R" "+w" "docs")
3813 (invoke "invoke" "kw-docs" "project-docs")
3814 (mkdir-p doc)
3815 (for-each delete-file (find-files "docs" "\\.rst"))
3816 (copy-recursively "docs" doc)
3817 #t)))
3818 (replace 'check
3819 (lambda _
3820 ;; Some tests require an SSH server; we remove them.
3821 (delete-file "utest/test_client_api.py")
3822 (delete-file "utest/test_scp.py")
3823 (invoke "python" "utest/run.py"))))))
3824 (propagated-inputs
3825 `(("python-robotframework" ,python-robotframework)
3826 ("python-paramiko" ,python-paramiko)
3827 ("python-scp" ,python-scp)))
3828 (native-inputs
3829 `(("openssh" ,openssh)
3830 ("which" ,which)
3831 ;; To generate the documentation
3832 ("python-docutils" ,python-docutils)
3833 ("python-invoke" ,python-invoke)
3834 ("python-pygments" ,python-pygments)
3835 ("python-rellu" ,python-rellu)))
3836 (outputs '("out" "doc"))
3837 (home-page "https://github.com/robotframework/SSHLibrary")
3838 (synopsis "Robot Framework library for SSH and SFTP")
3839 (description "SSHLibrary is a Robot Framework library providing support
3840for SSH and SFTP. It has the following main usages:
3841@itemize @bullet
3842@item Executing commands on the remote machine, either blocking or non-blocking.
3843@item Writing and reading in an interactive shell.
3844@item Transferring files and directories over SFTP.
3845@item Ensuring that files and directories exist on the remote machine.
3846@end itemize")
3847 (license license:asl2.0)))
3848
3849(define-public python-rstr
3850 (package
3851 (name "python-rstr")
3852 (version "2.2.6")
3853 (source
3854 (origin
3855 (method url-fetch)
3856 (uri (pypi-uri "rstr" version))
3857 (sha256
3858 (base32
3859 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3860 (build-system python-build-system)
3861 (home-page
3862 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3863 (synopsis "Generate random strings in Python")
3864 (description "This package provides a python module for generating
3865random strings of various types. It could be useful for fuzz testing,
3866generating dummy data, or other applications. It has no dependencies
3867outside the standard library.")
3868 (license license:bsd-3)))
3869
3870(define-public python-scp
3871 (package
3872 (name "python-scp")
3873 (version "0.13.2")
3874 (source
3875 (origin
3876 (method url-fetch)
3877 (uri (pypi-uri "scp" version))
3878 (sha256
3879 (base32
3880 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3881 (build-system python-build-system)
3882 (arguments
3883 '(#:tests? #f)) ;tests require an SSH server
3884 (propagated-inputs
3885 `(("python-paramiko" ,python-paramiko)))
3886 (home-page "https://github.com/jbardin/scp.py")
3887 (synopsis "SCP protocol module for Python and Paramiko")
3888 (description "The scp module extends the Paramiko library to send and
3889receive files via the SCP1 protocol, as implemented by the OpenSSH
3890@command{scp} program.")
3891 (license license:gpl2+)))
3892
3893(define-public python-rst.linker
3894 (package
3895 (name "python-rst.linker")
3896 (version "1.11")
3897 (source
3898 (origin
3899 (method url-fetch)
3900 (uri (pypi-uri "rst.linker" version))
3901 (sha256
3902 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3903 (build-system python-build-system)
3904 (propagated-inputs
3905 `(("python-dateutil" ,python-dateutil)
3906 ("python-six" ,python-six)))
3907 (native-inputs
3908 `(("python-setuptools-scm" ,python-setuptools-scm)))
3909 ;; Test would require path.py, which would introduce a cyclic dependence.
3910 (arguments `(#:tests? #f))
3911 ;; Note: As of version 1.7 the documentation is not worth building.
3912 (home-page "https://github.com/jaraco/rst.linker")
3913 (synopsis "Sphinx plugin to add links and timestamps")
3914 (description "rst.linker automatically replaces text by a
3915reStructuredText external reference or timestamps. It's primary purpose is to
3916augment the changelog, but it can be used for other documents, too.")
3917 (license license:expat)))
3918
3919(define-public python2-rst.linker
3920 (package-with-python2 python-rst.linker))
3921
3922(define-public python-feedgenerator
3923 (package
3924 (name "python-feedgenerator")
3925 (version "1.9")
3926 (source
3927 (origin
3928 (method url-fetch)
3929 (uri (pypi-uri "feedgenerator" version))
3930 (sha256
3931 (base32
3932 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3933 (modules '((guix build utils)))
3934 (snippet
3935 '(begin
3936 ;; Remove pre-compiled .pyc files from source.
3937 (for-each delete-file-recursively
3938 (find-files "." "__pycache__" #:directories? #t))
3939 (for-each delete-file (find-files "." "\\.pyc$"))
3940 #t))))
3941 (build-system python-build-system)
3942 (propagated-inputs
3943 `(("python-pytz" ,python-pytz)
3944 ("python-six" ,python-six)))
3945 (home-page "https://github.com/getpelican/feedgenerator")
3946 (synopsis
3947 "Standalone version of Django's Atom/RSS feed generator")
3948 (description
3949 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3950which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3951 (license license:bsd-3)))
3952
3953(define-public python2-feedgenerator
3954 (package-with-python2 python-feedgenerator))
3955
3956(define-public python-toml
3957 (package
3958 (name "python-toml")
3959 (version "0.10.1")
3960 (source
3961 (origin
3962 (method url-fetch)
3963 (uri (pypi-uri "toml" version))
3964 (sha256
3965 (base32
3966 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3967 (build-system python-build-system)
3968 (arguments
3969 `(#:tests? #f)) ;no tests suite in release
3970 (home-page "https://github.com/uiri/toml")
3971 (synopsis "Library for TOML")
3972 (description
3973 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3974Language (TOML) configuration files.")
3975 (license license:expat)))
3976
3977(define-public python-jsonrpc-server
3978 (package
3979 (name "python-jsonrpc-server")
3980 (version "0.3.4")
3981 (source
3982 (origin
3983 (method url-fetch)
3984 (uri (pypi-uri "python-jsonrpc-server" version))
3985 (sha256
3986 (base32
3987 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
3988 (build-system python-build-system)
3989 (propagated-inputs
3990 `(("python-mock" ,python-mock)
3991 ("python-pytest" ,python-pytest)
3992 ("python-ujson" ,python-ujson-1)))
3993 (home-page
3994 "https://github.com/palantir/python-jsonrpc-server")
3995 (synopsis "JSON RPC 2.0 server library")
3996 (description
3997 "This package provides a JSON RPC 2.0 server library for Python.")
3998 (license license:expat)))
3999
4000(define-public python-pydantic
4001 (package
4002 (name "python-pydantic")
4003 (version "1.6.1")
4004 (source
4005 (origin
4006 (method git-fetch)
4007 (uri (git-reference
4008 (url "https://github.com/samuelcolvin/pydantic")
4009 (commit (string-append "v" version))))
4010 (file-name (git-file-name name version))
4011 (sha256
4012 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4013 (build-system python-build-system)
4014 (arguments
4015 '(#:phases
4016 (modify-phases %standard-phases
4017 ;; Reported upstream:
4018 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4019 ;; Disable the faulty test as the fix is unclear.
4020 (add-before 'check 'disable-test
4021 (lambda _
4022 (substitute* "tests/test_validators.py"
4023 (("test_assert_raises_validation_error")
4024 "_test_assert_raises_validation_error"))
4025 #t))
4026 (replace 'check
4027 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4028 (native-inputs
4029 `(("python-pytest" ,python-pytest)))
4030 (home-page "https://github.com/samuelcolvin/pydantic")
4031 (synopsis "Python data validation and settings management")
4032 (description
4033 "Pydantic enforces type hints at runtime, and provides user friendly
4034errors when data is invalid.")
4035 (license license:expat)))
4036
4037(define-public python-pydocstyle
4038 (package
4039 (name "python-pydocstyle")
4040 (version "3.0.0")
4041 (source
4042 (origin
4043 (method url-fetch)
4044 (uri (pypi-uri "pydocstyle" version))
4045 (sha256
4046 (base32
4047 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4048 (build-system python-build-system)
4049 (propagated-inputs
4050 `(("python-six" ,python-six)
4051 ("python-snowballstemmer" ,python-snowballstemmer)))
4052 (home-page
4053 "https://github.com/PyCQA/pydocstyle/")
4054 (synopsis "Python docstring style checker")
4055 (description
4056 "This package provides a style checker for the Python Language
4057Server (PLS).")
4058 (license license:expat)))
4059
4060(define-public python-language-server
4061 (package
4062 (name "python-language-server")
4063 (version "0.34.1")
4064 (source
4065 (origin
4066 (method url-fetch)
4067 (uri (pypi-uri "python-language-server" version))
4068 (sha256
4069 (base32
4070 "0gfjjlj7yg2nf8wkbrshwaljkwlqja4n7s1x949f495anmkg8vxr"))))
4071 (build-system python-build-system)
4072 (propagated-inputs
4073 `(("python-pluggy" ,python-pluggy)
4074 ("python-jsonrpc-server" ,python-jsonrpc-server)
4075 ("python-jedi" ,python-jedi)
4076 ("python-yapf" ,python-yapf)
4077 ("python-pyflakes" ,python-pyflakes)
4078 ("python-pydocstyle" ,python-pydocstyle)
4079 ("python-pycodestyle" ,python-pycodestyle)
4080 ("python-mccabe" ,python-mccabe)
4081 ("python-rope" ,python-rope)
4082 ("python-autopep8" ,python-autopep8)
4083 ("python-flake8" ,python-flake8)
4084 ("python-pylint" ,python-pylint)))
4085 (home-page "https://github.com/palantir/python-language-server")
4086 (synopsis "Python implementation of the Language Server Protocol")
4087 (description
4088 "The Python Language Server (pyls) is an implementation of the Python 3
4089language specification for the Language Server Protocol (LSP). This tool is
4090used in text editing environments to provide a complete and integrated
4091feature-set for programming Python effectively.")
4092 (license license:expat)))
4093
4094(define-public python-pathspec
4095 (package
4096 (name "python-pathspec")
4097 (version "0.7.0")
4098 (source
4099 (origin
4100 (method url-fetch)
4101 (uri (pypi-uri "pathspec" version))
4102 (sha256
4103 (base32
4104 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4105 (build-system python-build-system)
4106 (home-page "https://github.com/cpburnz/python-path-specification")
4107 (synopsis "Utility library for gitignore style pattern matching of file paths")
4108 (description
4109 "This package provides a utility library for gitignore style pattern
4110matching of file paths.")
4111 (license license:mpl2.0)))
4112
4113(define-public python-black
4114 (package
4115 (name "python-black")
4116 (version "20.8b1")
4117 (source
4118 (origin
4119 (method url-fetch)
4120 (uri (pypi-uri "black" version))
4121 (sha256
4122 (base32
4123 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4124 (build-system python-build-system)
4125 (arguments
4126 `(#:phases
4127 (modify-phases %standard-phases
4128 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4129 (lambda _
4130 (let ((python3 (which "python3")))
4131 (substitute* '("tests/data/fmtonoff.py"
4132 "tests/data/string_prefixes.py"
4133 "tests/data/function.py"
4134 "tests/data/python37.py")
4135 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4136 (string-append "#!" python3 (if (string? minor-version)
4137 minor-version
4138 "")))))
4139 #t))
4140 (add-after 'unpack 'disable-broken-tests
4141 (lambda* (#:key outputs inputs #:allow-other-keys)
4142 ;; Make installed package available for running the tests
4143 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4144 ":" (getenv "PATH")))
4145
4146 ;; These tests are supposed to be skipped when the blackd
4147 ;; dependencies are missing, but this doesn't quite work.
4148 (substitute* "tests/test_black.py"
4149 (("( *)class BlackDTestCase.*" match indent)
4150 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4151 indent "class BlackDTestCase(unittest.TestCase):\n"))
4152 (("web.Application") "False")
4153 (("@unittest_run_loop") ""))
4154
4155 ;; Patching the above file breaks the self test
4156 (substitute* "tests/test_black.py"
4157 (("( *)def test_self" match indent)
4158 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4159
4160 (substitute* "tests/test_black.py"
4161 (("( *)def test_python38" match indent)
4162 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4163 #t)))))
4164 (propagated-inputs
4165 `(("python-click" ,python-click)
4166 ("python-attrs" ,python-attrs)
4167 ("python-appdirs" ,python-appdirs)
4168 ("python-pathspec" ,python-pathspec)
4169 ("python-mypy-extensions" ,python-mypy-extensions)
4170 ("python-regex" ,python-regex)
4171 ("python-toml" ,python-toml)
4172 ("python-typed-ast" ,python-typed-ast)
4173 ("python-typing-extensions" ,python-typing-extensions)))
4174 (native-inputs
4175 `(("python-setuptools-scm" ,python-setuptools-scm)))
4176 (home-page "https://github.com/ambv/black")
4177 (synopsis "The uncompromising code formatter")
4178 (description "Black is the uncompromising Python code formatter.")
4179 (license license:expat)))
4180
4181(define-public python-black-macchiato
4182 (package
4183 (name "python-black-macchiato")
4184 (version "1.3.0")
4185 (source
4186 (origin
4187 (method url-fetch)
4188 (uri (pypi-uri "black-macchiato" version))
4189 (sha256
4190 (base32
4191 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4192 (build-system python-build-system)
4193 (propagated-inputs
4194 `(("python-black" ,python-black)))
4195 (home-page "https://github.com/wbolster/black-macchiato")
4196 (synopsis "Partial @code{python-black} formatting")
4197 (description
4198 "This package is built on top the @{python-black} code formatter to
4199enable formatting of partial files.")
4200 (license license:bsd-3)))
4201
4202(define-public python-blinker
4203 (package
4204 (name "python-blinker")
4205 (version "1.4")
4206 (source
4207 (origin
4208 (method url-fetch)
4209 (uri (pypi-uri "blinker" version))
4210 (sha256
4211 (base32
4212 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4213 (build-system python-build-system)
4214 (home-page "https://pythonhosted.org/blinker/")
4215 (synopsis "Fast, simple object-to-object and broadcast signaling")
4216 (description
4217 "Blinker provides a fast dispatching system that allows any number of
4218interested parties to subscribe to events, or \"signals\".")
4219 (license license:expat)))
4220
4221(define-public python2-blinker
4222 (package-with-python2 python-blinker))
4223
4224(define-public pelican
4225 (package
4226 (name "pelican")
4227 (version "4.2.0")
4228 (source
4229 (origin
4230 (method url-fetch)
4231 (uri (pypi-uri "pelican" version))
4232 (sha256
4233 (base32
4234 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4235 (build-system python-build-system)
4236 (propagated-inputs
4237 `(("python-blinker" ,python-blinker)
4238 ("python-dateutil" ,python-dateutil)
4239 ("python-docutils" ,python-docutils)
4240 ("python-feedgenerator" ,python-feedgenerator)
4241 ("python-jinja2" ,python-jinja2)
4242 ("python-markdown" ,python-markdown)
4243 ("python-pygments" ,python-pygments)
4244 ("python-pytz" ,python-pytz)
4245 ("python-six" ,python-six)
4246 ("python-unidecode" ,python-unidecode)))
4247 (home-page "https://getpelican.com/")
4248 (arguments
4249 `(;; XXX Requires a lot more packages to do unit tests :P
4250 #:tests? #f))
4251 (synopsis "Python-based static site publishing system")
4252 (description
4253 "Pelican is a tool to generate a static blog from reStructuredText,
4254Markdown input files, and more. Pelican uses Jinja2 for templating
4255and is very extensible.")
4256 (license license:agpl3+)))
4257
4258(define-public mallard-ducktype
4259 (package
4260 (name "mallard-ducktype")
4261 (version "1.0.2")
4262 (source
4263 (origin
4264 (method git-fetch)
4265 ;; git-reference because tests are not included in pypi source tarball
4266 ;; https://issues.guix.gnu.org/issue/36755#2
4267 (uri (git-reference
4268 (url "https://github.com/projectmallard/mallard-ducktype")
4269 (commit version)))
4270 (file-name (git-file-name name version))
4271 (sha256
4272 (base32
4273 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4274 (build-system python-build-system)
4275 (arguments
4276 '(#:phases
4277 (modify-phases %standard-phases
4278 (replace 'check
4279 (lambda _
4280 (with-directory-excursion "tests"
4281 (invoke "sh" "runtests")))))))
4282 (home-page "http://projectmallard.org")
4283 (synopsis "Convert Ducktype to Mallard documentation markup")
4284 (description
4285 "Ducktype is a lightweight syntax that can represent all the semantics
4286of the Mallard XML documentation system. Ducktype files can be converted to
4287Mallard using the @command{ducktype} tool. The yelp-tools package
4288provides additional functionality on the produced Mallard documents.")
4289 (license license:expat)))
4290
4291(define-public python-cython
4292 (package
4293 (name "python-cython")
4294 (version "0.29.17")
4295 (source
4296 (origin
4297 (method url-fetch)
4298 (uri (pypi-uri "Cython" version))
4299 (sha256
4300 (base32
4301 "1wnaz40hdw4mg5acz5gqb6bhjhn4cvfxg0xdzfy7aa6qn665hqb3"))))
4302 (build-system python-build-system)
4303 ;; we need the full python package and not just the python-wrapper
4304 ;; because we need libpython3.3m.so
4305 (inputs
4306 `(("python" ,python)))
4307 (arguments
4308 `(#:phases
4309 (modify-phases %standard-phases
4310 (add-before 'check 'set-HOME
4311 ;; some tests require access to "$HOME/.cython"
4312 (lambda _ (setenv "HOME" "/tmp") #t))
4313 (replace 'check
4314 (lambda _
4315 ;; Disable compiler optimizations to greatly reduce the running
4316 ;; time of the test suite.
4317 (setenv "CFLAGS" "-O0")
4318
4319 (invoke "python" "runtests.py" "-vv"
4320 "-j" (number->string (parallel-job-count))
4321 ;; XXX: On 32-bit architectures, running the parallel tests
4322 ;; fails on many-core systems, see
4323 ;; <https://github.com/cython/cython/issues/2807>.
4324 ,@(if (not (target-64bit?))
4325 '("-x" "run.parallel")
4326 '())))))))
4327 (home-page "https://cython.org/")
4328 (synopsis "C extensions for Python")
4329 (description "Cython is an optimising static compiler for both the Python
4330programming language and the extended Cython programming language. It makes
4331writing C extensions for Python as easy as Python itself.")
4332 (license license:asl2.0)
4333 (properties `((python2-variant . ,(delay python2-cython))))))
4334
4335(define-public python2-cython
4336 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4337 (package
4338 (inherit base)
4339 (name "python2-cython")
4340 (inputs
4341 `(("python-2" ,python-2))) ;this is not automatically changed
4342 (arguments
4343 (substitute-keyword-arguments (package-arguments base)
4344 ((#:phases phases)
4345 `(modify-phases ,phases
4346 (add-before 'check 'adjust-test_embed
4347 (lambda _
4348 (substitute* "runtests.py"
4349 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4350 ;; so it can give the right -L flag to GCC when embedding static
4351 ;; builds of Python. It is unaware that the Python "config"
4352 ;; directory (where the static library lives) was renamed in
4353 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4354 ;; which works fine, because that is where the shared library is.
4355 ;;
4356 ;; It also appears to be unaware that the Makefile in Demos/embed
4357 ;; already unconditionally pass the static library location to GCC,
4358 ;; after checking sysconfig.get_config_var('LIBPL).
4359 ;;
4360 ;; The effect is that the linker is unable to resolve libexpat
4361 ;; symbols when building for Python 2, because neither the Python 2
4362 ;; shared library nor Expat is available. To fix it, we can either
4363 ;; add Expat as an input and make it visible to the linker, or just
4364 ;; prevent it from overriding the Python shared library location.
4365 ;; The end result is identical, so we take the easy route.
4366 ((" or libname not in os\\.listdir\\(libdir\\)")
4367 ""))
4368 #t)))))))))
4369
4370;; The RPython toolchain currently does not support Python 3.
4371(define-public python2-rpython
4372 (package
4373 (name "python2-rpython")
4374 (version "0.2.1")
4375 (source
4376 (origin
4377 (method url-fetch)
4378 (uri (pypi-uri "rpython" version))
4379 (sha256
4380 (base32
4381 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4382 (build-system python-build-system)
4383 (arguments `(#:python ,python-2))
4384 (native-inputs
4385 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4386 (home-page "https://rpython.readthedocs.org")
4387 (synopsis "Framework for implementing interpreters and virtual machines")
4388 (description "RPython is a translation and support framework for
4389producing implementations of dynamic languages, emphasizing a clean separation
4390between language specification and implementation aspects.")
4391 (license license:expat)))
4392
4393;; NOTE: when upgrading numpy please make sure that python-pandas and
4394;; python-scipy still build, as these three packages are often used together.
4395(define-public python-numpy
4396 (package
4397 (name "python-numpy")
4398 (version "1.17.3")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 (uri (string-append
4403 "https://github.com/numpy/numpy/releases/download/v"
4404 version "/numpy-" version ".tar.gz"))
4405 (sha256
4406 (base32
4407 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4408 (build-system python-build-system)
4409 (inputs
4410 `(("openblas" ,openblas)
4411 ("lapack" ,lapack)))
4412 (native-inputs
4413 `(("python-cython" ,python-cython)
4414 ("python-pytest" ,python-pytest)
4415 ("gfortran" ,gfortran)))
4416 (arguments
4417 `(#:phases
4418 (modify-phases %standard-phases
4419 (add-before 'build 'configure-blas-lapack
4420 (lambda* (#:key inputs #:allow-other-keys)
4421 (call-with-output-file "site.cfg"
4422 (lambda (port)
4423 (format port
4424 "[openblas]
4425libraries = openblas
4426library_dirs = ~a/lib
4427include_dirs = ~a/include
4428
4429# backslash-n to make emacs happy
4430\n[lapack]
4431lapack_libs = lapack
4432library_dirs = ~a/lib
4433include_dirs = ~a/include
4434"
4435 (assoc-ref inputs "openblas")
4436 (assoc-ref inputs "openblas")
4437 (assoc-ref inputs "lapack")
4438 (assoc-ref inputs "lapack"))))
4439 #t))
4440 (add-before 'build 'fix-executable-paths
4441 (lambda* (#:key inputs #:allow-other-keys)
4442 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4443 ;; instead of /bin/sh.
4444 (substitute* "numpy/distutils/exec_command.py"
4445 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4446 (string-append match-start (assoc-ref inputs "bash") match-end)))
4447 ;; Use "gcc" executable, not "cc".
4448 (substitute* "numpy/distutils/system_info.py"
4449 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4450 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4451 #t))
4452 ;; Tests can only be run after the library has been installed and not
4453 ;; within the source directory.
4454 (delete 'check)
4455 (add-after 'install 'check
4456 (lambda* (#:key outputs inputs #:allow-other-keys)
4457 ;; Make installed package available for running the tests
4458 (add-installed-pythonpath inputs outputs)
4459 ;; Make sure "f2py" etc is found.
4460 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4461 ":" (getenv "PATH")))
4462 (with-directory-excursion "/tmp"
4463 (invoke "python" "-c"
4464 "import numpy; numpy.test(verbose=2)")))))))
4465 (home-page "https://numpy.org")
4466 (synopsis "Fundamental package for scientific computing with Python")
4467 (description "NumPy is the fundamental package for scientific computing
4468with Python. It contains among other things: a powerful N-dimensional array
4469object, sophisticated (broadcasting) functions, tools for integrating C/C++
4470and Fortran code, useful linear algebra, Fourier transform, and random number
4471capabilities.")
4472 (properties `((python2-variant . ,(delay python2-numpy))))
4473 (license license:bsd-3)))
4474
4475;; Numpy 1.16.x are the last versions that support Python 2.
4476(define-public python2-numpy
4477 (let ((numpy (package-with-python2
4478 (strip-python2-variant python-numpy))))
4479 (package/inherit
4480 numpy
4481 (version "1.16.5")
4482 (source (origin
4483 (method url-fetch)
4484 (uri (string-append
4485 "https://github.com/numpy/numpy/releases/download/v"
4486 version "/numpy-" version ".tar.gz"))
4487 (sha256
4488 (base32
4489 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4490
4491;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4492;; interest only for legacy code going back to NumPy's predecessor
4493;; Numeric.
4494(define-public python2-numpy-1.8
4495 (package (inherit python2-numpy)
4496 (version "1.8.2")
4497 (source
4498 (origin
4499 (method git-fetch)
4500 (uri (git-reference
4501 (url "https://github.com/numpy/numpy")
4502 (commit (string-append "v" version))))
4503 (file-name (git-file-name "numpy" version))
4504 (sha256
4505 (base32
4506 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4507 (arguments
4508 (substitute-keyword-arguments (package-arguments python2-numpy)
4509 ((#:phases phases)
4510 `(modify-phases ,phases
4511 (replace 'configure-blas-lapack
4512 (lambda* (#:key inputs #:allow-other-keys)
4513 (call-with-output-file "site.cfg"
4514 (lambda (port)
4515 (format port
4516 "[openblas]
4517libraries = openblas,lapack
4518library_dirs = ~a/lib:~a/lib
4519include_dirs = ~a/include:~a/include
4520"
4521 (assoc-ref inputs "openblas")
4522 (assoc-ref inputs "lapack")
4523 (assoc-ref inputs "openblas")
4524 (assoc-ref inputs "lapack"))))
4525 #t))))))
4526 (native-inputs
4527 `(("python2-nose" ,python2-nose)))
4528 (description "NumPy is the fundamental package for scientific computing
4529with Python. It contains among other things: a powerful N-dimensional array
4530object, sophisticated (broadcasting) functions, tools for integrating C/C++
4531and Fortran code, useful linear algebra, Fourier transform, and random number
4532capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4533that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4534Numeric.")
4535 (license license:bsd-3)))
4536
4537(define-public python-munch
4538 (package
4539 (name "python-munch")
4540 (version "2.0.4")
4541 (source
4542 (origin
4543 (method url-fetch)
4544 (uri (pypi-uri "munch" version))
4545 (sha256
4546 (base32
4547 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4548 (build-system python-build-system)
4549 (home-page "https://github.com/Infinidat/munch")
4550 (synopsis "Dot-accessible dictionary")
4551 (description "Munch is a dot-accessible dictionary similar to JavaScript
4552objects.")
4553 (license license:expat)))
4554
4555(define-public python2-munch
4556 (package-with-python2 python-munch))
4557
4558(define-public python-colormath
4559 (package
4560 (name "python-colormath")
4561 (version "3.0.0")
4562 (source
4563 (origin
4564 (method url-fetch)
4565 (uri (pypi-uri "colormath" version))
4566 (sha256
4567 (base32
4568 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4569 (build-system python-build-system)
4570 (propagated-inputs
4571 `(("python-networkx" ,python-networkx)
4572 ("python-numpy" ,python-numpy)))
4573 (home-page "https://github.com/gtaylor/python-colormath")
4574 (synopsis "Color math and conversion library")
4575 (description
4576 "This is a Python library for color math and conversions.")
4577 (license license:bsd-3)))
4578
4579(define-public python2-colormath
4580 (package-with-python2 python-colormath))
4581
4582(define-public python-spectra
4583 (package
4584 (name "python-spectra")
4585 (version "0.0.11")
4586 (source
4587 (origin
4588 (method url-fetch)
4589 (uri (pypi-uri "spectra" version))
4590 (sha256
4591 (base32
4592 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4593 (build-system python-build-system)
4594 (arguments
4595 `(#:phases
4596 (modify-phases %standard-phases
4597 (replace 'check
4598 (lambda _ (invoke "nosetests" "-v"))))))
4599 (propagated-inputs
4600 `(("python-colormath" ,python-colormath)))
4601 (native-inputs
4602 `(("python-nose" ,python-nose)))
4603 (home-page "https://github.com/jsvine/spectra")
4604 (synopsis "Color scales and color conversion")
4605 (description
4606 "This package provides a Python library intended to make color math,
4607color scales, and color space conversion easy. It has support for:
4608
4609@enumerate
4610@item Color scales
4611@item Color ranges
4612@item Color blending
4613@item Brightening/darkening colors
4614@item Saturating/desaturating colors
4615@item Conversion to/from multiple color spaces.
4616@end enumerate\n")
4617 (license license:expat)))
4618
4619(define-public python2-spectra
4620 (package-with-python2 python-spectra))
4621
4622(define-public python-numpy-documentation
4623 (package
4624 (name "python-numpy-documentation")
4625 (version (package-version python-numpy))
4626 (source (package-source python-numpy))
4627 (build-system python-build-system)
4628 (native-inputs
4629 `(("python-matplotlib" ,python-matplotlib)
4630 ("python-numpy" ,python-numpy)
4631 ("pkg-config" ,pkg-config)
4632 ("python-sphinx" ,python-sphinx)
4633 ("python-numpydoc" ,python-numpydoc)
4634 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4635 texlive-fonts-ec
4636 texlive-generic-ifxetex
4637 texlive-generic-pdftex
4638 texlive-amsfonts
4639 texlive-latex-capt-of
4640 texlive-latex-cmap
4641 texlive-latex-environ
4642 texlive-latex-eqparbox
4643 texlive-latex-etoolbox
4644 texlive-latex-expdlist
4645 texlive-latex-fancyhdr
4646 texlive-latex-fancyvrb
4647 texlive-latex-fncychap
4648 texlive-latex-float
4649 texlive-latex-framed
4650 texlive-latex-geometry
4651 texlive-latex-graphics
4652 texlive-latex-hyperref
4653 texlive-latex-mdwtools
4654 texlive-latex-multirow
4655 texlive-latex-needspace
4656 texlive-latex-oberdiek
4657 texlive-latex-parskip
4658 texlive-latex-preview
4659 texlive-latex-tabulary
4660 texlive-latex-threeparttable
4661 texlive-latex-titlesec
4662 texlive-latex-trimspaces
4663 texlive-latex-ucs
4664 texlive-latex-upquote
4665 texlive-latex-url
4666 texlive-latex-varwidth
4667 texlive-latex-wrapfig)))
4668 ("texinfo" ,texinfo)
4669 ("perl" ,perl)
4670 ("scipy-sphinx-theme"
4671 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4672 (method git-fetch)
4673 (uri (git-reference
4674 (url "https://github.com/scipy/scipy-sphinx-theme")
4675 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4676 (sha256
4677 (base32
4678 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4679 ,@(package-native-inputs python-numpy)))
4680 (arguments
4681 `(#:tests? #f ; we're only generating the documentation
4682 #:phases
4683 (modify-phases %standard-phases
4684 (delete 'build)
4685 (replace 'install
4686 (lambda* (#:key inputs outputs #:allow-other-keys)
4687 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4688 (doc (string-append
4689 data "/doc/" ,name "-"
4690 ,(package-version python-numpy)))
4691 (info-reader (string-append data "/info"))
4692 (html (string-append doc "/html"))
4693 (scipy-sphinx-theme "scipy-sphinx-theme")
4694 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4695 (pyver ,(string-append "PYVER=")))
4696
4697 ;; FIXME: this is needed to for texlive-union to generate
4698 ;; fonts, which are not found.
4699 (setenv "HOME" "/tmp")
4700
4701 (with-directory-excursion "doc"
4702 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4703 (mkdir-p html)
4704 (invoke "make" "html" pyver)
4705 (invoke "make" "latex" "PAPER=a4" pyver)
4706 (invoke "make" "-C" "build/latex"
4707 "all-pdf" "PAPER=a4" pyver)
4708 ;; FIXME: Generation of the info file fails.
4709 ;; (invoke "make" "info" pyver)
4710 ;; (mkdir-p info)
4711 ;; (copy-file "build/texinfo/numpy.info"
4712 ;; (string-append info "/numpy.info"))
4713 (for-each (lambda (file)
4714 (copy-file (string-append "build/latex" file)
4715 (string-append doc file)))
4716 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4717 (with-directory-excursion "build/html"
4718 (for-each (lambda (file)
4719 (let* ((dir (dirname file))
4720 (tgt-dir (string-append html "/" dir)))
4721 (unless (equal? "." dir)
4722 (mkdir-p tgt-dir))
4723 (install-file file html)))
4724 (find-files "." ".*")))))
4725 #t)))))
4726 (home-page (package-home-page python-numpy))
4727 (synopsis "Documentation for the python-numpy package")
4728 (description (package-description python-numpy))
4729 (license (package-license python-numpy))))
4730
4731(define-public python2-numpy-documentation
4732 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4733 (package
4734 (inherit numpy-documentation)
4735 (native-inputs `(("python2-functools32" ,python2-functools32)
4736 ,@(package-native-inputs numpy-documentation))))))
4737
4738(define-public python-pygit2
4739 (package
4740 (name "python-pygit2")
4741 (version "1.1.0")
4742 (source
4743 (origin
4744 (method url-fetch)
4745 (uri (pypi-uri "pygit2" version))
4746 (sha256
4747 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4748 (build-system python-build-system)
4749 (arguments
4750 '(#:tests? #f)) ; tests don't run correctly in our environment
4751 (propagated-inputs
4752 `(("python-cached-property" ,python-cached-property)
4753 ("python-cffi" ,python-cffi)
4754 ("libgit2" ,libgit2)))
4755 (native-inputs
4756 `(("python-pytest" ,python-pytest)))
4757 (home-page "https://github.com/libgit2/pygit2")
4758 (synopsis "Python bindings for libgit2")
4759 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4760library, libgit2 implements Git plumbing.")
4761 ;; GPL2.0 only, with linking exception.
4762 (license license:gpl2)))
4763
4764(define-public python-patiencediff
4765 (package
4766 (name "python-patiencediff")
4767 (version "0.2.0")
4768 (source
4769 (origin
4770 (method url-fetch)
4771 (uri (pypi-uri "patiencediff" version))
4772 (sha256
4773 (base32
4774 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4775 (build-system python-build-system)
4776 (home-page "https://www.breezy-vcs.org/")
4777 (synopsis "Python implementation of the patiencediff algorithm")
4778 (description
4779 "This package contains a Python implementation of the @code{patiencediff}
4780algorithm. Patiencediff provides a good balance of performance, nice output for
4781humans, and implementation simplicity.")
4782 (license license:gpl2)))
4783
4784(define-public python-pyparsing
4785 (package
4786 (name "python-pyparsing")
4787 (version "2.4.6")
4788 (source
4789 (origin
4790 (method url-fetch)
4791 (uri (pypi-uri "pyparsing" version))
4792 (sha256
4793 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4794 (build-system python-build-system)
4795 (outputs '("out" "doc"))
4796 (arguments
4797 `(#:tests? #f ; no test target
4798 #:phases
4799 (modify-phases %standard-phases
4800 (add-after 'install 'install-doc
4801 (lambda* (#:key outputs #:allow-other-keys)
4802 (let* ((doc (string-append (assoc-ref outputs "doc")
4803 "/share/doc/" ,name "-" ,version))
4804 (html-doc (string-append doc "/html"))
4805 (examples (string-append doc "/examples")))
4806 (mkdir-p html-doc)
4807 (mkdir-p examples)
4808 (for-each
4809 (lambda (dir tgt)
4810 (map (lambda (file)
4811 (install-file file tgt))
4812 (find-files dir ".*")))
4813 (list "docs" "htmldoc" "examples")
4814 (list doc html-doc examples))
4815 #t))))))
4816 (home-page "https://github.com/pyparsing/pyparsing")
4817 (synopsis "Python parsing class library")
4818 (description
4819 "The pyparsing module is an alternative approach to creating and
4820executing simple grammars, vs. the traditional lex/yacc approach, or the use
4821of regular expressions. The pyparsing module provides a library of classes
4822that client code uses to construct the grammar directly in Python code.")
4823 (license license:expat)))
4824
4825(define-public python2-pyparsing
4826 (package-with-python2 python-pyparsing))
4827
4828(define-public python-pyparsing-2.4.7
4829 (package
4830 (inherit python-pyparsing)
4831 (version "2.4.7")
4832 (source
4833 (origin
4834 (method url-fetch)
4835 (uri (pypi-uri "pyparsing" version))
4836 (sha256
4837 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4838
4839(define-public python-numpydoc
4840 (package
4841 (name "python-numpydoc")
4842 (version "0.8.0")
4843 (source
4844 (origin
4845 (method url-fetch)
4846 (uri (pypi-uri "numpydoc" version))
4847 (sha256
4848 (base32
4849 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4850 (build-system python-build-system)
4851 (propagated-inputs
4852 `(("python-sphinx" ,python-sphinx)))
4853 (native-inputs
4854 `(("python-nose" ,python-nose)))
4855 (home-page "https://pypi.org/project/numpydoc/")
4856 (synopsis
4857 "Numpy's Sphinx extensions")
4858 (description
4859 "Sphinx extension to support docstrings in Numpy format.")
4860 (license license:bsd-2)))
4861
4862(define-public python2-numpydoc
4863 (package-with-python2 python-numpydoc))
4864
4865(define-public python-numexpr
4866 (package
4867 (name "python-numexpr")
4868 (version "2.6.5")
4869 (source
4870 (origin
4871 (method url-fetch)
4872 (uri (pypi-uri "numexpr" version))
4873 (sha256
4874 (base32
4875 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4876 (build-system python-build-system)
4877 (arguments `(#:tests? #f)) ; no tests included
4878 (propagated-inputs
4879 `(("python-numpy" ,python-numpy)))
4880 (home-page "https://github.com/pydata/numexpr")
4881 (synopsis "Fast numerical expression evaluator for NumPy")
4882 (description
4883 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4884expressions that operate on arrays are accelerated and use less memory than
4885doing the same calculation in Python. In addition, its multi-threaded
4886capabilities can make use of all your cores, which may accelerate
4887computations, most specially if they are not memory-bounded (e.g. those using
4888transcendental functions).")
4889 (license license:expat)))
4890
4891(define-public python2-numexpr
4892 (package-with-python2 python-numexpr))
4893
4894(define-public python-cycler
4895 (package
4896 (name "python-cycler")
4897 (version "0.10.0")
4898 (source (origin
4899 (method url-fetch)
4900 (uri (pypi-uri "cycler" version))
4901 (sha256
4902 (base32
4903 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4904 (build-system python-build-system)
4905 (arguments
4906 ;; XXX: The current version requires 'coveralls' which we don't have.
4907 ;; Enable this for the next release which uses 'python-pytest'.
4908 '(#:tests? #f))
4909 (propagated-inputs
4910 `(("python-six" ,python-six)))
4911 (home-page "http://matplotlib.org/cycler/")
4912 (synopsis "Composable keyword argument iterator")
4913 (description
4914 "When using @code{matplotlib} and plotting more than one line, it is
4915common to want to be able to want to be able to cycle over one or more artist
4916styles; but the plotting logic can quickly become involved.
4917To address this and enable easy cycling over arbitrary @code{kwargs}, the
4918@code{Cycler} class was developed.")
4919 (license license:bsd-3)))
4920
4921(define-public python2-cycler
4922 (package-with-python2 python-cycler))
4923
4924(define-public python-colorspacious
4925 (package
4926 (name "python-colorspacious")
4927 (version "1.1.2")
4928 (source
4929 (origin
4930 (method git-fetch)
4931 (uri (git-reference
4932 (url "https://github.com/njsmith/colorspacious")
4933 (commit (string-append "v" version))))
4934 (file-name (git-file-name name version))
4935 (sha256
4936 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4937 (build-system python-build-system)
4938 (propagated-inputs
4939 `(("python-numpy" ,python-numpy)))
4940 (native-inputs
4941 `(("python-nose" ,python-nose)))
4942 (arguments
4943 `(#:phases
4944 (modify-phases %standard-phases
4945 (replace 'check
4946 (lambda _
4947 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4948 (home-page "https://github.com/njsmith/colorspacious")
4949 (synopsis "Python library for colorspace conversions")
4950 (description "@code{colorspacious} is a Python library that lets you
4951convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4952 (license license:expat)))
4953
4954(define-public python2-colorspacious
4955 (package-with-python2 python-colorspacious))
4956
4957(define-public python-matplotlib
4958 (package
4959 (name "python-matplotlib")
4960 (version "3.1.2")
4961 (source
4962 (origin
4963 (method url-fetch)
4964 (uri (pypi-uri "matplotlib" version))
4965 (sha256
4966 (base32
4967 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4968 (build-system python-build-system)
4969 (propagated-inputs ; the following packages are all needed at run time
4970 `(("python-cycler" ,python-cycler)
4971 ("python-kiwisolver" ,python-kiwisolver)
4972 ("python-pyparsing" ,python-pyparsing)
4973 ("python-pygobject" ,python-pygobject)
4974 ("gobject-introspection" ,gobject-introspection)
4975 ("python-tkinter" ,python "tk")
4976 ("python-dateutil" ,python-dateutil)
4977 ("python-numpy" ,python-numpy)
4978 ("python-pillow" ,python-pillow)
4979 ("python-pytz" ,python-pytz)
4980 ("python-six" ,python-six)
4981 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4982 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4983 ;; object. For this reason we need to import both libraries.
4984 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4985 ("python-pycairo" ,python-pycairo)
4986 ("python-cairocffi" ,python-cairocffi)))
4987 (inputs
4988 `(("libpng" ,libpng)
4989 ("imagemagick" ,imagemagick)
4990 ("freetype" ,freetype)
4991 ("cairo" ,cairo)
4992 ("glib" ,glib)
4993 ;; FIXME: Add backends when available.
4994 ;("python-wxpython" ,python-wxpython)
4995 ("tcl" ,tcl)
4996 ("tk" ,tk)))
4997 (native-inputs
4998 `(("pkg-config" ,pkg-config)
4999 ("python-pytest" ,python-pytest)
5000 ("python-mock" ,python-mock)
5001 ("unzip" ,unzip)
5002 ("jquery-ui"
5003 ,(origin
5004 (method url-fetch)
5005 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5006 (sha256
5007 (base32
5008 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5009 (arguments
5010 `(#:phases
5011 (modify-phases %standard-phases
5012 ;; XXX We disable all image comparison tests because we're using a
5013 ;; newer version of FreeType than matplotlib expects. This leads to
5014 ;; minor differences throughout the tests.
5015 (add-after 'unpack 'fix-and-disable-failing-tests
5016 (lambda _
5017 (substitute* (append (find-files "lib/matplotlib/tests/"
5018 "test_.*\\.py$")
5019 (find-files "lib/mpl_toolkits/tests"
5020 "test_.*\\.py$"))
5021 (("^from matplotlib" match)
5022 (string-append "import pytest\n" match))
5023 (("( *)@image_comparison" match indent)
5024 (string-append indent
5025 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5026 match)))
5027 (substitute* "lib/matplotlib/tests/test_animation.py"
5028 (("/bin/sh") (which "sh")))
5029 (for-each delete-file
5030 ;; test_normal_axes, test_get_tightbbox_polar
5031 '("lib/matplotlib/tests/test_axes.py"
5032 ;; We don't use the webagg backend and this test forces it.
5033 "lib/matplotlib/tests/test_backend_webagg.py"
5034 ;; test_outward_ticks
5035 "lib/matplotlib/tests/test_tightlayout.py"
5036 ;; test_hidden_axes fails with minor extent
5037 ;; differences, possibly due to the use of a
5038 ;; different version of FreeType.
5039 "lib/matplotlib/tests/test_constrainedlayout.py"
5040 ;; Fontconfig returns no fonts.
5041 "lib/matplotlib/tests/test_font_manager.py"))
5042 #t))
5043 (add-before 'install 'install-jquery-ui
5044 (lambda* (#:key outputs inputs #:allow-other-keys)
5045 (let ((dir (string-append (assoc-ref outputs "out")
5046 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5047 (mkdir-p dir)
5048 (invoke "unzip"
5049 (assoc-ref inputs "jquery-ui")
5050 "-d" dir))
5051 #t))
5052 (replace 'check
5053 (lambda* (#:key outputs inputs #:allow-other-keys)
5054 (add-installed-pythonpath inputs outputs)
5055 (invoke "python" "tests.py" "-v"
5056 "-m" "not network and not webagg")))
5057 (add-before 'build 'configure-environment
5058 (lambda* (#:key outputs inputs #:allow-other-keys)
5059 (let ((cairo (assoc-ref inputs "cairo")))
5060 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5061 ;; has not effect.
5062 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5063 (setenv "HOME" (getcwd))
5064 (call-with-output-file "setup.cfg"
5065 (lambda (port)
5066 (format port "[directories]~%
5067basedirlist = ~a,~a~%
5068[packages]~%
5069tests = True~%"
5070 (assoc-ref inputs "tcl")
5071 (assoc-ref inputs "tk")))))
5072 #t)))))
5073 (home-page "https://matplotlib.org/")
5074 (synopsis "2D plotting library for Python")
5075 (description
5076 "Matplotlib is a Python 2D plotting library which produces publication
5077quality figures in a variety of hardcopy formats and interactive environments
5078across platforms. Matplotlib can be used in Python scripts, the python and
5079ipython shell, web application servers, and six graphical user interface
5080toolkits.")
5081 (license license:psfl)
5082 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5083
5084(define-public python2-matplotlib
5085 (let ((matplotlib (package-with-python2
5086 (strip-python2-variant python-matplotlib))))
5087 (package (inherit matplotlib)
5088 (version "2.2.4")
5089 (source
5090 (origin
5091 (method url-fetch)
5092 (uri (pypi-uri "matplotlib" version))
5093 (sha256
5094 (base32
5095 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5096 (arguments
5097 (substitute-keyword-arguments (package-arguments matplotlib)
5098 ((#:phases phases)
5099 `(modify-phases ,phases
5100 (replace 'install-jquery-ui
5101 (lambda* (#:key outputs inputs #:allow-other-keys)
5102 (let ((dir (string-append (assoc-ref outputs "out")
5103 "/lib/python2.7/site-packages/"
5104 "matplotlib/backends/web_backend/")))
5105 (mkdir-p dir)
5106 (invoke "unzip"
5107 (assoc-ref inputs "jquery-ui")
5108 "-d" dir))
5109 #t))
5110 (delete 'fix-and-disable-failing-tests)
5111 (delete 'check))))) ; These tests weren't run the the past.
5112 ;; Make sure to use special packages for Python 2 instead
5113 ;; of those automatically rewritten by package-with-python2.
5114 (propagated-inputs
5115 `(("python2-pycairo" ,python2-pycairo)
5116 ("python2-backports-functools-lru-cache"
5117 ,python2-backports-functools-lru-cache)
5118 ("python2-functools32" ,python2-functools32)
5119 ("python2-pygobject-2" ,python2-pygobject-2)
5120 ("python2-subprocess32" ,python2-subprocess32)
5121 ("python2-tkinter" ,python-2 "tk")
5122 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5123 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5124
5125(define-public python-matplotlib-documentation
5126 (package
5127 (name "python-matplotlib-documentation")
5128 (version (package-version python-matplotlib))
5129 (source (package-source python-matplotlib))
5130 (build-system python-build-system)
5131 (native-inputs
5132 `(("python-matplotlib" ,python-matplotlib)
5133 ("python-colorspacious" ,python-colorspacious)
5134 ("python-sphinx" ,python-sphinx)
5135 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5136 ("python-sphinx-gallery" ,python-sphinx-gallery)
5137 ("python-numpydoc" ,python-numpydoc)
5138 ("python-ipython" ,python-ipython)
5139 ("python-ipykernel" ,python-ipykernel)
5140 ("python-mock" ,python-mock)
5141 ("graphviz" ,graphviz)
5142 ("texlive" ,(texlive-union (list texlive-amsfonts
5143 texlive-latex-amsmath
5144 texlive-latex-enumitem
5145 texlive-latex-expdlist
5146 texlive-latex-geometry
5147 texlive-latex-preview
5148 texlive-latex-type1cm
5149 texlive-latex-ucs
5150
5151 texlive-generic-pdftex
5152
5153 texlive-fonts-ec
5154 texlive-fonts-adobe-times
5155 texlive-fonts-txfonts)))
5156 ("texinfo" ,texinfo)
5157 ,@(package-native-inputs python-matplotlib)))
5158 (arguments
5159 `(#:tests? #f ; we're only generating documentation
5160 #:phases
5161 (modify-phases %standard-phases
5162 ;; The tests in python-matplotlib are run after the install phase, so
5163 ;; we need to delete the extra phase here.
5164 (delete 'check)
5165 (replace 'build
5166 (lambda _
5167 (chdir "doc")
5168 (setenv "PYTHONPATH"
5169 (string-append (getenv "PYTHONPATH")
5170 ":" (getcwd) "/../examples/units"))
5171 (substitute* "conf.py"
5172 ;; Don't use git.
5173 (("^SHA = check_output.*")
5174 (string-append "SHA = \"" ,version "\"\n"))
5175 ;; Don't fetch intersphinx files from the Internet
5176 (("^explicit_order_folders" m)
5177 (string-append "intersphinx_mapping = {}\n" m))
5178 (("'sphinx.ext.intersphinx',") "")
5179 ;; Disable URL embedding which requires internet access.
5180 (("'https://docs.scipy.org/doc/numpy'") "None")
5181 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5182 (invoke "make"
5183 "SPHINXBUILD=sphinx-build"
5184 "SPHINXOPTS=" ; don't abort on warnings
5185 "html" "texinfo")))
5186 (replace 'install
5187 (lambda* (#:key inputs outputs #:allow-other-keys)
5188 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5189 (doc (string-append data "/doc/python-matplotlib-" ,version))
5190 (info (string-append data "/info"))
5191 (html (string-append doc "/html")))
5192 (mkdir-p html)
5193 (mkdir-p info)
5194 (copy-recursively "build/html" html)
5195 (symlink (string-append html "/_images")
5196 (string-append info "/matplotlib-figures"))
5197 (with-directory-excursion "build/texinfo"
5198 (substitute* "matplotlib.texi"
5199 (("@image\\{([^,]*)" all file)
5200 (string-append "@image{matplotlib-figures/" file)))
5201 (symlink (string-append html "/_images")
5202 "./matplotlib-figures")
5203 (invoke "makeinfo" "--no-split"
5204 "-o" "matplotlib.info" "matplotlib.texi"))
5205 (install-file "build/texinfo/matplotlib.info" info))
5206 #t)))))
5207 (home-page (package-home-page python-matplotlib))
5208 (synopsis "Documentation for the python-matplotlib package")
5209 (description (package-description python-matplotlib))
5210 (license (package-license python-matplotlib))))
5211
5212(define-public python2-matplotlib-documentation
5213 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5214 (package
5215 (inherit parent)
5216 (native-inputs
5217 (alist-delete "python-sphinx-copybutton"
5218 (package-native-inputs parent))))))
5219
5220(define-public python-matplotlib-venn
5221 (package
5222 (name "python-matplotlib-venn")
5223 (version "0.11.5")
5224 (source
5225 (origin
5226 (method url-fetch)
5227 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5228 (sha256
5229 (base32
5230 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5231 (build-system python-build-system)
5232 (arguments '(#:tests? #f)) ; tests are not included
5233 (propagated-inputs
5234 `(("python-matplotlib" ,python-matplotlib)
5235 ("python-numpy" ,python-numpy)
5236 ("python-scipy" ,python-scipy)))
5237 (native-inputs
5238 `(("unzip" ,unzip)))
5239 (home-page "https://github.com/konstantint/matplotlib-venn")
5240 (synopsis "Plot area-proportional Venn diagrams")
5241 (description
5242 "This package provides tools for plotting area-proportional two- and
5243three-way Venn diagrams in @code{matplotlib}.")
5244 (license license:expat)))
5245
5246(define-public python-pysnptools
5247 (package
5248 (name "python-pysnptools")
5249 (version "0.4.11")
5250 (source
5251 (origin
5252 (method url-fetch)
5253 (uri (pypi-uri "pysnptools" version))
5254 (sha256
5255 (base32
5256 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5257 (build-system python-build-system)
5258 (arguments
5259 `(#:tests? #f ; no test data are included
5260 #:phases
5261 (modify-phases %standard-phases
5262 (replace 'check
5263 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5264 (if tests?
5265 (begin
5266 (add-installed-pythonpath inputs outputs)
5267 (invoke "python3" "pysnptools/test.py"))
5268 #t))))))
5269 (propagated-inputs
5270 `(("python-dill" ,python-dill)
5271 ("python-h5py" ,python-h5py)
5272 ("python-numpy" ,python-numpy)
5273 ("python-pandas" ,python-pandas)
5274 ("python-psutil" ,python-psutil)
5275 ("python-scipy" ,python-scipy)))
5276 (native-inputs
5277 `(("python-cython" ,python-cython)))
5278 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5279 (synopsis "Library for reading and manipulating genetic data")
5280 (description
5281 "PySnpTools is a library for reading and manipulating genetic data. It
5282can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5283those files. It can also efficiently manipulate ranges of integers using set
5284operators such as union, intersection, and difference.")
5285 (license license:asl2.0)))
5286
5287(define-public python2-pysnptools
5288 (package-with-python2 python-pysnptools))
5289
5290(define-public python-wurlitzer
5291 (package
5292 (name "python-wurlitzer")
5293 (version "2.0.1")
5294 (source
5295 (origin
5296 (method url-fetch)
5297 (uri (pypi-uri "wurlitzer" version))
5298 (sha256
5299 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5300 (build-system python-build-system)
5301 (arguments
5302 '(#:phases
5303 (modify-phases %standard-phases
5304 (replace 'check
5305 (lambda _
5306 (invoke "pytest" "-vv" "test.py"))))))
5307 (native-inputs
5308 `(("python-mock" ,python-mock)
5309 ("python-pytest" ,python-pytest)))
5310 (home-page "https://github.com/minrk/wurlitzer")
5311 (synopsis "Capture C-level output in context managers")
5312 (description
5313 "This library helps to redirect @code{sys.stdout} to a stream or a file
5314while executing some piece of code, including C code running within a Python
5315process.")
5316 (license license:expat)))
5317
5318(define-public python-socksipy-branch
5319 (package
5320 (name "python-socksipy-branch")
5321 (version "1.01")
5322 (source
5323 (origin
5324 (method url-fetch)
5325 (uri (pypi-uri "SocksiPy-branch" version))
5326 (sha256
5327 (base32
5328 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5329 (build-system python-build-system)
5330 (arguments
5331 `(#:tests? #f)) ; There are no tests
5332 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5333 (synopsis "Python SOCKS module")
5334 (description
5335 "SocksiPy - A Python SOCKS client module. It provides a
5336socket-like interface that supports connections to any TCP
5337service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5338The original version was developed by Dan Haim, this is a
5339branch created by Mario Vilas to address some open issues,
5340as the original project seems to have been abandoned circa 2007.")
5341 (license license:bsd-3)))
5342
5343(define-public python2-socksipy-branch
5344 (package-with-python2 python-socksipy-branch))
5345
5346(define-public python-socksipychain
5347 (package
5348 (name "python-socksipychain")
5349 (version "2.1.2")
5350 (source
5351 (origin
5352 (method git-fetch)
5353 (uri (git-reference
5354 (url "https://github.com/pagekite/PySocksipyChain")
5355 (commit (string-append "v" version))))
5356 (file-name (git-file-name name version))
5357 (sha256
5358 (base32
5359 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5360 (build-system python-build-system)
5361 (arguments
5362 `(#:tests? #f)) ; Tests try to access the network.
5363 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5364 (synopsis "Python SOCKS module with chained proxies support")
5365 (description
5366 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5367adds support for arbitrary chaining of proxy servers and various modes of
5368TLS/SSL encryption. It was developed for use in PageKite, and also includes
5369a simple netcat replacement with chaining support.")
5370 (license license:bsd-3)))
5371
5372(define-public python-pycodestyle
5373 (package
5374 (name "python-pycodestyle")
5375 (version "2.6.0")
5376 (source
5377 (origin
5378 (method url-fetch)
5379 (uri (pypi-uri "pycodestyle" version))
5380 (sha256
5381 (base32
5382 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5383 (build-system python-build-system)
5384 (arguments
5385 `(#:phases
5386 (modify-phases %standard-phases
5387 (replace 'check
5388 (lambda _
5389 (invoke "pytest" "-vv"))))))
5390 (native-inputs
5391 `(("python-pytest" ,python-pytest)))
5392 (home-page "https://pycodestyle.readthedocs.io/")
5393 (synopsis "Python style guide checker")
5394 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5395Python code against some of the style conventions in
5396@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5397 (license license:expat)))
5398
5399(define-public python2-pycodestyle
5400 (package-with-python2 python-pycodestyle))
5401
5402(define-public python-multidict
5403 (package
5404 (name "python-multidict")
5405 (version "4.7.5")
5406 (source
5407 (origin
5408 (method url-fetch)
5409 (uri (pypi-uri "multidict" version))
5410 (sha256
5411 (base32
5412 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5413 (build-system python-build-system)
5414 (arguments
5415 '(#:modules ((ice-9 ftw)
5416 (srfi srfi-1)
5417 (srfi srfi-26)
5418 (guix build utils)
5419 (guix build python-build-system))
5420 #:phases (modify-phases %standard-phases
5421 (replace 'check
5422 (lambda* (#:key tests? #:allow-other-keys)
5423 (if tests?
5424 (begin
5425 (let ((libdir (find (cut string-prefix? "lib." <>)
5426 (scandir "build"))))
5427 (setenv "PYTHONPATH"
5428 (string-append "./build/" libdir ":"
5429 (getenv "PYTHONPATH")))
5430 (invoke "pytest" "-vv")))
5431 (format #t "test suite not run~%"))
5432 #t)))))
5433 (native-inputs
5434 `(("python-pytest" ,python-pytest)
5435 ("python-pytest-cov" ,python-pytest-cov)))
5436 (home-page "https://github.com/aio-libs/multidict/")
5437 (synopsis "Multidict implementation")
5438 (description "Multidict is dict-like collection of key-value pairs
5439where key might be occurred more than once in the container.")
5440 (license license:asl2.0)))
5441
5442(define-public python-orderedmultidict
5443 (package
5444 (name "python-orderedmultidict")
5445 (version "1.0")
5446 (source
5447 (origin
5448 (method url-fetch)
5449 (uri (pypi-uri "orderedmultidict" version))
5450 (sha256
5451 (base32
5452 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5453 (build-system python-build-system)
5454 (arguments
5455 `(#:phases
5456 (modify-phases %standard-phases
5457 (add-after 'unpack 'fix-tests
5458 (lambda _
5459 ;; The package uses nosetest for running the tests.
5460 ;; Adding this initfile allows to run the test suite
5461 ;; without requiring nosetest.
5462 (with-output-to-file "tests/__init__.py" newline)
5463 #t)))))
5464 (propagated-inputs
5465 `(("python-six" ,python-six)))
5466 (native-inputs
5467 `(("python-pycodestyle" ,python-pycodestyle)))
5468 (home-page "https://github.com/gruns/orderedmultidict")
5469 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5470 (description "This package contains a library for ordered multivalue
5471dictionaries. A multivalue dictionary is a dictionary that can store
5472multiple values for the same key. An ordered multivalue dictionary is a
5473multivalue dictionary that retains the order of insertions and deletions.")
5474 (license license:unlicense)))
5475
5476(define-public python2-orderedmultidict
5477 (package-with-python2 python-orderedmultidict))
5478
5479(define-public python-autopep8
5480 (package
5481 (name "python-autopep8")
5482 (version "1.5.3")
5483 (source
5484 (origin
5485 (method url-fetch)
5486 (uri (pypi-uri "autopep8" version))
5487 (sha256
5488 (base32
5489 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5490 (build-system python-build-system)
5491 (propagated-inputs
5492 `(("python-pycodestyle" ,python-pycodestyle)
5493 ("python-toml" ,python-toml)))
5494 (home-page "https://github.com/hhatto/autopep8")
5495 (synopsis "Format Python code according to the PEP 8 style guide")
5496 (description
5497 "@code{autopep8} automatically formats Python code to conform to
5498the PEP 8 style guide. It uses the pycodestyle utility to determine
5499what parts of the code needs to be formatted. @code{autopep8} is
5500capable of fixing most of the formatting issues that can be reported
5501by pycodestyle.")
5502 (license (license:non-copyleft
5503 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5504
5505(define-public python2-autopep8
5506 (package-with-python2 python-autopep8))
5507
5508(define-public python-distlib
5509 (package
5510 (name "python-distlib")
5511 (version "0.3.0")
5512 (source
5513 (origin
5514 (method url-fetch)
5515 (uri (pypi-uri "distlib" version ".zip"))
5516 (sha256
5517 (base32
5518 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5519 (build-system python-build-system)
5520 (arguments
5521 `(#:phases
5522 (modify-phases %standard-phases
5523 (add-before 'build 'no-/bin/sh
5524 (lambda _
5525 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5526 (("/bin/sh") (which "sh")))
5527 #t))
5528 (add-before 'check 'prepare-test-env
5529 (lambda _
5530 (setenv "HOME" "/tmp")
5531 ;; NOTE: Any value works, the variable just has to be present.
5532 (setenv "SKIP_ONLINE" "1")
5533 #t)))))
5534 (native-inputs `(("unzip" ,unzip)))
5535 (home-page "https://bitbucket.org/pypa/distlib")
5536 (synopsis "Distribution utilities")
5537 (description "Distlib is a library which implements low-level functions that
5538relate to packaging and distribution of Python software. It is intended to be
5539used as the basis for third-party packaging tools.")
5540 (license license:psfl)))
5541
5542(define-public python-distutils-extra
5543 (package
5544 (name "python-distutils-extra")
5545 (version "2.38")
5546 (source
5547 (origin
5548 (method url-fetch)
5549 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5550 version "/+download/python-distutils-extra-"
5551 version ".tar.gz"))
5552 (sha256
5553 (base32
5554 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5555 (build-system python-build-system)
5556 (home-page "https://launchpad.net/python-distutils-extra/")
5557 (synopsis "Enhancements to Python's distutils")
5558 (description
5559 "The python-distutils-extra module enables you to easily integrate
5560gettext support, themed icons, and scrollkeeper-based documentation into
5561Python's distutils.")
5562 (license license:gpl2)))
5563
5564(define-public python2-distutils-extra
5565 (package-with-python2 python-distutils-extra))
5566
5567(define-public python2-elib.intl
5568 (package
5569 (name "python2-elib.intl")
5570 (version "0.0.3")
5571 (source
5572 (origin
5573 ;; This project doesn't tag releases or publish tarballs, so we take
5574 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5575 (method git-fetch)
5576 (uri (git-reference
5577 (url "https://github.com/dieterv/elib.intl")
5578 (commit "d09997cfef")))
5579 (file-name (string-append name "-" version "-checkout"))
5580 (sha256
5581 (base32
5582 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5583 (build-system python-build-system)
5584 (arguments
5585 ;; incompatible with Python 3 (exception syntax)
5586 `(#:python ,python-2
5587 #:tests? #f))
5588 (home-page "https://github.com/dieterv/elib.intl")
5589 (synopsis "Enhanced internationalization for Python")
5590 (description
5591 "The elib.intl module provides enhanced internationalization (I18N)
5592services for your Python modules and applications.")
5593 (license license:lgpl3+)))
5594
5595(define-public python-olefile
5596 (package
5597 (name "python-olefile")
5598 (version "0.46")
5599 (source
5600 (origin
5601 (method url-fetch)
5602 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5603 "download/v" version "/olefile-" version ".tar.gz"))
5604 (file-name (string-append name "-" version ".tar.gz"))
5605 (sha256
5606 (base32
5607 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5608 (build-system python-build-system)
5609 (home-page "https://www.decalage.info/python/olefileio")
5610 (synopsis "Read and write Microsoft OLE2 files.")
5611 (description
5612 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5613Storage or Compound Document, Microsoft Office). It is an improved version of
5614the OleFileIO module from PIL, the Python Image Library.")
5615 (license license:bsd-3)))
5616
5617(define-public python2-olefile
5618 (package-with-python2 python-olefile))
5619
5620(define-public python-pillow
5621 (package
5622 (name "python-pillow")
5623 (version "6.2.1")
5624 (source
5625 (origin
5626 (method url-fetch)
5627 (uri (pypi-uri "Pillow" version))
5628 (sha256
5629 (base32
5630 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5631 (build-system python-build-system)
5632 (native-inputs
5633 `(("python-pytest" ,python-pytest)))
5634 (inputs
5635 `(("freetype" ,freetype)
5636 ("lcms" ,lcms)
5637 ("libjpeg" ,libjpeg-turbo)
5638 ("libtiff" ,libtiff)
5639 ("libwebp" ,libwebp)
5640 ("openjpeg" ,openjpeg)
5641 ("zlib" ,zlib)))
5642 (propagated-inputs
5643 `(("python-olefile" ,python-olefile)))
5644 (arguments
5645 `(#:phases
5646 (modify-phases %standard-phases
5647 (add-after 'unpack 'patch-ldconfig
5648 (lambda _
5649 (substitute* "setup.py"
5650 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5651 (replace 'check
5652 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5653 (if tests?
5654 (begin
5655 (setenv "HOME" (getcwd))
5656 ;; Make installed package available for running the tests.
5657 (add-installed-pythonpath inputs outputs)
5658 (invoke "python" "selftest.py" "--installed")
5659 (invoke "python" "-m" "pytest" "-vv"))
5660 #t))))))
5661 (home-page "https://python-pillow.org")
5662 (synopsis "Fork of the Python Imaging Library")
5663 (description
5664 "The Python Imaging Library adds image processing capabilities to your
5665Python interpreter. This library provides extensive file format support, an
5666efficient internal representation, and fairly powerful image processing
5667capabilities. The core image library is designed for fast access to data
5668stored in a few basic pixel formats. It should provide a solid foundation for
5669a general image processing tool.")
5670 (license (license:x11-style
5671 "http://www.pythonware.com/products/pil/license.htm"
5672 "The PIL Software License"))))
5673
5674(define-public python2-pillow
5675 (package-with-python2 python-pillow))
5676
5677(define-public python-pillow-2.9
5678 (package
5679 (inherit python-pillow)
5680 (version "2.9.0")
5681 (source
5682 (origin
5683 (method url-fetch)
5684 (uri (pypi-uri "Pillow" version))
5685 (sha256
5686 (base32
5687 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5688 (arguments
5689 (substitute-keyword-arguments (package-arguments python-pillow)
5690 ((#:tests? _ #f) #f)))
5691 (properties '((hidden? #t)))))
5692
5693(define-public python-roifile
5694 (package
5695 (name "python-roifile")
5696 (version "2020.5.28")
5697 (source
5698 (origin
5699 (method url-fetch)
5700 (uri (pypi-uri "roifile" version))
5701 (sha256
5702 (base32
5703 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5704 (build-system python-build-system)
5705 (arguments `(#:tests? #f)) ; there are none
5706 (propagated-inputs
5707 `(("python-numpy" ,python-numpy)))
5708 (home-page "https://www.lfd.uci.edu/~gohlke/")
5709 (synopsis "Read and write ImageJ ROI format")
5710 (description "Roifile is a Python library to read, write, create, and plot
5711ImageJ ROIs, an undocumented and ImageJ application specific format to store
5712regions of interest, geometric shapes, paths, text, etc for image overlays.")
5713 (license license:bsd-3)))
5714
5715(define-public python-tifffile
5716 (package
5717 (name "python-tifffile")
5718 (version "2020.6.3")
5719 (source
5720 (origin
5721 (method url-fetch)
5722 (uri (pypi-uri "tifffile" version))
5723 (sha256
5724 (base32
5725 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5726 (build-system python-build-system)
5727 ;; Tests require lfdfiles, which depends on tifffile
5728 (arguments `(#:tests? #f))
5729 (propagated-inputs
5730 `(("python-numpy" ,python-numpy)
5731 ;;("python-lfdfiles" ,python-lfdfiles)
5732 ("python-roifile" ,python-roifile)))
5733 (home-page "https://www.lfd.uci.edu/~gohlke/")
5734 (synopsis "Read and write TIFF(r) files")
5735 (description "This package lets you read image and metadata from many
5736bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5737NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5738numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5739 (license license:bsd-3)))
5740
5741(define-public python-lfdfiles
5742 (package
5743 (name "python-lfdfiles")
5744 (version "2020.1.1")
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (pypi-uri "lfdfiles" version))
5749 (sha256
5750 (base32
5751 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5752 (build-system python-build-system)
5753 (propagated-inputs
5754 `(("python-click" ,python-click)
5755 ("python-numpy" ,python-numpy)
5756 ("python-tifffile" ,python-tifffile)))
5757 (home-page "https://www.lfd.uci.edu/~gohlke/")
5758 (synopsis "Work with LFD data files")
5759 (description
5760 "Lfdfiles is a Python library and console script for reading, writing,
5761converting, and viewing many of the proprietary file formats used to store
5762experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5763 (license license:bsd-3)))
5764
5765(define-public python-imageio
5766 (package
5767 (name "python-imageio")
5768 (version "2.8.0")
5769 (source
5770 (origin
5771 (method url-fetch)
5772 (uri (pypi-uri "imageio" version))
5773 (sha256
5774 (base32
5775 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5776 (build-system python-build-system)
5777 (arguments
5778 `(#:tests? #f ; many tests require online data
5779 #:phases
5780 (modify-phases %standard-phases
5781 (replace 'check
5782 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5783 (if tests?
5784 (begin
5785 ;; Make installed package available for running the tests.
5786 (add-installed-pythonpath inputs outputs)
5787 (invoke "pytest" "-vv"))
5788 #t))))))
5789 (propagated-inputs
5790 `(("python-numpy" ,python-numpy)
5791 ("python-pillow" ,python-pillow)
5792 ("python-psutil" ,python-psutil)))
5793 (native-inputs
5794 `(("python-pytest" ,python-pytest)))
5795 (home-page "https://imageio.github.io/")
5796 (synopsis "Library for reading and writing a wide range of image data")
5797 (description
5798 "Imageio is a Python library that provides an easy interface to read and
5799write a wide range of image data, including animated images, video, volumetric
5800data, and scientific formats.")
5801 (license license:bsd-2)))
5802
5803(define-public python-pycparser
5804 (package
5805 (name "python-pycparser")
5806 (version "2.20")
5807 (source
5808 (origin
5809 (method url-fetch)
5810 (uri (pypi-uri "pycparser" version))
5811 (sha256
5812 (base32
5813 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5814 (outputs '("out" "doc"))
5815 (build-system python-build-system)
5816 (native-inputs
5817 `(("pkg-config" ,pkg-config)))
5818 (arguments
5819 `(#:phases
5820 (modify-phases %standard-phases
5821 (replace 'check
5822 (lambda _
5823 (with-directory-excursion "tests"
5824 (invoke "python" "all_tests.py"))
5825 #t))
5826 (add-after 'install 'install-doc
5827 (lambda* (#:key outputs #:allow-other-keys)
5828 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5829 (doc (string-append data "/doc/" ,name "-" ,version))
5830 (examples (string-append doc "/examples")))
5831 (mkdir-p examples)
5832 (for-each (lambda (file)
5833 (copy-file (string-append "." file)
5834 (string-append doc file)))
5835 '("/README.rst" "/CHANGES" "/LICENSE"))
5836 (copy-recursively "examples" examples)
5837 #t))))))
5838 (home-page "https://github.com/eliben/pycparser")
5839 (synopsis "C parser in Python")
5840 (description
5841 "Pycparser is a complete parser of the C language, written in pure Python
5842using the PLY parsing library. It parses C code into an AST and can serve as
5843a front-end for C compilers or analysis tools.")
5844 (license license:bsd-3)))
5845
5846(define-public python2-pycparser
5847 (package-with-python2 python-pycparser))
5848
5849(define-public python-pywavelets
5850 (package
5851 (name "python-pywavelets")
5852 (version "1.1.1")
5853 (home-page "https://github.com/PyWavelets/pywt")
5854 (source (origin
5855 (method url-fetch)
5856 (uri (pypi-uri "PyWavelets" version))
5857 (sha256
5858 (base32
5859 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5860 (build-system python-build-system)
5861 (arguments
5862 '(#:modules ((ice-9 ftw)
5863 (srfi srfi-1)
5864 (srfi srfi-26)
5865 (guix build utils)
5866 (guix build python-build-system))
5867 #:phases
5868 (modify-phases %standard-phases
5869 (replace 'check
5870 (lambda _
5871 (let ((cwd (getcwd))
5872 (libdir (find (cut string-prefix? "lib." <>)
5873 (scandir "build"))))
5874 (with-directory-excursion (string-append cwd "/build/" libdir)
5875 (invoke "pytest" "-vv"))))))))
5876 (native-inputs
5877 `(("python-matplotlib" ,python-matplotlib) ;for tests
5878 ("python-pytest" ,python-pytest)))
5879 (propagated-inputs
5880 `(("python-numpy" ,python-numpy)))
5881 (synopsis "Wavelet transforms in Python")
5882 (description
5883 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5884mathematical basis functions that are localized in both time and frequency.
5885Wavelet transforms are time-frequency transforms employing wavelets. They are
5886similar to Fourier transforms, the difference being that Fourier transforms are
5887localized only in frequency instead of in time and frequency.")
5888 (license license:expat)))
5889
5890(define-public python-pywinrm
5891 (package
5892 (name "python-pywinrm")
5893 (version "0.4.1")
5894 (source
5895 (origin
5896 (method url-fetch)
5897 (uri (pypi-uri "pywinrm" version))
5898 (sha256
5899 (base32
5900 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5901 (build-system python-build-system)
5902 (propagated-inputs
5903 `(("python-six" ,python-six)
5904 ("python-requests_ntlm" ,python-requests_ntlm)
5905 ("python-xmltodict" ,python-xmltodict)
5906 ("python-kerberos" ,python-kerberos)))
5907 (native-inputs
5908 `(("python-mock" ,python-mock)
5909 ("python-pytest" ,python-pytest)))
5910 (home-page "https://github.com/diyan/pywinrm/")
5911 (synopsis
5912 "Python library for Windows Remote Management (WinRM)")
5913 (description
5914 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5915service. It allows you to invoke commands on target Windows machines from
5916any machine that can run Python.")
5917 (license license:expat)))
5918
5919(define-public python-xcffib
5920 (package
5921 (name "python-xcffib")
5922 (version "0.6.0")
5923 (source
5924 (origin
5925 (method url-fetch)
5926 (uri (pypi-uri "xcffib" version))
5927 (sha256
5928 (base32
5929 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5930 (build-system python-build-system)
5931 (inputs
5932 `(("libxcb" ,libxcb)))
5933 (propagated-inputs
5934 `(("python-cffi" ,python-cffi) ; used at run time
5935 ("python-six" ,python-six)))
5936 (arguments
5937 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5938 #:tests? #f
5939 #:phases
5940 (modify-phases %standard-phases
5941 (add-after 'unpack 'fix-libxcb-path
5942 (lambda* (#:key inputs #:allow-other-keys)
5943 (let ((libxcb (assoc-ref inputs "libxcb")))
5944 (substitute* '("xcffib/__init__.py")
5945 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5946 #t)))
5947 (add-after 'install 'install-doc
5948 (lambda* (#:key outputs #:allow-other-keys)
5949 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5950 "/doc/" ,name "-" ,version)))
5951 (mkdir-p doc)
5952 (copy-file "README.md"
5953 (string-append doc "/README.md"))
5954 #t))))))
5955 (home-page "https://github.com/tych0/xcffib")
5956 (synopsis "XCB Python bindings")
5957 (description
5958 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5959support for Python 3 and PyPy. It is based on cffi.")
5960 (license license:expat)))
5961
5962(define-public python2-xcffib
5963 (package-with-python2 python-xcffib))
5964
5965(define-public python-cairocffi
5966 (package
5967 (name "python-cairocffi")
5968 (version "0.9.0")
5969 (source
5970 (origin
5971 (method url-fetch)
5972 (uri (pypi-uri "cairocffi" version))
5973 (sha256
5974 (base32
5975 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5976 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5977 (build-system python-build-system)
5978 (outputs '("out" "doc"))
5979 (inputs
5980 `(("glib" ,glib)
5981 ("gtk+" ,gtk+)
5982 ("gdk-pixbuf" ,gdk-pixbuf)
5983 ("cairo" ,cairo)
5984 ("pango" ,pango)))
5985 (native-inputs
5986 `(("pkg-config" ,pkg-config)
5987 ("python-pytest" ,python-pytest)
5988 ("python-pytest-cov" ,python-pytest-cov)
5989 ("python-pytest-runner" ,python-pytest-runner)
5990 ("python-sphinx" ,python-sphinx)
5991 ("python-docutils" ,python-docutils)))
5992 (propagated-inputs
5993 `(("python-xcffib" ,python-xcffib))) ; used at run time
5994 (arguments
5995 `(#:phases
5996 (modify-phases %standard-phases
5997 (add-after 'unpack 'patch-paths
5998 (lambda* (#:key inputs outputs #:allow-other-keys)
5999 (substitute* (find-files "." "\\.py$")
6000 (("dlopen\\(ffi, 'cairo'")
6001 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
6002 "/lib/libcairo.so.2'"))
6003 (("dlopen\\(ffi, 'gdk-3'")
6004 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
6005 "/lib/libgtk-3.so.0'"))
6006 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
6007 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
6008 "/lib/libgdk_pixbuf-2.0.so.0'"))
6009 (("dlopen\\(ffi, 'glib-2.0'")
6010 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6011 "/lib/libglib-2.0.so.0'"))
6012 (("dlopen\\(ffi, 'gobject-2.0'")
6013 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6014 "/lib/libgobject-2.0.so.0'"))
6015 (("dlopen\\(ffi, 'pangocairo-1.0'")
6016 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6017 "/lib/libpangocairo-1.0.so.0'"))
6018 (("dlopen\\(ffi, 'pango-1.0'")
6019 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6020 "/lib/libpango-1.0.so.0'")))
6021 #t))
6022 (add-after 'install 'install-doc
6023 (lambda* (#:key inputs outputs #:allow-other-keys)
6024 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6025 (doc (string-append data "/doc/" ,name "-" ,version))
6026 (html (string-append doc "/html")))
6027 (setenv "LD_LIBRARY_PATH"
6028 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6029 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6030 (setenv "LANG" "en_US.UTF-8")
6031 (mkdir-p html)
6032 (for-each (lambda (file)
6033 (copy-file (string-append "." file)
6034 (string-append doc file)))
6035 '("/README.rst" "/CHANGES" "/LICENSE"))
6036 (system* "python" "setup.py" "build_sphinx")
6037 (copy-recursively "docs/_build/html" html)
6038 #t))))))
6039 (home-page "https://github.com/Kozea/cairocffi")
6040 (synopsis "Python bindings and object-oriented API for Cairo")
6041 (description
6042 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6043Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6044graphics library with support for multiple backends including image buffers,
6045PNG, PostScript, PDF, and SVG file output.")
6046 (license license:bsd-3)))
6047
6048(define-public python2-cairocffi
6049 (package-with-python2 python-cairocffi))
6050
6051(define-public python-decorator
6052 (package
6053 (name "python-decorator")
6054 (version "4.3.0")
6055 (source
6056 (origin
6057 (method url-fetch)
6058 (uri (pypi-uri "decorator" version))
6059 (sha256
6060 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6061 (build-system python-build-system)
6062 (home-page "https://pypi.org/project/decorator/")
6063 (synopsis "Python module to simplify usage of decorators")
6064 (description
6065 "The aim of the decorator module is to simplify the usage of decorators
6066for the average programmer, and to popularize decorators usage giving examples
6067of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6068etc. The core of this module is a decorator factory.")
6069 (license license:expat)))
6070
6071(define-public python2-decorator
6072 (package-with-python2 python-decorator))
6073
6074(define-public python-drmaa
6075 (package
6076 (name "python-drmaa")
6077 (version "0.7.7")
6078 (source
6079 (origin
6080 (method url-fetch)
6081 (uri (pypi-uri "drmaa" version))
6082 (sha256
6083 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6084 (build-system python-build-system)
6085 ;; The test suite requires libdrmaa which is provided by the cluster
6086 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6087 ;; should be set to the path of the libdrmaa library.
6088 (arguments '(#:tests? #f))
6089 (native-inputs
6090 `(("python-nose" ,python-nose)))
6091 (home-page "https://pypi.org/project/drmaa/")
6092 (synopsis "Python bindings for the DRMAA library")
6093 (description
6094 "A Python package for Distributed Resource Management (DRM) job
6095submission and control. This package is an implementation of the DRMAA 1.0
6096Python language binding specification.")
6097 (license license:bsd-3)))
6098
6099(define-public python2-drmaa
6100 (package-with-python2 python-drmaa))
6101
6102(define-public python-grako
6103 (package
6104 (name "python-grako")
6105 (version "3.99.9")
6106 (source
6107 (origin
6108 (method url-fetch)
6109 (uri
6110 (pypi-uri "grako" version ".zip"))
6111 (sha256
6112 (base32
6113 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6114 (build-system python-build-system)
6115 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6116 (native-inputs
6117 `(("unzip" ,unzip)
6118 ("python-pytest" ,python-pytest)
6119 ("python-pytest-runner" ,python-pytest-runner)))
6120 (home-page "https://bitbucket.org/neogeny/grako")
6121 (synopsis "EBNF parser generator")
6122 (description
6123 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6124memoizing PEG/Packrat parser in Python.")
6125 (license license:bsd-3)))
6126
6127(define-public python2-grako
6128 (package-with-python2 python-grako))
6129
6130(define-public python-grandalf
6131 (package
6132 (name "python-grandalf")
6133 (version "0.7")
6134 (source
6135 (origin
6136 ;; There's no source tarball on PyPI.
6137 (method git-fetch)
6138 (uri (git-reference
6139 (url "https://github.com/bdcht/grandalf")
6140 (commit (string-append "v" version))))
6141 (file-name (git-file-name name version))
6142 (sha256
6143 (base32
6144 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6145 (build-system python-build-system)
6146 (arguments
6147 '(#:phases
6148 (modify-phases %standard-phases
6149 (replace 'check
6150 (lambda _
6151 (invoke "python" "setup.py" "pytest"))))))
6152 (native-inputs
6153 `(("python-pytest" ,python-pytest)
6154 ("python-pytest-runner" ,python-pytest-runner)))
6155 (propagated-inputs
6156 `(("python-numpy" ,python-numpy)
6157 ("python-ply" ,python-ply)))
6158 (home-page "https://github.com/bdcht/grandalf")
6159 (synopsis "Graph and drawing algorithms framework")
6160 (description
6161 "Grandalf is a Python package made for experimentations with graphs
6162drawing algorithms. It is written in pure Python, and currently implements
6163two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6164minimization approach. While not as fast or featured as graphviz or other
6165libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6166than thousands of nodes, while keeping the source code simple enough to tweak
6167and hack any part of it for experimental purpose. With a total of about 1500
6168lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6169in less than 600 lines. The energy minimization approach is comprised of only
6170250 lines!
6171
6172Grandalf does only 2 not-so-simple things:
6173@itemize
6174@item computing the nodes (x,y) coordinates (based on provided nodes
6175dimensions, and a chosen layout)
6176@item routing the edges with lines or nurbs
6177@end itemize
6178
6179It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6180will help you find where to draw things like nodes and edges, but it’s up to
6181you to actually draw things with your favorite toolkit.")
6182 ;; The user can choose either license.
6183 (license (list license:gpl2 license:epl1.0))))
6184
6185(define-public python-gridmap
6186 (package
6187 (name "python-gridmap")
6188 (version "0.14.0")
6189 (source
6190 (origin
6191 (method git-fetch)
6192 (uri (git-reference
6193 (url "https://github.com/pygridtools/gridmap")
6194 (commit (string-append "v" version))))
6195 (file-name (git-file-name name version))
6196 (sha256
6197 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6198 (build-system python-build-system)
6199 (arguments
6200 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6201 (propagated-inputs
6202 `(("python-psutil" ,python-psutil)
6203 ("python-drmaa" ,python-drmaa)
6204 ("python-pyzmq" ,python-pyzmq)))
6205 (home-page "https://github.com/pygridtools/gridmap")
6206 (synopsis "Create jobs on a cluster directly from Python")
6207 (description
6208 "Gridmap is a Python package to allow you to easily create jobs on the
6209cluster directly from Python. You can directly map Python functions onto the
6210cluster without needing to write any wrapper code yourself.")
6211 (license license:gpl3+)))
6212
6213(define-public python2-gridmap
6214 (package-with-python2 python-gridmap))
6215
6216(define-public python-honcho
6217 (package
6218 (name "python-honcho")
6219 (version "1.0.1")
6220 (source
6221 (origin
6222 (method git-fetch)
6223 (uri (git-reference
6224 (url "https://github.com/nickstenning/honcho")
6225 (commit (string-append "v" version))))
6226 (file-name (git-file-name name version))
6227 (sha256
6228 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6229 (build-system python-build-system)
6230 (native-inputs
6231 `(("python-pytest" ,python-pytest)
6232 ("python-mock" ,python-mock)
6233 ("python-tox" ,python-tox)
6234 ("which" ,which))) ;for tests
6235 (propagated-inputs
6236 `(("python-jinja2" ,python-jinja2)))
6237 (arguments
6238 `(#:phases
6239 (modify-phases %standard-phases
6240 (delete 'check)
6241 (add-after 'install 'check
6242 (lambda* (#:key outputs inputs #:allow-other-keys)
6243 ;; fix honcho path in testsuite
6244 (substitute* "tests/conftest.py"
6245 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6246 "/bin/honcho" "'")))
6247 ;; It's easier to run tests after install.
6248 ;; Make installed package available for running the tests
6249 (add-installed-pythonpath inputs outputs)
6250 (invoke "py.test" "-v"))))))
6251 (home-page "https://github.com/nickstenning/honcho")
6252 (synopsis "Manage Procfile-based applications")
6253 (description
6254 "A Procfile is a file which describes how to run an application
6255consisting of several processes. honcho starts all listed processes.
6256The output of all running processes is collected by honcho and
6257displayed.")
6258 (license license:expat)))
6259
6260(define-public python2-honcho
6261 (package-with-python2 python-honcho))
6262
6263(define-public python-pexpect
6264 (package
6265 (name "python-pexpect")
6266 (version "4.8.0")
6267 (source
6268 (origin
6269 (method url-fetch)
6270 (uri (pypi-uri "pexpect" version))
6271 (sha256
6272 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6273 (build-system python-build-system)
6274 (arguments
6275 `(#:phases
6276 (modify-phases %standard-phases
6277 (add-before 'check 'prepare-tests
6278 (lambda _
6279 (substitute* (find-files "tests")
6280 (("/bin/ls") (which "ls"))
6281 (("/bin/echo") (which "echo"))
6282 (("/bin/which") (which "which"))
6283 ;; Many tests try to use the /bin directory which
6284 ;; is not present in the build environment.
6285 ;; Use one that's non-empty and unlikely to change.
6286 (("/bin'") "/dev'")
6287 ;; Disable failing test. See upstream bug report
6288 ;; https://github.com/pexpect/pexpect/issues/568
6289 (("def test_bash") "def _test_bash"))
6290 ;; XXX: Socket connection test gets "Connection reset by peer".
6291 ;; Why does it not work? Delete for now.
6292 (delete-file "tests/test_socket.py")
6293 #t))
6294 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6295 (native-inputs
6296 `(("python-nose" ,python-nose)
6297 ("python-pytest" ,python-pytest)
6298 ("man-db" ,man-db)
6299 ("which" ,which)
6300 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6301 (propagated-inputs
6302 `(("python-ptyprocess" ,python-ptyprocess)))
6303 (home-page "http://pexpect.readthedocs.org/")
6304 (synopsis "Controlling interactive console applications")
6305 (description
6306 "Pexpect is a pure Python module for spawning child applications;
6307controlling them; and responding to expected patterns in their output.
6308Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6309child application and control it as if a human were typing commands.")
6310 (license license:isc)))
6311
6312(define-public python2-pexpect
6313 (package-with-python2 python-pexpect))
6314
6315(define-public python-setuptools-scm
6316 (package
6317 (name "python-setuptools-scm")
6318 (version "3.4.3")
6319 (source (origin
6320 (method url-fetch)
6321 (uri (pypi-uri "setuptools_scm" version))
6322 (sha256
6323 (base32
6324 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6325 (build-system python-build-system)
6326 (home-page "https://github.com/pypa/setuptools_scm/")
6327 (synopsis "Manage Python package versions in SCM metadata")
6328 (description
6329 "Setuptools_scm handles managing your Python package versions in
6330@dfn{software configuration management} (SCM) metadata instead of declaring
6331them as the version argument or in a SCM managed file.")
6332 (license license:expat)))
6333
6334(define-public python2-setuptools-scm
6335 (package-with-python2 python-setuptools-scm))
6336
6337(define-public python-sexpdata
6338 (package
6339 (name "python-sexpdata")
6340 (version "0.0.3")
6341 (source
6342 (origin
6343 (method url-fetch)
6344 (uri (pypi-uri "sexpdata" version))
6345 (sha256
6346 (base32
6347 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6348 (build-system python-build-system)
6349 (home-page "https://github.com/jd-boyd/sexpdata")
6350 (synopsis "S-expression parser for Python")
6351 (description
6352 "Sexpdata is an S-expression parser/serializer. It has load and dump
6353functions like pickle, json or PyYAML module.")
6354 (license license:bsd-3)))
6355
6356(define-public python-pathlib2
6357 (package
6358 (name "python-pathlib2")
6359 (version "2.3.3")
6360 (source
6361 (origin
6362 (method url-fetch)
6363 (uri (pypi-uri "pathlib2" version))
6364 (sha256
6365 (base32
6366 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6367 (build-system python-build-system)
6368 (propagated-inputs
6369 `(("python-scandir" ,python-scandir)
6370 ("python-six" ,python-six)))
6371 (home-page "https://pypi.org/project/pathlib2/")
6372 (synopsis "Object-oriented file system paths")
6373 (description "The goal of pathlib2 is to provide a backport of the
6374standard @code{pathlib} module which tracks the standard library module, so
6375all the newest features of the standard @code{pathlib} can be used also on
6376older Python versions.")
6377 (license license:expat)))
6378
6379(define-public python-importlib-resources
6380 (package
6381 (name "python-importlib-resources")
6382 (version "3.0.0")
6383 (source
6384 (origin
6385 (method url-fetch)
6386 (uri (pypi-uri "importlib_resources" version))
6387 (sha256
6388 (base32
6389 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6390 (build-system python-build-system)
6391 (native-inputs
6392 `(("python-setuptools-scm" ,python-setuptools-scm)
6393 ("python-toml" ,python-toml)))
6394 (home-page "http://importlib-resources.readthedocs.io/")
6395 (synopsis "Read resources from Python packages")
6396 (description
6397 "@code{importlib_resources} is a backport of Python 3's standard library
6398@code{importlib.resources} module for Python 2.7, and Python 3.")
6399 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6400 (license license:asl2.0)))
6401
6402(define-public python2-importlib-resources
6403 (package
6404 (name "python2-importlib-resources")
6405 (version "1.0.2")
6406 (source (origin
6407 (method url-fetch)
6408 (uri (pypi-uri "importlib_resources" version))
6409 (sha256
6410 (base32
6411 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6412 (build-system python-build-system)
6413 (arguments
6414 `(#:python ,python-2
6415 #:phases (modify-phases %standard-phases
6416 ;; The build system tests for python-wheel, but it is
6417 ;; not required for Guix nor the test suite. Just drop
6418 ;; it to make bootstrapping pytest easier.
6419 (add-after 'unpack 'drop-wheel-dependency
6420 (lambda _
6421 (substitute* "setup.cfg"
6422 (("^[[:blank:]]+wheel")
6423 ""))
6424 #t)))))
6425 (propagated-inputs
6426 `(("python-pathlib2" ,python2-pathlib2)
6427 ("python-typing" ,python2-typing)))
6428 (home-page "https://gitlab.com/python-devs/importlib_resources")
6429 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6430 (description
6431 "This package provides an implementation of @code{importlib.resources}
6432for older versions of Python.")
6433 (license license:asl2.0)))
6434
6435;; For importlib-metadata-bootstrap below.
6436(define-public python2-importlib-resources-bootstrap
6437 (hidden-package
6438 (package/inherit
6439 python2-importlib-resources
6440 (name "python2-importlib-resources-bootstrap")
6441 (propagated-inputs
6442 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6443 ("python-typing" ,python2-typing))))))
6444
6445(define-public python-importlib-metadata
6446 (package
6447 (name "python-importlib-metadata")
6448 (version "1.5.0")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (pypi-uri "importlib_metadata" version))
6453 (sha256
6454 (base32
6455 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6456 (build-system python-build-system)
6457 (propagated-inputs
6458 `(("python-zipp" ,python-zipp)))
6459 (native-inputs
6460 `(("python-setuptools-scm" ,python-setuptools-scm)
6461 ("python-pyfakefs" ,python-pyfakefs)
6462 ("python-packaging" ,python-packaging)))
6463 (home-page "https://importlib-metadata.readthedocs.io/")
6464 (synopsis "Read metadata from Python packages")
6465 (description
6466 "@code{importlib_metadata} is a library which provides an API for
6467accessing an installed Python package's metadata, such as its entry points or
6468its top-level name. This functionality intends to replace most uses of
6469@code{pkg_resources} entry point API and metadata API. Along with
6470@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6471need to use the older and less efficient @code{pkg_resources} package.")
6472 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6473 (license license:asl2.0)))
6474
6475(define-public python2-importlib-metadata
6476 (let ((base (package-with-python2 (strip-python2-variant
6477 python-importlib-metadata))))
6478 (package/inherit
6479 base
6480 (name "python2-importlib-metadata")
6481 (native-inputs
6482 `(("python-setuptools-scm" ,python2-setuptools-scm)
6483 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6484 ("python-packaging" ,python2-packaging-bootstrap)))
6485 (propagated-inputs
6486 `(("python-configparser" ,python2-configparser)
6487 ("python-contextlib2" ,python2-contextlib2)
6488 ("python-importlib-resources" ,python2-importlib-resources)
6489 ("python-pathlib2" ,python2-pathlib2)
6490 ,@(package-propagated-inputs base))))))
6491
6492;; This package is used by python2-pytest, and thus must not depend on it.
6493(define-public python2-importlib-metadata-bootstrap
6494 (hidden-package
6495 (package/inherit
6496 python2-importlib-metadata
6497 (name "python2-importlib-metadata-bootstrap")
6498 (arguments
6499 `(#:tests? #f
6500 ,@(package-arguments python2-importlib-metadata)))
6501 (propagated-inputs
6502 `(("python-zipp" ,python2-zipp-bootstrap)
6503 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6504 ("python-configparser" ,python2-configparser)
6505 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6506 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6507
6508(define-public python-importmagic
6509 (package
6510 (name "python-importmagic")
6511 (version "0.1.7")
6512 (source
6513 (origin
6514 (method url-fetch)
6515 (uri (pypi-uri "importmagic" version))
6516 (sha256
6517 (base32
6518 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6519 (build-system python-build-system)
6520 (home-page "https://github.com/alecthomas/importmagic")
6521 (synopsis "Library for adding, removing and managing Python imports")
6522 (description
6523 "Importmagic is a Python library for automatically managing imports by
6524finding unresolved symbols in Python code and their corresponding imports.")
6525 (license license:bsd-3)))
6526
6527(define-public python-jaraco-packaging
6528 (package
6529 (name "python-jaraco-packaging")
6530 (version "6.1")
6531 (source
6532 (origin
6533 (method url-fetch)
6534 (uri (pypi-uri "jaraco.packaging" version))
6535 (sha256
6536 (base32
6537 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6538 (build-system python-build-system)
6539 (propagated-inputs
6540 `(("python-pytest" ,python-pytest)
6541 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6542 ("python-pytest-flake8" ,python-pytest-flake8)
6543 ("python-rst.linker" ,python-rst.linker)
6544 ("python-setuptools" ,python-setuptools)
6545 ("python-setuptools-scm" ,python-setuptools-scm)
6546 ("python-six" ,python-six)
6547 ("python-sphinx" ,python-sphinx)))
6548 (home-page "https://github.com/jaraco/jaraco.packaging")
6549 (synopsis "Tools to supplement packaging Python releases")
6550 (description
6551 "This package provides various tools to supplement packaging Python
6552releases.")
6553 (license license:expat)))
6554
6555(define-public python-pathpy
6556 (package
6557 (name "python-pathpy")
6558 (version "11.5.1")
6559 (source
6560 (origin
6561 (method url-fetch)
6562 (uri (pypi-uri "path.py" version))
6563 (sha256
6564 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6565 (outputs '("out" "doc"))
6566 (build-system python-build-system)
6567 (propagated-inputs
6568 `(("python-appdirs" ,python-appdirs)
6569 ("python-importlib-metadata" ,python-importlib-metadata)))
6570 (native-inputs
6571 `(("python-setuptools-scm" ,python-setuptools-scm)
6572 ("python-sphinx" ,python-sphinx)
6573 ("python-rst.linker" ,python-rst.linker)
6574 ("python-pytest" ,python-pytest)
6575 ("python-pytest-runner" ,python-pytest-runner)
6576 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6577 (arguments
6578 `(#:phases
6579 (modify-phases %standard-phases
6580 (add-after 'build 'build-doc
6581 (lambda _
6582 (setenv "LANG" "en_US.UTF-8")
6583 (invoke "python" "setup.py" "build_sphinx")))
6584 (add-after 'install 'install-doc
6585 (lambda* (#:key outputs #:allow-other-keys)
6586 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6587 (doc (string-append data "/doc/" ,name "-" ,version))
6588 (html (string-append doc "/html")))
6589 (mkdir-p html)
6590 (for-each (lambda (file)
6591 (copy-file file (string-append doc "/" file)))
6592 '("README.rst" "CHANGES.rst"))
6593 (copy-recursively "build/sphinx/html" html)
6594 #t)))
6595 (replace 'check
6596 (lambda _
6597 ;; The import time test aborts if an import takes longer than
6598 ;; 100ms. It may very well take a little longer than that.
6599 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6600 (home-page "https://github.com/jaraco/path.py")
6601 (synopsis "Python module wrapper for built-in os.path")
6602 (description
6603 "@code{path.py} implements path objects as first-class entities, allowing
6604common operations on files to be invoked on those path objects directly.")
6605 (license license:expat)))
6606
6607(define-public python2-pathpy
6608 (package-with-python2 python-pathpy))
6609
6610(define-public python-simplegeneric
6611 (package
6612 (name "python-simplegeneric")
6613 (version "0.8.1")
6614 (source
6615 (origin
6616 (method url-fetch)
6617 (uri (pypi-uri "simplegeneric" version ".zip"))
6618 (sha256
6619 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6620 (build-system python-build-system)
6621 (native-inputs
6622 `(("unzip" ,unzip)))
6623 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6624 (synopsis "Python module for simple generic functions")
6625 (description
6626 "The simplegeneric module lets you define simple single-dispatch generic
6627functions, akin to Python’s built-in generic functions like @code{len()},
6628@code{iter()} and so on. However, instead of using specially-named methods,
6629these generic functions use simple lookup tables, akin to those used by
6630e.g. @code{pickle.dump()} and other generic functions found in the Python
6631standard library.")
6632 (license license:zpl2.1)))
6633
6634(define-public python2-simplegeneric
6635 (package-with-python2 python-simplegeneric))
6636
6637(define-public python-ipython-genutils
6638 ;; TODO: This package is retired, check if can be removed, see description.
6639 (package
6640 (name "python-ipython-genutils")
6641 (version "0.1.0")
6642 (source
6643 (origin
6644 (method url-fetch)
6645 (uri (pypi-uri "ipython_genutils" version))
6646 (sha256
6647 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6648 (build-system python-build-system)
6649 (arguments `(#:tests? #f)) ; no tests
6650 (home-page "https://ipython.org")
6651 (synopsis "Vestigial utilities from IPython")
6652 (description
6653 "This package provides retired utilities from IPython. No packages
6654outside IPython/Jupyter should depend on it.
6655
6656This package shouldn't exist. It contains some common utilities shared by
6657Jupyter and IPython projects during The Big Split. As soon as possible, those
6658packages will remove their dependency on this, and this package will go
6659away.")
6660 (license license:bsd-3)))
6661
6662(define-public python2-ipython-genutils
6663 (package-with-python2 python-ipython-genutils))
6664
6665(define-public python-ipyparallel
6666 (package
6667 (name "python-ipyparallel")
6668 (version "6.2.4")
6669 (source
6670 (origin
6671 (method url-fetch)
6672 (uri (pypi-uri "ipyparallel" version))
6673 (sha256
6674 (base32
6675 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6676 (build-system python-build-system)
6677 (arguments
6678 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6679 #:phases
6680 (modify-phases %standard-phases
6681 (add-before 'check 'prepare-for-tests
6682 (lambda _
6683 (setenv "HOME" (getcwd))
6684 #t)))))
6685 (propagated-inputs
6686 `(("python-dateutil" ,python-dateutil)
6687 ("python-decorator" ,python-decorator)
6688 ("python-ipykernel" ,python-ipykernel)
6689 ("python-ipython" ,python-ipython)
6690 ("python-ipython-genutils" ,python-ipython-genutils)
6691 ("python-jupyter-client" ,python-jupyter-client)
6692 ("python-pyzmq" ,python-pyzmq)
6693 ("python-tornado" ,python-tornado)
6694 ("python-traitlets" ,python-traitlets)))
6695 (native-inputs
6696 `(("python-ipython" ,python-ipython)
6697 ("python-mock" ,python-mock)
6698 ("python-nose" ,python-nose)
6699 ("python-pytest" ,python-pytest)
6700 ("python-pytest-cov" ,python-pytest-cov)
6701 ("python-testpath" ,python-testpath)))
6702 (home-page "https://ipython.org/")
6703 (synopsis "Interactive Parallel Computing with IPython")
6704 (description
6705 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6706controlling clusters for Jupyter. @code{ipyparallel} contains the following
6707CLI scripts:
6708@enumerate
6709@item ipcluster - start/stop a cluster
6710@item ipcontroller - start a scheduler
6711@item ipengine - start an engine
6712@end enumerate")
6713 (license license:bsd-3)))
6714
6715(define-public python2-ipyparallel
6716 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6717 (package
6718 (inherit ipyparallel)
6719 (propagated-inputs
6720 `(("python2-futures" ,python2-futures)
6721 ,@(package-propagated-inputs ipyparallel))))))
6722
6723(define-public python-ipython-cluster-helper
6724 (package
6725 (name "python-ipython-cluster-helper")
6726 (version "0.6.4")
6727 (source
6728 (origin
6729 (method url-fetch)
6730 (uri (pypi-uri "ipython-cluster-helper" version))
6731 (sha256
6732 (base32
6733 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6734 (modules '((guix build utils)))
6735 (snippet
6736 '(begin (substitute* "requirements.txt"
6737 (("ipython.*") "ipython\n"))
6738 #t))))
6739 (build-system python-build-system)
6740 (arguments
6741 `(#:tests? #f ; Test suite can't find IPython.
6742 #:phases
6743 (modify-phases %standard-phases
6744 (replace 'check
6745 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6746 (if tests?
6747 (begin
6748 (setenv "HOME" (getcwd))
6749 (add-installed-pythonpath inputs outputs)
6750 (invoke "python" "example/example.py" "--local"))
6751 #t))))))
6752 (propagated-inputs
6753 `(("python-ipyparallel" ,python-ipyparallel)
6754 ("python-ipython" ,python-ipython)
6755 ("python-netifaces" ,python-netifaces)
6756 ("python-pyzmq" ,python-pyzmq)
6757 ("python-setuptools" ,python-setuptools)
6758 ("python-six" ,python-six)))
6759 (home-page "https://github.com/roryk/ipython-cluster-helper")
6760 (synopsis
6761 "Simplify IPython cluster start up and use for multiple schedulers")
6762 (description
6763 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6764profile, launches a cluster and returns a view. On program exit it shuts the
6765cluster down and deletes the throwaway profile.")
6766 (license license:expat)))
6767
6768(define-public python2-ipython-cluster-helper
6769 (package-with-python2 python-ipython-cluster-helper))
6770
6771(define-public python-traitlets
6772 (package
6773 (name "python-traitlets")
6774 (version "4.3.3")
6775 (source
6776 (origin
6777 (method url-fetch)
6778 (uri (pypi-uri "traitlets" version))
6779 (sha256
6780 (base32
6781 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6782 (build-system python-build-system)
6783 (arguments
6784 `(#:phases
6785 (modify-phases %standard-phases
6786 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6787 (propagated-inputs
6788 `(("python-ipython-genutils" ,python-ipython-genutils)
6789 ("python-decorator" ,python-decorator)))
6790 (native-inputs
6791 `(("python-pytest" ,python-pytest)))
6792 (properties `((python2-variant . ,(delay python2-traitlets))))
6793 (home-page "https://ipython.org")
6794 (synopsis "Configuration system for Python applications")
6795 (description
6796 "Traitlets is a framework that lets Python classes have attributes with
6797type checking, dynamically calculated default values, and ‘on change’
6798callbacks. The package also includes a mechanism to use traitlets for
6799configuration, loading values from files or from command line arguments. This
6800is a distinct layer on top of traitlets, so you can use traitlets in your code
6801without using the configuration machinery.")
6802 (license license:bsd-3)))
6803
6804(define-public python2-traitlets
6805 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6806 (package
6807 (inherit traitlets)
6808 (propagated-inputs
6809 `(("python2-enum34" ,python2-enum34)
6810 ,@(package-propagated-inputs traitlets))))))
6811
6812(define-public python-jupyter-core
6813 (package
6814 (name "python-jupyter-core")
6815 (version "4.4.0")
6816 (source
6817 (origin
6818 (method url-fetch)
6819 (uri (string-append (pypi-uri "jupyter_core" version)))
6820 (sha256
6821 (base32
6822 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6823 (build-system python-build-system)
6824 ;; FIXME: not sure how to run the tests
6825 (arguments `(#:tests? #f))
6826 (propagated-inputs
6827 `(("python-traitlets" ,python-traitlets)))
6828 (home-page "http://jupyter.org/")
6829 (synopsis "Jupyter base package")
6830 (description
6831 "Jupyter core is the base package on which Jupyter projects rely.")
6832 (license license:bsd-3)))
6833
6834(define-public python2-jupyter-core
6835 (package-with-python2 python-jupyter-core))
6836
6837(define-public python-jupyter-client
6838 (package
6839 (name "python-jupyter-client")
6840 (version "5.2.4")
6841 (source
6842 (origin
6843 (method url-fetch)
6844 (uri (pypi-uri "jupyter_client" version))
6845 (sha256
6846 (base32
6847 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6848 (build-system python-build-system)
6849 ;; Tests fail because of missing native python kernel which I assume is
6850 ;; provided by the ipython package, which we cannot use because it would
6851 ;; cause a dependency cycle.
6852 (arguments
6853 `(#:tests? #f
6854
6855 #:phases (modify-phases %standard-phases
6856 (add-after 'unpack 'set-tool-file-names
6857 (lambda* (#:key inputs #:allow-other-keys)
6858 (let ((iproute (assoc-ref inputs "iproute")))
6859 (substitute* "jupyter_client/localinterfaces.py"
6860 (("'ip'")
6861 (string-append "'" iproute "/sbin/ip'")))
6862 #t))))))
6863 (inputs
6864 `(("iproute" ,iproute)))
6865 (propagated-inputs
6866 `(("python-pyzmq" ,python-pyzmq)
6867 ("python-traitlets" ,python-traitlets)
6868 ("python-jupyter-core" ,python-jupyter-core)))
6869 (home-page "http://jupyter.org/")
6870 (synopsis "Jupyter protocol implementation and client libraries")
6871 (description
6872 "The @code{jupyter_client} package contains the reference implementation
6873of the Jupyter protocol. It also provides client and kernel management APIs
6874for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6875installing @code{kernelspec}s for use with Jupyter frontends.")
6876 (license license:bsd-3)))
6877
6878(define-public python2-jupyter-client
6879 (package-with-python2 python-jupyter-client))
6880
6881(define-public python-ipykernel
6882 (package
6883 (name "python-ipykernel")
6884 (version "5.1.3")
6885 (source
6886 (origin
6887 (method url-fetch)
6888 (uri (pypi-uri "ipykernel" version))
6889 (sha256
6890 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6891 (build-system python-build-system)
6892 (arguments
6893 `(#:phases
6894 (modify-phases %standard-phases
6895 (replace 'check
6896 (lambda _
6897 (setenv "HOME" "/tmp")
6898 (invoke "pytest" "-v")
6899 #t))
6900 (add-after 'install 'set-python-file-name
6901 (lambda* (#:key outputs #:allow-other-keys)
6902 ;; Record the absolute file name of the 'python' executable in
6903 ;; 'kernel.json'.
6904 (let ((out (assoc-ref outputs "out")))
6905 (substitute* (string-append out "/share/jupyter"
6906 "/kernels/python3/kernel.json")
6907 (("\"python\"")
6908 (string-append "\"" (which "python") "\"")))
6909 #t))))))
6910 (propagated-inputs
6911 `(("python-ipython" ,python-ipython)
6912 ;; imported at runtime during connect
6913 ("python-jupyter-client" ,python-jupyter-client)))
6914 (native-inputs
6915 `(("python-flaky" ,python-flaky)
6916 ("python-nose" ,python-nose)
6917 ("python-pytest" ,python-pytest)))
6918 (home-page "https://ipython.org")
6919 (synopsis "IPython Kernel for Jupyter")
6920 (description
6921 "This package provides the IPython kernel for Jupyter.")
6922 (properties `((python2-variant . ,(delay python2-ipykernel))))
6923 (license license:bsd-3)))
6924
6925;; Version 5.x and above no longer support Python 2.
6926(define-public python2-ipykernel
6927 (package
6928 (name "python2-ipykernel")
6929 (version "4.10.1")
6930 (source
6931 (origin
6932 (method url-fetch)
6933 (uri (pypi-uri "ipykernel" version))
6934 (sha256
6935 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6936 (build-system python-build-system)
6937 (arguments
6938 `(#:python ,python-2))
6939 (propagated-inputs
6940 `(("python2-ipython" ,python2-ipython)
6941 ;; imported at runtime during connect
6942 ("python2-jupyter-client" ,python2-jupyter-client)
6943 ("python2-tornado" ,python2-tornado)
6944 ("python2-traitlets" ,python2-traitlets)))
6945 (native-inputs
6946 `(("python2-mock" ,python2-mock)
6947 ("python2-nose" ,python2-nose)
6948 ("python2-pytest" ,python2-pytest)
6949 ("python2-pytest-cov" ,python2-pytest-cov)))
6950 (home-page "https://ipython.org")
6951 (synopsis "IPython Kernel for Jupyter")
6952 (description
6953 "This package provides the IPython kernel for Jupyter.")
6954 (license license:bsd-3)))
6955
6956(define-public python-pari-jupyter
6957 (package
6958 (name "python-pari-jupyter")
6959 (version "1.3.2")
6960 (source
6961 (origin
6962 (method url-fetch)
6963 (uri (pypi-uri "pari_jupyter" version))
6964 (sha256
6965 (base32
6966 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6967 (build-system python-build-system)
6968 (propagated-inputs
6969 `(("python-ipykernel" ,python-ipykernel)))
6970 (inputs
6971 `(("pari-gp" ,pari-gp)
6972 ("readline" ,readline)))
6973 (arguments
6974 `(#:tests? #f)) ; no test suite
6975 (home-page
6976 "https://github.com/jdemeyer/pari_jupyter")
6977 (synopsis "A Jupyter kernel for PARI/GP")
6978 (description "The package provides a PARI/GP kernel for Jupyter.")
6979 (license license:gpl3+)))
6980
6981(define-public python-backcall
6982 (package
6983 (name "python-backcall")
6984 (version "0.1.0")
6985 (source
6986 (origin
6987 (method url-fetch)
6988 (uri (pypi-uri "backcall" version))
6989 (sha256
6990 (base32
6991 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
6992 (build-system python-build-system)
6993 (home-page "https://github.com/takluyver/backcall/")
6994 (synopsis "Specifications for callback functions passed in to an API")
6995 (description
6996 "If your code lets other people supply callback functions, it's important
6997to specify the function signature you expect, and check that functions support
6998that. Adding extra parameters later would break other peoples code unless
6999you're careful. The @code{backcall} package provides a way of specifying the
7000callback signature using a prototype function.")
7001 (license license:bsd-3)))
7002
7003(define-public python-ipython
7004 (package
7005 (name "python-ipython")
7006 (version "7.9.0")
7007 (source
7008 (origin
7009 (method url-fetch)
7010 (uri (pypi-uri "ipython" version ".tar.gz"))
7011 (sha256
7012 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7013 (build-system python-build-system)
7014 (propagated-inputs
7015 `(("python-backcall" ,python-backcall)
7016 ("python-pyzmq" ,python-pyzmq)
7017 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7018 ("python-terminado" ,python-terminado)
7019 ("python-matplotlib" ,python-matplotlib)
7020 ("python-numpy" ,python-numpy)
7021 ("python-numpydoc" ,python-numpydoc)
7022 ("python-jedi" ,python-jedi)
7023 ("python-jinja2" ,python-jinja2)
7024 ("python-mistune" ,python-mistune)
7025 ("python-pexpect" ,python-pexpect)
7026 ("python-pickleshare" ,python-pickleshare)
7027 ("python-simplegeneric" ,python-simplegeneric)
7028 ("python-jsonschema" ,python-jsonschema)
7029 ("python-traitlets" ,python-traitlets)
7030 ("python-nbformat" ,python-nbformat)
7031 ("python-pygments" ,python-pygments)))
7032 (inputs
7033 `(("readline" ,readline)
7034 ("which" ,which)))
7035 (native-inputs
7036 `(("graphviz" ,graphviz)
7037 ("pkg-config" ,pkg-config)
7038 ("python-requests" ,python-requests) ;; for tests
7039 ("python-testpath" ,python-testpath)
7040 ("python-nose" ,python-nose)))
7041 (arguments
7042 `(#:phases
7043 (modify-phases %standard-phases
7044 (add-after 'unpack 'make-docs-reproducible
7045 (lambda _
7046 (substitute* "IPython/sphinxext/ipython_directive.py"
7047 ((".*import datetime") "")
7048 ((".*datetime.datetime.now\\(\\)") "")
7049 (("%timeit") "# %timeit"))
7050 #t))
7051 ;; Tests can only be run after the library has been installed and not
7052 ;; within the source directory.
7053 (delete 'check)
7054 (add-after 'install 'check
7055 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7056 (if tests?
7057 (begin
7058 ;; Make installed package available for running the tests
7059 (add-installed-pythonpath inputs outputs)
7060 (setenv "HOME" "/tmp/") ;; required by a test
7061 ;; We only test the core because one of the other tests
7062 ;; tries to import ipykernel.
7063 (invoke "python" "IPython/testing/iptest.py"
7064 "-v" "IPython/core/tests"))
7065 #t)))
7066 (add-before 'check 'fix-tests
7067 (lambda* (#:key inputs #:allow-other-keys)
7068 (substitute* "./IPython/utils/_process_posix.py"
7069 (("/usr/bin/env', 'which") (which "which")))
7070 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7071 (("#!/usr/bin/env python")
7072 (string-append "#!" (which "python"))))
7073 ;; This test introduces a circular dependency on ipykernel
7074 ;; (which depends on ipython).
7075 (delete-file "IPython/core/tests/test_display.py")
7076 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7077 (delete-file "IPython/core/tests/test_interactiveshell.py")
7078 #t)))))
7079 (home-page "https://ipython.org")
7080 (synopsis "IPython is a tool for interactive computing in Python")
7081 (description
7082 "IPython provides a rich architecture for interactive computing with:
7083Powerful interactive shells, a browser-based notebook, support for interactive
7084data visualization, embeddable interpreters and tools for parallel
7085computing.")
7086 (properties `((python2-variant . ,(delay python2-ipython))))
7087 (license license:bsd-3)))
7088
7089;; This is the latest release of the LTS version of ipython with support for
7090;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7091;; dropped support for Python 2.7.
7092(define-public python2-ipython
7093 (package
7094 (name "python2-ipython")
7095 (version "5.8.0")
7096 (source
7097 (origin
7098 (method url-fetch)
7099 (uri (pypi-uri "ipython" version ".tar.gz"))
7100 (sha256
7101 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7102 (build-system python-build-system)
7103 (propagated-inputs
7104 `(("python2-backports-shutil-get-terminal-size"
7105 ,python2-backports-shutil-get-terminal-size)
7106 ("python2-pathlib2" ,python2-pathlib2)
7107 ("python2-pyzmq" ,python2-pyzmq)
7108 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7109 ("python2-terminado" ,python2-terminado)
7110 ("python2-matplotlib" ,python2-matplotlib)
7111 ("python2-numpy" ,python2-numpy)
7112 ("python2-numpydoc" ,python2-numpydoc)
7113 ("python2-jinja2" ,python2-jinja2)
7114 ("python2-mistune" ,python2-mistune)
7115 ("python2-pexpect" ,python2-pexpect)
7116 ("python2-pickleshare" ,python2-pickleshare)
7117 ("python2-simplegeneric" ,python2-simplegeneric)
7118 ("python2-jsonschema" ,python2-jsonschema)
7119 ("python2-traitlets" ,python2-traitlets)
7120 ("python2-nbformat" ,python2-nbformat)
7121 ("python2-pygments" ,python2-pygments)))
7122 (inputs
7123 `(("readline" ,readline)
7124 ("which" ,which)))
7125 (native-inputs
7126 `(("graphviz" ,graphviz)
7127 ("pkg-config" ,pkg-config)
7128 ("python2-requests" ,python2-requests) ;; for tests
7129 ("python2-testpath" ,python2-testpath)
7130 ("python2-mock" ,python2-mock)
7131 ("python2-nose" ,python2-nose)))
7132 (arguments
7133 `(#:python ,python-2
7134 #:phases
7135 (modify-phases %standard-phases
7136 (add-before 'check 'delete-broken-tests
7137 (lambda* (#:key inputs #:allow-other-keys)
7138 ;; These tests throw errors for unknown reasons.
7139 (delete-file "IPython/core/tests/test_displayhook.py")
7140 (delete-file "IPython/core/tests/test_magic_terminal.py")
7141 (delete-file "IPython/core/tests/test_profile.py")
7142 #t)))))
7143 (home-page "https://ipython.org")
7144 (synopsis "IPython is a tool for interactive computing in Python")
7145 (description
7146 "IPython provides a rich architecture for interactive computing with:
7147Powerful interactive shells, a browser-based notebook, support for interactive
7148data visualization, embeddable interpreters and tools for parallel
7149computing.")
7150 (license license:bsd-3)))
7151
7152(define-public python-ipython-documentation
7153 (package
7154 (inherit python-ipython)
7155 (name "python-ipython-documentation")
7156 (version (package-version python-ipython))
7157 (arguments
7158 `(#:phases
7159 (modify-phases %standard-phases
7160 (delete 'build)
7161 (delete 'check)
7162 (replace 'install
7163 (lambda* (#:key outputs #:allow-other-keys)
7164 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7165 (doc (string-append data "/doc/" ,name "-" ,version))
7166 (html (string-append doc "/html"))
7167 (man1 (string-append data "/man/man1"))
7168 (info (string-append data "/info"))
7169 (examples (string-append doc "/examples"))
7170 (python-arg (string-append "PYTHON=" (which "python"))))
7171 (setenv "LANG" "en_US.utf8")
7172 (with-directory-excursion "docs"
7173 ;; FIXME: pdf fails to build
7174 ;;(system* "make" "pdf" "PAPER=a4")
7175 (system* "make" python-arg "html")
7176 ;; FIXME: the generated texi file contains ^@^@, which trips
7177 ;; up the parser.
7178 ;; (system* "make" python-arg "info")
7179 )
7180 (copy-recursively "docs/man" man1)
7181 (copy-recursively "examples" examples)
7182 (copy-recursively "docs/build/html" html)
7183 ;; (copy-file "docs/build/latex/ipython.pdf"
7184 ;; (string-append doc "/ipython.pdf"))
7185 (mkdir-p info)
7186 ;; (copy-file "docs/build/texinfo/ipython.info"
7187 ;; (string-append info "/ipython.info"))
7188 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7189 #t)))))
7190 (inputs
7191 `(("python-ipython" ,python-ipython)
7192 ("python-ipykernel" ,python-ipykernel)))
7193 (native-inputs
7194 `(("python-sphinx" ,python-sphinx)
7195 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7196 ;; FIXME: It's possible that a smaller union would work just as well.
7197 ("texlive" ,(texlive-union (list texlive-amsfonts
7198 texlive-fonts-ec
7199 texlive-generic-ifxetex
7200 texlive-generic-pdftex
7201 texlive-latex-capt-of
7202 texlive-latex-cmap
7203 texlive-latex-environ
7204 texlive-latex-eqparbox
7205 texlive-latex-etoolbox
7206 texlive-latex-expdlist
7207 texlive-latex-fancyhdr
7208 texlive-latex-fancyvrb
7209 texlive-latex-fncychap
7210 texlive-latex-float
7211 texlive-latex-framed
7212 texlive-latex-geometry
7213 texlive-latex-graphics
7214 texlive-latex-hyperref
7215 texlive-latex-mdwtools
7216 texlive-latex-multirow
7217 texlive-latex-needspace
7218 texlive-latex-oberdiek
7219 texlive-latex-parskip
7220 texlive-latex-preview
7221 texlive-latex-tabulary
7222 texlive-latex-threeparttable
7223 texlive-latex-titlesec
7224 texlive-latex-trimspaces
7225 texlive-latex-ucs
7226 texlive-latex-upquote
7227 texlive-latex-url
7228 texlive-latex-varwidth
7229 texlive-latex-wrapfig)))
7230 ("texinfo" ,texinfo)))))
7231
7232(define-public python-urwid
7233 (package
7234 (name "python-urwid")
7235 (version "2.1.0")
7236 (source
7237 (origin
7238 (method url-fetch)
7239 (uri (pypi-uri "urwid" version))
7240 (sha256
7241 (base32
7242 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7243 (build-system python-build-system)
7244 (home-page "http://urwid.org")
7245 (synopsis "Console user interface library for Python")
7246 (description
7247 "Urwid is a curses-based UI/widget library for Python. It includes many
7248features useful for text console applications.")
7249 (license license:lgpl2.1+)))
7250
7251(define-public python2-urwid
7252 (package-with-python2 python-urwid))
7253
7254(define-public python-urwidtrees
7255 (package
7256 (name "python-urwidtrees")
7257 (version "1.0.2")
7258 (source
7259 (origin
7260 (method git-fetch)
7261 ;; package author intends on distributing via github rather than pypi:
7262 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7263 (uri (git-reference
7264 (url "https://github.com/pazz/urwidtrees")
7265 (commit version)))
7266 (file-name (git-file-name name version))
7267 (sha256
7268 (base32
7269 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7270 (build-system python-build-system)
7271 (arguments
7272 '(#:use-setuptools? #f
7273 #:tests? #f)) ; no tests
7274 (propagated-inputs `(("python-urwid" ,python-urwid)))
7275 (home-page "https://github.com/pazz/urwidtrees")
7276 (synopsis "Tree widgets for urwid")
7277 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7278toolkit. Use it to build trees of widgets.")
7279 (license license:gpl3+)))
7280
7281(define-public python2-urwidtrees
7282 (package-with-python2 python-urwidtrees))
7283
7284(define-public python-ua-parser
7285 (package
7286 (name "python-ua-parser")
7287 (version "0.8.0")
7288 (source
7289 (origin
7290 (method url-fetch)
7291 (uri (pypi-uri "ua-parser" version))
7292 (sha256
7293 (base32
7294 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7295 (build-system python-build-system)
7296 (arguments
7297 `(#:tests? #f)) ;no test suite in release
7298 (native-inputs
7299 `(("python-pyyaml" ,python-pyyaml)))
7300 (home-page "https://github.com/ua-parser/uap-python")
7301 (synopsis "User agent parser")
7302 (description
7303 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7304 (license license:asl2.0)))
7305
7306(define-public python2-ua-parser
7307 (package-with-python2 python-ua-parser))
7308
7309(define-public python-user-agents
7310 (package
7311 (name "python-user-agents")
7312 (version "1.1.0")
7313 (source
7314 (origin
7315 (method url-fetch)
7316 (uri (pypi-uri "user-agents" version))
7317 (sha256
7318 (base32
7319 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7320 (build-system python-build-system)
7321 (arguments
7322 `(#:tests? #f)) ;missing devices.json test file in release
7323 (propagated-inputs
7324 `(("python-ua-parser" ,python-ua-parser)))
7325 (home-page "https://github.com/selwin/python-user-agents")
7326 (synopsis "User Agent strings parsing library")
7327 (description
7328 "A library to identify devices (phones, tablets) and their capabilities by
7329parsing (browser/HTTP) user agent strings.")
7330 (license license:expat)))
7331
7332(define-public python2-user-agents
7333 (package-with-python2 python-user-agents))
7334
7335(define-public python-dbus
7336 (package
7337 (name "python-dbus")
7338 (version "1.2.16")
7339 (source
7340 (origin
7341 (method url-fetch)
7342 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7343 "dbus-python-" version ".tar.gz"))
7344 (sha256
7345 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7346 (build-system gnu-build-system)
7347 (native-inputs
7348 `(("pkg-config" ,pkg-config)))
7349 (inputs
7350 `(("python" ,python-wrapper)
7351 ("dbus-glib" ,dbus-glib)))
7352 (synopsis "Python bindings for D-bus")
7353 (description "python-dbus provides bindings for libdbus, the reference
7354implementation of D-Bus.")
7355 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7356 (license license:expat)))
7357
7358(define-public python2-dbus
7359 (package (inherit python-dbus)
7360 (name "python2-dbus")
7361 (inputs `(("python" ,python-2)
7362 ,@(alist-delete "python"
7363 (package-inputs python-dbus)
7364 equal?)))))
7365
7366(define-public python-notify2
7367 (package
7368 (name "python-notify2")
7369 (version "0.3.1")
7370 (source
7371 (origin
7372 (method url-fetch)
7373 (uri (pypi-uri "notify2" version))
7374 (sha256
7375 (base32
7376 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7377 (build-system python-build-system)
7378 (arguments `(#:tests? #f)) ; tests depend on system state
7379 (native-inputs
7380 `(("python-dbus" ,python-dbus)))
7381 (home-page "https://bitbucket.org/takluyver/pynotify2")
7382 (synopsis "Python interface to D-Bus notifications")
7383 (description
7384 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7385It is a reimplementation of pynotify in pure Python, and an alternative to
7386the GObject Introspection bindings to libnotify for non-GTK applications.")
7387 (license (list license:bsd-2
7388 license:lgpl2.1+))))
7389
7390(define-public python2-notify2
7391 (package-with-python2 python-notify2))
7392
7393;; beautifulsoup4 has a totally different namespace than 3.x,
7394;; and pypi seems to put it under its own name, so I guess we should too
7395(define-public python-beautifulsoup4
7396 (package
7397 (name "python-beautifulsoup4")
7398 (version "4.9.1")
7399 (source
7400 (origin
7401 (method url-fetch)
7402 (uri (pypi-uri "beautifulsoup4" version))
7403 (sha256
7404 (base32
7405 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7406 (build-system python-build-system)
7407 (arguments
7408 `(#:phases
7409 (modify-phases %standard-phases
7410 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7411 ;; must use this conversion script when building with Python 3. The
7412 ;; conversion script also runs the tests.
7413 ;; For more information, see the file 'convert-py3k' in the source
7414 ;; distribution.
7415 (replace 'check
7416 (lambda _ (invoke "./convert-py3k"))))))
7417 (propagated-inputs
7418 `(("python-soupsieve" ,python-soupsieve)))
7419 (home-page
7420 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7421 (synopsis
7422 "Python screen-scraping library")
7423 (description
7424 "Beautiful Soup is a Python library designed for rapidly setting up
7425screen-scraping projects. It offers Pythonic idioms for navigating,
7426searching, and modifying a parse tree, providing a toolkit for
7427dissecting a document and extracting what you need. It automatically
7428converts incoming documents to Unicode and outgoing documents to UTF-8.")
7429 (license license:expat)
7430 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7431
7432(define-public python2-beautifulsoup4
7433 (package
7434 (inherit (package-with-python2
7435 (strip-python2-variant python-beautifulsoup4)))
7436 (arguments `(#:python ,python-2))))
7437
7438(define-public python-soupsieve
7439 (package
7440 (name "python-soupsieve")
7441 (version "2.0.1")
7442 (source
7443 (origin
7444 (method url-fetch)
7445 (uri (pypi-uri "soupsieve" version))
7446 (sha256
7447 (base32
7448 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7449 (build-system python-build-system)
7450 (arguments `(#:tests? #f))
7451 ;;XXX: 2 tests fail currently despite claming they were to be
7452 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7453 ;;don't want to create a circular dependency.
7454 (home-page "https://github.com/facelessuser/soupsieve")
7455 (synopsis "CSS selector library")
7456 (description
7457 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7458Soup 4. It aims to provide selecting, matching, and filtering using modern
7459CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7460specifications up through the latest CSS level 4 drafts and beyond (though
7461some are not yet implemented).")
7462 (properties `((python2-variant . ,(delay python2-soupsieve))))
7463 (license license:expat)))
7464
7465;; This is the last version that supports python-2
7466(define-public python2-soupsieve
7467 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7468 (package
7469 (inherit base)
7470 (version "1.9.6")
7471 (source
7472 (origin
7473 (method url-fetch)
7474 (uri (pypi-uri "soupsieve" version))
7475 (sha256
7476 (base32
7477 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7478 (propagated-inputs
7479 `(("python2-backports-functools-lru-cache"
7480 ,python2-backports-functools-lru-cache)
7481 ,@(package-propagated-inputs base))))))
7482
7483(define-public python-netifaces
7484 (package
7485 (name "python-netifaces")
7486 (version "0.10.9")
7487 (source
7488 (origin
7489 (method url-fetch)
7490 (uri (pypi-uri "netifaces" version))
7491 (sha256
7492 (base32
7493 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7494 (build-system python-build-system)
7495 (home-page "https://github.com/al45tair/netifaces")
7496 (synopsis
7497 "Python module for portable network interface information")
7498 (description
7499 "Netifaces is a Python module providing information on network
7500interfaces in an easy and portable manner.")
7501 (license license:expat)))
7502
7503(define-public python2-netifaces
7504 (package-with-python2 python-netifaces))
7505
7506(define-public python-networkx
7507 (package
7508 (name "python-networkx")
7509 (version "2.5")
7510 (source
7511 (origin
7512 (method url-fetch)
7513 (uri (pypi-uri "networkx" version))
7514 (sha256
7515 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7516 (build-system python-build-system)
7517 (arguments
7518 '(#:phases (modify-phases %standard-phases
7519 (replace 'check
7520 (lambda* (#:key tests? #:allow-other-keys)
7521 (if tests?
7522 (invoke "pytest" "-vv" "--pyargs" "networkx")
7523 (format #t "test suite not run~%"))
7524 #t)))))
7525 ;; python-decorator is needed at runtime.
7526 (propagated-inputs
7527 `(("python-decorator" ,python-decorator)))
7528 (native-inputs
7529 `(("python-pytest" ,python-pytest)))
7530 (home-page "https://networkx.github.io/")
7531 (synopsis "Python module for creating and manipulating graphs and networks")
7532 (description
7533 "NetworkX is a Python package for the creation, manipulation, and study
7534of the structure, dynamics, and functions of complex networks.")
7535 (properties `((python2-variant . ,(delay python2-networkx))))
7536 (license license:bsd-3)))
7537
7538;; NetworkX 2.2 is the last version with support for Python 2.
7539(define-public python2-networkx
7540 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7541 (package
7542 (inherit base)
7543 (version "2.2")
7544 (source (origin
7545 (method url-fetch)
7546 (uri (pypi-uri "networkx" version ".zip"))
7547 (sha256
7548 (base32
7549 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7550 (arguments
7551 `(#:python ,python-2))
7552 (native-inputs
7553 `(("python-nose" ,python2-nose)
7554 ("unzip" ,unzip))))))
7555
7556(define-public python-datrie
7557 (package
7558 (name "python-datrie")
7559 (version "0.8.2")
7560 (source
7561 (origin
7562 (method url-fetch)
7563 (uri (pypi-uri "datrie" version))
7564 (sha256
7565 (base32
7566 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7567 (build-system python-build-system)
7568 (native-inputs
7569 `(("python-cython" ,python-cython)
7570 ("python-hypothesis" ,python-hypothesis)
7571 ("python-pytest" ,python-pytest)
7572 ("python-pytest-runner" ,python-pytest-runner)))
7573 (home-page "https://github.com/kmike/datrie")
7574 (synopsis "Fast, efficiently stored trie for Python")
7575 (description
7576 "This package provides a fast, efficiently stored trie implementation for
7577Python.")
7578 (license license:lgpl2.1+)))
7579
7580(define-public snakemake
7581 (package
7582 (name "snakemake")
7583 (version "5.7.1")
7584 (source
7585 (origin
7586 (method url-fetch)
7587 (uri (pypi-uri "snakemake" version))
7588 (sha256
7589 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7590 (build-system python-build-system)
7591 (arguments
7592 ;; TODO: Package missing test dependencies.
7593 '(#:tests? #f
7594 #:phases
7595 (modify-phases %standard-phases
7596 ;; For cluster execution Snakemake will call Python. Since there is
7597 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7598 ;; this by calling the snakemake wrapper instead.
7599 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7600 (lambda* (#:key outputs #:allow-other-keys)
7601 (substitute* "snakemake/executors.py"
7602 (("\\{sys.executable\\} -m snakemake")
7603 (string-append (assoc-ref outputs "out")
7604 "/bin/snakemake")))
7605 #t)))))
7606 (propagated-inputs
7607 `(("python-appdirs" ,python-appdirs)
7608 ("python-configargparse" ,python-configargparse)
7609 ("python-datrie" ,python-datrie)
7610 ("python-docutils" ,python-docutils)
7611 ("python-gitpython" ,python-gitpython)
7612 ("python-jinja2" ,python-jinja2)
7613 ("python-jsonschema" ,python-jsonschema)
7614 ("python-networkx" ,python-networkx)
7615 ("python-psutil" ,python-psutil)
7616 ("python-pyyaml" ,python-pyyaml)
7617 ("python-ratelimiter" ,python-ratelimiter)
7618 ("python-requests" ,python-requests)
7619 ("python-wrapt" ,python-wrapt)))
7620 (home-page "https://snakemake.readthedocs.io")
7621 (synopsis "Python-based execution environment for make-like workflows")
7622 (description
7623 "Snakemake aims to reduce the complexity of creating workflows by
7624providing a clean and modern domain specific specification language (DSL) in
7625Python style, together with a fast and comfortable execution environment.")
7626 (license license:expat)))
7627
7628(define-public python-pyqrcode
7629 (package
7630 (name "python-pyqrcode")
7631 (version "1.2.1")
7632 (source
7633 (origin
7634 (method url-fetch)
7635 (uri (pypi-uri "PyQRCode" version))
7636 (sha256
7637 (base32
7638 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7639 (build-system python-build-system)
7640 (home-page
7641 "https://github.com/mnooner256/pyqrcode")
7642 (synopsis "QR code generator")
7643 (description
7644 "Pyqrcode is a QR code generator written purely in Python with
7645SVG, EPS, PNG and terminal output.")
7646 (license license:bsd-3)))
7647
7648(define-public python-seaborn
7649 (package
7650 (name "python-seaborn")
7651 (version "0.10.0")
7652 (source
7653 (origin
7654 (method url-fetch)
7655 (uri (pypi-uri "seaborn" version))
7656 (sha256
7657 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7658 (build-system python-build-system)
7659 (arguments
7660 `(#:phases
7661 (modify-phases %standard-phases
7662 (add-before 'check 'start-xserver
7663 (lambda* (#:key inputs #:allow-other-keys)
7664 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7665 ;; There must be a running X server and make check doesn't
7666 ;; start one. Therefore we must do it.
7667 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7668 (setenv "DISPLAY" ":1")
7669 #t)))
7670 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7671 (propagated-inputs
7672 `(("python-pandas" ,python-pandas)
7673 ("python-matplotlib" ,python-matplotlib)
7674 ("python-numpy" ,python-numpy)
7675 ("python-scipy" ,python-scipy)))
7676 (native-inputs
7677 `(("python-pytest" ,python-pytest)
7678 ("xorg-server" ,xorg-server-for-tests)))
7679 (home-page "https://seaborn.pydata.org/")
7680 (synopsis "Statistical data visualization")
7681 (description
7682 "Seaborn is a library for making attractive and informative statistical
7683graphics in Python. It is built on top of matplotlib and tightly integrated
7684with the PyData stack, including support for numpy and pandas data structures
7685and statistical routines from scipy and statsmodels.")
7686 (properties `((python2-variant . ,(delay python2-seaborn))))
7687 (license license:bsd-3)))
7688
7689;; 0.9.1 is the last release with support for Python 2.
7690(define-public python2-seaborn
7691 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7692 (package
7693 (inherit base)
7694 (version "0.9.1")
7695 (source (origin
7696 (method url-fetch)
7697 (uri (pypi-uri "seaborn" version))
7698 (sha256
7699 (base32
7700 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7701
7702(define-public python-mpmath
7703 (package
7704 (name "python-mpmath")
7705 (version "1.1.0")
7706 (source (origin
7707 (method url-fetch)
7708 (uri (pypi-uri "mpmath" version))
7709 (file-name (git-file-name name version))
7710 (sha256
7711 (base32
7712 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7713 (build-system python-build-system)
7714 (native-inputs
7715 `(("python-pytest" ,python-pytest)))
7716 (arguments
7717 '(#:phases
7718 (modify-phases %standard-phases
7719 (replace 'check
7720 (lambda _
7721 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7722 (home-page "http://mpmath.org")
7723 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7724 (description
7725 "@code{mpmath} can be used as an arbitrary-precision substitute for
7726Python's float/complex types and math/cmath modules, but also does much
7727more advanced mathematics.")
7728 (license license:bsd-3)))
7729
7730(define-public python2-mpmath
7731 (package-with-python2 python-mpmath))
7732
7733(define-public python-bigfloat
7734 (package
7735 (name "python-bigfloat")
7736 (version "0.3.0")
7737 (source
7738 (origin
7739 (method url-fetch)
7740 (uri (pypi-uri "bigfloat" version))
7741 (sha256
7742 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7743 (build-system python-build-system)
7744 (inputs
7745 `(("mpfr" ,mpfr)))
7746 (home-page "https://github.com/mdickinson/bigfloat")
7747 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7748 (description
7749 "This package provides a Python interface to the MPFR library for
7750multiprecision arithmetic.")
7751 (license license:lgpl3+)))
7752
7753(define-public python2-bigfloat
7754 (package-with-python2 python-bigfloat))
7755
7756(define-public python-sympy
7757 (package
7758 (name "python-sympy")
7759 (version "1.6.2")
7760 (source
7761 (origin
7762 (method url-fetch)
7763 (uri (pypi-uri "sympy" version))
7764 (sha256
7765 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7766 (build-system python-build-system)
7767 (arguments
7768 `(#:phases
7769 (modify-phases %standard-phases
7770 (replace 'check
7771 (lambda* (#:key outputs #:allow-other-keys)
7772 (invoke
7773 (or (which "python3") (which "python"))
7774 "-c" "import sympy; sympy.test(\"/core\")"))))))
7775 (propagated-inputs
7776 `(("python-mpmath" ,python-mpmath)))
7777 (home-page "https://www.sympy.org/")
7778 (synopsis "Python library for symbolic mathematics")
7779 (description
7780 "SymPy is a Python library for symbolic mathematics. It aims to become a
7781full-featured computer algebra system (CAS) while keeping the code as simple
7782as possible in order to be comprehensible and easily extensible.")
7783 (license license:bsd-3)))
7784
7785(define-public python2-sympy
7786 (package
7787 (inherit (package-with-python2 python-sympy))
7788 (version "1.5.1") ; last release for python2
7789 (source
7790 (origin
7791 (method url-fetch)
7792 (uri (pypi-uri "sympy" version))
7793 (sha256
7794 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7795
7796(define-public python-q
7797 (package
7798 (name "python-q")
7799 (version "2.6")
7800 (source
7801 (origin
7802 (method url-fetch)
7803 (uri (pypi-uri "q" version))
7804 (sha256
7805 (base32
7806 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7807 (build-system python-build-system)
7808 (home-page "https://github.com/zestyping/q")
7809 (synopsis "Quick-and-dirty debugging output for tired programmers")
7810 (description
7811 "q is a Python module for \"print\" style of debugging Python code. It
7812provides convenient short API for print out of values, tracebacks, and
7813falling into the Python interpreter.")
7814 (license license:asl2.0)))
7815
7816(define-public python2-q
7817 (package-with-python2 python-q))
7818
7819(define-public python-xlib
7820 (package
7821 (name "python-xlib")
7822 (version "0.27")
7823 (source
7824 (origin
7825 (method git-fetch)
7826 (uri (git-reference
7827 (url "https://github.com/python-xlib/python-xlib")
7828 (commit version)))
7829 (file-name (git-file-name name version))
7830 (sha256
7831 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7832 (build-system python-build-system)
7833 (arguments
7834 `(#:phases
7835 (modify-phases %standard-phases
7836 (add-before 'check 'start-xserver
7837 (lambda* (#:key inputs #:allow-other-keys)
7838 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7839 ;; There must be a running X server and make check doesn't
7840 ;; start one. Therefore we must do it.
7841 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7842 (setenv "DISPLAY" ":1")
7843 #t))))))
7844 (native-inputs
7845 `(("python-mock" ,python-mock)
7846 ("python-setuptools-scm" ,python-setuptools-scm)
7847 ("python-six" ,python-six)
7848 ("xorg-server" ,xorg-server)))
7849 (home-page "https://github.com/python-xlib/python-xlib")
7850 (synopsis "Python X11 client library")
7851 (description
7852 "The Python X Library is intended to be a fully functional
7853X client library for Python programs. It is useful to implement
7854low-level X clients. It is written entirely in Python.")
7855 (license license:gpl2+)))
7856
7857(define-public python2-xlib
7858 (package-with-python2 python-xlib))
7859
7860(define-public python-singledispatch
7861 (package
7862 (name "python-singledispatch")
7863 (version "3.4.0.3")
7864 (source
7865 (origin
7866 (method url-fetch)
7867 (uri (pypi-uri "singledispatch" version))
7868 (sha256
7869 (base32
7870 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7871 (build-system python-build-system)
7872 (native-inputs
7873 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7874 (home-page
7875 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7876 (synopsis "Backport of singledispatch feature from Python 3.4")
7877 (description
7878 "This library brings functools.singledispatch from Python 3.4 to Python
78792.6-3.3.")
7880 (license license:expat)))
7881
7882(define-public python2-singledispatch
7883 (package-with-python2 python-singledispatch))
7884
7885;; the python- version can be removed with python-3.5
7886(define-public python-backports-abc
7887 (package
7888 (name "python-backports-abc")
7889 (version "0.5")
7890 (source
7891 (origin
7892 (method url-fetch)
7893 (uri (pypi-uri "backports_abc" version))
7894 (sha256
7895 (base32
7896 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7897 (build-system python-build-system)
7898 (home-page "https://github.com/cython/backports_abc")
7899 (synopsis "Backport of additions to the 'collections.abc' module")
7900 (description
7901 "Python-backports-abc provides a backport of additions to the
7902@code{collections.abc} module in Python-3.5.")
7903 (license license:psfl)))
7904
7905(define-public python2-backports-abc
7906 (package-with-python2 python-backports-abc))
7907
7908(define-public python-backports-csv
7909 (package
7910 (name "python-backports-csv")
7911 (version "1.0.7")
7912 (source
7913 (origin
7914 (method url-fetch)
7915 (uri (pypi-uri "backports.csv" version))
7916 (sha256
7917 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7918 (build-system python-build-system)
7919 (home-page "https://github.com/ryanhiebert/backports.csv")
7920 (synopsis "Backport of Python 3's csv module for Python 2")
7921 (description
7922 "Provides a backport of Python 3's @code{csv} module for parsing
7923comma separated values. The API of the @code{csv} module in Python 2
7924is drastically different from the @code{csv} module in Python 3.
7925This is due, for the most part, to the difference between str in
7926Python 2 and Python 3.")
7927 (license license:psfl)))
7928
7929(define-public python2-backports-csv
7930 (package-with-python2 python-backports-csv))
7931
7932(define-public python2-backports-shutil-get-terminal-size
7933 (package
7934 (name "python2-backports-shutil-get-terminal-size")
7935 (version "1.0.0")
7936 (source
7937 (origin
7938 (method url-fetch)
7939 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7940 (sha256
7941 (base32
7942 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7943 (build-system python-build-system)
7944 (arguments
7945 `(#:python ,python-2
7946 #:phases
7947 (modify-phases %standard-phases
7948 (replace 'check
7949 (lambda _
7950 (setenv "PYTHONPATH" (string-append "./build/lib:"
7951 (getenv "PYTHONPATH")))
7952 (invoke "py.test" "-v"))))))
7953 (native-inputs
7954 `(("python2-pytest" ,python2-pytest)))
7955 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7956 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7957 (description
7958 "This package provides a backport of the @code{get_terminal_size
7959function} from Python 3.3's @code{shutil}.
7960Unlike the original version it is written in pure Python rather than C,
7961so it might be a tiny bit slower.")
7962 (license license:expat)))
7963
7964(define-public python-waf
7965 (package
7966 (name "python-waf")
7967 (version "2.0.19")
7968 (source (origin
7969 (method url-fetch)
7970 (uri (string-append "https://waf.io/"
7971 "waf-" version ".tar.bz2"))
7972 (sha256
7973 (base32
7974 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7975 (build-system python-build-system)
7976 (arguments
7977 '(#:phases
7978 (modify-phases %standard-phases
7979 (replace 'build
7980 (lambda _
7981 ;; XXX: Find a way to add all extra tools.
7982 (let ((tools '("gccdeps"
7983 "clang_compilation_database")))
7984 (invoke "python" "waf-light" "configure" "build"
7985 (string-append "--tools="
7986 (string-join tools ","))))))
7987 (replace 'check
7988 (lambda _
7989 (invoke "python" "waf" "--version")))
7990 (replace 'install
7991 (lambda* (#:key outputs #:allow-other-keys)
7992 (let ((out (assoc-ref outputs "out")))
7993 (install-file "waf" (string-append out "/bin")))
7994 #t))
7995 ;; waf breaks when it is wrapped.
7996 (delete 'wrap))))
7997 (home-page "https://waf.io/")
7998 (synopsis "Python-based build system")
7999 (description
8000 "Waf is a Python-based framework for configuring, compiling and installing
8001applications.")
8002 (license license:bsd-3)))
8003
8004(define-public python2-waf
8005 (package-with-python2 python-waf))
8006
8007(define-public python-pyzmq
8008 (package
8009 (name "python-pyzmq")
8010 (version "17.1.2")
8011 (source
8012 (origin
8013 (method url-fetch)
8014 (uri (pypi-uri "pyzmq" version))
8015 (sha256
8016 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8017 (build-system python-build-system)
8018 (arguments
8019 `(#:configure-flags
8020 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8021 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8022 ;; --inplace' for 'python setup.py test' to work.
8023 #:tests? #f))
8024 (inputs
8025 `(("zeromq" ,zeromq)))
8026 (native-inputs
8027 `(("pkg-config" ,pkg-config)
8028 ("python-nose" ,python-nose)))
8029 (home-page "https://github.com/zeromq/pyzmq")
8030 (synopsis "Python bindings for 0MQ")
8031 (description
8032 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8033 (license license:bsd-4)))
8034
8035(define-public python2-pyzmq
8036 (package-with-python2 python-pyzmq))
8037
8038(define-public python-pep8
8039 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8040 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8041 ;; some dependents' test suites, and nothing more.
8042 (package
8043 (name "python-pep8")
8044 (version "1.7.0")
8045 (source
8046 (origin
8047 (method url-fetch)
8048 (uri (pypi-uri "pep8" version))
8049 (sha256
8050 (base32
8051 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8052 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8053 (build-system python-build-system)
8054 (home-page "https://pep8.readthedocs.org/")
8055 (synopsis "Python style guide checker")
8056 (description
8057 "This tools checks Python code against some of the style conventions in
8058PEP 8.")
8059 (license license:expat)))
8060
8061(define-public python2-pep8
8062 (package-with-python2 python-pep8))
8063
8064(define-public python-pep517
8065 (package
8066 (name "python-pep517")
8067 (version "0.8.2")
8068 (source
8069 (origin
8070 (method url-fetch)
8071 (uri (pypi-uri "pep517" version))
8072 (sha256
8073 (base32
8074 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8075 (build-system python-build-system)
8076 (arguments
8077 '(#:phases
8078 (modify-phases %standard-phases
8079 (replace 'check
8080 (lambda* (#:key tests? #:allow-other-keys)
8081 (delete-file "pytest.ini")
8082 ;; This test tries to connect to the internet
8083 (delete-file "tests/test_meta.py")
8084 (if tests?
8085 (invoke "pytest")
8086 #t))))))
8087 (native-inputs
8088 `(("python-mock" ,python-mock)
8089 ("python-pytest" ,python-pytest)
8090 ("python-testpath" ,python-testpath)))
8091 (propagated-inputs
8092 `(("python-toml" ,python-toml)
8093 ("python-wheel" ,python-wheel)))
8094 (home-page "https://github.com/pypa/pep517")
8095 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8096 (description
8097 "Wrappers to build Python packages using PEP 517 hooks.")
8098 (properties `((python2-variant . ,(delay python2-pep517))))
8099 (license license:expat)))
8100
8101;; Skip the tests so we don't create a cyclical dependency with pytest.
8102(define-public python2-pep517
8103 (let ((base (package-with-python2
8104 (strip-python2-variant python-pep517))))
8105 (package
8106 (inherit base)
8107 (name "python2-pep517")
8108 (arguments
8109 `(#:tests? #f
8110 ,@(package-arguments base)))
8111 (native-inputs `()))))
8112
8113(define-public python-pyflakes
8114 (package
8115 (name "python-pyflakes")
8116 (version "2.2.0")
8117 (source
8118 (origin
8119 (method url-fetch)
8120 (uri (pypi-uri "pyflakes" version))
8121 (sha256
8122 (base32
8123 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8124 (build-system python-build-system)
8125 (home-page
8126 "https://github.com/pyflakes/pyflakes")
8127 (synopsis "Passive checker of Python programs")
8128 (description
8129 "Pyflakes statically checks Python source code for common errors.")
8130 (license license:expat)))
8131
8132(define-public python2-pyflakes
8133 (package-with-python2 python-pyflakes))
8134
8135;; Flake8 2.6 requires an older version of pyflakes.
8136;; This should be removed ASAP.
8137(define-public python-pyflakes-1.2
8138 (package (inherit python-pyflakes)
8139 (version "1.2.3")
8140 (source
8141 (origin
8142 (method url-fetch)
8143 (uri (pypi-uri "pyflakes" version))
8144 (sha256
8145 (base32
8146 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
8147 (arguments
8148 '(#:phases
8149 (modify-phases %standard-phases
8150 ;; This one test fails.
8151 (replace 'check
8152 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
8153 (native-inputs
8154 `(("python-pytest" ,python-pytest)))))
8155
8156(define-public python-mccabe
8157 (package
8158 (name "python-mccabe")
8159 (version "0.6.1")
8160 (source
8161 (origin
8162 (method url-fetch)
8163 (uri (pypi-uri "mccabe" version))
8164 (sha256
8165 (base32
8166 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8167 (build-system python-build-system)
8168 (native-inputs
8169 `(("python-pytest" ,python-pytest-bootstrap)
8170 ("python-pytest-runner" ,python-pytest-runner)))
8171 (home-page "https://github.com/flintwork/mccabe")
8172 (synopsis "McCabe checker, plugin for flake8")
8173 (description
8174 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8175complexity of Python source code.")
8176 (license license:expat)))
8177
8178(define-public python2-mccabe
8179 (package-with-python2 python-mccabe))
8180
8181(define-public python-mccabe-0.2.1
8182 (package (inherit python-mccabe)
8183 (version "0.2.1")
8184 (source
8185 (origin
8186 (method url-fetch)
8187 (uri (pypi-uri "mccabe" version))
8188 (sha256
8189 (base32
8190 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
8191
8192(define-public python2-mccabe-0.2.1
8193 (package-with-python2 python-mccabe-0.2.1))
8194
8195;; Flake8 2.4.1 requires an older version of pep8.
8196;; This should be removed ASAP.
8197(define-public python-pep8-1.5.7
8198 (package (inherit python-pep8)
8199 (version "1.5.7")
8200 (source
8201 (origin
8202 (method url-fetch)
8203 (uri (pypi-uri "pep8" version))
8204 (sha256
8205 (base32
8206 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
8207 (arguments
8208 ;; XXX Tests not compatible with Python 3.5.
8209 '(#:tests? #f))))
8210
8211(define-public python2-pep8-1.5.7
8212 (package-with-python2 python-pep8-1.5.7))
8213
8214(define-public python-flake8
8215 (package
8216 (name "python-flake8")
8217 (version "3.8.4")
8218 (source (origin
8219 (method url-fetch)
8220 (uri (pypi-uri "flake8" version))
8221 (sha256
8222 (base32
8223 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8224 (build-system python-build-system)
8225 (arguments
8226 `(#:phases
8227 (modify-phases %standard-phases
8228 (delete 'check)
8229 (add-after 'install 'check
8230 (lambda* (#:key inputs outputs #:allow-other-keys)
8231 (add-installed-pythonpath inputs outputs)
8232 (invoke "pytest" "-v")
8233 #t)))))
8234 (propagated-inputs
8235 `(("python-pycodestyle" ,python-pycodestyle)
8236 ("python-entrypoints" ,python-entrypoints)
8237 ("python-pyflakes" ,python-pyflakes)
8238 ("python-mccabe" ,python-mccabe)))
8239 (native-inputs
8240 `(("python-mock" ,python-mock)
8241 ("python-pytest" ,python-pytest-bootstrap)))
8242 (home-page "https://gitlab.com/pycqa/flake8")
8243 (synopsis
8244 "The modular source code checker: pep8, pyflakes and co")
8245 (description
8246 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8247 (properties `((python2-variant . ,(delay python2-flake8))))
8248 (license license:expat)))
8249
8250(define-public python2-flake8
8251 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8252 (package (inherit base)
8253 (propagated-inputs
8254 `(("python2-configparser" ,python2-configparser)
8255 ("python2-enum34" ,python2-enum34)
8256 ("python2-functools32" ,python2-functools32)
8257 ("python2-typing" ,python2-typing)
8258 ,@(package-propagated-inputs base))))))
8259
8260;; python-hacking requires flake8 <2.7.0.
8261(define-public python-flake8-2.6
8262 (package
8263 (inherit python-flake8)
8264 (version "2.6.2")
8265 (source (origin
8266 (method url-fetch)
8267 (uri (pypi-uri "flake8" version))
8268 (sha256
8269 (base32
8270 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
8271 (arguments
8272 `(#:phases
8273 (modify-phases %standard-phases
8274 (add-after 'unpack 'use-later-pycodestyles
8275 (lambda __
8276 (substitute* '("flake8.egg-info/requires.txt"
8277 "setup.py")
8278 (("pycodestyle >= 2.0, < 2.1")
8279 "pycodestyle >= 2.0"))
8280 #t))
8281 (delete 'check)
8282 (add-after 'install 'check
8283 (lambda* (#:key inputs outputs #:allow-other-keys)
8284 (add-installed-pythonpath inputs outputs)
8285 (invoke "pytest" "-v")
8286 #t)))))
8287 (propagated-inputs
8288 `(("python-pep8" ,python-pep8)
8289 ("python-pycodestyle" ,python-pycodestyle)
8290 ("python-entrypoints" ,python-entrypoints)
8291 ("python-pyflakes" ,python-pyflakes-1.2)
8292 ("python-mccabe" ,python-mccabe)))))
8293
8294(define-public python-flake8-bugbear
8295 (package
8296 (name "python-flake8-bugbear")
8297 (version "20.1.4")
8298 (source
8299 (origin
8300 (method url-fetch)
8301 (uri (pypi-uri "flake8-bugbear" version))
8302 (sha256
8303 (base32
8304 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8305 (build-system python-build-system)
8306 (arguments
8307 '(#:phases
8308 (modify-phases %standard-phases
8309 (add-before 'check 'disable-test
8310 (lambda _
8311 ;; This test fails on slow computers.
8312 (substitute* "tests/test_bugbear.py"
8313 (("def test_does_not_crash_on_any_valid_code")
8314 "def _test_does_not_crash_on_any_valid_code")))))))
8315 (native-inputs
8316 `(("python-hypothesis" ,python-hypothesis)
8317 ("python-hypothesmith" ,python-hypothesmith)))
8318 (propagated-inputs
8319 `(("python-attrs" ,python-attrs)
8320 ("python-flake8" ,python-flake8)))
8321 (home-page "https://github.com/PyCQA/flake8-bugbear")
8322 (synopsis
8323 "Flake8 plugin for finding likely bugs and design problems in your program")
8324 (description
8325 "This package contains a plugin for Flake8 finding likely bugs and
8326design problems in your program. It contains warnings that don't belong
8327in pyflakes and pycodestyle.")
8328 (license license:expat)))
8329
8330(define-public python-flake8-polyfill
8331 (package
8332 (name "python-flake8-polyfill")
8333 (version "1.0.2")
8334 (source
8335 (origin
8336 (method url-fetch)
8337 (uri (pypi-uri "flake8-polyfill" version))
8338 (sha256
8339 (base32
8340 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8341 (build-system python-build-system)
8342 (arguments
8343 '(#:phases
8344 (modify-phases %standard-phases
8345 (replace 'check
8346 (lambda _
8347 ;; Be compatible with Pytest 4:
8348 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8349 (substitute* "setup.cfg"
8350 (("\\[pytest\\]")
8351 "[tool:pytest]"))
8352
8353 (setenv "PYTHONPATH"
8354 (string-append (getcwd) "/build/lib:"
8355 (getenv "PYTHONPATH")))
8356 (invoke "py.test" "-v"))))))
8357 (native-inputs
8358 `(("python-flake8" ,python-flake8)
8359 ("python-mock" ,python-mock)
8360 ("python-pep8" ,python-pep8)
8361 ("python-pycodestyle" ,python-pycodestyle)
8362 ("python-pytest" ,python-pytest)))
8363 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8364 (synopsis "Polyfill package for Flake8 plugins")
8365 (description
8366 "This package that provides some compatibility helpers for Flake8
8367plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8368 (license license:expat)))
8369
8370(define-public python2-flake8-polyfill
8371 (package-with-python2 python-flake8-polyfill))
8372
8373(define-public python-flake8-pyi
8374 (package
8375 (name "python-flake8-pyi")
8376 (version "20.5.0")
8377 (source
8378 (origin
8379 (method url-fetch)
8380 (uri (pypi-uri "flake8-pyi" version))
8381 (sha256
8382 (base32
8383 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8384 (build-system python-build-system)
8385 (propagated-inputs
8386 `(("python-attrs" ,python-attrs)
8387 ("python-flake8" ,python-flake8)
8388 ("python-pyflakes" ,python-pyflakes)))
8389 (home-page "https://github.com/ambv/flake8-pyi")
8390 (synopsis
8391 "Flake8 plugin that provides specializations for type hinting stub files")
8392 (description
8393 "This package contains a plugin that provides specializations for
8394type hinting stub files, especially interesting for linting typeshed. It
8395adds the @file{.pyi} extension to the default value of the @code{--filename}
8396command-line argument to Flake8. This means stubs are linted by default with
8397this plugin enabled, without needing to explicitly list every file. It
8398modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8399expressions after the entire file has been read. This enables support for
8400first-class forward references that stub files use.")
8401 (license license:expat)))
8402
8403(define-public python-flake8-pie
8404 (package
8405 (name "python-flake8-pie")
8406 (version "0.5.0")
8407 (source
8408 (origin
8409 (method url-fetch)
8410 (uri (pypi-uri "flake8-pie" version))
8411 (sha256
8412 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8413 (build-system python-build-system)
8414 (home-page "https://github.com/sbdchd/flake8-pie")
8415 (synopsis "Flake8 extension that implements lints")
8416 (description
8417 "This package provides a flake8 extension that implements miscellaneous
8418lints.")
8419 (license license:bsd-2)))
8420
8421(define-public python-autoflake
8422 (package
8423 (name "python-autoflake")
8424 (version "1.3.1")
8425 (source
8426 (origin
8427 (method url-fetch)
8428 (uri (pypi-uri "autoflake" version))
8429 (sha256
8430 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8431 (build-system python-build-system)
8432 (propagated-inputs
8433 `(("python-pyflakes" ,python-pyflakes)))
8434 (home-page "https://github.com/myint/autoflake")
8435 (synopsis "Removes unused imports and unused variables")
8436 (description
8437 "@code{autoflake} removes unused imports and unused variables from Python
8438code as reported by @code{pyflakes}.
8439
8440By default, it only removes unused imports for modules that are part of the
8441standard library. Removal of unused variables is also disabled by default.
8442It also removes useless @code{pass} statements.")
8443 (license license:expat)))
8444
8445(define-public python-mistune
8446 (package
8447 (name "python-mistune")
8448 (version "0.8.4")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "mistune" version))
8453 (sha256
8454 (base32
8455 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8456 (build-system python-build-system)
8457 (native-inputs
8458 `(("python-nose" ,python-nose)
8459 ("python-cython" ,python-cython)))
8460 (home-page "https://github.com/lepture/mistune")
8461 (synopsis "Markdown parser in pure Python")
8462 (description "This package provides a fast markdown parser in pure
8463Python.")
8464 (license license:bsd-3)))
8465
8466(define-public python2-mistune
8467 (package-with-python2 python-mistune))
8468
8469(define-public python-markdown
8470 (package
8471 (name "python-markdown")
8472 (version "3.2.1")
8473 (source
8474 (origin
8475 (method url-fetch)
8476 (uri (pypi-uri "Markdown" version))
8477 (sha256
8478 (base32
8479 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8480 (build-system python-build-system)
8481 (native-inputs
8482 `(("python-nose" ,python-nose)
8483 ("python-pyyaml" ,python-pyyaml)))
8484 (home-page "https://python-markdown.github.io/")
8485 (synopsis "Python implementation of Markdown")
8486 (description
8487 "This package provides a Python implementation of John Gruber's
8488Markdown. The library features international input, various Markdown
8489extensions, and several HTML output formats. A command line wrapper
8490markdown_py is also provided to convert Markdown files to HTML.")
8491 (properties `((python2-variant . ,(delay python2-markdown))))
8492 (license license:bsd-3)))
8493
8494;; Markdown 3.2 dropped support for Python 2.
8495(define-public python2-markdown
8496 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8497 (package/inherit
8498 base
8499 (version "3.1.1")
8500 (source (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "Markdown" version))
8503 (sha256
8504 (base32
8505 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8506
8507(define-public python-ptyprocess
8508 (package
8509 (name "python-ptyprocess")
8510 (version "0.5.2")
8511 (source
8512 (origin
8513 (method url-fetch)
8514 (uri (pypi-uri "ptyprocess" version))
8515 (sha256
8516 (base32
8517 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8518 (build-system python-build-system)
8519 (native-inputs
8520 `(("python-nose" ,python-nose)))
8521 (arguments
8522 `(#:phases
8523 (modify-phases %standard-phases
8524 (replace 'check
8525 (lambda _ (invoke "nosetests"))))))
8526 (home-page "https://github.com/pexpect/ptyprocess")
8527 (synopsis "Run a subprocess in a pseudo terminal")
8528 (description
8529 "This package provides a Python library used to launch a subprocess in a
8530pseudo terminal (pty), and interact with both the process and its pty.")
8531 (license license:isc)))
8532
8533(define-public python2-ptyprocess
8534 (package-with-python2 python-ptyprocess))
8535
8536(define-public python-cram
8537 (package
8538 (name "python-cram")
8539 (version "0.7")
8540 (home-page "https://bitheap.org/cram/")
8541 (source (origin
8542 (method url-fetch)
8543 (uri (list (string-append home-page "cram-"
8544 version ".tar.gz")
8545 (pypi-uri "cram" version)))
8546 (sha256
8547 (base32
8548 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8549 (arguments
8550 '(#:phases
8551 (modify-phases %standard-phases
8552 (add-after 'unpack 'patch-source
8553 (lambda _
8554 (substitute* (find-files "cram" ".*\\.py$")
8555 ;; Replace default shell path.
8556 (("/bin/sh") (which "sh")))
8557 (substitute* (find-files "tests" ".*\\.t$")
8558 (("md5") "md5sum")
8559 (("/bin/bash") (which "bash"))
8560 (("/bin/sh") (which "sh")))
8561 (substitute* "cram/_test.py"
8562 ;; This hack works around a bug triggered by substituting
8563 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8564 ;; "cram -h", which breaks the output at 80 characters. This
8565 ;; causes the line showing the default shell to break into two
8566 ;; lines, but the test expects a single line...
8567 (("env\\['COLUMNS'\\] = '80'")
8568 "env['COLUMNS'] = '160'"))
8569
8570 (substitute* "Makefile"
8571 ;; Recent versions of python-coverage have caused the test
8572 ;; coverage to decrease (as of version 0.7). Allow that.
8573 (("--fail-under=100")
8574 "--fail-under=90"))
8575
8576 #t))
8577 (replace 'check
8578 ;; The test phase uses the built library and executable.
8579 (lambda* (#:key inputs outputs #:allow-other-keys)
8580 (add-installed-pythonpath inputs outputs)
8581 (setenv "PATH" (string-append (getenv "PATH") ":"
8582 (assoc-ref outputs "out") "/bin"))
8583 (invoke "make" "test"))))))
8584 (build-system python-build-system)
8585 (native-inputs
8586 `(("python-coverage" ,python-coverage)
8587 ("which" ,which)))
8588 (synopsis "Simple testing framework for command line applications")
8589 (description
8590 "Cram is a functional testing framework for command line applications.
8591Cram tests look like snippets of interactive shell sessions. Cram runs each
8592command and compares the command output in the test with the command’s actual
8593output.")
8594 (license license:gpl2+)))
8595
8596(define-public python2-cram
8597 (package-with-python2 python-cram))
8598
8599(define-public python-crashtest
8600 (package
8601 (name "python-crashtest")
8602 (version "0.3.1")
8603 (source
8604 (origin
8605 (method url-fetch)
8606 (uri (pypi-uri "crashtest" version))
8607 (sha256
8608 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8609 (build-system python-build-system)
8610 (home-page "https://github.com/sdispater/crashtest")
8611 (synopsis "Manage Python errors with ease")
8612 (description
8613 "Python library that makes exceptions handling and inspection easier.")
8614 (license license:expat)))
8615
8616(define-public python-straight-plugin
8617 (package
8618 (name "python-straight-plugin")
8619 (version "1.4.1")
8620 (source
8621 (origin
8622 (method url-fetch)
8623 (uri (pypi-uri "straight.plugin" version))
8624 (sha256
8625 (base32
8626 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8627 (build-system python-build-system)
8628 (home-page "https://github.com/ironfroggy/straight.plugin")
8629 (synopsis "Simple namespaced plugin facility")
8630 (description "Straight Plugin provides a type of plugin you can create from
8631almost any existing Python modules, and an easy way for outside developers to
8632add functionality and customization to your projects with their own plugins.")
8633 (license license:expat)))
8634
8635(define-public python2-straight-plugin
8636 (package-with-python2 python-straight-plugin))
8637
8638(define-public python-fonttools
8639 (package
8640 (name "python-fonttools")
8641 (version "4.6.0")
8642 (source (origin
8643 (method url-fetch)
8644 (uri (pypi-uri "fonttools" version ".zip"))
8645 (sha256
8646 (base32
8647 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8648 (build-system python-build-system)
8649 (native-inputs
8650 `(("unzip" ,unzip)
8651 ("python-pytest" ,python-pytest)
8652 ("python-pytest-runner" ,python-pytest-runner)))
8653 (home-page "https://github.com/fonttools/fonttools")
8654 (synopsis "Tools to manipulate font files")
8655 (description
8656 "FontTools/TTX is a library to manipulate font files from Python. It
8657supports reading and writing of TrueType/OpenType fonts, reading and writing
8658of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8659also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8660from an XML-based format.")
8661 (license license:expat)))
8662
8663;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8664(define-public python2-fonttools
8665 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8666 (package/inherit
8667 base
8668 (version "3.44.0")
8669 (source (origin
8670 (method url-fetch)
8671 (uri (pypi-uri "fonttools" version ".zip"))
8672 (sha256
8673 (base32
8674 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8675
8676(define-public python-ly
8677 (package
8678 (name "python-ly")
8679 (version "0.9.5")
8680 (source
8681 (origin
8682 (method url-fetch)
8683 (uri (pypi-uri name version))
8684 (sha256
8685 (base32
8686 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8687 (build-system python-build-system)
8688 (arguments
8689 ;; FIXME: Some tests need network access.
8690 '(#:tests? #f))
8691 (synopsis "Tool and library for manipulating LilyPond files")
8692 (description "This package provides a Python library to parse, manipulate
8693or create documents in LilyPond format. A command line program ly is also
8694provided that can be used to do various manipulations with LilyPond files.")
8695 (home-page "https://pypi.org/project/python-ly/")
8696 (license license:gpl2+)))
8697
8698(define-public python-appdirs
8699 (package
8700 (name "python-appdirs")
8701 (version "1.4.3")
8702 (source
8703 (origin
8704 (method url-fetch)
8705 (uri (pypi-uri "appdirs" version))
8706 (sha256
8707 (base32
8708 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8709 (build-system python-build-system)
8710 (home-page "https://github.com/ActiveState/appdirs")
8711 (synopsis
8712 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8713 (description
8714 "This module provides a portable way of finding out where user data
8715should be stored on various operating systems.")
8716 (license license:expat)))
8717
8718(define-public python2-appdirs
8719 (package-with-python2 python-appdirs))
8720
8721(define-public python-llfuse
8722 (package
8723 (name "python-llfuse")
8724 (version "1.3.6")
8725 (source (origin
8726 (method url-fetch)
8727 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8728 (sha256
8729 (base32
8730 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8731 (build-system python-build-system)
8732 (inputs
8733 `(("fuse" ,fuse)
8734 ("attr" ,attr)))
8735 (native-inputs
8736 `(("pkg-config" ,pkg-config)))
8737 (synopsis "Python bindings for FUSE")
8738 (description
8739 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8740 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8741 (license license:lgpl2.0+)
8742 (properties `((python2-variant . ,(delay python2-llfuse))))))
8743
8744(define-public python2-llfuse
8745 (package (inherit (package-with-python2
8746 (strip-python2-variant python-llfuse)))
8747 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8748
8749;; For attic-0.16
8750(define-public python-llfuse-0.41
8751 (package (inherit python-llfuse)
8752 (version "0.41.1")
8753 (source (origin
8754 (method url-fetch)
8755 (uri (string-append
8756 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8757 "llfuse-" version ".tar.bz2"))
8758 (sha256
8759 (base32
8760 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8761 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8762 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8763 (license (list license:expat license:lgpl2.0+))))
8764
8765(define-public python-msgpack
8766 (package
8767 (name "python-msgpack")
8768 (version "1.0.0")
8769 (source (origin
8770 (method url-fetch)
8771 (uri (pypi-uri "msgpack" version))
8772 (sha256
8773 (base32
8774 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8775 (build-system python-build-system)
8776 (arguments
8777 `(#:modules ((guix build utils)
8778 (guix build python-build-system)
8779 (ice-9 ftw)
8780 (srfi srfi-1)
8781 (srfi srfi-26))
8782 #:phases
8783 (modify-phases %standard-phases
8784 (replace 'check
8785 (lambda _
8786 (let ((cwd (getcwd)))
8787 (setenv "PYTHONPATH"
8788 (string-append cwd "/build/"
8789 (find (cut string-prefix? "lib" <>)
8790 (scandir (string-append cwd "/build")))
8791 ":"
8792 (getenv "PYTHONPATH")))
8793 (invoke "pytest" "-v" "test")))))))
8794 (native-inputs
8795 `(("python-pytest" ,python-pytest)))
8796 (synopsis "MessagePack (de)serializer")
8797 (description "MessagePack is a fast, compact binary serialization format,
8798suitable for similar data to JSON. This package provides CPython bindings for
8799reading and writing MessagePack data.")
8800 (home-page "https://pypi.org/project/msgpack/")
8801 (license license:asl2.0)))
8802
8803;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8804;; release 0.5. Some packages like borg still call it by the old name for now.
8805;; <https://bugs.gnu.org/30662>
8806(define-public python-msgpack-transitional
8807 (package
8808 (inherit python-msgpack)
8809 (name "python-msgpack-transitional")
8810 (version "0.5.6")
8811 (source (origin
8812 (method url-fetch)
8813 (uri (pypi-uri "msgpack" version))
8814 (sha256
8815 (base32
8816 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8817 (arguments
8818 (substitute-keyword-arguments (package-arguments python-msgpack)
8819 ((#:phases phases)
8820 `(modify-phases ,phases
8821 (add-after 'unpack 'configure-transitional
8822 (lambda _
8823 ;; Keep using the old name.
8824 (substitute* "setup.py"
8825 (("TRANSITIONAL = False")
8826 "TRANSITIONAL = 1"))
8827 #t))))))))
8828
8829(define-public python2-msgpack
8830 (package-with-python2 python-msgpack))
8831
8832(define-public python-netaddr
8833 (package
8834 (name "python-netaddr")
8835 (version "0.7.19")
8836 (source
8837 (origin
8838 (method url-fetch)
8839 (uri (pypi-uri "netaddr" version))
8840 (sha256
8841 (base32
8842 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8843 (build-system python-build-system)
8844 (arguments `(#:tests? #f)) ;; No tests.
8845 (home-page "https://github.com/drkjam/netaddr/")
8846 (synopsis "Pythonic manipulation of network addresses")
8847 (description
8848 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8849and MAC network addresses.")
8850 (license license:bsd-3)))
8851
8852(define-public python2-netaddr
8853 (package-with-python2 python-netaddr))
8854
8855(define-public python2-pyroute2
8856 (package
8857 (name "python2-pyroute2")
8858 (version "0.5.6")
8859 (source
8860 (origin
8861 (method url-fetch)
8862 (uri (pypi-uri "pyroute2" version))
8863 (sha256
8864 (base32
8865 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8866 (build-system python-build-system)
8867 (arguments
8868 `(#:python ,python-2)) ;Python 3.x is not supported
8869 (home-page "https://github.com/svinota/pyroute2")
8870 (synopsis "Python netlink library")
8871 (description
8872 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8873Supported netlink families and protocols include:
8874@itemize
8875@item rtnl, network settings - addresses, routes, traffic controls
8876@item nfnetlink - netfilter API: ipset, nftables, ...
8877@item ipq - simplest userspace packet filtering, iptables QUEUE target
8878@item devlink - manage and monitor devlink-enabled hardware
8879@item generic - generic netlink families
8880 @itemize
8881 @item nl80211 - wireless functions API (basic support)
8882 @item taskstats - extended process statistics
8883 @item acpi_events - ACPI events monitoring
8884 @item thermal_events - thermal events monitoring
8885 @item VFS_DQUOT - disk quota events monitoring
8886 @end itemize
8887@end itemize")
8888 (license license:gpl2+)))
8889
8890(define-public python-wrapt
8891 (package
8892 (name "python-wrapt")
8893 (version "1.11.2")
8894 (source
8895 (origin
8896 (method url-fetch)
8897 (uri (pypi-uri "wrapt" version))
8898 (sha256
8899 (base32
8900 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8901 (build-system python-build-system)
8902 (arguments
8903 ;; Tests are not included in the tarball, they are only available in the
8904 ;; git repository.
8905 `(#:tests? #f))
8906 (home-page "https://github.com/GrahamDumpleton/wrapt")
8907 (synopsis "Module for decorators, wrappers and monkey patching")
8908 (description
8909 "The aim of the wrapt module is to provide a transparent object proxy for
8910 Python, which can be used as the basis for the construction of function
8911 wrappers and decorator functions.")
8912 (license license:bsd-2)))
8913
8914(define-public python2-wrapt
8915 (package-with-python2 python-wrapt))
8916
8917(define-public python-xlrd
8918 (package
8919 (name "python-xlrd")
8920 (version "1.2.0")
8921 (source (origin
8922 (method url-fetch)
8923 (uri (pypi-uri "xlrd" version))
8924 (sha256
8925 (base32
8926 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8927 (build-system python-build-system)
8928 (arguments
8929 `(#:phases
8930 (modify-phases %standard-phases
8931 ;; Some tests depend on writing a temporary file to the user's home
8932 ;; directory.
8933 (add-after 'unpack 'fix-tests
8934 (lambda _
8935 (delete-file "tests/test_open_workbook.py")
8936 #t)))))
8937 (home-page "http://www.python-excel.org/")
8938 (synopsis "Library for extracting data from Excel files")
8939 (description "This package provides a library to extract data from
8940spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8941@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8942Unicode-aware. It is not intended as an end-user tool.")
8943 (license license:bsd-3)))
8944
8945(define-public python2-xlrd
8946 (package-with-python2 python-xlrd))
8947
8948(define-public python-immutables
8949 (package
8950 (name "python-immutables")
8951 (version "0.14")
8952 (source
8953 (origin
8954 (method url-fetch)
8955 (uri (pypi-uri "immutables" version))
8956 (sha256
8957 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
8958 (build-system python-build-system)
8959 (home-page "https://github.com/MagicStack/immutables")
8960 (synopsis "High-performance immutable mapping type for Python")
8961 (description
8962 "An immutable mapping type for Python. The underlying datastructure is a
8963Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
8964functional languages.")
8965 (license license:asl2.0)))
8966
8967(define-public python-prettytable
8968 (package
8969 (name "python-prettytable")
8970 (version "0.7.2")
8971 (source
8972 (origin
8973 (method url-fetch)
8974 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8975 (sha256
8976 (base32
8977 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8978 (build-system python-build-system)
8979 (home-page "https://code.google.com/archive/p/prettytable/")
8980 (synopsis "Display tabular data in an ASCII table format")
8981 (description
8982 "A library designed to represent tabular data in visually appealing ASCII
8983tables. PrettyTable allows for selection of which columns are to be printed,
8984independent alignment of columns (left or right justified or centred) and
8985printing of sub-tables by specifying a row range.")
8986 (license license:bsd-3)))
8987
8988(define-public python2-prettytable
8989 (package-with-python2 python-prettytable))
8990
8991(define-public python-curio
8992 (package
8993 (name "python-curio")
8994 (version "1.2")
8995 (source
8996 (origin
8997 (method url-fetch)
8998 (uri (pypi-uri "curio" version))
8999 (sha256
9000 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9001 (build-system python-build-system)
9002 (arguments
9003 `(#:phases
9004 (modify-phases %standard-phases
9005 (replace 'check
9006 (lambda* (#:key inputs outputs #:allow-other-keys)
9007 (add-installed-pythonpath inputs outputs)
9008 (invoke "pytest" "-vv" "-k"
9009 ;; Tries to open an outgoing connection.
9010 "not test_ssl_outgoing"))))))
9011 (native-inputs
9012 `(("python-pytest" ,python-pytest)))
9013 (home-page "https://github.com/dabeaz/curio")
9014 (synopsis "Coroutine-based library for concurrent Python")
9015 (description
9016 "Curio is a coroutine-based library for concurrent Python systems
9017programming. It provides standard programming abstractions such as as
9018tasks, sockets, files, locks, and queues.")
9019 (license license:bsd-3)))
9020
9021(define-public python-tables
9022 (package
9023 (name "python-tables")
9024 (version "3.6.1")
9025 (source
9026 (origin
9027 (method url-fetch)
9028 (uri (pypi-uri "tables" version))
9029 (sha256
9030 (base32
9031 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9032 (modules '((guix build utils)))
9033 (snippet
9034 '(begin
9035 ;; Remove pre-compiled .pyc files from source.
9036 (for-each delete-file-recursively
9037 (find-files "." "__pycache__" #:directories? #t))
9038 (for-each delete-file (find-files "." "\\.pyc$"))
9039 #t))))
9040 (build-system python-build-system)
9041 (arguments
9042 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9043 ;; or "check", so we must override the build and check phases.
9044 #:phases
9045 (modify-phases %standard-phases
9046 (add-after 'unpack 'use-gcc
9047 (lambda _
9048 (substitute* "setup.py"
9049 (("^( +)compiler = new_compiler\\(\\)" line indent)
9050 (string-append line
9051 "\n"
9052 indent
9053 "compiler.set_executables(compiler='gcc',"
9054 "compiler_so='gcc',"
9055 "linker_exe='gcc',"
9056 "linker_so='gcc -shared')")))
9057 #t))
9058 (add-after 'unpack 'disable-tuning
9059 (lambda _
9060 (substitute* "setup.py"
9061 (("cpu_flags = .*")
9062 "cpu_flags = ['sse2']\n"))
9063 #t))
9064 (replace 'build
9065 (lambda* (#:key inputs #:allow-other-keys)
9066 (invoke "python" "setup.py" "build"
9067 (string-append "--hdf5="
9068 (assoc-ref inputs "hdf5")))))
9069 (replace 'check
9070 (lambda* (#:key inputs #:allow-other-keys)
9071 (invoke "python" "setup.py" "check"
9072 (string-append "--hdf5="
9073 (assoc-ref inputs "hdf5"))))))))
9074 (propagated-inputs
9075 `(("python-numexpr" ,python-numexpr)
9076 ("python-numpy" ,python-numpy)))
9077 (native-inputs
9078 `(("python-cython" ,python-cython)
9079 ("pkg-config" ,pkg-config)))
9080 (inputs
9081 `(("hdf5" ,hdf5-1.10)
9082 ("bzip2" ,bzip2)
9083 ("zlib" ,zlib)))
9084 (home-page "https://www.pytables.org/")
9085 (synopsis "Hierarchical datasets for Python")
9086 (description "PyTables is a package for managing hierarchical datasets and
9087designed to efficiently cope with extremely large amounts of data.")
9088 (license license:bsd-3)))
9089
9090(define-public python2-tables
9091 (package-with-python2 python-tables))
9092
9093(define-public python-sniffio
9094 (package
9095 (name "python-sniffio")
9096 (version "1.1.0")
9097 (source
9098 (origin
9099 (method url-fetch)
9100 (uri (pypi-uri "sniffio" version))
9101 (sha256
9102 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9103 (build-system python-build-system)
9104 (arguments
9105 `(#:phases
9106 (modify-phases %standard-phases
9107 (replace 'check
9108 (lambda _
9109 (invoke "pytest" "-vv"))))))
9110 (native-inputs
9111 `(("python-curio" ,python-curio)
9112 ("python-pytest" ,python-pytest)
9113 ("python-pytest-cov" ,python-pytest-cov)))
9114 (home-page "https://github.com/python-trio/sniffio")
9115 (synopsis "Detect which async library a program is running under")
9116 (description "This package detects which async library a program is
9117running under. It supports multiple async I/O packages, like Trio, and
9118asyncio.")
9119 ;; Either license applies.
9120 (license (list license:expat license:asl2.0))))
9121
9122(define-public python-pytest-black
9123 (package
9124 (name "python-pytest-black")
9125 (version "0.3.8")
9126 (source
9127 (origin
9128 (method url-fetch)
9129 (uri (pypi-uri "pytest-black" version))
9130 (sha256
9131 (base32
9132 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9133 (build-system python-build-system)
9134 (propagated-inputs
9135 `(("python-pytest" ,python-pytest)
9136 ("python-black" ,python-black)
9137 ("python-toml" ,python-toml)))
9138 (native-inputs
9139 `(("python-setuptools-scm" ,python-setuptools-scm)))
9140 (home-page "https://github.com/shopkeep/pytest-black")
9141 (synopsis "Pytest plugin to enable format checking with black")
9142 (description
9143 "This package provides a pytest plugin to enable format checking with the
9144Python code formatter \"black\".")
9145 (license license:expat)))
9146
9147(define-public python-get-version
9148 (package
9149 (name "python-get-version")
9150 (version "2.1")
9151 (source
9152 (origin
9153 (method url-fetch)
9154 (uri (pypi-uri "get_version" version))
9155 (sha256
9156 (base32
9157 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9158 (build-system python-build-system)
9159 (propagated-inputs
9160 `(("python-pygments" ,python-pygments)
9161 ("python-pytest" ,python-pytest)
9162 ("python-pytest-black" ,python-pytest-black)
9163 ("python-pytest-cov" ,python-pytest-cov)
9164 ("python-setuptools" ,python-setuptools)
9165 ("python-testpath" ,python-testpath)))
9166 (home-page "https://github.com/flying-sheep/get_version")
9167 (synopsis "Version helper in the spirit of versioneer")
9168 (description
9169 "This package provides a version helper that lets you automatically use
9170the latest @code{vX.X.X} Git tag as the version in your Python package. It
9171also supports getting the version from Python source distributions or, once
9172your package is installed, via @code{pkg_resources} (part of
9173@code{setuptools}).")
9174 (license license:gpl3+)))
9175
9176(define-public python-legacy-api-wrap
9177 (package
9178 (name "python-legacy-api-wrap")
9179 (version "1.2")
9180 (source
9181 (origin
9182 (method url-fetch)
9183 (uri (pypi-uri "legacy-api-wrap" version))
9184 (sha256
9185 (base32
9186 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9187 (build-system python-build-system)
9188 (propagated-inputs
9189 `(("python-get-version" ,python-get-version)
9190 ("python-pytest" ,python-pytest)
9191 ("python-pytest-black" ,python-pytest-black)
9192 ("python-pytest-cov" ,python-pytest-cov)
9193 ("python-setuptools" ,python-setuptools)))
9194 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9195 (synopsis "Legacy API wrapper")
9196 (description "This module defines a decorator to wrap legacy APIs. The
9197primary use case is APIs defined before keyword-only parameters existed.")
9198 (license license:gpl3+)))
9199
9200(define-public python-pyasn1
9201 (package
9202 (name "python-pyasn1")
9203 (version "0.4.8")
9204 (source
9205 (origin
9206 (method url-fetch)
9207 (uri (pypi-uri "pyasn1" version))
9208 (sha256
9209 (base32
9210 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9211 (build-system python-build-system)
9212 (home-page "http://pyasn1.sourceforge.net/")
9213 (synopsis "ASN.1 types and codecs")
9214 (description
9215 "This is an implementation of ASN.1 types and codecs in Python. It is
9216suitable for a wide range of protocols based on the ASN.1 specification.")
9217 (license license:bsd-2)))
9218
9219(define-public python2-pyasn1
9220 (package-with-python2 python-pyasn1))
9221
9222(define-public python-pyasn1-modules
9223 (package
9224 (name "python-pyasn1-modules")
9225 (version "0.2.2")
9226 (source
9227 (origin
9228 (method url-fetch)
9229 (uri (pypi-uri "pyasn1-modules" version))
9230 (sha256
9231 (base32
9232 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9233 (build-system python-build-system)
9234 (propagated-inputs
9235 `(("python-pyasn1" ,python-pyasn1)))
9236 (home-page "https://sourceforge.net/projects/pyasn1/")
9237 (synopsis "ASN.1 codec implementations")
9238 (description
9239 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9240implementations of ASN.1-based codecs and protocols.")
9241 (license license:bsd-3)))
9242
9243(define-public python2-pyasn1-modules
9244 (package-with-python2 python-pyasn1-modules))
9245
9246(define-public python-ipaddress
9247 (package
9248 (name "python-ipaddress")
9249 (version "1.0.22")
9250 (source (origin
9251 (method url-fetch)
9252 (uri (pypi-uri "ipaddress" version))
9253 (sha256
9254 (base32
9255 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9256 (build-system python-build-system)
9257 (home-page "https://github.com/phihag/ipaddress")
9258 (synopsis "IP address manipulation library")
9259 (description
9260 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9261 in Python. This library is used to create, poke at, and manipulate IPv4 and
9262 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9263 module to older versions of Python.")
9264 (license license:psfl)))
9265
9266(define-public python2-ipaddress
9267 (package-with-python2 python-ipaddress))
9268
9269(define-public python2-ipaddr
9270 (package
9271 (name "python2-ipaddr")
9272 (version "2.1.11")
9273 (source
9274 (origin
9275 (method url-fetch)
9276 (uri (pypi-uri "ipaddr" version))
9277 (sha256
9278 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9279 (build-system python-build-system)
9280 (arguments
9281 `(#:python ,python-2 ;version 2 only
9282 #:phases
9283 (modify-phases %standard-phases
9284 (replace 'check
9285 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9286 (home-page "https://github.com/google/ipaddr-py")
9287 (synopsis "IP address manipulation library")
9288 (description
9289 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9290IPv6 addresses and networks.
9291
9292For new implementations you may prefer to use the standard module
9293@code{ipaddress}, which was introduced in Python 3.3 and backported to older
9294versions of Python.")
9295 (license license:asl2.0)))
9296
9297(define-public python-idna
9298 (package
9299 (name "python-idna")
9300 (version "2.9")
9301 (source
9302 (origin
9303 (method url-fetch)
9304 (uri (pypi-uri "idna" version))
9305 (sha256
9306 (base32
9307 "1jxp2pdi8y4asi7ka1zhx3yx09kv8kzj533f0ds7viz49b0x323m"))))
9308 (build-system python-build-system)
9309 (home-page "https://github.com/kjd/idna")
9310 (synopsis "Internationalized domain names in applications")
9311 (description
9312 "This is a library to support the Internationalised Domain Names in
9313Applications (IDNA) protocol as specified in RFC 5891. This version of the
9314protocol is often referred to as “IDNA2008” and can produce different results
9315from the earlier standard from 2003. The library is also intended to act as a
9316suitable drop-in replacement for the “encodings.idna” module that comes with
9317the Python standard library but currently only supports the older 2003
9318specification.")
9319 (license license:bsd-4)))
9320
9321(define-public python-idna-2.7
9322 (package (inherit python-idna)
9323 (version "2.7")
9324 (source (origin
9325 (method url-fetch)
9326 (uri (pypi-uri "idna" version))
9327 (sha256
9328 (base32
9329 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9330
9331
9332(define-public python2-idna
9333 (package-with-python2 python-idna))
9334
9335(define-public python-libsass
9336 (package
9337 (name "python-libsass")
9338 (version "0.20.1")
9339 (source
9340 (origin
9341 ;; PyPI tarball is missing some test files.
9342 (method git-fetch)
9343 (uri (git-reference
9344 (url "https://github.com/sass/libsass-python")
9345 (commit version)))
9346 (file-name (git-file-name name version))
9347 (sha256
9348 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9349 (build-system python-build-system)
9350 (arguments
9351 `(#:phases
9352 (modify-phases %standard-phases
9353 ;; Use Guix package of libsass instead of compiling from a checkout.
9354 (add-before 'build 'set-libsass
9355 (lambda _
9356 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9357 #t))
9358 (replace 'check
9359 (lambda* (#:key inputs outputs #:allow-other-keys)
9360 (add-installed-pythonpath inputs outputs)
9361 (invoke "pytest" "sasstests.py"))))))
9362 (native-inputs
9363 `(("python-pytest" ,python-pytest)
9364 ("python-werkzeug" ,python-werkzeug)))
9365 (inputs
9366 `(("libsass" ,libsass)))
9367 (propagated-inputs
9368 `(("python-six" ,python-six)))
9369 (home-page "https://sass.github.io/libsass-python/")
9370 (synopsis "Straightforward binding of libsass for Python")
9371 (description
9372 "This package provides a simple Python extension module @code{sass} which
9373is binding LibSass.")
9374 (license license:expat)))
9375
9376(define-public python-idna-ssl
9377 (package
9378 (name "python-idna-ssl")
9379 (version "1.0.1")
9380 (source
9381 (origin
9382 (method url-fetch)
9383 (uri (pypi-uri "idna-ssl" version))
9384 (sha256
9385 (base32
9386 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9387 (build-system python-build-system)
9388 (arguments
9389 `(#:tests? #f)) ;circular dependency with python-aiohttp
9390 (home-page "https://github.com/aio-libs/idna-ssl")
9391 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9392 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9393domains support.")
9394 (license license:expat)))
9395
9396(define-public python-pretend
9397 (package
9398 (name "python-pretend")
9399 (version "1.0.9")
9400 (source
9401 (origin
9402 (method url-fetch)
9403 (uri (pypi-uri "pretend" version))
9404 (sha256
9405 (base32
9406 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9407 (build-system python-build-system)
9408 (home-page "https://github.com/alex/pretend")
9409 (synopsis "Library for stubbing in Python")
9410 (description
9411 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9412technique for writing tests. You may hear the term mixed up with mocks,
9413fakes, or doubles. Basically, a stub is an object that returns pre-canned
9414responses, rather than doing any computation.")
9415 (license license:bsd-3)))
9416
9417(define-public python2-pretend
9418 (package-with-python2 python-pretend))
9419
9420(define-public python-pip
9421 (package
9422 (name "python-pip")
9423 (version "20.0.2")
9424 (source
9425 (origin
9426 (method url-fetch)
9427 (uri (pypi-uri "pip" version))
9428 (sha256
9429 (base32
9430 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9431 (build-system python-build-system)
9432 (arguments
9433 '(#:tests? #f)) ; there are no tests in the pypi archive.
9434 (home-page "https://pip.pypa.io/")
9435 (synopsis "Package manager for Python software")
9436 (description
9437 "Pip is a package manager for Python software, that finds packages on the
9438Python Package Index (PyPI).")
9439 (license license:expat)))
9440
9441(define-public python2-pip
9442 (package-with-python2 python-pip))
9443
9444(define-public python-tlsh
9445 (package
9446 (name "python-tlsh")
9447 (version "3.4.5")
9448 (home-page "https://github.com/trendmicro/tlsh")
9449 (source
9450 (origin
9451 (method git-fetch)
9452 (uri (git-reference
9453 (url "https://github.com/trendmicro/tlsh")
9454 (commit (string-append "v" version))))
9455 (file-name (git-file-name name version))
9456 (sha256
9457 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9458 (build-system cmake-build-system)
9459 (arguments
9460 '(#:out-of-source? #f
9461 #:phases (modify-phases %standard-phases
9462 (replace
9463 'install
9464 (lambda* (#:key outputs #:allow-other-keys)
9465 ;; Build and install the Python bindings. The underlying
9466 ;; C++ library is apparently not meant to be installed.
9467 (let ((out (assoc-ref outputs "out")))
9468 (with-directory-excursion "py_ext"
9469 (and (system* "python" "setup.py" "build")
9470 (system* "python" "setup.py" "install"
9471 (string-append "--prefix=" out))))))))))
9472 (inputs `(("python" ,python-wrapper))) ;for the bindings
9473 (synopsis "Fuzzy matching library for Python")
9474 (description
9475 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9476Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9477value which can be used for similarity comparisons. Similar objects have
9478similar hash values, which allows for the detection of similar objects by
9479comparing their hash values. The byte stream should have a sufficient amount
9480of complexity; for example, a byte stream of identical bytes will not generate
9481a hash value.")
9482 (license license:asl2.0)))
9483
9484(define-public python2-tlsh
9485 (package
9486 (inherit python-tlsh)
9487 (name "python2-tlsh")
9488 (inputs `(("python" ,python-2)))))
9489
9490(define-public python-termcolor
9491 (package
9492 (name "python-termcolor")
9493 (version "1.1.0")
9494 (source
9495 (origin
9496 (method url-fetch)
9497 (uri (pypi-uri "termcolor" version))
9498 (sha256
9499 (base32
9500 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9501 (build-system python-build-system)
9502 (arguments
9503 ;; There are no tests.
9504 `(#:tests? #f))
9505 (home-page "https://pypi.org/project/termcolor/")
9506 (synopsis "ANSII Color formatting for terminal output")
9507 (description
9508 "This package provides ANSII Color formatting for output in terminals.")
9509 (license license:expat)))
9510
9511(define-public python2-termcolor
9512 (package-with-python2 python-termcolor))
9513
9514(define-public python-terminaltables
9515 (package
9516 (name "python-terminaltables")
9517 (version "3.1.0")
9518 (source
9519 (origin
9520 (method url-fetch)
9521 (uri (pypi-uri "terminaltables" version))
9522 (sha256
9523 (base32
9524 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9525 (build-system python-build-system)
9526 (home-page "https://github.com/Robpol86/terminaltables")
9527 (synopsis
9528 "Generate simple tables in terminals from a nested list of strings")
9529 (description
9530 "This package makes it easy to draw tables in terminal/console
9531applications from a list of lists of strings. It supports multi-line rows.")
9532 (license license:expat)))
9533
9534(define-public python-libarchive-c
9535 (package
9536 (name "python-libarchive-c")
9537 (version "2.9")
9538 (source (origin
9539 (method url-fetch)
9540 (uri (pypi-uri "libarchive-c" version))
9541 (sha256
9542 (base32
9543 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9544 (build-system python-build-system)
9545 (arguments
9546 '(#:phases (modify-phases %standard-phases
9547 (add-before
9548 'build 'reference-libarchive
9549 (lambda* (#:key inputs #:allow-other-keys)
9550 ;; Retain the absolute file name of libarchive.so.
9551 (let ((libarchive (assoc-ref inputs "libarchive")))
9552 (substitute* "libarchive/ffi.py"
9553 (("find_library\\('archive'\\)")
9554 (string-append "'" libarchive
9555 "/lib/libarchive.so'"))))))
9556 (replace 'check
9557 (lambda _ (invoke "pytest" "-vv"))))))
9558 (native-inputs
9559 `(("python-mock" ,python-mock)
9560 ("python-pytest" ,python-pytest)))
9561 (inputs
9562 `(("libarchive" ,libarchive)))
9563 (home-page "https://github.com/Changaco/python-libarchive-c")
9564 (synopsis "Python interface to libarchive")
9565 (description
9566 "This package provides Python bindings to libarchive, a C library to
9567access possibly compressed archives in many different formats. It uses
9568Python's @code{ctypes} foreign function interface (FFI).")
9569 (license license:lgpl2.0+)))
9570
9571(define-public python2-libarchive-c
9572 (package-with-python2 python-libarchive-c))
9573
9574(define-public python-file
9575 (package
9576 (inherit file)
9577 (name "python-file")
9578 (build-system python-build-system)
9579 (arguments
9580 '(#:tests? #f ;no tests
9581 #:configure-flags '("--single-version-externally-managed" "--root=/")
9582 #:phases (modify-phases %standard-phases
9583 (add-before 'build 'change-directory
9584 (lambda _
9585 (chdir "python")
9586 #t))
9587 (add-before 'build 'set-library-file-name
9588 (lambda* (#:key inputs #:allow-other-keys)
9589 (let ((file (assoc-ref inputs "file")))
9590 (substitute* "magic.py"
9591 (("find_library\\('magic'\\)")
9592 (string-append "'" file "/lib/libmagic.so'")))
9593 #t))))))
9594 (inputs `(("file" ,file)))
9595 (native-inputs (if (%current-target-system)
9596 `(("self" ,this-package))
9597 '()))
9598 (synopsis "Python bindings to the libmagic file type guesser")
9599 (description "This package provides Python bindings to the libmagic file
9600type guesser.
9601
9602Note that this module and the @code{python-magic} module both provide a
9603@file{magic.py} file; these two modules, which are different and were
9604developed separately, both serve the same purpose: provide Python bindings for
9605libmagic.")))
9606
9607(define-public python2-file
9608 (package-with-python2 python-file))
9609
9610(define-public python-debian
9611 (package
9612 (name "python-debian")
9613 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9614 (version "0.1.36")
9615 (source
9616 (origin
9617 ;; Use git-fetch, as pypi doesn't include test suite.
9618 (method git-fetch)
9619 (uri (git-reference
9620 (url home-page)
9621 (commit version)))
9622 (file-name (git-file-name name version))
9623 (sha256
9624 (base32
9625 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9626 (build-system python-build-system)
9627 (arguments
9628 `(#:phases (modify-phases %standard-phases
9629 (add-after 'unpack 'remove-debian-specific-tests
9630 ;; python-apt, apt and dpkg are not yet available in guix,
9631 ;; and these tests heavily depend on them.
9632 (lambda _
9633 (delete-file "lib/debian/tests/test_deb822.py")
9634 (delete-file "lib/debian/tests/test_debfile.py")
9635 #t)))))
9636 (propagated-inputs
9637 `(("python-six" ,python-six)
9638 ("python-chardet" ,python-chardet)))
9639 (synopsis "Debian package related modules")
9640 (description
9641 ;; XXX: Use @enumerate instead of @itemize to work around
9642 ;; <http://bugs.gnu.org/21772>.
9643 "This package provides Python modules that abstract many formats of
9644Debian-related files, such as:
9645
9646@enumerate
9647@item Debtags information;
9648@item @file{debian/changelog} files;
9649@item packages files, pdiffs;
9650@item control files of single or multiple RFC822-style paragraphs---e.g.
9651 @file{debian/control}, @file{.changes}, @file{.dsc};
9652@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9653 contained files and meta-information.
9654@end enumerate\n")
9655
9656 ;; Modules are either GPLv2+ or GPLv3+.
9657 (license license:gpl3+)))
9658
9659(define-public python-nbformat
9660 (package
9661 (name "python-nbformat")
9662 (version "4.4.0")
9663 (source
9664 (origin
9665 (method url-fetch)
9666 (uri (pypi-uri "nbformat" version))
9667 (sha256
9668 (base32
9669 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9670 (build-system python-build-system)
9671 (arguments `(#:tests? #f)) ; no test target
9672 (propagated-inputs
9673 `(("python-ipython-genutils" ,python-ipython-genutils)
9674 ("python-jsonschema" ,python-jsonschema)
9675 ("python-jupyter-core" ,python-jupyter-core)
9676 ("python-traitlets" ,python-traitlets)))
9677 (home-page "http://jupyter.org")
9678 (synopsis "Jupyter Notebook format")
9679 (description "This package provides the reference implementation of the
9680Jupyter Notebook format and Python APIs for working with notebooks.")
9681 (license license:bsd-3)))
9682
9683(define-public python2-nbformat
9684 (package-with-python2 python-nbformat))
9685
9686(define-public python-bleach
9687 (package
9688 (name "python-bleach")
9689 (version "3.1.5")
9690 (source
9691 (origin
9692 (method url-fetch)
9693 (uri (pypi-uri "bleach" version))
9694 (sha256
9695 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9696 (build-system python-build-system)
9697 (propagated-inputs
9698 `(("python-webencodings" ,python-webencodings)
9699 ("python-six" ,python-six)))
9700 (native-inputs
9701 `(("python-datrie" ,python-datrie)
9702 ("python-genshi" ,python-genshi)
9703 ("python-lxml" ,python-lxml)
9704 ("python-pytest" ,python-pytest)))
9705 (home-page "https://github.com/mozilla/bleach")
9706 (synopsis "Whitelist-based HTML-sanitizing tool")
9707 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9708 (license license:asl2.0)))
9709
9710(define-public python2-bleach
9711 (package-with-python2 python-bleach))
9712
9713(define-public python-entrypoints
9714 (package
9715 (name "python-entrypoints")
9716 (version "0.3")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "entrypoints" version))
9721 (sha256
9722 (base32
9723 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9724 (build-system python-build-system)
9725 ;; The package does not come with a setup.py file, so we have to generate
9726 ;; one ourselves.
9727 (arguments
9728 `(#:tests? #f
9729 #:phases
9730 (modify-phases %standard-phases
9731 (add-after 'unpack 'create-setup.py
9732 (lambda _
9733 (call-with-output-file "setup.py"
9734 (lambda (port)
9735 (format port "\
9736from setuptools import setup
9737setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9738" ,version))))))))
9739 (home-page "https://github.com/takluyver/entrypoints")
9740 (synopsis "Discover and load entry points from installed Python packages")
9741 (description "Entry points are a way for Python packages to advertise
9742objects with some common interface. The most common examples are
9743@code{console_scripts} entry points, which define shell commands by
9744identifying a Python function to run. The @code{entrypoints} module contains
9745functions to find and load entry points.")
9746 (license license:expat)))
9747
9748(define-public python2-entrypoints
9749 (package-with-python2 python-entrypoints))
9750
9751(define-public python-epc
9752 (package
9753 (name "python-epc")
9754 (version "0.0.5")
9755 (source
9756 (origin
9757 (method url-fetch)
9758 (uri (pypi-uri "epc" version))
9759 (sha256
9760 (base32
9761 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9762 (build-system python-build-system)
9763 (propagated-inputs
9764 `(("python-sexpdata" ,python-sexpdata)))
9765 (native-inputs
9766 `(("python-nose" ,python-nose)))
9767 (home-page "https://github.com/tkf/python-epc")
9768 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9769 (description
9770 "Python-EPC can call elisp functions from Python and Python functions
9771from elisp.")
9772 (license license:gpl3)))
9773
9774(define-public python-forex-python
9775 (package
9776 (name "python-forex-python")
9777 (version "1.5")
9778 (source
9779 (origin
9780 (method url-fetch)
9781 (uri (pypi-uri "forex-python" version))
9782 (sha256
9783 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9784 (build-system python-build-system)
9785 (arguments
9786 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9787 ;; repository require online data.
9788 `(#:tests? #f))
9789 (propagated-inputs
9790 `(("python-requests" ,python-requests)
9791 ("python-simplejson" ,python-simplejson)))
9792 (home-page "https://github.com/MicroPyramid/forex-python")
9793 (synopsis "Foreign exchange rates and currency conversion")
9794 (description
9795 "@code{python-forex-python} can be used to manipulate foreign
9796exchange rates and to operate currency conversions.
9797
9798Features:
9799@itemize
9800@item List all currency rates.
9801@item BitCoin price for all currencies.
9802@item Converting amount to BitCoins.
9803@item Get historical rates for any day since 1999.
9804@item Conversion rate for one currency(ex; USD to INR).
9805@item Convert amount from one currency to other.('USD 10$' to INR).
9806@item Currency symbols.
9807@item Currency names.
9808@end itemize")
9809 (license license:expat)))
9810
9811(define-public python-simpleeval
9812 (package
9813 (name "python-simpleeval")
9814 (version "0.9.10")
9815 (source
9816 (origin
9817 (method url-fetch)
9818 (uri (pypi-uri "simpleeval" version))
9819 (sha256
9820 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9821 (build-system python-build-system)
9822 (home-page "https://github.com/danthedeckie/simpleeval")
9823 (synopsis "Simple, safe single expression evaluator library")
9824 (description
9825 "This package provides a quick single file library for easily adding
9826evaluatable expressions into python projects. Say you want to allow a user
9827to set an alarm volume, which could depend on the time of day, alarm level,
9828how many previous alarms had gone off, and if there is music playing at the
9829time.")
9830 (license license:expat)))
9831
9832(define-public python-nbconvert
9833 (package
9834 (name "python-nbconvert")
9835 (version "5.0.0b1")
9836 (source
9837 (origin
9838 (method url-fetch)
9839 (uri (pypi-uri "nbconvert" version))
9840 (sha256
9841 (base32
9842 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9843 (build-system python-build-system)
9844 (arguments
9845 `(;; The "bdist_egg" target is disabled by default, causing the installation
9846 ;; to fail.
9847 #:configure-flags (list "bdist_egg")
9848 ;; FIXME: 5 failures, 40 errors.
9849 #:tests? #f))
9850 ;; #:phases
9851 ;; (modify-phases %standard-phases
9852 ;; (replace 'check
9853 ;; (lambda _
9854 ;; (zero? (system* "py.test" "-v")))))
9855 (native-inputs
9856 `(("python-pytest" ,python-pytest)))
9857 (propagated-inputs
9858 `(("python-bleach" ,python-bleach)
9859 ("python-entrypoints" ,python-entrypoints)
9860 ("python-jinja2" ,python-jinja2)
9861 ("python-jupyter-core" ,python-jupyter-core)
9862 ("python-mistune" ,python-mistune)
9863 ("python-nbformat" ,python-nbformat)
9864 ("python-pygments" ,python-pygments)
9865 ("python-traitlets" ,python-traitlets)))
9866 (home-page "http://jupyter.org")
9867 (synopsis "Converting Jupyter Notebooks")
9868 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9869notebooks to various other formats via Jinja templates. It allows you to
9870convert an @code{.ipynb} notebook file into various static formats including:
9871
9872@enumerate
9873@item HTML
9874@item LaTeX
9875@item PDF
9876@item Reveal JS
9877@item Markdown (md)
9878@item ReStructured Text (rst)
9879@item executable script
9880@end enumerate\n")
9881 (license license:bsd-3)))
9882
9883(define-public python2-nbconvert
9884 (package-with-python2 python-nbconvert))
9885
9886(define-public python-notebook
9887 (package
9888 (name "python-notebook")
9889 (version "5.7.4")
9890 (source (origin
9891 (method url-fetch)
9892 (uri (pypi-uri "notebook" version))
9893 (sha256
9894 (base32
9895 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9896 (build-system python-build-system)
9897 (arguments
9898 `(#:phases
9899 (modify-phases %standard-phases
9900 (replace 'check
9901 (lambda _
9902 ;; These tests require a browser
9903 (delete-file-recursively "notebook/tests/selenium")
9904 ;; Some tests need HOME
9905 (setenv "HOME" "/tmp")
9906 ;; This file contains "warningfilters", which are not supported
9907 ;; by this version of nose.
9908 (delete-file "setup.cfg")
9909 (with-directory-excursion "/tmp"
9910 (invoke "nosetests" "-v"))
9911 #t)))))
9912 (propagated-inputs
9913 `(("python-jupyter-core" ,python-jupyter-core)
9914 ("python-nbformat" ,python-nbformat)
9915 ("python-nbconvert" ,python-nbconvert)
9916 ("python-prometheus-client" ,python-prometheus-client)
9917 ("python-send2trash" ,python-send2trash)
9918 ("python-terminado" ,python-terminado)))
9919 (native-inputs
9920 `(("python-nose" ,python-nose)
9921 ("python-sphinx" ,python-sphinx)
9922 ("python-requests" ,python-requests)))
9923 (home-page "http://jupyter.org/")
9924 (synopsis "Web-based notebook environment for interactive computing")
9925 (description
9926 "The Jupyter HTML notebook is a web-based notebook environment for
9927interactive computing.")
9928 (properties `((python2-variant . ,(delay python2-notebook))))
9929 (license license:bsd-3)))
9930
9931(define-public python2-notebook
9932 (let ((base (package-with-python2
9933 (strip-python2-variant python-notebook))))
9934 (package (inherit base)
9935 (native-inputs
9936 `(("python2-mock" ,python2-mock)
9937 ,@(package-native-inputs base)))
9938 (arguments
9939 (substitute-keyword-arguments (package-arguments base)
9940 ((#:phases phases)
9941 `(modify-phases ,phases
9942 (add-before 'check 'disable-test-case
9943 ;; The test requires network access to localhost. Curiously it
9944 ;; fails with Python 2 only. Simply make the test-case return
9945 ;; immediately.
9946 (lambda _
9947 (substitute*
9948 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9949 (("formats = self.nbconvert_api") "return #")))))))))))
9950
9951(define-public python-widgetsnbextension
9952 (package
9953 (name "python-widgetsnbextension")
9954 (version "3.5.1")
9955 (source
9956 (origin
9957 (method url-fetch)
9958 (uri (pypi-uri "widgetsnbextension" version))
9959 (sha256
9960 (base32
9961 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9962 (build-system python-build-system)
9963 (propagated-inputs
9964 `(("python-ipykernel" ,python-ipykernel)
9965 ("python-notebook" ,python-notebook)))
9966 (native-inputs
9967 `(("python-certifi" ,python-certifi)
9968 ("python-nose" ,python-nose)))
9969 (home-page "https://ipython.org")
9970 (synopsis "IPython HTML widgets for Jupyter")
9971 (description "This package provides interactive HTML widgets for Jupyter
9972notebooks.")
9973 (license license:bsd-3)))
9974
9975(define-public python2-widgetsnbextension
9976 (package-with-python2 python-widgetsnbextension))
9977
9978(define-public python-ipywidgets
9979 (package
9980 (name "python-ipywidgets")
9981 (version "7.5.1")
9982 (source
9983 (origin
9984 (method url-fetch)
9985 (uri (pypi-uri "ipywidgets" version))
9986 (sha256
9987 (base32
9988 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
9989 (build-system python-build-system)
9990 (propagated-inputs
9991 `(("python-ipython" ,python-ipython)
9992 ("python-traitlets" ,python-traitlets)
9993 ("python-widgetsnbextension" ,python-widgetsnbextension)))
9994 (native-inputs
9995 `(("python-nose" ,python-nose)
9996 ("python-pytest" ,python-pytest)))
9997 (home-page "https://ipython.org")
9998 (synopsis "IPython HTML widgets for Jupyter")
9999 (description "Ipywidgets are interactive HTML widgets for Jupyter
10000notebooks and the IPython kernel. Notebooks come alive when interactive
10001widgets are used. Users gain control of their data and can visualize changes
10002in the data.")
10003 (license license:bsd-3)))
10004
10005(define-public python2-ipywidgets
10006 (package-with-python2 python-ipywidgets))
10007
10008(define-public python-jupyter-console
10009 (package
10010 (name "python-jupyter-console")
10011 (version "6.1.0")
10012 (source
10013 (origin
10014 (method url-fetch)
10015 (uri (pypi-uri "jupyter_console" version))
10016 (sha256
10017 (base32
10018 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10019 (build-system python-build-system)
10020 (propagated-inputs
10021 `(("python-ipykernel" ,python-ipykernel)
10022 ("python-jupyter-client" ,python-jupyter-client)
10023 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10024 ("python-pygments" ,python-pygments)))
10025 (native-inputs
10026 `(("python-nose" ,python-nose)))
10027 (home-page "https://jupyter.org")
10028 (synopsis "Jupyter terminal console")
10029 (description "This package provides a terminal-based console frontend for
10030Jupyter kernels. It also allows for console-based interaction with non-Python
10031Jupyter kernels such as IJulia and IRKernel.")
10032 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10033 (license license:bsd-3)))
10034
10035(define-public python2-jupyter-console
10036 (package
10037 (name "python2-jupyter-console")
10038 (version "5.2.0")
10039 (source
10040 (origin
10041 (method url-fetch)
10042 (uri (pypi-uri "jupyter_console" version))
10043 (sha256
10044 (base32
10045 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10046 (build-system python-build-system)
10047 (arguments
10048 `(#:python ,python-2
10049 #:tests? #f)) ; Tests only run in a TTY.
10050 (propagated-inputs
10051 `(("python2-ipykernel" ,python2-ipykernel)
10052 ("python2-jupyter-client" ,python2-jupyter-client)
10053 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10054 ("python2-pygments" ,python2-pygments)))
10055 (native-inputs
10056 `(("python2-nose" ,python2-nose)))
10057 (home-page "https://jupyter.org")
10058 (synopsis "Jupyter terminal console")
10059 (description "This package provides a terminal-based console frontend for
10060Jupyter kernels. It also allows for console-based interaction with non-Python
10061Jupyter kernels such as IJulia and IRKernel.")
10062 (license license:bsd-3)))
10063
10064;; The python-ipython and python-jupyter-console require each other. To get
10065;; the functionality in both packages working, strip down the
10066;; python-jupyter-console package when using it as an input to python-ipython.
10067(define python-jupyter-console-minimal
10068 (package
10069 (inherit python-jupyter-console)
10070 (name "python-jupyter-console-minimal")
10071 (arguments
10072 (substitute-keyword-arguments
10073 (package-arguments python-jupyter-console)
10074 ((#:phases phases)
10075 `(modify-phases ,phases
10076 (add-after 'install 'delete-bin
10077 (lambda* (#:key outputs #:allow-other-keys)
10078 ;; Delete the bin files, to avoid conflicts in profiles
10079 ;; where python-ipython and python-jupyter-console are
10080 ;; both present.
10081 (delete-file-recursively
10082 (string-append
10083 (assoc-ref outputs "out") "/bin"))))))))
10084 ;; Remove the python-ipython propagated input, to avoid the cycle
10085 (propagated-inputs
10086 (alist-delete
10087 "python-ipython"
10088 (package-propagated-inputs python-jupyter-console)))))
10089
10090(define-public python-qtconsole
10091 (package
10092 (name "python-qtconsole")
10093 (version "4.4.3")
10094 (source
10095 (origin
10096 (method url-fetch)
10097 (uri (pypi-uri "qtconsole" version))
10098 (sha256
10099 (base32
10100 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10101 (build-system python-build-system)
10102 (arguments
10103 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10104 ;; but we only have the LTS version 5.x. This means that there might be
10105 ;; runtime errors, but since this is a dependency of the Jupyter package,
10106 ;; and Jupyter can be used without the qtconsole we can overlook this for
10107 ;; now.
10108 `(#:tests? #f
10109 #:phases
10110 (modify-phases %standard-phases
10111 (add-before 'check 'pre-check
10112 (lambda _
10113 (setenv "QT_QPA_PLATFORM" "offscreen")
10114 #t)))))
10115 (propagated-inputs
10116 `(("python-ipykernel" ,python-ipykernel)
10117 ("python-ipython" ,python-ipython)))
10118 (native-inputs
10119 `(("python-pytest" ,python-pytest)))
10120 (home-page "http://jupyter.org")
10121 (synopsis "Jupyter Qt console")
10122 (description "This package provides a Qt-based console for Jupyter with
10123support for rich media output.")
10124 (license license:bsd-3)))
10125
10126(define-public python-jsbeautifier
10127 (package
10128 (name "python-jsbeautifier")
10129 (version "1.10.2")
10130 (home-page "https://github.com/beautify-web/js-beautify")
10131 (source (origin
10132 (method git-fetch)
10133 (uri (git-reference
10134 (url home-page)
10135 (commit (string-append "v" version))))
10136 (file-name (git-file-name name version))
10137 (sha256
10138 (base32
10139 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10140 (build-system python-build-system)
10141 (arguments
10142 `(#:phases (modify-phases %standard-phases
10143 (add-after 'unpack 'chdir
10144 (lambda _
10145 ;; The upstream Git repository contains all the code,
10146 ;; but this package only builds the python code.
10147 (chdir "python")
10148 #t))
10149 (add-after 'unpack 'patch-python-six-requirements
10150 (lambda _
10151 (substitute* "python/setup.py"
10152 (("six>=1.12.0")
10153 "six>=1.11.0"))
10154 #t)))))
10155 (propagated-inputs
10156 `(("python-editorconfig" ,python-editorconfig)
10157 ("python-six" ,python-six)))
10158 (native-inputs
10159 `(("python-pytest" ,python-pytest)))
10160 (synopsis "JavaScript unobfuscator and beautifier")
10161 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10162popular online obfuscators.")
10163 (license license:expat)))
10164
10165(define-public jupyter
10166 (package
10167 (name "jupyter")
10168 (version "1.0.0")
10169 (source
10170 (origin
10171 (method url-fetch)
10172 (uri (pypi-uri "jupyter" version))
10173 (sha256
10174 (base32
10175 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10176 (build-system python-build-system)
10177 (arguments '(#:tests? #f)) ; there are none.
10178 (propagated-inputs
10179 `(("python-ipykernel" ,python-ipykernel)
10180 ("python-ipywidgets" ,python-ipywidgets)
10181 ("python-jupyter-console" ,python-jupyter-console)
10182 ("python-nbconvert" ,python-nbconvert)
10183 ("python-notebook" ,python-notebook)
10184 ("python-qtconsole" ,python-qtconsole)))
10185 (native-search-paths
10186 (list (search-path-specification
10187 (variable "JUPYTER_PATH")
10188 (files '("share/jupyter")))))
10189 (home-page "https://jupyter.org")
10190 (synopsis "Web application for interactive documents")
10191 (description
10192 "The Jupyter Notebook is a web application that allows you to create and
10193share documents that contain live code, equations, visualizations and
10194explanatory text. Uses include: data cleaning and transformation, numerical
10195simulation, statistical modeling, machine learning and much more.")
10196 (license license:bsd-3)))
10197
10198(define-public python-chardet
10199 (package
10200 (name "python-chardet")
10201 (version "3.0.4")
10202 (source
10203 (origin
10204 (method url-fetch)
10205 (uri (pypi-uri "chardet" version))
10206 (sha256
10207 (base32
10208 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10209 (native-inputs
10210 `(("python-hypothesis" ,python-hypothesis)
10211 ("python-pytest" ,python-pytest)
10212 ("python-pytest-runner" ,python-pytest-runner)))
10213 (build-system python-build-system)
10214 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10215 (arguments `(#:tests? #f))
10216 (home-page "https://github.com/chardet/chardet")
10217 (synopsis "Universal encoding detector for Python 2 and 3")
10218 (description
10219 "This package provides @code{chardet}, a Python module that can
10220automatically detect a wide range of file encodings.")
10221 (license license:lgpl2.1+)))
10222
10223(define-public python2-chardet
10224 (package-with-python2 python-chardet))
10225
10226(define-public python-docopt
10227 (package
10228 (name "python-docopt")
10229 (version "0.6.2")
10230 (source
10231 (origin
10232 (method git-fetch)
10233 ;; The release on PyPI does not include tests.
10234 (uri (git-reference
10235 (url "https://github.com/docopt/docopt")
10236 (commit version)))
10237 (file-name (git-file-name name version))
10238 (sha256
10239 (base32
10240 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10241 (build-system python-build-system)
10242 (native-inputs
10243 `(("python-pytest" ,python-pytest)))
10244 (arguments
10245 `(#:phases
10246 (modify-phases %standard-phases
10247 (replace 'check
10248 (lambda _ (invoke "py.test"))))))
10249 (home-page "http://docopt.org")
10250 (synopsis "Command-line interface description language for Python")
10251 (description "This library allows the user to define a command-line
10252interface from a program's help message rather than specifying it
10253programmatically with command-line parsers like @code{getopt} and
10254@code{argparse}.")
10255 (license license:expat)))
10256
10257(define-public python2-docopt
10258 (package-with-python2 python-docopt))
10259
10260(define-public python-pythondialog
10261 (package
10262 (name "python-pythondialog")
10263 (version "3.4.0")
10264 (source
10265 (origin
10266 (method url-fetch)
10267 (uri (pypi-uri "pythondialog" version))
10268 (sha256
10269 (base32
10270 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10271 (build-system python-build-system)
10272 (arguments
10273 `(#:phases
10274 (modify-phases %standard-phases
10275 (add-after 'unpack 'patch-path
10276 (lambda* (#:key inputs #:allow-other-keys)
10277 (let* ((dialog (assoc-ref inputs "dialog")))
10278 ;; Since this library really wants to grovel the search path, we
10279 ;; must hardcode dialog's store path into it.
10280 (substitute* "dialog.py"
10281 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10282 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10283 #t))))
10284 #:tests? #f)) ; no test suite
10285 (propagated-inputs
10286 `(("dialog" ,dialog)))
10287 (home-page "http://pythondialog.sourceforge.net/")
10288 (synopsis "Python interface to the UNIX dialog utility")
10289 (description "A Python wrapper for the dialog utility. Its purpose is to
10290provide an easy to use, pythonic and comprehensive Python interface to dialog.
10291This allows one to make simple text-mode user interfaces on Unix-like systems")
10292 (license license:lgpl2.1)
10293 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10294
10295(define-public python2-pythondialog
10296 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10297 (package
10298 (inherit base)
10299 (version (package-version python-pythondialog))
10300 (source (origin
10301 (method url-fetch)
10302 (uri (pypi-uri "python2-pythondialog" version))
10303 (sha256
10304 (base32
10305 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10306
10307(define-public python-configobj
10308 (package
10309 (name "python-configobj")
10310 (version "5.0.6")
10311 (source (origin
10312 (method url-fetch)
10313 (uri (pypi-uri "configobj" version))
10314 (sha256
10315 (base32
10316 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10317 ;; Patch setup.py so it looks for python-setuptools, which is
10318 ;; required to parse the keyword 'install_requires' in setup.py.
10319 (patches (search-patches "python-configobj-setuptools.patch"))))
10320 (build-system python-build-system)
10321 (propagated-inputs
10322 `(("python-six" ,python-six)))
10323 (synopsis "Config file reading, writing and validation")
10324 (description "ConfigObj is a simple but powerful config file reader and
10325writer: an ini file round tripper. Its main feature is that it is very easy to
10326use, with a straightforward programmer’s interface and a simple syntax for
10327config files.")
10328 (home-page "https://github.com/DiffSK/configobj")
10329 (license license:bsd-3)))
10330
10331(define-public python2-configobj
10332 (package-with-python2 python-configobj))
10333
10334(define-public python-configargparse
10335 (package
10336 (name "python-configargparse")
10337 (version "0.14.0")
10338 (source (origin
10339 (method url-fetch)
10340 (uri (pypi-uri "ConfigArgParse" version))
10341 (sha256
10342 (base32
10343 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10344 (build-system python-build-system)
10345 (native-inputs
10346 `(("python-pyyaml" ,python-pyyaml)))
10347 (arguments
10348 `(#:phases
10349 (modify-phases %standard-phases
10350 (replace 'check
10351 (lambda _
10352 ;; Bypass setuptools-shim because one test relies on "setup.py"
10353 ;; being the first argument passed to the python call.
10354 ;;
10355 ;; NOTE: Many tests do not run because they rely on Python's
10356 ;; built-in test.test_argparse, but we remove the unit tests from
10357 ;; our Python installation.
10358 (invoke "python" "setup.py" "test"))))))
10359 (synopsis "Replacement for argparse")
10360 (description "A drop-in replacement for argparse that allows options to also
10361be set via config files and/or environment variables.")
10362 (home-page "https://github.com/bw2/ConfigArgParse")
10363 (license license:expat)))
10364
10365(define-public python2-configargparse
10366 (package-with-python2 python-configargparse))
10367
10368(define-public python-argparse-manpage
10369 (package
10370 (name "python-argparse-manpage")
10371 (version "1.1")
10372 (source
10373 (origin
10374 (method url-fetch)
10375 (uri (pypi-uri "argparse-manpage" version))
10376 (sha256
10377 (base32
10378 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10379 (build-system python-build-system)
10380 (home-page "https://github.com/praiskup/argparse-manpage")
10381 (synopsis "Build manual page from Python's ArgumentParser object")
10382 (description
10383 "This package provides tools to build manual pages from Python's
10384@code{ArgumentParser} object.")
10385 (license license:asl2.0)))
10386
10387(define-public python-contextlib2
10388 (package
10389 (name "python-contextlib2")
10390 (version "0.6.0.post1")
10391 (source
10392 (origin
10393 (method url-fetch)
10394 (uri (pypi-uri "contextlib2" version))
10395 (sha256
10396 (base32
10397 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10398 (build-system python-build-system)
10399 (home-page "https://contextlib2.readthedocs.org/")
10400 (synopsis "Tools for decorators and context managers")
10401 (description "This module is primarily a backport of the Python
104023.2 contextlib to earlier Python versions. Like contextlib, it
10403provides utilities for common tasks involving decorators and context
10404managers. It also contains additional features that are not part of
10405the standard library.")
10406 (properties `((python2-variant . ,(delay python2-contextlib2))))
10407 (license license:psfl)))
10408
10409(define-public python2-contextlib2
10410 (let ((base (package-with-python2
10411 (strip-python2-variant python-contextlib2))))
10412 (package
10413 (inherit base)
10414 (arguments
10415 (substitute-keyword-arguments (package-arguments base)
10416 ((#:phases phases)
10417 `(modify-phases ,phases
10418 (replace 'check
10419 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10420 (native-inputs
10421 `(("python2-unittest2" ,python2-unittest2))))))
10422
10423;; This package is used by python2-pytest via python2-importlib-metadata,
10424;; and thus can not depend on python-unittest2 (which depends on pytest).
10425(define-public python2-contextlib2-bootstrap
10426 (hidden-package
10427 (package/inherit
10428 python2-contextlib2
10429 (name "python2-contextlib2-bootstrap")
10430 (arguments
10431 `(#:tests? #f
10432 ,@(package-arguments python2-contextlib2)))
10433 (native-inputs '()))))
10434
10435(define-public python-texttable
10436 (package
10437 (name "python-texttable")
10438 (version "1.6.2")
10439 (source
10440 (origin
10441 (method url-fetch)
10442 (uri (pypi-uri "texttable" version))
10443 (sha256
10444 (base32
10445 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10446 (build-system python-build-system)
10447 (arguments
10448 `(#:phases
10449 (modify-phases %standard-phases
10450 (replace 'check
10451 (lambda _ (invoke "pytest" "tests.py"))))))
10452 (native-inputs
10453 `(("python-pytest" ,python-pytest)))
10454 (home-page "https://github.com/foutaise/texttable/")
10455 (synopsis "Python module for creating simple ASCII tables")
10456 (description "Texttable is a Python module for creating simple ASCII
10457tables.")
10458 (license license:expat)))
10459
10460(define-public python2-texttable
10461 (package-with-python2 python-texttable))
10462
10463(define-public python-atomicwrites
10464 (package
10465 (name "python-atomicwrites")
10466 (version "1.3.0")
10467 (source (origin
10468 (method url-fetch)
10469 (uri (pypi-uri "atomicwrites" version))
10470 (sha256
10471 (base32
10472 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10473 (build-system python-build-system)
10474 (synopsis "Atomic file writes in Python")
10475 (description "Library for atomic file writes using platform dependent tools
10476for atomic file system operations.")
10477 (home-page "https://github.com/untitaker/python-atomicwrites")
10478 (license license:expat)))
10479
10480(define-public python2-atomicwrites
10481 (package-with-python2 python-atomicwrites))
10482
10483(define-public python-click-threading
10484 (package
10485 (name "python-click-threading")
10486 (version "0.4.4")
10487 (source (origin
10488 (method url-fetch)
10489 (uri (pypi-uri "click-threading" version))
10490 (sha256
10491 (base32
10492 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10493 (build-system python-build-system)
10494 (propagated-inputs
10495 `(("python-click" ,python-click)))
10496 (synopsis "Utilities for multithreading in Click")
10497 (description "This package provides utilities for multithreading in Click
10498applications.")
10499 (home-page "https://github.com/click-contrib/click-threading")
10500 (license license:expat)))
10501
10502(define-public python-click-log
10503 (package
10504 (name "python-click-log")
10505 (version "0.3.2")
10506 (source (origin
10507 (method url-fetch)
10508 (uri (pypi-uri "click-log" version))
10509 (sha256
10510 (base32
10511 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10512 (build-system python-build-system)
10513 (propagated-inputs
10514 `(("python-click" ,python-click)))
10515 (synopsis "Logging for click applications")
10516 (description "This package provides a Python library for logging Click
10517applications.")
10518 (home-page "https://github.com/click-contrib/click-log")
10519 (license license:expat)))
10520
10521(define-public python-apipkg
10522 (package
10523 (name "python-apipkg")
10524 (version "1.5")
10525 (source (origin
10526 (method url-fetch)
10527 (uri (pypi-uri "apipkg" version))
10528 (sha256
10529 (base32
10530 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10531 (build-system python-build-system)
10532 (native-inputs
10533 `(("python-pytest" ,python-pytest)
10534 ("python-setuptools-scm" ,python-setuptools-scm)))
10535 (synopsis "Namespace control and lazy-import mechanism")
10536 (description "With apipkg you can control the exported namespace of a Python
10537package and greatly reduce the number of imports for your users. It is a small
10538pure Python module that works on virtually all Python versions.")
10539 (home-page "https://github.com/pytest-dev/apipkg")
10540 (license license:expat)))
10541
10542(define-public python-execnet
10543 (package
10544 (name "python-execnet")
10545 (version "1.4.1")
10546 (source (origin
10547 (method url-fetch)
10548 (uri (pypi-uri "execnet" version))
10549 (sha256
10550 (base32
10551 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10552 (build-system python-build-system)
10553 (arguments
10554 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10555 ;; The two test failures are caused by the lack of an `ssh` executable.
10556 ;; The test suite can be run with pytest after the 'install' phase.
10557 #:tests? #f))
10558 (native-inputs
10559 `(("python-pytest" ,python-pytest)
10560 ("python-setuptools-scm" ,python-setuptools-scm)))
10561 (propagated-inputs
10562 `(("python-apipkg" ,python-apipkg)))
10563 (synopsis "Rapid multi-Python deployment")
10564 (description "Execnet provides a share-nothing model with
10565channel-send/receive communication for distributing execution across many
10566Python interpreters across version, platform and network barriers. It has a
10567minimal and fast API targeting the following uses:
10568@enumerate
10569@item distribute tasks to (many) local or remote CPUs
10570@item write and deploy hybrid multi-process applications
10571@item write scripts to administer multiple environments
10572@end enumerate")
10573 (home-page "https://codespeak.net/execnet/")
10574 (license license:expat)))
10575
10576(define-public python2-execnet
10577 (package-with-python2 python-execnet))
10578
10579(define-public python-icalendar
10580 (package
10581 (name "python-icalendar")
10582 (version "4.0.5")
10583 (source (origin
10584 (method url-fetch)
10585 (uri (pypi-uri "icalendar" version))
10586 (sha256
10587 (base32
10588 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10589 (build-system python-build-system)
10590 (propagated-inputs
10591 `(("python-dateutil" ,python-dateutil)
10592 ("python-pytz" ,python-pytz)))
10593 (synopsis "Python library for parsing iCalendar files")
10594 (description "The icalendar package is a parser/generator of iCalendar
10595files for use with Python.")
10596 (home-page "https://github.com/collective/icalendar")
10597 (license license:bsd-2)))
10598
10599(define-public python-args
10600 (package
10601 (name "python-args")
10602 (version "0.1.0")
10603 (source (origin
10604 (method url-fetch)
10605 (uri (pypi-uri "args" version))
10606 (sha256
10607 (base32
10608 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10609 (build-system python-build-system)
10610 (home-page "https://github.com/kennethreitz/args")
10611 (synopsis "Command-line argument parser")
10612 (description
10613 "This library provides a Python module to parse command-line arguments.")
10614 (license license:bsd-3)))
10615
10616(define-public python2-args
10617 (package-with-python2 python-args))
10618
10619(define-public python-clint
10620 (package
10621 (name "python-clint")
10622 (version "0.5.1")
10623 (source (origin
10624 (method url-fetch)
10625 (uri (pypi-uri "clint" version))
10626 (sha256
10627 (base32
10628 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10629 (build-system python-build-system)
10630 (arguments
10631 '(#:phases
10632 (modify-phases %standard-phases
10633 (replace 'check
10634 (lambda _ (invoke "py.test" "-v"))))))
10635 (native-inputs
10636 `(("python-pytest" ,python-pytest)))
10637 (propagated-inputs
10638 `(("python-args" ,python-args)))
10639 (home-page "https://github.com/kennethreitz/clint")
10640 (synopsis "Command-line interface tools")
10641 (description
10642 "Clint is a Python module filled with a set of tools for developing
10643command-line applications, including tools for colored and indented
10644output, progress bar display, and pipes.")
10645 (license license:isc)))
10646
10647(define-public python2-clint
10648 (package-with-python2 python-clint))
10649
10650(define-public python-rply
10651 (package
10652 (name "python-rply")
10653 (version "0.7.5")
10654 (source (origin
10655 (method url-fetch)
10656 (uri (pypi-uri "rply" version))
10657 (sha256
10658 (base32
10659 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10660 (build-system python-build-system)
10661 (propagated-inputs
10662 `(("python-appdirs" ,python-appdirs)))
10663 (home-page "https://github.com/alex/rply")
10664 (synopsis "Parser generator for Python")
10665 (description
10666 "This package provides a pure Python based parser generator, that also
10667works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10668with a new public API, and RPython support.")
10669 (license license:bsd-3)))
10670
10671(define-public python2-rply
10672 (package-with-python2 python-rply))
10673
10674(define-public python-hy
10675 (package
10676 (name "python-hy")
10677 (version "0.18.0")
10678 (source (origin
10679 (method url-fetch)
10680 (uri (pypi-uri "hy" version))
10681 (sha256
10682 (base32
10683 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10684 (build-system python-build-system)
10685 (arguments
10686 '(#:phases
10687 (modify-phases %standard-phases
10688 (add-before 'install 'set-HOME
10689 (lambda _
10690 (setenv "HOME" "/tmp") #t))
10691 (replace 'check
10692 (lambda _
10693 ;; Tests require write access to HOME.
10694 (setenv "HOME" "/tmp")
10695 (invoke "nosetests"))))))
10696 (native-inputs
10697 `(("python-coverage" ,python-coverage)
10698 ("python-nose" ,python-nose)))
10699 (propagated-inputs
10700 `(("python-astor" ,python-astor)
10701 ("python-colorama" ,python-colorama)
10702 ("python-rply" ,python-rply)
10703 ("python-funcparserlib"
10704 ,python-funcparserlib)))
10705 (home-page "http://hylang.org/")
10706 (synopsis "Lisp frontend to Python")
10707 (description
10708 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10709its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10710Python at your fingertips, in Lisp form.")
10711 (license license:expat)))
10712
10713(define-public python2-functools32
10714 (package
10715 (name "python2-functools32")
10716 (version "3.2.3-2")
10717 (source
10718 (origin
10719 (method url-fetch)
10720 (uri (pypi-uri "functools32" version))
10721 (sha256
10722 (base32
10723 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10724 (build-system python-build-system)
10725 (arguments
10726 `(#:python ,python-2
10727 #:tests? #f)) ; no test target
10728 (home-page "https://github.com/MiCHiLU/python-functools32")
10729 (synopsis
10730 "Backport of the functools module from Python 3.2.3")
10731 (description
10732 "This package is a backport of the @code{functools} module from Python
107333.2.3 for use with older versions of Python and PyPy.")
10734 (license license:expat)))
10735
10736(define-public python2-subprocess32
10737 (package
10738 (name "python2-subprocess32")
10739 (version "3.2.7")
10740 (source (origin
10741 (method url-fetch)
10742 (uri (pypi-uri "subprocess32" version))
10743 (sha256
10744 (base32
10745 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10746 (patches
10747 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10748 (build-system python-build-system)
10749 (arguments
10750 `(#:python ,python-2
10751 ;; The test suite fails with Python > 2.7.13:
10752 ;; import test.support
10753 ;; ImportError: No module named support
10754 #:tests? #f
10755 #:phases
10756 (modify-phases %standard-phases
10757 (add-after 'unpack 'patch-/bin/sh
10758 (lambda _
10759 (substitute* '("subprocess32.py"
10760 "test_subprocess32.py")
10761 (("/bin/sh") (which "sh")))
10762 #t)))))
10763 (home-page "https://github.com/google/python-subprocess32")
10764 (synopsis "Backport of the subprocess module from Python 3.2")
10765 (description
10766 "This is a backport of the @code{subprocess} standard library module
10767from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10768new features. On POSIX systems it is guaranteed to be reliable when used
10769in threaded applications. It includes timeout support from Python 3.3 but
10770otherwise matches 3.2’s API.")
10771 (license license:psfl)))
10772
10773(define-public python2-futures
10774 (package
10775 (name "python2-futures")
10776 (version "3.2.0")
10777 (source
10778 (origin
10779 (method url-fetch)
10780 (uri (pypi-uri "futures" version))
10781 (sha256
10782 (base32
10783 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10784 (build-system python-build-system)
10785 (arguments
10786 `(#:python ,python-2
10787 #:phases
10788 (modify-phases %standard-phases
10789 (replace 'check
10790 (lambda _
10791 (invoke "python" "test_futures.py")
10792 #t)))))
10793 (home-page "https://github.com/agronholm/pythonfutures")
10794 (synopsis
10795 "Backport of the concurrent.futures package from Python 3.2")
10796 (description
10797 "The concurrent.futures module provides a high-level interface for
10798asynchronously executing callables. This package backports the
10799concurrent.futures package from Python 3.2")
10800 (license license:bsd-3)))
10801
10802(define-public python-promise
10803 (package
10804 (name "python-promise")
10805 (version "0.4.2")
10806 (source
10807 (origin
10808 (method url-fetch)
10809 (uri (pypi-uri "promise" version))
10810 (sha256
10811 (base32
10812 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10813 (build-system python-build-system)
10814 ;; Tests wants python-futures, which is a python2 only program, and
10815 ;; can't be found by python-promise at test time.
10816 (arguments `(#:tests? #f))
10817 (home-page "https://github.com/syrusakbary/promise")
10818 (synopsis "Promises/A+ implementation for Python")
10819 (description
10820 "Promises/A+ implementation for Python")
10821 (properties `((python2-variant . ,(delay python2-promise))))
10822 (license license:expat)))
10823
10824(define-public python2-promise
10825 (let ((promise (package-with-python2
10826 (strip-python2-variant python-promise))))
10827 (package (inherit promise)
10828 (arguments (substitute-keyword-arguments (package-arguments promise)
10829 ((#:tests? _) #t)))
10830 (native-inputs
10831 `(("python2-futures" ,python2-futures)
10832 ("python2-pytest" ,python2-pytest)
10833 ,@(package-native-inputs promise))))))
10834
10835(define-public python-progressbar2
10836 (package
10837 (name "python-progressbar2")
10838 (version "3.51.3")
10839 (source
10840 (origin
10841 (method url-fetch)
10842 (uri (pypi-uri "progressbar2" version))
10843 (sha256
10844 (base32
10845 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10846 (build-system python-build-system)
10847 (propagated-inputs
10848 `(("python-six" ,python-six)
10849 ("python-utils" ,python-utils)))
10850 (native-inputs
10851 `(("python-flake8" ,python-flake8)
10852 ("python-freezegun" ,python-freezegun)
10853 ("python-pycodestyle" ,python-pycodestyle)
10854 ("python-pytest" ,python-pytest)
10855 ("python-pytest-cache" ,python-pytest-cache)
10856 ("python-pytest-cov" ,python-pytest-cov)
10857 ("python-pytest-flakes" ,python-pytest-flakes)
10858 ("python-pytest-pep8" ,python-pytest-pep8)
10859 ("python-sphinx" ,python-sphinx)))
10860 (home-page "https://github.com/WoLpH/python-progressbar")
10861 (synopsis "Text progress bar library for Python")
10862 (description
10863 "This package provides a Python progressbar library to provide
10864visual (yet text based) progress to long running operations.")
10865 (license license:bsd-3)))
10866
10867(define-public python-progressbar33
10868 (package
10869 (name "python-progressbar33")
10870 (version "2.4")
10871 (source
10872 (origin
10873 (method url-fetch)
10874 (uri (pypi-uri "progressbar33" version))
10875 (sha256
10876 (base32
10877 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10878 (build-system python-build-system)
10879 (home-page "https://github.com/germangh/python-progressbar")
10880 (synopsis "Text progress bar library for Python")
10881 (description
10882 "This package provides a text progress bar library for Python. This
10883version only differs from the original @code{progressbar} package in that it
10884uses relative package imports instead of absolute imports, which is necessary
10885for the module to work under Python 3.3.")
10886 ;; Either or both of these licenses may be selected.
10887 (license (list license:lgpl2.1+ license:bsd-3))))
10888
10889(define-public python-colorama
10890 (package
10891 (name "python-colorama")
10892 (version "0.4.3")
10893 (source
10894 (origin
10895 (method url-fetch)
10896 (uri (pypi-uri "colorama" version))
10897 (sha256
10898 (base32
10899 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
10900 (build-system python-build-system)
10901 (synopsis "Colored terminal text rendering for Python")
10902 (description "Colorama is a Python library for rendering colored terminal
10903text.")
10904 (home-page "https://pypi.org/project/colorama/")
10905 (license license:bsd-3)))
10906
10907(define-public python2-colorama
10908 (package-with-python2 python-colorama))
10909
10910(define-public python-rsa
10911 (package
10912 (name "python-rsa")
10913 (version "3.4.2")
10914 (source
10915 (origin
10916 (method url-fetch)
10917 (uri (pypi-uri "rsa" version))
10918 (sha256
10919 (base32
10920 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10921 (build-system python-build-system)
10922 (propagated-inputs
10923 `(("python-pyasn1" ,python-pyasn1)))
10924 (synopsis "Pure-Python RSA implementation")
10925 (description "Python-RSA is a pure-Python RSA implementation. It supports
10926encryption and decryption, signing and verifying signatures, and key
10927generation according to PKCS#1 version 1.5. It can be used as a Python
10928library as well as on the command line.")
10929 (home-page "https://stuvel.eu/rsa")
10930 (license license:asl2.0)))
10931
10932(define-public python2-rsa
10933 (package-with-python2 python-rsa))
10934
10935(define-public python-pluggy
10936 (package
10937 (name "python-pluggy")
10938 (version "0.13.1")
10939 (source
10940 (origin
10941 (method url-fetch)
10942 (uri (pypi-uri "pluggy" version))
10943 (sha256
10944 (base32
10945 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
10946 (build-system python-build-system)
10947 (native-inputs
10948 `(("python-setuptools-scm" ,python-setuptools-scm)))
10949 (synopsis "Plugin and hook calling mechanism for Python")
10950 (description "Pluggy is an extraction of the plugin manager as used by
10951Pytest but stripped of Pytest specific details.")
10952 (home-page "https://pypi.org/project/pluggy/")
10953 (properties `((python2-variant . ,(delay python2-pluggy))))
10954 (license license:expat)))
10955
10956(define-public python2-pluggy
10957 (let ((base (package-with-python2 (strip-python2-variant
10958 python-pluggy))))
10959 (package/inherit
10960 base
10961 (propagated-inputs
10962 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
10963
10964;; This package requires python2-importlib-metadata, but that package
10965;; ends up needing python2-pluggy via python2-pytest, so we need this
10966;; variant to solve the circular dependency.
10967(define-public python2-pluggy-bootstrap
10968 (hidden-package
10969 (package/inherit
10970 python2-pluggy
10971 (name "python2-pluggy-bootstrap")
10972 (arguments
10973 `(#:tests? #f
10974 ,@(package-arguments python2-pluggy)))
10975 (propagated-inputs
10976 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10977
10978(define-public python-tox
10979 (package
10980 (name "python-tox")
10981 (version "3.20.0")
10982 (source
10983 (origin
10984 (method url-fetch)
10985 (uri (pypi-uri "tox" version))
10986 (sha256
10987 (base32
10988 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
10989 (build-system python-build-system)
10990 (arguments
10991 ;; FIXME: Tests require pytest-timeout, which itself requires
10992 ;; pytest>=2.8.0 for installation.
10993 '(#:tests? #f))
10994 (propagated-inputs
10995 `(("python-filelock" ,python-filelock)
10996 ("python-packaging" ,python-packaging)
10997 ("python-pluggy" ,python-pluggy)
10998 ("python-py" ,python-py)
10999 ("python-six" ,python-six)
11000 ("python-toml" ,python-toml)
11001 ("python-virtualenv" ,python-virtualenv)))
11002 (native-inputs
11003 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11004 ("python-pytest" ,python-pytest) ; >= 2.3.5
11005 ("python-setuptools-scm" ,python-setuptools-scm)))
11006 (home-page "https://tox.readthedocs.io")
11007 (synopsis "Virtualenv-based automation of test activities")
11008 (description "Tox is a generic virtualenv management and test command line
11009tool. It can be used to check that a package installs correctly with
11010different Python versions and interpreters, or run tests in each type of
11011supported environment, or act as a frontend to continuous integration
11012servers.")
11013 (license license:expat)))
11014
11015(define-public python2-tox
11016 (package-with-python2 python-tox))
11017
11018(define-public python-jmespath
11019 (package
11020 (name "python-jmespath")
11021 (version "0.9.4")
11022 (source
11023 (origin
11024 (method url-fetch)
11025 (uri (pypi-uri "jmespath" version))
11026 (sha256
11027 (base32
11028 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11029 (build-system python-build-system)
11030 (native-inputs
11031 `(("python-nose" ,python-nose)))
11032 (synopsis "JSON Matching Expressions")
11033 (description "JMESPath (pronounced “james path”) is a Python library that
11034allows one to declaratively specify how to extract elements from a JSON
11035document.")
11036 (home-page "https://github.com/jmespath/jmespath.py")
11037 (license license:expat)))
11038
11039(define-public python2-jmespath
11040 (package-with-python2 python-jmespath))
11041
11042(define-public python-symengine
11043 (package
11044 (name "python-symengine")
11045 (version "0.6.1")
11046 (source
11047 (origin
11048 (method url-fetch)
11049 (uri (pypi-uri "symengine" version))
11050 (sha256
11051 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11052 (build-system python-build-system)
11053 (native-inputs
11054 `(("cmake" ,cmake)
11055 ("python-cython" ,python-cython)))
11056 (inputs
11057 `(("symengine" ,symengine)))
11058 (home-page "https://github.com/symengine/symengine.py")
11059 (synopsis "Python library providing wrappers to SymEngine")
11060 (description
11061 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11062manipulation library.")
11063 (license license:expat)))
11064
11065(define-public python-botocore
11066 (package
11067 (name "python-botocore")
11068 (version "1.15.26")
11069 (source
11070 (origin
11071 (method url-fetch)
11072 (uri (pypi-uri "botocore" version))
11073 (sha256
11074 (base32
11075 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
11076 (build-system python-build-system)
11077 (arguments
11078 ;; FIXME: Many tests are failing.
11079 '(#:tests? #f))
11080 (propagated-inputs
11081 `(("python-dateutil" ,python-dateutil)
11082 ("python-docutils" ,python-docutils)
11083 ("python-jmespath" ,python-jmespath)))
11084 (native-inputs
11085 `(("python-mock" ,python-mock)
11086 ("python-nose" ,python-nose)
11087 ("behave" ,behave)
11088 ("python-tox" ,python-tox)
11089 ("python-urllib3" ,python-urllib3)
11090 ("python-wheel" ,python-wheel)))
11091 (home-page "https://github.com/boto/botocore")
11092 (synopsis "Low-level interface to AWS")
11093 (description "Botocore is a Python library that provides a low-level
11094interface to the Amazon Web Services (AWS) API.")
11095 (license license:asl2.0)))
11096
11097(define-public python2-botocore
11098 (package-with-python2 python-botocore))
11099
11100(define-public python-pyfiglet
11101 (package
11102 (name "python-pyfiglet")
11103 (version "0.8.post1")
11104 (source
11105 (origin
11106 (method url-fetch)
11107 (uri (pypi-uri "pyfiglet" version))
11108 (sha256
11109 (base32
11110 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11111 (build-system python-build-system)
11112 (home-page "https://github.com/pwaller/pyfiglet")
11113 (synopsis "Draw ASCII art big letters in Python")
11114 (description "This module lets you draw large letter from ordinary characters
11115in pure Python.")
11116 (license license:expat)))
11117
11118(define-public python-xdo
11119 (package
11120 (name "python-xdo")
11121 (version "0.3")
11122 (source (origin
11123 (method url-fetch)
11124 (uri (string-append
11125 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11126 "python-xdo_" version ".orig.tar.gz"))
11127 (sha256
11128 (base32
11129 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11130 (build-system python-build-system)
11131 (arguments
11132 '(#:phases
11133 (modify-phases %standard-phases
11134 (add-before 'install 'patch-libxdo-path
11135 ;; Hardcode the path of dynamically loaded libxdo library.
11136 (lambda* (#:key inputs #:allow-other-keys)
11137 (let ((libxdo (string-append
11138 (assoc-ref inputs "xdotool")
11139 "/lib/libxdo.so")))
11140 (substitute* "xdo/_xdo.py"
11141 (("find_library\\(\"xdo\"\\)")
11142 (simple-format #f "\"~a\"" libxdo)))
11143 #t))))
11144 #:tests? #f)) ; no tests provided
11145 (propagated-inputs
11146 `(("python-six" ,python-six)))
11147 (inputs
11148 `(("xdotool" ,xdotool)
11149 ("libX11" ,libx11)))
11150 (home-page "https://tracker.debian.org/pkg/python-xdo")
11151 (synopsis "Python library for simulating X11 keyboard/mouse input")
11152 (description "Provides bindings to libxdo for manipulating X11 via simulated
11153input. (Note that this is mostly a legacy library; you may wish to look at
11154python-xdo for newer bindings.)")
11155 (license license:bsd-3)))
11156
11157(define-public python2-xdo
11158 (package-with-python2 python-xdo))
11159
11160(define-public python-mako
11161 (package
11162 (name "python-mako")
11163 (version "1.1.2")
11164 (source
11165 (origin
11166 (method url-fetch)
11167 (uri (pypi-uri "Mako" version))
11168 (sha256
11169 (base32
11170 "17bd6r9ynp4hyfckkia0bb8gpd98f42jfl5rmzdpbld59bbcaf9i"))))
11171 (build-system python-build-system)
11172 (arguments
11173 `(#:phases (modify-phases %standard-phases
11174 (replace 'check
11175 (lambda* (#:key tests? #:allow-other-keys)
11176 (if tests?
11177 (invoke "nosetests" "-v")
11178 (format #t "test suite not run~%"))
11179 #t)))))
11180 (propagated-inputs
11181 `(("python-markupsafe" ,python-markupsafe)))
11182 (native-inputs
11183 `(("python-mock" ,python-mock)
11184 ("python-nose" ,python-nose)))
11185 (home-page "https://www.makotemplates.org/")
11186 (synopsis "Templating language for Python")
11187 (description "Mako is a templating language for Python that compiles
11188templates into Python modules.")
11189 (license license:expat)))
11190
11191(define-public python2-mako
11192 (package-with-python2 python-mako))
11193
11194(define-public python-waitress
11195 (package
11196 (name "python-waitress")
11197 (version "1.1.0")
11198 (source
11199 (origin
11200 (method url-fetch)
11201 (uri (pypi-uri "waitress" version))
11202 (patches (search-patches "python-waitress-fix-tests.patch"))
11203 (sha256
11204 (base32
11205 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11206 (build-system python-build-system)
11207 (home-page "https://github.com/Pylons/waitress")
11208 (synopsis "Waitress WSGI server")
11209 (description "Waitress is meant to be a production-quality pure-Python WSGI
11210server with very acceptable performance.")
11211 (license license:zpl2.1)))
11212
11213(define-public python2-waitress
11214 (package-with-python2 python-waitress))
11215
11216(define-public python-whichcraft
11217 (package
11218 (name "python-whichcraft")
11219 (version "0.6.1")
11220 (source
11221 (origin
11222 (method url-fetch)
11223 (uri (pypi-uri "whichcraft" version))
11224 (sha256
11225 (base32
11226 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11227 (build-system python-build-system)
11228 (native-inputs
11229 `(("python-pytest" ,python-pytest)))
11230 (home-page "https://github.com/pydanny/whichcraft")
11231 (synopsis "Cross-platform cross-python shutil.which functionality")
11232 (description
11233 "This package provides a shim of the shutil.which function that's
11234designed to work across multiple versions of Python.")
11235 (license license:bsd-3)))
11236
11237(define-public python-cookiecutter
11238 (package
11239 (name "python-cookiecutter")
11240 (version "1.7.2")
11241 (source
11242 (origin
11243 (method url-fetch)
11244 (uri (pypi-uri "cookiecutter" version))
11245 (sha256
11246 (base32
11247 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11248 (build-system python-build-system)
11249 (native-inputs
11250 `(("python-freezegun" ,python-freezegun)
11251 ("python-pytest" ,python-pytest)
11252 ("python-pytest-catchlog" ,python-pytest-catchlog)
11253 ("python-pytest-cov" ,python-pytest-cov)
11254 ("python-pytest-mock" ,python-pytest-mock)))
11255 (propagated-inputs
11256 `(("python-binaryornot" ,python-binaryornot)
11257 ("python-click" ,python-click)
11258 ("python-future" ,python-future)
11259 ("python-jinja2" ,python-jinja2)
11260 ("python-jinja2-time" ,python-jinja2-time)
11261 ("python-poyo" ,python-poyo)
11262 ("python-requests" ,python-requests)
11263 ("python-slugify" ,python-slugify)
11264 ("python-text-unidecode" ,python-text-unidecode)
11265 ("python-whichcraft" ,python-whichcraft)))
11266 (home-page "https://github.com/cookiecutter/cookiecutter")
11267 (synopsis
11268 "Command-line utility that creates projects from project templates")
11269 (description
11270 "This package provides a command-line utility that creates projects from
11271project templates, e.g. creating a Python package project from a Python package
11272project template.")
11273 (license license:bsd-3)))
11274
11275(define-public python-pyquery
11276 (package
11277 (name "python-pyquery")
11278 (version "1.2.17")
11279 (source
11280 (origin
11281 (method url-fetch)
11282 (uri (pypi-uri "pyquery" version))
11283 (sha256
11284 (base32
11285 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11286 (build-system python-build-system)
11287 (native-inputs
11288 `(("python-webob" ,python-webob)
11289 ("python-webtest" ,python-webtest)))
11290 (propagated-inputs
11291 `(("python-lxml" ,python-lxml)
11292 ("python-cssselect" ,python-cssselect)))
11293 (home-page "https://github.com/gawel/pyquery")
11294 (synopsis "Make jQuery-like queries on xml documents")
11295 (description "pyquery allows you to make jQuery queries on xml documents.
11296The API is as much as possible the similar to jQuery. pyquery uses lxml for
11297fast xml and html manipulation.")
11298 (license license:bsd-3)))
11299
11300(define-public python-anyjson
11301 (package
11302 (name "python-anyjson")
11303 (version "0.3.3")
11304 (source
11305 (origin
11306 (method url-fetch)
11307 (uri (pypi-uri "anyjson" version))
11308 (sha256
11309 (base32
11310 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11311 (build-system python-build-system)
11312 (arguments
11313 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11314 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11315 ;; whatever) so this transformation needs to be done before the tests
11316 ;; can be run. Maybe we could add a build step to transform beforehand
11317 ;; but it could be annoying/difficult.
11318 ;; We can enable tests for the Python 2 version, though, and do below.
11319 #:tests? #f))
11320 (home-page "https://bitbucket.org/runeh/anyjson/")
11321 (synopsis
11322 "Wraps best available JSON implementation in a common interface")
11323 (description
11324 "Anyjson loads whichever is the fastest JSON module installed
11325and provides a uniform API regardless of which JSON implementation is used.")
11326 (license license:bsd-3)
11327 (properties `((python2-variant . ,(delay python2-anyjson))))))
11328
11329(define-public python2-anyjson
11330 (let ((anyjson (package-with-python2
11331 (strip-python2-variant python-anyjson))))
11332 (package
11333 (inherit anyjson)
11334 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11335 #:tests? #t
11336 ,@(package-arguments anyjson)))
11337 (native-inputs `(("python2-nose" ,python2-nose))))))
11338
11339(define-public python-amqp
11340 (package
11341 (name "python-amqp")
11342 (version "2.3.2")
11343 (source
11344 (origin
11345 (method url-fetch)
11346 (uri (pypi-uri "amqp" version))
11347 (sha256
11348 (base32
11349 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11350 (build-system python-build-system)
11351 (native-inputs
11352 `(("python-case" ,python-case)
11353 ("python-pytest-sugar" ,python-pytest-sugar)
11354 ("python-mock" ,python-mock)))
11355 (propagated-inputs
11356 `(("python-vine" ,python-vine)))
11357 (home-page "https://github.com/celery/py-amqp")
11358 (synopsis
11359 "Low-level AMQP client for Python (fork of amqplib)")
11360 (description
11361 "This is a fork of amqplib which was originally written by Barry Pederson.
11362It is maintained by the Celery project, and used by kombu as a pure python
11363alternative when librabbitmq is not available.")
11364 (license license:lgpl2.1+)
11365 (properties `((python2-variant . ,(delay python2-amqp))))))
11366
11367(define-public python2-amqp
11368 (let ((amqp (package-with-python2
11369 (strip-python2-variant python-amqp))))
11370 (package
11371 (inherit amqp)
11372 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11373 ;; unmaintained. Weirdly, does not do this on the python 3
11374 ;; version?
11375 #:tests? #f
11376 ,@(package-arguments amqp))))))
11377
11378(define-public python-txamqp
11379 (package
11380 (name "python-txamqp")
11381 (version "0.8.2")
11382 (source
11383 (origin
11384 (method url-fetch)
11385 (uri (pypi-uri "txAMQP" version))
11386 (sha256
11387 (base32
11388 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11389 (build-system python-build-system)
11390 (propagated-inputs
11391 `(("python-six" ,python-six)
11392 ("python-twisted" ,python-twisted)))
11393 (home-page "https://github.com/txamqp/txamqp")
11394 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11395 (description
11396 "This package provides a Python library for communicating with AMQP peers
11397and brokers using the asynchronous networking framework Twisted. It contains
11398all the necessary code to connect, send and receive messages to/from an
11399AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11400also includes support for using Thrift RPC over AMQP in Twisted
11401applications.")
11402 (license license:asl2.0)))
11403
11404(define-public python2-txamqp
11405 (package-with-python2 python-txamqp))
11406
11407(define-public python-kombu
11408 (package
11409 (name "python-kombu")
11410 (version "4.2.2")
11411 (source
11412 (origin
11413 (method url-fetch)
11414 (uri (pypi-uri "kombu" version))
11415 (sha256
11416 (base32
11417 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11418 (build-system python-build-system)
11419 (native-inputs
11420 `(("python-mock" ,python-mock)
11421 ("python-case" ,python-case)
11422 ("python-pyro4" ,python-pyro4)
11423 ("python-pytest-sugar" ,python-pytest-sugar)
11424 ("python-pytz" ,python-pytz)))
11425 (propagated-inputs
11426 `(("python-anyjson" ,python-anyjson)
11427 ("python-amqp" ,python-amqp)
11428 ("python-redis" ,python-redis)))
11429 (home-page "https://kombu.readthedocs.io")
11430 (synopsis "Message passing library for Python")
11431 (description "The aim of Kombu is to make messaging in Python as easy as
11432possible by providing an idiomatic high-level interface for the AMQ protocol,
11433and also provide proven and tested solutions to common messaging problems.
11434AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11435message orientation, queuing, routing, reliability and security, for which the
11436RabbitMQ messaging server is the most popular implementation.")
11437 (license license:bsd-3)
11438 (properties `((python2-variant . ,(delay python2-kombu))))))
11439
11440(define-public python2-kombu
11441 (let ((kombu (package-with-python2
11442 (strip-python2-variant python-kombu))))
11443 (package
11444 (inherit kombu)
11445 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11446 ;; It works fine on the python3 variant.
11447 #:tests? #f
11448 ,@(package-arguments kombu)))
11449 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11450 ,@(package-native-inputs kombu))))))
11451
11452(define-public python-billiard
11453 (package
11454 (name "python-billiard")
11455 (version "3.5.0.5")
11456 (source
11457 (origin
11458 (method url-fetch)
11459 (uri (pypi-uri "billiard" version))
11460 (sha256
11461 (base32
11462 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11463 (build-system python-build-system)
11464 (native-inputs
11465 `(("python-case" ,python-case)
11466 ("python-pytest" ,python-pytest)))
11467 (home-page "https://github.com/celery/billiard")
11468 (synopsis
11469 "Python multiprocessing fork with improvements and bugfixes")
11470 (description
11471 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11472multiprocessing package itself is a renamed and updated version of R Oudkerk's
11473pyprocessing package. This standalone variant is intended to be compatible with
11474Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11475 (license license:bsd-3)
11476 (properties `((python2-variant . ,(delay python2-billiard))))))
11477
11478(define-public python2-billiard
11479 (let ((billiard (package-with-python2
11480 (strip-python2-variant python-billiard))))
11481 (package
11482 (inherit billiard)
11483 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11484 ("python2-mock" ,python2-mock)
11485 ,@(package-native-inputs billiard))))))
11486
11487(define-public python-celery
11488 (package
11489 (name "python-celery")
11490 (version "4.2.1")
11491 (source
11492 (origin
11493 (method url-fetch)
11494 (uri (pypi-uri "celery" version))
11495 (sha256
11496 (base32
11497 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11498 (build-system python-build-system)
11499 (arguments
11500 '(;; TODO The tests fail with Python 3.7
11501 ;; https://github.com/celery/celery/issues/4849
11502 #:tests? #f
11503 #:phases
11504 (modify-phases %standard-phases
11505 (add-after 'unpack 'patch-requirements
11506 (lambda _
11507 (substitute* "requirements/test.txt"
11508 (("pytest>=3\\.0,<3\\.3")
11509 "pytest>=3.0"))
11510 #t)))))
11511 (native-inputs
11512 `(("python-case" ,python-case)
11513 ("python-pytest" ,python-pytest)))
11514 (propagated-inputs
11515 `(("python-pytz" ,python-pytz)
11516 ("python-billiard" ,python-billiard)
11517 ("python-kombu" ,python-kombu)))
11518 (home-page "https://celeryproject.org")
11519 (synopsis "Distributed Task Queue")
11520 (description "Celery is an asynchronous task queue/job queue based on
11521distributed message passing. It is focused on real-time operation, but
11522supports scheduling as well. The execution units, called tasks, are executed
11523concurrently on a single or more worker servers using multiprocessing,
11524Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11525synchronously (wait until ready).")
11526 (license license:bsd-3)
11527 (properties `((python2-variant . ,(delay python2-celery))))))
11528
11529(define-public python2-celery
11530 (let ((celery (package-with-python2
11531 (strip-python2-variant python-celery))))
11532 (package
11533 (inherit celery)
11534 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11535 ("python2-mock" ,python2-mock)
11536 ,@(package-native-inputs celery))))))
11537
11538(define-public python-translitcodec
11539 (package
11540 (name "python-translitcodec")
11541 (version "0.4.0")
11542 (source
11543 (origin
11544 (method url-fetch)
11545 (uri (pypi-uri "translitcodec" version))
11546 (sha256
11547 (base32
11548 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11549 (build-system python-build-system)
11550 (arguments
11551 `(#:tests? #f)) ; no tests provided
11552 (home-page
11553 "https://github.com/claudep/translitcodec")
11554 (synopsis
11555 "Unicode to 8-bit charset transliteration codec")
11556 (description
11557 "This package contains codecs for transliterating ISO 10646 texts into
11558best-effort representations using smaller coded character sets (ASCII,
11559ISO 8859, etc.).")
11560 (license license:expat)))
11561
11562(define-public python2-translitcodec
11563 (package-with-python2 python-translitcodec))
11564
11565(define-public python-editor
11566 (package
11567 (name "python-editor")
11568 (version "1.0.4")
11569 (source
11570 (origin
11571 (method url-fetch)
11572 (uri (pypi-uri "python-editor" version))
11573 (sha256
11574 (base32
11575 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11576 (build-system python-build-system)
11577 (arguments
11578 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11579 (home-page "https://github.com/fmoo/python-editor")
11580 (synopsis "Programmatically open an editor, capture the result")
11581 (description
11582 "python-editor is a library that provides the editor module for
11583programmatically interfacing with your system's $EDITOR.")
11584 (license license:asl2.0)))
11585
11586(define-public python2-editor
11587 (package-with-python2 python-editor))
11588
11589(define-public python-vobject
11590 (package
11591 (name "python-vobject")
11592 (version "0.9.6.1")
11593 (source (origin
11594 (method url-fetch)
11595 (uri (pypi-uri "vobject" version))
11596 (sha256
11597 (base32
11598 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11599 (build-system python-build-system)
11600 (arguments
11601 '(;; The test suite relies on some non-portable Windows interfaces.
11602 #:tests? #f))
11603 (propagated-inputs
11604 `(("python-dateutil" ,python-dateutil)
11605 ("python-pyicu" ,python-pyicu)))
11606 (synopsis "Parse and generate vCard and vCalendar files")
11607 (description "Vobject is intended to be a full featured Python package for
11608parsing and generating vCard and vCalendar files. Currently, iCalendar files
11609are supported and well tested. vCard 3.0 files are supported, and all data
11610should be imported, but only a few components are understood in a sophisticated
11611way.")
11612 (home-page "https://eventable.github.io/vobject/")
11613 (license license:asl2.0)))
11614
11615(define-public python2-vobject
11616 (package-with-python2 python-vobject))
11617
11618(define-public python-munkres
11619 (package
11620 (name "python-munkres")
11621 (version "1.0.8")
11622 (source (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "munkres" version))
11625 (sha256
11626 (base32
11627 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11628 (build-system python-build-system)
11629 (arguments
11630 '(#:tests? #f)) ; no test suite
11631 (home-page "https://software.clapper.org/munkres/")
11632 (synopsis "Implementation of the Munkres algorithm")
11633 (description "The Munkres module provides an implementation of the Munkres
11634algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11635useful for solving the Assignment Problem.")
11636 (license license:bsd-3)))
11637
11638(define-public python2-munkres
11639 (package-with-python2 python-munkres))
11640
11641(define-public python-whoosh
11642 (package
11643 (name "python-whoosh")
11644 (version "2.7.4")
11645 (source
11646 (origin
11647 (method url-fetch)
11648 (uri (pypi-uri "Whoosh" version))
11649 (sha256
11650 (base32
11651 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11652 (build-system python-build-system)
11653 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11654 (native-inputs
11655 `(("python-pytest" ,python-pytest)))
11656 (home-page "https://bitbucket.org/mchaput/whoosh")
11657 (synopsis "Full text indexing, search, and spell checking library")
11658 (description
11659 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11660checking library.")
11661 (license license:bsd-2)))
11662
11663(define-public python2-whoosh
11664 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11665 (package (inherit whoosh)
11666 (propagated-inputs
11667 `(("python2-backport-ssl-match-hostname"
11668 ,python2-backport-ssl-match-hostname)
11669 ,@(package-propagated-inputs whoosh))))))
11670
11671(define-public python-pathlib
11672 (package
11673 (name "python-pathlib")
11674 (version "1.0.1")
11675 (source (origin
11676 (method url-fetch)
11677 (uri (pypi-uri "pathlib" version))
11678 (sha256
11679 (base32
11680 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11681 (build-system python-build-system)
11682 ;; The tests depend on the internal "test" module, which does not provide
11683 ;; a stable interface.
11684 (arguments `(#:tests? #f))
11685 (home-page "https://pathlib.readthedocs.org/")
11686 (synopsis "Object-oriented file system paths")
11687 (description "Pathlib offers a set of classes to handle file system paths.
11688It offers the following advantages over using string objects:
11689
11690@enumerate
11691@item No more cumbersome use of os and os.path functions. Everything can
11692be done easily through operators, attribute accesses, and method calls.
11693@item Embodies the semantics of different path types. For example,
11694comparing Windows paths ignores casing.
11695@item Well-defined semantics, eliminating any inconsistencies or
11696ambiguities (forward vs. backward slashes, etc.).
11697@end enumerate
11698
11699Note: In Python 3.4, pathlib is now part of the standard library. For other
11700Python versions please consider python-pathlib2 instead, which tracks the
11701standard library module. This module (python-pathlib) isn't maintained
11702anymore.")
11703 (license license:expat)))
11704
11705(define-public python2-pathlib
11706 (package-with-python2 python-pathlib))
11707
11708(define-public python2-pathlib2
11709 (package
11710 (name "python2-pathlib2")
11711 (version "2.3.5")
11712 (source (origin
11713 (method url-fetch)
11714 (uri (pypi-uri "pathlib2" version))
11715 (sha256
11716 (base32
11717 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11718 (build-system python-build-system)
11719 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11720 ;; version is 3.4 which already includes this package as part of the
11721 ;; standard library.
11722 (arguments
11723 `(#:python ,python-2))
11724 (propagated-inputs
11725 `(("python2-scandir" ,python2-scandir)
11726 ("python2-six" ,python2-six)))
11727 (home-page "https://pypi.org/project/pathlib2/")
11728 (synopsis "Object-oriented file system paths - backport of standard
11729pathlib module")
11730 (description "The goal of pathlib2 is to provide a backport of standard
11731pathlib module which tracks the standard library module, so all the newest
11732features of the standard pathlib can be used also on older Python versions.
11733
11734Pathlib offers a set of classes to handle file system paths. It offers the
11735following advantages over using string objects:
11736
11737@enumerate
11738@item No more cumbersome use of os and os.path functions. Everything can
11739be done easily through operators, attribute accesses, and method calls.
11740@item Embodies the semantics of different path types. For example,
11741comparing Windows paths ignores casing.
11742@item Well-defined semantics, eliminating any inconsistencies or
11743ambiguities (forward vs. backward slashes, etc.).
11744@end enumerate")
11745 (license license:expat)))
11746
11747(define-public python2-pathlib2-bootstrap
11748 (hidden-package
11749 (package
11750 (inherit python2-pathlib2)
11751 (name "python2-pathlib2-bootstrap")
11752 (propagated-inputs
11753 `(("python2-scandir" ,python2-scandir)
11754 ("python2-six" ,python2-six-bootstrap))))))
11755
11756(define-public python-jellyfish
11757 (package
11758 (name "python-jellyfish")
11759 (version "0.5.6")
11760 (source (origin
11761 (method url-fetch)
11762 (uri (pypi-uri "jellyfish" version))
11763 (sha256
11764 (base32
11765 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11766 (build-system python-build-system)
11767 (native-inputs
11768 `(("python-pytest" ,python-pytest)))
11769 (home-page "https://github.com/jamesturk/jellyfish")
11770 (synopsis "Approximate and phonetic matching of strings")
11771 (description "Jellyfish uses a variety of string comparison and phonetic
11772encoding algorithms to do fuzzy string matching.")
11773 (license license:bsd-2)
11774 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11775
11776(define-public python2-jellyfish
11777 (let ((jellyfish (package-with-python2
11778 (strip-python2-variant python-jellyfish))))
11779 (package (inherit jellyfish)
11780 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11781 ,@(package-native-inputs jellyfish))))))
11782
11783(define-public python2-unicodecsv
11784 (package
11785 (name "python2-unicodecsv")
11786 (version "0.14.1")
11787 (source (origin
11788 (method git-fetch)
11789 ;; The test suite is not included in the PyPi release.
11790 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11791 (uri (git-reference
11792 (url "https://github.com/jdunck/python-unicodecsv")
11793 (commit version)))
11794 (file-name (git-file-name name version))
11795 (sha256
11796 (base32
11797 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11798 (build-system python-build-system)
11799 (arguments
11800 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11801 #:python ,python-2))
11802 (native-inputs
11803 `(("python2-unittest2" ,python2-unittest2)))
11804 (home-page "https://github.com/jdunck/python-unicodecsv")
11805 (synopsis "Unicode CSV module for Python 2")
11806 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11807module, adding support for Unicode strings.")
11808 (license license:bsd-2)))
11809
11810(define-public python-rarfile
11811 (package
11812 (name "python-rarfile")
11813 (version "2.8")
11814 (source (origin
11815 (method url-fetch)
11816 (uri (pypi-uri "rarfile" version))
11817 (sha256
11818 (base32
11819 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11820 (build-system python-build-system)
11821 (arguments
11822 '(#:phases
11823 (modify-phases %standard-phases
11824 (replace 'check
11825 ;; Many tests fail, but the installation proceeds.
11826 (lambda _ (invoke "make" "-C" "test" "test"))))))
11827 (native-inputs
11828 `(("which" ,which))) ; required for tests
11829 (propagated-inputs
11830 `(("libarchive" ,libarchive)))
11831 (home-page "https://github.com/markokr/rarfile")
11832 (synopsis "RAR archive reader for Python")
11833 (description "This is Python module for RAR archive reading. The interface
11834is made as zipfile like as possible.")
11835 (license license:isc)))
11836
11837(define-public python2-rarfile
11838 (package-with-python2 python-rarfile))
11839
11840(define-public python-magic
11841 (package
11842 (name "python-magic")
11843 (version "0.4.15")
11844 (source
11845 (origin
11846 (method url-fetch)
11847 (uri (pypi-uri "python-magic" version))
11848 (sha256
11849 (base32
11850 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11851 (file-name (string-append name "-" version "-checkout"))))
11852 (build-system python-build-system)
11853 (arguments
11854 ;; The tests are unreliable, so don't run them. The tests fail
11855 ;; under Python3 because they were written for Python2 and
11856 ;; contain import statements that do not work in Python3. One of
11857 ;; the tests fails under Python2 because its assertions are
11858 ;; overly stringent; it relies on comparing output strings which
11859 ;; are brittle and can change depending on the version of
11860 ;; libmagic being used and the system on which the test is
11861 ;; running. In my case, under GuixSD 0.10.0, only one test
11862 ;; failed, and it seems to have failed only because the version
11863 ;; of libmagic that is packaged in Guix outputs a slightly
11864 ;; different (but not wrong) string than the one that the test
11865 ;; expected.
11866 '(#:tests? #f
11867 #:phases (modify-phases %standard-phases
11868 ;; Replace a specific method call with a hard-coded
11869 ;; path to the necessary libmagic.so file in the
11870 ;; store. If we don't do this, then the method call
11871 ;; will fail to find the libmagic.so file, which in
11872 ;; turn will cause any application using
11873 ;; python-magic to fail.
11874 (add-before 'build 'hard-code-path-to-libmagic
11875 (lambda* (#:key inputs #:allow-other-keys)
11876 (let ((file (assoc-ref inputs "file")))
11877 (substitute* "magic.py"
11878 (("ctypes.util.find_library\\('magic'\\)")
11879 (string-append "'" file "/lib/libmagic.so'")))
11880 #t)))
11881 (add-before 'install 'disable-egg-compression
11882 (lambda _
11883 (let ((port (open-file "setup.cfg" "a")))
11884 (display "\n[easy_install]\nzip_ok = 0\n"
11885 port)
11886 (close-port port)
11887 #t))))))
11888 (inputs
11889 ;; python-magic needs to be able to find libmagic.so.
11890 `(("file" ,file)))
11891 (home-page
11892 "https://github.com/ahupp/python-magic")
11893 (synopsis
11894 "File type identification using libmagic")
11895 (description
11896 "This module uses ctypes to access the libmagic file type
11897identification library. It makes use of the local magic database and
11898supports both textual and MIME-type output. Note that this module and
11899the python-file module both provide a \"magic.py\" file; these two
11900modules, which are different and were developed separately, both serve
11901the same purpose: to provide Python bindings for libmagic.")
11902 (license license:expat)))
11903
11904(define-public python2-magic
11905 (package-with-python2 python-magic))
11906
11907(define-public python2-s3cmd
11908 (package
11909 (name "python2-s3cmd")
11910 (version "1.6.1")
11911 (source
11912 (origin
11913 (method url-fetch)
11914 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11915 "s3cmd-" version ".tar.gz"))
11916 (sha256
11917 (base32
11918 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11919 (build-system python-build-system)
11920 (arguments
11921 ;; s3cmd is written for python2 only and contains no tests.
11922 `(#:python ,python-2
11923 #:tests? #f))
11924 (propagated-inputs
11925 `(("python2-dateutil" ,python2-dateutil)
11926 ;; The python-file package also provides a magic.py module.
11927 ;; This is an unfortunate state of affairs; however, s3cmd
11928 ;; fails to install if it cannot find specifically the
11929 ;; python-magic package. Thus we include it, instead of using
11930 ;; python-file. Ironically, s3cmd sometimes works better
11931 ;; without libmagic bindings at all:
11932 ;; https://github.com/s3tools/s3cmd/issues/198
11933 ("python2-magic" ,python2-magic)))
11934 (home-page "https://s3tools.org/s3cmd")
11935 (synopsis "Command line tool for S3-compatible storage services")
11936 (description
11937 "S3cmd is a command line tool for uploading, retrieving and managing data
11938in storage services that are compatible with the Amazon Simple Storage
11939Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11940GnuPG encryption, and more. It also supports management of Amazon's
11941CloudFront content delivery network.")
11942 (license license:gpl2+)))
11943
11944(define-public python-pkgconfig
11945 (package
11946 (name "python-pkgconfig")
11947 (version "1.3.1")
11948 (source
11949 (origin
11950 (method url-fetch)
11951 (uri (pypi-uri "pkgconfig" version))
11952 (sha256
11953 (base32
11954 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
11955 (build-system python-build-system)
11956 (native-inputs
11957 `(("python-nose" ,python-nose)))
11958 (inputs
11959 `(("pkg-config" ,pkg-config)))
11960 (arguments
11961 `(#:phases
11962 (modify-phases %standard-phases
11963 (add-before 'build 'patch
11964 ;; Hard-code the path to pkg-config.
11965 (lambda _
11966 (substitute* "pkgconfig/pkgconfig.py"
11967 (("cmd = 'pkg-config")
11968 (string-append "cmd = '" (which "pkg-config"))))
11969 #t))
11970 (replace 'check
11971 (lambda _
11972 (invoke "nosetests" "test.py"))))))
11973 (home-page "https://github.com/matze/pkgconfig")
11974 (synopsis "Python interface for pkg-config")
11975 (description "This module provides a Python interface to pkg-config. It
11976can be used to find all pkg-config packages, check if a package exists,
11977check if a package meets certain version requirements, query CFLAGS and
11978LDFLAGS and parse the output to build extensions with setup.py.")
11979 (license license:expat)))
11980
11981(define-public python2-pkgconfig
11982 (package-with-python2 python-pkgconfig))
11983
11984(define-public python-bz2file
11985 (package
11986 (name "python-bz2file")
11987 (version "0.98")
11988 (source
11989 (origin
11990 (method url-fetch)
11991 (uri (pypi-uri "bz2file" version))
11992 (sha256
11993 (base32
11994 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11995 (build-system python-build-system)
11996 (arguments
11997 `(#:tests? #f)) ; Tests use deprecated python modules.
11998 (home-page "https://github.com/nvawda/bz2file")
11999 (synopsis "Read and write bzip2-compressed files")
12000 (description
12001 "Bz2file is a Python library for reading and writing bzip2-compressed
12002files. It contains a drop-in replacement for the I/O interface in the
12003standard library's @code{bz2} module, including features from the latest
12004development version of CPython that are not available in older releases.")
12005 (license license:asl2.0)))
12006
12007(define-public python2-bz2file
12008 (package-with-python2 python-bz2file))
12009
12010(define-public python-future
12011 (package
12012 (name "python-future")
12013 (version "0.17.1")
12014 (source
12015 (origin
12016 (method url-fetch)
12017 (uri (pypi-uri "future" version))
12018 (sha256
12019 (base32
12020 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12021 (build-system python-build-system)
12022 ;; Many tests connect to the network or are otherwise flawed.
12023 ;; https://github.com/PythonCharmers/python-future/issues/210
12024 (arguments
12025 `(#:tests? #f))
12026 (home-page "https://python-future.org")
12027 (synopsis "Single-source support for Python 3 and 2")
12028 (description
12029 "@code{python-future} is the missing compatibility layer between Python 2 and
12030Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12031to support both Python 2 and Python 3 with minimal overhead.")
12032 (license license:expat)))
12033
12034(define-public python2-future
12035 (package-with-python2 python-future))
12036
12037(define-public python-cysignals
12038 (package
12039 (name "python-cysignals")
12040 (version "1.9.0")
12041 (source
12042 (origin
12043 (method url-fetch)
12044 (uri (pypi-uri "cysignals" version))
12045 (sha256
12046 (base32
12047 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12048 (build-system python-build-system)
12049 (native-inputs
12050 `(("python-cython" ,python-cython)
12051 ("python-sphinx" ,python-sphinx)))
12052 (inputs
12053 `(("pari-gp" ,pari-gp)))
12054 (arguments
12055 `(#:modules ((guix build python-build-system)
12056 ((guix build gnu-build-system) #:prefix gnu:)
12057 (guix build utils))
12058 ;; FIXME: Tests are executed after installation and currently fail
12059 ;; when not installing into standard locations; the author is working
12060 ;; on a fix.
12061 #:tests? #f
12062 #:phases
12063 (modify-phases %standard-phases
12064 (add-before
12065 'build 'configure
12066 (assoc-ref gnu:%standard-phases 'configure)))))
12067 (home-page
12068 "https://github.com/sagemath/cysignals")
12069 (synopsis
12070 "Handling of interrupts and signals for Cython")
12071 (description
12072 "The cysignals package provides mechanisms to handle interrupts (and
12073other signals and errors) in Cython code, using two related approaches,
12074for mixed Cython/Python code or external C libraries and pure Cython code,
12075respectively.")
12076 (license license:lgpl3+)))
12077
12078(define-public python2-cysignals
12079 (package-with-python2 python-cysignals))
12080
12081(define-public python2-shedskin
12082 (package
12083 (name "python2-shedskin")
12084 (version "0.9.4")
12085 (source
12086 (origin
12087 (method url-fetch)
12088 (uri (string-append "https://github.com/shedskin/shedskin/"
12089 "releases/download/v" version
12090 "/shedskin-" version ".tgz"))
12091 (sha256
12092 (base32
12093 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12094 (build-system python-build-system)
12095 (arguments
12096 `(#:python ,python-2
12097 #:phases (modify-phases %standard-phases
12098 (add-after 'unpack 'fix-resulting-include-libs
12099 (lambda* (#:key inputs #:allow-other-keys)
12100 (let ((libgc (assoc-ref inputs "libgc"))
12101 (pcre (assoc-ref inputs "pcre")))
12102 (substitute* "shedskin/makefile.py"
12103 (("variable == 'CCFLAGS':[ ]*")
12104 (string-append "variable == 'CCFLAGS':\n"
12105 " line += ' -I " pcre "/include"
12106 " -I " libgc "/include'"))
12107 (("variable == 'LFLAGS':[ ]*")
12108 (string-append "variable == 'LFLAGS':\n"
12109 " line += ' -L" pcre "/lib"
12110 " -L " libgc "/lib'")))
12111 #t))))))
12112 (inputs `(("pcre" ,pcre)
12113 ("libgc" ,libgc)))
12114 (home-page "https://shedskin.github.io/")
12115 (synopsis "Experimental Python-2 to C++ Compiler")
12116 (description (string-append "This is an experimental compiler for a subset of
12117Python. It generates C++ code and a Makefile."))
12118 (license (list license:gpl3 license:bsd-3 license:expat))))
12119
12120(define-public python2-rope
12121 (package
12122 (name "python2-rope")
12123 (version "0.11.0")
12124 (source
12125 (origin
12126 (method url-fetch)
12127 (uri (pypi-uri "rope" version))
12128 (sha256
12129 (base32
12130 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12131 (arguments
12132 ;; Rope has only partial python3 support, see `python-rope'
12133 `(#:python ,python-2))
12134 (build-system python-build-system)
12135 (native-inputs
12136 `(("python2-unittest2" ,python2-unittest2)))
12137 (home-page "https://github.com/python-rope/rope")
12138 (synopsis "Refactoring library for Python")
12139 (description "Rope is a refactoring library for Python. It facilitates
12140the renaming, moving and extracting of attributes, functions, modules, fields
12141and parameters in Python 2 source code. These refactorings can also be applied
12142to occurrences in strings and comments.")
12143 (license license:gpl2)))
12144
12145(define-public python-rope
12146 (package
12147 (inherit python2-rope)
12148 (name "python-rope")
12149 (arguments `(#:python ,python-wrapper
12150 ;; XXX: Only partial python3 support, results in some failing
12151 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12152 #:tests? #f))
12153 (properties `((python2-variant . ,(delay python2-rope))))))
12154
12155(define-public python-py3status
12156 (package
12157 (name "python-py3status")
12158 (version "3.21")
12159 (source
12160 (origin
12161 (method url-fetch)
12162 (uri (pypi-uri "py3status" version))
12163 (sha256
12164 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12165 (build-system python-build-system)
12166 (inputs
12167 `(("file" ,file)))
12168 (arguments
12169 '(#:phases
12170 (modify-phases %standard-phases
12171 ;; 'file' is used for detection of configuration file encoding
12172 ;; let's make link the dependency to particular input
12173 (add-before 'build 'patch-file-path
12174 (lambda* (#:key inputs #:allow-other-keys)
12175 (let ((file-path (assoc-ref inputs "file")))
12176 (substitute* "py3status/parse_config.py"
12177 (("\\[\"file\", \"-b\"")
12178 (string-append "['" file-path "/bin/file', '-b'")))
12179 #t))))
12180 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12181 (home-page "https://github.com/ultrabug/py3status")
12182 (synopsis "Extensible i3status wrapper written in Python")
12183 (description "py3status is an i3status wrapper which extends i3status
12184functionality in a modular way, allowing you to extend your panel with your
12185own code, responding to click events and updating clock every second.")
12186 (license license:bsd-3)))
12187
12188(define-public python2-selectors2
12189 (package
12190 (name "python2-selectors2")
12191 (version "2.0.1")
12192 (source (origin
12193 (method url-fetch)
12194 (uri (pypi-uri "selectors2" version))
12195 (sha256
12196 (base32
12197 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12198 (build-system python-build-system)
12199 (arguments
12200 `(#:python ,python-2))
12201 (native-inputs
12202 `(("python2-mock" ,python2-mock)
12203 ("python2-psutil" ,python2-psutil)))
12204 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12205 (synopsis "Backport of the selectors module from Python 3.5+")
12206 (description
12207 "This package provides a drop-in replacement for the @code{selectors}
12208module in Python 3.5 and later.")
12209 (license license:expat)))
12210
12211(define-public python-tblib
12212 (package
12213 (name "python-tblib")
12214 (version "1.6.0")
12215 (source (origin
12216 (method url-fetch)
12217 (uri (pypi-uri "tblib" version))
12218 (sha256
12219 (base32
12220 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12221 (build-system python-build-system)
12222 (arguments
12223 `(#:phases
12224 (modify-phases %standard-phases
12225 (replace 'check
12226 (lambda _
12227 ;; Upstream runs tests after installation and the package itself
12228 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12229 ;; found.
12230 (setenv "PYTHONPATH"
12231 (string-append (getcwd) "/build/lib:"
12232 (getenv "PYTHONPATH")))
12233 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12234 (native-inputs
12235 `(("python-pytest" ,python-pytest)
12236 ("python-six" ,python-six)))
12237 (home-page "https://github.com/ionelmc/python-tblib")
12238 (synopsis "Traceback serialization library")
12239 (description
12240 "Traceback serialization allows you to:
12241
12242@enumerate
12243@item Pickle tracebacks and raise exceptions with pickled tracebacks in
12244different processes. This allows better error handling when running code over
12245multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12246
12247@item Parse traceback strings and raise with the parsed tracebacks.
12248@end enumerate\n")
12249 (license license:bsd-3)))
12250
12251(define-public python2-tblib
12252 (package-with-python2 python-tblib))
12253
12254(define-public python-greenlet
12255 (package
12256 (name "python-greenlet")
12257 (version "0.4.16")
12258 (source (origin
12259 (method url-fetch)
12260 (uri (pypi-uri "greenlet" version))
12261 (sha256
12262 (base32
12263 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12264 (build-system python-build-system)
12265 (home-page "https://greenlet.readthedocs.io/")
12266 (synopsis "Lightweight in-process concurrent programming")
12267 (description
12268 "Greenlet package is a spin-off of Stackless, a version of CPython
12269that supports micro-threads called \"tasklets\". Tasklets run
12270pseudo-concurrently (typically in a single or a few OS-level threads) and
12271are synchronized with data exchanges on \"channels\".")
12272 (license (list license:psfl license:expat))))
12273
12274(define-public python2-greenlet
12275 (package-with-python2 python-greenlet))
12276
12277(define-public python-objgraph
12278 (package
12279 (name "python-objgraph")
12280 (version "3.4.1")
12281 (source
12282 (origin
12283 (method url-fetch)
12284 (uri (pypi-uri "objgraph" version))
12285 (sha256
12286 (base32
12287 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12288 (build-system python-build-system)
12289 (propagated-inputs
12290 `(("python-graphviz" ,python-graphviz)))
12291 (native-inputs
12292 `(("python-mock" ,python-mock)
12293 ("graphviz" ,graphviz)))
12294 (home-page "https://mg.pov.lt/objgraph/")
12295 (synopsis "Draw Python object reference graphs with graphviz")
12296 (description
12297 "This package provides tools to draw Python object reference graphs with
12298graphviz.")
12299 (license license:expat)))
12300
12301(define-public python2-objgraph
12302 (package-with-python2 python-objgraph))
12303
12304(define-public python-gevent
12305 (package
12306 (name "python-gevent")
12307 (version "20.6.2")
12308 (source (origin
12309 (method url-fetch)
12310 (uri (pypi-uri "gevent" version))
12311 (sha256
12312 (base32
12313 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12314 (modules '((guix build utils)))
12315 (snippet
12316 '(begin
12317 ;; unbunding libev and c-ares
12318 (delete-file-recursively "deps")
12319 #t))))
12320 (build-system python-build-system)
12321 (arguments
12322 `(#:modules ((ice-9 ftw)
12323 (ice-9 match)
12324 (srfi srfi-26)
12325 (guix build utils)
12326 (guix build python-build-system))
12327 #:phases (modify-phases %standard-phases
12328 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12329 (lambda _
12330 (substitute* "src/gevent/subprocess.py"
12331 (("/bin/sh") (which "sh")))
12332 (for-each (lambda (file)
12333 (substitute* file
12334 (("/bin/sh") (which "sh"))
12335 (("/bin/true") (which "true"))))
12336 (find-files "src/greentest" "\\.py$"))
12337 #t))
12338 (add-before 'build 'do-not-use-bundled-sources
12339 (lambda _
12340 (setenv "GEVENTSETUP_EMBED" "0")
12341
12342 ;; Prevent building bundled libev.
12343 (substitute* "setup.py"
12344 (("run_make=_BUILDING")
12345 "run_make=False"))
12346 #t))
12347 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12348 (lambda* (#:key inputs #:allow-other-keys)
12349 (let ((greenlet (string-append
12350 (assoc-ref inputs "python-greenlet")
12351 "/include")))
12352 (match (scandir greenlet
12353 (lambda (item)
12354 (string-prefix? "python" item)))
12355 ((python)
12356 (setenv "C_INCLUDE_PATH"
12357 (string-append greenlet "/" python ":"
12358 (or (getenv "C_INCLUDE_PATH")
12359 ""))))))
12360 #t))
12361 (add-before 'check 'pretend-to-be-CI
12362 (lambda _
12363 ;; A few tests are skipped due to network constraints or
12364 ;; get longer timeouts when running in a CI environment.
12365 ;; Piggy-back on that, as we need the same adjustments.
12366 (setenv "TRAVIS" "1")
12367 (setenv "APPVEYOR" "1")
12368 #t))
12369 (add-before 'check 'adjust-tests
12370 (lambda _
12371 (let ((disabled-tests
12372 '(;; These tests rely on networking which is not
12373 ;; available in the build container.
12374 "test_urllib2net.py"
12375 "test__server.py"
12376 "test__server_pywsgi.py"
12377 "test_socket.py"
12378 "test__socket.py"
12379 "test__socket_ssl.py"
12380 "test__socket_dns.py"
12381 "test__socket_dns6.py"
12382 "test___example_servers.py"
12383 "test__getaddrinfo_import.py"
12384 "test__examples.py"
12385 "test_httplib.py"
12386 "test_https.py"
12387 "test_urllib2_localnet.py"
12388 "test_ssl.py"
12389 "test__ssl.py"
12390 ;; XXX: These tests borrow functionality from the
12391 ;; Python builtin 'test' module, but it is not
12392 ;; installed with the Guix Python distribution.
12393 "test_smtpd.py"
12394 "test_wsgiref.py"
12395 "test_urllib2.py"
12396 "test_thread.py"
12397 "test_threading.py"
12398 "test__threading_2.py"
12399 ;; These tests rely on KeyboardInterrupts which do not
12400 ;; work inside the build container for some reason
12401 ;; (lack of controlling terminal?).
12402 "test_subprocess.py"
12403 "test__issues461_471.py"
12404 ;; TODO: Patch out the tests that use getprotobyname, etc
12405 ;; instead of disabling all the tests from these files.
12406 "test__resolver_dnspython.py"
12407 "test__doctests.py"
12408 "test__all__.py"
12409 "test___config.py"
12410 "test__execmodules.py")))
12411 (call-with-output-file "skipped_tests.txt"
12412 (lambda (port)
12413 (format port "~a~%"
12414 (string-join disabled-tests "\n"))))
12415 #t)))
12416 (replace 'check
12417 (lambda _
12418 ;; Make sure the build directory is on PYTHONPATH.
12419 (setenv "PYTHONPATH"
12420 (string-append
12421 (getenv "PYTHONPATH") ":"
12422 (getcwd) "/build/"
12423 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12424
12425 ;; Use the build daemons configured number of workers.
12426 (setenv "NWORKERS" (number->string (parallel-job-count)))
12427
12428 (invoke "python" "-m" "gevent.tests" "--config"
12429 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12430 (propagated-inputs
12431 `(("python-greenlet" ,python-greenlet)
12432 ("python-objgraph" ,python-objgraph)
12433 ("python-zope.event" ,python-zope-event)
12434 ("python-zope.interface" ,python-zope-interface)))
12435 (native-inputs
12436 `(("python-six" ,python-six)
12437
12438 ;; For tests.
12439 ("python-dnspython" ,python-dnspython)
12440 ("python-psutil" ,python-psutil)))
12441 (inputs
12442 `(("c-ares" ,c-ares)
12443 ("libev" ,libev)))
12444 (home-page "http://www.gevent.org/")
12445 (synopsis "Coroutine-based network library")
12446 (description
12447 "gevent is a coroutine-based Python networking library that uses greenlet
12448to provide a high-level synchronous API on top of the libev event loop.")
12449 (license license:expat)
12450 (properties `((python2-variant . ,(delay python2-gevent))))))
12451
12452(define-public python2-gevent
12453 (let ((base (package-with-python2
12454 (strip-python2-variant python-gevent))))
12455 (package
12456 (inherit base)
12457 (native-inputs `(,@(package-native-inputs base)
12458 ("python-mock" ,python2-mock)
12459 ("python2-selectors2" ,python2-selectors2))))))
12460
12461(define-public python-fastimport
12462 (package
12463 (name "python-fastimport")
12464 (version "0.9.8")
12465 (source
12466 (origin
12467 (method url-fetch)
12468 (uri (pypi-uri "fastimport" version))
12469 (sha256
12470 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12471 (build-system python-build-system)
12472 (home-page "https://github.com/jelmer/python-fastimport")
12473 (synopsis "VCS fastimport parser and generator in Python")
12474 (description "This package provides a parser for and generator of the Git
12475@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12476format.")
12477 (license license:gpl2+)))
12478
12479(define-public python2-fastimport
12480 (package-with-python2 python-fastimport))
12481
12482(define-public python-twisted
12483 (package
12484 (name "python-twisted")
12485 (version "19.7.0")
12486 (source (origin
12487 (method url-fetch)
12488 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12489 (sha256
12490 (base32
12491 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12492 (build-system python-build-system)
12493 (arguments
12494 '(#:tests? #f)) ; FIXME: some tests fail
12495 (propagated-inputs
12496 `(("python-zope-interface" ,python-zope-interface)
12497 ("python-pyhamcrest" ,python-pyhamcrest)
12498 ("python-incremental" ,python-incremental)
12499 ("python-hyperlink" ,python-hyperlink)
12500 ("python-constantly" ,python-constantly)
12501 ("python-automat" ,python-automat)))
12502 (home-page "https://twistedmatrix.com/")
12503 (synopsis "Asynchronous networking framework written in Python")
12504 (description
12505 "Twisted is an extensible framework for Python programming, with special
12506focus on event-based network programming and multiprotocol integration.")
12507 (license license:expat)))
12508
12509(define-public python2-twisted
12510 (package-with-python2 python-twisted))
12511
12512(define-public python-pika
12513 (package
12514 (name "python-pika")
12515 (version "0.12.0")
12516 (source
12517 (origin
12518 (method url-fetch)
12519 (uri (pypi-uri "pika" version))
12520 (sha256
12521 (base32
12522 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12523 (build-system python-build-system)
12524 (native-inputs
12525 `(("python-pyev" ,python-pyev)
12526 ("python-tornado" ,python-tornado)
12527 ("python-twisted" ,python-twisted)))
12528 (home-page "https://pika.readthedocs.org")
12529 (synopsis "Pure Python AMQP Client Library")
12530 (description
12531 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12532Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12533network support library.")
12534 (license license:bsd-3)))
12535
12536(define-public python2-pika
12537 (package-with-python2 python-pika))
12538
12539(define-public python-ply
12540 (package
12541 (name "python-ply")
12542 (version "3.11")
12543 (source
12544 (origin
12545 (method url-fetch)
12546 (uri (pypi-uri "ply" version))
12547 (sha256
12548 (base32
12549 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12550 (build-system python-build-system)
12551 (home-page "http://www.dabeaz.com/ply/")
12552 (synopsis "Python Lex & Yacc")
12553 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12554It uses LR parsing and does extensive error checking.")
12555 (license license:bsd-3)))
12556
12557(define-public python-tabulate
12558 (package
12559 (name "python-tabulate")
12560 (version "0.8.7")
12561 (source (origin
12562 (method url-fetch)
12563 (uri (pypi-uri "tabulate" version))
12564 (sha256
12565 (base32
12566 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12567 (build-system python-build-system)
12568 (arguments
12569 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12570 ;; and the latest release is not tagged in the upstream repository.
12571 '(#:tests? #f))
12572 (home-page "https://bitbucket.org/astanin/python-tabulate")
12573 (synopsis "Pretty-print tabular data")
12574 (description
12575 "Tabulate is a library and command-line utility to pretty-print tabular
12576data in Python.")
12577 (license license:expat)))
12578
12579(define-public python2-tabulate
12580 (package-with-python2 python-tabulate))
12581
12582(define-public python-kazoo
12583 (package
12584 (name "python-kazoo")
12585 (version "2.4.0")
12586 (source
12587 (origin
12588 (method url-fetch)
12589 (uri (pypi-uri "kazoo" version))
12590 (sha256
12591 (base32
12592 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12593 (build-system python-build-system)
12594 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12595 (propagated-inputs
12596 `(("python-six" ,python-six)))
12597 (home-page "https://kazoo.readthedocs.org")
12598 (synopsis "High-level Zookeeper client library")
12599 (description
12600 "Kazoo is a Python client library for the Apache Zookeeper distributed
12601application service. It is designed to be easy to use and to avoid common
12602programming errors.")
12603 (license license:asl2.0)))
12604
12605(define-public python2-kazoo
12606 (package-with-python2 python-kazoo))
12607
12608(define-public python-pykafka
12609 (package
12610 (name "python-pykafka")
12611 (version "2.4.0")
12612 (source (origin
12613 (method url-fetch)
12614 (uri (pypi-uri "pykafka" version))
12615 (sha256
12616 (base32
12617 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12618 (build-system python-build-system)
12619 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12620 (propagated-inputs
12621 `(("python-gevent" ,python-gevent)
12622 ("python-kazoo" ,python-kazoo)
12623 ("python-tabulate" ,python-tabulate)))
12624 (inputs
12625 `(("librdkafka" ,librdkafka)))
12626 (home-page "https://pykafka.readthedocs.io/")
12627 (synopsis "Apache Kafka client for Python")
12628 (description
12629 "PyKafka is a client for the Apache Kafka distributed messaging system.
12630It includes Python implementations of Kafka producers and consumers, which
12631are optionally backed by a C extension built on librdkafka.")
12632 (license license:asl2.0)))
12633
12634(define-public python2-pykafka
12635 (package-with-python2 python-pykafka))
12636
12637(define-public python-wcwidth
12638 (package
12639 (name "python-wcwidth")
12640 (version "0.1.8")
12641 (source (origin
12642 (method url-fetch)
12643 (uri (pypi-uri "wcwidth" version))
12644 (sha256
12645 (base32
12646 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12647 (build-system python-build-system)
12648 (home-page "https://github.com/jquast/wcwidth")
12649 (synopsis "Measure number of terminal column cells of wide-character codes")
12650 (description "Wcwidth measures the number of terminal column cells of
12651wide-character codes. It is useful for those implementing a terminal emulator,
12652or programs that carefully produce output to be interpreted by one. It is a
12653Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12654specified in POSIX.1-2001 and POSIX.1-2008.")
12655 (license license:expat)))
12656
12657(define-public python2-wcwidth
12658 (package-with-python2 python-wcwidth))
12659
12660(define-public python2-jsonrpclib
12661 (package
12662 (name "python2-jsonrpclib")
12663 (version "0.1.7")
12664 (source (origin
12665 (method url-fetch)
12666 (uri (pypi-uri "jsonrpclib" version))
12667 (sha256
12668 (base32
12669 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12670 (build-system python-build-system)
12671 (arguments
12672 `(#:tests? #f
12673 #:python ,python-2))
12674 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12675 (synopsis "Implementation of JSON-RPC specification for Python")
12676 (description
12677 "This library is an implementation of the JSON-RPC specification.
12678It supports both the original 1.0 specification, as well as the
12679new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12680etc.")
12681 (license license:asl2.0)))
12682
12683(define-public python-chai
12684 (package
12685 (name "python-chai")
12686 (version "1.1.2")
12687 (source (origin
12688 (method url-fetch)
12689 (uri (pypi-uri "chai" version))
12690 (sha256
12691 (base32
12692 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12693 (build-system python-build-system)
12694 (home-page "https://github.com/agoragames/chai")
12695 (synopsis "Mocking framework for Python")
12696 (description
12697 "Chai provides an api for mocking, stubbing and spying your python
12698objects, patterned after the Mocha library for Ruby.")
12699 (license license:bsd-3)))
12700
12701(define-public python2-chai
12702 (package-with-python2 python-chai))
12703
12704(define-public python-inflection
12705 (package
12706 (name "python-inflection")
12707 (version "0.3.1")
12708 (source
12709 (origin (method url-fetch)
12710 (uri (pypi-uri "inflection" version))
12711 (sha256
12712 (base32
12713 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12714 (build-system python-build-system)
12715 (native-inputs
12716 `(("python-pytest" ,python-pytest)))
12717 (home-page "https://github.com/jpvanhal/inflection")
12718 (synopsis "Python string transformation library")
12719 (description
12720 "Inflection is a string transformation library. It singularizes
12721and pluralizes English words, and transforms strings from CamelCase to
12722underscored string.")
12723 (license license:expat)))
12724
12725(define-public python2-inflection
12726 (package-with-python2 python-inflection))
12727
12728(define-public python-pylev
12729 (package
12730 (name "python-pylev")
12731 (version "1.3.0")
12732 (source (origin
12733 (method url-fetch)
12734 (uri (pypi-uri "pylev" version))
12735 (sha256
12736 (base32
12737 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12738 (build-system python-build-system)
12739 (home-page "https://github.com/toastdriven/pylev")
12740 (synopsis "Levenshtein distance implementation in Python")
12741 (description "Pure Python Levenshtein implementation, based off the
12742Wikipedia code samples at
12743@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12744 (license license:bsd-3)))
12745
12746(define-public python2-pylev
12747 (package-with-python2 python-pylev))
12748
12749(define-public python-cleo
12750 (package
12751 (name "python-cleo")
12752 (version "0.8.1")
12753 (source (origin
12754 (method url-fetch)
12755 (uri (pypi-uri "cleo" version))
12756 (sha256
12757 (base32
12758 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12759 (build-system python-build-system)
12760 (native-inputs
12761 `( ;; For testing
12762 ("python-mock" ,python-mock)
12763 ("python-pytest-mock" ,python-pytest-mock)
12764 ("python-pytest" ,python-pytest)))
12765 (propagated-inputs
12766 `(("python-backpack" ,python-backpack)
12767 ("python-clikit" ,python-clikit)
12768 ("python-pastel" ,python-pastel)
12769 ("python-pylev" ,python-pylev)))
12770 (home-page "https://github.com/sdispater/cleo")
12771 (synopsis "Command-line arguments library for Python")
12772 (description
12773 "Cleo allows you to create command-line commands with signature in
12774docstring and colored output.")
12775 (license license:expat)))
12776
12777(define-public python2-cleo
12778 (package-with-python2 python-cleo))
12779
12780(define-public python-tomlkit
12781 (package
12782 (name "python-tomlkit")
12783 (version "0.6.0")
12784 (source
12785 (origin
12786 (method url-fetch)
12787 (uri (pypi-uri "tomlkit" version))
12788 (sha256
12789 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12790 (build-system python-build-system)
12791 (native-inputs
12792 `(("python-pytest" ,python-pytest)))
12793 (home-page "https://github.com/sdispater/tomlkit")
12794 (synopsis "Style-preserving TOML library")
12795 (description
12796 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
12797preserves all comments, indentations, whitespace and internal element ordering,
12798and makes them accessible and editable via an intuitive API. It can also
12799create new TOML documents from scratch using the provided helpers. Part of the
12800implementation has been adapted, improved, and fixed from Molten.")
12801 (license license:expat)))
12802
12803(define-public python-shellingham
12804 (package
12805 (name "python-shellingham")
12806 (version "1.3.2")
12807 (source
12808 (origin
12809 (method url-fetch)
12810 (uri (pypi-uri "shellingham" version))
12811 (sha256
12812 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12813 (build-system python-build-system)
12814 (arguments
12815 `(#:phases
12816 (modify-phases %standard-phases
12817 (add-after 'unpack 'restore-setup.py
12818 ;; setup.py will return in the next release.
12819 ;; <https://github.com/sarugaku/shellingham/issues/33>
12820 (lambda _
12821 (with-output-to-file "setup.py"
12822 (lambda _
12823 (display "from setuptools import setup\nsetup()\n")))
12824 #t)))))
12825 (home-page "https://github.com/sarugaku/shellingham")
12826 (synopsis "Tool to detect surrounding shell")
12827 (description
12828 "Shellingham detects what shell the current Python executable is
12829running in.")
12830 (license license:isc)))
12831
12832(define-public python-memcached
12833 (package
12834 (name "python-memcached")
12835 (version "1.59")
12836 (source
12837 (origin
12838 (method url-fetch)
12839 (uri (pypi-uri "python-memcached" version))
12840 (sha256
12841 (base32
12842 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
12843 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
12844 (build-system python-build-system)
12845 (propagated-inputs `(("python-six" ,python-six)))
12846 (home-page
12847 "https://github.com/linsomniac/python-memcached")
12848 (synopsis "Pure python memcached client")
12849 (description
12850 "This software is a pure Python interface to the memcached memory cache
12851daemon. It is the client side software which allows storing values in one or
12852more, possibly remote, memcached servers.")
12853 (license license:psfl)))
12854
12855(define-public python-clikit
12856 (package
12857 (name "python-clikit")
12858 (version "0.6.2")
12859 (source
12860 (origin
12861 (method url-fetch)
12862 (uri (pypi-uri "clikit" version))
12863 (sha256
12864 (base32
12865 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
12866 (build-system python-build-system)
12867 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
12868 (propagated-inputs
12869 `(("python-crashtest" ,python-crashtest)
12870 ("python-pastel" ,python-pastel)
12871 ("python-pylev" ,python-pylev)))
12872 (home-page "https://github.com/sdispater/clikit")
12873 (synopsis "Group of utilities to build command line interfaces")
12874 (description
12875 "CliKit is a group of utilities to build testable command line
12876interfaces.")
12877 (properties `((python2-variant . ,(delay python2-clikit))))
12878 (license license:expat)))
12879
12880(define-public python2-clikit
12881 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12882 (package/inherit
12883 base
12884 (propagated-inputs
12885 `(("python-enum34" ,python2-enum34)
12886 ("python-typing" ,python2-typing)
12887 ,@(package-propagated-inputs base))))))
12888
12889(define-public python-msgpack-python
12890 (package
12891 (name "python-msgpack-python")
12892 (version "0.5.6")
12893 (source
12894 (origin
12895 (method url-fetch)
12896 (uri (pypi-uri "msgpack-python" version))
12897 (sha256
12898 (base32
12899 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
12900 (build-system python-build-system)
12901 (home-page "http://msgpack.org/")
12902 (synopsis "Package to deserialize messages in MessagePack binary format")
12903 (description
12904 "MessagePack is an efficient binary serialization format. It lets you
12905exchange data among multiple languages like JSON. But it's faster and
12906smaller. Small integers are encoded into a single byte, and typical short
12907strings require only one extra byte in addition to the strings themselves.")
12908 (license license:asl2.0)))
12909
12910(define-public python-cachy
12911 (package
12912 (name "python-cachy")
12913 (version "0.3.0")
12914 (source
12915 (origin
12916 (method url-fetch)
12917 (uri (pypi-uri "cachy" version))
12918 (sha256
12919 (base32
12920 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
12921 (build-system python-build-system)
12922 (arguments
12923 '(#:phases
12924 (modify-phases %standard-phases
12925 (replace 'check
12926 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
12927 "pytest"))))))
12928 (native-inputs
12929 `(("memcached" ,memcached)
12930 ("python-fakeredis" ,python-fakeredis)
12931 ("python-flexmock" ,python-flexmock)
12932 ("python-pifpaf" ,python-pifpaf)
12933 ("python-pytest" ,python-pytest)))
12934 (propagated-inputs
12935 `(("python-memcached" ,python-memcached)
12936 ("python-msgpack-python" ,python-msgpack-python)
12937 ("python-redis" ,python-redis)))
12938 (home-page "https://github.com/sdispater/cachy")
12939 (synopsis "Simple yet effective caching library")
12940 (description
12941 "Cachy provides a simple yet effective caching library. A simple but
12942powerful API: thread-safety; decorator syntax; support for memcached, redis,
12943database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
12944 (license license:expat)))
12945
12946(define-public poetry
12947 (package
12948 (name "poetry")
12949 (version "1.0.10")
12950 ;; Poetry can only be built from source with Poetry.
12951 (source
12952 (origin
12953 (method url-fetch)
12954 (uri (pypi-uri "poetry" version))
12955 (sha256
12956 (base32
12957 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
12958 (build-system python-build-system)
12959 (arguments
12960 `(#:tests? #f ;; Pypi does not have tests.
12961 #:phases
12962 (modify-phases %standard-phases
12963 (add-before 'build 'patch-setup-py
12964 (lambda _
12965 (substitute* "setup.py"
12966 ;; poetry won't update version as 21.0.0 relies on python > 3.6
12967 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
12968 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
12969 ;; Reported upstream:
12970 ;; <https://github.com/python-poetry/poetry/issues/2752>.
12971 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
12972 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
12973 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
12974 #t)))))
12975 (propagated-inputs
12976 `(("python-cachecontrol" ,python-cachecontrol)
12977 ("python-cachy" ,python-cachy)
12978 ("python-cleo" ,python-cleo)
12979 ("python-clikit" ,python-clikit)
12980 ("python-html5lib" ,python-html5lib)
12981 ("python-jsonschema" ,python-jsonschema)
12982 ("python-keyring" ,python-keyring)
12983 ("python-msgpack-transitional" ,python-msgpack-transitional)
12984 ("python-pexpect" ,python-pexpect)
12985 ("python-pkginfo" ,python-pkginfo)
12986 ("python-pyparsing" ,python-pyparsing)
12987 ("python-pyrsistent" ,python-pyrsistent)
12988 ("python-requests" ,python-requests)
12989 ("python-requests-toolbelt" ,python-requests-toolbelt)
12990 ("python-shellingham" ,python-shellingham)
12991 ("python-tomlkit" ,python-tomlkit)
12992 ("python-virtualenv" ,python-virtualenv)))
12993 (home-page "https://python-poetry.org")
12994 (synopsis "Python dependency management and packaging made easy")
12995 (description "Poetry is a tool for dependency management and packaging
12996in Python. It allows you to declare the libraries your project depends on and
12997it will manage (install/update) them for you.")
12998 (license license:expat)))
12999
13000(define-public python-lark-parser
13001 (package
13002 (name "python-lark-parser")
13003 (version "0.9.0")
13004 (source (origin
13005 (method url-fetch)
13006 (uri (pypi-uri "lark-parser" version))
13007 (sha256
13008 (base32
13009 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13010 (build-system python-build-system)
13011 (home-page "https://github.com/lark-parser/lark")
13012 (synopsis "Multi-language parser for Python")
13013 (description
13014 "Lark is a parser built with a focus on ergonomics, performance and
13015resilience. Lark can parse all context-free languages. That means it is
13016capable of parsing almost any programming language out there, and to
13017some degree most natural languages too.")
13018 (license license:expat)))
13019
13020(define-public python-libcst
13021 (package
13022 (name "python-libcst")
13023 (version "0.3.8")
13024 (source (origin
13025 (method url-fetch)
13026 (uri (pypi-uri "libcst" version))
13027 (sha256
13028 (base32
13029 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13030 (build-system python-build-system)
13031 (arguments
13032 `(#:phases
13033 (modify-phases %standard-phases
13034 (add-after 'unpack 'remove-failing-tests
13035 (lambda _
13036 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13037 (delete-file "libcst/tests/test_fuzz.py")
13038 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13039 (delete-file "libcst/tests/test_pyre_integration.py")
13040 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13041 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13042 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13043 #t))
13044 (add-before 'check 'generate-test-data
13045 (lambda _
13046 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13047 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13048 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13049 (replace 'check
13050 (lambda _
13051 (invoke "python" "-m" "unittest")
13052 #t)))))
13053 (native-inputs
13054 `(("python-black" ,python-black)
13055 ("python-isort" ,python-isort)))
13056 (propagated-inputs
13057 `(("python-typing-extensions" ,python-typing-extensions)
13058 ("python-typing-inspect" ,python-typing-inspect)
13059 ("python-pyyaml" ,python-pyyaml)))
13060 (home-page "https://github.com/Instagram/LibCST")
13061 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13062 (description
13063 "LibCST parses Python source code as a CST tree that keeps all
13064formatting details (comments, whitespaces, parentheses, etc). It's useful
13065for building automated refactoring (codemod) applications and linters.
13066LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13067a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13068naming node types and fields, LibCST creates a lossless CST that looks and
13069feels like an AST.")
13070 (license (list license:expat
13071 ;; Some files unde libcst/_parser/ are under Python Software
13072 ;; Foundation license (see LICENSE file for details)
13073 license:psfl
13074 ;; libcst/_add_slots.py
13075 license:asl2.0))))
13076
13077(define-public python-typing-inspect
13078 (package
13079 (name "python-typing-inspect")
13080 (version "0.6.0")
13081 (source (origin
13082 (method url-fetch)
13083 (uri (pypi-uri "typing_inspect" version))
13084 (sha256
13085 (base32
13086 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13087 (build-system python-build-system)
13088 (propagated-inputs
13089 `(("python-mypy-extensions" ,python-mypy-extensions)
13090 ("python-typing-extensions" ,python-typing-extensions)))
13091 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13092 (synopsis "API for inspection of types in the Python @code{typing} module")
13093 (description
13094 "The @code{typing_inspect} module defines experimental API for runtime
13095inspection of types defined in the Python standard typing module.")
13096 (license license:expat)))
13097
13098(define-public python-lazy-object-proxy
13099 (package
13100 (name "python-lazy-object-proxy")
13101 (version "1.5.1")
13102 (source (origin
13103 (method url-fetch)
13104 (uri (pypi-uri "lazy-object-proxy" version))
13105 (sha256
13106 (base32
13107 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13108 (native-inputs
13109 `(("python-setuptools-scm" ,python-setuptools-scm)))
13110 (build-system python-build-system)
13111 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13112 (synopsis "Lazy object proxy for python")
13113 (description
13114 "Lazy object proxy is an object that wraps a callable but defers the call
13115until the object is actually required, and caches the result of said call.")
13116 (license license:bsd-2)))
13117
13118(define-public python2-lazy-object-proxy
13119 (package-with-python2 python-lazy-object-proxy))
13120
13121(define-public python-dnspython
13122 (package
13123 (name "python-dnspython")
13124 (version "1.16.0")
13125 (source (origin
13126 (method url-fetch)
13127 (uri (string-append "http://www.dnspython.org/kits/"
13128 version "/dnspython-" version ".tar.gz"))
13129 (sha256
13130 (base32
13131 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13132 (build-system python-build-system)
13133 (arguments '(#:tests? #f)) ; XXX: requires internet access
13134 (home-page "http://www.dnspython.org")
13135 (synopsis "DNS toolkit for Python")
13136 (description
13137 "dnspython is a DNS toolkit for Python. It supports almost all record
13138types. It can be used for queries, zone transfers, and dynamic updates.
13139It supports TSIG authenticated messages and EDNS0.")
13140 (license license:expat)))
13141
13142(define-public python2-dnspython
13143 (package-with-python2 python-dnspython))
13144
13145(define-public python-py3dns
13146 (package
13147 (name "python-py3dns")
13148 (version "3.2.1")
13149 (source
13150 (origin
13151 (method url-fetch)
13152 (uri (pypi-uri "py3dns" version))
13153 (sha256
13154 (base32
13155 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13156 (build-system python-build-system)
13157 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13158 ;; removing functionality so we copy from Nix and "just don't build it".
13159 (arguments
13160 `(#:phases
13161 (modify-phases %standard-phases
13162 (add-after 'unpack 'patch-source
13163 (lambda _
13164 (substitute* "setup.py"
13165 (("import DNS") "")
13166 (("DNS.__version__") (string-append "\"" ,version "\"")))
13167 #t)))
13168 #:tests? #f)) ; Also skip the tests.
13169 (home-page "https://launchpad.net/py3dns")
13170 (synopsis "Python 3 DNS library")
13171 (description "This Python 3 module provides a DNS API for looking up DNS
13172entries from within Python 3 modules and applications. This module is a
13173simple, lightweight implementation.")
13174 (license license:psfl)))
13175
13176(define-public python-email-validator
13177 (package
13178 (name "python-email-validator")
13179 (version "1.0.2")
13180 (source
13181 (origin (method url-fetch)
13182 (uri (pypi-uri "email_validator" version))
13183 (sha256
13184 (base32
13185 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13186 (build-system python-build-system)
13187 (arguments
13188 '(#:phases
13189 (modify-phases %standard-phases
13190 (add-before 'build 'use-dnspython
13191 (lambda _
13192 (substitute* "setup.py"
13193 (("dnspython3") "dnspython"))
13194 #t)))))
13195 (propagated-inputs
13196 `(("python-dnspython" ,python-dnspython)
13197 ("python-idna" ,python-idna)))
13198 (home-page "https://github.com/JoshData/python-email-validator")
13199 (synopsis "Email address validation library for Python")
13200 (description
13201 "This library validates email address syntax and deliverability.")
13202 (license license:cc0)))
13203
13204(define-public python2-email-validator
13205 (package-with-python2 python-email-validator))
13206
13207(define-public python-ukpostcodeparser
13208 (package
13209 (name "python-ukpostcodeparser")
13210 (version "1.0.3")
13211 (source (origin
13212 (method url-fetch)
13213 (uri (pypi-uri "UkPostcodeParser" version))
13214 (sha256
13215 (base32
13216 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13217 (build-system python-build-system)
13218 (home-page "https://github.com/hamstah/ukpostcodeparser")
13219 (synopsis "UK Postcode parser for Python")
13220 (description
13221 "This library provides the @code{parse_uk_postcode} function for
13222parsing UK postcodes.")
13223 (license license:expat)))
13224
13225(define-public python2-ukpostcodeparser
13226 (package-with-python2 python-ukpostcodeparser))
13227
13228(define-public python-faker
13229 (package
13230 (name "python-faker")
13231 (version "4.0.2")
13232 (source (origin
13233 (method url-fetch)
13234 (uri (pypi-uri "Faker" version))
13235 (sha256
13236 (base32
13237 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13238 (build-system python-build-system)
13239 (arguments
13240 '(#:phases
13241 (modify-phases %standard-phases
13242 (replace 'check
13243 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13244 (native-inputs
13245 `(;; For testing
13246 ("python-freezegun" ,python-freezegun)
13247 ("python-pytest" ,python-pytest)
13248 ("python-random2" ,python-random2)
13249 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13250 ("python-validators" ,python-validators)))
13251 (propagated-inputs
13252 `(("python-dateutil" ,python-dateutil)
13253 ("python-text-unidecode" ,python-text-unidecode)))
13254 (home-page "https://github.com/joke2k/faker")
13255 (synopsis "Python package that generates fake data")
13256 (description
13257 "Faker is a Python package that generates fake data such as names,
13258addresses, and phone numbers.")
13259 (license license:expat)
13260 (properties `((python2-variant . ,(delay python2-faker))))))
13261
13262;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13263(define-public python2-faker
13264 (let ((base (package-with-python2 (strip-python2-variant
13265 python-faker))))
13266 (package
13267 (inherit base)
13268 (version "3.0.1")
13269 (source (origin
13270 (method url-fetch)
13271 (uri (pypi-uri "Faker" version))
13272 (sha256
13273 (base32
13274 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13275 (native-inputs
13276 `(("python-mock" ,python2-mock)
13277 ,@(package-native-inputs base)))
13278 (propagated-inputs
13279 `(("python2-ipaddress" ,python2-ipaddress)
13280 ("python2-six" ,python2-six)
13281 ,@(package-propagated-inputs base))))))
13282
13283(define-public python-pyaml
13284 (package
13285 (name "python-pyaml")
13286 (version "18.11.0")
13287 (source (origin
13288 (method url-fetch)
13289 (uri (pypi-uri "pyaml" version))
13290 (sha256
13291 (base32
13292 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13293 (build-system python-build-system)
13294 (native-inputs
13295 `(("python-unidecode" ,python-unidecode)))
13296 (propagated-inputs
13297 `(("python-pyyaml" ,python-pyyaml)))
13298 (home-page "https://github.com/mk-fg/pretty-yaml")
13299 (synopsis "YAML pretty-print library for Python")
13300 (description
13301 "pyaml is a PyYAML based python module to produce pretty and readable
13302YAML-serialized data.")
13303 (license license:wtfpl2)))
13304
13305(define-public python2-pyaml
13306 (package-with-python2 python-pyaml))
13307
13308(define-public python-backpack
13309 (package
13310 (name "python-backpack")
13311 (version "0.1")
13312 (source
13313 (origin
13314 (method url-fetch)
13315 (uri (pypi-uri "backpack" version))
13316 (sha256
13317 (base32
13318 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13319 (build-system python-build-system)
13320 (native-inputs
13321 `(("python-pytest" ,python-pytest)
13322 ("python-nose" ,python-nose)))
13323 (propagated-inputs
13324 `(("python-simplejson" ,python-simplejson)))
13325 (home-page "https://github.com/sdispater/backpack")
13326 (synopsis "Utilities for working with Python collections")
13327 (description "Backpack provides some useful utilities for working with
13328collections of data.")
13329 (license license:expat)))
13330
13331(define-public python2-backpack
13332 (package-with-python2 python-backpack))
13333
13334(define-public python-prompt-toolkit
13335 (package
13336 (name "python-prompt-toolkit")
13337 (version "3.0.7")
13338 (source
13339 (origin
13340 (method url-fetch)
13341 (uri (pypi-uri "prompt_toolkit" version))
13342 (sha256
13343 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13344 (build-system python-build-system)
13345 (arguments
13346 `(#:phases
13347 (modify-phases %standard-phases
13348 (delete 'check)
13349 (add-after 'install 'post-install-check
13350 (lambda* (#:key inputs outputs #:allow-other-keys)
13351 ;; HOME is needed for the test
13352 ;; "test_pathcompleter_can_expanduser".
13353 (setenv "HOME" "/tmp")
13354 (add-installed-pythonpath inputs outputs)
13355 (invoke "py.test"))))))
13356 (propagated-inputs
13357 `(("python-wcwidth" ,python-wcwidth)))
13358 (native-inputs
13359 `(("python-pytest" ,python-pytest)))
13360 (home-page
13361 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13362 (synopsis "Library for building command line interfaces in Python")
13363 (description
13364 "Prompt-Toolkit is a library for building interactive command line
13365interfaces in Python. It's like GNU Readline but it also features syntax
13366highlighting while typing, out-of-the-box multi-line input editing, advanced
13367code completion, incremental search, support for Chinese double-width
13368characters, mouse support, and auto suggestions.")
13369 (license license:bsd-3)
13370 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13371
13372(define-public python-prompt-toolkit-2
13373 (package (inherit python-prompt-toolkit)
13374 (name "python-prompt-toolkit")
13375 (version "2.0.7")
13376 (source
13377 (origin
13378 (method url-fetch)
13379 (uri (pypi-uri "prompt_toolkit" version))
13380 (sha256
13381 (base32
13382 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13383 (propagated-inputs
13384 `(("python-wcwidth" ,python-wcwidth)
13385 ("python-six" ,python-six)
13386 ("python-pygments" ,python-pygments)))
13387 (properties '())))
13388
13389(define-public python2-prompt-toolkit
13390 (package-with-python2 python-prompt-toolkit-2))
13391
13392(define-public python-prompt-toolkit-1
13393 (package (inherit python-prompt-toolkit-2)
13394 (version "1.0.15")
13395 (source
13396 (origin
13397 (method url-fetch)
13398 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13399 (sha256
13400 (base32
13401 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13402
13403(define-public python2-prompt-toolkit-1
13404 (package-with-python2 python-prompt-toolkit-1))
13405
13406(define-public python-jedi
13407 (package
13408 (name "python-jedi")
13409 (version "0.17.2")
13410 (source
13411 (origin
13412 (method url-fetch)
13413 (uri (pypi-uri "jedi" version))
13414 (sha256
13415 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13416 (build-system python-build-system)
13417 (arguments
13418 `(#:phases
13419 (modify-phases %standard-phases
13420 (replace 'check
13421 (lambda _
13422 (setenv "HOME" "/tmp")
13423 (invoke "python" "-m" "pytest" "-vv"))))))
13424 (native-inputs
13425 `(("python-pytest" ,python-pytest)
13426 ("python-docopt" ,python-docopt)))
13427 (propagated-inputs
13428 `(("python-parso" ,python-parso)))
13429 (home-page "https://github.com/davidhalter/jedi")
13430 (synopsis "Autocompletion and static analysis library for Python")
13431 (description
13432 "Jedi is a static analysis tool for Python that can be used in Integrated
13433Development Environments (@dfn{IDE}s) and text editors. It understands Python
13434on a deeper level than many other static analysis frameworks for Python.
13435
13436Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13437well.")
13438 (license license:expat)))
13439
13440(define-public python2-jedi
13441 (package-with-python2 python-jedi))
13442
13443(define-public ptpython
13444 (package
13445 (name "ptpython")
13446 (version "3.0.5")
13447 (source (origin
13448 (method url-fetch)
13449 (uri (pypi-uri "ptpython" version))
13450 (sha256
13451 (base32
13452 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13453 (build-system python-build-system)
13454 (arguments
13455 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13456 (propagated-inputs
13457 `(("python-appdirs" ,python-appdirs)
13458 ("python-jedi" ,python-jedi)
13459 ("python-prompt-toolkit" ,python-prompt-toolkit)
13460 ("python-pygments" ,python-pygments)))
13461 (home-page "https://github.com/jonathanslenders/ptpython")
13462 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13463 (description
13464 "ptpython is a Python read-eval-print loop with IDE-like features.
13465It supports syntax highlighting, multiline editing, autocompletion, mouse,
13466color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13467etc.")
13468 (license license:bsd-3)
13469 (properties `((python2-variant . ,(delay ptpython-2))))))
13470
13471(define-public ptpython-2
13472 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13473 (package
13474 (inherit base)
13475 (name "ptpython2"))))
13476
13477(define-public python-stem
13478 (package
13479 (name "python-stem")
13480 (version "1.8.0")
13481 (source
13482 (origin
13483 (method url-fetch)
13484 (uri (pypi-uri "stem" version))
13485 (sha256
13486 (base32
13487 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13488 (build-system python-build-system)
13489 (arguments
13490 `(#:phases
13491 (modify-phases %standard-phases
13492 (replace 'check
13493 (lambda _
13494 (invoke "./run_tests.py" "--unit")
13495 #t)))))
13496 (native-inputs
13497 `(("python-mock" ,python-mock)
13498 ("python-pycodestyle" ,python-pycodestyle)
13499 ("python-pyflakes" ,python-pyflakes)))
13500 (home-page "https://stem.torproject.org/")
13501 (synopsis
13502 "Python controller library that allows applications to interact with Tor")
13503 (description
13504 "Stem is a Python controller library for Tor. With it you can use Tor's
13505control protocol to script against the Tor process and read descriptor data
13506relays publish about themselves.")
13507 (license license:lgpl3)))
13508
13509(define-public python2-stem
13510 (package-with-python2 python-stem))
13511
13512(define-public python-pyserial
13513 (package
13514 (name "python-pyserial")
13515 (version "3.4")
13516 (source
13517 (origin
13518 (method url-fetch)
13519 (uri (pypi-uri "pyserial" version))
13520 (sha256
13521 (base32
13522 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13523 (build-system python-build-system)
13524 (arguments
13525 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13526 ;; #:phases
13527 ;; (modify-phases %standard-phases
13528 ;; (replace 'check
13529 ;; (lambda _
13530 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13531 (home-page
13532 "https://github.com/pyserial/pyserial")
13533 (synopsis "Python Serial Port Bindings")
13534 (description "@code{pyserial} provide serial port bindings for Python. It
13535supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13536and/or Xon/Xoff. The port is accessed in RAW mode.")
13537 (license license:bsd-3)))
13538
13539(define-public python2-pyserial
13540 (package-with-python2 python-pyserial))
13541
13542(define-public python-kivy
13543 (package
13544 (name "python-kivy")
13545 (version "1.10.1")
13546 (source
13547 (origin
13548 (method url-fetch)
13549 (uri (pypi-uri "Kivy" version))
13550 (file-name (string-append name "-" version ".tar.gz"))
13551 (sha256
13552 (base32
13553 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13554 (build-system python-build-system)
13555 (arguments
13556 `(#:tests? #f ; Tests require many optional packages
13557 #:phases
13558 (modify-phases %standard-phases
13559 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13560 (lambda* (#:key inputs #:allow-other-keys)
13561 (setenv "KIVY_SDL2_PATH"
13562 (string-append (assoc-ref inputs "sdl-union")
13563 "/include/SDL2"))
13564 #t)))))
13565 (native-inputs
13566 `(("pkg-config" ,pkg-config)
13567 ("python-cython" ,python-cython)))
13568 (inputs
13569 `(("gstreamer" ,gstreamer)
13570 ("mesa" ,mesa)
13571 ("sdl-union"
13572 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13573 (home-page "https://kivy.org")
13574 (synopsis
13575 "Multitouch application framework")
13576 (description
13577 "A software library for rapid development of
13578hardware-accelerated multitouch applications.")
13579 (license license:expat)))
13580
13581(define-public python2-kivy
13582 (package-with-python2 python-kivy))
13583
13584(define-public python-binaryornot
13585 (package
13586 (name "python-binaryornot")
13587 (version "0.4.4")
13588 (source (origin
13589 (method url-fetch)
13590 (uri (pypi-uri "binaryornot" version))
13591 (sha256
13592 (base32
13593 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13594 (build-system python-build-system)
13595 (arguments
13596 `(#:phases
13597 (modify-phases %standard-phases
13598 (add-after 'unpack 'patch-tests
13599 (lambda _
13600 ;; TypeError: binary() got an unexpected keyword argument
13601 ;; 'average_size'.
13602 (substitute* "tests/test_check.py"
13603 (("average_size=512") ""))
13604 #t)))))
13605 (propagated-inputs
13606 `(("python-chardet" ,python-chardet)
13607 ("python-hypothesis" ,python-hypothesis)))
13608 (home-page "https://github.com/audreyr/binaryornot")
13609 (synopsis "Package to check if a file is binary or text")
13610 (description "Ultra-lightweight pure Python package to check if a file is
13611binary or text.")
13612 (license license:bsd-3)
13613 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13614
13615(define-public python2-binaryornot
13616 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13617 (package (inherit base)
13618 (propagated-inputs
13619 `(("python2-enum34" ,python2-enum34)
13620 ,@(package-propagated-inputs base))))))
13621
13622(define-public python-binwalk
13623 (package
13624 (name "python-binwalk")
13625 (version "2.2.0")
13626 (source
13627 (origin
13628 (method git-fetch)
13629 (uri (git-reference
13630 (url "https://github.com/ReFirmLabs/binwalk")
13631 (commit (string-append "v" version))))
13632 (file-name (git-file-name name version))
13633 (sha256
13634 (base32
13635 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13636 (build-system python-build-system)
13637 (arguments
13638 `(#:phases
13639 (modify-phases %standard-phases
13640 (add-before 'check 'set-pythonpath
13641 (lambda _
13642 (setenv "PYTHONPATH"
13643 (string-append
13644 (getcwd) "/src/"
13645 ":" (getenv "PYTHONPATH")))
13646 (setenv "HOME" "")
13647 #t)))))
13648 (native-inputs
13649 `(("python-coverage" ,python-coverage)
13650 ("python-nose" ,python-nose)))
13651 (home-page "https://github.com/ReFirmLabs/binwalk")
13652 (synopsis "Firmware analysis tool")
13653 (description "Binwalk is a tool for analyzing, reverse engineering, and
13654extracting firmware images")
13655 (license license:expat)))
13656
13657(define-public python-nltk
13658 (package
13659 (name "python-nltk")
13660 (version "3.2.1")
13661 (source (origin
13662 (method url-fetch)
13663 (uri (pypi-uri "nltk" version))
13664 (sha256
13665 (base32
13666 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13667 (build-system python-build-system)
13668 (arguments
13669 '(;; The tests require some extra resources to be downloaded.
13670 ;; TODO Try packaging these resources.
13671 #:tests? #f))
13672 (home-page "http://nltk.org/")
13673 (synopsis "Natural Language Toolkit")
13674 (description "It provides interfaces to over 50 corpora and lexical
13675resources such as WordNet, along with a suite of text processing libraries
13676for classification, tokenization, stemming, tagging, parsing, and semantic
13677reasoning, wrappers for natural language processing libraries.")
13678 (license license:asl2.0)))
13679
13680(define-public python2-nltk
13681 (package-with-python2 python-nltk))
13682
13683(define-public python-pymongo
13684 (package
13685 (name "python-pymongo")
13686 (version "3.7.2")
13687 (source (origin
13688 (method url-fetch)
13689 (uri (pypi-uri "pymongo" version))
13690 (sha256
13691 (base32
13692 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13693 (build-system python-build-system)
13694 (propagated-inputs
13695 `(("python-certifi" ,python-certifi)))
13696 (home-page "https://github.com/mongodb/mongo-python-driver")
13697 (synopsis "Python driver for MongoDB")
13698 (description "Python driver for MongoDB.")
13699 (license license:asl2.0)))
13700
13701(define-public python2-pymongo
13702 (package-with-python2 python-pymongo))
13703
13704(define-public python-consul
13705 (package
13706 (name "python-consul")
13707 (version "0.6.1")
13708 (source
13709 (origin
13710 (method url-fetch)
13711 (uri (pypi-uri "python-consul" version))
13712 (sha256
13713 (base32
13714 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13715 (build-system python-build-system)
13716 (arguments
13717 '(#:tests? #f)) ; The tests are not distributed
13718 (propagated-inputs
13719 `(("python-requests" ,python-requests)
13720 ("python-six" ,python-six)))
13721 (home-page "https://github.com/cablehead/python-consul")
13722 (synopsis "Python client for Consul")
13723 (description
13724 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13725discovery, monitoring and configuration.")
13726 (license license:expat)))
13727
13728(define-public python2-consul
13729 (package-with-python2 python-consul))
13730
13731(define-public python-schematics
13732 (package
13733 (name "python-schematics")
13734 (version "1.1.1")
13735 (source
13736 (origin
13737 (method git-fetch)
13738 (uri (git-reference
13739 (url "https://github.com/schematics/schematics")
13740 (commit (string-append "v" version))))
13741 (file-name (git-file-name name version))
13742 (sha256
13743 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13744 (build-system python-build-system)
13745 (propagated-inputs
13746 `(("python-six" ,python-six)))
13747 (arguments
13748 ;; The tests require a bunch of not very nice packages with fixed
13749 ;; version requirements (e.g. python-coveralls).
13750 `(#:tests? #f))
13751 (home-page "https://github.com/schematics/schematics")
13752 (synopsis "Python Data Structures for Humans")
13753 (description "Python Data Structures for Humans.")
13754 (license license:bsd-3)))
13755
13756(define-public python2-schematics
13757 (package-with-python2 python-schematics))
13758
13759(define-public python-odfpy
13760 (package
13761 (name "python-odfpy")
13762 (version "1.4.1")
13763 (source (origin
13764 (method url-fetch)
13765 (uri (pypi-uri "odfpy" version))
13766 (sha256
13767 (base32
13768 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13769 (arguments
13770 `(#:phases
13771 (modify-phases %standard-phases
13772 (replace 'check
13773 (lambda _
13774 (setenv "PYTHONPATH" (string-append "./build/lib:"
13775 (getenv "PYTHONPATH")))
13776 (invoke "pytest" "-vv"))))))
13777 (build-system python-build-system)
13778 (native-inputs
13779 `(("python-pytest" ,python-pytest)))
13780 (propagated-inputs
13781 `(("python-defusedxml" ,python-defusedxml)))
13782 (home-page "https://github.com/eea/odfpy")
13783 (synopsis "Python API and tools to manipulate OpenDocument files")
13784 (description "Collection of libraries and utility programs written in
13785Python to manipulate OpenDocument 1.2 files.")
13786 (license
13787 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13788 ;; number of files with other licenses.
13789 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13790
13791(define-public python2-odfpy
13792 (package-with-python2 python-odfpy))
13793
13794(define-public python-natsort
13795 (package
13796 (name "python-natsort")
13797 (version "7.0.1")
13798 (source (origin
13799 (method url-fetch)
13800 (uri (pypi-uri "natsort" version))
13801 (sha256
13802 (base32
13803 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13804 (build-system python-build-system)
13805 (arguments
13806 `(#:modules ((guix build utils)
13807 (guix build python-build-system)
13808 (srfi srfi-1)
13809 (srfi srfi-26)
13810 (ice-9 ftw))
13811 #:phases
13812 (modify-phases %standard-phases
13813 (add-before 'check 'set-cachedir
13814 ;; Tests require write access to $HOME by default
13815 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
13816 (replace 'check
13817 (lambda _
13818 (let ((cwd (getcwd)))
13819 (setenv "PYTHONPATH"
13820 (string-append
13821 cwd "/build/"
13822 (find (cut string-prefix? "lib" <>)
13823 (scandir (string-append cwd "/build")))
13824 ":"
13825 (getenv "PYTHONPATH")))
13826 (invoke "pytest" "-v")))))))
13827 (native-inputs
13828 `(("python-hypothesis" ,python-hypothesis)
13829 ("python-pytest-cov" ,python-pytest-cov)
13830 ("python-pytest-mock" ,python-pytest-mock)
13831 ("python-pytest" ,python-pytest)))
13832 (propagated-inputs ; TODO: Add python-fastnumbers.
13833 `(("python-pyicu" ,python-pyicu)))
13834 (home-page "https://github.com/SethMMorton/natsort")
13835 (synopsis "Natural sorting for python and shell")
13836 (description
13837 "Natsort lets you apply natural sorting on lists instead of
13838lexicographical. If you use the built-in @code{sorted} method in python
13839on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
13840@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
13841@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
13842identifies numbers and sorts them separately from strings. It can also sort
13843version numbers, real numbers, mixed types and more, and comes with a shell
13844command @command{natsort} that exposes this functionality in the command line.")
13845 (license license:expat)
13846 (properties `((python2-variant . ,(delay python2-natsort))))))
13847
13848;; Natsort 6.x are the last versions with support for Python 2.
13849(define-public python2-natsort
13850 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13851 (package (inherit base)
13852 (version "6.2.1")
13853 (source (origin
13854 (method url-fetch)
13855 (uri (pypi-uri "natsort" version))
13856 (sha256
13857 (base32
13858 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
13859 (native-inputs
13860 `(("python2-pathlib" ,python2-pathlib)
13861 ,@(package-native-inputs base))))))
13862
13863(define-public glances
13864 (package
13865 (name "glances")
13866 (version "3.1.4")
13867 (source
13868 (origin
13869 (method url-fetch)
13870 (uri (pypi-uri "Glances" version))
13871 (sha256
13872 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
13873 (modules '((guix build utils)))
13874 (snippet
13875 '(begin
13876 ;; Glances phones PyPI for weekly update checks by default.
13877 ;; Disable these. The user can re-enable them if desired.
13878 (substitute* "glances/outdated.py"
13879 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
13880 (string-append indentation
13881 "self.args.disable_check_update = True\n"
13882 line)))
13883 #t))))
13884 (build-system python-build-system)
13885 (propagated-inputs
13886 `(("python-future" ,python-future)
13887 ("python-psutil" ,python-psutil)))
13888 (home-page "https://github.com/nicolargo/glances")
13889 (synopsis "Cross-platform curses-based monitoring tool")
13890 (description
13891 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13892Glances uses the PsUtil library to get information from your system. It
13893monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13894 (license license:lgpl3+)))
13895
13896(define-public python-glances
13897 (deprecated-package "python-glances" glances))
13898
13899(define-public python-graphql-core
13900 (package
13901 (name "python-graphql-core")
13902 (version "0.5.3")
13903 (source
13904 (origin
13905 (method url-fetch)
13906 (uri (pypi-uri "graphql-core" version))
13907 (sha256
13908 (base32
13909 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13910 (build-system python-build-system)
13911 (arguments
13912 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13913 #:phases
13914 (modify-phases %standard-phases
13915 (add-after 'unpack 'patch-hardcoded-version
13916 (lambda _ (substitute*
13917 "setup.py"
13918 (("'gevent==1.1rc1'") "'gevent'"))
13919 #t)))))
13920 (native-inputs
13921 `(("python-gevent" ,python-gevent)
13922 ("python-mock" ,python-mock)
13923 ("python-pytest-mock" ,python-pytest-mock)))
13924 (propagated-inputs
13925 `(("python-promise" ,python-promise)
13926 ("python-six" ,python-six)))
13927 (home-page "https://github.com/graphql-python/graphql-core")
13928 (synopsis "GraphQL implementation for Python")
13929 (description
13930 "GraphQL implementation for Python. GraphQL is a data query language and
13931runtime designed and used to request and deliver data to mobile and web apps.
13932This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13933to Python.")
13934 (license license:expat)))
13935
13936(define-public python2-graphql-core
13937 (package-with-python2 python-graphql-core))
13938
13939(define-public python-graphql-relay
13940 (package
13941 (name "python-graphql-relay")
13942 (version "0.4.5")
13943 (source
13944 (origin
13945 (method url-fetch)
13946 (uri (pypi-uri "graphql-relay" version))
13947 (sha256
13948 (base32
13949 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13950 (build-system python-build-system)
13951 (arguments
13952 '(#:tests? #f)) ; The tests are not distributed
13953 (propagated-inputs
13954 `(("python-graphql-core" ,python-graphql-core)
13955 ("python-promise" ,python-promise)
13956 ("python-six" ,python-six)))
13957 (home-page "https://github.com/graphql-python/graphql-relay-py")
13958 (synopsis "Relay implementation for Python")
13959 (description
13960 "This is a library to allow the easy creation of Relay-compliant servers
13961using the GraphQL Python reference implementation of a GraphQL server. It
13962should be noted that the code is a exact port of the original
13963@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13964from Facebook.")
13965 (license license:expat)))
13966
13967(define-public python2-graphql-relay
13968 (package-with-python2 python-graphql-relay))
13969
13970(define-public python-graphene
13971 (package
13972 (name "python-graphene")
13973 (version "0.10.2")
13974 (source
13975 (origin
13976 (method url-fetch)
13977 (uri (pypi-uri "graphene" version))
13978 (sha256
13979 (base32
13980 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13981 (build-system python-build-system)
13982 (propagated-inputs
13983 `(("python-graphql-core" ,python-graphql-core)
13984 ("python-graphql-relay" ,python-graphql-relay)
13985 ("python-iso8601" ,python-iso8601)
13986 ("python-promise" ,python-promise)
13987 ("python-six" ,python-six)))
13988 (arguments
13989 `(#:tests? #f)) ; no tests/ in the PyPI tarball
13990 (home-page "https://graphene-python.org/")
13991 (synopsis "GraphQL Framework for Python")
13992 (description
13993 "Graphene is a Python library for building GraphQL schemas/types.
13994A GraphQL schema describes your data model, and provides a GraphQL server
13995with an associated set of resolve methods that know how to fetch data.")
13996 (properties `((python2-variant . ,(delay python2-graphene))))
13997 (license license:expat)))
13998
13999(define-public python2-graphene
14000 (let ((base (package-with-python2
14001 (strip-python2-variant python-graphene))))
14002 (package (inherit base)
14003 (native-inputs
14004 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14005 ,@(package-native-inputs base))))))
14006
14007(define-public python-nautilus
14008 (package
14009 (name "python-nautilus")
14010 (version "0.4.9")
14011 (source
14012 (origin
14013 (method url-fetch)
14014 (uri (pypi-uri "nautilus" version))
14015 (sha256
14016 (base32
14017 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14018 (build-system python-build-system)
14019 (arguments `(#:tests? #f)) ; fails to import test modules
14020 (propagated-inputs
14021 `(("python-bcrypt" ,python-bcrypt)
14022 ("python-click" ,python-click)
14023 ("python-consul" ,python-consul)
14024 ("python-graphene" ,python-graphene)
14025 ("python-jinja2" ,python-jinja2)
14026 ("python-peewee" ,python-peewee)
14027 ("python-pika" ,python-pika)
14028 ("python-tornado" ,python-tornado)
14029 ("python-wtforms" ,python-wtforms)))
14030 (native-inputs
14031 `(("python-nose2" ,python-nose2)))
14032 (home-page "https://github.com/AlecAivazis/nautilus")
14033 (synopsis "Library for creating microservice applications")
14034 (description
14035 "Nautilus is a framework for flux based microservices that looks to
14036provide extendible implementations of common aspects of a cloud so that you can
14037focus on building massively scalable web applications.")
14038 (license license:expat)))
14039
14040(define-public python-random2
14041 (package
14042 (name "python-random2")
14043 (version "1.0.1")
14044 (source (origin
14045 (method url-fetch)
14046 (uri (pypi-uri "random2" version ".zip"))
14047 (sha256
14048 (base32
14049 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14050 (build-system python-build-system)
14051 (native-inputs `(("unzip" ,unzip)))
14052 (home-page "http://pypi.python.org/pypi/random2")
14053 (synopsis "Python 3 version of the Python 2 @code{random} module")
14054 (description
14055 "This package provides a Python 3 ported version of Python 2.7’s
14056@code{random} module. It has also been back-ported to work in Python 2.6.
14057
14058In Python 3, the implementation of @code{randrange()} was changed, so that
14059even with the same seed you get different sequences in Python 2 and 3.
14060
14061This package closes that gap, allowing stable random number generation
14062between the different Python versions.")
14063 (license license:psfl)))
14064
14065(define-public python2-random2
14066 (package-with-python2 python-random2))
14067
14068(define-public python-snowballstemmer
14069 (package
14070 (name "python-snowballstemmer")
14071 (version "2.0.0")
14072 (source (origin
14073 (method url-fetch)
14074 (uri (pypi-uri "snowballstemmer" version))
14075 (sha256
14076 (base32
14077 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14078 (build-system python-build-system)
14079 (arguments
14080 `(;; No tests exist
14081 #:tests? #f))
14082 (home-page "https://github.com/shibukawa/snowball_py")
14083 (synopsis "Snowball stemming library collection for Python")
14084 (description "This package provides 16 word stemmer algorithms generated
14085from Snowball algorithms. It includes the 15 original ones plus the Poerter
14086English stemmer.")
14087 (license license:bsd-3)))
14088
14089(define-public python2-snowballstemmer
14090 (package-with-python2 python-snowballstemmer))
14091
14092(define-public python-setproctitle
14093 (package
14094 (name "python-setproctitle")
14095 (version "1.1.10")
14096 (source
14097 (origin
14098 (method url-fetch)
14099 (uri (pypi-uri "setproctitle" version))
14100 (sha256
14101 (base32
14102 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14103 (build-system python-build-system)
14104 (arguments
14105 '(#:phases
14106 (modify-phases %standard-phases
14107 (add-before 'check 'patch-Makefile
14108 ;; Stricly this is only required for the python2 variant.
14109 ;; But adding a phase in an inherited package seems to be
14110 ;; cumbersum. So we patch even for python3.
14111 (lambda _
14112 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14113 (when nose
14114 (substitute* "Makefile"
14115 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14116 (string-append nose "/bin/nosetests "))))
14117 #t)))
14118 (replace 'check
14119 (lambda _
14120 (setenv "PYTHON" (or (which "python3") (which "python")))
14121 (setenv "PYCONFIG" (if (which "python3-config")
14122 "python3-config --embed"
14123 "python-config"))
14124 (setenv "CC" "gcc")
14125 ;; No need to extend PYTHONPATH to find the built package, since
14126 ;; the Makefile will build anyway
14127 (invoke "make" "check"))))))
14128 (native-inputs
14129 `(("procps" ,procps))) ; required for tests
14130 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14131 (synopsis
14132 "Setproctitle implementation for Python to customize the process title")
14133 (description "The library allows a process to change its title (as displayed
14134by system tools such as ps and top).
14135
14136Changing the title is mostly useful in multi-process systems, for
14137example when a master process is forked: changing the children's title
14138allows identifying the task each process is busy with. The technique
14139is used by PostgreSQL and the OpenSSH Server for example.")
14140 (license license:bsd-3)
14141 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14142
14143(define-public python2-setproctitle
14144 (let ((base (package-with-python2
14145 (strip-python2-variant python-setproctitle))))
14146 (package
14147 (inherit base)
14148 (native-inputs `(("python2-nose" ,python2-nose)
14149 ,@(package-native-inputs base))))))
14150
14151(define-public python-validictory
14152 (package
14153 (name "python-validictory")
14154 (version "1.0.1")
14155 (source
14156 (origin
14157 (method url-fetch)
14158 (uri (pypi-uri "validictory" version))
14159 (sha256
14160 (base32
14161 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14162 (build-system python-build-system)
14163 (arguments
14164 '(#:phases
14165 (modify-phases %standard-phases
14166 (add-after 'unpack 'bootstrap
14167 ;; Move the tests out of the package directory to avoid
14168 ;; packaging them.
14169 (lambda* _
14170 (rename-file "validictory/tests" "tests")
14171 (delete-file "tests/__init__.py")))
14172 (replace 'check
14173 (lambda _
14174 ;; Extend PYTHONPATH so the built package will be found.
14175 (setenv "PYTHONPATH"
14176 (string-append (getcwd) "/build/lib:"
14177 (getenv "PYTHONPATH")))
14178 (invoke "py.test" "-vv" ))))))
14179 (native-inputs
14180 `(("python-pytest" ,python-pytest)))
14181 (home-page
14182 "https://github.com/jamesturk/validictory")
14183 (synopsis "General purpose Python data validator")
14184 (description "It allows validation of arbitrary Python data structures.
14185
14186The schema format is based on the JSON Schema
14187proposal (http://json-schema.org), so combined with json the library is also
14188useful as a validator for JSON data.")
14189 (license license:expat)))
14190
14191(define-public python2-validictory
14192 (package-with-python2 python-validictory))
14193
14194(define-public python-pyelftools
14195 (package
14196 (name "python-pyelftools")
14197 (version "0.25")
14198 (source
14199 (origin
14200 (method url-fetch)
14201 (uri (pypi-uri "pyelftools" version))
14202 (sha256
14203 (base32
14204 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14205 (build-system python-build-system)
14206 (arguments
14207 `(#:phases
14208 (modify-phases %standard-phases
14209 (add-before 'check 'set-pythonpath
14210 (lambda _
14211 (setenv "PYTHONPATH"
14212 (string-append
14213 (getcwd) "/test/"
14214 ":" (getenv "PYTHONPATH")))
14215 #t)))))
14216 (home-page
14217 "https://github.com/eliben/pyelftools")
14218 (synopsis
14219 "Analyze binary and library file information")
14220 (description "This Python library provides interfaces for parsing and
14221analyzing two binary and library file formats; the Executable and Linking
14222Format (ELF), and debugging information in the Debugging With Attributed
14223Record Format (DWARF).")
14224 (license license:public-domain)))
14225
14226(define-public python-pyev
14227 (package
14228 (name "python-pyev")
14229 (version "0.9.0")
14230 (source
14231 (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "pyev" version))
14234 (sha256
14235 (base32
14236 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14237 (build-system python-build-system)
14238 (arguments
14239 `(#:tests? #f ; no test suite
14240 #:phases
14241 (modify-phases %standard-phases
14242 (add-after 'unpack 'patch
14243 (lambda* (#:key inputs #:allow-other-keys)
14244 (let ((libev (string-append (assoc-ref inputs "libev")
14245 "/lib/libev.so.4")))
14246 (substitute* "setup.py"
14247 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14248 (string-append "libev_dll_name = \"" libev "\"")))))))))
14249 (inputs
14250 `(("libev" ,libev)))
14251 (home-page "http://pythonhosted.org/pyev/")
14252 (synopsis "Python libev interface")
14253 (description "Pyev provides a Python interface to libev.")
14254 (license license:gpl3)))
14255
14256(define-public python2-pyev
14257 (package-with-python2 python-pyev))
14258
14259(define-public python-imagesize
14260 (package
14261 (name "python-imagesize")
14262 (version "1.2.0")
14263 (source
14264 (origin
14265 (method url-fetch)
14266 (uri (pypi-uri "imagesize" version))
14267 (sha256
14268 (base32
14269 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14270 (build-system python-build-system)
14271 (home-page "https://github.com/shibukawa/imagesize_py")
14272 (synopsis "Gets image size of files in various formats in Python")
14273 (description
14274 "This package allows determination of image size from
14275PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14276 (license license:expat)))
14277
14278(define-public python2-imagesize
14279 (package-with-python2 python-imagesize))
14280
14281(define-public python-termstyle
14282 (package
14283 (name "python-termstyle")
14284 (version "0.1.11")
14285 (source
14286 (origin
14287 (method url-fetch)
14288 (uri (pypi-uri "termstyle" version))
14289 (sha256
14290 (base32
14291 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14292 (build-system python-build-system)
14293 (arguments
14294 '(#:phases
14295 (modify-phases %standard-phases
14296 (replace 'check
14297 (lambda _
14298 (invoke "python" "test3.py"))))))
14299 (home-page "https://github.com/gfxmonk/termstyle")
14300 (synopsis "Console text coloring for Python")
14301 (description "This package provides console text coloring for Python.")
14302 (license license:bsd-3)))
14303
14304(define-public python-argcomplete
14305 (package
14306 (name "python-argcomplete")
14307 (version "1.11.1")
14308 (source
14309 (origin
14310 (method url-fetch)
14311 (uri (pypi-uri "argcomplete" version))
14312 (sha256
14313 (base32
14314 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14315 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14316 (build-system python-build-system)
14317 (native-inputs
14318 `(("python-coverage" ,python-coverage)
14319 ("python-flake8" ,python-flake8)
14320 ("python-pexpect" ,python-pexpect)
14321 ("python-wheel" ,python-wheel)
14322 ("tcsh" ,tcsh)
14323 ("fish" ,fish)
14324 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14325 (home-page "https://github.com/kislyuk/argcomplete")
14326 (synopsis "Shell tab completion for Python argparse")
14327 (description "argcomplete provides extensible command line tab completion
14328of arguments and options for Python scripts using @code{argparse}. It's
14329particularly useful for programs with many options or sub-parsers that can
14330dynamically suggest completions; for example, when browsing resources over the
14331network.")
14332 (license license:asl2.0)))
14333
14334(define-public python2-argcomplete
14335 (package-with-python2 python-argcomplete))
14336
14337(define-public python-csscompressor
14338 (package
14339 (name "python-csscompressor")
14340 (version "0.9.5")
14341 (source
14342 (origin
14343 (method url-fetch)
14344 (uri (pypi-uri "csscompressor" version))
14345 (sha256
14346 (base32
14347 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14348 (build-system python-build-system)
14349 (arguments
14350 '(#:phases
14351 (modify-phases %standard-phases
14352 (replace 'check
14353 (lambda _
14354 (invoke "py.test"))))))
14355 (native-inputs
14356 `(("python-pytest" ,python-pytest)))
14357 (home-page "https://github.com/sprymix/csscompressor")
14358 (synopsis "Python port of YUI CSS Compressor")
14359 (description
14360 "This package provides a python port of YUI CSS Compressor.")
14361 (license license:bsd-3)))
14362
14363(define-public python-rcssmin
14364 (package
14365 (name "python-rcssmin")
14366 (version "1.0.6")
14367 (source
14368 (origin
14369 (method url-fetch)
14370 (uri (pypi-uri "rcssmin" version))
14371 (sha256
14372 (base32
14373 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14374 (build-system python-build-system)
14375 (arguments
14376 '(#:phases
14377 (modify-phases %standard-phases
14378 (replace 'check
14379 (lambda _
14380 (invoke "python" "run_tests.py" "tests"))))))
14381 (home-page "http://opensource.perlig.de/rcssmin/")
14382 (synopsis "CSS Minifier")
14383 (description "The minifier is based on the semantics of the YUI compressor,
14384which itself is based on the rule list by Isaac Schlueter.")
14385 (license license:asl2.0)))
14386
14387(define-public python-rjsmin
14388 (package
14389 (name "python-rjsmin")
14390 (version "1.1.0")
14391 (source
14392 (origin
14393 (method url-fetch)
14394 (uri (pypi-uri "rjsmin" version))
14395 (sha256
14396 (base32
14397 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14398 (modules '((guix build utils)))
14399 (snippet
14400 '(begin
14401 (for-each delete-file (find-files "bench" "\\.js$"))
14402 #t))))
14403 (build-system python-build-system)
14404 (arguments
14405 '(#:tests? #f ; Not all test files included.
14406 #:phases
14407 (modify-phases %standard-phases
14408 (replace 'check
14409 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14410 (add-installed-pythonpath inputs outputs)
14411 (if tests?
14412 (invoke "py.test" "-vv" "tests")
14413 #t))))))
14414 (native-inputs
14415 `(("python-pytest" ,python-pytest)))
14416 (home-page "http://opensource.perlig.de/rjsmin/")
14417 (synopsis "Javascript Minifier")
14418 (description "@code{rJSmin} is a javascript minifier written in Python. The
14419minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14420is a re-implementation aiming for speed, so it can be used at runtime (rather
14421than during a preprocessing step).")
14422 (license license:asl2.0)))
14423
14424(define-public python-xopen
14425 (package
14426 (name "python-xopen")
14427 (version "0.5.0")
14428 (source
14429 (origin
14430 (method url-fetch)
14431 (uri (pypi-uri "xopen" version))
14432 (sha256
14433 (base32
14434 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14435 (build-system python-build-system)
14436 (propagated-inputs
14437 `(("python-setuptools-scm" ,python-setuptools-scm)))
14438 (home-page "https://github.com/marcelm/xopen/")
14439 (synopsis "Open compressed files transparently")
14440 (description "This module provides an @code{xopen} function that works like
14441Python's built-in @code{open} function, but can also deal with compressed files.
14442Supported compression formats are gzip, bzip2 and, xz, and are automatically
14443recognized by their file extensions. The focus is on being as efficient as
14444possible on all supported Python versions.")
14445 (license license:expat)))
14446
14447(define-public python2-xopen
14448 (let ((base (package-with-python2
14449 (strip-python2-variant python-xopen))))
14450 (package
14451 (inherit base)
14452 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14453 ,@(package-propagated-inputs base))))))
14454
14455(define-public python-cheetah
14456 (package
14457 (name "python-cheetah")
14458 (version "3.2.4")
14459 (source
14460 (origin
14461 (method url-fetch)
14462 (uri (pypi-uri "Cheetah3" version))
14463 (sha256
14464 (base32
14465 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14466 (build-system python-build-system)
14467 (arguments
14468 `(#:modules ((guix build utils)
14469 (guix build python-build-system)
14470 (ice-9 ftw)
14471 (srfi srfi-1)
14472 (srfi srfi-26))
14473 #:phases (modify-phases %standard-phases
14474 (add-after 'unpack 'use-absolute-python
14475 (lambda _
14476 (substitute* "Cheetah/CheetahWrapper.py"
14477 (("#!/usr/bin/env python")
14478 (string-append "#!" (which "python"))))
14479 #t))
14480 (add-after 'unpack 'fix-tests
14481 (lambda _
14482 (substitute* "Cheetah/Tests/ImportHooks.py"
14483 (("os.path.dirname\\(__file__\\)")
14484 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14485 #t))
14486 (replace 'check
14487 (lambda _
14488 (let ((cwd (getcwd)))
14489 (setenv "PYTHONPATH"
14490 (string-append
14491 cwd "/build/"
14492 (find (cut string-prefix? "lib" <>)
14493 (scandir (string-append cwd "/build")))
14494 ":" (getenv "PYTHONPATH")))
14495 (setenv "PATH"
14496 (string-append (getenv "PATH")
14497 ":" cwd "/bin"))
14498 (setenv "TMPDIR" "/tmp")
14499
14500 (substitute* "Cheetah/Tests/Test.py"
14501 (("unittest.TextTestRunner\\(\\)")
14502 "unittest.TextTestRunner(verbosity=2)"))
14503
14504 (invoke "python" "Cheetah/Tests/Test.py")))))))
14505 (propagated-inputs
14506 `(("python-markdown" ,python-markdown))) ;optional
14507 (home-page "https://cheetahtemplate.org/")
14508 (synopsis "Template engine")
14509 (description "Cheetah is a text-based template engine and Python code
14510generator.
14511
14512Cheetah can be used as a standalone templating utility or referenced as
14513a library from other Python applications. It has many potential uses,
14514but web developers looking for a viable alternative to ASP, JSP, PHP and
14515PSP are expected to be its principle user group.
14516
14517Features:
14518@enumerate
14519@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14520 text-based format.
14521@item Cleanly separates content, graphic design, and program code.
14522@item Blends the power and flexibility of Python with a simple template language
14523 that non-programmers can understand.
14524@item Gives template writers full access to any Python data structure, module,
14525 function, object, or method in their templates.
14526@item Makes code reuse easy by providing an object-orientated interface to
14527 templates that is accessible from Python code or other Cheetah templates.
14528 One template can subclass another and selectively reimplement sections of it.
14529@item Provides a simple, yet powerful, caching mechanism that can dramatically
14530 improve the performance of a dynamic website.
14531@item Compiles templates into optimized, yet readable, Python code.
14532@end enumerate")
14533 (license (license:x11-style "file://LICENSE"))))
14534
14535(define-public python2-cheetah
14536 (package-with-python2 python-cheetah))
14537
14538(define-public python-dulwich
14539 (package
14540 (name "python-dulwich")
14541 (version "0.19.16")
14542 (source
14543 (origin
14544 (method url-fetch)
14545 (uri (list (string-append "https://www.dulwich.io/releases/"
14546 "dulwich-" version ".tar.gz")
14547 (pypi-uri "dulwich" version)))
14548 (sha256
14549 (base32
14550 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14551 (build-system python-build-system)
14552 (arguments
14553 `(#:phases
14554 (modify-phases %standard-phases
14555 (add-before 'check 'fix-tests
14556 (lambda* (#:key inputs #:allow-other-keys)
14557 ;; The tests use Popen with a custom environment which doesn't
14558 ;; include PATH.
14559 (substitute* "dulwich/tests/compat/utils.py"
14560 (("'git'") (string-append "'"
14561 (which "git")
14562 "'")))
14563 (substitute* '("dulwich/tests/test_repository.py"
14564 "dulwich/tests/test_hooks.py")
14565 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14566 (setenv "TEST_RUNNER" "unittest")
14567 (setenv "PYTHONHASHSEED" "random")
14568 #t)))))
14569 (propagated-inputs
14570 `(("python-fastimport" ,python-fastimport)
14571 ("python-urllib3" ,python-urllib3)))
14572 (native-inputs
14573 `(("python-mock" ,python-mock)
14574 ("python-geventhttpclient" ,python-geventhttpclient)
14575 ("git" ,git)))
14576 (home-page "https://www.dulwich.io/")
14577 (synopsis "Git implementation in Python")
14578 (description "Dulwich is an implementation of the Git file formats and
14579protocols written in pure Python.")
14580 ;; Can be used with either license.
14581 (license (list license:asl2.0 license:gpl2+))))
14582
14583(define-public python2-dulwich
14584 (package-with-python2 python-dulwich))
14585
14586(define-public python-pbkdf2
14587 (package
14588 (name "python-pbkdf2")
14589 (version "1.3")
14590 (source
14591 (origin
14592 (method url-fetch)
14593 (uri (pypi-uri "pbkdf2" version))
14594 (sha256
14595 (base32
14596 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14597 (build-system python-build-system)
14598 (arguments
14599 '(#:phases
14600 (modify-phases %standard-phases
14601 (replace 'check
14602 (lambda _
14603 (setenv "PYTHONPATH"
14604 (string-append (getcwd) "/build/lib:"
14605 (getenv "PYTHONPATH")))
14606 (invoke "python" "test/test_pbkdf2.py"))))))
14607 (propagated-inputs
14608 `(("python-pycrypto" ,python-pycrypto))) ; optional
14609 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14610 (synopsis "Password-based key derivation")
14611 (description "This module implements the password-based key derivation
14612function, PBKDF2, specified in RSA PKCS#5 v2.0.
14613
14614PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14615is part of the RSA Public Key Cryptography Standards series. The provided
14616implementation takes a password or a passphrase and a salt value (and
14617optionally a iteration count, a digest module, and a MAC module) and provides
14618a file-like object from which an arbitrarily-sized key can be read.")
14619 (license license:expat)))
14620
14621(define-public python2-pbkdf2
14622 (package-with-python2 python-pbkdf2))
14623
14624(define-public python-qrcode
14625 (package
14626 (name "python-qrcode")
14627 (version "6.1")
14628 (source
14629 (origin
14630 (method url-fetch)
14631 (uri (pypi-uri "qrcode" version))
14632 (sha256
14633 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14634 (build-system python-build-system)
14635 (arguments
14636 ;; FIXME: Tests require packaging 'pymaging'.
14637 '(#:tests? #f))
14638 (propagated-inputs
14639 `(("python-lxml" ,python-lxml) ; for SVG output
14640 ("python-pillow" ,python-pillow) ; for PNG output
14641 ("python-six" ,python-six)))
14642 (home-page "https://github.com/lincolnloop/python-qrcode")
14643 (synopsis "QR Code image generator")
14644 (description "This package provides a pure Python QR Code generator
14645module. It uses the Python Imaging Library (PIL) to allow for the generation
14646of QR Codes.
14647
14648In addition this package provides a command line tool to generate QR codes and
14649either write these QR codes to a file or do the output as ascii art at the
14650console.")
14651 (license license:bsd-3)))
14652
14653(define-public python2-qrcode
14654 (package-with-python2 python-qrcode))
14655
14656(define-public python-rst2ansi
14657 (package
14658 (name "python-rst2ansi")
14659 (version "0.1.5")
14660 (source
14661 (origin
14662 (method url-fetch)
14663 (uri (pypi-uri "rst2ansi" version))
14664 (sha256
14665 (base32
14666 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14667 (build-system python-build-system)
14668 (propagated-inputs
14669 `(("python-docutils" ,python-docutils)))
14670 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14671 (synopsis "Convert RST to ANSI-decorated console output")
14672 (description
14673 "Python module dedicated to rendering RST (reStructuredText) documents
14674to ansi-escaped strings suitable for display in a terminal.")
14675 (license license:expat)))
14676
14677(define-public python-ansi2html
14678 (package
14679 (name "python-ansi2html")
14680 (version "1.2.0")
14681 (source
14682 (origin
14683 (method url-fetch)
14684 (uri (pypi-uri "ansi2html" version))
14685 (sha256
14686 (base32
14687 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14688 (build-system python-build-system)
14689 (native-inputs
14690 `(("python-mock" ,python-mock)
14691 ("python-nose" ,python-nose)))
14692 (propagated-inputs
14693 `(("python-six" ,python-six)))
14694 (home-page "https://github.com/ralphbean/ansi2html")
14695 (synopsis "Convert ANSI-decorated console output to HTML")
14696 (description
14697 "@command{ansi2html} is a Python library and command line utility for
14698converting text with ANSI color codes to HTML or LaTeX.")
14699 (license license:gpl3+)))
14700
14701(define-public python2-ansi2html
14702 (package-with-python2 python-ansi2html))
14703
14704(define-public python-ddt
14705 (package
14706 (name "python-ddt")
14707 (version "1.1.3")
14708 (source
14709 (origin
14710 (method url-fetch)
14711 (uri (pypi-uri "ddt" version))
14712 (sha256
14713 (base32
14714 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
14715 (build-system python-build-system)
14716 (native-inputs
14717 `(("python-mock" ,python-mock)
14718 ("python-nose" ,python-nose)))
14719 (propagated-inputs
14720 `(("python-six" ,python-six)
14721 ("python-pyyaml" ,python-pyyaml)))
14722 (home-page "https://github.com/txels/ddt")
14723 (synopsis "Data-Driven Tests")
14724 (description
14725 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14726running it with different test data, and make it appear as multiple test
14727cases.")
14728 (license license:expat)))
14729
14730(define-public python2-ddt
14731 (package-with-python2 python-ddt))
14732
14733(define-public python-pycountry
14734 (package
14735 (name "python-pycountry")
14736 (version "18.5.26")
14737 (source
14738 (origin
14739 (method url-fetch)
14740 (uri (pypi-uri "pycountry" version))
14741 (sha256
14742 (base32
14743 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14744 (build-system python-build-system)
14745 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14746 (synopsis "ISO databases for languages, countries, currencies, etc.")
14747 (description
14748 "@code{pycountry} provides the ISO databases for the standards:
14749@enumerate
14750@item 639-3 (Languages)
14751@item 3166 (Countries)
14752@item 3166-3 (Deleted Countries)
14753@item 3166-2 (Subdivisions of countries)
14754@item 4217 (Currencies)
14755@item 15924 (Scripts)
14756@end enumerate
14757It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14758through a Python API.")
14759 (license license:lgpl2.1+)))
14760
14761(define-public python2-pycountry
14762 (package-with-python2 python-pycountry))
14763
14764(define-public python-pycosat
14765 (package
14766 (name "python-pycosat")
14767 (version "0.6.3")
14768 (source
14769 (origin
14770 (method url-fetch)
14771 (uri (pypi-uri "pycosat" version ".zip"))
14772 (sha256
14773 (base32
14774 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14775 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14776 (build-system python-build-system)
14777 (native-inputs
14778 `(("unzip" ,unzip)))
14779 (home-page "https://github.com/ContinuumIO/pycosat")
14780 (synopsis "Bindings to picosat (a SAT solver)")
14781 (description
14782 "This package provides efficient Python bindings to @code{picosat} on
14783the C level. When importing pycosat, the @code{picosat} solver becomes part
14784of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14785Problem} (SAT) solver.")
14786 (license license:expat)))
14787
14788(define-public python2-pycosat
14789 (package-with-python2 python-pycosat))
14790
14791(define-public python2-ruamel.ordereddict
14792 (package
14793 (name "python2-ruamel.ordereddict")
14794 (version "0.4.9")
14795 (source
14796 (origin
14797 (method url-fetch)
14798 (uri (pypi-uri "ruamel.ordereddict" version))
14799 (sha256
14800 (base32
14801 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14802 (build-system python-build-system)
14803 (arguments
14804 `(#:python ,python-2
14805 #:phases
14806 (modify-phases %standard-phases
14807 (delete 'check)
14808 (add-after 'install 'check
14809 (lambda* (#:key inputs outputs #:allow-other-keys)
14810 (add-installed-pythonpath inputs outputs)
14811 (invoke "python" "test/testordereddict.py"))))))
14812 (home-page "https://bitbucket.org/ruamel/ordereddict")
14813 (synopsis "Version of dict that keeps keys in insertion order")
14814 (description
14815 "This is an implementation of an ordered dictionary with @dfn{Key
14816Insertion Order} (KIO: updates of values do not affect the position of the
14817key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14818removed and put at the back). The standard library module @code{OrderedDict},
14819implemented later, implements a subset of @code{ordereddict} functionality.
14820Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14821Order} (KSO, no sorting function can be specified, but a transform can be
14822specified to apply on the key before comparison (e.g. @code{string.lower})).")
14823 (license license:expat)))
14824
14825(define-public python-pypeg2
14826 (package
14827 (name "python-pypeg2")
14828 (version "2.15.2")
14829 (source
14830 (origin
14831 (method url-fetch)
14832 (uri (pypi-uri "pyPEG2" version))
14833 (sha256
14834 (base32
14835 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14836 (build-system python-build-system)
14837 (propagated-inputs `(("python-lxml" ,python-lxml)))
14838 (arguments
14839 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14840 '(#:tests? #f))
14841 (home-page "https://fdik.org/pyPEG/")
14842 (synopsis "Parsering Expression Grammars in Python")
14843 (description "PyPEG is an intrinsic parser interpreter framework for
14844Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14845parse many formal languages.")
14846 (license license:gpl2)))
14847
14848(define-public python-incremental
14849 (package
14850 (name "python-incremental")
14851 (version "17.5.0")
14852 (source
14853 (origin
14854 (method url-fetch)
14855 (uri (pypi-uri "incremental" version))
14856 (sha256
14857 (base32
14858 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14859 (build-system python-build-system)
14860 (home-page "https://github.com/hawkowl/incremental")
14861 (synopsis "Library for versioning Python projects")
14862 (description "Incremental is a small library that versions your Python
14863projects.")
14864 (license license:expat)))
14865
14866(define-public python2-incremental
14867 (package-with-python2 python-incremental))
14868
14869(define-public python-invoke
14870 (package
14871 (name "python-invoke")
14872 (home-page "https://www.pyinvoke.org/")
14873 (version "1.4.1")
14874 (source (origin
14875 (method url-fetch)
14876 (uri (pypi-uri "invoke" version))
14877 (sha256
14878 (base32
14879 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
14880 (build-system python-build-system)
14881 (arguments
14882 ;; XXX: Requires many dependencies that are not yet in Guix.
14883 `(#:tests? #f))
14884 (synopsis "Pythonic task execution")
14885 (description
14886 "Invoke is a Python task execution tool and library, drawing inspiration
14887from various sources to arrive at a powerful and clean feature set. It is
14888evolved from the Fabric project, but focuses on local and abstract concerns
14889instead of servers and network commands.")
14890 (license license:bsd-3)))
14891
14892(define-public python2-invoke
14893 (package-with-python2 python-invoke))
14894
14895(define-public python-automat
14896 (package
14897 (name "python-automat")
14898 (version "20.2.0")
14899 (source (origin
14900 (method url-fetch)
14901 (uri (pypi-uri "Automat" version))
14902 (sha256
14903 (base32
14904 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
14905 (build-system python-build-system)
14906 ;; We disable the tests because they require python-twisted, while
14907 ;; python-twisted depends on python-automat. Twisted is optional, but the
14908 ;; tests fail if it is not available. Also see
14909 ;; <https://github.com/glyph/automat/issues/71>.
14910 (arguments '(#:tests? #f))
14911 (native-inputs
14912 `(("python-m2r" ,python-m2r)
14913 ("python-setuptools-scm" ,python-setuptools-scm)
14914 ("python-graphviz" ,python-graphviz)))
14915 (propagated-inputs
14916 `(("python-six" ,python-six)
14917 ("python-attrs" ,python-attrs)))
14918 (home-page "https://github.com/glyph/Automat")
14919 (synopsis "Self-service finite-state machines")
14920 (description "Automat is a library for concise, idiomatic Python
14921expression of finite-state automata (particularly deterministic finite-state
14922transducers).")
14923 (license license:expat)))
14924
14925(define-public python2-automat
14926 (package-with-python2 python-automat))
14927
14928(define-public python-m2r
14929 (package
14930 (name "python-m2r")
14931 (version "0.2.1")
14932 (source (origin
14933 (method url-fetch)
14934 (uri (pypi-uri "m2r" version))
14935 (sha256
14936 (base32
14937 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
14938 (build-system python-build-system)
14939 (propagated-inputs
14940 `(("python-docutils" ,python-docutils)
14941 ("python-mistune" ,python-mistune)))
14942 (native-inputs
14943 `(("python-pygments" ,python-pygments)
14944 ("python-mock" ,python-mock)))
14945 (home-page "https://github.com/miyakogi/m2r")
14946 (synopsis "Markdown to reStructuredText converter")
14947 (description "M2R converts a markdown file including reST markups to valid
14948reST format.")
14949 (license license:expat)))
14950
14951(define-public python2-m2r
14952 (package-with-python2 python-m2r))
14953
14954(define-public python-constantly
14955 (package
14956 (name "python-constantly")
14957 (version "15.1.0")
14958 (source (origin
14959 (method url-fetch)
14960 (uri (pypi-uri "constantly" version))
14961 (sha256
14962 (base32
14963 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
14964 (build-system python-build-system)
14965 (home-page "https://github.com/twisted/constantly")
14966 (synopsis "Symbolic constants in Python")
14967 (description "Constantly is a Python library that provides symbolic
14968constant support. It includes collections and constants with text, numeric,
14969and bit flag values.")
14970 (license license:expat)))
14971
14972(define-public python2-constantly
14973 (package-with-python2 python-constantly))
14974
14975(define-public python-attrs
14976 (package
14977 (name "python-attrs")
14978 (version "19.3.0")
14979 (source (origin
14980 (method url-fetch)
14981 (uri (pypi-uri "attrs" version))
14982 (sha256
14983 (base32
14984 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
14985 (build-system python-build-system)
14986 (arguments
14987 `(#:modules ((guix build utils)
14988 (guix build python-build-system)
14989 (ice-9 ftw)
14990 (srfi srfi-1)
14991 (srfi srfi-26))
14992 #:phases (modify-phases %standard-phases
14993 (replace 'check
14994 (lambda _
14995 (let ((cwd (getcwd)))
14996 (setenv "PYTHONPATH"
14997 (string-append
14998 cwd "/build/"
14999 (find (cut string-prefix? "lib" <>)
15000 (scandir (string-append cwd "/build")))
15001 ":"
15002 (getenv "PYTHONPATH")))
15003 (invoke "python" "-m" "pytest")))))))
15004 (native-inputs
15005 `(("python-coverage" ,python-coverage)
15006 ("python-hypothesis" ,python-hypothesis)
15007 ("python-pympler" ,python-pympler)
15008 ("python-pytest" ,python-pytest)
15009 ("python-six" ,python-six)
15010 ("python-sphinx" ,python-sphinx)
15011 ("python-zope-interface" ,python-zope-interface)))
15012 (home-page "https://github.com/python-attrs/attrs/")
15013 (synopsis "Attributes without boilerplate")
15014 (description "@code{attrs} is a Python package with class decorators that
15015ease the chores of implementing the most common attribute-related object
15016protocols.")
15017 (license license:expat)))
15018
15019(define-public python2-attrs
15020 (package-with-python2 python-attrs))
15021
15022(define-public python-attrs-bootstrap
15023 (package
15024 (inherit python-attrs)
15025 (name "python-attrs-bootstrap")
15026 (native-inputs `())
15027 (arguments `(#:tests? #f))))
15028
15029(define-public python2-attrs-bootstrap
15030 (package-with-python2 python-attrs-bootstrap))
15031
15032(define-public python2-cliapp
15033 (package
15034 (name "python2-cliapp")
15035 (version "1.20180812.1")
15036 (source
15037 (origin
15038 (method url-fetch)
15039 (uri (string-append
15040 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15041 version ".tar.gz"))
15042 (sha256
15043 (base32
15044 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15045 (build-system python-build-system)
15046 (arguments
15047 `(#:python ,python-2
15048 #:phases
15049 (modify-phases %standard-phases
15050 ;; check phase needs to be run before the build phase. If not,
15051 ;; coverage-test-runner looks for tests for the built source files,
15052 ;; and fails.
15053 (delete 'check)
15054 (add-before 'build 'check
15055 (lambda _
15056 ;; Disable python3 tests
15057 (substitute* "check"
15058 (("python3") "# python3"))
15059 (invoke "./check"))))))
15060 (native-inputs
15061 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15062 ("python2-pep8" ,python2-pep8)))
15063 (propagated-inputs
15064 `(("python2-pyaml" ,python2-pyaml)))
15065 (home-page "https://liw.fi/cliapp/")
15066 (synopsis "Python framework for command line programs")
15067 (description "@code{python2-cliapp} is a python framework for
15068command line programs. It contains the typical stuff such programs
15069need to do, such as parsing the command line for options, and
15070iterating over input files.")
15071 (license license:gpl2+)))
15072
15073(define-public python2-ttystatus
15074 (package
15075 (name "python2-ttystatus")
15076 (version "0.38")
15077 (source
15078 (origin
15079 (method git-fetch)
15080 (uri (git-reference
15081 (url "http://git.liw.fi/ttystatus")
15082 ;; There are no tags after ttystatus-0.36.
15083 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15084 (sha256
15085 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15086 (file-name (git-file-name name version))))
15087 (build-system python-build-system)
15088 (native-inputs
15089 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15090 ("python2-pep8" ,python2-pep8)))
15091 (arguments
15092 `(#:python ,python-2
15093 #:phases
15094 (modify-phases %standard-phases
15095 ;; check phase needs to be run before the build phase. If not,
15096 ;; coverage-test-runner looks for tests for the built source files,
15097 ;; and fails.
15098 (delete 'check)
15099 (add-before 'build 'check
15100 (lambda _ (invoke "make" "check"))))))
15101 (home-page "https://liw.fi/ttystatus/")
15102 (synopsis "Python library for showing progress reporting and
15103status updates on terminals")
15104 (description "@code{python2-ttystatus} is a python library for
15105showing progress reporting and status updates on terminals, for
15106command line programs. Output is automatically adapted to the width
15107of the terminal: truncated if it does not fit, and resized if the
15108terminal size changes.")
15109 (license license:gpl3+)))
15110
15111(define-public python2-tracing
15112 (package
15113 (name "python2-tracing")
15114 (version "0.10")
15115 (source
15116 (origin
15117 (method url-fetch)
15118 (uri (string-append
15119 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15120 version ".tar.gz"))
15121 (sha256
15122 (base32
15123 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15124 (build-system python-build-system)
15125 (arguments
15126 `(#:python ,python-2))
15127 (home-page "https://liw.fi/tracing/")
15128 (synopsis "Python debug logging helper")
15129 (description "@code{python2-tracing} is a python library for
15130logging debug messages. It provides a way to turn debugging messages
15131on and off, based on the filename they occur in. It is much faster
15132than using @code{logging.Filter} to accomplish the same thing, which
15133matters when code is run in production mode. The actual logging still
15134happens using the @code{logging} library.")
15135 (license license:gpl3+)))
15136
15137(define-public python2-larch
15138 (package
15139 (name "python2-larch")
15140 (version "1.20151025")
15141 (source
15142 (origin
15143 (method url-fetch)
15144 (uri (string-append
15145 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15146 version ".tar.gz"))
15147 (patches (search-patches
15148 "python2-larch-coverage-4.0a6-compatibility.patch"))
15149 (sha256
15150 (base32
15151 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15152 (build-system python-build-system)
15153 (arguments
15154 `(#:python ,python-2
15155 #:phases
15156 (modify-phases %standard-phases
15157 ;; check phase needs to be run before the build phase. If not,
15158 ;; coverage-test-runner looks for tests for the built source files,
15159 ;; and fails.
15160 (delete 'check)
15161 (add-before 'build 'check
15162 (lambda _ (invoke "make" "check"))))))
15163 (native-inputs
15164 `(("cmdtest" ,cmdtest)
15165 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15166 (propagated-inputs
15167 `(("python2-tracing" ,python2-tracing)))
15168 (home-page "https://liw.fi/larch/")
15169 (synopsis "Python copy-on-write B-tree library")
15170 (description "@code{python2-larch} is an implementation of
15171particular kind of B-tree, based on research by Ohad Rodeh. See
15172@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15173on the data structure.
15174
15175The distinctive feature of this B-tree is that a node is never
15176(conceptually) modified. Instead, all updates are done by
15177copy-on-write. This makes it easy to clone a tree, and modify only the
15178clone, while other processes access the original tree.")
15179 (license license:gpl3+)))
15180
15181(define-public python-astroid
15182 (package
15183 (name "python-astroid")
15184 (version "2.4.2")
15185 (source
15186 (origin
15187 (method url-fetch)
15188 (uri (pypi-uri "astroid" version))
15189 (sha256
15190 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15191 (modules '((guix build utils)))
15192 (snippet
15193 '(begin
15194 ;; Check to see if the version pinning has been removed.
15195 (substitute* "astroid/__pkginfo__.py"
15196 (("==1\\.4\\.\\*") ">=1.4.0"))
15197 #t))))
15198 (build-system python-build-system)
15199 (propagated-inputs
15200 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15201 ("python-six" ,python-six)
15202 ("python-wrapt" ,python-wrapt)))
15203 (native-inputs
15204 `(("python-dateutil" ,python-dateutil)
15205 ("python-pytest" ,python-pytest)
15206 ("python-pytest-runner" ,python-pytest-runner)))
15207 (home-page "https://github.com/PyCQA/astroid")
15208 (synopsis "Common base representation of python source code for pylint and
15209other projects")
15210 (description "@code{python-astroid} provides a common base representation
15211of python source code for projects such as pychecker, pyreverse, pylint, etc.
15212
15213It provides a compatible representation which comes from the _ast module. It
15214rebuilds the tree generated by the builtin _ast module by recursively walking
15215down the AST and building an extended ast. The new node classes have
15216additional methods and attributes for different usages. They include some
15217support for static inference and local name scopes. Furthermore, astroid
15218builds partial trees by inspecting living objects.")
15219 (license license:lgpl2.1+)
15220 (properties `((python2-variant . ,(delay python2-astroid))))))
15221
15222(define-public python2-astroid
15223 (let ((base (package-with-python2
15224 (strip-python2-variant python-astroid))))
15225 (package (inherit base)
15226 ;; Version 2.x removes python2 support.
15227 (version "1.6.5")
15228 (source
15229 (origin
15230 (method url-fetch)
15231 (uri (pypi-uri "astroid" version))
15232 (sha256
15233 (base32
15234 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15235 (arguments
15236 (substitute-keyword-arguments (package-arguments base)
15237 ((#:phases phases)
15238 `(modify-phases ,phases
15239 (add-after 'unpack 'remove-spurious-test
15240 (lambda _
15241 ;; https://github.com/PyCQA/astroid/issues/276
15242 (delete-file "astroid/tests/unittest_brain.py")
15243 #t))
15244 (replace 'check
15245 (lambda _
15246 (invoke"python" "-m" "unittest" "discover"
15247 "-p" "unittest*.py")))))))
15248 (native-inputs `())
15249 (propagated-inputs
15250 `(("python2-backports-functools-lru-cache"
15251 ,python2-backports-functools-lru-cache)
15252 ("python2-enum34" ,python2-enum34)
15253 ("python2-singledispatch" ,python2-singledispatch)
15254 ,@(alist-delete "python-typed-ast"
15255 (package-propagated-inputs base)))))))
15256
15257(define-public python-isbnlib
15258 (package
15259 (name "python-isbnlib")
15260 (version "3.10.3")
15261 (source
15262 (origin
15263 (method url-fetch)
15264 (uri (pypi-uri "isbnlib" version))
15265 (sha256
15266 (base32
15267 "07qhykv0x60d5rsx5pj6s4q15ri4znczscll3xmpf6gyclac1592"))))
15268 (build-system python-build-system)
15269 (arguments '(#:tests? #f)) ; No test
15270 (home-page "https://github.com/xlcnd/isbnlib")
15271 (synopsis "Python library to work with ISBN strings")
15272 (description "@code{python-isbnlib} is a (pure) python library that provides
15273several useful methods and functions to validate, clean, transform, hyphenate and
15274get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15275version, is suitable to be include as a dependency in other projects.")
15276 (license license:lgpl3+)))
15277
15278(define-public python-isort
15279 (package
15280 (name "python-isort")
15281 (version "4.3.4")
15282 (source
15283 (origin
15284 (method git-fetch)
15285 (uri (git-reference
15286 ;; Tests pass only from the Github sources
15287 (url "https://github.com/timothycrosley/isort")
15288 (commit version)))
15289 (file-name (git-file-name name version))
15290 (sha256
15291 (base32
15292 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15293 (build-system python-build-system)
15294 (native-inputs
15295 `(("python-mock" ,python-mock)
15296 ("python-pytest" ,python-pytest)))
15297 (home-page "https://github.com/timothycrosley/isort")
15298 (synopsis "Python utility/library to sort python imports")
15299 (description "@code{python-isort} is a python utility/library to sort
15300imports alphabetically, and automatically separated into sections. It
15301provides a command line utility, a python library and plugins for various
15302editors.")
15303 (license license:expat)
15304 (properties `((python2-variant . ,(delay python2-isort))))))
15305
15306(define-public python2-isort
15307 (let ((base (package-with-python2
15308 (strip-python2-variant python-isort))))
15309 (package (inherit base)
15310 (native-inputs
15311 `(("python2-futures" ,python2-futures)
15312 ,@(package-native-inputs base))))))
15313
15314(define-public python2-backports-functools-lru-cache
15315 (package
15316 (name "python2-backports-functools-lru-cache")
15317 (version "1.6.1")
15318 (source
15319 (origin
15320 (method url-fetch)
15321 ;; only the pypi tarballs contain the necessary metadata
15322 (uri (pypi-uri "backports.functools_lru_cache" version))
15323 (sha256
15324 (base32
15325 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15326 (build-system python-build-system)
15327 (native-inputs
15328 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15329 (arguments
15330 `(#:python ,python-2))
15331 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15332 (synopsis "Backport of functools.lru_cache from Python 3.3")
15333 (description "@code{python2-backports-functools-lru-cache} is a backport
15334of @code{functools.lru_cache} from python 3.3.")
15335 (license license:expat)))
15336
15337(define-public python-configparser
15338 (package
15339 (name "python-configparser")
15340 (version "4.0.2")
15341 (source
15342 (origin
15343 (method url-fetch)
15344 (uri (pypi-uri "configparser" version))
15345 (sha256
15346 (base32
15347 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15348 (native-inputs
15349 `(("python-setuptools_scm" ,python-setuptools-scm)))
15350 (build-system python-build-system)
15351 (home-page "https://github.com/jaraco/configparser/")
15352 (synopsis "Backport of configparser from python 3.5")
15353 (description "@code{python-configparser} is a backport of
15354@code{configparser} from Python 3.5 so that it can be used directly
15355in other versions.")
15356 (license license:expat)))
15357
15358(define-public python2-configparser
15359 (package-with-python2 python-configparser))
15360
15361(define-public python-mamba
15362 (package
15363 (name "python-mamba")
15364 (version "0.11.1")
15365 (source (origin
15366 (method url-fetch)
15367 (uri (pypi-uri "mamba" version))
15368 (sha256
15369 (base32
15370 "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr"))))
15371 (build-system python-build-system)
15372 (arguments `(#:tests? #f)) ; No test
15373 (propagated-inputs
15374 `(("python-clint" ,python-clint)
15375 ("python-coverage" ,python-coverage)))
15376 (home-page "https://nestorsalceda.com/mamba/")
15377 (synopsis "Test runner for Python")
15378 (description
15379 "Mamba is a Behaviour-Driven Development tool for Python developers.
15380Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15381 (license license:expat)))
15382
15383(define-public python-mando
15384 (package
15385 (name "python-mando")
15386 (version "0.6.4")
15387 (source (origin
15388 (method url-fetch)
15389 (uri (pypi-uri "mando" version))
15390 (sha256
15391 (base32
15392 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15393 (build-system python-build-system)
15394 (propagated-inputs
15395 `(("python-rst2ansi" ,python-rst2ansi)
15396 ("python-six" ,python-six)))
15397 (native-inputs
15398 `(("python-pytest" ,python-pytest)))
15399 (home-page "https://mando.readthedocs.org/")
15400 (synopsis
15401 "Wrapper around argparse, allowing creation of complete CLI applications")
15402 (description
15403 "This package is a wrapper around argparse, allowing you to write complete CLI
15404applications in seconds while maintaining all the flexibility.")
15405 (license license:expat)))
15406
15407(define-public python2-mando
15408 (package-with-python2 python-mando))
15409
15410(define-public python2-argparse
15411 (package
15412 (name "python2-argparse")
15413 (version "1.4.0")
15414 (source
15415 (origin
15416 (method url-fetch)
15417 (uri (pypi-uri "argparse" version))
15418 (sha256
15419 (base32
15420 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15421 (build-system python-build-system)
15422 (arguments
15423 `(#:python ,python-2))
15424 (home-page "https://github.com/ThomasWaldmann/argparse/")
15425 (synopsis "Python command-line parsing library")
15426 (description
15427 "This package is mostly for people who want to have @code{argparse} on
15428older Pythons because it was not part of the standard library back then.")
15429 (license license:psfl)))
15430
15431(define-public python-fudge
15432 (package
15433 (name "python-fudge")
15434 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15435 ;; package, which is currently the only use of this package.
15436 (version "0.9.6")
15437 (source
15438 (origin
15439 (method url-fetch)
15440 (uri (pypi-uri "fudge" version))
15441 (sha256
15442 (base32
15443 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15444 (build-system python-build-system)
15445 (arguments
15446 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15447 (home-page "https://github.com/fudge-py/fudge")
15448 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15449 (description
15450 "Fudge is a Python module for using fake objects (mocks and stubs) to
15451test real ones.
15452
15453In readable Python code, you declare the methods available on your fake object
15454and how they should be called. Then you inject that into your application and
15455start testing. This declarative approach means you don’t have to record and
15456playback actions and you don’t have to inspect your fakes after running code.
15457If the fake object was used incorrectly then you’ll see an informative
15458exception message with a traceback that points to the culprit.")
15459 (license license:expat)))
15460
15461(define-public python2-fudge
15462 (package-with-python2 python-fudge))
15463
15464(define-public python-mwclient
15465 (package
15466 (name "python-mwclient")
15467 (version "0.10.1")
15468 (source
15469 (origin
15470 (method git-fetch)
15471 ;; The PyPI version wouldn't contain tests.
15472 (uri (git-reference
15473 (url "https://github.com/mwclient/mwclient")
15474 (commit (string-append "v" version))))
15475 (file-name (git-file-name name version))
15476 (sha256
15477 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15478 (build-system python-build-system)
15479 (propagated-inputs
15480 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15481 ("python-six" ,python-six)))
15482 (native-inputs
15483 `(("python-mock" ,python-mock)
15484 ("python-pytest" ,python-pytest)
15485 ("python-pytest-cov" ,python-pytest-cov)
15486 ("python-pytest-runner" ,python-pytest-runner)
15487 ("python-responses" ,python-responses)))
15488 (home-page "https://github.com/btongminh/mwclient")
15489 (synopsis "MediaWiki API client")
15490 (description "This package provides a MediaWiki API client.")
15491 (license license:expat)))
15492
15493(define-public python2-mwclient
15494 (package-with-python2 python-mwclient))
15495
15496(define-public python-utils
15497 (package
15498 (name "python-utils")
15499 (version "2.4.0")
15500 (source (origin
15501 (method url-fetch)
15502 (uri (pypi-uri "python-utils" version))
15503 (sha256
15504 (base32
15505 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15506 (build-system python-build-system)
15507 (arguments
15508 `(#:phases
15509 (modify-phases %standard-phases
15510 (replace 'check
15511 (lambda* (#:key inputs outputs #:allow-other-keys)
15512 (add-installed-pythonpath inputs outputs)
15513 (delete-file "pytest.ini")
15514 (invoke "pytest" "-vv"))))))
15515 (native-inputs
15516 `(("pytest-runner" ,python-pytest-runner)
15517 ("pytest" ,python-pytest)
15518 ("six" ,python-six)))
15519 (home-page "https://github.com/WoLpH/python-utils")
15520 (synopsis "Convenient utilities not included with the standard Python install")
15521 (description
15522 "Python Utils is a collection of small Python functions and classes which
15523make common patterns shorter and easier.")
15524 (license license:bsd-2)))
15525
15526(define-public python2-utils
15527 (package-with-python2 python-utils))
15528
15529(define-public python-diff-match-patch
15530 (package
15531 (name "python-diff-match-patch")
15532 (version "20121119")
15533 (source
15534 (origin
15535 (method url-fetch)
15536 (uri (pypi-uri "diff-match-patch" version))
15537 (sha256
15538 (base32
15539 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15540 (build-system python-build-system)
15541 (home-page "https://code.google.com/p/google-diff-match-patch")
15542 (synopsis "Synchronize plain text")
15543 (description "Diff Match and Patch libraries offer robust algorithms to
15544perform the operations required for synchronizing plain text.")
15545 (license license:asl2.0)))
15546
15547(define-public python2-diff-match-patch
15548 (package-with-python2 python-diff-match-patch))
15549
15550(define-public python-dirsync
15551 (package
15552 (name "python-dirsync")
15553 (version "2.2.5")
15554 (source
15555 (origin
15556 (method url-fetch)
15557 (uri (pypi-uri "dirsync" version))
15558 (sha256
15559 (base32
15560 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15561 (build-system python-build-system)
15562 (propagated-inputs
15563 `(("six" ,python-six)))
15564 (home-page "https://github.com/tkhyn/dirsync")
15565 (synopsis "Advanced directory tree synchronisation tool")
15566 (description "Advanced directory tree synchronisation tool.")
15567 (license license:expat)))
15568
15569(define-public python2-dirsync
15570 (package-with-python2 python-dirsync))
15571
15572(define-public python-levenshtein
15573 (package
15574 (name "python-levenshtein")
15575 (version "0.12.0")
15576 (source
15577 (origin
15578 (method url-fetch)
15579 (uri (pypi-uri "python-Levenshtein" version))
15580 (sha256
15581 (base32
15582 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15583 (build-system python-build-system)
15584 (home-page "https://github.com/ztane/python-Levenshtein")
15585 (synopsis "Fast computation of Levenshtein distance and string similarity")
15586 (description
15587 "The Levenshtein Python C extension module contains functions for fast computation of
15588@enumerate
15589@item Levenshtein (edit) distance, and edit operations
15590@item string similarity
15591@item approximate median strings, and generally string averaging
15592@item string sequence and set similarity
15593@end enumerate
15594It supports both normal and Unicode strings.")
15595 (license license:gpl2+)))
15596
15597(define-public python2-levenshtein
15598 (package-with-python2 python-levenshtein))
15599
15600(define-public python-scandir
15601 (package
15602 (name "python-scandir")
15603 (version "1.10.0")
15604 (source
15605 (origin
15606 (method url-fetch)
15607 (uri (pypi-uri "scandir" version))
15608 (sha256
15609 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15610 (build-system python-build-system)
15611 (arguments
15612 `(#:phases (modify-phases %standard-phases
15613 (replace 'check
15614 (lambda _
15615 (invoke "python" "test/run_tests.py"))))))
15616 (home-page "https://github.com/benhoyt/scandir")
15617 (synopsis "Directory iteration function")
15618 (description
15619 "Directory iteration function like os.listdir(), except that instead of
15620returning a list of bare filenames, it yields DirEntry objects that include
15621file type and stat information along with the name. Using scandir() increases
15622the speed of os.walk() by 2-20 times (depending on the platform and file
15623system) by avoiding unnecessary calls to os.stat() in most cases.
15624
15625This package is part of the Python standard library since version 3.5.")
15626 (license license:bsd-3)))
15627
15628(define-public python2-scandir
15629 (package-with-python2 python-scandir))
15630
15631(define-public python2-stemming
15632 (package
15633 (name "python2-stemming")
15634 (version "1.0.1")
15635 (source
15636 (origin
15637 (method url-fetch)
15638 (uri (pypi-uri "stemming" version))
15639 (sha256
15640 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15641 (build-system python-build-system)
15642 (arguments
15643 `(#:python ,python-2))
15644 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15645 (synopsis "Python implementations of various stemming algorithms")
15646 (description
15647 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15648stemming algorithms for English. These implementations are straightforward and
15649efficient, unlike some Python versions of the same algorithms available on the
15650Web. This package is an extraction of the stemming code included in the Whoosh
15651search engine.")
15652 (license license:public-domain)))
15653
15654(define-public python-factory-boy
15655 (package
15656 (name "python-factory-boy")
15657 (version "2.8.1")
15658 (source
15659 (origin
15660 (method url-fetch)
15661 (uri (pypi-uri "factory_boy" version))
15662 (sha256
15663 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15664 (build-system python-build-system)
15665 (arguments
15666 ;; Tests are not included in the tarball.
15667 `(#:tests? #f))
15668 (propagated-inputs
15669 `(("faker" ,python-faker)))
15670 (home-page "https://github.com/benhoyt/scandir")
15671 (synopsis "Versatile test fixtures replacement")
15672 (description
15673 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15674
15675As a fixtures replacement tool, it aims to replace static, hard to maintain
15676fixtures with easy-to-use factories for complex object.
15677
15678Instead of building an exhaustive test setup with every possible combination
15679of corner cases, factory_boy allows you to use objects customized for the
15680current test, while only declaring the test-specific fields")
15681 (license license:expat)))
15682
15683(define-public python2-factory-boy
15684 (package-with-python2 python-factory-boy))
15685
15686(define-public python-translate-toolkit
15687 (package
15688 (name "python-translate-toolkit")
15689 (version "2.1.0")
15690 (source
15691 (origin
15692 (method url-fetch)
15693 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15694 (sha256
15695 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15696 (build-system python-build-system)
15697 (native-inputs
15698 `(("python-pytest" ,python-pytest)
15699 ("python-sphinx" ,python-sphinx)))
15700 (propagated-inputs
15701 `(("python-babel" ,python-babel)
15702 ("python-beautifulsoup4" ,python-beautifulsoup4)
15703 ("python-chardet" ,python-chardet)
15704 ("python-diff-match-patch" ,python-diff-match-patch)
15705 ("python-levenshtein" ,python-levenshtein)
15706 ("python-lxml" ,python-lxml)
15707 ("python-six" ,python-six)
15708 ("python-vobject" ,python-vobject)
15709 ("python-pyyaml" ,python-pyyaml)))
15710 (arguments
15711 ;; TODO: tests are not run, because they end with
15712 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15713 ;; 'parse_funcs'
15714 ;; during test setup.
15715 `(#:tests? #f))
15716 (home-page "https://toolkit.translatehouse.org")
15717 (synopsis "Tools and API for translation and localization engineering")
15718 (description
15719 "Tools and API for translation and localization engineering. It contains
15720several utilities, as well as an API for building localization tools.")
15721 (license license:gpl2+)))
15722
15723(define-public python2-translate-toolkit
15724 (package-with-python2 python-translate-toolkit))
15725
15726(define-public python-packaging
15727 (package
15728 (name "python-packaging")
15729 (version "20.0")
15730 (source
15731 (origin
15732 (method url-fetch)
15733 (uri (pypi-uri "packaging" version))
15734 ;; XXX: The URL in the patch file is wrong, it should be
15735 ;; <https://github.com/pypa/packaging/pull/256>.
15736 (patches (search-patches "python-packaging-test-arch.patch"))
15737 (sha256
15738 (base32
15739 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15740 (build-system python-build-system)
15741 (arguments
15742 `(#:phases (modify-phases %standard-phases
15743 (replace 'check
15744 (lambda* (#:key tests? #:allow-other-keys)
15745 (if tests?
15746 (invoke "py.test" "-vv")
15747 (format #t "test suite not run~%"))
15748 #t)))))
15749 (native-inputs
15750 `(("python-pretend" ,python-pretend)
15751 ("python-pytest" ,python-pytest)))
15752 (propagated-inputs
15753 `(("python-pyparsing" ,python-pyparsing)
15754 ("python-six" ,python-six)))
15755 (home-page "https://github.com/pypa/packaging")
15756 (synopsis "Core utilities for Python packages")
15757 (description "Packaging is a Python module for dealing with Python packages.
15758It offers an interface for working with package versions, names, and dependency
15759information.")
15760 ;; From 'LICENSE': This software is made available under the terms of
15761 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15762 ;; Contributions to this software is made under the terms of *both* these
15763 ;; licenses.
15764 (license (list license:asl2.0 license:bsd-2))))
15765
15766(define-public python2-packaging
15767 (package-with-python2 python-packaging))
15768
15769;; Variants with minimal dependencies, for bootstrapping Pytest.
15770(define-public python-packaging-bootstrap
15771 (hidden-package
15772 (package/inherit
15773 python-packaging
15774 (name "python-packaging-bootstrap")
15775 (native-inputs '())
15776 (propagated-inputs
15777 `(("python-pyparsing" ,python-pyparsing)))
15778 (arguments '(#:tests? #f)))))
15779
15780(define-public python2-packaging-bootstrap
15781 (hidden-package
15782 (package/inherit
15783 python2-packaging
15784 (name "python2-packaging-bootstrap")
15785 (native-inputs '())
15786 (propagated-inputs
15787 `(("python-pyparsing" ,python2-pyparsing)))
15788 (arguments
15789 `(#:tests? #f
15790 ,@(package-arguments python2-packaging))))))
15791
15792(define-public python-relatorio
15793 (package
15794 (name "python-relatorio")
15795 (version "0.8.0")
15796 (source
15797 (origin
15798 (method url-fetch)
15799 (uri (pypi-uri "relatorio" version))
15800 (sha256
15801 (base32
15802 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15803 (build-system python-build-system)
15804 (propagated-inputs
15805 `(("python-lxml" ,python-lxml)
15806 ("python-genshi" ,python-genshi)))
15807 (native-inputs
15808 `(("python-magic" ,python-magic)))
15809 (home-page "https://relatorio.tryton.org/")
15810 (synopsis "Templating library able to output ODT and PDF files")
15811 (description "Relatorio is a templating library which provides a way to
15812easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15813for more filetypes can be easily added by creating plugins for them.")
15814 (license license:gpl3+)))
15815
15816(define-public python2-relatorio
15817 (package-with-python2 python-relatorio))
15818
15819(define-public python-radon
15820 (package
15821 (name "python-radon")
15822 (version "4.1.0")
15823 (source
15824 (origin
15825 (method url-fetch)
15826 (uri (pypi-uri "radon" version))
15827 (sha256
15828 (base32
15829 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15830 (build-system python-build-system)
15831 (arguments
15832 `(#:phases (modify-phases %standard-phases
15833 (replace 'check
15834 (lambda _
15835 (invoke "python" "radon/tests/run.py"))))))
15836 (propagated-inputs
15837 `(("python-colorama" ,python-colorama)
15838 ("python-flake8-polyfill" ,python-flake8-polyfill)
15839 ("python-mando" ,python-mando)))
15840 (native-inputs
15841 `(("python-pytest" ,python-pytest)
15842 ("python-pytest-mock" ,python-pytest-mock)))
15843 (home-page "https://radon.readthedocs.org/")
15844 (synopsis "Code Metrics in Python")
15845 (description "Radon is a Python tool which computes various code metrics.
15846Supported metrics are:
15847@itemize @bullet
15848@item raw metrics: SLOC, comment lines, blank lines, &c.
15849@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15850@item Halstead metrics (all of them)
15851@item the Maintainability Index (a Visual Studio metric)
15852@end itemize")
15853 (properties `((python2-variant . ,(delay python2-radon))))
15854 (license license:expat)))
15855
15856(define-public python2-radon
15857 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
15858 (package
15859 (inherit base)
15860 (propagated-inputs
15861 `(("python-configparser" ,python2-configparser)
15862 ("python-future" ,python2-future)
15863 ,@(package-propagated-inputs base))))))
15864
15865(define-public python-sure
15866 (package
15867 (name "python-sure")
15868 (version "1.4.11")
15869 (source
15870 (origin
15871 (method url-fetch)
15872 (uri (pypi-uri "sure" version))
15873 (sha256
15874 (base32
15875 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
15876 (build-system python-build-system)
15877 (propagated-inputs
15878 `(("python-mock" ,python-mock)
15879 ("python-six" ,python-six)))
15880 (native-inputs
15881 `(("python-nose" ,python-nose)))
15882 (home-page "https://github.com/gabrielfalcao/sure")
15883 (synopsis "Automated testing library in python for python")
15884 (description
15885 "Sure is a python library that leverages a DSL for writing assertions.
15886Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15887 (license license:gpl3+)))
15888
15889(define-public python2-sure
15890 (package-with-python2 python-sure))
15891
15892(define-public python2-couleur
15893 ;; This package does not seem to support python3 at all, hence,
15894 ;; only the python2 variant definition is provided.
15895 (package
15896 (name "python2-couleur")
15897 (version "0.6.2")
15898 (source
15899 (origin
15900 (method url-fetch)
15901 (uri (pypi-uri "couleur" version))
15902 (sha256
15903 (base32
15904 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15905 (build-system python-build-system)
15906 (arguments
15907 `(#:python ,python-2))
15908 (home-page "https://github.com/gabrielfalcao/couleur")
15909 (synopsis
15910 "ANSI terminal tool for python, colored shell and other handy fancy features")
15911 (description
15912 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15913terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15914 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15915 ;; https://github.com/gabrielfalcao/couleur/issues/11
15916 (license license:lgpl3+)))
15917
15918(define-public python-misaka
15919 (package
15920 (name "python-misaka")
15921 (version "2.1.1")
15922 (source
15923 (origin
15924 (method url-fetch)
15925 (uri (pypi-uri "misaka" version))
15926 (sha256
15927 (base32
15928 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
15929 (build-system python-build-system)
15930 (arguments
15931 `(;; Line 37 of setup.py calls self.run_command('develop')
15932 ;; in the 'check' phase. This command seems to be trying
15933 ;; to write to
15934 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15935 ;; for which it does not have the permission to write.
15936 #:tests? #f))
15937 (propagated-inputs
15938 `(("python-cffi" ,python-cffi)))
15939 (home-page "https://github.com/FSX/misaka")
15940 (synopsis "Python binding for Hoedown")
15941 (description
15942 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15943library written in C. It features a fast HTML renderer and functionality to make custom
15944renderers (e.g. man pages or LaTeX).")
15945 (license license:expat)))
15946
15947(define-public python2-misaka
15948 (package-with-python2 python-misaka))
15949
15950(define-public python2-steadymark
15951 ;; This is forced into being a python2 only variant
15952 ;; due to its dependence on couleur that has no support
15953 ;; for python3
15954 (package
15955 (name "python2-steadymark")
15956 (version "0.7.3")
15957 (source
15958 (origin
15959 (method url-fetch)
15960 (uri (pypi-uri "steadymark" version))
15961 (sha256
15962 (base32
15963 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15964 (build-system python-build-system)
15965 (native-inputs
15966 `(("python-couleur" ,python2-couleur)
15967 ("python-sure" ,python2-sure)
15968 ("python-misaka" ,python2-misaka)))
15969 (arguments
15970 `(#:python ,python-2
15971 #:phases
15972 (modify-phases %standard-phases
15973 (add-before 'build 'patch-setup-py
15974 (lambda _
15975 ;; Update requirements from dependency==version
15976 ;; to dependency>=version
15977 (substitute* "setup.py"
15978 (("==") ">="))
15979 #t)))))
15980 (home-page "https://github.com/gabrielfalcao/steadymark")
15981 (synopsis "Markdown-based test runner for python")
15982 (description
15983 "@code{Steadymark} allows documentation to be written in github-flavoured
15984markdown. The documentation may contain snippets of code surrounded by python
15985code blocks and @code{Steadymark} will find these snippets and run them, making
15986sure that there are no old malfunctional examples in the documentation examples.")
15987 (license license:expat)))
15988
15989(define-public python-jsonpointer
15990 (package
15991 (name "python-jsonpointer")
15992 (version "1.10")
15993 (source
15994 (origin
15995 (method url-fetch)
15996 (uri (pypi-uri "jsonpointer" version))
15997 (sha256
15998 (base32
15999 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16000 (build-system python-build-system)
16001 (home-page "https://github.com/stefankoegl/python-json-pointer")
16002 (synopsis "Identify specific nodes in a JSON document")
16003 (description "@code{jsonpointer} allows you to access specific nodes
16004by path in a JSON document (see RFC 6901).")
16005 (license license:bsd-3)))
16006
16007(define-public python2-jsonpointer
16008 (package-with-python2 python-jsonpointer))
16009
16010(define-public python-jsonpatch
16011 (package
16012 (name "python-jsonpatch")
16013 (version "1.16")
16014 (source
16015 (origin
16016 (method git-fetch)
16017 ;; pypi version lacks tests.js
16018 (uri (git-reference
16019 (url "https://github.com/stefankoegl/python-json-patch")
16020 (commit (string-append "v" version))))
16021 (file-name (git-file-name name version))
16022 (sha256
16023 (base32
16024 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16025 (build-system python-build-system)
16026 (native-inputs
16027 `(("python-jsonpointer" ,python-jsonpointer)))
16028 (home-page "https://github.com/stefankoegl/python-json-patch")
16029 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16030 (description "@code{jsonpatch} is a library and program that allows
16031applying JSON Patches according to RFC 6902.")
16032 (license license:bsd-3)))
16033
16034(define-public python2-jsonpatch
16035 (package-with-python2 python-jsonpatch))
16036
16037(define-public python-jsonpatch-0.4
16038 (package (inherit python-jsonpatch)
16039 (name "python-jsonpatch")
16040 (version "0.4")
16041 (source
16042 (origin
16043 (method git-fetch)
16044 (uri (git-reference
16045 (url "https://github.com/stefankoegl/python-json-patch")
16046 (commit (string-append "v" version))))
16047 (file-name (git-file-name name version))
16048 (sha256
16049 (base32
16050 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16051
16052(define-public python2-jsonpatch-0.4
16053 (package-with-python2 python-jsonpatch-0.4))
16054
16055(define-public python-rfc3986
16056 (package
16057 (name "python-rfc3986")
16058 (version "1.4.0")
16059 (source (origin
16060 (method url-fetch)
16061 (uri (pypi-uri "rfc3986" version))
16062 (sha256
16063 (base32
16064 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16065 (build-system python-build-system)
16066 (arguments
16067 `(#:modules ((guix build utils)
16068 (guix build python-build-system)
16069 (ice-9 ftw)
16070 (srfi srfi-1)
16071 (srfi srfi-26))
16072 #:phases
16073 (modify-phases %standard-phases
16074 (replace 'check
16075 (lambda _
16076 (let ((cwd (getcwd)))
16077 (setenv "PYTHONPATH"
16078 (string-append cwd "/build/"
16079 (find (cut string-prefix? "lib" <>)
16080 (scandir (string-append cwd "/build")))
16081 ":"
16082 (getenv "PYTHONPATH")))
16083 (invoke "pytest" "-v")))))))
16084 (native-inputs
16085 `(("python-pytest" ,python-pytest)))
16086 (home-page "https://rfc3986.readthedocs.io/")
16087 (synopsis "Parse and validate URI references")
16088 (description
16089 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16090validation and authority parsing. This module also supports RFC@tie{}6874
16091which adds support for zone identifiers to IPv6 addresses.")
16092 (license license:asl2.0)))
16093
16094(define-public python2-rfc3986
16095 (package-with-python2 python-rfc3986))
16096
16097(define-public python-rfc3987
16098 (package
16099 (name "python-rfc3987")
16100 (version "1.3.7")
16101 (source
16102 (origin
16103 (method url-fetch)
16104 (uri (pypi-uri "rfc3987" version))
16105 (sha256
16106 (base32
16107 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16108 (build-system python-build-system)
16109 (home-page "https://pypi.org/project/rfc3987/")
16110 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16111 (description "@code{rfc3987} provides routines for parsing and
16112validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16113 (license license:gpl3+)))
16114
16115(define-public python2-rfc3987
16116 (package-with-python2 python-rfc3987))
16117
16118;; The latest commit contains fixes for building with both python3 and python2.
16119(define-public python-rfc6555
16120 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16121 (revision "1"))
16122 (package
16123 (name "python-rfc6555")
16124 (version (git-version "0.0.0" revision commit))
16125 (source (origin
16126 (method git-fetch)
16127 (uri (git-reference
16128 (url "https://github.com/sethmlarson/rfc6555")
16129 (commit commit)))
16130 (file-name (git-file-name name version))
16131 (sha256
16132 (base32
16133 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16134 (build-system python-build-system)
16135 (arguments
16136 '(#:phases
16137 (modify-phases %standard-phases
16138 (replace 'check
16139 (lambda* (#:key tests? #:allow-other-keys)
16140 (if tests?
16141 ;; Other tests require network access.
16142 (invoke "pytest" "tests/test_ipv6.py")
16143 #t))))))
16144 (native-inputs
16145 `(("python-pytest" ,python-pytest)))
16146 (home-page "https://pypi.org/project/rfc6555/")
16147 (synopsis "Python implementation of RFC 6555")
16148 (description
16149 "Python implementation of the Happy Eyeballs Algorithm described in RFC
161506555. Provided with a single file and dead-simple API to allow easy vendoring
16151and integration into other projects.")
16152 (properties `((python2-variant . ,(delay python2-rfc6555))))
16153 (license license:asl2.0))))
16154
16155(define-public python2-rfc6555
16156 (let ((base (package-with-python2
16157 (strip-python2-variant python-rfc6555))))
16158 (package
16159 (inherit base)
16160 (propagated-inputs
16161 `(("python2-selectors2" ,python2-selectors2))))))
16162
16163(define-public python-validators
16164 (package
16165 (name "python-validators")
16166 (version "0.14.2")
16167 (source (origin
16168 (method url-fetch)
16169 (uri (pypi-uri "validators" version))
16170 (sha256
16171 (base32
16172 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16173 (build-system python-build-system)
16174 (arguments
16175 '(#:phases (modify-phases %standard-phases
16176 (replace 'check
16177 (lambda _
16178 (invoke "pytest" "-vv"))))))
16179 (propagated-inputs
16180 `(("python-decorator" ,python-decorator)
16181 ("python-six" ,python-six)))
16182 (native-inputs
16183 `(("python-flake8" ,python-flake8)
16184 ("python-isort" ,python-isort)
16185 ("python-pytest" ,python-pytest)))
16186 (home-page "https://github.com/kvesteri/validators")
16187 (synopsis "Data validation library")
16188 (description
16189 "This package contains validators for different things such as email
16190addresses, IP addresses, URLs, hashes and more. It has been designed to
16191be easy to use and not require defining a schema or form just to validate
16192some input.")
16193 (license license:expat)))
16194
16195(define-public python2-validators
16196 (package-with-python2 python-validators))
16197
16198(define-public python-validate-email
16199 (package
16200 (name "python-validate-email")
16201 (version "1.3")
16202 (source
16203 (origin
16204 (method url-fetch)
16205 (uri (pypi-uri "validate_email" version))
16206 (sha256
16207 (base32
16208 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16209 (build-system python-build-system)
16210 (home-page "https://github.com/syrusakbary/validate_email")
16211 (synopsis "Verifies if an email address is valid and really exists")
16212 (description "@code{validate_email} can be used to verify if an email
16213address is valid and really exists.")
16214 (license license:lgpl3+)))
16215
16216(define-public python2-validate-email
16217 (package-with-python2 python-validate-email))
16218
16219(define-public python-flex
16220 (package
16221 (name "python-flex")
16222 (version "6.10.0")
16223 (source
16224 (origin
16225 (method url-fetch)
16226 (uri (pypi-uri "flex" version))
16227 (sha256
16228 (base32
16229 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16230 (build-system python-build-system)
16231 (propagated-inputs
16232 `(("python-click" ,python-click)
16233 ("python-iso8601" ,python-iso8601)
16234 ("python-jsonpointer" ,python-jsonpointer)
16235 ("python-pyyaml" ,python-pyyaml)
16236 ("python-requests" ,python-requests)
16237 ("python-rfc3987" ,python-rfc3987)
16238 ("python-six" ,python-six)
16239 ("python-validate-email" ,python-validate-email)))
16240 (home-page "https://github.com/pipermerriam/flex")
16241 (synopsis "Validates Swagger schemata")
16242 (description "@code{flex} can be used to validate Swagger schemata.")
16243 (license license:bsd-3)))
16244
16245(define-public python2-flex
16246 (package-with-python2 python-flex))
16247
16248(define-public python-marshmallow
16249 (package
16250 (name "python-marshmallow")
16251 (version "3.0.0b14")
16252 (source
16253 (origin
16254 (method url-fetch)
16255 (uri (pypi-uri "marshmallow" version))
16256 (sha256
16257 (base32
16258 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
16259 (build-system python-build-system)
16260 (propagated-inputs
16261 `(("python-dateutil" ,python-dateutil)
16262 ("python-simplejson" ,python-simplejson)))
16263 (native-inputs
16264 `(("python-pytest" ,python-pytest)
16265 ("python-pytz" ,python-pytz)))
16266 (home-page "https://github.com/marshmallow-code/marshmallow")
16267 (synopsis "Convert complex datatypes to and from native
16268Python datatypes.")
16269 (description "@code{marshmallow} provides a library for converting
16270complex datatypes to and from native Python datatypes.")
16271 (license license:expat)))
16272
16273(define-public python2-marshmallow
16274 (package-with-python2 python-marshmallow))
16275
16276(define-public python-apispec
16277 (package
16278 (name "python-apispec")
16279 (version "0.25.3")
16280 (source
16281 (origin
16282 (method url-fetch)
16283 (uri (pypi-uri "apispec" version))
16284 (sha256
16285 (base32
16286 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16287 (build-system python-build-system)
16288 (propagated-inputs
16289 `(("python-pyyaml" ,python-pyyaml)))
16290 (native-inputs
16291 `(("python-pytest" ,python-pytest)
16292 ("python-flask" ,python-flask)
16293 ("python-marshmallow" ,python-marshmallow)
16294 ("python-tornado" ,python-tornado)
16295 ("python-bottle" ,python-bottle)
16296 ("python-mock" ,python-mock)))
16297 (home-page "https://github.com/marshmallow-code/apispec")
16298 (synopsis "Swagger 2.0 API specification generator")
16299 (description "@code{python-apispec} is a pluggable API specification
16300generator. Currently supports the OpenAPI specification (f.k.a.
16301Swagger 2.0).")
16302 (license license:expat)))
16303
16304(define-public python2-apispec
16305 (package-with-python2 python-apispec))
16306
16307(define-public python-flasgger
16308 (package
16309 (name "python-flasgger")
16310 (version "0.6.3")
16311 (source
16312 (origin
16313 (method git-fetch)
16314 (uri (git-reference
16315 (url "https://github.com/rochacbruno/flasgger")
16316 (commit version)))
16317 (file-name (git-file-name name version))
16318 (sha256
16319 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16320 (build-system python-build-system)
16321 (arguments
16322 `(#:phases
16323 (modify-phases %standard-phases
16324 (replace 'check
16325 (lambda* (#:key inputs outputs #:allow-other-keys)
16326 (substitute* "Makefile"
16327 (("flake8 flasgger --ignore=F403")
16328 "flake8 flasgger --ignore=E731,F403"))
16329 (setenv "PYTHONPATH" (string-append (getcwd)
16330 ":"
16331 (getenv "PYTHONPATH")))
16332 (invoke "py.test"))))))
16333 (propagated-inputs
16334 `(("python-flask" ,python-flask)
16335 ("python-pyyaml" ,python-pyyaml)
16336 ("python-jsonschema" ,python-jsonschema)
16337 ("python-mistune" ,python-mistune)
16338 ("python-six" ,python-six)))
16339 (native-inputs
16340 `(("python-decorator" ,python-decorator)
16341 ("python-flake8" ,python-flake8)
16342 ("python-flask-restful" ,python-flask-restful)
16343 ("python-flex" ,python-flex)
16344 ("python-pytest" ,python-pytest)
16345 ("python-pytest-cov" ,python-pytest-cov)
16346 ("python-marshmallow" ,python-marshmallow)
16347 ("python-apispec" ,python-apispec)))
16348 (home-page "https://github.com/rochacbruno/flasgger/")
16349 (synopsis "Extract Swagger specs from your Flask project")
16350 (description "@code{python-flasgger} allows extracting Swagger specs
16351from your Flask project. It is a fork of Flask-Swagger.")
16352 (license license:expat)))
16353
16354(define-public python2-flasgger
16355 (package-with-python2 python-flasgger))
16356
16357(define-public python-swagger-spec-validator
16358 (package
16359 (name "python-swagger-spec-validator")
16360 (version "2.4.3")
16361 (source
16362 (origin
16363 (method url-fetch)
16364 (uri (pypi-uri "swagger-spec-validator" version))
16365 (sha256
16366 (base32
16367 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16368 (build-system python-build-system)
16369 (propagated-inputs
16370 `(("python-jsonschema" ,python-jsonschema)
16371 ("python-pyyaml" ,python-pyyaml)
16372 ("python-six" ,python-six)))
16373 (home-page
16374 "https://github.com/Yelp/swagger_spec_validator")
16375 (synopsis "Validation of Swagger specifications")
16376 (description "@code{swagger_spec_validator} provides a library for
16377validating Swagger API specifications.")
16378 (license license:asl2.0)))
16379
16380(define-public python2-swagger-spec-validator
16381 (package-with-python2 python-swagger-spec-validator))
16382
16383(define-public python-apache-libcloud
16384 (package
16385 (name "python-apache-libcloud")
16386 (version "3.1.0")
16387 (source
16388 (origin
16389 (method url-fetch)
16390 (uri (pypi-uri "apache-libcloud" version))
16391 (sha256
16392 (base32
16393 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16394 (build-system python-build-system)
16395 (arguments
16396 `(#:phases
16397 (modify-phases %standard-phases
16398 (add-after 'unpack 'patch-ssh
16399 (lambda* (#:key inputs #:allow-other-keys)
16400 (substitute* "libcloud/compute/ssh.py"
16401 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16402 "/bin/ssh" "'")))
16403 #t))
16404 (add-after 'unpack 'patch-tests
16405 (lambda _
16406 (substitute* "libcloud/test/compute/test_ssh_client.py"
16407 (("class ShellOutSSHClientTests")
16408 "@unittest.skip(\"Guix container doesn't have ssh service\")
16409class ShellOutSSHClientTests"))
16410 #t))
16411 (add-before 'check 'copy-secret
16412 (lambda _
16413 (copy-file "libcloud/test/secrets.py-dist"
16414 "libcloud/test/secrets.py")
16415 #t)))))
16416 (inputs
16417 `(("openssh" ,openssh)))
16418 (propagated-inputs
16419 `(("python-paramiko" ,python-paramiko)
16420 ("python-requests" ,python-requests)))
16421 (native-inputs
16422 `(("python-lockfile" ,python-lockfile)
16423 ("python-mock" ,python-mock)
16424 ("python-pytest" ,python-pytest)
16425 ("python-pytest-runner" ,python-pytest-runner)
16426 ("python-requests-mock" ,python-requests-mock)))
16427 (home-page "https://libcloud.apache.org/")
16428 (synopsis "Unified Cloud API")
16429 (description "@code{libcloud} is a Python library for interacting with
16430many of the popular cloud service providers using a unified API.")
16431 (license license:asl2.0)))
16432
16433(define-public python2-apache-libcloud
16434 (package-with-python2 python-apache-libcloud))
16435
16436(define-public python-smmap
16437 (package
16438 (name "python-smmap")
16439 (version "3.0.1")
16440 (source
16441 (origin
16442 (method url-fetch)
16443 (uri (pypi-uri "smmap" version))
16444 (sha256
16445 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16446 (build-system python-build-system)
16447 (native-inputs
16448 `(("python-nosexcover" ,python-nosexcover)))
16449 (home-page "https://github.com/Byron/smmap")
16450 (synopsis "Python sliding window memory map manager")
16451 (description "@code{smmap} is a pure Python implementation of a sliding
16452window memory map manager.")
16453 (license license:bsd-3)))
16454
16455(define-public python-smmap2
16456 (deprecated-package "python-smmap2" python-smmap))
16457
16458(define-public python2-smmap
16459 (package-with-python2 python-smmap))
16460
16461(define-public python2-smmap2
16462 (deprecated-package "python2-smmap2" python2-smmap))
16463
16464(define-public python-regex
16465 (package
16466 (name "python-regex")
16467 (version "2020.6.8")
16468 (source (origin
16469 (method url-fetch)
16470 (uri (pypi-uri "regex" version))
16471 (sha256
16472 (base32
16473 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16474 (build-system python-build-system)
16475 (arguments
16476 '(#:phases
16477 (modify-phases %standard-phases
16478 (replace 'check
16479 (lambda* (#:key inputs outputs #:allow-other-keys)
16480 (add-installed-pythonpath inputs outputs)
16481 (invoke "python" "-c"
16482 "from regex.test_regex import test_main; test_main()"))))))
16483 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16484 (synopsis "Alternative regular expression module")
16485 (description "This regular expression implementation is backwards-
16486compatible with the standard @code{re} module, but offers additional
16487functionality like full case-folding for case-insensitive matches in Unicode.")
16488 (license license:psfl)))
16489
16490(define-public python2-regex
16491 (package-with-python2 python-regex))
16492
16493(define-public python-pyopengl
16494 (package
16495 (name "python-pyopengl")
16496 (version "3.1.5")
16497 (source
16498 (origin
16499 (method url-fetch)
16500 (uri (pypi-uri "PyOpenGL" version))
16501 (sha256
16502 (base32
16503 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16504 (build-system python-build-system)
16505 (inputs
16506 `(("mesa" ,mesa)
16507 ("freeglut" ,freeglut)
16508 ("glu" ,glu)))
16509 (arguments
16510 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16511 ;attribute 'OSMesa'
16512 #:phases
16513 (modify-phases %standard-phases
16514 (add-before 'build 'fix-paths
16515 (lambda* (#:key inputs outputs #:allow-other-keys)
16516 (substitute* '("OpenGL/platform/ctypesloader.py")
16517 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16518 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16519 (("'GL'")
16520 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16521 (("'GLU'")
16522 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16523 (("'glut',")
16524 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16525 (("'GLESv1_CM'")
16526 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16527 (("'GLESv2'")
16528 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16529 ;; Not providing libgle. It seems to be very old.
16530 #t)))))
16531 (home-page "http://pyopengl.sourceforge.net")
16532 (synopsis "Standard OpenGL bindings for Python")
16533 (description
16534 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16535related APIs. The binding is created using the standard @code{ctypes}
16536library.")
16537 (license license:bsd-3)))
16538
16539(define-public python-pyopengl-accelerate
16540 (package
16541 (inherit python-pyopengl)
16542 (name "python-pyopengl-accelerate")
16543 (version "3.1.5")
16544 (source
16545 (origin
16546 (method url-fetch)
16547 (uri (pypi-uri "PyOpenGL-accelerate" version))
16548 (sha256
16549 (base32
16550 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16551 (inputs
16552 `(("mesa" ,mesa)
16553 ("python-numpy" ,python-numpy))) ; for cython module
16554 ; numpy_formathandler, thus not propagated
16555 (arguments
16556 `(#:tests? #f
16557 #:phases
16558 (modify-phases %standard-phases
16559 (delete 'fix-paths))))
16560 (synopsis "Acceleration code for PyOpenGL")
16561 (description
16562 "This is the Cython-coded accelerator module for PyOpenGL.")))
16563
16564(define-public python-rencode
16565 (package
16566 (name "python-rencode")
16567 (version "1.0.5")
16568 (source
16569 (origin
16570 (method url-fetch)
16571 (uri (pypi-uri "rencode" version))
16572 (sha256
16573 (base32
16574 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16575 (build-system python-build-system)
16576 (arguments
16577 `(#:phases
16578 (modify-phases %standard-phases
16579 (add-before 'check 'delete-bogus-test
16580 ;; This test requires /home/aresch/Downloads, which is not provided by
16581 ;; the build environment.
16582 (lambda _
16583 (delete-file "rencode/t.py")
16584 #t)))))
16585 (native-inputs `(("pkg-config" ,pkg-config)
16586 ("python-cython" ,python-cython)))
16587 (home-page "https://github.com/aresch/rencode")
16588 (synopsis "Serialization of heterogeneous data structures")
16589 (description
16590 "The @code{rencode} module is a data structure serialization library,
16591similar to @code{bencode} from the BitTorrent project. For complex,
16592heterogeneous data structures with many small elements, r-encoding stake up
16593significantly less space than b-encodings. This version of rencode is a
16594complete rewrite in Cython to attempt to increase the performance over the
16595pure Python module.")
16596 (license license:bsd-3)))
16597
16598(define-public python2-rencode
16599 (package-with-python2 python-rencode))
16600
16601(define-public python-xenon
16602 (package
16603 (name "python-xenon")
16604 (version "0.7.0")
16605 (source
16606 (origin
16607 (method url-fetch)
16608 (uri (pypi-uri "xenon" version))
16609 (sha256
16610 (base32
16611 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16612 (build-system python-build-system)
16613 (native-inputs
16614 `(("python-pyyaml" ,python-pyyaml)
16615 ("python-radon" ,python-radon)
16616 ("python-requests" ,python-requests)
16617 ("python-flake8" ,python-flake8)
16618 ("python-tox" ,python-tox)))
16619 (arguments
16620 `(#:tests? #f ;test suite not shipped with the PyPI archive
16621 #:phases
16622 (modify-phases %standard-phases
16623 (add-before 'build 'patch-test-requirements
16624 (lambda _
16625 ;; Remove httpretty dependency for tests.
16626 (substitute* "setup.py"
16627 (("httpretty") ""))
16628 #t)))))
16629 (home-page "https://xenon.readthedocs.org/")
16630 (synopsis "Monitor code metrics for Python on your CI server")
16631 (description
16632 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16633Ideally, @code{xenon} is run every time code is committed. Through command
16634line options, various thresholds can be set for the complexity of code. It
16635will fail (i.e. it will exit with a non-zero exit code) when any of these
16636requirements is not met.")
16637 (license license:expat)))
16638
16639(define-public python2-xenon
16640 (package-with-python2 python-xenon))
16641
16642(define-public python-pysocks
16643 (package
16644 (name "python-pysocks")
16645 (version "1.7.0")
16646 (source
16647 (origin
16648 (method url-fetch)
16649 (uri (pypi-uri "PySocks" version))
16650 (sha256
16651 (base32
16652 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
16653 (build-system python-build-system)
16654 (arguments `(#:tests? #f))
16655 (home-page "https://github.com/Anorov/PySocks")
16656 (synopsis "SOCKS client module")
16657 (description "@code{pysocks} is an updated and semi-actively maintained
16658version of @code{SocksiPy} with bug fixes and extra features.")
16659 (license license:bsd-3)))
16660
16661(define-public python2-pysocks
16662 (package-with-python2 python-pysocks))
16663
16664(define-public python-pydiff
16665 (package
16666 (name "python-pydiff")
16667 (version "0.2")
16668 (source
16669 (origin
16670 (method url-fetch)
16671 (uri (pypi-uri "pydiff" version))
16672 (sha256
16673 (base32
16674 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16675 (build-system python-build-system)
16676 (home-page "https://github.com/myint/pydiff")
16677 (synopsis "Library to diff two Python files at the bytecode level")
16678 (description
16679 "@code{pydiff} makes it easy to look for actual code changes while
16680ignoring formatting changes.")
16681 (license license:expat)))
16682
16683(define-public python2-pydiff
16684 (package-with-python2 python-pydiff))
16685
16686(define-public python-pydub
16687 (package
16688 (name "python-pydub")
16689 (version "0.24.1")
16690 (source
16691 (origin
16692 (method url-fetch)
16693 (uri (pypi-uri "pydub" version))
16694 (sha256
16695 (base32
16696 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
16697 (build-system python-build-system)
16698 (arguments
16699 `(#:phases
16700 (modify-phases %standard-phases
16701 (add-after 'unpack 'fix-ffmpeg-path
16702 (lambda* (#:key inputs #:allow-other-keys)
16703 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
16704 (substitute* '("pydub/utils.py")
16705 (("return \"ffmpeg\"")
16706 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
16707 (("return \"ffplay\"")
16708 (string-append "return \"" ffmpeg "/bin/ffplay\""))
16709 (("return \"ffprobe\"")
16710 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
16711 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
16712 #t))))))
16713 (home-page "https://pydub.com")
16714 (inputs
16715 `(("ffmpeg" ,ffmpeg)))
16716 (propagated-inputs
16717 `(("python-scipy" ,python-scipy)))
16718 (synopsis "Manipulate audio with a high level interface in Python")
16719 (description
16720 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
16721@code{ffmpeg} to open various audio formats.")
16722 (license license:expat))) ; MIT license
16723
16724(define-public python-tqdm
16725 (package
16726 (name "python-tqdm")
16727 (version "4.43.0")
16728 (source
16729 (origin
16730 (method url-fetch)
16731 (uri (pypi-uri "tqdm" version))
16732 (sha256
16733 (base32
16734 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
16735 (build-system python-build-system)
16736 (arguments
16737 '(#:phases (modify-phases %standard-phases
16738 (replace 'check
16739 (lambda* (#:key inputs outputs #:allow-other-keys)
16740 (add-installed-pythonpath inputs outputs)
16741 ;; This invokation is taken from tox.ini.
16742 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
16743 "-d" "-v" "tqdm/"))))))
16744 (native-inputs
16745 `(("python-nose" ,python-nose)))
16746 (home-page "https://github.com/tqdm/tqdm")
16747 (synopsis "Fast, extensible progress meter")
16748 (description
16749 "Make loops show a progress bar on the console by just wrapping any
16750iterable with @code{|tqdm(iterable)|}. Offers many options to define
16751design and layout.")
16752 (license (list license:mpl2.0 license:expat))))
16753
16754(define-public python2-tqdm
16755 (package-with-python2 python-tqdm))
16756
16757(define-public python-pkginfo
16758 (package
16759 (name "python-pkginfo")
16760 (version "1.4.2")
16761 (source
16762 (origin
16763 (method url-fetch)
16764 (uri (pypi-uri "pkginfo" version))
16765 (sha256
16766 (base32
16767 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
16768 (build-system python-build-system)
16769 (arguments
16770 ;; The tests are broken upstream.
16771 '(#:tests? #f))
16772 (home-page
16773 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16774 (synopsis
16775 "Query metadatdata from sdists, bdists, and installed packages")
16776 (description
16777 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16778source distriubtion (an sdist) or a binary distribution (e.g., created by
16779running bdist_egg). It can also query the EGG-INFO directory of an installed
16780distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16781created by running @code{python setup.py develop}).")
16782 (license license:expat)))
16783
16784(define-public python2-pkginfo
16785 (package-with-python2 python-pkginfo))
16786
16787(define-public python-twine
16788 (package
16789 (name "python-twine")
16790 (version "1.15.0")
16791 (source
16792 (origin
16793 (method url-fetch)
16794 (uri (pypi-uri "twine" version))
16795 (sha256
16796 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
16797 (build-system python-build-system)
16798 (propagated-inputs
16799 `(("python-tqdm" ,python-tqdm)
16800 ("python-packaging" ,python-packaging)
16801 ("python-pkginfo" ,python-pkginfo)
16802 ("python-readme-renderer" ,python-readme-renderer)
16803 ("python-requests" ,python-requests)
16804 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16805 (home-page "https://github.com/pypa/twine")
16806 (synopsis "Collection of utilities for interacting with PyPI")
16807 (description
16808 "@code{twine} currently supports registering projects and uploading
16809distributions. It authenticates the user over HTTPS, allows them to pre-sign
16810their files and supports any packaging format (including wheels).")
16811 (license license:asl2.0)))
16812
16813(define-public python2-twine
16814 (package-with-python2 python-twine))
16815
16816(define-public python-linecache2
16817 (package
16818 (name "python-linecache2")
16819 (version "1.0.0")
16820 (source
16821 (origin
16822 (method url-fetch)
16823 (uri (pypi-uri "linecache2" version))
16824 (sha256
16825 (base32
16826 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16827 (build-system python-build-system)
16828 (arguments
16829 `(;; The tests depend on unittest2, and our version is a bit too old.
16830 #:tests? #f))
16831 (native-inputs
16832 `(("python-pbr" ,python-pbr-minimal)))
16833 (home-page
16834 "https://github.com/testing-cabal/linecache2")
16835 (synopsis "Backports of the linecache module")
16836 (description
16837 "The linecache module allows one to get any line from any file, while
16838attempting to optimize internally, using a cache, the common case where many
16839lines are read from a single file.")
16840 (license license:psfl)))
16841
16842(define-public python2-linecache2
16843 (package-with-python2 python-linecache2))
16844
16845(define-public python-traceback2
16846 (package
16847 (name "python-traceback2")
16848 (version "1.4.0")
16849 (source
16850 (origin
16851 (method url-fetch)
16852 (uri (pypi-uri "traceback2" version))
16853 (sha256
16854 (base32
16855 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16856 (build-system python-build-system)
16857 (arguments
16858 `(;; python-traceback2 and python-unittest2 depend on one another.
16859 #:tests? #f))
16860 (native-inputs
16861 `(("python-pbr" ,python-pbr-minimal)))
16862 (propagated-inputs
16863 `(("python-linecache2" ,python-linecache2)))
16864 (home-page
16865 "https://github.com/testing-cabal/traceback2")
16866 (synopsis "Backports of the traceback module")
16867 (description
16868 "This module provides a standard interface to extract, format and print
16869stack traces of Python programs. It exactly mimics the behavior of the Python
16870interpreter when it prints a stack trace.")
16871 (license license:psfl)))
16872
16873(define-public python2-traceback2
16874 (package-with-python2 python-traceback2))
16875
16876(define-public python-ratelimiter
16877 (package
16878 (name "python-ratelimiter")
16879 (version "1.2.0")
16880 (source
16881 (origin
16882 (method url-fetch)
16883 (uri (pypi-uri "ratelimiter" version))
16884 (sha256
16885 (base32
16886 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
16887 (build-system python-build-system)
16888 (arguments
16889 '(#:tests? #f)) ; There are no tests in the pypi archive.
16890 (home-page "https://github.com/RazerM/ratelimiter")
16891 (synopsis "Simple rate limiting object")
16892 (description
16893 "The @code{ratelimiter} module ensures that an operation will not be
16894executed more than a given number of times during a given period.")
16895 (license license:asl2.0)))
16896
16897(define-public python2-ratelimiter
16898 (package-with-python2 python-ratelimiter))
16899
16900(define-public python-dukpy
16901 (package
16902 (name "python-dukpy")
16903 (version "0.3")
16904 (source
16905 (origin
16906 (method git-fetch)
16907 (uri (git-reference
16908 (url "https://github.com/kovidgoyal/dukpy")
16909 (commit (string-append "v" version))))
16910 (file-name (git-file-name name version))
16911 (sha256
16912 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
16913 (build-system python-build-system)
16914 (home-page "https://github.com/kovidgoyal/dukpy")
16915 (synopsis "Run JavaScript in python")
16916 (description
16917 "dukpy is a JavaScript runtime environment for Python using the duktape
16918embeddable JavaScript engine.")
16919 ;; Dukpy is licensed under MIT like the embedded duktape library,
16920 ;; with 'errors.c' as GPL3.
16921 (license (list license:expat license:gpl3))))
16922
16923(define-public python2-dukpy
16924 (package-with-python2 python-dukpy))
16925
16926(define-public python-jsonrpclib-pelix
16927 (package
16928 (name "python-jsonrpclib-pelix")
16929 (version "0.3.2")
16930 (source
16931 (origin
16932 (method url-fetch)
16933 (uri (pypi-uri "jsonrpclib-pelix" version))
16934 (sha256
16935 (base32
16936 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
16937 (build-system python-build-system)
16938 (arguments
16939 `(#:tests? #f)) ; no tests in PyPI tarball
16940 (home-page "https://github.com/tcalmant/jsonrpclib/")
16941 (synopsis "JSON-RPC 2.0 client library for Python")
16942 (description
16943 "This library implements the JSON-RPC v2.0
16944specification (backwards-compatible) as a client library for Python. This
16945version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
16946services.")
16947 (license license:asl2.0)))
16948
16949(define-public python2-jsonrpclib-pelix
16950 (package-with-python2 python-jsonrpclib-pelix))
16951
16952(define-public python-setuptools-scm-git-archive
16953 (package
16954 (name "python-setuptools-scm-git-archive")
16955 (version "1.0")
16956 (source
16957 (origin
16958 (method url-fetch)
16959 (uri (pypi-uri "setuptools_scm_git_archive" version))
16960 (sha256
16961 (base32
16962 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
16963 (build-system python-build-system)
16964 (native-inputs
16965 `(("python-pytest" ,python-pytest)))
16966 (propagated-inputs
16967 `(("python-setuptools-scm" ,python-setuptools-scm)))
16968 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
16969 (synopsis "Setuptools_scm plugin for git archives")
16970 (description
16971 "The setuptools_scm_git_archive package is a plugin to
16972setuptools_scm, which supports obtaining versions from git archives that
16973belong to tagged versions.")
16974 (license license:expat)))
16975
16976(define-public python2-setuptools-scm-git-archive
16977 (package-with-python2 python-setuptools-scm-git-archive))
16978
16979(define-public python-setuptools-git
16980 (package
16981 (name "python-setuptools-git")
16982 (version "1.2")
16983 (source
16984 (origin
16985 (method url-fetch)
16986 (uri (pypi-uri "setuptools-git" version))
16987 (sha256
16988 (base32
16989 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
16990 (build-system python-build-system)
16991 (arguments
16992 `(#:phases
16993 (modify-phases %standard-phases
16994 ;; This is needed for tests.
16995 (add-after 'unpack 'configure-git
16996 (lambda _
16997 (setenv "HOME" "/tmp")
16998 (invoke "git" "config" "--global" "user.email" "guix")
16999 (invoke "git" "config" "--global" "user.name" "guix")
17000 #t)))))
17001 (native-inputs
17002 `(("git" ,git-minimal)))
17003 (home-page "https://github.com/msabramo/setuptools-git")
17004 (synopsis "Setuptools revision control system plugin for Git")
17005 (description
17006 "This package provides a plugin for Setuptools for revision control with
17007Git.")
17008 (license license:bsd-3)))
17009
17010(define-public python-pyclipper
17011 (package
17012 (name "python-pyclipper")
17013 (version "1.1.0.post3")
17014 (source
17015 (origin
17016 (method url-fetch)
17017 (uri (pypi-uri "pyclipper" version ".zip"))
17018 (sha256
17019 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17020 (modules '((guix build utils)))
17021 (snippet
17022 '(begin
17023 ;; This file is generated by Cython.
17024 (delete-file "pyclipper/pyclipper.cpp") #t))))
17025 (build-system python-build-system)
17026 (arguments
17027 `(#:phases
17028 (modify-phases %standard-phases
17029 (add-before 'build 'cythonize-sources
17030 (lambda _
17031 (with-directory-excursion "pyclipper"
17032 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17033 (propagated-inputs
17034 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17035 (native-inputs
17036 `(("python-cython" ,python-cython)
17037 ("python-pytest" ,python-pytest)
17038 ("python-pytest-runner" ,python-pytest-runner)
17039 ("python-unittest2" ,python-unittest2)
17040 ("unzip" ,unzip)))
17041 (home-page "https://github.com/greginvm/pyclipper")
17042 (synopsis "Wrapper for Angus Johnson's Clipper library")
17043 (description
17044 "Pyclipper is a Cython wrapper for the C++ translation of the
17045Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17046 (license license:expat)))
17047
17048(define-public python2-pyclipper
17049 (package-with-python2 python-pyclipper))
17050
17051(define-public python2-booleanoperations
17052 (package
17053 (name "python2-booleanoperations")
17054 (version "0.7.1")
17055 (source
17056 (origin
17057 (method url-fetch)
17058 (uri (pypi-uri "booleanOperations" version ".zip"))
17059 (sha256
17060 (base32
17061 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17062 (build-system python-build-system)
17063 (arguments
17064 `(#:python ,python-2))
17065 (native-inputs
17066 `(("unzip" ,unzip)
17067 ("python2-pytest" ,python2-pytest)
17068 ("python2-pytest-runner" ,python2-pytest-runner)))
17069 (propagated-inputs
17070 `(("python-fonttools" ,python2-fonttools)
17071 ("python-pyclipper" ,python2-pyclipper)
17072 ("python-ufolib" ,python2-ufolib)))
17073 (home-page "https://github.com/typemytype/booleanOperations")
17074 (synopsis "Boolean operations on paths")
17075 (description
17076 "BooleanOperations provides a Python library that enables
17077boolean operations on paths.")
17078 (license license:expat)))
17079
17080(define-public python-tempdir
17081 (package
17082 (name "python-tempdir")
17083 (version "0.7.1")
17084 (source
17085 (origin
17086 (method url-fetch)
17087 (uri (pypi-uri "tempdir" version))
17088 (sha256
17089 (base32
17090 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17091 (build-system python-build-system)
17092 (home-page "https://pypi.org/project/tempdir/")
17093 (arguments
17094 ;; the package has no tests
17095 '(#:tests? #f))
17096 (synopsis "Python library for managing temporary directories")
17097 (description
17098 "This library manages temporary directories that are automatically
17099deleted with all their contents when they are no longer needed. It is
17100particularly convenient for use in tests.")
17101 (license license:expat)))
17102
17103(define-public python2-tempdir
17104 (package-with-python2 python-tempdir))
17105
17106(define-public python-activepapers
17107 (package
17108 (name "python-activepapers")
17109 (version "0.2.2")
17110 (source
17111 (origin
17112 (method url-fetch)
17113 (uri (pypi-uri "ActivePapers.Py" version))
17114 (sha256
17115 (base32
17116 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17117 (build-system python-build-system)
17118 (arguments
17119 `(#:modules ((ice-9 ftw)
17120 (srfi srfi-1)
17121 (guix build utils)
17122 (guix build python-build-system))
17123
17124 #:phases
17125 (modify-phases %standard-phases
17126 (add-after 'unpack 'delete-python2-code
17127 (lambda _
17128 (for-each delete-file
17129 '("lib/activepapers/builtins2.py"
17130 "lib/activepapers/standardlib2.py"
17131 "lib/activepapers/utility2.py"))))
17132 (replace 'check
17133 (lambda _
17134 ;; Deactivate the test cases that download files
17135 (setenv "NO_NETWORK_ACCESS" "1")
17136 ;; For some strange reason, some tests fail if nosetests runs all
17137 ;; test modules in a single execution. They pass if each test
17138 ;; module is run individually.
17139 (for-each (lambda (filename)
17140 (invoke "nosetests"
17141 (string-append "tests/" filename)))
17142 (scandir "tests"
17143 (lambda (filename)
17144 (string-suffix? ".py" filename)))))))))
17145 (native-inputs
17146 `(("python-tempdir" ,python-tempdir)
17147 ("python-nose" ,python-nose)))
17148 (propagated-inputs
17149 `(("python-h5py" ,python-h5py)))
17150 (home-page "https://www.activepapers.org/")
17151 (synopsis "Executable papers for scientific computing")
17152 (description
17153 "ActivePapers is a tool for working with executable papers, which
17154combine data, code, and documentation in single-file packages,
17155suitable for publication as supplementary material or on repositories
17156such as figshare or Zenodo.")
17157 (properties `((python2-variant . ,(delay python2-activepapers))))
17158 (license license:bsd-3)))
17159
17160(define-public python2-activepapers
17161 (let ((base (package-with-python2
17162 (strip-python2-variant python-activepapers))))
17163 (package
17164 (inherit base)
17165 (arguments
17166 (substitute-keyword-arguments (package-arguments base)
17167 ((#:phases phases)
17168 `(modify-phases ,phases
17169 (delete 'delete-python2-code)
17170 (add-after 'unpack 'delete-python3-code
17171 (lambda _
17172 (for-each delete-file
17173 '("lib/activepapers/builtins3.py"
17174 "lib/activepapers/standardlib3.py"
17175 "lib/activepapers/utility3.py")))))))))))
17176
17177(define-public python-semver
17178 (package
17179 (name "python-semver")
17180 (version "2.9.0")
17181 (source
17182 (origin
17183 (method url-fetch)
17184 (uri (pypi-uri "semver" version))
17185 (sha256
17186 (base32
17187 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17188 (build-system python-build-system)
17189 (native-inputs
17190 `(("python-appdirs" ,python-appdirs)
17191 ("python-distlib" ,python-distlib)
17192 ("python-importlib-metadata" ,python-importlib-metadata)
17193 ("python-filelock" ,python-filelock)
17194 ("python-six" ,python-six)
17195 ("python-tox" ,python-tox)
17196 ("python-virtualenv" ,python-virtualenv)))
17197 (home-page "https://github.com/k-bx/python-semver")
17198 (synopsis "Python helper for Semantic Versioning")
17199 (description "This package provides a Python library for
17200@url{Semantic Versioning, http://semver.org/}.")
17201 (license license:bsd-3)))
17202
17203(define-public python2-semver
17204 (package-with-python2 python-semver))
17205
17206(define-public python-pyro4
17207 (package
17208 (name "python-pyro4")
17209 (version "4.77")
17210 (source
17211 (origin
17212 (method url-fetch)
17213 (uri (pypi-uri "Pyro4" version))
17214 (sha256
17215 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17216 (build-system python-build-system)
17217 (arguments
17218 '(#:tests? #f)) ;FIXME: Some tests require network access.
17219 (native-inputs
17220 `(("python-cloudpickle" ,python-cloudpickle)
17221 ("python-dill" ,python-dill)
17222 ("python-msgpack" ,python-msgpack)))
17223 (propagated-inputs
17224 `(("python-serpent" ,python-serpent)))
17225 (home-page "https://pyro4.readthedocs.io")
17226 (synopsis "Distributed object middleware for Python")
17227 (description
17228 "Pyro enables you to build applications in which objects can talk to each
17229other over the network. You can just use normal Python method calls to call
17230objects on other machines, also known as remote procedure calls (RPC).")
17231 (license license:expat)))
17232
17233(define-public python2-pyro
17234 (package
17235 (name "python2-pyro")
17236 (version "3.16")
17237 (source
17238 (origin
17239 (method url-fetch)
17240 (uri (pypi-uri "Pyro" version))
17241 (file-name (string-append "Pyro-" version ".tar.gz"))
17242 (sha256
17243 (base32
17244 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17245 (build-system python-build-system)
17246 (arguments
17247 ;; Pyro is not compatible with Python 3
17248 `(#:python ,python-2
17249 ;; Pyro has no test cases for automatic execution
17250 #:tests? #f))
17251 (home-page "https://pythonhosted.org/Pyro/")
17252 (synopsis "Distributed object manager for Python")
17253 (description "Pyro is a Distributed Object Technology system
17254written in Python that is designed to be easy to use. It resembles
17255Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17256which is a system and language independent Distributed Object Technology
17257and has much more to offer than Pyro or RMI. Pyro 3.x is no
17258longer maintained. New projects should use Pyro4 instead, which
17259is the new Pyro version that is actively developed.")
17260 (license license:expat)))
17261
17262(define-public python2-scientific
17263 (package
17264 (name "python2-scientific")
17265 (version "2.9.4")
17266 (source
17267 (origin
17268 (method git-fetch)
17269 (uri (git-reference
17270 (url "https://github.com/khinsen/ScientificPython")
17271 (commit (string-append "rel" version))))
17272 (file-name (git-file-name name version))
17273 (sha256
17274 (base32
17275 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17276 (build-system python-build-system)
17277 (inputs
17278 `(("netcdf" ,netcdf)))
17279 (propagated-inputs
17280 `(("python-numpy" ,python2-numpy-1.8)
17281 ("python-pyro" ,python2-pyro)))
17282 (arguments
17283 ;; ScientificPython is not compatible with Python 3
17284 `(#:python ,python-2
17285 #:tests? #f ; No test suite
17286 #:phases
17287 (modify-phases %standard-phases
17288 (replace 'build
17289 (lambda* (#:key inputs #:allow-other-keys)
17290 (invoke "python" "setup.py" "build"
17291 (string-append "--netcdf_prefix="
17292 (assoc-ref inputs "netcdf"))))))))
17293 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17294 (synopsis "Python modules for scientific computing")
17295 (description "ScientificPython is a collection of Python modules that are
17296useful for scientific computing. Most modules are rather general (Geometry,
17297physical units, automatic derivatives, ...) whereas others are more
17298domain-specific (e.g. netCDF and PDB support). The library is currently
17299not actively maintained and works only with Python 2 and NumPy < 1.9.")
17300 (license license:cecill-c)))
17301
17302(define-public python2-mmtk
17303 (package
17304 (name "python2-mmtk")
17305 (version "2.7.12")
17306 (source
17307 (origin
17308 (method git-fetch)
17309 (uri (git-reference
17310 (url "https://github.com/khinsen/MMTK")
17311 (commit (string-append "rel" version))))
17312 (file-name (git-file-name name version))
17313 (sha256
17314 (base32
17315 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17316 (build-system python-build-system)
17317 (native-inputs
17318 `(("netcdf" ,netcdf)))
17319 (propagated-inputs
17320 `(("python-scientific" ,python2-scientific)
17321 ("python-tkinter" ,python-2 "tk")))
17322 (arguments
17323 `(#:python ,python-2
17324 #:tests? #f
17325 #:phases
17326 (modify-phases %standard-phases
17327 (add-before 'build 'includes-from-scientific
17328 (lambda* (#:key inputs #:allow-other-keys)
17329 (mkdir-p "Include/Scientific")
17330 (copy-recursively
17331 (string-append
17332 (assoc-ref inputs "python-scientific")
17333 "/include/python2.7/Scientific")
17334 "Include/Scientific"))))))
17335 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17336 (synopsis "Python library for molecular simulation")
17337 (description "MMTK is a library for molecular simulations with an emphasis
17338on biomolecules. It provides widely used methods such as Molecular Dynamics
17339and normal mode analysis, but also basic routines for implementing new methods
17340for simulation and analysis. The library is currently not actively maintained
17341and works only with Python 2 and NumPy < 1.9.")
17342 (license license:cecill-c)))
17343
17344(define-public python-phonenumbers
17345 (package
17346 (name "python-phonenumbers")
17347 (version "8.9.1")
17348 (source
17349 (origin
17350 (method url-fetch)
17351 (uri (pypi-uri "phonenumbers" version))
17352 (sha256
17353 (base32
17354 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17355 (build-system python-build-system)
17356 (home-page
17357 "https://github.com/daviddrysdale/python-phonenumbers")
17358 (synopsis
17359 "Python library for dealing with international phone numbers")
17360 (description
17361 "This package provides a Python port of Google's libphonenumber library.")
17362 (license license:asl2.0)))
17363
17364(define-public python2-phonenumbers
17365 (package-with-python2 python-phonenumbers))
17366
17367(define-public python-send2trash
17368 (package
17369 (name "python-send2trash")
17370 (version "1.5.0")
17371 (source
17372 (origin (method git-fetch)
17373 ;; Source tarball on PyPI doesn't include tests.
17374 (uri (git-reference
17375 (url "https://github.com/hsoft/send2trash")
17376 (commit version)))
17377 (file-name (git-file-name name version))
17378 (sha256
17379 (base32
17380 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17381 (build-system python-build-system)
17382 (arguments
17383 '(#:phases
17384 (modify-phases %standard-phases
17385 (add-before 'check 'pre-check
17386 (lambda _
17387 (mkdir-p "/tmp/foo")
17388 (setenv "HOME" "/tmp/foo")
17389 #t)))))
17390 (home-page "https://github.com/hsoft/send2trash")
17391 (synopsis "Send files to the user's @file{~/Trash} directory")
17392 (description "This package provides a Python library to send files to the
17393user's @file{~/Trash} directory.")
17394 (properties `((python2-variant . ,(delay python2-send2trash))))
17395 (license license:bsd-3)))
17396
17397(define-public python2-send2trash
17398 (package
17399 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17400 (arguments
17401 (substitute-keyword-arguments (package-arguments python-send2trash)
17402 ((#:phases phases)
17403 `(modify-phases ,phases
17404 (add-before 'check 'setenv
17405 (lambda _
17406 (setenv "PYTHONPATH"
17407 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17408 #t))))))))
17409
17410(define-public python-pyfavicon
17411 (package
17412 (name "python-pyfavicon")
17413 (version "0.1.1")
17414 (source
17415 (origin
17416 (method url-fetch)
17417 (uri (pypi-uri "pyfavicon" version))
17418 (sha256
17419 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17420 (build-system python-build-system)
17421 (arguments
17422 ;; There are no tests in the PyPI tarball and the tests from the
17423 ;; repository require online data.
17424 '(#:tests? #f))
17425 (propagated-inputs
17426 `(("python-aiohttp" ,python-aiohttp)
17427 ("python-beautifulsoup4" ,python-beautifulsoup4)
17428 ("python-pillow" ,python-pillow)))
17429 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17430 (synopsis "Async favicon fetcher")
17431 (description
17432 "@code{pyfavicon} is an async favicon fetcher.")
17433 (license license:expat)))
17434
17435(define-public python-yapf
17436 (package
17437 (name "python-yapf")
17438 (version "0.29.0")
17439 (source
17440 (origin
17441 (method url-fetch)
17442 (uri (pypi-uri "yapf" version))
17443 (sha256
17444 (base32
17445 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17446 (build-system python-build-system)
17447 (home-page "https://github.com/google/yapf")
17448 (synopsis "Formatter for Python code")
17449 (description "YAPF is a formatter for Python code. It's based off of
17450@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17451takes the code and reformats it to the best formatting that conforms to the
17452style guide, even if the original code didn't violate the style guide.")
17453 (license license:asl2.0)))
17454
17455(define-public python2-yapf
17456 (package-with-python2 python-yapf))
17457
17458(define-public python-yq
17459 (package
17460 (name "python-yq")
17461 (version "2.11.1")
17462 (source
17463 (origin
17464 (method url-fetch)
17465 (uri (pypi-uri "yq" version))
17466 (sha256
17467 (base32
17468 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17469 (build-system python-build-system)
17470 (arguments
17471 '(#:phases
17472 (modify-phases %standard-phases
17473 (add-after 'unpack 'patch
17474 (lambda* (#:key inputs #:allow-other-keys)
17475 (substitute* "yq/__init__.py"
17476 (("Popen\\(\\[\"jq")
17477 (string-append
17478 "Popen([\""
17479 (assoc-ref inputs "jq")
17480 "/bin/jq")))
17481 #t)))))
17482 (inputs
17483 `(("python-argcomplete" ,python-argcomplete)
17484 ("python-pyyaml" ,python-pyyaml)
17485 ("python-xmltodict" ,python-xmltodict)
17486 ("jq" ,jq)))
17487 (native-inputs
17488 `(("python-coverage" ,python-coverage)
17489 ("python-flake8" ,python-flake8)
17490 ("python-wheel" ,python-wheel)))
17491 (home-page "https://github.com/kislyuk/yq")
17492 (synopsis "Command-line YAML/XML processor")
17493 (description
17494 "This package provides @command{yq} and @command{xq} for processing YAML
17495and XML respectively. The processing is done through @{jq}, @command{jq}
17496filters can be used to process the data as it passes through.")
17497 (license license:asl2.0)))
17498
17499(define-public python-gyp
17500 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17501 (revision "0"))
17502 (package
17503 (name "python-gyp")
17504 ;; Google does not release versions,
17505 ;; based on second most recent commit date.
17506 (version (git-version "0.0.0" revision commit))
17507 (source
17508 (origin
17509 ;; Google does not release tarballs,
17510 ;; git checkout is needed.
17511 (method git-fetch)
17512 (uri (git-reference
17513 (url "https://chromium.googlesource.com/external/gyp")
17514 (commit commit)))
17515 (file-name (git-file-name name version))
17516 (sha256
17517 (base32
17518 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17519 (build-system python-build-system)
17520 (home-page "https://gyp.gsrc.io/")
17521 (synopsis "GYP is a Meta-Build system")
17522 (description
17523 "GYP builds build systems for large, cross platform applications.
17524It can be used to generate XCode projects, Visual Studio projects, Ninja build
17525files, and Makefiles.")
17526 (license license:bsd-3))))
17527
17528(define-public python2-gyp
17529 (package-with-python2 python-gyp))
17530
17531(define-public python-whatever
17532 (package
17533 (name "python-whatever")
17534 (version "0.6")
17535 (source
17536 (origin
17537 (method git-fetch)
17538 (uri (git-reference
17539 (url "https://github.com/Suor/whatever")
17540 (commit version)))
17541 (file-name (git-file-name name version))
17542 (sha256
17543 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17544 (build-system python-build-system)
17545 (arguments
17546 `(#:phases
17547 (modify-phases %standard-phases
17548 (replace 'check
17549 (lambda _
17550 (invoke "py.test"))))))
17551 (native-inputs
17552 `(("python-pytest" ,python-pytest)))
17553 (home-page "https://github.com/Suor/whatever")
17554 (synopsis "Make anonymous functions by partial application of operators")
17555 (description "@code{whatever} provides an easy way to make anonymous
17556functions by partial application of operators.")
17557 (license license:bsd-3)))
17558
17559(define-public python2-whatever
17560 (package-with-python2 python-whatever))
17561
17562(define-public python-funcy
17563 (package
17564 (name "python-funcy")
17565 (version "1.11")
17566 (source
17567 (origin
17568 (method git-fetch)
17569 (uri (git-reference
17570 (url "https://github.com/Suor/funcy")
17571 (commit version)))
17572 (sha256
17573 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17574 (file-name (git-file-name name version))))
17575 (build-system python-build-system)
17576 (arguments
17577 `(#:phases
17578 (modify-phases %standard-phases
17579 (replace 'check
17580 (lambda _
17581 (invoke "py.test"))))))
17582 (native-inputs
17583 `(("python-pytest" ,python-pytest)
17584 ("python-whatever" ,python-whatever)))
17585 (home-page "https://github.com/Suor/funcy")
17586 (synopsis "Functional tools")
17587 (description "@code{funcy} is a library that provides functional tools.
17588Examples are:
17589@enumerate
17590@item merge - Merges collections of the same type
17591@item walk - Type-preserving map
17592@item select - Selects a part of a collection
17593@item take - Takes the first n items of a collection
17594@item first - Takes the first item of a collection
17595@item remove - Predicated-removes items of a collection
17596@item concat - Concatenates two collections
17597@item flatten - Flattens a collection with subcollections
17598@item distinct - Returns only distinct items
17599@item split - Predicated-splits a collection
17600@item split_at - Splits a collection at a given item
17601@item group_by - Groups items by group
17602@item pairwise - Pairs off adjacent items
17603@item partial - Partially-applies a function
17604@item curry - Curries a function
17605@item compose - Composes functions
17606@item complement - Complements a predicate
17607@item all_fn - \"all\" with predicate
17608@end enumerate")
17609 (license license:bsd-3)))
17610
17611(define-public python2-funcy
17612 (package-with-python2 python-funcy))
17613
17614(define-public python-isoweek
17615 (package
17616 (name "python-isoweek")
17617 (version "1.3.3")
17618 (source
17619 (origin
17620 (method url-fetch)
17621 (uri (pypi-uri "isoweek" version))
17622 (sha256
17623 (base32
17624 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17625 (build-system python-build-system)
17626 (home-page "https://github.com/gisle/isoweek")
17627 (synopsis "Objects representing a week")
17628 (description "The @code{isoweek} module provide the class Week that
17629implements the week definition of ISO 8601. This standard also defines
17630a notation for identifying weeks; yyyyWww (where the W is a literal).
17631Week instances stringify to this form.")
17632 (license license:bsd-3)))
17633
17634(define-public python2-isoweek
17635 (package-with-python2 python-isoweek))
17636
17637(define-public python-pyzbar
17638 (package
17639 (name "python-pyzbar")
17640 (version "0.1.8")
17641 (source
17642 (origin
17643 ;; There's no source tarball on PyPI.
17644 (method git-fetch)
17645 (uri (git-reference
17646 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
17647 (commit (string-append "v" version))))
17648 (file-name (git-file-name name version))
17649 (sha256
17650 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
17651 (build-system python-build-system)
17652 (arguments
17653 `(#:phases
17654 (modify-phases %standard-phases
17655 (add-after 'unpack 'remove-failing-test
17656 (lambda _
17657 ;; This tests if find_library was called once, but we remove
17658 ;; the call in the stage below to make the library find libzbar.
17659 (delete-file "pyzbar/tests/test_zbar_library.py")
17660 #t))
17661 (add-before 'build 'set-library-file-name
17662 (lambda* (#:key inputs #:allow-other-keys)
17663 (let ((libzbar (assoc-ref inputs "zbar")))
17664 (substitute* "pyzbar/zbar_library.py"
17665 (("find_library\\('zbar'\\)")
17666 (string-append "'" libzbar "/lib/libzbar.so.0'")))
17667 #t))))))
17668 (native-inputs
17669 `(("pkg-config" ,pkg-config)
17670 ("python-numpy" ,python-numpy)
17671 ("python-pillow" ,python-pillow)))
17672 (inputs
17673 `(("zbar" ,zbar)))
17674 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
17675 (synopsis "Read one-dimensional barcodes and QR codes")
17676 (description
17677 "Read one-dimensional barcodes and QR codes using the zbar library.
17678
17679Features:
17680
17681@itemize
17682@item Pure python
17683@item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
17684@item Decodes locations of barcodes
17685@item No dependencies, other than the zbar library itself
17686@end itemize")
17687 (license license:expat)))
17688
17689(define-public python-tokenize-rt
17690 (package
17691 (name "python-tokenize-rt")
17692 (version "2.0.1")
17693 (source
17694 (origin
17695 (method url-fetch)
17696 (uri (pypi-uri "tokenize-rt" version))
17697 (sha256
17698 (base32
17699 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
17700 (build-system python-build-system)
17701 (home-page "https://github.com/asottile/tokenize-rt")
17702 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
17703 (description
17704 "This Python library is a wrapper around @code{tokenize} from the Python
17705standard library. It provides two additional tokens @code{ESCAPED_NL} and
17706@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
17707and @code{tokens_to_src} to roundtrip.")
17708 (license license:expat)))
17709
17710(define-public python-future-fstrings
17711 (package
17712 (name "python-future-fstrings")
17713 (version "0.4.1")
17714 (source
17715 (origin
17716 (method url-fetch)
17717 (uri (pypi-uri "future_fstrings" version))
17718 (sha256
17719 (base32
17720 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
17721 (build-system python-build-system)
17722 (propagated-inputs
17723 `(("python-tokenize-rt" ,python-tokenize-rt)))
17724 (home-page "https://github.com/asottile/future-fstrings")
17725 (synopsis "Backport of fstrings to Python < 3.6")
17726 (description
17727 "This package provides a UTF-8 compatible encoding
17728@code{future_fstrings}, which performs source manipulation. It decodes the
17729source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
17730@code{f} strings.")
17731 (license license:expat)))
17732
17733(define-public python-typed-ast
17734 (package
17735 (name "python-typed-ast")
17736 (version "1.4.0")
17737 (source
17738 (origin
17739 (method git-fetch)
17740 (uri (git-reference
17741 (url "https://github.com/python/typed_ast")
17742 (commit version)))
17743 (sha256
17744 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
17745 (file-name (git-file-name name version))))
17746 (build-system python-build-system)
17747 (arguments
17748 `(#:modules ((guix build utils)
17749 (guix build python-build-system)
17750 (ice-9 ftw)
17751 (srfi srfi-1)
17752 (srfi srfi-26))
17753 #:phases
17754 (modify-phases %standard-phases
17755 (replace 'check
17756 (lambda _
17757 (let ((cwd (getcwd)))
17758 (setenv "PYTHONPATH"
17759 (string-append cwd "/build/"
17760 (find (cut string-prefix? "lib" <>)
17761 (scandir (string-append cwd "/build")))
17762 ":"
17763 (getenv "PYTHONPATH"))))
17764 (invoke "pytest")
17765 #t)))))
17766 (native-inputs `(("python-pytest" ,python-pytest)))
17767 (home-page "https://github.com/python/typed_ast")
17768 (synopsis "Fork of Python @code{ast} modules with type comment support")
17769 (description "This package provides a parser similar to the standard
17770@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
17771include PEP 484 type comments and are independent of the version of Python
17772under which they are run. The @code{typed_ast} parsers produce the standard
17773Python AST (plus type comments), and are both fast and correct, as they are
17774based on the CPython 2.7 and 3.7 parsers.")
17775 ;; See the file "LICENSE" for the details.
17776 (license (list license:psfl
17777 license:asl2.0
17778 license:expat)))) ;ast27/Parser/spark.py
17779
17780(define-public python-typing
17781 (package
17782 (name "python-typing")
17783 (version "3.7.4.3")
17784 (source
17785 (origin
17786 (method url-fetch)
17787 (uri (pypi-uri "typing" version))
17788 (sha256
17789 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
17790 (build-system python-build-system)
17791 (home-page "https://docs.python.org/3/library/typing.html")
17792 (synopsis "Type hints for Python")
17793 (description "This is a backport of the standard library @code{typing}
17794module to Python versions older than 3.5. Typing defines a standard notation
17795for Python function and variable type annotations. The notation can be used
17796for documenting code in a concise, standard format, and it has been designed
17797to also be used by static and runtime type checkers, static analyzers, IDEs
17798and other tools.")
17799 (license license:psfl)))
17800
17801(define-public python2-typing
17802 (package-with-python2 python-typing))
17803
17804(define-public python-typing-extensions
17805 (package
17806 (name "python-typing-extensions")
17807 (version "3.7.4.2")
17808 (source
17809 (origin
17810 (method url-fetch)
17811 (uri (pypi-uri "typing_extensions" version))
17812 (sha256
17813 (base32
17814 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
17815 (build-system python-build-system)
17816 (home-page
17817 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
17818 (synopsis "Experimental type hints for Python")
17819 (description
17820 "The typing_extensions module contains additional @code{typing} hints not
17821yet present in the of the @code{typing} standard library.
17822Included are implementations of:
17823@enumerate
17824@item ClassVar
17825@item ContextManager
17826@item Counter
17827@item DefaultDict
17828@item Deque
17829@item NewType
17830@item NoReturn
17831@item overload
17832@item Protocol
17833@item runtime
17834@item Text
17835@item Type
17836@item TYPE_CHECKING
17837@item AsyncGenerator
17838@end enumerate\n")
17839 (license license:psfl)))
17840
17841(define-public bpython
17842 (package
17843 (name "bpython")
17844 (version "0.18")
17845 (source
17846 (origin
17847 (method url-fetch)
17848 (uri (pypi-uri "bpython" version))
17849 (sha256
17850 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
17851 (build-system python-build-system)
17852 (arguments
17853 `(#:phases
17854 (modify-phases %standard-phases
17855 (add-after 'unpack 'remove-failing-test
17856 (lambda _
17857 ;; Remove failing test. FIXME: make it pass
17858 (delete-file "bpython/test/test_args.py")
17859 #t))
17860 (add-after 'wrap 'add-aliases
17861 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
17862 (lambda* (#:key outputs #:allow-other-keys)
17863 (let ((out (assoc-ref outputs "out")))
17864 (for-each
17865 (lambda (old new)
17866 (symlink old (string-append out "/bin/" new)))
17867 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
17868 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
17869 #t)))))
17870 (propagated-inputs
17871 `(("python-pygments" ,python-pygments)
17872 ("python-requests" ,python-requests)
17873 ("python-babel" ,python-babel) ; optional, for internationalization
17874 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
17875 ("python-greenlet" ,python-greenlet)
17876 ("python-urwid" ,python-urwid) ; for bpython-urwid only
17877 ("python-six" ,python-six)))
17878 (native-inputs
17879 `(("python-sphinx" ,python-sphinx)
17880 ("python-mock" ,python-mock)))
17881 (home-page "https://bpython-interpreter.org/")
17882 (synopsis "Fancy interface to the Python interpreter")
17883 (description "Bpython is a fancy interface to the Python
17884interpreter. bpython's main features are
17885
17886@enumerate
17887@item in-line syntax highlighting,
17888@item readline-like autocomplete with suggestions displayed as you type,
17889@item expected parameter list for any Python function,
17890@item \"rewind\" function to pop the last line of code from memory and
17891 re-evaluate,
17892@item send the code you've entered off to a pastebin,
17893@item save the code you've entered to a file, and
17894@item auto-indentation.
17895@end enumerate")
17896 (license license:expat)))
17897
17898(define-public bpython2
17899 (let ((base (package-with-python2
17900 (strip-python2-variant bpython))))
17901 (package (inherit base)
17902 (name "bpython2")
17903 (arguments
17904 `(#:python ,python-2
17905 #:phases
17906 (modify-phases %standard-phases
17907 (add-after 'unpack 'remove-failing-test
17908 (lambda _
17909 ;; Remove failing test. FIXME: make it pass
17910 (delete-file "bpython/test/test_args.py")
17911 ;; Disable failing test-cases (renaming inhibits they are
17912 ;; discovered)
17913 (substitute* "bpython/test/test_curtsies_repl.py"
17914 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
17915 (string-append a "xxx_off_" b))
17916 (("^(\\s*def )(test_complex\\W)" _ a b)
17917 (string-append a "xxx_off_" b)))
17918 #t))
17919 (add-before 'build 'rename-scripts
17920 ;; rename the scripts to bypthon2, bpdb2, etc.
17921 (lambda _
17922 (substitute* "setup.py"
17923 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
17924 (string-append name "2" rest "\n"))
17925 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
17926 (string-append name "2" (or sub "") rest "\n")))
17927 #t))))))))
17928
17929(define-public python-pyinotify
17930 (package
17931 (name "python-pyinotify")
17932 (version "0.9.6")
17933 (source (origin
17934 (method url-fetch)
17935 (uri (pypi-uri "pyinotify" version))
17936 (sha256
17937 (base32
17938 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
17939 (build-system python-build-system)
17940 (arguments `(#:tests? #f)) ;no tests
17941 (home-page "https://github.com/seb-m/pyinotify")
17942 (synopsis "Python library for monitoring inotify events")
17943 (description
17944 "@code{pyinotify} provides a Python interface for monitoring
17945file system events on Linux.")
17946 (license license:expat)))
17947
17948(define-public python2-pyinotify
17949 (package-with-python2 python-pyinotify))
17950
17951;; Ada parser uses this version.
17952(define-public python2-quex-0.67.3
17953 (package
17954 (name "python2-quex")
17955 (version "0.67.3")
17956 (source
17957 (origin
17958 (method url-fetch)
17959 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
17960 (version-major+minor version)
17961 "/quex-" version ".zip"))
17962 (sha256
17963 (base32
17964 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
17965 (build-system python-build-system)
17966 (native-inputs
17967 `(("unzip" ,unzip)))
17968 (arguments
17969 `(#:python ,python-2
17970 #:tests? #f
17971 #:phases
17972 (modify-phases %standard-phases
17973 (delete 'configure)
17974 (delete 'build)
17975 (replace 'install
17976 (lambda* (#:key outputs #:allow-other-keys)
17977 (let* ((out (assoc-ref outputs "out"))
17978 (share/quex (string-append out "/share/quex"))
17979 (bin (string-append out "/bin")))
17980 (copy-recursively "." share/quex)
17981 (mkdir-p bin)
17982 (symlink (string-append share/quex "/quex-exe.py")
17983 (string-append bin "/quex"))
17984 #t))))))
17985 (native-search-paths
17986 (list (search-path-specification
17987 (variable "QUEX_PATH")
17988 (files '("share/quex")))))
17989 (home-page "http://quex.sourceforge.net/")
17990 (synopsis "Lexical analyzer generator in Python")
17991 (description "@code{quex} is a lexical analyzer generator in Python.")
17992 (license license:lgpl2.1+))) ; Non-military
17993
17994(define-public python2-quex
17995 (package (inherit python2-quex-0.67.3)
17996 (name "python2-quex")
17997 (version "0.68.1")
17998 (source
17999 (origin
18000 (method url-fetch)
18001 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18002 (sha256
18003 (base32
18004 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18005 (file-name (string-append name "-" version ".tar.gz"))))))
18006
18007(define-public python-more-itertools
18008 (package
18009 (name "python-more-itertools")
18010 (version "8.2.0")
18011 (source
18012 (origin
18013 (method url-fetch)
18014 (uri (pypi-uri "more-itertools" version))
18015 (sha256
18016 (base32
18017 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18018 (build-system python-build-system)
18019 (home-page "https://github.com/erikrose/more-itertools")
18020 (synopsis "More routines for operating on iterables, beyond itertools")
18021 (description "Python's built-in @code{itertools} module implements a
18022number of iterator building blocks inspired by constructs from APL, Haskell,
18023and SML. @code{more-itertools} includes additional building blocks for
18024working with iterables.")
18025 (properties `((python2-variant . ,(delay python2-more-itertools))))
18026 (license license:expat)))
18027
18028;; The 5.x series are the last versions supporting Python 2.7.
18029(define-public python2-more-itertools
18030 (package
18031 (inherit python-more-itertools)
18032 (name "python2-more-itertools")
18033 (version "5.0.0")
18034 (source (origin
18035 (method url-fetch)
18036 (uri (pypi-uri "more-itertools" version))
18037 (sha256
18038 (base32
18039 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18040 (arguments
18041 `(#:python ,python-2))
18042 (propagated-inputs
18043 `(("python2-six" ,python2-six-bootstrap)))))
18044
18045(define-public python-latexcodec
18046 (package
18047 (name "python-latexcodec")
18048 (version "1.0.7")
18049 (source
18050 (origin
18051 (method url-fetch)
18052 (uri (pypi-uri "latexcodec" version))
18053 (sha256
18054 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18055 (build-system python-build-system)
18056 (inputs
18057 `(("python-six" ,python-six)))
18058 (home-page "https://readthedocs.org/projects/latexcodec/")
18059 (synopsis "Work with LaTeX code in Python")
18060 (description "Lexer and codec to work with LaTeX code in Python.")
18061 (license license:expat)))
18062
18063(define-public python-pybtex
18064 (package
18065 (name "python-pybtex")
18066 (version "0.22.2")
18067 (source
18068 (origin
18069 (method url-fetch)
18070 (uri (pypi-uri "pybtex" version))
18071 (sha256
18072 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18073 (build-system python-build-system)
18074 (native-inputs
18075 `(("python-nose" ,python-nose)))
18076 (inputs
18077 `(("python-latexcodec" ,python-latexcodec)
18078 ("python-pyyaml" ,python-pyyaml)
18079 ("python-six" ,python-six)))
18080 (arguments
18081 `(#:test-target "nosetests"))
18082 (home-page "https://pybtex.org/")
18083 (synopsis "BibTeX-compatible bibliography processor")
18084 (description "Pybtex is a BibTeX-compatible bibliography processor written
18085in Python. You can simply type pybtex instead of bibtex.")
18086 (license license:expat)))
18087
18088(define-public python-onetimepass
18089 (package
18090 (name "python-onetimepass")
18091 (version "1.0.1")
18092 (source
18093 (origin
18094 (method url-fetch)
18095 (uri (pypi-uri "onetimepass" version))
18096 (sha256
18097 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18098 (build-system python-build-system)
18099 (propagated-inputs `(("python-six" ,python-six)))
18100 (home-page "https://github.com/tadeck/onetimepass/")
18101 (synopsis "One-time password library")
18102 (description "Python one-time password library for HMAC-based (HOTP) and
18103time-based (TOTP) passwords.")
18104 (license license:expat)))
18105
18106(define-public python-parso
18107 (package
18108 (name "python-parso")
18109 (version "0.7.1")
18110 (source
18111 (origin
18112 (method url-fetch)
18113 (uri (pypi-uri "parso" version))
18114 (sha256
18115 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18116 (native-inputs
18117 `(("python-pytest" ,python-pytest)))
18118 (build-system python-build-system)
18119 (arguments
18120 `(#:phases (modify-phases %standard-phases
18121 (replace 'check
18122 (lambda _ (invoke "pytest" "-vv"))))))
18123 (home-page "https://github.com/davidhalter/parso")
18124 (synopsis "Python Parser")
18125 (description "Parso is a Python parser that supports error recovery and
18126round-trip parsing for different Python versions (in multiple Python versions).
18127Parso is also able to list multiple syntax errors in your Python file.")
18128 (license license:expat)))
18129
18130(define-public python2-parso
18131 (package-with-python2 python-parso))
18132
18133(define-public python-async-generator
18134 (package
18135 (name "python-async-generator")
18136 (version "1.10")
18137 (source
18138 (origin
18139 (method url-fetch)
18140 (uri (pypi-uri "async_generator" version))
18141 (sha256
18142 (base32
18143 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18144 (build-system python-build-system)
18145 (native-inputs
18146 `(("python-pytest" ,python-pytest)))
18147 (home-page "https://github.com/python-trio/async_generator")
18148 (synopsis "Async generators and context managers for Python 3.5+")
18149 (description "@code{async_generator} back-ports Python 3.6's native async
18150generators and Python 3.7's context managers into Python 3.5.")
18151 ;; Dual licensed.
18152 (license (list license:expat license:asl2.0))))
18153
18154(define-public python-async-timeout
18155 (package
18156 (name "python-async-timeout")
18157 (version "3.0.1")
18158 (source
18159 (origin
18160 (method url-fetch)
18161 (uri (pypi-uri "async-timeout" version))
18162 (sha256
18163 (base32
18164 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18165 (build-system python-build-system)
18166 (home-page "https://github.com/aio-libs/async_timeout/")
18167 (synopsis "Timeout context manager for asyncio programs")
18168 (description "@code{async-timeout} provides a timeout timeout context
18169manager compatible with @code{asyncio}.")
18170 (license license:asl2.0)))
18171
18172(define-public python-glob2
18173 (package
18174 (name "python-glob2")
18175 (version "0.7")
18176 (source
18177 (origin
18178 (method git-fetch)
18179 (uri (git-reference
18180 (url "https://github.com/miracle2k/python-glob2")
18181 (commit (string-append "v" version))))
18182 (file-name (git-file-name name version))
18183 (sha256
18184 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18185 (build-system python-build-system)
18186 (home-page "https://github.com/miracle2k/python-glob2/")
18187 (synopsis "Extended Version of the python buildin glob module")
18188 (description "This is an extended version of the Python
18189@url{http://docs.python.org/library/glob.html, built-in glob module} which
18190adds:
18191
18192@itemize
18193@item The ability to capture the text matched by glob patterns, and return
18194those matches alongside the file names.
18195@item A recursive @code{**} globbing syntax, akin for example to the
18196@code{globstar} option of Bash.
18197@item The ability to replace the file system functions used, in order to glob
18198on virtual file systems.
18199@item Compatible with Python 2 and Python 3 (tested with 3.3).
18200@end itemize
18201
18202Glob2 currently based on the glob code from Python 3.3.1.")
18203 (license license:bsd-2)))
18204
18205(define-public python2-glob2
18206 (package-with-python2 python-glob2))
18207
18208(define-public python-gipc
18209 (package
18210 (name "python-gipc")
18211 (version "0.6.0")
18212 (source
18213 (origin
18214 (method url-fetch)
18215 (uri (pypi-uri "gipc" version ".zip"))
18216 (sha256
18217 (base32
18218 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18219 (build-system python-build-system)
18220 (native-inputs
18221 `(("unzip" ,unzip)))
18222 (propagated-inputs
18223 `(("python-gevent" ,python-gevent)))
18224 (home-page "https://gehrcke.de/gipc/")
18225 (synopsis "Child process management in the context of gevent")
18226 (description "Usage of Python's multiprocessing package in a
18227gevent-powered application may raise problems. With @code{gipc},
18228process-based child processes can safely be created anywhere within a
18229gevent-powered application.")
18230 (license license:expat)))
18231
18232(define-public python2-gipc
18233 (package-with-python2 python-gipc))
18234
18235(define-public python-fusepy
18236 (package
18237 (name "python-fusepy")
18238 (version "2.0.4")
18239 (source
18240 (origin
18241 (method url-fetch)
18242 (uri (pypi-uri "fusepy" version))
18243 (sha256
18244 (base32
18245 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18246 (build-system python-build-system)
18247 (arguments
18248 `(#:phases
18249 (modify-phases %standard-phases
18250 (add-before 'build 'set-library-file-name
18251 (lambda* (#:key inputs #:allow-other-keys)
18252 (let ((fuse (assoc-ref inputs "fuse")))
18253 (substitute* "fuse.py"
18254 (("find_library\\('fuse'\\)")
18255 (string-append "'" fuse "/lib/libfuse.so'")))
18256 #t))))))
18257 (propagated-inputs
18258 `(("fuse" ,fuse)))
18259 (home-page "https://github.com/fusepy/fusepy")
18260 (synopsis "Simple ctypes bindings for FUSE")
18261 (description "Python module that provides a simple interface to FUSE and
18262MacFUSE. The binding is created using the standard @code{ctypes} library.")
18263 (license license:isc)))
18264
18265(define-public python2-fusepy
18266 (package-with-python2 python-fusepy))
18267
18268(define-public python-fusepyng
18269 (package
18270 (name "python-fusepyng")
18271 (version "1.0.7")
18272 (source
18273 (origin
18274 (method url-fetch)
18275 (uri (pypi-uri "fusepyng" version))
18276 (sha256
18277 (base32
18278 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18279 (build-system python-build-system)
18280 (arguments
18281 '(#:phases
18282 (modify-phases %standard-phases
18283 (add-after 'unpack 'set-libfuse-path
18284 (lambda* (#:key inputs #:allow-other-keys)
18285 (let ((fuse (assoc-ref inputs "fuse")))
18286 (substitute* "fusepyng.py"
18287 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18288 (string-append "\"" fuse "/lib/libfuse.so\""))))
18289 #t)))))
18290 (inputs
18291 `(("fuse" ,fuse)))
18292 (propagated-inputs
18293 `(("python-paramiko" ,python-paramiko)))
18294 (home-page "https://github.com/rianhunter/fusepyng")
18295 (synopsis "Simple ctypes bindings for FUSE")
18296 (description "@code{fusepyng} is a Python module that provides a simple
18297interface to FUSE on various operating systems. It's just one file and is
18298implemented using @code{ctypes}.")
18299 (license license:isc)))
18300
18301(define-public python2-gdrivefs
18302 (package
18303 (name "python2-gdrivefs")
18304 (version "0.14.9")
18305 (source
18306 (origin
18307 (method url-fetch)
18308 (uri (pypi-uri "gdrivefs" version))
18309 (sha256
18310 (base32
18311 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18312 (build-system python-build-system)
18313 (arguments
18314 `(#:python ,python-2
18315 #:phases
18316 (modify-phases %standard-phases
18317 (add-before 'build 'patch-setup-py
18318 (lambda _
18319 ;; Update requirements from dependency==version
18320 ;; to dependency>=version
18321 (substitute* "gdrivefs/resources/requirements.txt"
18322 (("==") ">="))
18323 #t)))))
18324 (native-inputs
18325 `(("python2-gipc" ,python2-gipc)
18326 ("python2-gevent" ,python2-gevent)
18327 ("python2-greenlet" ,python2-greenlet)
18328 ("python2-httplib2" ,python2-httplib2)
18329 ("python2-uritemplate" ,python2-uritemplate)
18330 ("python2-oauth2client" ,python2-oauth2client)
18331 ("python2-six" ,python2-six)))
18332 (propagated-inputs
18333 `(("python2-dateutil" ,python2-dateutil)
18334 ("python2-fusepy" ,python2-fusepy)
18335 ("python2-google-api-client" ,python2-google-api-client)))
18336 (home-page "https://github.com/dsoprea/GDriveFS")
18337 (synopsis "Mount Google Drive as a local file system")
18338 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18339under Python 2.7.")
18340 (license license:gpl2)))
18341
18342(define-public python-userspacefs
18343 (package
18344 (name "python-userspacefs")
18345 (version "1.0.13")
18346 (source
18347 (origin
18348 (method url-fetch)
18349 (uri (pypi-uri "userspacefs" version))
18350 (sha256
18351 (base32
18352 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18353 (build-system python-build-system)
18354 (propagated-inputs
18355 `(("python-fusepyng" ,python-fusepyng)))
18356 (home-page "https://github.com/rianhunter/userspacefs")
18357 (synopsis "User-space file systems for Python")
18358 (description
18359 "@code{userspacefs} is a library that allows you to easily write
18360user-space file systems in Python.")
18361 (license license:gpl3+)))
18362
18363(define-public pybind11
18364 (package
18365 (name "pybind11")
18366 (version "2.4.3")
18367 (source (origin
18368 (method git-fetch)
18369 (uri (git-reference
18370 (url "https://github.com/pybind/pybind11")
18371 (commit (string-append "v" version))))
18372 (sha256
18373 (base32
18374 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18375 (file-name (git-file-name name version))))
18376 (build-system cmake-build-system)
18377 (native-inputs
18378 `(("python" ,python-wrapper)
18379
18380 ;; The following dependencies are used for tests.
18381 ("python-pytest" ,python-pytest)
18382 ("catch" ,catch-framework2-1)
18383 ("eigen" ,eigen)))
18384 (arguments
18385 `(#:configure-flags
18386 (list (string-append "-DCATCH_INCLUDE_DIR="
18387 (assoc-ref %build-inputs "catch")
18388 "/include/catch"))
18389
18390 #:phases (modify-phases %standard-phases
18391 (add-after 'install 'install-python
18392 (lambda* (#:key outputs #:allow-other-keys)
18393 (let ((out (assoc-ref outputs "out")))
18394 (with-directory-excursion "../source"
18395 (setenv "PYBIND11_USE_CMAKE" "yes")
18396 (invoke "python" "setup.py" "install"
18397 "--single-version-externally-managed"
18398 "--root=/"
18399 (string-append "--prefix=" out)))))))
18400
18401 #:test-target "check"))
18402 (home-page "https://github.com/pybind/pybind11/")
18403 (synopsis "Seamless operability between C++11 and Python")
18404 (description
18405 "@code{pybind11} is a lightweight header-only library that exposes C++
18406types in Python and vice versa, mainly to create Python bindings of existing
18407C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18408library: to minimize boilerplate code in traditional extension modules by
18409inferring type information using compile-time introspection.")
18410 (license license:bsd-3)))
18411
18412(define-public python-fasteners
18413 (package
18414 (name "python-fasteners")
18415 (version "0.15")
18416 (source
18417 (origin
18418 (method url-fetch)
18419 (uri (pypi-uri "fasteners" version))
18420 (sha256
18421 (base32
18422 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18423 (build-system python-build-system)
18424 (propagated-inputs
18425 `(("python-monotonic" ,python-monotonic)
18426 ("python-six" ,python-six)))
18427 (native-inputs
18428 `(("python-testtools" ,python-testtools)))
18429 (home-page "https://github.com/harlowja/fasteners")
18430 (synopsis "Python package that provides useful locks")
18431 (description
18432 "This package provides a Python program that provides following locks:
18433
18434@itemize
18435@item Locking decorator
18436@item Reader-writer locks
18437@item Inter-process locks
18438@item Generic helpers
18439@end itemize\n")
18440 (properties `((python2-variant . ,(delay python2-fasteners))))
18441 (license license:asl2.0)))
18442
18443(define-public python2-fasteners
18444 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18445 (package
18446 (inherit base)
18447 (propagated-inputs
18448 `(("python2-futures" ,python2-futures)
18449 ,@(package-propagated-inputs base))))))
18450
18451(define-public python-requests-file
18452 (package
18453 (name "python-requests-file")
18454 (version "1.4.3")
18455 (source
18456 (origin
18457 (method url-fetch)
18458 (uri (pypi-uri "requests-file" version))
18459 (sha256
18460 (base32
18461 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18462 (build-system python-build-system)
18463 (propagated-inputs
18464 `(("python-requests" ,python-requests)
18465 ("python-six" ,python-six)))
18466 (home-page
18467 "https://github.com/dashea/requests-file")
18468 (synopsis "File transport adapter for Requests")
18469 (description
18470 "Requests-File is a transport adapter for use with the Requests Python
18471library to allow local file system access via @code{file://} URLs.")
18472 (license license:asl2.0)))
18473
18474(define-public python2-requests-file
18475 (package-with-python2 python-requests-file))
18476
18477(define-public python-identify
18478 (package
18479 (name "python-identify")
18480 (version "1.4.25")
18481 (source
18482 (origin
18483 ;; There are no tests in the PyPI tarball.
18484 (method git-fetch)
18485 (uri (git-reference
18486 (url "https://github.com/chriskuehl/identify")
18487 (commit (string-append "v" version))))
18488 (file-name (git-file-name name version))
18489 (sha256
18490 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18491 (build-system python-build-system)
18492 (arguments
18493 `(#:phases
18494 (modify-phases %standard-phases
18495 (replace 'check
18496 (lambda _
18497 (invoke "pytest" "-vv"))))))
18498 (native-inputs
18499 `(("python-coverage" ,python-coverage)
18500 ("python-pytest" ,python-pytest)))
18501 (propagated-inputs
18502 `(("python-editdistance" ,python-editdistance)))
18503 (home-page "https://github.com/chriskuehl/identify")
18504 (synopsis "File identification library for Python")
18505 (description
18506 "@code{identify} is a file identification library for Python. Given
18507a file (or some information about a file), return a set of standardized tags
18508identifying what the file is.")
18509 (license license:expat)))
18510
18511(define-public python-tldextract
18512 (package
18513 (name "python-tldextract")
18514 (version "2.2.0")
18515 (source
18516 (origin
18517 (method url-fetch)
18518 (uri (pypi-uri "tldextract" version))
18519 (sha256
18520 (base32
18521 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18522 (build-system python-build-system)
18523 (native-inputs
18524 `(("python-pytest" ,python-pytest)
18525 ("python-responses" ,python-responses)))
18526 (propagated-inputs
18527 `(("python-idna" ,python-idna)
18528 ("python-requests" ,python-requests)
18529 ("python-requests-file" ,python-requests-file)))
18530 (home-page
18531 "https://github.com/john-kurkowski/tldextract")
18532 (synopsis
18533 "Separate the TLD from the registered domain and subdomains of a URL")
18534 (description
18535 "TLDExtract accurately separates the TLD from the registered domain and
18536subdomains of a URL, using the Public Suffix List. By default, this includes
18537the public ICANN TLDs and their exceptions. It can optionally support the
18538Public Suffix List's private domains as well.")
18539 (license license:bsd-3)))
18540
18541(define-public python2-tldextract
18542 (package-with-python2 python-tldextract))
18543
18544(define-public python-nodeenv
18545 (package
18546 (name "python-nodeenv")
18547 (version "1.4.0")
18548 (source
18549 (origin
18550 ;; There's no tarball in PyPI.
18551 (method git-fetch)
18552 (uri (git-reference
18553 (url "https://github.com/ekalinin/nodeenv")
18554 (commit version)))
18555 (file-name (git-file-name name version))
18556 (sha256
18557 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18558 (build-system python-build-system)
18559 (arguments
18560 `(#:phases
18561 (modify-phases %standard-phases
18562 (replace 'check
18563 (lambda _
18564 ;; This test fails. It tries to open a network socket.
18565 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18566 (native-inputs
18567 `(("python-coverage" ,python-coverage)
18568 ("python-mock" ,python-mock)
18569 ("python-pytest" ,python-pytest)))
18570 (home-page "https://ekalinin.github.io/nodeenv/")
18571 (synopsis "Create isolated node.js environments")
18572 (description
18573 "Nodeenv (node.js virtual environment) is a tool to create isolated
18574node.js environments. It creates an environment that has its own installation
18575directories, that doesn't share libraries with other node.js virtual
18576environments.")
18577 (license license:bsd-3)))
18578
18579(define-public python-pynamecheap
18580 (package
18581 (name "python-pynamecheap")
18582 (version "0.0.3")
18583 (source
18584 (origin
18585 (method url-fetch)
18586 (uri (pypi-uri "PyNamecheap" version))
18587 (sha256
18588 (base32
18589 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18590 (build-system python-build-system)
18591 (propagated-inputs
18592 `(("python-requests" ,python-requests)))
18593 (home-page
18594 "https://github.com/Bemmu/PyNamecheap")
18595 (synopsis
18596 "Namecheap API client in Python")
18597 (description
18598 "PyNamecheap is a Namecheap API client in Python.")
18599 (license license:expat)))
18600
18601(define-public python2-pynamecheap
18602 (package-with-python2 python-pynamecheap))
18603
18604(define-public python-dns-lexicon
18605 (package
18606 (name "python-dns-lexicon")
18607 (version "2.4.0")
18608 (source
18609 (origin
18610 (method url-fetch)
18611 (uri (pypi-uri "dns-lexicon" version))
18612 (sha256
18613 (base32
18614 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18615 (build-system python-build-system)
18616 (arguments
18617 `(#:tests? #f)) ;requires internet access
18618 (propagated-inputs
18619 `(("python-future" ,python-future)
18620 ("python-pynamecheap" ,python-pynamecheap)
18621 ("python-requests" ,python-requests)
18622 ("python-tldextract" ,python-tldextract)
18623 ("python-urllib3" ,python-urllib3)))
18624 (home-page "https://github.com/AnalogJ/lexicon")
18625 (synopsis
18626 "Manipulate DNS records on various DNS providers")
18627 (description
18628 "Lexicon provides a way to manipulate DNS records on multiple DNS
18629providers in a standardized way. It has a CLI but it can also be used as a
18630Python library. It was designed to be used in automation, specifically with
18631Let's Encrypt.")
18632 (license license:expat)))
18633
18634(define-public python2-dns-lexicon
18635 (package-with-python2 python-dns-lexicon))
18636
18637(define-public python-cfgv
18638 (package
18639 (name "python-cfgv")
18640 (version "3.1.0")
18641 (source
18642 (origin
18643 ;; There are no tests in the PyPI tarball.
18644 (method git-fetch)
18645 (uri (git-reference
18646 (url "https://github.com/asottile/cfgv")
18647 (commit (string-append "v" version))))
18648 (file-name (git-file-name name version))
18649 (sha256
18650 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
18651 (build-system python-build-system)
18652 (arguments
18653 `(#:phases
18654 (modify-phases %standard-phases
18655 (replace 'check
18656 (lambda _
18657 (invoke "pytest" "-vv"))))))
18658 (native-inputs
18659 `(("python-covdefaults" ,python-covdefaults)
18660 ("python-coverage" ,python-coverage)
18661 ("python-pytest" ,python-pytest)))
18662 (home-page "https://github.com/asottile/cfgv")
18663 (synopsis "Configuration validation library")
18664 (description
18665 "This library helps to validate configuration files and produce human
18666readable error messages.")
18667 (license license:expat)))
18668
18669(define-public python-commandlines
18670 (package
18671 (name "python-commandlines")
18672 (version "0.4.1")
18673 (source
18674 (origin
18675 (method url-fetch)
18676 (uri (pypi-uri "commandlines" version))
18677 (sha256
18678 (base32
18679 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
18680 (build-system python-build-system)
18681 (home-page "https://github.com/chrissimpkins/commandlines")
18682 (synopsis "Command line argument to object parsing library")
18683 (description
18684 "@code{Commandlines} is a Python library for command line application
18685development that supports command line argument parsing, command string
18686validation testing and application logic.")
18687 (license license:expat)))
18688
18689;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
18690;; python-numba. They have a very unflexible relationship.
18691(define-public python-numba
18692 (package
18693 (name "python-numba")
18694 (version "0.46.0")
18695 (source
18696 (origin
18697 (method url-fetch)
18698 (uri (pypi-uri "numba" version))
18699 (sha256
18700 (base32
18701 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
18702 (build-system python-build-system)
18703 (arguments
18704 `(#:modules ((guix build utils)
18705 (guix build python-build-system)
18706 (ice-9 ftw)
18707 (srfi srfi-1)
18708 (srfi srfi-26))
18709 #:phases
18710 (modify-phases %standard-phases
18711 (add-after 'unpack 'disable-proprietary-features
18712 (lambda _
18713 (setenv "NUMBA_DISABLE_HSA" "1")
18714 (setenv "NUMBA_DISABLE_CUDA" "1")
18715 #t))
18716 (add-after 'unpack 'remove-failing-tests
18717 (lambda _
18718 ;; FIXME: These tests fail for unknown reasons:
18719 ;; test_non_writable_pycache, test_non_creatable_pycache, and
18720 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
18721 (substitute* "numba/tests/test_dispatcher.py"
18722 (("def test(_non_writable_pycache)" _ m)
18723 (string-append "def guix_skip" m))
18724 (("def test(_non_creatable_pycache)" _ m)
18725 (string-append "def guix_skip" m))
18726 (("def test(_frozen)" _ m)
18727 (string-append "def guix_skip" m)))
18728
18729 ;; These tests fail because we don't run the tests from the build
18730 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
18731 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
18732 (substitute* "numba/tests/test_pycc.py"
18733 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
18734 (string-append "def guix_skip" m)))
18735
18736 ;; These tests fail because our version of Python does not have
18737 ;; a recognizable front-end for the Numba distribution to use
18738 ;; to check against.
18739 (substitute* "numba/tests/test_entrypoints.py"
18740 (("def test(_init_entrypoint)" _ m)
18741 (string-append "def guix_skip" m)))
18742 (substitute* "numba/tests/test_jitclasses.py"
18743 (("def test(_jitclass_longlabel_not_truncated)" _ m)
18744 (string-append "def guix_skip" m)))
18745 #t))
18746 (replace 'check
18747 (lambda _
18748 (let ((cwd (getcwd)))
18749 (setenv "PYTHONPATH"
18750 (string-append cwd "/build/"
18751 (find (cut string-prefix? "lib" <>)
18752 (scandir (string-append cwd "/build")))
18753 ":"
18754 (getenv "PYTHONPATH")))
18755 ;; Something is wrong with the PYTHONPATH when running the
18756 ;; tests from the build directory, as it complains about not being
18757 ;; able to import certain modules.
18758 (with-directory-excursion "/tmp"
18759 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
18760 #t)))))
18761 (propagated-inputs
18762 `(("python-llvmlite" ,python-llvmlite)
18763 ("python-numpy" ,python-numpy)
18764 ("python-singledispatch" ,python-singledispatch)))
18765 ;; Needed for tests.
18766 (inputs
18767 `(("python-jinja2" ,python-jinja2)
18768 ("python-pygments" ,python-pygments)))
18769 (home-page "https://numba.pydata.org")
18770 (synopsis "Compile Python code using LLVM")
18771 (description "Numba gives you the power to speed up your applications with
18772high performance functions written directly in Python. With a few
18773annotations, array-oriented and math-heavy Python code can be just-in-time
18774compiled to native machine instructions, similar in performance to C, C++ and
18775Fortran, without having to switch languages or Python interpreters.
18776
18777Numba works by generating optimized machine code using the LLVM compiler
18778infrastructure at import time, runtime, or statically (using the included pycc
18779tool).")
18780 (license license:bsd-3)))
18781
18782(define-public python-numcodecs
18783 (package
18784 (name "python-numcodecs")
18785 (version "0.6.4")
18786 (source
18787 (origin
18788 (method url-fetch)
18789 (uri (pypi-uri "numcodecs" version))
18790 (sha256
18791 (base32
18792 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
18793 (build-system python-build-system)
18794 (propagated-inputs
18795 `(("python-numpy" ,python-numpy)
18796 ("python-msgpack" ,python-msgpack)))
18797 (native-inputs
18798 `(("python-pytest" ,python-pytest)
18799 ("python-setuptools-scm" ,python-setuptools-scm)))
18800 (home-page "https://github.com/zarr-developers/numcodecs")
18801 (synopsis "Buffer compression and transformation codecs")
18802 (description
18803 "This Python package provides buffer compression and transformation
18804codecs for use in data storage and communication applications.")
18805 (license license:expat)))
18806
18807(define-public python-asciitree
18808 (package
18809 (name "python-asciitree")
18810 (version "0.3.3")
18811 (source
18812 (origin
18813 (method url-fetch)
18814 (uri (pypi-uri "asciitree" version))
18815 (sha256
18816 (base32
18817 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
18818 (build-system python-build-system)
18819 (home-page "https://github.com/mbr/asciitree")
18820 (synopsis "Draws ASCII trees")
18821 (description "This package draws tree structures using characters.")
18822 (license license:expat)))
18823
18824(define-public python-zarr
18825 (package
18826 (name "python-zarr")
18827 (version "2.4.0")
18828 (source
18829 (origin
18830 (method url-fetch)
18831 (uri (pypi-uri "zarr" version))
18832 (sha256
18833 (base32
18834 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
18835 (build-system python-build-system)
18836 (arguments
18837 `(#:phases
18838 (modify-phases %standard-phases
18839 (add-after 'unpack 'disable-service-tests
18840 (lambda _
18841 (setenv "ZARR_TEST_ABS" "0")
18842 (setenv "ZARR_TEST_MONGO" "0")
18843 (setenv "ZARR_TEST_REDIS" "0")
18844 #t))
18845 (replace 'check
18846 (lambda _
18847 (invoke "pytest" "-vv" "-k" "not lmdb")
18848 #t)))))
18849 (propagated-inputs
18850 `(("python-asciitree" ,python-asciitree)
18851 ("python-fasteners" ,python-fasteners)
18852 ("python-numcodecs" ,python-numcodecs)
18853 ("python-numpy" ,python-numpy)))
18854 (native-inputs
18855 `(("python-pytest" ,python-pytest)
18856 ("python-setuptools-scm" ,python-setuptools-scm)))
18857 (home-page "https://github.com/zarr-developers/zarr-python")
18858 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
18859 (description
18860 "This package provides an implementation of chunked, compressed,
18861N-dimensional arrays for Python.")
18862 (license license:expat)))
18863
18864(define-public python-anndata
18865 (package
18866 (name "python-anndata")
18867 (version "0.7.1")
18868 (source
18869 (origin
18870 (method url-fetch)
18871 (uri (pypi-uri "anndata" version))
18872 (sha256
18873 (base32
18874 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
18875 (build-system python-build-system)
18876 (arguments
18877 `(#:phases
18878 (modify-phases %standard-phases
18879 (add-after 'unpack 'delete-inconvenient-tests
18880 (lambda _
18881 ;; This test depends on python-scikit-learn.
18882 (delete-file "anndata/tests/test_inplace_subset.py")
18883 #t))
18884 (delete 'check)
18885 (add-after 'install 'check
18886 (lambda* (#:key inputs outputs #:allow-other-keys)
18887 (add-installed-pythonpath inputs outputs)
18888 (invoke "pytest" "-vv"))))))
18889 (propagated-inputs
18890 `(("python-h5py" ,python-h5py)
18891 ("python-importlib-metadata" ,python-importlib-metadata)
18892 ("python-natsort" ,python-natsort)
18893 ("python-numcodecs" ,python-numcodecs)
18894 ("python-packaging" ,python-packaging)
18895 ("python-pandas" ,python-pandas)
18896 ("python-scipy" ,python-scipy)
18897 ("python-zarr" ,python-zarr)))
18898 (native-inputs
18899 `(("python-joblib" ,python-joblib)
18900 ("python-pytest" ,python-pytest)
18901 ("python-setuptools-scm" ,python-setuptools-scm)))
18902 (home-page "https://github.com/theislab/anndata")
18903 (synopsis "Annotated data for data analysis pipelines")
18904 (description "Anndata is a package for simple (functional) high-level APIs
18905for data analysis pipelines. In this context, it provides an efficient,
18906scalable way of keeping track of data together with learned annotations and
18907reduces the code overhead typically encountered when using a mostly
18908object-oriented library such as @code{scikit-learn}.")
18909 (license license:bsd-3)))
18910
18911(define-public python-dill
18912 (package
18913 (name "python-dill")
18914 (version "0.3.1.1")
18915 (source
18916 (origin
18917 (method url-fetch)
18918 (uri (pypi-uri "dill" version))
18919 (sha256
18920 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
18921 (build-system python-build-system)
18922 (arguments
18923 `(#:phases
18924 (modify-phases %standard-phases
18925 (replace 'check
18926 (lambda _
18927 (with-directory-excursion "/tmp"
18928 (invoke "nosetests" "-v"))
18929 #t)))))
18930 (native-inputs
18931 `(("python-nose" ,python-nose)))
18932 (home-page "https://pypi.org/project/dill/")
18933 (synopsis "Serialize all of Python")
18934 (description "Dill extends Python's @code{pickle} module for serializing
18935and de-serializing Python objects to the majority of the built-in Python
18936types. Dill provides the user the same interface as the @code{pickle} module,
18937and also includes some additional features. In addition to pickling Python
18938objects, @code{dill} provides the ability to save the state of an interpreter
18939session in a single command. Hence, it would be feasible to save a
18940interpreter session, close the interpreter, ship the pickled file to another
18941computer, open a new interpreter, unpickle the session and thus continue from
18942the saved state of the original interpreter session.")
18943 (license license:bsd-3)))
18944
18945(define-public python-multiprocess
18946 (package
18947 (name "python-multiprocess")
18948 (version "0.70.9")
18949 (source
18950 (origin
18951 (method url-fetch)
18952 (uri (pypi-uri "multiprocess" version))
18953 (sha256
18954 (base32
18955 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
18956 (build-system python-build-system)
18957 (arguments
18958 `(#:phases
18959 (modify-phases %standard-phases
18960 (add-after 'unpack 'disable-broken-tests
18961 (lambda _
18962 ;; This test is broken as there is no keyboard interrupt.
18963 (substitute* "py3.7/multiprocess/tests/__init__.py"
18964 (("^(.*)def test_wait_result"
18965 line indent)
18966 (string-append indent
18967 "@unittest.skip(\"Disabled by Guix\")\n"
18968 line)))
18969 #t))
18970 ;; Tests must be run after installation.
18971 (delete 'check)
18972 (add-after 'install 'check
18973 (lambda* (#:key inputs outputs #:allow-other-keys)
18974 (add-installed-pythonpath inputs outputs)
18975 (invoke "python" "-m" "multiprocess.tests")
18976 #t)))))
18977 (propagated-inputs
18978 `(("python-dill" ,python-dill)))
18979 (home-page "https://pypi.org/project/multiprocess/")
18980 (synopsis "Multiprocessing and multithreading in Python")
18981 (description
18982 "This package is a fork of the multiprocessing Python package, a package
18983which supports the spawning of processes using the API of the standard
18984library's @code{threading} module.")
18985 (license license:bsd-3)))
18986
18987(define-public python-toolz
18988 (package
18989 (name "python-toolz")
18990 (version "0.9.0")
18991 (source
18992 (origin
18993 (method url-fetch)
18994 (uri (pypi-uri "toolz" version))
18995 (sha256
18996 (base32
18997 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
18998 (build-system python-build-system)
18999 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19000 ;; unregistered loader type"
19001 (arguments '(#:tests? #f))
19002 (home-page "https://github.com/pytoolz/toolz/")
19003 (synopsis "List processing tools and functional utilities")
19004 (description
19005 "This package provides a set of utility functions for iterators,
19006functions, and dictionaries.")
19007 (license license:bsd-3)))
19008
19009(define-public python2-toolz
19010 (package-with-python2 python-toolz))
19011
19012(define-public python-cytoolz
19013 (package
19014 (name "python-cytoolz")
19015 (version "0.9.0.1")
19016 (source
19017 (origin
19018 (method url-fetch)
19019 (uri (pypi-uri "cytoolz" version))
19020 (sha256
19021 (base32
19022 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19023 (build-system python-build-system)
19024 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19025 ;; 'exceptions'"
19026 (arguments '(#:tests? #f))
19027 (propagated-inputs
19028 `(("python-toolz" ,python-toolz)))
19029 (native-inputs
19030 `(("python-cython" ,python-cython)))
19031 (home-page "https://github.com/pytoolz/cytoolz")
19032 (synopsis "High performance functional utilities")
19033 (description
19034 "The cytoolz package implements the same API as provided by toolz. The
19035main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19036that is accessible to other projects developed in Cython.")
19037 (license license:bsd-3)))
19038
19039(define-public python-sortedcontainers
19040 (package
19041 (name "python-sortedcontainers")
19042 (version "2.1.0")
19043 (source
19044 (origin
19045 (method url-fetch)
19046 (uri (pypi-uri "sortedcontainers" version))
19047 (sha256
19048 (base32
19049 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19050 (build-system python-build-system)
19051 (arguments
19052 ;; FIXME: Tests require many extra dependencies, and would introduce
19053 ;; a circular dependency on hypothesis, which uses this package.
19054 '(#:tests? #f))
19055 (propagated-inputs
19056 `(("python-appdirs" ,python-appdirs)
19057 ("python-distlib" ,python-distlib)
19058 ("python-filelock" ,python-filelock)
19059 ("python-six" ,python-six-bootstrap)))
19060 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19061 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19062 (description
19063 "This package provides a sorted collections library, written in
19064pure-Python.")
19065 (license license:asl2.0)))
19066
19067(define-public python2-sortedcontainers
19068 (package-with-python2 python-sortedcontainers))
19069
19070(define-public python-cloudpickle
19071 (package
19072 (name "python-cloudpickle")
19073 (version "1.3.0")
19074 (source
19075 (origin
19076 (method url-fetch)
19077 (uri (pypi-uri "cloudpickle" version))
19078 (sha256
19079 (base32
19080 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19081 (build-system python-build-system)
19082 (arguments
19083 '(#:phases (modify-phases %standard-phases
19084 (add-before 'check 'do-not-override-PYTHONPATH
19085 (lambda _
19086 ;; Append to PYTHONPATH instead of overriding it so
19087 ;; that dependencies from Guix can be found.
19088 (substitute* "tests/testutils.py"
19089 (("env\\['PYTHONPATH'\\] = pythonpath")
19090 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19091 #t))
19092 (replace 'check
19093 (lambda* (#:key tests? #:allow-other-keys)
19094 (if tests?
19095 (invoke "pytest" "-s" "-vv")
19096 (format #t "test suite not run~%"))
19097 #t)))))
19098 (native-inputs
19099 `(;; For tests.
19100 ("python-psutil" ,python-psutil)
19101 ("python-pytest" ,python-pytest)
19102 ("python-tornado" ,python-tornado)))
19103 (home-page "https://github.com/cloudpipe/cloudpickle")
19104 (synopsis "Extended pickling support for Python objects")
19105 (description
19106 "Cloudpickle makes it possible to serialize Python constructs not
19107supported by the default pickle module from the Python standard library. It
19108is especially useful for cluster computing where Python expressions are
19109shipped over the network to execute on remote hosts, possibly close to the
19110data.")
19111 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19112 (license license:bsd-3)))
19113
19114(define-public python2-cloudpickle
19115 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19116 (package
19117 (inherit base)
19118 (native-inputs
19119 `(("python-mock" ,python2-mock)
19120 ,@(package-native-inputs base)))
19121 (propagated-inputs
19122 `(("python-futures" ,python2-futures)
19123 ,@(package-propagated-inputs base))))))
19124
19125(define-public python-locket
19126 (package
19127 (name "python-locket")
19128 (version "0.2.0")
19129 (source
19130 (origin
19131 (method url-fetch)
19132 (uri (pypi-uri "locket" version))
19133 (sha256
19134 (base32
19135 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19136 (build-system python-build-system)
19137 (home-page "https://github.com/mwilliamson/locket.py")
19138 (synopsis "File-based locks for Python")
19139 (description
19140 "Locket implements a lock that can be used by multiple processes provided
19141they use the same path.")
19142 (license license:bsd-2)))
19143
19144(define-public python2-locket
19145 (package-with-python2 python-locket))
19146
19147(define-public python-blosc
19148 (package
19149 (name "python-blosc")
19150 (version "1.5.1")
19151 (source
19152 (origin
19153 (method url-fetch)
19154 (uri (pypi-uri "blosc" version))
19155 (sha256
19156 (base32
19157 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19158 (build-system python-build-system)
19159 ;; FIXME: all tests pass, but then this error is printed:
19160 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19161 (arguments '(#:tests? #f))
19162 (propagated-inputs
19163 `(("python-numpy" ,python-numpy)))
19164 (home-page "https://github.com/blosc/python-blosc")
19165 (synopsis "Python wrapper for the Blosc data compressor library")
19166 (description "Blosc is a high performance compressor optimized for binary
19167data. It has been designed to transmit data to the processor cache faster
19168than the traditional, non-compressed, direct memory fetch approach via a
19169@code{memcpy()} system call.
19170
19171Blosc works well for compressing numerical arrays that contains data with
19172relatively low entropy, like sparse data, time series, grids with
19173regular-spaced values, etc.
19174
19175This Python package wraps the Blosc library.")
19176 (license license:bsd-3)))
19177
19178(define-public python2-blosc
19179 (package-with-python2 python-blosc))
19180
19181(define-public python-partd
19182 (package
19183 (name "python-partd")
19184 (version "0.3.9")
19185 (source
19186 (origin
19187 (method url-fetch)
19188 (uri (pypi-uri "partd" version))
19189 (sha256
19190 (base32
19191 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19192 (build-system python-build-system)
19193 (propagated-inputs
19194 `(("python-blosc" ,python-blosc)
19195 ("python-locket" ,python-locket)
19196 ("python-numpy" ,python-numpy)
19197 ("python-pandas" ,python-pandas)
19198 ("python-pyzmq" ,python-pyzmq)
19199 ("python-toolz" ,python-toolz)))
19200 (home-page "https://github.com/dask/partd/")
19201 (synopsis "Appendable key-value storage")
19202 (description "Partd stores key-value pairs. Values are raw bytes. We
19203append on old values. Partd excels at shuffling operations.")
19204 (license license:bsd-3)))
19205
19206(define-public python2-partd
19207 (package-with-python2 python-partd))
19208
19209(define-public python-fsspec
19210 (package
19211 (name "python-fsspec")
19212 (version "0.6.1")
19213 (source
19214 (origin
19215 (method url-fetch)
19216 (uri (pypi-uri "fsspec" version))
19217 (sha256
19218 (base32
19219 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19220 (build-system python-build-system)
19221 (arguments '(#:tests? #f)) ; there are none
19222 (home-page "https://github.com/intake/filesystem_spec")
19223 (synopsis "File-system specification")
19224 (description "The purpose of this package is to produce a template or
19225specification for a file-system interface, that specific implementations
19226should follow, so that applications making use of them can rely on a common
19227behavior and not have to worry about the specific internal implementation
19228decisions with any given backend.")
19229 (license license:bsd-3)))
19230
19231(define-public python-dask
19232 (package
19233 (name "python-dask")
19234 (version "2.14.0")
19235 (source
19236 (origin
19237 (method url-fetch)
19238 (uri (pypi-uri "dask" version))
19239 (sha256
19240 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19241 (build-system python-build-system)
19242 (arguments
19243 `(#:phases
19244 (modify-phases %standard-phases
19245 (add-after 'unpack 'disable-broken-tests
19246 (lambda _
19247 ;; This test is marked as xfail when pytest-xdist is used.
19248 (substitute* "dask/tests/test_threaded.py"
19249 (("def test_interrupt\\(\\)" m)
19250 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19251 m)))
19252 ;; This one fails with a type error:
19253 ;; TypeError: Already tz-aware, use tz_convert to convert.
19254 (substitute* "dask/dataframe/tests/test_shuffle.py"
19255 (("def test_set_index_timestamp\\(\\)" m)
19256 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19257 m)))
19258 #t))
19259 (replace 'check
19260 (lambda _ (invoke "pytest" "-vv"))))))
19261 (propagated-inputs
19262 `(("python-cloudpickle" ,python-cloudpickle)
19263 ("python-fsspec" ,python-fsspec)
19264 ("python-numpy" ,python-numpy)
19265 ("python-packaging" ,python-packaging)
19266 ("python-pandas" ,python-pandas)
19267 ("python-partd" ,python-partd)
19268 ("python-toolz" ,python-toolz)
19269 ("python-pyyaml" ,python-pyyaml)))
19270 (native-inputs
19271 `(("python-pytest" ,python-pytest)
19272 ("python-pytest-runner" ,python-pytest-runner)))
19273 (home-page "https://github.com/dask/dask/")
19274 (synopsis "Parallel computing with task scheduling")
19275 (description
19276 "Dask is a flexible parallel computing library for analytics. It
19277consists of two components: dynamic task scheduling optimized for computation,
19278and large data collections like parallel arrays, dataframes, and lists that
19279extend common interfaces like NumPy, Pandas, or Python iterators to
19280larger-than-memory or distributed environments. These parallel collections
19281run on top of the dynamic task schedulers. ")
19282 (license license:bsd-3)))
19283
19284(define-public python-ilinkedlist
19285 (package
19286 (name "python-ilinkedlist")
19287 (version "0.4.0")
19288 (source
19289 (origin
19290 (method url-fetch)
19291 (uri (pypi-uri "ilinkedlist" version))
19292 (sha256
19293 (base32
19294 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19295 (build-system python-build-system)
19296 (native-inputs `(("python-pytest" ,python-pytest)))
19297 (inputs `(("python" ,python)))
19298 (home-page "https://github.com/luther9/ilinkedlist-py")
19299 (synopsis "Immutable linked list library")
19300 (description
19301 "This is a implementation of immutable linked lists for Python. It
19302contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19303Since a linked list is treated as immutable, it is hashable, and its length
19304can be retrieved in constant time. Some of the terminology is inspired by
19305LISP. It is possible to create an improper list by creating a @code{Pair}
19306with a non-list @code{cdr}.")
19307 (license license:gpl3+)))
19308
19309(define-public python-readlike
19310 (package
19311 (name "python-readlike")
19312 (version "0.1.3")
19313 (source
19314 (origin
19315 (method url-fetch)
19316 (uri (pypi-uri "readlike" version))
19317 (sha256
19318 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19319 (build-system python-build-system)
19320 (home-page "https://github.com/jangler/readlike")
19321 (synopsis "GNU Readline-like line editing module")
19322 (description
19323 "This Python module provides line editing functions similar to the default
19324Emacs-style ones of GNU Readline. Unlike the Python standard library's
19325@code{readline} package, this one allows access to those capabilities in settings
19326outside of a standard command-line interface. It is especially well-suited to
19327interfacing with Urwid, due to a shared syntax for describing key inputs.
19328
19329Currently, all stateless Readline commands are implemented. Yanking and history
19330are not supported.")
19331 (license license:expat)))
19332
19333(define-public python2-readlike
19334 (package-with-python2 python-readlike))
19335
19336(define-public python-reparser
19337 (package
19338 (name "python-reparser")
19339 (version "1.4.3")
19340 (source
19341 (origin
19342 (method url-fetch)
19343 (uri (pypi-uri "ReParser" version))
19344 (sha256
19345 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19346 (build-system python-build-system)
19347 (home-page "https://github.com/xmikos/reparser")
19348 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19349 (description
19350 "This Python library provides a simple lexer/parser for inline markup based
19351on regular expressions.")
19352 (license license:expat)))
19353
19354(define-public python2-reparser
19355 (let ((reparser (package-with-python2
19356 (strip-python2-variant python-reparser))))
19357 (package (inherit reparser)
19358 (propagated-inputs
19359 `(("python2-enum34" ,python2-enum34)
19360 ,@(package-propagated-inputs reparser))))))
19361
19362(define-public python-retrying
19363 (package
19364 (name "python-retrying")
19365 (version "1.3.3")
19366 (source
19367 (origin
19368 (method git-fetch)
19369 (uri (git-reference
19370 (url "https://github.com/rholder/retrying")
19371 (commit (string-append "v" version))))
19372 (file-name (git-file-name name version))
19373 (sha256
19374 (base32
19375 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19376 (build-system python-build-system)
19377 (propagated-inputs
19378 `(("python-six" ,python-six)))
19379 (home-page "https://github.com/rholder/retrying")
19380 (synopsis "Library for adding retry behavior")
19381 (description "Retrying is a general-purpose retrying library to simplify
19382the task of adding retry behavior to just about anything.
19383
19384Features:
19385
19386@itemize
19387@item Generic Decorator API.
19388@item Specify stop condition (i.e. limit by number of attempts).
19389@item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19390@item Customize retrying on Exceptions.
19391@item Customize retrying on expected returned result.
19392@end itemize")
19393 (license license:asl2.0)))
19394
19395(define-public python-precis-i18n
19396 (package
19397 (name "python-precis-i18n")
19398 (version "1.0.0")
19399 (source
19400 (origin
19401 (method url-fetch)
19402 (uri (pypi-uri "precis_i18n" version))
19403 (sha256
19404 (base32
19405 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19406 (build-system python-build-system)
19407 (home-page "https://github.com/byllyfish/precis_i18n")
19408 (synopsis "Implementation of the PRECIS framework")
19409 (description
19410 "This module implements the PRECIS Framework as described in RFC 8264,
19411RFC 8265 and RFC 8266.")
19412 (license license:expat)))
19413
19414(define-public python-absl-py
19415 (package
19416 (name "python-absl-py")
19417 (version "0.6.1")
19418 (source
19419 (origin
19420 (method url-fetch)
19421 (uri (pypi-uri "absl-py" version))
19422 (sha256
19423 (base32
19424 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19425 (build-system python-build-system)
19426 (propagated-inputs
19427 `(("python-six" ,python-six)))
19428 (home-page "https://github.com/abseil/abseil-py")
19429 (synopsis "Abseil Python common libraries")
19430 (description
19431 "This package provides the Abseil Python Common Libraries, a collection
19432of Python libraries for building Python applications.")
19433 (license license:asl2.0)))
19434
19435(define-public python-astor
19436 (package
19437 (name "python-astor")
19438 (version "0.7.1")
19439 (source
19440 (origin
19441 (method url-fetch)
19442 (uri (pypi-uri "astor" version))
19443 (sha256
19444 (base32
19445 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19446 (build-system python-build-system)
19447 ;; FIXME: There are two errors and two test failures.
19448 (arguments `(#:tests? #f))
19449 (home-page "https://github.com/berkerpeksag/astor")
19450 (synopsis "Read and write Python ASTs")
19451 (description "Astor is designed to allow easy manipulation of Python
19452source via the Abstract Syntax Tree.")
19453 (license license:bsd-3)))
19454
19455(define-public python2-astor
19456 (package-with-python2 python-astor))
19457
19458(define-public python-astunparse
19459 (package
19460 (name "python-astunparse")
19461 (version "1.6.2")
19462 (source
19463 (origin
19464 (method url-fetch)
19465 (uri (pypi-uri "astunparse" version))
19466 (sha256
19467 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19468 (build-system python-build-system)
19469 (arguments '(#:tests? #f)) ; there are none
19470 (propagated-inputs
19471 `(("python-six" ,python-six)
19472 ("python-wheel" ,python-wheel)))
19473 (home-page "https://github.com/simonpercivall/astunparse")
19474 (synopsis "AST unparser for Python")
19475 (description "This package provides an AST unparser for Python. It is a
19476factored out version of @code{unparse} found in the Python source
19477distribution.")
19478 (license license:bsd-3)))
19479
19480(define-public python-gast
19481 (package
19482 (name "python-gast")
19483 (version "0.3.3")
19484 (source
19485 (origin
19486 (method url-fetch)
19487 (uri (pypi-uri "gast" version))
19488 (sha256
19489 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19490 (build-system python-build-system)
19491 (propagated-inputs
19492 `(("python-astunparse" ,python-astunparse)))
19493 (home-page "https://pypi.org/project/gast/")
19494 (synopsis "Generic Python AST that abstracts the underlying Python version")
19495 (description
19496 "GAST provides a compatibility layer between the AST of various Python
19497versions, as produced by @code{ast.parse} from the standard @code{ast}
19498module.")
19499 (license license:bsd-3)))
19500
19501(define-public python-wikidata
19502 (package
19503 (name "python-wikidata")
19504 (version "0.6.1")
19505 (source
19506 (origin
19507 (method url-fetch)
19508 (uri (pypi-uri "Wikidata" version))
19509 (sha256
19510 (base32
19511 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19512 (build-system python-build-system)
19513 (propagated-inputs
19514 `(("python-babel" ,python-babel)))
19515 (home-page "https://github.com/dahlia/wikidata")
19516 (synopsis "Wikidata client library")
19517 (description
19518 "This package provides a Python interface to
19519@url{https://www.wikidata.org/, Wikidata}.")
19520 (properties '((upstream-name . "Wikidata")))
19521 (license license:gpl3+)))
19522
19523(define-public python-doctest-ignore-unicode
19524 (package
19525 (name "python-doctest-ignore-unicode")
19526 (version "0.1.2")
19527 (source
19528 (origin
19529 (method url-fetch)
19530 (uri (pypi-uri "doctest-ignore-unicode" version))
19531 (sha256
19532 (base32
19533 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19534 (build-system python-build-system)
19535 (native-inputs
19536 `(("python-nose" ,python-nose)))
19537 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19538 (synopsis "Ignore Unicode literal prefixes in doctests")
19539 (description
19540 "This package adds support for a flag to ignore Unicode literal prefixes
19541in doctests.")
19542 (license license:asl2.0)))
19543
19544(define-public python-attr
19545 (package
19546 (name "python-attr")
19547 (version "0.3.1")
19548 (source
19549 (origin
19550 (method url-fetch)
19551 (uri (pypi-uri "attr" version))
19552 (sha256
19553 (base32
19554 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19555 (build-system python-build-system)
19556 (home-page "https://github.com/denis-ryzhkov/attr")
19557 (synopsis "Decorator for attributes of target function or class")
19558 (description "Simple decorator to set attributes of target function or
19559class in a @acronym{DRY, Don't Repeat Yourself} way.")
19560 (license license:expat)))
19561
19562(define-public python-construct
19563 (package
19564 (name "python-construct")
19565 (version "2.10.56")
19566 (source
19567 (origin
19568 (method url-fetch)
19569 (uri (pypi-uri "construct" version))
19570 (sha256
19571 (base32
19572 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19573 (build-system python-build-system)
19574 (arguments
19575 `(#:tests? #f)) ; No tests exist.
19576 (propagated-inputs
19577 `(("python-extras" ,python-extras)
19578 ("python-arrow" ,python-arrow)
19579 ("python-numpy" ,python-numpy)
19580 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19581 (home-page "https://construct.readthedocs.io")
19582 (synopsis "Declarative and symmetrical parser and builder for binary data")
19583 (description
19584 "This package provides both simple, atomic constructs (such as
19585integers of various sizes), as well as composite ones which allow you
19586form hierarchical and sequential structures of increasing complexity.
19587It features bit and byte granularity, easy debugging and testing, an
19588easy-to-extend subclass system, and lots of primitive constructs to
19589make your work easier.")
19590 (license license:expat)))
19591
19592(define-public python-outcome
19593 (package
19594 (name "python-outcome")
19595 (version "1.0.1")
19596 (source
19597 (origin
19598 (method url-fetch)
19599 (uri (pypi-uri "outcome" version))
19600 (sha256
19601 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19602 (build-system python-build-system)
19603 (arguments
19604 `(#:phases
19605 (modify-phases %standard-phases
19606 (replace 'check
19607 (lambda* (#:key inputs outputs #:allow-other-keys)
19608 (add-installed-pythonpath inputs outputs)
19609 (invoke "pytest" "-vv"))))))
19610 (native-inputs
19611 `(("python-pytest" ,python-pytest)
19612 ("python-pytest-cov" ,python-pytest-cov)
19613 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19614 (propagated-inputs
19615 `(("python-async-generator" ,python-async-generator)
19616 ("python-attrs" ,python-attrs)))
19617 (home-page "https://github.com/python-trio/outcome")
19618 (synopsis "Capture the outcome of Python function calls")
19619 (description
19620 "Capture the outcome of Python function calls. Extracted from the Trio
19621project.")
19622 ;; Either license applies.
19623 (license (list license:expat license:asl2.0))))
19624
19625(define-public python-trio
19626 (package
19627 (name "python-trio")
19628 (version "0.17.0")
19629 (source
19630 (origin
19631 (method url-fetch)
19632 (uri (pypi-uri "trio" version))
19633 (sha256
19634 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
19635 (build-system python-build-system)
19636 (arguments
19637 `(#:phases
19638 (modify-phases %standard-phases
19639 (add-before 'check 'change-home
19640 (lambda _
19641 ;; Tests require a writable home.
19642 (setenv "HOME" "/tmp")
19643 #t))
19644 (replace 'check
19645 (lambda _
19646 (invoke "pytest" "-vv" "-k"
19647 (string-append
19648 ;; This test times out.
19649 "not test_ki_protection_works"
19650 ;; Assertion errors.
19651 " and not test_guest_mode_ki"
19652 " and not test_run_in_trio_thread_ki"
19653 ;; These try to raise KeyboardInterrupt which does not work
19654 ;; in the build environment.
19655 " and not test_ki_self"
19656 " and not test_ki_wakes_us_up"
19657 ;; Failure in name resolution.
19658 " and not test_getnameinfo"
19659 " and not test_SocketType_resolve"
19660 ;; OSError: protocol not found.
19661 " and not test_getprotobyname")))))))
19662 (native-inputs
19663 `(("python-astor" ,python-astor)
19664 ("python-ipython" ,python-ipython)
19665 ("python-jedi" ,python-jedi)
19666 ("python-pylint" ,python-pylint)
19667 ("python-pyopenssl" ,python-pyopenssl)
19668 ("python-pytest" ,python-pytest)
19669 ("python-pytest-cov" ,python-pytest-cov)
19670 ("python-trustme" ,python-trustme)))
19671 (propagated-inputs
19672 `(("python-attrs" ,python-attrs)
19673 ("python-idna" ,python-idna)
19674 ("python-outcome" ,python-outcome)
19675 ("python-sniffio" ,python-sniffio)
19676 ("python-sortedcontainers"
19677 ,python-sortedcontainers)))
19678 (home-page "https://github.com/python-trio/trio")
19679 (synopsis "Friendly Python library for async concurrency and I/O")
19680 (description
19681 "Trio strives to be a production-quality, async/await-native I/O library
19682for Python. Like all async libraries, its main purpose is to help you write
19683programs that do multiple things at the same time with parallelized I/O.")
19684 ;; Either license applies.
19685 (license (list license:expat license:asl2.0))))
19686
19687(define-public python-trio-typing
19688 (package
19689 (name "python-trio-typing")
19690 (version "0.5.0")
19691 (source
19692 (origin
19693 (method url-fetch)
19694 (uri (pypi-uri "trio-typing" version))
19695 (sha256
19696 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
19697 (build-system python-build-system)
19698 (arguments
19699 `(#:phases
19700 (modify-phases %standard-phases
19701 (replace 'check
19702 (lambda _
19703 (invoke "pytest" "-vv"))))))
19704 (native-inputs
19705 `(("python-attrs" ,python-attrs)
19706 ("python-pytest" ,python-pytest)))
19707 (propagated-inputs
19708 `(("python-mypy" ,python-mypy)
19709 ("python-mypy-extensions"
19710 ,python-mypy-extensions)
19711 ("python-trio" ,python-trio)
19712 ("python-typing-extensions"
19713 ,python-typing-extensions)))
19714 (home-page "https://github.com/python-trio/trio-typing")
19715 (synopsis "Static type checking support for Trio and related projects")
19716 (description
19717 "This package provides:
19718
19719@itemize
19720@item PEP 561 typing stubs packages for the Trio project packages:
19721
19722@itemize
19723@item trio (@code{trio-stubs})
19724@item outcome (@code{outcome-stubs})
19725@item async_generator (@code{async_generator-stubs})
19726@end itemize
19727
19728@item A package @code{trio_typing} containing types that Trio programs often
19729want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
19730a mypy plugin that smooths over some limitations in the basic type hints.
19731@end itemize")
19732 ;; Either license applies.
19733 (license (list license:expat license:asl2.0))))
19734
19735(define-public python-humanize
19736 (package
19737 (name "python-humanize")
19738 (version "0.5.1")
19739 (source
19740 (origin
19741 (method url-fetch)
19742 (uri (pypi-uri "humanize" version))
19743 (sha256
19744 (base32
19745 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
19746 (arguments
19747 '(#:tests? #f)) ; tests not in pypi archive
19748 (build-system python-build-system)
19749 (home-page "https://github.com/jmoiron/humanize")
19750 (synopsis "Print numerical information in a human-readable form")
19751 (description "This package provides a Python module that displays numbers
19752and dates in \"human readable\" forms. For example, it would display
19753\"12345591313\" as \"12.3 billion\".")
19754 (license license:expat)))
19755
19756(define-public python-txaio
19757 (package
19758 (name "python-txaio")
19759 (version "18.8.1")
19760 (source
19761 (origin
19762 (method url-fetch)
19763 (uri (pypi-uri "txaio" version))
19764 (sha256
19765 (base32
19766 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
19767 (build-system python-build-system)
19768 (propagated-inputs
19769 `(("python-twisted" ,python-twisted)
19770 ("python-six" ,python-six)))
19771 (home-page "https://github.com/crossbario/txaio")
19772 (synopsis "Compatibility layer between Python asyncio and Twisted")
19773 (description "Txaio provides a compatibility layer between the Python
19774@code{asyncio} module and @code{Twisted}.")
19775 (license license:expat)))
19776
19777(define-public python-toolshed
19778 (package
19779 (name "python-toolshed")
19780 (version "0.4.6")
19781 (source
19782 (origin
19783 (method url-fetch)
19784 (uri (pypi-uri "toolshed" version))
19785 (sha256
19786 (base32
19787 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
19788 (build-system python-build-system)
19789 (native-inputs
19790 `(("python-nose" ,python-nose)))
19791 (home-page "https://github.com/brentp/toolshed/")
19792 (synopsis "Collection of modules and functions for working with data")
19793 (description "This is a collection of well-tested, simple modules and
19794functions that aim to reduce boilerplate when working with data.")
19795 (license license:bsd-2)))
19796
19797(define-public python-annoy
19798 (package
19799 (name "python-annoy")
19800 (version "1.15.1")
19801 (source
19802 (origin
19803 (method url-fetch)
19804 (uri (pypi-uri "annoy" version))
19805 (sha256
19806 (base32
19807 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
19808 (build-system python-build-system)
19809 (native-inputs
19810 `(("python-nose" ,python-nose)))
19811 (home-page "https://github.com/spotify/annoy/")
19812 (synopsis "Approximate nearest neighbors library")
19813 (description
19814 "Annoy is a C++ library with Python bindings to search for points in
19815space that are close to a given query point. It also creates large read-only
19816file-based data structures that are @code{mmap}ped into memory so that many
19817processes may share the same data.")
19818 (license license:asl2.0)))
19819
19820(define-public python-croniter
19821 (package
19822 (name "python-croniter")
19823 (version "0.3.34")
19824 (source (origin
19825 (method url-fetch)
19826 (uri (pypi-uri "croniter" version))
19827 (sha256
19828 (base32
19829 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
19830 (build-system python-build-system)
19831 (propagated-inputs
19832 `(("python-dateutil" ,python-dateutil)
19833 ("python-natsort" ,python-natsort)))
19834 (home-page "https://github.com/kiorky/croniter")
19835 (synopsis "Iterate datetime objects with cron-like syntax")
19836 (description
19837 "@code{croniter} provides iteration for datetime object with cron-like
19838format.")
19839 (license license:expat)))
19840
19841(define-public python-pylzma
19842 (package
19843 (name "python-pylzma")
19844 (version "0.5.0")
19845 (source
19846 (origin
19847 (method url-fetch)
19848 (uri (pypi-uri "pylzma" version))
19849 (sha256
19850 (base32
19851 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
19852 (build-system python-build-system)
19853 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
19854 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
19855 (description "This package provides Python bindings for the LZMA library
19856by Igor Pavlov.")
19857 (license license:lgpl2.1+)))
19858
19859(define-public python2-pylzma
19860 (package-with-python2 python-pylzma))
19861
19862(define-public python2-zeroconf
19863 (package
19864 (name "python2-zeroconf")
19865
19866 ;; This is the last version that supports Python 2.x.
19867 (version "0.19.1")
19868 (source
19869 (origin
19870 (method url-fetch)
19871 (uri (pypi-uri "zeroconf" version))
19872 (sha256
19873 (base32
19874 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
19875 (build-system python-build-system)
19876 (arguments
19877 `(#:python ,python-2
19878 #:phases
19879 (modify-phases %standard-phases
19880 (add-after 'unpack 'patch-requires
19881 (lambda* (#:key inputs #:allow-other-keys)
19882 (substitute* "setup.py"
19883 (("enum-compat")
19884 "enum34"))
19885 #t)))))
19886 (native-inputs
19887 `(("python2-six" ,python2-six)
19888 ("python2-enum32" ,python2-enum34)
19889 ("python2-netifaces" ,python2-netifaces)
19890 ("python2-typing" ,python2-typing)))
19891 (home-page "https://github.com/jstasiak/python-zeroconf")
19892 (synopsis "Pure Python mDNS service discovery")
19893 (description
19894 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
19895compatible).")
19896 (license license:lgpl2.1+)))
19897
19898(define-public python-bsddb3
19899 (package
19900 (name "python-bsddb3")
19901 (version "6.2.6")
19902 (source
19903 (origin
19904 (method url-fetch)
19905 (uri (pypi-uri "bsddb3" version))
19906 (sha256
19907 (base32
19908 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
19909 (build-system python-build-system)
19910 (inputs
19911 `(("bdb" ,bdb)))
19912 (arguments
19913 '(#:phases
19914 (modify-phases %standard-phases
19915 (add-after 'unpack 'configure-locations
19916 (lambda* (#:key inputs #:allow-other-keys)
19917 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
19918 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
19919 #t))
19920 (replace 'check
19921 (lambda _
19922 (invoke "python3" "test3.py" "-v"))))))
19923 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
19924 (synopsis "Python bindings for Oracle Berkeley DB")
19925 (description
19926 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
19927C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
19928Transaction objects, and each of these is exposed as a Python type in the
19929bsddb3.db module. The database objects can use various access methods: btree,
19930hash, recno, and queue. Complete support of Berkeley DB distributed
19931transactions. Complete support for Berkeley DB Replication Manager.
19932Complete support for Berkeley DB Base Replication. Support for RPC.")
19933 (license license:bsd-3)))
19934
19935(define-public python-dbfread
19936 (package
19937 (name "python-dbfread")
19938 (version "2.0.7")
19939 (source (origin
19940 (method url-fetch)
19941 (uri (pypi-uri "dbfread" version))
19942 (sha256
19943 (base32
19944 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
19945 (build-system python-build-system)
19946 (native-inputs
19947 `(("python-pytest" ,python-pytest)))
19948 (home-page "https://dbfread.readthedocs.io")
19949 (synopsis "Read DBF Files with Python")
19950 (description
19951 "This library reads DBF files and returns the data as native Python data
19952types for further processing. It is primarily intended for batch jobs and
19953one-off scripts.")
19954 (license license:expat)))
19955
19956(define-public python-cached-property
19957 (package
19958 (name "python-cached-property")
19959 (version "1.5.1")
19960 (source
19961 (origin
19962 (method url-fetch)
19963 (uri (pypi-uri "cached-property" version))
19964 (sha256
19965 (base32
19966 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
19967 (build-system python-build-system)
19968 (arguments
19969 `(#:phases
19970 (modify-phases %standard-phases
19971 ;; https://github.com/pydanny/cached-property/issues/131
19972 ;; recent versions of freezegun break one test
19973 (add-after 'unpack 'disable-broken-test
19974 (lambda _
19975 (substitute* "tests/test_cached_property.py"
19976 (("def test_threads_ttl_expiry\\(self\\)" m)
19977 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
19978 " " m)))
19979 #t)))))
19980 (native-inputs
19981 `(("python-freezegun" ,python-freezegun)))
19982 (home-page
19983 "https://github.com/pydanny/cached-property")
19984 (synopsis
19985 "Decorator for caching properties in classes")
19986 (description
19987 "This package provides a decorator which makes caching
19988time-or-computationally-expensive properties quick and easy and works in Python
199892 or 3.")
19990 (license license:bsd-3)))
19991
19992(define-public python-folium
19993 (package
19994 (name "python-folium")
19995 (version "0.11.0")
19996 (source
19997 (origin
19998 (method url-fetch)
19999 (uri (pypi-uri "folium" version))
20000 (sha256
20001 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20002 (build-system python-build-system)
20003 (propagated-inputs
20004 `(("python-branca" ,python-branca)
20005 ("python-jinja2" ,python-jinja2)
20006 ("python-numpy" ,python-numpy)
20007 ("python-requests" ,python-requests)))
20008 (native-inputs
20009 `(("python-pytest" ,python-pytest)))
20010 (home-page "https://github.com/python-visualization/folium")
20011 (synopsis "Make beautiful maps with Leaflet.js & Python")
20012 (description "@code{folium} makes it easy to visualize data that’s been
20013manipulated in Python on an interactive leaflet map. It enables both the
20014binding of data to a map for @code{choropleth} visualizations as well as
20015passing rich vector/raster/HTML visualizations as markers on the map.
20016
20017The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20018Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20019supports Image, Video, GeoJSON and TopoJSON overlays.")
20020 (license license:expat)))
20021
20022(define-public jube
20023 (package
20024 ;; This is a command-line tool, so no "python-" prefix.
20025 (name "jube")
20026 (version "2.2.2")
20027 (source (origin
20028 (method url-fetch)
20029 (uri (string-append
20030 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20031 version))
20032 (sha256
20033 (base32
20034 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20035 (file-name (string-append "jube-" version ".tar.gz"))))
20036 (build-system python-build-system)
20037 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20038 (synopsis "Benchmarking environment")
20039 (description
20040 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20041benchmarked application, benchmark data is stored in a format that allows JUBE
20042to deduct the desired information. This data can be parsed by automatic pre-
20043and post-processing scripts that draw information and store it more densely
20044for manual interpretation.")
20045 (license license:gpl3+)))
20046
20047(define-public python-pyroutelib3
20048 (package
20049 (name "python-pyroutelib3")
20050 (version "1.3.post1")
20051 (source
20052 (origin
20053 (method url-fetch)
20054 (uri (pypi-uri "pyroutelib3" version))
20055 (sha256
20056 (base32
20057 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20058 (build-system python-build-system)
20059 (propagated-inputs
20060 `(("python-dateutil" ,python-dateutil)))
20061 (home-page "https://github.com/MKuranowski/pyroutelib3")
20062 (synopsis "Library for simple routing on OSM data")
20063 (description "Library for simple routing on OSM data")
20064 (license license:gpl3+)))
20065
20066(define-public python-bibtexparser
20067 (package
20068 (name "python-bibtexparser")
20069 (version "1.1.0")
20070 (source
20071 (origin
20072 (method url-fetch)
20073 (uri (pypi-uri "bibtexparser" version))
20074 (sha256
20075 (base32
20076 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20077 (build-system python-build-system)
20078 (propagated-inputs
20079 `(("python-pyparsing" ,python-pyparsing)))
20080 (native-inputs
20081 `(("python-future" ,python-future)))
20082 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20083 (synopsis "Python library to parse BibTeX files")
20084 (description "BibtexParser is a Python library to parse BibTeX files.")
20085 (license (list license:bsd-3 license:lgpl3))))
20086
20087(define-public python-distro
20088 (package
20089 (name "python-distro")
20090 (version "1.4.0")
20091 (source
20092 (origin
20093 (method url-fetch)
20094 (uri (pypi-uri "distro" version))
20095 (sha256
20096 (base32
20097 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20098 (build-system python-build-system)
20099 (native-inputs
20100 `(("python-pytest" ,python-pytest)))
20101 (home-page "https://github.com/nir0s/distro")
20102 (synopsis
20103 "OS platform information API")
20104 (description
20105 "@code{distro} provides information about the OS distribution it runs on,
20106such as a reliable machine-readable ID, or version information.
20107
20108It is the recommended replacement for Python's original
20109`platform.linux_distribution` function (which will be removed in Python 3.8).
20110@code{distro} also provides a command-line interface to output the platform
20111information in various formats.")
20112 (license license:asl2.0)))
20113
20114(define-public python-cairosvg
20115 (package
20116 (name "python-cairosvg")
20117 (version "2.4.2")
20118 (source
20119 (origin
20120 (method url-fetch)
20121 (uri (pypi-uri "CairoSVG" version))
20122 (sha256
20123 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
20124 (build-system python-build-system)
20125 (arguments
20126 `(#:phases
20127 (modify-phases %standard-phases
20128 (replace 'check
20129 (lambda _ (invoke "pytest"))))))
20130 (propagated-inputs
20131 `(("python-cairocffi" ,python-cairocffi)
20132 ("python-cssselect2" ,python-cssselect2)
20133 ("python-defusedxml" ,python-defusedxml)
20134 ("python-pillow" ,python-pillow)
20135 ("python-tinycss2" ,python-tinycss2)))
20136 (native-inputs
20137 `(("python-pytest-flake8" ,python-pytest-flake8)
20138 ("python-pytest-isort" ,python-pytest-isort)
20139 ("python-pytest-runner" ,python-pytest-runner)))
20140 (home-page "https://cairosvg.org/")
20141 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20142 (description "CairoSVG is a SVG converter based on Cairo. It can export
20143SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20144SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20145parsed, the result is drawn to a Cairo surface that can be exported to
20146qvarious formats: PDF, PostScript, PNG and even SVG.")
20147 (license license:lgpl3+)))
20148
20149(define-public python-pyphen
20150 (package
20151 (name "python-pyphen")
20152 (version "0.9.5")
20153 (source
20154 (origin
20155 (method url-fetch)
20156 (uri (pypi-uri "Pyphen" version))
20157 (sha256
20158 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
20159 (build-system python-build-system)
20160 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20161 ;; embedded set provided by upstream - like Debian does.
20162 (home-page "https://github.com/Kozea/Pyphen")
20163 (synopsis "Pure Python module to hyphenate text")
20164 (description "Pyphen is a pure Python module to hyphenate text using
20165existing Hunspell hyphenation dictionaries.")
20166 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20167
20168(define-public python-intelhex
20169 (package
20170 (name "python-intelhex")
20171 (version "2.2.1")
20172 (source
20173 (origin
20174 (method url-fetch)
20175 (uri (pypi-uri "intelhex" version))
20176 (sha256
20177 (base32
20178 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20179 (build-system python-build-system)
20180 (arguments '(#:tests? #f)) ;issue with version
20181 (home-page "https://pypi.org/project/IntelHex/")
20182 (synopsis "Python library for Intel HEX files manipulations")
20183 (description "The Intel HEX file format is widely used in microprocessors
20184and microcontrollers area (embedded systems etc.) as the de facto standard for
20185representation of code to be programmed into microelectronic devices. This
20186package provides an intelhex Python library to read, write, create from
20187scratch and manipulate data from Intel HEX file format. It also includes
20188several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20189converters and more, those based on the library itself.")
20190 (license license:bsd-3)))
20191
20192(define-public python-pykwalify
20193 (package
20194 (name "python-pykwalify")
20195 (version "1.7.0")
20196 (source
20197 (origin
20198 (method url-fetch)
20199 (uri (pypi-uri "pykwalify" version))
20200 (sha256
20201 (base32
20202 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20203 (build-system python-build-system)
20204 (arguments '(#:tests? #f)) ;missing dependencies
20205 (propagated-inputs
20206 `(("python-dateutil" ,python-dateutil)
20207 ("python-docopt" ,python-docopt)
20208 ("python-pyyaml" ,python-pyyaml)))
20209 (home-page "https://github.com/grokzen/pykwalify")
20210 (synopsis
20211 "Python lib/cli for JSON/YAML schema validation")
20212 (description
20213 "This package provides a parser, schema validator, and data binding tool
20214for YAML and JSON.")
20215 (license license:expat)))
20216
20217(define-public python-dbusmock
20218 (package
20219 (name "python-dbusmock")
20220 (version "0.18.3")
20221 (source
20222 (origin
20223 (method url-fetch)
20224 (uri (pypi-uri "python-dbusmock" version))
20225 (sha256
20226 (base32
20227 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20228 (build-system python-build-system)
20229 (arguments
20230 '(#:phases
20231 (modify-phases %standard-phases
20232 (add-after 'unpack 'patch-shell-path
20233 (lambda _
20234 (substitute* "tests/test_code.py"
20235 (("/bin/bash") (which "bash")))
20236 #t)))))
20237 (native-inputs
20238 `(;; For tests.
20239 ("dbus" ,dbus) ; for dbus-daemon
20240 ("python-nose" ,python-nose)
20241 ("which" ,which)))
20242 (propagated-inputs
20243 `(("python-dbus" ,python-dbus)
20244 ("python-pygobject" ,python-pygobject)))
20245 (home-page "https://github.com/martinpitt/python-dbusmock")
20246 (synopsis "Python library for mock D-Bus objects")
20247 (description "python-dbusmock allows for the easy creation of mock objects on
20248D-Bus. This is useful for writing tests for software which talks to D-Bus
20249services such as upower, systemd, logind, gnome-session or others, and it is
20250hard (or impossible without root privileges) to set the state of the real
20251services to what you expect in your tests.")
20252 (license license:lgpl3+)))
20253
20254(define-public python-jsonplus
20255 (package
20256 (name "python-jsonplus")
20257 (version "0.8.0")
20258 (home-page "https://github.com/randomir/jsonplus")
20259 (source (origin
20260 (method url-fetch)
20261 (uri (pypi-uri "jsonplus" version))
20262 (sha256
20263 (base32
20264 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20265 (build-system python-build-system)
20266 ;; XXX: No tests on PyPI, and the repository has no tags.
20267 (arguments '(#:tests? #f))
20268 (propagated-inputs
20269 `(("python-dateutil" ,python-dateutil)
20270 ("python-simplejson" ,python-simplejson)
20271 ("python-sortedcontainers" ,python-sortedcontainers)))
20272 (synopsis "Serialize Python types to/from JSON")
20273 (description
20274 "This package provides functionality to serialize arbitrary data types
20275to and from JSON. Common data types are implemented and it is easy to
20276register custom encoders and decoders.")
20277 (license license:expat)))
20278
20279(define-public python-ujson
20280 (package
20281 (name "python-ujson")
20282 (version "2.0.3")
20283 (source
20284 (origin
20285 (method url-fetch)
20286 (uri (pypi-uri "ujson" version))
20287 (sha256
20288 (base32
20289 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
20290 (modules '((guix build utils)))
20291 (snippet
20292 '(begin (delete-file-recursively "deps") #t))))
20293 (build-system python-build-system)
20294 (arguments
20295 `(#:phases
20296 (modify-phases %standard-phases
20297 (add-after 'unpack 'link-to-system-double-conversion
20298 (lambda* (#:key inputs #:allow-other-keys)
20299 (let ((d-c (assoc-ref inputs "double-conversion")))
20300 (substitute* "setup.py"
20301 (("./deps/double-conversion/double-conversion\"")
20302 (string-append d-c "/include/double-conversion\""))
20303 (("-lstdc++" stdc)
20304 (string-append "-L" d-c "/lib\","
20305 " \"-ldouble-conversion\","
20306 " \"" stdc)))
20307 #t)))
20308 (replace 'check
20309 (lambda* (#:key inputs outputs #:allow-other-keys)
20310 (add-installed-pythonpath inputs outputs)
20311 (invoke "pytest"))))))
20312 (native-inputs
20313 `(("double-conversion" ,double-conversion)
20314 ("python-setuptools-scm" ,python-setuptools-scm)
20315 ("python-pytest" ,python-pytest)))
20316 (home-page "https://github.com/ultrajson/ultrajson")
20317 (synopsis "Ultra fast JSON encoder and decoder for Python")
20318 (description
20319 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20320bindings for Python 3.")
20321 (license license:bsd-3)))
20322
20323(define-public python-ujson-1
20324 (package
20325 (inherit python-ujson)
20326 (version "1.35")
20327 (source
20328 (origin
20329 (method url-fetch)
20330 (uri (pypi-uri "ujson" version))
20331 (sha256
20332 (base32
20333 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
20334 (arguments
20335 '(#:phases %standard-phases))
20336 (native-inputs '())
20337 (home-page "http://www.esn.me")
20338 (description
20339 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20340bindings for Python 2.5+ and 3.")))
20341
20342(define-public python2-ujson-1
20343 (package-with-python2 python-ujson-1))
20344
20345(define-public python-iocapture
20346 ;; The latest release is more than a year older than this commit.
20347 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20348 (revision "1"))
20349 (package
20350 (name "python-iocapture")
20351 (version "0.1.2")
20352 (source
20353 (origin
20354 (method git-fetch)
20355 (uri (git-reference
20356 (url "https://github.com/oinume/iocapture")
20357 (commit commit)))
20358 (file-name (git-file-name name version))
20359 (sha256
20360 (base32
20361 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20362 (build-system python-build-system)
20363 (arguments
20364 `(#:phases
20365 (modify-phases %standard-phases
20366 (delete 'check)
20367 (add-after 'install 'check
20368 (lambda* (#:key inputs outputs #:allow-other-keys)
20369 (add-installed-pythonpath inputs outputs)
20370 (invoke "py.test" "-v" "tests")
20371 #t)))))
20372 (propagated-inputs
20373 `(("python-flexmock" ,python-flexmock)
20374 ("python-pytest" ,python-pytest)
20375 ("python-pytest-cov" ,python-pytest-cov)
20376 ("python-six" ,python-six)))
20377 (home-page "https://github.com/oinume/iocapture")
20378 (synopsis "Python capturing tool for stdout and stderr")
20379 (description
20380 "This package helps you to capture the standard out (stdout) and the
20381standard error channel (stderr) in your program.")
20382 (license license:expat))))
20383
20384(define-public python-argh
20385 ;; There are 21 commits since the latest release containing important
20386 ;; improvements.
20387 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20388 (revision "1"))
20389 (package
20390 (name "python-argh")
20391 (version (git-version "0.26.2" revision commit))
20392 (source
20393 (origin
20394 (method git-fetch)
20395 (uri (git-reference
20396 (url "https://github.com/neithere/argh")
20397 (commit commit)))
20398 (file-name (git-file-name name version))
20399 (sha256
20400 (base32
20401 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20402 (build-system python-build-system)
20403 (propagated-inputs
20404 `(("python-iocapture" ,python-iocapture)
20405 ("python-mock" ,python-mock)
20406 ("python-pytest" ,python-pytest)
20407 ("python-pytest-cov" ,python-pytest-cov)
20408 ("python-pytest-xdist" ,python-pytest-xdist)
20409 ("python-tox" ,python-tox)))
20410 (home-page "https://github.com/neithere/argh/")
20411 (synopsis "Argparse wrapper with natural syntax")
20412 (description
20413 "python-argh is a small library that provides several layers of
20414abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20415always possible to declare a command with the highest possible (and least
20416flexible) layer and then tune the behaviour with any of the lower layers
20417including the native API of @code{python-argparse}.")
20418 (license license:lgpl3+))))
20419
20420(define-public python-ppft
20421 (package
20422 (name "python-ppft")
20423 (version "1.6.6.1")
20424 (source
20425 (origin
20426 (method url-fetch)
20427 (uri (pypi-uri "ppft" version))
20428 (sha256
20429 (base32
20430 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20431 (build-system python-build-system)
20432 (arguments '(#:tests? #f)) ; there are none
20433 (propagated-inputs
20434 `(("python-six" ,python-six)))
20435 (home-page "https://pypi.org/project/ppft/")
20436 (synopsis "Fork of Parallel Python")
20437 (description
20438 "This package is a fork of Parallel Python. The Parallel Python
20439module (@code{pp}) provides an easy and efficient way to create
20440parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20441computers and clusters. It features cross-platform portability and dynamic
20442load balancing.")
20443 (license license:bsd-3)))
20444
20445(define-public python-pox
20446 (package
20447 (name "python-pox")
20448 (version "0.2.7")
20449 (source
20450 (origin
20451 (method url-fetch)
20452 (uri (pypi-uri "pox" version))
20453 (sha256
20454 (base32
20455 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20456 (build-system python-build-system)
20457 (arguments
20458 `(#:phases
20459 (modify-phases %standard-phases
20460 (replace 'check
20461 (lambda _
20462 (mkdir-p "/tmp/guix")
20463 (setenv "SHELL" "bash")
20464 (setenv "USERNAME" "guix")
20465 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20466 (invoke "py.test" "-vv")
20467 #t)))))
20468 (native-inputs
20469 `(("python-pytest" ,python-pytest)
20470 ("which" ,which)))
20471 (home-page "https://pypi.org/project/pox/")
20472 (synopsis "Python utilities for file system exploration and automated builds")
20473 (description
20474 "Pox provides a collection of utilities for navigating and manipulating
20475file systems. This module is designed to facilitate some of the low-level
20476operating system interactions that are useful when exploring a file system on a
20477remote host. Pox provides Python equivalents of several shell commands such
20478as @command{which} and @command{find}. These commands allow automated
20479discovery of what has been installed on an operating system, and where the
20480essential tools are located.")
20481 (license license:bsd-3)))
20482
20483(define-public python-pathos
20484 (package
20485 (name "python-pathos")
20486 (version "0.2.5")
20487 (source
20488 (origin
20489 (method url-fetch)
20490 (uri (pypi-uri "pathos" version))
20491 (sha256
20492 (base32
20493 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20494 (build-system python-build-system)
20495 (arguments
20496 '(#:phases
20497 (modify-phases %standard-phases
20498 (replace 'check
20499 (lambda _
20500 (setenv "PYTHONPATH"
20501 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20502 (invoke "python" "./tests/__main__.py"))))))
20503 (propagated-inputs
20504 `(("python-dill" ,python-dill)
20505 ("python-multiprocess" ,python-multiprocess)
20506 ("python-pox" ,python-pox)
20507 ("python-ppft" ,python-ppft)))
20508 (native-inputs
20509 `(("python-pytest" ,python-pytest)))
20510 (home-page "https://pypi.org/project/pathos/")
20511 (synopsis
20512 "Parallel graph management and execution in heterogeneous computing")
20513 (description
20514 "Python-pathos is a framework for heterogeneous computing. It provides a
20515consistent high-level interface for configuring and launching parallel
20516computations across heterogeneous resources. Python-pathos provides configurable
20517launchers for parallel and distributed computing, where each launcher contains
20518the syntactic logic to configure and launch jobs in an execution environment.")
20519 (license license:bsd-3)))
20520
20521(define-public python-flit
20522 (package
20523 (name "python-flit")
20524 (version "2.1.0")
20525 (source
20526 (origin
20527 (method url-fetch)
20528 (uri (pypi-uri "flit" version))
20529 (sha256
20530 (base32
20531 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
20532 (build-system python-build-system)
20533 (arguments
20534 `(#:tests? #f)) ; XXX: Check requires network access.
20535 (home-page "https://flit.readthedocs.io/")
20536 (synopsis
20537 "Simple packaging tool for simple packages")
20538 (description
20539 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20540packages a single importable module or package at a time, using the import
20541name as the name on PyPI. All subpackages and data files within a package
20542are included automatically.")
20543 (license license:bsd-3)))
20544
20545(define-public python-pathtools
20546 (package
20547 (name "python-pathtools")
20548 (version "0.1.2")
20549 (source
20550 (origin
20551 (method url-fetch)
20552 (uri (pypi-uri "pathtools" version))
20553 (sha256
20554 (base32
20555 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20556 (build-system python-build-system)
20557 (home-page
20558 "https://github.com/gorakhargosh/pathtools")
20559 (synopsis "Path utilities for Python")
20560 (description "Pattern matching and various utilities for file systems
20561paths.")
20562 (license license:expat)))
20563
20564(define-public python-fastentrypoints
20565 (package
20566 (name "python-fastentrypoints")
20567 (version "0.12")
20568 (source
20569 (origin
20570 (method url-fetch)
20571 (uri (pypi-uri "fastentrypoints" version))
20572 (sha256
20573 (base32
20574 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20575 (build-system python-build-system)
20576 (home-page
20577 "https://github.com/ninjaaron/fast-entry_points")
20578 (synopsis
20579 "Makes entry_points specified in setup.py load more quickly")
20580 (description
20581 "Using entry_points in your setup.py makes scripts that start really
20582slowly because it imports pkg_resources. This package allows such setup
20583scripts to load entry points more quickly.")
20584 (license license:bsd-3)))
20585
20586(define-public python-funcparserlib
20587 (package
20588 (name "python-funcparserlib")
20589 (version "0.3.6")
20590 (source
20591 (origin
20592 (method url-fetch)
20593 (uri (pypi-uri "funcparserlib" version))
20594 (sha256
20595 (base32
20596 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20597 (native-inputs
20598 `(("python-tox" ,python-tox)))
20599 (arguments
20600 `(#:phases
20601 (modify-phases %standard-phases
20602 (replace 'check
20603 (lambda _
20604 (invoke "tox"))))))
20605 (build-system python-build-system)
20606 (home-page
20607 "https://github.com/vlasovskikh/funcparserlib")
20608 (synopsis
20609 "Recursive descent parsing library based on functional combinators")
20610 (description
20611 "This package is a recursive descent parsing library for Python based on
20612functional combinators. Parser combinators are just higher-order functions
20613that take parsers as their arguments and return them as result values.")
20614 (license license:expat)))
20615
20616(define-public python-speg
20617 (package
20618 (name "python-speg")
20619 (version "0.3")
20620 (source
20621 (origin
20622 (method url-fetch)
20623 (uri (pypi-uri "speg" version ".zip"))
20624 (sha256
20625 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20626 (arguments
20627 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20628 (native-inputs
20629 `(("unzip" ,unzip)))
20630 (build-system python-build-system)
20631 (home-page "https://github.com/avakar/speg")
20632 (synopsis "PEG-based parser interpreter with memoization")
20633 (description "This package is a PEG-based parser and interpreter with
20634memoization.")
20635 (license license:expat)))
20636
20637(define-public python-cson
20638 (package
20639 (name "python-cson")
20640 (version "0.8")
20641 (source
20642 (origin
20643 (method url-fetch)
20644 (uri (pypi-uri "cson" version))
20645 (sha256
20646 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20647 (build-system python-build-system)
20648 (propagated-inputs
20649 `(("python-speg" ,python-speg)))
20650 (home-page "https://github.com/avakar/pycson")
20651 (synopsis "Parser for Coffeescript Object Notation (CSON)")
20652 (description "This package is a parser for Coffeescript Object
20653Notation (CSON).")
20654 (license license:expat)))
20655
20656(define-public python-asynctest
20657 (package
20658 (name "python-asynctest")
20659 (version "0.13.0")
20660 (source
20661 (origin
20662 (method url-fetch)
20663 (uri (pypi-uri "asynctest" version))
20664 (sha256
20665 (base32
20666 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20667 (build-system python-build-system)
20668 (arguments
20669 '(#:phases
20670 (modify-phases %standard-phases
20671 (replace 'check
20672 (lambda _
20673 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20674 (add-after 'unpack 'disable-tests
20675 (lambda* _
20676 ;; XXX: 7 tests fail out of 220. Disable them for now.
20677 (substitute* (list "test/test_selector.py"
20678 "test/test_mock.py")
20679 (("def test_events_watched_outside_test_are_ignored")
20680 "@unittest.skip('disabled by guix')
20681 def test_events_watched_outside_test_are_ignored")
20682 (("def test_awaited_from_autospec_mock.*" line)
20683 (string-append line " return True\n"))
20684 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
20685 (string-append line " return True\n"))
20686 (("def test_patch_coroutine_with_multiple_scopes.*" line)
20687 (string-append line " return True\n"))
20688 (("def test_multiple_patches_on_coroutine.*" line)
20689 (string-append line " return True\n"))
20690 (("def test_patch_coroutine_only_when_running.*" line)
20691 (string-append line " return True\n")))
20692 #t)))))
20693 (home-page "https://github.com/Martiusweb/asynctest")
20694 (synopsis "Extension of unittest for testing asyncio libraries")
20695 (description
20696 "The package asynctest is built on top of the standard unittest module
20697and cuts down boilerplate code when testing libraries for asyncio.")
20698 (license license:asl2.0)))
20699
20700(define-public python-aionotify
20701 (package
20702 (name "python-aionotify")
20703 (version "0.2.0")
20704 (source
20705 (origin
20706 ;; Source tarball on PyPi lacks tests
20707 (method git-fetch)
20708 (uri (git-reference
20709 (url "https://github.com/rbarrois/aionotify")
20710 (commit (string-append "v" version))))
20711 (file-name (git-file-name name version))
20712 (sha256
20713 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
20714 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
20715 (build-system python-build-system)
20716 (home-page "https://github.com/rbarrois/aionotify")
20717 (synopsis "Asyncio-powered inotify library")
20718 (description
20719 "@code{aionotify} is a simple, asyncio-based inotify library.")
20720 (license license:bsd-3)))
20721
20722(define-public python-forbiddenfruit
20723 (package
20724 (name "python-forbiddenfruit")
20725 (version "0.1.3")
20726 (source
20727 (origin
20728 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
20729 (method git-fetch)
20730 (uri (git-reference
20731 (url "https://github.com/clarete/forbiddenfruit")
20732 (commit version)))
20733 (file-name (git-file-name name version))
20734 (sha256
20735 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
20736 (build-system python-build-system)
20737 (arguments
20738 '(#:phases
20739 (modify-phases %standard-phases
20740 (replace 'check
20741 (lambda _
20742 (invoke "make" "SKIP_DEPS=1"))))))
20743 (native-inputs
20744 `(("python-nose" ,python-nose)
20745 ("python-coverage" ,python-coverage)))
20746 (home-page "https://github.com/clarete/forbiddenfruit")
20747 (synopsis "Patch python built-in objects")
20748 (description "This project allows Python code to extend built-in types.")
20749 (license (list license:gpl3+ license:expat))))
20750
20751(define-public python-shouldbe
20752 (package
20753 (name "python-shouldbe")
20754 (version "0.1.2")
20755 (source
20756 (origin
20757 (method url-fetch)
20758 (uri (pypi-uri "shouldbe" version))
20759 (sha256
20760 (base32
20761 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
20762 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
20763 (build-system python-build-system)
20764 (propagated-inputs
20765 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
20766 (native-inputs
20767 `(("python-nose" ,python-nose)))
20768 (home-page "https://github.com/directxman12/should_be")
20769 (synopsis "Python Assertion Helpers inspired by Shouldly")
20770 (description
20771 "Python Assertion Helpers inspired by Shouldly.")
20772 (license license:isc)))
20773
20774(define-public python-k5test
20775 (package
20776 (name "python-k5test")
20777 (version "0.9.2")
20778 (source
20779 (origin
20780 (method url-fetch)
20781 (uri (pypi-uri "k5test" version))
20782 (sha256
20783 (base32
20784 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
20785 (build-system python-build-system)
20786 (propagated-inputs
20787 `(("python-six" ,python-six)
20788 ;; `which`, `kadmin.local` binaries called inside library
20789 ("which" ,which)
20790 ("mit-krb5" ,mit-krb5)))
20791 (native-inputs `(("mit-krb5" ,mit-krb5)))
20792 (arguments
20793 '(#:phases
20794 (modify-phases %standard-phases
20795 (add-after 'unpack 'patch-paths
20796 (lambda* _
20797 (substitute* "k5test/realm.py"
20798 (("'kadmin_local'") "'kadmin.local'")))))))
20799 (home-page "https://github.com/pythongssapi/k5test")
20800 (synopsis "Library for setting up self-contained Kerberos 5 environments")
20801 (description
20802 "@code{k5test} is a library for setting up self-contained Kerberos 5
20803environments, and running Python unit tests inside those environments. It is
20804based on the file of the same name found alongside the MIT Kerberos 5 unit
20805tests.")
20806 (license license:isc)))
20807
20808(define-public python-gssapi
20809 (package
20810 (name "python-gssapi")
20811 (version "1.6.9")
20812 (source
20813 (origin
20814 (method url-fetch)
20815 (uri (pypi-uri "gssapi" version))
20816 (sha256
20817 (base32
20818 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
20819 (build-system python-build-system)
20820 (arguments
20821 `(#:phases
20822 (modify-phases %standard-phases
20823 ;; Work around
20824 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
20825 (add-before 'check 'disable-failing-tests
20826 (lambda _
20827 (let ((reason "Disabled failing test (see: \
20828https://github.com/pythongssapi/python-gssapi/issues/220)."))
20829 (substitute* "gssapi/tests/test_high_level.py"
20830 ((".*def test_add_with_impersonate.*" all)
20831 (string-append all " self.skipTest('" reason "')\n")))
20832 (substitute* "gssapi/tests/test_raw.py"
20833 ((".*def test_.*impersonate_name.*" all)
20834 (string-append all " self.skipTest('" reason "')\n")))
20835 #t))))))
20836 (propagated-inputs
20837 `(("python-decorator" ,python-decorator)
20838 ("python-six" ,python-six)))
20839 (inputs
20840 `(("mit-krb5" ,mit-krb5)))
20841 ;; for tests
20842 (native-inputs
20843 `(("python-shouldbe" ,python-shouldbe)
20844 ("python-parameterized" ,python-parameterized)
20845 ("python-k5test" ,python-k5test)
20846 ("python-nose" ,python-nose)))
20847 (home-page "https://github.com/pythongssapi/python-gssapi")
20848 (synopsis "Python GSSAPI Wrapper")
20849 (description
20850 "Python-GSSAPI provides both low-level and high level wrappers around the
20851GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
20852also be usable with other GSSAPI mechanisms.")
20853 (license license:isc)))
20854
20855(define-public python-check-manifest
20856 (package
20857 (name "python-check-manifest")
20858 (version "0.37")
20859 (source
20860 (origin
20861 (method url-fetch)
20862 (uri (pypi-uri "check-manifest" version))
20863 (sha256
20864 (base32
20865 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
20866 (build-system python-build-system)
20867 (native-inputs
20868 `(("python-mock" ,python-mock)
20869 ("git" ,git)))
20870 (home-page "https://github.com/mgedmin/check-manifest")
20871 (synopsis "Check MANIFEST.in in a Python source package for completeness")
20872 (description "Python package can include a MANIFEST.in file to help with
20873sending package files to the Python Package Index. This package checks that
20874file to ensure it completely and accurately describes your project.")
20875 (license license:expat)))
20876
20877(define-public python-android-stringslib
20878 (package
20879 (name "python-android-stringslib")
20880 (version "0.1.2")
20881 (source
20882 (origin
20883 (method git-fetch)
20884 (uri (git-reference
20885 (url "https://framagit.org/tyreunom/python-android-strings-lib")
20886 (commit (string-append "v" version))))
20887 (file-name (git-file-name name version))
20888 (sha256
20889 (base32
20890 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
20891 (build-system python-build-system)
20892 (arguments
20893 `(#:tests? #f))
20894 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
20895 (synopsis "Android strings.xml support")
20896 (description "Android Strings Lib provides support for android's strings.xml
20897files. These files are used to translate strings in android apps.")
20898 (license license:expat)))
20899
20900(define-public python-watchdog
20901 (package
20902 (name "python-watchdog")
20903 (version "0.9.0")
20904 (source
20905 (origin
20906 (method url-fetch)
20907 (uri (pypi-uri "watchdog" version))
20908 (sha256
20909 (base32
20910 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
20911 (build-system python-build-system)
20912 (arguments
20913 `(#:phases
20914 (modify-phases %standard-phases
20915 (add-before 'check 'remove-failing
20916 (lambda _
20917 (delete-file "tests/test_inotify_buffer.py")
20918 (delete-file "tests/test_snapshot_diff.py")
20919 #t)))))
20920 (propagated-inputs
20921 `(("python-argh" ,python-argh)
20922 ("python-pathtools" ,python-pathtools)
20923 ("python-pyyaml" ,python-pyyaml)))
20924 (native-inputs
20925 `(("python-pytest-cov" ,python-pytest-cov)
20926 ("python-pytest-timeout" ,python-pytest-timeout)))
20927 (home-page "https://github.com/gorakhargosh/watchdog")
20928 (synopsis "File system events monitoring")
20929 (description "This package provides a way to monitor file system events
20930such as a file modification and trigger an action. This is similar to inotify,
20931but portable.")
20932 (license license:asl2.0)))
20933
20934(define-public python-watchgod
20935 (package
20936 (name "python-watchgod")
20937 (version "0.6")
20938 (source
20939 (origin
20940 ;; There are no tests in the PyPI tarball.
20941 (method git-fetch)
20942 (uri (git-reference
20943 (url "https://github.com/samuelcolvin/watchgod")
20944 (commit (string-append "v" version))))
20945 (file-name (git-file-name name version))
20946 (sha256
20947 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
20948 (build-system python-build-system)
20949 (arguments
20950 `(#:phases
20951 (modify-phases %standard-phases
20952 (replace 'check
20953 (lambda _
20954 (invoke "pytest" "-vv"))))))
20955 (native-inputs
20956 `(("python-coverage" ,python-coverage)
20957 ("python-docutils" ,python-docutils)
20958 ("python-flake8" ,python-flake8)
20959 ("python-isort" ,python-isort)
20960 ("python-pycodestyle" ,python-pycodestyle)
20961 ("python-pyflakes" ,python-pyflakes)
20962 ("python-pygments" ,python-pygments)
20963 ("python-pytest" ,python-pytest)
20964 ("python-pytest-cov" ,python-pytest-cov)
20965 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
20966 ("python-pytest-mock" ,python-pytest-mock)
20967 ("python-pytest-sugar" ,python-pytest-sugar)
20968 ("python-pytest-toolbox" ,python-pytest-toolbox)))
20969 (home-page "https://github.com/samuelcolvin/watchgod")
20970 (synopsis "Simple, modern file watching and code reload in Python")
20971 (description
20972 "Simple, modern file watching and code reload in Python inspired by
20973@code{watchdog}. Among the differences are a unified approach for each
20974operating systems and an elegant approach to concurrency using threading.")
20975 (license license:expat)))
20976
20977(define-public python-wget
20978 (package
20979 (name "python-wget")
20980 (version "3.2")
20981 (source
20982 (origin
20983 (method url-fetch)
20984 (uri (pypi-uri "wget" version ".zip"))
20985 (sha256
20986 (base32
20987 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
20988 (build-system python-build-system)
20989 (native-inputs `(("unzip" ,unzip)))
20990 (home-page "https://bitbucket.org/techtonik/python-wget/")
20991 (synopsis "Pure Python download utility")
20992 (description "The python-wget library provides an API to download files
20993with features similar to the @command{wget} utility.")
20994 (license license:unlicense)))
20995
20996(define-public offlate
20997 (package
20998 (name "offlate")
20999 (version "0.5")
21000 (source
21001 (origin
21002 (method git-fetch)
21003 (uri (git-reference
21004 (url "https://framagit.org/tyreunom/offlate")
21005 (commit version)))
21006 (file-name (git-file-name name version))
21007 (sha256
21008 (base32
21009 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21010 (build-system python-build-system)
21011 (arguments
21012 ;; No tests
21013 `(#:tests? #f))
21014 (propagated-inputs
21015 `(("python-android-stringslib" ,python-android-stringslib)
21016 ("python-dateutil" ,python-dateutil)
21017 ("python-gitlab" ,python-gitlab)
21018 ("python-lxml" ,python-lxml)
21019 ("python-polib" ,python-polib)
21020 ("python-pyenchant" ,python-pyenchant)
21021 ("python-pygit2" ,python-pygit2)
21022 ("python-pygithub" ,python-pygithub)
21023 ("python-pyqt" ,python-pyqt)
21024 ("python-requests" ,python-requests)
21025 ("python-ruamel.yaml" ,python-ruamel.yaml)
21026 ("python-translation-finder" ,python-translation-finder)
21027 ("python-watchdog" ,python-watchdog)))
21028 (native-inputs
21029 `(("qttools" ,qttools)))
21030 (home-page "https://framagit.org/tyreunom/offlate")
21031 (synopsis "Offline translation interface for online translation tools")
21032 (description "Offlate offers a unified interface for different translation
21033file formats, as well as many different online translation platforms. You can
21034use it to get work from online platforms, specialized such as the Translation
21035Project, or not such a gitlab instance when your upstream doesn't use any
21036dedicated platform. The tool proposes a unified interface for any format and
21037an upload option to send your work back to the platform.")
21038 (license license:gpl3+)))
21039
21040(define-public python-titlecase
21041 (package
21042 (name "python-titlecase")
21043 (version "0.12.0")
21044 (source
21045 (origin
21046 (method url-fetch)
21047 (uri (pypi-uri "titlecase" version))
21048 (sha256
21049 (base32
21050 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21051 (build-system python-build-system)
21052 (native-inputs
21053 `(("python-nose" ,python-nose)))
21054 (home-page "https://github.com/ppannuto/python-titlecase")
21055 (synopsis "Capitalize strings similar to book titles")
21056 (description
21057 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21058It capitalizes (predominantly English) strings in a way that is similar to
21059book titles, using the New York Times Manual of Style to leave certain words
21060lowercase.")
21061 (license license:expat)))
21062
21063(define-public python-pypng
21064 (package
21065 (name "python-pypng")
21066 (version "0.0.20")
21067 (source
21068 (origin
21069 (method url-fetch)
21070 (uri (pypi-uri "pypng" version))
21071 (sha256
21072 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21073 (build-system python-build-system)
21074 (home-page "https://github.com/drj11/pypng")
21075 (synopsis "Pure Python PNG image encoder/decoder")
21076 (description
21077 "The PyPNG module implements support for PNG images. It reads and writes
21078PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21079pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21080LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21081images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21082A number of optional chunks can be specified (when writing) and
21083understood (when reading): tRNS, bKGD, gAMA.
21084
21085PyPNG is not a high level toolkit for image processing (like PIL) and does not
21086aim at being a replacement or competitor. Its strength lies in fine-grained
21087extensive support of PNG features. It can also read and write Netpbm PAM
21088files, with a focus on its use as an intermediate format for implementing
21089custom PNG processing.")
21090 (license license:expat)))
21091
21092(define-public python-fuzzywuzzy
21093 (package
21094 (name "python-fuzzywuzzy")
21095 (version "0.18.0")
21096 (source
21097 (origin
21098 (method url-fetch)
21099 (uri (pypi-uri "fuzzywuzzy" version))
21100 (sha256
21101 (base32
21102 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21103 (build-system python-build-system)
21104 (native-inputs
21105 `(("python-hypothesis" ,python-hypothesis)
21106 ("python-pycodestyle" ,python-pycodestyle)
21107 ("python-pytest" ,python-pytest)))
21108 (propagated-inputs
21109 `(("python-levenshtein" ,python-levenshtein)))
21110 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21111 (synopsis "Fuzzy string matching in Python")
21112 (description "Approximate string matching using
21113@emph{Levenshtein Distance} to calculate the differences between
21114sequences.")
21115 (license license:gpl2)))
21116
21117(define-public python2-fuzzywuzzy
21118 (package-with-python2 python-fuzzywuzzy))
21119
21120(define-public python-block-tracing
21121 (package
21122 (name "python-block-tracing")
21123 (version "1.0.1")
21124 (source
21125 (origin
21126 (method url-fetch)
21127 (uri (pypi-uri "block_tracing" version))
21128 (sha256
21129 (base32
21130 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21131 (build-system python-build-system)
21132 (arguments '(#:tests? #f)) ; no tests
21133 (home-page "https://github.com/rianhunter/block_tracing")
21134 (synopsis "Protect process memory")
21135 (description
21136 "@code{block_tracing} is a tiny Python library that can be used to
21137prevent debuggers and other applications from inspecting the memory within
21138your process.")
21139 (license license:expat)))
21140
21141(define-public python-gcovr
21142 (package
21143 (name "python-gcovr")
21144 (version "4.2")
21145 (source
21146 (origin
21147 (method url-fetch)
21148 (uri (pypi-uri "gcovr" version))
21149 (sha256
21150 (base32
21151 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21152 (build-system python-build-system)
21153 (propagated-inputs
21154 `(("python-lxml" ,python-lxml)
21155 ("python-jinja2" ,python-jinja2)))
21156 (home-page "https://gcovr.com/")
21157 (synopsis "Utility for generating code coverage results")
21158 (description
21159 "Gcovr provides a utility for managing the use of the GNU gcov
21160utility and generating summarized code coverage results. It is inspired
21161by the Python coverage.py package, which provides a similar utility for
21162Python.")
21163 (license license:bsd-3)))
21164
21165(define-public python-owslib
21166 (package
21167 (name "python-owslib")
21168 (version "0.19.2")
21169 (source
21170 (origin
21171 (method url-fetch)
21172 (uri (pypi-uri "OWSLib" version))
21173 (sha256
21174 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21175 (build-system python-build-system)
21176 (arguments
21177 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21178 (synopsis "Interface for Open Geospatial Consortium web service")
21179 (description
21180 "OWSLib is a Python package for client programming with Open Geospatial
21181Consortium (OGC) web service (hence OWS) interface standards, and their related
21182content models.")
21183 (home-page "https://geopython.github.io/OWSLib/")
21184 (license license:bsd-3)))
21185
21186(define-public python-docusign-esign
21187 (package
21188 (name "python-docusign-esign")
21189 (version "3.1.0")
21190 (source (origin
21191 (method url-fetch)
21192 (uri (pypi-uri "docusign_esign" version))
21193 (sha256
21194 (base32
21195 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21196 (build-system python-build-system)
21197 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21198 (arguments `(#:tests? #f))
21199 (propagated-inputs
21200 `(("python-certifi" ,python-certifi)
21201 ("python-six" ,python-six)
21202 ("python-dateutil" ,python-dateutil)
21203 ("python-urllib3" ,python-urllib3)
21204 ("python-pyjwt" ,python-pyjwt)
21205 ("python-cryptography" ,python-cryptography)
21206 ("python-nose" ,python-nose)))
21207 (synopsis "DocuSign Python Client")
21208 (description "The Official DocuSign Python Client Library used to interact
21209 with the eSign REST API. Send, sign, and approve documents using this client.")
21210 (home-page "https://www.docusign.com/devcenter")
21211 (license license:expat)))
21212
21213(define-public python-xattr
21214 (package
21215 (name "python-xattr")
21216 (version "0.9.7")
21217 (source
21218 (origin
21219 (method url-fetch)
21220 (uri (pypi-uri "xattr" version))
21221 (sha256
21222 (base32
21223 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21224 (build-system python-build-system)
21225 (propagated-inputs
21226 `(("python-cffi" ,python-cffi)))
21227 (home-page "https://github.com/xattr/xattr")
21228 (synopsis
21229 "Python wrapper for extended file system attributes")
21230 (description "This package provides a Python wrapper for using extended
21231file system attributes. Extended attributes extend the basic attributes of files
21232and directories in the file system. They are stored as name:data pairs
21233associated with file system objects (files, directories, symlinks, etc).")
21234 (license license:expat)))
21235
21236(define-public python-json-logger
21237 (package
21238 (name "python-json-logger")
21239 (version "0.1.11")
21240 (source
21241 (origin
21242 (method url-fetch)
21243 (uri (pypi-uri "python-json-logger" version))
21244 (sha256
21245 (base32
21246 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21247 (build-system python-build-system)
21248 (home-page
21249 "https://github.com/madzak/python-json-logger")
21250 (synopsis "JSON log formatter in Python")
21251 (description "This library allows standard Python logging to output log data
21252as JSON objects. With JSON we can make our logs more readable by machines and
21253we can stop writing custom parsers for syslog-type records.")
21254 (license license:bsd-3)))
21255
21256(define-public python-daiquiri
21257 (package
21258 (name "python-daiquiri")
21259 (version "2.1.1")
21260 (source
21261 (origin
21262 (method url-fetch)
21263 (uri (pypi-uri "daiquiri" version))
21264 (sha256
21265 (base32
21266 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21267 (build-system python-build-system)
21268 (propagated-inputs
21269 `(("python-json-logger" ,python-json-logger)))
21270 (native-inputs
21271 `(("python-mock" ,python-mock)
21272 ("python-pytest" ,python-pytest)
21273 ("python-setuptools-scm" ,python-setuptools-scm)
21274 ("python-six" ,python-six)))
21275 (home-page "https://github.com/jd/daiquiri")
21276 (synopsis
21277 "Library to configure Python logging easily")
21278 (description "The daiquiri library provides an easy way to configure
21279logging in Python. It also provides some custom formatters and handlers.")
21280 (license license:asl2.0)))
21281
21282(define-public python-pifpaf
21283 (package
21284 (name "python-pifpaf")
21285 (version "2.5.0")
21286 (source
21287 (origin
21288 (method url-fetch)
21289 (uri (pypi-uri "pifpaf" version))
21290 (sha256
21291 (base32
21292 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21293 (build-system python-build-system)
21294 (arguments
21295 '(#:phases
21296 (modify-phases %standard-phases
21297 (replace 'check
21298 (lambda _
21299 (invoke "python" "setup.py" "testr" "--slowest"
21300 "--testr-args=until-failure"))))))
21301 (propagated-inputs
21302 `(("python-click" ,python-click)
21303 ("python-daiquiri" ,python-daiquiri)
21304 ("python-fixtures" ,python-fixtures)
21305 ("python-jinja2" ,python-jinja2)
21306 ("python-pbr" ,python-pbr)
21307 ("python-psutil" ,python-psutil)
21308 ("python-six" ,python-six)
21309 ("python-xattr" ,python-xattr)))
21310 (native-inputs
21311 `(("python-mock" ,python-mock)
21312 ("python-os-testr" ,python-os-testr)
21313 ("python-requests" ,python-requests)
21314 ("python-testrepository" ,python-testrepository)
21315 ("python-testtools" ,python-testtools)))
21316 (home-page "https://github.com/jd/pifpaf")
21317 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21318 (description "Pifpaf is a suite of fixtures and a command-line tool that
21319starts and stops daemons for a quick throw-away usage. This is typically
21320useful when needing these daemons to run integration testing. It originally
21321evolved from its precursor @code{overtest}.")
21322 (license license:asl2.0)))
21323
21324(define-public python-pytest-check-links
21325 (package
21326 (name "python-pytest-check-links")
21327 (version "0.3.0")
21328 (source
21329 (origin
21330 (method url-fetch)
21331 ;; URI uses underscores
21332 (uri (pypi-uri "pytest_check_links" version))
21333 (sha256
21334 (base32
21335 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21336 (build-system python-build-system)
21337 (propagated-inputs
21338 `(("python-docutils" ,python-docutils)
21339 ("python-html5lib" ,python-html5lib)
21340 ("python-nbconvert" ,python-nbconvert)
21341 ("python-nbformat" ,python-nbformat)
21342 ("python-pytest" ,python-pytest)
21343 ("python-six" ,python-six)))
21344 (native-inputs
21345 `(("python-pbr-minimal" ,python-pbr-minimal)))
21346 (home-page "https://github.com/minrk/pytest-check-links")
21347 (synopsis "Check links in files")
21348 (description "This package provides a pytest plugin that checks URLs for
21349HTML-containing files.")
21350 (license license:bsd-3)))
21351
21352(define-public python-json5
21353 (package
21354 (name "python-json5")
21355 (version "0.8.5")
21356 (source
21357 (origin
21358 ;; sample.json5 is missing from PyPi source tarball
21359 (method git-fetch)
21360 (uri (git-reference
21361 (url "https://github.com/dpranke/pyjson5")
21362 (commit (string-append "v" version))))
21363 (file-name (git-file-name name version))
21364 (sha256
21365 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21366 (build-system python-build-system)
21367 (home-page "https://github.com/dpranke/pyjson5")
21368 (synopsis
21369 "Python implementation of the JSON5 data format")
21370 (description
21371 "JSON5 extends the JSON data interchange format to make it slightly more
21372usable as a configuration language. This Python package implements parsing and
21373dumping of JSON5 data structures.")
21374 (license license:asl2.0)))
21375
21376(define-public python-frozendict
21377 (package
21378 (name "python-frozendict")
21379 (version "1.2")
21380 (source
21381 (origin
21382 (method url-fetch)
21383 (uri (pypi-uri "frozendict" version))
21384 (sha256
21385 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21386 (build-system python-build-system)
21387 (home-page "https://github.com/slezica/python-frozendict")
21388 (synopsis "Simple immutable mapping for Python")
21389 (description
21390 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21391implements the complete mapping interface. It can be used as a drop-in
21392replacement for dictionaries where immutability is desired.")
21393 (license license:expat)))
21394
21395(define-public python-unpaddedbase64
21396 (package
21397 (name "python-unpaddedbase64")
21398 (version "1.1.0")
21399 (source
21400 (origin
21401 (method git-fetch)
21402 (uri (git-reference
21403 (url "https://github.com/matrix-org/python-unpaddedbase64")
21404 (commit (string-append "v" version))))
21405 (file-name (git-file-name name version))
21406 (sha256
21407 (base32
21408 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21409 (build-system python-build-system)
21410 (home-page "https://pypi.org/project/unpaddedbase64/")
21411 (synopsis "Encode and decode Base64 without “=” padding")
21412 (description
21413 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21414using “=” characters. However this conveys no benefit so many protocols
21415choose to use Base64 without the “=” padding.")
21416 (license license:asl2.0)))
21417
21418(define-public python-py-cpuinfo
21419 (package
21420 (name "python-py-cpuinfo")
21421 (version "5.0.0")
21422 (source
21423 (origin
21424 (method url-fetch)
21425 (uri (pypi-uri "py-cpuinfo" version))
21426 (sha256
21427 (base32
21428 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21429 (build-system python-build-system)
21430 (home-page "https://github.com/workhorsy/py-cpuinfo")
21431 (synopsis "Get CPU info with Python")
21432 (description
21433 "This Python module returns the CPU info by using the best sources of
21434information for your operating system.")
21435 (license license:expat)))
21436
21437(define-public python-canonicaljson
21438 (package
21439 (name "python-canonicaljson")
21440 (version "1.1.4")
21441 (source
21442 (origin
21443 (method url-fetch)
21444 (uri (pypi-uri "canonicaljson" version))
21445 (sha256
21446 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
21447 (build-system python-build-system)
21448 (propagated-inputs
21449 `(("python-six" ,python-six)
21450 ("python-frozendict" ,python-frozendict)
21451 ("python-simplejson" ,python-simplejson)))
21452 (home-page "https://github.com/matrix-org/python-canonicaljson")
21453 (synopsis "Canonical JSON")
21454 (description
21455 "Deterministically encode JSON.
21456
21457@itemize
21458@item Encodes objects and arrays as RFC 7159 JSON.
21459@item Sorts object keys so that you get the same result each time.
21460@item Has no insignificant whitespace to make the output as small as possible.
21461@item Escapes only the characters that must be escaped, U+0000 to
21462 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21463@item Uses the shortest escape sequence for each escaped character.
21464@item Encodes the JSON as UTF-8.
21465@item Can encode frozendict immutable dictionaries.
21466@end itemize")
21467 (license license:asl2.0)))
21468
21469(define-public python-signedjson
21470 (package
21471 (name "python-signedjson")
21472 (version "1.1.1")
21473 (source
21474 (origin
21475 (method url-fetch)
21476 (uri (pypi-uri "signedjson" version))
21477 (sha256
21478 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21479 (build-system python-build-system)
21480 (propagated-inputs
21481 `(("python-canonicaljson" ,python-canonicaljson)
21482 ("python-importlib-metadata" ,python-importlib-metadata)
21483 ("python-pynacl" ,python-pynacl)
21484 ("python-typing-extensions" ,python-typing-extensions)
21485 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21486 (native-inputs
21487 `(("python-setuptools-scm" ,python-setuptools-scm)))
21488 (home-page "https://github.com/matrix-org/python-signedjson")
21489 (synopsis "Sign JSON objects with ED25519 signatures")
21490 (description
21491 "Sign JSON objects with ED25519 signatures.
21492
21493@itemize
21494@item More than one entity can sign the same object.
21495@item Each entity can sign the object with more than one key making it easier to
21496rotate keys
21497@item ED25519 can be replaced with a different algorithm.
21498@item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21499key.
21500@end itemize")
21501 (license license:asl2.0)))
21502
21503(define-public python-daemonize
21504 (package
21505 (name "python-daemonize")
21506 (version "2.5.0")
21507 (source
21508 (origin
21509 (method url-fetch)
21510 (uri (pypi-uri "daemonize" version))
21511 (sha256
21512 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21513 (build-system python-build-system)
21514 (home-page "https://github.com/thesharp/daemonize")
21515 (synopsis "Library for writing system daemons in Python")
21516 (description "Daemonize is a library for writing system daemons in Python.")
21517 (license license:expat)))
21518
21519(define-public python-pymacaroons
21520 (package
21521 (name "python-pymacaroons")
21522 (version "0.13.0")
21523 (source
21524 (origin
21525 (method url-fetch)
21526 (uri (pypi-uri "pymacaroons" version))
21527 (sha256
21528 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21529 (build-system python-build-system)
21530 (propagated-inputs
21531 `(("python-six" ,python-six)
21532 ("python-pynacl" ,python-pynacl)))
21533 (home-page "https://github.com/ecordell/pymacaroons")
21534 (synopsis "Python Macaroon Library")
21535 (description
21536 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21537tokens, macaroons embed caveats that define specific authorization
21538requirements for the target service, the service that issued the root macaroon
21539and which is capable of verifying the integrity of macaroons it receives.
21540
21541Macaroons allow for delegation and attenuation of authorization. They are
21542simple and fast to verify, and decouple authorization policy from the
21543enforcement of that policy.")
21544 (license license:expat)))
21545
21546(define-public python-ldap3
21547 (package
21548 (name "python-ldap3")
21549 (version "2.7")
21550 (home-page "https://github.com/cannatag/ldap3")
21551 (source
21552 (origin
21553 (method git-fetch)
21554 (uri (git-reference (url home-page)
21555 (commit (string-append "v" version))))
21556 (file-name (git-file-name name version))
21557 (sha256
21558 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21559 (build-system python-build-system)
21560 (arguments
21561 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21562 #:phases (modify-phases %standard-phases
21563 (replace 'check
21564 (lambda* (#:key tests? #:allow-other-keys)
21565 (when tests?
21566 (invoke "nosetests" "-s" "test"))
21567 #t)))))
21568 (native-inputs
21569 `(("python-nose" ,python-nose)))
21570 (propagated-inputs
21571 `(("python-gssapi" ,python-gssapi)
21572 ("python-pyasn1" ,python-pyasn1)))
21573 (synopsis "Python LDAP client")
21574 (description
21575 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21576library.")
21577 (license license:lgpl3+)))
21578
21579(define-public python-boltons
21580 (package
21581 (name "python-boltons")
21582 (version "20.0.0")
21583 (source
21584 (origin
21585 (method url-fetch)
21586 (uri (pypi-uri "boltons" version))
21587 (sha256
21588 (base32
21589 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21590 (build-system python-build-system)
21591 (home-page "https://github.com/mahmoud/boltons")
21592 (synopsis "Extensions to the Python standard library")
21593 (description
21594 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21595as — and yet conspicuously missing from — the standard library, including:
21596
21597@itemize
21598@item Atomic file saving, bolted on with fileutils
21599@item A highly-optimized OrderedMultiDict, in dictutils
21600@item Two types of PriorityQueue, in queueutils
21601@item Chunked and windowed iteration, in iterutils
21602@item Recursive data structure iteration and merging, with iterutils.remap
21603@item Exponential backoff functionality, including jitter, through
21604iterutils.backoff
21605@item A full-featured TracebackInfo type, for representing stack traces, in
21606tbutils
21607@end itemize")
21608 (license license:bsd-3)))
21609
21610(define-public python-eliot
21611 (package
21612 (name "python-eliot")
21613 (version "1.12.0")
21614 (source
21615 (origin
21616 (method url-fetch)
21617 (uri (pypi-uri "eliot" version))
21618 (sha256
21619 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21620 (build-system python-build-system)
21621 (arguments
21622 `(#:phases
21623 (modify-phases %standard-phases
21624 (add-after 'unpack 'remove-journald-support
21625 (lambda _
21626 (for-each delete-file
21627 '("eliot/tests/test_journald.py"
21628 "eliot/journald.py"))
21629 #t))
21630 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
21631 ;; remove command-line tool's tests. TODO eliot-prettyprint should
21632 ;; be installed and these tests should pass.
21633 (lambda _
21634 (delete-file "eliot/tests/test_prettyprint.py")
21635 #t)))))
21636 (propagated-inputs
21637 `(("python-boltons" ,python-boltons)
21638 ("python-pyrsistent" ,python-pyrsistent)
21639 ("python-six" ,python-six)
21640 ("python-zope-interface" ,python-zope-interface)))
21641 (native-inputs
21642 `(("python-black" ,python-black)
21643 ("python-coverage" ,python-coverage)
21644 ("python-dask" ,python-dask)
21645 ("python-flake8" ,python-flake8)
21646 ("python-hypothesis" ,python-hypothesis)
21647 ("python-pytest" ,python-pytest)
21648 ("python-setuptools" ,python-setuptools)
21649 ("python-sphinx" ,python-sphinx)
21650 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21651 ("python-testtools" ,python-testtools)
21652 ("python-twine" ,python-twine)
21653 ("python-twisted" ,python-twisted)))
21654 (home-page "https://github.com/itamarst/eliot/")
21655 (synopsis "Eliot: the logging system that tells you why it happened")
21656 (description
21657 "@dfn{eliot} is a Python logging system that outputs causal chains of
21658actions: actions can spawn other actions, and eventually they either succeed
21659or fail. The resulting logs tell you the story of what your software did: what
21660happened, and what caused it.")
21661 (license license:asl2.0)))
21662
21663(define-public python-pem
21664 (package
21665 (name "python-pem")
21666 (version "20.1.0")
21667 (source
21668 (origin
21669 (method url-fetch)
21670 (uri (pypi-uri "pem" version))
21671 (sha256
21672 (base32
21673 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
21674 (build-system python-build-system)
21675 (native-inputs
21676 `(("python-certifi" ,python-certifi)
21677 ("python-coverage" ,python-coverage)
21678 ("python-pretend" ,python-pretend)
21679 ("python-pyopenssl" ,python-pyopenssl)
21680 ("python-pytest" ,python-pytest)
21681 ("python-sphinx" ,python-sphinx)
21682 ("python-twisted" ,python-twisted)))
21683 (home-page "https://pem.readthedocs.io/")
21684 (synopsis "Easy PEM file parsing in Python")
21685 (description
21686 "This package provides a Python module for parsing and splitting PEM files.")
21687 (license license:expat)))
21688
21689(define-public python-txsni
21690 ;; We need a few commits on top of 0.1.9 for compatibility with newer
21691 ;; Python and OpenSSL.
21692 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
21693 (revision "0"))
21694 (package
21695 (name "python-txsni")
21696 (version (git-version "0.1.9" revision commit))
21697 (home-page "https://github.com/glyph/txsni")
21698 (source
21699 (origin
21700 (method git-fetch)
21701 (uri (git-reference (url home-page) (commit commit)))
21702 (file-name (git-file-name name version))
21703 (sha256
21704 (base32
21705 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
21706 (build-system python-build-system)
21707 (propagated-inputs
21708 `(("python-pyopenssl" ,python-pyopenssl)
21709 ("python-service-identity" ,python-service-identity)
21710 ("python-twisted" ,python-twisted)))
21711 (synopsis "Run TLS servers with Twisted")
21712 (description
21713 "This package provides an easy-to-use SNI endpoint for use
21714with the Twisted web framework.")
21715 (license license:expat))))
21716
21717(define-public python-txacme
21718 (package
21719 (name "python-txacme")
21720 (version "0.9.2")
21721 (source
21722 (origin
21723 (method url-fetch)
21724 (uri (pypi-uri "txacme" version))
21725 (sha256
21726 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
21727 (build-system python-build-system)
21728 (propagated-inputs
21729 `(("python-acme" ,python-acme)
21730 ("python-attrs" ,python-attrs)
21731 ("python-eliot" ,python-eliot)
21732 ("python-josepy" ,python-josepy)
21733 ("python-pem" ,python-pem)
21734 ("python-treq" ,python-treq)
21735 ("python-twisted" ,python-twisted)
21736 ("python-txsni" ,python-txsni)))
21737 (native-inputs
21738 `(("python-fixtures" ,python-fixtures)
21739 ("python-hypothesis" ,python-hypothesis)
21740 ("python-mock" ,python-mock)
21741 ("python-service-identity"
21742 ,python-service-identity)
21743 ("python-testrepository" ,python-testrepository)
21744 ("python-testscenarios" ,python-testscenarios)
21745 ("python-testtools" ,python-testtools)))
21746 (home-page "https://github.com/twisted/txacme")
21747 (synopsis "Twisted implexmentation of the ACME protocol")
21748 (description
21749 "ACME is Automatic Certificate Management Environment, a protocol that
21750allows clients and certificate authorities to automate verification and
21751certificate issuance. The ACME protocol is used by the free Let's Encrypt
21752Certificate Authority.
21753
21754txacme is an implementation of the protocol for Twisted, the event-driven
21755networking engine for Python.")
21756 (license license:expat)))
21757
21758(define-public python-pysaml2
21759 (package
21760 (name "python-pysaml2")
21761 (version "5.0.0")
21762 (source
21763 (origin
21764 (method url-fetch)
21765 (uri (pypi-uri "pysaml2" version))
21766 (sha256
21767 (base32
21768 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
21769 (build-system python-build-system)
21770 (propagated-inputs
21771 `(("python-cryptography" ,python-cryptography)
21772 ("python-dateutil" ,python-dateutil)
21773 ("python-defusedxml" ,python-defusedxml)
21774 ("python-pyopenssl" ,python-pyopenssl)
21775 ("python-pytz" ,python-pytz)
21776 ("python-requests" ,python-requests)
21777 ("python-six" ,python-six)))
21778 (home-page "https://idpy.org")
21779 (synopsis "Python implementation of SAML Version 2 Standard")
21780 (description
21781 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
21782It contains all necessary pieces for building a SAML2 service provider or
21783an identity provider. The distribution contains examples of both.
21784
21785This package was originally written to work in a WSGI environment, but
21786there are extensions that allow you to use it with other frameworks.")
21787 (license license:asl2.0)))
21788
21789(define-public python-click-plugins
21790 (package
21791 (name "python-click-plugins")
21792 (version "1.1.1")
21793 (source
21794 (origin
21795 (method url-fetch)
21796 (uri (pypi-uri "click-plugins" version))
21797 (sha256
21798 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
21799 (build-system python-build-system)
21800 (native-inputs
21801 `(("python-pytest" ,python-pytest)))
21802 (propagated-inputs
21803 `(("python-click" ,python-click)))
21804 (synopsis "Extension for Click to register external CLI commands")
21805 (description "This package provides n extension module for Click to
21806register external CLI commands via setuptools entry-points.")
21807 (home-page "https://github.com/click-contrib/click-plugins")
21808 (license license:bsd-3)))
21809
21810(define-public python-diceware
21811 (package
21812 (name "python-diceware")
21813 (version "0.9.6")
21814 (source
21815 (origin
21816 (method url-fetch)
21817 (uri (pypi-uri "diceware" version))
21818 (sha256
21819 (base32
21820 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
21821 (build-system python-build-system)
21822 (native-inputs
21823 `(("python-coverage" ,python-coverage)
21824 ("python-pytest" ,python-pytest)
21825 ("python-pytest-runner" ,python-pytest-runner)))
21826 (home-page "https://github.com/ulif/diceware/")
21827 (synopsis "Generates memorable passphrases")
21828 (description "This package generates passphrases by concatenating words
21829randomly picked from wordlists. It supports several sources of
21830randomness (including real life dice) and different wordlists (including
21831cryptographically signed ones).")
21832 (license license:gpl3+)))
21833
21834(define-public python-dictdiffer
21835 (package
21836 (name "python-dictdiffer")
21837 (version "0.8.1")
21838 (source (origin
21839 (method url-fetch)
21840 (uri (pypi-uri "dictdiffer" version))
21841 (sha256
21842 (base32
21843 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
21844 (build-system python-build-system)
21845 (native-inputs
21846 `(("python-check-manifest" ,python-check-manifest)
21847 ("python-coverage" ,python-coverage)
21848 ("python-isort" ,python-isort)
21849 ("python-mock" ,python-mock)
21850 ("python-pydoctstyle" ,python-pydocstyle)
21851 ("python-pytest-cache" ,python-pytest-cache)
21852 ("python-pytest-cov" ,python-pytest-cov)
21853 ("python-pytest-pep8" ,python-pytest-pep8)
21854 ("python-pytest-runner" ,python-pytest-runner)
21855 ("python-pytest" ,python-pytest)
21856 ("python-setuptools-scm" ,python-setuptools-scm)
21857 ("python-tox" ,python-tox)))
21858 (home-page "https://github.com/inveniosoftware/dictdiffer")
21859 (synopsis "Diff and patch Python dictionary objects")
21860 (description
21861 "Dictdiffer is a Python module that helps you to diff and patch
21862dictionaries.")
21863 (license license:expat)))
21864
21865(define-public pyzo
21866 (package
21867 (name "pyzo")
21868 (version "4.10.2")
21869 (source
21870 (origin
21871 (method url-fetch)
21872 (uri (pypi-uri "pyzo" version))
21873 (sha256
21874 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
21875 (build-system python-build-system)
21876 (arguments
21877 `(#:phases
21878 (modify-phases %standard-phases
21879 (add-before 'check 'fix-home-directory
21880 (lambda _
21881 ;; Tests fail with "Permission denied: '/homeless-shelter'".
21882 (setenv "HOME" "/tmp")
21883 #t)))
21884 ;; Tests fail with "Uncaught Python exception: invalid literal for
21885 ;; int() with base 10: 'test'".
21886 #:tests? #f))
21887 (propagated-inputs
21888 `(("python-pyqt" ,python-pyqt)))
21889 (home-page "https://pyzo.org")
21890 (synopsis
21891 "Python IDE for scientific computing")
21892 (description
21893 "Pyzo is a Python IDE focused on interactivity and introspection,
21894which makes it very suitable for scientific computing. Its practical
21895design is aimed at simplicity and efficiency.
21896
21897It consists of two main components, the editor and the shell, and uses
21898a set of pluggable tools to help the programmer in various ways. Some
21899example tools are source structure, project manager, interactive help,
21900workspace...")
21901 (license license:bsd-2)))
21902
21903(define-public python-osc
21904 (package
21905 (name "python-osc")
21906 (version "1.7.4")
21907 (source
21908 (origin
21909 (method url-fetch)
21910 (uri (pypi-uri "python-osc" version))
21911 (sha256
21912 (base32
21913 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
21914 (build-system python-build-system)
21915 (home-page "https://github.com/attwad/python-osc")
21916 (synopsis "Open Sound Control server and client implementations")
21917 (description
21918 "@code{python-osc} is a pure Python library with no external
21919dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
21920Open Sound Control 1.0} specification.")
21921 (license license:unlicense)))
21922
21923(define-public python-voluptuous
21924 (package
21925 (name "python-voluptuous")
21926 (version "0.11.7")
21927 (source
21928 (origin
21929 (method url-fetch)
21930 (uri (pypi-uri "voluptuous" version))
21931 (sha256
21932 (base32
21933 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
21934 (build-system python-build-system)
21935 (native-inputs
21936 `(("python-nose" ,python-nose)))
21937 (home-page "https://github.com/alecthomas/voluptuous")
21938 (synopsis "Python data validation library")
21939 (description
21940 "Voluptuous is a Python data validation library. It is primarily
21941intended for validating data coming into Python as JSON, YAML, etc.")
21942 (license license:bsd-3)))
21943
21944(define-public python-cmd2
21945 (package
21946 (name "python-cmd2")
21947 (version "1.0.2")
21948 (source
21949 (origin
21950 (method url-fetch)
21951 (uri (pypi-uri "cmd2" version))
21952 (sha256
21953 (base32
21954 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
21955 (build-system python-build-system)
21956 (propagated-inputs
21957 `(("python-attrs" ,python-attrs)
21958 ("python-colorama" ,python-colorama)
21959 ("python-pyperclip" ,python-pyperclip)
21960 ("python-wcwidth" ,python-wcwidth)))
21961 (native-inputs
21962 `(("python-codecov" ,python-codecov)
21963 ("python-coverage" ,python-coverage)
21964 ("python-doc8" ,python-doc8)
21965 ("python-flake8" ,python-flake8)
21966 ("python-invoke" ,python-invoke)
21967 ("python-mock" ,python-mock)
21968 ("python-pytest" ,python-pytest)
21969 ("python-pytest-cov" ,python-pytest-cov)
21970 ("python-pytest-mock" ,python-pytest-mock)
21971 ("python-setuptools-scm" ,python-setuptools-scm)
21972 ("python-sphinx" ,python-sphinx)
21973 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
21974 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21975 ("python-tox" ,python-tox)
21976 ("python-twine" ,python-twine)
21977 ("which" ,which)))
21978 (home-page "https://github.com/python-cmd2/cmd2")
21979 (synopsis "Tool for building interactive command line applications")
21980 (description
21981 "Cmd2 is a tool for building interactive command line applications in
21982Python. Its goal is to make it quick and easy for developers to build
21983feature-rich and user-friendly interactive command line applications. It
21984provides a simple API which is an extension of Python's built-in @code{cmd}
21985module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
21986make your life easier and eliminates much of the boilerplate code which would
21987be necessary when using @code{cmd}.")
21988 (license license:expat)))
21989
21990(define-public python-pytidylib
21991 (package
21992 (name "python-pytidylib")
21993 (version "0.3.2")
21994 (source (origin
21995 (method url-fetch)
21996 (uri (pypi-uri "pytidylib" version))
21997 (sha256
21998 (base32
21999 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22000 (build-system python-build-system)
22001 (arguments
22002 '(#:phases
22003 (modify-phases %standard-phases
22004 (add-before 'build 'qualify-libtidy
22005 (lambda* (#:key inputs #:allow-other-keys)
22006 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22007 "/lib/libtidy.so")))
22008 (substitute* "tidylib/tidy.py"
22009 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22010 (format #f "'~a'" libtidy)))
22011 #t))))))
22012 (inputs `(("tidy" ,tidy)))
22013 (home-page "https://github.com/countergram/pytidylib")
22014 (synopsis "Python wrapper for HTML Tidy library")
22015 (description
22016 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22017allows you, from Python code, to “fix” invalid (X)HTML markup.")
22018 (license license:expat)))
22019
22020(define-public python2-pytidylib
22021 (package-with-python2 python-pytidylib))
22022
22023(define-public python-mujson
22024 (package
22025 (name "python-mujson")
22026 (version "1.4")
22027 (source
22028 (origin
22029 (method url-fetch)
22030 (uri (pypi-uri "mujson" version))
22031 (sha256
22032 (base32
22033 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22034 (build-system python-build-system)
22035 (home-page "https://github.com/mattgiles/mujson")
22036 (synopsis "Use the fastest JSON functions available at import time")
22037 (description "This package selects the fastest JSON functions available
22038at import time.")
22039 (license license:expat)))
22040
22041(define-public python-bashlex
22042 (package
22043 (name "python-bashlex")
22044 (version "0.14")
22045 (source
22046 (origin
22047 (method url-fetch)
22048 (uri (pypi-uri "bashlex" version))
22049 (sha256
22050 (base32
22051 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22052 (build-system python-build-system)
22053 (arguments
22054 `(#:phases
22055 (modify-phases %standard-phases
22056 (add-before 'build 'pregenerate-yacc-tables
22057 (lambda _
22058 ;; parser.py caches tables, which attempts to write to site lib
22059 ;; see https://github.com/idank/bashlex/issues/51
22060 (invoke "python" "-c" "import bashlex"))))))
22061 (home-page
22062 "https://github.com/idank/bashlex")
22063 (synopsis "Python parser for bash")
22064 (description "@code{bashlex} is a Python port of the parser used
22065internally by GNU bash.
22066
22067For the most part it's transliterated from C, the major differences are:
22068
22069@itemize
22070@item it does not execute anything
22071@item it is reentrant
22072@item it generates a complete AST
22073@end itemize
22074")
22075 (license license:gpl3+)))
22076
22077(define-public python-jinxed
22078 (package
22079 (name "python-jinxed")
22080 (version "1.0.0")
22081 (source
22082 (origin
22083 (method url-fetch)
22084 (uri (pypi-uri "jinxed" version))
22085 (sha256
22086 (base32
22087 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22088 (build-system python-build-system)
22089 (arguments
22090 '(#:phases
22091 (modify-phases %standard-phases
22092 (add-before 'check 'set-environment-variables
22093 (lambda* (#:key inputs #:allow-other-keys)
22094 (let ((ncurses (assoc-ref inputs "ncurses")))
22095 (setenv "TERM" "LINUX")
22096 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22097 #t))))
22098 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22099 (native-inputs
22100 `(("ncurses" ,ncurses)))
22101 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22102 (synopsis "Jinxed Terminal Library")
22103 (description
22104 "Jinxed is an implementation of a subset of the Python curses library.")
22105 (license license:mpl2.0)))
22106
22107(define-public python-blessed
22108 (package
22109 (name "python-blessed")
22110 (version "1.17.8")
22111 (source
22112 (origin
22113 (method url-fetch)
22114 (uri (pypi-uri "blessed" version))
22115 (sha256
22116 (base32
22117 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22118 (modules '((guix build utils)))
22119 (snippet
22120 '(begin
22121 ;; Don't get hung up on Windows test failures.
22122 (delete-file "blessed/win_terminal.py") #t))))
22123 (build-system python-build-system)
22124 (propagated-inputs
22125 `(("python-jinxed" ,python-jinxed)
22126 ("python-six" ,python-six)
22127 ("python-wcwidth" ,python-wcwidth)))
22128 (native-inputs
22129 `(("python-mock" ,python-mock)
22130 ("python-pytest" ,python-pytest)))
22131 (home-page "https://github.com/jquast/blessed")
22132 (synopsis "Wrapper around terminal capabilities")
22133 (description
22134 "Blessed is a thin, practical wrapper around terminal styling, screen
22135positioning, and keyboard input.")
22136 (license license:expat)))
22137
22138(define-public python-readme-renderer
22139 (package
22140 (name "python-readme-renderer")
22141 (version "26.0")
22142 (source
22143 (origin
22144 (method url-fetch)
22145 (uri (pypi-uri "readme_renderer" version))
22146 (sha256
22147 (base32
22148 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22149 (build-system python-build-system)
22150 (propagated-inputs
22151 `(("python-bleach" ,python-bleach)
22152 ("python-docutils" ,python-docutils)
22153 ("python-pygments" ,python-pygments)
22154 ("python-six" ,python-six)))
22155 (native-inputs
22156 `(("python-mock" ,python-mock)
22157 ("python-pytest" ,python-pytest)))
22158 (home-page "https://github.com/pypa/readme_renderer")
22159 (synopsis "Render README files in Warehouse")
22160 (description
22161 "Readme Renderer is a library that will safely render arbitrary README
22162files into HTML. It is designed to be used in Warehouse to render the
22163@code{long_description} for packages. It can handle Markdown, reStructuredText,
22164and plain text.")
22165 (license license:asl2.0)))
22166
22167(define-public python-lazr-delegates
22168 (package
22169 (name "python-lazr-delegates")
22170 (version "2.0.4")
22171 (source
22172 (origin
22173 (method url-fetch)
22174 (uri (pypi-uri "lazr.delegates" version))
22175 (sha256
22176 (base32
22177 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22178 (build-system python-build-system)
22179 (arguments
22180 '(#:phases
22181 (modify-phases %standard-phases
22182 (replace 'check
22183 (lambda _
22184 (invoke "python" "setup.py" "nosetests"))))))
22185 (native-inputs
22186 `(("python-nose" ,python-nose)))
22187 (propagated-inputs
22188 `(("python-zope-interface" ,python-zope-interface)))
22189 (home-page "https://launchpad.net/lazr.delegates")
22190 (synopsis "Easily write objects that delegate behavior")
22191 (description
22192 "The @code{lazr.delegates} package makes it easy to write objects that
22193delegate behavior to another object. The new object adds some property or
22194behavior on to the other object, while still providing the underlying interface,
22195and delegating behavior.")
22196 (license license:lgpl3)))
22197
22198(define-public python-lazr-config
22199 (package
22200 (name "python-lazr-config")
22201 (version "2.2.2")
22202 (source
22203 (origin
22204 (method url-fetch)
22205 (uri (pypi-uri "lazr.config" version))
22206 (sha256
22207 (base32
22208 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22209 (build-system python-build-system)
22210 (arguments
22211 '(#:phases
22212 (modify-phases %standard-phases
22213 (replace 'check
22214 (lambda _
22215 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22216 (native-inputs
22217 `(("python-nose" ,python-nose)))
22218 (propagated-inputs
22219 `(("python-lazr-delegates" ,python-lazr-delegates)
22220 ("python-zope-interface" ,python-zope-interface)))
22221 (home-page "https://launchpad.net/lazr.config")
22222 (synopsis "Create configuration schemas and process and validate configurations")
22223 (description
22224 "The LAZR config system is typically used to manage process configuration.
22225Process configuration is for saying how things change when we run systems on
22226different machines, or under different circumstances. This system uses ini-like
22227file format of section, keys, and values. The config file supports inheritance
22228to minimize duplication of information across files. The format supports schema
22229validation.")
22230 (license license:lgpl3)))
22231
22232(define-public python-flufl-bounce
22233 (package
22234 (name "python-flufl-bounce")
22235 (version "3.0.1")
22236 (source
22237 (origin
22238 (method url-fetch)
22239 (uri (pypi-uri "flufl.bounce" version))
22240 (sha256
22241 (base32
22242 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22243 (build-system python-build-system)
22244 (propagated-inputs
22245 `(("python-atpublic" ,python-atpublic)
22246 ("python-zope-interface" ,python-zope-interface)))
22247 (native-inputs
22248 `(("python-nose2" ,python-nose2)))
22249 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22250 (synopsis "Email bounce detectors")
22251 (description "The @code{flufl.bounce} library provides a set of heuristics
22252and an API for detecting the original bouncing email addresses from a bounce
22253message. Many formats found in the wild are supported, as are VERP and
22254RFC 3464.")
22255 (license (list license:asl2.0
22256 license:lgpl3)))) ; only for setup_headers.py
22257
22258(define-public python-flufl-i18n
22259 (package
22260 (name "python-flufl-i18n")
22261 (version "3.0")
22262 (source
22263 (origin
22264 (method url-fetch)
22265 (uri (pypi-uri "flufl.i18n" version))
22266 (sha256
22267 (base32
22268 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22269 (build-system python-build-system)
22270 (propagated-inputs
22271 `(("python-atpublic" ,python-atpublic)))
22272 (home-page "https://flufli18n.readthedocs.io")
22273 (synopsis "API for Python internationalization")
22274 (description
22275 "This package provides a high-level, convenient API for managing
22276internationalization/translation contexts in Python applications. There is a
22277simple API for single-context applications, such as command line scripts which
22278only need to translate into one language during the entire course of their
22279execution. There is a more flexible, but still convenient API for multi-context
22280applications, such as servers, which may need to switch language contexts for
22281different tasks.")
22282 (license license:asl2.0)))
22283
22284(define-public python-flufl-lock
22285 (package
22286 (name "python-flufl-lock")
22287 (version "4.0")
22288 (source
22289 (origin
22290 (method url-fetch)
22291 (uri (pypi-uri "flufl.lock" version))
22292 (sha256
22293 (base32
22294 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22295 (build-system python-build-system)
22296 (propagated-inputs
22297 `(("python-atpublic" ,python-atpublic)
22298 ("python-psutil" ,python-psutil)))
22299 (home-page "https://flufllock.readthedocs.io")
22300 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22301 (description
22302 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22303timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22304@code{open} system call but uses a lockfile. Lock objects support lock-breaking
22305and have a maximum lifetime built-in.")
22306 (license (list license:asl2.0
22307 license:lgpl3)))) ; only for setup_helpers.py
22308
22309(define-public python-flufl-testing
22310 (package
22311 (name "python-flufl-testing")
22312 (version "0.8")
22313 (source
22314 (origin
22315 (method url-fetch)
22316 (uri (pypi-uri "flufl.testing" version))
22317 (sha256
22318 (base32
22319 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22320 (build-system python-build-system)
22321 (native-inputs
22322 `(("python-nose2" ,python-nose2)))
22323 (home-page "https://gitlab.com/warsaw/flufl.testing")
22324 (synopsis "Collection of test tool plugins")
22325 (description
22326 "This package contains a small collection of test tool plugins for
22327@code{nose2} and @code{flake8}.")
22328 (license license:asl2.0)))
22329
22330(define-public python-devtools
22331 (package
22332 (name "python-devtools")
22333 (version "0.6")
22334 (source
22335 (origin
22336 (method git-fetch)
22337 (uri (git-reference
22338 (url "https://github.com/samuelcolvin/python-devtools")
22339 (commit (string-append "v" version))))
22340 (file-name (git-file-name name version))
22341 (sha256
22342 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22343 (build-system python-build-system)
22344 (native-inputs
22345 `(("python-pytest" ,python-pytest)
22346 ("python-pytest-mock" ,python-pytest-mock)))
22347 (propagated-inputs
22348 `(("python-pygments" ,python-pygments)))
22349 (arguments
22350 `(#:phases (modify-phases %standard-phases
22351 (replace 'check
22352 (lambda _
22353 (invoke "pytest")
22354 #t)))))
22355 (home-page "https://github.com/samuelcolvin/python-devtools")
22356 (synopsis "Debug command and development tools")
22357 (description
22358 "This package provides a debug print command and other development tools.
22359It adds a simple and readable way to print stuff during development.")
22360 (license license:expat)))
22361
22362(define-public python-dateparser
22363 (package
22364 (name "python-dateparser")
22365 (version "0.7.6")
22366 (source
22367 (origin
22368 (method url-fetch)
22369 (uri (pypi-uri "dateparser" version))
22370 (sha256
22371 (base32
22372 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22373 (build-system python-build-system)
22374 (propagated-inputs
22375 `(("python-dateutil" ,python-dateutil)
22376 ("python-pytz" ,python-pytz)
22377 ("python-regex" ,python-regex)
22378 ("python-ruamel.yaml" ,python-ruamel.yaml)
22379 ("python-tzlocal" ,python-tzlocal)))
22380 (native-inputs
22381 `(("python-mock" ,python-mock)
22382 ("python-parameterized" ,python-parameterized)
22383 ("tzdata" ,tzdata-for-tests)))
22384 (arguments
22385 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22386 #:tests? #f
22387 #:phases
22388 (modify-phases %standard-phases
22389 (add-before 'check 'set-check-environment
22390 (lambda* (#:key inputs #:allow-other-keys)
22391 (setenv "TZ" "UTC")
22392 (setenv "TZDIR"
22393 (string-append (assoc-ref inputs "tzdata")
22394 "/share/zoneinfo"))
22395 #t)))))
22396 (home-page "https://github.com/scrapinghub/dateparser")
22397 (synopsis
22398 "Date parsing library designed to parse dates from HTML pages")
22399 (description
22400 "@code{python-dateparser} provides modules to easily parse localized
22401dates in almost any string formats commonly found on web pages.")
22402 (license license:bsd-3)))
22403
22404(define-public python-dparse
22405 (package
22406 (name "python-dparse")
22407 (version "0.5.1")
22408 (source
22409 (origin
22410 (method url-fetch)
22411 (uri (pypi-uri "dparse" version))
22412 (sha256
22413 (base32
22414 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22415 (build-system python-build-system)
22416 (native-inputs
22417 `(("python-pytest" ,python-pytest)))
22418 (propagated-inputs
22419 `(("python-packaging" ,python-packaging)
22420 ("python-pyyaml" ,python-pyyaml)
22421 ("python-toml" ,python-toml)))
22422 (home-page "https://github.com/pyupio/dparse")
22423 (synopsis "Parser for Python dependency files")
22424 (description "This package provides a parser for Python dependency files.")
22425 (license license:expat)))
22426
22427(define-public python-dpath
22428 (package
22429 (name "python-dpath")
22430 (version "2.0.1")
22431 (source
22432 (origin
22433 (method url-fetch)
22434 (uri (pypi-uri "dpath" version))
22435 (sha256
22436 (base32
22437 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22438 (build-system python-build-system)
22439 (native-inputs
22440 `(("python-hypothesis" ,python-hypothesis)
22441 ("python-mock" ,python-mock)
22442 ("python-nose" ,python-nose)))
22443 (arguments
22444 '(#:phases
22445 (modify-phases %standard-phases
22446 (replace 'check
22447 (lambda* (#:key inputs outputs #:allow-other-keys)
22448 (add-installed-pythonpath inputs outputs)
22449 ;; This invokation is taken from tox.ini.
22450 (invoke "nosetests" "-d" "-v" "tests/"))))))
22451 (home-page "https://github.com/akesterson/dpath-python")
22452 (synopsis "Filesystem-like pathing and searching for dictionaries")
22453 (description
22454 "@code{python-dpath} is a library for accessing and searching
22455dictionaries via /slashed/paths ala xpath.
22456
22457Basically it lets you glob over a dictionary as if it were a filesystem. It
22458allows you to specify globs (ala the bash eglob syntax, through some advanced
22459fnmatch.fnmatch magic) to access dictionary elements, and provides some
22460facility for filtering those results.")
22461 (license license:expat)))
22462
22463(define-public python-safety
22464 (package
22465 (name "python-safety")
22466 (version "1.9.0")
22467 (source
22468 (origin
22469 (method url-fetch)
22470 (uri (pypi-uri "safety" version))
22471 (sha256
22472 (base32
22473 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22474 (build-system python-build-system)
22475 (arguments
22476 `(#:phases
22477 (modify-phases %standard-phases
22478 (add-after 'unpack 'disable-tests
22479 (lambda _
22480 (substitute* "tests/test_safety.py"
22481 ;; requires network
22482 (("def test_check_live") "def _test_check_live"))
22483 #t)))))
22484 (propagated-inputs
22485 `(("python-click" ,python-click)
22486 ("python-dparse" ,python-dparse)
22487 ("python-packaging" ,python-packaging)
22488 ("python-requests" ,python-requests)))
22489 (home-page "https://github.com/pyupio/safety")
22490 (synopsis "Check installed dependencies for known vulnerabilities")
22491 (description "Safety checks installed dependencies for known vulnerabilities.
22492By default it uses the open Python vulnerability database Safety DB.")
22493 (license license:expat)))
22494
22495(define-public python-pypandoc
22496 (package
22497 (name "python-pypandoc")
22498 (version "1.5")
22499 (source
22500 (origin
22501 (method url-fetch)
22502 (uri (pypi-uri "pypandoc" version))
22503 (sha256
22504 (base32
22505 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22506 (build-system python-build-system)
22507 (inputs
22508 `(("pandoc" ,pandoc)
22509 ("pandoc-citeproc" ,pandoc-citeproc)))
22510 (propagated-inputs
22511 `(("wheel" ,python-wheel)))
22512 (native-inputs
22513 `(("texlive" ,(texlive-union (list texlive-amsfonts
22514 texlive-fonts-ec
22515 texlive-latex-hyperref
22516 texlive-latex-oberdiek
22517 texlive-lm
22518 texlive-xcolor)))))
22519 (arguments
22520 `(#:phases
22521 (modify-phases %standard-phases
22522 (add-before 'check 'disable-tests
22523 (lambda _
22524 ;; Disable test requiring network access
22525 (substitute* "tests.py"
22526 (("test_basic_conversion_from_http_url")
22527 "skip_test_basic_conversion_from_http_url"))
22528 ;; Needed by texlive-union to generate fonts
22529 (setenv "HOME" "/tmp")
22530 #t)))))
22531 (home-page "https://github.com/bebraw/pypandoc")
22532 (synopsis "Python wrapper for pandoc")
22533 (description "pypandoc is a thin Python wrapper around pandoc
22534and pandoc-citeproc.")
22535 (license license:expat)))
22536
22537(define-public python-rnc2rng
22538 (package
22539 (name "python-rnc2rng")
22540 (version "2.6.4")
22541 (source
22542 (origin
22543 (method url-fetch)
22544 (uri (pypi-uri "rnc2rng" version))
22545 (sha256
22546 (base32
22547 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22548 (build-system python-build-system)
22549 (propagated-inputs
22550 `(("python-rply" ,python-rply)))
22551 (arguments
22552 `(#:phases (modify-phases %standard-phases
22553 (replace 'check
22554 (lambda _
22555 (invoke "python" "test.py"))))))
22556 (home-page "https://github.com/djc/rnc2rng")
22557 (synopsis "Convert RELAX NG Compact to regular syntax")
22558 (description
22559 "This package provides the @command{rnc2rng} command-line tool as well as
22560a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22561equivalent schemata in the XML-based default RELAX NG syntax.")
22562 (license license:expat)))
22563
22564(define-public python-citeproc-py
22565 (package
22566 (name "python-citeproc-py")
22567 (version "0.5.1")
22568 (source
22569 (origin
22570 (method url-fetch)
22571 (uri (pypi-uri "citeproc-py" version))
22572 (sha256
22573 (base32
22574 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22575 (build-system python-build-system)
22576 (propagated-inputs
22577 `(("python-lxml" ,python-lxml)
22578 ("python-rnc2rng" ,python-rnc2rng)))
22579 (home-page
22580 "https://github.com/brechtm/citeproc-py")
22581 (synopsis "Citations and bibliography formatter")
22582 (description
22583 "Citeproc-py is a CSL processor for Python. It aims to implement the
22584CSL 1.0.1 specification. citeproc-py can output styled citations and
22585bibliographies in a number of different output formats. Currently supported
22586are plain text, reStructuredText and HTML.")
22587 (license license:bsd-2)))
22588
22589(define-public python-inform
22590 (package
22591 (name "python-inform")
22592 (version "1.23.0")
22593 (source
22594 (origin
22595 (method url-fetch)
22596 (uri (pypi-uri "inform" version))
22597 (sha256
22598 (base32
22599 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
22600 (build-system python-build-system)
22601 (arguments
22602 `(#:tests? #f)) ; PyPI tarball lacks tests
22603 (native-inputs
22604 `(("python-hypothesis" ,python-hypothesis)
22605 ("python-pytest-cov" ,python-pytest-cov)
22606 ("python-pytest-runner" ,python-pytest-runner)))
22607 (propagated-inputs
22608 `(("python-arrow" ,python-arrow)
22609 ("python-six" ,python-six)))
22610 (home-page "https://inform.readthedocs.io")
22611 (synopsis "Print & logging utilities for communicating with user")
22612 (description
22613 "Inform is designed to display messages from programs that are typically run from
22614a console. It provides a collection of ‘print’ functions that allow you to simply and
22615cleanly print different types of messages.")
22616 (license license:gpl3+)))
22617
22618(define-public python-nestedtext
22619 (package
22620 (name "python-nestedtext")
22621 (version "1.0.0")
22622 (source
22623 (origin
22624 (method url-fetch)
22625 (uri (pypi-uri "nestedtext" version))
22626 (sha256
22627 (base32
22628 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
22629 (build-system python-build-system)
22630 (arguments
22631 `(#:tests? #f)) ; PyPI tarball lacks tests
22632 (propagated-inputs
22633 `(("python-inform" ,python-inform)))
22634 (home-page "https://nestedtext.org")
22635 (synopsis "Human readable and writable data interchange format")
22636 (description
22637 "NestedText is a file format for holding data that is to be entered, edited, or
22638viewed by people. It allows data to be organized into a nested collection of
22639dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
22640without the complexity and risk of YAML and without the syntatic clutter of JSON.
22641NestedText is both simple and natural. Only a small number of concepts and rules must
22642be kept in mind when creating it. It is easily created, modified, or viewed with
22643a text editor and easily understood and used by both programmers and non-programmers.")
22644 (license license:expat))) ; MIT license
22645
22646(define-public python-parallel
22647 (package
22648 (name "python-parallel")
22649 (version "1.6.4.4")
22650 (source
22651 (origin
22652 (method url-fetch)
22653 (uri (string-append
22654 "https://www.parallelpython.com/downloads/pp/pp-"
22655 version ".zip"))
22656 (sha256
22657 (base32
22658 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
22659 (native-inputs
22660 `(("unzip" ,unzip)))
22661 (build-system python-build-system)
22662 (arguments '(#:tests? #f)) ; No test suite.
22663 (home-page "https://www.parallelpython.com")
22664 (synopsis "Parallel and distributed programming for Python")
22665 (description "Parallel Python module (PP) provides an easy and efficient
22666way to create parallel-enabled applications for SMP computers and clusters.
22667PP module features cross-platform portability and dynamic load balancing.
22668Thus applications written with PP will parallelize efficiently even on
22669heterogeneous and multi-platform clusters (including clusters running other
22670applications with variable CPU loads).")
22671 (license license:bsd-3)))
22672
22673(define-public python2-parallel
22674 (package-with-python2 python-parallel))