Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016, 2020 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
35 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
36 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
37 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
38 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
39 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
40 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017, 2020 Roel Janssen <roel@gnu.org>
43 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
60 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
61 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
62 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
63 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
64 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
65 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
66 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
67 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
68 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
69 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
70 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
71 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
72 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
73 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
74 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
75 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
76 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
77 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
78 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
79 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
80 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
81 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
82 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
83 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
84 ;;;
85 ;;; This file is part of GNU Guix.
86 ;;;
87 ;;; GNU Guix is free software; you can redistribute it and/or modify it
88 ;;; under the terms of the GNU General Public License as published by
89 ;;; the Free Software Foundation; either version 3 of the License, or (at
90 ;;; your option) any later version.
91 ;;;
92 ;;; GNU Guix is distributed in the hope that it will be useful, but
93 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
94 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
95 ;;; GNU General Public License for more details.
96 ;;;
97 ;;; You should have received a copy of the GNU General Public License
98 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
99
100 (define-module (gnu packages python-xyz)
101 #:use-module ((guix licenses) #:prefix license:)
102 #:use-module (gnu packages)
103 #:use-module (gnu packages algebra)
104 #:use-module (gnu packages adns)
105 #:use-module (gnu packages attr)
106 #:use-module (gnu packages backup)
107 #:use-module (gnu packages bash)
108 #:use-module (gnu packages check)
109 #:use-module (gnu packages compression)
110 #:use-module (gnu packages crypto)
111 #:use-module (gnu packages databases)
112 #:use-module (gnu packages dbm)
113 #:use-module (gnu packages enchant)
114 #:use-module (gnu packages file)
115 #:use-module (gnu packages fontutils)
116 #:use-module (gnu packages gcc)
117 #:use-module (gnu packages geo)
118 #:use-module (gnu packages ghostscript)
119 #:use-module (gnu packages gl)
120 #:use-module (gnu packages glib)
121 #:use-module (gnu packages gnome)
122 #:use-module (gnu packages graphviz)
123 #:use-module (gnu packages graphics)
124 #:use-module (gnu packages gsasl)
125 #:use-module (gnu packages gstreamer)
126 #:use-module (gnu packages gtk)
127 #:use-module (gnu packages icu4c)
128 #:use-module (gnu packages image)
129 #:use-module (gnu packages imagemagick)
130 #:use-module (gnu packages kerberos)
131 #:use-module (gnu packages libevent)
132 #:use-module (gnu packages libffi)
133 #:use-module (gnu packages linux)
134 #:use-module (gnu packages llvm)
135 #:use-module (gnu packages man)
136 #:use-module (gnu packages maths)
137 #:use-module (gnu packages monitoring)
138 #:use-module (gnu packages multiprecision)
139 #:use-module (gnu packages networking)
140 #:use-module (gnu packages ncurses)
141 #:use-module (gnu packages openstack)
142 #:use-module (gnu packages pcre)
143 #:use-module (gnu packages perl)
144 #:use-module (gnu packages photo)
145 #:use-module (gnu packages pkg-config)
146 #:use-module (gnu packages python)
147 #:use-module (gnu packages python-check)
148 #:use-module (gnu packages python-compression)
149 #:use-module (gnu packages python-crypto)
150 #:use-module (gnu packages python-science)
151 #:use-module (gnu packages python-web)
152 #:use-module (gnu packages qt)
153 #:use-module (gnu packages readline)
154 #:use-module (gnu packages sdl)
155 #:use-module (gnu packages search)
156 #:use-module (gnu packages shells)
157 #:use-module (gnu packages sphinx)
158 #:use-module (gnu packages ssh)
159 #:use-module (gnu packages terminals)
160 #:use-module (gnu packages tex)
161 #:use-module (gnu packages texinfo)
162 #:use-module (gnu packages time)
163 #:use-module (gnu packages tls)
164 #:use-module (gnu packages version-control)
165 #:use-module (gnu packages video)
166 #:use-module (gnu packages web)
167 #:use-module (gnu packages base)
168 #:use-module (gnu packages xml)
169 #:use-module (gnu packages xorg)
170 #:use-module (gnu packages xdisorg)
171 #:use-module (gnu packages tcl)
172 #:use-module (gnu packages bdw-gc)
173 #:use-module (gnu packages serialization)
174 #:use-module (guix packages)
175 #:use-module (guix download)
176 #:use-module (guix git-download)
177 #:use-module (guix hg-download)
178 #:use-module (guix utils)
179 #:use-module (guix build-system gnu)
180 #:use-module (guix build-system cmake)
181 #:use-module (guix build-system python)
182 #:use-module (guix build-system trivial)
183 #:use-module (srfi srfi-1)
184 #:use-module (srfi srfi-26))
185
186 (define-public python-tenacity
187 (package
188 (name "python-tenacity")
189 (version "6.1.0")
190 (source (origin
191 (method url-fetch)
192 (uri (pypi-uri "tenacity" version))
193 (sha256
194 (base32
195 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
196 (build-system python-build-system)
197 (native-inputs
198 `(("python-setuptools-scm" ,python-setuptools-scm)
199 ("python-sphinx" ,python-sphinx)
200 ("python-tornado" ,python-tornado)
201 ("python-pytest" ,python-pytest)))
202 (propagated-inputs
203 `(("python-six" ,python-six)))
204 (arguments
205 `(#:phases (modify-phases %standard-phases
206 (replace 'check
207 (lambda _
208 (invoke "pytest")
209 #t)))))
210 (home-page "https://github.com/jd/tenacity")
211 (synopsis "Retrying library for python")
212 (description "Tenacity is a general-purpose python library to simplify the
213 task of adding retry behavior to just about anything.")
214 (license license:asl2.0)))
215
216 (define-public python-colorlog
217 (package
218 (name "python-colorlog")
219 (version "4.1.0")
220 (source (origin
221 (method url-fetch)
222 (uri (pypi-uri "colorlog" version))
223 (sha256
224 (base32
225 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
226 (build-system python-build-system)
227 (native-inputs
228 `(("python-pytest" ,python-pytest)))
229 (arguments
230 `(#:phases (modify-phases %standard-phases
231 (replace 'check
232 (lambda _
233 ;; Extend PYTHONPATH so the built package will be found.
234 (setenv "PYTHONPATH"
235 (string-append (getcwd) "/build/lib:"
236 (getenv "PYTHONPATH")))
237 (invoke "pytest" "-p" "no:logging")
238 #t)))))
239 (home-page "https://github.com/borntyping/python-colorlog")
240 (synopsis "Log formatting with colors for python")
241 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
242 with Python's logging module that outputs records using terminal colors.")
243 (license license:expat)))
244
245 (define-public python-pyprind
246 (package
247 (name "python-pyprind")
248 (version "2.11.2")
249 (source (origin
250 (method url-fetch)
251 (uri (pypi-uri "PyPrind" version))
252 (sha256
253 (base32
254 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
255 (build-system python-build-system)
256 (propagated-inputs
257 `(("python-psutil" ,python-psutil)))
258 (home-page "https://github.com/rasbt/pyprind")
259 (synopsis "Python Progress Bar and Percent Indicator Utility")
260 (description "The PyPrind (Python Progress Indicator) module provides a
261 progress bar and a percentage indicator object that let you track the progress
262 of a loop structure or other iterative computation.")
263 (license license:bsd-3)))
264
265 (define-public python-gphoto2
266 (package
267 (name "python-gphoto2")
268 (version "2.2.1")
269 (source (origin
270 (method url-fetch)
271 (uri (pypi-uri "gphoto2" version))
272 (sha256
273 (base32
274 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
275 (build-system python-build-system)
276 (native-inputs
277 `(("pkg-config" ,pkg-config)))
278 (inputs
279 `(("libgphoto2" ,libgphoto2)))
280 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
281 (synopsis "Python interface to libgphoto2")
282 (description "@code{python-gphoto2} is a comprehensive Python interface
283 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
284 automatically generate the interface code.")
285 (license license:gpl3+)))
286
287 (define-public python-colour
288 (package
289 (name "python-colour")
290 (version "0.1.5")
291 (source (origin
292 (method url-fetch)
293 (uri (pypi-uri "colour" version))
294 (sha256
295 (base32
296 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
297 (build-system python-build-system)
298 (native-inputs
299 `(("python-d2to1" ,python-d2to1)))
300 (home-page "https://github.com/vaab/colour")
301 (synopsis "Convert and manipulate various color representations")
302 (description "Pythonic way to manipulate color representations (HSL, RVB,
303 web, X11, ...).")
304 (license license:expat)))
305
306 (define-public python-d2to1
307 (package
308 (name "python-d2to1")
309 (version "0.2.12.post1")
310 (source (origin
311 (method url-fetch)
312 (uri (pypi-uri "d2to1" version))
313 (sha256
314 (base32
315 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
316 (build-system python-build-system)
317 (native-inputs
318 `(("python-nose" ,python-nose)))
319 (home-page "https://github.com/embray/d2to1")
320 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
321 in python")
322 (description "The python package d2to1 (the d is for distutils) allows
323 using distutils2-like setup.cfg files for a package's metadata with a
324 distribute/setuptools setup.py script.")
325 (license license:bsd-2)))
326
327 (define-public python-rawkit
328 (package
329 (name "python-rawkit")
330 (version "0.6.0")
331 (source (origin
332 (method url-fetch)
333 (uri (pypi-uri "rawkit" version))
334 (sha256
335 (base32
336 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
337 (build-system python-build-system)
338 (native-inputs
339 `(("python-pytest" ,python-pytest)
340 ("python-mock" ,python-mock)))
341 (inputs
342 `(("libraw" ,libraw)))
343 (home-page "https://rawkit.readthedocs.io")
344 (synopsis "Ctypes-based LibRaw binding for Python")
345 (description "The rawkit package provides two modules: rawkit and libraw.
346 The rawkit module provides a high-level Pythonic interface for developing raw
347 photos, while the libraw module provides a CTypes based interface for
348 interacting with the low-level LibRaw C APIs.")
349 (license license:expat)))
350
351 (define-public python-easygui
352 (package
353 (name "python-easygui")
354 (version "0.98.1")
355 (source (origin
356 (method url-fetch)
357 (uri (pypi-uri "easygui" version))
358 (sha256
359 (base32
360 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
361 (build-system python-build-system)
362 (propagated-inputs
363 `(("python-tkinter" ,python "tk")))
364 (home-page "https://github.com/robertlugg/easygui")
365 (synopsis "GUI programming module for Python")
366 (description "EasyGUI is a module for very simple, very easy GUI
367 programming in Python. EasyGUI is different from other GUI generators in that
368 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
369 simple function calls.")
370 (license license:bsd-3)))
371
372 (define-public python-pymediainfo
373 (package
374 (name "python-pymediainfo")
375 (version "4.1")
376 (source
377 (origin
378 (method url-fetch)
379 (uri (pypi-uri "pymediainfo" version))
380 (sha256
381 (base32
382 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
383 (build-system python-build-system)
384 (native-inputs
385 `(("python-setuptools-scm" ,python-setuptools-scm)
386 ("python-pytest" ,python-pytest)))
387 (inputs
388 `(("libmediainfo" ,libmediainfo)))
389 (arguments
390 `(#:phases
391 (modify-phases %standard-phases
392 (add-after 'unpack 'patch-libmediainfo
393 (lambda _
394 (substitute* "pymediainfo/__init__.py"
395 (("libmediainfo.so.0")
396 (string-append (assoc-ref %build-inputs "libmediainfo")
397 "/lib/libmediainfo.so.0")))
398 #t))
399 (replace 'check
400 (lambda _
401 ;; Extend PYTHONPATH so the built package will be found.
402 (setenv "PYTHONPATH"
403 (string-append (getcwd) "/build/lib:"
404 (getenv "PYTHONPATH")))
405 ;; Skip the only failing test "test_parse_url"
406 (invoke "pytest" "-vv" "-k" "not test_parse_url")
407 #t)))))
408 (home-page
409 "https://github.com/sbraz/pymediainfo")
410 (synopsis
411 "Python wrapper for the mediainfo library")
412 (description
413 "Python wrapper for the mediainfo library to access the technical and tag
414 data for video and audio files.")
415 (license license:expat)))
416
417 (define-public python-psutil
418 (package
419 (name "python-psutil")
420 (version "5.7.0")
421 (source
422 (origin
423 (method url-fetch)
424 (uri (pypi-uri "psutil" version))
425 (sha256
426 (base32 "03jykdi3dgf1cdal9bv4fq9zjvzj9l9bs99gi5ar81sdl5nc2pk8"))))
427 (build-system python-build-system)
428 (arguments
429 ;; FIXME: some tests do not return and time out. Some tests fail because
430 ;; some processes survive kill().
431 '(#:tests? #f))
432 (home-page "https://www.github.com/giampaolo/psutil")
433 (synopsis "Library for retrieving information on running processes")
434 (description
435 "psutil (Python system and process utilities) is a library for retrieving
436 information on running processes and system utilization (CPU, memory, disks,
437 network) in Python. It is useful mainly for system monitoring, profiling and
438 limiting process resources and management of running processes. It implements
439 many functionalities offered by command line tools such as: ps, top, lsof,
440 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
441 pidof, tty, taskset, pmap.")
442 (properties `((python2-variant . ,(delay python2-psutil))))
443 (license license:bsd-3)))
444
445 (define-public python2-psutil
446 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
447 (package
448 (inherit base)
449 (propagated-inputs
450 `(("python2-enum34" ,python2-enum34) ;optional
451 ,@(package-propagated-inputs base))))))
452
453 (define-public python-shapely
454 (package
455 (name "python-shapely")
456 (version "1.6.4.post2")
457 (source
458 (origin
459 (method url-fetch)
460 (uri (pypi-uri "Shapely" version))
461 (sha256
462 (base32
463 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
464 (build-system python-build-system)
465 (native-inputs
466 `(("python-cython" ,python-cython)
467 ("python-matplotlib" ,python-matplotlib)
468 ("python-pytest" ,python-pytest)
469 ("python-pytest-cov" ,python-pytest-cov)))
470 (inputs
471 `(("geos" ,geos)))
472 (propagated-inputs
473 `(("python-numpy" ,python-numpy)))
474 (arguments
475 `(#:phases
476 (modify-phases %standard-phases
477 (add-after 'unpack 'patch-geos-path
478 (lambda* (#:key inputs #:allow-other-keys)
479 (let ((geos (assoc-ref inputs "geos"))
480 (glibc (assoc-ref inputs ,(if (%current-target-system)
481 "cross-libc" "libc"))))
482 (substitute* "shapely/geos.py"
483 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
484 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
485 geos "/lib/libgeos_c.so'])"))
486 (("free = load_dll\\('c'\\)\\.free")
487 (string-append "free = load_dll('c', fallbacks=['"
488 glibc "/lib/libc.so.6']).free"))))
489 #t)))))
490 (home-page "https://github.com/Toblerity/Shapely")
491 (synopsis "Library for the manipulation and analysis of geometric objects")
492 (description "Shapely is a Python package for manipulation and analysis of
493 planar geometric objects. It is based on the @code{GEOS} library.")
494 (license license:bsd-3)))
495
496 (define-public python-shortuuid
497 (package
498 (name "python-shortuuid")
499 (version "0.5.0")
500 (source
501 (origin
502 (method url-fetch)
503 (uri (pypi-uri "shortuuid" version))
504 (sha256
505 (base32
506 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
507 (build-system python-build-system)
508 (native-inputs
509 `(("python-pep8" ,python-pep8)))
510 (home-page "https://github.com/skorokithakis/shortuuid")
511 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
512 (description
513 "@code{shortuuid} is a Python library for generating concise, unambiguous
514 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
515 module and then similar looking characters are removed.")
516 (license license:bsd-3)))
517
518 (define-public python-logwrap
519 (package
520 (name "python-logwrap")
521 (version "3.2.1")
522 (source
523 (origin
524 (method url-fetch)
525 (uri (pypi-uri "logwrap" version ".zip"))
526 (sha256
527 (base32
528 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
529 (build-system python-build-system)
530 (propagated-inputs
531 `(("python-six" ,python-six)
532 ("python-typing" ,python-typing)))
533 (native-inputs
534 `(("unzip" ,unzip)
535 ("python-cython" ,python-cython)
536 ("python-pytest" ,python-pytest)
537 ("python-pytest-cov" ,python-pytest-cov)
538 ("python-pytest-runner" ,python-pytest-runner)))
539 (home-page "https://github.com/penguinolog/logwrap")
540 (synopsis "Decorator for logging function arguments")
541 (description "This package provides a decorator to log function arguments
542 and function call return values in a human-readable way.")
543 (license license:asl2.0)))
544
545 (define-public python2-shapely
546 (package-with-python2 python-shapely))
547
548 (define-public python-clyent
549 (package
550 (name "python-clyent")
551 (version "1.2.1")
552 (source
553 (origin
554 (method url-fetch)
555 (uri (pypi-uri "clyent" version))
556 (sha256
557 (base32
558 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
559 (build-system python-build-system)
560 (native-inputs
561 `(("python-mock" ,python-mock)))
562 (home-page "https://github.com/binstar/clyent")
563 (synopsis "Command line client library")
564 (description "Clyent is a Python command line utiliy library. It is used
565 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
566 (license license:bsd-3)))
567
568 (define-public python2-clyent
569 (package-with-python2 python-clyent))
570
571 (define-public python-babel
572 (package
573 (name "python-babel")
574 (version "2.8.0")
575 (source
576 (origin
577 (method url-fetch)
578 (uri (pypi-uri "Babel" version))
579 (sha256
580 (base32
581 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
582 (build-system python-build-system)
583 (native-inputs
584 `(("python-freezegun" ,python-freezegun)
585 ("python-pytest" ,python-pytest)))
586 (propagated-inputs
587 `(("python-pytz" ,python-pytz)))
588 (arguments
589 `(#:phases (modify-phases %standard-phases
590 (replace 'check
591 (lambda _
592 (invoke "pytest" "-vv" "-k"
593 (string-append
594 ;; XXX: These tests fail when using Pytest 4.x and
595 ;; Babel 2.6.0. Try removing this for later versions.
596 "not test_no_inherit_metazone_marker_never_in_output"
597 " and not test_smoke_dates"
598 " and not test_smoke_numbers")))))))
599 (home-page "http://babel.pocoo.org/")
600 (synopsis
601 "Tools for internationalizing Python applications")
602 (description
603 "Babel is composed of two major parts:
604 - tools to build and work with gettext message catalogs
605 - a Python interface to the CLDR (Common Locale Data Repository), providing
606 access to various locale display names, localized number and date formatting,
607 etc. ")
608 (license license:bsd-3)))
609
610 (define-public python2-babel
611 (package-with-python2 python-babel))
612
613 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
614 (define-public python2-babel-2.6
615 (package
616 (inherit python2-babel)
617 (version "2.6.0")
618 (source (origin
619 (method url-fetch)
620 (uri (pypi-uri "Babel" version))
621 (sha256
622 (base32
623 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
624
625 (define-public python2-backport-ssl-match-hostname
626 (package
627 (name "python2-backport-ssl-match-hostname")
628 (version "3.5.0.1")
629 (source
630 (origin
631 (method url-fetch)
632 (uri (pypi-uri "backports.ssl_match_hostname" version))
633 (sha256
634 (base32
635 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
636 (build-system python-build-system)
637 (arguments
638 `(#:python ,python-2
639 #:tests? #f)) ; no test target
640 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
641 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
642 (description
643 "This backport brings the ssl.match_hostname() function to users of
644 earlier versions of Python. The function checks the hostname in the
645 certificate returned by the server to which a connection has been established,
646 and verifies that it matches the intended target hostname.")
647 (license license:psfl)))
648
649 (define-public python-bitarray
650 (package
651 (name "python-bitarray")
652 (version "1.2.1")
653 (source (origin
654 (method url-fetch)
655 (uri (pypi-uri "bitarray" version))
656 (sha256
657 (base32
658 "1kxrlxfj9nrx512sfwifwl9z4v6ky3qschl0zmk3s3dvc3s7bmif"))))
659 (build-system python-build-system)
660 (home-page "https://github.com/ilanschnell/bitarray")
661 (synopsis "Efficient arrays of booleans")
662 (description "This package provides an object type which efficiently
663 represents an array of booleans. Bitarrays are sequence types and behave very
664 much like usual lists. Eight bits are represented by one byte in a contiguous
665 block of memory. The user can select between two representations:
666 little-endian and big-endian. All of the functionality is implemented in C.
667 Methods for accessing the machine representation are provided. This can be
668 useful when bit level access to binary files is required, such as portable
669 bitmap image files. Also, when dealing with compressed data which uses
670 variable bit length encoding, you may find this module useful.")
671 (license license:psfl)))
672
673 (define-public python-boolean.py
674 (package
675 (name "python-boolean.py")
676 (version "3.6")
677 (source
678 (origin
679 ;; There's no source tarball on PyPI.
680 (method git-fetch)
681 (uri (git-reference
682 (url "https://github.com/bastikr/boolean.py")
683 (commit (string-append "v" version))))
684 (file-name (git-file-name name version))
685 (sha256
686 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
687 (build-system python-build-system)
688 (home-page "https://github.com/bastikr/boolean.py")
689 (synopsis "Boolean algebra in one Python module")
690 (description
691 "This is a small Python library that implements boolean algebra.
692 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
693 @code{Symbol} class that can take on one of these two values. Calculations
694 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
695 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
696 Expressions are constructed from parsed strings or directly in Python.")
697 (license license:bsd-2)))
698
699 (define-public python-hdf4
700 (package
701 (name "python-hdf4")
702 (version "0.9")
703 (source
704 (origin
705 (method url-fetch)
706 (uri (pypi-uri name version))
707 (sha256
708 (base32
709 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
710 (build-system python-build-system)
711 (native-inputs `(("nose" ,python-nose)))
712 (propagated-inputs `(("numpy" ,python-numpy)))
713 (inputs
714 `(("hdf4" ,hdf4)
715 ("libjpeg" ,libjpeg-turbo)
716 ("zlib" ,zlib)))
717 (arguments
718 `(#:phases
719 (modify-phases %standard-phases
720 (replace 'check
721 (lambda _
722 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
723 ;; on to import numpy. Somehow this works on their CI system.
724 ;; Let's just manage PYTHONPATH here instead.
725 (substitute* "runexamples.sh"
726 (("export PYTHONPATH=.*") ""))
727 (setenv "PYTHONPATH"
728 (string-append (getcwd) ":"
729 (getenv "PYTHONPATH")))
730 (invoke "./runexamples.sh")
731 (invoke "nosetests" "-v"))))))
732 (home-page "https://github.com/fhs/python-hdf4")
733 (synopsis "Python interface to the NCSA HDF4 library")
734 (description
735 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
736 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
737 NetCDF files can also be read and modified. Python-HDF4 is a fork of
738 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
739 (license license:expat)))
740
741 (define-public python2-hdf4
742 (package-with-python2 python-hdf4))
743
744 (define-public python-h5py
745 (package
746 (name "python-h5py")
747 (version "2.10.0")
748 (source
749 (origin
750 (method url-fetch)
751 (uri (pypi-uri "h5py" version))
752 (sha256
753 (base32
754 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
755 (build-system python-build-system)
756 (arguments
757 `(#:tests? #f ; no test target
758 #:phases
759 (modify-phases %standard-phases
760 (add-after 'unpack 'fix-hdf5-paths
761 (lambda* (#:key inputs #:allow-other-keys)
762 (let ((prefix (assoc-ref inputs "hdf5")))
763 (substitute* "setup_build.py"
764 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
765 (string-append "['" prefix "/lib" "']"))
766 (("'/opt/local/include', '/usr/local/include'")
767 (string-append "'" prefix "/include" "'")))
768 (substitute* "setup_configure.py"
769 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
770 (string-append "['" prefix "/lib" "']")))
771 #t))))))
772 (propagated-inputs
773 `(("python-six" ,python-six)
774 ("python-numpy" ,python-numpy)))
775 (inputs
776 `(("hdf5" ,hdf5-1.10)))
777 (native-inputs
778 `(("python-cython" ,python-cython)
779 ("python-pkgconfig" ,python-pkgconfig)
780 ("pkg-config" ,pkg-config)))
781 (home-page "https://www.h5py.org/")
782 (synopsis "Read and write HDF5 files from Python")
783 (description
784 "The h5py package provides both a high- and low-level interface to the
785 HDF5 library from Python. The low-level interface is intended to be a
786 complete wrapping of the HDF5 API, while the high-level component supports
787 access to HDF5 files, datasets and groups using established Python and NumPy
788 concepts.")
789 (license license:bsd-3)))
790
791 (define-public python2-h5py
792 (package-with-python2 python-h5py))
793
794 (define-public python-sh
795 (package
796 (name "python-sh")
797 (version "1.12.14")
798 (source
799 (origin
800 (method url-fetch)
801 (uri (pypi-uri "sh" version))
802 (sha256
803 (base32
804 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
805 (build-system python-build-system)
806 (arguments
807 '(#:phases
808 (modify-phases %standard-phases
809 (replace 'check
810 (lambda _
811 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
812 (setenv "HOME" "/tmp")
813 (invoke "python" "sh.py" "test"))))))
814 (native-inputs
815 `(("python-coverage" ,python-coverage)))
816 (home-page "https://github.com/amoffat/sh")
817 (synopsis "Python subprocess replacement")
818 (description "This package provides a replacement for Python's
819 @code{subprocess} feature.")
820 (license license:expat)))
821
822 (define-public python2-sh
823 (package-with-python2 python-sh))
824
825 (define-public python-cftime
826 (package
827 (name "python-cftime")
828 (version "1.0.4.2")
829 (source
830 (origin
831 (method url-fetch)
832 (uri (pypi-uri "cftime" version))
833 (sha256
834 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
835 (build-system python-build-system)
836 (propagated-inputs
837 `(("python-numpy" ,python-numpy)))
838 (native-inputs
839 `(("python-coveralls" ,python-coveralls)
840 ("python-cython" ,python-cython)
841 ("python-pytest-cov" ,python-pytest-cov)))
842 (home-page "https://github.com/Unidata/cftime")
843 (synopsis "Library for time handling")
844 (description
845 "This package provides time-handling functionality that used to be part
846 of the netcdf4 package before.")
847 ;; This package claims to include code under the GPLv3 but is released
848 ;; under ISC.
849 (license (list license:isc license:gpl3+))))
850
851 (define-public python-netcdf4
852 (package
853 (name "python-netcdf4")
854 (version "1.5.3")
855 (source
856 (origin
857 (method url-fetch)
858 (uri (pypi-uri "netCDF4" version))
859 (sha256
860 (base32
861 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
862 (build-system python-build-system)
863 (arguments
864 '(#:phases
865 (modify-phases %standard-phases
866 (add-after 'unpack 'configure-locations
867 (lambda* (#:key inputs #:allow-other-keys)
868 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
869 #t)))))
870 (native-inputs
871 `(("python-cython" ,python-cython)))
872 (propagated-inputs
873 `(("python-numpy" ,python-numpy)
874 ("python-cftime" ,python-cftime)))
875 (inputs
876 `(("netcdf" ,netcdf)
877 ("hdf4" ,hdf4)
878 ("hdf5" ,hdf5)))
879 (home-page "https://github.com/Unidata/netcdf4-python")
880 (synopsis "Python/numpy interface to the netCDF library")
881 (description "Netcdf4-python is a Python interface to the netCDF C
882 library. netCDF version 4 has many features not found in earlier
883 versions of the library and is implemented on top of HDF5. This module
884 can read and write files in both the new netCDF 4 and the old netCDF 3
885 format, and can create files that are readable by HDF5 clients. The
886 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
887 to users of that module.")
888 ;; The software is mainly ISC, but includes some files covered
889 ;; by the Expat license.
890 (license (list license:isc license:expat))))
891
892 (define-public python2-netcdf4
893 (package-with-python2 python-netcdf4))
894
895 (define-public python-license-expression
896 (package
897 (name "python-license-expression")
898 (version "0.999")
899 (source
900 (origin
901 (method url-fetch)
902 (uri (pypi-uri "license-expression" version))
903 (sha256
904 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
905 (build-system python-build-system)
906 (propagated-inputs
907 `(("python-boolean.py" ,python-boolean.py)))
908 (home-page "https://github.com/nexB/license-expression")
909 (synopsis "Apply boolean logic to license expressions")
910 (description
911 "This Python module defines a tiny language to evaluate and compare
912 license expressions using boolean logic. Logical combinations of licenses can
913 be tested for equality, containment, and equivalence. They can be normalised
914 and simplified. It supports SPDX license expressions as well as other naming
915 conventions and aliases in the same expression.")
916 (license license:gpl2+)))
917
918 (define-public python-lockfile
919 (package
920 (name "python-lockfile")
921 (version "0.12.2")
922 (source
923 (origin
924 (method url-fetch)
925 (uri (pypi-uri "lockfile" version))
926 (sha256
927 (base32
928 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
929 (build-system python-build-system)
930 (arguments '(#:test-target "check"))
931 (native-inputs
932 `(("python-pbr" ,python-pbr)))
933 (home-page "https://launchpad.net/pylockfile")
934 (synopsis "Platform-independent file locking module")
935 (description
936 "The lockfile package exports a LockFile class which provides a simple
937 API for locking files.")
938 (license license:expat)))
939
940 (define-public python2-lockfile
941 (package-with-python2 python-lockfile))
942
943 (define-public python-filelock
944 (package
945 (name "python-filelock")
946 (version "3.0.12")
947 (source
948 (origin
949 (method url-fetch)
950 (uri (pypi-uri "filelock" version))
951 (sha256
952 (base32
953 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
954 (build-system python-build-system)
955 (home-page
956 "https://github.com/benediktschmitt/py-filelock")
957 (synopsis "Platform independent file lock")
958 (description "@code{filelock} contains a single module implementing
959 a platform independent file lock in Python, which provides a simple way of
960 inter-process communication.")
961 (license license:unlicense)))
962
963 (define-public python-semantic-version
964 (package
965 (name "python-semantic-version")
966 (version "2.6.0")
967 (source
968 (origin
969 (method url-fetch)
970 (uri (pypi-uri "semantic_version" version))
971 (sha256
972 (base32
973 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
974 (build-system python-build-system)
975 (arguments
976 `(#:tests? #f)) ; PyPI tarball lacks tests
977 (home-page "https://github.com/rbarrois/python-semanticversion")
978 (synopsis "Semantic versioning module for Python")
979 (description
980 "The @code{semantic_version} class is a small library for handling
981 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
982
983 It can compare versions, generate a new version that represents a bump in one of
984 the version levels, and check whether any given string is a proper semantic
985 version identifier.")
986 (license license:bsd-3)))
987
988 (define-public python2-semantic-version
989 (package-with-python2 python-semantic-version))
990
991 (define-public python-serpent
992 (package
993 (name "python-serpent")
994 (version "1.28")
995 (source
996 (origin
997 (method url-fetch)
998 (uri (pypi-uri "serpent" version))
999 (sha256
1000 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1001 (build-system python-build-system)
1002 (native-inputs
1003 `(("python-attrs" ,python-attrs)
1004 ("python-pytz" ,python-pytz)))
1005 (home-page "https://github.com/irmen/Serpent")
1006 (synopsis "Serializer for literal Python expressions")
1007 (description
1008 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1009 serialization. It serializes an object tree into bytes (an utf-8 encoded
1010 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1011 to rebuild the original object tree.
1012
1013 Because only safe literals are encoded, it is safe to send serpent data to
1014 other machines, such as over the network.")
1015 (properties `((python2-variant . ,(delay python2-serpent))))
1016 (license license:expat)))
1017
1018 (define-public python2-serpent
1019 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1020 (package
1021 (inherit base)
1022 (propagated-inputs
1023 `(("python-enum34" ,python2-enum34)
1024 ,@(package-propagated-inputs base))))))
1025
1026 (define-public python-setuptools
1027 (package
1028 (name "python-setuptools")
1029 (version "41.0.1")
1030 (source
1031 (origin
1032 (method url-fetch)
1033 (uri (pypi-uri "setuptools" version ".zip"))
1034 (sha256
1035 (base32
1036 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1037 (modules '((guix build utils)))
1038 (snippet
1039 '(begin
1040 ;; Remove included binaries which are used to build self-extracting
1041 ;; installers for Windows.
1042 ;; TODO: Find some way to build them ourself so we can include them.
1043 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1044 #t))))
1045 (build-system python-build-system)
1046 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1047 ;; One could bootstrap with an internal untested setuptools.
1048 (arguments
1049 `(#:tests? #f))
1050 (home-page "https://pypi.org/project/setuptools/")
1051 (synopsis
1052 "Library designed to facilitate packaging Python projects")
1053 (description
1054 "Setuptools is a fully-featured, stable library designed to facilitate
1055 packaging Python projects, where packaging includes:
1056 Python package and module definitions,
1057 distribution package metadata,
1058 test hooks,
1059 project installation,
1060 platform-specific details,
1061 Python 3 support.")
1062 ;; TODO: setuptools now bundles the following libraries:
1063 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1064 (license (list license:psfl ; setuptools itself
1065 license:expat ; six, appdirs, pyparsing
1066 license:asl2.0 ; packaging is dual ASL2/BSD-2
1067 license:bsd-2))))
1068
1069 (define-public python2-setuptools
1070 (package-with-python2 python-setuptools))
1071
1072 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1073 (define-public python-setuptools-for-tensorflow
1074 (hidden-package
1075 (package
1076 (inherit python-setuptools)
1077 (version "39.1.0")
1078 (source (origin
1079 (inherit (package-source python-setuptools))
1080 (uri (pypi-uri "setuptools" version ".zip"))
1081 (sha256
1082 (base32
1083 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1084
1085 (define-public python-uniseg
1086 (package
1087 (name "python-uniseg")
1088 (version "0.7.1")
1089 (source
1090 (origin
1091 (method url-fetch)
1092 (uri (pypi-uri "uniseg" version ".zip"))
1093 (sha256
1094 (base32
1095 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1096 (build-system python-build-system)
1097 (arguments
1098 '(#:tests? #f)) ; The test suite requires network access.
1099 (native-inputs
1100 `(("unzip" ,unzip)))
1101 (home-page
1102 "https://bitbucket.org/emptypage/uniseg-python")
1103 (synopsis
1104 "Python library to determine Unicode text segmentations")
1105 (description
1106 "Uniseg is a Python package used to determine Unicode text segmentations.
1107 Supported segmentations include:
1108 @enumerate
1109 @item @dfn{Code point} (any value in the Unicode codespace)
1110 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1111 multiple Unicode code points, e.g. \"G\" + acute-accent)
1112 @item Word break
1113 @item Sentence break
1114 @item Line break
1115 @end enumerate")
1116 (license license:expat)))
1117
1118 (define-public python2-uniseg
1119 (package-with-python2 python-uniseg))
1120
1121 (define-public python-humanfriendly
1122 (package
1123 (name "python-humanfriendly")
1124 (version "4.4.1")
1125 (source
1126 (origin
1127 (method url-fetch)
1128 (uri (pypi-uri "humanfriendly" version))
1129 (sha256
1130 (base32
1131 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1132 (build-system python-build-system)
1133 (arguments
1134 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1135 #:tests? #f))
1136 (propagated-inputs
1137 `(("python-monotonic" ,python-monotonic)))
1138 (home-page "https://humanfriendly.readthedocs.io")
1139 (synopsis "Human-friendly input and output in Python")
1140 (description
1141 "The functions and classes in @code{humanfriendly} can be used to make
1142 text interfaces more user-friendly. It includes tools to parse and format
1143 numbers, file sizes, and timespans, timers for long-running operations, menus
1144 to allow the user to choose from a list of options, and terminal interaction
1145 helpers.")
1146 (license license:expat)))
1147
1148 (define-public python2-humanfriendly
1149 (package-with-python2 python-humanfriendly))
1150
1151 (define-public python-textparser
1152 (package
1153 (name "python-textparser")
1154 (version "0.23.0")
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (pypi-uri "textparser" version))
1159 (sha256
1160 (base32
1161 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1162 (build-system python-build-system)
1163 (home-page "https://github.com/eerimoq/textparser")
1164 (synopsis "Fast text parser for Python")
1165 (description "This library provides a text parser written in the Python
1166 language. It aims to be fast.")
1167 (license license:expat)))
1168
1169 (define-public python-aenum
1170 (package
1171 (name "python-aenum")
1172 (version "2.2.3")
1173 (source
1174 (origin
1175 (method url-fetch)
1176 (uri (pypi-uri "aenum" version))
1177 (sha256
1178 (base32
1179 "1s3008rklv4n1kvmq6xdbdfyrpl0gf1rhqasmd27s5kwyjmlqcx4"))))
1180 (build-system python-build-system)
1181 (arguments
1182 `(#:phases (modify-phases %standard-phases
1183 (replace 'check
1184 (lambda _
1185 (format #t "current working dir ~s~%" (getcwd))
1186 (setenv "PYTHONPATH"
1187 (string-append ".:" (getenv "PYTHONPATH")))
1188 ;; We must run the test suite module directly, as it
1189 ;; fails to define the 'tempdir' variable in scope for
1190 ;; the tests otherwise
1191 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1192 ;; issues/32/running-tests-with-python-setuppy-test).
1193 (invoke "python3" "aenum/test.py")
1194 ;; This one fails with "NameError: name
1195 ;; 'test_pickle_dump_load' is not defined" (see:
1196 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1197 ;; /error-running-the-test_v3py-test-suite).
1198 ;; (invoke "python3" "aenum/test_v3.py")
1199 #t)))))
1200 (home-page "https://bitbucket.org/stoneleaf/aenum")
1201 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1202 (description "The aenum library includes an @code{Enum} base class, a
1203 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1204 class.")
1205 (license license:bsd-3)))
1206
1207 (define-public python-can
1208 (package
1209 (name "python-can")
1210 (version "3.3.3")
1211 (source
1212 (origin
1213 (method url-fetch)
1214 (uri (pypi-uri "python-can" version))
1215 (sha256
1216 (base32
1217 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1218 (build-system python-build-system)
1219 (arguments
1220 `(#:phases (modify-phases %standard-phases
1221 (add-after 'unpack 'relax-version-requirements
1222 (lambda _
1223 (substitute* "setup.py"
1224 (("mock~=2\\.0") "mock")
1225 (("coverage<5") "coverage")
1226 (("pytest~=4\\.3") "pytest")
1227 (("hypothesis~=4\\.56") "hypothesis"))
1228 #t))
1229 (add-after 'unpack 'fix-broken-tests
1230 ;; The tests try to run two scripts it expects should be
1231 ;; in PATH, but they aren't at this time (see:
1232 ;; https://github.com/hardbyte/python-can/issues/805).
1233 (lambda _
1234 (substitute* "test/test_scripts.py"
1235 (("\"can_logger\\.py --help\"") "")
1236 (("\"can_player\\.py --help\"") ""))
1237 #t)))))
1238 (propagated-inputs
1239 `(("python-aenum" ,python-aenum)
1240 ("python-wrapt" ,python-wrapt)))
1241 (native-inputs
1242 `(("python-codecov" ,python-codecov)
1243 ("python-coverage" ,python-coverage)
1244 ("python-future" ,python-future)
1245 ("python-hypothesis" ,python-hypothesis)
1246 ("python-mock" ,python-mock)
1247 ("python-pyserial" ,python-pyserial)
1248 ("python-pytest" ,python-pytest)
1249 ("python-pytest-cov" ,python-pytest-cov)
1250 ("python-pytest-runner" ,python-pytest-runner)
1251 ("python-pytest-timeout" ,python-pytest-timeout)))
1252 (home-page "https://github.com/hardbyte/python-can")
1253 (synopsis "Controller Area Network (CAN) interface module for Python")
1254 (description "This package defines the @code{can} module, which provides
1255 controller area network (CAN) support for Python developers; providing common
1256 abstractions to different hardware devices, and a suite of utilities for
1257 sending and receiving messages on a CAN bus.")
1258 (license license:lgpl3+)))
1259
1260 (define-public python-diskcache
1261 (package
1262 (name "python-diskcache")
1263 (version "4.1.0")
1264 (source
1265 (origin
1266 (method url-fetch)
1267 (uri (pypi-uri "diskcache" version))
1268 (sha256
1269 (base32
1270 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1271 (build-system python-build-system)
1272 (arguments
1273 `(#:tests? #f)) ;test suite not included in the release
1274 (home-page "http://www.grantjenks.com/docs/diskcache/")
1275 (synopsis "Disk and file backed cache library")
1276 (description "DiskCache is a disk and file backed persistent cache.")
1277 (license license:asl2.0)))
1278
1279 (define-public python-bitstruct
1280 (package
1281 (name "python-bitstruct")
1282 (version "8.9.0")
1283 (source
1284 (origin
1285 (method url-fetch)
1286 (uri (pypi-uri "bitstruct" version))
1287 (sha256
1288 (base32
1289 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1290 (build-system python-build-system)
1291 (home-page "https://github.com/eerimoq/bitstruct")
1292 (synopsis "Python values to and C bit field structs converter")
1293 (description "This module performs conversions between Python values and C
1294 bit field structs represented as Python byte strings. It is intended to have
1295 a similar interface as the @code{struct} module from Python, but working on
1296 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1297 (license license:expat)))
1298
1299 (define-public python-cantools
1300 (package
1301 (name "python-cantools")
1302 (version "33.1.1")
1303 (source
1304 (origin
1305 ;; We take the sources from the Git repository as the documentation is
1306 ;; not included with the PyPI archive.
1307 (method git-fetch)
1308 (uri (git-reference
1309 (url "https://github.com/eerimoq/cantools.git")
1310 (commit version)))
1311 (file-name (git-file-name name version))
1312 (sha256
1313 (base32
1314 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1315 (build-system python-build-system)
1316 (arguments
1317 `(#:phases
1318 (modify-phases %standard-phases
1319 (add-after 'build 'build-doc
1320 (lambda _
1321 ;; See: https://github.com/eerimoq/cantools/issues/190.
1322 (substitute* "README.rst"
1323 (("https://github.com/eerimoq/cantools/raw/master\
1324 /docs/monitor.png")
1325 "monitor.png"))
1326 (with-directory-excursion "docs"
1327 (invoke "make" "man" "info"))))
1328 (add-after 'install 'install-doc
1329 (lambda* (#:key outputs #:allow-other-keys)
1330 (let* ((out (assoc-ref outputs "out"))
1331 (info (string-append out "/share/info"))
1332 (man1 (string-append out "/share/man/man1")))
1333 (format #t "CWD: ~s~%" (getcwd))
1334 (install-file "docs/_build/texinfo/cantools.info" info)
1335 (install-file "docs/_build/man/cantools.1" man1)
1336 #t))))))
1337 (native-inputs
1338 `(("sphinx" ,python-sphinx)
1339 ("texinfo" ,texinfo)))
1340 (propagated-inputs
1341 `(("python-bitstruct" ,python-bitstruct)
1342 ("python-can" ,python-can)
1343 ("python-diskcache" ,python-diskcache)
1344 ("python-textparser" ,python-textparser)))
1345 (home-page "https://github.com/eerimoq/cantools")
1346 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1347 (description "This package includes Controller Area Network (CAN) related
1348 tools that can be used to:
1349 @itemize
1350 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1351 @item encode and decode CAN messages
1352 @item multiplex simple and extended signals
1353 @item diagnose DID encoding and decoding
1354 @item dump the CAN decoder output
1355 @item test CAN nodes
1356 @item generate C source code
1357 @item monitor the CAN bus
1358 @end itemize")
1359 (license license:expat)))
1360
1361 (define-public python-capturer
1362 (package
1363 (name "python-capturer")
1364 (version "2.4")
1365 (source
1366 (origin
1367 (method url-fetch)
1368 (uri (pypi-uri "capturer" version))
1369 (sha256
1370 (base32
1371 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1372 (build-system python-build-system)
1373 (arguments
1374 `(#:tests? #f))
1375 (propagated-inputs
1376 `(("python-humanfriendly" ,python-humanfriendly)))
1377 (home-page "https://capturer.readthedocs.io")
1378 (synopsis "Capture stdout and stderr streams of the current process")
1379 (description
1380 "The capturer package makes it easy to capture the stdout and stderr
1381 streams of the current process and subprocesses. Output can be relayed
1382 to the terminal in real time but is also available to the Python program
1383 for additional processing.")
1384 (license license:expat)))
1385
1386 (define-public python2-capturer
1387 (package-with-python2 python-capturer))
1388
1389 (define-public python-case
1390 (package
1391 (name "python-case")
1392 (version "1.5.3")
1393 (source
1394 (origin
1395 (method url-fetch)
1396 (uri (pypi-uri "case" version))
1397 (sha256
1398 (base32
1399 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1400 (build-system python-build-system)
1401 (propagated-inputs
1402 `(("python-mock" ,python-mock)
1403 ("python-nose" ,python-nose)
1404 ("python-six" ,python-six)
1405 ("python-unittest2" ,python-unittest2)))
1406 (native-inputs
1407 `(("python-coverage" ,python-coverage)))
1408 (home-page "https://github.com/celery/case")
1409 (synopsis "Unittest utilities and convenience methods")
1410 (description
1411 "The @code{case} package provides utilities on top of unittest, including
1412 some helpful Python 2 compatibility convenience methods.")
1413 (license license:bsd-3)))
1414
1415 (define-public python-verboselogs
1416 (package
1417 (name "python-verboselogs")
1418 (version "1.7")
1419 (source
1420 (origin
1421 (method url-fetch)
1422 (uri (pypi-uri "verboselogs" version))
1423 (sha256
1424 (base32
1425 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1426 (build-system python-build-system)
1427 (arguments
1428 `(#:phases
1429 (modify-phases %standard-phases
1430 (replace 'check
1431 (lambda _
1432 ;; Do not run pylint plugin test, as astroid is an old
1433 ;; unsupported version.
1434 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1435 "verboselogs/tests.py"))))))
1436 (native-inputs
1437 `(("python-mock" ,python-mock)
1438 ("python-pytest" ,python-pytest)))
1439 (home-page "https://verboselogs.readthedocs.io")
1440 (synopsis "Verbose logging level for Python's logging module")
1441 (description
1442 "The @code{verboselogs} package extends Python's @code{logging} module to
1443 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1444 (license license:expat)))
1445
1446 (define-public python2-verboselogs
1447 (package-with-python2 python-verboselogs))
1448
1449 (define-public python-coloredlogs
1450 (package
1451 (name "python-coloredlogs")
1452 (version "10.0")
1453 (source
1454 (origin
1455 (method url-fetch)
1456 (uri (pypi-uri "coloredlogs" version))
1457 (sha256
1458 (base32
1459 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1460 (build-system python-build-system)
1461 (arguments
1462 `(;Tests require some updated modules
1463 #:tests? #f))
1464 (propagated-inputs
1465 `(("python-capturer" ,python-capturer)))
1466 (home-page "https://coloredlogs.readthedocs.io")
1467 (synopsis "Colored stream handler for Python's logging module")
1468 (description
1469 "The @code{coloredlogs} package enables colored terminal output for
1470 Python's logging module. The @code{ColoredFormatter} class inherits from
1471 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1472 messages in color.")
1473 (license license:expat)))
1474
1475 (define-public python2-coloredlogs
1476 (package-with-python2 python-coloredlogs))
1477
1478 (define-public python-editorconfig
1479 (package
1480 (name "python-editorconfig")
1481 (version "0.12.2")
1482 (source
1483 (origin
1484 (method url-fetch)
1485 (uri (pypi-uri "EditorConfig" version))
1486 (sha256
1487 (base32
1488 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1489 (build-system python-build-system)
1490 (home-page "https://editorconfig.org/")
1491 (synopsis "EditorConfig bindings for python")
1492 (description "The EditorConfig project consists of a file format for
1493 defining coding styles and a collection of text editor plugins that enable
1494 editors to read the file format and adhere to defined styles. EditorConfig
1495 files are easily readable and they work nicely with version control systems.")
1496 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1497 (license (list license:bsd-2 license:psfl))))
1498
1499 (define-public python-et-xmlfile
1500 (package
1501 (name "python-et-xmlfile")
1502 (version "1.0.1")
1503 (source
1504 (origin
1505 (method url-fetch)
1506 (uri (pypi-uri "et_xmlfile" version))
1507 (sha256
1508 (base32
1509 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1510 (build-system python-build-system)
1511 (arguments
1512 `(#:phases (modify-phases %standard-phases
1513 (replace 'check
1514 (lambda _
1515 (invoke "pytest"))))))
1516 (native-inputs
1517 `(("python-pytest" ,python-pytest)
1518 ("python-lxml" ,python-lxml))) ;used for the tests
1519 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1520 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1521 (description "This Python library is based upon the @code{xmlfile} module
1522 from @code{lxml}. It aims to provide a low memory, compatible implementation
1523 of @code{xmlfile}.")
1524 (license license:expat)))
1525
1526 (define-public python2-et-xmlfile
1527 (package-with-python2 python-et-xmlfile))
1528
1529 (define-public python-openpyxl
1530 (package
1531 (name "python-openpyxl")
1532 (version "2.6.2")
1533 (source
1534 (origin
1535 ;; We use the upstream repository, as the tests are not included in the
1536 ;; PyPI releases.
1537 (method hg-fetch)
1538 (uri (hg-reference
1539 (url "https://bitbucket.org/openpyxl/openpyxl")
1540 (changeset version)))
1541 (file-name (string-append name "-" version "-checkout"))
1542 (sha256
1543 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1544 (build-system python-build-system)
1545 (arguments
1546 `(#:phases (modify-phases %standard-phases
1547 (replace 'check
1548 (lambda _
1549 (invoke "pytest"))))))
1550 (native-inputs
1551 ;; For the test suite.
1552 `(("python-lxml" ,python-lxml)
1553 ("python-pillow" ,python-pillow)
1554 ("python-pytest" ,python-pytest)))
1555 (propagated-inputs
1556 `(("python-et-xmlfile" ,python-et-xmlfile)
1557 ("python-jdcal" ,python-jdcal)))
1558 (home-page "https://openpyxl.readthedocs.io")
1559 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1560 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1561 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1562 standard.")
1563 (license license:expat)))
1564
1565 (define-public python-eventlet
1566 (package
1567 (name "python-eventlet")
1568 (version "0.25.1")
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (pypi-uri "eventlet" version))
1573 (sha256
1574 (base32
1575 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1576 (build-system python-build-system)
1577 (propagated-inputs
1578 `(("python-greenlet" ,python-greenlet)))
1579 (arguments
1580 ;; TODO: Requires unpackaged 'enum-compat'.
1581 '(#:tests? #f))
1582 (home-page "https://eventlet.net")
1583 (synopsis "Concurrent networking library for Python")
1584 (description
1585 "Eventlet is a concurrent networking library for Python that
1586 allows you to change how you run your code, not how you write it.
1587 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1588 Coroutines ensure that the developer uses a blocking style of programming
1589 that is similar to threading, but provide the benefits of non-blocking I/O.
1590 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1591 from the Python interpreter, or as a small part of a larger application.")
1592 (license license:expat)))
1593
1594 (define-public python2-eventlet
1595 (let ((base (package-with-python2
1596 (strip-python2-variant python-eventlet))))
1597 (package (inherit base)
1598 (propagated-inputs
1599 `(("python2-enum34" ,python2-enum34)
1600 ,@(package-propagated-inputs base))))))
1601
1602 (define-public python-six
1603 (package
1604 (name "python-six")
1605 (version "1.14.0")
1606 (source
1607 (origin
1608 (method url-fetch)
1609 (uri (pypi-uri "six" version))
1610 (sha256
1611 (base32
1612 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1613 (build-system python-build-system)
1614 (arguments
1615 `(#:phases
1616 (modify-phases %standard-phases
1617 (replace 'check
1618 (lambda _
1619 (invoke "py.test" "-v"))))))
1620 (native-inputs
1621 `(("python-pytest" ,python-pytest-bootstrap)))
1622 (home-page "https://pypi.org/project/six/")
1623 (synopsis "Python 2 and 3 compatibility utilities")
1624 (description
1625 "Six is a Python 2 and 3 compatibility library. It provides utility
1626 functions for smoothing over the differences between the Python versions with
1627 the goal of writing Python code that is compatible on both Python versions.
1628 Six supports every Python version since 2.5. It is contained in only one
1629 Python file, so it can be easily copied into your project.")
1630 (license license:x11)))
1631
1632 (define-public python2-six
1633 (package-with-python2 python-six))
1634
1635 (define-public python-six-bootstrap
1636 (package
1637 (inherit python-six)
1638 (name "python-six-bootstrap")
1639 (native-inputs `())
1640 (arguments `(#:tests? #f))))
1641
1642 (define-public python2-six-bootstrap
1643 (package-with-python2 python-six-bootstrap))
1644
1645 (define-public python-schedule
1646 (package
1647 (name "python-schedule")
1648 (version "0.4.3")
1649 (source
1650 (origin
1651 (method url-fetch)
1652 (uri (pypi-uri "schedule" version))
1653 (sha256
1654 (base32
1655 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1656 (build-system python-build-system)
1657 (native-inputs
1658 `(("python-pytest" ,python-pytest)
1659 ("python-mock" ,python-mock)))
1660 (home-page "https://github.com/dbader/schedule")
1661 (synopsis "Schedule periodic function calls in Python")
1662 (description
1663 "Schedule is an in-process scheduler for periodic jobs that uses the
1664 builder pattern for configuration. Schedule lets you run Python functions (or
1665 any other callable) periodically at pre-determined intervals using a simple,
1666 human-friendly syntax.")
1667 (license license:expat)))
1668
1669 (define-public python2-schedule
1670 (package-with-python2 python-schedule))
1671
1672 (define-public python2-mechanize
1673 (package
1674 (name "python2-mechanize")
1675 (version "0.2.5")
1676 (source
1677 (origin
1678 (method url-fetch)
1679 (uri (pypi-uri "mechanize" version))
1680 (sha256
1681 (base32
1682 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1683 (build-system python-build-system)
1684 (arguments
1685 `(#:python ,python-2 ; apparently incompatible with Python 3
1686 #:tests? #f))
1687 ;; test fails with message
1688 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1689 ;; (python-3.3.2) or
1690 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1691 ;; (python-2.7.5).
1692 ;; The source code is from March 2011 and probably not up-to-date
1693 ;; with respect to python unit tests.
1694 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1695 (synopsis
1696 "Stateful programmatic web browsing in Python")
1697 (description
1698 "Mechanize implements stateful programmatic web browsing in Python,
1699 after Andy Lester’s Perl module WWW::Mechanize.")
1700 (license (license:non-copyleft
1701 "file://COPYING"
1702 "See COPYING in the distribution."))))
1703
1704
1705 (define-public python-simplejson
1706 (package
1707 (name "python-simplejson")
1708 (version "3.14.0")
1709 (source
1710 (origin
1711 (method url-fetch)
1712 (uri (pypi-uri "simplejson" version))
1713 (sha256
1714 (base32
1715 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1716 (build-system python-build-system)
1717 (home-page "http://simplejson.readthedocs.org/en/latest/")
1718 (synopsis
1719 "Json library for Python")
1720 (description
1721 "JSON (JavaScript Object Notation) is a subset of JavaScript
1722 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1723 format.
1724
1725 Simplejson exposes an API familiar to users of the standard library marshal
1726 and pickle modules. It is the externally maintained version of the json
1727 library contained in Python 2.6, but maintains compatibility with Python 2.5
1728 and (currently) has significant performance advantages, even without using
1729 the optional C extension for speedups. Simplejson is also supported on
1730 Python 3.3+.")
1731 (license license:x11)))
1732
1733 (define-public python2-simplejson
1734 (package-with-python2 python-simplejson))
1735
1736
1737 (define-public python-pyicu
1738 (package
1739 (name "python-pyicu")
1740 (version "2.4.3")
1741 (source
1742 (origin
1743 (method url-fetch)
1744 (uri (pypi-uri "PyICU" version))
1745 (sha256
1746 (base32
1747 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1748 (build-system python-build-system)
1749 (inputs
1750 `(("icu4c" ,icu4c)))
1751 (native-inputs
1752 `(("python-pytest" ,python-pytest)
1753 ("python-six" ,python-six)))
1754 (home-page "https://github.com/ovalhub/pyicu")
1755 (synopsis "Python extension wrapping the ICU C++ API")
1756 (description
1757 "PyICU is a python extension wrapping the ICU C++ API.")
1758 (license license:x11)))
1759
1760 (define-public python2-pyicu
1761 (package-with-python2 python-pyicu))
1762
1763 (define-public python-dogtail
1764 (package
1765 (name "python-dogtail")
1766 (version "0.9.11")
1767 (source (origin
1768 (method url-fetch)
1769 (uri
1770 (string-append
1771 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1772 "dogtail-" version ".tar.gz"))
1773 (sha256
1774 (base32
1775 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1776 (build-system python-build-system)
1777 (arguments
1778 `(#:tests? #f ; TODO Launching dbus for the tests
1779 ; fails
1780 #:phases
1781 (modify-phases %standard-phases
1782 (replace 'check
1783 (lambda* (#:key tests? #:allow-other-keys)
1784 (when tests?
1785 (system "Xvfb :1 &")
1786 (setenv "DISPLAY" ":1")
1787 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1788 #t)))))
1789 (propagated-inputs
1790 `(("python-pygobject" ,python-pygobject)
1791 ("python-pycairo" ,python-pycairo)
1792 ("python-pyatspi" ,python-pyatspi)))
1793 (native-inputs
1794 `(("python-nose" ,python-nose)
1795 ("gtk+" ,gtk+)
1796 ("xvfb" ,xorg-server)
1797 ("dbus" ,dbus)
1798 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1799 ("gobject-introspection" ,gobject-introspection)))
1800 (home-page "https://gitlab.com/dogtail/dogtail/")
1801 (synopsis "GUI test tool and automation framework written in Python")
1802 (description
1803 "Dogtail is a GUI test tool and automation framework written in Python.
1804 It uses Accessibility (a11y) technologies to communicate with desktop
1805 applications. dogtail scripts are written in Python and executed like any
1806 other Python program.")
1807 (license license:gpl2+)))
1808
1809 (define-public python2-dogtail
1810 (package-with-python2 python-dogtail))
1811
1812 (define-public python-empy
1813 (package
1814 (name "python-empy")
1815 (version "3.3.3")
1816 (source (origin
1817 (method url-fetch)
1818 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1819 version ".tar.gz"))
1820 (sha256
1821 (base32
1822 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1823 (build-system python-build-system)
1824 (arguments
1825 `(#:tests? #f)) ; python2 only
1826 (home-page "http://www.alcyone.com/software/empy/")
1827 (synopsis "Templating system for Python")
1828 (description
1829 "EmPy is a system for embedding Python expressions and statements in
1830 template text; it takes an EmPy source file, processes it, and produces
1831 output. This is accomplished via expansions, which are special signals to the
1832 EmPy system and are set off by a special prefix (by default the at sign, @@).
1833 EmPy can expand arbitrary Python expressions and statements in this way, as
1834 well as a variety of special forms. Textual data not explicitly delimited in
1835 this way is sent unaffected to the output, allowing Python to be used in
1836 effect as a markup language. Also supported are callbacks via hooks,
1837 recording and playback via diversions, and dynamic, chainable filters. The
1838 system is highly configurable via command line options and embedded
1839 commands.")
1840 (license license:lgpl2.1+)))
1841
1842 (define-public python2-empy
1843 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1844 (package
1845 (inherit base)
1846 (arguments `(,@(package-arguments base)
1847 #:tests? #t)))))
1848
1849 (define-public python2-element-tree
1850 (package
1851 (name "python2-element-tree")
1852 (version "1.2.6")
1853 (source (origin
1854 (method url-fetch)
1855 (uri (string-append
1856 "http://effbot.org/media/downloads/elementtree-"
1857 version "-20050316.tar.gz"))
1858 (sha256
1859 (base32
1860 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1861 (build-system python-build-system)
1862 (arguments
1863 `(#:python ,python-2 ; seems to be part of Python 3
1864 #:tests? #f)) ; no 'test' sub-command
1865 (synopsis "Toolkit for XML processing in Python")
1866 (description
1867 "ElementTree is a Python library supporting lightweight XML processing.")
1868 (home-page "https://effbot.org/zone/element-index.htm")
1869 (license (license:x11-style
1870 "http://docs.python.org/2/license.html"
1871 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1872
1873 (define-public python2-pybugz
1874 (package
1875 (name "python2-pybugz")
1876 (version "0.6.11")
1877 (source (origin
1878 (method url-fetch)
1879 (uri (string-append
1880 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1881 version ".tar.gz"))
1882 (sha256
1883 (base32
1884 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1885 (patches (search-patches "pybugz-stty.patch"
1886 "pybugz-encode-error.patch"))))
1887 (build-system python-build-system)
1888 (arguments
1889 `(#:python ,python-2 ; SyntaxError with Python 3
1890 #:tests? #f)) ; no 'test' sub-command
1891 (propagated-inputs
1892 `(("element-tree" ,python2-element-tree)))
1893 (synopsis "Python and command-line interface to Bugzilla")
1894 (description
1895 "PyBugz is a Python library and command-line tool to query the Bugzilla
1896 bug tracking system. It is meant as an aid to speed up interaction with the
1897 bug tracker.")
1898 (home-page "http://www.liquidx.net/pybugz/")
1899 (license license:gpl2)))
1900
1901 (define-public python2-enum
1902 (package
1903 (name "python2-enum")
1904 (version "0.4.6")
1905 (source (origin
1906 (method url-fetch)
1907 (uri (pypi-uri "enum" version))
1908 (sha256
1909 (base32
1910 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1911 (build-system python-build-system)
1912 (arguments
1913 `(#:python ,python-2))
1914 (home-page "https://pypi.org/project/enum/")
1915 (synopsis "Robust enumerated type support in Python")
1916 (description
1917 "This provides a module for robust enumerations in Python. It has
1918 been superseded by the Python standard library and is provided only for
1919 compatibility.")
1920 ;; Choice of either license.
1921 (license (list license:gpl3+ license:psfl))))
1922
1923 (define-public python-enum34
1924 (package
1925 (name "python-enum34")
1926 (version "1.1.6")
1927 (source
1928 (origin
1929 (method url-fetch)
1930 (uri (pypi-uri "enum34" version))
1931 (sha256
1932 (base32
1933 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1934 (build-system python-build-system)
1935 (home-page "https://pypi.org/project/enum34/")
1936 (synopsis "Backported Python 3.4 Enum")
1937 (description
1938 "Enum34 is the new Python stdlib enum module available in Python 3.4
1939 backported for previous versions of Python from 2.4 to 3.3.")
1940 (license license:bsd-3)))
1941
1942 (define-public python2-enum34
1943 (package-with-python2 python-enum34))
1944
1945 (define-public python-parse-type
1946 (package
1947 (name "python-parse-type")
1948 (version "0.4.2")
1949 (source
1950 (origin
1951 (method url-fetch)
1952 (uri (pypi-uri "parse_type" version))
1953 (sha256
1954 (base32
1955 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1956 (build-system python-build-system)
1957 (propagated-inputs
1958 `(("python-six" ,python-six)
1959 ("python-parse" ,python-parse)))
1960 (native-inputs
1961 `(("python-pytest" ,python-pytest)
1962 ("python-pytest-runner" ,python-pytest-runner)))
1963 (home-page "https://github.com/jenisys/parse_type")
1964 (synopsis "Extended parse module")
1965 (description
1966 "Parse_type extends the python parse module.")
1967 (properties
1968 `((python2-variant . ,(delay python2-parse-type))))
1969 (license license:bsd-3)))
1970
1971 (define-public python2-parse-type
1972 (let ((base (package-with-python2
1973 (strip-python2-variant python-parse-type))))
1974 (package (inherit base)
1975 (propagated-inputs
1976 `(("python2-enum34" ,python2-enum34)
1977 ,@(package-propagated-inputs base))))))
1978
1979 (define-public python-parse
1980 (package
1981 (name "python-parse")
1982 (version "1.8.4")
1983 (source
1984 (origin
1985 (method url-fetch)
1986 (uri (pypi-uri "parse" version))
1987 (sha256
1988 (base32
1989 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1990 (build-system python-build-system)
1991 (arguments
1992 `(#:phases
1993 (modify-phases %standard-phases
1994 (replace 'check
1995 (lambda _ (invoke "python" "test_parse.py"))))))
1996 (home-page "https://github.com/r1chardj0n3s/parse")
1997 (synopsis "Parse strings")
1998 (description
1999 "Parse strings using a specification based on the Python @code{format()}
2000 syntax.")
2001 (license license:x11)))
2002
2003 (define-public python-polib
2004 (package
2005 (name "python-polib")
2006 (version "1.0.8")
2007 (source (origin
2008 (method url-fetch)
2009 (uri (pypi-uri "polib" version))
2010 (sha256
2011 (base32
2012 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2013 (build-system python-build-system)
2014 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2015 (synopsis "Manipulate, create and modify gettext files")
2016 (description "Polib can manipulate any gettext format (po, pot and mo)
2017 files. It can be used to create po files from scratch or to modify
2018 existing ones.")
2019 (license license:expat)))
2020
2021 (define-public python2-polib
2022 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2023 (package
2024 (inherit base)
2025 (arguments `(,@(package-arguments base)
2026 ;; Tests don't work with python2.
2027 #:tests? #f)))))
2028
2029 (define-public python-poyo
2030 (package
2031 (name "python-poyo")
2032 (version "0.5.0")
2033 (source
2034 (origin
2035 (method url-fetch)
2036 (uri (pypi-uri "poyo" version))
2037 (sha256
2038 (base32
2039 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2040 (build-system python-build-system)
2041 (home-page "https://github.com/hackebrot/poyo")
2042 (synopsis "Lightweight YAML Parser for Python")
2043 (description
2044 "This package provides a lightweight YAML Parser for Python. It supports
2045 only a chosen subset of the YAML format that is required to parse cookiecutter
2046 user configuration files. It does not have support for serializing into YAML
2047 and is not compatible with JSON.")
2048 (license license:expat)))
2049
2050 (define-public scons
2051 (package
2052 (name "scons")
2053 (version "3.0.4")
2054 (source (origin
2055 (method git-fetch)
2056 (uri (git-reference
2057 (url "https://github.com/SCons/scons.git")
2058 (commit version)))
2059 (file-name (git-file-name name version))
2060 (sha256
2061 (base32
2062 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2063 (build-system python-build-system)
2064 (arguments
2065 `(#:use-setuptools? #f ; still relies on distutils
2066 #:tests? #f ; no 'python setup.py test' command
2067 #:phases
2068 (modify-phases %standard-phases
2069 (add-before 'build 'bootstrap
2070 (lambda _
2071 (substitute* "src/engine/SCons/compat/__init__.py"
2072 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2073 "sys.modules[new] = __import__(old)"))
2074 (substitute* "src/engine/SCons/Platform/__init__.py"
2075 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2076 "mod = __import__(full_name)"))
2077 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2078 (chdir "build/scons")
2079 #t)))))
2080 (home-page "https://scons.org/")
2081 (synopsis "Software construction tool written in Python")
2082 (description
2083 "SCons is a software construction tool. Think of SCons as an improved,
2084 cross-platform substitute for the classic Make utility with integrated
2085 functionality similar to autoconf/automake and compiler caches such as ccache.
2086 In short, SCons is an easier, more reliable and faster way to build
2087 software.")
2088 (license license:x11)))
2089
2090 (define-public scons-python2
2091 (package
2092 (inherit (package-with-python2 scons))
2093 (name "scons-python2")))
2094
2095 (define-public python-extras
2096 (package
2097 (name "python-extras")
2098 (version "1.0.0")
2099 (source
2100 (origin
2101 (method url-fetch)
2102 (uri (pypi-uri "extras" version))
2103 (sha256
2104 (base32
2105 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2106 (build-system python-build-system)
2107 (arguments
2108 ;; FIXME: Circular dependency on testtools.
2109 '(#:tests? #f))
2110 (home-page "https://github.com/testing-cabal/extras")
2111 (synopsis "Useful extensions to the Python standard library")
2112 (description
2113 "Extras is a set of extensions to the Python standard library.")
2114 (license license:expat)))
2115
2116 (define-public python2-extras
2117 (package-with-python2 python-extras))
2118
2119 (define-public python-mimeparse
2120 (package
2121 (name "python-mimeparse")
2122 (version "1.6.0")
2123 (source
2124 (origin
2125 (method url-fetch)
2126 (uri (pypi-uri "python-mimeparse" version))
2127 (sha256
2128 (base32
2129 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2130 (build-system python-build-system)
2131 (arguments
2132 '(#:phases
2133 (modify-phases %standard-phases
2134 (replace 'check
2135 (lambda _
2136 (invoke "./mimeparse_test.py"))))))
2137 (home-page
2138 "https://github.com/dbtsai/python-mimeparse")
2139 (synopsis "Python library for parsing MIME types")
2140 (description
2141 "Mimeparse provides basic functions for parsing MIME type names and
2142 matching them against a list of media-ranges.")
2143 (license license:expat)))
2144
2145 (define-public python2-mimeparse
2146 (package-with-python2 python-mimeparse))
2147
2148 (define-public python-miniboa
2149 (package
2150 (name "python-miniboa")
2151 (version "1.0.7")
2152 (source
2153 (origin
2154 (method url-fetch)
2155 (uri (pypi-uri "miniboa" version))
2156 (sha256
2157 (base32
2158 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2159 (build-system python-build-system)
2160 (home-page "https://github.com/shmup/miniboa")
2161 (synopsis "Simple, single-threaded Telnet server")
2162 (description
2163 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2164 server.")
2165 (license license:asl2.0)))
2166
2167 (define-public python2-miniboa
2168 (package-with-python2 python-miniboa))
2169
2170 (define-public python-pafy
2171 (package
2172 (name "python-pafy")
2173 (version "0.5.3.1")
2174 (source
2175 (origin
2176 (method url-fetch)
2177 (uri (pypi-uri "pafy" version))
2178 (sha256
2179 (base32
2180 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2181 (build-system python-build-system)
2182 (arguments
2183 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2184 (propagated-inputs
2185 ;; Youtube-dl is a python package which is imported in the file
2186 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2187 `(("youtube-dl" ,youtube-dl)))
2188 (home-page "https://np1.github.io/pafy/")
2189 (synopsis "Retrieve YouTube content and metadata")
2190 (description
2191 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2192 (license license:lgpl3+)))
2193
2194 (define-public python2-funcsigs
2195 (package
2196 (name "python2-funcsigs")
2197 (version "1.0.2")
2198 (source (origin
2199 (method url-fetch)
2200 (uri (pypi-uri "funcsigs" version))
2201 (sha256
2202 (base32
2203 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2204 (build-system python-build-system)
2205 (arguments
2206 `(#:python ,python-2))
2207 (native-inputs
2208 `(("python2-unittest2" ,python2-unittest2)))
2209 (home-page "http://funcsigs.readthedocs.org")
2210 (synopsis "Python function signatures from PEP362")
2211 (description
2212 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2213 (license license:asl2.0)))
2214
2215 (define-public python2-funcsigs-bootstrap
2216 (package
2217 (inherit python2-funcsigs)
2218 (name "python2-funcsigs-bootstrap")
2219 (native-inputs `())
2220 (arguments
2221 `(#:tests? #f
2222 ,@(package-arguments python2-funcsigs)))))
2223
2224 (define-public python-py
2225 (package
2226 (name "python-py")
2227 (version "1.8.1")
2228 (source
2229 (origin
2230 (method url-fetch)
2231 (uri (pypi-uri "py" version))
2232 (sha256
2233 (base32
2234 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2235 (build-system python-build-system)
2236 (arguments
2237 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2238 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2239 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2240 ;; Is this module globally installed?"
2241 '(#:tests? #f))
2242 (native-inputs
2243 `(("python-setuptools-scm" ,python-setuptools-scm)))
2244 (home-page "https://github.com/pytest-dev/py")
2245 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2246 (description
2247 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2248 code introspection, and logging.")
2249 (license license:expat)))
2250
2251 (define-public python2-py
2252 (package-with-python2 python-py))
2253
2254 ;; Recent versions of python-fixtures and python-testrepository need
2255 ;; python-pbr for packaging, which itself needs these two packages for
2256 ;; testing.
2257 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2258 ;; same source, just without any test dependencies and with tests disabled.
2259 ;; python-pbr-minmal is then used to package python-fixtures and
2260 ;; python-testrepository.
2261 ;; Strictly speaking we currently could remove the test-requirements from the
2262 ;; normal python-pbr package (and save this package) since test are disabled
2263 ;; there anyway. But this may change in future.
2264 (define-public python-pbr-minimal
2265 (package
2266 (name "python-pbr-minimal")
2267 (version "3.0.1")
2268 (source
2269 (origin
2270 (method url-fetch)
2271 (uri (pypi-uri "pbr" version))
2272 (sha256
2273 (base32
2274 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2275 (build-system python-build-system)
2276 (arguments
2277 `(#:tests? #f))
2278 (home-page "https://docs.openstack.org/pbr/latest/")
2279 (synopsis "Minimal build of python-pbr used for bootstrapping")
2280 (description
2281 "Used only for bootstrapping python2-pbr, you should not need this.")
2282 (license license:asl2.0)))
2283
2284 (define-public python2-pbr-minimal
2285 (package-with-python2 python-pbr-minimal))
2286
2287 (define-public python-pbr
2288 (package
2289 (inherit python-pbr-minimal)
2290 (name "python-pbr")
2291 (arguments
2292 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2293 (propagated-inputs
2294 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2295 (native-inputs
2296 `(("python-fixtures" ,python-fixtures-bootstrap)
2297 ;; discover, coverage, hacking, subunit
2298 ("python-mock" ,python-mock)
2299 ("python-six" ,python-six)
2300 ("python-sphinx" ,python-sphinx)
2301 ("python-testrepository" ,python-testrepository-bootstrap)
2302 ("python-testresources" ,python-testresources-bootstrap)
2303 ("python-testscenarios" ,python-testscenarios-bootstrap)
2304 ("python-testtools" ,python-testtools-bootstrap)
2305 ("python-virtualenv" ,python-virtualenv)))
2306 (synopsis "Enhance the default behavior of Python’s setuptools")
2307 (description
2308 "Python Build Reasonableness (PBR) is a library that injects some useful
2309 and sensible default behaviors into your setuptools run. It will set
2310 versions, process requirements files and generate AUTHORS and ChangeLog file
2311 from git information.
2312 ")))
2313
2314 (define-public python2-pbr
2315 (package-with-python2 python-pbr))
2316
2317 (define-public python-pyrsistent
2318 (package
2319 (name "python-pyrsistent")
2320 (version "0.16.0")
2321 (home-page "https://github.com/tobgu/pyrsistent")
2322 (source (origin
2323 (method url-fetch)
2324 (uri (pypi-uri "pyrsistent" version))
2325 (sha256
2326 (base32
2327 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2328 (build-system python-build-system)
2329 (arguments
2330 '(#:phases (modify-phases %standard-phases
2331 ;; The package works fine with newer Pytest and Hypothesis, but
2332 ;; has pinned older versions to stay compatible with Python 2.
2333 (add-before 'check 'loosen-pytest-requirement
2334 (lambda _
2335 (substitute* "setup.py"
2336 (("pytest<5") "pytest")
2337 (("hypothesis<5") "hypothesis"))
2338 #t)))))
2339 (native-inputs
2340 `(("python-hypothesis" ,python-hypothesis)
2341 ("python-pytest" ,python-pytest)
2342 ("python-pytest-runner" ,python-pytest-runner)))
2343 (propagated-inputs
2344 `(("python-six" ,python-six)))
2345 (synopsis "Persistent data structures for Python")
2346 (description
2347 "Pyrsistent is a number of persistent collections (by some referred to as
2348 functional data structures). Persistent in the sense that they are immutable.
2349
2350 All methods on a data structure that would normally mutate it instead return a
2351 new copy of the structure containing the requested updates. The original
2352 structure is left untouched.")
2353 (license license:expat)))
2354
2355 (define-public python2-pyrsistent
2356 (package-with-python2 python-pyrsistent))
2357
2358 (define-public python-exif-read
2359 (package
2360 (name "python-exif-read")
2361 (version "2.1.2")
2362 (source (origin
2363 (method url-fetch)
2364 (uri (pypi-uri "ExifRead" version))
2365 (sha256
2366 (base32
2367 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2368 (build-system python-build-system)
2369 (arguments `(#:tests? #f)) ; no tests
2370 (home-page "https://github.com/ianare/exif-py")
2371 (synopsis "Python library to extract EXIF data from image files")
2372 (description
2373 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2374 files.")
2375 (license license:bsd-3)))
2376
2377 (define-public python2-exif-read
2378 (package-with-python2 python-exif-read))
2379
2380 (define-public python-pyld
2381 (package
2382 (name "python-pyld")
2383 (version "1.0.5")
2384 (source (origin
2385 (method url-fetch)
2386 (uri (pypi-uri "PyLD" version))
2387 (sha256
2388 (base32
2389 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2390 (build-system python-build-system)
2391 (home-page "https://github.com/digitalbazaar/pyld")
2392 (synopsis "Python implementation of the JSON-LD specification")
2393 (description
2394 "PyLD is an implementation of the JSON-LD specification.")
2395 (license license:bsd-3)))
2396
2397 (define-public python2-pyld
2398 (package-with-python2 python-pyld))
2399
2400 (define-public python-click
2401 (package
2402 (name "python-click")
2403 (version "7.0")
2404 (source
2405 (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "click" version))
2408 (sha256
2409 (base32
2410 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
2411 (build-system python-build-system)
2412 (arguments
2413 `(#:phases
2414 (modify-phases %standard-phases
2415 (add-after 'unpack 'fix-paths
2416 (lambda* (#:key inputs #:allow-other-keys)
2417 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2418 "cross-libc" "libc"))))
2419 (substitute* "click/_unicodefun.py"
2420 (("'locale'")
2421 (string-append "'" glibc "/bin/locale'"))))
2422 #t))
2423 (replace 'check
2424 (lambda _
2425 (invoke "python" "-m" "pytest"))))))
2426 (native-inputs
2427 `(("python-pytest" ,python-pytest)))
2428 (home-page "https://palletsprojects.com/p/click/")
2429 (synopsis "Command line library for Python")
2430 (description
2431 "Click is a Python package for creating command line interfaces in a
2432 composable way with as little code as necessary. Its name stands for
2433 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2434 with sensible defaults out of the box.")
2435 (license license:bsd-3)))
2436
2437 (define-public python2-click
2438 (package-with-python2 python-click))
2439
2440 (define-public python-wheel
2441 (package
2442 (name "python-wheel")
2443 (version "0.33.6")
2444 (source
2445 (origin
2446 (method url-fetch)
2447 (uri (pypi-uri "wheel" version))
2448 (sha256
2449 (base32
2450 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2451 (build-system python-build-system)
2452 (arguments
2453 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2454 ;; fails to find the newly-built bdist_wheel library, even though it is
2455 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2456 '(#:tests? #f))
2457 (home-page "https://bitbucket.org/pypa/wheel/")
2458 (synopsis "Format for built Python packages")
2459 (description
2460 "A wheel is a ZIP-format archive with a specially formatted filename and
2461 the @code{.whl} extension. It is designed to contain all the files for a PEP
2462 376 compatible install in a way that is very close to the on-disk format. Many
2463 packages will be properly installed with only the @code{Unpack} step and the
2464 unpacked archive preserves enough information to @code{Spread} (copy data and
2465 scripts to their final locations) at any later time. Wheel files can be
2466 installed with a newer @code{pip} or with wheel's own command line utility.")
2467 (license license:expat)))
2468
2469 (define-public python2-wheel
2470 (package-with-python2 python-wheel))
2471
2472 (define-public python-vcversioner
2473 (package
2474 (name "python-vcversioner")
2475 (version "2.16.0.0")
2476 (source
2477 (origin
2478 (method url-fetch)
2479 (uri (pypi-uri "vcversioner" version))
2480 (sha256
2481 (base32
2482 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2483 (build-system python-build-system)
2484 (synopsis "Python library for version number discovery")
2485 (description "Vcversioner is a Python library that inspects tagging
2486 information in a variety of version control systems in order to discover
2487 version numbers.")
2488 (home-page "https://github.com/habnabit/vcversioner")
2489 (license license:isc)))
2490
2491 (define-public python2-vcversioner
2492 (package-with-python2 python-vcversioner))
2493
2494 (define-public python-jdcal
2495 (package
2496 (name "python-jdcal")
2497 (version "1.4")
2498 (source
2499 (origin
2500 (method url-fetch)
2501 (uri (pypi-uri "jdcal" version))
2502 (sha256
2503 (base32
2504 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2505 (build-system python-build-system)
2506 (arguments
2507 `(#:phases (modify-phases %standard-phases
2508 (replace 'check
2509 (lambda _
2510 (invoke "pytest"))))))
2511 (native-inputs
2512 `(("python-pytest" ,python-pytest)))
2513 (home-page "https://github.com/phn/jdcal")
2514 (synopsis "Functions to convert between Julian dates Gregorian dates")
2515 (description "This Python library provides functions for converting
2516 between Julian dates and Gregorian dates.")
2517 (license license:bsd-2)))
2518
2519 (define-public python2-jdcal
2520 (package-with-python2 python-jdcal))
2521
2522 (define-public python-jsondiff
2523 (package
2524 (name "python-jsondiff")
2525 (version "1.2.0")
2526 (source
2527 (origin
2528 (method url-fetch)
2529 (uri (pypi-uri "jsondiff" version))
2530 (sha256
2531 (base32
2532 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2533 (build-system python-build-system)
2534 (native-inputs
2535 `(("python-nose" ,python-nose)
2536 ("python-nose-random" ,python-nose-random)))
2537 (home-page
2538 "https://github.com/fzumstein/jsondiff")
2539 (synopsis "Compare JSON and JSON-like structures in Python")
2540 (description "@code{jsondiff} is a Python library which lets you
2541 compare, diff, and patch JSON and JSON-like structures in Python.")
2542 (license license:expat)))
2543
2544 (define-public python-jsonschema
2545 (package
2546 (name "python-jsonschema")
2547 (version "3.2.0")
2548 (source (origin
2549 (method url-fetch)
2550 (uri (pypi-uri "jsonschema" version))
2551 (sha256
2552 (base32
2553 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2554 (build-system python-build-system)
2555 (arguments
2556 '(#:phases
2557 (modify-phases %standard-phases
2558 (replace 'check
2559 (lambda* (#:key inputs outputs #:allow-other-keys)
2560 (add-installed-pythonpath inputs outputs)
2561 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2562 (invoke "trial" "jsonschema"))))))
2563 (native-inputs
2564 `(("python-setuptools_scm" ,python-setuptools-scm)
2565 ("python-twisted" ,python-twisted)))
2566 (propagated-inputs
2567 `(("python-attrs" ,python-attrs)
2568 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2569 ("python-pyrsistent" ,python-pyrsistent)
2570 ("python-six" ,python-six)))
2571 (home-page "https://github.com/Julian/jsonschema")
2572 (synopsis "Implementation of JSON Schema for Python")
2573 (description
2574 "Jsonschema is an implementation of JSON Schema for Python.")
2575 (license license:expat)
2576 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2577
2578 (define-public python2-jsonschema
2579 (let ((jsonschema (package-with-python2
2580 (strip-python2-variant python-jsonschema))))
2581 (package (inherit jsonschema)
2582 (propagated-inputs
2583 `(("python2-functools32" ,python2-functools32)
2584 ,@(package-propagated-inputs jsonschema))))))
2585
2586 (define-public python-schema
2587 (package
2588 (name "python-schema")
2589 (version "0.6.6")
2590 (source
2591 (origin
2592 (method url-fetch)
2593 (uri (pypi-uri "schema" version))
2594 (sha256
2595 (base32
2596 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2597 (build-system python-build-system)
2598 (native-inputs
2599 `(("python-pytest" ,python-pytest)))
2600 (home-page "https://github.com/keleshev/schema")
2601 (synopsis "Simple data validation library")
2602 (description
2603 "@code{python-schema} is a library for validating Python data
2604 structures, such as those obtained from config-files, forms, external
2605 services or command-line parsing, converted from JSON/YAML (or
2606 something else) to Python data-types.")
2607 (license license:psfl)))
2608
2609 (define-public python2-schema
2610 (package-with-python2 python-schema))
2611
2612 (define-public python-schema-0.5
2613 (package (inherit python-schema)
2614 (version "0.5.0")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "schema" version))
2619 (sha256
2620 (base32
2621 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2622
2623 (define-public python2-schema-0.5
2624 (package-with-python2 python-schema-0.5))
2625
2626 (define-public python-kitchen
2627 (package
2628 (name "python-kitchen")
2629 (version "1.2.5")
2630 (source
2631 (origin
2632 (method url-fetch)
2633 (uri (pypi-uri "kitchen" version))
2634 (sha256
2635 (base32
2636 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2637 (build-system python-build-system)
2638 (propagated-inputs
2639 `(("python-chardet" ,python-chardet)))
2640 (home-page "https://github.com/fedora-infra/kitchen")
2641 (synopsis "Python API for snippets")
2642 (description "@code{kitchen} module provides a python API for all sorts of
2643 little useful snippets of code that everybody ends up writing for their projects
2644 but never seem big enough to build an independent release. Use kitchen and stop
2645 cutting and pasting that code over and over.")
2646 (license (list license:lgpl2.1+
2647 ;; subprocess.py, test_subprocess.py,
2648 ;; kitchen/pycompat25/defaultdict.py:
2649 license:psfl))))
2650
2651 (define-public python2-kitchen
2652 (package-with-python2 python-kitchen))
2653
2654 (define-public python-unidecode
2655 (package
2656 (name "python-unidecode")
2657 (version "1.1.1")
2658 (source (origin
2659 (method url-fetch)
2660 (uri (pypi-uri "Unidecode" version))
2661 (sha256
2662 (base32
2663 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2664 (build-system python-build-system)
2665 (home-page "https://pypi.org/project/Unidecode/")
2666 (synopsis "ASCII transliterations of Unicode text")
2667 (description
2668 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2669 useful when integrating with legacy code that doesn't support Unicode, or for
2670 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2671 machine identifiers from human-readable Unicode strings that should still be
2672 somewhat intelligible.")
2673 (license license:gpl2+)))
2674
2675 (define-public python2-unidecode
2676 (package-with-python2 python-unidecode))
2677
2678 (define-public python-text-unidecode
2679 (package
2680 (name "python-text-unidecode")
2681 (version "1.3")
2682 (source (origin
2683 (method url-fetch)
2684 (uri (pypi-uri "text-unidecode" version))
2685 (sha256
2686 (base32
2687 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2688 (build-system python-build-system)
2689 (arguments
2690 '(#:phases (modify-phases %standard-phases
2691 (replace 'check
2692 (lambda _
2693 (setenv "PYTHONPATH"
2694 (string-append "./build/lib:"
2695 (getenv "PYTHONPATH")))
2696 (invoke "pytest" "-vv"))))))
2697 (native-inputs
2698 `(("python-pytest" ,python-pytest)))
2699 (home-page "https://github.com/kmike/text-unidecode/")
2700 (synopsis "Decode Unicode data")
2701 (description
2702 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2703 Perl library. It can create ASCII representations of Unicode data. In general
2704 users should prefer the @code{python-unidecode} package which offers better
2705 memory usage and transliteration quality.")
2706 ;; The user can choose either license.
2707 (license (list license:clarified-artistic license:gpl2+))))
2708
2709 (define-public python2-text-unidecode
2710 (package-with-python2 python-text-unidecode))
2711
2712 (define-public python-pyjwt
2713 (package
2714 (name "python-pyjwt")
2715 (version "1.7.1")
2716 (source
2717 (origin
2718 (method url-fetch)
2719 (uri (pypi-uri "PyJWT" version))
2720 (sha256
2721 (base32
2722 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2723 (modules '((guix build utils)))
2724 (snippet
2725 '(begin
2726 (for-each delete-file-recursively
2727 (find-files "." "\\.pyc$"))
2728 #t))))
2729 (build-system python-build-system)
2730 (arguments
2731 '(#:phases (modify-phases %standard-phases
2732 (replace 'check
2733 (lambda _
2734 ;; Mimic upstream commit 3a20892442b34c7 to get
2735 ;; rid of dependency on pytest-runner < 5.0.
2736 ;; Remove substitution for PyJWT > 1.7.1.
2737 (substitute* "setup.py"
2738 ((".*pytest-runner.*")
2739 ""))
2740 (invoke "pytest" "-vv"))))))
2741 (native-inputs
2742 `(("python-pytest" ,python-pytest)
2743 ("python-pytest-cov" ,python-pytest-cov)))
2744 (home-page "https://github.com/progrium/pyjwt")
2745 (synopsis "JSON Web Token implementation in Python")
2746 (description
2747 "PyJWT is a JSON Web Token implementation written in Python.")
2748 (license license:expat)))
2749
2750 (define-public python2-pyjwt
2751 (package-with-python2 python-pyjwt))
2752
2753 (define-public python-pykka
2754 (package
2755 (name "python-pykka")
2756 (version "1.2.1")
2757 (source
2758 (origin
2759 (method url-fetch)
2760 (uri (pypi-uri "Pykka" version))
2761 (sha256
2762 (base32
2763 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2764 (build-system python-build-system)
2765 (native-inputs
2766 `(("python-mock" ,python-mock)
2767 ("python-nose" ,python-nose)
2768 ("python-gevent" ,python-gevent)
2769 ("python-eventlet" ,python-eventlet)))
2770 (home-page "https://www.pykka.org/")
2771 (synopsis "Pykka is a Python implementation of the actor model")
2772 (description
2773 "Pykka is a Python implementation of the actor model.
2774 The actor model introduces some simple rules to control the sharing
2775 of state and cooperation between execution units, which makes it
2776 easier to build concurrent applications.")
2777 (license license:asl2.0)))
2778
2779 (define-public python2-pykka
2780 (package-with-python2 python-pykka))
2781
2782 (define-public python-pymsgbox
2783 (package
2784 (name "python-pymsgbox")
2785 (version "1.0.6")
2786 (source
2787 (origin
2788 (method git-fetch)
2789 (uri (git-reference
2790 ;; LICENSE.txt is not present on pypi
2791 (url "https://github.com/asweigart/PyMsgBox")
2792 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2793 (file-name (git-file-name name version))
2794 (sha256
2795 (base32
2796 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2797 (arguments
2798 ;; Circular dependency to run tests:
2799 ;; Tests need pyautogui, which depends on pymsgbox.
2800 '(#:tests? #f))
2801 (build-system python-build-system)
2802 (home-page "https://github.com/asweigart/PyMsgBox")
2803 (synopsis "Python module for JavaScript-like message boxes")
2804 (description
2805 "PyMsgBox is a simple, cross-platform, pure Python module for
2806 JavaScript-like message boxes. Types of dialog boxes include:
2807 @enumerate
2808 @item alert
2809 @item confirm
2810 @item prompt
2811 @item password
2812 @end enumerate
2813 ")
2814 (license license:bsd-3)))
2815
2816 (define-public python-pympler
2817 (package
2818 (name "python-pympler")
2819 (home-page "https://pythonhosted.org/Pympler/")
2820 (version "0.8")
2821 (source (origin
2822 (method url-fetch)
2823 (uri (pypi-uri "Pympler" version))
2824 (sha256
2825 (base32
2826 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2827 (build-system python-build-system)
2828 (arguments
2829 `(#:phases (modify-phases %standard-phases
2830 (delete 'check)
2831 (add-after 'install 'check
2832 (lambda* (#:key inputs outputs #:allow-other-keys)
2833 (add-installed-pythonpath inputs outputs)
2834 (invoke "python" "setup.py" "test"))))))
2835 (synopsis "Measure, monitor and analyze memory behavior")
2836 (description
2837 "Pympler is a development tool to measure, monitor and analyze
2838 the memory behavior of Python objects in a running Python application.
2839
2840 By pympling a Python application, detailed insight in the size and the
2841 lifetime of Python objects can be obtained. Undesirable or unexpected
2842 runtime behavior like memory bloat and other @samp{pymples} can easily
2843 be identified.
2844
2845 A web profiling frontend exposes process statistics, garbage
2846 visualisation and class tracker statistics.")
2847 (license license:asl2.0)))
2848
2849 (define-public python2-pympler
2850 (package-with-python2 python-pympler))
2851
2852 (define-public python-itsdangerous
2853 (package
2854 (name "python-itsdangerous")
2855 (version "1.1.0")
2856 (source
2857 (origin
2858 (method url-fetch)
2859 (uri (pypi-uri "itsdangerous" version))
2860 (sha256
2861 (base32
2862 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2863 (build-system python-build-system)
2864 (home-page "https://palletsprojects.com/p/itsdangerous/")
2865 (synopsis "Python library for passing data to/from untrusted environments")
2866 (description
2867 "Itsdangerous provides various helpers to pass trusted data to untrusted
2868 environments and back.")
2869 (license license:bsd-3)))
2870
2871 (define-public python2-itsdangerous
2872 (package-with-python2 python-itsdangerous))
2873
2874 (define-public python-pyyaml
2875 (package
2876 (name "python-pyyaml")
2877 (version "5.3.1")
2878 (source
2879 (origin
2880 (method url-fetch)
2881 (uri (pypi-uri "PyYAML" version))
2882 (sha256
2883 (base32
2884 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
2885 (build-system python-build-system)
2886 (inputs
2887 `(("libyaml" ,libyaml)))
2888 (home-page "https://pyyaml.org")
2889 (synopsis "YAML parser and emitter for Python")
2890 (description
2891 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2892 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2893 API, and sensible error messages. PyYAML supports standard YAML tags and
2894 provides Python-specific tags that represent an arbitrary Python object.")
2895 (license license:expat)))
2896
2897 (define-public python2-pyyaml
2898 (package-with-python2 python-pyyaml))
2899
2900 (define-public python-vine
2901 (package
2902 (name "python-vine")
2903 (version "1.1.4")
2904 (source
2905 (origin
2906 (method url-fetch)
2907 (uri (pypi-uri "vine" version))
2908 (sha256
2909 (base32
2910 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2911 (build-system python-build-system)
2912 (native-inputs
2913 `(("python-pytest" ,python-pytest)
2914 ("python-case" ,python-case)))
2915 (home-page "https://github.com/celery/vine")
2916 (synopsis "Promises for Python")
2917 (description
2918 "@code{vine} provides a special implementation of promises in that it can
2919 be used both for \"promise of a value\" and lazy evaluation. The biggest
2920 upside for this is that everything in a promise can also be a promise,
2921 e.g. filters, callbacks and errbacks can all be promises.")
2922 (license license:bsd-3)))
2923
2924 (define-public python-virtualenv
2925 (package
2926 (name "python-virtualenv")
2927 (version "20.0.10")
2928 (source
2929 (origin
2930 (method url-fetch)
2931 (uri (pypi-uri "virtualenv" version))
2932 (sha256
2933 (base32
2934 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
2935 (build-system python-build-system)
2936 (native-inputs
2937 `(("python-mock" ,python-mock)
2938 ("python-pytest" ,python-pytest)
2939 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2940 ;; be an input at all". However, removing the input makes the build error:
2941 ;; File "setup.py", line 4, in <module>
2942 ;; raise RuntimeError("setuptools >= 41 required to build")
2943 ("python-setuptools" ,python-setuptools)
2944 ("python-setuptools-scm" ,python-setuptools-scm)))
2945 (propagated-inputs
2946 `(("python-appdirs" ,python-appdirs)
2947 ("python-distlib" ,python-distlib)
2948 ("python-filelock" ,python-filelock)
2949 ("python-six" ,python-six)
2950 ("python-importlib-metadata" ,python-importlib-metadata)))
2951 (home-page "https://virtualenv.pypa.io/")
2952 (synopsis "Virtual Python environment builder")
2953 (description
2954 "Virtualenv is a tool to create isolated Python environments.")
2955 (properties `((python2-variant . ,(delay python2-virtualenv))))
2956 (license license:expat)))
2957
2958 (define-public python2-virtualenv
2959 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2960 (package
2961 (inherit base)
2962 (arguments
2963 `(#:python ,python-2
2964 #:phases
2965 (modify-phases %standard-phases
2966 (add-after 'set-paths 'adjust-PYTHONPATH
2967 (lambda* (#:key inputs #:allow-other-keys)
2968 (let* ((python (assoc-ref inputs "python"))
2969 (python-sitedir (string-append python "/lib/python2.7"
2970 "/site-packages")))
2971 ;; XXX: 'python2' always comes first on PYTHONPATH
2972 ;; and shadows the 'setuptools' input. Move python2
2973 ;; last: this should be fixed in python-build-system
2974 ;; in a future rebuild cycle.
2975 (setenv "PYTHONPATH"
2976 (string-append (string-join (delete python-sitedir
2977 (string-split
2978 (getenv "PYTHONPATH")
2979 #\:))
2980 ":")
2981 ":" python-sitedir))
2982 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2983 (getenv "PYTHONPATH"))
2984 #t))))))
2985 (propagated-inputs
2986 `(("python-contextlib2" ,python2-contextlib2)
2987 ,@(package-propagated-inputs base))))))
2988
2989 (define-public python-markupsafe
2990 (package
2991 (name "python-markupsafe")
2992 (version "1.1.1")
2993 (source
2994 (origin
2995 (method url-fetch)
2996 (uri (pypi-uri "MarkupSafe" version))
2997 (sha256
2998 (base32
2999 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3000 (build-system python-build-system)
3001 (arguments
3002 `(#:modules ((ice-9 ftw)
3003 (srfi srfi-1)
3004 (srfi srfi-26)
3005 (guix build utils)
3006 (guix build python-build-system))
3007 #:phases (modify-phases %standard-phases
3008 (replace 'check
3009 (lambda _
3010 (let ((cwd (getcwd))
3011 (libdir (find (cut string-prefix? "lib." <>)
3012 (scandir "build"))))
3013 (setenv "PYTHONPATH"
3014 (string-append cwd "/build/" libdir ":"
3015 (getenv "PYTHONPATH")))
3016 (invoke "pytest" "-vv")))))))
3017 (native-inputs
3018 `(("python-pytest" ,python-pytest)))
3019 (home-page "https://github.com/mitsuhiko/markupsafe")
3020 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3021 (description
3022 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3023 for Python.")
3024 (license license:bsd-3)))
3025
3026 (define-public python2-markupsafe
3027 (package-with-python2 python-markupsafe))
3028
3029 (define-public python-jinja2
3030 (package
3031 (name "python-jinja2")
3032 (version "2.11.2")
3033 (source
3034 (origin
3035 (method url-fetch)
3036 (uri (pypi-uri "Jinja2" version))
3037 (sha256
3038 (base32
3039 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3040 (build-system python-build-system)
3041 (arguments
3042 '(#:phases (modify-phases %standard-phases
3043 (replace 'check
3044 (lambda* (#:key tests? #:allow-other-keys)
3045 (if tests?
3046 (begin
3047 (setenv "PYTHONPATH"
3048 (string-append "./build/lib:"
3049 (getenv "PYTHONPATH")))
3050 (invoke "pytest" "-vv"))
3051 (format #t "test suite not run~%"))
3052 #t)))))
3053 (native-inputs
3054 `(("python-pytest" ,python-pytest)))
3055 (propagated-inputs
3056 `(("python-markupsafe" ,python-markupsafe)))
3057 (home-page "http://jinja.pocoo.org/")
3058 (synopsis "Python template engine")
3059 (description
3060 "Jinja2 is a small but fast and easy to use stand-alone template engine
3061 written in pure Python.")
3062 (license license:bsd-3)))
3063
3064 (define-public python2-jinja2
3065 (package-with-python2 python-jinja2))
3066
3067 (define-public python-jinja2-time
3068 (package
3069 (name "python-jinja2-time")
3070 (version "0.2.0")
3071 (source
3072 (origin
3073 (method url-fetch)
3074 (uri (pypi-uri "jinja2-time" version))
3075 (sha256
3076 (base32
3077 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3078 (build-system python-build-system)
3079 (propagated-inputs
3080 `(("python-arrow" ,python-arrow)
3081 ("python-jinja2" ,python-jinja2)))
3082 (home-page
3083 "https://github.com/hackebrot/jinja2-time")
3084 (synopsis "Jinja2 Extension for Dates and Times")
3085 (description
3086 "This package provides an extension for the template engine Jinja2. It
3087 adds a 'now' tag providing a convenient access to the arrow.now() API from
3088 templates. A format string can be provided to control the output.")
3089 (license license:expat)))
3090
3091 (define-public python-pystache
3092 (package
3093 (name "python-pystache")
3094 (version "0.5.4")
3095 (source (origin
3096 (method url-fetch)
3097 (uri (pypi-uri "pystache" version))
3098 (sha256
3099 (base32
3100 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3101 (build-system python-build-system)
3102 (arguments
3103 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3104 (home-page "http://defunkt.io/pystache/")
3105 (synopsis "Python logic-less template engine")
3106 (description
3107 "Pystache is a Python implementation of the framework agnostic,
3108 logic-free templating system Mustache.")
3109 (license license:expat)
3110 (properties `((python2-variant . ,(delay python2-pystache))))))
3111
3112 (define-public python2-pystache
3113 (package (inherit (package-with-python2
3114 (strip-python2-variant python-pystache)))
3115 (arguments
3116 `(#:python ,python-2
3117 #:phases
3118 (modify-phases %standard-phases
3119 (replace 'check
3120 (lambda _
3121 (invoke "python" "test_pystache.py"))))))))
3122
3123 (define-public python-joblib
3124 (package
3125 (name "python-joblib")
3126 (version "0.14.1")
3127 (source (origin
3128 (method url-fetch)
3129 (uri (pypi-uri "joblib" version))
3130 (sha256
3131 (base32
3132 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3133 (build-system python-build-system)
3134 (arguments
3135 `(#:phases
3136 (modify-phases %standard-phases
3137 (replace 'check
3138 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3139 (native-inputs
3140 `(("python-pytest" ,python-pytest)))
3141 (home-page "https://joblib.readthedocs.io/")
3142 (synopsis "Using Python functions as pipeline jobs")
3143 (description
3144 "Joblib is a set of tools to provide lightweight pipelining in Python.
3145 In particular, joblib offers: transparent disk-caching of the output values
3146 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3147 logging and tracing of the execution.")
3148 (license license:bsd-3)))
3149
3150 (define-public python2-joblib
3151 (package-with-python2 python-joblib))
3152
3153 (define-public python-daemon
3154 (package
3155 (name "python-daemon")
3156 (version "2.2.3")
3157 (source
3158 (origin
3159 (method url-fetch)
3160 (uri (pypi-uri "python-daemon" version))
3161 (sha256
3162 (base32
3163 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3164 (build-system python-build-system)
3165 (arguments
3166 `(#:phases
3167 (modify-phases %standard-phases
3168 (add-before 'check 'disable-tests
3169 (lambda _
3170 ;; FIXME: Determine why test fails
3171 (substitute* "test/test_daemon.py"
3172 (("test_detaches_process_context")
3173 "skip_test_detaches_process_context"))
3174 #t)))))
3175 (propagated-inputs
3176 `(("python-lockfile" ,python-lockfile)))
3177 (native-inputs
3178 `(("python-unittest2" ,python-unittest2)
3179 ("python-testtools" ,python-testtools)
3180 ("python-testscenarios" ,python-testscenarios)
3181 ("python-mock" ,python-mock)
3182 ("python-docutils" ,python-docutils)))
3183 (home-page "https://pagure.io/python-daemon/")
3184 (synopsis "Python library for making a Unix daemon process")
3185 (description "Python-daemon is a library that assists a Python program to
3186 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3187
3188 This library provides a @code{DaemonContext} class that manages the following
3189 important tasks for becoming a daemon process:
3190 @enumerate
3191 @item Detach the process into its own process group.
3192 @item Set process environment appropriate for running inside a chroot.
3193 @item Renounce suid and sgid privileges.
3194 @item Close all open file descriptors.
3195 @item Change the working directory, uid, gid, and umask.
3196 @item Set appropriate signal handlers.
3197 @item Open new file descriptors for stdin, stdout, and stderr.
3198 @item Manage a specified PID lock file.
3199 @item Register cleanup functions for at-exit processing.
3200 @end enumerate")
3201 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3202 (license (list license:asl2.0 license:gpl3+))))
3203
3204 (define-public python-anytree
3205 (package
3206 (name "python-anytree")
3207 (version "2.8.0")
3208 (source (origin
3209 (method url-fetch)
3210 (uri (pypi-uri "anytree" version))
3211 (sha256
3212 (base32
3213 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3214 (build-system python-build-system)
3215 (propagated-inputs
3216 `(("python-six" ,python-six)))
3217 (native-inputs
3218 `(;; For tests.
3219 ("graphviz" ,graphviz) ;for 'dot'
3220 ("python-nose" ,python-nose)))
3221 (home-page "https://github.com/c0fec0de/anytree")
3222 (synopsis "Lightweight tree data library")
3223 (description
3224 "@code{anytree} is a simple, lightweight, and extensible tree data
3225 structure for Python.")
3226 (license license:asl2.0)))
3227
3228 (define-public python-docutils
3229 (package
3230 (name "python-docutils")
3231 (version "0.16")
3232 (source
3233 (origin
3234 (method url-fetch)
3235 (uri (pypi-uri "docutils" version))
3236 (sha256
3237 (base32
3238 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3239 (build-system python-build-system)
3240 (arguments
3241 '(#:phases (modify-phases %standard-phases
3242 (replace 'check
3243 (lambda* (#:key tests? #:allow-other-keys)
3244 (if tests?
3245 (invoke "python" "test/alltests.py")
3246 (format #t "test suite not run~%"))
3247 #t)))))
3248 (home-page "http://docutils.sourceforge.net/")
3249 (synopsis "Python Documentation Utilities")
3250 (description
3251 "Docutils is a modular system for processing documentation into useful
3252 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3253 reStructuredText.")
3254 ;; Most of the source code is public domain, but some source files are
3255 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3256 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3257
3258 (define-public python2-docutils
3259 (package-with-python2 python-docutils))
3260
3261 ;; python2-sphinx fails its test suite with newer versions.
3262 (define-public python2-docutils-0.14
3263 (package
3264 (inherit python2-docutils)
3265 (version "0.14")
3266 (source (origin
3267 (method url-fetch)
3268 (uri (pypi-uri "docutils" version))
3269 (sha256
3270 (base32
3271 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3272
3273 (define-public python-restructuredtext-lint
3274 (package
3275 (name "python-restructuredtext-lint")
3276 (version "1.3.0")
3277 (source
3278 (origin
3279 (method url-fetch)
3280 (uri (pypi-uri "restructuredtext-lint" version))
3281 (sha256
3282 (base32
3283 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3284 (build-system python-build-system)
3285 (arguments
3286 `(#:phases
3287 (modify-phases %standard-phases
3288 (delete 'check)
3289 (add-after 'install 'check
3290 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3291 (when tests?
3292 (add-installed-pythonpath inputs outputs)
3293 (invoke "nosetests" "-v"))
3294 #t)))))
3295 (propagated-inputs
3296 `(("python-docutils" ,python-docutils)))
3297 (native-inputs
3298 `(("python-nose" ,python-nose)))
3299 (home-page "https://github.com/twolfson/restructuredtext-lint")
3300 (synopsis "reStructuredText linter")
3301 (description "This package provides a linter for the reStructuredText
3302 format.")
3303 (license license:unlicense)))
3304
3305 (define-public python-doc8
3306 (package
3307 (name "python-doc8")
3308 (version "0.8.0")
3309 (source
3310 (origin
3311 (method url-fetch)
3312 (uri (pypi-uri "doc8" version))
3313 (sha256
3314 (base32
3315 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3316 (build-system python-build-system)
3317 (arguments
3318 `(#:phases
3319 (modify-phases %standard-phases
3320 (delete 'check)
3321 (add-after 'install 'check
3322 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3323 (when tests?
3324 (add-installed-pythonpath inputs outputs)
3325 (invoke "pytest" "-v"))
3326 #t)))))
3327 (propagated-inputs
3328 `(("python-chardet" ,python-chardet)
3329 ("python-docutils" ,python-docutils)
3330 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3331 ("python-six" ,python-six)
3332 ("python-stevedore" ,python-stevedore)))
3333 (native-inputs
3334 `(("python-testtools" ,python-testtools)
3335 ("python-pytest" ,python-pytest)))
3336 (home-page "https://launchpad.net/doc8")
3337 (synopsis
3338 "Style checker for Sphinx (or other) RST documentation")
3339 (description
3340 "Doc8 is an opinionated style checker for reStructured Text and plain
3341 text styles of documentation.")
3342 (license license:asl2.0)))
3343
3344 (define-public python-pygments
3345 (package
3346 (name "python-pygments")
3347 (version "2.5.2")
3348 (source
3349 (origin
3350 (method url-fetch)
3351 (uri (pypi-uri "Pygments" version))
3352 (sha256
3353 (base32
3354 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
3355 (build-system python-build-system)
3356 (arguments
3357 ;; FIXME: Tests require sphinx, which depends on this.
3358 '(#:tests? #f))
3359 (home-page "https://pygments.org/")
3360 (synopsis "Syntax highlighting")
3361 (description
3362 "Pygments is a syntax highlighting package written in Python.")
3363 (license license:bsd-2)))
3364
3365 (define-public python2-pygments
3366 (package-with-python2 python-pygments))
3367
3368 (define-public python-bumpversion
3369 (package
3370 (name "python-bumpversion")
3371 (version "0.5.3")
3372 (source
3373 (origin
3374 (method url-fetch)
3375 (uri (pypi-uri "bumpversion" version))
3376 (sha256
3377 (base32
3378 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3379 (build-system python-build-system)
3380 (home-page "https://github.com/peritus/bumpversion")
3381 (synopsis "Tool to bump software version")
3382 (description "This tool provides a command-line interface (CLI) to bump a
3383 software version simply.")
3384 (license license:expat)))
3385
3386 (define-public python-deprecated
3387 (package
3388 (name "python-deprecated")
3389 (version "1.2.5")
3390 (source
3391 (origin
3392 (method git-fetch)
3393 (uri (git-reference
3394 (url "https://github.com/tantale/deprecated.git")
3395 (commit (string-append "v" version))))
3396 (file-name (git-file-name name version))
3397 (sha256
3398 (base32
3399 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3400 (build-system python-build-system)
3401 (arguments
3402 `(#:phases (modify-phases %standard-phases
3403 (replace 'check
3404 (lambda _
3405 (invoke "pytest"))))))
3406 (propagated-inputs
3407 `(("python-wrapt" ,python-wrapt)))
3408 (native-inputs
3409 `(("python-bumpversion" ,python-bumpversion)
3410 ("python-pytest" ,python-pytest)
3411 ("python-pytest-cov" ,python-pytest-cov)
3412 ("python-sphinx" ,python-sphinx)
3413 ("python-tox" ,python-tox)))
3414 (home-page "https://github.com/tantale/deprecated")
3415 (synopsis "Python decorator to deprecate classes, functions or methods")
3416 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3417 to deprecate classes, functions or methods.")
3418 (license license:expat)))
3419
3420 (define-public python-pygithub
3421 (package
3422 (name "python-pygithub")
3423 (version "1.43.8")
3424 (source
3425 ;; We fetch from the Git repo because there are no tests in the PyPI
3426 ;; archive.
3427 (origin
3428 (method git-fetch)
3429 (uri (git-reference
3430 (url "https://github.com/PyGithub/PyGithub.git")
3431 (commit (string-append "v" version))))
3432 (file-name (git-file-name name version))
3433 (sha256
3434 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3435 (build-system python-build-system)
3436 (arguments
3437 `(#:phases (modify-phases %standard-phases
3438 ;; Some tests rely on the network.
3439 (add-after 'unpack 'disable-failing-tests
3440 (lambda _
3441 (substitute* "tests/Issue142.py"
3442 (("testDecodeJson") "disabled_testDecodeJson"))
3443 #t))
3444 (add-before 'check 'prepare-for-tests
3445 (lambda _
3446 (for-each (lambda (f)
3447 (chmod f #o666))
3448 (find-files "./tests"))
3449 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3450 (setenv "PYTHONPATH"
3451 (string-append "./tests:" (getenv "PYTHONPATH")))
3452 #t)))))
3453 (propagated-inputs
3454 `(("python-deprecated" ,python-deprecated)
3455 ("python-pyjwt" ,python-pyjwt)
3456 ("python-requests" ,python-requests)))
3457 (native-inputs `(("python-httpretty" ,python-httpretty)))
3458 (home-page "https://pygithub.readthedocs.io/en/latest/")
3459 (synopsis "Python library for the GitHub API")
3460 (description "This library allows managing GitHub resources such as
3461 repositories, user profiles, and organizations in your Python applications,
3462 using version 3 of the GitHub application programming interface (API).")
3463 (license license:lgpl3+)))
3464
3465 (define-public python-rellu
3466 (package
3467 (name "python-rellu")
3468 (version "0.7")
3469 (source
3470 (origin
3471 (method url-fetch)
3472 (uri (pypi-uri "rellu" version))
3473 (sha256
3474 (base32
3475 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3476 (build-system python-build-system)
3477 (propagated-inputs
3478 `(("python-invoke" ,python-invoke)
3479 ("python-pygithub" ,python-pygithub)))
3480 (home-page "https://github.com/robotframework/rellu")
3481 (synopsis "Utilities to create PyPI releases")
3482 (description "This collection of utilities contains tooling and templates
3483 to assist in creating releases on GitHub and publishing them on PyPI. It is
3484 designed to be used by Robot Framework and tools and libraries in its
3485 ecosystem, but can naturally be used also by other projects.")
3486 (license license:asl2.0)))
3487
3488 (define-public python-robotframework
3489 (package
3490 (name "python-robotframework")
3491 (version "3.1.2")
3492 ;; There are no tests in the PyPI archive.
3493 (source
3494 (origin
3495 (method git-fetch)
3496 (uri (git-reference
3497 (url "https://github.com/robotframework/robotframework.git")
3498 (commit (string-append "v" version))))
3499 (file-name (git-file-name name version))
3500 (sha256
3501 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
3502 (patches (search-patches
3503 "python-robotframework-honor-source-date-epoch.patch"))))
3504 (build-system python-build-system)
3505 (arguments
3506 `(#:phases (modify-phases %standard-phases
3507 (add-before 'build 'build-and-install-doc
3508 (lambda* (#:key outputs #:allow-other-keys)
3509 (let* ((doc-output (assoc-ref outputs "doc"))
3510 (doc (string-append doc-output "/share/"
3511 ,name "-" ,version "/")))
3512 (invoke "invoke" "library-docs" "all")
3513 (mkdir-p doc)
3514 (copy-recursively "doc/libraries"
3515 (string-append doc "/libraries"))
3516 #t)))
3517 (replace 'check
3518 (lambda _
3519 (invoke "python" "utest/run.py"))))))
3520 (native-inputs
3521 `(("python-invoke" ,python-invoke)
3522 ("python-rellu" ,python-rellu)
3523 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3524 (outputs '("out" "doc"))
3525 (home-page "https://robotframework.org")
3526 (synopsis "Generic automation framework")
3527 (description "Robot Framework is a generic automation framework for
3528 acceptance testing, acceptance test driven development (ATDD), and robotic
3529 process automation (RPA).")
3530 (license license:asl2.0)))
3531
3532 (define-public python-robotframework-lint
3533 ;; There is no properly tagged release; the commit below seems to correspond
3534 ;; to the 0.9 stable release available from PyPI. The tests are not
3535 ;; included in the PyPI archive, so we fetch the sources from the upstream
3536 ;; Git repo.
3537 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3538 (revision "1"))
3539 (package
3540 (name "python-robotframework-lint")
3541 (version (git-version "0.9.0" revision commit))
3542 (source
3543 (origin
3544 (method git-fetch)
3545 (uri (git-reference
3546 (url "https://github.com/boakley/robotframework-lint.git")
3547 (commit commit)))
3548 (file-name (git-file-name name version))
3549 (sha256
3550 (base32
3551 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3552 (build-system python-build-system)
3553 (arguments
3554 `(#:phases
3555 (modify-phases %standard-phases
3556 (replace 'check
3557 (lambda _
3558 (invoke "python" "-m" "robot" "-A"
3559 "tests/conf/default.args" "tests"))))))
3560 (propagated-inputs
3561 `(("python-robotframework" ,python-robotframework)))
3562 (home-page "https://github.com/boakley/robotframework-lint/")
3563 (synopsis "Static analysis tool (linter) for Robot Framework")
3564 (description "This package provides the @code{rflint} command-line
3565 utility, a static analysis tool (linter) for Robot Framework source files.")
3566 (license license:asl2.0))))
3567
3568 (define-public python-robotframework-sshlibrary
3569 (package
3570 (name "python-robotframework-sshlibrary")
3571 (version "3.3.0")
3572 ;; There are no tests in the PyPI archive.
3573 (source
3574 (origin
3575 (method git-fetch)
3576 (uri (git-reference
3577 (url "https://github.com/robotframework/SSHLibrary.git")
3578 (commit (string-append "v" version))))
3579 (file-name (git-file-name name version))
3580 (sha256
3581 (base32
3582 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3583 (build-system python-build-system)
3584 (arguments
3585 `(#:phases
3586 (modify-phases %standard-phases
3587 (add-before 'build 'build-and-install-doc
3588 (lambda* (#:key outputs #:allow-other-keys)
3589 (let* ((doc-output (assoc-ref outputs "doc"))
3590 (doc (string-append doc-output "/share/"
3591 ,name "-" ,version "/")))
3592 (invoke "chmod" "-R" "+w" "docs")
3593 (invoke "invoke" "kw-docs" "project-docs")
3594 (mkdir-p doc)
3595 (for-each delete-file (find-files "docs" "\\.rst"))
3596 (copy-recursively "docs" doc)
3597 #t)))
3598 (replace 'check
3599 (lambda _
3600 ;; Some tests require an SSH server; we remove them.
3601 (delete-file "utest/test_client_api.py")
3602 (delete-file "utest/test_scp.py")
3603 (invoke "python" "utest/run.py"))))))
3604 (propagated-inputs
3605 `(("python-robotframework" ,python-robotframework)
3606 ("python-paramiko" ,python-paramiko)
3607 ("python-scp" ,python-scp)))
3608 (native-inputs
3609 `(("openssh" ,openssh)
3610 ("which" ,which)
3611 ;; To generate the documentation
3612 ("python-docutils" ,python-docutils)
3613 ("python-invoke" ,python-invoke)
3614 ("python-pygments" ,python-pygments)
3615 ("python-rellu" ,python-rellu)))
3616 (outputs '("out" "doc"))
3617 (home-page "https://github.com/robotframework/SSHLibrary")
3618 (synopsis "Robot Framework library for SSH and SFTP")
3619 (description "SSHLibrary is a Robot Framework library providing support
3620 for SSH and SFTP. It has the following main usages:
3621 @itemize @bullet
3622 @item Executing commands on the remote machine, either blocking or non-blocking.
3623 @item Writing and reading in an interactive shell.
3624 @item Transferring files and directories over SFTP.
3625 @item Ensuring that files and directories exist on the remote machine.
3626 @end itemize")
3627 (license license:asl2.0)))
3628
3629 (define-public python-rstr
3630 (package
3631 (name "python-rstr")
3632 (version "2.2.6")
3633 (source
3634 (origin
3635 (method url-fetch)
3636 (uri (pypi-uri "rstr" version))
3637 (sha256
3638 (base32
3639 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3640 (build-system python-build-system)
3641 (home-page
3642 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3643 (synopsis "Generate random strings in Python")
3644 (description "This package provides a python module for generating
3645 random strings of various types. It could be useful for fuzz testing,
3646 generating dummy data, or other applications. It has no dependencies
3647 outside the standard library.")
3648 (license license:bsd-3)))
3649
3650 (define-public python-scp
3651 (package
3652 (name "python-scp")
3653 (version "0.13.2")
3654 (source
3655 (origin
3656 (method url-fetch)
3657 (uri (pypi-uri "scp" version))
3658 (sha256
3659 (base32
3660 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3661 (build-system python-build-system)
3662 (arguments
3663 '(#:tests? #f)) ;tests require an SSH server
3664 (propagated-inputs
3665 `(("python-paramiko" ,python-paramiko)))
3666 (home-page "https://github.com/jbardin/scp.py")
3667 (synopsis "SCP protocol module for Python and Paramiko")
3668 (description "The scp module extends the Paramiko library to send and
3669 receive files via the SCP1 protocol, as implemented by the OpenSSH
3670 @command{scp} program.")
3671 (license license:gpl2+)))
3672
3673 (define-public python-rst.linker
3674 (package
3675 (name "python-rst.linker")
3676 (version "1.11")
3677 (source
3678 (origin
3679 (method url-fetch)
3680 (uri (pypi-uri "rst.linker" version))
3681 (sha256
3682 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3683 (build-system python-build-system)
3684 (propagated-inputs
3685 `(("python-dateutil" ,python-dateutil)
3686 ("python-six" ,python-six)))
3687 (native-inputs
3688 `(("python-setuptools-scm" ,python-setuptools-scm)))
3689 ;; Test would require path.py, which would introduce a cyclic dependence.
3690 (arguments `(#:tests? #f))
3691 ;; Note: As of version 1.7 the documentation is not worth building.
3692 (home-page "https://github.com/jaraco/rst.linker")
3693 (synopsis "Sphinx plugin to add links and timestamps")
3694 (description "rst.linker automatically replaces text by a
3695 reStructuredText external reference or timestamps. It's primary purpose is to
3696 augment the changelog, but it can be used for other documents, too.")
3697 (license license:expat)))
3698
3699 (define-public python2-rst.linker
3700 (package-with-python2 python-rst.linker))
3701
3702 (define-public python-feedgenerator
3703 (package
3704 (name "python-feedgenerator")
3705 (version "1.9")
3706 (source
3707 (origin
3708 (method url-fetch)
3709 (uri (pypi-uri "feedgenerator" version))
3710 (sha256
3711 (base32
3712 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3713 (modules '((guix build utils)))
3714 (snippet
3715 '(begin
3716 ;; Remove pre-compiled .pyc files from source.
3717 (for-each delete-file-recursively
3718 (find-files "." "__pycache__" #:directories? #t))
3719 (for-each delete-file (find-files "." "\\.pyc$"))
3720 #t))))
3721 (build-system python-build-system)
3722 (propagated-inputs
3723 `(("python-pytz" ,python-pytz)
3724 ("python-six" ,python-six)))
3725 (home-page "https://github.com/getpelican/feedgenerator")
3726 (synopsis
3727 "Standalone version of Django's Atom/RSS feed generator")
3728 (description
3729 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3730 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3731 (license license:bsd-3)))
3732
3733 (define-public python2-feedgenerator
3734 (package-with-python2 python-feedgenerator))
3735
3736 (define-public python-toml
3737 (package
3738 (name "python-toml")
3739 (version "0.10.1")
3740 (source
3741 (origin
3742 (method url-fetch)
3743 (uri (pypi-uri "toml" version))
3744 (sha256
3745 (base32
3746 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3747 (build-system python-build-system)
3748 (arguments
3749 `(#:tests? #f)) ;no tests suite in release
3750 (home-page "https://github.com/uiri/toml")
3751 (synopsis "Library for TOML")
3752 (description
3753 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3754 Language (TOML) configuration files.")
3755 (license license:expat)))
3756
3757 (define-public python-jsonrpc-server
3758 (package
3759 (name "python-jsonrpc-server")
3760 (version "0.3.4")
3761 (source
3762 (origin
3763 (method url-fetch)
3764 (uri (pypi-uri "python-jsonrpc-server" version))
3765 (sha256
3766 (base32
3767 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
3768 (build-system python-build-system)
3769 (propagated-inputs
3770 `(("python-mock" ,python-mock)
3771 ("python-pytest" ,python-pytest)
3772 ("python-ujson" ,python-ujson-1)))
3773 (home-page
3774 "https://github.com/palantir/python-jsonrpc-server")
3775 (synopsis "JSON RPC 2.0 server library")
3776 (description
3777 "This package provides a JSON RPC 2.0 server library for Python.")
3778 (license license:expat)))
3779
3780 (define-public python-pydocstyle
3781 (package
3782 (name "python-pydocstyle")
3783 (version "3.0.0")
3784 (source
3785 (origin
3786 (method url-fetch)
3787 (uri (pypi-uri "pydocstyle" version))
3788 (sha256
3789 (base32
3790 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3791 (build-system python-build-system)
3792 (propagated-inputs
3793 `(("python-six" ,python-six)
3794 ("python-snowballstemmer" ,python-snowballstemmer)))
3795 (home-page
3796 "https://github.com/PyCQA/pydocstyle/")
3797 (synopsis "Python docstring style checker")
3798 (description
3799 "This package provides a style checker for the Python Language
3800 Server (PLS).")
3801 (license license:expat)))
3802
3803 (define-public python-language-server
3804 (package
3805 (name "python-language-server")
3806 (version "0.32.0")
3807 (source
3808 (origin
3809 (method url-fetch)
3810 (uri (pypi-uri "python-language-server" version))
3811 (sha256
3812 (base32
3813 "0j5swacmjps9sas1gfwg0xi84rmjhfhz20cwg3k4058d20rs20ip"))))
3814 (build-system python-build-system)
3815 (propagated-inputs
3816 `(("python-pluggy" ,python-pluggy)
3817 ("python-jsonrpc-server" ,python-jsonrpc-server)
3818 ;; Note: Remove the special versions of Jedi and Parso when updating
3819 ;; this package.
3820 ("python-jedi" ,python-jedi)
3821 ("python-yapf" ,python-yapf)
3822 ("python-pyflakes" ,python-pyflakes)
3823 ("python-pydocstyle" ,python-pydocstyle)
3824 ("python-pycodestyle" ,python-pycodestyle)
3825 ("python-mccabe" ,python-mccabe)
3826 ("python-rope" ,python-rope)
3827 ("python-autopep8" ,python-autopep8)
3828 ("python-flake8" ,python-flake8)
3829 ("python-pylint" ,python-pylint)))
3830 (home-page "https://github.com/palantir/python-language-server")
3831 (synopsis "Python implementation of the Language Server Protocol")
3832 (description
3833 "The Python Language Server (pyls) is an implementation of the Python 3
3834 language specification for the Language Server Protocol (LSP). This tool is
3835 used in text editing environments to provide a complete and integrated
3836 feature-set for programming Python effectively.")
3837 (license license:expat)))
3838
3839 (define-public python-pathspec
3840 (package
3841 (name "python-pathspec")
3842 (version "0.7.0")
3843 (source
3844 (origin
3845 (method url-fetch)
3846 (uri (pypi-uri "pathspec" version))
3847 (sha256
3848 (base32
3849 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3850 (build-system python-build-system)
3851 (home-page "https://github.com/cpburnz/python-path-specification")
3852 (synopsis "Utility library for gitignore style pattern matching of file paths")
3853 (description
3854 "This package provides a utility library for gitignore style pattern
3855 matching of file paths.")
3856 (license license:mpl2.0)))
3857
3858 (define-public python-black
3859 (package
3860 (name "python-black")
3861 (version "19.10b0")
3862 (source
3863 (origin
3864 (method url-fetch)
3865 (uri (pypi-uri "black" version))
3866 (sha256
3867 (base32
3868 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
3869 (build-system python-build-system)
3870 (arguments
3871 `(#:phases
3872 (modify-phases %standard-phases
3873 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3874 (lambda _
3875 (let ((python3 (which "python3")))
3876 (substitute* '("tests/data/fmtonoff.py"
3877 "tests/data/string_prefixes.py"
3878 "tests/data/function.py"
3879 "tests/data/python37.py")
3880 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3881 (string-append "#!" python3 (if (string? minor-version)
3882 minor-version
3883 "")))))
3884 #t))
3885 (add-after 'unpack 'disable-broken-tests
3886 (lambda _
3887 ;; These tests are supposed to be skipped when the blackd
3888 ;; dependencies are missing, but this doesn't quite work.
3889 (substitute* "tests/test_black.py"
3890 (("( *)class BlackDTestCase.*" match indent)
3891 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3892 indent "class BlackDTestCase(unittest.TestCase):\n"))
3893 (("web.Application") "False")
3894 (("@unittest_run_loop") ""))
3895
3896 ;; Patching the above file breaks the self test
3897 (substitute* "tests/test_black.py"
3898 (("( *)def test_self" match indent)
3899 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3900 #t)))))
3901 (propagated-inputs
3902 `(("python-click" ,python-click)
3903 ("python-attrs" ,python-attrs)
3904 ("python-appdirs" ,python-appdirs)
3905 ("python-pathspec" ,python-pathspec)
3906 ("python-regex" ,python-regex)
3907 ("python-toml" ,python-toml)
3908 ("python-typed-ast" ,python-typed-ast)))
3909 (native-inputs
3910 `(("python-setuptools-scm" ,python-setuptools-scm)))
3911 (home-page "https://github.com/ambv/black")
3912 (synopsis "The uncompromising code formatter")
3913 (description "Black is the uncompromising Python code formatter.")
3914 (license license:expat)))
3915
3916 (define-public python-blinker
3917 (package
3918 (name "python-blinker")
3919 (version "1.4")
3920 (source
3921 (origin
3922 (method url-fetch)
3923 (uri (pypi-uri "blinker" version))
3924 (sha256
3925 (base32
3926 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3927 (build-system python-build-system)
3928 (home-page "https://pythonhosted.org/blinker/")
3929 (synopsis "Fast, simple object-to-object and broadcast signaling")
3930 (description
3931 "Blinker provides a fast dispatching system that allows any number of
3932 interested parties to subscribe to events, or \"signals\".")
3933 (license license:expat)))
3934
3935 (define-public python2-blinker
3936 (package-with-python2 python-blinker))
3937
3938 (define-public pelican
3939 (package
3940 (name "pelican")
3941 (version "4.2.0")
3942 (source
3943 (origin
3944 (method url-fetch)
3945 (uri (pypi-uri "pelican" version))
3946 (sha256
3947 (base32
3948 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3949 (build-system python-build-system)
3950 (propagated-inputs
3951 `(("python-blinker" ,python-blinker)
3952 ("python-dateutil" ,python-dateutil)
3953 ("python-docutils" ,python-docutils)
3954 ("python-feedgenerator" ,python-feedgenerator)
3955 ("python-jinja2" ,python-jinja2)
3956 ("python-markdown" ,python-markdown)
3957 ("python-pygments" ,python-pygments)
3958 ("python-pytz" ,python-pytz)
3959 ("python-six" ,python-six)
3960 ("python-unidecode" ,python-unidecode)))
3961 (home-page "https://getpelican.com/")
3962 (arguments
3963 `(;; XXX Requires a lot more packages to do unit tests :P
3964 #:tests? #f))
3965 (synopsis "Python-based static site publishing system")
3966 (description
3967 "Pelican is a tool to generate a static blog from reStructuredText,
3968 Markdown input files, and more. Pelican uses Jinja2 for templating
3969 and is very extensible.")
3970 (license license:agpl3+)))
3971
3972 (define-public mallard-ducktype
3973 (package
3974 (name "mallard-ducktype")
3975 (version "1.0.2")
3976 (source
3977 (origin
3978 (method git-fetch)
3979 ;; git-reference because tests are not included in pypi source tarball
3980 ;; https://issues.guix.gnu.org/issue/36755#2
3981 (uri (git-reference
3982 (url "https://github.com/projectmallard/mallard-ducktype.git")
3983 (commit version)))
3984 (file-name (git-file-name name version))
3985 (sha256
3986 (base32
3987 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3988 (build-system python-build-system)
3989 (arguments
3990 '(#:phases
3991 (modify-phases %standard-phases
3992 (replace 'check
3993 (lambda _
3994 (with-directory-excursion "tests"
3995 (invoke "sh" "runtests")))))))
3996 (home-page "http://projectmallard.org")
3997 (synopsis "Convert Ducktype to Mallard documentation markup")
3998 (description
3999 "Ducktype is a lightweight syntax that can represent all the semantics
4000 of the Mallard XML documentation system. Ducktype files can be converted to
4001 Mallard using the @command{ducktype} tool. The yelp-tools package
4002 provides additional functionality on the produced Mallard documents.")
4003 (license license:expat)))
4004
4005 (define-public python-cython
4006 (package
4007 (name "python-cython")
4008 (version "0.29.17")
4009 (source
4010 (origin
4011 (method url-fetch)
4012 (uri (pypi-uri "Cython" version))
4013 (sha256
4014 (base32
4015 "1wnaz40hdw4mg5acz5gqb6bhjhn4cvfxg0xdzfy7aa6qn665hqb3"))))
4016 (build-system python-build-system)
4017 ;; we need the full python package and not just the python-wrapper
4018 ;; because we need libpython3.3m.so
4019 (inputs
4020 `(("python" ,python)))
4021 (arguments
4022 `(#:phases
4023 (modify-phases %standard-phases
4024 (add-before 'check 'set-HOME
4025 ;; some tests require access to "$HOME/.cython"
4026 (lambda _ (setenv "HOME" "/tmp") #t))
4027 (replace 'check
4028 (lambda _
4029 ;; Disable compiler optimizations to greatly reduce the running
4030 ;; time of the test suite.
4031 (setenv "CFLAGS" "-O0")
4032
4033 (invoke "python" "runtests.py" "-vv"
4034 "-j" (number->string (parallel-job-count))
4035 ;; XXX: On 32-bit architectures, running the parallel tests
4036 ;; fails on many-core systems, see
4037 ;; <https://github.com/cython/cython/issues/2807>.
4038 ,@(if (not (target-64bit?))
4039 '("-x" "run.parallel")
4040 '())))))))
4041 (home-page "https://cython.org/")
4042 (synopsis "C extensions for Python")
4043 (description "Cython is an optimising static compiler for both the Python
4044 programming language and the extended Cython programming language. It makes
4045 writing C extensions for Python as easy as Python itself.")
4046 (license license:asl2.0)
4047 (properties `((python2-variant . ,(delay python2-cython))))))
4048
4049 (define-public python2-cython
4050 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4051 (package
4052 (inherit base)
4053 (name "python2-cython")
4054 (inputs
4055 `(("python-2" ,python-2))) ;this is not automatically changed
4056 (arguments
4057 (substitute-keyword-arguments (package-arguments base)
4058 ((#:phases phases)
4059 `(modify-phases ,phases
4060 (add-before 'check 'adjust-test_embed
4061 (lambda _
4062 (substitute* "runtests.py"
4063 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4064 ;; so it can give the right -L flag to GCC when embedding static
4065 ;; builds of Python. It is unaware that the Python "config"
4066 ;; directory (where the static library lives) was renamed in
4067 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4068 ;; which works fine, because that is where the shared library is.
4069 ;;
4070 ;; It also appears to be unaware that the Makefile in Demos/embed
4071 ;; already unconditionally pass the static library location to GCC,
4072 ;; after checking sysconfig.get_config_var('LIBPL).
4073 ;;
4074 ;; The effect is that the linker is unable to resolve libexpat
4075 ;; symbols when building for Python 2, because neither the Python 2
4076 ;; shared library nor Expat is available. To fix it, we can either
4077 ;; add Expat as an input and make it visible to the linker, or just
4078 ;; prevent it from overriding the Python shared library location.
4079 ;; The end result is identical, so we take the easy route.
4080 ((" or libname not in os\\.listdir\\(libdir\\)")
4081 ""))
4082 #t)))))))))
4083
4084 ;; The RPython toolchain currently does not support Python 3.
4085 (define-public python2-rpython
4086 (package
4087 (name "python2-rpython")
4088 (version "0.2.1")
4089 (source
4090 (origin
4091 (method url-fetch)
4092 (uri (pypi-uri "rpython" version))
4093 (sha256
4094 (base32
4095 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4096 (build-system python-build-system)
4097 (arguments `(#:python ,python-2))
4098 (native-inputs
4099 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4100 (home-page "https://rpython.readthedocs.org")
4101 (synopsis "Framework for implementing interpreters and virtual machines")
4102 (description "RPython is a translation and support framework for
4103 producing implementations of dynamic languages, emphasizing a clean separation
4104 between language specification and implementation aspects.")
4105 (license license:expat)))
4106
4107 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4108 ;; python-scipy still build, as these three packages are often used together.
4109 (define-public python-numpy
4110 (package
4111 (name "python-numpy")
4112 (version "1.17.3")
4113 (source
4114 (origin
4115 (method url-fetch)
4116 (uri (string-append
4117 "https://github.com/numpy/numpy/releases/download/v"
4118 version "/numpy-" version ".tar.gz"))
4119 (sha256
4120 (base32
4121 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4122 (build-system python-build-system)
4123 (inputs
4124 `(("openblas" ,openblas)
4125 ("lapack" ,lapack)))
4126 (native-inputs
4127 `(("python-cython" ,python-cython)
4128 ("python-pytest" ,python-pytest)
4129 ("gfortran" ,gfortran)))
4130 (arguments
4131 `(#:phases
4132 (modify-phases %standard-phases
4133 (add-before 'build 'configure-blas-lapack
4134 (lambda* (#:key inputs #:allow-other-keys)
4135 (call-with-output-file "site.cfg"
4136 (lambda (port)
4137 (format port
4138 "[openblas]
4139 libraries = openblas
4140 library_dirs = ~a/lib
4141 include_dirs = ~a/include
4142
4143 # backslash-n to make emacs happy
4144 \n[lapack]
4145 lapack_libs = lapack
4146 library_dirs = ~a/lib
4147 include_dirs = ~a/include
4148 "
4149 (assoc-ref inputs "openblas")
4150 (assoc-ref inputs "openblas")
4151 (assoc-ref inputs "lapack")
4152 (assoc-ref inputs "lapack"))))
4153 #t))
4154 (add-before 'build 'fix-executable-paths
4155 (lambda* (#:key inputs #:allow-other-keys)
4156 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4157 ;; instead of /bin/sh.
4158 (substitute* "numpy/distutils/exec_command.py"
4159 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4160 (string-append match-start (assoc-ref inputs "bash") match-end)))
4161 ;; Use "gcc" executable, not "cc".
4162 (substitute* "numpy/distutils/system_info.py"
4163 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4164 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4165 #t))
4166 ;; Tests can only be run after the library has been installed and not
4167 ;; within the source directory.
4168 (delete 'check)
4169 (add-after 'install 'check
4170 (lambda* (#:key outputs inputs #:allow-other-keys)
4171 ;; Make installed package available for running the tests
4172 (add-installed-pythonpath inputs outputs)
4173 ;; Make sure "f2py" etc is found.
4174 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4175 ":" (getenv "PATH")))
4176 (with-directory-excursion "/tmp"
4177 (invoke "python" "-c"
4178 "import numpy; numpy.test(verbose=2)")))))))
4179 (home-page "https://numpy.org")
4180 (synopsis "Fundamental package for scientific computing with Python")
4181 (description "NumPy is the fundamental package for scientific computing
4182 with Python. It contains among other things: a powerful N-dimensional array
4183 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4184 and Fortran code, useful linear algebra, Fourier transform, and random number
4185 capabilities.")
4186 (properties `((python2-variant . ,(delay python2-numpy))))
4187 (license license:bsd-3)))
4188
4189 ;; Numpy 1.16.x are the last versions that support Python 2.
4190 (define-public python2-numpy
4191 (let ((numpy (package-with-python2
4192 (strip-python2-variant python-numpy))))
4193 (package/inherit
4194 numpy
4195 (version "1.16.5")
4196 (source (origin
4197 (method url-fetch)
4198 (uri (string-append
4199 "https://github.com/numpy/numpy/releases/download/v"
4200 version "/numpy-" version ".tar.gz"))
4201 (sha256
4202 (base32
4203 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4204
4205 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4206 ;; interest only for legacy code going back to NumPy's predecessor
4207 ;; Numeric.
4208 (define-public python2-numpy-1.8
4209 (package (inherit python2-numpy)
4210 (version "1.8.2")
4211 (source
4212 (origin
4213 (method git-fetch)
4214 (uri (git-reference
4215 (url "https://github.com/numpy/numpy")
4216 (commit (string-append "v" version))))
4217 (file-name (git-file-name "numpy" version))
4218 (sha256
4219 (base32
4220 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4221 (arguments
4222 (substitute-keyword-arguments (package-arguments python2-numpy)
4223 ((#:phases phases)
4224 `(modify-phases ,phases
4225 (replace 'configure-blas-lapack
4226 (lambda* (#:key inputs #:allow-other-keys)
4227 (call-with-output-file "site.cfg"
4228 (lambda (port)
4229 (format port
4230 "[openblas]
4231 libraries = openblas,lapack
4232 library_dirs = ~a/lib:~a/lib
4233 include_dirs = ~a/include:~a/include
4234 "
4235 (assoc-ref inputs "openblas")
4236 (assoc-ref inputs "lapack")
4237 (assoc-ref inputs "openblas")
4238 (assoc-ref inputs "lapack"))))
4239 #t))))))
4240 (native-inputs
4241 `(("python2-nose" ,python2-nose)))
4242 (description "NumPy is the fundamental package for scientific computing
4243 with Python. It contains among other things: a powerful N-dimensional array
4244 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4245 and Fortran code, useful linear algebra, Fourier transform, and random number
4246 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4247 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4248 Numeric.")
4249 (license license:bsd-3)))
4250
4251 (define-public python-munch
4252 (package
4253 (name "python-munch")
4254 (version "2.0.4")
4255 (source
4256 (origin
4257 (method url-fetch)
4258 (uri (pypi-uri "munch" version))
4259 (sha256
4260 (base32
4261 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4262 (build-system python-build-system)
4263 (home-page "https://github.com/Infinidat/munch")
4264 (synopsis "Dot-accessible dictionary")
4265 (description "Munch is a dot-accessible dictionary similar to JavaScript
4266 objects.")
4267 (license license:expat)))
4268
4269 (define-public python2-munch
4270 (package-with-python2 python-munch))
4271
4272 (define-public python-colormath
4273 (package
4274 (name "python-colormath")
4275 (version "3.0.0")
4276 (source
4277 (origin
4278 (method url-fetch)
4279 (uri (pypi-uri "colormath" version))
4280 (sha256
4281 (base32
4282 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4283 (build-system python-build-system)
4284 (propagated-inputs
4285 `(("python-networkx" ,python-networkx)
4286 ("python-numpy" ,python-numpy)))
4287 (home-page "https://github.com/gtaylor/python-colormath")
4288 (synopsis "Color math and conversion library")
4289 (description
4290 "This is a Python library for color math and conversions.")
4291 (license license:bsd-3)))
4292
4293 (define-public python2-colormath
4294 (package-with-python2 python-colormath))
4295
4296 (define-public python-spectra
4297 (package
4298 (name "python-spectra")
4299 (version "0.0.11")
4300 (source
4301 (origin
4302 (method url-fetch)
4303 (uri (pypi-uri "spectra" version))
4304 (sha256
4305 (base32
4306 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4307 (build-system python-build-system)
4308 (arguments
4309 `(#:phases
4310 (modify-phases %standard-phases
4311 (replace 'check
4312 (lambda _ (invoke "nosetests" "-v"))))))
4313 (propagated-inputs
4314 `(("python-colormath" ,python-colormath)))
4315 (native-inputs
4316 `(("python-nose" ,python-nose)))
4317 (home-page "https://github.com/jsvine/spectra")
4318 (synopsis "Color scales and color conversion")
4319 (description
4320 "This package provides a Python library intended to make color math,
4321 color scales, and color space conversion easy. It has support for:
4322
4323 @enumerate
4324 @item Color scales
4325 @item Color ranges
4326 @item Color blending
4327 @item Brightening/darkening colors
4328 @item Saturating/desaturating colors
4329 @item Conversion to/from multiple color spaces.
4330 @end enumerate\n")
4331 (license license:expat)))
4332
4333 (define-public python2-spectra
4334 (package-with-python2 python-spectra))
4335
4336 (define-public python-numpy-documentation
4337 (package
4338 (name "python-numpy-documentation")
4339 (version (package-version python-numpy))
4340 (source (package-source python-numpy))
4341 (build-system python-build-system)
4342 (native-inputs
4343 `(("python-matplotlib" ,python-matplotlib)
4344 ("python-numpy" ,python-numpy)
4345 ("pkg-config" ,pkg-config)
4346 ("python-sphinx" ,python-sphinx)
4347 ("python-numpydoc" ,python-numpydoc)
4348 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4349 texlive-fonts-ec
4350 texlive-generic-ifxetex
4351 texlive-generic-pdftex
4352 texlive-amsfonts
4353 texlive-latex-capt-of
4354 texlive-latex-cmap
4355 texlive-latex-environ
4356 texlive-latex-eqparbox
4357 texlive-latex-etoolbox
4358 texlive-latex-expdlist
4359 texlive-latex-fancyhdr
4360 texlive-latex-fancyvrb
4361 texlive-latex-fncychap
4362 texlive-latex-float
4363 texlive-latex-framed
4364 texlive-latex-geometry
4365 texlive-latex-graphics
4366 texlive-latex-hyperref
4367 texlive-latex-mdwtools
4368 texlive-latex-multirow
4369 texlive-latex-needspace
4370 texlive-latex-oberdiek
4371 texlive-latex-parskip
4372 texlive-latex-preview
4373 texlive-latex-tabulary
4374 texlive-latex-threeparttable
4375 texlive-latex-titlesec
4376 texlive-latex-trimspaces
4377 texlive-latex-ucs
4378 texlive-latex-upquote
4379 texlive-latex-url
4380 texlive-latex-varwidth
4381 texlive-latex-wrapfig)))
4382 ("texinfo" ,texinfo)
4383 ("perl" ,perl)
4384 ("scipy-sphinx-theme"
4385 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4386 (method git-fetch)
4387 (uri (git-reference
4388 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4389 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4390 (sha256
4391 (base32
4392 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4393 ,@(package-native-inputs python-numpy)))
4394 (arguments
4395 `(#:tests? #f ; we're only generating the documentation
4396 #:phases
4397 (modify-phases %standard-phases
4398 (delete 'build)
4399 (replace 'install
4400 (lambda* (#:key inputs outputs #:allow-other-keys)
4401 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4402 (doc (string-append
4403 data "/doc/" ,name "-"
4404 ,(package-version python-numpy)))
4405 (info-reader (string-append data "/info"))
4406 (html (string-append doc "/html"))
4407 (scipy-sphinx-theme "scipy-sphinx-theme")
4408 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4409 (pyver ,(string-append "PYVER=")))
4410
4411 ;; FIXME: this is needed to for texlive-union to generate
4412 ;; fonts, which are not found.
4413 (setenv "HOME" "/tmp")
4414
4415 (with-directory-excursion "doc"
4416 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4417 (mkdir-p html)
4418 (invoke "make" "html" pyver)
4419 (invoke "make" "latex" "PAPER=a4" pyver)
4420 (invoke "make" "-C" "build/latex"
4421 "all-pdf" "PAPER=a4" pyver)
4422 ;; FIXME: Generation of the info file fails.
4423 ;; (invoke "make" "info" pyver)
4424 ;; (mkdir-p info)
4425 ;; (copy-file "build/texinfo/numpy.info"
4426 ;; (string-append info "/numpy.info"))
4427 (for-each (lambda (file)
4428 (copy-file (string-append "build/latex" file)
4429 (string-append doc file)))
4430 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4431 (with-directory-excursion "build/html"
4432 (for-each (lambda (file)
4433 (let* ((dir (dirname file))
4434 (tgt-dir (string-append html "/" dir)))
4435 (unless (equal? "." dir)
4436 (mkdir-p tgt-dir))
4437 (install-file file html)))
4438 (find-files "." ".*")))))
4439 #t)))))
4440 (home-page (package-home-page python-numpy))
4441 (synopsis "Documentation for the python-numpy package")
4442 (description (package-description python-numpy))
4443 (license (package-license python-numpy))))
4444
4445 (define-public python2-numpy-documentation
4446 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4447 (package
4448 (inherit numpy-documentation)
4449 (native-inputs `(("python2-functools32" ,python2-functools32)
4450 ,@(package-native-inputs numpy-documentation))))))
4451
4452 (define-public python-pygit2
4453 (package
4454 (name "python-pygit2")
4455 (version "1.1.0")
4456 (source
4457 (origin
4458 (method url-fetch)
4459 (uri (pypi-uri "pygit2" version))
4460 (sha256
4461 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4462 (build-system python-build-system)
4463 (arguments
4464 '(#:tests? #f)) ; tests don't run correctly in our environment
4465 (propagated-inputs
4466 `(("python-cached-property" ,python-cached-property)
4467 ("python-cffi" ,python-cffi)
4468 ("libgit2" ,libgit2)))
4469 (native-inputs
4470 `(("python-pytest" ,python-pytest)))
4471 (home-page "https://github.com/libgit2/pygit2")
4472 (synopsis "Python bindings for libgit2")
4473 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4474 library, libgit2 implements Git plumbing.")
4475 ;; GPL2.0 only, with linking exception.
4476 (license license:gpl2)))
4477
4478 (define-public python-pyparsing
4479 (package
4480 (name "python-pyparsing")
4481 (version "2.4.6")
4482 (source
4483 (origin
4484 (method url-fetch)
4485 (uri (pypi-uri "pyparsing" version))
4486 (sha256
4487 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4488 (build-system python-build-system)
4489 (outputs '("out" "doc"))
4490 (arguments
4491 `(#:tests? #f ; no test target
4492 #:phases
4493 (modify-phases %standard-phases
4494 (add-after 'install 'install-doc
4495 (lambda* (#:key outputs #:allow-other-keys)
4496 (let* ((doc (string-append (assoc-ref outputs "doc")
4497 "/share/doc/" ,name "-" ,version))
4498 (html-doc (string-append doc "/html"))
4499 (examples (string-append doc "/examples")))
4500 (mkdir-p html-doc)
4501 (mkdir-p examples)
4502 (for-each
4503 (lambda (dir tgt)
4504 (map (lambda (file)
4505 (install-file file tgt))
4506 (find-files dir ".*")))
4507 (list "docs" "htmldoc" "examples")
4508 (list doc html-doc examples))
4509 #t))))))
4510 (home-page "https://github.com/pyparsing/pyparsing")
4511 (synopsis "Python parsing class library")
4512 (description
4513 "The pyparsing module is an alternative approach to creating and
4514 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4515 of regular expressions. The pyparsing module provides a library of classes
4516 that client code uses to construct the grammar directly in Python code.")
4517 (license license:expat)))
4518
4519 (define-public python2-pyparsing
4520 (package-with-python2 python-pyparsing))
4521
4522 (define-public python-numpydoc
4523 (package
4524 (name "python-numpydoc")
4525 (version "0.8.0")
4526 (source
4527 (origin
4528 (method url-fetch)
4529 (uri (pypi-uri "numpydoc" version))
4530 (sha256
4531 (base32
4532 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4533 (build-system python-build-system)
4534 (propagated-inputs
4535 `(("python-sphinx" ,python-sphinx)))
4536 (native-inputs
4537 `(("python-nose" ,python-nose)))
4538 (home-page "https://pypi.org/project/numpydoc/")
4539 (synopsis
4540 "Numpy's Sphinx extensions")
4541 (description
4542 "Sphinx extension to support docstrings in Numpy format.")
4543 (license license:bsd-2)))
4544
4545 (define-public python2-numpydoc
4546 (package-with-python2 python-numpydoc))
4547
4548 (define-public python-numexpr
4549 (package
4550 (name "python-numexpr")
4551 (version "2.6.5")
4552 (source
4553 (origin
4554 (method url-fetch)
4555 (uri (pypi-uri "numexpr" version))
4556 (sha256
4557 (base32
4558 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4559 (build-system python-build-system)
4560 (arguments `(#:tests? #f)) ; no tests included
4561 (propagated-inputs
4562 `(("python-numpy" ,python-numpy)))
4563 (home-page "https://github.com/pydata/numexpr")
4564 (synopsis "Fast numerical expression evaluator for NumPy")
4565 (description
4566 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4567 expressions that operate on arrays are accelerated and use less memory than
4568 doing the same calculation in Python. In addition, its multi-threaded
4569 capabilities can make use of all your cores, which may accelerate
4570 computations, most specially if they are not memory-bounded (e.g. those using
4571 transcendental functions).")
4572 (license license:expat)))
4573
4574 (define-public python2-numexpr
4575 (package-with-python2 python-numexpr))
4576
4577 (define-public python-cycler
4578 (package
4579 (name "python-cycler")
4580 (version "0.10.0")
4581 (source (origin
4582 (method url-fetch)
4583 (uri (pypi-uri "cycler" version))
4584 (sha256
4585 (base32
4586 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4587 (build-system python-build-system)
4588 (arguments
4589 ;; XXX: The current version requires 'coveralls' which we don't have.
4590 ;; Enable this for the next release which uses 'python-pytest'.
4591 '(#:tests? #f))
4592 (propagated-inputs
4593 `(("python-six" ,python-six)))
4594 (home-page "http://matplotlib.org/cycler/")
4595 (synopsis "Composable keyword argument iterator")
4596 (description
4597 "When using @code{matplotlib} and plotting more than one line, it is
4598 common to want to be able to want to be able to cycle over one or more artist
4599 styles; but the plotting logic can quickly become involved.
4600 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4601 @code{Cycler} class was developed.")
4602 (license license:bsd-3)))
4603
4604 (define-public python2-cycler
4605 (package-with-python2 python-cycler))
4606
4607 (define-public python-colorspacious
4608 (package
4609 (name "python-colorspacious")
4610 (version "1.1.2")
4611 (source
4612 (origin
4613 (method git-fetch)
4614 (uri (git-reference
4615 (url "https://github.com/njsmith/colorspacious.git")
4616 (commit (string-append "v" version))))
4617 (file-name (git-file-name name version))
4618 (sha256
4619 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4620 (build-system python-build-system)
4621 (propagated-inputs
4622 `(("python-numpy" ,python-numpy)))
4623 (native-inputs
4624 `(("python-nose" ,python-nose)))
4625 (arguments
4626 `(#:phases
4627 (modify-phases %standard-phases
4628 (replace 'check
4629 (lambda _
4630 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4631 (home-page "https://github.com/njsmith/colorspacious")
4632 (synopsis "Python library for colorspace conversions")
4633 (description "@code{colorspacious} is a Python library that lets you
4634 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4635 (license license:expat)))
4636
4637 (define-public python2-colorspacious
4638 (package-with-python2 python-colorspacious))
4639
4640 (define-public python-matplotlib
4641 (package
4642 (name "python-matplotlib")
4643 (version "3.1.2")
4644 (source
4645 (origin
4646 (method url-fetch)
4647 (uri (pypi-uri "matplotlib" version))
4648 (sha256
4649 (base32
4650 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4651 (build-system python-build-system)
4652 (propagated-inputs ; the following packages are all needed at run time
4653 `(("python-cycler" ,python-cycler)
4654 ("python-kiwisolver" ,python-kiwisolver)
4655 ("python-pyparsing" ,python-pyparsing)
4656 ("python-pygobject" ,python-pygobject)
4657 ("gobject-introspection" ,gobject-introspection)
4658 ("python-tkinter" ,python "tk")
4659 ("python-dateutil" ,python-dateutil)
4660 ("python-numpy" ,python-numpy)
4661 ("python-pillow" ,python-pillow)
4662 ("python-pytz" ,python-pytz)
4663 ("python-six" ,python-six)
4664 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4665 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4666 ;; object. For this reason we need to import both libraries.
4667 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4668 ("python-pycairo" ,python-pycairo)
4669 ("python-cairocffi" ,python-cairocffi)))
4670 (inputs
4671 `(("libpng" ,libpng)
4672 ("imagemagick" ,imagemagick)
4673 ("freetype" ,freetype)
4674 ("cairo" ,cairo)
4675 ("glib" ,glib)
4676 ;; FIXME: Add backends when available.
4677 ;("python-wxpython" ,python-wxpython)
4678 ("tcl" ,tcl)
4679 ("tk" ,tk)))
4680 (native-inputs
4681 `(("pkg-config" ,pkg-config)
4682 ("python-pytest" ,python-pytest)
4683 ("python-mock" ,python-mock)
4684 ("unzip" ,unzip)
4685 ("jquery-ui"
4686 ,(origin
4687 (method url-fetch)
4688 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4689 (sha256
4690 (base32
4691 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4692 (arguments
4693 `(#:phases
4694 (modify-phases %standard-phases
4695 ;; XXX We disable all image comparison tests because we're using a
4696 ;; newer version of FreeType than matplotlib expects. This leads to
4697 ;; minor differences throughout the tests.
4698 (add-after 'unpack 'fix-and-disable-failing-tests
4699 (lambda _
4700 (substitute* (append (find-files "lib/matplotlib/tests/"
4701 "test_.*\\.py$")
4702 (find-files "lib/mpl_toolkits/tests"
4703 "test_.*\\.py$"))
4704 (("^from matplotlib" match)
4705 (string-append "import pytest\n" match))
4706 (("( *)@image_comparison" match indent)
4707 (string-append indent
4708 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4709 match)))
4710 (substitute* "lib/matplotlib/tests/test_animation.py"
4711 (("/bin/sh") (which "sh")))
4712 (for-each delete-file
4713 ;; test_normal_axes, test_get_tightbbox_polar
4714 '("lib/matplotlib/tests/test_axes.py"
4715 ;; We don't use the webagg backend and this test forces it.
4716 "lib/matplotlib/tests/test_backend_webagg.py"
4717 ;; test_outward_ticks
4718 "lib/matplotlib/tests/test_tightlayout.py"
4719 ;; test_hidden_axes fails with minor extent
4720 ;; differences, possibly due to the use of a
4721 ;; different version of FreeType.
4722 "lib/matplotlib/tests/test_constrainedlayout.py"
4723 ;; Fontconfig returns no fonts.
4724 "lib/matplotlib/tests/test_font_manager.py"))
4725 #t))
4726 (add-before 'install 'install-jquery-ui
4727 (lambda* (#:key outputs inputs #:allow-other-keys)
4728 (let ((dir (string-append (assoc-ref outputs "out")
4729 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4730 (mkdir-p dir)
4731 (invoke "unzip"
4732 (assoc-ref inputs "jquery-ui")
4733 "-d" dir))
4734 #t))
4735 (replace 'check
4736 (lambda* (#:key outputs inputs #:allow-other-keys)
4737 (add-installed-pythonpath inputs outputs)
4738 (invoke "python" "tests.py" "-v"
4739 "-m" "not network and not webagg")))
4740 (add-before 'build 'configure-environment
4741 (lambda* (#:key outputs inputs #:allow-other-keys)
4742 (let ((cairo (assoc-ref inputs "cairo")))
4743 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4744 ;; has not effect.
4745 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4746 (setenv "HOME" (getcwd))
4747 (call-with-output-file "setup.cfg"
4748 (lambda (port)
4749 (format port "[directories]~%
4750 basedirlist = ~a,~a~%
4751 [packages]~%
4752 tests = True~%"
4753 (assoc-ref inputs "tcl")
4754 (assoc-ref inputs "tk")))))
4755 #t)))))
4756 (home-page "https://matplotlib.org/")
4757 (synopsis "2D plotting library for Python")
4758 (description
4759 "Matplotlib is a Python 2D plotting library which produces publication
4760 quality figures in a variety of hardcopy formats and interactive environments
4761 across platforms. Matplotlib can be used in Python scripts, the python and
4762 ipython shell, web application servers, and six graphical user interface
4763 toolkits.")
4764 (license license:psfl)
4765 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4766
4767 (define-public python2-matplotlib
4768 (let ((matplotlib (package-with-python2
4769 (strip-python2-variant python-matplotlib))))
4770 (package (inherit matplotlib)
4771 (version "2.2.4")
4772 (source
4773 (origin
4774 (method url-fetch)
4775 (uri (pypi-uri "matplotlib" version))
4776 (sha256
4777 (base32
4778 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4779 (arguments
4780 (substitute-keyword-arguments (package-arguments matplotlib)
4781 ((#:phases phases)
4782 `(modify-phases ,phases
4783 (replace 'install-jquery-ui
4784 (lambda* (#:key outputs inputs #:allow-other-keys)
4785 (let ((dir (string-append (assoc-ref outputs "out")
4786 "/lib/python2.7/site-packages/"
4787 "matplotlib/backends/web_backend/")))
4788 (mkdir-p dir)
4789 (invoke "unzip"
4790 (assoc-ref inputs "jquery-ui")
4791 "-d" dir))
4792 #t))
4793 (delete 'fix-and-disable-failing-tests)
4794 (delete 'check))))) ; These tests weren't run the the past.
4795 ;; Make sure to use special packages for Python 2 instead
4796 ;; of those automatically rewritten by package-with-python2.
4797 (propagated-inputs
4798 `(("python2-pycairo" ,python2-pycairo)
4799 ("python2-backports-functools-lru-cache"
4800 ,python2-backports-functools-lru-cache)
4801 ("python2-functools32" ,python2-functools32)
4802 ("python2-pygobject-2" ,python2-pygobject-2)
4803 ("python2-subprocess32" ,python2-subprocess32)
4804 ("python2-tkinter" ,python-2 "tk")
4805 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4806 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4807
4808 (define-public python-matplotlib-documentation
4809 (package
4810 (name "python-matplotlib-documentation")
4811 (version (package-version python-matplotlib))
4812 (source (package-source python-matplotlib))
4813 (build-system python-build-system)
4814 (native-inputs
4815 `(("python-matplotlib" ,python-matplotlib)
4816 ("python-colorspacious" ,python-colorspacious)
4817 ("python-sphinx" ,python-sphinx)
4818 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4819 ("python-sphinx-gallery" ,python-sphinx-gallery)
4820 ("python-numpydoc" ,python-numpydoc)
4821 ("python-ipython" ,python-ipython)
4822 ("python-ipykernel" ,python-ipykernel)
4823 ("python-mock" ,python-mock)
4824 ("graphviz" ,graphviz)
4825 ("texlive" ,(texlive-union (list texlive-amsfonts
4826 texlive-latex-amsmath
4827 texlive-latex-enumitem
4828 texlive-latex-expdlist
4829 texlive-latex-geometry
4830 texlive-latex-preview
4831 texlive-latex-type1cm
4832 texlive-latex-ucs
4833
4834 texlive-generic-pdftex
4835
4836 texlive-fonts-ec
4837 texlive-fonts-adobe-times
4838 texlive-fonts-txfonts)))
4839 ("texinfo" ,texinfo)
4840 ,@(package-native-inputs python-matplotlib)))
4841 (arguments
4842 `(#:tests? #f ; we're only generating documentation
4843 #:phases
4844 (modify-phases %standard-phases
4845 ;; The tests in python-matplotlib are run after the install phase, so
4846 ;; we need to delete the extra phase here.
4847 (delete 'check)
4848 (replace 'build
4849 (lambda _
4850 (chdir "doc")
4851 (setenv "PYTHONPATH"
4852 (string-append (getenv "PYTHONPATH")
4853 ":" (getcwd) "/../examples/units"))
4854 (substitute* "conf.py"
4855 ;; Don't use git.
4856 (("^SHA = check_output.*")
4857 (string-append "SHA = \"" ,version "\"\n"))
4858 ;; Don't fetch intersphinx files from the Internet
4859 (("^explicit_order_folders" m)
4860 (string-append "intersphinx_mapping = {}\n" m))
4861 (("'sphinx.ext.intersphinx',") "")
4862 ;; Disable URL embedding which requires internet access.
4863 (("'https://docs.scipy.org/doc/numpy'") "None")
4864 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4865 (invoke "make"
4866 "SPHINXBUILD=sphinx-build"
4867 "SPHINXOPTS=" ; don't abort on warnings
4868 "html" "texinfo")))
4869 (replace 'install
4870 (lambda* (#:key inputs outputs #:allow-other-keys)
4871 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4872 (doc (string-append data "/doc/python-matplotlib-" ,version))
4873 (info (string-append data "/info"))
4874 (html (string-append doc "/html")))
4875 (mkdir-p html)
4876 (mkdir-p info)
4877 (copy-recursively "build/html" html)
4878 (symlink (string-append html "/_images")
4879 (string-append info "/matplotlib-figures"))
4880 (with-directory-excursion "build/texinfo"
4881 (substitute* "matplotlib.texi"
4882 (("@image\\{([^,]*)" all file)
4883 (string-append "@image{matplotlib-figures/" file)))
4884 (symlink (string-append html "/_images")
4885 "./matplotlib-figures")
4886 (invoke "makeinfo" "--no-split"
4887 "-o" "matplotlib.info" "matplotlib.texi"))
4888 (install-file "build/texinfo/matplotlib.info" info))
4889 #t)))))
4890 (home-page (package-home-page python-matplotlib))
4891 (synopsis "Documentation for the python-matplotlib package")
4892 (description (package-description python-matplotlib))
4893 (license (package-license python-matplotlib))))
4894
4895 (define-public python2-matplotlib-documentation
4896 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4897 (package
4898 (inherit parent)
4899 (native-inputs
4900 (alist-delete "python-sphinx-copybutton"
4901 (package-native-inputs parent))))))
4902
4903 (define-public python-matplotlib-venn
4904 (package
4905 (name "python-matplotlib-venn")
4906 (version "0.11.5")
4907 (source
4908 (origin
4909 (method url-fetch)
4910 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4911 (sha256
4912 (base32
4913 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4914 (build-system python-build-system)
4915 (arguments '(#:tests? #f)) ; tests are not included
4916 (propagated-inputs
4917 `(("python-matplotlib" ,python-matplotlib)
4918 ("python-numpy" ,python-numpy)
4919 ("python-scipy" ,python-scipy)))
4920 (native-inputs
4921 `(("unzip" ,unzip)))
4922 (home-page "https://github.com/konstantint/matplotlib-venn")
4923 (synopsis "Plot area-proportional Venn diagrams")
4924 (description
4925 "This package provides tools for plotting area-proportional two- and
4926 three-way Venn diagrams in @code{matplotlib}.")
4927 (license license:expat)))
4928
4929 (define-public python-pysnptools
4930 (package
4931 (name "python-pysnptools")
4932 (version "0.4.11")
4933 (source
4934 (origin
4935 (method url-fetch)
4936 (uri (pypi-uri "pysnptools" version))
4937 (sha256
4938 (base32
4939 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
4940 (build-system python-build-system)
4941 (arguments
4942 `(#:tests? #f ; no test data are included
4943 #:phases
4944 (modify-phases %standard-phases
4945 (replace 'check
4946 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4947 (if tests?
4948 (begin
4949 (add-installed-pythonpath inputs outputs)
4950 (invoke "python3" "pysnptools/test.py"))
4951 #t))))))
4952 (propagated-inputs
4953 `(("python-dill" ,python-dill)
4954 ("python-h5py" ,python-h5py)
4955 ("python-numpy" ,python-numpy)
4956 ("python-pandas" ,python-pandas)
4957 ("python-psutil" ,python-psutil)
4958 ("python-scipy" ,python-scipy)))
4959 (native-inputs
4960 `(("python-cython" ,python-cython)))
4961 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4962 (synopsis "Library for reading and manipulating genetic data")
4963 (description
4964 "PySnpTools is a library for reading and manipulating genetic data. It
4965 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4966 those files. It can also efficiently manipulate ranges of integers using set
4967 operators such as union, intersection, and difference.")
4968 (license license:asl2.0)))
4969
4970 (define-public python2-pysnptools
4971 (package-with-python2 python-pysnptools))
4972
4973 (define-public python-socksipy-branch
4974 (package
4975 (name "python-socksipy-branch")
4976 (version "1.01")
4977 (source
4978 (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "SocksiPy-branch" version))
4981 (sha256
4982 (base32
4983 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4984 (build-system python-build-system)
4985 (arguments
4986 `(#:tests? #f)) ; There are no tests
4987 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4988 (synopsis "Python SOCKS module")
4989 (description
4990 "SocksiPy - A Python SOCKS client module. It provides a
4991 socket-like interface that supports connections to any TCP
4992 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4993 The original version was developed by Dan Haim, this is a
4994 branch created by Mario Vilas to address some open issues,
4995 as the original project seems to have been abandoned circa 2007.")
4996 (license license:bsd-3)))
4997
4998 (define-public python2-socksipy-branch
4999 (package-with-python2 python-socksipy-branch))
5000
5001 (define-public python-socksipychain
5002 (let ((commit "eb5ee8741ce006ac0c5c3e2e83204062c348c155")
5003 (revision "1")
5004 (version "2.1.1"))
5005 (package
5006 (name "python-socksipychain")
5007 (version (git-version version revision commit))
5008 (source
5009 (origin
5010 (method git-fetch)
5011 (uri (git-reference
5012 (url "https://github.com/pagekite/PySocksipyChain.git")
5013 (commit commit)))
5014 (file-name (git-file-name name version))
5015 (sha256
5016 (base32
5017 "0fpphn6xnpm7qk8a914s4abycsbq9w6qkci07my632v0fylnm5n7"))))
5018 (build-system python-build-system)
5019 (arguments
5020 `(#:tests? #f)) ; Tests try to access the network.
5021 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5022 (synopsis "Python SOCKS module with chained proxies support")
5023 (description
5024 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5025 adds support for arbitrary chaining of proxy servers and various modes of
5026 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5027 a simple netcat replacement with chaining support.")
5028 (license license:bsd-3))))
5029
5030 (define-public python-pycodestyle
5031 (package
5032 (name "python-pycodestyle")
5033 (version "2.5.0")
5034 (source
5035 (origin
5036 (method url-fetch)
5037 (uri (pypi-uri "pycodestyle" version))
5038 (sha256
5039 (base32
5040 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
5041 (build-system python-build-system)
5042 (home-page "https://pycodestyle.readthedocs.io/")
5043 (synopsis "Python style guide checker")
5044 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5045 Python code against some of the style conventions in
5046 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5047 (license license:expat)))
5048
5049 (define-public python2-pycodestyle
5050 (package-with-python2 python-pycodestyle))
5051
5052 (define-public python-multidict
5053 (package
5054 (name "python-multidict")
5055 (version "4.7.5")
5056 (source
5057 (origin
5058 (method url-fetch)
5059 (uri (pypi-uri "multidict" version))
5060 (sha256
5061 (base32
5062 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5063 (build-system python-build-system)
5064 (arguments
5065 '(#:modules ((ice-9 ftw)
5066 (srfi srfi-1)
5067 (srfi srfi-26)
5068 (guix build utils)
5069 (guix build python-build-system))
5070 #:phases (modify-phases %standard-phases
5071 (replace 'check
5072 (lambda* (#:key tests? #:allow-other-keys)
5073 (if tests?
5074 (begin
5075 (let ((libdir (find (cut string-prefix? "lib." <>)
5076 (scandir "build"))))
5077 (setenv "PYTHONPATH"
5078 (string-append "./build/" libdir ":"
5079 (getenv "PYTHONPATH")))
5080 (invoke "pytest" "-vv")))
5081 (format #t "test suite not run~%"))
5082 #t)))))
5083 (native-inputs
5084 `(("python-pytest" ,python-pytest)
5085 ("python-pytest-cov" ,python-pytest-cov)))
5086 (home-page "https://github.com/aio-libs/multidict/")
5087 (synopsis "Multidict implementation")
5088 (description "Multidict is dict-like collection of key-value pairs
5089 where key might be occurred more than once in the container.")
5090 (license license:asl2.0)))
5091
5092 (define-public python-orderedmultidict
5093 (package
5094 (name "python-orderedmultidict")
5095 (version "1.0")
5096 (source
5097 (origin
5098 (method url-fetch)
5099 (uri (pypi-uri "orderedmultidict" version))
5100 (sha256
5101 (base32
5102 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5103 (build-system python-build-system)
5104 (arguments
5105 `(#:phases
5106 (modify-phases %standard-phases
5107 (add-after 'unpack 'fix-tests
5108 (lambda _
5109 ;; The package uses nosetest for running the tests.
5110 ;; Adding this initfile allows to run the test suite
5111 ;; without requiring nosetest.
5112 (with-output-to-file "tests/__init__.py" newline)
5113 #t)))))
5114 (propagated-inputs
5115 `(("python-six" ,python-six)))
5116 (native-inputs
5117 `(("python-pycodestyle" ,python-pycodestyle)))
5118 (home-page "https://github.com/gruns/orderedmultidict")
5119 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5120 (description "This package contains a library for ordered multivalue
5121 dictionaries. A multivalue dictionary is a dictionary that can store
5122 multiple values for the same key. An ordered multivalue dictionary is a
5123 multivalue dictionary that retains the order of insertions and deletions.")
5124 (license license:unlicense)))
5125
5126 (define-public python2-orderedmultidict
5127 (package-with-python2 python-orderedmultidict))
5128
5129 (define-public python-autopep8
5130 (package
5131 (name "python-autopep8")
5132 (version "1.3.5")
5133 (source
5134 (origin
5135 (method url-fetch)
5136 (uri (pypi-uri "autopep8" version))
5137 (sha256
5138 (base32
5139 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
5140 (build-system python-build-system)
5141 (propagated-inputs
5142 `(("python-pycodestyle" ,python-pycodestyle)))
5143 (home-page "https://github.com/hhatto/autopep8")
5144 (synopsis "Format Python code according to the PEP 8 style guide")
5145 (description
5146 "@code{autopep8} automatically formats Python code to conform to
5147 the PEP 8 style guide. It uses the pycodestyle utility to determine
5148 what parts of the code needs to be formatted. @code{autopep8} is
5149 capable of fixing most of the formatting issues that can be reported
5150 by pycodestyle.")
5151 (license (license:non-copyleft
5152 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5153
5154 (define-public python2-autopep8
5155 (package-with-python2 python-autopep8))
5156
5157 (define-public python-distlib
5158 (package
5159 (name "python-distlib")
5160 (version "0.3.0")
5161 (source
5162 (origin
5163 (method url-fetch)
5164 (uri (pypi-uri "distlib" version ".zip"))
5165 (sha256
5166 (base32
5167 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5168 (build-system python-build-system)
5169 (arguments
5170 `(#:phases
5171 (modify-phases %standard-phases
5172 (add-before 'build 'no-/bin/sh
5173 (lambda _
5174 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5175 (("/bin/sh") (which "sh")))
5176 #t))
5177 (add-before 'check 'prepare-test-env
5178 (lambda _
5179 (setenv "HOME" "/tmp")
5180 ;; NOTE: Any value works, the variable just has to be present.
5181 (setenv "SKIP_ONLINE" "1")
5182 #t)))))
5183 (native-inputs `(("unzip" ,unzip)))
5184 (home-page "https://bitbucket.org/pypa/distlib")
5185 (synopsis "Distribution utilities")
5186 (description "Distlib is a library which implements low-level functions that
5187 relate to packaging and distribution of Python software. It is intended to be
5188 used as the basis for third-party packaging tools.")
5189 (license license:psfl)))
5190
5191 (define-public python-distutils-extra
5192 (package
5193 (name "python-distutils-extra")
5194 (version "2.38")
5195 (source
5196 (origin
5197 (method url-fetch)
5198 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5199 version "/+download/python-distutils-extra-"
5200 version ".tar.gz"))
5201 (sha256
5202 (base32
5203 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5204 (build-system python-build-system)
5205 (home-page "https://launchpad.net/python-distutils-extra/")
5206 (synopsis "Enhancements to Python's distutils")
5207 (description
5208 "The python-distutils-extra module enables you to easily integrate
5209 gettext support, themed icons, and scrollkeeper-based documentation into
5210 Python's distutils.")
5211 (license license:gpl2)))
5212
5213 (define-public python2-distutils-extra
5214 (package-with-python2 python-distutils-extra))
5215
5216 (define-public python2-elib.intl
5217 (package
5218 (name "python2-elib.intl")
5219 (version "0.0.3")
5220 (source
5221 (origin
5222 ;; This project doesn't tag releases or publish tarballs, so we take
5223 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5224 (method git-fetch)
5225 (uri (git-reference
5226 (url "https://github.com/dieterv/elib.intl.git")
5227 (commit "d09997cfef")))
5228 (file-name (string-append name "-" version "-checkout"))
5229 (sha256
5230 (base32
5231 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5232 (build-system python-build-system)
5233 (arguments
5234 ;; incompatible with Python 3 (exception syntax)
5235 `(#:python ,python-2
5236 #:tests? #f))
5237 (home-page "https://github.com/dieterv/elib.intl")
5238 (synopsis "Enhanced internationalization for Python")
5239 (description
5240 "The elib.intl module provides enhanced internationalization (I18N)
5241 services for your Python modules and applications.")
5242 (license license:lgpl3+)))
5243
5244 (define-public python-olefile
5245 (package
5246 (name "python-olefile")
5247 (version "0.46")
5248 (source
5249 (origin
5250 (method url-fetch)
5251 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5252 "download/v" version "/olefile-" version ".tar.gz"))
5253 (file-name (string-append name "-" version ".tar.gz"))
5254 (sha256
5255 (base32
5256 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5257 (build-system python-build-system)
5258 (home-page "https://www.decalage.info/python/olefileio")
5259 (synopsis "Read and write Microsoft OLE2 files.")
5260 (description
5261 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5262 Storage or Compound Document, Microsoft Office). It is an improved version of
5263 the OleFileIO module from PIL, the Python Image Library.")
5264 (license license:bsd-3)))
5265
5266 (define-public python2-olefile
5267 (package-with-python2 python-olefile))
5268
5269 (define-public python-pillow
5270 (package
5271 (name "python-pillow")
5272 (version "6.2.1")
5273 (source
5274 (origin
5275 (method url-fetch)
5276 (uri (pypi-uri "Pillow" version))
5277 (sha256
5278 (base32
5279 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5280 (build-system python-build-system)
5281 (native-inputs
5282 `(("python-pytest" ,python-pytest)))
5283 (inputs
5284 `(("freetype" ,freetype)
5285 ("lcms" ,lcms)
5286 ("libjpeg" ,libjpeg-turbo)
5287 ("libtiff" ,libtiff)
5288 ("libwebp" ,libwebp)
5289 ("openjpeg" ,openjpeg)
5290 ("zlib" ,zlib)))
5291 (propagated-inputs
5292 `(("python-olefile" ,python-olefile)))
5293 (arguments
5294 `(#:phases
5295 (modify-phases %standard-phases
5296 (add-after 'unpack 'patch-ldconfig
5297 (lambda _
5298 (substitute* "setup.py"
5299 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5300 (replace 'check
5301 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5302 (if tests?
5303 (begin
5304 (setenv "HOME" (getcwd))
5305 ;; Make installed package available for running the tests.
5306 (add-installed-pythonpath inputs outputs)
5307 (invoke "python" "selftest.py" "--installed")
5308 (invoke "python" "-m" "pytest" "-vv"))
5309 #t))))))
5310 (home-page "https://python-pillow.org")
5311 (synopsis "Fork of the Python Imaging Library")
5312 (description
5313 "The Python Imaging Library adds image processing capabilities to your
5314 Python interpreter. This library provides extensive file format support, an
5315 efficient internal representation, and fairly powerful image processing
5316 capabilities. The core image library is designed for fast access to data
5317 stored in a few basic pixel formats. It should provide a solid foundation for
5318 a general image processing tool.")
5319 (license (license:x11-style
5320 "http://www.pythonware.com/products/pil/license.htm"
5321 "The PIL Software License"))))
5322
5323 (define-public python2-pillow
5324 (package-with-python2 python-pillow))
5325
5326 (define-public python-pycparser
5327 (package
5328 (name "python-pycparser")
5329 (version "2.20")
5330 (source
5331 (origin
5332 (method url-fetch)
5333 (uri (pypi-uri "pycparser" version))
5334 (sha256
5335 (base32
5336 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5337 (outputs '("out" "doc"))
5338 (build-system python-build-system)
5339 (native-inputs
5340 `(("pkg-config" ,pkg-config)))
5341 (arguments
5342 `(#:phases
5343 (modify-phases %standard-phases
5344 (replace 'check
5345 (lambda _
5346 (with-directory-excursion "tests"
5347 (invoke "python" "all_tests.py"))
5348 #t))
5349 (add-after 'install 'install-doc
5350 (lambda* (#:key outputs #:allow-other-keys)
5351 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5352 (doc (string-append data "/doc/" ,name "-" ,version))
5353 (examples (string-append doc "/examples")))
5354 (mkdir-p examples)
5355 (for-each (lambda (file)
5356 (copy-file (string-append "." file)
5357 (string-append doc file)))
5358 '("/README.rst" "/CHANGES" "/LICENSE"))
5359 (copy-recursively "examples" examples)
5360 #t))))))
5361 (home-page "https://github.com/eliben/pycparser")
5362 (synopsis "C parser in Python")
5363 (description
5364 "Pycparser is a complete parser of the C language, written in pure Python
5365 using the PLY parsing library. It parses C code into an AST and can serve as
5366 a front-end for C compilers or analysis tools.")
5367 (license license:bsd-3)))
5368
5369 (define-public python2-pycparser
5370 (package-with-python2 python-pycparser))
5371
5372 (define-public python-pywavelets
5373 (package
5374 (name "python-pywavelets")
5375 (version "1.0.1")
5376 (home-page "https://github.com/PyWavelets/pywt")
5377 (source (origin
5378 (method url-fetch)
5379 (uri (pypi-uri "PyWavelets" version))
5380 (sha256
5381 (base32
5382 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
5383 (build-system python-build-system)
5384 (arguments
5385 '(#:modules ((ice-9 ftw)
5386 (srfi srfi-1)
5387 (srfi srfi-26)
5388 (guix build utils)
5389 (guix build python-build-system))
5390 #:phases (modify-phases %standard-phases
5391 (replace 'check
5392 (lambda _
5393 (let ((cwd (getcwd))
5394 (libdir (find (cut string-prefix? "lib." <>)
5395 (scandir "build"))))
5396 (with-directory-excursion (string-append cwd "/build/" libdir)
5397 (invoke "nosetests" "-v" "."))))))))
5398 (native-inputs
5399 `(("python-matplotlib" ,python-matplotlib) ;for tests
5400 ("python-nose" ,python-nose)))
5401 (propagated-inputs
5402 `(("python-numpy" ,python-numpy)))
5403 (synopsis "Wavelet transforms in Python")
5404 (description
5405 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5406 mathematical basis functions that are localized in both time and frequency.
5407 Wavelet transforms are time-frequency transforms employing wavelets. They are
5408 similar to Fourier transforms, the difference being that Fourier transforms are
5409 localized only in frequency instead of in time and frequency.")
5410 (license license:expat)))
5411
5412 (define-public python2-pywavelets
5413 (package-with-python2 python-pywavelets))
5414
5415 (define-public python-pywinrm
5416 (package
5417 (name "python-pywinrm")
5418 (version "0.4.1")
5419 (source
5420 (origin
5421 (method url-fetch)
5422 (uri (pypi-uri "pywinrm" version))
5423 (sha256
5424 (base32
5425 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5426 (build-system python-build-system)
5427 (propagated-inputs
5428 `(("python-six" ,python-six)
5429 ("python-requests_ntlm" ,python-requests_ntlm)
5430 ("python-xmltodict" ,python-xmltodict)
5431 ("python-kerberos" ,python-kerberos)))
5432 (native-inputs
5433 `(("python-mock" ,python-mock)
5434 ("python-pytest" ,python-pytest)))
5435 (home-page "https://github.com/diyan/pywinrm/")
5436 (synopsis
5437 "Python library for Windows Remote Management (WinRM)")
5438 (description
5439 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5440 service. It allows you to invoke commands on target Windows machines from
5441 any machine that can run Python.")
5442 (license license:expat)))
5443
5444 (define-public python-xcffib
5445 (package
5446 (name "python-xcffib")
5447 (version "0.6.0")
5448 (source
5449 (origin
5450 (method url-fetch)
5451 (uri (pypi-uri "xcffib" version))
5452 (sha256
5453 (base32
5454 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5455 (build-system python-build-system)
5456 (inputs
5457 `(("libxcb" ,libxcb)))
5458 (propagated-inputs
5459 `(("python-cffi" ,python-cffi) ; used at run time
5460 ("python-six" ,python-six)))
5461 (arguments
5462 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5463 #:tests? #f
5464 #:phases
5465 (modify-phases %standard-phases
5466 (add-after 'unpack 'fix-libxcb-path
5467 (lambda* (#:key inputs #:allow-other-keys)
5468 (let ((libxcb (assoc-ref inputs "libxcb")))
5469 (substitute* '("xcffib/__init__.py")
5470 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5471 #t)))
5472 (add-after 'install 'install-doc
5473 (lambda* (#:key outputs #:allow-other-keys)
5474 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5475 "/doc/" ,name "-" ,version)))
5476 (mkdir-p doc)
5477 (copy-file "README.md"
5478 (string-append doc "/README.md"))
5479 #t))))))
5480 (home-page "https://github.com/tych0/xcffib")
5481 (synopsis "XCB Python bindings")
5482 (description
5483 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5484 support for Python 3 and PyPy. It is based on cffi.")
5485 (license license:expat)))
5486
5487 (define-public python2-xcffib
5488 (package-with-python2 python-xcffib))
5489
5490 (define-public python-cairocffi
5491 (package
5492 (name "python-cairocffi")
5493 (version "0.9.0")
5494 (source
5495 (origin
5496 (method url-fetch)
5497 (uri (pypi-uri "cairocffi" version))
5498 (sha256
5499 (base32
5500 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5501 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5502 (build-system python-build-system)
5503 (outputs '("out" "doc"))
5504 (inputs
5505 `(("glib" ,glib)
5506 ("gtk+" ,gtk+)
5507 ("gdk-pixbuf" ,gdk-pixbuf)
5508 ("cairo" ,cairo)
5509 ("pango" ,pango)))
5510 (native-inputs
5511 `(("pkg-config" ,pkg-config)
5512 ("python-pytest" ,python-pytest)
5513 ("python-pytest-cov" ,python-pytest-cov)
5514 ("python-pytest-runner" ,python-pytest-runner)
5515 ("python-sphinx" ,python-sphinx)
5516 ("python-docutils" ,python-docutils)))
5517 (propagated-inputs
5518 `(("python-xcffib" ,python-xcffib))) ; used at run time
5519 (arguments
5520 `(#:phases
5521 (modify-phases %standard-phases
5522 (add-after 'unpack 'patch-paths
5523 (lambda* (#:key inputs outputs #:allow-other-keys)
5524 (substitute* (find-files "." "\\.py$")
5525 (("dlopen\\(ffi, 'cairo'")
5526 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5527 "/lib/libcairo.so.2'"))
5528 (("dlopen\\(ffi, 'gdk-3'")
5529 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5530 "/lib/libgtk-3.so.0'"))
5531 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5532 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5533 "/lib/libgdk_pixbuf-2.0.so.0'"))
5534 (("dlopen\\(ffi, 'glib-2.0'")
5535 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5536 "/lib/libglib-2.0.so.0'"))
5537 (("dlopen\\(ffi, 'gobject-2.0'")
5538 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5539 "/lib/libgobject-2.0.so.0'"))
5540 (("dlopen\\(ffi, 'pangocairo-1.0'")
5541 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5542 "/lib/libpangocairo-1.0.so.0'"))
5543 (("dlopen\\(ffi, 'pango-1.0'")
5544 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5545 "/lib/libpango-1.0.so.0'")))
5546 #t))
5547 (add-after 'install 'install-doc
5548 (lambda* (#:key inputs outputs #:allow-other-keys)
5549 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5550 (doc (string-append data "/doc/" ,name "-" ,version))
5551 (html (string-append doc "/html")))
5552 (setenv "LD_LIBRARY_PATH"
5553 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5554 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5555 (setenv "LANG" "en_US.UTF-8")
5556 (mkdir-p html)
5557 (for-each (lambda (file)
5558 (copy-file (string-append "." file)
5559 (string-append doc file)))
5560 '("/README.rst" "/CHANGES" "/LICENSE"))
5561 (system* "python" "setup.py" "build_sphinx")
5562 (copy-recursively "docs/_build/html" html)
5563 #t))))))
5564 (home-page "https://github.com/Kozea/cairocffi")
5565 (synopsis "Python bindings and object-oriented API for Cairo")
5566 (description
5567 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5568 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5569 graphics library with support for multiple backends including image buffers,
5570 PNG, PostScript, PDF, and SVG file output.")
5571 (license license:bsd-3)))
5572
5573 (define-public python2-cairocffi
5574 (package-with-python2 python-cairocffi))
5575
5576 (define-public python-decorator
5577 (package
5578 (name "python-decorator")
5579 (version "4.3.0")
5580 (source
5581 (origin
5582 (method url-fetch)
5583 (uri (pypi-uri "decorator" version))
5584 (sha256
5585 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5586 (build-system python-build-system)
5587 (home-page "https://pypi.org/project/decorator/")
5588 (synopsis "Python module to simplify usage of decorators")
5589 (description
5590 "The aim of the decorator module is to simplify the usage of decorators
5591 for the average programmer, and to popularize decorators usage giving examples
5592 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5593 etc. The core of this module is a decorator factory.")
5594 (license license:expat)))
5595
5596 (define-public python2-decorator
5597 (package-with-python2 python-decorator))
5598
5599 (define-public python-drmaa
5600 (package
5601 (name "python-drmaa")
5602 (version "0.7.7")
5603 (source
5604 (origin
5605 (method url-fetch)
5606 (uri (pypi-uri "drmaa" version))
5607 (sha256
5608 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5609 (build-system python-build-system)
5610 ;; The test suite requires libdrmaa which is provided by the cluster
5611 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5612 ;; should be set to the path of the libdrmaa library.
5613 (arguments '(#:tests? #f))
5614 (native-inputs
5615 `(("python-nose" ,python-nose)))
5616 (home-page "https://pypi.org/project/drmaa/")
5617 (synopsis "Python bindings for the DRMAA library")
5618 (description
5619 "A Python package for Distributed Resource Management (DRM) job
5620 submission and control. This package is an implementation of the DRMAA 1.0
5621 Python language binding specification.")
5622 (license license:bsd-3)))
5623
5624 (define-public python2-drmaa
5625 (package-with-python2 python-drmaa))
5626
5627 (define-public python-grako
5628 (package
5629 (name "python-grako")
5630 (version "3.99.9")
5631 (source
5632 (origin
5633 (method url-fetch)
5634 (uri
5635 (pypi-uri "grako" version ".zip"))
5636 (sha256
5637 (base32
5638 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5639 (build-system python-build-system)
5640 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5641 (native-inputs
5642 `(("unzip" ,unzip)
5643 ("python-pytest" ,python-pytest)
5644 ("python-pytest-runner" ,python-pytest-runner)))
5645 (home-page "https://bitbucket.org/neogeny/grako")
5646 (synopsis "EBNF parser generator")
5647 (description
5648 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5649 memoizing PEG/Packrat parser in Python.")
5650 (license license:bsd-3)))
5651
5652 (define-public python2-grako
5653 (package-with-python2 python-grako))
5654
5655 (define-public python-gridmap
5656 (package
5657 (name "python-gridmap")
5658 (version "0.13.0")
5659 (source
5660 (origin
5661 (method git-fetch)
5662 (uri (git-reference
5663 (url "https://github.com/pygridtools/gridmap.git")
5664 (commit (string-append "v" version))))
5665 (file-name (git-file-name name version))
5666 (sha256
5667 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
5668 (build-system python-build-system)
5669 (arguments
5670 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5671 (propagated-inputs
5672 `(("python-psutil" ,python-psutil)
5673 ("python-drmaa" ,python-drmaa)
5674 ("python-pyzmq" ,python-pyzmq)))
5675 (home-page "https://github.com/pygridtools/gridmap")
5676 (synopsis "Create jobs on a cluster directly from Python")
5677 (description
5678 "Gridmap is a Python package to allow you to easily create jobs on the
5679 cluster directly from Python. You can directly map Python functions onto the
5680 cluster without needing to write any wrapper code yourself.")
5681 (license license:gpl3+)))
5682
5683 (define-public python2-gridmap
5684 (package-with-python2 python-gridmap))
5685
5686 (define-public python-honcho
5687 (package
5688 (name "python-honcho")
5689 (version "1.0.1")
5690 (source
5691 (origin
5692 (method git-fetch)
5693 (uri (git-reference
5694 (url "https://github.com/nickstenning/honcho.git")
5695 (commit (string-append "v" version))))
5696 (file-name (git-file-name name version))
5697 (sha256
5698 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5699 (build-system python-build-system)
5700 (native-inputs
5701 `(("python-pytest" ,python-pytest)
5702 ("python-mock" ,python-mock)
5703 ("python-tox" ,python-tox)
5704 ("which" ,which))) ;for tests
5705 (propagated-inputs
5706 `(("python-jinja2" ,python-jinja2)))
5707 (arguments
5708 `(#:phases
5709 (modify-phases %standard-phases
5710 (delete 'check)
5711 (add-after 'install 'check
5712 (lambda* (#:key outputs inputs #:allow-other-keys)
5713 ;; fix honcho path in testsuite
5714 (substitute* "tests/conftest.py"
5715 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5716 "/bin/honcho" "'")))
5717 ;; It's easier to run tests after install.
5718 ;; Make installed package available for running the tests
5719 (add-installed-pythonpath inputs outputs)
5720 (invoke "py.test" "-v"))))))
5721 (home-page "https://github.com/nickstenning/honcho")
5722 (synopsis "Manage Procfile-based applications")
5723 (description
5724 "A Procfile is a file which describes how to run an application
5725 consisting of several processes. honcho starts all listed processes.
5726 The output of all running processes is collected by honcho and
5727 displayed.")
5728 (license license:expat)))
5729
5730 (define-public python2-honcho
5731 (package-with-python2 python-honcho))
5732
5733 (define-public python-pexpect
5734 (package
5735 (name "python-pexpect")
5736 (version "4.8.0")
5737 (source
5738 (origin
5739 (method url-fetch)
5740 (uri (pypi-uri "pexpect" version))
5741 (sha256
5742 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
5743 (build-system python-build-system)
5744 (arguments
5745 `(#:phases
5746 (modify-phases %standard-phases
5747 (add-before 'check 'prepare-tests
5748 (lambda _
5749 (substitute* (find-files "tests")
5750 (("/bin/ls") (which "ls"))
5751 (("/bin/echo") (which "echo"))
5752 (("/bin/which") (which "which"))
5753 ;; Many tests try to use the /bin directory which
5754 ;; is not present in the build environment.
5755 ;; Use one that's non-empty and unlikely to change.
5756 (("/bin'") "/dev'")
5757 ;; Disable failing test. See upstream bug report
5758 ;; https://github.com/pexpect/pexpect/issues/568
5759 (("def test_bash") "def _test_bash"))
5760 ;; XXX: Socket connection test gets "Connection reset by peer".
5761 ;; Why does it not work? Delete for now.
5762 (delete-file "tests/test_socket.py")
5763 #t))
5764 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5765 (native-inputs
5766 `(("python-nose" ,python-nose)
5767 ("python-pytest" ,python-pytest)
5768 ("man-db" ,man-db)
5769 ("which" ,which)
5770 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5771 (propagated-inputs
5772 `(("python-ptyprocess" ,python-ptyprocess)))
5773 (home-page "http://pexpect.readthedocs.org/")
5774 (synopsis "Controlling interactive console applications")
5775 (description
5776 "Pexpect is a pure Python module for spawning child applications;
5777 controlling them; and responding to expected patterns in their output.
5778 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5779 child application and control it as if a human were typing commands.")
5780 (license license:isc)))
5781
5782 (define-public python2-pexpect
5783 (package-with-python2 python-pexpect))
5784
5785 (define-public python-setuptools-scm
5786 (package
5787 (name "python-setuptools-scm")
5788 (version "3.4.3")
5789 (source (origin
5790 (method url-fetch)
5791 (uri (pypi-uri "setuptools_scm" version))
5792 (sha256
5793 (base32
5794 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
5795 (build-system python-build-system)
5796 (home-page "https://github.com/pypa/setuptools_scm/")
5797 (synopsis "Manage Python package versions in SCM metadata")
5798 (description
5799 "Setuptools_scm handles managing your Python package versions in
5800 @dfn{software configuration management} (SCM) metadata instead of declaring
5801 them as the version argument or in a SCM managed file.")
5802 (license license:expat)))
5803
5804 (define-public python2-setuptools-scm
5805 (package-with-python2 python-setuptools-scm))
5806
5807 (define-public python-sexpdata
5808 (package
5809 (name "python-sexpdata")
5810 (version "0.0.3")
5811 (source
5812 (origin
5813 (method url-fetch)
5814 (uri (pypi-uri "sexpdata" version))
5815 (sha256
5816 (base32
5817 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
5818 (build-system python-build-system)
5819 (home-page "https://github.com/jd-boyd/sexpdata")
5820 (synopsis "S-expression parser for Python")
5821 (description
5822 "Sexpdata is an S-expression parser/serializer. It has load and dump
5823 functions like pickle, json or PyYAML module.")
5824 (license license:bsd-3)))
5825
5826 (define-public python-pathlib2
5827 (package
5828 (name "python-pathlib2")
5829 (version "2.3.3")
5830 (source
5831 (origin
5832 (method url-fetch)
5833 (uri (pypi-uri "pathlib2" version))
5834 (sha256
5835 (base32
5836 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5837 (build-system python-build-system)
5838 (propagated-inputs
5839 `(("python-scandir" ,python-scandir)
5840 ("python-six" ,python-six)))
5841 (home-page "https://pypi.org/project/pathlib2/")
5842 (synopsis "Object-oriented file system paths")
5843 (description "The goal of pathlib2 is to provide a backport of the
5844 standard @code{pathlib} module which tracks the standard library module, so
5845 all the newest features of the standard @code{pathlib} can be used also on
5846 older Python versions.")
5847 (license license:expat)))
5848
5849 (define-public python2-importlib-resources
5850 (package
5851 (name "python2-importlib-resources")
5852 (version "1.0.2")
5853 (source (origin
5854 (method url-fetch)
5855 (uri (pypi-uri "importlib_resources" version))
5856 (sha256
5857 (base32
5858 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5859 (build-system python-build-system)
5860 (arguments
5861 `(#:python ,python-2
5862 #:phases (modify-phases %standard-phases
5863 ;; The build system tests for python-wheel, but it is
5864 ;; not required for Guix nor the test suite. Just drop
5865 ;; it to make bootstrapping pytest easier.
5866 (add-after 'unpack 'drop-wheel-dependency
5867 (lambda _
5868 (substitute* "setup.cfg"
5869 (("^[[:blank:]]+wheel")
5870 ""))
5871 #t)))))
5872 (propagated-inputs
5873 `(("python-pathlib2" ,python2-pathlib2)
5874 ("python-typing" ,python2-typing)))
5875 (home-page "https://gitlab.com/python-devs/importlib_resources")
5876 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5877 (description
5878 "This package provides an implementation of @code{importlib.resources}
5879 for older versions of Python.")
5880 (license license:asl2.0)))
5881
5882 ;; For importlib-metadata-bootstrap below.
5883 (define-public python2-importlib-resources-bootstrap
5884 (hidden-package
5885 (package/inherit
5886 python2-importlib-resources
5887 (name "python2-importlib-resources-bootstrap")
5888 (propagated-inputs
5889 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
5890 ("python-typing" ,python2-typing))))))
5891
5892 (define-public python-importlib-metadata
5893 (package
5894 (name "python-importlib-metadata")
5895 (version "1.5.0")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (pypi-uri "importlib_metadata" version))
5900 (sha256
5901 (base32
5902 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
5903 (build-system python-build-system)
5904 (propagated-inputs
5905 `(("python-zipp" ,python-zipp)))
5906 (native-inputs
5907 `(("python-setuptools-scm" ,python-setuptools-scm)
5908 ("python-pyfakefs" ,python-pyfakefs)
5909 ("python-packaging" ,python-packaging)))
5910 (home-page "https://importlib-metadata.readthedocs.io/")
5911 (synopsis "Read metadata from Python packages")
5912 (description
5913 "@code{importlib_metadata} is a library which provides an API for
5914 accessing an installed Python package's metadata, such as its entry points or
5915 its top-level name. This functionality intends to replace most uses of
5916 @code{pkg_resources} entry point API and metadata API. Along with
5917 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5918 need to use the older and less efficient @code{pkg_resources} package.")
5919 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5920 (license license:asl2.0)))
5921
5922 (define-public python2-importlib-metadata
5923 (let ((base (package-with-python2 (strip-python2-variant
5924 python-importlib-metadata))))
5925 (package/inherit
5926 base
5927 (name "python2-importlib-metadata")
5928 (native-inputs
5929 `(("python-setuptools-scm" ,python2-setuptools-scm)
5930 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
5931 ("python-packaging" ,python2-packaging-bootstrap)))
5932 (propagated-inputs
5933 `(("python-configparser" ,python2-configparser)
5934 ("python-contextlib2" ,python2-contextlib2)
5935 ("python-importlib-resources" ,python2-importlib-resources)
5936 ("python-pathlib2" ,python2-pathlib2)
5937 ,@(package-propagated-inputs base))))))
5938
5939 ;; This package is used by python2-pytest, and thus must not depend on it.
5940 (define-public python2-importlib-metadata-bootstrap
5941 (hidden-package
5942 (package/inherit
5943 python2-importlib-metadata
5944 (name "python2-importlib-metadata-bootstrap")
5945 (arguments
5946 `(#:tests? #f
5947 ,@(package-arguments python2-importlib-metadata)))
5948 (propagated-inputs
5949 `(("python-zipp" ,python2-zipp-bootstrap)
5950 ("python-pathlib2" ,python2-pathlib2-bootstrap)
5951 ("python-configparser" ,python2-configparser)
5952 ("python-contextlib2" ,python2-contextlib2-bootstrap)
5953 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
5954
5955 (define-public python-importmagic
5956 (package
5957 (name "python-importmagic")
5958 (version "0.1.7")
5959 (source
5960 (origin
5961 (method url-fetch)
5962 (uri (pypi-uri "importmagic" version))
5963 (sha256
5964 (base32
5965 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
5966 (build-system python-build-system)
5967 (home-page "https://github.com/alecthomas/importmagic")
5968 (synopsis "Library for adding, removing and managing Python imports")
5969 (description
5970 "Importmagic is a Python library for automatically managing imports by
5971 finding unresolved symbols in Python code and their corresponding imports.")
5972 (license license:bsd-3)))
5973
5974 (define-public python-jaraco-packaging
5975 (package
5976 (name "python-jaraco-packaging")
5977 (version "6.1")
5978 (source
5979 (origin
5980 (method url-fetch)
5981 (uri (pypi-uri "jaraco.packaging" version))
5982 (sha256
5983 (base32
5984 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5985 (build-system python-build-system)
5986 (propagated-inputs
5987 `(("python-pytest" ,python-pytest)
5988 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5989 ("python-pytest-flake8" ,python-pytest-flake8)
5990 ("python-rst.linker" ,python-rst.linker)
5991 ("python-setuptools" ,python-setuptools)
5992 ("python-setuptools-scm" ,python-setuptools-scm)
5993 ("python-six" ,python-six)
5994 ("python-sphinx" ,python-sphinx)))
5995 (home-page "https://github.com/jaraco/jaraco.packaging")
5996 (synopsis "Tools to supplement packaging Python releases")
5997 (description
5998 "This package provides various tools to supplement packaging Python
5999 releases.")
6000 (license license:expat)))
6001
6002 (define-public python-pathpy
6003 (package
6004 (name "python-pathpy")
6005 (version "11.5.1")
6006 (source
6007 (origin
6008 (method url-fetch)
6009 (uri (pypi-uri "path.py" version))
6010 (sha256
6011 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6012 (outputs '("out" "doc"))
6013 (build-system python-build-system)
6014 (propagated-inputs
6015 `(("python-appdirs" ,python-appdirs)
6016 ("python-importlib-metadata" ,python-importlib-metadata)))
6017 (native-inputs
6018 `(("python-setuptools-scm" ,python-setuptools-scm)
6019 ("python-sphinx" ,python-sphinx)
6020 ("python-rst.linker" ,python-rst.linker)
6021 ("python-pytest" ,python-pytest)
6022 ("python-pytest-runner" ,python-pytest-runner)
6023 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6024 (arguments
6025 `(#:phases
6026 (modify-phases %standard-phases
6027 (add-after 'build 'build-doc
6028 (lambda _
6029 (setenv "LANG" "en_US.UTF-8")
6030 (invoke "python" "setup.py" "build_sphinx")))
6031 (add-after 'install 'install-doc
6032 (lambda* (#:key outputs #:allow-other-keys)
6033 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6034 (doc (string-append data "/doc/" ,name "-" ,version))
6035 (html (string-append doc "/html")))
6036 (mkdir-p html)
6037 (for-each (lambda (file)
6038 (copy-file file (string-append doc "/" file)))
6039 '("README.rst" "CHANGES.rst"))
6040 (copy-recursively "build/sphinx/html" html)
6041 #t)))
6042 (replace 'check
6043 (lambda _
6044 ;; The import time test aborts if an import takes longer than
6045 ;; 100ms. It may very well take a little longer than that.
6046 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6047 (home-page "https://github.com/jaraco/path.py")
6048 (synopsis "Python module wrapper for built-in os.path")
6049 (description
6050 "@code{path.py} implements path objects as first-class entities, allowing
6051 common operations on files to be invoked on those path objects directly.")
6052 (license license:expat)))
6053
6054 (define-public python2-pathpy
6055 (package-with-python2 python-pathpy))
6056
6057 (define-public python-simplegeneric
6058 (package
6059 (name "python-simplegeneric")
6060 (version "0.8.1")
6061 (source
6062 (origin
6063 (method url-fetch)
6064 (uri (pypi-uri "simplegeneric" version ".zip"))
6065 (sha256
6066 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6067 (build-system python-build-system)
6068 (native-inputs
6069 `(("unzip" ,unzip)))
6070 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6071 (synopsis "Python module for simple generic functions")
6072 (description
6073 "The simplegeneric module lets you define simple single-dispatch generic
6074 functions, akin to Python’s built-in generic functions like @code{len()},
6075 @code{iter()} and so on. However, instead of using specially-named methods,
6076 these generic functions use simple lookup tables, akin to those used by
6077 e.g. @code{pickle.dump()} and other generic functions found in the Python
6078 standard library.")
6079 (license license:zpl2.1)))
6080
6081 (define-public python2-simplegeneric
6082 (package-with-python2 python-simplegeneric))
6083
6084 (define-public python-ipython-genutils
6085 ;; TODO: This package is retired, check if can be removed, see description.
6086 (package
6087 (name "python-ipython-genutils")
6088 (version "0.1.0")
6089 (source
6090 (origin
6091 (method url-fetch)
6092 (uri (pypi-uri "ipython_genutils" version))
6093 (sha256
6094 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6095 (build-system python-build-system)
6096 (arguments `(#:tests? #f)) ; no tests
6097 (home-page "https://ipython.org")
6098 (synopsis "Vestigial utilities from IPython")
6099 (description
6100 "This package provides retired utilities from IPython. No packages
6101 outside IPython/Jupyter should depend on it.
6102
6103 This package shouldn't exist. It contains some common utilities shared by
6104 Jupyter and IPython projects during The Big Split. As soon as possible, those
6105 packages will remove their dependency on this, and this package will go
6106 away.")
6107 (license license:bsd-3)))
6108
6109 (define-public python2-ipython-genutils
6110 (package-with-python2 python-ipython-genutils))
6111
6112 (define-public python-ipyparallel
6113 (package
6114 (name "python-ipyparallel")
6115 (version "6.2.4")
6116 (source
6117 (origin
6118 (method url-fetch)
6119 (uri (pypi-uri "ipyparallel" version))
6120 (sha256
6121 (base32
6122 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6123 (build-system python-build-system)
6124 (arguments
6125 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6126 #:phases
6127 (modify-phases %standard-phases
6128 (add-before 'check 'prepare-for-tests
6129 (lambda _
6130 (setenv "HOME" (getcwd))
6131 #t)))))
6132 (propagated-inputs
6133 `(("python-dateutil" ,python-dateutil)
6134 ("python-decorator" ,python-decorator)
6135 ("python-ipykernel" ,python-ipykernel)
6136 ("python-ipython" ,python-ipython)
6137 ("python-ipython-genutils" ,python-ipython-genutils)
6138 ("python-jupyter-client" ,python-jupyter-client)
6139 ("python-pyzmq" ,python-pyzmq)
6140 ("python-tornado" ,python-tornado)
6141 ("python-traitlets" ,python-traitlets)))
6142 (native-inputs
6143 `(("python-ipython" ,python-ipython)
6144 ("python-mock" ,python-mock)
6145 ("python-nose" ,python-nose)
6146 ("python-pytest" ,python-pytest)
6147 ("python-pytest-cov" ,python-pytest-cov)
6148 ("python-testpath" ,python-testpath)))
6149 (home-page "https://ipython.org/")
6150 (synopsis "Interactive Parallel Computing with IPython")
6151 (description
6152 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6153 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6154 CLI scripts:
6155 @enumerate
6156 @item ipcluster - start/stop a cluster
6157 @item ipcontroller - start a scheduler
6158 @item ipengine - start an engine
6159 @end enumerate")
6160 (license license:bsd-3)))
6161
6162 (define-public python2-ipyparallel
6163 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6164 (package
6165 (inherit ipyparallel)
6166 (propagated-inputs
6167 `(("python2-futures" ,python2-futures)
6168 ,@(package-propagated-inputs ipyparallel))))))
6169
6170 (define-public python-ipython-cluster-helper
6171 (package
6172 (name "python-ipython-cluster-helper")
6173 (version "0.6.4")
6174 (source
6175 (origin
6176 (method url-fetch)
6177 (uri (pypi-uri "ipython-cluster-helper" version))
6178 (sha256
6179 (base32
6180 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6181 (modules '((guix build utils)))
6182 (snippet
6183 '(begin (substitute* "requirements.txt"
6184 (("ipython.*") "ipython\n"))
6185 #t))))
6186 (build-system python-build-system)
6187 (arguments
6188 `(#:tests? #f ; Test suite can't find IPython.
6189 #:phases
6190 (modify-phases %standard-phases
6191 (replace 'check
6192 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6193 (if tests?
6194 (begin
6195 (setenv "HOME" (getcwd))
6196 (add-installed-pythonpath inputs outputs)
6197 (invoke "python" "example/example.py" "--local"))
6198 #t))))))
6199 (propagated-inputs
6200 `(("python-ipyparallel" ,python-ipyparallel)
6201 ("python-ipython" ,python-ipython)
6202 ("python-netifaces" ,python-netifaces)
6203 ("python-pyzmq" ,python-pyzmq)
6204 ("python-setuptools" ,python-setuptools)
6205 ("python-six" ,python-six)))
6206 (home-page "https://github.com/roryk/ipython-cluster-helper")
6207 (synopsis
6208 "Simplify IPython cluster start up and use for multiple schedulers")
6209 (description
6210 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6211 profile, launches a cluster and returns a view. On program exit it shuts the
6212 cluster down and deletes the throwaway profile.")
6213 (license license:expat)))
6214
6215 (define-public python2-ipython-cluster-helper
6216 (package-with-python2 python-ipython-cluster-helper))
6217
6218 (define-public python-traitlets
6219 (package
6220 (name "python-traitlets")
6221 (version "4.3.3")
6222 (source
6223 (origin
6224 (method url-fetch)
6225 (uri (pypi-uri "traitlets" version))
6226 (sha256
6227 (base32
6228 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6229 (build-system python-build-system)
6230 (arguments
6231 `(#:phases
6232 (modify-phases %standard-phases
6233 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6234 (propagated-inputs
6235 `(("python-ipython-genutils" ,python-ipython-genutils)
6236 ("python-decorator" ,python-decorator)))
6237 (native-inputs
6238 `(("python-pytest" ,python-pytest)))
6239 (properties `((python2-variant . ,(delay python2-traitlets))))
6240 (home-page "https://ipython.org")
6241 (synopsis "Configuration system for Python applications")
6242 (description
6243 "Traitlets is a framework that lets Python classes have attributes with
6244 type checking, dynamically calculated default values, and ‘on change’
6245 callbacks. The package also includes a mechanism to use traitlets for
6246 configuration, loading values from files or from command line arguments. This
6247 is a distinct layer on top of traitlets, so you can use traitlets in your code
6248 without using the configuration machinery.")
6249 (license license:bsd-3)))
6250
6251 (define-public python2-traitlets
6252 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6253 (package
6254 (inherit traitlets)
6255 (propagated-inputs
6256 `(("python2-enum34" ,python2-enum34)
6257 ,@(package-propagated-inputs traitlets))))))
6258
6259 (define-public python-jupyter-core
6260 (package
6261 (name "python-jupyter-core")
6262 (version "4.4.0")
6263 (source
6264 (origin
6265 (method url-fetch)
6266 (uri (string-append (pypi-uri "jupyter_core" version)))
6267 (sha256
6268 (base32
6269 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6270 (build-system python-build-system)
6271 ;; FIXME: not sure how to run the tests
6272 (arguments `(#:tests? #f))
6273 (propagated-inputs
6274 `(("python-traitlets" ,python-traitlets)))
6275 (home-page "http://jupyter.org/")
6276 (synopsis "Jupyter base package")
6277 (description
6278 "Jupyter core is the base package on which Jupyter projects rely.")
6279 (license license:bsd-3)))
6280
6281 (define-public python2-jupyter-core
6282 (package-with-python2 python-jupyter-core))
6283
6284 (define-public python-jupyter-client
6285 (package
6286 (name "python-jupyter-client")
6287 (version "5.2.4")
6288 (source
6289 (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "jupyter_client" version))
6292 (sha256
6293 (base32
6294 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6295 (build-system python-build-system)
6296 ;; Tests fail because of missing native python kernel which I assume is
6297 ;; provided by the ipython package, which we cannot use because it would
6298 ;; cause a dependency cycle.
6299 (arguments
6300 `(#:tests? #f
6301
6302 #:phases (modify-phases %standard-phases
6303 (add-after 'unpack 'set-tool-file-names
6304 (lambda* (#:key inputs #:allow-other-keys)
6305 (let ((iproute (assoc-ref inputs "iproute")))
6306 (substitute* "jupyter_client/localinterfaces.py"
6307 (("'ip'")
6308 (string-append "'" iproute "/sbin/ip'")))
6309 #t))))))
6310 (inputs
6311 `(("iproute" ,iproute)))
6312 (propagated-inputs
6313 `(("python-pyzmq" ,python-pyzmq)
6314 ("python-traitlets" ,python-traitlets)
6315 ("python-jupyter-core" ,python-jupyter-core)))
6316 (home-page "http://jupyter.org/")
6317 (synopsis "Jupyter protocol implementation and client libraries")
6318 (description
6319 "The @code{jupyter_client} package contains the reference implementation
6320 of the Jupyter protocol. It also provides client and kernel management APIs
6321 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6322 installing @code{kernelspec}s for use with Jupyter frontends.")
6323 (license license:bsd-3)))
6324
6325 (define-public python2-jupyter-client
6326 (package-with-python2 python-jupyter-client))
6327
6328 (define-public python-ipykernel
6329 (package
6330 (name "python-ipykernel")
6331 (version "5.1.3")
6332 (source
6333 (origin
6334 (method url-fetch)
6335 (uri (pypi-uri "ipykernel" version))
6336 (sha256
6337 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6338 (build-system python-build-system)
6339 (arguments
6340 `(#:phases
6341 (modify-phases %standard-phases
6342 (replace 'check
6343 (lambda _
6344 (setenv "HOME" "/tmp")
6345 (invoke "pytest" "-v")
6346 #t))
6347 (add-after 'install 'set-python-file-name
6348 (lambda* (#:key outputs #:allow-other-keys)
6349 ;; Record the absolute file name of the 'python' executable in
6350 ;; 'kernel.json'.
6351 (let ((out (assoc-ref outputs "out")))
6352 (substitute* (string-append out "/share/jupyter"
6353 "/kernels/python3/kernel.json")
6354 (("\"python\"")
6355 (string-append "\"" (which "python") "\"")))
6356 #t))))))
6357 (propagated-inputs
6358 `(("python-ipython" ,python-ipython)
6359 ;; imported at runtime during connect
6360 ("python-jupyter-client" ,python-jupyter-client)))
6361 (native-inputs
6362 `(("python-flaky" ,python-flaky)
6363 ("python-nose" ,python-nose)
6364 ("python-pytest" ,python-pytest)))
6365 (home-page "https://ipython.org")
6366 (synopsis "IPython Kernel for Jupyter")
6367 (description
6368 "This package provides the IPython kernel for Jupyter.")
6369 (properties `((python2-variant . ,(delay python2-ipykernel))))
6370 (license license:bsd-3)))
6371
6372 ;; Version 5.x and above no longer support Python 2.
6373 (define-public python2-ipykernel
6374 (package
6375 (name "python2-ipykernel")
6376 (version "4.10.1")
6377 (source
6378 (origin
6379 (method url-fetch)
6380 (uri (pypi-uri "ipykernel" version))
6381 (sha256
6382 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6383 (build-system python-build-system)
6384 (arguments
6385 `(#:python ,python-2))
6386 (propagated-inputs
6387 `(("python2-ipython" ,python2-ipython)
6388 ;; imported at runtime during connect
6389 ("python2-jupyter-client" ,python2-jupyter-client)
6390 ("python2-tornado" ,python2-tornado)
6391 ("python2-traitlets" ,python2-traitlets)))
6392 (native-inputs
6393 `(("python2-mock" ,python2-mock)
6394 ("python2-nose" ,python2-nose)
6395 ("python2-pytest" ,python2-pytest)
6396 ("python2-pytest-cov" ,python2-pytest-cov)))
6397 (home-page "https://ipython.org")
6398 (synopsis "IPython Kernel for Jupyter")
6399 (description
6400 "This package provides the IPython kernel for Jupyter.")
6401 (license license:bsd-3)))
6402
6403 (define-public python-pari-jupyter
6404 (package
6405 (name "python-pari-jupyter")
6406 (version "1.3.2")
6407 (source
6408 (origin
6409 (method url-fetch)
6410 (uri (pypi-uri "pari_jupyter" version))
6411 (sha256
6412 (base32
6413 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6414 (build-system python-build-system)
6415 (propagated-inputs
6416 `(("python-ipykernel" ,python-ipykernel)))
6417 (inputs
6418 `(("pari-gp" ,pari-gp)
6419 ("readline" ,readline)))
6420 (arguments
6421 `(#:tests? #f)) ; no test suite
6422 (home-page
6423 "https://github.com/jdemeyer/pari_jupyter")
6424 (synopsis "A Jupyter kernel for PARI/GP")
6425 (description "The package provides a PARI/GP kernel for Jupyter.")
6426 (license license:gpl3+)))
6427
6428 (define-public python-backcall
6429 (package
6430 (name "python-backcall")
6431 (version "0.1.0")
6432 (source
6433 (origin
6434 (method url-fetch)
6435 (uri (pypi-uri "backcall" version))
6436 (sha256
6437 (base32
6438 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
6439 (build-system python-build-system)
6440 (home-page "https://github.com/takluyver/backcall/")
6441 (synopsis "Specifications for callback functions passed in to an API")
6442 (description
6443 "If your code lets other people supply callback functions, it's important
6444 to specify the function signature you expect, and check that functions support
6445 that. Adding extra parameters later would break other peoples code unless
6446 you're careful. The @code{backcall} package provides a way of specifying the
6447 callback signature using a prototype function.")
6448 (license license:bsd-3)))
6449
6450 (define-public python-ipython
6451 (package
6452 (name "python-ipython")
6453 (version "7.9.0")
6454 (source
6455 (origin
6456 (method url-fetch)
6457 (uri (pypi-uri "ipython" version ".tar.gz"))
6458 (sha256
6459 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
6460 (build-system python-build-system)
6461 (propagated-inputs
6462 `(("python-backcall" ,python-backcall)
6463 ("python-pyzmq" ,python-pyzmq)
6464 ("python-prompt-toolkit" ,python-prompt-toolkit)
6465 ("python-terminado" ,python-terminado)
6466 ("python-matplotlib" ,python-matplotlib)
6467 ("python-numpy" ,python-numpy)
6468 ("python-numpydoc" ,python-numpydoc)
6469 ("python-jedi" ,python-jedi)
6470 ("python-jinja2" ,python-jinja2)
6471 ("python-mistune" ,python-mistune)
6472 ("python-pexpect" ,python-pexpect)
6473 ("python-pickleshare" ,python-pickleshare)
6474 ("python-simplegeneric" ,python-simplegeneric)
6475 ("python-jsonschema" ,python-jsonschema)
6476 ("python-traitlets" ,python-traitlets)
6477 ("python-nbformat" ,python-nbformat)
6478 ("python-pygments" ,python-pygments)))
6479 (inputs
6480 `(("readline" ,readline)
6481 ("which" ,which)))
6482 (native-inputs
6483 `(("graphviz" ,graphviz)
6484 ("pkg-config" ,pkg-config)
6485 ("python-requests" ,python-requests) ;; for tests
6486 ("python-testpath" ,python-testpath)
6487 ("python-nose" ,python-nose)))
6488 (arguments
6489 `(#:phases
6490 (modify-phases %standard-phases
6491 (add-after 'unpack 'make-docs-reproducible
6492 (lambda _
6493 (substitute* "IPython/sphinxext/ipython_directive.py"
6494 ((".*import datetime") "")
6495 ((".*datetime.datetime.now\\(\\)") "")
6496 (("%timeit") "# %timeit"))
6497 #t))
6498 ;; Tests can only be run after the library has been installed and not
6499 ;; within the source directory.
6500 (delete 'check)
6501 (add-after 'install 'check
6502 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6503 (if tests?
6504 (begin
6505 ;; Make installed package available for running the tests
6506 (add-installed-pythonpath inputs outputs)
6507 (setenv "HOME" "/tmp/") ;; required by a test
6508 ;; We only test the core because one of the other tests
6509 ;; tries to import ipykernel.
6510 (invoke "python" "IPython/testing/iptest.py"
6511 "-v" "IPython/core/tests"))
6512 #t)))
6513 (add-before 'check 'fix-tests
6514 (lambda* (#:key inputs #:allow-other-keys)
6515 (substitute* "./IPython/utils/_process_posix.py"
6516 (("/usr/bin/env', 'which") (which "which")))
6517 (substitute* "./IPython/core/tests/test_inputtransformer.py"
6518 (("#!/usr/bin/env python")
6519 (string-append "#!" (which "python"))))
6520 ;; This test introduces a circular dependency on ipykernel
6521 ;; (which depends on ipython).
6522 (delete-file "IPython/core/tests/test_display.py")
6523 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
6524 (delete-file "IPython/core/tests/test_interactiveshell.py")
6525 #t)))))
6526 (home-page "https://ipython.org")
6527 (synopsis "IPython is a tool for interactive computing in Python")
6528 (description
6529 "IPython provides a rich architecture for interactive computing with:
6530 Powerful interactive shells, a browser-based notebook, support for interactive
6531 data visualization, embeddable interpreters and tools for parallel
6532 computing.")
6533 (properties `((python2-variant . ,(delay python2-ipython))))
6534 (license license:bsd-3)))
6535
6536 ;; This is the latest release of the LTS version of ipython with support for
6537 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
6538 ;; dropped support for Python 2.7.
6539 (define-public python2-ipython
6540 (package
6541 (name "python2-ipython")
6542 (version "5.8.0")
6543 (source
6544 (origin
6545 (method url-fetch)
6546 (uri (pypi-uri "ipython" version ".tar.gz"))
6547 (sha256
6548 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
6549 (build-system python-build-system)
6550 (propagated-inputs
6551 `(("python2-backports-shutil-get-terminal-size"
6552 ,python2-backports-shutil-get-terminal-size)
6553 ("python2-pathlib2" ,python2-pathlib2)
6554 ("python2-pyzmq" ,python2-pyzmq)
6555 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
6556 ("python2-terminado" ,python2-terminado)
6557 ("python2-matplotlib" ,python2-matplotlib)
6558 ("python2-numpy" ,python2-numpy)
6559 ("python2-numpydoc" ,python2-numpydoc)
6560 ("python2-jinja2" ,python2-jinja2)
6561 ("python2-mistune" ,python2-mistune)
6562 ("python2-pexpect" ,python2-pexpect)
6563 ("python2-pickleshare" ,python2-pickleshare)
6564 ("python2-simplegeneric" ,python2-simplegeneric)
6565 ("python2-jsonschema" ,python2-jsonschema)
6566 ("python2-traitlets" ,python2-traitlets)
6567 ("python2-nbformat" ,python2-nbformat)
6568 ("python2-pygments" ,python2-pygments)))
6569 (inputs
6570 `(("readline" ,readline)
6571 ("which" ,which)))
6572 (native-inputs
6573 `(("graphviz" ,graphviz)
6574 ("pkg-config" ,pkg-config)
6575 ("python2-requests" ,python2-requests) ;; for tests
6576 ("python2-testpath" ,python2-testpath)
6577 ("python2-mock" ,python2-mock)
6578 ("python2-nose" ,python2-nose)))
6579 (arguments
6580 `(#:python ,python-2
6581 #:phases
6582 (modify-phases %standard-phases
6583 (add-before 'check 'delete-broken-tests
6584 (lambda* (#:key inputs #:allow-other-keys)
6585 ;; These tests throw errors for unknown reasons.
6586 (delete-file "IPython/core/tests/test_displayhook.py")
6587 (delete-file "IPython/core/tests/test_magic_terminal.py")
6588 (delete-file "IPython/core/tests/test_profile.py")
6589 #t)))))
6590 (home-page "https://ipython.org")
6591 (synopsis "IPython is a tool for interactive computing in Python")
6592 (description
6593 "IPython provides a rich architecture for interactive computing with:
6594 Powerful interactive shells, a browser-based notebook, support for interactive
6595 data visualization, embeddable interpreters and tools for parallel
6596 computing.")
6597 (license license:bsd-3)))
6598
6599 (define-public python-ipython-documentation
6600 (package
6601 (inherit python-ipython)
6602 (name "python-ipython-documentation")
6603 (version (package-version python-ipython))
6604 (arguments
6605 `(#:phases
6606 (modify-phases %standard-phases
6607 (delete 'build)
6608 (delete 'check)
6609 (replace 'install
6610 (lambda* (#:key outputs #:allow-other-keys)
6611 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6612 (doc (string-append data "/doc/" ,name "-" ,version))
6613 (html (string-append doc "/html"))
6614 (man1 (string-append data "/man/man1"))
6615 (info (string-append data "/info"))
6616 (examples (string-append doc "/examples"))
6617 (python-arg (string-append "PYTHON=" (which "python"))))
6618 (setenv "LANG" "en_US.utf8")
6619 (with-directory-excursion "docs"
6620 ;; FIXME: pdf fails to build
6621 ;;(system* "make" "pdf" "PAPER=a4")
6622 (system* "make" python-arg "html")
6623 ;; FIXME: the generated texi file contains ^@^@, which trips
6624 ;; up the parser.
6625 ;; (system* "make" python-arg "info")
6626 )
6627 (copy-recursively "docs/man" man1)
6628 (copy-recursively "examples" examples)
6629 (copy-recursively "docs/build/html" html)
6630 ;; (copy-file "docs/build/latex/ipython.pdf"
6631 ;; (string-append doc "/ipython.pdf"))
6632 (mkdir-p info)
6633 ;; (copy-file "docs/build/texinfo/ipython.info"
6634 ;; (string-append info "/ipython.info"))
6635 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6636 #t)))))
6637 (inputs
6638 `(("python-ipython" ,python-ipython)
6639 ("python-ipykernel" ,python-ipykernel)))
6640 (native-inputs
6641 `(("python-sphinx" ,python-sphinx)
6642 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6643 ;; FIXME: It's possible that a smaller union would work just as well.
6644 ("texlive" ,(texlive-union (list texlive-amsfonts
6645 texlive-fonts-ec
6646 texlive-generic-ifxetex
6647 texlive-generic-pdftex
6648 texlive-latex-capt-of
6649 texlive-latex-cmap
6650 texlive-latex-environ
6651 texlive-latex-eqparbox
6652 texlive-latex-etoolbox
6653 texlive-latex-expdlist
6654 texlive-latex-fancyhdr
6655 texlive-latex-fancyvrb
6656 texlive-latex-fncychap
6657 texlive-latex-float
6658 texlive-latex-framed
6659 texlive-latex-geometry
6660 texlive-latex-graphics
6661 texlive-latex-hyperref
6662 texlive-latex-mdwtools
6663 texlive-latex-multirow
6664 texlive-latex-needspace
6665 texlive-latex-oberdiek
6666 texlive-latex-parskip
6667 texlive-latex-preview
6668 texlive-latex-tabulary
6669 texlive-latex-threeparttable
6670 texlive-latex-titlesec
6671 texlive-latex-trimspaces
6672 texlive-latex-ucs
6673 texlive-latex-upquote
6674 texlive-latex-url
6675 texlive-latex-varwidth
6676 texlive-latex-wrapfig)))
6677 ("texinfo" ,texinfo)))))
6678
6679 (define-public python-urwid
6680 (package
6681 (name "python-urwid")
6682 (version "2.1.0")
6683 (source
6684 (origin
6685 (method url-fetch)
6686 (uri (pypi-uri "urwid" version))
6687 (sha256
6688 (base32
6689 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
6690 (build-system python-build-system)
6691 (home-page "http://urwid.org")
6692 (synopsis "Console user interface library for Python")
6693 (description
6694 "Urwid is a curses-based UI/widget library for Python. It includes many
6695 features useful for text console applications.")
6696 (license license:lgpl2.1+)))
6697
6698 (define-public python2-urwid
6699 (package-with-python2 python-urwid))
6700
6701 (define-public python-urwidtrees
6702 (package
6703 (name "python-urwidtrees")
6704 (version "1.0.2")
6705 (source
6706 (origin
6707 (method git-fetch)
6708 ;; package author intends on distributing via github rather than pypi:
6709 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6710 (uri (git-reference
6711 (url "https://github.com/pazz/urwidtrees")
6712 (commit version)))
6713 (file-name (git-file-name name version))
6714 (sha256
6715 (base32
6716 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
6717 (build-system python-build-system)
6718 (arguments
6719 '(#:use-setuptools? #f
6720 #:tests? #f)) ; no tests
6721 (propagated-inputs `(("python-urwid" ,python-urwid)))
6722 (home-page "https://github.com/pazz/urwidtrees")
6723 (synopsis "Tree widgets for urwid")
6724 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6725 toolkit. Use it to build trees of widgets.")
6726 (license license:gpl3+)))
6727
6728 (define-public python2-urwidtrees
6729 (package-with-python2 python-urwidtrees))
6730
6731 (define-public python-ua-parser
6732 (package
6733 (name "python-ua-parser")
6734 (version "0.8.0")
6735 (source
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "ua-parser" version))
6739 (sha256
6740 (base32
6741 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
6742 (build-system python-build-system)
6743 (arguments
6744 `(#:tests? #f)) ;no test suite in release
6745 (native-inputs
6746 `(("python-pyyaml" ,python-pyyaml)))
6747 (home-page "https://github.com/ua-parser/uap-python")
6748 (synopsis "User agent parser")
6749 (description
6750 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
6751 (license license:asl2.0)))
6752
6753 (define-public python2-ua-parser
6754 (package-with-python2 python-ua-parser))
6755
6756 (define-public python-user-agents
6757 (package
6758 (name "python-user-agents")
6759 (version "1.1.0")
6760 (source
6761 (origin
6762 (method url-fetch)
6763 (uri (pypi-uri "user-agents" version))
6764 (sha256
6765 (base32
6766 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
6767 (build-system python-build-system)
6768 (arguments
6769 `(#:tests? #f)) ;missing devices.json test file in release
6770 (propagated-inputs
6771 `(("python-ua-parser" ,python-ua-parser)))
6772 (home-page "https://github.com/selwin/python-user-agents")
6773 (synopsis "User Agent strings parsing library")
6774 (description
6775 "A library to identify devices (phones, tablets) and their capabilities by
6776 parsing (browser/HTTP) user agent strings.")
6777 (license license:expat)))
6778
6779 (define-public python2-user-agents
6780 (package-with-python2 python-user-agents))
6781
6782 (define-public python-dbus
6783 (package
6784 (name "python-dbus")
6785 (version "1.2.14")
6786 (source
6787 (origin
6788 (method url-fetch)
6789 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
6790 "dbus-python-" version ".tar.gz"))
6791 (sha256
6792 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
6793 (build-system gnu-build-system)
6794 (native-inputs
6795 `(("pkg-config" ,pkg-config)))
6796 (inputs
6797 `(("python" ,python-wrapper)
6798 ("dbus-glib" ,dbus-glib)))
6799 (synopsis "Python bindings for D-bus")
6800 (description "python-dbus provides bindings for libdbus, the reference
6801 implementation of D-Bus.")
6802 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
6803 (license license:expat)))
6804
6805 (define-public python2-dbus
6806 (package (inherit python-dbus)
6807 (name "python2-dbus")
6808 (inputs `(("python" ,python-2)
6809 ,@(alist-delete "python"
6810 (package-inputs python-dbus)
6811 equal?)))))
6812
6813 (define-public python-notify2
6814 (package
6815 (name "python-notify2")
6816 (version "0.3.1")
6817 (source
6818 (origin
6819 (method url-fetch)
6820 (uri (pypi-uri "notify2" version))
6821 (sha256
6822 (base32
6823 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
6824 (build-system python-build-system)
6825 (arguments `(#:tests? #f)) ; tests depend on system state
6826 (native-inputs
6827 `(("python-dbus" ,python-dbus)))
6828 (home-page "https://bitbucket.org/takluyver/pynotify2")
6829 (synopsis "Python interface to D-Bus notifications")
6830 (description
6831 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6832 It is a reimplementation of pynotify in pure Python, and an alternative to
6833 the GObject Introspection bindings to libnotify for non-GTK applications.")
6834 (license (list license:bsd-2
6835 license:lgpl2.1+))))
6836
6837 (define-public python2-notify2
6838 (package-with-python2 python-notify2))
6839
6840 ;; beautifulsoup4 has a totally different namespace than 3.x,
6841 ;; and pypi seems to put it under its own name, so I guess we should too
6842 (define-public python-beautifulsoup4
6843 (package
6844 (name "python-beautifulsoup4")
6845 (version "4.7.1")
6846 (source
6847 (origin
6848 (method url-fetch)
6849 (uri (pypi-uri "beautifulsoup4" version))
6850 (sha256
6851 (base32
6852 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
6853 (build-system python-build-system)
6854 (arguments
6855 `(#:phases
6856 (modify-phases %standard-phases
6857 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6858 ;; must use this conversion script when building with Python 3. The
6859 ;; conversion script also runs the tests.
6860 ;; For more information, see the file 'convert-py3k' in the source
6861 ;; distribution.
6862 (replace 'check
6863 (lambda _ (invoke "./convert-py3k"))))))
6864 (propagated-inputs
6865 `(("python-soupsieve" ,python-soupsieve)))
6866 (home-page
6867 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6868 (synopsis
6869 "Python screen-scraping library")
6870 (description
6871 "Beautiful Soup is a Python library designed for rapidly setting up
6872 screen-scraping projects. It offers Pythonic idioms for navigating,
6873 searching, and modifying a parse tree, providing a toolkit for
6874 dissecting a document and extracting what you need. It automatically
6875 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6876 (license license:expat)
6877 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6878
6879 (define-public python2-beautifulsoup4
6880 (package
6881 (inherit (package-with-python2
6882 (strip-python2-variant python-beautifulsoup4)))
6883 (arguments `(#:python ,python-2))))
6884
6885 (define-public python-soupsieve
6886 (package
6887 (name "python-soupsieve")
6888 (version "1.9.5")
6889 (source
6890 (origin
6891 (method url-fetch)
6892 (uri (pypi-uri "soupsieve" version))
6893 (sha256
6894 (base32
6895 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
6896 (build-system python-build-system)
6897 (arguments `(#:tests? #f))
6898 ;;XXX: 2 tests fail currently despite claming they were to be
6899 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6900 ;;don't want to create a circular dependency.
6901 (home-page "https://github.com/facelessuser/soupsieve")
6902 (synopsis "CSS selector library")
6903 (description
6904 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6905 Soup 4. It aims to provide selecting, matching, and filtering using modern
6906 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6907 specifications up through the latest CSS level 4 drafts and beyond (though
6908 some are not yet implemented).")
6909 (properties `((python2-variant . ,(delay python2-soupsieve))))
6910 (license license:expat)))
6911
6912 (define-public python2-soupsieve
6913 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6914 (package
6915 (inherit base)
6916 (propagated-inputs
6917 `(("python2-backports-functools-lru-cache"
6918 ,python2-backports-functools-lru-cache)
6919 ,@(package-propagated-inputs base))))))
6920
6921 (define-public python-netifaces
6922 (package
6923 (name "python-netifaces")
6924 (version "0.10.7")
6925 (source
6926 (origin
6927 (method url-fetch)
6928 (uri (pypi-uri "netifaces" version))
6929 (sha256
6930 (base32
6931 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6932 (build-system python-build-system)
6933 (home-page "https://github.com/al45tair/netifaces")
6934 (synopsis
6935 "Python module for portable network interface information")
6936 (description
6937 "Netifaces is a Python module providing information on network
6938 interfaces in an easy and portable manner.")
6939 (license license:expat)))
6940
6941 (define-public python2-netifaces
6942 (package-with-python2 python-netifaces))
6943
6944 (define-public python-networkx
6945 (package
6946 (name "python-networkx")
6947 (version "2.4")
6948 (source
6949 (origin
6950 (method url-fetch)
6951 (uri (pypi-uri "networkx" version))
6952 (sha256
6953 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
6954 (build-system python-build-system)
6955 (arguments
6956 '(#:phases (modify-phases %standard-phases
6957 (replace 'check
6958 (lambda* (#:key tests? #:allow-other-keys)
6959 (if tests?
6960 (invoke "pytest" "-vv" "--pyargs" "networkx")
6961 (format #t "test suite not run~%"))
6962 #t)))))
6963 ;; python-decorator is needed at runtime.
6964 (propagated-inputs
6965 `(("python-decorator" ,python-decorator)))
6966 (native-inputs
6967 `(("python-pytest" ,python-pytest)))
6968 (home-page "https://networkx.github.io/")
6969 (synopsis "Python module for creating and manipulating graphs and networks")
6970 (description
6971 "NetworkX is a Python package for the creation, manipulation, and study
6972 of the structure, dynamics, and functions of complex networks.")
6973 (properties `((python2-variant . ,(delay python2-networkx))))
6974 (license license:bsd-3)))
6975
6976 ;; NetworkX 2.2 is the last version with support for Python 2.
6977 (define-public python2-networkx
6978 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
6979 (package
6980 (inherit base)
6981 (version "2.2")
6982 (source (origin
6983 (method url-fetch)
6984 (uri (pypi-uri "networkx" version ".zip"))
6985 (sha256
6986 (base32
6987 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6988 (arguments
6989 `(#:python ,python-2))
6990 (native-inputs
6991 `(("python-nose" ,python2-nose)
6992 ("unzip" ,unzip))))))
6993
6994 (define-public python-datrie
6995 (package
6996 (name "python-datrie")
6997 (version "0.8.2")
6998 (source
6999 (origin
7000 (method url-fetch)
7001 (uri (pypi-uri "datrie" version))
7002 (sha256
7003 (base32
7004 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7005 (build-system python-build-system)
7006 (native-inputs
7007 `(("python-cython" ,python-cython)
7008 ("python-hypothesis" ,python-hypothesis)
7009 ("python-pytest" ,python-pytest)
7010 ("python-pytest-runner" ,python-pytest-runner)))
7011 (home-page "https://github.com/kmike/datrie")
7012 (synopsis "Fast, efficiently stored trie for Python")
7013 (description
7014 "This package provides a fast, efficiently stored trie implementation for
7015 Python.")
7016 (license license:lgpl2.1+)))
7017
7018 (define-public snakemake
7019 (package
7020 (name "snakemake")
7021 (version "5.7.1")
7022 (source
7023 (origin
7024 (method url-fetch)
7025 (uri (pypi-uri "snakemake" version))
7026 (sha256
7027 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7028 (build-system python-build-system)
7029 (arguments
7030 ;; TODO: Package missing test dependencies.
7031 '(#:tests? #f
7032 #:phases
7033 (modify-phases %standard-phases
7034 ;; For cluster execution Snakemake will call Python. Since there is
7035 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7036 ;; this by calling the snakemake wrapper instead.
7037 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7038 (lambda* (#:key outputs #:allow-other-keys)
7039 (substitute* "snakemake/executors.py"
7040 (("\\{sys.executable\\} -m snakemake")
7041 (string-append (assoc-ref outputs "out")
7042 "/bin/snakemake")))
7043 #t)))))
7044 (propagated-inputs
7045 `(("python-appdirs" ,python-appdirs)
7046 ("python-configargparse" ,python-configargparse)
7047 ("python-datrie" ,python-datrie)
7048 ("python-docutils" ,python-docutils)
7049 ("python-gitpython" ,python-gitpython)
7050 ("python-jinja2" ,python-jinja2)
7051 ("python-jsonschema" ,python-jsonschema)
7052 ("python-networkx" ,python-networkx)
7053 ("python-psutil" ,python-psutil)
7054 ("python-pyyaml" ,python-pyyaml)
7055 ("python-ratelimiter" ,python-ratelimiter)
7056 ("python-requests" ,python-requests)
7057 ("python-wrapt" ,python-wrapt)))
7058 (home-page "https://snakemake.readthedocs.io")
7059 (synopsis "Python-based execution environment for make-like workflows")
7060 (description
7061 "Snakemake aims to reduce the complexity of creating workflows by
7062 providing a clean and modern domain specific specification language (DSL) in
7063 Python style, together with a fast and comfortable execution environment.")
7064 (license license:expat)))
7065
7066 (define-public python-pyqrcode
7067 (package
7068 (name "python-pyqrcode")
7069 (version "1.2.1")
7070 (source
7071 (origin
7072 (method url-fetch)
7073 (uri (pypi-uri "PyQRCode" version))
7074 (sha256
7075 (base32
7076 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7077 (build-system python-build-system)
7078 (home-page
7079 "https://github.com/mnooner256/pyqrcode")
7080 (synopsis "QR code generator")
7081 (description
7082 "Pyqrcode is a QR code generator written purely in Python with
7083 SVG, EPS, PNG and terminal output.")
7084 (license license:bsd-3)))
7085
7086 (define-public python-seaborn
7087 (package
7088 (name "python-seaborn")
7089 (version "0.10.0")
7090 (source
7091 (origin
7092 (method url-fetch)
7093 (uri (pypi-uri "seaborn" version))
7094 (sha256
7095 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7096 (build-system python-build-system)
7097 (arguments
7098 `(#:phases
7099 (modify-phases %standard-phases
7100 (add-before 'check 'start-xserver
7101 (lambda* (#:key inputs #:allow-other-keys)
7102 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7103 ;; There must be a running X server and make check doesn't
7104 ;; start one. Therefore we must do it.
7105 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7106 (setenv "DISPLAY" ":1")
7107 #t)))
7108 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7109 (propagated-inputs
7110 `(("python-pandas" ,python-pandas)
7111 ("python-matplotlib" ,python-matplotlib)
7112 ("python-numpy" ,python-numpy)
7113 ("python-scipy" ,python-scipy)))
7114 (native-inputs
7115 `(("python-pytest" ,python-pytest)
7116 ("xorg-server" ,xorg-server-for-tests)))
7117 (home-page "https://seaborn.pydata.org/")
7118 (synopsis "Statistical data visualization")
7119 (description
7120 "Seaborn is a library for making attractive and informative statistical
7121 graphics in Python. It is built on top of matplotlib and tightly integrated
7122 with the PyData stack, including support for numpy and pandas data structures
7123 and statistical routines from scipy and statsmodels.")
7124 (properties `((python2-variant . ,(delay python2-seaborn))))
7125 (license license:bsd-3)))
7126
7127 ;; 0.9.1 is the last release with support for Python 2.
7128 (define-public python2-seaborn
7129 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7130 (package
7131 (inherit base)
7132 (version "0.9.1")
7133 (source (origin
7134 (method url-fetch)
7135 (uri (pypi-uri "seaborn" version))
7136 (sha256
7137 (base32
7138 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7139
7140 (define-public python-mpmath
7141 (package
7142 (name "python-mpmath")
7143 (version "0.19")
7144 (source (origin
7145 (method url-fetch)
7146 (uri (string-append "http://mpmath.org/files/mpmath-"
7147 version ".tar.gz"))
7148 (sha256
7149 (base32
7150 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
7151 (build-system python-build-system)
7152 (arguments
7153 '(#:phases
7154 (modify-phases %standard-phases
7155 (replace 'check
7156 (lambda _
7157 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7158 (home-page "http://mpmath.org")
7159 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7160 (description
7161 "@code{mpmath} can be used as an arbitrary-precision substitute for
7162 Python's float/complex types and math/cmath modules, but also does much
7163 more advanced mathematics.")
7164 (license license:bsd-3)))
7165
7166 (define-public python2-mpmath
7167 (package-with-python2 python-mpmath))
7168
7169 (define-public python-bigfloat
7170 (package
7171 (name "python-bigfloat")
7172 (version "0.3.0")
7173 (source
7174 (origin
7175 (method url-fetch)
7176 (uri (pypi-uri "bigfloat" version))
7177 (sha256
7178 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7179 (build-system python-build-system)
7180 (inputs
7181 `(("mpfr" ,mpfr)))
7182 (home-page "https://github.com/mdickinson/bigfloat")
7183 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7184 (description
7185 "This package provides a Python interface to the MPFR library for
7186 multiprecision arithmetic.")
7187 (license license:lgpl3+)))
7188
7189 (define-public python2-bigfloat
7190 (package-with-python2 python-bigfloat))
7191
7192 (define-public python-sympy
7193 (package
7194 (name "python-sympy")
7195 (version "1.1.1")
7196 (source
7197 (origin
7198 (method url-fetch)
7199 (uri (string-append
7200 "https://github.com/sympy/sympy/releases/download/sympy-"
7201 version "/sympy-" version ".tar.gz"))
7202 (sha256
7203 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
7204 (build-system python-build-system)
7205 (arguments
7206 `(#:phases
7207 (modify-phases %standard-phases
7208 ;; Run the core tests after installation. By default it would run
7209 ;; *all* tests, which take a very long time to complete and are known
7210 ;; to be flaky.
7211 (delete 'check)
7212 (add-after 'install 'check
7213 (lambda* (#:key outputs #:allow-other-keys)
7214 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
7215 #t)))))
7216 (propagated-inputs
7217 `(("python-mpmath" ,python-mpmath)))
7218 (home-page "https://www.sympy.org/")
7219 (synopsis "Python library for symbolic mathematics")
7220 (description
7221 "SymPy is a Python library for symbolic mathematics. It aims to become a
7222 full-featured computer algebra system (CAS) while keeping the code as simple
7223 as possible in order to be comprehensible and easily extensible.")
7224 (license license:bsd-3)))
7225
7226 (define-public python2-sympy
7227 (package
7228 (inherit (package-with-python2 python-sympy))
7229 (arguments
7230 `(#:phases
7231 (modify-phases %standard-phases
7232 ;; Run the core tests after installation. By default it would run
7233 ;; *all* tests, which take a very long time to complete and are known
7234 ;; to be flaky.
7235 (delete 'check)
7236 (add-after 'install 'check
7237 (lambda* (#:key outputs #:allow-other-keys)
7238 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
7239 #t)))))))
7240
7241 (define-public python-q
7242 (package
7243 (name "python-q")
7244 (version "2.6")
7245 (source
7246 (origin
7247 (method url-fetch)
7248 (uri (pypi-uri "q" version))
7249 (sha256
7250 (base32
7251 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7252 (build-system python-build-system)
7253 (home-page "https://github.com/zestyping/q")
7254 (synopsis "Quick-and-dirty debugging output for tired programmers")
7255 (description
7256 "q is a Python module for \"print\" style of debugging Python code. It
7257 provides convenient short API for print out of values, tracebacks, and
7258 falling into the Python interpreter.")
7259 (license license:asl2.0)))
7260
7261 (define-public python2-q
7262 (package-with-python2 python-q))
7263
7264 (define-public python2-xlib
7265 (package
7266 (name "python2-xlib")
7267 (version "0.14")
7268 (source (origin
7269 (method url-fetch)
7270 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
7271 "/" version "/"
7272 "python-xlib-" version ".tar.gz"))
7273 (sha256
7274 (base32
7275 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
7276 (build-system python-build-system)
7277 (arguments
7278 `(#:python ,python-2 ;Python 2 only
7279 #:tests? #f)) ;no tests
7280 (home-page "http://python-xlib.sourceforge.net/")
7281 (synopsis "Python X11 client library")
7282 (description
7283 "The Python X Library is intended to be a fully functional X client
7284 library for Python programs. It is useful to implement low-level X clients.
7285 It is written entirely in Python.")
7286 (license license:gpl2+)))
7287
7288 (define-public python-singledispatch
7289 (package
7290 (name "python-singledispatch")
7291 (version "3.4.0.3")
7292 (source
7293 (origin
7294 (method url-fetch)
7295 (uri (pypi-uri "singledispatch" version))
7296 (sha256
7297 (base32
7298 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7299 (build-system python-build-system)
7300 (native-inputs
7301 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7302 (home-page
7303 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7304 (synopsis "Backport of singledispatch feature from Python 3.4")
7305 (description
7306 "This library brings functools.singledispatch from Python 3.4 to Python
7307 2.6-3.3.")
7308 (license license:expat)))
7309
7310 (define-public python2-singledispatch
7311 (package-with-python2 python-singledispatch))
7312
7313 ;; the python- version can be removed with python-3.5
7314 (define-public python-backports-abc
7315 (package
7316 (name "python-backports-abc")
7317 (version "0.5")
7318 (source
7319 (origin
7320 (method url-fetch)
7321 (uri (pypi-uri "backports_abc" version))
7322 (sha256
7323 (base32
7324 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7325 (build-system python-build-system)
7326 (home-page "https://github.com/cython/backports_abc")
7327 (synopsis "Backport of additions to the 'collections.abc' module")
7328 (description
7329 "Python-backports-abc provides a backport of additions to the
7330 @code{collections.abc} module in Python-3.5.")
7331 (license license:psfl)))
7332
7333 (define-public python2-backports-abc
7334 (package-with-python2 python-backports-abc))
7335
7336 (define-public python-backports-csv
7337 (package
7338 (name "python-backports-csv")
7339 (version "1.0.7")
7340 (source
7341 (origin
7342 (method url-fetch)
7343 (uri (pypi-uri "backports.csv" version))
7344 (sha256
7345 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7346 (build-system python-build-system)
7347 (home-page "https://github.com/ryanhiebert/backports.csv")
7348 (synopsis "Backport of Python 3's csv module for Python 2")
7349 (description
7350 "Provides a backport of Python 3's @code{csv} module for parsing
7351 comma separated values. The API of the @code{csv} module in Python 2
7352 is drastically different from the @code{csv} module in Python 3.
7353 This is due, for the most part, to the difference between str in
7354 Python 2 and Python 3.")
7355 (license license:psfl)))
7356
7357 (define-public python2-backports-csv
7358 (package-with-python2 python-backports-csv))
7359
7360 (define-public python2-backports-shutil-get-terminal-size
7361 (package
7362 (name "python2-backports-shutil-get-terminal-size")
7363 (version "1.0.0")
7364 (source
7365 (origin
7366 (method url-fetch)
7367 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7368 (sha256
7369 (base32
7370 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7371 (build-system python-build-system)
7372 (arguments
7373 `(#:python ,python-2
7374 #:phases
7375 (modify-phases %standard-phases
7376 (replace 'check
7377 (lambda _
7378 (setenv "PYTHONPATH" (string-append "./build/lib:"
7379 (getenv "PYTHONPATH")))
7380 (invoke "py.test" "-v"))))))
7381 (native-inputs
7382 `(("python2-pytest" ,python2-pytest)))
7383 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7384 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7385 (description
7386 "This package provides a backport of the @code{get_terminal_size
7387 function} from Python 3.3's @code{shutil}.
7388 Unlike the original version it is written in pure Python rather than C,
7389 so it might be a tiny bit slower.")
7390 (license license:expat)))
7391
7392 (define-public python-waf
7393 (package
7394 (name "python-waf")
7395 (version "2.0.19")
7396 (source (origin
7397 (method url-fetch)
7398 (uri (string-append "https://waf.io/"
7399 "waf-" version ".tar.bz2"))
7400 (sha256
7401 (base32
7402 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7403 (build-system python-build-system)
7404 (arguments
7405 '(#:phases
7406 (modify-phases %standard-phases
7407 (replace 'build
7408 (lambda _
7409 ;; XXX: Find a way to add all extra tools.
7410 (let ((tools '("gccdeps"
7411 "clang_compilation_database")))
7412 (invoke "python" "waf-light" "configure" "build"
7413 (string-append "--tools="
7414 (string-join tools ","))))))
7415 (replace 'check
7416 (lambda _
7417 (invoke "python" "waf" "--version")))
7418 (replace 'install
7419 (lambda* (#:key outputs #:allow-other-keys)
7420 (let ((out (assoc-ref outputs "out")))
7421 (install-file "waf" (string-append out "/bin")))
7422 #t))
7423 ;; waf breaks when it is wrapped.
7424 (delete 'wrap))))
7425 (home-page "https://waf.io/")
7426 (synopsis "Python-based build system")
7427 (description
7428 "Waf is a Python-based framework for configuring, compiling and installing
7429 applications.")
7430 (license license:bsd-3)))
7431
7432 (define-public python2-waf
7433 (package-with-python2 python-waf))
7434
7435 (define-public python-pyzmq
7436 (package
7437 (name "python-pyzmq")
7438 (version "17.1.2")
7439 (source
7440 (origin
7441 (method url-fetch)
7442 (uri (pypi-uri "pyzmq" version))
7443 (sha256
7444 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
7445 (build-system python-build-system)
7446 (arguments
7447 `(#:configure-flags
7448 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
7449 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
7450 ;; --inplace' for 'python setup.py test' to work.
7451 #:tests? #f))
7452 (inputs
7453 `(("zeromq" ,zeromq)))
7454 (native-inputs
7455 `(("pkg-config" ,pkg-config)
7456 ("python-nose" ,python-nose)))
7457 (home-page "https://github.com/zeromq/pyzmq")
7458 (synopsis "Python bindings for 0MQ")
7459 (description
7460 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
7461 (license license:bsd-4)))
7462
7463 (define-public python2-pyzmq
7464 (package-with-python2 python-pyzmq))
7465
7466 (define-public python-pep8
7467 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
7468 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
7469 ;; some dependents' test suites, and nothing more.
7470 (package
7471 (name "python-pep8")
7472 (version "1.7.0")
7473 (source
7474 (origin
7475 (method url-fetch)
7476 (uri (pypi-uri "pep8" version))
7477 (sha256
7478 (base32
7479 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
7480 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
7481 (build-system python-build-system)
7482 (home-page "https://pep8.readthedocs.org/")
7483 (synopsis "Python style guide checker")
7484 (description
7485 "This tools checks Python code against some of the style conventions in
7486 PEP 8.")
7487 (license license:expat)))
7488
7489 (define-public python2-pep8
7490 (package-with-python2 python-pep8))
7491
7492 (define-public python-pyflakes
7493 (package
7494 (name "python-pyflakes")
7495 (version "2.1.1")
7496 (source
7497 (origin
7498 (method url-fetch)
7499 (uri (pypi-uri "pyflakes" version))
7500 (sha256
7501 (base32
7502 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
7503 (build-system python-build-system)
7504 (home-page
7505 "https://github.com/pyflakes/pyflakes")
7506 (synopsis "Passive checker of Python programs")
7507 (description
7508 "Pyflakes statically checks Python source code for common errors.")
7509 (license license:expat)))
7510
7511 (define-public python2-pyflakes
7512 (package-with-python2 python-pyflakes))
7513
7514 ;; Flake8 2.6 requires an older version of pyflakes.
7515 ;; This should be removed ASAP.
7516 (define-public python-pyflakes-1.2
7517 (package (inherit python-pyflakes)
7518 (version "1.2.3")
7519 (source
7520 (origin
7521 (method url-fetch)
7522 (uri (pypi-uri "pyflakes" version))
7523 (sha256
7524 (base32
7525 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
7526 (arguments
7527 '(#:phases
7528 (modify-phases %standard-phases
7529 ;; This one test fails.
7530 (replace 'check
7531 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
7532 (native-inputs
7533 `(("python-pytest" ,python-pytest)))))
7534
7535 (define-public python-mccabe
7536 (package
7537 (name "python-mccabe")
7538 (version "0.6.1")
7539 (source
7540 (origin
7541 (method url-fetch)
7542 (uri (pypi-uri "mccabe" version))
7543 (sha256
7544 (base32
7545 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
7546 (build-system python-build-system)
7547 (native-inputs
7548 `(("python-pytest" ,python-pytest-bootstrap)
7549 ("python-pytest-runner" ,python-pytest-runner)))
7550 (home-page "https://github.com/flintwork/mccabe")
7551 (synopsis "McCabe checker, plugin for flake8")
7552 (description
7553 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7554 complexity of Python source code.")
7555 (license license:expat)))
7556
7557 (define-public python2-mccabe
7558 (package-with-python2 python-mccabe))
7559
7560 (define-public python-mccabe-0.2.1
7561 (package (inherit python-mccabe)
7562 (version "0.2.1")
7563 (source
7564 (origin
7565 (method url-fetch)
7566 (uri (pypi-uri "mccabe" version))
7567 (sha256
7568 (base32
7569 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7570
7571 (define-public python2-mccabe-0.2.1
7572 (package-with-python2 python-mccabe-0.2.1))
7573
7574 ;; Flake8 2.4.1 requires an older version of pep8.
7575 ;; This should be removed ASAP.
7576 (define-public python-pep8-1.5.7
7577 (package (inherit python-pep8)
7578 (version "1.5.7")
7579 (source
7580 (origin
7581 (method url-fetch)
7582 (uri (pypi-uri "pep8" version))
7583 (sha256
7584 (base32
7585 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7586 (arguments
7587 ;; XXX Tests not compatible with Python 3.5.
7588 '(#:tests? #f))))
7589
7590 (define-public python2-pep8-1.5.7
7591 (package-with-python2 python-pep8-1.5.7))
7592
7593 (define-public python-flake8
7594 (package
7595 (name "python-flake8")
7596 (version "3.7.9")
7597 (source (origin
7598 (method url-fetch)
7599 (uri (pypi-uri "flake8" version))
7600 (sha256
7601 (base32
7602 "1yscj6avirm6m12bjh4fn2lfgxaamqsjh9pirdqfi0fcgq8ils25"))))
7603 (build-system python-build-system)
7604 (arguments
7605 `(#:phases
7606 (modify-phases %standard-phases
7607 (delete 'check)
7608 (add-after 'install 'check
7609 (lambda* (#:key inputs outputs #:allow-other-keys)
7610 (add-installed-pythonpath inputs outputs)
7611 (invoke "pytest" "-v")
7612 #t)))))
7613 (propagated-inputs
7614 `(("python-pycodestyle" ,python-pycodestyle)
7615 ("python-entrypoints" ,python-entrypoints)
7616 ("python-pyflakes" ,python-pyflakes)
7617 ("python-mccabe" ,python-mccabe)))
7618 (native-inputs
7619 `(("python-mock" ,python-mock)
7620 ("python-pytest" ,python-pytest-bootstrap)))
7621 (home-page "https://gitlab.com/pycqa/flake8")
7622 (synopsis
7623 "The modular source code checker: pep8, pyflakes and co")
7624 (description
7625 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7626 (properties `((python2-variant . ,(delay python2-flake8))))
7627 (license license:expat)))
7628
7629 (define-public python2-flake8
7630 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
7631 (package (inherit base)
7632 (propagated-inputs
7633 `(("python2-configparser" ,python2-configparser)
7634 ("python2-enum34" ,python2-enum34)
7635 ("python2-functools32" ,python2-functools32)
7636 ("python2-typing" ,python2-typing)
7637 ,@(package-propagated-inputs base))))))
7638
7639 ;; python-hacking requires flake8 <2.7.0.
7640 (define-public python-flake8-2.6
7641 (package
7642 (inherit python-flake8)
7643 (version "2.6.2")
7644 (source (origin
7645 (method url-fetch)
7646 (uri (pypi-uri "flake8" version))
7647 (sha256
7648 (base32
7649 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
7650 (arguments
7651 `(#:phases
7652 (modify-phases %standard-phases
7653 (add-after 'unpack 'use-later-pycodestyles
7654 (lambda __
7655 (substitute* '("flake8.egg-info/requires.txt"
7656 "setup.py")
7657 (("pycodestyle >= 2.0, < 2.1")
7658 "pycodestyle >= 2.0"))
7659 #t))
7660 (delete 'check)
7661 (add-after 'install 'check
7662 (lambda* (#:key inputs outputs #:allow-other-keys)
7663 (add-installed-pythonpath inputs outputs)
7664 (invoke "pytest" "-v")
7665 #t)))))
7666 (propagated-inputs
7667 `(("python-pep8" ,python-pep8)
7668 ("python-pycodestyle" ,python-pycodestyle)
7669 ("python-entrypoints" ,python-entrypoints)
7670 ("python-pyflakes" ,python-pyflakes-1.2)
7671 ("python-mccabe" ,python-mccabe)))))
7672
7673 (define-public python-flake8-polyfill
7674 (package
7675 (name "python-flake8-polyfill")
7676 (version "1.0.2")
7677 (source
7678 (origin
7679 (method url-fetch)
7680 (uri (pypi-uri "flake8-polyfill" version))
7681 (sha256
7682 (base32
7683 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7684 (build-system python-build-system)
7685 (arguments
7686 '(#:phases
7687 (modify-phases %standard-phases
7688 (replace 'check
7689 (lambda _
7690 ;; Be compatible with Pytest 4:
7691 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7692 (substitute* "setup.cfg"
7693 (("\\[pytest\\]")
7694 "[tool:pytest]"))
7695
7696 (setenv "PYTHONPATH"
7697 (string-append (getcwd) "/build/lib:"
7698 (getenv "PYTHONPATH")))
7699 (invoke "py.test" "-v"))))))
7700 (native-inputs
7701 `(("python-flake8" ,python-flake8)
7702 ("python-mock" ,python-mock)
7703 ("python-pep8" ,python-pep8)
7704 ("python-pycodestyle" ,python-pycodestyle)
7705 ("python-pytest" ,python-pytest)))
7706 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7707 (synopsis "Polyfill package for Flake8 plugins")
7708 (description
7709 "This package that provides some compatibility helpers for Flake8
7710 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7711 (license license:expat)))
7712
7713 (define-public python2-flake8-polyfill
7714 (package-with-python2 python-flake8-polyfill))
7715
7716 (define-public python-mistune
7717 (package
7718 (name "python-mistune")
7719 (version "0.8.4")
7720 (source
7721 (origin
7722 (method url-fetch)
7723 (uri (pypi-uri "mistune" version))
7724 (sha256
7725 (base32
7726 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7727 (build-system python-build-system)
7728 (native-inputs
7729 `(("python-nose" ,python-nose)
7730 ("python-cython" ,python-cython)))
7731 (home-page "https://github.com/lepture/mistune")
7732 (synopsis "Markdown parser in pure Python")
7733 (description "This package provides a fast markdown parser in pure
7734 Python.")
7735 (license license:bsd-3)))
7736
7737 (define-public python2-mistune
7738 (package-with-python2 python-mistune))
7739
7740 (define-public python-markdown
7741 (package
7742 (name "python-markdown")
7743 (version "3.2.1")
7744 (source
7745 (origin
7746 (method url-fetch)
7747 (uri (pypi-uri "Markdown" version))
7748 (sha256
7749 (base32
7750 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
7751 (build-system python-build-system)
7752 (native-inputs
7753 `(("python-nose" ,python-nose)
7754 ("python-pyyaml" ,python-pyyaml)))
7755 (home-page "https://python-markdown.github.io/")
7756 (synopsis "Python implementation of Markdown")
7757 (description
7758 "This package provides a Python implementation of John Gruber's
7759 Markdown. The library features international input, various Markdown
7760 extensions, and several HTML output formats. A command line wrapper
7761 markdown_py is also provided to convert Markdown files to HTML.")
7762 (properties `((python2-variant . ,(delay python2-markdown))))
7763 (license license:bsd-3)))
7764
7765 ;; Markdown 3.2 dropped support for Python 2.
7766 (define-public python2-markdown
7767 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7768 (package/inherit
7769 base
7770 (version "3.1.1")
7771 (source (origin
7772 (method url-fetch)
7773 (uri (pypi-uri "Markdown" version))
7774 (sha256
7775 (base32
7776 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
7777
7778 (define-public python-ptyprocess
7779 (package
7780 (name "python-ptyprocess")
7781 (version "0.5.2")
7782 (source
7783 (origin
7784 (method url-fetch)
7785 (uri (pypi-uri "ptyprocess" version))
7786 (sha256
7787 (base32
7788 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7789 (build-system python-build-system)
7790 (native-inputs
7791 `(("python-nose" ,python-nose)))
7792 (arguments
7793 `(#:phases
7794 (modify-phases %standard-phases
7795 (replace 'check
7796 (lambda _ (invoke "nosetests"))))))
7797 (home-page "https://github.com/pexpect/ptyprocess")
7798 (synopsis "Run a subprocess in a pseudo terminal")
7799 (description
7800 "This package provides a Python library used to launch a subprocess in a
7801 pseudo terminal (pty), and interact with both the process and its pty.")
7802 (license license:isc)))
7803
7804 (define-public python2-ptyprocess
7805 (package-with-python2 python-ptyprocess))
7806
7807 (define-public python-cram
7808 (package
7809 (name "python-cram")
7810 (version "0.7")
7811 (home-page "https://bitheap.org/cram/")
7812 (source (origin
7813 (method url-fetch)
7814 (uri (list (string-append home-page "cram-"
7815 version ".tar.gz")
7816 (pypi-uri "cram" version)))
7817 (sha256
7818 (base32
7819 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7820 (arguments
7821 '(#:phases
7822 (modify-phases %standard-phases
7823 (add-after 'unpack 'patch-source
7824 (lambda _
7825 (substitute* (find-files "cram" ".*\\.py$")
7826 ;; Replace default shell path.
7827 (("/bin/sh") (which "sh")))
7828 (substitute* (find-files "tests" ".*\\.t$")
7829 (("md5") "md5sum")
7830 (("/bin/bash") (which "bash"))
7831 (("/bin/sh") (which "sh")))
7832 (substitute* "cram/_test.py"
7833 ;; This hack works around a bug triggered by substituting
7834 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7835 ;; "cram -h", which breaks the output at 80 characters. This
7836 ;; causes the line showing the default shell to break into two
7837 ;; lines, but the test expects a single line...
7838 (("env\\['COLUMNS'\\] = '80'")
7839 "env['COLUMNS'] = '160'"))
7840
7841 (substitute* "Makefile"
7842 ;; Recent versions of python-coverage have caused the test
7843 ;; coverage to decrease (as of version 0.7). Allow that.
7844 (("--fail-under=100")
7845 "--fail-under=90"))
7846
7847 #t))
7848 (replace 'check
7849 ;; The test phase uses the built library and executable.
7850 (lambda* (#:key inputs outputs #:allow-other-keys)
7851 (add-installed-pythonpath inputs outputs)
7852 (setenv "PATH" (string-append (getenv "PATH") ":"
7853 (assoc-ref outputs "out") "/bin"))
7854 (invoke "make" "test"))))))
7855 (build-system python-build-system)
7856 (native-inputs
7857 `(("python-coverage" ,python-coverage)
7858 ("which" ,which)))
7859 (synopsis "Simple testing framework for command line applications")
7860 (description
7861 "Cram is a functional testing framework for command line applications.
7862 Cram tests look like snippets of interactive shell sessions. Cram runs each
7863 command and compares the command output in the test with the command’s actual
7864 output.")
7865 (license license:gpl2+)))
7866
7867 (define-public python2-cram
7868 (package-with-python2 python-cram))
7869
7870 (define-public python-straight-plugin
7871 (package
7872 (name "python-straight-plugin")
7873 (version "1.4.1")
7874 (source
7875 (origin
7876 (method url-fetch)
7877 (uri (pypi-uri "straight.plugin" version))
7878 (sha256
7879 (base32
7880 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7881 (build-system python-build-system)
7882 (home-page "https://github.com/ironfroggy/straight.plugin")
7883 (synopsis "Simple namespaced plugin facility")
7884 (description "Straight Plugin provides a type of plugin you can create from
7885 almost any existing Python modules, and an easy way for outside developers to
7886 add functionality and customization to your projects with their own plugins.")
7887 (license license:expat)))
7888
7889 (define-public python2-straight-plugin
7890 (package-with-python2 python-straight-plugin))
7891
7892 (define-public python-fonttools
7893 (package
7894 (name "python-fonttools")
7895 (version "4.6.0")
7896 (source (origin
7897 (method url-fetch)
7898 (uri (pypi-uri "fonttools" version ".zip"))
7899 (sha256
7900 (base32
7901 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
7902 (build-system python-build-system)
7903 (native-inputs
7904 `(("unzip" ,unzip)
7905 ("python-pytest" ,python-pytest)
7906 ("python-pytest-runner" ,python-pytest-runner)))
7907 (home-page "https://github.com/fonttools/fonttools")
7908 (synopsis "Tools to manipulate font files")
7909 (description
7910 "FontTools/TTX is a library to manipulate font files from Python. It
7911 supports reading and writing of TrueType/OpenType fonts, reading and writing
7912 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7913 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7914 from an XML-based format.")
7915 (license license:expat)))
7916
7917 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
7918 (define-public python2-fonttools
7919 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
7920 (package/inherit
7921 base
7922 (version "3.44.0")
7923 (source (origin
7924 (method url-fetch)
7925 (uri (pypi-uri "fonttools" version ".zip"))
7926 (sha256
7927 (base32
7928 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
7929
7930 (define-public python-ly
7931 (package
7932 (name "python-ly")
7933 (version "0.9.5")
7934 (source
7935 (origin
7936 (method url-fetch)
7937 (uri (pypi-uri name version))
7938 (sha256
7939 (base32
7940 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7941 (build-system python-build-system)
7942 (arguments
7943 ;; FIXME: Some tests need network access.
7944 '(#:tests? #f))
7945 (synopsis "Tool and library for manipulating LilyPond files")
7946 (description "This package provides a Python library to parse, manipulate
7947 or create documents in LilyPond format. A command line program ly is also
7948 provided that can be used to do various manipulations with LilyPond files.")
7949 (home-page "https://pypi.org/project/python-ly/")
7950 (license license:gpl2+)))
7951
7952 (define-public python-appdirs
7953 (package
7954 (name "python-appdirs")
7955 (version "1.4.3")
7956 (source
7957 (origin
7958 (method url-fetch)
7959 (uri (pypi-uri "appdirs" version))
7960 (sha256
7961 (base32
7962 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7963 (build-system python-build-system)
7964 (home-page "https://github.com/ActiveState/appdirs")
7965 (synopsis
7966 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7967 (description
7968 "This module provides a portable way of finding out where user data
7969 should be stored on various operating systems.")
7970 (license license:expat)))
7971
7972 (define-public python2-appdirs
7973 (package-with-python2 python-appdirs))
7974
7975 (define-public python-llfuse
7976 (package
7977 (name "python-llfuse")
7978 (version "1.3.6")
7979 (source (origin
7980 (method url-fetch)
7981 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7982 (sha256
7983 (base32
7984 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
7985 (build-system python-build-system)
7986 (inputs
7987 `(("fuse" ,fuse)
7988 ("attr" ,attr)))
7989 (native-inputs
7990 `(("pkg-config" ,pkg-config)))
7991 (synopsis "Python bindings for FUSE")
7992 (description
7993 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7994 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7995 (license license:lgpl2.0+)
7996 (properties `((python2-variant . ,(delay python2-llfuse))))))
7997
7998 (define-public python2-llfuse
7999 (package (inherit (package-with-python2
8000 (strip-python2-variant python-llfuse)))
8001 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8002
8003 ;; For attic-0.16
8004 (define-public python-llfuse-0.41
8005 (package (inherit python-llfuse)
8006 (version "0.41.1")
8007 (source (origin
8008 (method url-fetch)
8009 (uri (string-append
8010 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8011 "llfuse-" version ".tar.bz2"))
8012 (sha256
8013 (base32
8014 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8015 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8016 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8017 (license (list license:expat license:lgpl2.0+))))
8018
8019 (define-public python-msgpack
8020 (package
8021 (name "python-msgpack")
8022 (version "1.0.0")
8023 (source (origin
8024 (method url-fetch)
8025 (uri (pypi-uri "msgpack" version))
8026 (sha256
8027 (base32
8028 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8029 (build-system python-build-system)
8030 (arguments
8031 `(#:modules ((guix build utils)
8032 (guix build python-build-system)
8033 (ice-9 ftw)
8034 (srfi srfi-1)
8035 (srfi srfi-26))
8036 #:phases
8037 (modify-phases %standard-phases
8038 (replace 'check
8039 (lambda _
8040 (let ((cwd (getcwd)))
8041 (setenv "PYTHONPATH"
8042 (string-append cwd "/build/"
8043 (find (cut string-prefix? "lib" <>)
8044 (scandir (string-append cwd "/build")))
8045 ":"
8046 (getenv "PYTHONPATH")))
8047 (invoke "pytest" "-v" "test")))))))
8048 (native-inputs
8049 `(("python-pytest" ,python-pytest)))
8050 (synopsis "MessagePack (de)serializer")
8051 (description "MessagePack is a fast, compact binary serialization format,
8052 suitable for similar data to JSON. This package provides CPython bindings for
8053 reading and writing MessagePack data.")
8054 (home-page "https://pypi.org/project/msgpack/")
8055 (license license:asl2.0)))
8056
8057 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8058 ;; release 0.5. Some packages like borg still call it by the old name for now.
8059 ;; <https://bugs.gnu.org/30662>
8060 (define-public python-msgpack-transitional
8061 (package
8062 (inherit python-msgpack)
8063 (name "python-msgpack-transitional")
8064 (version "0.5.6")
8065 (source (origin
8066 (method url-fetch)
8067 (uri (pypi-uri "msgpack" version))
8068 (sha256
8069 (base32
8070 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8071 (arguments
8072 (substitute-keyword-arguments (package-arguments python-msgpack)
8073 ((#:phases phases)
8074 `(modify-phases ,phases
8075 (add-after 'unpack 'configure-transitional
8076 (lambda _
8077 ;; Keep using the old name.
8078 (substitute* "setup.py"
8079 (("TRANSITIONAL = False")
8080 "TRANSITIONAL = 1"))
8081 #t))))))))
8082
8083 (define-public python2-msgpack
8084 (package-with-python2 python-msgpack))
8085
8086 (define-public python-netaddr
8087 (package
8088 (name "python-netaddr")
8089 (version "0.7.19")
8090 (source
8091 (origin
8092 (method url-fetch)
8093 (uri (pypi-uri "netaddr" version))
8094 (sha256
8095 (base32
8096 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8097 (build-system python-build-system)
8098 (arguments `(#:tests? #f)) ;; No tests.
8099 (home-page "https://github.com/drkjam/netaddr/")
8100 (synopsis "Pythonic manipulation of network addresses")
8101 (description
8102 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8103 and MAC network addresses.")
8104 (license license:bsd-3)))
8105
8106 (define-public python2-netaddr
8107 (package-with-python2 python-netaddr))
8108
8109 (define-public python2-pyroute2
8110 (package
8111 (name "python2-pyroute2")
8112 (version "0.5.6")
8113 (source
8114 (origin
8115 (method url-fetch)
8116 (uri (pypi-uri "pyroute2" version))
8117 (sha256
8118 (base32
8119 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8120 (build-system python-build-system)
8121 (arguments
8122 `(#:python ,python-2)) ;Python 3.x is not supported
8123 (home-page "https://github.com/svinota/pyroute2")
8124 (synopsis "Python netlink library")
8125 (description
8126 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8127 Supported netlink families and protocols include:
8128 @itemize
8129 @item rtnl, network settings - addresses, routes, traffic controls
8130 @item nfnetlink - netfilter API: ipset, nftables, ...
8131 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8132 @item devlink - manage and monitor devlink-enabled hardware
8133 @item generic - generic netlink families
8134 @itemize
8135 @item nl80211 - wireless functions API (basic support)
8136 @item taskstats - extended process statistics
8137 @item acpi_events - ACPI events monitoring
8138 @item thermal_events - thermal events monitoring
8139 @item VFS_DQUOT - disk quota events monitoring
8140 @end itemize
8141 @end itemize")
8142 (license license:gpl2+)))
8143
8144 (define-public python-wrapt
8145 (package
8146 (name "python-wrapt")
8147 (version "1.11.2")
8148 (source
8149 (origin
8150 (method url-fetch)
8151 (uri (pypi-uri "wrapt" version))
8152 (sha256
8153 (base32
8154 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8155 (build-system python-build-system)
8156 (arguments
8157 ;; Tests are not included in the tarball, they are only available in the
8158 ;; git repository.
8159 `(#:tests? #f))
8160 (home-page "https://github.com/GrahamDumpleton/wrapt")
8161 (synopsis "Module for decorators, wrappers and monkey patching")
8162 (description
8163 "The aim of the wrapt module is to provide a transparent object proxy for
8164 Python, which can be used as the basis for the construction of function
8165 wrappers and decorator functions.")
8166 (license license:bsd-2)))
8167
8168 (define-public python2-wrapt
8169 (package-with-python2 python-wrapt))
8170
8171 (define-public python-xlrd
8172 (package
8173 (name "python-xlrd")
8174 (version "1.2.0")
8175 (source (origin
8176 (method url-fetch)
8177 (uri (pypi-uri "xlrd" version))
8178 (sha256
8179 (base32
8180 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8181 (build-system python-build-system)
8182 (arguments
8183 `(#:phases
8184 (modify-phases %standard-phases
8185 ;; Some tests depend on writing a temporary file to the user's home
8186 ;; directory.
8187 (add-after 'unpack 'fix-tests
8188 (lambda _
8189 (delete-file "tests/test_open_workbook.py")
8190 #t)))))
8191 (home-page "http://www.python-excel.org/")
8192 (synopsis "Library for extracting data from Excel files")
8193 (description "This package provides a library to extract data from
8194 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8195 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8196 Unicode-aware. It is not intended as an end-user tool.")
8197 (license license:bsd-3)))
8198
8199 (define-public python2-xlrd
8200 (package-with-python2 python-xlrd))
8201
8202 (define-public python-prettytable
8203 (package
8204 (name "python-prettytable")
8205 (version "0.7.2")
8206 (source
8207 (origin
8208 (method url-fetch)
8209 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8210 (sha256
8211 (base32
8212 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8213 (build-system python-build-system)
8214 (home-page "https://code.google.com/archive/p/prettytable/")
8215 (synopsis "Display tabular data in an ASCII table format")
8216 (description
8217 "A library designed to represent tabular data in visually appealing ASCII
8218 tables. PrettyTable allows for selection of which columns are to be printed,
8219 independent alignment of columns (left or right justified or centred) and
8220 printing of sub-tables by specifying a row range.")
8221 (license license:bsd-3)))
8222
8223 (define-public python2-prettytable
8224 (package-with-python2 python-prettytable))
8225
8226 (define-public python-tables
8227 (package
8228 (name "python-tables")
8229 (version "3.6.1")
8230 (source
8231 (origin
8232 (method url-fetch)
8233 (uri (pypi-uri "tables" version))
8234 (sha256
8235 (base32
8236 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
8237 (modules '((guix build utils)))
8238 (snippet
8239 '(begin
8240 ;; Remove pre-compiled .pyc files from source.
8241 (for-each delete-file-recursively
8242 (find-files "." "__pycache__" #:directories? #t))
8243 (for-each delete-file (find-files "." "\\.pyc$"))
8244 #t))))
8245 (build-system python-build-system)
8246 (arguments
8247 `(;; FIXME: python-build-system does not pass configure-flags to "build"
8248 ;; or "check", so we must override the build and check phases.
8249 #:phases
8250 (modify-phases %standard-phases
8251 (add-after 'unpack 'use-gcc
8252 (lambda _
8253 (substitute* "setup.py"
8254 (("^( +)compiler = new_compiler\\(\\)" line indent)
8255 (string-append line
8256 "\n"
8257 indent
8258 "compiler.set_executables(compiler='gcc',"
8259 "compiler_so='gcc',"
8260 "linker_exe='gcc',"
8261 "linker_so='gcc -shared')")))
8262 #t))
8263 (add-after 'unpack 'disable-tuning
8264 (lambda _
8265 (substitute* "setup.py"
8266 (("cpu_flags = .*")
8267 "cpu_flags = ['sse2']\n"))
8268 #t))
8269 (replace 'build
8270 (lambda* (#:key inputs #:allow-other-keys)
8271 (invoke "python" "setup.py" "build"
8272 (string-append "--hdf5="
8273 (assoc-ref inputs "hdf5")))))
8274 (replace 'check
8275 (lambda* (#:key inputs #:allow-other-keys)
8276 (invoke "python" "setup.py" "check"
8277 (string-append "--hdf5="
8278 (assoc-ref inputs "hdf5"))))))))
8279 (propagated-inputs
8280 `(("python-numexpr" ,python-numexpr)
8281 ("python-numpy" ,python-numpy)))
8282 (native-inputs
8283 `(("python-cython" ,python-cython)
8284 ("pkg-config" ,pkg-config)))
8285 (inputs
8286 `(("hdf5" ,hdf5-1.10)
8287 ("bzip2" ,bzip2)
8288 ("zlib" ,zlib)))
8289 (home-page "https://www.pytables.org/")
8290 (synopsis "Hierarchical datasets for Python")
8291 (description "PyTables is a package for managing hierarchical datasets and
8292 designed to efficiently cope with extremely large amounts of data.")
8293 (license license:bsd-3)))
8294
8295 (define-public python2-tables
8296 (package-with-python2 python-tables))
8297
8298 (define-public python-pytest-black
8299 (package
8300 (name "python-pytest-black")
8301 (version "0.3.8")
8302 (source
8303 (origin
8304 (method url-fetch)
8305 (uri (pypi-uri "pytest-black" version))
8306 (sha256
8307 (base32
8308 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
8309 (build-system python-build-system)
8310 (propagated-inputs
8311 `(("python-pytest" ,python-pytest)
8312 ("python-black" ,python-black)
8313 ("python-toml" ,python-toml)))
8314 (native-inputs
8315 `(("python-setuptools-scm" ,python-setuptools-scm)))
8316 (home-page "https://github.com/shopkeep/pytest-black")
8317 (synopsis "Pytest plugin to enable format checking with black")
8318 (description
8319 "This package provides a pytest plugin to enable format checking with the
8320 Python code formatter \"black\".")
8321 (license license:expat)))
8322
8323 (define-public python-get-version
8324 (package
8325 (name "python-get-version")
8326 (version "2.1")
8327 (source
8328 (origin
8329 (method url-fetch)
8330 (uri (pypi-uri "get_version" version))
8331 (sha256
8332 (base32
8333 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
8334 (build-system python-build-system)
8335 (propagated-inputs
8336 `(("python-pygments" ,python-pygments)
8337 ("python-pytest" ,python-pytest)
8338 ("python-pytest-black" ,python-pytest-black)
8339 ("python-pytest-cov" ,python-pytest-cov)
8340 ("python-setuptools" ,python-setuptools)
8341 ("python-testpath" ,python-testpath)))
8342 (home-page "https://github.com/flying-sheep/get_version")
8343 (synopsis "Version helper in the spirit of versioneer")
8344 (description
8345 "This package provides a version helper that lets you automatically use
8346 the latest @code{vX.X.X} Git tag as the version in your Python package. It
8347 also supports getting the version from Python source distributions or, once
8348 your package is installed, via @code{pkg_resources} (part of
8349 @code{setuptools}).")
8350 (license license:gpl3+)))
8351
8352 (define-public python-legacy-api-wrap
8353 (package
8354 (name "python-legacy-api-wrap")
8355 (version "1.2")
8356 (source
8357 (origin
8358 (method url-fetch)
8359 (uri (pypi-uri "legacy-api-wrap" version))
8360 (sha256
8361 (base32
8362 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
8363 (build-system python-build-system)
8364 (propagated-inputs
8365 `(("python-get-version" ,python-get-version)
8366 ("python-pytest" ,python-pytest)
8367 ("python-pytest-black" ,python-pytest-black)
8368 ("python-pytest-cov" ,python-pytest-cov)
8369 ("python-setuptools" ,python-setuptools)))
8370 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
8371 (synopsis "Legacy API wrapper")
8372 (description "This module defines a decorator to wrap legacy APIs. The
8373 primary use case is APIs defined before keyword-only parameters existed.")
8374 (license license:gpl3+)))
8375
8376 (define-public python-pyasn1
8377 (package
8378 (name "python-pyasn1")
8379 (version "0.4.8")
8380 (source
8381 (origin
8382 (method url-fetch)
8383 (uri (pypi-uri "pyasn1" version))
8384 (sha256
8385 (base32
8386 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
8387 (build-system python-build-system)
8388 (home-page "http://pyasn1.sourceforge.net/")
8389 (synopsis "ASN.1 types and codecs")
8390 (description
8391 "This is an implementation of ASN.1 types and codecs in Python. It is
8392 suitable for a wide range of protocols based on the ASN.1 specification.")
8393 (license license:bsd-2)))
8394
8395 (define-public python2-pyasn1
8396 (package-with-python2 python-pyasn1))
8397
8398 (define-public python-pyasn1-modules
8399 (package
8400 (name "python-pyasn1-modules")
8401 (version "0.2.2")
8402 (source
8403 (origin
8404 (method url-fetch)
8405 (uri (pypi-uri "pyasn1-modules" version))
8406 (sha256
8407 (base32
8408 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
8409 (build-system python-build-system)
8410 (propagated-inputs
8411 `(("python-pyasn1" ,python-pyasn1)))
8412 (home-page "https://sourceforge.net/projects/pyasn1/")
8413 (synopsis "ASN.1 codec implementations")
8414 (description
8415 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
8416 implementations of ASN.1-based codecs and protocols.")
8417 (license license:bsd-3)))
8418
8419 (define-public python2-pyasn1-modules
8420 (package-with-python2 python-pyasn1-modules))
8421
8422 (define-public python-ipaddress
8423 (package
8424 (name "python-ipaddress")
8425 (version "1.0.22")
8426 (source (origin
8427 (method url-fetch)
8428 (uri (pypi-uri "ipaddress" version))
8429 (sha256
8430 (base32
8431 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
8432 (build-system python-build-system)
8433 (home-page "https://github.com/phihag/ipaddress")
8434 (synopsis "IP address manipulation library")
8435 (description
8436 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
8437 in Python. This library is used to create, poke at, and manipulate IPv4 and
8438 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
8439 module to older versions of Python.")
8440 (license license:psfl)))
8441
8442 (define-public python2-ipaddress
8443 (package-with-python2 python-ipaddress))
8444
8445 (define-public python2-ipaddr
8446 (package
8447 (name "python2-ipaddr")
8448 (version "2.1.11")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "ipaddr" version))
8453 (sha256
8454 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
8455 (build-system python-build-system)
8456 (arguments
8457 `(#:python ,python-2 ;version 2 only
8458 #:phases
8459 (modify-phases %standard-phases
8460 (replace 'check
8461 (lambda _ (invoke "python" "ipaddr_test.py"))))))
8462 (home-page "https://github.com/google/ipaddr-py")
8463 (synopsis "IP address manipulation library")
8464 (description
8465 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
8466 IPv6 addresses and networks.
8467
8468 For new implementations you may prefer to use the standard module
8469 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
8470 versions of Python.")
8471 (license license:asl2.0)))
8472
8473 (define-public python-idna
8474 (package
8475 (name "python-idna")
8476 (version "2.9")
8477 (source
8478 (origin
8479 (method url-fetch)
8480 (uri (pypi-uri "idna" version))
8481 (sha256
8482 (base32
8483 "1jxp2pdi8y4asi7ka1zhx3yx09kv8kzj533f0ds7viz49b0x323m"))))
8484 (build-system python-build-system)
8485 (home-page "https://github.com/kjd/idna")
8486 (synopsis "Internationalized domain names in applications")
8487 (description
8488 "This is a library to support the Internationalised Domain Names in
8489 Applications (IDNA) protocol as specified in RFC 5891. This version of the
8490 protocol is often referred to as “IDNA2008” and can produce different results
8491 from the earlier standard from 2003. The library is also intended to act as a
8492 suitable drop-in replacement for the “encodings.idna” module that comes with
8493 the Python standard library but currently only supports the older 2003
8494 specification.")
8495 (license license:bsd-4)))
8496
8497 (define-public python-idna-2.7
8498 (package (inherit python-idna)
8499 (version "2.7")
8500 (source (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "idna" version))
8503 (sha256
8504 (base32
8505 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
8506
8507
8508 (define-public python2-idna
8509 (package-with-python2 python-idna))
8510
8511 (define-public python-idna-ssl
8512 (package
8513 (name "python-idna-ssl")
8514 (version "1.0.1")
8515 (source
8516 (origin
8517 (method url-fetch)
8518 (uri (pypi-uri "idna-ssl" version))
8519 (sha256
8520 (base32
8521 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
8522 (build-system python-build-system)
8523 (arguments
8524 `(#:tests? #f)) ;circular dependency with python-aiohttp
8525 (home-page "https://github.com/aio-libs/idna-ssl")
8526 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
8527 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
8528 domains support.")
8529 (license license:expat)))
8530
8531 (define-public python-pretend
8532 (package
8533 (name "python-pretend")
8534 (version "1.0.9")
8535 (source
8536 (origin
8537 (method url-fetch)
8538 (uri (pypi-uri "pretend" version))
8539 (sha256
8540 (base32
8541 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
8542 (build-system python-build-system)
8543 (home-page "https://github.com/alex/pretend")
8544 (synopsis "Library for stubbing in Python")
8545 (description
8546 "Pretend is a library to make stubbing with Python easier. Stubbing is a
8547 technique for writing tests. You may hear the term mixed up with mocks,
8548 fakes, or doubles. Basically, a stub is an object that returns pre-canned
8549 responses, rather than doing any computation.")
8550 (license license:bsd-3)))
8551
8552 (define-public python2-pretend
8553 (package-with-python2 python-pretend))
8554
8555 (define-public python-pip
8556 (package
8557 (name "python-pip")
8558 (version "20.0.2")
8559 (source
8560 (origin
8561 (method url-fetch)
8562 (uri (pypi-uri "pip" version))
8563 (sha256
8564 (base32
8565 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
8566 (build-system python-build-system)
8567 (arguments
8568 '(#:tests? #f)) ; there are no tests in the pypi archive.
8569 (home-page "https://pip.pypa.io/")
8570 (synopsis "Package manager for Python software")
8571 (description
8572 "Pip is a package manager for Python software, that finds packages on the
8573 Python Package Index (PyPI).")
8574 (license license:expat)))
8575
8576 (define-public python2-pip
8577 (package-with-python2 python-pip))
8578
8579 (define-public python-tlsh
8580 (package
8581 (name "python-tlsh")
8582 (version "3.4.5")
8583 (home-page "https://github.com/trendmicro/tlsh")
8584 (source
8585 (origin
8586 (method git-fetch)
8587 (uri (git-reference
8588 (url "https://github.com/trendmicro/tlsh.git")
8589 (commit (string-append "v" version))))
8590 (file-name (git-file-name name version))
8591 (sha256
8592 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
8593 (build-system cmake-build-system)
8594 (arguments
8595 '(#:out-of-source? #f
8596 #:phases (modify-phases %standard-phases
8597 (replace
8598 'install
8599 (lambda* (#:key outputs #:allow-other-keys)
8600 ;; Build and install the Python bindings. The underlying
8601 ;; C++ library is apparently not meant to be installed.
8602 (let ((out (assoc-ref outputs "out")))
8603 (with-directory-excursion "py_ext"
8604 (and (system* "python" "setup.py" "build")
8605 (system* "python" "setup.py" "install"
8606 (string-append "--prefix=" out))))))))))
8607 (inputs `(("python" ,python-wrapper))) ;for the bindings
8608 (synopsis "Fuzzy matching library for Python")
8609 (description
8610 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8611 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8612 value which can be used for similarity comparisons. Similar objects have
8613 similar hash values, which allows for the detection of similar objects by
8614 comparing their hash values. The byte stream should have a sufficient amount
8615 of complexity; for example, a byte stream of identical bytes will not generate
8616 a hash value.")
8617 (license license:asl2.0)))
8618
8619 (define-public python2-tlsh
8620 (package
8621 (inherit python-tlsh)
8622 (name "python2-tlsh")
8623 (inputs `(("python" ,python-2)))))
8624
8625 (define-public python-termcolor
8626 (package
8627 (name "python-termcolor")
8628 (version "1.1.0")
8629 (source
8630 (origin
8631 (method url-fetch)
8632 (uri (pypi-uri "termcolor" version))
8633 (sha256
8634 (base32
8635 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8636 (build-system python-build-system)
8637 (arguments
8638 ;; There are no tests.
8639 `(#:tests? #f))
8640 (home-page "https://pypi.org/project/termcolor/")
8641 (synopsis "ANSII Color formatting for terminal output")
8642 (description
8643 "This package provides ANSII Color formatting for output in terminals.")
8644 (license license:expat)))
8645
8646 (define-public python2-termcolor
8647 (package-with-python2 python-termcolor))
8648
8649 (define-public python-libarchive-c
8650 (package
8651 (name "python-libarchive-c")
8652 (version "2.9")
8653 (source (origin
8654 (method url-fetch)
8655 (uri (pypi-uri "libarchive-c" version))
8656 (sha256
8657 (base32
8658 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
8659 (build-system python-build-system)
8660 (arguments
8661 '(#:phases (modify-phases %standard-phases
8662 (add-before
8663 'build 'reference-libarchive
8664 (lambda* (#:key inputs #:allow-other-keys)
8665 ;; Retain the absolute file name of libarchive.so.
8666 (let ((libarchive (assoc-ref inputs "libarchive")))
8667 (substitute* "libarchive/ffi.py"
8668 (("find_library\\('archive'\\)")
8669 (string-append "'" libarchive
8670 "/lib/libarchive.so'"))))))
8671 (replace 'check
8672 (lambda _ (invoke "pytest" "-vv"))))))
8673 (native-inputs
8674 `(("python-mock" ,python-mock)
8675 ("python-pytest" ,python-pytest)))
8676 (inputs
8677 `(("libarchive" ,libarchive)))
8678 (home-page "https://github.com/Changaco/python-libarchive-c")
8679 (synopsis "Python interface to libarchive")
8680 (description
8681 "This package provides Python bindings to libarchive, a C library to
8682 access possibly compressed archives in many different formats. It uses
8683 Python's @code{ctypes} foreign function interface (FFI).")
8684 (license license:lgpl2.0+)))
8685
8686 (define-public python2-libarchive-c
8687 (package-with-python2 python-libarchive-c))
8688
8689 (define-public python-file
8690 (package
8691 (inherit file)
8692 (name "python-file")
8693 (build-system python-build-system)
8694 (arguments
8695 '(#:tests? #f ;no tests
8696 #:configure-flags '("--single-version-externally-managed" "--root=/")
8697 #:phases (modify-phases %standard-phases
8698 (add-before 'build 'change-directory
8699 (lambda _
8700 (chdir "python")
8701 #t))
8702 (add-before 'build 'set-library-file-name
8703 (lambda* (#:key inputs #:allow-other-keys)
8704 (let ((file (assoc-ref inputs "file")))
8705 (substitute* "magic.py"
8706 (("find_library\\('magic'\\)")
8707 (string-append "'" file "/lib/libmagic.so'")))
8708 #t))))))
8709 (inputs `(("file" ,file)))
8710 (native-inputs (if (%current-target-system)
8711 `(("self" ,this-package))
8712 '()))
8713 (synopsis "Python bindings to the libmagic file type guesser. Note that
8714 this module and the python-magic module both provide a \"magic.py\" file;
8715 these two modules, which are different and were developed separately, both
8716 serve the same purpose: provide Python bindings for libmagic.")))
8717
8718 (define-public python2-file
8719 (package-with-python2 python-file))
8720
8721 (define-public python-debian
8722 (package
8723 (name "python-debian")
8724 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
8725 (version "0.1.36")
8726 (source
8727 (origin
8728 ;; Use git-fetch, as pypi doesn't include test suite.
8729 (method git-fetch)
8730 (uri (git-reference
8731 (url home-page)
8732 (commit version)))
8733 (file-name (git-file-name name version))
8734 (sha256
8735 (base32
8736 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
8737 (build-system python-build-system)
8738 (arguments
8739 `(#:phases (modify-phases %standard-phases
8740 (add-after 'unpack 'remove-debian-specific-tests
8741 ;; python-apt, apt and dpkg are not yet available in guix,
8742 ;; and these tests heavily depend on them.
8743 (lambda _
8744 (delete-file "lib/debian/tests/test_deb822.py")
8745 (delete-file "lib/debian/tests/test_debfile.py")
8746 #t)))))
8747 (propagated-inputs
8748 `(("python-six" ,python-six)
8749 ("python-chardet" ,python-chardet)))
8750 (synopsis "Debian package related modules")
8751 (description
8752 ;; XXX: Use @enumerate instead of @itemize to work around
8753 ;; <http://bugs.gnu.org/21772>.
8754 "This package provides Python modules that abstract many formats of
8755 Debian-related files, such as:
8756
8757 @enumerate
8758 @item Debtags information;
8759 @item @file{debian/changelog} files;
8760 @item packages files, pdiffs;
8761 @item control files of single or multiple RFC822-style paragraphs---e.g.
8762 @file{debian/control}, @file{.changes}, @file{.dsc};
8763 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8764 contained files and meta-information.
8765 @end enumerate\n")
8766
8767 ;; Modules are either GPLv2+ or GPLv3+.
8768 (license license:gpl3+)))
8769
8770 (define-public python-nbformat
8771 (package
8772 (name "python-nbformat")
8773 (version "4.4.0")
8774 (source
8775 (origin
8776 (method url-fetch)
8777 (uri (pypi-uri "nbformat" version))
8778 (sha256
8779 (base32
8780 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8781 (build-system python-build-system)
8782 (arguments `(#:tests? #f)) ; no test target
8783 (propagated-inputs
8784 `(("python-ipython-genutils" ,python-ipython-genutils)
8785 ("python-jsonschema" ,python-jsonschema)
8786 ("python-jupyter-core" ,python-jupyter-core)
8787 ("python-traitlets" ,python-traitlets)))
8788 (home-page "http://jupyter.org")
8789 (synopsis "Jupyter Notebook format")
8790 (description "This package provides the reference implementation of the
8791 Jupyter Notebook format and Python APIs for working with notebooks.")
8792 (license license:bsd-3)))
8793
8794 (define-public python2-nbformat
8795 (package-with-python2 python-nbformat))
8796
8797 (define-public python-bleach
8798 (package
8799 (name "python-bleach")
8800 (version "3.1.3")
8801 (source
8802 (origin
8803 (method url-fetch)
8804 (uri (pypi-uri "bleach" version))
8805 (sha256
8806 (base32
8807 "0al437aw4p2xp83az5hhlrp913nsf0cg6kg4qj3fjhv4wakxipzq"))))
8808 (build-system python-build-system)
8809 (propagated-inputs
8810 `(("python-webencodings" ,python-webencodings)
8811 ("python-six" ,python-six)))
8812 (native-inputs
8813 `(("python-datrie" ,python-datrie)
8814 ("python-genshi" ,python-genshi)
8815 ("python-lxml" ,python-lxml)
8816 ("python-pytest" ,python-pytest)))
8817 (home-page "https://github.com/mozilla/bleach")
8818 (synopsis "Whitelist-based HTML-sanitizing tool")
8819 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8820 (license license:asl2.0)))
8821
8822 (define-public python2-bleach
8823 (package-with-python2 python-bleach))
8824
8825 (define-public python-entrypoints
8826 (package
8827 (name "python-entrypoints")
8828 (version "0.3")
8829 (source
8830 (origin
8831 (method url-fetch)
8832 (uri (pypi-uri "entrypoints" version))
8833 (sha256
8834 (base32
8835 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
8836 (build-system python-build-system)
8837 ;; The package does not come with a setup.py file, so we have to generate
8838 ;; one ourselves.
8839 (arguments
8840 `(#:tests? #f
8841 #:phases
8842 (modify-phases %standard-phases
8843 (add-after 'unpack 'create-setup.py
8844 (lambda _
8845 (call-with-output-file "setup.py"
8846 (lambda (port)
8847 (format port "\
8848 from setuptools import setup
8849 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8850 " ,version))))))))
8851 (home-page "https://github.com/takluyver/entrypoints")
8852 (synopsis "Discover and load entry points from installed Python packages")
8853 (description "Entry points are a way for Python packages to advertise
8854 objects with some common interface. The most common examples are
8855 @code{console_scripts} entry points, which define shell commands by
8856 identifying a Python function to run. The @code{entrypoints} module contains
8857 functions to find and load entry points.")
8858 (license license:expat)))
8859
8860 (define-public python2-entrypoints
8861 (package-with-python2 python-entrypoints))
8862
8863 (define-public python-epc
8864 (package
8865 (name "python-epc")
8866 (version "0.0.5")
8867 (source
8868 (origin
8869 (method url-fetch)
8870 (uri (pypi-uri "epc" version))
8871 (sha256
8872 (base32
8873 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
8874 (build-system python-build-system)
8875 (propagated-inputs
8876 `(("python-sexpdata" ,python-sexpdata)))
8877 (native-inputs
8878 `(("python-nose" ,python-nose)))
8879 (home-page "https://github.com/tkf/python-epc")
8880 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
8881 (description
8882 "Python-EPC can call elisp functions from Python and Python functions
8883 from elisp.")
8884 (license license:gpl3)))
8885
8886 (define-public python-nbconvert
8887 (package
8888 (name "python-nbconvert")
8889 (version "5.0.0b1")
8890 (source
8891 (origin
8892 (method url-fetch)
8893 (uri (pypi-uri "nbconvert" version))
8894 (sha256
8895 (base32
8896 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8897 (build-system python-build-system)
8898 (arguments
8899 `(;; The "bdist_egg" target is disabled by default, causing the installation
8900 ;; to fail.
8901 #:configure-flags (list "bdist_egg")
8902 ;; FIXME: 5 failures, 40 errors.
8903 #:tests? #f))
8904 ;; #:phases
8905 ;; (modify-phases %standard-phases
8906 ;; (replace 'check
8907 ;; (lambda _
8908 ;; (zero? (system* "py.test" "-v")))))
8909 (native-inputs
8910 `(("python-pytest" ,python-pytest)))
8911 (propagated-inputs
8912 `(("python-bleach" ,python-bleach)
8913 ("python-entrypoints" ,python-entrypoints)
8914 ("python-jinja2" ,python-jinja2)
8915 ("python-jupyter-core" ,python-jupyter-core)
8916 ("python-mistune" ,python-mistune)
8917 ("python-nbformat" ,python-nbformat)
8918 ("python-pygments" ,python-pygments)
8919 ("python-traitlets" ,python-traitlets)))
8920 (home-page "http://jupyter.org")
8921 (synopsis "Converting Jupyter Notebooks")
8922 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8923 notebooks to various other formats via Jinja templates. It allows you to
8924 convert an @code{.ipynb} notebook file into various static formats including:
8925
8926 @enumerate
8927 @item HTML
8928 @item LaTeX
8929 @item PDF
8930 @item Reveal JS
8931 @item Markdown (md)
8932 @item ReStructured Text (rst)
8933 @item executable script
8934 @end enumerate\n")
8935 (license license:bsd-3)))
8936
8937 (define-public python2-nbconvert
8938 (package-with-python2 python-nbconvert))
8939
8940 (define-public python-notebook
8941 (package
8942 (name "python-notebook")
8943 (version "5.7.4")
8944 (source (origin
8945 (method url-fetch)
8946 (uri (pypi-uri "notebook" version))
8947 (sha256
8948 (base32
8949 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8950 (build-system python-build-system)
8951 (arguments
8952 `(#:phases
8953 (modify-phases %standard-phases
8954 (replace 'check
8955 (lambda _
8956 ;; These tests require a browser
8957 (delete-file-recursively "notebook/tests/selenium")
8958 ;; Some tests need HOME
8959 (setenv "HOME" "/tmp")
8960 ;; This file contains "warningfilters", which are not supported
8961 ;; by this version of nose.
8962 (delete-file "setup.cfg")
8963 (with-directory-excursion "/tmp"
8964 (invoke "nosetests" "-v"))
8965 #t)))))
8966 (propagated-inputs
8967 `(("python-jupyter-core" ,python-jupyter-core)
8968 ("python-nbformat" ,python-nbformat)
8969 ("python-nbconvert" ,python-nbconvert)
8970 ("python-prometheus-client" ,python-prometheus-client)
8971 ("python-send2trash" ,python-send2trash)
8972 ("python-terminado" ,python-terminado)))
8973 (native-inputs
8974 `(("python-nose" ,python-nose)
8975 ("python-sphinx" ,python-sphinx)
8976 ("python-requests" ,python-requests)))
8977 (home-page "http://jupyter.org/")
8978 (synopsis "Web-based notebook environment for interactive computing")
8979 (description
8980 "The Jupyter HTML notebook is a web-based notebook environment for
8981 interactive computing.")
8982 (properties `((python2-variant . ,(delay python2-notebook))))
8983 (license license:bsd-3)))
8984
8985 (define-public python2-notebook
8986 (let ((base (package-with-python2
8987 (strip-python2-variant python-notebook))))
8988 (package (inherit base)
8989 (native-inputs
8990 `(("python2-mock" ,python2-mock)
8991 ,@(package-native-inputs base)))
8992 (arguments
8993 (substitute-keyword-arguments (package-arguments base)
8994 ((#:phases phases)
8995 `(modify-phases ,phases
8996 (add-before 'check 'disable-test-case
8997 ;; The test requires network access to localhost. Curiously it
8998 ;; fails with Python 2 only. Simply make the test-case return
8999 ;; immediately.
9000 (lambda _
9001 (substitute*
9002 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9003 (("formats = self.nbconvert_api") "return #")))))))))))
9004
9005 (define-public python-widgetsnbextension
9006 (package
9007 (name "python-widgetsnbextension")
9008 (version "3.5.1")
9009 (source
9010 (origin
9011 (method url-fetch)
9012 (uri (pypi-uri "widgetsnbextension" version))
9013 (sha256
9014 (base32
9015 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9016 (build-system python-build-system)
9017 (propagated-inputs
9018 `(("python-ipykernel"
9019 ,(prompt-toolkit-2-instead-of-prompt-toolkit python-ipykernel))
9020 ("python-notebook" ,python-notebook)))
9021 (native-inputs
9022 `(("python-certifi" ,python-certifi)
9023 ("python-nose" ,python-nose)))
9024 (home-page "https://ipython.org")
9025 (synopsis "IPython HTML widgets for Jupyter")
9026 (description "This package provides interactive HTML widgets for Jupyter
9027 notebooks.")
9028 (license license:bsd-3)))
9029
9030 (define-public python2-widgetsnbextension
9031 (package-with-python2 python-widgetsnbextension))
9032
9033 (define-public python-ipywidgets
9034 (package
9035 (name "python-ipywidgets")
9036 (version "7.5.1")
9037 (source
9038 (origin
9039 (method url-fetch)
9040 (uri (pypi-uri "ipywidgets" version))
9041 (sha256
9042 (base32
9043 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
9044 (build-system python-build-system)
9045 (propagated-inputs
9046 `(("python-ipython" ,(prompt-toolkit-2-instead-of-prompt-toolkit
9047 python-ipython))
9048 ("python-traitlets" ,python-traitlets)
9049 ("python-widgetsnbextension" ,python-widgetsnbextension)))
9050 (native-inputs
9051 `(("python-nose" ,python-nose)
9052 ("python-pytest" ,python-pytest)))
9053 (home-page "https://ipython.org")
9054 (synopsis "IPython HTML widgets for Jupyter")
9055 (description "Ipywidgets are interactive HTML widgets for Jupyter
9056 notebooks and the IPython kernel. Notebooks come alive when interactive
9057 widgets are used. Users gain control of their data and can visualize changes
9058 in the data.")
9059 (license license:bsd-3)))
9060
9061 (define-public python2-ipywidgets
9062 (package-with-python2 python-ipywidgets))
9063
9064 (define-public python-jupyter-console
9065 (package
9066 (name "python-jupyter-console")
9067 (version "6.1.0")
9068 (source
9069 (origin
9070 (method url-fetch)
9071 (uri (pypi-uri "jupyter_console" version))
9072 (sha256
9073 (base32
9074 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
9075 (build-system python-build-system)
9076 (propagated-inputs
9077 `(("python-ipykernel" ,(prompt-toolkit-2-instead-of-prompt-toolkit
9078 python-ipykernel))
9079 ("python-jupyter-client" ,python-jupyter-client)
9080 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
9081 ("python-pygments" ,python-pygments)))
9082 (native-inputs
9083 `(("python-nose" ,python-nose)))
9084 (home-page "https://jupyter.org")
9085 (synopsis "Jupyter terminal console")
9086 (description "This package provides a terminal-based console frontend for
9087 Jupyter kernels. It also allows for console-based interaction with non-Python
9088 Jupyter kernels such as IJulia and IRKernel.")
9089 (properties `((python2-variant . ,(delay python2-jupyter-console))))
9090 (license license:bsd-3)))
9091
9092 (define-public python2-jupyter-console
9093 (package
9094 (name "python2-jupyter-console")
9095 (version "5.2.0")
9096 (source
9097 (origin
9098 (method url-fetch)
9099 (uri (pypi-uri "jupyter_console" version))
9100 (sha256
9101 (base32
9102 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
9103 (build-system python-build-system)
9104 (arguments
9105 `(#:python ,python-2
9106 #:tests? #f)) ; Tests only run in a TTY.
9107 (propagated-inputs
9108 `(("python2-ipykernel" ,python2-ipykernel)
9109 ("python2-jupyter-client" ,python2-jupyter-client)
9110 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
9111 ("python2-pygments" ,python2-pygments)))
9112 (native-inputs
9113 `(("python2-nose" ,python2-nose)))
9114 (home-page "https://jupyter.org")
9115 (synopsis "Jupyter terminal console")
9116 (description "This package provides a terminal-based console frontend for
9117 Jupyter kernels. It also allows for console-based interaction with non-Python
9118 Jupyter kernels such as IJulia and IRKernel.")
9119 (license license:bsd-3)))
9120
9121 ;; The python-ipython and python-jupyter-console require each other. To get
9122 ;; the functionality in both packages working, strip down the
9123 ;; python-jupyter-console package when using it as an input to python-ipython.
9124 (define python-jupyter-console-minimal
9125 (package
9126 (inherit python-jupyter-console)
9127 (name "python-jupyter-console-minimal")
9128 (arguments
9129 (substitute-keyword-arguments
9130 (package-arguments python-jupyter-console)
9131 ((#:phases phases)
9132 `(modify-phases ,phases
9133 (add-after 'install 'delete-bin
9134 (lambda* (#:key outputs #:allow-other-keys)
9135 ;; Delete the bin files, to avoid conflicts in profiles
9136 ;; where python-ipython and python-jupyter-console are
9137 ;; both present.
9138 (delete-file-recursively
9139 (string-append
9140 (assoc-ref outputs "out") "/bin"))))))))
9141 ;; Remove the python-ipython propagated input, to avoid the cycle
9142 (propagated-inputs
9143 (alist-delete
9144 "python-ipython"
9145 (package-propagated-inputs python-jupyter-console)))))
9146
9147 (define-public python-qtconsole
9148 (package
9149 (name "python-qtconsole")
9150 (version "4.4.3")
9151 (source
9152 (origin
9153 (method url-fetch)
9154 (uri (pypi-uri "qtconsole" version))
9155 (sha256
9156 (base32
9157 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
9158 (build-system python-build-system)
9159 (arguments
9160 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
9161 ;; but we only have the LTS version 5.x. This means that there might be
9162 ;; runtime errors, but since this is a dependency of the Jupyter package,
9163 ;; and Jupyter can be used without the qtconsole we can overlook this for
9164 ;; now.
9165 `(#:tests? #f
9166 #:phases
9167 (modify-phases %standard-phases
9168 (add-before 'check 'pre-check
9169 (lambda _
9170 (setenv "QT_QPA_PLATFORM" "offscreen")
9171 #t)))))
9172 (propagated-inputs
9173 `(("python-ipykernel" ,python-ipykernel)
9174 ("python-ipython" ,python-ipython)))
9175 (native-inputs
9176 `(("python-pytest" ,python-pytest)))
9177 (home-page "http://jupyter.org")
9178 (synopsis "Jupyter Qt console")
9179 (description "This package provides a Qt-based console for Jupyter with
9180 support for rich media output.")
9181 (license license:bsd-3)))
9182
9183 (define-public python-jsbeautifier
9184 (package
9185 (name "python-jsbeautifier")
9186 (version "1.10.2")
9187 (home-page "https://github.com/beautify-web/js-beautify")
9188 (source (origin
9189 (method git-fetch)
9190 (uri (git-reference
9191 (url home-page)
9192 (commit (string-append "v" version))))
9193 (file-name (git-file-name name version))
9194 (sha256
9195 (base32
9196 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
9197 (build-system python-build-system)
9198 (arguments
9199 `(#:phases (modify-phases %standard-phases
9200 (add-after 'unpack 'chdir
9201 (lambda _
9202 ;; The upstream Git repository contains all the code,
9203 ;; but this package only builds the python code.
9204 (chdir "python")
9205 #t))
9206 (add-after 'unpack 'patch-python-six-requirements
9207 (lambda _
9208 (substitute* "python/setup.py"
9209 (("six>=1.12.0")
9210 "six>=1.11.0"))
9211 #t)))))
9212 (propagated-inputs
9213 `(("python-editorconfig" ,python-editorconfig)
9214 ("python-six" ,python-six)))
9215 (native-inputs
9216 `(("python-pytest" ,python-pytest)))
9217 (synopsis "JavaScript unobfuscator and beautifier")
9218 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
9219 popular online obfuscators.")
9220 (license license:expat)))
9221
9222 (define-public jupyter
9223 (package
9224 (name "jupyter")
9225 (version "1.0.0")
9226 (source
9227 (origin
9228 (method url-fetch)
9229 (uri (pypi-uri "jupyter" version))
9230 (sha256
9231 (base32
9232 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
9233 (build-system python-build-system)
9234 (arguments '(#:tests? #f)) ; there are none.
9235 (propagated-inputs
9236 `(("python-ipykernel" ,python-ipykernel)
9237 ("python-ipywidgets" ,python-ipywidgets)
9238 ("python-jupyter-console" ,python-jupyter-console)
9239 ("python-nbconvert" ,python-nbconvert)
9240 ("python-notebook" ,python-notebook)
9241 ("python-qtconsole" ,python-qtconsole)))
9242 (native-search-paths
9243 (list (search-path-specification
9244 (variable "JUPYTER_PATH")
9245 (files '("share/jupyter")))))
9246 (home-page "https://jupyter.org")
9247 (synopsis "Web application for interactive documents")
9248 (description
9249 "The Jupyter Notebook is a web application that allows you to create and
9250 share documents that contain live code, equations, visualizations and
9251 explanatory text. Uses include: data cleaning and transformation, numerical
9252 simulation, statistical modeling, machine learning and much more.")
9253 (license license:bsd-3)))
9254
9255 (define-public python-chardet
9256 (package
9257 (name "python-chardet")
9258 (version "3.0.4")
9259 (source
9260 (origin
9261 (method url-fetch)
9262 (uri (pypi-uri "chardet" version))
9263 (sha256
9264 (base32
9265 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
9266 (native-inputs
9267 `(("python-hypothesis" ,python-hypothesis)
9268 ("python-pytest" ,python-pytest)
9269 ("python-pytest-runner" ,python-pytest-runner)))
9270 (build-system python-build-system)
9271 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
9272 (arguments `(#:tests? #f))
9273 (home-page "https://github.com/chardet/chardet")
9274 (synopsis "Universal encoding detector for Python 2 and 3")
9275 (description
9276 "This package provides @code{chardet}, a Python module that can
9277 automatically detect a wide range of file encodings.")
9278 (license license:lgpl2.1+)))
9279
9280 (define-public python2-chardet
9281 (package-with-python2 python-chardet))
9282
9283 (define-public python-docopt
9284 (package
9285 (name "python-docopt")
9286 (version "0.6.2")
9287 (source
9288 (origin
9289 (method git-fetch)
9290 ;; The release on PyPI does not include tests.
9291 (uri (git-reference
9292 (url "https://github.com/docopt/docopt")
9293 (commit version)))
9294 (file-name (git-file-name name version))
9295 (sha256
9296 (base32
9297 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
9298 (build-system python-build-system)
9299 (native-inputs
9300 `(("python-pytest" ,python-pytest)))
9301 (arguments
9302 `(#:phases
9303 (modify-phases %standard-phases
9304 (replace 'check
9305 (lambda _ (invoke "py.test"))))))
9306 (home-page "http://docopt.org")
9307 (synopsis "Command-line interface description language for Python")
9308 (description "This library allows the user to define a command-line
9309 interface from a program's help message rather than specifying it
9310 programmatically with command-line parsers like @code{getopt} and
9311 @code{argparse}.")
9312 (license license:expat)))
9313
9314 (define-public python2-docopt
9315 (package-with-python2 python-docopt))
9316
9317 (define-public python-pythondialog
9318 (package
9319 (name "python-pythondialog")
9320 (version "3.4.0")
9321 (source
9322 (origin
9323 (method url-fetch)
9324 (uri (pypi-uri "pythondialog" version))
9325 (sha256
9326 (base32
9327 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
9328 (build-system python-build-system)
9329 (arguments
9330 `(#:phases
9331 (modify-phases %standard-phases
9332 (add-after 'unpack 'patch-path
9333 (lambda* (#:key inputs #:allow-other-keys)
9334 (let* ((dialog (assoc-ref inputs "dialog")))
9335 ;; Since this library really wants to grovel the search path, we
9336 ;; must hardcode dialog's store path into it.
9337 (substitute* "dialog.py"
9338 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
9339 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
9340 #t))))
9341 #:tests? #f)) ; no test suite
9342 (propagated-inputs
9343 `(("dialog" ,dialog)))
9344 (home-page "http://pythondialog.sourceforge.net/")
9345 (synopsis "Python interface to the UNIX dialog utility")
9346 (description "A Python wrapper for the dialog utility. Its purpose is to
9347 provide an easy to use, pythonic and comprehensive Python interface to dialog.
9348 This allows one to make simple text-mode user interfaces on Unix-like systems")
9349 (license license:lgpl2.1)
9350 (properties `((python2-variant . ,(delay python2-pythondialog))))))
9351
9352 (define-public python2-pythondialog
9353 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
9354 (package
9355 (inherit base)
9356 (version (package-version python-pythondialog))
9357 (source (origin
9358 (method url-fetch)
9359 (uri (pypi-uri "python2-pythondialog" version))
9360 (sha256
9361 (base32
9362 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
9363
9364 (define-public python-configobj
9365 (package
9366 (name "python-configobj")
9367 (version "5.0.6")
9368 (source (origin
9369 (method url-fetch)
9370 (uri (pypi-uri "configobj" version))
9371 (sha256
9372 (base32
9373 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9374 ;; Patch setup.py so it looks for python-setuptools, which is
9375 ;; required to parse the keyword 'install_requires' in setup.py.
9376 (patches (search-patches "python-configobj-setuptools.patch"))))
9377 (build-system python-build-system)
9378 (propagated-inputs
9379 `(("python-six" ,python-six)))
9380 (synopsis "Config file reading, writing and validation")
9381 (description "ConfigObj is a simple but powerful config file reader and
9382 writer: an ini file round tripper. Its main feature is that it is very easy to
9383 use, with a straightforward programmer’s interface and a simple syntax for
9384 config files.")
9385 (home-page "https://github.com/DiffSK/configobj")
9386 (license license:bsd-3)))
9387
9388 (define-public python2-configobj
9389 (package-with-python2 python-configobj))
9390
9391 (define-public python-configargparse
9392 (package
9393 (name "python-configargparse")
9394 (version "0.14.0")
9395 (source (origin
9396 (method url-fetch)
9397 (uri (pypi-uri "ConfigArgParse" version))
9398 (sha256
9399 (base32
9400 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
9401 (build-system python-build-system)
9402 (native-inputs
9403 `(("python-pyyaml" ,python-pyyaml)))
9404 (arguments
9405 `(#:phases
9406 (modify-phases %standard-phases
9407 (replace 'check
9408 (lambda _
9409 ;; Bypass setuptools-shim because one test relies on "setup.py"
9410 ;; being the first argument passed to the python call.
9411 ;;
9412 ;; NOTE: Many tests do not run because they rely on Python's
9413 ;; built-in test.test_argparse, but we remove the unit tests from
9414 ;; our Python installation.
9415 (invoke "python" "setup.py" "test"))))))
9416 (synopsis "Replacement for argparse")
9417 (description "A drop-in replacement for argparse that allows options to also
9418 be set via config files and/or environment variables.")
9419 (home-page "https://github.com/bw2/ConfigArgParse")
9420 (license license:expat)))
9421
9422 (define-public python2-configargparse
9423 (package-with-python2 python-configargparse))
9424
9425 (define-public python-argparse-manpage
9426 (package
9427 (name "python-argparse-manpage")
9428 (version "1.1")
9429 (source
9430 (origin
9431 (method url-fetch)
9432 (uri (pypi-uri "argparse-manpage" version))
9433 (sha256
9434 (base32
9435 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
9436 (build-system python-build-system)
9437 (home-page "https://github.com/praiskup/argparse-manpage")
9438 (synopsis "Build manual page from Python's ArgumentParser object")
9439 (description
9440 "This package provides tools to build manual pages from Python's
9441 @code{ArgumentParser} object.")
9442 (license license:asl2.0)))
9443
9444 (define-public python-contextlib2
9445 (package
9446 (name "python-contextlib2")
9447 (version "0.6.0.post1")
9448 (source
9449 (origin
9450 (method url-fetch)
9451 (uri (pypi-uri "contextlib2" version))
9452 (sha256
9453 (base32
9454 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
9455 (build-system python-build-system)
9456 (home-page "https://contextlib2.readthedocs.org/")
9457 (synopsis "Tools for decorators and context managers")
9458 (description "This module is primarily a backport of the Python
9459 3.2 contextlib to earlier Python versions. Like contextlib, it
9460 provides utilities for common tasks involving decorators and context
9461 managers. It also contains additional features that are not part of
9462 the standard library.")
9463 (properties `((python2-variant . ,(delay python2-contextlib2))))
9464 (license license:psfl)))
9465
9466 (define-public python2-contextlib2
9467 (let ((base (package-with-python2
9468 (strip-python2-variant python-contextlib2))))
9469 (package
9470 (inherit base)
9471 (arguments
9472 (substitute-keyword-arguments (package-arguments base)
9473 ((#:phases phases)
9474 `(modify-phases ,phases
9475 (replace 'check
9476 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
9477 (native-inputs
9478 `(("python2-unittest2" ,python2-unittest2))))))
9479
9480 ;; This package is used by python2-pytest via python2-importlib-metadata,
9481 ;; and thus can not depend on python-unittest2 (which depends on pytest).
9482 (define-public python2-contextlib2-bootstrap
9483 (hidden-package
9484 (package/inherit
9485 python2-contextlib2
9486 (name "python2-contextlib2-bootstrap")
9487 (arguments
9488 `(#:tests? #f
9489 ,@(package-arguments python2-contextlib2)))
9490 (native-inputs '()))))
9491
9492 (define-public python-texttable
9493 (package
9494 (name "python-texttable")
9495 (version "1.6.2")
9496 (source
9497 (origin
9498 (method url-fetch)
9499 (uri (pypi-uri "texttable" version))
9500 (sha256
9501 (base32
9502 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
9503 (build-system python-build-system)
9504 (arguments
9505 `(#:phases
9506 (modify-phases %standard-phases
9507 (replace 'check
9508 (lambda _ (invoke "pytest" "tests.py"))))))
9509 (native-inputs
9510 `(("python-pytest" ,python-pytest)))
9511 (home-page "https://github.com/foutaise/texttable/")
9512 (synopsis "Python module for creating simple ASCII tables")
9513 (description "Texttable is a Python module for creating simple ASCII
9514 tables.")
9515 (license license:expat)))
9516
9517 (define-public python2-texttable
9518 (package-with-python2 python-texttable))
9519
9520 (define-public python-atomicwrites
9521 (package
9522 (name "python-atomicwrites")
9523 (version "1.3.0")
9524 (source (origin
9525 (method url-fetch)
9526 (uri (pypi-uri "atomicwrites" version))
9527 (sha256
9528 (base32
9529 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
9530 (build-system python-build-system)
9531 (synopsis "Atomic file writes in Python")
9532 (description "Library for atomic file writes using platform dependent tools
9533 for atomic file system operations.")
9534 (home-page "https://github.com/untitaker/python-atomicwrites")
9535 (license license:expat)))
9536
9537 (define-public python2-atomicwrites
9538 (package-with-python2 python-atomicwrites))
9539
9540 (define-public python-click-threading
9541 (package
9542 (name "python-click-threading")
9543 (version "0.4.4")
9544 (source (origin
9545 (method url-fetch)
9546 (uri (pypi-uri "click-threading" version))
9547 (sha256
9548 (base32
9549 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
9550 (build-system python-build-system)
9551 (propagated-inputs
9552 `(("python-click" ,python-click)))
9553 (synopsis "Utilities for multithreading in Click")
9554 (description "This package provides utilities for multithreading in Click
9555 applications.")
9556 (home-page "https://github.com/click-contrib/click-threading")
9557 (license license:expat)))
9558
9559 (define-public python-click-log
9560 (package
9561 (name "python-click-log")
9562 (version "0.3.2")
9563 (source (origin
9564 (method url-fetch)
9565 (uri (pypi-uri "click-log" version))
9566 (sha256
9567 (base32
9568 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
9569 (build-system python-build-system)
9570 (propagated-inputs
9571 `(("python-click" ,python-click)))
9572 (synopsis "Logging for click applications")
9573 (description "This package provides a Python library for logging Click
9574 applications.")
9575 (home-page "https://github.com/click-contrib/click-log")
9576 (license license:expat)))
9577
9578 (define-public python-apipkg
9579 (package
9580 (name "python-apipkg")
9581 (version "1.5")
9582 (source (origin
9583 (method url-fetch)
9584 (uri (pypi-uri "apipkg" version))
9585 (sha256
9586 (base32
9587 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
9588 (build-system python-build-system)
9589 (native-inputs
9590 `(("python-pytest" ,python-pytest)
9591 ("python-setuptools-scm" ,python-setuptools-scm)))
9592 (synopsis "Namespace control and lazy-import mechanism")
9593 (description "With apipkg you can control the exported namespace of a Python
9594 package and greatly reduce the number of imports for your users. It is a small
9595 pure Python module that works on virtually all Python versions.")
9596 (home-page "https://github.com/pytest-dev/apipkg")
9597 (license license:expat)))
9598
9599 (define-public python-execnet
9600 (package
9601 (name "python-execnet")
9602 (version "1.4.1")
9603 (source (origin
9604 (method url-fetch)
9605 (uri (pypi-uri "execnet" version))
9606 (sha256
9607 (base32
9608 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9609 (build-system python-build-system)
9610 (arguments
9611 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9612 ;; The two test failures are caused by the lack of an `ssh` executable.
9613 ;; The test suite can be run with pytest after the 'install' phase.
9614 #:tests? #f))
9615 (native-inputs
9616 `(("python-pytest" ,python-pytest)
9617 ("python-setuptools-scm" ,python-setuptools-scm)))
9618 (propagated-inputs
9619 `(("python-apipkg" ,python-apipkg)))
9620 (synopsis "Rapid multi-Python deployment")
9621 (description "Execnet provides a share-nothing model with
9622 channel-send/receive communication for distributing execution across many
9623 Python interpreters across version, platform and network barriers. It has a
9624 minimal and fast API targeting the following uses:
9625 @enumerate
9626 @item distribute tasks to (many) local or remote CPUs
9627 @item write and deploy hybrid multi-process applications
9628 @item write scripts to administer multiple environments
9629 @end enumerate")
9630 (home-page "https://codespeak.net/execnet/")
9631 (license license:expat)))
9632
9633 (define-public python2-execnet
9634 (package-with-python2 python-execnet))
9635
9636 (define-public python-icalendar
9637 (package
9638 (name "python-icalendar")
9639 (version "4.0.5")
9640 (source (origin
9641 (method url-fetch)
9642 (uri (pypi-uri "icalendar" version))
9643 (sha256
9644 (base32
9645 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
9646 (build-system python-build-system)
9647 (propagated-inputs
9648 `(("python-dateutil" ,python-dateutil)
9649 ("python-pytz" ,python-pytz)))
9650 (synopsis "Python library for parsing iCalendar files")
9651 (description "The icalendar package is a parser/generator of iCalendar
9652 files for use with Python.")
9653 (home-page "https://github.com/collective/icalendar")
9654 (license license:bsd-2)))
9655
9656 (define-public python-args
9657 (package
9658 (name "python-args")
9659 (version "0.1.0")
9660 (source (origin
9661 (method url-fetch)
9662 (uri (pypi-uri "args" version))
9663 (sha256
9664 (base32
9665 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9666 (build-system python-build-system)
9667 (home-page "https://github.com/kennethreitz/args")
9668 (synopsis "Command-line argument parser")
9669 (description
9670 "This library provides a Python module to parse command-line arguments.")
9671 (license license:bsd-3)))
9672
9673 (define-public python2-args
9674 (package-with-python2 python-args))
9675
9676 (define-public python-clint
9677 (package
9678 (name "python-clint")
9679 (version "0.5.1")
9680 (source (origin
9681 (method url-fetch)
9682 (uri (pypi-uri "clint" version))
9683 (sha256
9684 (base32
9685 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9686 (build-system python-build-system)
9687 (arguments
9688 '(#:phases
9689 (modify-phases %standard-phases
9690 (replace 'check
9691 (lambda _ (invoke "py.test" "-v"))))))
9692 (native-inputs
9693 `(("python-pytest" ,python-pytest)))
9694 (propagated-inputs
9695 `(("python-args" ,python-args)))
9696 (home-page "https://github.com/kennethreitz/clint")
9697 (synopsis "Command-line interface tools")
9698 (description
9699 "Clint is a Python module filled with a set of tools for developing
9700 command-line applications, including tools for colored and indented
9701 output, progress bar display, and pipes.")
9702 (license license:isc)))
9703
9704 (define-public python2-clint
9705 (package-with-python2 python-clint))
9706
9707 (define-public python-rply
9708 (package
9709 (name "python-rply")
9710 (version "0.7.5")
9711 (source (origin
9712 (method url-fetch)
9713 (uri (pypi-uri "rply" version))
9714 (sha256
9715 (base32
9716 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9717 (build-system python-build-system)
9718 (propagated-inputs
9719 `(("python-appdirs" ,python-appdirs)))
9720 (home-page "https://github.com/alex/rply")
9721 (synopsis "Parser generator for Python")
9722 (description
9723 "This package provides a pure Python based parser generator, that also
9724 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9725 with a new public API, and RPython support.")
9726 (license license:bsd-3)))
9727
9728 (define-public python2-rply
9729 (package-with-python2 python-rply))
9730
9731 (define-public python-hy
9732 (package
9733 (name "python-hy")
9734 (version "0.18.0")
9735 (source (origin
9736 (method url-fetch)
9737 (uri (pypi-uri "hy" version))
9738 (sha256
9739 (base32
9740 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
9741 (build-system python-build-system)
9742 (arguments
9743 '(#:phases
9744 (modify-phases %standard-phases
9745 (add-before 'install 'set-HOME
9746 (lambda _
9747 (setenv "HOME" "/tmp") #t))
9748 (replace 'check
9749 (lambda _
9750 ;; Tests require write access to HOME.
9751 (setenv "HOME" "/tmp")
9752 (invoke "nosetests"))))))
9753 (native-inputs
9754 `(("python-coverage" ,python-coverage)
9755 ("python-nose" ,python-nose)))
9756 (propagated-inputs
9757 `(("python-astor" ,python-astor)
9758 ("python-colorama" ,python-colorama)
9759 ("python-rply" ,python-rply)
9760 ("python-funcparserlib"
9761 ,python-funcparserlib)))
9762 (home-page "http://hylang.org/")
9763 (synopsis "Lisp frontend to Python")
9764 (description
9765 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9766 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9767 Python at your fingertips, in Lisp form.")
9768 (license license:expat)))
9769
9770 (define-public python2-functools32
9771 (package
9772 (name "python2-functools32")
9773 (version "3.2.3-2")
9774 (source
9775 (origin
9776 (method url-fetch)
9777 (uri (pypi-uri "functools32" version))
9778 (sha256
9779 (base32
9780 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9781 (build-system python-build-system)
9782 (arguments
9783 `(#:python ,python-2
9784 #:tests? #f)) ; no test target
9785 (home-page "https://github.com/MiCHiLU/python-functools32")
9786 (synopsis
9787 "Backport of the functools module from Python 3.2.3")
9788 (description
9789 "This package is a backport of the @code{functools} module from Python
9790 3.2.3 for use with older versions of Python and PyPy.")
9791 (license license:expat)))
9792
9793 (define-public python2-subprocess32
9794 (package
9795 (name "python2-subprocess32")
9796 (version "3.2.7")
9797 (source (origin
9798 (method url-fetch)
9799 (uri (pypi-uri "subprocess32" version))
9800 (sha256
9801 (base32
9802 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9803 (patches
9804 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9805 (build-system python-build-system)
9806 (arguments
9807 `(#:python ,python-2
9808 ;; The test suite fails with Python > 2.7.13:
9809 ;; import test.support
9810 ;; ImportError: No module named support
9811 #:tests? #f
9812 #:phases
9813 (modify-phases %standard-phases
9814 (add-after 'unpack 'patch-/bin/sh
9815 (lambda _
9816 (substitute* '("subprocess32.py"
9817 "test_subprocess32.py")
9818 (("/bin/sh") (which "sh")))
9819 #t)))))
9820 (home-page "https://github.com/google/python-subprocess32")
9821 (synopsis "Backport of the subprocess module from Python 3.2")
9822 (description
9823 "This is a backport of the @code{subprocess} standard library module
9824 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9825 new features. On POSIX systems it is guaranteed to be reliable when used
9826 in threaded applications. It includes timeout support from Python 3.3 but
9827 otherwise matches 3.2’s API.")
9828 (license license:psfl)))
9829
9830 (define-public python2-futures
9831 (package
9832 (name "python2-futures")
9833 (version "3.2.0")
9834 (source
9835 (origin
9836 (method url-fetch)
9837 (uri (pypi-uri "futures" version))
9838 (sha256
9839 (base32
9840 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9841 (build-system python-build-system)
9842 (arguments
9843 `(#:python ,python-2
9844 #:phases
9845 (modify-phases %standard-phases
9846 (replace 'check
9847 (lambda _
9848 (invoke "python" "test_futures.py")
9849 #t)))))
9850 (home-page "https://github.com/agronholm/pythonfutures")
9851 (synopsis
9852 "Backport of the concurrent.futures package from Python 3.2")
9853 (description
9854 "The concurrent.futures module provides a high-level interface for
9855 asynchronously executing callables. This package backports the
9856 concurrent.futures package from Python 3.2")
9857 (license license:bsd-3)))
9858
9859 (define-public python-promise
9860 (package
9861 (name "python-promise")
9862 (version "0.4.2")
9863 (source
9864 (origin
9865 (method url-fetch)
9866 (uri (pypi-uri "promise" version))
9867 (sha256
9868 (base32
9869 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9870 (build-system python-build-system)
9871 ;; Tests wants python-futures, which is a python2 only program, and
9872 ;; can't be found by python-promise at test time.
9873 (arguments `(#:tests? #f))
9874 (home-page "https://github.com/syrusakbary/promise")
9875 (synopsis "Promises/A+ implementation for Python")
9876 (description
9877 "Promises/A+ implementation for Python")
9878 (properties `((python2-variant . ,(delay python2-promise))))
9879 (license license:expat)))
9880
9881 (define-public python2-promise
9882 (let ((promise (package-with-python2
9883 (strip-python2-variant python-promise))))
9884 (package (inherit promise)
9885 (arguments (substitute-keyword-arguments (package-arguments promise)
9886 ((#:tests? _) #t)))
9887 (native-inputs
9888 `(("python2-futures" ,python2-futures)
9889 ("python2-pytest" ,python2-pytest)
9890 ,@(package-native-inputs promise))))))
9891
9892 (define-public python-progressbar33
9893 (package
9894 (name "python-progressbar33")
9895 (version "2.4")
9896 (source
9897 (origin
9898 (method url-fetch)
9899 (uri (pypi-uri "progressbar33" version))
9900 (sha256
9901 (base32
9902 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
9903 (build-system python-build-system)
9904 (home-page "http://github.com/germangh/python-progressbar")
9905 (synopsis "Text progress bar library for Python")
9906 (description
9907 "This package provides a text progress bar library for Python. This
9908 version only differs from the original @code{progressbar} package in that it
9909 uses relative package imports instead of absolute imports, which is necessary
9910 for the module to work under Python 3.3.")
9911 ;; Either or both of these licenses may be selected.
9912 (license (list license:lgpl2.1+ license:bsd-3))))
9913
9914 (define-public python-colorama
9915 (package
9916 (name "python-colorama")
9917 (version "0.4.3")
9918 (source
9919 (origin
9920 (method url-fetch)
9921 (uri (pypi-uri "colorama" version))
9922 (sha256
9923 (base32
9924 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
9925 (build-system python-build-system)
9926 (synopsis "Colored terminal text rendering for Python")
9927 (description "Colorama is a Python library for rendering colored terminal
9928 text.")
9929 (home-page "https://pypi.org/project/colorama/")
9930 (license license:bsd-3)))
9931
9932 (define-public python2-colorama
9933 (package-with-python2 python-colorama))
9934
9935 (define-public python-rsa
9936 (package
9937 (name "python-rsa")
9938 (version "3.4.2")
9939 (source
9940 (origin
9941 (method url-fetch)
9942 (uri (pypi-uri "rsa" version))
9943 (sha256
9944 (base32
9945 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9946 (build-system python-build-system)
9947 (propagated-inputs
9948 `(("python-pyasn1" ,python-pyasn1)))
9949 (synopsis "Pure-Python RSA implementation")
9950 (description "Python-RSA is a pure-Python RSA implementation. It supports
9951 encryption and decryption, signing and verifying signatures, and key
9952 generation according to PKCS#1 version 1.5. It can be used as a Python
9953 library as well as on the command line.")
9954 (home-page "https://stuvel.eu/rsa")
9955 (license license:asl2.0)))
9956
9957 (define-public python2-rsa
9958 (package-with-python2 python-rsa))
9959
9960 (define-public python-pluggy
9961 (package
9962 (name "python-pluggy")
9963 (version "0.13.1")
9964 (source
9965 (origin
9966 (method url-fetch)
9967 (uri (pypi-uri "pluggy" version))
9968 (sha256
9969 (base32
9970 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
9971 (build-system python-build-system)
9972 (native-inputs
9973 `(("python-setuptools-scm" ,python-setuptools-scm)))
9974 (synopsis "Plugin and hook calling mechanism for Python")
9975 (description "Pluggy is an extraction of the plugin manager as used by
9976 Pytest but stripped of Pytest specific details.")
9977 (home-page "https://pypi.org/project/pluggy/")
9978 (properties `((python2-variant . ,(delay python2-pluggy))))
9979 (license license:expat)))
9980
9981 (define-public python2-pluggy
9982 (let ((base (package-with-python2 (strip-python2-variant
9983 python-pluggy))))
9984 (package/inherit
9985 base
9986 (propagated-inputs
9987 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
9988
9989 ;; This package requires python2-importlib-metadata, but that package
9990 ;; ends up needing python2-pluggy via python2-pytest, so we need this
9991 ;; variant to solve the circular dependency.
9992 (define-public python2-pluggy-bootstrap
9993 (hidden-package
9994 (package/inherit
9995 python2-pluggy
9996 (name "python2-pluggy-bootstrap")
9997 (arguments
9998 `(#:tests? #f
9999 ,@(package-arguments python2-pluggy)))
10000 (propagated-inputs
10001 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10002
10003 (define-public python-tox
10004 (package
10005 (name "python-tox")
10006 (version "2.8.1")
10007 (source
10008 (origin
10009 (method url-fetch)
10010 (uri (pypi-uri "tox" version))
10011 (sha256
10012 (base32
10013 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
10014 (build-system python-build-system)
10015 (arguments
10016 ;; FIXME: Tests require pytest-timeout, which itself requires
10017 ;; pytest>=2.8.0 for installation.
10018 '(#:tests? #f))
10019 (propagated-inputs
10020 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
10021 ("python-py" ,python-py)
10022 ("python-virtualenv" ,python-virtualenv)))
10023 (native-inputs
10024 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
10025 ("python-pytest" ,python-pytest) ; >= 2.3.5
10026 ("python-setuptools-scm" ,python-setuptools-scm)))
10027 (home-page "https://tox.readthedocs.io")
10028 (synopsis "Virtualenv-based automation of test activities")
10029 (description "Tox is a generic virtualenv management and test command line
10030 tool. It can be used to check that a package installs correctly with
10031 different Python versions and interpreters, or run tests in each type of
10032 supported environment, or act as a frontend to continuous integration
10033 servers.")
10034 (license license:expat)))
10035
10036 (define-public python2-tox
10037 (package-with-python2 python-tox))
10038
10039 (define-public python-jmespath
10040 (package
10041 (name "python-jmespath")
10042 (version "0.9.4")
10043 (source
10044 (origin
10045 (method url-fetch)
10046 (uri (pypi-uri "jmespath" version))
10047 (sha256
10048 (base32
10049 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
10050 (build-system python-build-system)
10051 (native-inputs
10052 `(("python-nose" ,python-nose)))
10053 (synopsis "JSON Matching Expressions")
10054 (description "JMESPath (pronounced “james path”) is a Python library that
10055 allows one to declaratively specify how to extract elements from a JSON
10056 document.")
10057 (home-page "https://github.com/jmespath/jmespath.py")
10058 (license license:expat)))
10059
10060 (define-public python2-jmespath
10061 (package-with-python2 python-jmespath))
10062
10063 (define-public python-botocore
10064 (package
10065 (name "python-botocore")
10066 (version "1.15.26")
10067 (source
10068 (origin
10069 (method url-fetch)
10070 (uri (pypi-uri "botocore" version))
10071 (sha256
10072 (base32
10073 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
10074 (build-system python-build-system)
10075 (arguments
10076 ;; FIXME: Many tests are failing.
10077 '(#:tests? #f))
10078 (propagated-inputs
10079 `(("python-dateutil" ,python-dateutil)
10080 ("python-docutils" ,python-docutils)
10081 ("python-jmespath" ,python-jmespath)))
10082 (native-inputs
10083 `(("python-mock" ,python-mock)
10084 ("python-nose" ,python-nose)
10085 ("behave" ,behave)
10086 ("python-tox" ,python-tox)
10087 ("python-urllib3" ,python-urllib3)
10088 ("python-wheel" ,python-wheel)))
10089 (home-page "https://github.com/boto/botocore")
10090 (synopsis "Low-level interface to AWS")
10091 (description "Botocore is a Python library that provides a low-level
10092 interface to the Amazon Web Services (AWS) API.")
10093 (license license:asl2.0)))
10094
10095 (define-public python2-botocore
10096 (package-with-python2 python-botocore))
10097
10098 (define-public python-xdo
10099 (package
10100 (name "python-xdo")
10101 (version "0.3")
10102 (source (origin
10103 (method url-fetch)
10104 (uri (string-append
10105 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10106 "python-xdo_" version ".orig.tar.gz"))
10107 (sha256
10108 (base32
10109 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
10110 (build-system python-build-system)
10111 (arguments
10112 '(#:phases
10113 (modify-phases %standard-phases
10114 (add-before 'install 'patch-libxdo-path
10115 ;; Hardcode the path of dynamically loaded libxdo library.
10116 (lambda* (#:key inputs #:allow-other-keys)
10117 (let ((libxdo (string-append
10118 (assoc-ref inputs "xdotool")
10119 "/lib/libxdo.so")))
10120 (substitute* "xdo/_xdo.py"
10121 (("find_library\\(\"xdo\"\\)")
10122 (simple-format #f "\"~a\"" libxdo)))
10123 #t))))
10124 #:tests? #f)) ; no tests provided
10125 (propagated-inputs
10126 `(("python-six" ,python-six)))
10127 (inputs
10128 `(("xdotool" ,xdotool)
10129 ("libX11" ,libx11)))
10130 (home-page "https://tracker.debian.org/pkg/python-xdo")
10131 (synopsis "Python library for simulating X11 keyboard/mouse input")
10132 (description "Provides bindings to libxdo for manipulating X11 via simulated
10133 input. (Note that this is mostly a legacy library; you may wish to look at
10134 python-xdo for newer bindings.)")
10135 (license license:bsd-3)))
10136
10137 (define-public python2-xdo
10138 (package-with-python2 python-xdo))
10139
10140 (define-public python-mako
10141 (package
10142 (name "python-mako")
10143 (version "1.1.2")
10144 (source
10145 (origin
10146 (method url-fetch)
10147 (uri (pypi-uri "Mako" version))
10148 (sha256
10149 (base32
10150 "17bd6r9ynp4hyfckkia0bb8gpd98f42jfl5rmzdpbld59bbcaf9i"))))
10151 (build-system python-build-system)
10152 (arguments
10153 `(#:phases (modify-phases %standard-phases
10154 (replace 'check
10155 (lambda* (#:key tests? #:allow-other-keys)
10156 (if tests?
10157 (invoke "nosetests" "-v")
10158 (format #t "test suite not run~%"))
10159 #t)))))
10160 (propagated-inputs
10161 `(("python-markupsafe" ,python-markupsafe)))
10162 (native-inputs
10163 `(("python-mock" ,python-mock)
10164 ("python-nose" ,python-nose)))
10165 (home-page "https://www.makotemplates.org/")
10166 (synopsis "Templating language for Python")
10167 (description "Mako is a templating language for Python that compiles
10168 templates into Python modules.")
10169 (license license:expat)))
10170
10171 (define-public python2-mako
10172 (package-with-python2 python-mako))
10173
10174 (define-public python-waitress
10175 (package
10176 (name "python-waitress")
10177 (version "1.1.0")
10178 (source
10179 (origin
10180 (method url-fetch)
10181 (uri (pypi-uri "waitress" version))
10182 (patches (search-patches "python-waitress-fix-tests.patch"))
10183 (sha256
10184 (base32
10185 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
10186 (build-system python-build-system)
10187 (home-page "https://github.com/Pylons/waitress")
10188 (synopsis "Waitress WSGI server")
10189 (description "Waitress is meant to be a production-quality pure-Python WSGI
10190 server with very acceptable performance.")
10191 (license license:zpl2.1)))
10192
10193 (define-public python2-waitress
10194 (package-with-python2 python-waitress))
10195
10196 (define-public python-whichcraft
10197 (package
10198 (name "python-whichcraft")
10199 (version "0.6.1")
10200 (source
10201 (origin
10202 (method url-fetch)
10203 (uri (pypi-uri "whichcraft" version))
10204 (sha256
10205 (base32
10206 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
10207 (build-system python-build-system)
10208 (native-inputs
10209 `(("python-pytest" ,python-pytest)))
10210 (home-page "https://github.com/pydanny/whichcraft")
10211 (synopsis "Cross-platform cross-python shutil.which functionality")
10212 (description
10213 "This package provides a shim of the shutil.which function that's
10214 designed to work across multiple versions of Python.")
10215 (license license:bsd-3)))
10216
10217 (define-public python-cookiecutter
10218 (package
10219 (name "python-cookiecutter")
10220 (version "1.6.0")
10221 (source
10222 (origin
10223 (method url-fetch)
10224 (uri (pypi-uri "cookiecutter" version))
10225 (sha256
10226 (base32
10227 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
10228 (build-system python-build-system)
10229 (native-inputs
10230 `(("python-freezegun" ,python-freezegun)
10231 ("python-pytest" ,python-pytest)
10232 ("python-pytest-catchlog" ,python-pytest-catchlog)
10233 ("python-pytest-cov" ,python-pytest-cov)
10234 ("python-pytest-mock" ,python-pytest-mock)))
10235 (propagated-inputs
10236 `(("python-binaryornot" ,python-binaryornot)
10237 ("python-click" ,python-click)
10238 ("python-future" ,python-future)
10239 ("python-jinja2" ,python-jinja2)
10240 ("python-jinja2-time" ,python-jinja2-time)
10241 ("python-poyo" ,python-poyo)
10242 ("python-requests" ,python-requests)
10243 ("python-whichcraft" ,python-whichcraft)))
10244 (home-page "https://github.com/audreyr/cookiecutter")
10245 (synopsis
10246 "Command-line utility that creates projects from project templates")
10247 (description
10248 "This package provides a command-line utility that creates projects from
10249 project templates, e.g. creating a Python package project from a Python package
10250 project template.")
10251 (license license:bsd-3)))
10252
10253 (define-public python-pyquery
10254 (package
10255 (name "python-pyquery")
10256 (version "1.2.17")
10257 (source
10258 (origin
10259 (method url-fetch)
10260 (uri (pypi-uri "pyquery" version))
10261 (sha256
10262 (base32
10263 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10264 (build-system python-build-system)
10265 (native-inputs
10266 `(("python-webob" ,python-webob)
10267 ("python-webtest" ,python-webtest)))
10268 (propagated-inputs
10269 `(("python-lxml" ,python-lxml)
10270 ("python-cssselect" ,python-cssselect)))
10271 (home-page "https://github.com/gawel/pyquery")
10272 (synopsis "Make jQuery-like queries on xml documents")
10273 (description "pyquery allows you to make jQuery queries on xml documents.
10274 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10275 fast xml and html manipulation.")
10276 (license license:bsd-3)))
10277
10278 (define-public python-anyjson
10279 (package
10280 (name "python-anyjson")
10281 (version "0.3.3")
10282 (source
10283 (origin
10284 (method url-fetch)
10285 (uri (pypi-uri "anyjson" version))
10286 (sha256
10287 (base32
10288 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10289 (build-system python-build-system)
10290 (arguments
10291 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10292 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10293 ;; whatever) so this transformation needs to be done before the tests
10294 ;; can be run. Maybe we could add a build step to transform beforehand
10295 ;; but it could be annoying/difficult.
10296 ;; We can enable tests for the Python 2 version, though, and do below.
10297 #:tests? #f))
10298 (home-page "https://bitbucket.org/runeh/anyjson/")
10299 (synopsis
10300 "Wraps best available JSON implementation in a common interface")
10301 (description
10302 "Anyjson loads whichever is the fastest JSON module installed
10303 and provides a uniform API regardless of which JSON implementation is used.")
10304 (license license:bsd-3)
10305 (properties `((python2-variant . ,(delay python2-anyjson))))))
10306
10307 (define-public python2-anyjson
10308 (let ((anyjson (package-with-python2
10309 (strip-python2-variant python-anyjson))))
10310 (package
10311 (inherit anyjson)
10312 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10313 #:tests? #t
10314 ,@(package-arguments anyjson)))
10315 (native-inputs `(("python2-nose" ,python2-nose))))))
10316
10317 (define-public python-amqp
10318 (package
10319 (name "python-amqp")
10320 (version "2.3.2")
10321 (source
10322 (origin
10323 (method url-fetch)
10324 (uri (pypi-uri "amqp" version))
10325 (sha256
10326 (base32
10327 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
10328 (build-system python-build-system)
10329 (native-inputs
10330 `(("python-case" ,python-case)
10331 ("python-pytest-sugar" ,python-pytest-sugar)
10332 ("python-mock" ,python-mock)))
10333 (propagated-inputs
10334 `(("python-vine" ,python-vine)))
10335 (home-page "https://github.com/celery/py-amqp")
10336 (synopsis
10337 "Low-level AMQP client for Python (fork of amqplib)")
10338 (description
10339 "This is a fork of amqplib which was originally written by Barry Pederson.
10340 It is maintained by the Celery project, and used by kombu as a pure python
10341 alternative when librabbitmq is not available.")
10342 (license license:lgpl2.1+)
10343 (properties `((python2-variant . ,(delay python2-amqp))))))
10344
10345 (define-public python2-amqp
10346 (let ((amqp (package-with-python2
10347 (strip-python2-variant python-amqp))))
10348 (package
10349 (inherit amqp)
10350 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10351 ;; unmaintained. Weirdly, does not do this on the python 3
10352 ;; version?
10353 #:tests? #f
10354 ,@(package-arguments amqp))))))
10355
10356 (define-public python-txamqp
10357 (package
10358 (name "python-txamqp")
10359 (version "0.8.2")
10360 (source
10361 (origin
10362 (method url-fetch)
10363 (uri (pypi-uri "txAMQP" version))
10364 (sha256
10365 (base32
10366 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
10367 (build-system python-build-system)
10368 (propagated-inputs
10369 `(("python-six" ,python-six)
10370 ("python-twisted" ,python-twisted)))
10371 (home-page "https://github.com/txamqp/txamqp")
10372 (synopsis "Communicate with AMQP peers and brokers using Twisted")
10373 (description
10374 "This package provides a Python library for communicating with AMQP peers
10375 and brokers using the asynchronous networking framework Twisted. It contains
10376 all the necessary code to connect, send and receive messages to/from an
10377 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
10378 also includes support for using Thrift RPC over AMQP in Twisted
10379 applications.")
10380 (license license:asl2.0)))
10381
10382 (define-public python2-txamqp
10383 (package-with-python2 python-txamqp))
10384
10385 (define-public python-kombu
10386 (package
10387 (name "python-kombu")
10388 (version "4.2.2")
10389 (source
10390 (origin
10391 (method url-fetch)
10392 (uri (pypi-uri "kombu" version))
10393 (sha256
10394 (base32
10395 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
10396 (build-system python-build-system)
10397 (native-inputs
10398 `(("python-mock" ,python-mock)
10399 ("python-case" ,python-case)
10400 ("python-pyro4" ,python-pyro4)
10401 ("python-pytest-sugar" ,python-pytest-sugar)
10402 ("python-pytz" ,python-pytz)))
10403 (propagated-inputs
10404 `(("python-anyjson" ,python-anyjson)
10405 ("python-amqp" ,python-amqp)
10406 ("python-redis" ,python-redis)))
10407 (home-page "https://kombu.readthedocs.io")
10408 (synopsis "Message passing library for Python")
10409 (description "The aim of Kombu is to make messaging in Python as easy as
10410 possible by providing an idiomatic high-level interface for the AMQ protocol,
10411 and also provide proven and tested solutions to common messaging problems.
10412 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10413 message orientation, queuing, routing, reliability and security, for which the
10414 RabbitMQ messaging server is the most popular implementation.")
10415 (license license:bsd-3)
10416 (properties `((python2-variant . ,(delay python2-kombu))))))
10417
10418 (define-public python2-kombu
10419 (let ((kombu (package-with-python2
10420 (strip-python2-variant python-kombu))))
10421 (package
10422 (inherit kombu)
10423 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10424 ;; It works fine on the python3 variant.
10425 #:tests? #f
10426 ,@(package-arguments kombu)))
10427 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10428 ,@(package-native-inputs kombu))))))
10429
10430 (define-public python-billiard
10431 (package
10432 (name "python-billiard")
10433 (version "3.5.0.5")
10434 (source
10435 (origin
10436 (method url-fetch)
10437 (uri (pypi-uri "billiard" version))
10438 (sha256
10439 (base32
10440 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
10441 (build-system python-build-system)
10442 (native-inputs
10443 `(("python-case" ,python-case)
10444 ("python-pytest" ,python-pytest)))
10445 (home-page "https://github.com/celery/billiard")
10446 (synopsis
10447 "Python multiprocessing fork with improvements and bugfixes")
10448 (description
10449 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10450 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10451 pyprocessing package. This standalone variant is intended to be compatible with
10452 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10453 (license license:bsd-3)
10454 (properties `((python2-variant . ,(delay python2-billiard))))))
10455
10456 (define-public python2-billiard
10457 (let ((billiard (package-with-python2
10458 (strip-python2-variant python-billiard))))
10459 (package
10460 (inherit billiard)
10461 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10462 ("python2-mock" ,python2-mock)
10463 ,@(package-native-inputs billiard))))))
10464
10465 (define-public python-celery
10466 (package
10467 (name "python-celery")
10468 (version "4.2.1")
10469 (source
10470 (origin
10471 (method url-fetch)
10472 (uri (pypi-uri "celery" version))
10473 (sha256
10474 (base32
10475 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
10476 (build-system python-build-system)
10477 (arguments
10478 '(;; TODO The tests fail with Python 3.7
10479 ;; https://github.com/celery/celery/issues/4849
10480 #:tests? #f
10481 #:phases
10482 (modify-phases %standard-phases
10483 (add-after 'unpack 'patch-requirements
10484 (lambda _
10485 (substitute* "requirements/test.txt"
10486 (("pytest>=3\\.0,<3\\.3")
10487 "pytest>=3.0"))
10488 #t)))))
10489 (native-inputs
10490 `(("python-case" ,python-case)
10491 ("python-pytest" ,python-pytest)))
10492 (propagated-inputs
10493 `(("python-pytz" ,python-pytz)
10494 ("python-billiard" ,python-billiard)
10495 ("python-kombu" ,python-kombu)))
10496 (home-page "https://celeryproject.org")
10497 (synopsis "Distributed Task Queue")
10498 (description "Celery is an asynchronous task queue/job queue based on
10499 distributed message passing. It is focused on real-time operation, but
10500 supports scheduling as well. The execution units, called tasks, are executed
10501 concurrently on a single or more worker servers using multiprocessing,
10502 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10503 synchronously (wait until ready).")
10504 (license license:bsd-3)
10505 (properties `((python2-variant . ,(delay python2-celery))))))
10506
10507 (define-public python2-celery
10508 (let ((celery (package-with-python2
10509 (strip-python2-variant python-celery))))
10510 (package
10511 (inherit celery)
10512 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10513 ("python2-mock" ,python2-mock)
10514 ,@(package-native-inputs celery))))))
10515
10516 (define-public python-translitcodec
10517 (package
10518 (name "python-translitcodec")
10519 (version "0.4.0")
10520 (source
10521 (origin
10522 (method url-fetch)
10523 (uri (pypi-uri "translitcodec" version))
10524 (sha256
10525 (base32
10526 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10527 (build-system python-build-system)
10528 (arguments
10529 `(#:tests? #f)) ; no tests provided
10530 (home-page
10531 "https://github.com/claudep/translitcodec")
10532 (synopsis
10533 "Unicode to 8-bit charset transliteration codec")
10534 (description
10535 "This package contains codecs for transliterating ISO 10646 texts into
10536 best-effort representations using smaller coded character sets (ASCII,
10537 ISO 8859, etc.).")
10538 (license license:expat)))
10539
10540 (define-public python2-translitcodec
10541 (package-with-python2 python-translitcodec))
10542
10543 (define-public python-editor
10544 (package
10545 (name "python-editor")
10546 (version "1.0.4")
10547 (source
10548 (origin
10549 (method url-fetch)
10550 (uri (pypi-uri "python-editor" version))
10551 (sha256
10552 (base32
10553 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
10554 (build-system python-build-system)
10555 (arguments
10556 '(#:tests? #f)) ;XXX: needs a TTY and an editor
10557 (home-page "https://github.com/fmoo/python-editor")
10558 (synopsis "Programmatically open an editor, capture the result")
10559 (description
10560 "python-editor is a library that provides the editor module for
10561 programmatically interfacing with your system's $EDITOR.")
10562 (license license:asl2.0)))
10563
10564 (define-public python2-editor
10565 (package-with-python2 python-editor))
10566
10567 (define-public python-vobject
10568 (package
10569 (name "python-vobject")
10570 (version "0.9.6.1")
10571 (source (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "vobject" version))
10574 (sha256
10575 (base32
10576 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
10577 (build-system python-build-system)
10578 (arguments
10579 '(;; The test suite relies on some non-portable Windows interfaces.
10580 #:tests? #f))
10581 (propagated-inputs
10582 `(("python-dateutil" ,python-dateutil)
10583 ("python-pyicu" ,python-pyicu)))
10584 (synopsis "Parse and generate vCard and vCalendar files")
10585 (description "Vobject is intended to be a full featured Python package for
10586 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10587 are supported and well tested. vCard 3.0 files are supported, and all data
10588 should be imported, but only a few components are understood in a sophisticated
10589 way.")
10590 (home-page "https://eventable.github.io/vobject/")
10591 (license license:asl2.0)))
10592
10593 (define-public python2-vobject
10594 (package-with-python2 python-vobject))
10595
10596 (define-public python-munkres
10597 (package
10598 (name "python-munkres")
10599 (version "1.0.8")
10600 (source (origin
10601 (method url-fetch)
10602 (uri (pypi-uri "munkres" version))
10603 (sha256
10604 (base32
10605 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10606 (build-system python-build-system)
10607 (arguments
10608 '(#:tests? #f)) ; no test suite
10609 (home-page "https://software.clapper.org/munkres/")
10610 (synopsis "Implementation of the Munkres algorithm")
10611 (description "The Munkres module provides an implementation of the Munkres
10612 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10613 useful for solving the Assignment Problem.")
10614 (license license:bsd-3)))
10615
10616 (define-public python2-munkres
10617 (package-with-python2 python-munkres))
10618
10619 (define-public python-whoosh
10620 (package
10621 (name "python-whoosh")
10622 (version "2.7.4")
10623 (source
10624 (origin
10625 (method url-fetch)
10626 (uri (pypi-uri "Whoosh" version))
10627 (sha256
10628 (base32
10629 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10630 (build-system python-build-system)
10631 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
10632 (native-inputs
10633 `(("python-pytest" ,python-pytest)))
10634 (home-page "https://bitbucket.org/mchaput/whoosh")
10635 (synopsis "Full text indexing, search, and spell checking library")
10636 (description
10637 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10638 checking library.")
10639 (license license:bsd-2)))
10640
10641 (define-public python2-whoosh
10642 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10643 (package (inherit whoosh)
10644 (propagated-inputs
10645 `(("python2-backport-ssl-match-hostname"
10646 ,python2-backport-ssl-match-hostname)
10647 ,@(package-propagated-inputs whoosh))))))
10648
10649 (define-public python-pathlib
10650 (package
10651 (name "python-pathlib")
10652 (version "1.0.1")
10653 (source (origin
10654 (method url-fetch)
10655 (uri (pypi-uri "pathlib" version))
10656 (sha256
10657 (base32
10658 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10659 (build-system python-build-system)
10660 ;; The tests depend on the internal "test" module, which does not provide
10661 ;; a stable interface.
10662 (arguments `(#:tests? #f))
10663 (home-page "https://pathlib.readthedocs.org/")
10664 (synopsis "Object-oriented file system paths")
10665 (description "Pathlib offers a set of classes to handle file system paths.
10666 It offers the following advantages over using string objects:
10667
10668 @enumerate
10669 @item No more cumbersome use of os and os.path functions. Everything can
10670 be done easily through operators, attribute accesses, and method calls.
10671 @item Embodies the semantics of different path types. For example,
10672 comparing Windows paths ignores casing.
10673 @item Well-defined semantics, eliminating any inconsistencies or
10674 ambiguities (forward vs. backward slashes, etc.).
10675 @end enumerate
10676
10677 Note: In Python 3.4, pathlib is now part of the standard library. For other
10678 Python versions please consider python-pathlib2 instead, which tracks the
10679 standard library module. This module (python-pathlib) isn't maintained
10680 anymore.")
10681 (license license:expat)))
10682
10683 (define-public python2-pathlib
10684 (package-with-python2 python-pathlib))
10685
10686 (define-public python2-pathlib2
10687 (package
10688 (name "python2-pathlib2")
10689 (version "2.3.5")
10690 (source (origin
10691 (method url-fetch)
10692 (uri (pypi-uri "pathlib2" version))
10693 (sha256
10694 (base32
10695 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
10696 (build-system python-build-system)
10697 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10698 ;; version is 3.4 which already includes this package as part of the
10699 ;; standard library.
10700 (arguments
10701 `(#:python ,python-2))
10702 (propagated-inputs
10703 `(("python2-scandir" ,python2-scandir)
10704 ("python2-six" ,python2-six)))
10705 (home-page "https://pypi.org/project/pathlib2/")
10706 (synopsis "Object-oriented file system paths - backport of standard
10707 pathlib module")
10708 (description "The goal of pathlib2 is to provide a backport of standard
10709 pathlib module which tracks the standard library module, so all the newest
10710 features of the standard pathlib can be used also on older Python versions.
10711
10712 Pathlib offers a set of classes to handle file system paths. It offers the
10713 following advantages over using string objects:
10714
10715 @enumerate
10716 @item No more cumbersome use of os and os.path functions. Everything can
10717 be done easily through operators, attribute accesses, and method calls.
10718 @item Embodies the semantics of different path types. For example,
10719 comparing Windows paths ignores casing.
10720 @item Well-defined semantics, eliminating any inconsistencies or
10721 ambiguities (forward vs. backward slashes, etc.).
10722 @end enumerate")
10723 (license license:expat)))
10724
10725 (define-public python2-pathlib2-bootstrap
10726 (hidden-package
10727 (package
10728 (inherit python2-pathlib2)
10729 (name "python2-pathlib2-bootstrap")
10730 (propagated-inputs
10731 `(("python2-scandir" ,python2-scandir)
10732 ("python2-six" ,python2-six-bootstrap))))))
10733
10734 (define-public python-jellyfish
10735 (package
10736 (name "python-jellyfish")
10737 (version "0.5.6")
10738 (source (origin
10739 (method url-fetch)
10740 (uri (pypi-uri "jellyfish" version))
10741 (sha256
10742 (base32
10743 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10744 (build-system python-build-system)
10745 (native-inputs
10746 `(("python-pytest" ,python-pytest)))
10747 (home-page "https://github.com/jamesturk/jellyfish")
10748 (synopsis "Approximate and phonetic matching of strings")
10749 (description "Jellyfish uses a variety of string comparison and phonetic
10750 encoding algorithms to do fuzzy string matching.")
10751 (license license:bsd-2)
10752 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10753
10754 (define-public python2-jellyfish
10755 (let ((jellyfish (package-with-python2
10756 (strip-python2-variant python-jellyfish))))
10757 (package (inherit jellyfish)
10758 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10759 ,@(package-native-inputs jellyfish))))))
10760
10761 (define-public python2-unicodecsv
10762 (package
10763 (name "python2-unicodecsv")
10764 (version "0.14.1")
10765 (source (origin
10766 (method git-fetch)
10767 ;; The test suite is not included in the PyPi release.
10768 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10769 (uri (git-reference
10770 (url "https://github.com/jdunck/python-unicodecsv")
10771 (commit version)))
10772 (file-name (git-file-name name version))
10773 (sha256
10774 (base32
10775 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
10776 (build-system python-build-system)
10777 (arguments
10778 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10779 #:python ,python-2))
10780 (native-inputs
10781 `(("python2-unittest2" ,python2-unittest2)))
10782 (home-page "https://github.com/jdunck/python-unicodecsv")
10783 (synopsis "Unicode CSV module for Python 2")
10784 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10785 module, adding support for Unicode strings.")
10786 (license license:bsd-2)))
10787
10788 (define-public python-rarfile
10789 (package
10790 (name "python-rarfile")
10791 (version "2.8")
10792 (source (origin
10793 (method url-fetch)
10794 (uri (pypi-uri "rarfile" version))
10795 (sha256
10796 (base32
10797 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10798 (build-system python-build-system)
10799 (arguments
10800 '(#:phases
10801 (modify-phases %standard-phases
10802 (replace 'check
10803 ;; Many tests fail, but the installation proceeds.
10804 (lambda _ (invoke "make" "-C" "test" "test"))))))
10805 (native-inputs
10806 `(("which" ,which))) ; required for tests
10807 (propagated-inputs
10808 `(("libarchive" ,libarchive)))
10809 (home-page "https://github.com/markokr/rarfile")
10810 (synopsis "RAR archive reader for Python")
10811 (description "This is Python module for RAR archive reading. The interface
10812 is made as zipfile like as possible.")
10813 (license license:isc)))
10814
10815 (define-public python2-rarfile
10816 (package-with-python2 python-rarfile))
10817
10818 (define-public python-magic
10819 (package
10820 (name "python-magic")
10821 (version "0.4.15")
10822 (source
10823 (origin
10824 (method url-fetch)
10825 (uri (pypi-uri "python-magic" version))
10826 (sha256
10827 (base32
10828 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
10829 (file-name (string-append name "-" version "-checkout"))))
10830 (build-system python-build-system)
10831 (arguments
10832 ;; The tests are unreliable, so don't run them. The tests fail
10833 ;; under Python3 because they were written for Python2 and
10834 ;; contain import statements that do not work in Python3. One of
10835 ;; the tests fails under Python2 because its assertions are
10836 ;; overly stringent; it relies on comparing output strings which
10837 ;; are brittle and can change depending on the version of
10838 ;; libmagic being used and the system on which the test is
10839 ;; running. In my case, under GuixSD 0.10.0, only one test
10840 ;; failed, and it seems to have failed only because the version
10841 ;; of libmagic that is packaged in Guix outputs a slightly
10842 ;; different (but not wrong) string than the one that the test
10843 ;; expected.
10844 '(#:tests? #f
10845 #:phases (modify-phases %standard-phases
10846 ;; Replace a specific method call with a hard-coded
10847 ;; path to the necessary libmagic.so file in the
10848 ;; store. If we don't do this, then the method call
10849 ;; will fail to find the libmagic.so file, which in
10850 ;; turn will cause any application using
10851 ;; python-magic to fail.
10852 (add-before 'build 'hard-code-path-to-libmagic
10853 (lambda* (#:key inputs #:allow-other-keys)
10854 (let ((file (assoc-ref inputs "file")))
10855 (substitute* "magic.py"
10856 (("ctypes.util.find_library\\('magic'\\)")
10857 (string-append "'" file "/lib/libmagic.so'")))
10858 #t)))
10859 (add-before 'install 'disable-egg-compression
10860 (lambda _
10861 (let ((port (open-file "setup.cfg" "a")))
10862 (display "\n[easy_install]\nzip_ok = 0\n"
10863 port)
10864 (close-port port)
10865 #t))))))
10866 (inputs
10867 ;; python-magic needs to be able to find libmagic.so.
10868 `(("file" ,file)))
10869 (home-page
10870 "https://github.com/ahupp/python-magic")
10871 (synopsis
10872 "File type identification using libmagic")
10873 (description
10874 "This module uses ctypes to access the libmagic file type
10875 identification library. It makes use of the local magic database and
10876 supports both textual and MIME-type output. Note that this module and
10877 the python-file module both provide a \"magic.py\" file; these two
10878 modules, which are different and were developed separately, both serve
10879 the same purpose: to provide Python bindings for libmagic.")
10880 (license license:expat)))
10881
10882 (define-public python2-magic
10883 (package-with-python2 python-magic))
10884
10885 (define-public python2-s3cmd
10886 (package
10887 (name "python2-s3cmd")
10888 (version "1.6.1")
10889 (source
10890 (origin
10891 (method url-fetch)
10892 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10893 "s3cmd-" version ".tar.gz"))
10894 (sha256
10895 (base32
10896 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10897 (build-system python-build-system)
10898 (arguments
10899 ;; s3cmd is written for python2 only and contains no tests.
10900 `(#:python ,python-2
10901 #:tests? #f))
10902 (propagated-inputs
10903 `(("python2-dateutil" ,python2-dateutil)
10904 ;; The python-file package also provides a magic.py module.
10905 ;; This is an unfortunate state of affairs; however, s3cmd
10906 ;; fails to install if it cannot find specifically the
10907 ;; python-magic package. Thus we include it, instead of using
10908 ;; python-file. Ironically, s3cmd sometimes works better
10909 ;; without libmagic bindings at all:
10910 ;; https://github.com/s3tools/s3cmd/issues/198
10911 ("python2-magic" ,python2-magic)))
10912 (home-page "https://s3tools.org/s3cmd")
10913 (synopsis "Command line tool for S3-compatible storage services")
10914 (description
10915 "S3cmd is a command line tool for uploading, retrieving and managing data
10916 in storage services that are compatible with the Amazon Simple Storage
10917 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10918 GnuPG encryption, and more. It also supports management of Amazon's
10919 CloudFront content delivery network.")
10920 (license license:gpl2+)))
10921
10922 (define-public python-pkgconfig
10923 (package
10924 (name "python-pkgconfig")
10925 (version "1.3.1")
10926 (source
10927 (origin
10928 (method url-fetch)
10929 (uri (pypi-uri "pkgconfig" version))
10930 (sha256
10931 (base32
10932 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10933 (build-system python-build-system)
10934 (native-inputs
10935 `(("python-nose" ,python-nose)))
10936 (inputs
10937 `(("pkg-config" ,pkg-config)))
10938 (arguments
10939 `(#:phases
10940 (modify-phases %standard-phases
10941 (add-before 'build 'patch
10942 ;; Hard-code the path to pkg-config.
10943 (lambda _
10944 (substitute* "pkgconfig/pkgconfig.py"
10945 (("cmd = 'pkg-config")
10946 (string-append "cmd = '" (which "pkg-config"))))
10947 #t))
10948 (replace 'check
10949 (lambda _
10950 (invoke "nosetests" "test.py"))))))
10951 (home-page "https://github.com/matze/pkgconfig")
10952 (synopsis "Python interface for pkg-config")
10953 (description "This module provides a Python interface to pkg-config. It
10954 can be used to find all pkg-config packages, check if a package exists,
10955 check if a package meets certain version requirements, query CFLAGS and
10956 LDFLAGS and parse the output to build extensions with setup.py.")
10957 (license license:expat)))
10958
10959 (define-public python2-pkgconfig
10960 (package-with-python2 python-pkgconfig))
10961
10962 (define-public python-bz2file
10963 (package
10964 (name "python-bz2file")
10965 (version "0.98")
10966 (source
10967 (origin
10968 (method url-fetch)
10969 (uri (pypi-uri "bz2file" version))
10970 (sha256
10971 (base32
10972 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10973 (build-system python-build-system)
10974 (arguments
10975 `(#:tests? #f)) ; Tests use deprecated python modules.
10976 (home-page "https://github.com/nvawda/bz2file")
10977 (synopsis "Read and write bzip2-compressed files")
10978 (description
10979 "Bz2file is a Python library for reading and writing bzip2-compressed
10980 files. It contains a drop-in replacement for the I/O interface in the
10981 standard library's @code{bz2} module, including features from the latest
10982 development version of CPython that are not available in older releases.")
10983 (license license:asl2.0)))
10984
10985 (define-public python2-bz2file
10986 (package-with-python2 python-bz2file))
10987
10988 (define-public python-future
10989 (package
10990 (name "python-future")
10991 (version "0.17.1")
10992 (source
10993 (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "future" version))
10996 (sha256
10997 (base32
10998 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
10999 (build-system python-build-system)
11000 ;; Many tests connect to the network or are otherwise flawed.
11001 ;; https://github.com/PythonCharmers/python-future/issues/210
11002 (arguments
11003 `(#:tests? #f))
11004 (home-page "https://python-future.org")
11005 (synopsis "Single-source support for Python 3 and 2")
11006 (description
11007 "@code{python-future} is the missing compatibility layer between Python 2 and
11008 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11009 to support both Python 2 and Python 3 with minimal overhead.")
11010 (license license:expat)))
11011
11012 (define-public python2-future
11013 (package-with-python2 python-future))
11014
11015 (define-public python-cysignals
11016 (package
11017 (name "python-cysignals")
11018 (version "1.9.0")
11019 (source
11020 (origin
11021 (method url-fetch)
11022 (uri (pypi-uri "cysignals" version))
11023 (sha256
11024 (base32
11025 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
11026 (build-system python-build-system)
11027 (native-inputs
11028 `(("python-cython" ,python-cython)
11029 ("python-sphinx" ,python-sphinx)))
11030 (inputs
11031 `(("pari-gp" ,pari-gp)))
11032 (arguments
11033 `(#:modules ((guix build python-build-system)
11034 ((guix build gnu-build-system) #:prefix gnu:)
11035 (guix build utils))
11036 ;; FIXME: Tests are executed after installation and currently fail
11037 ;; when not installing into standard locations; the author is working
11038 ;; on a fix.
11039 #:tests? #f
11040 #:phases
11041 (modify-phases %standard-phases
11042 (add-before
11043 'build 'configure
11044 (assoc-ref gnu:%standard-phases 'configure)))))
11045 (home-page
11046 "https://github.com/sagemath/cysignals")
11047 (synopsis
11048 "Handling of interrupts and signals for Cython")
11049 (description
11050 "The cysignals package provides mechanisms to handle interrupts (and
11051 other signals and errors) in Cython code, using two related approaches,
11052 for mixed Cython/Python code or external C libraries and pure Cython code,
11053 respectively.")
11054 (license license:lgpl3+)))
11055
11056 (define-public python2-cysignals
11057 (package-with-python2 python-cysignals))
11058
11059 (define-public python2-shedskin
11060 (package
11061 (name "python2-shedskin")
11062 (version "0.9.4")
11063 (source
11064 (origin
11065 (method url-fetch)
11066 (uri (string-append "https://github.com/shedskin/shedskin/"
11067 "releases/download/v" version
11068 "/shedskin-" version ".tgz"))
11069 (sha256
11070 (base32
11071 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11072 (build-system python-build-system)
11073 (arguments
11074 `(#:python ,python-2
11075 #:phases (modify-phases %standard-phases
11076 (add-after 'unpack 'fix-resulting-include-libs
11077 (lambda* (#:key inputs #:allow-other-keys)
11078 (let ((libgc (assoc-ref inputs "libgc"))
11079 (pcre (assoc-ref inputs "pcre")))
11080 (substitute* "shedskin/makefile.py"
11081 (("variable == 'CCFLAGS':[ ]*")
11082 (string-append "variable == 'CCFLAGS':\n"
11083 " line += ' -I " pcre "/include"
11084 " -I " libgc "/include'"))
11085 (("variable == 'LFLAGS':[ ]*")
11086 (string-append "variable == 'LFLAGS':\n"
11087 " line += ' -L" pcre "/lib"
11088 " -L " libgc "/lib'")))
11089 #t))))))
11090 (inputs `(("pcre" ,pcre)
11091 ("libgc" ,libgc)))
11092 (home-page "https://shedskin.github.io/")
11093 (synopsis "Experimental Python-2 to C++ Compiler")
11094 (description (string-append "This is an experimental compiler for a subset of
11095 Python. It generates C++ code and a Makefile."))
11096 (license (list license:gpl3 license:bsd-3 license:expat))))
11097
11098 (define-public python2-rope
11099 (package
11100 (name "python2-rope")
11101 (version "0.11.0")
11102 (source
11103 (origin
11104 (method url-fetch)
11105 (uri (pypi-uri "rope" version))
11106 (sha256
11107 (base32
11108 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
11109 (arguments
11110 ;; Rope has only partial python3 support, see `python-rope'
11111 `(#:python ,python-2))
11112 (build-system python-build-system)
11113 (native-inputs
11114 `(("python2-unittest2" ,python2-unittest2)))
11115 (home-page "https://github.com/python-rope/rope")
11116 (synopsis "Refactoring library for Python")
11117 (description "Rope is a refactoring library for Python. It facilitates
11118 the renaming, moving and extracting of attributes, functions, modules, fields
11119 and parameters in Python 2 source code. These refactorings can also be applied
11120 to occurrences in strings and comments.")
11121 (license license:gpl2)))
11122
11123 (define-public python-rope
11124 (package
11125 (inherit python2-rope)
11126 (name "python-rope")
11127 (arguments `(#:python ,python-wrapper
11128 ;; XXX: Only partial python3 support, results in some failing
11129 ;; tests: <https://github.com/python-rope/rope/issues/247>.
11130 #:tests? #f))
11131 (properties `((python2-variant . ,(delay python2-rope))))))
11132
11133 (define-public python-py3status
11134 (package
11135 (name "python-py3status")
11136 (version "3.21")
11137 (source
11138 (origin
11139 (method url-fetch)
11140 (uri (pypi-uri "py3status" version))
11141 (sha256
11142 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
11143 (build-system python-build-system)
11144 (inputs
11145 `(("file" ,file)))
11146 (arguments
11147 '(#:phases
11148 (modify-phases %standard-phases
11149 ;; 'file' is used for detection of configuration file encoding
11150 ;; let's make link the dependency to particular input
11151 (add-before 'build 'patch-file-path
11152 (lambda* (#:key inputs #:allow-other-keys)
11153 (let ((file-path (assoc-ref inputs "file")))
11154 (substitute* "py3status/parse_config.py"
11155 (("\\[\"file\", \"-b\"")
11156 (string-append "['" file-path "/bin/file', '-b'")))
11157 #t))))
11158 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
11159 (home-page "https://github.com/ultrabug/py3status")
11160 (synopsis "Extensible i3status wrapper written in Python")
11161 (description "py3status is an i3status wrapper which extends i3status
11162 functionality in a modular way, allowing you to extend your panel with your
11163 own code, responding to click events and updating clock every second.")
11164 (license license:bsd-3)))
11165
11166 (define-public python-tblib
11167 (package
11168 (name "python-tblib")
11169 (version "1.6.0")
11170 (source (origin
11171 (method url-fetch)
11172 (uri (pypi-uri "tblib" version))
11173 (sha256
11174 (base32
11175 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
11176 (build-system python-build-system)
11177 (arguments
11178 `(#:phases
11179 (modify-phases %standard-phases
11180 (replace 'check
11181 (lambda _
11182 ;; Upstream runs tests after installation and the package itself
11183 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11184 ;; found.
11185 (setenv "PYTHONPATH"
11186 (string-append (getcwd) "/build/lib:"
11187 (getenv "PYTHONPATH")))
11188 (invoke "py.test" "-vv" "tests" "README.rst"))))))
11189 (native-inputs
11190 `(("python-pytest" ,python-pytest)
11191 ("python-six" ,python-six)))
11192 (home-page "https://github.com/ionelmc/python-tblib")
11193 (synopsis "Traceback serialization library")
11194 (description
11195 "Traceback serialization allows you to:
11196
11197 @enumerate
11198 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11199 different processes. This allows better error handling when running code over
11200 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11201
11202 @item Parse traceback strings and raise with the parsed tracebacks.
11203 @end enumerate\n")
11204 (license license:bsd-3)))
11205
11206 (define-public python2-tblib
11207 (package-with-python2 python-tblib))
11208
11209 (define-public python-greenlet
11210 (package
11211 (name "python-greenlet")
11212 (version "0.4.15")
11213 (source (origin
11214 (method url-fetch)
11215 (uri (pypi-uri "greenlet" version))
11216 (sha256
11217 (base32
11218 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
11219 (build-system python-build-system)
11220 (home-page "https://greenlet.readthedocs.io/")
11221 (synopsis "Lightweight in-process concurrent programming")
11222 (description
11223 "Greenlet package is a spin-off of Stackless, a version of CPython
11224 that supports micro-threads called \"tasklets\". Tasklets run
11225 pseudo-concurrently (typically in a single or a few OS-level threads) and
11226 are synchronized with data exchanges on \"channels\".")
11227 (license (list license:psfl license:expat))))
11228
11229 (define-public python2-greenlet
11230 (package-with-python2 python-greenlet))
11231
11232 (define-public python-objgraph
11233 (package
11234 (name "python-objgraph")
11235 (version "3.4.1")
11236 (source
11237 (origin
11238 (method url-fetch)
11239 (uri (pypi-uri "objgraph" version))
11240 (sha256
11241 (base32
11242 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
11243 (build-system python-build-system)
11244 (propagated-inputs
11245 `(("python-graphviz" ,python-graphviz)))
11246 (native-inputs
11247 `(("python-mock" ,python-mock)
11248 ("graphviz" ,graphviz)))
11249 (home-page "https://mg.pov.lt/objgraph/")
11250 (synopsis "Draw Python object reference graphs with graphviz")
11251 (description
11252 "This package provides tools to draw Python object reference graphs with
11253 graphviz.")
11254 (license license:expat)))
11255
11256 (define-public python2-objgraph
11257 (package-with-python2 python-objgraph))
11258
11259 (define-public python-gevent
11260 (package
11261 (name "python-gevent")
11262 (version "20.5.0")
11263 (source (origin
11264 (method url-fetch)
11265 (uri (pypi-uri "gevent" version))
11266 (sha256
11267 (base32
11268 "1yppsrs0ccld9j9zfbsd0bxb987b2zkh2ar7whjxcrqzpkvg3iqx"))
11269 (modules '((guix build utils)))
11270 (snippet
11271 '(begin
11272 ;; unbunding libev and c-ares
11273 (delete-file-recursively "deps")
11274 #t))))
11275 (build-system python-build-system)
11276 (arguments
11277 `(#:modules ((ice-9 ftw)
11278 (ice-9 match)
11279 (srfi srfi-26)
11280 (guix build utils)
11281 (guix build python-build-system))
11282 #:phases (modify-phases %standard-phases
11283 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
11284 (lambda _
11285 (substitute* "src/gevent/subprocess.py"
11286 (("/bin/sh") (which "sh")))
11287 (for-each (lambda (file)
11288 (substitute* file
11289 (("/bin/sh") (which "sh"))
11290 (("/bin/true") (which "true"))))
11291 (find-files "src/greentest" "\\.py$"))
11292 #t))
11293 (add-before 'build 'do-not-use-bundled-sources
11294 (lambda _
11295 (setenv "GEVENTSETUP_EMBED" "0")
11296
11297 ;; Prevent building bundled libev.
11298 (substitute* "setup.py"
11299 (("run_make=_BUILDING")
11300 "run_make=False"))
11301 #t))
11302 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
11303 (lambda* (#:key inputs #:allow-other-keys)
11304 (let ((greenlet (string-append
11305 (assoc-ref inputs "python-greenlet")
11306 "/include")))
11307 (match (scandir greenlet
11308 (lambda (item)
11309 (string-prefix? "python" item)))
11310 ((python)
11311 (setenv "C_INCLUDE_PATH"
11312 (string-append greenlet "/" python ":"
11313 (or (getenv "C_INCLUDE_PATH")
11314 ""))))))
11315 #t))
11316 (add-before 'check 'pretend-to-be-CI
11317 (lambda _
11318 ;; A few tests are skipped due to network constraints or
11319 ;; get longer timeouts when running in a CI environment.
11320 ;; Piggy-back on that, as we need the same adjustments.
11321 (setenv "TRAVIS" "1")
11322 (setenv "APPVEYOR" "1")
11323 #t))
11324 (add-before 'check 'adjust-tests
11325 (lambda _
11326 (let ((disabled-tests
11327 '(;; These tests rely on networking which is not
11328 ;; available in the build container.
11329 "test_urllib2net.py"
11330 "test__server.py"
11331 "test__server_pywsgi.py"
11332 "test_socket.py"
11333 "test__socket.py"
11334 "test__socket_ssl.py"
11335 "test__socket_dns.py"
11336 "test__socket_dns6.py"
11337 "test___example_servers.py"
11338 "test__getaddrinfo_import.py"
11339 "test__examples.py"
11340 "test_httplib.py"
11341 "test_https.py"
11342 "test_urllib2_localnet.py"
11343 "test_ssl.py"
11344 "test__ssl.py"
11345 ;; XXX: These tests borrow functionality from the
11346 ;; Python builtin 'test' module, but it is not
11347 ;; installed with the Guix Python distribution.
11348 "test_smtpd.py"
11349 "test_wsgiref.py"
11350 "test_urllib2.py"
11351 "test_thread.py"
11352 "test_threading.py"
11353 "test__threading_2.py"
11354 ;; These tests rely on KeyboardInterrupts which do not
11355 ;; work inside the build container for some reason
11356 ;; (lack of controlling terminal?).
11357 "test_subprocess.py"
11358 "test__issues461_471.py"
11359 ;; TODO: Patch out the tests that use getprotobyname, etc
11360 ;; instead of disabling all the tests from these files.
11361 "test__resolver_dnspython.py"
11362 "test__doctests.py"
11363 "test__all__.py"
11364 "test___config.py"
11365 "test__execmodules.py")))
11366 (call-with-output-file "skipped_tests.txt"
11367 (lambda (port)
11368 (format port "~a~%"
11369 (string-join disabled-tests "\n"))))
11370 #t)))
11371 (replace 'check
11372 (lambda _
11373 ;; Make sure the build directory is on PYTHONPATH.
11374 (setenv "PYTHONPATH"
11375 (string-append
11376 (getenv "PYTHONPATH") ":"
11377 (getcwd) "/build/"
11378 (car (scandir "build" (cut string-prefix? "lib." <>)))))
11379
11380 ;; Use the build daemons configured number of workers.
11381 (setenv "NWORKERS" (number->string (parallel-job-count)))
11382
11383 (invoke "python" "-m" "gevent.tests" "--config"
11384 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
11385 (propagated-inputs
11386 `(("python-greenlet" ,python-greenlet)
11387 ("python-objgraph" ,python-objgraph)))
11388 (native-inputs
11389 `(("python-six" ,python-six)
11390
11391 ;; For tests.
11392 ("python-dnspython" ,python-dnspython)
11393 ("python-psutil" ,python-psutil)
11394 ("python-zope.event" ,python-zope-event)
11395 ("python-zope.interface" ,python-zope-interface)))
11396 (inputs
11397 `(("c-ares" ,c-ares)
11398 ("libev" ,libev)))
11399 (home-page "http://www.gevent.org/")
11400 (synopsis "Coroutine-based network library")
11401 (description
11402 "gevent is a coroutine-based Python networking library that uses greenlet
11403 to provide a high-level synchronous API on top of the libev event loop.")
11404 (license license:expat)
11405 (properties `((python2-variant . ,(delay python2-gevent))))))
11406
11407 (define-public python2-gevent
11408 (let ((base (package-with-python2
11409 (strip-python2-variant python-gevent))))
11410 (package
11411 (inherit base)
11412 (native-inputs `(,@(package-native-inputs base)
11413 ("python-mock" ,python2-mock))))))
11414
11415 (define-public python-fastimport
11416 (package
11417 (name "python-fastimport")
11418 (version "0.9.6")
11419 (source
11420 (origin
11421 (method url-fetch)
11422 (uri (pypi-uri "fastimport" version))
11423 (sha256
11424 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11425 (build-system python-build-system)
11426 (home-page "https://github.com/jelmer/python-fastimport")
11427 (synopsis "VCS fastimport parser and generator in Python")
11428 (description "This package provides a parser for and generator of the Git
11429 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11430 format.")
11431 (license license:gpl2+)))
11432
11433 (define-public python2-fastimport
11434 (package-with-python2 python-fastimport))
11435
11436 (define-public python-twisted
11437 (package
11438 (name "python-twisted")
11439 (version "19.7.0")
11440 (source (origin
11441 (method url-fetch)
11442 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11443 (sha256
11444 (base32
11445 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
11446 (build-system python-build-system)
11447 (arguments
11448 '(#:tests? #f)) ; FIXME: some tests fail
11449 (propagated-inputs
11450 `(("python-zope-interface" ,python-zope-interface)
11451 ("python-pyhamcrest" ,python-pyhamcrest)
11452 ("python-incremental" ,python-incremental)
11453 ("python-hyperlink" ,python-hyperlink)
11454 ("python-constantly" ,python-constantly)
11455 ("python-automat" ,python-automat)))
11456 (home-page "https://twistedmatrix.com/")
11457 (synopsis "Asynchronous networking framework written in Python")
11458 (description
11459 "Twisted is an extensible framework for Python programming, with special
11460 focus on event-based network programming and multiprotocol integration.")
11461 (license license:expat)))
11462
11463 (define-public python2-twisted
11464 (package-with-python2 python-twisted))
11465
11466 (define-public python-pika
11467 (package
11468 (name "python-pika")
11469 (version "0.12.0")
11470 (source
11471 (origin
11472 (method url-fetch)
11473 (uri (pypi-uri "pika" version))
11474 (sha256
11475 (base32
11476 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
11477 (build-system python-build-system)
11478 (native-inputs
11479 `(("python-pyev" ,python-pyev)
11480 ("python-tornado" ,python-tornado)
11481 ("python-twisted" ,python-twisted)))
11482 (home-page "https://pika.readthedocs.org")
11483 (synopsis "Pure Python AMQP Client Library")
11484 (description
11485 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11486 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11487 network support library.")
11488 (license license:bsd-3)))
11489
11490 (define-public python2-pika
11491 (package-with-python2 python-pika))
11492
11493 (define-public python-ply
11494 (package
11495 (name "python-ply")
11496 (version "3.11")
11497 (source
11498 (origin
11499 (method url-fetch)
11500 (uri (pypi-uri "ply" version))
11501 (sha256
11502 (base32
11503 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
11504 (build-system python-build-system)
11505 (home-page "http://www.dabeaz.com/ply/")
11506 (synopsis "Python Lex & Yacc")
11507 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11508 It uses LR parsing and does extensive error checking.")
11509 (license license:bsd-3)))
11510
11511 (define-public python-tabulate
11512 (package
11513 (name "python-tabulate")
11514 (version "0.7.7")
11515 (source (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "tabulate" version))
11518 (sha256
11519 (base32
11520 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11521 (build-system python-build-system)
11522 (arguments
11523 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11524 ;; and the latest release is not tagged in the upstream repository.
11525 '(#:tests? #f))
11526 (home-page "https://bitbucket.org/astanin/python-tabulate")
11527 (synopsis "Pretty-print tabular data")
11528 (description
11529 "Tabulate is a library and command-line utility to pretty-print tabular
11530 data in Python.")
11531 (license license:expat)))
11532
11533 (define-public python2-tabulate
11534 (package-with-python2 python-tabulate))
11535
11536 (define-public python-kazoo
11537 (package
11538 (name "python-kazoo")
11539 (version "2.4.0")
11540 (source
11541 (origin
11542 (method url-fetch)
11543 (uri (pypi-uri "kazoo" version))
11544 (sha256
11545 (base32
11546 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
11547 (build-system python-build-system)
11548 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11549 (propagated-inputs
11550 `(("python-six" ,python-six)))
11551 (home-page "https://kazoo.readthedocs.org")
11552 (synopsis "High-level Zookeeper client library")
11553 (description
11554 "Kazoo is a Python client library for the Apache Zookeeper distributed
11555 application service. It is designed to be easy to use and to avoid common
11556 programming errors.")
11557 (license license:asl2.0)))
11558
11559 (define-public python2-kazoo
11560 (package-with-python2 python-kazoo))
11561
11562 (define-public python-pykafka
11563 (package
11564 (name "python-pykafka")
11565 (version "2.4.0")
11566 (source (origin
11567 (method url-fetch)
11568 (uri (pypi-uri "pykafka" version))
11569 (sha256
11570 (base32
11571 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11572 (build-system python-build-system)
11573 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11574 (propagated-inputs
11575 `(("python-gevent" ,python-gevent)
11576 ("python-kazoo" ,python-kazoo)
11577 ("python-tabulate" ,python-tabulate)))
11578 (inputs
11579 `(("librdkafka" ,librdkafka)))
11580 (home-page "https://pykafka.readthedocs.io/")
11581 (synopsis "Apache Kafka client for Python")
11582 (description
11583 "PyKafka is a client for the Apache Kafka distributed messaging system.
11584 It includes Python implementations of Kafka producers and consumers, which
11585 are optionally backed by a C extension built on librdkafka.")
11586 (license license:asl2.0)))
11587
11588 (define-public python2-pykafka
11589 (package-with-python2 python-pykafka))
11590
11591 (define-public python-wcwidth
11592 (package
11593 (name "python-wcwidth")
11594 (version "0.1.8")
11595 (source (origin
11596 (method url-fetch)
11597 (uri (pypi-uri "wcwidth" version))
11598 (sha256
11599 (base32
11600 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
11601 (build-system python-build-system)
11602 (home-page "https://github.com/jquast/wcwidth")
11603 (synopsis "Measure number of terminal column cells of wide-character codes")
11604 (description "Wcwidth measures the number of terminal column cells of
11605 wide-character codes. It is useful for those implementing a terminal emulator,
11606 or programs that carefully produce output to be interpreted by one. It is a
11607 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11608 specified in POSIX.1-2001 and POSIX.1-2008.")
11609 (license license:expat)))
11610
11611 (define-public python2-wcwidth
11612 (package-with-python2 python-wcwidth))
11613
11614 (define-public python2-jsonrpclib
11615 (package
11616 (name "python2-jsonrpclib")
11617 (version "0.1.7")
11618 (source (origin
11619 (method url-fetch)
11620 (uri (pypi-uri "jsonrpclib" version))
11621 (sha256
11622 (base32
11623 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11624 (build-system python-build-system)
11625 (arguments
11626 `(#:tests? #f
11627 #:python ,python-2))
11628 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11629 (synopsis "Implementation of JSON-RPC specification for Python")
11630 (description
11631 "This library is an implementation of the JSON-RPC specification.
11632 It supports both the original 1.0 specification, as well as the
11633 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11634 etc.")
11635 (license license:asl2.0)))
11636
11637 (define-public python-chai
11638 (package
11639 (name "python-chai")
11640 (version "1.1.2")
11641 (source (origin
11642 (method url-fetch)
11643 (uri (pypi-uri "chai" version))
11644 (sha256
11645 (base32
11646 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
11647 (build-system python-build-system)
11648 (home-page "https://github.com/agoragames/chai")
11649 (synopsis "Mocking framework for Python")
11650 (description
11651 "Chai provides an api for mocking, stubbing and spying your python
11652 objects, patterned after the Mocha library for Ruby.")
11653 (license license:bsd-3)))
11654
11655 (define-public python2-chai
11656 (package-with-python2 python-chai))
11657
11658 (define-public python-inflection
11659 (package
11660 (name "python-inflection")
11661 (version "0.3.1")
11662 (source
11663 (origin (method url-fetch)
11664 (uri (pypi-uri "inflection" version))
11665 (sha256
11666 (base32
11667 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11668 (build-system python-build-system)
11669 (native-inputs
11670 `(("python-pytest" ,python-pytest)))
11671 (home-page "https://github.com/jpvanhal/inflection")
11672 (synopsis "Python string transformation library")
11673 (description
11674 "Inflection is a string transformation library. It singularizes
11675 and pluralizes English words, and transforms strings from CamelCase to
11676 underscored string.")
11677 (license license:expat)))
11678
11679 (define-public python2-inflection
11680 (package-with-python2 python-inflection))
11681
11682 (define-public python-pylev
11683 (package
11684 (name "python-pylev")
11685 (version "1.3.0")
11686 (source (origin
11687 (method url-fetch)
11688 (uri (pypi-uri "pylev" version))
11689 (sha256
11690 (base32
11691 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11692 (build-system python-build-system)
11693 (home-page "https://github.com/toastdriven/pylev")
11694 (synopsis "Levenshtein distance implementation in Python")
11695 (description "Pure Python Levenshtein implementation, based off the
11696 Wikipedia code samples at
11697 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11698 (license license:bsd-3)))
11699
11700 (define-public python2-pylev
11701 (package-with-python2 python-pylev))
11702
11703 (define-public python-cleo
11704 (package
11705 (name "python-cleo")
11706 (version "0.7.6")
11707 (source (origin
11708 (method url-fetch)
11709 (uri (pypi-uri "cleo" version))
11710 (sha256
11711 (base32
11712 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
11713 (build-system python-build-system)
11714 (native-inputs
11715 `( ;; For testing
11716 ("python-mock" ,python-mock)
11717 ("python-pytest-mock" ,python-pytest-mock)
11718 ("python-pytest" ,python-pytest)))
11719 (propagated-inputs
11720 `(("python-backpack" ,python-backpack)
11721 ("python-clikit" ,python-clikit)
11722 ("python-pastel" ,python-pastel)
11723 ("python-pylev" ,python-pylev)))
11724 (home-page "https://github.com/sdispater/cleo")
11725 (synopsis "Command-line arguments library for Python")
11726 (description
11727 "Cleo allows you to create command-line commands with signature in
11728 docstring and colored output.")
11729 (license license:expat)))
11730
11731 (define-public python2-cleo
11732 (package-with-python2 python-cleo))
11733
11734 (define-public python-tomlkit
11735 (package
11736 (name "python-tomlkit")
11737 (version "0.5.11")
11738 (source
11739 (origin
11740 (method url-fetch)
11741 (uri (pypi-uri "tomlkit" version))
11742 (sha256
11743 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
11744 (build-system python-build-system)
11745 (native-inputs
11746 `(("python-pytest" ,python-pytest)))
11747 (home-page "https://github.com/sdispater/tomlkit")
11748 (synopsis "Style-preserving TOML library")
11749 (description
11750 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11751 preserves all comments, indentations, whitespace and internal element ordering,
11752 and makes them accessible and editable via an intuitive API. It can also
11753 create new TOML documents from scratch using the provided helpers. Part of the
11754 implementation has been adapted, improved, and fixed from Molten.")
11755 (license license:expat)))
11756
11757 (define-public python-shellingham
11758 (package
11759 (name "python-shellingham")
11760 (version "1.3.1")
11761 (source
11762 (origin
11763 (method url-fetch)
11764 (uri (pypi-uri "shellingham" version))
11765 (sha256
11766 (base32
11767 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
11768 (build-system python-build-system)
11769 (home-page
11770 "https://github.com/sarugaku/shellingham")
11771 (synopsis "Tool to detect surrounding shell")
11772 (description
11773 "Shellingham detects what shell the current Python executable is
11774 running in.")
11775 (license license:isc)))
11776
11777 (define-public python-memcached
11778 (package
11779 (name "python-memcached")
11780 (version "1.59")
11781 (source
11782 (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "python-memcached" version))
11785 (sha256
11786 (base32
11787 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
11788 (build-system python-build-system)
11789 (propagated-inputs `(("python-six" ,python-six)))
11790 (home-page
11791 "https://github.com/linsomniac/python-memcached")
11792 (synopsis "Pure python memcached client")
11793 (description
11794 "This software is a pure Python interface to the memcached memory cache
11795 daemon. It is the client side software which allows storing values in one or
11796 more, possibly remote, memcached servers.")
11797 (license license:psfl)))
11798
11799 (define-public python-clikit
11800 (package
11801 (name "python-clikit")
11802 (version "0.4.2")
11803 (source
11804 (origin
11805 (method url-fetch)
11806 (uri (pypi-uri "clikit" version))
11807 (sha256
11808 (base32
11809 "1jnnr21hvzx4i29nbph1z96ympv0njiwyvngjq48w1q05133cwzn"))))
11810 (build-system python-build-system)
11811 (propagated-inputs
11812 `(("python-pastel" ,python-pastel)
11813 ("python-pylev" ,python-pylev)))
11814 (home-page "https://github.com/sdispater/clikit")
11815 (synopsis "Group of utilities to build command line interfaces")
11816 (description
11817 "CliKit is a group of utilities to build testable command line
11818 interfaces.")
11819 (properties `((python2-variant . ,(delay python2-clikit))))
11820 (license license:expat)))
11821
11822 (define-public python2-clikit
11823 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
11824 (package/inherit
11825 base
11826 (propagated-inputs
11827 `(("python-enum34" ,python2-enum34)
11828 ("python-typing" ,python2-typing)
11829 ,@(package-propagated-inputs base))))))
11830
11831 (define-public python-msgpack-python
11832 (package
11833 (name "python-msgpack-python")
11834 (version "0.5.6")
11835 (source
11836 (origin
11837 (method url-fetch)
11838 (uri (pypi-uri "msgpack-python" version))
11839 (sha256
11840 (base32
11841 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
11842 (build-system python-build-system)
11843 (home-page "http://msgpack.org/")
11844 (synopsis "Package to deserialize messages in MessagePack binary format")
11845 (description
11846 "MessagePack is an efficient binary serialization format. It lets you
11847 exchange data among multiple languages like JSON. But it's faster and
11848 smaller. Small integers are encoded into a single byte, and typical short
11849 strings require only one extra byte in addition to the strings themselves.")
11850 (license license:asl2.0)))
11851
11852 (define-public python-cachy
11853 (package
11854 (name "python-cachy")
11855 (version "0.3.0")
11856 (source
11857 (origin
11858 (method url-fetch)
11859 (uri (pypi-uri "cachy" version))
11860 (sha256
11861 (base32
11862 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
11863 (build-system python-build-system)
11864 (arguments
11865 '(#:phases
11866 (modify-phases %standard-phases
11867 (replace 'check
11868 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
11869 "pytest"))))))
11870 (native-inputs
11871 `(("memcached" ,memcached)
11872 ("python-fakeredis" ,python-fakeredis)
11873 ("python-flexmock" ,python-flexmock)
11874 ("python-pifpaf" ,python-pifpaf)
11875 ("python-pytest" ,python-pytest)))
11876 (propagated-inputs
11877 `(("python-memcached" ,python-memcached)
11878 ("python-msgpack-python" ,python-msgpack-python)
11879 ("python-redis" ,python-redis)))
11880 (home-page "https://github.com/sdispater/cachy")
11881 (synopsis "Simple yet effective caching library")
11882 (description
11883 "Cachy provides a simple yet effective caching library. A simple but
11884 powerful API: thread-safety; decorator syntax; support for memcached, redis,
11885 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
11886 (license license:expat)))
11887
11888 (define-public poetry
11889 (package
11890 (name "poetry")
11891 (version "1.0.5")
11892 ;; Poetry can only be built from source with Poetry.
11893 (source
11894 (origin
11895 (method url-fetch)
11896 (uri (pypi-uri "poetry" version))
11897 (sha256
11898 (base32
11899 "02h387k0xssvv78yy82pcpknpq4w5ym2in1zl8cg9r5wljl5w6cf"))))
11900 (build-system python-build-system)
11901 (arguments
11902 `(#:tests? #f ;; Pypi does not have tests.
11903 #:phases
11904 (modify-phases %standard-phases
11905 (add-before 'build 'patch-setup-py
11906 (lambda _
11907 (substitute* "setup.py"
11908 ;; poetry won't update version as 21.0.0 relies on python > 3.6
11909 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
11910 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.16.0")
11911 (("importlib-metadata>=1.1.3,<1.2.0") "importlib-metadata>=1.1.3,<1.5.0"))
11912 #t)))))
11913 (propagated-inputs
11914 `(("python-cachecontrol" ,python-cachecontrol)
11915 ("python-cachy" ,python-cachy)
11916 ("python-cleo" ,python-cleo)
11917 ("python-clikit" ,python-clikit)
11918 ("python-html5lib" ,python-html5lib)
11919 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
11920 ("python-jsonschema" ,python-jsonschema)
11921 ("python-keyring" ,python-keyring)
11922 ("python-pexpect" ,python-pexpect)
11923 ("python-pkginfo" ,python-pkginfo)
11924 ("python-pyparsing" ,python-pyparsing)
11925 ("python-pyrsistent" ,python-pyrsistent)
11926 ("python-requests" ,python-requests)
11927 ("python-requests-toolbelt" ,python-requests-toolbelt)
11928 ("python-shellingham" ,python-shellingham)
11929 ("python-tomlkit" ,python-tomlkit)
11930 ("python-virtualenv" ,python-virtualenv)))
11931 (home-page "https://python-poetry.org")
11932 (synopsis "Python dependency management and packaging made easy")
11933 (description "Poetry is a tool for dependency management and packaging
11934 in Python. It allows you to declare the libraries your project depends on and
11935 it will manage (install/update) them for you.")
11936 (license license:expat)))
11937
11938 (define-public python-lazy-object-proxy
11939 (package
11940 (name "python-lazy-object-proxy")
11941 (version "1.4.3")
11942 (source (origin
11943 (method url-fetch)
11944 (uri (pypi-uri "lazy-object-proxy" version))
11945 (sha256
11946 (base32
11947 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
11948 (native-inputs
11949 `(("python-setuptools-scm" ,python-setuptools-scm)))
11950 (build-system python-build-system)
11951 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11952 (synopsis "Lazy object proxy for python")
11953 (description
11954 "Lazy object proxy is an object that wraps a callable but defers the call
11955 until the object is actually required, and caches the result of said call.")
11956 (license license:bsd-2)))
11957
11958 (define-public python2-lazy-object-proxy
11959 (package-with-python2 python-lazy-object-proxy))
11960
11961 (define-public python-dnspython
11962 (package
11963 (name "python-dnspython")
11964 (version "1.16.0")
11965 (source (origin
11966 (method url-fetch)
11967 (uri (string-append "http://www.dnspython.org/kits/"
11968 version "/dnspython-" version ".tar.gz"))
11969 (sha256
11970 (base32
11971 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
11972 (build-system python-build-system)
11973 (arguments '(#:tests? #f)) ; XXX: requires internet access
11974 (home-page "http://www.dnspython.org")
11975 (synopsis "DNS toolkit for Python")
11976 (description
11977 "dnspython is a DNS toolkit for Python. It supports almost all record
11978 types. It can be used for queries, zone transfers, and dynamic updates.
11979 It supports TSIG authenticated messages and EDNS0.")
11980 (license license:expat)))
11981
11982 (define-public python2-dnspython
11983 (package-with-python2 python-dnspython))
11984
11985 (define-public python-email-validator
11986 (package
11987 (name "python-email-validator")
11988 (version "1.0.2")
11989 (source
11990 (origin (method url-fetch)
11991 (uri (pypi-uri "email_validator" version))
11992 (sha256
11993 (base32
11994 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11995 (build-system python-build-system)
11996 (arguments
11997 '(#:phases
11998 (modify-phases %standard-phases
11999 (add-before 'build 'use-dnspython
12000 (lambda _
12001 (substitute* "setup.py"
12002 (("dnspython3") "dnspython"))
12003 #t)))))
12004 (propagated-inputs
12005 `(("python-dnspython" ,python-dnspython)
12006 ("python-idna" ,python-idna)))
12007 (home-page "https://github.com/JoshData/python-email-validator")
12008 (synopsis "Email address validation library for Python")
12009 (description
12010 "This library validates email address syntax and deliverability.")
12011 (license license:cc0)))
12012
12013 (define-public python2-email-validator
12014 (package-with-python2 python-email-validator))
12015
12016 (define-public python-ukpostcodeparser
12017 (package
12018 (name "python-ukpostcodeparser")
12019 (version "1.0.3")
12020 (source (origin
12021 (method url-fetch)
12022 (uri (pypi-uri "UkPostcodeParser" version))
12023 (sha256
12024 (base32
12025 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
12026 (build-system python-build-system)
12027 (home-page "https://github.com/hamstah/ukpostcodeparser")
12028 (synopsis "UK Postcode parser for Python")
12029 (description
12030 "This library provides the @code{parse_uk_postcode} function for
12031 parsing UK postcodes.")
12032 (license license:expat)))
12033
12034 (define-public python2-ukpostcodeparser
12035 (package-with-python2 python-ukpostcodeparser))
12036
12037 (define-public python-faker
12038 (package
12039 (name "python-faker")
12040 (version "4.0.2")
12041 (source (origin
12042 (method url-fetch)
12043 (uri (pypi-uri "Faker" version))
12044 (sha256
12045 (base32
12046 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
12047 (build-system python-build-system)
12048 (arguments
12049 '(#:phases
12050 (modify-phases %standard-phases
12051 (replace 'check
12052 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
12053 (native-inputs
12054 `(;; For testing
12055 ("python-freezegun" ,python-freezegun)
12056 ("python-pytest" ,python-pytest)
12057 ("python-random2" ,python-random2)
12058 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
12059 ("python-validators" ,python-validators)))
12060 (propagated-inputs
12061 `(("python-dateutil" ,python-dateutil)
12062 ("python-text-unidecode" ,python-text-unidecode)))
12063 (home-page "https://github.com/joke2k/faker")
12064 (synopsis "Python package that generates fake data")
12065 (description
12066 "Faker is a Python package that generates fake data such as names,
12067 addresses, and phone numbers.")
12068 (license license:expat)
12069 (properties `((python2-variant . ,(delay python2-faker))))))
12070
12071 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
12072 (define-public python2-faker
12073 (let ((base (package-with-python2 (strip-python2-variant
12074 python-faker))))
12075 (package
12076 (inherit base)
12077 (version "3.0.1")
12078 (source (origin
12079 (method url-fetch)
12080 (uri (pypi-uri "Faker" version))
12081 (sha256
12082 (base32
12083 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
12084 (native-inputs
12085 `(("python-mock" ,python2-mock)
12086 ,@(package-native-inputs base)))
12087 (propagated-inputs
12088 `(("python2-ipaddress" ,python2-ipaddress)
12089 ("python2-six" ,python2-six)
12090 ,@(package-propagated-inputs base))))))
12091
12092 (define-public python-pyaml
12093 (package
12094 (name "python-pyaml")
12095 (version "18.11.0")
12096 (source (origin
12097 (method url-fetch)
12098 (uri (pypi-uri "pyaml" version))
12099 (sha256
12100 (base32
12101 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
12102 (build-system python-build-system)
12103 (native-inputs
12104 `(("python-unidecode" ,python-unidecode)))
12105 (propagated-inputs
12106 `(("python-pyyaml" ,python-pyyaml)))
12107 (home-page "https://github.com/mk-fg/pretty-yaml")
12108 (synopsis "YAML pretty-print library for Python")
12109 (description
12110 "pyaml is a PyYAML based python module to produce pretty and readable
12111 YAML-serialized data.")
12112 (license license:wtfpl2)))
12113
12114 (define-public python2-pyaml
12115 (package-with-python2 python-pyaml))
12116
12117 (define-public python-backpack
12118 (package
12119 (name "python-backpack")
12120 (version "0.1")
12121 (source
12122 (origin
12123 (method url-fetch)
12124 (uri (pypi-uri "backpack" version))
12125 (sha256
12126 (base32
12127 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
12128 (build-system python-build-system)
12129 (native-inputs
12130 `(("python-pytest" ,python-pytest)
12131 ("python-nose" ,python-nose)))
12132 (propagated-inputs
12133 `(("python-simplejson" ,python-simplejson)))
12134 (home-page "https://github.com/sdispater/backpack")
12135 (synopsis "Utilities for working with Python collections")
12136 (description "Backpack provides some useful utilities for working with
12137 collections of data.")
12138 (license license:expat)))
12139
12140 (define-public python2-backpack
12141 (package-with-python2 python-backpack))
12142
12143 (define-public python-prompt-toolkit
12144 (package
12145 (name "python-prompt-toolkit")
12146 (version "3.0.5")
12147 (source
12148 (origin
12149 (method url-fetch)
12150 (uri (pypi-uri "prompt_toolkit" version))
12151 (sha256
12152 (base32
12153 "1j3x5s4gp4ih73sbcni0a0vffbzvrxbrbnkvb3fzjgxn810ilgan"))))
12154 (build-system python-build-system)
12155 (arguments
12156 `(#:phases
12157 (modify-phases %standard-phases
12158 (delete 'check)
12159 (add-after 'install 'post-install-check
12160 (lambda* (#:key inputs outputs #:allow-other-keys)
12161 ;; HOME is needed for the test
12162 ;; "test_pathcompleter_can_expanduser".
12163 (setenv "HOME" "/tmp")
12164 (add-installed-pythonpath inputs outputs)
12165 (invoke "py.test"))))))
12166 (propagated-inputs
12167 `(("python-wcwidth" ,python-wcwidth)))
12168 (native-inputs
12169 `(("python-pytest" ,python-pytest)))
12170 (home-page
12171 "https://github.com/prompt-toolkit/python-prompt-toolkit")
12172 (synopsis "Library for building command line interfaces in Python")
12173 (description
12174 "Prompt-Toolkit is a library for building interactive command line
12175 interfaces in Python. It's like GNU Readline but it also features syntax
12176 highlighting while typing, out-of-the-box multi-line input editing, advanced
12177 code completion, incremental search, support for Chinese double-width
12178 characters, mouse support, and auto suggestions.")
12179 (license license:bsd-3)))
12180
12181 (define-public python-prompt-toolkit-2
12182 (package (inherit python-prompt-toolkit)
12183 (name "python-prompt-toolkit")
12184 (version "2.0.7")
12185 (source
12186 (origin
12187 (method url-fetch)
12188 (uri (pypi-uri "prompt_toolkit" version))
12189 (sha256
12190 (base32
12191 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
12192 (propagated-inputs
12193 `(("python-wcwidth" ,python-wcwidth)
12194 ("python-six" ,python-six)
12195 ("python-pygments" ,python-pygments)))))
12196
12197 (define-public prompt-toolkit-2-instead-of-prompt-toolkit
12198 (package-input-rewriting/spec
12199 `(("python-prompt-toolkit" . ,(const python-prompt-toolkit-2)))))
12200
12201 (define-public python2-prompt-toolkit
12202 (package-with-python2 python-prompt-toolkit-2))
12203
12204 (define-public python-prompt-toolkit-1
12205 (package (inherit python-prompt-toolkit-2)
12206 (version "1.0.15")
12207 (source
12208 (origin
12209 (method url-fetch)
12210 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
12211 (sha256
12212 (base32
12213 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
12214
12215 (define-public python2-prompt-toolkit-1
12216 (package-with-python2 python-prompt-toolkit-1))
12217
12218 (define-public python-jedi
12219 (package
12220 (name "python-jedi")
12221 (version "0.17.0")
12222 (source
12223 (origin
12224 (method url-fetch)
12225 (uri (pypi-uri "jedi" version))
12226 (patches (search-patches "python-jedi-sort-project-test.patch"))
12227 (sha256
12228 (base32
12229 "0c1h9x3a9klvk2g288wl328x8xgzw7136k6vs9hkd56b85vcjh6z"))))
12230 (build-system python-build-system)
12231 (arguments
12232 `(#:phases
12233 (modify-phases %standard-phases
12234 (add-before 'check 'adjust-test-for-python-3.8
12235 (lambda _
12236 ;; Mimic upstream commit e7feeef64 to allow for extra output lines
12237 ;; in TestSetupReadline on Python 3.8. Remove for jedi > 0.17.0.
12238 (substitute* "test/test_utils.py"
12239 (("assert len\\(difference\\) < 20")
12240 "assert len(difference) < 22"))
12241 #t))
12242 (replace 'check
12243 (lambda _
12244 (setenv "HOME" "/tmp")
12245 (invoke "python" "-m" "pytest" "-vv"))))))
12246 (native-inputs
12247 `(("python-pytest" ,python-pytest)
12248 ("python-docopt" ,python-docopt)))
12249 (propagated-inputs
12250 `(("python-parso" ,python-parso)))
12251 (home-page "https://github.com/davidhalter/jedi")
12252 (synopsis "Autocompletion and static analysis library for Python")
12253 (description
12254 "Jedi is a static analysis tool for Python that can be used in Integrated
12255 Development Environments (@dfn{IDE}s) and text editors. It understands Python
12256 on a deeper level than many other static analysis frameworks for Python.
12257
12258 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
12259 well.")
12260 (license license:expat)))
12261
12262 (define-public python2-jedi
12263 (package-with-python2 python-jedi))
12264
12265 (define-public ptpython
12266 (package
12267 (name "ptpython")
12268 (version "0.34")
12269 (source (origin
12270 (method url-fetch)
12271 (uri (pypi-uri "ptpython" version))
12272 (sha256
12273 (base32
12274 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12275 (build-system python-build-system)
12276 (arguments
12277 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
12278 (propagated-inputs
12279 `(("python-docopt" ,python-docopt)
12280 ("python-jedi" ,python-jedi)
12281 ("python-prompt-toolkit" ,python-prompt-toolkit)
12282 ("python-pygments" ,python-pygments)))
12283 (home-page "https://github.com/jonathanslenders/ptpython")
12284 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12285 (description
12286 "ptpython is a Python read-eval-print loop with IDE-like features.
12287 It supports syntax highlighting, multiline editing, autocompletion, mouse,
12288 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12289 etc.")
12290 (license license:bsd-3)
12291 (properties `((python2-variant . ,(delay ptpython-2))))))
12292
12293 (define-public ptpython-2
12294 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12295 (package
12296 (inherit base)
12297 (name "ptpython2"))))
12298
12299 (define-public python-stem
12300 (package
12301 (name "python-stem")
12302 (version "1.8.0")
12303 (source
12304 (origin
12305 (method url-fetch)
12306 (uri (pypi-uri "stem" version))
12307 (sha256
12308 (base32
12309 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
12310 (build-system python-build-system)
12311 (arguments
12312 `(#:phases
12313 (modify-phases %standard-phases
12314 (replace 'check
12315 (lambda _
12316 (invoke "./run_tests.py" "--unit")
12317 #t)))))
12318 (native-inputs
12319 `(("python-mock" ,python-mock)
12320 ("python-pycodestyle" ,python-pycodestyle)
12321 ("python-pyflakes" ,python-pyflakes)))
12322 (home-page "https://stem.torproject.org/")
12323 (synopsis
12324 "Python controller library that allows applications to interact with Tor")
12325 (description
12326 "Stem is a Python controller library for Tor. With it you can use Tor's
12327 control protocol to script against the Tor process and read descriptor data
12328 relays publish about themselves.")
12329 (license license:lgpl3)))
12330
12331 (define-public python2-stem
12332 (package-with-python2 python-stem))
12333
12334 (define-public python-pyserial
12335 (package
12336 (name "python-pyserial")
12337 (version "3.4")
12338 (source
12339 (origin
12340 (method url-fetch)
12341 (uri (pypi-uri "pyserial" version))
12342 (sha256
12343 (base32
12344 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
12345 (build-system python-build-system)
12346 (arguments
12347 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12348 ;; #:phases
12349 ;; (modify-phases %standard-phases
12350 ;; (replace 'check
12351 ;; (lambda _
12352 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12353 (home-page
12354 "https://github.com/pyserial/pyserial")
12355 (synopsis "Python Serial Port Bindings")
12356 (description "@code{pyserial} provide serial port bindings for Python. It
12357 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12358 and/or Xon/Xoff. The port is accessed in RAW mode.")
12359 (license license:bsd-3)))
12360
12361 (define-public python2-pyserial
12362 (package-with-python2 python-pyserial))
12363
12364 (define-public python-kivy
12365 (package
12366 (name "python-kivy")
12367 (version "1.10.1")
12368 (source
12369 (origin
12370 (method url-fetch)
12371 (uri (pypi-uri "Kivy" version))
12372 (file-name (string-append name "-" version ".tar.gz"))
12373 (sha256
12374 (base32
12375 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
12376 (build-system python-build-system)
12377 (arguments
12378 `(#:tests? #f ; Tests require many optional packages
12379 #:phases
12380 (modify-phases %standard-phases
12381 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12382 (lambda* (#:key inputs #:allow-other-keys)
12383 (setenv "KIVY_SDL2_PATH"
12384 (string-append (assoc-ref inputs "sdl-union")
12385 "/include/SDL2"))
12386 #t)))))
12387 (native-inputs
12388 `(("pkg-config" ,pkg-config)
12389 ("python-cython" ,python-cython)))
12390 (inputs
12391 `(("gstreamer" ,gstreamer)
12392 ("mesa" ,mesa)
12393 ("sdl-union"
12394 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12395 (home-page "https://kivy.org")
12396 (synopsis
12397 "Multitouch application framework")
12398 (description
12399 "A software library for rapid development of
12400 hardware-accelerated multitouch applications.")
12401 (license license:expat)))
12402
12403 (define-public python2-kivy
12404 (package-with-python2 python-kivy))
12405
12406 (define-public python-binaryornot
12407 (package
12408 (name "python-binaryornot")
12409 (version "0.4.4")
12410 (source (origin
12411 (method url-fetch)
12412 (uri (pypi-uri "binaryornot" version))
12413 (sha256
12414 (base32
12415 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
12416 (build-system python-build-system)
12417 (arguments
12418 `(#:phases
12419 (modify-phases %standard-phases
12420 (add-after 'unpack 'patch-tests
12421 (lambda _
12422 ;; TypeError: binary() got an unexpected keyword argument
12423 ;; 'average_size'.
12424 (substitute* "tests/test_check.py"
12425 (("average_size=512") ""))
12426 #t)))))
12427 (propagated-inputs
12428 `(("python-chardet" ,python-chardet)
12429 ("python-hypothesis" ,python-hypothesis)))
12430 (home-page "https://github.com/audreyr/binaryornot")
12431 (synopsis "Package to check if a file is binary or text")
12432 (description "Ultra-lightweight pure Python package to check if a file is
12433 binary or text.")
12434 (license license:bsd-3)
12435 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12436
12437 (define-public python2-binaryornot
12438 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12439 (package (inherit base)
12440 (propagated-inputs
12441 `(("python2-enum34" ,python2-enum34)
12442 ,@(package-propagated-inputs base))))))
12443
12444 (define-public python-binwalk
12445 (package
12446 (name "python-binwalk")
12447 (version "2.2.0")
12448 (source
12449 (origin
12450 (method git-fetch)
12451 (uri (git-reference
12452 (url "https://github.com/ReFirmLabs/binwalk")
12453 (commit (string-append "v" version))))
12454 (file-name (git-file-name name version))
12455 (sha256
12456 (base32
12457 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
12458 (build-system python-build-system)
12459 (arguments
12460 `(#:phases
12461 (modify-phases %standard-phases
12462 (add-before 'check 'set-pythonpath
12463 (lambda _
12464 (setenv "PYTHONPATH"
12465 (string-append
12466 (getcwd) "/src/"
12467 ":" (getenv "PYTHONPATH")))
12468 (setenv "HOME" "")
12469 #t)))))
12470 (native-inputs
12471 `(("python-coverage" ,python-coverage)
12472 ("python-nose" ,python-nose)))
12473 (home-page "https://github.com/ReFirmLabs/binwalk")
12474 (synopsis "Firmware analysis tool")
12475 (description "Binwalk is a tool for analyzing, reverse engineering, and
12476 extracting firmware images")
12477 (license license:expat)))
12478
12479 (define-public python-nltk
12480 (package
12481 (name "python-nltk")
12482 (version "3.2.1")
12483 (source (origin
12484 (method url-fetch)
12485 (uri (pypi-uri "nltk" version))
12486 (sha256
12487 (base32
12488 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12489 (build-system python-build-system)
12490 (arguments
12491 '(;; The tests require some extra resources to be downloaded.
12492 ;; TODO Try packaging these resources.
12493 #:tests? #f))
12494 (home-page "http://nltk.org/")
12495 (synopsis "Natural Language Toolkit")
12496 (description "It provides interfaces to over 50 corpora and lexical
12497 resources such as WordNet, along with a suite of text processing libraries
12498 for classification, tokenization, stemming, tagging, parsing, and semantic
12499 reasoning, wrappers for natural language processing libraries.")
12500 (license license:asl2.0)))
12501
12502 (define-public python2-nltk
12503 (package-with-python2 python-nltk))
12504
12505 (define-public python-pymongo
12506 (package
12507 (name "python-pymongo")
12508 (version "3.7.2")
12509 (source (origin
12510 (method url-fetch)
12511 (uri (pypi-uri "pymongo" version))
12512 (sha256
12513 (base32
12514 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
12515 (build-system python-build-system)
12516 (propagated-inputs
12517 `(("python-certifi" ,python-certifi)))
12518 (home-page "https://github.com/mongodb/mongo-python-driver")
12519 (synopsis "Python driver for MongoDB")
12520 (description "Python driver for MongoDB.")
12521 (license license:asl2.0)))
12522
12523 (define-public python2-pymongo
12524 (package-with-python2 python-pymongo))
12525
12526 (define-public python-consul
12527 (package
12528 (name "python-consul")
12529 (version "0.6.1")
12530 (source
12531 (origin
12532 (method url-fetch)
12533 (uri (pypi-uri "python-consul" version))
12534 (sha256
12535 (base32
12536 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12537 (build-system python-build-system)
12538 (arguments
12539 '(#:tests? #f)) ; The tests are not distributed
12540 (propagated-inputs
12541 `(("python-requests" ,python-requests)
12542 ("python-six" ,python-six)))
12543 (home-page "https://github.com/cablehead/python-consul")
12544 (synopsis "Python client for Consul")
12545 (description
12546 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12547 discovery, monitoring and configuration.")
12548 (license license:expat)))
12549
12550 (define-public python2-consul
12551 (package-with-python2 python-consul))
12552
12553 (define-public python-schematics
12554 (package
12555 (name "python-schematics")
12556 (version "1.1.1")
12557 (source
12558 (origin
12559 (method git-fetch)
12560 (uri (git-reference
12561 (url "https://github.com/schematics/schematics.git")
12562 (commit (string-append "v" version))))
12563 (file-name (git-file-name name version))
12564 (sha256
12565 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
12566 (build-system python-build-system)
12567 (propagated-inputs
12568 `(("python-six" ,python-six)))
12569 (arguments
12570 ;; The tests require a bunch of not very nice packages with fixed
12571 ;; version requirements (e.g. python-coveralls).
12572 `(#:tests? #f))
12573 (home-page "https://github.com/schematics/schematics")
12574 (synopsis "Python Data Structures for Humans")
12575 (description "Python Data Structures for Humans.")
12576 (license license:bsd-3)))
12577
12578 (define-public python2-schematics
12579 (package-with-python2 python-schematics))
12580
12581 (define-public python-odfpy
12582 (package
12583 (name "python-odfpy")
12584 (version "1.3.3")
12585 (source (origin
12586 (method url-fetch)
12587 (uri (pypi-uri "odfpy" version))
12588 (sha256
12589 (base32
12590 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12591 (arguments
12592 `(#:modules ((srfi srfi-1)
12593 (guix build python-build-system)
12594 (guix build utils))
12595 #:phases
12596 (modify-phases %standard-phases
12597 (replace 'check
12598 ;; The test runner invokes python2 and python3 for test*.py.
12599 ;; To avoid having both in inputs, we replicate it here.
12600 (lambda _
12601 (for-each (lambda (test-file) (invoke "python" test-file))
12602 (find-files "tests" "^test.*\\.py$"))
12603 #t)))))
12604 (build-system python-build-system)
12605 (home-page "https://github.com/eea/odfpy")
12606 (synopsis "Python API and tools to manipulate OpenDocument files")
12607 (description "Collection of libraries and utility programs written in
12608 Python to manipulate OpenDocument 1.2 files.")
12609 (license
12610 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12611 ;; number of files with other licenses.
12612 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12613
12614 (define-public python2-odfpy
12615 (package-with-python2 python-odfpy))
12616
12617 (define-public python-natsort
12618 (package
12619 (name "python-natsort")
12620 (version "7.0.1")
12621 (source (origin
12622 (method url-fetch)
12623 (uri (pypi-uri "natsort" version))
12624 (sha256
12625 (base32
12626 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
12627 (build-system python-build-system)
12628 (arguments
12629 `(#:modules ((guix build utils)
12630 (guix build python-build-system)
12631 (srfi srfi-1)
12632 (srfi srfi-26)
12633 (ice-9 ftw))
12634 #:phases
12635 (modify-phases %standard-phases
12636 (add-before 'check 'set-cachedir
12637 ;; Tests require write access to $HOME by default
12638 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
12639 (replace 'check
12640 (lambda _
12641 (let ((cwd (getcwd)))
12642 (setenv "PYTHONPATH"
12643 (string-append
12644 cwd "/build/"
12645 (find (cut string-prefix? "lib" <>)
12646 (scandir (string-append cwd "/build")))
12647 ":"
12648 (getenv "PYTHONPATH")))
12649 (invoke "pytest" "-v")))))))
12650 (native-inputs
12651 `(("python-hypothesis" ,python-hypothesis)
12652 ("python-pytest-cov" ,python-pytest-cov)
12653 ("python-pytest-mock" ,python-pytest-mock)
12654 ("python-pytest" ,python-pytest)))
12655 (propagated-inputs ; TODO: Add python-fastnumbers.
12656 `(("python-pyicu" ,python-pyicu)))
12657 (home-page "https://github.com/SethMMorton/natsort")
12658 (synopsis "Natural sorting for python and shell")
12659 (description
12660 "Natsort lets you apply natural sorting on lists instead of
12661 lexicographical. If you use the built-in @code{sorted} method in python
12662 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
12663 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
12664 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
12665 identifies numbers and sorts them separately from strings. It can also sort
12666 version numbers, real numbers, mixed types and more, and comes with a shell
12667 command @command{natsort} that exposes this functionality in the command line.")
12668 (license license:expat)
12669 (properties `((python2-variant . ,(delay python2-natsort))))))
12670
12671 ;; Natsort 6.x are the last versions with support for Python 2.
12672 (define-public python2-natsort
12673 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12674 (package (inherit base)
12675 (version "6.2.1")
12676 (source (origin
12677 (method url-fetch)
12678 (uri (pypi-uri "natsort" version))
12679 (sha256
12680 (base32
12681 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
12682 (native-inputs
12683 `(("python2-pathlib" ,python2-pathlib)
12684 ,@(package-native-inputs base))))))
12685
12686 (define-public glances
12687 (package
12688 (name "glances")
12689 (version "3.1.4")
12690 (source
12691 (origin
12692 (method url-fetch)
12693 (uri (pypi-uri "Glances" version))
12694 (sha256
12695 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
12696 (modules '((guix build utils)))
12697 (snippet
12698 '(begin
12699 ;; Glances phones PyPI for weekly update checks by default.
12700 ;; Disable these. The user can re-enable them if desired.
12701 (substitute* "glances/outdated.py"
12702 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
12703 (string-append indentation
12704 "self.args.disable_check_update = True\n"
12705 line)))
12706 #t))))
12707 (build-system python-build-system)
12708 (propagated-inputs
12709 `(("python-future" ,python-future)
12710 ("python-psutil" ,python-psutil)))
12711 (home-page "https://github.com/nicolargo/glances")
12712 (synopsis "Cross-platform curses-based monitoring tool")
12713 (description
12714 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12715 Glances uses the PsUtil library to get information from your system. It
12716 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12717 (license license:lgpl3+)))
12718
12719 (define-public python-glances
12720 (deprecated-package "python-glances" glances))
12721
12722 (define-public python-graphql-core
12723 (package
12724 (name "python-graphql-core")
12725 (version "0.5.3")
12726 (source
12727 (origin
12728 (method url-fetch)
12729 (uri (pypi-uri "graphql-core" version))
12730 (sha256
12731 (base32
12732 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12733 (build-system python-build-system)
12734 (arguments
12735 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12736 #:phases
12737 (modify-phases %standard-phases
12738 (add-after 'unpack 'patch-hardcoded-version
12739 (lambda _ (substitute*
12740 "setup.py"
12741 (("'gevent==1.1rc1'") "'gevent'"))
12742 #t)))))
12743 (native-inputs
12744 `(("python-gevent" ,python-gevent)
12745 ("python-mock" ,python-mock)
12746 ("python-pytest-mock" ,python-pytest-mock)))
12747 (propagated-inputs
12748 `(("python-promise" ,python-promise)
12749 ("python-six" ,python-six)))
12750 (home-page "https://github.com/graphql-python/graphql-core")
12751 (synopsis "GraphQL implementation for Python")
12752 (description
12753 "GraphQL implementation for Python. GraphQL is a data query language and
12754 runtime designed and used to request and deliver data to mobile and web apps.
12755 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12756 to Python.")
12757 (license license:expat)))
12758
12759 (define-public python2-graphql-core
12760 (package-with-python2 python-graphql-core))
12761
12762 (define-public python-graphql-relay
12763 (package
12764 (name "python-graphql-relay")
12765 (version "0.4.5")
12766 (source
12767 (origin
12768 (method url-fetch)
12769 (uri (pypi-uri "graphql-relay" version))
12770 (sha256
12771 (base32
12772 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12773 (build-system python-build-system)
12774 (arguments
12775 '(#:tests? #f)) ; The tests are not distributed
12776 (propagated-inputs
12777 `(("python-graphql-core" ,python-graphql-core)
12778 ("python-promise" ,python-promise)
12779 ("python-six" ,python-six)))
12780 (home-page "https://github.com/graphql-python/graphql-relay-py")
12781 (synopsis "Relay implementation for Python")
12782 (description
12783 "This is a library to allow the easy creation of Relay-compliant servers
12784 using the GraphQL Python reference implementation of a GraphQL server. It
12785 should be noted that the code is a exact port of the original
12786 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12787 from Facebook.")
12788 (license license:expat)))
12789
12790 (define-public python2-graphql-relay
12791 (package-with-python2 python-graphql-relay))
12792
12793 (define-public python-graphene
12794 (package
12795 (name "python-graphene")
12796 (version "0.10.2")
12797 (source
12798 (origin
12799 (method url-fetch)
12800 (uri (pypi-uri "graphene" version))
12801 (sha256
12802 (base32
12803 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12804 (build-system python-build-system)
12805 (propagated-inputs
12806 `(("python-graphql-core" ,python-graphql-core)
12807 ("python-graphql-relay" ,python-graphql-relay)
12808 ("python-iso8601" ,python-iso8601)
12809 ("python-promise" ,python-promise)
12810 ("python-six" ,python-six)))
12811 (arguments
12812 `(#:tests? #f)) ; no tests/ in the PyPI tarball
12813 (home-page "https://graphene-python.org/")
12814 (synopsis "GraphQL Framework for Python")
12815 (description
12816 "Graphene is a Python library for building GraphQL schemas/types.
12817 A GraphQL schema describes your data model, and provides a GraphQL server
12818 with an associated set of resolve methods that know how to fetch data.")
12819 (properties `((python2-variant . ,(delay python2-graphene))))
12820 (license license:expat)))
12821
12822 (define-public python2-graphene
12823 (let ((base (package-with-python2
12824 (strip-python2-variant python-graphene))))
12825 (package (inherit base)
12826 (native-inputs
12827 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12828 ,@(package-native-inputs base))))))
12829
12830 (define-public python-nautilus
12831 (package
12832 (name "python-nautilus")
12833 (version "0.4.9")
12834 (source
12835 (origin
12836 (method url-fetch)
12837 (uri (pypi-uri "nautilus" version))
12838 (sha256
12839 (base32
12840 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12841 (build-system python-build-system)
12842 (arguments `(#:tests? #f)) ; fails to import test modules
12843 (propagated-inputs
12844 `(("python-bcrypt" ,python-bcrypt)
12845 ("python-click" ,python-click)
12846 ("python-consul" ,python-consul)
12847 ("python-graphene" ,python-graphene)
12848 ("python-jinja2" ,python-jinja2)
12849 ("python-peewee" ,python-peewee)
12850 ("python-pika" ,python-pika)
12851 ("python-tornado" ,python-tornado)
12852 ("python-wtforms" ,python-wtforms)))
12853 (native-inputs
12854 `(("python-nose2" ,python-nose2)))
12855 (home-page "https://github.com/AlecAivazis/nautilus")
12856 (synopsis "Library for creating microservice applications")
12857 (description
12858 "Nautilus is a framework for flux based microservices that looks to
12859 provide extendible implementations of common aspects of a cloud so that you can
12860 focus on building massively scalable web applications.")
12861 (license license:expat)))
12862
12863 (define-public python-random2
12864 (package
12865 (name "python-random2")
12866 (version "1.0.1")
12867 (source (origin
12868 (method url-fetch)
12869 (uri (pypi-uri "random2" version ".zip"))
12870 (sha256
12871 (base32
12872 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
12873 (build-system python-build-system)
12874 (native-inputs `(("unzip" ,unzip)))
12875 (home-page "http://pypi.python.org/pypi/random2")
12876 (synopsis "Python 3 version of the Python 2 @code{random} module")
12877 (description
12878 "This package provides a Python 3 ported version of Python 2.7’s
12879 @code{random} module. It has also been back-ported to work in Python 2.6.
12880
12881 In Python 3, the implementation of @code{randrange()} was changed, so that
12882 even with the same seed you get different sequences in Python 2 and 3.
12883
12884 This package closes that gap, allowing stable random number generation
12885 between the different Python versions.")
12886 (license license:psfl)))
12887
12888 (define-public python2-random2
12889 (package-with-python2 python-random2))
12890
12891 (define-public python-snowballstemmer
12892 (package
12893 (name "python-snowballstemmer")
12894 (version "2.0.0")
12895 (source (origin
12896 (method url-fetch)
12897 (uri (pypi-uri "snowballstemmer" version))
12898 (sha256
12899 (base32
12900 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
12901 (build-system python-build-system)
12902 (arguments
12903 `(;; No tests exist
12904 #:tests? #f))
12905 (home-page "https://github.com/shibukawa/snowball_py")
12906 (synopsis "Snowball stemming library collection for Python")
12907 (description "This package provides 16 word stemmer algorithms generated
12908 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12909 English stemmer.")
12910 (license license:bsd-3)))
12911
12912 (define-public python2-snowballstemmer
12913 (package-with-python2 python-snowballstemmer))
12914
12915 (define-public python-setproctitle
12916 (package
12917 (name "python-setproctitle")
12918 (version "1.1.10")
12919 (source
12920 (origin
12921 (method url-fetch)
12922 (uri (pypi-uri "setproctitle" version))
12923 (sha256
12924 (base32
12925 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12926 (build-system python-build-system)
12927 (arguments
12928 '(#:phases
12929 (modify-phases %standard-phases
12930 (add-before 'check 'patch-Makefile
12931 ;; Stricly this is only required for the python2 variant.
12932 ;; But adding a phase in an inherited package seems to be
12933 ;; cumbersum. So we patch even for python3.
12934 (lambda _
12935 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12936 (when nose
12937 (substitute* "Makefile"
12938 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12939 (string-append nose "/bin/nosetests "))))
12940 #t)))
12941 (replace 'check
12942 (lambda _
12943 (setenv "PYTHON" (or (which "python3") (which "python")))
12944 (setenv "PYCONFIG" (or (which "python3-config")
12945 (which "python-config")))
12946 (setenv "CC" "gcc")
12947 ;; No need to extend PYTHONPATH to find the built package, since
12948 ;; the Makefile will build anyway
12949 (invoke "make" "check"))))))
12950 (native-inputs
12951 `(("procps" ,procps))) ; required for tests
12952 (home-page
12953 "https://github.com/dvarrazzo/py-setproctitle")
12954 (synopsis
12955 "Setproctitle implementation for Python to customize the process title")
12956 (description "The library allows a process to change its title (as displayed
12957 by system tools such as ps and top).
12958
12959 Changing the title is mostly useful in multi-process systems, for
12960 example when a master process is forked: changing the children's title
12961 allows identifying the task each process is busy with. The technique
12962 is used by PostgreSQL and the OpenSSH Server for example.")
12963 (license license:bsd-3)
12964 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12965
12966 (define-public python2-setproctitle
12967 (let ((base (package-with-python2
12968 (strip-python2-variant python-setproctitle))))
12969 (package
12970 (inherit base)
12971 (native-inputs `(("python2-nose" ,python2-nose)
12972 ,@(package-native-inputs base))))))
12973
12974 (define-public python-validictory
12975 (package
12976 (name "python-validictory")
12977 (version "1.0.1")
12978 (source
12979 (origin
12980 (method url-fetch)
12981 (uri (pypi-uri "validictory" version))
12982 (sha256
12983 (base32
12984 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12985 (build-system python-build-system)
12986 (arguments
12987 '(#:phases
12988 (modify-phases %standard-phases
12989 (add-after 'unpack 'bootstrap
12990 ;; Move the tests out of the package directory to avoid
12991 ;; packaging them.
12992 (lambda* _
12993 (rename-file "validictory/tests" "tests")
12994 (delete-file "tests/__init__.py")))
12995 (replace 'check
12996 (lambda _
12997 ;; Extend PYTHONPATH so the built package will be found.
12998 (setenv "PYTHONPATH"
12999 (string-append (getcwd) "/build/lib:"
13000 (getenv "PYTHONPATH")))
13001 (invoke "py.test" "-vv" ))))))
13002 (native-inputs
13003 `(("python-pytest" ,python-pytest)))
13004 (home-page
13005 "https://github.com/jamesturk/validictory")
13006 (synopsis "General purpose Python data validator")
13007 (description "It allows validation of arbitrary Python data structures.
13008
13009 The schema format is based on the JSON Schema
13010 proposal (http://json-schema.org), so combined with json the library is also
13011 useful as a validator for JSON data.")
13012 (license license:expat)))
13013
13014 (define-public python2-validictory
13015 (package-with-python2 python-validictory))
13016
13017 (define-public python-pyelftools
13018 (package
13019 (name "python-pyelftools")
13020 (version "0.25")
13021 (source
13022 (origin
13023 (method url-fetch)
13024 (uri (pypi-uri "pyelftools" version))
13025 (sha256
13026 (base32
13027 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
13028 (build-system python-build-system)
13029 (arguments
13030 `(#:phases
13031 (modify-phases %standard-phases
13032 (add-before 'check 'set-pythonpath
13033 (lambda _
13034 (setenv "PYTHONPATH"
13035 (string-append
13036 (getcwd) "/test/"
13037 ":" (getenv "PYTHONPATH")))
13038 #t)))))
13039 (home-page
13040 "https://github.com/eliben/pyelftools")
13041 (synopsis
13042 "Analyze binary and library file information")
13043 (description "This Python library provides interfaces for parsing and
13044 analyzing two binary and library file formats; the Executable and Linking
13045 Format (ELF), and debugging information in the Debugging With Attributed
13046 Record Format (DWARF).")
13047 (license license:public-domain)))
13048
13049 (define-public python-pyev
13050 (package
13051 (name "python-pyev")
13052 (version "0.9.0")
13053 (source
13054 (origin
13055 (method url-fetch)
13056 (uri (pypi-uri "pyev" version))
13057 (sha256
13058 (base32
13059 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13060 (build-system python-build-system)
13061 (arguments
13062 `(#:tests? #f ; no test suite
13063 #:phases
13064 (modify-phases %standard-phases
13065 (add-after 'unpack 'patch
13066 (lambda* (#:key inputs #:allow-other-keys)
13067 (let ((libev (string-append (assoc-ref inputs "libev")
13068 "/lib/libev.so.4")))
13069 (substitute* "setup.py"
13070 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13071 (string-append "libev_dll_name = \"" libev "\"")))))))))
13072 (inputs
13073 `(("libev" ,libev)))
13074 (home-page "http://pythonhosted.org/pyev/")
13075 (synopsis "Python libev interface")
13076 (description "Pyev provides a Python interface to libev.")
13077 (license license:gpl3)))
13078
13079 (define-public python2-pyev
13080 (package-with-python2 python-pyev))
13081
13082 (define-public python-imagesize
13083 (package
13084 (name "python-imagesize")
13085 (version "1.2.0")
13086 (source
13087 (origin
13088 (method url-fetch)
13089 (uri (pypi-uri "imagesize" version))
13090 (sha256
13091 (base32
13092 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
13093 (build-system python-build-system)
13094 (home-page "https://github.com/shibukawa/imagesize_py")
13095 (synopsis "Gets image size of files in various formats in Python")
13096 (description
13097 "This package allows determination of image size from
13098 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13099 (license license:expat)))
13100
13101 (define-public python2-imagesize
13102 (package-with-python2 python-imagesize))
13103
13104 (define-public python-termstyle
13105 (package
13106 (name "python-termstyle")
13107 (version "0.1.11")
13108 (source
13109 (origin
13110 (method url-fetch)
13111 (uri (pypi-uri "termstyle" version))
13112 (sha256
13113 (base32
13114 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13115 (build-system python-build-system)
13116 (arguments
13117 '(#:phases
13118 (modify-phases %standard-phases
13119 (replace 'check
13120 (lambda _
13121 (invoke "python" "test3.py"))))))
13122 (home-page "https://github.com/gfxmonk/termstyle")
13123 (synopsis "Console text coloring for Python")
13124 (description "This package provides console text coloring for Python.")
13125 (license license:bsd-3)))
13126
13127 (define-public python-argcomplete
13128 (package
13129 (name "python-argcomplete")
13130 (version "1.11.1")
13131 (source
13132 (origin
13133 (method url-fetch)
13134 (uri (pypi-uri "argcomplete" version))
13135 (sha256
13136 (base32
13137 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
13138 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
13139 (build-system python-build-system)
13140 (native-inputs
13141 `(("python-coverage" ,python-coverage)
13142 ("python-flake8" ,python-flake8)
13143 ("python-pexpect" ,python-pexpect)
13144 ("python-wheel" ,python-wheel)
13145 ("tcsh" ,tcsh)
13146 ("fish" ,fish)
13147 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
13148 (home-page "https://github.com/kislyuk/argcomplete")
13149 (synopsis "Shell tab completion for Python argparse")
13150 (description "argcomplete provides extensible command line tab completion
13151 of arguments and options for Python scripts using @code{argparse}. It's
13152 particularly useful for programs with many options or sub-parsers that can
13153 dynamically suggest completions; for example, when browsing resources over the
13154 network.")
13155 (license license:asl2.0)))
13156
13157 (define-public python2-argcomplete
13158 (package-with-python2 python-argcomplete))
13159
13160 (define-public python-xopen
13161 (package
13162 (name "python-xopen")
13163 (version "0.5.0")
13164 (source
13165 (origin
13166 (method url-fetch)
13167 (uri (pypi-uri "xopen" version))
13168 (sha256
13169 (base32
13170 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
13171 (build-system python-build-system)
13172 (propagated-inputs
13173 `(("python-setuptools-scm" ,python-setuptools-scm)))
13174 (home-page "https://github.com/marcelm/xopen/")
13175 (synopsis "Open compressed files transparently")
13176 (description "This module provides an @code{xopen} function that works like
13177 Python's built-in @code{open} function, but can also deal with compressed files.
13178 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13179 recognized by their file extensions. The focus is on being as efficient as
13180 possible on all supported Python versions.")
13181 (license license:expat)))
13182
13183 (define-public python2-xopen
13184 (let ((base (package-with-python2
13185 (strip-python2-variant python-xopen))))
13186 (package
13187 (inherit base)
13188 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
13189 ,@(package-propagated-inputs base))))))
13190
13191 (define-public python-cheetah
13192 (package
13193 (name "python-cheetah")
13194 (version "3.2.4")
13195 (source
13196 (origin
13197 (method url-fetch)
13198 (uri (pypi-uri "Cheetah3" version))
13199 (sha256
13200 (base32
13201 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
13202 (build-system python-build-system)
13203 (arguments
13204 `(#:modules ((guix build utils)
13205 (guix build python-build-system)
13206 (ice-9 ftw)
13207 (srfi srfi-1)
13208 (srfi srfi-26))
13209 #:phases (modify-phases %standard-phases
13210 (add-after 'unpack 'use-absolute-python
13211 (lambda _
13212 (substitute* "Cheetah/CheetahWrapper.py"
13213 (("#!/usr/bin/env python")
13214 (string-append "#!" (which "python"))))
13215 #t))
13216 (add-after 'unpack 'fix-tests
13217 (lambda _
13218 (substitute* "Cheetah/Tests/ImportHooks.py"
13219 (("os.path.dirname\\(__file__\\)")
13220 (string-append "'" (getcwd) "/Cheetah/Tests'")))
13221 #t))
13222 (replace 'check
13223 (lambda _
13224 (let ((cwd (getcwd)))
13225 (setenv "PYTHONPATH"
13226 (string-append
13227 cwd "/build/"
13228 (find (cut string-prefix? "lib" <>)
13229 (scandir (string-append cwd "/build")))
13230 ":" (getenv "PYTHONPATH")))
13231 (setenv "PATH"
13232 (string-append (getenv "PATH")
13233 ":" cwd "/bin"))
13234 (setenv "TMPDIR" "/tmp")
13235
13236 (substitute* "Cheetah/Tests/Test.py"
13237 (("unittest.TextTestRunner\\(\\)")
13238 "unittest.TextTestRunner(verbosity=2)"))
13239
13240 (invoke "python" "Cheetah/Tests/Test.py")))))))
13241 (propagated-inputs
13242 `(("python-markdown" ,python-markdown))) ;optional
13243 (home-page "https://cheetahtemplate.org/")
13244 (synopsis "Template engine")
13245 (description "Cheetah is a text-based template engine and Python code
13246 generator.
13247
13248 Cheetah can be used as a standalone templating utility or referenced as
13249 a library from other Python applications. It has many potential uses,
13250 but web developers looking for a viable alternative to ASP, JSP, PHP and
13251 PSP are expected to be its principle user group.
13252
13253 Features:
13254 @enumerate
13255 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13256 text-based format.
13257 @item Cleanly separates content, graphic design, and program code.
13258 @item Blends the power and flexibility of Python with a simple template language
13259 that non-programmers can understand.
13260 @item Gives template writers full access to any Python data structure, module,
13261 function, object, or method in their templates.
13262 @item Makes code reuse easy by providing an object-orientated interface to
13263 templates that is accessible from Python code or other Cheetah templates.
13264 One template can subclass another and selectively reimplement sections of it.
13265 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13266 improve the performance of a dynamic website.
13267 @item Compiles templates into optimized, yet readable, Python code.
13268 @end enumerate")
13269 (license (license:x11-style "file://LICENSE"))))
13270
13271 (define-public python2-cheetah
13272 (package-with-python2 python-cheetah))
13273
13274 (define-public python-dulwich
13275 (package
13276 (name "python-dulwich")
13277 (version "0.19.16")
13278 (source
13279 (origin
13280 (method url-fetch)
13281 (uri (list (string-append "https://www.dulwich.io/releases/"
13282 "dulwich-" version ".tar.gz")
13283 (pypi-uri "dulwich" version)))
13284 (sha256
13285 (base32
13286 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
13287 (build-system python-build-system)
13288 (arguments
13289 `(#:phases
13290 (modify-phases %standard-phases
13291 (add-before 'check 'fix-tests
13292 (lambda* (#:key inputs #:allow-other-keys)
13293 ;; The tests use Popen with a custom environment which doesn't
13294 ;; include PATH.
13295 (substitute* "dulwich/tests/compat/utils.py"
13296 (("'git'") (string-append "'"
13297 (which "git")
13298 "'")))
13299 (substitute* '("dulwich/tests/test_repository.py"
13300 "dulwich/tests/test_hooks.py")
13301 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13302 (setenv "TEST_RUNNER" "unittest")
13303 (setenv "PYTHONHASHSEED" "random")
13304 #t)))))
13305 (propagated-inputs
13306 `(("python-fastimport" ,python-fastimport)
13307 ("python-urllib3" ,python-urllib3)))
13308 (native-inputs
13309 `(("python-mock" ,python-mock)
13310 ("python-geventhttpclient" ,python-geventhttpclient)
13311 ("git" ,git)))
13312 (home-page "https://www.dulwich.io/")
13313 (synopsis "Git implementation in Python")
13314 (description "Dulwich is an implementation of the Git file formats and
13315 protocols written in pure Python.")
13316 ;; Can be used with either license.
13317 (license (list license:asl2.0 license:gpl2+))))
13318
13319 (define-public python2-dulwich
13320 (package-with-python2 python-dulwich))
13321
13322 (define-public python-pbkdf2
13323 (package
13324 (name "python-pbkdf2")
13325 (version "1.3")
13326 (source
13327 (origin
13328 (method url-fetch)
13329 (uri (pypi-uri "pbkdf2" version))
13330 (sha256
13331 (base32
13332 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13333 (build-system python-build-system)
13334 (arguments
13335 '(#:phases
13336 (modify-phases %standard-phases
13337 (replace 'check
13338 (lambda _
13339 (setenv "PYTHONPATH"
13340 (string-append (getcwd) "/build/lib:"
13341 (getenv "PYTHONPATH")))
13342 (invoke "python" "test/test_pbkdf2.py"))))))
13343 (propagated-inputs
13344 `(("python-pycrypto" ,python-pycrypto))) ; optional
13345 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
13346 (synopsis "Password-based key derivation")
13347 (description "This module implements the password-based key derivation
13348 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13349
13350 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13351 is part of the RSA Public Key Cryptography Standards series. The provided
13352 implementation takes a password or a passphrase and a salt value (and
13353 optionally a iteration count, a digest module, and a MAC module) and provides
13354 a file-like object from which an arbitrarly-sized key can be read.")
13355 (license license:expat)))
13356
13357 (define-public python2-pbkdf2
13358 (package-with-python2 python-pbkdf2))
13359
13360 (define-public python-qrcode
13361 (package
13362 (name "python-qrcode")
13363 (version "6.1")
13364 (source
13365 (origin
13366 (method url-fetch)
13367 (uri (pypi-uri "qrcode" version))
13368 (sha256
13369 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
13370 (build-system python-build-system)
13371 (arguments
13372 ;; FIXME: Tests require packaging 'pymaging'.
13373 '(#:tests? #f))
13374 (propagated-inputs
13375 `(("python-lxml" ,python-lxml) ; for SVG output
13376 ("python-pillow" ,python-pillow) ; for PNG output
13377 ("python-six" ,python-six)))
13378 (home-page "https://github.com/lincolnloop/python-qrcode")
13379 (synopsis "QR Code image generator")
13380 (description "This package provides a pure Python QR Code generator
13381 module. It uses the Python Imaging Library (PIL) to allow for the generation
13382 of QR Codes.
13383
13384 In addition this package provides a command line tool to generate QR codes and
13385 either write these QR codes to a file or do the output as ascii art at the
13386 console.")
13387 (license license:bsd-3)))
13388
13389 (define-public python2-qrcode
13390 (package-with-python2 python-qrcode))
13391
13392 (define-public python-rst2ansi
13393 (package
13394 (name "python-rst2ansi")
13395 (version "0.1.5")
13396 (source
13397 (origin
13398 (method url-fetch)
13399 (uri (pypi-uri "rst2ansi" version))
13400 (sha256
13401 (base32
13402 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13403 (build-system python-build-system)
13404 (propagated-inputs
13405 `(("python-docutils" ,python-docutils)))
13406 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13407 (synopsis "Convert RST to ANSI-decorated console output")
13408 (description
13409 "Python module dedicated to rendering RST (reStructuredText) documents
13410 to ansi-escaped strings suitable for display in a terminal.")
13411 (license license:expat)))
13412
13413 (define-public python-ansi2html
13414 (package
13415 (name "python-ansi2html")
13416 (version "1.2.0")
13417 (source
13418 (origin
13419 (method url-fetch)
13420 (uri (pypi-uri "ansi2html" version))
13421 (sha256
13422 (base32
13423 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13424 (build-system python-build-system)
13425 (native-inputs
13426 `(("python-mock" ,python-mock)
13427 ("python-nose" ,python-nose)))
13428 (propagated-inputs
13429 `(("python-six" ,python-six)))
13430 (home-page "https://github.com/ralphbean/ansi2html")
13431 (synopsis "Convert ANSI-decorated console output to HTML")
13432 (description
13433 "@command{ansi2html} is a Python library and command line utility for
13434 convering text with ANSI color codes to HTML or LaTeX.")
13435 (license license:gpl3+)))
13436
13437 (define-public python2-ansi2html
13438 (package-with-python2 python-ansi2html))
13439
13440 (define-public python-ddt
13441 (package
13442 (name "python-ddt")
13443 (version "1.1.3")
13444 (source
13445 (origin
13446 (method url-fetch)
13447 (uri (pypi-uri "ddt" version))
13448 (sha256
13449 (base32
13450 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
13451 (build-system python-build-system)
13452 (native-inputs
13453 `(("python-mock" ,python-mock)
13454 ("python-nose" ,python-nose)))
13455 (propagated-inputs
13456 `(("python-six" ,python-six)
13457 ("python-pyyaml" ,python-pyyaml)))
13458 (home-page "https://github.com/txels/ddt")
13459 (synopsis "Data-Driven Tests")
13460 (description
13461 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
13462 running it with different test data, and make it appear as multiple test
13463 cases.")
13464 (license license:expat)))
13465
13466 (define-public python2-ddt
13467 (package-with-python2 python-ddt))
13468
13469 (define-public python-pycountry
13470 (package
13471 (name "python-pycountry")
13472 (version "18.5.26")
13473 (source
13474 (origin
13475 (method url-fetch)
13476 (uri (pypi-uri "pycountry" version))
13477 (sha256
13478 (base32
13479 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
13480 (build-system python-build-system)
13481 (home-page "https://bitbucket.org/flyingcircus/pycountry")
13482 (synopsis "ISO databases for languages, countries, currencies, etc.")
13483 (description
13484 "@code{pycountry} provides the ISO databases for the standards:
13485 @enumerate
13486 @item 639-3 (Languages)
13487 @item 3166 (Countries)
13488 @item 3166-3 (Deleted Countries)
13489 @item 3166-2 (Subdivisions of countries)
13490 @item 4217 (Currencies)
13491 @item 15924 (Scripts)
13492 @end enumerate
13493 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
13494 through a Python API.")
13495 (license license:lgpl2.1+)))
13496
13497 (define-public python2-pycountry
13498 (package-with-python2 python-pycountry))
13499
13500 (define-public python-pycosat
13501 (package
13502 (name "python-pycosat")
13503 (version "0.6.1")
13504 (source
13505 (origin
13506 (method url-fetch)
13507 (uri (pypi-uri "pycosat" version))
13508 (sha256
13509 (base32
13510 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13511 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13512 (build-system python-build-system)
13513 (home-page "https://github.com/ContinuumIO/pycosat")
13514 (synopsis "Bindings to picosat (a SAT solver)")
13515 (description
13516 "This package provides efficient Python bindings to @code{picosat} on
13517 the C level. When importing pycosat, the @code{picosat} solver becomes part
13518 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13519 Problem} (SAT) solver.")
13520 (license license:expat)))
13521
13522 (define-public python2-pycosat
13523 (package-with-python2 python-pycosat))
13524
13525 (define-public python2-ruamel.ordereddict
13526 (package
13527 (name "python2-ruamel.ordereddict")
13528 (version "0.4.9")
13529 (source
13530 (origin
13531 (method url-fetch)
13532 (uri (pypi-uri "ruamel.ordereddict" version))
13533 (sha256
13534 (base32
13535 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13536 (build-system python-build-system)
13537 (arguments
13538 `(#:python ,python-2
13539 #:phases
13540 (modify-phases %standard-phases
13541 (delete 'check)
13542 (add-after 'install 'check
13543 (lambda* (#:key inputs outputs #:allow-other-keys)
13544 (add-installed-pythonpath inputs outputs)
13545 (invoke "python" "test/testordereddict.py"))))))
13546 (home-page "https://bitbucket.org/ruamel/ordereddict")
13547 (synopsis "Version of dict that keeps keys in insertion order")
13548 (description
13549 "This is an implementation of an ordered dictionary with @dfn{Key
13550 Insertion Order} (KIO: updates of values do not affect the position of the
13551 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13552 removed and put at the back). The standard library module @code{OrderedDict},
13553 implemented later, implements a subset of @code{ordereddict} functionality.
13554 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13555 Order} (KSO, no sorting function can be specified, but a transform can be
13556 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13557 (license license:expat)))
13558
13559 (define-public python-pypeg2
13560 (package
13561 (name "python-pypeg2")
13562 (version "2.15.2")
13563 (source
13564 (origin
13565 (method url-fetch)
13566 (uri (pypi-uri "pyPEG2" version))
13567 (sha256
13568 (base32
13569 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13570 (build-system python-build-system)
13571 (propagated-inputs `(("python-lxml" ,python-lxml)))
13572 (arguments
13573 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13574 '(#:tests? #f))
13575 (home-page "https://fdik.org/pyPEG/")
13576 (synopsis "Parsering Expression Grammars in Python")
13577 (description "PyPEG is an intrinsic parser interpreter framework for
13578 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13579 parse many formal languages.")
13580 (license license:gpl2)))
13581
13582 (define-public python-incremental
13583 (package
13584 (name "python-incremental")
13585 (version "17.5.0")
13586 (source
13587 (origin
13588 (method url-fetch)
13589 (uri (pypi-uri "incremental" version))
13590 (sha256
13591 (base32
13592 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
13593 (build-system python-build-system)
13594 (home-page "https://github.com/hawkowl/incremental")
13595 (synopsis "Library for versioning Python projects")
13596 (description "Incremental is a small library that versions your Python
13597 projects.")
13598 (license license:expat)))
13599
13600 (define-public python2-incremental
13601 (package-with-python2 python-incremental))
13602
13603 (define-public python-invoke
13604 (package
13605 (name "python-invoke")
13606 (home-page "https://www.pyinvoke.org/")
13607 (version "1.3.0")
13608 (source (origin
13609 (method url-fetch)
13610 (uri (pypi-uri "invoke" version))
13611 (sha256
13612 (base32
13613 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
13614 (build-system python-build-system)
13615 (arguments
13616 ;; XXX: Requires many dependencies that are not yet in Guix.
13617 `(#:tests? #f))
13618 (synopsis "Pythonic task execution")
13619 (description
13620 "Invoke is a Python task execution tool and library, drawing inspiration
13621 from various sources to arrive at a powerful and clean feature set. It is
13622 evolved from the Fabric project, but focuses on local and abstract concerns
13623 instead of servers and network commands.")
13624 (license license:bsd-3)))
13625
13626 (define-public python2-invoke
13627 (package-with-python2 python-invoke))
13628
13629 (define-public python-automat
13630 (package
13631 (name "python-automat")
13632 (version "20.2.0")
13633 (source (origin
13634 (method url-fetch)
13635 (uri (pypi-uri "Automat" version))
13636 (sha256
13637 (base32
13638 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
13639 (build-system python-build-system)
13640 ;; We disable the tests because they require python-twisted, while
13641 ;; python-twisted depends on python-automat. Twisted is optional, but the
13642 ;; tests fail if it is not available. Also see
13643 ;; <https://github.com/glyph/automat/issues/71>.
13644 (arguments '(#:tests? #f))
13645 (native-inputs
13646 `(("python-m2r" ,python-m2r)
13647 ("python-setuptools-scm" ,python-setuptools-scm)
13648 ("python-graphviz" ,python-graphviz)))
13649 (propagated-inputs
13650 `(("python-six" ,python-six)
13651 ("python-attrs" ,python-attrs)))
13652 (home-page "https://github.com/glyph/Automat")
13653 (synopsis "Self-service finite-state machines")
13654 (description "Automat is a library for concise, idiomatic Python
13655 expression of finite-state automata (particularly deterministic finite-state
13656 transducers).")
13657 (license license:expat)))
13658
13659 (define-public python2-automat
13660 (package-with-python2 python-automat))
13661
13662 (define-public python-m2r
13663 (package
13664 (name "python-m2r")
13665 (version "0.2.1")
13666 (source (origin
13667 (method url-fetch)
13668 (uri (pypi-uri "m2r" version))
13669 (sha256
13670 (base32
13671 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
13672 (build-system python-build-system)
13673 (propagated-inputs
13674 `(("python-docutils" ,python-docutils)
13675 ("python-mistune" ,python-mistune)))
13676 (native-inputs
13677 `(("python-pygments" ,python-pygments)
13678 ("python-mock" ,python-mock)))
13679 (home-page "https://github.com/miyakogi/m2r")
13680 (synopsis "Markdown to reStructuredText converter")
13681 (description "M2R converts a markdown file including reST markups to valid
13682 reST format.")
13683 (license license:expat)))
13684
13685 (define-public python2-m2r
13686 (package-with-python2 python-m2r))
13687
13688 (define-public python-constantly
13689 (package
13690 (name "python-constantly")
13691 (version "15.1.0")
13692 (source (origin
13693 (method url-fetch)
13694 (uri (pypi-uri "constantly" version))
13695 (sha256
13696 (base32
13697 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
13698 (build-system python-build-system)
13699 (home-page "https://github.com/twisted/constantly")
13700 (synopsis "Symbolic constants in Python")
13701 (description "Constantly is a Python library that provides symbolic
13702 constant support. It includes collections and constants with text, numeric,
13703 and bit flag values.")
13704 (license license:expat)))
13705
13706 (define-public python2-constantly
13707 (package-with-python2 python-constantly))
13708
13709 (define-public python-attrs
13710 (package
13711 (name "python-attrs")
13712 (version "19.3.0")
13713 (source (origin
13714 (method url-fetch)
13715 (uri (pypi-uri "attrs" version))
13716 (sha256
13717 (base32
13718 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
13719 (build-system python-build-system)
13720 (arguments
13721 `(#:modules ((guix build utils)
13722 (guix build python-build-system)
13723 (ice-9 ftw)
13724 (srfi srfi-1)
13725 (srfi srfi-26))
13726 #:phases (modify-phases %standard-phases
13727 (replace 'check
13728 (lambda _
13729 (let ((cwd (getcwd)))
13730 (setenv "PYTHONPATH"
13731 (string-append
13732 cwd "/build/"
13733 (find (cut string-prefix? "lib" <>)
13734 (scandir (string-append cwd "/build")))
13735 ":"
13736 (getenv "PYTHONPATH")))
13737 (invoke "python" "-m" "pytest")))))))
13738 (native-inputs
13739 `(("python-coverage" ,python-coverage)
13740 ("python-hypothesis" ,python-hypothesis)
13741 ("python-pympler" ,python-pympler)
13742 ("python-pytest" ,python-pytest)
13743 ("python-six" ,python-six)
13744 ("python-sphinx" ,python-sphinx)
13745 ("python-zope-interface" ,python-zope-interface)))
13746 (home-page "https://github.com/python-attrs/attrs/")
13747 (synopsis "Attributes without boilerplate")
13748 (description "@code{attrs} is a Python package with class decorators that
13749 ease the chores of implementing the most common attribute-related object
13750 protocols.")
13751 (license license:expat)))
13752
13753 (define-public python2-attrs
13754 (package-with-python2 python-attrs))
13755
13756 (define-public python-attrs-bootstrap
13757 (package
13758 (inherit python-attrs)
13759 (name "python-attrs-bootstrap")
13760 (native-inputs `())
13761 (arguments `(#:tests? #f))))
13762
13763 (define-public python2-attrs-bootstrap
13764 (package-with-python2 python-attrs-bootstrap))
13765
13766 (define-public python2-cliapp
13767 (package
13768 (name "python2-cliapp")
13769 (version "1.20180812.1")
13770 (source
13771 (origin
13772 (method url-fetch)
13773 (uri (string-append
13774 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13775 version ".tar.gz"))
13776 (sha256
13777 (base32
13778 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
13779 (build-system python-build-system)
13780 (arguments
13781 `(#:python ,python-2
13782 #:phases
13783 (modify-phases %standard-phases
13784 ;; check phase needs to be run before the build phase. If not,
13785 ;; coverage-test-runner looks for tests for the built source files,
13786 ;; and fails.
13787 (delete 'check)
13788 (add-before 'build 'check
13789 (lambda _
13790 ;; Disable python3 tests
13791 (substitute* "check"
13792 (("python3") "# python3"))
13793 (invoke "./check"))))))
13794 (native-inputs
13795 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13796 ("python2-pep8" ,python2-pep8)))
13797 (propagated-inputs
13798 `(("python2-pyaml" ,python2-pyaml)))
13799 (home-page "https://liw.fi/cliapp/")
13800 (synopsis "Python framework for command line programs")
13801 (description "@code{python2-cliapp} is a python framework for
13802 command line programs. It contains the typical stuff such programs
13803 need to do, such as parsing the command line for options, and
13804 iterating over input files.")
13805 (license license:gpl2+)))
13806
13807 (define-public python2-ttystatus
13808 (package
13809 (name "python2-ttystatus")
13810 (version "0.36")
13811 (source
13812 (origin
13813 (method url-fetch)
13814 (uri (string-append
13815 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13816 version ".tar.gz"))
13817 (sha256
13818 (base32
13819 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
13820 (build-system python-build-system)
13821 (native-inputs
13822 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13823 ("python2-pep8" ,python2-pep8)))
13824 (arguments
13825 `(#:python ,python-2
13826 #:phases
13827 (modify-phases %standard-phases
13828 ;; check phase needs to be run before the build phase. If not,
13829 ;; coverage-test-runner looks for tests for the built source files,
13830 ;; and fails.
13831 (delete 'check)
13832 (add-before 'build 'check
13833 (lambda _ (invoke "make" "check"))))))
13834 (home-page "https://liw.fi/ttystatus/")
13835 (synopsis "Python library for showing progress reporting and
13836 status updates on terminals")
13837 (description "@code{python2-ttystatus} is a python library for
13838 showing progress reporting and status updates on terminals, for
13839 command line programs. Output is automatically adapted to the width
13840 of the terminal: truncated if it does not fit, and resized if the
13841 terminal size changes.")
13842 (license license:gpl3+)))
13843
13844 (define-public python2-tracing
13845 (package
13846 (name "python2-tracing")
13847 (version "0.10")
13848 (source
13849 (origin
13850 (method url-fetch)
13851 (uri (string-append
13852 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13853 version ".tar.gz"))
13854 (sha256
13855 (base32
13856 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13857 (build-system python-build-system)
13858 (arguments
13859 `(#:python ,python-2))
13860 (home-page "https://liw.fi/tracing/")
13861 (synopsis "Python debug logging helper")
13862 (description "@code{python2-tracing} is a python library for
13863 logging debug messages. It provides a way to turn debugging messages
13864 on and off, based on the filename they occur in. It is much faster
13865 than using @code{logging.Filter} to accomplish the same thing, which
13866 matters when code is run in production mode. The actual logging still
13867 happens using the @code{logging} library.")
13868 (license license:gpl3+)))
13869
13870 (define-public python2-larch
13871 (package
13872 (name "python2-larch")
13873 (version "1.20151025")
13874 (source
13875 (origin
13876 (method url-fetch)
13877 (uri (string-append
13878 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13879 version ".tar.gz"))
13880 (patches (search-patches
13881 "python2-larch-coverage-4.0a6-compatibility.patch"))
13882 (sha256
13883 (base32
13884 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13885 (build-system python-build-system)
13886 (arguments
13887 `(#:python ,python-2
13888 #:phases
13889 (modify-phases %standard-phases
13890 ;; check phase needs to be run before the build phase. If not,
13891 ;; coverage-test-runner looks for tests for the built source files,
13892 ;; and fails.
13893 (delete 'check)
13894 (add-before 'build 'check
13895 (lambda _ (invoke "make" "check"))))))
13896 (native-inputs
13897 `(("cmdtest" ,cmdtest)
13898 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13899 (propagated-inputs
13900 `(("python2-tracing" ,python2-tracing)))
13901 (home-page "https://liw.fi/larch/")
13902 (synopsis "Python copy-on-write B-tree library")
13903 (description "@code{python2-larch} is an implementation of
13904 particular kind of B-tree, based on research by Ohad Rodeh. See
13905 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13906 on the data structure.
13907
13908 The distinctive feature of this B-tree is that a node is never
13909 (conceptually) modified. Instead, all updates are done by
13910 copy-on-write. This makes it easy to clone a tree, and modify only the
13911 clone, while other processes access the original tree.")
13912 (license license:gpl3+)))
13913
13914 (define-public python-astroid
13915 (package
13916 (name "python-astroid")
13917 (version "2.4.1")
13918 (source
13919 (origin
13920 (method url-fetch)
13921 (uri (pypi-uri "astroid" version))
13922 (sha256
13923 (base32 "1h99jal7ax07xna1djw5z7hpgb8vjrl3hrrg49p1phljwniww5sc"))))
13924 (build-system python-build-system)
13925 (propagated-inputs
13926 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13927 ("python-six" ,python-six)
13928 ("python-wrapt" ,python-wrapt)))
13929 (native-inputs
13930 `(("python-dateutil" ,python-dateutil)
13931 ("python-pytest" ,python-pytest)
13932 ("python-pytest-runner" ,python-pytest-runner)))
13933 (home-page "https://github.com/PyCQA/astroid")
13934 (synopsis "Common base representation of python source code for pylint and
13935 other projects")
13936 (description "@code{python-astroid} provides a common base representation
13937 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13938
13939 It provides a compatible representation which comes from the _ast module. It
13940 rebuilds the tree generated by the builtin _ast module by recursively walking
13941 down the AST and building an extended ast. The new node classes have
13942 additional methods and attributes for different usages. They include some
13943 support for static inference and local name scopes. Furthermore, astroid
13944 builds partial trees by inspecting living objects.")
13945 (license license:lgpl2.1+)
13946 (properties `((python2-variant . ,(delay python2-astroid))))))
13947
13948 (define-public python2-astroid
13949 (let ((base (package-with-python2
13950 (strip-python2-variant python-astroid))))
13951 (package (inherit base)
13952 ;; Version 2.x removes python2 support.
13953 (version "1.6.5")
13954 (source
13955 (origin
13956 (method url-fetch)
13957 (uri (pypi-uri "astroid" version))
13958 (sha256
13959 (base32
13960 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13961 (arguments
13962 (substitute-keyword-arguments (package-arguments base)
13963 ((#:phases phases)
13964 `(modify-phases ,phases
13965 (add-after 'unpack 'remove-spurious-test
13966 (lambda _
13967 ;; https://github.com/PyCQA/astroid/issues/276
13968 (delete-file "astroid/tests/unittest_brain.py")
13969 #t))
13970 (replace 'check
13971 (lambda _
13972 (invoke"python" "-m" "unittest" "discover"
13973 "-p" "unittest*.py")))))))
13974 (native-inputs `())
13975 (propagated-inputs
13976 `(("python2-backports-functools-lru-cache"
13977 ,python2-backports-functools-lru-cache)
13978 ("python2-enum34" ,python2-enum34)
13979 ("python2-singledispatch" ,python2-singledispatch)
13980 ,@(alist-delete "python-typed-ast"
13981 (package-propagated-inputs base)))))))
13982
13983 (define-public python-isort
13984 (package
13985 (name "python-isort")
13986 (version "4.3.4")
13987 (source
13988 (origin
13989 (method git-fetch)
13990 (uri (git-reference
13991 ;; Tests pass only from the Github sources
13992 (url "https://github.com/timothycrosley/isort")
13993 (commit version)))
13994 (file-name (git-file-name name version))
13995 (sha256
13996 (base32
13997 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
13998 (build-system python-build-system)
13999 (native-inputs
14000 `(("python-mock" ,python-mock)
14001 ("python-pytest" ,python-pytest)))
14002 (home-page "https://github.com/timothycrosley/isort")
14003 (synopsis "Python utility/library to sort python imports")
14004 (description "@code{python-isort} is a python utility/library to sort
14005 imports alphabetically, and automatically separated into sections. It
14006 provides a command line utility, a python library and plugins for various
14007 editors.")
14008 (license license:expat)
14009 (properties `((python2-variant . ,(delay python2-isort))))))
14010
14011 (define-public python2-isort
14012 (let ((base (package-with-python2
14013 (strip-python2-variant python-isort))))
14014 (package (inherit base)
14015 (native-inputs
14016 `(("python2-futures" ,python2-futures)
14017 ,@(package-native-inputs base))))))
14018
14019 (define-public python2-backports-functools-lru-cache
14020 (package
14021 (name "python2-backports-functools-lru-cache")
14022 (version "1.5")
14023 (source
14024 (origin
14025 (method url-fetch)
14026 ;; only the pypi tarballs contain the necessary metadata
14027 (uri (pypi-uri "backports.functools_lru_cache" version))
14028 (sha256
14029 (base32
14030 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
14031 (build-system python-build-system)
14032 (native-inputs
14033 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14034 (arguments
14035 `(#:python ,python-2))
14036 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14037 (synopsis "Backport of functools.lru_cache from Python 3.3")
14038 (description "@code{python2-backports-functools-lru-cache} is a backport
14039 of @code{functools.lru_cache} from python 3.3.")
14040 (license license:expat)))
14041
14042 (define-public python-configparser
14043 (package
14044 (name "python-configparser")
14045 (version "4.0.2")
14046 (source
14047 (origin
14048 (method url-fetch)
14049 (uri (pypi-uri "configparser" version))
14050 (sha256
14051 (base32
14052 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
14053 (native-inputs
14054 `(("python-setuptools_scm" ,python-setuptools-scm)))
14055 (build-system python-build-system)
14056 (home-page "https://github.com/jaraco/configparser/")
14057 (synopsis "Backport of configparser from python 3.5")
14058 (description "@code{python-configparser} is a backport of
14059 @code{configparser} from Python 3.5 so that it can be used directly
14060 in other versions.")
14061 (license license:expat)))
14062
14063 (define-public python2-configparser
14064 (package-with-python2 python-configparser))
14065
14066 (define-public python-mando
14067 (package
14068 (name "python-mando")
14069 (version "0.6.4")
14070 (source (origin
14071 (method url-fetch)
14072 (uri (pypi-uri "mando" version))
14073 (sha256
14074 (base32
14075 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
14076 (build-system python-build-system)
14077 (propagated-inputs
14078 `(("python-rst2ansi" ,python-rst2ansi)
14079 ("python-six" ,python-six)))
14080 (native-inputs
14081 `(("python-pytest" ,python-pytest)))
14082 (home-page "https://mando.readthedocs.org/")
14083 (synopsis
14084 "Wrapper around argparse, allowing creation of complete CLI applications")
14085 (description
14086 "This package is a wrapper around argparse, allowing you to write complete CLI
14087 applications in seconds while maintaining all the flexibility.")
14088 (license license:expat)))
14089
14090 (define-public python2-mando
14091 (package-with-python2 python-mando))
14092
14093 (define-public python2-argparse
14094 (package
14095 (name "python2-argparse")
14096 (version "1.4.0")
14097 (source
14098 (origin
14099 (method url-fetch)
14100 (uri (pypi-uri "argparse" version))
14101 (sha256
14102 (base32
14103 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
14104 (build-system python-build-system)
14105 (arguments
14106 `(#:python ,python-2))
14107 (home-page "https://github.com/ThomasWaldmann/argparse/")
14108 (synopsis "Python command-line parsing library")
14109 (description
14110 "This package is mostly for people who want to have @code{argparse} on
14111 older Pythons because it was not part of the standard library back then.")
14112 (license license:psfl)))
14113
14114 (define-public python-fudge
14115 (package
14116 (name "python-fudge")
14117 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14118 ;; package, which is currently the only use of this package.
14119 (version "0.9.6")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (pypi-uri "fudge" version))
14124 (sha256
14125 (base32
14126 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14127 (build-system python-build-system)
14128 (arguments
14129 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14130 (home-page "https://github.com/fudge-py/fudge")
14131 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14132 (description
14133 "Fudge is a Python module for using fake objects (mocks and stubs) to
14134 test real ones.
14135
14136 In readable Python code, you declare the methods available on your fake object
14137 and how they should be called. Then you inject that into your application and
14138 start testing. This declarative approach means you don’t have to record and
14139 playback actions and you don’t have to inspect your fakes after running code.
14140 If the fake object was used incorrectly then you’ll see an informative
14141 exception message with a traceback that points to the culprit.")
14142 (license license:expat)))
14143
14144 (define-public python2-fudge
14145 (package-with-python2 python-fudge))
14146
14147 (define-public python-mwclient
14148 (package
14149 (name "python-mwclient")
14150 (version "0.10.0")
14151 (source
14152 (origin
14153 (method git-fetch)
14154 ;; The PyPI version wouldn't contain tests.
14155 (uri (git-reference
14156 (url "https://github.com/mwclient/mwclient")
14157 (commit (string-append "v" version))))
14158 (file-name (git-file-name name version))
14159 (sha256
14160 (base32
14161 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
14162 (build-system python-build-system)
14163 (propagated-inputs
14164 `(("python-requests-oauthlib" ,python-requests-oauthlib)
14165 ("python-six" ,python-six)))
14166 (native-inputs
14167 `(("python-mock" ,python-mock)
14168 ("python-pytest" ,python-pytest)
14169 ("python-pytest-cov" ,python-pytest-cov)
14170 ("python-pytest-runner" ,python-pytest-runner)
14171 ("python-responses" ,python-responses)))
14172 (home-page "https://github.com/btongminh/mwclient")
14173 (synopsis "MediaWiki API client")
14174 (description "This package provides a MediaWiki API client.")
14175 (license license:expat)))
14176
14177 (define-public python2-mwclient
14178 (package-with-python2 python-mwclient))
14179
14180 (define-public python-utils
14181 (package
14182 (name "python-utils")
14183 (version "2.1.0")
14184 (source (origin
14185 (method url-fetch)
14186 (uri (pypi-uri "python-utils" version))
14187 (sha256
14188 (base32
14189 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14190 (build-system python-build-system)
14191 (native-inputs
14192 `(("pytest-runner" ,python-pytest-runner)
14193 ("pytest" ,python-pytest)
14194 ("six" ,python-six)))
14195 (home-page "https://github.com/WoLpH/python-utils")
14196 (synopsis "Convenient utilities not included with the standard Python install")
14197 (description
14198 "Python Utils is a collection of small Python functions and classes which
14199 make common patterns shorter and easier.")
14200 (license license:bsd-2)))
14201
14202 (define-public python2-utils
14203 (package-with-python2 python-utils))
14204
14205 (define-public python-diff-match-patch
14206 (package
14207 (name "python-diff-match-patch")
14208 (version "20121119")
14209 (source
14210 (origin
14211 (method url-fetch)
14212 (uri (pypi-uri "diff-match-patch" version))
14213 (sha256
14214 (base32
14215 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14216 (build-system python-build-system)
14217 (home-page "https://code.google.com/p/google-diff-match-patch")
14218 (synopsis "Synchronize plain text")
14219 (description "Diff Match and Patch libraries offer robust algorithms to
14220 perform the operations required for synchronizing plain text.")
14221 (license license:asl2.0)))
14222
14223 (define-public python2-diff-match-patch
14224 (package-with-python2 python-diff-match-patch))
14225
14226 (define-public python-dirsync
14227 (package
14228 (name "python-dirsync")
14229 (version "2.2.3")
14230 (source
14231 (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "dirsync" version))
14234 (sha256
14235 (base32
14236 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
14237 (build-system python-build-system)
14238 (propagated-inputs
14239 `(("six" ,python-six)))
14240 (home-page "https://bitbucket.org/tkhyn/dirsync")
14241 (synopsis "Advanced directory tree synchronisation tool")
14242 (description "Advanced directory tree synchronisation tool.")
14243 (license license:expat)))
14244
14245 (define-public python2-dirsync
14246 (package-with-python2 python-dirsync))
14247
14248 (define-public python-levenshtein
14249 (package
14250 (name "python-levenshtein")
14251 (version "0.12.0")
14252 (source
14253 (origin
14254 (method url-fetch)
14255 (uri (pypi-uri "python-Levenshtein" version))
14256 (sha256
14257 (base32
14258 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14259 (build-system python-build-system)
14260 (home-page "https://github.com/ztane/python-Levenshtein")
14261 (synopsis "Fast computation of Levenshtein distance and string similarity")
14262 (description
14263 "The Levenshtein Python C extension module contains functions for fast computation of
14264 @enumerate
14265 @item Levenshtein (edit) distance, and edit operations
14266 @item string similarity
14267 @item approximate median strings, and generally string averaging
14268 @item string sequence and set similarity
14269 @end enumerate
14270 It supports both normal and Unicode strings.")
14271 (license license:gpl2+)))
14272
14273 (define-public python2-levenshtein
14274 (package-with-python2 python-levenshtein))
14275
14276 (define-public python-scandir
14277 (package
14278 (name "python-scandir")
14279 (version "1.10.0")
14280 (source
14281 (origin
14282 (method url-fetch)
14283 (uri (pypi-uri "scandir" version))
14284 (sha256
14285 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
14286 (build-system python-build-system)
14287 (arguments
14288 `(#:phases (modify-phases %standard-phases
14289 (replace 'check
14290 (lambda _
14291 (invoke "python" "test/run_tests.py"))))))
14292 (home-page "https://github.com/benhoyt/scandir")
14293 (synopsis "Directory iteration function")
14294 (description
14295 "Directory iteration function like os.listdir(), except that instead of
14296 returning a list of bare filenames, it yields DirEntry objects that include
14297 file type and stat information along with the name. Using scandir() increases
14298 the speed of os.walk() by 2-20 times (depending on the platform and file
14299 system) by avoiding unnecessary calls to os.stat() in most cases.
14300
14301 This package is part of the Python standard library since version 3.5.")
14302 (license license:bsd-3)))
14303
14304 (define-public python2-scandir
14305 (package-with-python2 python-scandir))
14306
14307 (define-public python2-stemming
14308 (package
14309 (name "python2-stemming")
14310 (version "1.0.1")
14311 (source
14312 (origin
14313 (method url-fetch)
14314 (uri (pypi-uri "stemming" version))
14315 (sha256
14316 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14317 (build-system python-build-system)
14318 (arguments
14319 `(#:python ,python-2))
14320 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14321 (synopsis "Python implementations of various stemming algorithms")
14322 (description
14323 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14324 stemming algorithms for English. These implementations are straightforward and
14325 efficient, unlike some Python versions of the same algorithms available on the
14326 Web. This package is an extraction of the stemming code included in the Whoosh
14327 search engine.")
14328 (license license:public-domain)))
14329
14330 (define-public python-factory-boy
14331 (package
14332 (name "python-factory-boy")
14333 (version "2.8.1")
14334 (source
14335 (origin
14336 (method url-fetch)
14337 (uri (pypi-uri "factory_boy" version))
14338 (sha256
14339 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14340 (build-system python-build-system)
14341 (arguments
14342 ;; Tests are not included in the tarball.
14343 `(#:tests? #f))
14344 (propagated-inputs
14345 `(("faker" ,python-faker)))
14346 (home-page "https://github.com/benhoyt/scandir")
14347 (synopsis "Versatile test fixtures replacement")
14348 (description
14349 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14350
14351 As a fixtures replacement tool, it aims to replace static, hard to maintain
14352 fixtures with easy-to-use factories for complex object.
14353
14354 Instead of building an exhaustive test setup with every possible combination
14355 of corner cases, factory_boy allows you to use objects customized for the
14356 current test, while only declaring the test-specific fields")
14357 (license license:expat)))
14358
14359 (define-public python2-factory-boy
14360 (package-with-python2 python-factory-boy))
14361
14362 (define-public python-translate-toolkit
14363 (package
14364 (name "python-translate-toolkit")
14365 (version "2.1.0")
14366 (source
14367 (origin
14368 (method url-fetch)
14369 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14370 (sha256
14371 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14372 (build-system python-build-system)
14373 (native-inputs
14374 `(("python-pytest" ,python-pytest)
14375 ("python-sphinx" ,python-sphinx)))
14376 (propagated-inputs
14377 `(("python-babel" ,python-babel)
14378 ("python-beautifulsoup4" ,python-beautifulsoup4)
14379 ("python-chardet" ,python-chardet)
14380 ("python-diff-match-patch" ,python-diff-match-patch)
14381 ("python-levenshtein" ,python-levenshtein)
14382 ("python-lxml" ,python-lxml)
14383 ("python-six" ,python-six)
14384 ("python-vobject" ,python-vobject)
14385 ("python-pyyaml" ,python-pyyaml)))
14386 (arguments
14387 ;; TODO: tests are not run, because they end with
14388 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14389 ;; 'parse_funcs'
14390 ;; during test setup.
14391 `(#:tests? #f))
14392 (home-page "https://toolkit.translatehouse.org")
14393 (synopsis "Tools and API for translation and localization engineering")
14394 (description
14395 "Tools and API for translation and localization engineering. It contains
14396 several utilities, as well as an API for building localization tools.")
14397 (license license:gpl2+)))
14398
14399 (define-public python2-translate-toolkit
14400 (package-with-python2 python-translate-toolkit))
14401
14402 (define-public python-packaging
14403 (package
14404 (name "python-packaging")
14405 (version "20.0")
14406 (source
14407 (origin
14408 (method url-fetch)
14409 (uri (pypi-uri "packaging" version))
14410 ;; XXX: The URL in the patch file is wrong, it should be
14411 ;; <https://github.com/pypa/packaging/pull/256>.
14412 (patches (search-patches "python-packaging-test-arch.patch"))
14413 (sha256
14414 (base32
14415 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
14416 (build-system python-build-system)
14417 (arguments
14418 `(#:phases (modify-phases %standard-phases
14419 (replace 'check
14420 (lambda* (#:key tests? #:allow-other-keys)
14421 (if tests?
14422 (invoke "py.test" "-vv")
14423 (format #t "test suite not run~%"))
14424 #t)))))
14425 (native-inputs
14426 `(("python-pretend" ,python-pretend)
14427 ("python-pytest" ,python-pytest)))
14428 (propagated-inputs
14429 `(("python-pyparsing" ,python-pyparsing)
14430 ("python-six" ,python-six)))
14431 (home-page "https://github.com/pypa/packaging")
14432 (synopsis "Core utilities for Python packages")
14433 (description "Packaging is a Python module for dealing with Python packages.
14434 It offers an interface for working with package versions, names, and dependency
14435 information.")
14436 ;; From 'LICENSE': This software is made available under the terms of
14437 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14438 ;; Contributions to this software is made under the terms of *both* these
14439 ;; licenses.
14440 (license (list license:asl2.0 license:bsd-2))))
14441
14442 (define-public python2-packaging
14443 (package-with-python2 python-packaging))
14444
14445 ;; Variants with minimal dependencies, for bootstrapping Pytest.
14446 (define-public python-packaging-bootstrap
14447 (hidden-package
14448 (package/inherit
14449 python-packaging
14450 (name "python-packaging-bootstrap")
14451 (native-inputs '())
14452 (propagated-inputs
14453 `(("python-pyparsing" ,python-pyparsing)))
14454 (arguments '(#:tests? #f)))))
14455
14456 (define-public python2-packaging-bootstrap
14457 (hidden-package
14458 (package/inherit
14459 python2-packaging
14460 (name "python2-packaging-bootstrap")
14461 (native-inputs '())
14462 (propagated-inputs
14463 `(("python-pyparsing" ,python2-pyparsing)))
14464 (arguments
14465 `(#:tests? #f
14466 ,@(package-arguments python2-packaging))))))
14467
14468 (define-public python-relatorio
14469 (package
14470 (name "python-relatorio")
14471 (version "0.8.0")
14472 (source
14473 (origin
14474 (method url-fetch)
14475 (uri (pypi-uri "relatorio" version))
14476 (sha256
14477 (base32
14478 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
14479 (build-system python-build-system)
14480 (propagated-inputs
14481 `(("python-lxml" ,python-lxml)
14482 ("python-genshi" ,python-genshi)))
14483 (native-inputs
14484 `(("python-magic" ,python-magic)))
14485 (home-page "https://relatorio.tryton.org/")
14486 (synopsis "Templating library able to output ODT and PDF files")
14487 (description "Relatorio is a templating library which provides a way to
14488 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14489 for more filetypes can be easily added by creating plugins for them.")
14490 (license license:gpl3+)))
14491
14492 (define-public python2-relatorio
14493 (package-with-python2 python-relatorio))
14494
14495 (define-public python-radon
14496 (package
14497 (name "python-radon")
14498 (version "4.1.0")
14499 (source
14500 (origin
14501 (method url-fetch)
14502 (uri (pypi-uri "radon" version))
14503 (sha256
14504 (base32
14505 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
14506 (build-system python-build-system)
14507 (arguments
14508 `(#:phases (modify-phases %standard-phases
14509 (replace 'check
14510 (lambda _
14511 (invoke "python" "radon/tests/run.py"))))))
14512 (propagated-inputs
14513 `(("python-colorama" ,python-colorama)
14514 ("python-flake8-polyfill" ,python-flake8-polyfill)
14515 ("python-mando" ,python-mando)))
14516 (native-inputs
14517 `(("python-pytest" ,python-pytest)
14518 ("python-pytest-mock" ,python-pytest-mock)))
14519 (home-page "https://radon.readthedocs.org/")
14520 (synopsis "Code Metrics in Python")
14521 (description "Radon is a Python tool which computes various code metrics.
14522 Supported metrics are:
14523 @itemize @bullet
14524 @item raw metrics: SLOC, comment lines, blank lines, &c.
14525 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14526 @item Halstead metrics (all of them)
14527 @item the Maintainability Index (a Visual Studio metric)
14528 @end itemize")
14529 (properties `((python2-variant . ,(delay python2-radon))))
14530 (license license:expat)))
14531
14532 (define-public python2-radon
14533 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
14534 (package
14535 (inherit base)
14536 (propagated-inputs
14537 `(("python-configparser" ,python2-configparser)
14538 ("python-future" ,python2-future)
14539 ,@(package-propagated-inputs base))))))
14540
14541 (define-public python-sure
14542 (package
14543 (name "python-sure")
14544 (version "1.4.11")
14545 (source
14546 (origin
14547 (method url-fetch)
14548 (uri (pypi-uri "sure" version))
14549 (sha256
14550 (base32
14551 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
14552 (build-system python-build-system)
14553 (propagated-inputs
14554 `(("python-mock" ,python-mock)
14555 ("python-six" ,python-six)))
14556 (native-inputs
14557 `(("python-nose" ,python-nose)))
14558 (home-page "https://github.com/gabrielfalcao/sure")
14559 (synopsis "Automated testing library in python for python")
14560 (description
14561 "Sure is a python library that leverages a DSL for writing assertions.
14562 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
14563 (license license:gpl3+)))
14564
14565 (define-public python2-sure
14566 (package-with-python2 python-sure))
14567
14568 (define-public python2-couleur
14569 ;; This package does not seem to support python3 at all, hence,
14570 ;; only the python2 variant definition is provided.
14571 (package
14572 (name "python2-couleur")
14573 (version "0.6.2")
14574 (source
14575 (origin
14576 (method url-fetch)
14577 (uri (pypi-uri "couleur" version))
14578 (sha256
14579 (base32
14580 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
14581 (build-system python-build-system)
14582 (arguments
14583 `(#:python ,python-2))
14584 (home-page "https://github.com/gabrielfalcao/couleur")
14585 (synopsis
14586 "ANSI terminal tool for python, colored shell and other handy fancy features")
14587 (description
14588 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
14589 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
14590 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
14591 ;; https://github.com/gabrielfalcao/couleur/issues/11
14592 (license license:lgpl3+)))
14593
14594 (define-public python-misaka
14595 (package
14596 (name "python-misaka")
14597 (version "2.1.1")
14598 (source
14599 (origin
14600 (method url-fetch)
14601 (uri (pypi-uri "misaka" version))
14602 (sha256
14603 (base32
14604 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
14605 (build-system python-build-system)
14606 (arguments
14607 `(;; Line 37 of setup.py calls self.run_command('develop')
14608 ;; in the 'check' phase. This command seems to be trying
14609 ;; to write to
14610 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
14611 ;; for which it does not have the permission to write.
14612 #:tests? #f))
14613 (propagated-inputs
14614 `(("python-cffi" ,python-cffi)))
14615 (home-page "https://github.com/FSX/misaka")
14616 (synopsis "Python binding for Hoedown")
14617 (description
14618 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
14619 library written in C. It features a fast HTML renderer and functionality to make custom
14620 renderers (e.g. man pages or LaTeX).")
14621 (license license:expat)))
14622
14623 (define-public python2-misaka
14624 (package-with-python2 python-misaka))
14625
14626 (define-public python2-steadymark
14627 ;; This is forced into being a python2 only variant
14628 ;; due to its dependence on couleur that has no support
14629 ;; for python3
14630 (package
14631 (name "python2-steadymark")
14632 (version "0.7.3")
14633 (source
14634 (origin
14635 (method url-fetch)
14636 (uri (pypi-uri "steadymark" version))
14637 (sha256
14638 (base32
14639 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
14640 (build-system python-build-system)
14641 (native-inputs
14642 `(("python-couleur" ,python2-couleur)
14643 ("python-sure" ,python2-sure)
14644 ("python-misaka" ,python2-misaka)))
14645 (arguments
14646 `(#:python ,python-2
14647 #:phases
14648 (modify-phases %standard-phases
14649 (add-before 'build 'patch-setup-py
14650 (lambda _
14651 ;; Update requirements from dependency==version
14652 ;; to dependency>=version
14653 (substitute* "setup.py"
14654 (("==") ">="))
14655 #t)))))
14656 (home-page "https://github.com/gabrielfalcao/steadymark")
14657 (synopsis "Markdown-based test runner for python")
14658 (description
14659 "@code{Steadymark} allows documentation to be written in github-flavoured
14660 markdown. The documentation may contain snippets of code surrounded by python
14661 code blocks and @code{Steadymark} will find these snippets and run them, making
14662 sure that there are no old malfunctional examples in the documentation examples.")
14663 (license license:expat)))
14664
14665 (define-public python-jsonpointer
14666 (package
14667 (name "python-jsonpointer")
14668 (version "1.10")
14669 (source
14670 (origin
14671 (method url-fetch)
14672 (uri (pypi-uri "jsonpointer" version))
14673 (sha256
14674 (base32
14675 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
14676 (build-system python-build-system)
14677 (home-page "https://github.com/stefankoegl/python-json-pointer")
14678 (synopsis "Identify specific nodes in a JSON document")
14679 (description "@code{jsonpointer} allows you to access specific nodes
14680 by path in a JSON document (see RFC 6901).")
14681 (license license:bsd-3)))
14682
14683 (define-public python2-jsonpointer
14684 (package-with-python2 python-jsonpointer))
14685
14686 (define-public python-jsonpatch
14687 (package
14688 (name "python-jsonpatch")
14689 (version "1.16")
14690 (source
14691 (origin
14692 (method git-fetch)
14693 ;; pypi version lacks tests.js
14694 (uri (git-reference
14695 (url "https://github.com/stefankoegl/python-json-patch")
14696 (commit (string-append "v" version))))
14697 (file-name (git-file-name name version))
14698 (sha256
14699 (base32
14700 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
14701 (build-system python-build-system)
14702 (native-inputs
14703 `(("python-jsonpointer" ,python-jsonpointer)))
14704 (home-page "https://github.com/stefankoegl/python-json-patch")
14705 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
14706 (description "@code{jsonpatch} is a library and program that allows
14707 applying JSON Patches according to RFC 6902.")
14708 (license license:bsd-3)))
14709
14710 (define-public python2-jsonpatch
14711 (package-with-python2 python-jsonpatch))
14712
14713 (define-public python-jsonpatch-0.4
14714 (package (inherit python-jsonpatch)
14715 (name "python-jsonpatch")
14716 (version "0.4")
14717 (source
14718 (origin
14719 (method git-fetch)
14720 (uri (git-reference
14721 (url "https://github.com/stefankoegl/python-json-patch")
14722 (commit (string-append "v" version))))
14723 (file-name (git-file-name name version))
14724 (sha256
14725 (base32
14726 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
14727
14728 (define-public python2-jsonpatch-0.4
14729 (package-with-python2 python-jsonpatch-0.4))
14730
14731 (define-public python-rfc3986
14732 (package
14733 (name "python-rfc3986")
14734 (version "1.1.0")
14735 (source (origin
14736 (method url-fetch)
14737 (uri (pypi-uri "rfc3986" version))
14738 (sha256
14739 (base32
14740 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
14741 (build-system python-build-system)
14742 (arguments
14743 `(#:modules ((guix build utils)
14744 (guix build python-build-system)
14745 (ice-9 ftw)
14746 (srfi srfi-1)
14747 (srfi srfi-26))
14748 #:phases
14749 (modify-phases %standard-phases
14750 (replace 'check
14751 (lambda _
14752 (let ((cwd (getcwd)))
14753 (setenv "PYTHONPATH"
14754 (string-append cwd "/build/"
14755 (find (cut string-prefix? "lib" <>)
14756 (scandir (string-append cwd "/build")))
14757 ":"
14758 (getenv "PYTHONPATH")))
14759 (invoke "pytest" "-v")))))))
14760 (native-inputs
14761 `(("python-pytest" ,python-pytest)))
14762 (home-page "https://rfc3986.readthedocs.io/")
14763 (synopsis "Parse and validate URI references")
14764 (description
14765 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14766 validation and authority parsing. This module also supports RFC@tie{}6874
14767 which adds support for zone identifiers to IPv6 addresses.")
14768 (license license:asl2.0)))
14769
14770 (define-public python2-rfc3986
14771 (package-with-python2 python-rfc3986))
14772
14773 (define-public python-rfc3987
14774 (package
14775 (name "python-rfc3987")
14776 (version "1.3.7")
14777 (source
14778 (origin
14779 (method url-fetch)
14780 (uri (pypi-uri "rfc3987" version))
14781 (sha256
14782 (base32
14783 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14784 (build-system python-build-system)
14785 (home-page "https://pypi.org/project/rfc3987/")
14786 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14787 (description "@code{rfc3987} provides routines for parsing and
14788 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14789 (license license:gpl3+)))
14790
14791 (define-public python2-rfc3987
14792 (package-with-python2 python-rfc3987))
14793
14794 (define-public python-validators
14795 (package
14796 (name "python-validators")
14797 (version "0.14.2")
14798 (source (origin
14799 (method url-fetch)
14800 (uri (pypi-uri "validators" version))
14801 (sha256
14802 (base32
14803 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
14804 (build-system python-build-system)
14805 (arguments
14806 '(#:phases (modify-phases %standard-phases
14807 (replace 'check
14808 (lambda _
14809 (invoke "pytest" "-vv"))))))
14810 (propagated-inputs
14811 `(("python-decorator" ,python-decorator)
14812 ("python-six" ,python-six)))
14813 (native-inputs
14814 `(("python-flake8" ,python-flake8)
14815 ("python-isort" ,python-isort)
14816 ("python-pytest" ,python-pytest)))
14817 (home-page "https://github.com/kvesteri/validators")
14818 (synopsis "Data validation library")
14819 (description
14820 "This package contains validators for different things such as email
14821 addresses, IP addresses, URLs, hashes and more. It has been designed to
14822 be easy to use and not require defining a schema or form just to validate
14823 some input.")
14824 (license license:expat)))
14825
14826 (define-public python2-validators
14827 (package-with-python2 python-validators))
14828
14829 (define-public python-validate-email
14830 (package
14831 (name "python-validate-email")
14832 (version "1.3")
14833 (source
14834 (origin
14835 (method url-fetch)
14836 (uri (pypi-uri "validate_email" version))
14837 (sha256
14838 (base32
14839 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14840 (build-system python-build-system)
14841 (home-page "https://github.com/syrusakbary/validate_email")
14842 (synopsis "Verifies if an email address is valid and really exists")
14843 (description "@code{validate_email} can be used to verify if an email
14844 address is valid and really exists.")
14845 (license license:lgpl3+)))
14846
14847 (define-public python2-validate-email
14848 (package-with-python2 python-validate-email))
14849
14850 (define-public python-flex
14851 (package
14852 (name "python-flex")
14853 (version "6.10.0")
14854 (source
14855 (origin
14856 (method url-fetch)
14857 (uri (pypi-uri "flex" version))
14858 (sha256
14859 (base32
14860 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14861 (build-system python-build-system)
14862 (propagated-inputs
14863 `(("python-click" ,python-click)
14864 ("python-iso8601" ,python-iso8601)
14865 ("python-jsonpointer" ,python-jsonpointer)
14866 ("python-pyyaml" ,python-pyyaml)
14867 ("python-requests" ,python-requests)
14868 ("python-rfc3987" ,python-rfc3987)
14869 ("python-six" ,python-six)
14870 ("python-validate-email" ,python-validate-email)))
14871 (home-page "https://github.com/pipermerriam/flex")
14872 (synopsis "Validates Swagger schemata")
14873 (description "@code{flex} can be used to validate Swagger schemata.")
14874 (license license:bsd-3)))
14875
14876 (define-public python2-flex
14877 (package-with-python2 python-flex))
14878
14879 (define-public python-marshmallow
14880 (package
14881 (name "python-marshmallow")
14882 (version "3.0.0b14")
14883 (source
14884 (origin
14885 (method url-fetch)
14886 (uri (pypi-uri "marshmallow" version))
14887 (sha256
14888 (base32
14889 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14890 (build-system python-build-system)
14891 (propagated-inputs
14892 `(("python-dateutil" ,python-dateutil)
14893 ("python-simplejson" ,python-simplejson)))
14894 (native-inputs
14895 `(("python-pytest" ,python-pytest)
14896 ("python-pytz" ,python-pytz)))
14897 (home-page "https://github.com/marshmallow-code/marshmallow")
14898 (synopsis "Convert complex datatypes to and from native
14899 Python datatypes.")
14900 (description "@code{marshmallow} provides a library for converting
14901 complex datatypes to and from native Python datatypes.")
14902 (license license:expat)))
14903
14904 (define-public python2-marshmallow
14905 (package-with-python2 python-marshmallow))
14906
14907 (define-public python-apispec
14908 (package
14909 (name "python-apispec")
14910 (version "0.25.3")
14911 (source
14912 (origin
14913 (method url-fetch)
14914 (uri (pypi-uri "apispec" version))
14915 (sha256
14916 (base32
14917 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14918 (build-system python-build-system)
14919 (propagated-inputs
14920 `(("python-pyyaml" ,python-pyyaml)))
14921 (native-inputs
14922 `(("python-pytest" ,python-pytest)
14923 ("python-flask" ,python-flask)
14924 ("python-marshmallow" ,python-marshmallow)
14925 ("python-tornado" ,python-tornado)
14926 ("python-bottle" ,python-bottle)
14927 ("python-mock" ,python-mock)))
14928 (home-page "https://github.com/marshmallow-code/apispec")
14929 (synopsis "Swagger 2.0 API specification generator")
14930 (description "@code{python-apispec} is a pluggable API specification
14931 generator. Currently supports the OpenAPI specification (f.k.a.
14932 Swagger 2.0).")
14933 (license license:expat)))
14934
14935 (define-public python2-apispec
14936 (package-with-python2 python-apispec))
14937
14938 (define-public python-flasgger
14939 (package
14940 (name "python-flasgger")
14941 (version "0.6.3")
14942 (source
14943 (origin
14944 (method git-fetch)
14945 (uri (git-reference
14946 (url "https://github.com/rochacbruno/flasgger.git")
14947 (commit version)))
14948 (file-name (git-file-name name version))
14949 (sha256
14950 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
14951 (build-system python-build-system)
14952 (arguments
14953 `(#:phases
14954 (modify-phases %standard-phases
14955 (replace 'check
14956 (lambda* (#:key inputs outputs #:allow-other-keys)
14957 (substitute* "Makefile"
14958 (("flake8 flasgger --ignore=F403")
14959 "flake8 flasgger --ignore=E731,F403"))
14960 (setenv "PYTHONPATH" (string-append (getcwd)
14961 ":"
14962 (getenv "PYTHONPATH")))
14963 (invoke "py.test"))))))
14964 (propagated-inputs
14965 `(("python-flask" ,python-flask)
14966 ("python-pyyaml" ,python-pyyaml)
14967 ("python-jsonschema" ,python-jsonschema)
14968 ("python-mistune" ,python-mistune)
14969 ("python-six" ,python-six)))
14970 (native-inputs
14971 `(("python-decorator" ,python-decorator)
14972 ("python-flake8" ,python-flake8)
14973 ("python-flask-restful" ,python-flask-restful)
14974 ("python-flex" ,python-flex)
14975 ("python-pytest" ,python-pytest)
14976 ("python-pytest-cov" ,python-pytest-cov)
14977 ("python-marshmallow" ,python-marshmallow)
14978 ("python-apispec" ,python-apispec)))
14979 (home-page "https://github.com/rochacbruno/flasgger/")
14980 (synopsis "Extract Swagger specs from your Flask project")
14981 (description "@code{python-flasgger} allows extracting Swagger specs
14982 from your Flask project. It is a fork of Flask-Swagger.")
14983 (license license:expat)))
14984
14985 (define-public python2-flasgger
14986 (package-with-python2 python-flasgger))
14987
14988 (define-public python-swagger-spec-validator
14989 (package
14990 (name "python-swagger-spec-validator")
14991 (version "2.4.3")
14992 (source
14993 (origin
14994 (method url-fetch)
14995 (uri (pypi-uri "swagger-spec-validator" version))
14996 (sha256
14997 (base32
14998 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
14999 (build-system python-build-system)
15000 (propagated-inputs
15001 `(("python-jsonschema" ,python-jsonschema)
15002 ("python-pyyaml" ,python-pyyaml)
15003 ("python-six" ,python-six)))
15004 (home-page
15005 "https://github.com/Yelp/swagger_spec_validator")
15006 (synopsis "Validation of Swagger specifications")
15007 (description "@code{swagger_spec_validator} provides a library for
15008 validating Swagger API specifications.")
15009 (license license:asl2.0)))
15010
15011 (define-public python2-swagger-spec-validator
15012 (package-with-python2 python-swagger-spec-validator))
15013
15014 (define-public python-apache-libcloud
15015 (package
15016 (name "python-apache-libcloud")
15017 (version "2.4.0")
15018 (source
15019 (origin
15020 (method url-fetch)
15021 (uri (pypi-uri "apache-libcloud" version))
15022 (sha256
15023 (base32
15024 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
15025 (build-system python-build-system)
15026 (arguments
15027 `(#:phases
15028 (modify-phases %standard-phases
15029 (add-after 'unpack 'patch-ssh
15030 (lambda* (#:key inputs #:allow-other-keys)
15031 (substitute* "libcloud/compute/ssh.py"
15032 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15033 "/bin/ssh" "'")))
15034 #t))
15035 (add-after 'unpack 'patch-tests
15036 (lambda _
15037 (substitute* "./libcloud/test/test_file_fixtures.py"
15038 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15039 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15040 return (httplib.OK,
15041 \"1234abcd\",
15042 {\"test\": \"value\"},
15043 httplib.responses[httplib.OK])
15044 def _ascii"))
15045 (substitute* "libcloud/test/compute/test_ssh_client.py"
15046 (("class ShellOutSSHClientTests")
15047 "@unittest.skip(\"Guix container doesn't have ssh service\")
15048 class ShellOutSSHClientTests")
15049 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15050 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15051 (("'.xF0', '.x90', '.x8D', '.x88'")
15052 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15053 #t))
15054 (add-before 'check 'copy-secret
15055 (lambda _
15056 (copy-file "libcloud/test/secrets.py-dist"
15057 "libcloud/test/secrets.py")
15058 #t)))))
15059 (inputs
15060 `(("openssh" ,openssh)))
15061 (propagated-inputs
15062 `(("python-paramiko" ,python-paramiko)
15063 ("python-requests" ,python-requests)))
15064 (native-inputs
15065 `(("python-lockfile" ,python-lockfile)
15066 ("python-mock" ,python-mock)
15067 ("python-pytest" ,python-pytest)
15068 ("python-pytest-runner" ,python-pytest-runner)
15069 ("python-requests-mock" ,python-requests-mock)))
15070 (home-page "https://libcloud.apache.org/")
15071 (synopsis "Unified Cloud API")
15072 (description "@code{libcloud} is a Python library for interacting with
15073 many of the popular cloud service providers using a unified API.")
15074 (license license:asl2.0)))
15075
15076 (define-public python2-apache-libcloud
15077 (package-with-python2 python-apache-libcloud))
15078
15079 (define-public python-smmap
15080 (package
15081 (name "python-smmap")
15082 (version "3.0.1")
15083 (source
15084 (origin
15085 (method url-fetch)
15086 (uri (pypi-uri "smmap" version))
15087 (sha256
15088 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
15089 (build-system python-build-system)
15090 (native-inputs
15091 `(("python-nosexcover" ,python-nosexcover)))
15092 (home-page "https://github.com/Byron/smmap")
15093 (synopsis "Python sliding window memory map manager")
15094 (description "@code{smmap} is a pure Python implementation of a sliding
15095 window memory map manager.")
15096 (license license:bsd-3)))
15097
15098 (define-public python-smmap2
15099 (deprecated-package "python-smmap2" python-smmap))
15100
15101 (define-public python2-smmap
15102 (package-with-python2 python-smmap))
15103
15104 (define-public python2-smmap2
15105 (deprecated-package "python2-smmap2" python2-smmap))
15106
15107 (define-public python-regex
15108 (package
15109 (name "python-regex")
15110 (version "2019.04.14")
15111 (source (origin
15112 (method url-fetch)
15113 (uri (pypi-uri "regex" version))
15114 (sha256
15115 (base32
15116 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
15117 ;; TODO: Fix and enable regex_test.py tests that complain about the
15118 ;; test.support module not existing.
15119 (build-system python-build-system)
15120 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15121 (synopsis "Alternative regular expression module")
15122 (description "This regular expression implementation is backwards-
15123 compatible with the standard @code{re} module, but offers additional
15124 functionality like full case-folding for case-insensitive matches in Unicode.")
15125 (license license:psfl)))
15126
15127 (define-public python2-regex
15128 (package-with-python2 python-regex))
15129
15130 (define-public python2-pyopengl
15131 (package
15132 (name "python2-pyopengl")
15133 (version "3.1.0")
15134 (source
15135 (origin
15136 (method url-fetch)
15137 (uri (pypi-uri "PyOpenGL" version))
15138 (sha256
15139 (base32
15140 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15141 (arguments
15142 `(#:python ,python-2))
15143 (build-system python-build-system)
15144 (home-page "http://pyopengl.sourceforge.net")
15145 (synopsis "Standard OpenGL bindings for Python")
15146 (description
15147 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15148 related APIs. The binding is created using the standard @code{ctypes}
15149 library.")
15150 (license license:bsd-3)))
15151
15152 (define-public python2-pyopengl-accelerate
15153 (package
15154 (inherit python2-pyopengl)
15155 (name "python2-pyopengl-accelerate")
15156 (version "3.1.0")
15157 (source
15158 (origin
15159 (method url-fetch)
15160 (uri (pypi-uri "PyOpenGL-accelerate" version))
15161 (sha256
15162 (base32
15163 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
15164 (synopsis "Acceleration code for PyOpenGL")
15165 (description
15166 "This is the Cython-coded accelerator module for PyOpenGL.")))
15167
15168 (define-public python-rencode
15169 (package
15170 (name "python-rencode")
15171 (version "1.0.5")
15172 (source
15173 (origin
15174 (method url-fetch)
15175 (uri (pypi-uri "rencode" version))
15176 (sha256
15177 (base32
15178 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
15179 (build-system python-build-system)
15180 (arguments
15181 `(#:phases
15182 (modify-phases %standard-phases
15183 (add-before 'check 'delete-bogus-test
15184 ;; This test requires /home/aresch/Downloads, which is not provided by
15185 ;; the build environment.
15186 (lambda _
15187 (delete-file "rencode/t.py")
15188 #t)))))
15189 (native-inputs `(("pkg-config" ,pkg-config)
15190 ("python-cython" ,python-cython)))
15191 (home-page "https://github.com/aresch/rencode")
15192 (synopsis "Serialization of heterogeneous data structures")
15193 (description
15194 "The @code{rencode} module is a data structure serialization library,
15195 similar to @code{bencode} from the BitTorrent project. For complex,
15196 heterogeneous data structures with many small elements, r-encoding stake up
15197 significantly less space than b-encodings. This version of rencode is a
15198 complete rewrite in Cython to attempt to increase the performance over the
15199 pure Python module.")
15200 (license license:bsd-3)))
15201
15202 (define-public python2-rencode
15203 (package-with-python2 python-rencode))
15204
15205 (define-public python-xenon
15206 (package
15207 (name "python-xenon")
15208 (version "0.7.0")
15209 (source
15210 (origin
15211 (method url-fetch)
15212 (uri (pypi-uri "xenon" version))
15213 (sha256
15214 (base32
15215 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
15216 (build-system python-build-system)
15217 (native-inputs
15218 `(("python-pyyaml" ,python-pyyaml)
15219 ("python-radon" ,python-radon)
15220 ("python-requests" ,python-requests)
15221 ("python-flake8" ,python-flake8)
15222 ("python-tox" ,python-tox)))
15223 (arguments
15224 `(#:tests? #f ;test suite not shipped with the PyPI archive
15225 #:phases
15226 (modify-phases %standard-phases
15227 (add-before 'build 'patch-test-requirements
15228 (lambda _
15229 ;; Remove httpretty dependency for tests.
15230 (substitute* "setup.py"
15231 (("httpretty") ""))
15232 #t)))))
15233 (home-page "https://xenon.readthedocs.org/")
15234 (synopsis "Monitor code metrics for Python on your CI server")
15235 (description
15236 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
15237 Ideally, @code{xenon} is run every time code is committed. Through command
15238 line options, various thresholds can be set for the complexity of code. It
15239 will fail (i.e. it will exit with a non-zero exit code) when any of these
15240 requirements is not met.")
15241 (license license:expat)))
15242
15243 (define-public python2-xenon
15244 (package-with-python2 python-xenon))
15245
15246 (define-public python-pysocks
15247 (package
15248 (name "python-pysocks")
15249 (version "1.7.0")
15250 (source
15251 (origin
15252 (method url-fetch)
15253 (uri (pypi-uri "PySocks" version))
15254 (sha256
15255 (base32
15256 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
15257 (build-system python-build-system)
15258 (arguments `(#:tests? #f))
15259 (home-page "https://github.com/Anorov/PySocks")
15260 (synopsis "SOCKS client module")
15261 (description "@code{pysocks} is an updated and semi-actively maintained
15262 version of @code{SocksiPy} with bug fixes and extra features.")
15263 (license license:bsd-3)))
15264
15265 (define-public python2-pysocks
15266 (package-with-python2 python-pysocks))
15267
15268 (define-public python-pydiff
15269 (package
15270 (name "python-pydiff")
15271 (version "0.2")
15272 (source
15273 (origin
15274 (method url-fetch)
15275 (uri (pypi-uri "pydiff" version))
15276 (sha256
15277 (base32
15278 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
15279 (build-system python-build-system)
15280 (home-page "https://github.com/myint/pydiff")
15281 (synopsis "Library to diff two Python files at the bytecode level")
15282 (description
15283 "@code{pydiff} makes it easy to look for actual code changes while
15284 ignoring formatting changes.")
15285 (license license:expat)))
15286
15287 (define-public python2-pydiff
15288 (package-with-python2 python-pydiff))
15289
15290 (define-public python-tqdm
15291 (package
15292 (name "python-tqdm")
15293 (version "4.43.0")
15294 (source
15295 (origin
15296 (method url-fetch)
15297 (uri (pypi-uri "tqdm" version))
15298 (sha256
15299 (base32
15300 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
15301 (build-system python-build-system)
15302 (arguments
15303 '(#:phases (modify-phases %standard-phases
15304 (replace 'check
15305 (lambda* (#:key inputs outputs #:allow-other-keys)
15306 (add-installed-pythonpath inputs outputs)
15307 ;; This invokation is taken from tox.ini.
15308 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
15309 "-d" "-v" "tqdm/"))))))
15310 (native-inputs
15311 `(("python-nose" ,python-nose)))
15312 (home-page "https://github.com/tqdm/tqdm")
15313 (synopsis "Fast, extensible progress meter")
15314 (description
15315 "Make loops show a progress bar on the console by just wrapping any
15316 iterable with @code{|tqdm(iterable)|}. Offers many options to define
15317 design and layout.")
15318 (license (list license:mpl2.0 license:expat))))
15319
15320 (define-public python2-tqdm
15321 (package-with-python2 python-tqdm))
15322
15323 (define-public python-pkginfo
15324 (package
15325 (name "python-pkginfo")
15326 (version "1.4.2")
15327 (source
15328 (origin
15329 (method url-fetch)
15330 (uri (pypi-uri "pkginfo" version))
15331 (sha256
15332 (base32
15333 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
15334 (build-system python-build-system)
15335 (arguments
15336 ;; The tests are broken upstream.
15337 '(#:tests? #f))
15338 (home-page
15339 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
15340 (synopsis
15341 "Query metadatdata from sdists, bdists, and installed packages")
15342 (description
15343 "API to query the distutils metadata written in @file{PKG-INFO} inside a
15344 source distriubtion (an sdist) or a binary distribution (e.g., created by
15345 running bdist_egg). It can also query the EGG-INFO directory of an installed
15346 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
15347 created by running @code{python setup.py develop}).")
15348 (license license:expat)))
15349
15350 (define-public python2-pkginfo
15351 (package-with-python2 python-pkginfo))
15352
15353 (define-public python-twine
15354 (package
15355 (name "python-twine")
15356 (version "1.9.1")
15357 (source
15358 (origin
15359 (method url-fetch)
15360 (uri (pypi-uri "twine" version))
15361 (sha256
15362 (base32
15363 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
15364 (build-system python-build-system)
15365 (propagated-inputs
15366 `(("python-tqdm" ,python-tqdm)
15367 ("python-pkginfo" ,python-pkginfo)
15368 ("python-requests" ,python-requests)
15369 ("python-requests-toolbelt" ,python-requests-toolbelt)))
15370 (home-page "https://github.com/pypa/twine")
15371 (synopsis "Collection of utilities for interacting with PyPI")
15372 (description
15373 "@code{twine} currently supports registering projects and uploading
15374 distributions. It authenticates the user over HTTPS, allows them to pre-sign
15375 their files and supports any packaging format (including wheels).")
15376 (license license:asl2.0)))
15377
15378 (define-public python2-twine
15379 (package-with-python2 python-twine))
15380
15381 (define-public python-linecache2
15382 (package
15383 (name "python-linecache2")
15384 (version "1.0.0")
15385 (source
15386 (origin
15387 (method url-fetch)
15388 (uri (pypi-uri "linecache2" version))
15389 (sha256
15390 (base32
15391 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
15392 (build-system python-build-system)
15393 (arguments
15394 `(;; The tests depend on unittest2, and our version is a bit too old.
15395 #:tests? #f))
15396 (native-inputs
15397 `(("python-pbr" ,python-pbr-minimal)))
15398 (home-page
15399 "https://github.com/testing-cabal/linecache2")
15400 (synopsis "Backports of the linecache module")
15401 (description
15402 "The linecache module allows one to get any line from any file, while
15403 attempting to optimize internally, using a cache, the common case where many
15404 lines are read from a single file.")
15405 (license license:psfl)))
15406
15407 (define-public python2-linecache2
15408 (package-with-python2 python-linecache2))
15409
15410 (define-public python-traceback2
15411 (package
15412 (name "python-traceback2")
15413 (version "1.4.0")
15414 (source
15415 (origin
15416 (method url-fetch)
15417 (uri (pypi-uri "traceback2" version))
15418 (sha256
15419 (base32
15420 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
15421 (build-system python-build-system)
15422 (arguments
15423 `(;; python-traceback2 and python-unittest2 depend on one another.
15424 #:tests? #f))
15425 (native-inputs
15426 `(("python-pbr" ,python-pbr-minimal)))
15427 (propagated-inputs
15428 `(("python-linecache2" ,python-linecache2)))
15429 (home-page
15430 "https://github.com/testing-cabal/traceback2")
15431 (synopsis "Backports of the traceback module")
15432 (description
15433 "This module provides a standard interface to extract, format and print
15434 stack traces of Python programs. It exactly mimics the behavior of the Python
15435 interpreter when it prints a stack trace.")
15436 (license license:psfl)))
15437
15438 (define-public python2-traceback2
15439 (package-with-python2 python-traceback2))
15440
15441 (define-public python-ratelimiter
15442 (package
15443 (name "python-ratelimiter")
15444 (version "1.2.0")
15445 (source
15446 (origin
15447 (method url-fetch)
15448 (uri (pypi-uri "ratelimiter" version))
15449 (sha256
15450 (base32
15451 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
15452 (build-system python-build-system)
15453 (arguments
15454 '(#:tests? #f)) ; There are no tests in the pypi archive.
15455 (home-page "https://github.com/RazerM/ratelimiter")
15456 (synopsis "Simple rate limiting object")
15457 (description
15458 "The @code{ratelimiter} module ensures that an operation will not be
15459 executed more than a given number of times during a given period.")
15460 (license license:asl2.0)))
15461
15462 (define-public python2-ratelimiter
15463 (package-with-python2 python-ratelimiter))
15464
15465 (define-public python-dukpy
15466 (package
15467 (name "python-dukpy")
15468 (version "0.3")
15469 (source
15470 (origin
15471 (method git-fetch)
15472 (uri (git-reference
15473 (url "https://github.com/kovidgoyal/dukpy.git")
15474 (commit (string-append "v" version))))
15475 (file-name (git-file-name name version))
15476 (sha256
15477 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
15478 (build-system python-build-system)
15479 (home-page "https://github.com/kovidgoyal/dukpy")
15480 (synopsis "Run JavaScript in python")
15481 (description
15482 "dukpy is a JavaScript runtime environment for Python using the duktape
15483 embeddable JavaScript engine.")
15484 ;; Dukpy is licensed under MIT like the embedded duktape library,
15485 ;; with 'errors.c' as GPL3.
15486 (license (list license:expat license:gpl3))))
15487
15488 (define-public python2-dukpy
15489 (package-with-python2 python-dukpy))
15490
15491 (define-public python-jsonrpclib-pelix
15492 (package
15493 (name "python-jsonrpclib-pelix")
15494 (version "0.3.2")
15495 (source
15496 (origin
15497 (method url-fetch)
15498 (uri (pypi-uri "jsonrpclib-pelix" version))
15499 (sha256
15500 (base32
15501 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
15502 (build-system python-build-system)
15503 (arguments
15504 `(#:tests? #f)) ; no tests in PyPI tarball
15505 (home-page "https://github.com/tcalmant/jsonrpclib/")
15506 (synopsis "JSON-RPC 2.0 client library for Python")
15507 (description
15508 "This library implements the JSON-RPC v2.0
15509 specification (backwards-compatible) as a client library for Python. This
15510 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
15511 services.")
15512 (license license:asl2.0)))
15513
15514 (define-public python2-jsonrpclib-pelix
15515 (package-with-python2 python-jsonrpclib-pelix))
15516
15517 (define-public python-setuptools-scm-git-archive
15518 (package
15519 (name "python-setuptools-scm-git-archive")
15520 (version "1.0")
15521 (source
15522 (origin
15523 (method url-fetch)
15524 (uri (pypi-uri "setuptools_scm_git_archive" version))
15525 (sha256
15526 (base32
15527 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
15528 (build-system python-build-system)
15529 (native-inputs
15530 `(("python-pytest" ,python-pytest)))
15531 (propagated-inputs
15532 `(("python-setuptools-scm" ,python-setuptools-scm)))
15533 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
15534 (synopsis "Setuptools_scm plugin for git archives")
15535 (description
15536 "The setuptools_scm_git_archive package is a plugin to
15537 setuptools_scm, which supports obtaining versions from git archives that
15538 belong to tagged versions.")
15539 (license license:expat)))
15540
15541 (define-public python2-setuptools-scm-git-archive
15542 (package-with-python2 python-setuptools-scm-git-archive))
15543
15544 (define-public python-setuptools-git
15545 (package
15546 (name "python-setuptools-git")
15547 (version "1.2")
15548 (source
15549 (origin
15550 (method url-fetch)
15551 (uri (pypi-uri "setuptools-git" version))
15552 (sha256
15553 (base32
15554 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
15555 (build-system python-build-system)
15556 (arguments
15557 `(#:phases
15558 (modify-phases %standard-phases
15559 ;; This is needed for tests.
15560 (add-after 'unpack 'configure-git
15561 (lambda _
15562 (setenv "HOME" "/tmp")
15563 (invoke "git" "config" "--global" "user.email" "guix")
15564 (invoke "git" "config" "--global" "user.name" "guix")
15565 #t)))))
15566 (native-inputs
15567 `(("git" ,git-minimal)))
15568 (home-page "https://github.com/msabramo/setuptools-git")
15569 (synopsis "Setuptools revision control system plugin for Git")
15570 (description
15571 "This package provides a plugin for Setuptools for revision control with
15572 Git.")
15573 (license license:bsd-3)))
15574
15575 (define-public python-pyclipper
15576 (package
15577 (name "python-pyclipper")
15578 (version "1.1.0.post3")
15579 (source
15580 (origin
15581 (method url-fetch)
15582 (uri (pypi-uri "pyclipper" version ".zip"))
15583 (sha256
15584 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
15585 (modules '((guix build utils)))
15586 (snippet
15587 '(begin
15588 ;; This file is generated by Cython.
15589 (delete-file "pyclipper/pyclipper.cpp") #t))))
15590 (build-system python-build-system)
15591 (arguments
15592 `(#:phases
15593 (modify-phases %standard-phases
15594 (add-before 'build 'cythonize-sources
15595 (lambda _
15596 (with-directory-excursion "pyclipper"
15597 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
15598 (propagated-inputs
15599 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
15600 (native-inputs
15601 `(("python-cython" ,python-cython)
15602 ("python-pytest" ,python-pytest)
15603 ("python-pytest-runner" ,python-pytest-runner)
15604 ("python-unittest2" ,python-unittest2)
15605 ("unzip" ,unzip)))
15606 (home-page "https://github.com/greginvm/pyclipper")
15607 (synopsis "Wrapper for Angus Johnson's Clipper library")
15608 (description
15609 "Pyclipper is a Cython wrapper for the C++ translation of the
15610 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
15611 (license license:expat)))
15612
15613 (define-public python2-pyclipper
15614 (package-with-python2 python-pyclipper))
15615
15616 (define-public python2-booleanoperations
15617 (package
15618 (name "python2-booleanoperations")
15619 (version "0.7.1")
15620 (source
15621 (origin
15622 (method url-fetch)
15623 (uri (pypi-uri "booleanOperations" version ".zip"))
15624 (sha256
15625 (base32
15626 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
15627 (build-system python-build-system)
15628 (arguments
15629 `(#:python ,python-2))
15630 (native-inputs
15631 `(("unzip" ,unzip)
15632 ("python2-pytest" ,python2-pytest)
15633 ("python2-pytest-runner" ,python2-pytest-runner)))
15634 (propagated-inputs
15635 `(("python-fonttools" ,python2-fonttools)
15636 ("python-pyclipper" ,python2-pyclipper)
15637 ("python-ufolib" ,python2-ufolib)))
15638 (home-page "https://github.com/typemytype/booleanOperations")
15639 (synopsis "Boolean operations on paths")
15640 (description
15641 "BooleanOperations provides a Python library that enables
15642 boolean operations on paths.")
15643 (license license:expat)))
15644
15645 (define-public python-tempdir
15646 (package
15647 (name "python-tempdir")
15648 (version "0.7.1")
15649 (source
15650 (origin
15651 (method url-fetch)
15652 (uri (pypi-uri "tempdir" version))
15653 (sha256
15654 (base32
15655 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
15656 (build-system python-build-system)
15657 (home-page "https://pypi.org/project/tempdir/")
15658 (arguments
15659 ;; the package has no tests
15660 '(#:tests? #f))
15661 (synopsis "Python library for managing temporary directories")
15662 (description
15663 "This library manages temporary directories that are automatically
15664 deleted with all their contents when they are no longer needed. It is
15665 particularly convenient for use in tests.")
15666 (license license:expat)))
15667
15668 (define-public python2-tempdir
15669 (package-with-python2 python-tempdir))
15670
15671 (define-public python-activepapers
15672 (package
15673 (name "python-activepapers")
15674 (version "0.2.2")
15675 (source
15676 (origin
15677 (method url-fetch)
15678 (uri (pypi-uri "ActivePapers.Py" version))
15679 (sha256
15680 (base32
15681 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
15682 (build-system python-build-system)
15683 (arguments
15684 `(#:modules ((ice-9 ftw)
15685 (srfi srfi-1)
15686 (guix build utils)
15687 (guix build python-build-system))
15688
15689 #:phases
15690 (modify-phases %standard-phases
15691 (add-after 'unpack 'delete-python2-code
15692 (lambda _
15693 (for-each delete-file
15694 '("lib/activepapers/builtins2.py"
15695 "lib/activepapers/standardlib2.py"
15696 "lib/activepapers/utility2.py"))))
15697 (replace 'check
15698 (lambda _
15699 ;; Deactivate the test cases that download files
15700 (setenv "NO_NETWORK_ACCESS" "1")
15701 ;; For some strange reason, some tests fail if nosetests runs all
15702 ;; test modules in a single execution. They pass if each test
15703 ;; module is run individually.
15704 (for-each (lambda (filename)
15705 (invoke "nosetests"
15706 (string-append "tests/" filename)))
15707 (scandir "tests"
15708 (lambda (filename)
15709 (string-suffix? ".py" filename)))))))))
15710 (native-inputs
15711 `(("python-tempdir" ,python-tempdir)
15712 ("python-nose" ,python-nose)))
15713 (propagated-inputs
15714 `(("python-h5py" ,python-h5py)))
15715 (home-page "https://www.activepapers.org/")
15716 (synopsis "Executable papers for scientific computing")
15717 (description
15718 "ActivePapers is a tool for working with executable papers, which
15719 combine data, code, and documentation in single-file packages,
15720 suitable for publication as supplementary material or on repositories
15721 such as figshare or Zenodo.")
15722 (properties `((python2-variant . ,(delay python2-activepapers))))
15723 (license license:bsd-3)))
15724
15725 (define-public python2-activepapers
15726 (let ((base (package-with-python2
15727 (strip-python2-variant python-activepapers))))
15728 (package
15729 (inherit base)
15730 (arguments
15731 (substitute-keyword-arguments (package-arguments base)
15732 ((#:phases phases)
15733 `(modify-phases ,phases
15734 (delete 'delete-python2-code)
15735 (add-after 'unpack 'delete-python3-code
15736 (lambda _
15737 (for-each delete-file
15738 '("lib/activepapers/builtins3.py"
15739 "lib/activepapers/standardlib3.py"
15740 "lib/activepapers/utility3.py")))))))))))
15741
15742 (define-public python-semver
15743 (package
15744 (name "python-semver")
15745 (version "2.9.0")
15746 (source
15747 (origin
15748 (method url-fetch)
15749 (uri (pypi-uri "semver" version))
15750 (sha256
15751 (base32
15752 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
15753 (build-system python-build-system)
15754 (native-inputs
15755 `(("python-appdirs" ,python-appdirs)
15756 ("python-distlib" ,python-distlib)
15757 ("python-importlib-metadata" ,python-importlib-metadata)
15758 ("python-filelock" ,python-filelock)
15759 ("python-six" ,python-six)
15760 ("python-tox" ,python-tox)
15761 ("python-virtualenv" ,python-virtualenv)))
15762 (home-page "https://github.com/k-bx/python-semver")
15763 (synopsis "Python helper for Semantic Versioning")
15764 (description "This package provides a Python library for
15765 @url{Semantic Versioning, http://semver.org/}.")
15766 (license license:bsd-3)))
15767
15768 (define-public python2-semver
15769 (package-with-python2 python-semver))
15770
15771 (define-public python-pyro4
15772 (package
15773 (name "python-pyro4")
15774 (version "4.77")
15775 (source
15776 (origin
15777 (method url-fetch)
15778 (uri (pypi-uri "Pyro4" version))
15779 (sha256
15780 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
15781 (build-system python-build-system)
15782 (arguments
15783 '(#:tests? #f)) ;FIXME: Some tests require network access.
15784 (native-inputs
15785 `(("python-cloudpickle" ,python-cloudpickle)
15786 ("python-dill" ,python-dill)
15787 ("python-msgpack" ,python-msgpack)))
15788 (propagated-inputs
15789 `(("python-serpent" ,python-serpent)))
15790 (home-page "https://pyro4.readthedocs.io")
15791 (synopsis "Distributed object middleware for Python")
15792 (description
15793 "Pyro enables you to build applications in which objects can talk to each
15794 other over the network. You can just use normal Python method calls to call
15795 objects on other machines, also known as remote procedure calls (RPC).")
15796 (license license:expat)))
15797
15798 (define-public python2-pyro
15799 (package
15800 (name "python2-pyro")
15801 (version "3.16")
15802 (source
15803 (origin
15804 (method url-fetch)
15805 (uri (pypi-uri "Pyro" version))
15806 (file-name (string-append "Pyro-" version ".tar.gz"))
15807 (sha256
15808 (base32
15809 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15810 (build-system python-build-system)
15811 (arguments
15812 ;; Pyro is not compatible with Python 3
15813 `(#:python ,python-2
15814 ;; Pyro has no test cases for automatic execution
15815 #:tests? #f))
15816 (home-page "https://pythonhosted.org/Pyro/")
15817 (synopsis "Distributed object manager for Python")
15818 (description "Pyro is a Distributed Object Technology system
15819 written in Python that is designed to be easy to use. It resembles
15820 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15821 which is a system and language independent Distributed Object Technology
15822 and has much more to offer than Pyro or RMI. Pyro 3.x is no
15823 longer maintained. New projects should use Pyro4 instead, which
15824 is the new Pyro version that is actively developed.")
15825 (license license:expat)))
15826
15827 (define-public python2-scientific
15828 (package
15829 (name "python2-scientific")
15830 (version "2.9.4")
15831 (source
15832 (origin
15833 (method git-fetch)
15834 (uri (git-reference
15835 (url "https://github.com/khinsen/ScientificPython")
15836 (commit (string-append "rel" version))))
15837 (file-name (git-file-name name version))
15838 (sha256
15839 (base32
15840 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
15841 (build-system python-build-system)
15842 (inputs
15843 `(("netcdf" ,netcdf)))
15844 (propagated-inputs
15845 `(("python-numpy" ,python2-numpy-1.8)
15846 ("python-pyro" ,python2-pyro)))
15847 (arguments
15848 ;; ScientificPython is not compatible with Python 3
15849 `(#:python ,python-2
15850 #:tests? #f ; No test suite
15851 #:phases
15852 (modify-phases %standard-phases
15853 (replace 'build
15854 (lambda* (#:key inputs #:allow-other-keys)
15855 (invoke "python" "setup.py" "build"
15856 (string-append "--netcdf_prefix="
15857 (assoc-ref inputs "netcdf"))))))))
15858 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
15859 (synopsis "Python modules for scientific computing")
15860 (description "ScientificPython is a collection of Python modules that are
15861 useful for scientific computing. Most modules are rather general (Geometry,
15862 physical units, automatic derivatives, ...) whereas others are more
15863 domain-specific (e.g. netCDF and PDB support). The library is currently
15864 not actively maintained and works only with Python 2 and NumPy < 1.9.")
15865 (license license:cecill-c)))
15866
15867 (define-public python2-mmtk
15868 (package
15869 (name "python2-mmtk")
15870 (version "2.7.12")
15871 (source
15872 (origin
15873 (method git-fetch)
15874 (uri (git-reference
15875 (url "https://github.com/khinsen/MMTK")
15876 (commit (string-append "rel" version))))
15877 (file-name (git-file-name name version))
15878 (sha256
15879 (base32
15880 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
15881 (build-system python-build-system)
15882 (native-inputs
15883 `(("netcdf" ,netcdf)))
15884 (propagated-inputs
15885 `(("python-scientific" ,python2-scientific)
15886 ("python-tkinter" ,python-2 "tk")))
15887 (arguments
15888 `(#:python ,python-2
15889 #:tests? #f
15890 #:phases
15891 (modify-phases %standard-phases
15892 (add-before 'build 'includes-from-scientific
15893 (lambda* (#:key inputs #:allow-other-keys)
15894 (mkdir-p "Include/Scientific")
15895 (copy-recursively
15896 (string-append
15897 (assoc-ref inputs "python-scientific")
15898 "/include/python2.7/Scientific")
15899 "Include/Scientific"))))))
15900 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15901 (synopsis "Python library for molecular simulation")
15902 (description "MMTK is a library for molecular simulations with an emphasis
15903 on biomolecules. It provides widely used methods such as Molecular Dynamics
15904 and normal mode analysis, but also basic routines for implementing new methods
15905 for simulation and analysis. The library is currently not actively maintained
15906 and works only with Python 2 and NumPy < 1.9.")
15907 (license license:cecill-c)))
15908
15909 (define-public python-phonenumbers
15910 (package
15911 (name "python-phonenumbers")
15912 (version "8.9.1")
15913 (source
15914 (origin
15915 (method url-fetch)
15916 (uri (pypi-uri "phonenumbers" version))
15917 (sha256
15918 (base32
15919 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15920 (build-system python-build-system)
15921 (home-page
15922 "https://github.com/daviddrysdale/python-phonenumbers")
15923 (synopsis
15924 "Python library for dealing with international phone numbers")
15925 (description
15926 "This package provides a Python port of Google's libphonenumber library.")
15927 (license license:asl2.0)))
15928
15929 (define-public python2-phonenumbers
15930 (package-with-python2 python-phonenumbers))
15931
15932 (define-public python-send2trash
15933 (package
15934 (name "python-send2trash")
15935 (version "1.5.0")
15936 (source
15937 (origin (method git-fetch)
15938 ;; Source tarball on PyPI doesn't include tests.
15939 (uri (git-reference
15940 (url "https://github.com/hsoft/send2trash.git")
15941 (commit version)))
15942 (file-name (git-file-name name version))
15943 (sha256
15944 (base32
15945 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
15946 (build-system python-build-system)
15947 (arguments
15948 '(#:phases
15949 (modify-phases %standard-phases
15950 (add-before 'check 'pre-check
15951 (lambda _
15952 (mkdir-p "/tmp/foo")
15953 (setenv "HOME" "/tmp/foo")
15954 #t)))))
15955 (home-page "https://github.com/hsoft/send2trash")
15956 (synopsis "Send files to the user's @file{~/Trash} directory")
15957 (description "This package provides a Python library to send files to the
15958 user's @file{~/Trash} directory.")
15959 (properties `((python2-variant . ,(delay python2-send2trash))))
15960 (license license:bsd-3)))
15961
15962 (define-public python2-send2trash
15963 (package
15964 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
15965 (arguments
15966 (substitute-keyword-arguments (package-arguments python-send2trash)
15967 ((#:phases phases)
15968 `(modify-phases ,phases
15969 (add-before 'check 'setenv
15970 (lambda _
15971 (setenv "PYTHONPATH"
15972 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
15973 #t))))))))
15974
15975 (define-public python-yapf
15976 (package
15977 (name "python-yapf")
15978 (version "0.29.0")
15979 (source
15980 (origin
15981 (method url-fetch)
15982 (uri (pypi-uri "yapf" version))
15983 (sha256
15984 (base32
15985 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
15986 (build-system python-build-system)
15987 (home-page "https://github.com/google/yapf")
15988 (synopsis "Formatter for Python code")
15989 (description "YAPF is a formatter for Python code. It's based off of
15990 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15991 takes the code and reformats it to the best formatting that conforms to the
15992 style guide, even if the original code didn't violate the style guide.")
15993 (license license:asl2.0)))
15994
15995 (define-public python2-yapf
15996 (package-with-python2 python-yapf))
15997
15998 (define-public python-gyp
15999 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
16000 (revision "0"))
16001 (package
16002 (name "python-gyp")
16003 ;; Google does not release versions,
16004 ;; based on second most recent commit date.
16005 (version (git-version "0.0.0" revision commit))
16006 (source
16007 (origin
16008 ;; Google does not release tarballs,
16009 ;; git checkout is needed.
16010 (method git-fetch)
16011 (uri (git-reference
16012 (url "https://chromium.googlesource.com/external/gyp")
16013 (commit commit)))
16014 (file-name (git-file-name name version))
16015 (sha256
16016 (base32
16017 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
16018 (build-system python-build-system)
16019 (home-page "https://gyp.gsrc.io/")
16020 (synopsis "GYP is a Meta-Build system")
16021 (description
16022 "GYP builds build systems for large, cross platform applications.
16023 It can be used to generate XCode projects, Visual Studio projects, Ninja build
16024 files, and Makefiles.")
16025 (license license:bsd-3))))
16026
16027 (define-public python2-gyp
16028 (package-with-python2 python-gyp))
16029
16030 (define-public python-whatever
16031 (package
16032 (name "python-whatever")
16033 (version "0.6")
16034 (source
16035 (origin
16036 (method git-fetch)
16037 (uri (git-reference
16038 (url "https://github.com/Suor/whatever")
16039 (commit version)))
16040 (file-name (git-file-name name version))
16041 (sha256
16042 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
16043 (build-system python-build-system)
16044 (arguments
16045 `(#:phases
16046 (modify-phases %standard-phases
16047 (replace 'check
16048 (lambda _
16049 (invoke "py.test"))))))
16050 (native-inputs
16051 `(("python-pytest" ,python-pytest)))
16052 (home-page "http://github.com/Suor/whatever")
16053 (synopsis "Make anonymous functions by partial application of operators")
16054 (description "@code{whatever} provides an easy way to make anonymous
16055 functions by partial application of operators.")
16056 (license license:bsd-3)))
16057
16058 (define-public python2-whatever
16059 (package-with-python2 python-whatever))
16060
16061 (define-public python-funcy
16062 (package
16063 (name "python-funcy")
16064 (version "1.11")
16065 (source
16066 (origin
16067 (method git-fetch)
16068 (uri (git-reference
16069 (url "https://github.com/Suor/funcy.git")
16070 (commit version)))
16071 (sha256
16072 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
16073 (file-name (git-file-name name version))))
16074 (build-system python-build-system)
16075 (arguments
16076 `(#:phases
16077 (modify-phases %standard-phases
16078 (replace 'check
16079 (lambda _
16080 (invoke "py.test"))))))
16081 (native-inputs
16082 `(("python-pytest" ,python-pytest)
16083 ("python-whatever" ,python-whatever)))
16084 (home-page "http://github.com/Suor/funcy")
16085 (synopsis "Functional tools")
16086 (description "@code{funcy} is a library that provides functional tools.
16087 Examples are:
16088 @enumerate
16089 @item merge - Merges collections of the same type
16090 @item walk - Type-preserving map
16091 @item select - Selects a part of a collection
16092 @item take - Takes the first n items of a collection
16093 @item first - Takes the first item of a collection
16094 @item remove - Predicated-removes items of a collection
16095 @item concat - Concatenates two collections
16096 @item flatten - Flattens a collection with subcollections
16097 @item distinct - Returns only distinct items
16098 @item split - Predicated-splits a collection
16099 @item split_at - Splits a collection at a given item
16100 @item group_by - Groups items by group
16101 @item pairwise - Pairs off adjacent items
16102 @item partial - Partially-applies a function
16103 @item curry - Curries a function
16104 @item compose - Composes functions
16105 @item complement - Complements a predicate
16106 @item all_fn - \"all\" with predicate
16107 @end enumerate")
16108 (license license:bsd-3)))
16109
16110 (define-public python2-funcy
16111 (package-with-python2 python-funcy))
16112
16113 (define-public python-isoweek
16114 (package
16115 (name "python-isoweek")
16116 (version "1.3.3")
16117 (source
16118 (origin
16119 (method url-fetch)
16120 (uri (pypi-uri "isoweek" version))
16121 (sha256
16122 (base32
16123 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
16124 (build-system python-build-system)
16125 (home-page "https://github.com/gisle/isoweek")
16126 (synopsis "Objects representing a week")
16127 (description "The @code{isoweek} module provide the class Week that
16128 implements the week definition of ISO 8601. This standard also defines
16129 a notation for identifying weeks; yyyyWww (where the W is a literal).
16130 Week instances stringify to this form.")
16131 (license license:bsd-3)))
16132
16133 (define-public python2-isoweek
16134 (package-with-python2 python-isoweek))
16135
16136 (define-public python-tokenize-rt
16137 (package
16138 (name "python-tokenize-rt")
16139 (version "2.0.1")
16140 (source
16141 (origin
16142 (method url-fetch)
16143 (uri (pypi-uri "tokenize-rt" version))
16144 (sha256
16145 (base32
16146 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
16147 (build-system python-build-system)
16148 (home-page "https://github.com/asottile/tokenize-rt")
16149 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
16150 (description
16151 "This Python library is a wrapper around @code{tokenize} from the Python
16152 standard library. It provides two additional tokens @code{ESCAPED_NL} and
16153 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
16154 and @code{tokens_to_src} to roundtrip.")
16155 (license license:expat)))
16156
16157 (define-public python-future-fstrings
16158 (package
16159 (name "python-future-fstrings")
16160 (version "0.4.1")
16161 (source
16162 (origin
16163 (method url-fetch)
16164 (uri (pypi-uri "future_fstrings" version))
16165 (sha256
16166 (base32
16167 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
16168 (build-system python-build-system)
16169 (propagated-inputs
16170 `(("python-tokenize-rt" ,python-tokenize-rt)))
16171 (home-page "https://github.com/asottile/future-fstrings")
16172 (synopsis "Backport of fstrings to Python < 3.6")
16173 (description
16174 "This package provides a UTF-8 compatible encoding
16175 @code{future_fstrings}, which performs source manipulation. It decodes the
16176 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
16177 @code{f} strings.")
16178 (license license:expat)))
16179
16180 (define-public python-typed-ast
16181 (package
16182 (name "python-typed-ast")
16183 (version "1.4.0")
16184 (source
16185 (origin
16186 (method git-fetch)
16187 (uri (git-reference
16188 (url "https://github.com/python/typed_ast.git")
16189 (commit version)))
16190 (sha256
16191 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
16192 (file-name (git-file-name name version))))
16193 (build-system python-build-system)
16194 (arguments
16195 `(#:modules ((guix build utils)
16196 (guix build python-build-system)
16197 (ice-9 ftw)
16198 (srfi srfi-1)
16199 (srfi srfi-26))
16200 #:phases
16201 (modify-phases %standard-phases
16202 (replace 'check
16203 (lambda _
16204 (let ((cwd (getcwd)))
16205 (setenv "PYTHONPATH"
16206 (string-append cwd "/build/"
16207 (find (cut string-prefix? "lib" <>)
16208 (scandir (string-append cwd "/build")))
16209 ":"
16210 (getenv "PYTHONPATH"))))
16211 (invoke "pytest")
16212 #t)))))
16213 (native-inputs `(("python-pytest" ,python-pytest)))
16214 (home-page "https://github.com/python/typed_ast")
16215 (synopsis "Fork of Python @code{ast} modules with type comment support")
16216 (description "This package provides a parser similar to the standard
16217 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
16218 include PEP 484 type comments and are independent of the version of Python
16219 under which they are run. The @code{typed_ast} parsers produce the standard
16220 Python AST (plus type comments), and are both fast and correct, as they are
16221 based on the CPython 2.7 and 3.7 parsers.")
16222 ;; See the file "LICENSE" for the details.
16223 (license (list license:psfl
16224 license:asl2.0
16225 license:expat)))) ;ast27/Parser/spark.py
16226
16227 (define-public python-typing
16228 (package
16229 (name "python-typing")
16230 (version "3.7.4.1")
16231 (source
16232 (origin
16233 (method url-fetch)
16234 (uri (pypi-uri "typing" version))
16235 (sha256
16236 (base32
16237 "08xs7s5pyq99hbrzw23inczmidz90krvpv9q5p1qrvh6yzrydpwi"))))
16238 (build-system python-build-system)
16239 (home-page "https://docs.python.org/3/library/typing.html")
16240 (synopsis "Type hints for Python")
16241 (description "This is a backport of the standard library @code{typing}
16242 module to Python versions older than 3.5. Typing defines a standard notation
16243 for Python function and variable type annotations. The notation can be used
16244 for documenting code in a concise, standard format, and it has been designed
16245 to also be used by static and runtime type checkers, static analyzers, IDEs
16246 and other tools.")
16247 (license license:psfl)))
16248
16249 (define-public python2-typing
16250 (package-with-python2 python-typing))
16251
16252 (define-public python-typing-extensions
16253 (package
16254 (name "python-typing-extensions")
16255 (version "3.7.4.1")
16256 (source
16257 (origin
16258 (method url-fetch)
16259 (uri (pypi-uri "typing_extensions" version))
16260 (sha256
16261 (base32
16262 "1wj1vcgbnm20aiinmphyxfrbv3qi9xdhvw89ab3qm42y9n4wq7h9"))))
16263 (build-system python-build-system)
16264 (home-page
16265 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
16266 (synopsis "Experimental type hints for Python")
16267 (description
16268 "The typing_extensions module contains additional @code{typing} hints not
16269 yet present in the of the @code{typing} standard library.
16270 Included are implementations of:
16271 @enumerate
16272 @item ClassVar
16273 @item ContextManager
16274 @item Counter
16275 @item DefaultDict
16276 @item Deque
16277 @item NewType
16278 @item NoReturn
16279 @item overload
16280 @item Protocol
16281 @item runtime
16282 @item Text
16283 @item Type
16284 @item TYPE_CHECKING
16285 @item AsyncGenerator
16286 @end enumerate\n")
16287 (license license:psfl)))
16288
16289 (define-public bpython
16290 (package
16291 (name "bpython")
16292 (version "0.18")
16293 (source
16294 (origin
16295 (method url-fetch)
16296 (uri (pypi-uri "bpython" version))
16297 (sha256
16298 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
16299 (build-system python-build-system)
16300 (arguments
16301 `(#:phases
16302 (modify-phases %standard-phases
16303 (add-after 'unpack 'remove-failing-test
16304 (lambda _
16305 ;; Remove failing test. FIXME: make it pass
16306 (delete-file "bpython/test/test_args.py")
16307 #t))
16308 (add-after 'wrap 'add-aliases
16309 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
16310 (lambda* (#:key outputs #:allow-other-keys)
16311 (let ((out (assoc-ref outputs "out")))
16312 (for-each
16313 (lambda (old new)
16314 (symlink old (string-append out "/bin/" new)))
16315 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
16316 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
16317 #t)))))
16318 (propagated-inputs
16319 `(("python-pygments" ,python-pygments)
16320 ("python-requests" ,python-requests)
16321 ("python-babel" ,python-babel) ; optional, for internationalization
16322 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
16323 ("python-greenlet" ,python-greenlet)
16324 ("python-urwid" ,python-urwid) ; for bpython-urwid only
16325 ("python-six" ,python-six)))
16326 (native-inputs
16327 `(("python-sphinx" ,python-sphinx)
16328 ("python-mock" ,python-mock)))
16329 (home-page "https://bpython-interpreter.org/")
16330 (synopsis "Fancy interface to the Python interpreter")
16331 (description "Bpython is a fancy interface to the Python
16332 interpreter. bpython's main features are
16333
16334 @enumerate
16335 @item in-line syntax highlighting,
16336 @item readline-like autocomplete with suggestions displayed as you type,
16337 @item expected parameter list for any Python function,
16338 @item \"rewind\" function to pop the last line of code from memory and
16339 re-evaluate,
16340 @item send the code you've entered off to a pastebin,
16341 @item save the code you've entered to a file, and
16342 @item auto-indentation.
16343 @end enumerate")
16344 (license license:expat)))
16345
16346 (define-public bpython2
16347 (let ((base (package-with-python2
16348 (strip-python2-variant bpython))))
16349 (package (inherit base)
16350 (name "bpython2")
16351 (arguments
16352 `(#:python ,python-2
16353 #:phases
16354 (modify-phases %standard-phases
16355 (add-after 'unpack 'remove-failing-test
16356 (lambda _
16357 ;; Remove failing test. FIXME: make it pass
16358 (delete-file "bpython/test/test_args.py")
16359 ;; Disable failing test-cases (renaming inhibits they are
16360 ;; discovered)
16361 (substitute* "bpython/test/test_curtsies_repl.py"
16362 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
16363 (string-append a "xxx_off_" b))
16364 (("^(\\s*def )(test_complex\\W)" _ a b)
16365 (string-append a "xxx_off_" b)))
16366 #t))
16367 (add-before 'build 'rename-scripts
16368 ;; rename the scripts to bypthon2, bpdb2, etc.
16369 (lambda _
16370 (substitute* "setup.py"
16371 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
16372 (string-append name "2" rest "\n"))
16373 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
16374 (string-append name "2" (or sub "") rest "\n")))
16375 #t))))))))
16376
16377 (define-public python-pyinotify
16378 (package
16379 (name "python-pyinotify")
16380 (version "0.9.6")
16381 (source (origin
16382 (method url-fetch)
16383 (uri (pypi-uri "pyinotify" version))
16384 (sha256
16385 (base32
16386 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
16387 (build-system python-build-system)
16388 (arguments `(#:tests? #f)) ;no tests
16389 (home-page "https://github.com/seb-m/pyinotify")
16390 (synopsis "Python library for monitoring inotify events")
16391 (description
16392 "@code{pyinotify} provides a Python interface for monitoring
16393 file system events on Linux.")
16394 (license license:expat)))
16395
16396 (define-public python2-pyinotify
16397 (package-with-python2 python-pyinotify))
16398
16399 ;; Ada parser uses this version.
16400 (define-public python2-quex-0.67.3
16401 (package
16402 (name "python2-quex")
16403 (version "0.67.3")
16404 (source
16405 (origin
16406 (method url-fetch)
16407 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
16408 (version-major+minor version)
16409 "/quex-" version ".zip"))
16410 (sha256
16411 (base32
16412 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
16413 (build-system python-build-system)
16414 (native-inputs
16415 `(("unzip" ,unzip)))
16416 (arguments
16417 `(#:python ,python-2
16418 #:tests? #f
16419 #:phases
16420 (modify-phases %standard-phases
16421 (delete 'configure)
16422 (delete 'build)
16423 (replace 'install
16424 (lambda* (#:key outputs #:allow-other-keys)
16425 (let* ((out (assoc-ref outputs "out"))
16426 (share/quex (string-append out "/share/quex"))
16427 (bin (string-append out "/bin")))
16428 (copy-recursively "." share/quex)
16429 (mkdir-p bin)
16430 (symlink (string-append share/quex "/quex-exe.py")
16431 (string-append bin "/quex"))
16432 #t))))))
16433 (native-search-paths
16434 (list (search-path-specification
16435 (variable "QUEX_PATH")
16436 (files '("share/quex")))))
16437 (home-page "http://quex.sourceforge.net/")
16438 (synopsis "Lexical analyzer generator in Python")
16439 (description "@code{quex} is a lexical analyzer generator in Python.")
16440 (license license:lgpl2.1+))) ; Non-military
16441
16442 (define-public python2-quex
16443 (package (inherit python2-quex-0.67.3)
16444 (name "python2-quex")
16445 (version "0.68.1")
16446 (source
16447 (origin
16448 (method url-fetch)
16449 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
16450 (sha256
16451 (base32
16452 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
16453 (file-name (string-append name "-" version ".tar.gz"))))))
16454
16455 (define-public python-more-itertools
16456 (package
16457 (name "python-more-itertools")
16458 (version "8.2.0")
16459 (source
16460 (origin
16461 (method url-fetch)
16462 (uri (pypi-uri "more-itertools" version))
16463 (sha256
16464 (base32
16465 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
16466 (build-system python-build-system)
16467 (home-page "https://github.com/erikrose/more-itertools")
16468 (synopsis "More routines for operating on iterables, beyond itertools")
16469 (description "Python's built-in @code{itertools} module implements a
16470 number of iterator building blocks inspired by constructs from APL, Haskell,
16471 and SML. @code{more-itertools} includes additional building blocks for
16472 working with iterables.")
16473 (properties `((python2-variant . ,(delay python2-more-itertools))))
16474 (license license:expat)))
16475
16476 ;; The 5.x series are the last versions supporting Python 2.7.
16477 (define-public python2-more-itertools
16478 (package
16479 (inherit python-more-itertools)
16480 (name "python2-more-itertools")
16481 (version "5.0.0")
16482 (source (origin
16483 (method url-fetch)
16484 (uri (pypi-uri "more-itertools" version))
16485 (sha256
16486 (base32
16487 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
16488 (arguments
16489 `(#:python ,python-2))
16490 (propagated-inputs
16491 `(("python2-six" ,python2-six-bootstrap)))))
16492
16493 (define-public python-latexcodec
16494 (package
16495 (name "python-latexcodec")
16496 (version "1.0.7")
16497 (source
16498 (origin
16499 (method url-fetch)
16500 (uri (pypi-uri "latexcodec" version))
16501 (sha256
16502 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
16503 (build-system python-build-system)
16504 (inputs
16505 `(("python-six" ,python-six)))
16506 (home-page "https://readthedocs.org/projects/latexcodec/")
16507 (synopsis "Work with LaTeX code in Python")
16508 (description "Lexer and codec to work with LaTeX code in Python.")
16509 (license license:expat)))
16510
16511 (define-public python-pybtex
16512 (package
16513 (name "python-pybtex")
16514 (version "0.22.2")
16515 (source
16516 (origin
16517 (method url-fetch)
16518 (uri (pypi-uri "pybtex" version))
16519 (sha256
16520 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
16521 (build-system python-build-system)
16522 (native-inputs
16523 `(("python-nose" ,python-nose)))
16524 (inputs
16525 `(("python-latexcodec" ,python-latexcodec)
16526 ("python-pyyaml" ,python-pyyaml)
16527 ("python-six" ,python-six)))
16528 (arguments
16529 `(#:test-target "nosetests"))
16530 (home-page "https://pybtex.org/")
16531 (synopsis "BibTeX-compatible bibliography processor")
16532 (description "Pybtex is a BibTeX-compatible bibliography processor written
16533 in Python. You can simply type pybtex instead of bibtex.")
16534 (license license:expat)))
16535
16536 (define-public python-onetimepass
16537 (package
16538 (name "python-onetimepass")
16539 (version "1.0.1")
16540 (source
16541 (origin
16542 (method url-fetch)
16543 (uri (pypi-uri "onetimepass" version))
16544 (sha256
16545 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
16546 (build-system python-build-system)
16547 (propagated-inputs `(("python-six" ,python-six)))
16548 (home-page "https://github.com/tadeck/onetimepass/")
16549 (synopsis "One-time password library")
16550 (description "Python one-time password library for HMAC-based (HOTP) and
16551 time-based (TOTP) passwords.")
16552 (license license:expat)))
16553
16554 (define-public python-parso
16555 (package
16556 (name "python-parso")
16557 (version "0.7.0")
16558 (source
16559 (origin
16560 (method url-fetch)
16561 (uri (pypi-uri "parso" version))
16562 (sha256
16563 (base32
16564 "0b7irps2dqmzq41sxbpvxbivhh1x2hwmbqp45bbpd82446p9z3lh"))))
16565 (native-inputs
16566 `(("python-pytest" ,python-pytest)))
16567 (build-system python-build-system)
16568 (arguments
16569 `(#:phases (modify-phases %standard-phases
16570 (replace 'check
16571 (lambda _ (invoke "pytest" "-vv"))))))
16572 (home-page "https://github.com/davidhalter/parso")
16573 (synopsis "Python Parser")
16574 (description "Parso is a Python parser that supports error recovery and
16575 round-trip parsing for different Python versions (in multiple Python versions).
16576 Parso is also able to list multiple syntax errors in your Python file.")
16577 (license license:expat)))
16578
16579 (define-public python2-parso
16580 (package-with-python2 python-parso))
16581
16582 (define-public python-async-generator
16583 (package
16584 (name "python-async-generator")
16585 (version "1.10")
16586 (source
16587 (origin
16588 (method url-fetch)
16589 (uri (pypi-uri "async_generator" version))
16590 (sha256
16591 (base32
16592 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
16593 (build-system python-build-system)
16594 (native-inputs
16595 `(("python-pytest" ,python-pytest)))
16596 (home-page "https://github.com/python-trio/async_generator")
16597 (synopsis "Async generators and context managers for Python 3.5+")
16598 (description "@code{async_generator} back-ports Python 3.6's native async
16599 generators and Python 3.7's context managers into Python 3.5.")
16600 ;; Dual licensed.
16601 (license (list license:expat license:asl2.0))))
16602
16603 (define-public python-async-timeout
16604 (package
16605 (name "python-async-timeout")
16606 (version "3.0.1")
16607 (source
16608 (origin
16609 (method url-fetch)
16610 (uri (pypi-uri "async-timeout" version))
16611 (sha256
16612 (base32
16613 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
16614 (build-system python-build-system)
16615 (home-page "https://github.com/aio-libs/async_timeout/")
16616 (synopsis "Timeout context manager for asyncio programs")
16617 (description "@code{async-timeout} provides a timeout timeout context
16618 manager compatible with @code{asyncio}.")
16619 (license license:asl2.0)))
16620
16621 (define-public python-glob2
16622 (package
16623 (name "python-glob2")
16624 (version "0.7")
16625 (source
16626 (origin
16627 (method git-fetch)
16628 (uri (git-reference
16629 (url "https://github.com/miracle2k/python-glob2.git")
16630 (commit (string-append "v" version))))
16631 (file-name (git-file-name name version))
16632 (sha256
16633 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
16634 (build-system python-build-system)
16635 (home-page "https://github.com/miracle2k/python-glob2/")
16636 (synopsis "Extended Version of the python buildin glob module")
16637 (description "This is an extended version of the Python
16638 @url{http://docs.python.org/library/glob.html, built-in glob module} which
16639 adds:
16640
16641 @itemize
16642 @item The ability to capture the text matched by glob patterns, and return
16643 those matches alongside the file names.
16644 @item A recursive @code{**} globbing syntax, akin for example to the
16645 @code{globstar} option of Bash.
16646 @item The ability to replace the file system functions used, in order to glob
16647 on virtual file systems.
16648 @item Compatible with Python 2 and Python 3 (tested with 3.3).
16649 @end itemize
16650
16651 Glob2 currently based on the glob code from Python 3.3.1.")
16652 (license license:bsd-2)))
16653
16654 (define-public python2-glob2
16655 (package-with-python2 python-glob2))
16656
16657 (define-public python-gipc
16658 (package
16659 (name "python-gipc")
16660 (version "0.6.0")
16661 (source
16662 (origin
16663 (method url-fetch)
16664 (uri (pypi-uri "gipc" version ".zip"))
16665 (sha256
16666 (base32
16667 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
16668 (build-system python-build-system)
16669 (native-inputs
16670 `(("unzip" ,unzip)))
16671 (propagated-inputs
16672 `(("python-gevent" ,python-gevent)))
16673 (home-page "https://gehrcke.de/gipc/")
16674 (synopsis "Child process management in the context of gevent")
16675 (description "Usage of Python's multiprocessing package in a
16676 gevent-powered application may raise problems. With @code{gipc},
16677 process-based child processes can safely be created anywhere within a
16678 gevent-powered application.")
16679 (license license:expat)))
16680
16681 (define-public python2-gipc
16682 (package-with-python2 python-gipc))
16683
16684 (define-public python-fusepy
16685 (package
16686 (name "python-fusepy")
16687 (version "2.0.4")
16688 (source
16689 (origin
16690 (method url-fetch)
16691 (uri (pypi-uri "fusepy" version))
16692 (sha256
16693 (base32
16694 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
16695 (build-system python-build-system)
16696 (arguments
16697 `(#:phases
16698 (modify-phases %standard-phases
16699 (add-before 'build 'set-library-file-name
16700 (lambda* (#:key inputs #:allow-other-keys)
16701 (let ((fuse (assoc-ref inputs "fuse")))
16702 (substitute* "fuse.py"
16703 (("find_library\\('fuse'\\)")
16704 (string-append "'" fuse "/lib/libfuse.so'")))
16705 #t))))))
16706 (propagated-inputs
16707 `(("fuse" ,fuse)))
16708 (home-page "https://github.com/fusepy/fusepy")
16709 (synopsis "Simple ctypes bindings for FUSE")
16710 (description "Python module that provides a simple interface to FUSE and
16711 MacFUSE. The binding is created using the standard @code{ctypes} library.")
16712 (license license:isc)))
16713
16714 (define-public python2-fusepy
16715 (package-with-python2 python-fusepy))
16716
16717 (define-public python-fusepyng
16718 (package
16719 (name "python-fusepyng")
16720 (version "1.0.7")
16721 (source
16722 (origin
16723 (method url-fetch)
16724 (uri (pypi-uri "fusepyng" version))
16725 (sha256
16726 (base32
16727 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
16728 (build-system python-build-system)
16729 (arguments
16730 '(#:phases
16731 (modify-phases %standard-phases
16732 (add-after 'unpack 'set-libfuse-path
16733 (lambda* (#:key inputs #:allow-other-keys)
16734 (let ((fuse (assoc-ref inputs "fuse")))
16735 (substitute* "fusepyng.py"
16736 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
16737 (string-append "\"" fuse "/lib/libfuse.so\""))))
16738 #t)))))
16739 (inputs
16740 `(("fuse" ,fuse)))
16741 (propagated-inputs
16742 `(("python-paramiko" ,python-paramiko)))
16743 (home-page "https://github.com/rianhunter/fusepyng")
16744 (synopsis "Simple ctypes bindings for FUSE")
16745 (description "@code{fusepyng} is a Python module that provides a simple
16746 interface to FUSE on various operating systems. It's just one file and is
16747 implemented using @code{ctypes}.")
16748 (license license:isc)))
16749
16750 (define-public python2-gdrivefs
16751 (package
16752 (name "python2-gdrivefs")
16753 (version "0.14.9")
16754 (source
16755 (origin
16756 (method url-fetch)
16757 (uri (pypi-uri "gdrivefs" version))
16758 (sha256
16759 (base32
16760 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
16761 (build-system python-build-system)
16762 (arguments
16763 `(#:python ,python-2
16764 #:phases
16765 (modify-phases %standard-phases
16766 (add-before 'build 'patch-setup-py
16767 (lambda _
16768 ;; Update requirements from dependency==version
16769 ;; to dependency>=version
16770 (substitute* "gdrivefs/resources/requirements.txt"
16771 (("==") ">="))
16772 #t)))))
16773 (native-inputs
16774 `(("python2-gipc" ,python2-gipc)
16775 ("python2-gevent" ,python2-gevent)
16776 ("python2-greenlet" ,python2-greenlet)
16777 ("python2-httplib2" ,python2-httplib2)
16778 ("python2-uritemplate" ,python2-uritemplate)
16779 ("python2-oauth2client" ,python2-oauth2client)
16780 ("python2-six" ,python2-six)))
16781 (propagated-inputs
16782 `(("python2-dateutil" ,python2-dateutil)
16783 ("python2-fusepy" ,python2-fusepy)
16784 ("python2-google-api-client" ,python2-google-api-client)))
16785 (home-page "https://github.com/dsoprea/GDriveFS")
16786 (synopsis "Mount Google Drive as a local file system")
16787 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
16788 under Python 2.7.")
16789 (license license:gpl2)))
16790
16791 (define-public python-userspacefs
16792 (package
16793 (name "python-userspacefs")
16794 (version "1.0.13")
16795 (source
16796 (origin
16797 (method url-fetch)
16798 (uri (pypi-uri "userspacefs" version))
16799 (sha256
16800 (base32
16801 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
16802 (build-system python-build-system)
16803 (propagated-inputs
16804 `(("python-fusepyng" ,python-fusepyng)))
16805 (home-page "https://github.com/rianhunter/userspacefs")
16806 (synopsis "User-space file systems for Python")
16807 (description
16808 "@code{userspacefs} is a library that allows you to easily write
16809 user-space file systems in Python.")
16810 (license license:gpl3+)))
16811
16812 (define-public pybind11
16813 (package
16814 (name "pybind11")
16815 (version "2.4.3")
16816 (source (origin
16817 (method git-fetch)
16818 (uri (git-reference
16819 (url "https://github.com/pybind/pybind11.git")
16820 (commit (string-append "v" version))))
16821 (sha256
16822 (base32
16823 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
16824 (file-name (git-file-name name version))))
16825 (build-system cmake-build-system)
16826 (native-inputs
16827 `(("python" ,python-wrapper)
16828
16829 ;; The following dependencies are used for tests.
16830 ("python-pytest" ,python-pytest)
16831 ("catch" ,catch-framework2-1)
16832 ("eigen" ,eigen)))
16833 (arguments
16834 `(#:configure-flags
16835 (list (string-append "-DCATCH_INCLUDE_DIR="
16836 (assoc-ref %build-inputs "catch")
16837 "/include/catch"))
16838
16839 #:phases (modify-phases %standard-phases
16840 (add-after 'install 'install-python
16841 (lambda* (#:key outputs #:allow-other-keys)
16842 (let ((out (assoc-ref outputs "out")))
16843 (with-directory-excursion "../source"
16844 (setenv "PYBIND11_USE_CMAKE" "yes")
16845 (invoke "python" "setup.py" "install"
16846 "--single-version-externally-managed"
16847 "--root=/"
16848 (string-append "--prefix=" out)))))))
16849
16850 #:test-target "check"))
16851 (home-page "https://github.com/pybind/pybind11/")
16852 (synopsis "Seamless operability between C++11 and Python")
16853 (description
16854 "@code{pybind11} is a lightweight header-only library that exposes C++
16855 types in Python and vice versa, mainly to create Python bindings of existing
16856 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
16857 library: to minimize boilerplate code in traditional extension modules by
16858 inferring type information using compile-time introspection.")
16859 (license license:bsd-3)))
16860
16861 (define-public python-fasteners
16862 (package
16863 (name "python-fasteners")
16864 (version "0.14.1")
16865 (source
16866 (origin
16867 (method url-fetch)
16868 (uri (pypi-uri "fasteners" version))
16869 (sha256
16870 (base32
16871 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16872 (build-system python-build-system)
16873 (propagated-inputs
16874 `(("python-monotonic" ,python-monotonic)
16875 ("python-six" ,python-six)
16876 ("python-testtools" ,python-testtools)))
16877 (home-page "https://github.com/harlowja/fasteners")
16878 (synopsis "Python package that provides useful locks")
16879 (description
16880 "This package provides a Python program that provides following locks:
16881
16882 @itemize
16883 @item Locking decorator
16884 @item Reader-writer locks
16885 @item Inter-process locks
16886 @item Generic helpers
16887 @end itemize\n")
16888 (properties `((python2-variant . ,(delay python2-fasteners))))
16889 (license license:asl2.0)))
16890
16891 (define-public python2-fasteners
16892 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16893 (package
16894 (inherit base)
16895 (propagated-inputs
16896 `(("python2-futures" ,python2-futures)
16897 ,@(package-propagated-inputs base))))))
16898
16899 (define-public python-requests-file
16900 (package
16901 (name "python-requests-file")
16902 (version "1.4.3")
16903 (source
16904 (origin
16905 (method url-fetch)
16906 (uri (pypi-uri "requests-file" version))
16907 (sha256
16908 (base32
16909 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16910 (build-system python-build-system)
16911 (propagated-inputs
16912 `(("python-requests" ,python-requests)
16913 ("python-six" ,python-six)))
16914 (home-page
16915 "https://github.com/dashea/requests-file")
16916 (synopsis "File transport adapter for Requests")
16917 (description
16918 "Requests-File is a transport adapter for use with the Requests Python
16919 library to allow local file system access via @code{file://} URLs.")
16920 (license license:asl2.0)))
16921
16922 (define-public python2-requests-file
16923 (package-with-python2 python-requests-file))
16924
16925 (define-public python-tldextract
16926 (package
16927 (name "python-tldextract")
16928 (version "2.2.0")
16929 (source
16930 (origin
16931 (method url-fetch)
16932 (uri (pypi-uri "tldextract" version))
16933 (sha256
16934 (base32
16935 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16936 (build-system python-build-system)
16937 (native-inputs
16938 `(("python-pytest" ,python-pytest)
16939 ("python-responses" ,python-responses)))
16940 (propagated-inputs
16941 `(("python-idna" ,python-idna)
16942 ("python-requests" ,python-requests)
16943 ("python-requests-file" ,python-requests-file)))
16944 (home-page
16945 "https://github.com/john-kurkowski/tldextract")
16946 (synopsis
16947 "Separate the TLD from the registered domain and subdomains of a URL")
16948 (description
16949 "TLDExtract accurately separates the TLD from the registered domain and
16950 subdomains of a URL, using the Public Suffix List. By default, this includes
16951 the public ICANN TLDs and their exceptions. It can optionally support the
16952 Public Suffix List's private domains as well.")
16953 (license license:bsd-3)))
16954
16955 (define-public python2-tldextract
16956 (package-with-python2 python-tldextract))
16957
16958 (define-public python-pynamecheap
16959 (package
16960 (name "python-pynamecheap")
16961 (version "0.0.3")
16962 (source
16963 (origin
16964 (method url-fetch)
16965 (uri (pypi-uri "PyNamecheap" version))
16966 (sha256
16967 (base32
16968 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16969 (build-system python-build-system)
16970 (propagated-inputs
16971 `(("python-requests" ,python-requests)))
16972 (home-page
16973 "https://github.com/Bemmu/PyNamecheap")
16974 (synopsis
16975 "Namecheap API client in Python")
16976 (description
16977 "PyNamecheap is a Namecheap API client in Python.")
16978 (license license:expat)))
16979
16980 (define-public python2-pynamecheap
16981 (package-with-python2 python-pynamecheap))
16982
16983 (define-public python-dns-lexicon
16984 (package
16985 (name "python-dns-lexicon")
16986 (version "2.4.0")
16987 (source
16988 (origin
16989 (method url-fetch)
16990 (uri (pypi-uri "dns-lexicon" version))
16991 (sha256
16992 (base32
16993 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16994 (build-system python-build-system)
16995 (arguments
16996 `(#:tests? #f)) ;requires internet access
16997 (propagated-inputs
16998 `(("python-future" ,python-future)
16999 ("python-pynamecheap" ,python-pynamecheap)
17000 ("python-requests" ,python-requests)
17001 ("python-tldextract" ,python-tldextract)
17002 ("python-urllib3" ,python-urllib3)))
17003 (home-page "https://github.com/AnalogJ/lexicon")
17004 (synopsis
17005 "Manipulate DNS records on various DNS providers")
17006 (description
17007 "Lexicon provides a way to manipulate DNS records on multiple DNS
17008 providers in a standardized way. It has a CLI but it can also be used as a
17009 Python library. It was designed to be used in automation, specifically with
17010 Let's Encrypt.")
17011 (license license:expat)))
17012
17013 (define-public python2-dns-lexicon
17014 (package-with-python2 python-dns-lexicon))
17015
17016 (define-public python-commandlines
17017 (package
17018 (name "python-commandlines")
17019 (version "0.4.1")
17020 (source
17021 (origin
17022 (method url-fetch)
17023 (uri (pypi-uri "commandlines" version))
17024 (sha256
17025 (base32
17026 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
17027 (build-system python-build-system)
17028 (home-page "https://github.com/chrissimpkins/commandlines")
17029 (synopsis "Command line argument to object parsing library")
17030 (description
17031 "@code{Commandlines} is a Python library for command line application
17032 development that supports command line argument parsing, command string
17033 validation testing and application logic.")
17034 (license license:expat)))
17035
17036 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
17037 ;; python-numba. They have a very unflexible relationship.
17038 (define-public python-numba
17039 (package
17040 (name "python-numba")
17041 (version "0.46.0")
17042 (source
17043 (origin
17044 (method url-fetch)
17045 (uri (pypi-uri "numba" version))
17046 (sha256
17047 (base32
17048 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
17049 (build-system python-build-system)
17050 (arguments
17051 `(#:modules ((guix build utils)
17052 (guix build python-build-system)
17053 (ice-9 ftw)
17054 (srfi srfi-1)
17055 (srfi srfi-26))
17056 #:phases
17057 (modify-phases %standard-phases
17058 (add-after 'unpack 'disable-proprietary-features
17059 (lambda _
17060 (setenv "NUMBA_DISABLE_HSA" "1")
17061 (setenv "NUMBA_DISABLE_CUDA" "1")
17062 #t))
17063 (add-after 'unpack 'remove-failing-tests
17064 (lambda _
17065 ;; FIXME: These tests fail for unknown reasons:
17066 ;; test_non_writable_pycache, test_non_creatable_pycache, and
17067 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
17068 (substitute* "numba/tests/test_dispatcher.py"
17069 (("def test(_non_writable_pycache)" _ m)
17070 (string-append "def guix_skip" m))
17071 (("def test(_non_creatable_pycache)" _ m)
17072 (string-append "def guix_skip" m))
17073 (("def test(_frozen)" _ m)
17074 (string-append "def guix_skip" m)))
17075
17076 ;; These tests fail because we don't run the tests from the build
17077 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
17078 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
17079 (substitute* "numba/tests/test_pycc.py"
17080 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
17081 (string-append "def guix_skip" m)))
17082
17083 ;; These tests fail because our version of Python does not have
17084 ;; a recognizable front-end for the Numba distribution to use
17085 ;; to check against.
17086 (substitute* "numba/tests/test_entrypoints.py"
17087 (("def test(_init_entrypoint)" _ m)
17088 (string-append "def guix_skip" m)))
17089 (substitute* "numba/tests/test_jitclasses.py"
17090 (("def test(_jitclass_longlabel_not_truncated)" _ m)
17091 (string-append "def guix_skip" m)))
17092 #t))
17093 (replace 'check
17094 (lambda _
17095 (let ((cwd (getcwd)))
17096 (setenv "PYTHONPATH"
17097 (string-append cwd "/build/"
17098 (find (cut string-prefix? "lib" <>)
17099 (scandir (string-append cwd "/build")))
17100 ":"
17101 (getenv "PYTHONPATH")))
17102 ;; Something is wrong with the PYTHONPATH when running the
17103 ;; tests from the build directory, as it complains about not being
17104 ;; able to import certain modules.
17105 (with-directory-excursion "/tmp"
17106 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
17107 #t)))))
17108 (propagated-inputs
17109 `(("python-llvmlite" ,python-llvmlite)
17110 ("python-numpy" ,python-numpy)
17111 ("python-singledispatch" ,python-singledispatch)))
17112 ;; Needed for tests.
17113 (inputs
17114 `(("python-jinja2" ,python-jinja2)
17115 ("python-pygments" ,python-pygments)))
17116 (home-page "https://numba.pydata.org")
17117 (synopsis "Compile Python code using LLVM")
17118 (description "Numba gives you the power to speed up your applications with
17119 high performance functions written directly in Python. With a few
17120 annotations, array-oriented and math-heavy Python code can be just-in-time
17121 compiled to native machine instructions, similar in performance to C, C++ and
17122 Fortran, without having to switch languages or Python interpreters.
17123
17124 Numba works by generating optimized machine code using the LLVM compiler
17125 infrastructure at import time, runtime, or statically (using the included pycc
17126 tool).")
17127 (license license:bsd-3)))
17128
17129 (define-public python-numcodecs
17130 (package
17131 (name "python-numcodecs")
17132 (version "0.6.4")
17133 (source
17134 (origin
17135 (method url-fetch)
17136 (uri (pypi-uri "numcodecs" version))
17137 (sha256
17138 (base32
17139 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
17140 (build-system python-build-system)
17141 (propagated-inputs
17142 `(("python-numpy" ,python-numpy)
17143 ("python-msgpack" ,python-msgpack)))
17144 (native-inputs
17145 `(("python-pytest" ,python-pytest)
17146 ("python-setuptools-scm" ,python-setuptools-scm)))
17147 (home-page "https://github.com/zarr-developers/numcodecs")
17148 (synopsis "Buffer compression and transformation codecs")
17149 (description
17150 "This Python package provides buffer compression and transformation
17151 codecs for use in data storage and communication applications.")
17152 (license license:expat)))
17153
17154 (define-public python-asciitree
17155 (package
17156 (name "python-asciitree")
17157 (version "0.3.3")
17158 (source
17159 (origin
17160 (method url-fetch)
17161 (uri (pypi-uri "asciitree" version))
17162 (sha256
17163 (base32
17164 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
17165 (build-system python-build-system)
17166 (home-page "https://github.com/mbr/asciitree")
17167 (synopsis "Draws ASCII trees")
17168 (description "This package draws tree structures using characters.")
17169 (license license:expat)))
17170
17171 (define-public python-zarr
17172 (package
17173 (name "python-zarr")
17174 (version "2.4.0")
17175 (source
17176 (origin
17177 (method url-fetch)
17178 (uri (pypi-uri "zarr" version))
17179 (sha256
17180 (base32
17181 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
17182 (build-system python-build-system)
17183 (arguments
17184 `(#:phases
17185 (modify-phases %standard-phases
17186 (add-after 'unpack 'disable-service-tests
17187 (lambda _
17188 (setenv "ZARR_TEST_ABS" "0")
17189 (setenv "ZARR_TEST_MONGO" "0")
17190 (setenv "ZARR_TEST_REDIS" "0")
17191 #t))
17192 (replace 'check
17193 (lambda _
17194 (invoke "pytest" "-vv" "-k" "not lmdb")
17195 #t)))))
17196 (propagated-inputs
17197 `(("python-asciitree" ,python-asciitree)
17198 ("python-fasteners" ,python-fasteners)
17199 ("python-numcodecs" ,python-numcodecs)
17200 ("python-numpy" ,python-numpy)))
17201 (native-inputs
17202 `(("python-pytest" ,python-pytest)
17203 ("python-setuptools-scm" ,python-setuptools-scm)))
17204 (home-page "https://github.com/zarr-developers/zarr-python")
17205 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
17206 (description
17207 "This package provides an implementation of chunked, compressed,
17208 N-dimensional arrays for Python.")
17209 (license license:expat)))
17210
17211 (define-public python-anndata
17212 (package
17213 (name "python-anndata")
17214 (version "0.7.1")
17215 (source
17216 (origin
17217 (method url-fetch)
17218 (uri (pypi-uri "anndata" version))
17219 (sha256
17220 (base32
17221 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
17222 (build-system python-build-system)
17223 (arguments
17224 `(#:phases
17225 (modify-phases %standard-phases
17226 (add-after 'unpack 'delete-inconvenient-tests
17227 (lambda _
17228 ;; This test depends on python-scikit-learn.
17229 (delete-file "anndata/tests/test_inplace_subset.py")
17230 #t))
17231 (delete 'check)
17232 (add-after 'install 'check
17233 (lambda* (#:key inputs outputs #:allow-other-keys)
17234 (add-installed-pythonpath inputs outputs)
17235 (invoke "pytest" "-vv"))))))
17236 (propagated-inputs
17237 `(("python-h5py" ,python-h5py)
17238 ("python-importlib-metadata" ,python-importlib-metadata)
17239 ("python-natsort" ,python-natsort)
17240 ("python-numcodecs" ,python-numcodecs)
17241 ("python-packaging" ,python-packaging)
17242 ("python-pandas" ,python-pandas)
17243 ("python-scipy" ,python-scipy)
17244 ("python-zarr" ,python-zarr)))
17245 (native-inputs
17246 `(("python-joblib" ,python-joblib)
17247 ("python-pytest" ,python-pytest)
17248 ("python-setuptools-scm" ,python-setuptools-scm)))
17249 (home-page "https://github.com/theislab/anndata")
17250 (synopsis "Annotated data for data analysis pipelines")
17251 (description "Anndata is a package for simple (functional) high-level APIs
17252 for data analysis pipelines. In this context, it provides an efficient,
17253 scalable way of keeping track of data together with learned annotations and
17254 reduces the code overhead typically encountered when using a mostly
17255 object-oriented library such as @code{scikit-learn}.")
17256 (license license:bsd-3)))
17257
17258 (define-public python-dill
17259 (package
17260 (name "python-dill")
17261 (version "0.3.1.1")
17262 (source
17263 (origin
17264 (method url-fetch)
17265 (uri (pypi-uri "dill" version))
17266 (sha256
17267 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
17268 (build-system python-build-system)
17269 (arguments
17270 `(#:phases
17271 (modify-phases %standard-phases
17272 (replace 'check
17273 (lambda _
17274 (with-directory-excursion "/tmp"
17275 (invoke "nosetests" "-v"))
17276 #t)))))
17277 (native-inputs
17278 `(("python-nose" ,python-nose)))
17279 (home-page "https://pypi.org/project/dill/")
17280 (synopsis "Serialize all of Python")
17281 (description "Dill extends Python's @code{pickle} module for serializing
17282 and de-serializing Python objects to the majority of the built-in Python
17283 types. Dill provides the user the same interface as the @code{pickle} module,
17284 and also includes some additional features. In addition to pickling Python
17285 objects, @code{dill} provides the ability to save the state of an interpreter
17286 session in a single command. Hence, it would be feasible to save a
17287 interpreter session, close the interpreter, ship the pickled file to another
17288 computer, open a new interpreter, unpickle the session and thus continue from
17289 the saved state of the original interpreter session.")
17290 (license license:bsd-3)))
17291
17292 (define-public python-multiprocess
17293 (package
17294 (name "python-multiprocess")
17295 (version "0.70.9")
17296 (source
17297 (origin
17298 (method url-fetch)
17299 (uri (pypi-uri "multiprocess" version))
17300 (sha256
17301 (base32
17302 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
17303 (build-system python-build-system)
17304 (arguments
17305 `(#:phases
17306 (modify-phases %standard-phases
17307 (add-after 'unpack 'disable-broken-tests
17308 (lambda _
17309 ;; This test is broken as there is no keyboard interrupt.
17310 (substitute* "py3.7/multiprocess/tests/__init__.py"
17311 (("^(.*)def test_wait_result"
17312 line indent)
17313 (string-append indent
17314 "@unittest.skip(\"Disabled by Guix\")\n"
17315 line)))
17316 #t))
17317 ;; Tests must be run after installation.
17318 (delete 'check)
17319 (add-after 'install 'check
17320 (lambda* (#:key inputs outputs #:allow-other-keys)
17321 (add-installed-pythonpath inputs outputs)
17322 (invoke "python" "-m" "multiprocess.tests")
17323 #t)))))
17324 (propagated-inputs
17325 `(("python-dill" ,python-dill)))
17326 (home-page "https://pypi.org/project/multiprocess/")
17327 (synopsis "Multiprocessing and multithreading in Python")
17328 (description
17329 "This package is a fork of the multiprocessing Python package, a package
17330 which supports the spawning of processes using the API of the standard
17331 library's @code{threading} module.")
17332 (license license:bsd-3)))
17333
17334 (define-public python-toolz
17335 (package
17336 (name "python-toolz")
17337 (version "0.9.0")
17338 (source
17339 (origin
17340 (method url-fetch)
17341 (uri (pypi-uri "toolz" version))
17342 (sha256
17343 (base32
17344 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
17345 (build-system python-build-system)
17346 ;; FIXME: tests cannot be computed: "Can't perform this operation for
17347 ;; unregistered loader type"
17348 (arguments '(#:tests? #f))
17349 (home-page "https://github.com/pytoolz/toolz/")
17350 (synopsis "List processing tools and functional utilities")
17351 (description
17352 "This package provides a set of utility functions for iterators,
17353 functions, and dictionaries.")
17354 (license license:bsd-3)))
17355
17356 (define-public python2-toolz
17357 (package-with-python2 python-toolz))
17358
17359 (define-public python-cytoolz
17360 (package
17361 (name "python-cytoolz")
17362 (version "0.9.0.1")
17363 (source
17364 (origin
17365 (method url-fetch)
17366 (uri (pypi-uri "cytoolz" version))
17367 (sha256
17368 (base32
17369 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
17370 (build-system python-build-system)
17371 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
17372 ;; 'exceptions'"
17373 (arguments '(#:tests? #f))
17374 (propagated-inputs
17375 `(("python-toolz" ,python-toolz)))
17376 (native-inputs
17377 `(("python-cython" ,python-cython)))
17378 (home-page "https://github.com/pytoolz/cytoolz")
17379 (synopsis "High performance functional utilities")
17380 (description
17381 "The cytoolz package implements the same API as provided by toolz. The
17382 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
17383 that is accessible to other projects developed in Cython.")
17384 (license license:bsd-3)))
17385
17386 (define-public python-sortedcontainers
17387 (package
17388 (name "python-sortedcontainers")
17389 (version "2.1.0")
17390 (source
17391 (origin
17392 (method url-fetch)
17393 (uri (pypi-uri "sortedcontainers" version))
17394 (sha256
17395 (base32
17396 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
17397 (build-system python-build-system)
17398 (arguments
17399 ;; FIXME: Tests require many extra dependencies, and would introduce
17400 ;; a circular dependency on hypothesis, which uses this package.
17401 '(#:tests? #f))
17402 (propagated-inputs
17403 `(("python-appdirs" ,python-appdirs)
17404 ("python-distlib" ,python-distlib)
17405 ("python-filelock" ,python-filelock)
17406 ("python-six" ,python-six-bootstrap)))
17407 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
17408 (synopsis "Sorted List, Sorted Dict, Sorted Set")
17409 (description
17410 "This package provides a sorted collections library, written in
17411 pure-Python.")
17412 (license license:asl2.0)))
17413
17414 (define-public python2-sortedcontainers
17415 (package-with-python2 python-sortedcontainers))
17416
17417 (define-public python-cloudpickle
17418 (package
17419 (name "python-cloudpickle")
17420 (version "1.3.0")
17421 (source
17422 (origin
17423 (method url-fetch)
17424 (uri (pypi-uri "cloudpickle" version))
17425 (sha256
17426 (base32
17427 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
17428 (build-system python-build-system)
17429 (arguments
17430 '(#:phases (modify-phases %standard-phases
17431 (add-before 'check 'do-not-override-PYTHONPATH
17432 (lambda _
17433 ;; Append to PYTHONPATH instead of overriding it so
17434 ;; that dependencies from Guix can be found.
17435 (substitute* "tests/testutils.py"
17436 (("env\\['PYTHONPATH'\\] = pythonpath")
17437 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
17438 #t))
17439 (replace 'check
17440 (lambda* (#:key tests? #:allow-other-keys)
17441 (if tests?
17442 (invoke "pytest" "-s" "-vv")
17443 (format #t "test suite not run~%"))
17444 #t)))))
17445 (native-inputs
17446 `(;; For tests.
17447 ("python-psutil" ,python-psutil)
17448 ("python-pytest" ,python-pytest)
17449 ("python-tornado" ,python-tornado)))
17450 (home-page "https://github.com/cloudpipe/cloudpickle")
17451 (synopsis "Extended pickling support for Python objects")
17452 (description
17453 "Cloudpickle makes it possible to serialize Python constructs not
17454 supported by the default pickle module from the Python standard library. It
17455 is especially useful for cluster computing where Python expressions are
17456 shipped over the network to execute on remote hosts, possibly close to the
17457 data.")
17458 (properties `((python2-variant . ,(delay python2-cloudpickle))))
17459 (license license:bsd-3)))
17460
17461 (define-public python2-cloudpickle
17462 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
17463 (package
17464 (inherit base)
17465 (native-inputs
17466 `(("python-mock" ,python2-mock)
17467 ,@(package-native-inputs base)))
17468 (propagated-inputs
17469 `(("python-futures" ,python2-futures)
17470 ,@(package-propagated-inputs base))))))
17471
17472 (define-public python-locket
17473 (package
17474 (name "python-locket")
17475 (version "0.2.0")
17476 (source
17477 (origin
17478 (method url-fetch)
17479 (uri (pypi-uri "locket" version))
17480 (sha256
17481 (base32
17482 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
17483 (build-system python-build-system)
17484 (home-page "https://github.com/mwilliamson/locket.py")
17485 (synopsis "File-based locks for Python")
17486 (description
17487 "Locket implements a lock that can be used by multiple processes provided
17488 they use the same path.")
17489 (license license:bsd-2)))
17490
17491 (define-public python2-locket
17492 (package-with-python2 python-locket))
17493
17494 (define-public python-blosc
17495 (package
17496 (name "python-blosc")
17497 (version "1.5.1")
17498 (source
17499 (origin
17500 (method url-fetch)
17501 (uri (pypi-uri "blosc" version))
17502 (sha256
17503 (base32
17504 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
17505 (build-system python-build-system)
17506 ;; FIXME: all tests pass, but then this error is printed:
17507 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
17508 (arguments '(#:tests? #f))
17509 (propagated-inputs
17510 `(("python-numpy" ,python-numpy)))
17511 (home-page "https://github.com/blosc/python-blosc")
17512 (synopsis "Python wrapper for the Blosc data compressor library")
17513 (description "Blosc is a high performance compressor optimized for binary
17514 data. It has been designed to transmit data to the processor cache faster
17515 than the traditional, non-compressed, direct memory fetch approach via a
17516 @code{memcpy()} system call.
17517
17518 Blosc works well for compressing numerical arrays that contains data with
17519 relatively low entropy, like sparse data, time series, grids with
17520 regular-spaced values, etc.
17521
17522 This Python package wraps the Blosc library.")
17523 (license license:bsd-3)))
17524
17525 (define-public python2-blosc
17526 (package-with-python2 python-blosc))
17527
17528 (define-public python-partd
17529 (package
17530 (name "python-partd")
17531 (version "0.3.9")
17532 (source
17533 (origin
17534 (method url-fetch)
17535 (uri (pypi-uri "partd" version))
17536 (sha256
17537 (base32
17538 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
17539 (build-system python-build-system)
17540 (propagated-inputs
17541 `(("python-blosc" ,python-blosc)
17542 ("python-locket" ,python-locket)
17543 ("python-numpy" ,python-numpy)
17544 ("python-pandas" ,python-pandas)
17545 ("python-pyzmq" ,python-pyzmq)
17546 ("python-toolz" ,python-toolz)))
17547 (home-page "https://github.com/dask/partd/")
17548 (synopsis "Appendable key-value storage")
17549 (description "Partd stores key-value pairs. Values are raw bytes. We
17550 append on old values. Partd excels at shuffling operations.")
17551 (license license:bsd-3)))
17552
17553 (define-public python2-partd
17554 (package-with-python2 python-partd))
17555
17556 (define-public python-fsspec
17557 (package
17558 (name "python-fsspec")
17559 (version "0.6.1")
17560 (source
17561 (origin
17562 (method url-fetch)
17563 (uri (pypi-uri "fsspec" version))
17564 (sha256
17565 (base32
17566 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
17567 (build-system python-build-system)
17568 (arguments '(#:tests? #f)) ; there are none
17569 (home-page "https://github.com/intake/filesystem_spec")
17570 (synopsis "File-system specification")
17571 (description "The purpose of this package is to produce a template or
17572 specification for a file-system interface, that specific implementations
17573 should follow, so that applications making use of them can rely on a common
17574 behavior and not have to worry about the specific internal implementation
17575 decisions with any given backend.")
17576 (license license:bsd-3)))
17577
17578 (define-public python-dask
17579 (package
17580 (name "python-dask")
17581 (version "2.14.0")
17582 (source
17583 (origin
17584 (method url-fetch)
17585 (uri (pypi-uri "dask" version))
17586 (sha256
17587 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
17588 (build-system python-build-system)
17589 (arguments
17590 `(#:phases
17591 (modify-phases %standard-phases
17592 (add-after 'unpack 'disable-broken-tests
17593 (lambda _
17594 ;; This test is marked as xfail when pytest-xdist is used.
17595 (substitute* "dask/tests/test_threaded.py"
17596 (("def test_interrupt\\(\\)" m)
17597 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
17598 m)))
17599 ;; This one fails with a type error:
17600 ;; TypeError: Already tz-aware, use tz_convert to convert.
17601 (substitute* "dask/dataframe/tests/test_shuffle.py"
17602 (("def test_set_index_timestamp\\(\\)" m)
17603 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
17604 m)))
17605 #t))
17606 (replace 'check
17607 (lambda _ (invoke "pytest" "-vv"))))))
17608 (propagated-inputs
17609 `(("python-cloudpickle" ,python-cloudpickle)
17610 ("python-fsspec" ,python-fsspec)
17611 ("python-numpy" ,python-numpy)
17612 ("python-packaging" ,python-packaging)
17613 ("python-pandas" ,python-pandas)
17614 ("python-partd" ,python-partd)
17615 ("python-toolz" ,python-toolz)
17616 ("python-pyyaml" ,python-pyyaml)))
17617 (native-inputs
17618 `(("python-pytest" ,python-pytest)
17619 ("python-pytest-runner" ,python-pytest-runner)))
17620 (home-page "https://github.com/dask/dask/")
17621 (synopsis "Parallel computing with task scheduling")
17622 (description
17623 "Dask is a flexible parallel computing library for analytics. It
17624 consists of two components: dynamic task scheduling optimized for computation,
17625 and large data collections like parallel arrays, dataframes, and lists that
17626 extend common interfaces like NumPy, Pandas, or Python iterators to
17627 larger-than-memory or distributed environments. These parallel collections
17628 run on top of the dynamic task schedulers. ")
17629 (license license:bsd-3)))
17630
17631 (define-public python-ilinkedlist
17632 (package
17633 (name "python-ilinkedlist")
17634 (version "0.4.0")
17635 (source
17636 (origin
17637 (method url-fetch)
17638 (uri (pypi-uri "ilinkedlist" version))
17639 (sha256
17640 (base32
17641 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
17642 (build-system python-build-system)
17643 (native-inputs `(("python-pytest" ,python-pytest)))
17644 (inputs `(("python" ,python)))
17645 (home-page "https://github.com/luther9/ilinkedlist-py")
17646 (synopsis "Immutable linked list library")
17647 (description
17648 "This is a implementation of immutable linked lists for Python. It
17649 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
17650 Since a linked list is treated as immutable, it is hashable, and its length
17651 can be retrieved in constant time. Some of the terminology is inspired by
17652 LISP. It is possible to create an improper list by creating a @code{Pair}
17653 with a non-list @code{cdr}.")
17654 (license license:gpl3+)))
17655
17656 (define-public python-readlike
17657 (package
17658 (name "python-readlike")
17659 (version "0.1.3")
17660 (source
17661 (origin
17662 (method url-fetch)
17663 (uri (pypi-uri "readlike" version))
17664 (sha256
17665 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
17666 (build-system python-build-system)
17667 (home-page "https://github.com/jangler/readlike")
17668 (synopsis "GNU Readline-like line editing module")
17669 (description
17670 "This Python module provides line editing functions similar to the default
17671 Emacs-style ones of GNU Readline. Unlike the Python standard library's
17672 @code{readline} package, this one allows access to those capabilties in settings
17673 outside of a standard command-line interface. It is especially well-suited to
17674 interfacing with Urwid, due to a shared syntax for describing key inputs.
17675
17676 Currently, all stateless Readline commands are implemented. Yanking and history
17677 are not supported.")
17678 (license license:expat)))
17679
17680 (define-public python2-readlike
17681 (package-with-python2 python-readlike))
17682
17683 (define-public python-reparser
17684 (package
17685 (name "python-reparser")
17686 (version "1.4.3")
17687 (source
17688 (origin
17689 (method url-fetch)
17690 (uri (pypi-uri "ReParser" version))
17691 (sha256
17692 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
17693 (build-system python-build-system)
17694 (home-page "https://github.com/xmikos/reparser")
17695 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
17696 (description
17697 "This Python library provides a simple lexer/parser for inline markup based
17698 on regular expressions.")
17699 (license license:expat)))
17700
17701 (define-public python2-reparser
17702 (let ((reparser (package-with-python2
17703 (strip-python2-variant python-reparser))))
17704 (package (inherit reparser)
17705 (propagated-inputs
17706 `(("python2-enum34" ,python2-enum34)
17707 ,@(package-propagated-inputs reparser))))))
17708
17709 (define-public python-precis-i18n
17710 (package
17711 (name "python-precis-i18n")
17712 (version "1.0.0")
17713 (source
17714 (origin
17715 (method url-fetch)
17716 (uri (pypi-uri "precis_i18n" version))
17717 (sha256
17718 (base32
17719 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
17720 (build-system python-build-system)
17721 (home-page "https://github.com/byllyfish/precis_i18n")
17722 (synopsis "Implementation of the PRECIS framework")
17723 (description
17724 "This module implements the PRECIS Framework as described in RFC 8264,
17725 RFC 8265 and RFC 8266.")
17726 (license license:expat)))
17727
17728 (define-public python-absl-py
17729 (package
17730 (name "python-absl-py")
17731 (version "0.6.1")
17732 (source
17733 (origin
17734 (method url-fetch)
17735 (uri (pypi-uri "absl-py" version))
17736 (sha256
17737 (base32
17738 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
17739 (build-system python-build-system)
17740 (propagated-inputs
17741 `(("python-six" ,python-six)))
17742 (home-page "https://github.com/abseil/abseil-py")
17743 (synopsis "Abseil Python common libraries")
17744 (description
17745 "This package provides the Abseil Python Common Libraries, a collection
17746 of Python libraries for building Python applications.")
17747 (license license:asl2.0)))
17748
17749 (define-public python-astor
17750 (package
17751 (name "python-astor")
17752 (version "0.7.1")
17753 (source
17754 (origin
17755 (method url-fetch)
17756 (uri (pypi-uri "astor" version))
17757 (sha256
17758 (base32
17759 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
17760 (build-system python-build-system)
17761 ;; FIXME: There are two errors and two test failures.
17762 (arguments `(#:tests? #f))
17763 (home-page "https://github.com/berkerpeksag/astor")
17764 (synopsis "Read and write Python ASTs")
17765 (description "Astor is designed to allow easy manipulation of Python
17766 source via the Abstract Syntax Tree.")
17767 (license license:bsd-3)))
17768
17769 (define-public python2-astor
17770 (package-with-python2 python-astor))
17771
17772 (define-public python-astunparse
17773 (package
17774 (name "python-astunparse")
17775 (version "1.6.2")
17776 (source
17777 (origin
17778 (method url-fetch)
17779 (uri (pypi-uri "astunparse" version))
17780 (sha256
17781 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
17782 (build-system python-build-system)
17783 (arguments '(#:tests? #f)) ; there are none
17784 (propagated-inputs
17785 `(("python-six" ,python-six)
17786 ("python-wheel" ,python-wheel)))
17787 (home-page "https://github.com/simonpercivall/astunparse")
17788 (synopsis "AST unparser for Python")
17789 (description "This package provides an AST unparser for Python. It is a
17790 factored out version of @code{unparse} found in the Python source
17791 distribution.")
17792 (license license:bsd-3)))
17793
17794 (define-public python-gast
17795 (package
17796 (name "python-gast")
17797 (version "0.3.3")
17798 (source
17799 (origin
17800 (method url-fetch)
17801 (uri (pypi-uri "gast" version))
17802 (sha256
17803 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
17804 (build-system python-build-system)
17805 (propagated-inputs
17806 `(("python-astunparse" ,python-astunparse)))
17807 (home-page "https://pypi.org/project/gast/")
17808 (synopsis "Generic Python AST that abstracts the underlying Python version")
17809 (description
17810 "GAST provides a compatibility layer between the AST of various Python
17811 versions, as produced by @code{ast.parse} from the standard @code{ast}
17812 module.")
17813 (license license:bsd-3)))
17814
17815 (define-public python-wikidata
17816 (package
17817 (name "python-wikidata")
17818 (version "0.6.1")
17819 (source
17820 (origin
17821 (method url-fetch)
17822 (uri (pypi-uri "Wikidata" version))
17823 (sha256
17824 (base32
17825 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
17826 (build-system python-build-system)
17827 (propagated-inputs
17828 `(("python-babel" ,python-babel)))
17829 (home-page "https://github.com/dahlia/wikidata")
17830 (synopsis "Wikidata client library")
17831 (description
17832 "This package provides a Python interface to
17833 @url{https://www.wikidata.org/, Wikidata}.")
17834 (properties '((upstream-name . "Wikidata")))
17835 (license license:gpl3+)))
17836
17837 (define-public python-doctest-ignore-unicode
17838 (package
17839 (name "python-doctest-ignore-unicode")
17840 (version "0.1.2")
17841 (source
17842 (origin
17843 (method url-fetch)
17844 (uri (pypi-uri "doctest-ignore-unicode" version))
17845 (sha256
17846 (base32
17847 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
17848 (build-system python-build-system)
17849 (native-inputs
17850 `(("python-nose" ,python-nose)))
17851 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
17852 (synopsis "Ignore Unicode literal prefixes in doctests")
17853 (description
17854 "This package adds support for a flag to ignore Unicode literal prefixes
17855 in doctests.")
17856 (license license:asl2.0)))
17857
17858 (define-public python-attr
17859 (package
17860 (name "python-attr")
17861 (version "0.3.1")
17862 (source
17863 (origin
17864 (method url-fetch)
17865 (uri (pypi-uri "attr" version))
17866 (sha256
17867 (base32
17868 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
17869 (build-system python-build-system)
17870 (home-page "https://github.com/denis-ryzhkov/attr")
17871 (synopsis "Decorator for attributes of target function or class")
17872 (description "Simple decorator to set attributes of target function or
17873 class in a @acronym{DRY, Don't Repeat Yourself} way.")
17874 (license license:expat)))
17875
17876 (define-public python-construct
17877 (package
17878 (name "python-construct")
17879 (version "2.10.56")
17880 (source
17881 (origin
17882 (method url-fetch)
17883 (uri (pypi-uri "construct" version))
17884 (sha256
17885 (base32
17886 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
17887 (build-system python-build-system)
17888 (arguments
17889 `(#:tests? #f)) ; No tests exist.
17890 (propagated-inputs
17891 `(("python-extras" ,python-extras)
17892 ("python-arrow" ,python-arrow)
17893 ("python-numpy" ,python-numpy)
17894 ("python-ruamel.yaml" ,python-ruamel.yaml)))
17895 (home-page "https://construct.readthedocs.io")
17896 (synopsis "Declarative and symmetrical parser and builder for binary data")
17897 (description
17898 "This package provides both simple, atomic constructs (such as
17899 integers of various sizes), as well as composite ones which allow you
17900 form hierarchical and sequential structures of increasing complexity.
17901 It features bit and byte granularity, easy debugging and testing, an
17902 easy-to-extend subclass system, and lots of primitive constructs to
17903 make your work easier.")
17904 (license license:expat)))
17905
17906 (define-public python-humanize
17907 (package
17908 (name "python-humanize")
17909 (version "0.5.1")
17910 (source
17911 (origin
17912 (method url-fetch)
17913 (uri (pypi-uri "humanize" version))
17914 (sha256
17915 (base32
17916 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17917 (arguments
17918 '(#:tests? #f)) ; tests not in pypi archive
17919 (build-system python-build-system)
17920 (home-page "https://github.com/jmoiron/humanize")
17921 (synopsis "Print numerical information in a human-readable form")
17922 (description "This package provides a Python module that displays numbers
17923 and dates in \"human readable\" forms. For example, it would display
17924 \"12345591313\" as \"12.3 billion\".")
17925 (license license:expat)))
17926
17927 (define-public python-txaio
17928 (package
17929 (name "python-txaio")
17930 (version "18.8.1")
17931 (source
17932 (origin
17933 (method url-fetch)
17934 (uri (pypi-uri "txaio" version))
17935 (sha256
17936 (base32
17937 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17938 (build-system python-build-system)
17939 (propagated-inputs
17940 `(("python-twisted" ,python-twisted)
17941 ("python-six" ,python-six)))
17942 (home-page "https://github.com/crossbario/txaio")
17943 (synopsis "Compatibility layer between Python asyncio and Twisted")
17944 (description "Txaio provides a compatibility layer between the Python
17945 @code{asyncio} module and @code{Twisted}.")
17946 (license license:expat)))
17947
17948 (define-public python-toolshed
17949 (package
17950 (name "python-toolshed")
17951 (version "0.4.6")
17952 (source
17953 (origin
17954 (method url-fetch)
17955 (uri (pypi-uri "toolshed" version))
17956 (sha256
17957 (base32
17958 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17959 (build-system python-build-system)
17960 (native-inputs
17961 `(("python-nose" ,python-nose)))
17962 (home-page "https://github.com/brentp/toolshed/")
17963 (synopsis "Collection of modules and functions for working with data")
17964 (description "This is a collection of well-tested, simple modules and
17965 functions that aim to reduce boilerplate when working with data.")
17966 (license license:bsd-2)))
17967
17968 (define-public python-annoy
17969 (package
17970 (name "python-annoy")
17971 (version "1.15.1")
17972 (source
17973 (origin
17974 (method url-fetch)
17975 (uri (pypi-uri "annoy" version))
17976 (sha256
17977 (base32
17978 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17979 (build-system python-build-system)
17980 (native-inputs
17981 `(("python-nose" ,python-nose)))
17982 (home-page "https://github.com/spotify/annoy/")
17983 (synopsis "Approximate nearest neighbors library")
17984 (description
17985 "Annoy is a C++ library with Python bindings to search for points in
17986 space that are close to a given query point. It also creates large read-only
17987 file-based data structures that are @code{mmap}ped into memory so that many
17988 processes may share the same data.")
17989 (license license:asl2.0)))
17990
17991 (define-public python-pylzma
17992 (package
17993 (name "python-pylzma")
17994 (version "0.5.0")
17995 (source
17996 (origin
17997 (method url-fetch)
17998 (uri (pypi-uri "pylzma" version))
17999 (sha256
18000 (base32
18001 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
18002 (build-system python-build-system)
18003 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
18004 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
18005 (description "This package provides Python bindings for the LZMA library
18006 by Igor Pavlov.")
18007 (license license:lgpl2.1+)))
18008
18009 (define-public python2-pylzma
18010 (package-with-python2 python-pylzma))
18011
18012 (define-public python2-zeroconf
18013 (package
18014 (name "python2-zeroconf")
18015
18016 ;; This is the last version that supports Python 2.x.
18017 (version "0.19.1")
18018 (source
18019 (origin
18020 (method url-fetch)
18021 (uri (pypi-uri "zeroconf" version))
18022 (sha256
18023 (base32
18024 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
18025 (build-system python-build-system)
18026 (arguments
18027 `(#:python ,python-2
18028 #:phases
18029 (modify-phases %standard-phases
18030 (add-after 'unpack 'patch-requires
18031 (lambda* (#:key inputs #:allow-other-keys)
18032 (substitute* "setup.py"
18033 (("enum-compat")
18034 "enum34"))
18035 #t)))))
18036 (native-inputs
18037 `(("python2-six" ,python2-six)
18038 ("python2-enum32" ,python2-enum34)
18039 ("python2-netifaces" ,python2-netifaces)
18040 ("python2-typing" ,python2-typing)))
18041 (home-page "https://github.com/jstasiak/python-zeroconf")
18042 (synopsis "Pure Python mDNS service discovery")
18043 (description
18044 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
18045 compatible).")
18046 (license license:lgpl2.1+)))
18047
18048 (define-public python-bsddb3
18049 (package
18050 (name "python-bsddb3")
18051 (version "6.2.6")
18052 (source
18053 (origin
18054 (method url-fetch)
18055 (uri (pypi-uri "bsddb3" version))
18056 (sha256
18057 (base32
18058 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
18059 (build-system python-build-system)
18060 (inputs
18061 `(("bdb" ,bdb)))
18062 (arguments
18063 '(#:phases
18064 (modify-phases %standard-phases
18065 (add-after 'unpack 'configure-locations
18066 (lambda* (#:key inputs #:allow-other-keys)
18067 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
18068 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
18069 #t))
18070 (replace 'check
18071 (lambda _
18072 (invoke "python3" "test3.py" "-v"))))))
18073 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
18074 (synopsis "Python bindings for Oracle Berkeley DB")
18075 (description
18076 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
18077 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
18078 Transaction objects, and each of these is exposed as a Python type in the
18079 bsddb3.db module. The database objects can use various access methods: btree,
18080 hash, recno, and queue. Complete support of Berkeley DB distributed
18081 transactions. Complete support for Berkeley DB Replication Manager.
18082 Complete support for Berkeley DB Base Replication. Support for RPC.")
18083 (license license:bsd-3)))
18084
18085 (define-public python-dbfread
18086 (package
18087 (name "python-dbfread")
18088 (version "2.0.7")
18089 (source (origin
18090 (method url-fetch)
18091 (uri (pypi-uri "dbfread" version))
18092 (sha256
18093 (base32
18094 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
18095 (build-system python-build-system)
18096 (native-inputs
18097 `(("python-pytest" ,python-pytest)))
18098 (home-page "https://dbfread.readthedocs.io")
18099 (synopsis "Read DBF Files with Python")
18100 (description
18101 "This library reads DBF files and returns the data as native Python data
18102 types for further processing. It is primarily intended for batch jobs and
18103 one-off scripts.")
18104 (license license:expat)))
18105
18106 (define-public python-cached-property
18107 (package
18108 (name "python-cached-property")
18109 (version "1.5.1")
18110 (source
18111 (origin
18112 (method url-fetch)
18113 (uri (pypi-uri "cached-property" version))
18114 (sha256
18115 (base32
18116 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
18117 (build-system python-build-system)
18118 (arguments
18119 `(#:phases
18120 (modify-phases %standard-phases
18121 ;; https://github.com/pydanny/cached-property/issues/131
18122 ;; recent versions of freezegun break one test
18123 (add-after 'unpack 'disable-broken-test
18124 (lambda _
18125 (substitute* "tests/test_cached_property.py"
18126 (("def test_threads_ttl_expiry\\(self\\)" m)
18127 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
18128 " " m)))
18129 #t)))))
18130 (native-inputs
18131 `(("python-freezegun" ,python-freezegun)))
18132 (home-page
18133 "https://github.com/pydanny/cached-property")
18134 (synopsis
18135 "Decorator for caching properties in classes")
18136 (description
18137 "This package provides a decorator which makes caching
18138 time-or-computationally-expensive properties quick and easy and works in Python
18139 2 or 3.")
18140 (license license:bsd-3)))
18141
18142 (define-public python-folium
18143 (package
18144 (name "python-folium")
18145 (version "0.10.1")
18146 (source
18147 (origin
18148 (method url-fetch)
18149 (uri (pypi-uri "folium" version))
18150 (sha256
18151 (base32
18152 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
18153 (build-system python-build-system)
18154 (propagated-inputs
18155 `(("python-branca" ,python-branca)
18156 ("python-jinja2" ,python-jinja2)
18157 ("python-numpy" ,python-numpy)
18158 ("python-requests" ,python-requests)))
18159 (native-inputs
18160 `(("python-pytest" ,python-pytest)))
18161 (home-page "https://github.com/python-visualization/folium")
18162 (synopsis "Make beautiful maps with Leaflet.js & Python")
18163 (description "@code{folium} makes it easy to visualize data that’s been
18164 manipulated in Python on an interactive leaflet map. It enables both the
18165 binding of data to a map for @code{choropleth} visualizations as well as
18166 passing rich vector/raster/HTML visualizations as markers on the map.
18167
18168 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
18169 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
18170 supports Image, Video, GeoJSON and TopoJSON overlays.")
18171 (license license:expat)))
18172
18173 (define-public jube
18174 (package
18175 ;; This is a command-line tool, so no "python-" prefix.
18176 (name "jube")
18177 (version "2.2.2")
18178 (source (origin
18179 (method url-fetch)
18180 (uri (string-append
18181 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
18182 version))
18183 (sha256
18184 (base32
18185 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
18186 (file-name (string-append "jube-" version ".tar.gz"))))
18187 (build-system python-build-system)
18188 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
18189 (synopsis "Benchmarking environment")
18190 (description
18191 "JUBE helps perform and analyze benchmarks in a systematic way. For each
18192 benchmarked application, benchmark data is stored in a format that allows JUBE
18193 to deduct the desired information. This data can be parsed by automatic pre-
18194 and post-processing scripts that draw information and store it more densely
18195 for manual interpretation.")
18196 (license license:gpl3+)))
18197
18198 (define-public python-pyroutelib3
18199 (package
18200 (name "python-pyroutelib3")
18201 (version "1.3.post1")
18202 (source
18203 (origin
18204 (method url-fetch)
18205 (uri (pypi-uri "pyroutelib3" version))
18206 (sha256
18207 (base32
18208 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
18209 (build-system python-build-system)
18210 (propagated-inputs
18211 `(("python-dateutil" ,python-dateutil)))
18212 (home-page "https://github.com/MKuranowski/pyroutelib3")
18213 (synopsis "Library for simple routing on OSM data")
18214 (description "Library for simple routing on OSM data")
18215 (license license:gpl3+)))
18216
18217 (define-public python-bibtexparser
18218 (package
18219 (name "python-bibtexparser")
18220 (version "1.1.0")
18221 (source
18222 (origin
18223 (method url-fetch)
18224 (uri (pypi-uri "bibtexparser" version))
18225 (sha256
18226 (base32
18227 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
18228 (build-system python-build-system)
18229 (propagated-inputs
18230 `(("python-pyparsing" ,python-pyparsing)))
18231 (native-inputs
18232 `(("python-future" ,python-future)))
18233 (home-page "https://github.com/sciunto-org/python-bibtexparser")
18234 (synopsis "Python library to parse BibTeX files")
18235 (description "BibtexParser is a Python library to parse BibTeX files.")
18236 (license (list license:bsd-3 license:lgpl3))))
18237
18238 (define-public python-distro
18239 (package
18240 (name "python-distro")
18241 (version "1.4.0")
18242 (source
18243 (origin
18244 (method url-fetch)
18245 (uri (pypi-uri "distro" version))
18246 (sha256
18247 (base32
18248 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
18249 (build-system python-build-system)
18250 (native-inputs
18251 `(("python-pytest" ,python-pytest)))
18252 (home-page "https://github.com/nir0s/distro")
18253 (synopsis
18254 "OS platform information API")
18255 (description
18256 "@code{distro} provides information about the OS distribution it runs on,
18257 such as a reliable machine-readable ID, or version information.
18258
18259 It is the recommended replacement for Python's original
18260 `platform.linux_distribution` function (which will be removed in Python 3.8).
18261 @code{distro} also provides a command-line interface to output the platform
18262 information in various formats.")
18263 (license license:asl2.0)))
18264
18265 (define-public python-cairosvg
18266 (package
18267 (name "python-cairosvg")
18268 (version "2.4.2")
18269 (source
18270 (origin
18271 (method url-fetch)
18272 (uri (pypi-uri "CairoSVG" version))
18273 (sha256
18274 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
18275 (build-system python-build-system)
18276 (arguments
18277 `(#:phases
18278 (modify-phases %standard-phases
18279 (replace 'check
18280 (lambda _ (invoke "pytest"))))))
18281 (propagated-inputs
18282 `(("python-cairocffi" ,python-cairocffi)
18283 ("python-cssselect2" ,python-cssselect2)
18284 ("python-defusedxml" ,python-defusedxml)
18285 ("python-pillow" ,python-pillow)
18286 ("python-tinycss2" ,python-tinycss2)))
18287 (native-inputs
18288 `(("python-pytest-flake8" ,python-pytest-flake8)
18289 ("python-pytest-isort" ,python-pytest-isort)
18290 ("python-pytest-runner" ,python-pytest-runner)))
18291 (home-page "https://cairosvg.org/")
18292 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
18293 (description "CairoSVG is a SVG converter based on Cairo. It can export
18294 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
18295 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
18296 parsed, the result is drawn to a Cairo surface that can be exported to
18297 qvarious formats: PDF, PostScript, PNG and even SVG.")
18298 (license license:lgpl3+)))
18299
18300 (define-public python-pyphen
18301 (package
18302 (name "python-pyphen")
18303 (version "0.9.5")
18304 (source
18305 (origin
18306 (method url-fetch)
18307 (uri (pypi-uri "Pyphen" version))
18308 (sha256
18309 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
18310 (build-system python-build-system)
18311 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
18312 ;; embedded set provided by upstream - like Debian does.
18313 (home-page "https://github.com/Kozea/Pyphen")
18314 (synopsis "Pure Python module to hyphenate text")
18315 (description "Pyphen is a pure Python module to hyphenate text using
18316 existing Hunspell hyphenation dictionaries.")
18317 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
18318
18319 (define-public python-intelhex
18320 (package
18321 (name "python-intelhex")
18322 (version "2.2.1")
18323 (source
18324 (origin
18325 (method url-fetch)
18326 (uri (pypi-uri "intelhex" version))
18327 (sha256
18328 (base32
18329 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
18330 (build-system python-build-system)
18331 (arguments '(#:tests? #f)) ;issue with version
18332 (home-page "https://pypi.org/project/IntelHex/")
18333 (synopsis "Python library for Intel HEX files manipulations")
18334 (description "The Intel HEX file format is widely used in microprocessors
18335 and microcontrollers area (embedded systems etc.) as the de facto standard for
18336 representation of code to be programmed into microelectronic devices. This
18337 package provides an intelhex Python library to read, write, create from
18338 scratch and manipulate data from Intel HEX file format. It also includes
18339 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
18340 converters and more, those based on the library itself.")
18341 (license license:bsd-3)))
18342
18343 (define-public python-pykwalify
18344 (package
18345 (name "python-pykwalify")
18346 (version "1.7.0")
18347 (source
18348 (origin
18349 (method url-fetch)
18350 (uri (pypi-uri "pykwalify" version))
18351 (sha256
18352 (base32
18353 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
18354 (build-system python-build-system)
18355 (arguments '(#:tests? #f)) ;missing dependencies
18356 (propagated-inputs
18357 `(("python-dateutil" ,python-dateutil)
18358 ("python-docopt" ,python-docopt)
18359 ("python-pyyaml" ,python-pyyaml)))
18360 (home-page "https://github.com/grokzen/pykwalify")
18361 (synopsis
18362 "Python lib/cli for JSON/YAML schema validation")
18363 (description
18364 "This package provides a parser, schema validator, and data binding tool
18365 for YAML and JSON.")
18366 (license license:expat)))
18367
18368 (define-public python-dbusmock
18369 (package
18370 (name "python-dbusmock")
18371 (version "0.18.3")
18372 (source
18373 (origin
18374 (method url-fetch)
18375 (uri (pypi-uri "python-dbusmock" version))
18376 (sha256
18377 (base32
18378 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
18379 (build-system python-build-system)
18380 (arguments
18381 '(#:phases
18382 (modify-phases %standard-phases
18383 (add-after 'unpack 'patch-shell-path
18384 (lambda _
18385 (substitute* "tests/test_code.py"
18386 (("/bin/bash") (which "bash")))
18387 #t)))))
18388 (native-inputs
18389 `(;; For tests.
18390 ("dbus" ,dbus) ; for dbus-daemon
18391 ("python-nose" ,python-nose)
18392 ("which" ,which)))
18393 (propagated-inputs
18394 `(("python-dbus" ,python-dbus)
18395 ("python-pygobject" ,python-pygobject)))
18396 (home-page "https://github.com/martinpitt/python-dbusmock")
18397 (synopsis "Python library for mock D-Bus objects")
18398 (description "python-dbusmock allows for the easy creation of mock objects on
18399 D-Bus. This is useful for writing tests for software which talks to D-Bus
18400 services such as upower, systemd, logind, gnome-session or others, and it is
18401 hard (or impossible without root privileges) to set the state of the real
18402 services to what you expect in your tests.")
18403 (license license:lgpl3+)))
18404
18405 (define-public python-ujson
18406 (package
18407 (name "python-ujson")
18408 (version "2.0.3")
18409 (source
18410 (origin
18411 (method url-fetch)
18412 (uri (pypi-uri "ujson" version))
18413 (sha256
18414 (base32
18415 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
18416 (modules '((guix build utils)))
18417 (snippet
18418 '(begin (delete-file-recursively "deps") #t))))
18419 (build-system python-build-system)
18420 (arguments
18421 `(#:phases
18422 (modify-phases %standard-phases
18423 (add-after 'unpack 'link-to-system-double-conversion
18424 (lambda* (#:key inputs #:allow-other-keys)
18425 (let ((d-c (assoc-ref inputs "double-conversion")))
18426 (substitute* "setup.py"
18427 (("./deps/double-conversion/double-conversion\"")
18428 (string-append d-c "/include/double-conversion\""))
18429 (("-lstdc++" stdc)
18430 (string-append "-L" d-c "/lib\","
18431 " \"-ldouble-conversion\","
18432 " \"" stdc)))
18433 #t)))
18434 (replace 'check
18435 (lambda* (#:key inputs outputs #:allow-other-keys)
18436 (add-installed-pythonpath inputs outputs)
18437 (invoke "pytest"))))))
18438 (native-inputs
18439 `(("double-conversion" ,double-conversion)
18440 ("python-setuptools-scm" ,python-setuptools-scm)
18441 ("python-pytest" ,python-pytest)))
18442 (home-page "https://github.com/ultrajson/ultrajson")
18443 (synopsis "Ultra fast JSON encoder and decoder for Python")
18444 (description
18445 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
18446 bindings for Python 3.")
18447 (license license:bsd-3)))
18448
18449 (define-public python-ujson-1
18450 (package
18451 (inherit python-ujson)
18452 (version "1.35")
18453 (source
18454 (origin
18455 (method url-fetch)
18456 (uri (pypi-uri "ujson" version))
18457 (sha256
18458 (base32
18459 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
18460 (arguments
18461 '(#:phases %standard-phases))
18462 (native-inputs '())
18463 (home-page "http://www.esn.me")
18464 (description
18465 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
18466 bindings for Python 2.5+ and 3.")))
18467
18468 (define-public python2-ujson-1
18469 (package-with-python2 python-ujson-1))
18470
18471 (define-public python-iocapture
18472 ;; The latest release is more than a year older than this commit.
18473 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
18474 (revision "1"))
18475 (package
18476 (name "python-iocapture")
18477 (version "0.1.2")
18478 (source
18479 (origin
18480 (method git-fetch)
18481 (uri (git-reference
18482 (url "https://github.com/oinume/iocapture.git")
18483 (commit commit)))
18484 (file-name (git-file-name name version))
18485 (sha256
18486 (base32
18487 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
18488 (build-system python-build-system)
18489 (arguments
18490 `(#:phases
18491 (modify-phases %standard-phases
18492 (delete 'check)
18493 (add-after 'install 'check
18494 (lambda* (#:key inputs outputs #:allow-other-keys)
18495 (add-installed-pythonpath inputs outputs)
18496 (invoke "py.test" "-v" "tests")
18497 #t)))))
18498 (propagated-inputs
18499 `(("python-flexmock" ,python-flexmock)
18500 ("python-pytest" ,python-pytest)
18501 ("python-pytest-cov" ,python-pytest-cov)
18502 ("python-six" ,python-six)))
18503 (home-page "https://github.com/oinume/iocapture")
18504 (synopsis "Python capturing tool for stdout and stderr")
18505 (description
18506 "This package helps you to capture the standard out (stdout) and the
18507 standard error channel (stderr) in your program.")
18508 (license license:expat))))
18509
18510 (define-public python-argh
18511 ;; There are 21 commits since the latest release containing important
18512 ;; improvements.
18513 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
18514 (revision "1"))
18515 (package
18516 (name "python-argh")
18517 (version (git-version "0.26.2" revision commit))
18518 (source
18519 (origin
18520 (method git-fetch)
18521 (uri (git-reference
18522 (url "https://github.com/neithere/argh.git")
18523 (commit commit)))
18524 (file-name (git-file-name name version))
18525 (sha256
18526 (base32
18527 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
18528 (build-system python-build-system)
18529 (propagated-inputs
18530 `(("python-iocapture" ,python-iocapture)
18531 ("python-mock" ,python-mock)
18532 ("python-pytest" ,python-pytest)
18533 ("python-pytest-cov" ,python-pytest-cov)
18534 ("python-pytest-xdist" ,python-pytest-xdist)
18535 ("python-tox" ,python-tox)))
18536 (home-page "https://github.com/neithere/argh/")
18537 (synopsis "Argparse wrapper with natural syntax")
18538 (description
18539 "python-argh is a small library that provides several layers of
18540 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
18541 always possible to declare a command with the highest possible (and least
18542 flexible) layer and then tune the behaviour with any of the lower layers
18543 including the native API of @code{python-argparse}.")
18544 (license license:lgpl3+))))
18545
18546 (define-public python-ppft
18547 (package
18548 (name "python-ppft")
18549 (version "1.6.6.1")
18550 (source
18551 (origin
18552 (method url-fetch)
18553 (uri (pypi-uri "ppft" version))
18554 (sha256
18555 (base32
18556 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
18557 (build-system python-build-system)
18558 (arguments '(#:tests? #f)) ; there are none
18559 (propagated-inputs
18560 `(("python-six" ,python-six)))
18561 (home-page "https://pypi.org/project/ppft/")
18562 (synopsis "Fork of Parallel Python")
18563 (description
18564 "This package is a fork of Parallel Python. The Parallel Python
18565 module (@code{pp}) provides an easy and efficient way to create
18566 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
18567 computers and clusters. It features cross-platform portability and dynamic
18568 load balancing.")
18569 (license license:bsd-3)))
18570
18571 (define-public python-pox
18572 (package
18573 (name "python-pox")
18574 (version "0.2.7")
18575 (source
18576 (origin
18577 (method url-fetch)
18578 (uri (pypi-uri "pox" version))
18579 (sha256
18580 (base32
18581 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
18582 (build-system python-build-system)
18583 (arguments
18584 `(#:phases
18585 (modify-phases %standard-phases
18586 (replace 'check
18587 (lambda _
18588 (mkdir-p "/tmp/guix")
18589 (setenv "SHELL" "bash")
18590 (setenv "USERNAME" "guix")
18591 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
18592 (invoke "py.test" "-vv")
18593 #t)))))
18594 (native-inputs
18595 `(("python-pytest" ,python-pytest)
18596 ("which" ,which)))
18597 (home-page "https://pypi.org/project/pox/")
18598 (synopsis "Python utilities for filesystem exploration and automated builds")
18599 (description
18600 "Pox provides a collection of utilities for navigating and manipulating
18601 filesystems. This module is designed to facilitate some of the low level
18602 operating system interactions that are useful when exploring a filesystem on a
18603 remote host. Pox provides Python equivalents of several shell commands such
18604 as @command{which} and @command{find}. These commands allow automated
18605 discovery of what has been installed on an operating system, and where the
18606 essential tools are located.")
18607 (license license:bsd-3)))
18608
18609 (define-public python-pathos
18610 (package
18611 (name "python-pathos")
18612 (version "0.2.5")
18613 (source
18614 (origin
18615 (method url-fetch)
18616 (uri (pypi-uri "pathos" version))
18617 (sha256
18618 (base32
18619 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
18620 (build-system python-build-system)
18621 (arguments
18622 '(#:phases
18623 (modify-phases %standard-phases
18624 (replace 'check
18625 (lambda _
18626 (setenv "PYTHONPATH"
18627 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18628 (invoke "python" "./tests/__main__.py"))))))
18629 (propagated-inputs
18630 `(("python-dill" ,python-dill)
18631 ("python-multiprocess" ,python-multiprocess)
18632 ("python-pox" ,python-pox)
18633 ("python-ppft" ,python-ppft)))
18634 (native-inputs
18635 `(("python-pytest" ,python-pytest)))
18636 (home-page "https://pypi.org/project/pathos/")
18637 (synopsis
18638 "Parallel graph management and execution in heterogeneous computing")
18639 (description
18640 "Python-pathos is a framework for heterogenous computing. It provides a
18641 consistent high-level interface for configuring and launching parallel
18642 computations across heterogenous resources. Python-pathos provides configurable
18643 launchers for parallel and distributed computing, where each launcher contains
18644 the syntactic logic to configure and launch jobs in an execution environment.")
18645 (license license:bsd-3)))
18646
18647 (define-public python-flit
18648 (package
18649 (name "python-flit")
18650 (version "2.1.0")
18651 (source
18652 (origin
18653 (method url-fetch)
18654 (uri (pypi-uri "flit" version))
18655 (sha256
18656 (base32
18657 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
18658 (build-system python-build-system)
18659 (arguments
18660 `(#:tests? #f)) ; XXX: Check requires network access.
18661 (home-page "https://flit.readthedocs.io/")
18662 (synopsis
18663 "Simple packaging tool for simple packages")
18664 (description
18665 "Flit is a simple way to put Python packages and modules on PyPI. Flit
18666 packages a single importable module or package at a time, using the import
18667 name as the name on PyPI. All subpackages and data files within a package
18668 are included automatically.")
18669 (license license:bsd-3)))
18670
18671 (define-public python-pathtools
18672 (package
18673 (name "python-pathtools")
18674 (version "0.1.2")
18675 (source
18676 (origin
18677 (method url-fetch)
18678 (uri (pypi-uri "pathtools" version))
18679 (sha256
18680 (base32
18681 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
18682 (build-system python-build-system)
18683 (home-page
18684 "https://github.com/gorakhargosh/pathtools")
18685 (synopsis "Path utilities for Python")
18686 (description "Pattern matching and various utilities for file systems
18687 paths.")
18688 (license license:expat)))
18689
18690 (define-public python-fastentrypoints
18691 (package
18692 (name "python-fastentrypoints")
18693 (version "0.12")
18694 (source
18695 (origin
18696 (method url-fetch)
18697 (uri (pypi-uri "fastentrypoints" version))
18698 (sha256
18699 (base32
18700 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
18701 (build-system python-build-system)
18702 (home-page
18703 "https://github.com/ninjaaron/fast-entry_points")
18704 (synopsis
18705 "Makes entry_points specified in setup.py load more quickly")
18706 (description
18707 "Using entry_points in your setup.py makes scripts that start really
18708 slowly because it imports pkg_resources. This package allows such setup
18709 scripts to load entry points more quickly.")
18710 (license license:bsd-3)))
18711
18712 (define-public python-funcparserlib
18713 (package
18714 (name "python-funcparserlib")
18715 (version "0.3.6")
18716 (source
18717 (origin
18718 (method url-fetch)
18719 (uri (pypi-uri "funcparserlib" version))
18720 (sha256
18721 (base32
18722 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
18723 (native-inputs
18724 `(("python-tox" ,python-tox)))
18725 (arguments
18726 `(#:phases
18727 (modify-phases %standard-phases
18728 (replace 'check
18729 (lambda _
18730 (invoke "tox"))))))
18731 (build-system python-build-system)
18732 (home-page
18733 "https://github.com/vlasovskikh/funcparserlib")
18734 (synopsis
18735 "Recursive descent parsing library based on functional combinators")
18736 (description
18737 "This package is a recursive descent parsing library for Python based on
18738 functional combinators. Parser combinators are just higher-order functions
18739 that take parsers as their arguments and return them as result values.")
18740 (license license:expat)))
18741
18742 (define-public python-speg
18743 (package
18744 (name "python-speg")
18745 (version "0.3")
18746 (source
18747 (origin
18748 (method url-fetch)
18749 (uri (pypi-uri "speg" version ".zip"))
18750 (sha256
18751 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
18752 (arguments
18753 `(#:tests? #f)) ;FIXME: tests fail, not sure why
18754 (native-inputs
18755 `(("unzip" ,unzip)))
18756 (build-system python-build-system)
18757 (home-page "https://github.com/avakar/speg")
18758 (synopsis "PEG-based parser interpreter with memoization")
18759 (description "This package is a PEG-based parser and interpreter with
18760 memoization.")
18761 (license license:expat)))
18762
18763 (define-public python-cson
18764 (package
18765 (name "python-cson")
18766 (version "0.8")
18767 (source
18768 (origin
18769 (method url-fetch)
18770 (uri (pypi-uri "cson" version))
18771 (sha256
18772 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
18773 (build-system python-build-system)
18774 (propagated-inputs
18775 `(("python-speg" ,python-speg)))
18776 (home-page "https://github.com/avakar/pycson")
18777 (synopsis "Parser for Coffeescript Object Notation (CSON)")
18778 (description "This package is a parser for Coffeescript Object
18779 Notation (CSON).")
18780 (license license:expat)))
18781
18782 (define-public python-asynctest
18783 (package
18784 (name "python-asynctest")
18785 (version "0.13.0")
18786 (source
18787 (origin
18788 (method url-fetch)
18789 (uri (pypi-uri "asynctest" version))
18790 (sha256
18791 (base32
18792 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
18793 (build-system python-build-system)
18794 (arguments
18795 '(#:phases
18796 (modify-phases %standard-phases
18797 (replace 'check
18798 (lambda _
18799 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
18800 (add-after 'unpack 'disable-tests
18801 (lambda* _
18802 (substitute* "test/test_selector.py"
18803 ;; XXX: This test fails for unknown reason inside the build
18804 ;; environment.
18805 (("def test_events_watched_outside_test_are_ignored")
18806 "@unittest.skip('disabled by guix')
18807 def test_events_watched_outside_test_are_ignored")))))))
18808 (home-page "https://github.com/Martiusweb/asynctest")
18809 (synopsis "Extension of unittest for testing asyncio libraries")
18810 (description
18811 "The package asynctest is built on top of the standard unittest module
18812 and cuts down boilerplate code when testing libraries for asyncio.")
18813 (license license:asl2.0)))
18814
18815 (define-public python-aionotify
18816 (package
18817 (name "python-aionotify")
18818 (version "0.2.0")
18819 (source
18820 (origin
18821 ;; Source tarball on PyPi lacks tests
18822 (method git-fetch)
18823 (uri (git-reference
18824 (url "https://github.com/rbarrois/aionotify")
18825 (commit (string-append "v" version))))
18826 (file-name (git-file-name name version))
18827 (sha256
18828 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
18829 (build-system python-build-system)
18830 (native-inputs `(("python-asynctest" ,python-asynctest)))
18831 (home-page "https://github.com/rbarrois/aionotify")
18832 (synopsis "Asyncio-powered inotify library")
18833 (description
18834 "@code{aionotify} is a simple, asyncio-based inotify library.")
18835 (license license:bsd-3)))
18836
18837 (define-public python-forbiddenfruit
18838 (package
18839 (name "python-forbiddenfruit")
18840 (version "0.1.3")
18841 (source
18842 (origin
18843 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
18844 (method git-fetch)
18845 (uri (git-reference
18846 (url "https://github.com/clarete/forbiddenfruit")
18847 (commit version)))
18848 (file-name (git-file-name name version))
18849 (sha256
18850 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
18851 (build-system python-build-system)
18852 (arguments
18853 '(#:phases
18854 (modify-phases %standard-phases
18855 (replace 'check
18856 (lambda _
18857 (invoke "make" "SKIP_DEPS=1"))))))
18858 (native-inputs
18859 `(("python-nose" ,python-nose)
18860 ("python-coverage" ,python-coverage)))
18861 (home-page "https://github.com/clarete/forbiddenfruit")
18862 (synopsis "Patch python built-in objects")
18863 (description "This project allows Python code to extend built-in types.")
18864 (license (list license:gpl3+ license:expat))))
18865
18866 (define-public python-shouldbe
18867 (package
18868 (name "python-shouldbe")
18869 (version "0.1.2")
18870 (source
18871 (origin
18872 (method url-fetch)
18873 (uri (pypi-uri "shouldbe" version))
18874 (sha256
18875 (base32
18876 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
18877 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
18878 (build-system python-build-system)
18879 (propagated-inputs
18880 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
18881 (native-inputs
18882 `(("python-nose" ,python-nose)))
18883 (home-page "https://github.com/directxman12/should_be")
18884 (synopsis "Python Assertion Helpers inspired by Shouldly")
18885 (description
18886 "Python Assertion Helpers inspired by Shouldly.")
18887 (license license:isc)))
18888
18889 (define-public python-k5test
18890 (package
18891 (name "python-k5test")
18892 (version "0.9.2")
18893 (source
18894 (origin
18895 (method url-fetch)
18896 (uri (pypi-uri "k5test" version))
18897 (sha256
18898 (base32
18899 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
18900 (build-system python-build-system)
18901 (propagated-inputs
18902 `(("python-six" ,python-six)
18903 ;; `which`, `kadmin.local` binaries called inside library
18904 ("which" ,which)
18905 ("mit-krb5" ,mit-krb5)))
18906 (native-inputs `(("mit-krb5" ,mit-krb5)))
18907 (arguments
18908 '(#:phases
18909 (modify-phases %standard-phases
18910 (add-after 'unpack 'patch-paths
18911 (lambda* _
18912 (substitute* "k5test/realm.py"
18913 (("'kadmin_local'") "'kadmin.local'")))))))
18914 (home-page "https://github.com/pythongssapi/k5test")
18915 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18916 (description
18917 "@code{k5test} is a library for setting up self-contained Kerberos 5
18918 environments, and running Python unit tests inside those environments. It is
18919 based on the file of the same name found alongside the MIT Kerberos 5 unit
18920 tests.")
18921 (license license:isc)))
18922
18923 (define-public python-gssapi
18924 (package
18925 (name "python-gssapi")
18926 (version "1.6.5")
18927 (source
18928 (origin
18929 (method url-fetch)
18930 (uri (pypi-uri "gssapi" version))
18931 (sha256
18932 (base32
18933 "02i5s7998dg5kcr4m0xwamd8vjqk1816xbzldyp68l91f6bynwcr"))))
18934 (build-system python-build-system)
18935 (propagated-inputs
18936 `(("python-decorator" ,python-decorator)
18937 ("python-six" ,python-six)))
18938 (inputs
18939 `(("mit-krb5" ,mit-krb5)))
18940 ;; for tests
18941 (native-inputs
18942 `(("python-shouldbe" ,python-shouldbe)
18943 ("python-parameterized" ,python-parameterized)
18944 ("python-k5test" ,python-k5test)
18945 ("python-nose" ,python-nose)))
18946 (home-page "https://github.com/pythongssapi/python-gssapi")
18947 (synopsis "Python GSSAPI Wrapper")
18948 (description
18949 "Python-GSSAPI provides both low-level and high level wrappers around the
18950 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18951 also be useable with other GSSAPI mechanisms.")
18952 (license license:isc)))
18953
18954 (define-public python-check-manifest
18955 (package
18956 (name "python-check-manifest")
18957 (version "0.37")
18958 (source
18959 (origin
18960 (method url-fetch)
18961 (uri (pypi-uri "check-manifest" version))
18962 (sha256
18963 (base32
18964 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18965 (build-system python-build-system)
18966 (native-inputs
18967 `(("python-mock" ,python-mock)
18968 ("git" ,git)))
18969 (home-page "https://github.com/mgedmin/check-manifest")
18970 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18971 (description "Python package can include a MANIFEST.in file to help with
18972 sending package files to the Python Package Index. This package checks that
18973 file to ensure it completely and accurately describes your project.")
18974 (license license:expat)))
18975
18976 (define-public python-android-stringslib
18977 (package
18978 (name "python-android-stringslib")
18979 (version "0.1.2")
18980 (source
18981 (origin
18982 (method git-fetch)
18983 (uri (git-reference
18984 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18985 (commit (string-append "v" version))))
18986 (file-name (git-file-name name version))
18987 (sha256
18988 (base32
18989 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18990 (build-system python-build-system)
18991 (arguments
18992 `(#:tests? #f))
18993 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18994 (synopsis "Android strings.xml support")
18995 (description "Android Strings Lib provides support for android's strings.xml
18996 files. These files are used to translate strings in android apps.")
18997 (license license:expat)))
18998
18999 (define-public python-watchdog
19000 (package
19001 (name "python-watchdog")
19002 (version "0.9.0")
19003 (source
19004 (origin
19005 (method url-fetch)
19006 (uri (pypi-uri "watchdog" version))
19007 (sha256
19008 (base32
19009 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
19010 (build-system python-build-system)
19011 (arguments
19012 `(#:phases
19013 (modify-phases %standard-phases
19014 (add-before 'check 'remove-failing
19015 (lambda _
19016 (delete-file "tests/test_inotify_buffer.py")
19017 (delete-file "tests/test_snapshot_diff.py")
19018 #t)))))
19019 (propagated-inputs
19020 `(("python-argh" ,python-argh)
19021 ("python-pathtools" ,python-pathtools)
19022 ("python-pyyaml" ,python-pyyaml)))
19023 (native-inputs
19024 `(("python-pytest-cov" ,python-pytest-cov)
19025 ("python-pytest-timeout" ,python-pytest-timeout)))
19026 (home-page "https://github.com/gorakhargosh/watchdog")
19027 (synopsis "Filesystem events monitoring")
19028 (description "This package provides a way to monitor filesystem events
19029 such as a file modification and trigger an action. This is similar to inotify,
19030 but portable.")
19031 (license license:asl2.0)))
19032
19033 (define-public python-wget
19034 (package
19035 (name "python-wget")
19036 (version "3.2")
19037 (source
19038 (origin
19039 (method url-fetch)
19040 (uri (pypi-uri "wget" version ".zip"))
19041 (sha256
19042 (base32
19043 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
19044 (build-system python-build-system)
19045 (native-inputs `(("unzip" ,unzip)))
19046 (home-page "https://bitbucket.org/techtonik/python-wget/")
19047 (synopsis "Pure Python download utility")
19048 (description "The python-wget library provides an API to download files
19049 with features similar to the @command{wget} utility.")
19050 (license license:unlicense)))
19051
19052 (define-public offlate
19053 (package
19054 (name "offlate")
19055 (version "0.5")
19056 (source
19057 (origin
19058 (method git-fetch)
19059 (uri (git-reference
19060 (url "https://framagit.org/tyreunom/offlate")
19061 (commit version)))
19062 (file-name (git-file-name name version))
19063 (sha256
19064 (base32
19065 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
19066 (build-system python-build-system)
19067 (arguments
19068 ;; No tests
19069 `(#:tests? #f))
19070 (propagated-inputs
19071 `(("python-android-stringslib" ,python-android-stringslib)
19072 ("python-dateutil" ,python-dateutil)
19073 ("python-gitlab" ,python-gitlab)
19074 ("python-lxml" ,python-lxml)
19075 ("python-polib" ,python-polib)
19076 ("python-pyenchant" ,python-pyenchant)
19077 ("python-pygit2" ,python-pygit2)
19078 ("python-pygithub" ,python-pygithub)
19079 ("python-pyqt" ,python-pyqt)
19080 ("python-requests" ,python-requests)
19081 ("python-ruamel.yaml" ,python-ruamel.yaml)
19082 ("python-translation-finder" ,python-translation-finder)
19083 ("python-watchdog" ,python-watchdog)))
19084 (native-inputs
19085 `(("qttools" ,qttools)))
19086 (home-page "https://framagit.org/tyreunom/offlate")
19087 (synopsis "Offline translation interface for online translation tools")
19088 (description "Offlate offers a unified interface for different translation
19089 file formats, as well as many different online translation platforms. You can
19090 use it to get work from online platforms, specialized such as the Translation
19091 Project, or not such a gitlab instance when your upstream doesn't use any
19092 dedicated platform. The tool proposes a unified interface for any format and
19093 an upload option to send your work back to the platform.")
19094 (license license:gpl3+)))
19095
19096 (define-public python-titlecase
19097 (package
19098 (name "python-titlecase")
19099 (version "0.12.0")
19100 (source
19101 (origin
19102 (method url-fetch)
19103 (uri (pypi-uri "titlecase" version))
19104 (sha256
19105 (base32
19106 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
19107 (build-system python-build-system)
19108 (native-inputs
19109 `(("python-nose" ,python-nose)))
19110 (home-page "https://github.com/ppannuto/python-titlecase")
19111 (synopsis "Capitalize strings similar to book titles")
19112 (description
19113 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
19114 It capitalizes (predominantly English) strings in a way that is similar to
19115 book titles, using the New York Times Manual of Style to leave certain words
19116 lowercase.")
19117 (license license:expat)))
19118
19119 (define-public python-pypng
19120 (package
19121 (name "python-pypng")
19122 (version "0.0.20")
19123 (source
19124 (origin
19125 (method url-fetch)
19126 (uri (pypi-uri "pypng" version))
19127 (sha256
19128 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
19129 (build-system python-build-system)
19130 (home-page "https://github.com/drj11/pypng")
19131 (synopsis "Pure Python PNG image encoder/decoder")
19132 (description
19133 "The PyPNG module implements support for PNG images. It reads and writes
19134 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
19135 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
19136 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
19137 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
19138 A number of optional chunks can be specified (when writing) and
19139 understood (when reading): tRNS, bKGD, gAMA.
19140
19141 PyPNG is not a high level toolkit for image processing (like PIL) and does not
19142 aim at being a replacement or competitor. Its strength lies in fine-grained
19143 extensive support of PNG features. It can also read and write Netpbm PAM
19144 files, with a focus on its use as an intermediate format for implementing
19145 custom PNG processing.")
19146 (license license:expat)))
19147
19148 (define-public python-fuzzywuzzy
19149 (package
19150 (name "python-fuzzywuzzy")
19151 (version "0.18.0")
19152 (source
19153 (origin
19154 (method url-fetch)
19155 (uri (pypi-uri "fuzzywuzzy" version))
19156 (sha256
19157 (base32
19158 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
19159 (build-system python-build-system)
19160 (native-inputs
19161 `(("python-hypothesis" ,python-hypothesis)
19162 ("python-pycodestyle" ,python-pycodestyle)
19163 ("python-pytest" ,python-pytest)))
19164 (propagated-inputs
19165 `(("python-levenshtein" ,python-levenshtein)))
19166 (home-page "https://github.com/seatgeek/fuzzywuzzy")
19167 (synopsis "Fuzzy string matching in Python")
19168 (description "Approximate string matching using
19169 @emph{Levenshtein Distance} to calculate the differences between
19170 sequences.")
19171 (license license:gpl2)))
19172
19173 (define-public python2-fuzzywuzzy
19174 (package-with-python2 python-fuzzywuzzy))
19175
19176 (define-public python-block-tracing
19177 (package
19178 (name "python-block-tracing")
19179 (version "1.0.1")
19180 (source
19181 (origin
19182 (method url-fetch)
19183 (uri (pypi-uri "block_tracing" version))
19184 (sha256
19185 (base32
19186 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
19187 (build-system python-build-system)
19188 (arguments '(#:tests? #f)) ; no tests
19189 (home-page "https://github.com/rianhunter/block_tracing")
19190 (synopsis "Protect process memory")
19191 (description
19192 "@code{block_tracing} is a tiny Python library that can be used to
19193 prevent debuggers and other applications from inspecting the memory within
19194 your process.")
19195 (license license:expat)))
19196
19197 (define-public python-gcovr
19198 (package
19199 (name "python-gcovr")
19200 (version "4.2")
19201 (source
19202 (origin
19203 (method url-fetch)
19204 (uri (pypi-uri "gcovr" version))
19205 (sha256
19206 (base32
19207 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
19208 (build-system python-build-system)
19209 (propagated-inputs
19210 `(("python-lxml" ,python-lxml)
19211 ("python-jinja2" ,python-jinja2)))
19212 (home-page "https://gcovr.com/")
19213 (synopsis "Utility for generating code coverage results")
19214 (description
19215 "Gcovr provides a utility for managing the use of the GNU gcov
19216 utility and generating summarized code coverage results. It is inspired
19217 by the Python coverage.py package, which provides a similar utility for
19218 Python.")
19219 (license license:bsd-3)))
19220
19221 (define-public python-owslib
19222 (package
19223 (name "python-owslib")
19224 (version "0.19.2")
19225 (source
19226 (origin
19227 (method url-fetch)
19228 (uri (pypi-uri "OWSLib" version))
19229 (sha256
19230 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
19231 (build-system python-build-system)
19232 (arguments
19233 '(#:tests? #f)) ; TODO: package dependencies required for tests.
19234 (synopsis "Interface for Open Geospatial Consortium web service")
19235 (description
19236 "OWSLib is a Python package for client programming with Open Geospatial
19237 Consortium (OGC) web service (hence OWS) interface standards, and their related
19238 content models.")
19239 (home-page "https://geopython.github.io/OWSLib/")
19240 (license license:bsd-3)))
19241
19242 (define-public python-docusign-esign
19243 (package
19244 (name "python-docusign-esign")
19245 (version "3.1.0")
19246 (source (origin
19247 (method url-fetch)
19248 (uri (pypi-uri "docusign_esign" version))
19249 (sha256
19250 (base32
19251 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
19252 (build-system python-build-system)
19253 ;; Testing requires undocumented setup changes, and so testing is disabled here.
19254 (arguments `(#:tests? #f))
19255 (propagated-inputs
19256 `(("python-certifi", python-certifi)
19257 ("python-six", python-six)
19258 ("python-dateutil", python-dateutil)
19259 ("python-urllib3", python-urllib3)
19260 ("python-pyjwt", python-pyjwt)
19261 ("python-cryptography", python-cryptography)
19262 ("python-nose", python-nose)))
19263 (synopsis "DocuSign Python Client")
19264 (description "The Official DocuSign Python Client Library used to interact
19265 with the eSign REST API. Send, sign, and approve documents using this client.")
19266 (home-page "https://www.docusign.com/devcenter")
19267 (license license:expat)))
19268
19269 (define-public python-xattr
19270 (package
19271 (name "python-xattr")
19272 (version "0.9.7")
19273 (source
19274 (origin
19275 (method url-fetch)
19276 (uri (pypi-uri "xattr" version))
19277 (sha256
19278 (base32
19279 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
19280 (build-system python-build-system)
19281 (propagated-inputs
19282 `(("python-cffi" ,python-cffi)))
19283 (home-page "https://github.com/xattr/xattr")
19284 (synopsis
19285 "Python wrapper for extended filesystem attributes")
19286 (description "This package provides a Python wrapper for using extended
19287 filesystem attributes. Extended attributes extend the basic attributes of files
19288 and directories in the file system. They are stored as name:data pairs
19289 associated with file system objects (files, directories, symlinks, etc).")
19290 (license license:expat)))
19291
19292 (define-public python-json-logger
19293 (package
19294 (name "python-json-logger")
19295 (version "0.1.11")
19296 (source
19297 (origin
19298 (method url-fetch)
19299 (uri (pypi-uri "python-json-logger" version))
19300 (sha256
19301 (base32
19302 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
19303 (build-system python-build-system)
19304 (home-page
19305 "https://github.com/madzak/python-json-logger")
19306 (synopsis "JSON log formatter in Python")
19307 (description "This library allows standard Python logging to output log data
19308 as JSON objects. With JSON we can make our logs more readable by machines and
19309 we can stop writing custom parsers for syslog-type records.")
19310 (license license:bsd-3)))
19311
19312 (define-public python-daiquiri
19313 (package
19314 (name "python-daiquiri")
19315 (version "2.1.1")
19316 (source
19317 (origin
19318 (method url-fetch)
19319 (uri (pypi-uri "daiquiri" version))
19320 (sha256
19321 (base32
19322 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
19323 (build-system python-build-system)
19324 (propagated-inputs
19325 `(("python-json-logger" ,python-json-logger)))
19326 (native-inputs
19327 `(("python-mock" ,python-mock)
19328 ("python-pytest" ,python-pytest)
19329 ("python-setuptools-scm" ,python-setuptools-scm)
19330 ("python-six" ,python-six)))
19331 (home-page "https://github.com/jd/daiquiri")
19332 (synopsis
19333 "Library to configure Python logging easily")
19334 (description "The daiquiri library provides an easy way to configure
19335 logging in Python. It also provides some custom formatters and handlers.")
19336 (license license:asl2.0)))
19337
19338 (define-public python-pifpaf
19339 (package
19340 (name "python-pifpaf")
19341 (version "2.4.0")
19342 (source
19343 (origin
19344 (method url-fetch)
19345 (uri (pypi-uri "pifpaf" version))
19346 (sha256
19347 (base32
19348 "150av2pylsjy8ykrpyi0vzy2q24s9rhh2ya01zvwnvj9j5dspviz"))))
19349 (build-system python-build-system)
19350 (arguments
19351 `(#:tests? #f))
19352 (propagated-inputs
19353 `(("python-click" ,python-click)
19354 ("python-daiquiri" ,python-daiquiri)
19355 ("python-fixtures" ,python-fixtures)
19356 ("python-jinja2" ,python-jinja2)
19357 ("python-pbr" ,python-pbr)
19358 ("python-psutil" ,python-psutil)
19359 ("python-six" ,python-six)
19360 ("python-xattr" ,python-xattr)))
19361 (native-inputs
19362 `(("python-mock" ,python-mock)
19363 ("python-os-testr" ,python-os-testr)
19364 ("python-requests" ,python-requests)
19365 ("python-testrepository" ,python-testrepository)
19366 ("python-testtools" ,python-testtools)))
19367 (home-page "https://github.com/jd/pifpaf")
19368 (synopsis "Tools and fixtures to manage daemons for testing in Python")
19369 (description "Pifpaf is a suite of fixtures and a command-line tool that
19370 starts and stops daemons for a quick throw-away usage. This is typically
19371 useful when needing these daemons to run integration testing. It originally
19372 evolved from its precursor @code{overtest}.")
19373 (license license:asl2.0)))
19374
19375 (define-public python-pytest-check-links
19376 (package
19377 (name "python-pytest-check-links")
19378 (version "0.3.0")
19379 (source
19380 (origin
19381 (method url-fetch)
19382 ;; URI uses underscores
19383 (uri (pypi-uri "pytest_check_links" version))
19384 (sha256
19385 (base32
19386 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
19387 (build-system python-build-system)
19388 (propagated-inputs
19389 `(("python-docutils" ,python-docutils)
19390 ("python-html5lib" ,python-html5lib)
19391 ("python-nbconvert" ,python-nbconvert)
19392 ("python-nbformat" ,python-nbformat)
19393 ("python-pytest" ,python-pytest)
19394 ("python-six" ,python-six)))
19395 (native-inputs
19396 `(("python-pbr-minimal" ,python-pbr-minimal)))
19397 (home-page "https://github.com/minrk/pytest-check-links")
19398 (synopsis "Check links in files")
19399 (description "This package provides a pytest plugin that checks URLs for
19400 HTML-containing files.")
19401 (license license:bsd-3)))
19402
19403 (define-public python-json5
19404 (package
19405 (name "python-json5")
19406 (version "0.8.5")
19407 (source
19408 (origin
19409 ;; sample.json5 is missing from PyPi source tarball
19410 (method git-fetch)
19411 (uri (git-reference
19412 (url "https://github.com/dpranke/pyjson5.git")
19413 (commit (string-append "v" version))))
19414 (file-name (git-file-name name version))
19415 (sha256
19416 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
19417 (build-system python-build-system)
19418 (home-page "https://github.com/dpranke/pyjson5")
19419 (synopsis
19420 "Python implementation of the JSON5 data format")
19421 (description
19422 "JSON5 extends the JSON data interchange format to make it slightly more
19423 usable as a configuration language. This Python package implements parsing and
19424 dumping of JSON5 data structures.")
19425 (license license:asl2.0)))
19426
19427 (define-public python-frozendict
19428 (package
19429 (name "python-frozendict")
19430 (version "1.2")
19431 (source
19432 (origin
19433 (method url-fetch)
19434 (uri (pypi-uri "frozendict" version))
19435 (sha256
19436 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
19437 (build-system python-build-system)
19438 (home-page "https://github.com/slezica/python-frozendict")
19439 (synopsis "Simple immutable mapping for Python")
19440 (description
19441 "@dfn{frozendict} is an immutable wrapper around dictionaries that
19442 implements the complete mapping interface. It can be used as a drop-in
19443 replacement for dictionaries where immutability is desired.")
19444 (license license:expat)))
19445
19446 (define-public python-unpaddedbase64
19447 (package
19448 (name "python-unpaddedbase64")
19449 (version "1.1.0")
19450 (source
19451 (origin
19452 (method git-fetch)
19453 (uri (git-reference
19454 (url "https://github.com/matrix-org/python-unpaddedbase64.git")
19455 (commit (string-append "v" version))))
19456 (file-name (git-file-name name version))
19457 (sha256
19458 (base32
19459 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
19460 (build-system python-build-system)
19461 (home-page "https://pypi.org/project/unpaddedbase64/")
19462 (synopsis "Encode and decode Base64 without “=” padding")
19463 (description
19464 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
19465 using “=” characters. However this conveys no benefit so many protocols
19466 choose to use Base64 without the “=” padding.")
19467 (license license:asl2.0)))
19468
19469 (define-public python-canonicaljson
19470 (package
19471 (name "python-canonicaljson")
19472 (version "1.1.4")
19473 (source
19474 (origin
19475 (method url-fetch)
19476 (uri (pypi-uri "canonicaljson" version))
19477 (sha256
19478 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
19479 (build-system python-build-system)
19480 (propagated-inputs
19481 `(("python-six" ,python-six)
19482 ("python-frozendict" ,python-frozendict)
19483 ("python-simplejson" ,python-simplejson)))
19484 (home-page "https://github.com/matrix-org/python-canonicaljson")
19485 (synopsis "Canonical JSON")
19486 (description
19487 "Deterministically encode JSON.
19488
19489 @itemize
19490 @item Encodes objects and arrays as RFC 7159 JSON.
19491 @item Sorts object keys so that you get the same result each time.
19492 @item Has no insignificant whitespace to make the output as small as possible.
19493 @item Escapes only the characters that must be escaped, U+0000 to
19494 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
19495 @item Uses the shortest escape sequence for each escaped character.
19496 @item Encodes the JSON as UTF-8.
19497 @item Can encode frozendict immutable dictionaries.
19498 @end itemize")
19499 (license license:asl2.0)))
19500
19501 (define-public python-signedjson
19502 (package
19503 (name "python-signedjson")
19504 (version "1.1.1")
19505 (source
19506 (origin
19507 (method url-fetch)
19508 (uri (pypi-uri "signedjson" version))
19509 (sha256
19510 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
19511 (build-system python-build-system)
19512 (propagated-inputs
19513 `(("python-canonicaljson" ,python-canonicaljson)
19514 ("python-importlib-metadata" ,python-importlib-metadata)
19515 ("python-pynacl" ,python-pynacl)
19516 ("python-typing-extensions" ,python-typing-extensions)
19517 ("python-unpaddedbase64" ,python-unpaddedbase64)))
19518 (native-inputs
19519 `(("python-setuptools-scm" ,python-setuptools-scm)))
19520 (home-page "https://github.com/matrix-org/python-signedjson")
19521 (synopsis "Sign JSON objects with ED25519 signatures")
19522 (description
19523 "Sign JSON objects with ED25519 signatures.
19524
19525 @itemize
19526 @item More than one entity can sign the same object.
19527 @item Each entity can sign the object with more than one key making it easier to
19528 rotate keys
19529 @item ED25519 can be replaced with a different algorithm.
19530 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
19531 key.
19532 @end itemize")
19533 (license license:asl2.0)))
19534
19535 (define-public python-daemonize
19536 (package
19537 (name "python-daemonize")
19538 (version "2.5.0")
19539 (source
19540 (origin
19541 (method url-fetch)
19542 (uri (pypi-uri "daemonize" version))
19543 (sha256
19544 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
19545 (build-system python-build-system)
19546 (home-page "https://github.com/thesharp/daemonize")
19547 (synopsis "Library for writing system daemons in Python")
19548 (description "Daemonize is a library for writing system daemons in Python.")
19549 (license license:expat)))
19550
19551 (define-public python-pymacaroons
19552 (package
19553 (name "python-pymacaroons")
19554 (version "0.13.0")
19555 (source
19556 (origin
19557 (method url-fetch)
19558 (uri (pypi-uri "pymacaroons" version))
19559 (sha256
19560 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
19561 (build-system python-build-system)
19562 (propagated-inputs
19563 `(("python-six" ,python-six)
19564 ("python-pynacl" ,python-pynacl)))
19565 (home-page "https://github.com/ecordell/pymacaroons")
19566 (synopsis "Python Macaroon Library")
19567 (description
19568 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
19569 tokens, macaroons embed caveats that define specific authorization
19570 requirements for the target service, the service that issued the root macaroon
19571 and which is capable of verifying the integrity of macaroons it receives.
19572
19573 Macaroons allow for delegation and attenuation of authorization. They are
19574 simple and fast to verify, and decouple authorization policy from the
19575 enforcement of that policy.")
19576 (license license:expat)))
19577
19578 (define-public python-ldap3
19579 (package
19580 (name "python-ldap3")
19581 (version "2.7")
19582 (home-page "https://github.com/cannatag/ldap3")
19583 (source
19584 (origin
19585 (method git-fetch)
19586 (uri (git-reference (url home-page)
19587 (commit (string-append "v" version))))
19588 (file-name (git-file-name name version))
19589 (sha256
19590 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
19591 (build-system python-build-system)
19592 (arguments
19593 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
19594 #:phases (modify-phases %standard-phases
19595 (replace 'check
19596 (lambda* (#:key tests? #:allow-other-keys)
19597 (when tests?
19598 (invoke "nosetests" "-s" "test"))
19599 #t)))))
19600 (native-inputs
19601 `(("python-nose" ,python-nose)))
19602 (propagated-inputs
19603 `(("python-gssapi" ,python-gssapi)
19604 ("python-pyasn1" ,python-pyasn1)))
19605 (synopsis "Python LDAP client")
19606 (description
19607 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
19608 library.")
19609 (license license:lgpl3+)))
19610
19611 (define-public python-boltons
19612 (package
19613 (name "python-boltons")
19614 (version "20.0.0")
19615 (source
19616 (origin
19617 (method url-fetch)
19618 (uri (pypi-uri "boltons" version))
19619 (sha256
19620 (base32
19621 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
19622 (build-system python-build-system)
19623 (home-page "https://github.com/mahmoud/boltons")
19624 (synopsis "Extensions to the Python standard library")
19625 (description
19626 "Boltons is a set of over 230 pure-Python utilities in the same spirit
19627 as — and yet conspicuously missing from — the standard library, including:
19628
19629 @itemize
19630 @item Atomic file saving, bolted on with fileutils
19631 @item A highly-optimized OrderedMultiDict, in dictutils
19632 @item Two types of PriorityQueue, in queueutils
19633 @item Chunked and windowed iteration, in iterutils
19634 @item Recursive data structure iteration and merging, with iterutils.remap
19635 @item Exponential backoff functionality, including jitter, through
19636 iterutils.backoff
19637 @item A full-featured TracebackInfo type, for representing stack traces, in
19638 tbutils
19639 @end itemize")
19640 (license license:bsd-3)))
19641
19642 (define-public python-eliot
19643 (package
19644 (name "python-eliot")
19645 (version "1.12.0")
19646 (source
19647 (origin
19648 (method url-fetch)
19649 (uri (pypi-uri "eliot" version))
19650 (sha256
19651 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
19652 (build-system python-build-system)
19653 (arguments
19654 `(#:phases
19655 (modify-phases %standard-phases
19656 (add-after 'unpack 'remove-journald-support
19657 (lambda _
19658 (for-each delete-file
19659 '("eliot/tests/test_journald.py"
19660 "eliot/journald.py"))
19661 #t))
19662 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
19663 ;; remove command-line tool's tests. TODO eliot-prettyprint should
19664 ;; be installed and these tests should pass.
19665 (lambda _
19666 (delete-file "eliot/tests/test_prettyprint.py")
19667 #t)))))
19668 (propagated-inputs
19669 `(("python-boltons" ,python-boltons)
19670 ("python-pyrsistent" ,python-pyrsistent)
19671 ("python-six" ,python-six)
19672 ("python-zope-interface" ,python-zope-interface)))
19673 (native-inputs
19674 `(("python-black" ,python-black)
19675 ("python-coverage" ,python-coverage)
19676 ("python-dask" ,python-dask)
19677 ("python-flake8" ,python-flake8)
19678 ("python-hypothesis" ,python-hypothesis)
19679 ("python-pytest" ,python-pytest)
19680 ("python-setuptools" ,python-setuptools)
19681 ("python-sphinx" ,python-sphinx)
19682 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
19683 ("python-testtools" ,python-testtools)
19684 ("python-twine" ,python-twine)
19685 ("python-twisted" ,python-twisted)))
19686 (home-page "https://github.com/itamarst/eliot/")
19687 (synopsis "Eliot: the logging system that tells you why it happened")
19688 (description
19689 "@dfn{eliot} is a Python logging system that outputs causal chains of
19690 actions: actions can spawn other actions, and eventually they either succeed
19691 or fail. The resulting logs tell you the story of what your software did: what
19692 happened, and what caused it.")
19693 (license license:asl2.0)))
19694
19695 (define-public python-pem
19696 (package
19697 (name "python-pem")
19698 (version "20.1.0")
19699 (source
19700 (origin
19701 (method url-fetch)
19702 (uri (pypi-uri "pem" version))
19703 (sha256
19704 (base32
19705 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
19706 (build-system python-build-system)
19707 (native-inputs
19708 `(("python-certifi" ,python-certifi)
19709 ("python-coverage" ,python-coverage)
19710 ("python-pretend" ,python-pretend)
19711 ("python-pyopenssl" ,python-pyopenssl)
19712 ("python-pytest" ,python-pytest)
19713 ("python-sphinx" ,python-sphinx)
19714 ("python-twisted" ,python-twisted)))
19715 (home-page "https://pem.readthedocs.io/")
19716 (synopsis "Easy PEM file parsing in Python")
19717 (description
19718 "This package provides a Python module for parsing and splitting PEM files.")
19719 (license license:expat)))
19720
19721 (define-public python-txsni
19722 ;; We need a few commits on top of 0.1.9 for compatibility with newer
19723 ;; Python and OpenSSL.
19724 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
19725 (revision "0"))
19726 (package
19727 (name "python-txsni")
19728 (version (git-version "0.1.9" revision commit))
19729 (home-page "https://github.com/glyph/txsni")
19730 (source
19731 (origin
19732 (method git-fetch)
19733 (uri (git-reference (url home-page) (commit commit)))
19734 (file-name (git-file-name name version))
19735 (sha256
19736 (base32
19737 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
19738 (build-system python-build-system)
19739 (propagated-inputs
19740 `(("python-pyopenssl" ,python-pyopenssl)
19741 ("python-service-identity" ,python-service-identity)
19742 ("python-twisted" ,python-twisted)))
19743 (synopsis "Run TLS servers with Twisted")
19744 (description
19745 "This package provides an easy-to-use SNI endpoint for use
19746 with the Twisted web framework.")
19747 (license license:expat))))
19748
19749 (define-public python-txacme
19750 (package
19751 (name "python-txacme")
19752 (version "0.9.2")
19753 (source
19754 (origin
19755 (method url-fetch)
19756 (uri (pypi-uri "txacme" version))
19757 (sha256
19758 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
19759 (build-system python-build-system)
19760 (propagated-inputs
19761 `(("python-acme" ,python-acme)
19762 ("python-attrs" ,python-attrs)
19763 ("python-eliot" ,python-eliot)
19764 ("python-josepy" ,python-josepy)
19765 ("python-pem" ,python-pem)
19766 ("python-treq" ,python-treq)
19767 ("python-twisted" ,python-twisted)
19768 ("python-txsni" ,python-txsni)))
19769 (native-inputs
19770 `(("python-fixtures" ,python-fixtures)
19771 ("python-hypothesis" ,python-hypothesis)
19772 ("python-mock" ,python-mock)
19773 ("python-service-identity"
19774 ,python-service-identity)
19775 ("python-testrepository" ,python-testrepository)
19776 ("python-testscenarios" ,python-testscenarios)
19777 ("python-testtools" ,python-testtools)))
19778 (home-page "https://github.com/twisted/txacme")
19779 (synopsis "Twisted implexmentation of the ACME protocol")
19780 (description
19781 "ACME is Automatic Certificate Management Environment, a protocol that
19782 allows clients and certificate authorities to automate verification and
19783 certificate issuance. The ACME protocol is used by the free Let's Encrypt
19784 Certificate Authority.
19785
19786 txacme is an implementation of the protocol for Twisted, the event-driven
19787 networking engine for Python.")
19788 (license license:expat)))
19789
19790 (define-public python-pysaml2
19791 (package
19792 (name "python-pysaml2")
19793 (version "5.0.0")
19794 (source
19795 (origin
19796 (method url-fetch)
19797 (uri (pypi-uri "pysaml2" version))
19798 (sha256
19799 (base32
19800 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
19801 (build-system python-build-system)
19802 (propagated-inputs
19803 `(("python-cryptography" ,python-cryptography)
19804 ("python-dateutil" ,python-dateutil)
19805 ("python-defusedxml" ,python-defusedxml)
19806 ("python-pyopenssl" ,python-pyopenssl)
19807 ("python-pytz" ,python-pytz)
19808 ("python-requests" ,python-requests)
19809 ("python-six" ,python-six)))
19810 (home-page "https://idpy.org")
19811 (synopsis "Python implementation of SAML Version 2 Standard")
19812 (description
19813 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
19814 It contains all necessary pieces for building a SAML2 service provider or
19815 an identity provider. The distribution contains examples of both.
19816
19817 This package was originally written to work in a WSGI environment, but
19818 there are extensions that allow you to use it with other frameworks.")
19819 (license license:asl2.0)))
19820
19821 (define-public python-click-plugins
19822 (package
19823 (name "python-click-plugins")
19824 (version "1.1.1")
19825 (source
19826 (origin
19827 (method url-fetch)
19828 (uri (pypi-uri "click-plugins" version))
19829 (sha256
19830 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
19831 (build-system python-build-system)
19832 (native-inputs
19833 `(("python-pytest" ,python-pytest)))
19834 (propagated-inputs
19835 `(("python-click" ,python-click)))
19836 (synopsis "Extension for Click to register external CLI commands")
19837 (description "This package provides n extension module for Click to
19838 register external CLI commands via setuptools entry-points.")
19839 (home-page "https://github.com/click-contrib/click-plugins")
19840 (license license:bsd-3)))
19841
19842 (define-public python-diceware
19843 (package
19844 (name "python-diceware")
19845 (version "0.9.6")
19846 (source
19847 (origin
19848 (method url-fetch)
19849 (uri (pypi-uri "diceware" version))
19850 (sha256
19851 (base32
19852 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
19853 (build-system python-build-system)
19854 (native-inputs
19855 `(("python-coverage" ,python-coverage)
19856 ("python-pytest" ,python-pytest)
19857 ("python-pytest-runner" ,python-pytest-runner)))
19858 (home-page "https://github.com/ulif/diceware/")
19859 (synopsis "Generates memorable passphrases")
19860 (description "This package generates passphrases by concatenating words
19861 randomly picked from wordlists. It supports several sources of
19862 randomness (including real life dice) and different wordlists (including
19863 cryptographically signed ones).")
19864 (license license:gpl3+)))
19865
19866 (define-public pyzo
19867 (package
19868 (name "pyzo")
19869 (version "4.10.2")
19870 (source
19871 (origin
19872 (method url-fetch)
19873 (uri (pypi-uri "pyzo" version))
19874 (sha256
19875 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
19876 (build-system python-build-system)
19877 (arguments
19878 `(#:phases
19879 (modify-phases %standard-phases
19880 (add-before 'check 'fix-home-directory
19881 (lambda _
19882 ;; Tests fail with "Permission denied: '/homeless-shelter'".
19883 (setenv "HOME" "/tmp")
19884 #t)))
19885 ;; Tests fail with "Uncaught Python exception: invalid literal for
19886 ;; int() with base 10: 'test'".
19887 #:tests? #f))
19888 (propagated-inputs
19889 `(("python-pyqt" ,python-pyqt)))
19890 (home-page "https://pyzo.org")
19891 (synopsis
19892 "Python IDE for scientific computing")
19893 (description
19894 "Pyzo is a Python IDE focused on interactivity and introspection,
19895 which makes it very suitable for scientific computing. Its practical
19896 design is aimed at simplicity and efficiency.
19897
19898 It consists of two main components, the editor and the shell, and uses
19899 a set of pluggable tools to help the programmer in various ways. Some
19900 example tools are source structure, project manager, interactive help,
19901 workspace...")
19902 (license license:bsd-2)))
19903
19904 (define-public python-osc
19905 (package
19906 (name "python-osc")
19907 (version "1.7.4")
19908 (source
19909 (origin
19910 (method url-fetch)
19911 (uri (pypi-uri "python-osc" version))
19912 (sha256
19913 (base32
19914 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
19915 (build-system python-build-system)
19916 (home-page "https://github.com/attwad/python-osc")
19917 (synopsis "Open Sound Control server and client implementations")
19918 (description
19919 "@code{python-osc} is a pure Python library with no external
19920 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
19921 Open Sound Control 1.0} specification.")
19922 (license license:unlicense)))
19923
19924 (define-public python-voluptuous
19925 (package
19926 (name "python-voluptuous")
19927 (version "0.11.7")
19928 (source
19929 (origin
19930 (method url-fetch)
19931 (uri (pypi-uri "voluptuous" version))
19932 (sha256
19933 (base32
19934 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
19935 (build-system python-build-system)
19936 (native-inputs
19937 `(("python-nose" ,python-nose)))
19938 (home-page "https://github.com/alecthomas/voluptuous")
19939 (synopsis "Python data validation library")
19940 (description
19941 "Voluptuous is a Python data validation library. It is primarily
19942 intended for validating data coming into Python as JSON, YAML, etc.")
19943 (license license:bsd-3)))
19944
19945 (define-public python-cmd2
19946 (package
19947 (name "python-cmd2")
19948 (version "1.0.2")
19949 (source
19950 (origin
19951 (method url-fetch)
19952 (uri (pypi-uri "cmd2" version))
19953 (sha256
19954 (base32
19955 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
19956 (build-system python-build-system)
19957 (propagated-inputs
19958 `(("python-attrs" ,python-attrs)
19959 ("python-colorama" ,python-colorama)
19960 ("python-pyperclip" ,python-pyperclip)
19961 ("python-wcwidth" ,python-wcwidth)))
19962 (native-inputs
19963 `(("python-codecov" ,python-codecov)
19964 ("python-coverage" ,python-coverage)
19965 ("python-doc8" ,python-doc8)
19966 ("python-flake8" ,python-flake8)
19967 ("python-invoke" ,python-invoke)
19968 ("python-mock" ,python-mock)
19969 ("python-pytest" ,python-pytest)
19970 ("python-pytest-cov" ,python-pytest-cov)
19971 ("python-pytest-mock" ,python-pytest-mock)
19972 ("python-setuptools-scm" ,python-setuptools-scm)
19973 ("python-sphinx" ,python-sphinx)
19974 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
19975 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
19976 ("python-tox" ,python-tox)
19977 ("python-twine" ,python-twine)
19978 ("which" ,which)))
19979 (home-page "https://github.com/python-cmd2/cmd2")
19980 (synopsis "Tool for building interactive command line applications")
19981 (description
19982 "Cmd2 is a tool for building interactive command line applications in
19983 Python. Its goal is to make it quick and easy for developers to build
19984 feature-rich and user-friendly interactive command line applications. It
19985 provides a simple API which is an extension of Python's built-in @code{cmd}
19986 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
19987 make your life easier and eliminates much of the boilerplate code which would
19988 be necessary when using @code{cmd}.")
19989 (license license:expat)))
19990
19991 (define-public python-pytidylib
19992 (package
19993 (name "python-pytidylib")
19994 (version "0.3.2")
19995 (source (origin
19996 (method url-fetch)
19997 (uri (pypi-uri "pytidylib" version))
19998 (sha256
19999 (base32
20000 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
20001 (build-system python-build-system)
20002 (arguments
20003 '(#:phases
20004 (modify-phases %standard-phases
20005 (add-before 'build 'qualify-libtidy
20006 (lambda* (#:key inputs #:allow-other-keys)
20007 (let ((libtidy (string-append (assoc-ref inputs "tidy")
20008 "/lib/libtidy.so")))
20009 (substitute* "tidylib/tidy.py"
20010 (("ctypes\\.util\\.find_library\\('tidy'\\)")
20011 (format #f "'~a'" libtidy)))
20012 #t))))))
20013 (inputs `(("tidy" ,tidy)))
20014 (home-page "https://github.com/countergram/pytidylib")
20015 (synopsis "Python wrapper for HTML Tidy library")
20016 (description
20017 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
20018 allows you, from Python code, to “fix” invalid (X)HTML markup.")
20019 (license license:expat)))
20020
20021 (define-public python2-pytidylib
20022 (package-with-python2 python-pytidylib))
20023
20024 (define-public python-mujson
20025 (package
20026 (name "python-mujson")
20027 (version "1.4")
20028 (source
20029 (origin
20030 (method url-fetch)
20031 (uri (pypi-uri "mujson" version))
20032 (sha256
20033 (base32
20034 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
20035 (build-system python-build-system)
20036 (home-page "https://github.com/mattgiles/mujson")
20037 (synopsis "Use the fastest JSON functions available at import time")
20038 (description "This packages selects the fastest JSON functions available
20039 at import time.")
20040 (license license:expat)))
20041
20042 (define-public python-bashlex
20043 (package
20044 (name "python-bashlex")
20045 (version "0.14")
20046 (source
20047 (origin
20048 (method url-fetch)
20049 (uri (pypi-uri "bashlex" version))
20050 (sha256
20051 (base32
20052 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
20053 (build-system python-build-system)
20054 (arguments
20055 `(#:phases
20056 (modify-phases %standard-phases
20057 (add-before 'build 'pregenerate-yacc-tables
20058 (lambda _
20059 ;; parser.py caches tables, which attempts to write to site lib
20060 ;; see https://github.com/idank/bashlex/issues/51
20061 (invoke "python" "-c" "import bashlex"))))))
20062 (home-page
20063 "https://github.com/idank/bashlex")
20064 (synopsis "Python parser for bash")
20065 (description "@code{bashlex} is a Python port of the parser used
20066 internally by GNU bash.
20067
20068 For the most part it's transliterated from C, the major differences are:
20069
20070 @itemize
20071 @item it does not execute anything
20072 @item it is reentrant
20073 @item it generates a complete AST
20074 @end itemize
20075 ")
20076 (license license:gpl3+)))