gnu: python-odfpy: Update to 1.4.1.
[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.1")
3033 (source
3034 (origin
3035 (method url-fetch)
3036 (uri (pypi-uri "Jinja2" version))
3037 (sha256
3038 (base32
3039 "0l72c11n959yzb8d3ankckb6yhjhm6x729zm7rkpk040qzxpy64k"))))
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.16")
4009 (source
4010 (origin
4011 (method url-fetch)
4012 (uri (pypi-uri "Cython" version))
4013 (sha256
4014 (base32
4015 "01gs10myw0rw4jsikvqs0859fg7gficxhv508cxvnb4l9wl5a9r3"))))
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.19")
5330 (source
5331 (origin
5332 (method url-fetch)
5333 (uri (pypi-uri "pycparser" version))
5334 (sha256
5335 (base32
5336 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
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.8")
8477 (source
8478 (origin
8479 (method url-fetch)
8480 (uri (pypi-uri "idna" version))
8481 (sha256
8482 (base32
8483 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
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.1")
10144 (source
10145 (origin
10146 (method url-fetch)
10147 (uri (pypi-uri "Mako" version))
10148 (sha256
10149 (base32
10150 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
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.4.1")
12585 (source (origin
12586 (method url-fetch)
12587 (uri (pypi-uri "odfpy" version))
12588 (sha256
12589 (base32
12590 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
12591 (arguments
12592 `(#:phases
12593 (modify-phases %standard-phases
12594 (replace 'check
12595 (lambda _
12596 (setenv "PYTHONPATH" (string-append "./build/lib:"
12597 (getenv "PYTHONPATH")))
12598 (invoke "pytest" "-vv"))))))
12599 (build-system python-build-system)
12600 (native-inputs
12601 `(("python-pytest" ,python-pytest)))
12602 (propagated-inputs
12603 `(("python-defusedxml" ,python-defusedxml)))
12604 (home-page "https://github.com/eea/odfpy")
12605 (synopsis "Python API and tools to manipulate OpenDocument files")
12606 (description "Collection of libraries and utility programs written in
12607 Python to manipulate OpenDocument 1.2 files.")
12608 (license
12609 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12610 ;; number of files with other licenses.
12611 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12612
12613 (define-public python2-odfpy
12614 (package-with-python2 python-odfpy))
12615
12616 (define-public python-natsort
12617 (package
12618 (name "python-natsort")
12619 (version "7.0.1")
12620 (source (origin
12621 (method url-fetch)
12622 (uri (pypi-uri "natsort" version))
12623 (sha256
12624 (base32
12625 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
12626 (build-system python-build-system)
12627 (arguments
12628 `(#:modules ((guix build utils)
12629 (guix build python-build-system)
12630 (srfi srfi-1)
12631 (srfi srfi-26)
12632 (ice-9 ftw))
12633 #:phases
12634 (modify-phases %standard-phases
12635 (add-before 'check 'set-cachedir
12636 ;; Tests require write access to $HOME by default
12637 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
12638 (replace 'check
12639 (lambda _
12640 (let ((cwd (getcwd)))
12641 (setenv "PYTHONPATH"
12642 (string-append
12643 cwd "/build/"
12644 (find (cut string-prefix? "lib" <>)
12645 (scandir (string-append cwd "/build")))
12646 ":"
12647 (getenv "PYTHONPATH")))
12648 (invoke "pytest" "-v")))))))
12649 (native-inputs
12650 `(("python-hypothesis" ,python-hypothesis)
12651 ("python-pytest-cov" ,python-pytest-cov)
12652 ("python-pytest-mock" ,python-pytest-mock)
12653 ("python-pytest" ,python-pytest)))
12654 (propagated-inputs ; TODO: Add python-fastnumbers.
12655 `(("python-pyicu" ,python-pyicu)))
12656 (home-page "https://github.com/SethMMorton/natsort")
12657 (synopsis "Natural sorting for python and shell")
12658 (description
12659 "Natsort lets you apply natural sorting on lists instead of
12660 lexicographical. If you use the built-in @code{sorted} method in python
12661 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
12662 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
12663 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
12664 identifies numbers and sorts them separately from strings. It can also sort
12665 version numbers, real numbers, mixed types and more, and comes with a shell
12666 command @command{natsort} that exposes this functionality in the command line.")
12667 (license license:expat)
12668 (properties `((python2-variant . ,(delay python2-natsort))))))
12669
12670 ;; Natsort 6.x are the last versions with support for Python 2.
12671 (define-public python2-natsort
12672 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12673 (package (inherit base)
12674 (version "6.2.1")
12675 (source (origin
12676 (method url-fetch)
12677 (uri (pypi-uri "natsort" version))
12678 (sha256
12679 (base32
12680 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
12681 (native-inputs
12682 `(("python2-pathlib" ,python2-pathlib)
12683 ,@(package-native-inputs base))))))
12684
12685 (define-public glances
12686 (package
12687 (name "glances")
12688 (version "3.1.4")
12689 (source
12690 (origin
12691 (method url-fetch)
12692 (uri (pypi-uri "Glances" version))
12693 (sha256
12694 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
12695 (modules '((guix build utils)))
12696 (snippet
12697 '(begin
12698 ;; Glances phones PyPI for weekly update checks by default.
12699 ;; Disable these. The user can re-enable them if desired.
12700 (substitute* "glances/outdated.py"
12701 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
12702 (string-append indentation
12703 "self.args.disable_check_update = True\n"
12704 line)))
12705 #t))))
12706 (build-system python-build-system)
12707 (propagated-inputs
12708 `(("python-future" ,python-future)
12709 ("python-psutil" ,python-psutil)))
12710 (home-page "https://github.com/nicolargo/glances")
12711 (synopsis "Cross-platform curses-based monitoring tool")
12712 (description
12713 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12714 Glances uses the PsUtil library to get information from your system. It
12715 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12716 (license license:lgpl3+)))
12717
12718 (define-public python-glances
12719 (deprecated-package "python-glances" glances))
12720
12721 (define-public python-graphql-core
12722 (package
12723 (name "python-graphql-core")
12724 (version "0.5.3")
12725 (source
12726 (origin
12727 (method url-fetch)
12728 (uri (pypi-uri "graphql-core" version))
12729 (sha256
12730 (base32
12731 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12732 (build-system python-build-system)
12733 (arguments
12734 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12735 #:phases
12736 (modify-phases %standard-phases
12737 (add-after 'unpack 'patch-hardcoded-version
12738 (lambda _ (substitute*
12739 "setup.py"
12740 (("'gevent==1.1rc1'") "'gevent'"))
12741 #t)))))
12742 (native-inputs
12743 `(("python-gevent" ,python-gevent)
12744 ("python-mock" ,python-mock)
12745 ("python-pytest-mock" ,python-pytest-mock)))
12746 (propagated-inputs
12747 `(("python-promise" ,python-promise)
12748 ("python-six" ,python-six)))
12749 (home-page "https://github.com/graphql-python/graphql-core")
12750 (synopsis "GraphQL implementation for Python")
12751 (description
12752 "GraphQL implementation for Python. GraphQL is a data query language and
12753 runtime designed and used to request and deliver data to mobile and web apps.
12754 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12755 to Python.")
12756 (license license:expat)))
12757
12758 (define-public python2-graphql-core
12759 (package-with-python2 python-graphql-core))
12760
12761 (define-public python-graphql-relay
12762 (package
12763 (name "python-graphql-relay")
12764 (version "0.4.5")
12765 (source
12766 (origin
12767 (method url-fetch)
12768 (uri (pypi-uri "graphql-relay" version))
12769 (sha256
12770 (base32
12771 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12772 (build-system python-build-system)
12773 (arguments
12774 '(#:tests? #f)) ; The tests are not distributed
12775 (propagated-inputs
12776 `(("python-graphql-core" ,python-graphql-core)
12777 ("python-promise" ,python-promise)
12778 ("python-six" ,python-six)))
12779 (home-page "https://github.com/graphql-python/graphql-relay-py")
12780 (synopsis "Relay implementation for Python")
12781 (description
12782 "This is a library to allow the easy creation of Relay-compliant servers
12783 using the GraphQL Python reference implementation of a GraphQL server. It
12784 should be noted that the code is a exact port of the original
12785 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12786 from Facebook.")
12787 (license license:expat)))
12788
12789 (define-public python2-graphql-relay
12790 (package-with-python2 python-graphql-relay))
12791
12792 (define-public python-graphene
12793 (package
12794 (name "python-graphene")
12795 (version "0.10.2")
12796 (source
12797 (origin
12798 (method url-fetch)
12799 (uri (pypi-uri "graphene" version))
12800 (sha256
12801 (base32
12802 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12803 (build-system python-build-system)
12804 (propagated-inputs
12805 `(("python-graphql-core" ,python-graphql-core)
12806 ("python-graphql-relay" ,python-graphql-relay)
12807 ("python-iso8601" ,python-iso8601)
12808 ("python-promise" ,python-promise)
12809 ("python-six" ,python-six)))
12810 (arguments
12811 `(#:tests? #f)) ; no tests/ in the PyPI tarball
12812 (home-page "https://graphene-python.org/")
12813 (synopsis "GraphQL Framework for Python")
12814 (description
12815 "Graphene is a Python library for building GraphQL schemas/types.
12816 A GraphQL schema describes your data model, and provides a GraphQL server
12817 with an associated set of resolve methods that know how to fetch data.")
12818 (properties `((python2-variant . ,(delay python2-graphene))))
12819 (license license:expat)))
12820
12821 (define-public python2-graphene
12822 (let ((base (package-with-python2
12823 (strip-python2-variant python-graphene))))
12824 (package (inherit base)
12825 (native-inputs
12826 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12827 ,@(package-native-inputs base))))))
12828
12829 (define-public python-nautilus
12830 (package
12831 (name "python-nautilus")
12832 (version "0.4.9")
12833 (source
12834 (origin
12835 (method url-fetch)
12836 (uri (pypi-uri "nautilus" version))
12837 (sha256
12838 (base32
12839 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12840 (build-system python-build-system)
12841 (arguments `(#:tests? #f)) ; fails to import test modules
12842 (propagated-inputs
12843 `(("python-bcrypt" ,python-bcrypt)
12844 ("python-click" ,python-click)
12845 ("python-consul" ,python-consul)
12846 ("python-graphene" ,python-graphene)
12847 ("python-jinja2" ,python-jinja2)
12848 ("python-peewee" ,python-peewee)
12849 ("python-pika" ,python-pika)
12850 ("python-tornado" ,python-tornado)
12851 ("python-wtforms" ,python-wtforms)))
12852 (native-inputs
12853 `(("python-nose2" ,python-nose2)))
12854 (home-page "https://github.com/AlecAivazis/nautilus")
12855 (synopsis "Library for creating microservice applications")
12856 (description
12857 "Nautilus is a framework for flux based microservices that looks to
12858 provide extendible implementations of common aspects of a cloud so that you can
12859 focus on building massively scalable web applications.")
12860 (license license:expat)))
12861
12862 (define-public python-random2
12863 (package
12864 (name "python-random2")
12865 (version "1.0.1")
12866 (source (origin
12867 (method url-fetch)
12868 (uri (pypi-uri "random2" version ".zip"))
12869 (sha256
12870 (base32
12871 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
12872 (build-system python-build-system)
12873 (native-inputs `(("unzip" ,unzip)))
12874 (home-page "http://pypi.python.org/pypi/random2")
12875 (synopsis "Python 3 version of the Python 2 @code{random} module")
12876 (description
12877 "This package provides a Python 3 ported version of Python 2.7’s
12878 @code{random} module. It has also been back-ported to work in Python 2.6.
12879
12880 In Python 3, the implementation of @code{randrange()} was changed, so that
12881 even with the same seed you get different sequences in Python 2 and 3.
12882
12883 This package closes that gap, allowing stable random number generation
12884 between the different Python versions.")
12885 (license license:psfl)))
12886
12887 (define-public python2-random2
12888 (package-with-python2 python-random2))
12889
12890 (define-public python-snowballstemmer
12891 (package
12892 (name "python-snowballstemmer")
12893 (version "2.0.0")
12894 (source (origin
12895 (method url-fetch)
12896 (uri (pypi-uri "snowballstemmer" version))
12897 (sha256
12898 (base32
12899 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
12900 (build-system python-build-system)
12901 (arguments
12902 `(;; No tests exist
12903 #:tests? #f))
12904 (home-page "https://github.com/shibukawa/snowball_py")
12905 (synopsis "Snowball stemming library collection for Python")
12906 (description "This package provides 16 word stemmer algorithms generated
12907 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12908 English stemmer.")
12909 (license license:bsd-3)))
12910
12911 (define-public python2-snowballstemmer
12912 (package-with-python2 python-snowballstemmer))
12913
12914 (define-public python-setproctitle
12915 (package
12916 (name "python-setproctitle")
12917 (version "1.1.10")
12918 (source
12919 (origin
12920 (method url-fetch)
12921 (uri (pypi-uri "setproctitle" version))
12922 (sha256
12923 (base32
12924 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12925 (build-system python-build-system)
12926 (arguments
12927 '(#:phases
12928 (modify-phases %standard-phases
12929 (add-before 'check 'patch-Makefile
12930 ;; Stricly this is only required for the python2 variant.
12931 ;; But adding a phase in an inherited package seems to be
12932 ;; cumbersum. So we patch even for python3.
12933 (lambda _
12934 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12935 (when nose
12936 (substitute* "Makefile"
12937 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12938 (string-append nose "/bin/nosetests "))))
12939 #t)))
12940 (replace 'check
12941 (lambda _
12942 (setenv "PYTHON" (or (which "python3") (which "python")))
12943 (setenv "PYCONFIG" (or (which "python3-config")
12944 (which "python-config")))
12945 (setenv "CC" "gcc")
12946 ;; No need to extend PYTHONPATH to find the built package, since
12947 ;; the Makefile will build anyway
12948 (invoke "make" "check"))))))
12949 (native-inputs
12950 `(("procps" ,procps))) ; required for tests
12951 (home-page
12952 "https://github.com/dvarrazzo/py-setproctitle")
12953 (synopsis
12954 "Setproctitle implementation for Python to customize the process title")
12955 (description "The library allows a process to change its title (as displayed
12956 by system tools such as ps and top).
12957
12958 Changing the title is mostly useful in multi-process systems, for
12959 example when a master process is forked: changing the children's title
12960 allows identifying the task each process is busy with. The technique
12961 is used by PostgreSQL and the OpenSSH Server for example.")
12962 (license license:bsd-3)
12963 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12964
12965 (define-public python2-setproctitle
12966 (let ((base (package-with-python2
12967 (strip-python2-variant python-setproctitle))))
12968 (package
12969 (inherit base)
12970 (native-inputs `(("python2-nose" ,python2-nose)
12971 ,@(package-native-inputs base))))))
12972
12973 (define-public python-validictory
12974 (package
12975 (name "python-validictory")
12976 (version "1.0.1")
12977 (source
12978 (origin
12979 (method url-fetch)
12980 (uri (pypi-uri "validictory" version))
12981 (sha256
12982 (base32
12983 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12984 (build-system python-build-system)
12985 (arguments
12986 '(#:phases
12987 (modify-phases %standard-phases
12988 (add-after 'unpack 'bootstrap
12989 ;; Move the tests out of the package directory to avoid
12990 ;; packaging them.
12991 (lambda* _
12992 (rename-file "validictory/tests" "tests")
12993 (delete-file "tests/__init__.py")))
12994 (replace 'check
12995 (lambda _
12996 ;; Extend PYTHONPATH so the built package will be found.
12997 (setenv "PYTHONPATH"
12998 (string-append (getcwd) "/build/lib:"
12999 (getenv "PYTHONPATH")))
13000 (invoke "py.test" "-vv" ))))))
13001 (native-inputs
13002 `(("python-pytest" ,python-pytest)))
13003 (home-page
13004 "https://github.com/jamesturk/validictory")
13005 (synopsis "General purpose Python data validator")
13006 (description "It allows validation of arbitrary Python data structures.
13007
13008 The schema format is based on the JSON Schema
13009 proposal (http://json-schema.org), so combined with json the library is also
13010 useful as a validator for JSON data.")
13011 (license license:expat)))
13012
13013 (define-public python2-validictory
13014 (package-with-python2 python-validictory))
13015
13016 (define-public python-pyelftools
13017 (package
13018 (name "python-pyelftools")
13019 (version "0.25")
13020 (source
13021 (origin
13022 (method url-fetch)
13023 (uri (pypi-uri "pyelftools" version))
13024 (sha256
13025 (base32
13026 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
13027 (build-system python-build-system)
13028 (arguments
13029 `(#:phases
13030 (modify-phases %standard-phases
13031 (add-before 'check 'set-pythonpath
13032 (lambda _
13033 (setenv "PYTHONPATH"
13034 (string-append
13035 (getcwd) "/test/"
13036 ":" (getenv "PYTHONPATH")))
13037 #t)))))
13038 (home-page
13039 "https://github.com/eliben/pyelftools")
13040 (synopsis
13041 "Analyze binary and library file information")
13042 (description "This Python library provides interfaces for parsing and
13043 analyzing two binary and library file formats; the Executable and Linking
13044 Format (ELF), and debugging information in the Debugging With Attributed
13045 Record Format (DWARF).")
13046 (license license:public-domain)))
13047
13048 (define-public python-pyev
13049 (package
13050 (name "python-pyev")
13051 (version "0.9.0")
13052 (source
13053 (origin
13054 (method url-fetch)
13055 (uri (pypi-uri "pyev" version))
13056 (sha256
13057 (base32
13058 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13059 (build-system python-build-system)
13060 (arguments
13061 `(#:tests? #f ; no test suite
13062 #:phases
13063 (modify-phases %standard-phases
13064 (add-after 'unpack 'patch
13065 (lambda* (#:key inputs #:allow-other-keys)
13066 (let ((libev (string-append (assoc-ref inputs "libev")
13067 "/lib/libev.so.4")))
13068 (substitute* "setup.py"
13069 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13070 (string-append "libev_dll_name = \"" libev "\"")))))))))
13071 (inputs
13072 `(("libev" ,libev)))
13073 (home-page "http://pythonhosted.org/pyev/")
13074 (synopsis "Python libev interface")
13075 (description "Pyev provides a Python interface to libev.")
13076 (license license:gpl3)))
13077
13078 (define-public python2-pyev
13079 (package-with-python2 python-pyev))
13080
13081 (define-public python-imagesize
13082 (package
13083 (name "python-imagesize")
13084 (version "1.2.0")
13085 (source
13086 (origin
13087 (method url-fetch)
13088 (uri (pypi-uri "imagesize" version))
13089 (sha256
13090 (base32
13091 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
13092 (build-system python-build-system)
13093 (home-page "https://github.com/shibukawa/imagesize_py")
13094 (synopsis "Gets image size of files in various formats in Python")
13095 (description
13096 "This package allows determination of image size from
13097 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13098 (license license:expat)))
13099
13100 (define-public python2-imagesize
13101 (package-with-python2 python-imagesize))
13102
13103 (define-public python-termstyle
13104 (package
13105 (name "python-termstyle")
13106 (version "0.1.11")
13107 (source
13108 (origin
13109 (method url-fetch)
13110 (uri (pypi-uri "termstyle" version))
13111 (sha256
13112 (base32
13113 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13114 (build-system python-build-system)
13115 (arguments
13116 '(#:phases
13117 (modify-phases %standard-phases
13118 (replace 'check
13119 (lambda _
13120 (invoke "python" "test3.py"))))))
13121 (home-page "https://github.com/gfxmonk/termstyle")
13122 (synopsis "Console text coloring for Python")
13123 (description "This package provides console text coloring for Python.")
13124 (license license:bsd-3)))
13125
13126 (define-public python-argcomplete
13127 (package
13128 (name "python-argcomplete")
13129 (version "1.11.1")
13130 (source
13131 (origin
13132 (method url-fetch)
13133 (uri (pypi-uri "argcomplete" version))
13134 (sha256
13135 (base32
13136 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
13137 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
13138 (build-system python-build-system)
13139 (native-inputs
13140 `(("python-coverage" ,python-coverage)
13141 ("python-flake8" ,python-flake8)
13142 ("python-pexpect" ,python-pexpect)
13143 ("python-wheel" ,python-wheel)
13144 ("tcsh" ,tcsh)
13145 ("fish" ,fish)
13146 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
13147 (home-page "https://github.com/kislyuk/argcomplete")
13148 (synopsis "Shell tab completion for Python argparse")
13149 (description "argcomplete provides extensible command line tab completion
13150 of arguments and options for Python scripts using @code{argparse}. It's
13151 particularly useful for programs with many options or sub-parsers that can
13152 dynamically suggest completions; for example, when browsing resources over the
13153 network.")
13154 (license license:asl2.0)))
13155
13156 (define-public python2-argcomplete
13157 (package-with-python2 python-argcomplete))
13158
13159 (define-public python-xopen
13160 (package
13161 (name "python-xopen")
13162 (version "0.5.0")
13163 (source
13164 (origin
13165 (method url-fetch)
13166 (uri (pypi-uri "xopen" version))
13167 (sha256
13168 (base32
13169 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
13170 (build-system python-build-system)
13171 (propagated-inputs
13172 `(("python-setuptools-scm" ,python-setuptools-scm)))
13173 (home-page "https://github.com/marcelm/xopen/")
13174 (synopsis "Open compressed files transparently")
13175 (description "This module provides an @code{xopen} function that works like
13176 Python's built-in @code{open} function, but can also deal with compressed files.
13177 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13178 recognized by their file extensions. The focus is on being as efficient as
13179 possible on all supported Python versions.")
13180 (license license:expat)))
13181
13182 (define-public python2-xopen
13183 (let ((base (package-with-python2
13184 (strip-python2-variant python-xopen))))
13185 (package
13186 (inherit base)
13187 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
13188 ,@(package-propagated-inputs base))))))
13189
13190 (define-public python-cheetah
13191 (package
13192 (name "python-cheetah")
13193 (version "3.2.4")
13194 (source
13195 (origin
13196 (method url-fetch)
13197 (uri (pypi-uri "Cheetah3" version))
13198 (sha256
13199 (base32
13200 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
13201 (build-system python-build-system)
13202 (arguments
13203 `(#:modules ((guix build utils)
13204 (guix build python-build-system)
13205 (ice-9 ftw)
13206 (srfi srfi-1)
13207 (srfi srfi-26))
13208 #:phases (modify-phases %standard-phases
13209 (add-after 'unpack 'use-absolute-python
13210 (lambda _
13211 (substitute* "Cheetah/CheetahWrapper.py"
13212 (("#!/usr/bin/env python")
13213 (string-append "#!" (which "python"))))
13214 #t))
13215 (add-after 'unpack 'fix-tests
13216 (lambda _
13217 (substitute* "Cheetah/Tests/ImportHooks.py"
13218 (("os.path.dirname\\(__file__\\)")
13219 (string-append "'" (getcwd) "/Cheetah/Tests'")))
13220 #t))
13221 (replace 'check
13222 (lambda _
13223 (let ((cwd (getcwd)))
13224 (setenv "PYTHONPATH"
13225 (string-append
13226 cwd "/build/"
13227 (find (cut string-prefix? "lib" <>)
13228 (scandir (string-append cwd "/build")))
13229 ":" (getenv "PYTHONPATH")))
13230 (setenv "PATH"
13231 (string-append (getenv "PATH")
13232 ":" cwd "/bin"))
13233 (setenv "TMPDIR" "/tmp")
13234
13235 (substitute* "Cheetah/Tests/Test.py"
13236 (("unittest.TextTestRunner\\(\\)")
13237 "unittest.TextTestRunner(verbosity=2)"))
13238
13239 (invoke "python" "Cheetah/Tests/Test.py")))))))
13240 (propagated-inputs
13241 `(("python-markdown" ,python-markdown))) ;optional
13242 (home-page "https://cheetahtemplate.org/")
13243 (synopsis "Template engine")
13244 (description "Cheetah is a text-based template engine and Python code
13245 generator.
13246
13247 Cheetah can be used as a standalone templating utility or referenced as
13248 a library from other Python applications. It has many potential uses,
13249 but web developers looking for a viable alternative to ASP, JSP, PHP and
13250 PSP are expected to be its principle user group.
13251
13252 Features:
13253 @enumerate
13254 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13255 text-based format.
13256 @item Cleanly separates content, graphic design, and program code.
13257 @item Blends the power and flexibility of Python with a simple template language
13258 that non-programmers can understand.
13259 @item Gives template writers full access to any Python data structure, module,
13260 function, object, or method in their templates.
13261 @item Makes code reuse easy by providing an object-orientated interface to
13262 templates that is accessible from Python code or other Cheetah templates.
13263 One template can subclass another and selectively reimplement sections of it.
13264 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13265 improve the performance of a dynamic website.
13266 @item Compiles templates into optimized, yet readable, Python code.
13267 @end enumerate")
13268 (license (license:x11-style "file://LICENSE"))))
13269
13270 (define-public python2-cheetah
13271 (package-with-python2 python-cheetah))
13272
13273 (define-public python-dulwich
13274 (package
13275 (name "python-dulwich")
13276 (version "0.19.16")
13277 (source
13278 (origin
13279 (method url-fetch)
13280 (uri (list (string-append "https://www.dulwich.io/releases/"
13281 "dulwich-" version ".tar.gz")
13282 (pypi-uri "dulwich" version)))
13283 (sha256
13284 (base32
13285 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
13286 (build-system python-build-system)
13287 (arguments
13288 `(#:phases
13289 (modify-phases %standard-phases
13290 (add-before 'check 'fix-tests
13291 (lambda* (#:key inputs #:allow-other-keys)
13292 ;; The tests use Popen with a custom environment which doesn't
13293 ;; include PATH.
13294 (substitute* "dulwich/tests/compat/utils.py"
13295 (("'git'") (string-append "'"
13296 (which "git")
13297 "'")))
13298 (substitute* '("dulwich/tests/test_repository.py"
13299 "dulwich/tests/test_hooks.py")
13300 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13301 (setenv "TEST_RUNNER" "unittest")
13302 (setenv "PYTHONHASHSEED" "random")
13303 #t)))))
13304 (propagated-inputs
13305 `(("python-fastimport" ,python-fastimport)
13306 ("python-urllib3" ,python-urllib3)))
13307 (native-inputs
13308 `(("python-mock" ,python-mock)
13309 ("python-geventhttpclient" ,python-geventhttpclient)
13310 ("git" ,git)))
13311 (home-page "https://www.dulwich.io/")
13312 (synopsis "Git implementation in Python")
13313 (description "Dulwich is an implementation of the Git file formats and
13314 protocols written in pure Python.")
13315 ;; Can be used with either license.
13316 (license (list license:asl2.0 license:gpl2+))))
13317
13318 (define-public python2-dulwich
13319 (package-with-python2 python-dulwich))
13320
13321 (define-public python-pbkdf2
13322 (package
13323 (name "python-pbkdf2")
13324 (version "1.3")
13325 (source
13326 (origin
13327 (method url-fetch)
13328 (uri (pypi-uri "pbkdf2" version))
13329 (sha256
13330 (base32
13331 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13332 (build-system python-build-system)
13333 (arguments
13334 '(#:phases
13335 (modify-phases %standard-phases
13336 (replace 'check
13337 (lambda _
13338 (setenv "PYTHONPATH"
13339 (string-append (getcwd) "/build/lib:"
13340 (getenv "PYTHONPATH")))
13341 (invoke "python" "test/test_pbkdf2.py"))))))
13342 (propagated-inputs
13343 `(("python-pycrypto" ,python-pycrypto))) ; optional
13344 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
13345 (synopsis "Password-based key derivation")
13346 (description "This module implements the password-based key derivation
13347 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13348
13349 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13350 is part of the RSA Public Key Cryptography Standards series. The provided
13351 implementation takes a password or a passphrase and a salt value (and
13352 optionally a iteration count, a digest module, and a MAC module) and provides
13353 a file-like object from which an arbitrarly-sized key can be read.")
13354 (license license:expat)))
13355
13356 (define-public python2-pbkdf2
13357 (package-with-python2 python-pbkdf2))
13358
13359 (define-public python-qrcode
13360 (package
13361 (name "python-qrcode")
13362 (version "6.1")
13363 (source
13364 (origin
13365 (method url-fetch)
13366 (uri (pypi-uri "qrcode" version))
13367 (sha256
13368 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
13369 (build-system python-build-system)
13370 (arguments
13371 ;; FIXME: Tests require packaging 'pymaging'.
13372 '(#:tests? #f))
13373 (propagated-inputs
13374 `(("python-lxml" ,python-lxml) ; for SVG output
13375 ("python-pillow" ,python-pillow) ; for PNG output
13376 ("python-six" ,python-six)))
13377 (home-page "https://github.com/lincolnloop/python-qrcode")
13378 (synopsis "QR Code image generator")
13379 (description "This package provides a pure Python QR Code generator
13380 module. It uses the Python Imaging Library (PIL) to allow for the generation
13381 of QR Codes.
13382
13383 In addition this package provides a command line tool to generate QR codes and
13384 either write these QR codes to a file or do the output as ascii art at the
13385 console.")
13386 (license license:bsd-3)))
13387
13388 (define-public python2-qrcode
13389 (package-with-python2 python-qrcode))
13390
13391 (define-public python-rst2ansi
13392 (package
13393 (name "python-rst2ansi")
13394 (version "0.1.5")
13395 (source
13396 (origin
13397 (method url-fetch)
13398 (uri (pypi-uri "rst2ansi" version))
13399 (sha256
13400 (base32
13401 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13402 (build-system python-build-system)
13403 (propagated-inputs
13404 `(("python-docutils" ,python-docutils)))
13405 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13406 (synopsis "Convert RST to ANSI-decorated console output")
13407 (description
13408 "Python module dedicated to rendering RST (reStructuredText) documents
13409 to ansi-escaped strings suitable for display in a terminal.")
13410 (license license:expat)))
13411
13412 (define-public python-ansi2html
13413 (package
13414 (name "python-ansi2html")
13415 (version "1.2.0")
13416 (source
13417 (origin
13418 (method url-fetch)
13419 (uri (pypi-uri "ansi2html" version))
13420 (sha256
13421 (base32
13422 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13423 (build-system python-build-system)
13424 (native-inputs
13425 `(("python-mock" ,python-mock)
13426 ("python-nose" ,python-nose)))
13427 (propagated-inputs
13428 `(("python-six" ,python-six)))
13429 (home-page "https://github.com/ralphbean/ansi2html")
13430 (synopsis "Convert ANSI-decorated console output to HTML")
13431 (description
13432 "@command{ansi2html} is a Python library and command line utility for
13433 convering text with ANSI color codes to HTML or LaTeX.")
13434 (license license:gpl3+)))
13435
13436 (define-public python2-ansi2html
13437 (package-with-python2 python-ansi2html))
13438
13439 (define-public python-ddt
13440 (package
13441 (name "python-ddt")
13442 (version "1.1.3")
13443 (source
13444 (origin
13445 (method url-fetch)
13446 (uri (pypi-uri "ddt" version))
13447 (sha256
13448 (base32
13449 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
13450 (build-system python-build-system)
13451 (native-inputs
13452 `(("python-mock" ,python-mock)
13453 ("python-nose" ,python-nose)))
13454 (propagated-inputs
13455 `(("python-six" ,python-six)
13456 ("python-pyyaml" ,python-pyyaml)))
13457 (home-page "https://github.com/txels/ddt")
13458 (synopsis "Data-Driven Tests")
13459 (description
13460 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
13461 running it with different test data, and make it appear as multiple test
13462 cases.")
13463 (license license:expat)))
13464
13465 (define-public python2-ddt
13466 (package-with-python2 python-ddt))
13467
13468 (define-public python-pycountry
13469 (package
13470 (name "python-pycountry")
13471 (version "18.5.26")
13472 (source
13473 (origin
13474 (method url-fetch)
13475 (uri (pypi-uri "pycountry" version))
13476 (sha256
13477 (base32
13478 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
13479 (build-system python-build-system)
13480 (home-page "https://bitbucket.org/flyingcircus/pycountry")
13481 (synopsis "ISO databases for languages, countries, currencies, etc.")
13482 (description
13483 "@code{pycountry} provides the ISO databases for the standards:
13484 @enumerate
13485 @item 639-3 (Languages)
13486 @item 3166 (Countries)
13487 @item 3166-3 (Deleted Countries)
13488 @item 3166-2 (Subdivisions of countries)
13489 @item 4217 (Currencies)
13490 @item 15924 (Scripts)
13491 @end enumerate
13492 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
13493 through a Python API.")
13494 (license license:lgpl2.1+)))
13495
13496 (define-public python2-pycountry
13497 (package-with-python2 python-pycountry))
13498
13499 (define-public python-pycosat
13500 (package
13501 (name "python-pycosat")
13502 (version "0.6.1")
13503 (source
13504 (origin
13505 (method url-fetch)
13506 (uri (pypi-uri "pycosat" version))
13507 (sha256
13508 (base32
13509 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13510 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13511 (build-system python-build-system)
13512 (home-page "https://github.com/ContinuumIO/pycosat")
13513 (synopsis "Bindings to picosat (a SAT solver)")
13514 (description
13515 "This package provides efficient Python bindings to @code{picosat} on
13516 the C level. When importing pycosat, the @code{picosat} solver becomes part
13517 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13518 Problem} (SAT) solver.")
13519 (license license:expat)))
13520
13521 (define-public python2-pycosat
13522 (package-with-python2 python-pycosat))
13523
13524 (define-public python2-ruamel.ordereddict
13525 (package
13526 (name "python2-ruamel.ordereddict")
13527 (version "0.4.9")
13528 (source
13529 (origin
13530 (method url-fetch)
13531 (uri (pypi-uri "ruamel.ordereddict" version))
13532 (sha256
13533 (base32
13534 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13535 (build-system python-build-system)
13536 (arguments
13537 `(#:python ,python-2
13538 #:phases
13539 (modify-phases %standard-phases
13540 (delete 'check)
13541 (add-after 'install 'check
13542 (lambda* (#:key inputs outputs #:allow-other-keys)
13543 (add-installed-pythonpath inputs outputs)
13544 (invoke "python" "test/testordereddict.py"))))))
13545 (home-page "https://bitbucket.org/ruamel/ordereddict")
13546 (synopsis "Version of dict that keeps keys in insertion order")
13547 (description
13548 "This is an implementation of an ordered dictionary with @dfn{Key
13549 Insertion Order} (KIO: updates of values do not affect the position of the
13550 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13551 removed and put at the back). The standard library module @code{OrderedDict},
13552 implemented later, implements a subset of @code{ordereddict} functionality.
13553 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13554 Order} (KSO, no sorting function can be specified, but a transform can be
13555 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13556 (license license:expat)))
13557
13558 (define-public python-pypeg2
13559 (package
13560 (name "python-pypeg2")
13561 (version "2.15.2")
13562 (source
13563 (origin
13564 (method url-fetch)
13565 (uri (pypi-uri "pyPEG2" version))
13566 (sha256
13567 (base32
13568 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13569 (build-system python-build-system)
13570 (propagated-inputs `(("python-lxml" ,python-lxml)))
13571 (arguments
13572 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13573 '(#:tests? #f))
13574 (home-page "https://fdik.org/pyPEG/")
13575 (synopsis "Parsering Expression Grammars in Python")
13576 (description "PyPEG is an intrinsic parser interpreter framework for
13577 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13578 parse many formal languages.")
13579 (license license:gpl2)))
13580
13581 (define-public python-incremental
13582 (package
13583 (name "python-incremental")
13584 (version "17.5.0")
13585 (source
13586 (origin
13587 (method url-fetch)
13588 (uri (pypi-uri "incremental" version))
13589 (sha256
13590 (base32
13591 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
13592 (build-system python-build-system)
13593 (home-page "https://github.com/hawkowl/incremental")
13594 (synopsis "Library for versioning Python projects")
13595 (description "Incremental is a small library that versions your Python
13596 projects.")
13597 (license license:expat)))
13598
13599 (define-public python2-incremental
13600 (package-with-python2 python-incremental))
13601
13602 (define-public python-invoke
13603 (package
13604 (name "python-invoke")
13605 (home-page "https://www.pyinvoke.org/")
13606 (version "1.3.0")
13607 (source (origin
13608 (method url-fetch)
13609 (uri (pypi-uri "invoke" version))
13610 (sha256
13611 (base32
13612 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
13613 (build-system python-build-system)
13614 (arguments
13615 ;; XXX: Requires many dependencies that are not yet in Guix.
13616 `(#:tests? #f))
13617 (synopsis "Pythonic task execution")
13618 (description
13619 "Invoke is a Python task execution tool and library, drawing inspiration
13620 from various sources to arrive at a powerful and clean feature set. It is
13621 evolved from the Fabric project, but focuses on local and abstract concerns
13622 instead of servers and network commands.")
13623 (license license:bsd-3)))
13624
13625 (define-public python2-invoke
13626 (package-with-python2 python-invoke))
13627
13628 (define-public python-automat
13629 (package
13630 (name "python-automat")
13631 (version "20.2.0")
13632 (source (origin
13633 (method url-fetch)
13634 (uri (pypi-uri "Automat" version))
13635 (sha256
13636 (base32
13637 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
13638 (build-system python-build-system)
13639 ;; We disable the tests because they require python-twisted, while
13640 ;; python-twisted depends on python-automat. Twisted is optional, but the
13641 ;; tests fail if it is not available. Also see
13642 ;; <https://github.com/glyph/automat/issues/71>.
13643 (arguments '(#:tests? #f))
13644 (native-inputs
13645 `(("python-m2r" ,python-m2r)
13646 ("python-setuptools-scm" ,python-setuptools-scm)
13647 ("python-graphviz" ,python-graphviz)))
13648 (propagated-inputs
13649 `(("python-six" ,python-six)
13650 ("python-attrs" ,python-attrs)))
13651 (home-page "https://github.com/glyph/Automat")
13652 (synopsis "Self-service finite-state machines")
13653 (description "Automat is a library for concise, idiomatic Python
13654 expression of finite-state automata (particularly deterministic finite-state
13655 transducers).")
13656 (license license:expat)))
13657
13658 (define-public python2-automat
13659 (package-with-python2 python-automat))
13660
13661 (define-public python-m2r
13662 (package
13663 (name "python-m2r")
13664 (version "0.2.1")
13665 (source (origin
13666 (method url-fetch)
13667 (uri (pypi-uri "m2r" version))
13668 (sha256
13669 (base32
13670 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
13671 (build-system python-build-system)
13672 (propagated-inputs
13673 `(("python-docutils" ,python-docutils)
13674 ("python-mistune" ,python-mistune)))
13675 (native-inputs
13676 `(("python-pygments" ,python-pygments)
13677 ("python-mock" ,python-mock)))
13678 (home-page "https://github.com/miyakogi/m2r")
13679 (synopsis "Markdown to reStructuredText converter")
13680 (description "M2R converts a markdown file including reST markups to valid
13681 reST format.")
13682 (license license:expat)))
13683
13684 (define-public python2-m2r
13685 (package-with-python2 python-m2r))
13686
13687 (define-public python-constantly
13688 (package
13689 (name "python-constantly")
13690 (version "15.1.0")
13691 (source (origin
13692 (method url-fetch)
13693 (uri (pypi-uri "constantly" version))
13694 (sha256
13695 (base32
13696 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
13697 (build-system python-build-system)
13698 (home-page "https://github.com/twisted/constantly")
13699 (synopsis "Symbolic constants in Python")
13700 (description "Constantly is a Python library that provides symbolic
13701 constant support. It includes collections and constants with text, numeric,
13702 and bit flag values.")
13703 (license license:expat)))
13704
13705 (define-public python2-constantly
13706 (package-with-python2 python-constantly))
13707
13708 (define-public python-attrs
13709 (package
13710 (name "python-attrs")
13711 (version "19.3.0")
13712 (source (origin
13713 (method url-fetch)
13714 (uri (pypi-uri "attrs" version))
13715 (sha256
13716 (base32
13717 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
13718 (build-system python-build-system)
13719 (arguments
13720 `(#:modules ((guix build utils)
13721 (guix build python-build-system)
13722 (ice-9 ftw)
13723 (srfi srfi-1)
13724 (srfi srfi-26))
13725 #:phases (modify-phases %standard-phases
13726 (replace 'check
13727 (lambda _
13728 (let ((cwd (getcwd)))
13729 (setenv "PYTHONPATH"
13730 (string-append
13731 cwd "/build/"
13732 (find (cut string-prefix? "lib" <>)
13733 (scandir (string-append cwd "/build")))
13734 ":"
13735 (getenv "PYTHONPATH")))
13736 (invoke "python" "-m" "pytest")))))))
13737 (native-inputs
13738 `(("python-coverage" ,python-coverage)
13739 ("python-hypothesis" ,python-hypothesis)
13740 ("python-pympler" ,python-pympler)
13741 ("python-pytest" ,python-pytest)
13742 ("python-six" ,python-six)
13743 ("python-sphinx" ,python-sphinx)
13744 ("python-zope-interface" ,python-zope-interface)))
13745 (home-page "https://github.com/python-attrs/attrs/")
13746 (synopsis "Attributes without boilerplate")
13747 (description "@code{attrs} is a Python package with class decorators that
13748 ease the chores of implementing the most common attribute-related object
13749 protocols.")
13750 (license license:expat)))
13751
13752 (define-public python2-attrs
13753 (package-with-python2 python-attrs))
13754
13755 (define-public python-attrs-bootstrap
13756 (package
13757 (inherit python-attrs)
13758 (name "python-attrs-bootstrap")
13759 (native-inputs `())
13760 (arguments `(#:tests? #f))))
13761
13762 (define-public python2-attrs-bootstrap
13763 (package-with-python2 python-attrs-bootstrap))
13764
13765 (define-public python2-cliapp
13766 (package
13767 (name "python2-cliapp")
13768 (version "1.20180812.1")
13769 (source
13770 (origin
13771 (method url-fetch)
13772 (uri (string-append
13773 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13774 version ".tar.gz"))
13775 (sha256
13776 (base32
13777 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
13778 (build-system python-build-system)
13779 (arguments
13780 `(#:python ,python-2
13781 #:phases
13782 (modify-phases %standard-phases
13783 ;; check phase needs to be run before the build phase. If not,
13784 ;; coverage-test-runner looks for tests for the built source files,
13785 ;; and fails.
13786 (delete 'check)
13787 (add-before 'build 'check
13788 (lambda _
13789 ;; Disable python3 tests
13790 (substitute* "check"
13791 (("python3") "# python3"))
13792 (invoke "./check"))))))
13793 (native-inputs
13794 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13795 ("python2-pep8" ,python2-pep8)))
13796 (propagated-inputs
13797 `(("python2-pyaml" ,python2-pyaml)))
13798 (home-page "https://liw.fi/cliapp/")
13799 (synopsis "Python framework for command line programs")
13800 (description "@code{python2-cliapp} is a python framework for
13801 command line programs. It contains the typical stuff such programs
13802 need to do, such as parsing the command line for options, and
13803 iterating over input files.")
13804 (license license:gpl2+)))
13805
13806 (define-public python2-ttystatus
13807 (package
13808 (name "python2-ttystatus")
13809 (version "0.36")
13810 (source
13811 (origin
13812 (method url-fetch)
13813 (uri (string-append
13814 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13815 version ".tar.gz"))
13816 (sha256
13817 (base32
13818 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
13819 (build-system python-build-system)
13820 (native-inputs
13821 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13822 ("python2-pep8" ,python2-pep8)))
13823 (arguments
13824 `(#:python ,python-2
13825 #:phases
13826 (modify-phases %standard-phases
13827 ;; check phase needs to be run before the build phase. If not,
13828 ;; coverage-test-runner looks for tests for the built source files,
13829 ;; and fails.
13830 (delete 'check)
13831 (add-before 'build 'check
13832 (lambda _ (invoke "make" "check"))))))
13833 (home-page "https://liw.fi/ttystatus/")
13834 (synopsis "Python library for showing progress reporting and
13835 status updates on terminals")
13836 (description "@code{python2-ttystatus} is a python library for
13837 showing progress reporting and status updates on terminals, for
13838 command line programs. Output is automatically adapted to the width
13839 of the terminal: truncated if it does not fit, and resized if the
13840 terminal size changes.")
13841 (license license:gpl3+)))
13842
13843 (define-public python2-tracing
13844 (package
13845 (name "python2-tracing")
13846 (version "0.10")
13847 (source
13848 (origin
13849 (method url-fetch)
13850 (uri (string-append
13851 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13852 version ".tar.gz"))
13853 (sha256
13854 (base32
13855 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13856 (build-system python-build-system)
13857 (arguments
13858 `(#:python ,python-2))
13859 (home-page "https://liw.fi/tracing/")
13860 (synopsis "Python debug logging helper")
13861 (description "@code{python2-tracing} is a python library for
13862 logging debug messages. It provides a way to turn debugging messages
13863 on and off, based on the filename they occur in. It is much faster
13864 than using @code{logging.Filter} to accomplish the same thing, which
13865 matters when code is run in production mode. The actual logging still
13866 happens using the @code{logging} library.")
13867 (license license:gpl3+)))
13868
13869 (define-public python2-larch
13870 (package
13871 (name "python2-larch")
13872 (version "1.20151025")
13873 (source
13874 (origin
13875 (method url-fetch)
13876 (uri (string-append
13877 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13878 version ".tar.gz"))
13879 (patches (search-patches
13880 "python2-larch-coverage-4.0a6-compatibility.patch"))
13881 (sha256
13882 (base32
13883 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13884 (build-system python-build-system)
13885 (arguments
13886 `(#:python ,python-2
13887 #:phases
13888 (modify-phases %standard-phases
13889 ;; check phase needs to be run before the build phase. If not,
13890 ;; coverage-test-runner looks for tests for the built source files,
13891 ;; and fails.
13892 (delete 'check)
13893 (add-before 'build 'check
13894 (lambda _ (invoke "make" "check"))))))
13895 (native-inputs
13896 `(("cmdtest" ,cmdtest)
13897 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13898 (propagated-inputs
13899 `(("python2-tracing" ,python2-tracing)))
13900 (home-page "https://liw.fi/larch/")
13901 (synopsis "Python copy-on-write B-tree library")
13902 (description "@code{python2-larch} is an implementation of
13903 particular kind of B-tree, based on research by Ohad Rodeh. See
13904 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13905 on the data structure.
13906
13907 The distinctive feature of this B-tree is that a node is never
13908 (conceptually) modified. Instead, all updates are done by
13909 copy-on-write. This makes it easy to clone a tree, and modify only the
13910 clone, while other processes access the original tree.")
13911 (license license:gpl3+)))
13912
13913 (define-public python-astroid
13914 (package
13915 (name "python-astroid")
13916 (version "2.4.1")
13917 (source
13918 (origin
13919 (method url-fetch)
13920 (uri (pypi-uri "astroid" version))
13921 (sha256
13922 (base32 "1h99jal7ax07xna1djw5z7hpgb8vjrl3hrrg49p1phljwniww5sc"))))
13923 (build-system python-build-system)
13924 (propagated-inputs
13925 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13926 ("python-six" ,python-six)
13927 ("python-wrapt" ,python-wrapt)))
13928 (native-inputs
13929 `(("python-dateutil" ,python-dateutil)
13930 ("python-pytest" ,python-pytest)
13931 ("python-pytest-runner" ,python-pytest-runner)))
13932 (home-page "https://github.com/PyCQA/astroid")
13933 (synopsis "Common base representation of python source code for pylint and
13934 other projects")
13935 (description "@code{python-astroid} provides a common base representation
13936 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13937
13938 It provides a compatible representation which comes from the _ast module. It
13939 rebuilds the tree generated by the builtin _ast module by recursively walking
13940 down the AST and building an extended ast. The new node classes have
13941 additional methods and attributes for different usages. They include some
13942 support for static inference and local name scopes. Furthermore, astroid
13943 builds partial trees by inspecting living objects.")
13944 (license license:lgpl2.1+)
13945 (properties `((python2-variant . ,(delay python2-astroid))))))
13946
13947 (define-public python2-astroid
13948 (let ((base (package-with-python2
13949 (strip-python2-variant python-astroid))))
13950 (package (inherit base)
13951 ;; Version 2.x removes python2 support.
13952 (version "1.6.5")
13953 (source
13954 (origin
13955 (method url-fetch)
13956 (uri (pypi-uri "astroid" version))
13957 (sha256
13958 (base32
13959 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13960 (arguments
13961 (substitute-keyword-arguments (package-arguments base)
13962 ((#:phases phases)
13963 `(modify-phases ,phases
13964 (add-after 'unpack 'remove-spurious-test
13965 (lambda _
13966 ;; https://github.com/PyCQA/astroid/issues/276
13967 (delete-file "astroid/tests/unittest_brain.py")
13968 #t))
13969 (replace 'check
13970 (lambda _
13971 (invoke"python" "-m" "unittest" "discover"
13972 "-p" "unittest*.py")))))))
13973 (native-inputs `())
13974 (propagated-inputs
13975 `(("python2-backports-functools-lru-cache"
13976 ,python2-backports-functools-lru-cache)
13977 ("python2-enum34" ,python2-enum34)
13978 ("python2-singledispatch" ,python2-singledispatch)
13979 ,@(alist-delete "python-typed-ast"
13980 (package-propagated-inputs base)))))))
13981
13982 (define-public python-isort
13983 (package
13984 (name "python-isort")
13985 (version "4.3.4")
13986 (source
13987 (origin
13988 (method git-fetch)
13989 (uri (git-reference
13990 ;; Tests pass only from the Github sources
13991 (url "https://github.com/timothycrosley/isort")
13992 (commit version)))
13993 (file-name (git-file-name name version))
13994 (sha256
13995 (base32
13996 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
13997 (build-system python-build-system)
13998 (native-inputs
13999 `(("python-mock" ,python-mock)
14000 ("python-pytest" ,python-pytest)))
14001 (home-page "https://github.com/timothycrosley/isort")
14002 (synopsis "Python utility/library to sort python imports")
14003 (description "@code{python-isort} is a python utility/library to sort
14004 imports alphabetically, and automatically separated into sections. It
14005 provides a command line utility, a python library and plugins for various
14006 editors.")
14007 (license license:expat)
14008 (properties `((python2-variant . ,(delay python2-isort))))))
14009
14010 (define-public python2-isort
14011 (let ((base (package-with-python2
14012 (strip-python2-variant python-isort))))
14013 (package (inherit base)
14014 (native-inputs
14015 `(("python2-futures" ,python2-futures)
14016 ,@(package-native-inputs base))))))
14017
14018 (define-public python2-backports-functools-lru-cache
14019 (package
14020 (name "python2-backports-functools-lru-cache")
14021 (version "1.5")
14022 (source
14023 (origin
14024 (method url-fetch)
14025 ;; only the pypi tarballs contain the necessary metadata
14026 (uri (pypi-uri "backports.functools_lru_cache" version))
14027 (sha256
14028 (base32
14029 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
14030 (build-system python-build-system)
14031 (native-inputs
14032 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14033 (arguments
14034 `(#:python ,python-2))
14035 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14036 (synopsis "Backport of functools.lru_cache from Python 3.3")
14037 (description "@code{python2-backports-functools-lru-cache} is a backport
14038 of @code{functools.lru_cache} from python 3.3.")
14039 (license license:expat)))
14040
14041 (define-public python-configparser
14042 (package
14043 (name "python-configparser")
14044 (version "4.0.2")
14045 (source
14046 (origin
14047 (method url-fetch)
14048 (uri (pypi-uri "configparser" version))
14049 (sha256
14050 (base32
14051 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
14052 (native-inputs
14053 `(("python-setuptools_scm" ,python-setuptools-scm)))
14054 (build-system python-build-system)
14055 (home-page "https://github.com/jaraco/configparser/")
14056 (synopsis "Backport of configparser from python 3.5")
14057 (description "@code{python-configparser} is a backport of
14058 @code{configparser} from Python 3.5 so that it can be used directly
14059 in other versions.")
14060 (license license:expat)))
14061
14062 (define-public python2-configparser
14063 (package-with-python2 python-configparser))
14064
14065 (define-public python-mando
14066 (package
14067 (name "python-mando")
14068 (version "0.6.4")
14069 (source (origin
14070 (method url-fetch)
14071 (uri (pypi-uri "mando" version))
14072 (sha256
14073 (base32
14074 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
14075 (build-system python-build-system)
14076 (propagated-inputs
14077 `(("python-rst2ansi" ,python-rst2ansi)
14078 ("python-six" ,python-six)))
14079 (native-inputs
14080 `(("python-pytest" ,python-pytest)))
14081 (home-page "https://mando.readthedocs.org/")
14082 (synopsis
14083 "Wrapper around argparse, allowing creation of complete CLI applications")
14084 (description
14085 "This package is a wrapper around argparse, allowing you to write complete CLI
14086 applications in seconds while maintaining all the flexibility.")
14087 (license license:expat)))
14088
14089 (define-public python2-mando
14090 (package-with-python2 python-mando))
14091
14092 (define-public python2-argparse
14093 (package
14094 (name "python2-argparse")
14095 (version "1.4.0")
14096 (source
14097 (origin
14098 (method url-fetch)
14099 (uri (pypi-uri "argparse" version))
14100 (sha256
14101 (base32
14102 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
14103 (build-system python-build-system)
14104 (arguments
14105 `(#:python ,python-2))
14106 (home-page "https://github.com/ThomasWaldmann/argparse/")
14107 (synopsis "Python command-line parsing library")
14108 (description
14109 "This package is mostly for people who want to have @code{argparse} on
14110 older Pythons because it was not part of the standard library back then.")
14111 (license license:psfl)))
14112
14113 (define-public python-fudge
14114 (package
14115 (name "python-fudge")
14116 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14117 ;; package, which is currently the only use of this package.
14118 (version "0.9.6")
14119 (source
14120 (origin
14121 (method url-fetch)
14122 (uri (pypi-uri "fudge" version))
14123 (sha256
14124 (base32
14125 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14126 (build-system python-build-system)
14127 (arguments
14128 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14129 (home-page "https://github.com/fudge-py/fudge")
14130 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14131 (description
14132 "Fudge is a Python module for using fake objects (mocks and stubs) to
14133 test real ones.
14134
14135 In readable Python code, you declare the methods available on your fake object
14136 and how they should be called. Then you inject that into your application and
14137 start testing. This declarative approach means you don’t have to record and
14138 playback actions and you don’t have to inspect your fakes after running code.
14139 If the fake object was used incorrectly then you’ll see an informative
14140 exception message with a traceback that points to the culprit.")
14141 (license license:expat)))
14142
14143 (define-public python2-fudge
14144 (package-with-python2 python-fudge))
14145
14146 (define-public python-mwclient
14147 (package
14148 (name "python-mwclient")
14149 (version "0.10.1")
14150 (source
14151 (origin
14152 (method git-fetch)
14153 ;; The PyPI version wouldn't contain tests.
14154 (uri (git-reference
14155 (url "https://github.com/mwclient/mwclient")
14156 (commit (string-append "v" version))))
14157 (file-name (git-file-name name version))
14158 (sha256
14159 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
14160 (build-system python-build-system)
14161 (propagated-inputs
14162 `(("python-requests-oauthlib" ,python-requests-oauthlib)
14163 ("python-six" ,python-six)))
14164 (native-inputs
14165 `(("python-mock" ,python-mock)
14166 ("python-pytest" ,python-pytest)
14167 ("python-pytest-cov" ,python-pytest-cov)
14168 ("python-pytest-runner" ,python-pytest-runner)
14169 ("python-responses" ,python-responses)))
14170 (home-page "https://github.com/btongminh/mwclient")
14171 (synopsis "MediaWiki API client")
14172 (description "This package provides a MediaWiki API client.")
14173 (license license:expat)))
14174
14175 (define-public python2-mwclient
14176 (package-with-python2 python-mwclient))
14177
14178 (define-public python-utils
14179 (package
14180 (name "python-utils")
14181 (version "2.1.0")
14182 (source (origin
14183 (method url-fetch)
14184 (uri (pypi-uri "python-utils" version))
14185 (sha256
14186 (base32
14187 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14188 (build-system python-build-system)
14189 (native-inputs
14190 `(("pytest-runner" ,python-pytest-runner)
14191 ("pytest" ,python-pytest)
14192 ("six" ,python-six)))
14193 (home-page "https://github.com/WoLpH/python-utils")
14194 (synopsis "Convenient utilities not included with the standard Python install")
14195 (description
14196 "Python Utils is a collection of small Python functions and classes which
14197 make common patterns shorter and easier.")
14198 (license license:bsd-2)))
14199
14200 (define-public python2-utils
14201 (package-with-python2 python-utils))
14202
14203 (define-public python-diff-match-patch
14204 (package
14205 (name "python-diff-match-patch")
14206 (version "20121119")
14207 (source
14208 (origin
14209 (method url-fetch)
14210 (uri (pypi-uri "diff-match-patch" version))
14211 (sha256
14212 (base32
14213 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14214 (build-system python-build-system)
14215 (home-page "https://code.google.com/p/google-diff-match-patch")
14216 (synopsis "Synchronize plain text")
14217 (description "Diff Match and Patch libraries offer robust algorithms to
14218 perform the operations required for synchronizing plain text.")
14219 (license license:asl2.0)))
14220
14221 (define-public python2-diff-match-patch
14222 (package-with-python2 python-diff-match-patch))
14223
14224 (define-public python-dirsync
14225 (package
14226 (name "python-dirsync")
14227 (version "2.2.3")
14228 (source
14229 (origin
14230 (method url-fetch)
14231 (uri (pypi-uri "dirsync" version))
14232 (sha256
14233 (base32
14234 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
14235 (build-system python-build-system)
14236 (propagated-inputs
14237 `(("six" ,python-six)))
14238 (home-page "https://bitbucket.org/tkhyn/dirsync")
14239 (synopsis "Advanced directory tree synchronisation tool")
14240 (description "Advanced directory tree synchronisation tool.")
14241 (license license:expat)))
14242
14243 (define-public python2-dirsync
14244 (package-with-python2 python-dirsync))
14245
14246 (define-public python-levenshtein
14247 (package
14248 (name "python-levenshtein")
14249 (version "0.12.0")
14250 (source
14251 (origin
14252 (method url-fetch)
14253 (uri (pypi-uri "python-Levenshtein" version))
14254 (sha256
14255 (base32
14256 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14257 (build-system python-build-system)
14258 (home-page "https://github.com/ztane/python-Levenshtein")
14259 (synopsis "Fast computation of Levenshtein distance and string similarity")
14260 (description
14261 "The Levenshtein Python C extension module contains functions for fast computation of
14262 @enumerate
14263 @item Levenshtein (edit) distance, and edit operations
14264 @item string similarity
14265 @item approximate median strings, and generally string averaging
14266 @item string sequence and set similarity
14267 @end enumerate
14268 It supports both normal and Unicode strings.")
14269 (license license:gpl2+)))
14270
14271 (define-public python2-levenshtein
14272 (package-with-python2 python-levenshtein))
14273
14274 (define-public python-scandir
14275 (package
14276 (name "python-scandir")
14277 (version "1.10.0")
14278 (source
14279 (origin
14280 (method url-fetch)
14281 (uri (pypi-uri "scandir" version))
14282 (sha256
14283 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
14284 (build-system python-build-system)
14285 (arguments
14286 `(#:phases (modify-phases %standard-phases
14287 (replace 'check
14288 (lambda _
14289 (invoke "python" "test/run_tests.py"))))))
14290 (home-page "https://github.com/benhoyt/scandir")
14291 (synopsis "Directory iteration function")
14292 (description
14293 "Directory iteration function like os.listdir(), except that instead of
14294 returning a list of bare filenames, it yields DirEntry objects that include
14295 file type and stat information along with the name. Using scandir() increases
14296 the speed of os.walk() by 2-20 times (depending on the platform and file
14297 system) by avoiding unnecessary calls to os.stat() in most cases.
14298
14299 This package is part of the Python standard library since version 3.5.")
14300 (license license:bsd-3)))
14301
14302 (define-public python2-scandir
14303 (package-with-python2 python-scandir))
14304
14305 (define-public python2-stemming
14306 (package
14307 (name "python2-stemming")
14308 (version "1.0.1")
14309 (source
14310 (origin
14311 (method url-fetch)
14312 (uri (pypi-uri "stemming" version))
14313 (sha256
14314 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14315 (build-system python-build-system)
14316 (arguments
14317 `(#:python ,python-2))
14318 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14319 (synopsis "Python implementations of various stemming algorithms")
14320 (description
14321 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14322 stemming algorithms for English. These implementations are straightforward and
14323 efficient, unlike some Python versions of the same algorithms available on the
14324 Web. This package is an extraction of the stemming code included in the Whoosh
14325 search engine.")
14326 (license license:public-domain)))
14327
14328 (define-public python-factory-boy
14329 (package
14330 (name "python-factory-boy")
14331 (version "2.8.1")
14332 (source
14333 (origin
14334 (method url-fetch)
14335 (uri (pypi-uri "factory_boy" version))
14336 (sha256
14337 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14338 (build-system python-build-system)
14339 (arguments
14340 ;; Tests are not included in the tarball.
14341 `(#:tests? #f))
14342 (propagated-inputs
14343 `(("faker" ,python-faker)))
14344 (home-page "https://github.com/benhoyt/scandir")
14345 (synopsis "Versatile test fixtures replacement")
14346 (description
14347 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14348
14349 As a fixtures replacement tool, it aims to replace static, hard to maintain
14350 fixtures with easy-to-use factories for complex object.
14351
14352 Instead of building an exhaustive test setup with every possible combination
14353 of corner cases, factory_boy allows you to use objects customized for the
14354 current test, while only declaring the test-specific fields")
14355 (license license:expat)))
14356
14357 (define-public python2-factory-boy
14358 (package-with-python2 python-factory-boy))
14359
14360 (define-public python-translate-toolkit
14361 (package
14362 (name "python-translate-toolkit")
14363 (version "2.1.0")
14364 (source
14365 (origin
14366 (method url-fetch)
14367 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14368 (sha256
14369 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14370 (build-system python-build-system)
14371 (native-inputs
14372 `(("python-pytest" ,python-pytest)
14373 ("python-sphinx" ,python-sphinx)))
14374 (propagated-inputs
14375 `(("python-babel" ,python-babel)
14376 ("python-beautifulsoup4" ,python-beautifulsoup4)
14377 ("python-chardet" ,python-chardet)
14378 ("python-diff-match-patch" ,python-diff-match-patch)
14379 ("python-levenshtein" ,python-levenshtein)
14380 ("python-lxml" ,python-lxml)
14381 ("python-six" ,python-six)
14382 ("python-vobject" ,python-vobject)
14383 ("python-pyyaml" ,python-pyyaml)))
14384 (arguments
14385 ;; TODO: tests are not run, because they end with
14386 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14387 ;; 'parse_funcs'
14388 ;; during test setup.
14389 `(#:tests? #f))
14390 (home-page "https://toolkit.translatehouse.org")
14391 (synopsis "Tools and API for translation and localization engineering")
14392 (description
14393 "Tools and API for translation and localization engineering. It contains
14394 several utilities, as well as an API for building localization tools.")
14395 (license license:gpl2+)))
14396
14397 (define-public python2-translate-toolkit
14398 (package-with-python2 python-translate-toolkit))
14399
14400 (define-public python-packaging
14401 (package
14402 (name "python-packaging")
14403 (version "20.0")
14404 (source
14405 (origin
14406 (method url-fetch)
14407 (uri (pypi-uri "packaging" version))
14408 ;; XXX: The URL in the patch file is wrong, it should be
14409 ;; <https://github.com/pypa/packaging/pull/256>.
14410 (patches (search-patches "python-packaging-test-arch.patch"))
14411 (sha256
14412 (base32
14413 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
14414 (build-system python-build-system)
14415 (arguments
14416 `(#:phases (modify-phases %standard-phases
14417 (replace 'check
14418 (lambda* (#:key tests? #:allow-other-keys)
14419 (if tests?
14420 (invoke "py.test" "-vv")
14421 (format #t "test suite not run~%"))
14422 #t)))))
14423 (native-inputs
14424 `(("python-pretend" ,python-pretend)
14425 ("python-pytest" ,python-pytest)))
14426 (propagated-inputs
14427 `(("python-pyparsing" ,python-pyparsing)
14428 ("python-six" ,python-six)))
14429 (home-page "https://github.com/pypa/packaging")
14430 (synopsis "Core utilities for Python packages")
14431 (description "Packaging is a Python module for dealing with Python packages.
14432 It offers an interface for working with package versions, names, and dependency
14433 information.")
14434 ;; From 'LICENSE': This software is made available under the terms of
14435 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14436 ;; Contributions to this software is made under the terms of *both* these
14437 ;; licenses.
14438 (license (list license:asl2.0 license:bsd-2))))
14439
14440 (define-public python2-packaging
14441 (package-with-python2 python-packaging))
14442
14443 ;; Variants with minimal dependencies, for bootstrapping Pytest.
14444 (define-public python-packaging-bootstrap
14445 (hidden-package
14446 (package/inherit
14447 python-packaging
14448 (name "python-packaging-bootstrap")
14449 (native-inputs '())
14450 (propagated-inputs
14451 `(("python-pyparsing" ,python-pyparsing)))
14452 (arguments '(#:tests? #f)))))
14453
14454 (define-public python2-packaging-bootstrap
14455 (hidden-package
14456 (package/inherit
14457 python2-packaging
14458 (name "python2-packaging-bootstrap")
14459 (native-inputs '())
14460 (propagated-inputs
14461 `(("python-pyparsing" ,python2-pyparsing)))
14462 (arguments
14463 `(#:tests? #f
14464 ,@(package-arguments python2-packaging))))))
14465
14466 (define-public python-relatorio
14467 (package
14468 (name "python-relatorio")
14469 (version "0.8.0")
14470 (source
14471 (origin
14472 (method url-fetch)
14473 (uri (pypi-uri "relatorio" version))
14474 (sha256
14475 (base32
14476 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
14477 (build-system python-build-system)
14478 (propagated-inputs
14479 `(("python-lxml" ,python-lxml)
14480 ("python-genshi" ,python-genshi)))
14481 (native-inputs
14482 `(("python-magic" ,python-magic)))
14483 (home-page "https://relatorio.tryton.org/")
14484 (synopsis "Templating library able to output ODT and PDF files")
14485 (description "Relatorio is a templating library which provides a way to
14486 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14487 for more filetypes can be easily added by creating plugins for them.")
14488 (license license:gpl3+)))
14489
14490 (define-public python2-relatorio
14491 (package-with-python2 python-relatorio))
14492
14493 (define-public python-radon
14494 (package
14495 (name "python-radon")
14496 (version "4.1.0")
14497 (source
14498 (origin
14499 (method url-fetch)
14500 (uri (pypi-uri "radon" version))
14501 (sha256
14502 (base32
14503 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
14504 (build-system python-build-system)
14505 (arguments
14506 `(#:phases (modify-phases %standard-phases
14507 (replace 'check
14508 (lambda _
14509 (invoke "python" "radon/tests/run.py"))))))
14510 (propagated-inputs
14511 `(("python-colorama" ,python-colorama)
14512 ("python-flake8-polyfill" ,python-flake8-polyfill)
14513 ("python-mando" ,python-mando)))
14514 (native-inputs
14515 `(("python-pytest" ,python-pytest)
14516 ("python-pytest-mock" ,python-pytest-mock)))
14517 (home-page "https://radon.readthedocs.org/")
14518 (synopsis "Code Metrics in Python")
14519 (description "Radon is a Python tool which computes various code metrics.
14520 Supported metrics are:
14521 @itemize @bullet
14522 @item raw metrics: SLOC, comment lines, blank lines, &c.
14523 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14524 @item Halstead metrics (all of them)
14525 @item the Maintainability Index (a Visual Studio metric)
14526 @end itemize")
14527 (properties `((python2-variant . ,(delay python2-radon))))
14528 (license license:expat)))
14529
14530 (define-public python2-radon
14531 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
14532 (package
14533 (inherit base)
14534 (propagated-inputs
14535 `(("python-configparser" ,python2-configparser)
14536 ("python-future" ,python2-future)
14537 ,@(package-propagated-inputs base))))))
14538
14539 (define-public python-sure
14540 (package
14541 (name "python-sure")
14542 (version "1.4.11")
14543 (source
14544 (origin
14545 (method url-fetch)
14546 (uri (pypi-uri "sure" version))
14547 (sha256
14548 (base32
14549 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
14550 (build-system python-build-system)
14551 (propagated-inputs
14552 `(("python-mock" ,python-mock)
14553 ("python-six" ,python-six)))
14554 (native-inputs
14555 `(("python-nose" ,python-nose)))
14556 (home-page "https://github.com/gabrielfalcao/sure")
14557 (synopsis "Automated testing library in python for python")
14558 (description
14559 "Sure is a python library that leverages a DSL for writing assertions.
14560 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
14561 (license license:gpl3+)))
14562
14563 (define-public python2-sure
14564 (package-with-python2 python-sure))
14565
14566 (define-public python2-couleur
14567 ;; This package does not seem to support python3 at all, hence,
14568 ;; only the python2 variant definition is provided.
14569 (package
14570 (name "python2-couleur")
14571 (version "0.6.2")
14572 (source
14573 (origin
14574 (method url-fetch)
14575 (uri (pypi-uri "couleur" version))
14576 (sha256
14577 (base32
14578 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
14579 (build-system python-build-system)
14580 (arguments
14581 `(#:python ,python-2))
14582 (home-page "https://github.com/gabrielfalcao/couleur")
14583 (synopsis
14584 "ANSI terminal tool for python, colored shell and other handy fancy features")
14585 (description
14586 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
14587 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
14588 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
14589 ;; https://github.com/gabrielfalcao/couleur/issues/11
14590 (license license:lgpl3+)))
14591
14592 (define-public python-misaka
14593 (package
14594 (name "python-misaka")
14595 (version "2.1.1")
14596 (source
14597 (origin
14598 (method url-fetch)
14599 (uri (pypi-uri "misaka" version))
14600 (sha256
14601 (base32
14602 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
14603 (build-system python-build-system)
14604 (arguments
14605 `(;; Line 37 of setup.py calls self.run_command('develop')
14606 ;; in the 'check' phase. This command seems to be trying
14607 ;; to write to
14608 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
14609 ;; for which it does not have the permission to write.
14610 #:tests? #f))
14611 (propagated-inputs
14612 `(("python-cffi" ,python-cffi)))
14613 (home-page "https://github.com/FSX/misaka")
14614 (synopsis "Python binding for Hoedown")
14615 (description
14616 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
14617 library written in C. It features a fast HTML renderer and functionality to make custom
14618 renderers (e.g. man pages or LaTeX).")
14619 (license license:expat)))
14620
14621 (define-public python2-misaka
14622 (package-with-python2 python-misaka))
14623
14624 (define-public python2-steadymark
14625 ;; This is forced into being a python2 only variant
14626 ;; due to its dependence on couleur that has no support
14627 ;; for python3
14628 (package
14629 (name "python2-steadymark")
14630 (version "0.7.3")
14631 (source
14632 (origin
14633 (method url-fetch)
14634 (uri (pypi-uri "steadymark" version))
14635 (sha256
14636 (base32
14637 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
14638 (build-system python-build-system)
14639 (native-inputs
14640 `(("python-couleur" ,python2-couleur)
14641 ("python-sure" ,python2-sure)
14642 ("python-misaka" ,python2-misaka)))
14643 (arguments
14644 `(#:python ,python-2
14645 #:phases
14646 (modify-phases %standard-phases
14647 (add-before 'build 'patch-setup-py
14648 (lambda _
14649 ;; Update requirements from dependency==version
14650 ;; to dependency>=version
14651 (substitute* "setup.py"
14652 (("==") ">="))
14653 #t)))))
14654 (home-page "https://github.com/gabrielfalcao/steadymark")
14655 (synopsis "Markdown-based test runner for python")
14656 (description
14657 "@code{Steadymark} allows documentation to be written in github-flavoured
14658 markdown. The documentation may contain snippets of code surrounded by python
14659 code blocks and @code{Steadymark} will find these snippets and run them, making
14660 sure that there are no old malfunctional examples in the documentation examples.")
14661 (license license:expat)))
14662
14663 (define-public python-jsonpointer
14664 (package
14665 (name "python-jsonpointer")
14666 (version "1.10")
14667 (source
14668 (origin
14669 (method url-fetch)
14670 (uri (pypi-uri "jsonpointer" version))
14671 (sha256
14672 (base32
14673 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
14674 (build-system python-build-system)
14675 (home-page "https://github.com/stefankoegl/python-json-pointer")
14676 (synopsis "Identify specific nodes in a JSON document")
14677 (description "@code{jsonpointer} allows you to access specific nodes
14678 by path in a JSON document (see RFC 6901).")
14679 (license license:bsd-3)))
14680
14681 (define-public python2-jsonpointer
14682 (package-with-python2 python-jsonpointer))
14683
14684 (define-public python-jsonpatch
14685 (package
14686 (name "python-jsonpatch")
14687 (version "1.16")
14688 (source
14689 (origin
14690 (method git-fetch)
14691 ;; pypi version lacks tests.js
14692 (uri (git-reference
14693 (url "https://github.com/stefankoegl/python-json-patch")
14694 (commit (string-append "v" version))))
14695 (file-name (git-file-name name version))
14696 (sha256
14697 (base32
14698 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
14699 (build-system python-build-system)
14700 (native-inputs
14701 `(("python-jsonpointer" ,python-jsonpointer)))
14702 (home-page "https://github.com/stefankoegl/python-json-patch")
14703 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
14704 (description "@code{jsonpatch} is a library and program that allows
14705 applying JSON Patches according to RFC 6902.")
14706 (license license:bsd-3)))
14707
14708 (define-public python2-jsonpatch
14709 (package-with-python2 python-jsonpatch))
14710
14711 (define-public python-jsonpatch-0.4
14712 (package (inherit python-jsonpatch)
14713 (name "python-jsonpatch")
14714 (version "0.4")
14715 (source
14716 (origin
14717 (method git-fetch)
14718 (uri (git-reference
14719 (url "https://github.com/stefankoegl/python-json-patch")
14720 (commit (string-append "v" version))))
14721 (file-name (git-file-name name version))
14722 (sha256
14723 (base32
14724 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
14725
14726 (define-public python2-jsonpatch-0.4
14727 (package-with-python2 python-jsonpatch-0.4))
14728
14729 (define-public python-rfc3986
14730 (package
14731 (name "python-rfc3986")
14732 (version "1.1.0")
14733 (source (origin
14734 (method url-fetch)
14735 (uri (pypi-uri "rfc3986" version))
14736 (sha256
14737 (base32
14738 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
14739 (build-system python-build-system)
14740 (arguments
14741 `(#:modules ((guix build utils)
14742 (guix build python-build-system)
14743 (ice-9 ftw)
14744 (srfi srfi-1)
14745 (srfi srfi-26))
14746 #:phases
14747 (modify-phases %standard-phases
14748 (replace 'check
14749 (lambda _
14750 (let ((cwd (getcwd)))
14751 (setenv "PYTHONPATH"
14752 (string-append cwd "/build/"
14753 (find (cut string-prefix? "lib" <>)
14754 (scandir (string-append cwd "/build")))
14755 ":"
14756 (getenv "PYTHONPATH")))
14757 (invoke "pytest" "-v")))))))
14758 (native-inputs
14759 `(("python-pytest" ,python-pytest)))
14760 (home-page "https://rfc3986.readthedocs.io/")
14761 (synopsis "Parse and validate URI references")
14762 (description
14763 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14764 validation and authority parsing. This module also supports RFC@tie{}6874
14765 which adds support for zone identifiers to IPv6 addresses.")
14766 (license license:asl2.0)))
14767
14768 (define-public python2-rfc3986
14769 (package-with-python2 python-rfc3986))
14770
14771 (define-public python-rfc3987
14772 (package
14773 (name "python-rfc3987")
14774 (version "1.3.7")
14775 (source
14776 (origin
14777 (method url-fetch)
14778 (uri (pypi-uri "rfc3987" version))
14779 (sha256
14780 (base32
14781 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14782 (build-system python-build-system)
14783 (home-page "https://pypi.org/project/rfc3987/")
14784 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14785 (description "@code{rfc3987} provides routines for parsing and
14786 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14787 (license license:gpl3+)))
14788
14789 (define-public python2-rfc3987
14790 (package-with-python2 python-rfc3987))
14791
14792 (define-public python-validators
14793 (package
14794 (name "python-validators")
14795 (version "0.14.2")
14796 (source (origin
14797 (method url-fetch)
14798 (uri (pypi-uri "validators" version))
14799 (sha256
14800 (base32
14801 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
14802 (build-system python-build-system)
14803 (arguments
14804 '(#:phases (modify-phases %standard-phases
14805 (replace 'check
14806 (lambda _
14807 (invoke "pytest" "-vv"))))))
14808 (propagated-inputs
14809 `(("python-decorator" ,python-decorator)
14810 ("python-six" ,python-six)))
14811 (native-inputs
14812 `(("python-flake8" ,python-flake8)
14813 ("python-isort" ,python-isort)
14814 ("python-pytest" ,python-pytest)))
14815 (home-page "https://github.com/kvesteri/validators")
14816 (synopsis "Data validation library")
14817 (description
14818 "This package contains validators for different things such as email
14819 addresses, IP addresses, URLs, hashes and more. It has been designed to
14820 be easy to use and not require defining a schema or form just to validate
14821 some input.")
14822 (license license:expat)))
14823
14824 (define-public python2-validators
14825 (package-with-python2 python-validators))
14826
14827 (define-public python-validate-email
14828 (package
14829 (name "python-validate-email")
14830 (version "1.3")
14831 (source
14832 (origin
14833 (method url-fetch)
14834 (uri (pypi-uri "validate_email" version))
14835 (sha256
14836 (base32
14837 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14838 (build-system python-build-system)
14839 (home-page "https://github.com/syrusakbary/validate_email")
14840 (synopsis "Verifies if an email address is valid and really exists")
14841 (description "@code{validate_email} can be used to verify if an email
14842 address is valid and really exists.")
14843 (license license:lgpl3+)))
14844
14845 (define-public python2-validate-email
14846 (package-with-python2 python-validate-email))
14847
14848 (define-public python-flex
14849 (package
14850 (name "python-flex")
14851 (version "6.10.0")
14852 (source
14853 (origin
14854 (method url-fetch)
14855 (uri (pypi-uri "flex" version))
14856 (sha256
14857 (base32
14858 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14859 (build-system python-build-system)
14860 (propagated-inputs
14861 `(("python-click" ,python-click)
14862 ("python-iso8601" ,python-iso8601)
14863 ("python-jsonpointer" ,python-jsonpointer)
14864 ("python-pyyaml" ,python-pyyaml)
14865 ("python-requests" ,python-requests)
14866 ("python-rfc3987" ,python-rfc3987)
14867 ("python-six" ,python-six)
14868 ("python-validate-email" ,python-validate-email)))
14869 (home-page "https://github.com/pipermerriam/flex")
14870 (synopsis "Validates Swagger schemata")
14871 (description "@code{flex} can be used to validate Swagger schemata.")
14872 (license license:bsd-3)))
14873
14874 (define-public python2-flex
14875 (package-with-python2 python-flex))
14876
14877 (define-public python-marshmallow
14878 (package
14879 (name "python-marshmallow")
14880 (version "3.0.0b14")
14881 (source
14882 (origin
14883 (method url-fetch)
14884 (uri (pypi-uri "marshmallow" version))
14885 (sha256
14886 (base32
14887 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14888 (build-system python-build-system)
14889 (propagated-inputs
14890 `(("python-dateutil" ,python-dateutil)
14891 ("python-simplejson" ,python-simplejson)))
14892 (native-inputs
14893 `(("python-pytest" ,python-pytest)
14894 ("python-pytz" ,python-pytz)))
14895 (home-page "https://github.com/marshmallow-code/marshmallow")
14896 (synopsis "Convert complex datatypes to and from native
14897 Python datatypes.")
14898 (description "@code{marshmallow} provides a library for converting
14899 complex datatypes to and from native Python datatypes.")
14900 (license license:expat)))
14901
14902 (define-public python2-marshmallow
14903 (package-with-python2 python-marshmallow))
14904
14905 (define-public python-apispec
14906 (package
14907 (name "python-apispec")
14908 (version "0.25.3")
14909 (source
14910 (origin
14911 (method url-fetch)
14912 (uri (pypi-uri "apispec" version))
14913 (sha256
14914 (base32
14915 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14916 (build-system python-build-system)
14917 (propagated-inputs
14918 `(("python-pyyaml" ,python-pyyaml)))
14919 (native-inputs
14920 `(("python-pytest" ,python-pytest)
14921 ("python-flask" ,python-flask)
14922 ("python-marshmallow" ,python-marshmallow)
14923 ("python-tornado" ,python-tornado)
14924 ("python-bottle" ,python-bottle)
14925 ("python-mock" ,python-mock)))
14926 (home-page "https://github.com/marshmallow-code/apispec")
14927 (synopsis "Swagger 2.0 API specification generator")
14928 (description "@code{python-apispec} is a pluggable API specification
14929 generator. Currently supports the OpenAPI specification (f.k.a.
14930 Swagger 2.0).")
14931 (license license:expat)))
14932
14933 (define-public python2-apispec
14934 (package-with-python2 python-apispec))
14935
14936 (define-public python-flasgger
14937 (package
14938 (name "python-flasgger")
14939 (version "0.6.3")
14940 (source
14941 (origin
14942 (method git-fetch)
14943 (uri (git-reference
14944 (url "https://github.com/rochacbruno/flasgger.git")
14945 (commit version)))
14946 (file-name (git-file-name name version))
14947 (sha256
14948 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
14949 (build-system python-build-system)
14950 (arguments
14951 `(#:phases
14952 (modify-phases %standard-phases
14953 (replace 'check
14954 (lambda* (#:key inputs outputs #:allow-other-keys)
14955 (substitute* "Makefile"
14956 (("flake8 flasgger --ignore=F403")
14957 "flake8 flasgger --ignore=E731,F403"))
14958 (setenv "PYTHONPATH" (string-append (getcwd)
14959 ":"
14960 (getenv "PYTHONPATH")))
14961 (invoke "py.test"))))))
14962 (propagated-inputs
14963 `(("python-flask" ,python-flask)
14964 ("python-pyyaml" ,python-pyyaml)
14965 ("python-jsonschema" ,python-jsonschema)
14966 ("python-mistune" ,python-mistune)
14967 ("python-six" ,python-six)))
14968 (native-inputs
14969 `(("python-decorator" ,python-decorator)
14970 ("python-flake8" ,python-flake8)
14971 ("python-flask-restful" ,python-flask-restful)
14972 ("python-flex" ,python-flex)
14973 ("python-pytest" ,python-pytest)
14974 ("python-pytest-cov" ,python-pytest-cov)
14975 ("python-marshmallow" ,python-marshmallow)
14976 ("python-apispec" ,python-apispec)))
14977 (home-page "https://github.com/rochacbruno/flasgger/")
14978 (synopsis "Extract Swagger specs from your Flask project")
14979 (description "@code{python-flasgger} allows extracting Swagger specs
14980 from your Flask project. It is a fork of Flask-Swagger.")
14981 (license license:expat)))
14982
14983 (define-public python2-flasgger
14984 (package-with-python2 python-flasgger))
14985
14986 (define-public python-swagger-spec-validator
14987 (package
14988 (name "python-swagger-spec-validator")
14989 (version "2.4.3")
14990 (source
14991 (origin
14992 (method url-fetch)
14993 (uri (pypi-uri "swagger-spec-validator" version))
14994 (sha256
14995 (base32
14996 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
14997 (build-system python-build-system)
14998 (propagated-inputs
14999 `(("python-jsonschema" ,python-jsonschema)
15000 ("python-pyyaml" ,python-pyyaml)
15001 ("python-six" ,python-six)))
15002 (home-page
15003 "https://github.com/Yelp/swagger_spec_validator")
15004 (synopsis "Validation of Swagger specifications")
15005 (description "@code{swagger_spec_validator} provides a library for
15006 validating Swagger API specifications.")
15007 (license license:asl2.0)))
15008
15009 (define-public python2-swagger-spec-validator
15010 (package-with-python2 python-swagger-spec-validator))
15011
15012 (define-public python-apache-libcloud
15013 (package
15014 (name "python-apache-libcloud")
15015 (version "2.4.0")
15016 (source
15017 (origin
15018 (method url-fetch)
15019 (uri (pypi-uri "apache-libcloud" version))
15020 (sha256
15021 (base32
15022 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
15023 (build-system python-build-system)
15024 (arguments
15025 `(#:phases
15026 (modify-phases %standard-phases
15027 (add-after 'unpack 'patch-ssh
15028 (lambda* (#:key inputs #:allow-other-keys)
15029 (substitute* "libcloud/compute/ssh.py"
15030 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15031 "/bin/ssh" "'")))
15032 #t))
15033 (add-after 'unpack 'patch-tests
15034 (lambda _
15035 (substitute* "./libcloud/test/test_file_fixtures.py"
15036 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15037 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15038 return (httplib.OK,
15039 \"1234abcd\",
15040 {\"test\": \"value\"},
15041 httplib.responses[httplib.OK])
15042 def _ascii"))
15043 (substitute* "libcloud/test/compute/test_ssh_client.py"
15044 (("class ShellOutSSHClientTests")
15045 "@unittest.skip(\"Guix container doesn't have ssh service\")
15046 class ShellOutSSHClientTests")
15047 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15048 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15049 (("'.xF0', '.x90', '.x8D', '.x88'")
15050 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15051 #t))
15052 (add-before 'check 'copy-secret
15053 (lambda _
15054 (copy-file "libcloud/test/secrets.py-dist"
15055 "libcloud/test/secrets.py")
15056 #t)))))
15057 (inputs
15058 `(("openssh" ,openssh)))
15059 (propagated-inputs
15060 `(("python-paramiko" ,python-paramiko)
15061 ("python-requests" ,python-requests)))
15062 (native-inputs
15063 `(("python-lockfile" ,python-lockfile)
15064 ("python-mock" ,python-mock)
15065 ("python-pytest" ,python-pytest)
15066 ("python-pytest-runner" ,python-pytest-runner)
15067 ("python-requests-mock" ,python-requests-mock)))
15068 (home-page "https://libcloud.apache.org/")
15069 (synopsis "Unified Cloud API")
15070 (description "@code{libcloud} is a Python library for interacting with
15071 many of the popular cloud service providers using a unified API.")
15072 (license license:asl2.0)))
15073
15074 (define-public python2-apache-libcloud
15075 (package-with-python2 python-apache-libcloud))
15076
15077 (define-public python-smmap
15078 (package
15079 (name "python-smmap")
15080 (version "3.0.1")
15081 (source
15082 (origin
15083 (method url-fetch)
15084 (uri (pypi-uri "smmap" version))
15085 (sha256
15086 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
15087 (build-system python-build-system)
15088 (native-inputs
15089 `(("python-nosexcover" ,python-nosexcover)))
15090 (home-page "https://github.com/Byron/smmap")
15091 (synopsis "Python sliding window memory map manager")
15092 (description "@code{smmap} is a pure Python implementation of a sliding
15093 window memory map manager.")
15094 (license license:bsd-3)))
15095
15096 (define-public python-smmap2
15097 (deprecated-package "python-smmap2" python-smmap))
15098
15099 (define-public python2-smmap
15100 (package-with-python2 python-smmap))
15101
15102 (define-public python2-smmap2
15103 (deprecated-package "python2-smmap2" python2-smmap))
15104
15105 (define-public python-regex
15106 (package
15107 (name "python-regex")
15108 (version "2019.04.14")
15109 (source (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "regex" version))
15112 (sha256
15113 (base32
15114 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
15115 ;; TODO: Fix and enable regex_test.py tests that complain about the
15116 ;; test.support module not existing.
15117 (build-system python-build-system)
15118 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15119 (synopsis "Alternative regular expression module")
15120 (description "This regular expression implementation is backwards-
15121 compatible with the standard @code{re} module, but offers additional
15122 functionality like full case-folding for case-insensitive matches in Unicode.")
15123 (license license:psfl)))
15124
15125 (define-public python2-regex
15126 (package-with-python2 python-regex))
15127
15128 (define-public python2-pyopengl
15129 (package
15130 (name "python2-pyopengl")
15131 (version "3.1.0")
15132 (source
15133 (origin
15134 (method url-fetch)
15135 (uri (pypi-uri "PyOpenGL" version))
15136 (sha256
15137 (base32
15138 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15139 (arguments
15140 `(#:python ,python-2))
15141 (build-system python-build-system)
15142 (home-page "http://pyopengl.sourceforge.net")
15143 (synopsis "Standard OpenGL bindings for Python")
15144 (description
15145 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15146 related APIs. The binding is created using the standard @code{ctypes}
15147 library.")
15148 (license license:bsd-3)))
15149
15150 (define-public python2-pyopengl-accelerate
15151 (package
15152 (inherit python2-pyopengl)
15153 (name "python2-pyopengl-accelerate")
15154 (version "3.1.0")
15155 (source
15156 (origin
15157 (method url-fetch)
15158 (uri (pypi-uri "PyOpenGL-accelerate" version))
15159 (sha256
15160 (base32
15161 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
15162 (synopsis "Acceleration code for PyOpenGL")
15163 (description
15164 "This is the Cython-coded accelerator module for PyOpenGL.")))
15165
15166 (define-public python-rencode
15167 (package
15168 (name "python-rencode")
15169 (version "1.0.5")
15170 (source
15171 (origin
15172 (method url-fetch)
15173 (uri (pypi-uri "rencode" version))
15174 (sha256
15175 (base32
15176 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
15177 (build-system python-build-system)
15178 (arguments
15179 `(#:phases
15180 (modify-phases %standard-phases
15181 (add-before 'check 'delete-bogus-test
15182 ;; This test requires /home/aresch/Downloads, which is not provided by
15183 ;; the build environment.
15184 (lambda _
15185 (delete-file "rencode/t.py")
15186 #t)))))
15187 (native-inputs `(("pkg-config" ,pkg-config)
15188 ("python-cython" ,python-cython)))
15189 (home-page "https://github.com/aresch/rencode")
15190 (synopsis "Serialization of heterogeneous data structures")
15191 (description
15192 "The @code{rencode} module is a data structure serialization library,
15193 similar to @code{bencode} from the BitTorrent project. For complex,
15194 heterogeneous data structures with many small elements, r-encoding stake up
15195 significantly less space than b-encodings. This version of rencode is a
15196 complete rewrite in Cython to attempt to increase the performance over the
15197 pure Python module.")
15198 (license license:bsd-3)))
15199
15200 (define-public python2-rencode
15201 (package-with-python2 python-rencode))
15202
15203 (define-public python-xenon
15204 (package
15205 (name "python-xenon")
15206 (version "0.7.0")
15207 (source
15208 (origin
15209 (method url-fetch)
15210 (uri (pypi-uri "xenon" version))
15211 (sha256
15212 (base32
15213 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
15214 (build-system python-build-system)
15215 (native-inputs
15216 `(("python-pyyaml" ,python-pyyaml)
15217 ("python-radon" ,python-radon)
15218 ("python-requests" ,python-requests)
15219 ("python-flake8" ,python-flake8)
15220 ("python-tox" ,python-tox)))
15221 (arguments
15222 `(#:tests? #f ;test suite not shipped with the PyPI archive
15223 #:phases
15224 (modify-phases %standard-phases
15225 (add-before 'build 'patch-test-requirements
15226 (lambda _
15227 ;; Remove httpretty dependency for tests.
15228 (substitute* "setup.py"
15229 (("httpretty") ""))
15230 #t)))))
15231 (home-page "https://xenon.readthedocs.org/")
15232 (synopsis "Monitor code metrics for Python on your CI server")
15233 (description
15234 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
15235 Ideally, @code{xenon} is run every time code is committed. Through command
15236 line options, various thresholds can be set for the complexity of code. It
15237 will fail (i.e. it will exit with a non-zero exit code) when any of these
15238 requirements is not met.")
15239 (license license:expat)))
15240
15241 (define-public python2-xenon
15242 (package-with-python2 python-xenon))
15243
15244 (define-public python-pysocks
15245 (package
15246 (name "python-pysocks")
15247 (version "1.7.0")
15248 (source
15249 (origin
15250 (method url-fetch)
15251 (uri (pypi-uri "PySocks" version))
15252 (sha256
15253 (base32
15254 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
15255 (build-system python-build-system)
15256 (arguments `(#:tests? #f))
15257 (home-page "https://github.com/Anorov/PySocks")
15258 (synopsis "SOCKS client module")
15259 (description "@code{pysocks} is an updated and semi-actively maintained
15260 version of @code{SocksiPy} with bug fixes and extra features.")
15261 (license license:bsd-3)))
15262
15263 (define-public python2-pysocks
15264 (package-with-python2 python-pysocks))
15265
15266 (define-public python-pydiff
15267 (package
15268 (name "python-pydiff")
15269 (version "0.2")
15270 (source
15271 (origin
15272 (method url-fetch)
15273 (uri (pypi-uri "pydiff" version))
15274 (sha256
15275 (base32
15276 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
15277 (build-system python-build-system)
15278 (home-page "https://github.com/myint/pydiff")
15279 (synopsis "Library to diff two Python files at the bytecode level")
15280 (description
15281 "@code{pydiff} makes it easy to look for actual code changes while
15282 ignoring formatting changes.")
15283 (license license:expat)))
15284
15285 (define-public python2-pydiff
15286 (package-with-python2 python-pydiff))
15287
15288 (define-public python-tqdm
15289 (package
15290 (name "python-tqdm")
15291 (version "4.43.0")
15292 (source
15293 (origin
15294 (method url-fetch)
15295 (uri (pypi-uri "tqdm" version))
15296 (sha256
15297 (base32
15298 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
15299 (build-system python-build-system)
15300 (arguments
15301 '(#:phases (modify-phases %standard-phases
15302 (replace 'check
15303 (lambda* (#:key inputs outputs #:allow-other-keys)
15304 (add-installed-pythonpath inputs outputs)
15305 ;; This invokation is taken from tox.ini.
15306 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
15307 "-d" "-v" "tqdm/"))))))
15308 (native-inputs
15309 `(("python-nose" ,python-nose)))
15310 (home-page "https://github.com/tqdm/tqdm")
15311 (synopsis "Fast, extensible progress meter")
15312 (description
15313 "Make loops show a progress bar on the console by just wrapping any
15314 iterable with @code{|tqdm(iterable)|}. Offers many options to define
15315 design and layout.")
15316 (license (list license:mpl2.0 license:expat))))
15317
15318 (define-public python2-tqdm
15319 (package-with-python2 python-tqdm))
15320
15321 (define-public python-pkginfo
15322 (package
15323 (name "python-pkginfo")
15324 (version "1.4.2")
15325 (source
15326 (origin
15327 (method url-fetch)
15328 (uri (pypi-uri "pkginfo" version))
15329 (sha256
15330 (base32
15331 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
15332 (build-system python-build-system)
15333 (arguments
15334 ;; The tests are broken upstream.
15335 '(#:tests? #f))
15336 (home-page
15337 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
15338 (synopsis
15339 "Query metadatdata from sdists, bdists, and installed packages")
15340 (description
15341 "API to query the distutils metadata written in @file{PKG-INFO} inside a
15342 source distriubtion (an sdist) or a binary distribution (e.g., created by
15343 running bdist_egg). It can also query the EGG-INFO directory of an installed
15344 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
15345 created by running @code{python setup.py develop}).")
15346 (license license:expat)))
15347
15348 (define-public python2-pkginfo
15349 (package-with-python2 python-pkginfo))
15350
15351 (define-public python-twine
15352 (package
15353 (name "python-twine")
15354 (version "1.9.1")
15355 (source
15356 (origin
15357 (method url-fetch)
15358 (uri (pypi-uri "twine" version))
15359 (sha256
15360 (base32
15361 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
15362 (build-system python-build-system)
15363 (propagated-inputs
15364 `(("python-tqdm" ,python-tqdm)
15365 ("python-pkginfo" ,python-pkginfo)
15366 ("python-requests" ,python-requests)
15367 ("python-requests-toolbelt" ,python-requests-toolbelt)))
15368 (home-page "https://github.com/pypa/twine")
15369 (synopsis "Collection of utilities for interacting with PyPI")
15370 (description
15371 "@code{twine} currently supports registering projects and uploading
15372 distributions. It authenticates the user over HTTPS, allows them to pre-sign
15373 their files and supports any packaging format (including wheels).")
15374 (license license:asl2.0)))
15375
15376 (define-public python2-twine
15377 (package-with-python2 python-twine))
15378
15379 (define-public python-linecache2
15380 (package
15381 (name "python-linecache2")
15382 (version "1.0.0")
15383 (source
15384 (origin
15385 (method url-fetch)
15386 (uri (pypi-uri "linecache2" version))
15387 (sha256
15388 (base32
15389 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
15390 (build-system python-build-system)
15391 (arguments
15392 `(;; The tests depend on unittest2, and our version is a bit too old.
15393 #:tests? #f))
15394 (native-inputs
15395 `(("python-pbr" ,python-pbr-minimal)))
15396 (home-page
15397 "https://github.com/testing-cabal/linecache2")
15398 (synopsis "Backports of the linecache module")
15399 (description
15400 "The linecache module allows one to get any line from any file, while
15401 attempting to optimize internally, using a cache, the common case where many
15402 lines are read from a single file.")
15403 (license license:psfl)))
15404
15405 (define-public python2-linecache2
15406 (package-with-python2 python-linecache2))
15407
15408 (define-public python-traceback2
15409 (package
15410 (name "python-traceback2")
15411 (version "1.4.0")
15412 (source
15413 (origin
15414 (method url-fetch)
15415 (uri (pypi-uri "traceback2" version))
15416 (sha256
15417 (base32
15418 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
15419 (build-system python-build-system)
15420 (arguments
15421 `(;; python-traceback2 and python-unittest2 depend on one another.
15422 #:tests? #f))
15423 (native-inputs
15424 `(("python-pbr" ,python-pbr-minimal)))
15425 (propagated-inputs
15426 `(("python-linecache2" ,python-linecache2)))
15427 (home-page
15428 "https://github.com/testing-cabal/traceback2")
15429 (synopsis "Backports of the traceback module")
15430 (description
15431 "This module provides a standard interface to extract, format and print
15432 stack traces of Python programs. It exactly mimics the behavior of the Python
15433 interpreter when it prints a stack trace.")
15434 (license license:psfl)))
15435
15436 (define-public python2-traceback2
15437 (package-with-python2 python-traceback2))
15438
15439 (define-public python-ratelimiter
15440 (package
15441 (name "python-ratelimiter")
15442 (version "1.2.0")
15443 (source
15444 (origin
15445 (method url-fetch)
15446 (uri (pypi-uri "ratelimiter" version))
15447 (sha256
15448 (base32
15449 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
15450 (build-system python-build-system)
15451 (arguments
15452 '(#:tests? #f)) ; There are no tests in the pypi archive.
15453 (home-page "https://github.com/RazerM/ratelimiter")
15454 (synopsis "Simple rate limiting object")
15455 (description
15456 "The @code{ratelimiter} module ensures that an operation will not be
15457 executed more than a given number of times during a given period.")
15458 (license license:asl2.0)))
15459
15460 (define-public python2-ratelimiter
15461 (package-with-python2 python-ratelimiter))
15462
15463 (define-public python-dukpy
15464 (package
15465 (name "python-dukpy")
15466 (version "0.3")
15467 (source
15468 (origin
15469 (method git-fetch)
15470 (uri (git-reference
15471 (url "https://github.com/kovidgoyal/dukpy.git")
15472 (commit (string-append "v" version))))
15473 (file-name (git-file-name name version))
15474 (sha256
15475 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
15476 (build-system python-build-system)
15477 (home-page "https://github.com/kovidgoyal/dukpy")
15478 (synopsis "Run JavaScript in python")
15479 (description
15480 "dukpy is a JavaScript runtime environment for Python using the duktape
15481 embeddable JavaScript engine.")
15482 ;; Dukpy is licensed under MIT like the embedded duktape library,
15483 ;; with 'errors.c' as GPL3.
15484 (license (list license:expat license:gpl3))))
15485
15486 (define-public python2-dukpy
15487 (package-with-python2 python-dukpy))
15488
15489 (define-public python-jsonrpclib-pelix
15490 (package
15491 (name "python-jsonrpclib-pelix")
15492 (version "0.3.2")
15493 (source
15494 (origin
15495 (method url-fetch)
15496 (uri (pypi-uri "jsonrpclib-pelix" version))
15497 (sha256
15498 (base32
15499 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
15500 (build-system python-build-system)
15501 (arguments
15502 `(#:tests? #f)) ; no tests in PyPI tarball
15503 (home-page "https://github.com/tcalmant/jsonrpclib/")
15504 (synopsis "JSON-RPC 2.0 client library for Python")
15505 (description
15506 "This library implements the JSON-RPC v2.0
15507 specification (backwards-compatible) as a client library for Python. This
15508 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
15509 services.")
15510 (license license:asl2.0)))
15511
15512 (define-public python2-jsonrpclib-pelix
15513 (package-with-python2 python-jsonrpclib-pelix))
15514
15515 (define-public python-setuptools-scm-git-archive
15516 (package
15517 (name "python-setuptools-scm-git-archive")
15518 (version "1.0")
15519 (source
15520 (origin
15521 (method url-fetch)
15522 (uri (pypi-uri "setuptools_scm_git_archive" version))
15523 (sha256
15524 (base32
15525 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
15526 (build-system python-build-system)
15527 (native-inputs
15528 `(("python-pytest" ,python-pytest)))
15529 (propagated-inputs
15530 `(("python-setuptools-scm" ,python-setuptools-scm)))
15531 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
15532 (synopsis "Setuptools_scm plugin for git archives")
15533 (description
15534 "The setuptools_scm_git_archive package is a plugin to
15535 setuptools_scm, which supports obtaining versions from git archives that
15536 belong to tagged versions.")
15537 (license license:expat)))
15538
15539 (define-public python2-setuptools-scm-git-archive
15540 (package-with-python2 python-setuptools-scm-git-archive))
15541
15542 (define-public python-setuptools-git
15543 (package
15544 (name "python-setuptools-git")
15545 (version "1.2")
15546 (source
15547 (origin
15548 (method url-fetch)
15549 (uri (pypi-uri "setuptools-git" version))
15550 (sha256
15551 (base32
15552 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
15553 (build-system python-build-system)
15554 (arguments
15555 `(#:phases
15556 (modify-phases %standard-phases
15557 ;; This is needed for tests.
15558 (add-after 'unpack 'configure-git
15559 (lambda _
15560 (setenv "HOME" "/tmp")
15561 (invoke "git" "config" "--global" "user.email" "guix")
15562 (invoke "git" "config" "--global" "user.name" "guix")
15563 #t)))))
15564 (native-inputs
15565 `(("git" ,git-minimal)))
15566 (home-page "https://github.com/msabramo/setuptools-git")
15567 (synopsis "Setuptools revision control system plugin for Git")
15568 (description
15569 "This package provides a plugin for Setuptools for revision control with
15570 Git.")
15571 (license license:bsd-3)))
15572
15573 (define-public python-pyclipper
15574 (package
15575 (name "python-pyclipper")
15576 (version "1.1.0.post3")
15577 (source
15578 (origin
15579 (method url-fetch)
15580 (uri (pypi-uri "pyclipper" version ".zip"))
15581 (sha256
15582 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
15583 (modules '((guix build utils)))
15584 (snippet
15585 '(begin
15586 ;; This file is generated by Cython.
15587 (delete-file "pyclipper/pyclipper.cpp") #t))))
15588 (build-system python-build-system)
15589 (arguments
15590 `(#:phases
15591 (modify-phases %standard-phases
15592 (add-before 'build 'cythonize-sources
15593 (lambda _
15594 (with-directory-excursion "pyclipper"
15595 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
15596 (propagated-inputs
15597 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
15598 (native-inputs
15599 `(("python-cython" ,python-cython)
15600 ("python-pytest" ,python-pytest)
15601 ("python-pytest-runner" ,python-pytest-runner)
15602 ("python-unittest2" ,python-unittest2)
15603 ("unzip" ,unzip)))
15604 (home-page "https://github.com/greginvm/pyclipper")
15605 (synopsis "Wrapper for Angus Johnson's Clipper library")
15606 (description
15607 "Pyclipper is a Cython wrapper for the C++ translation of the
15608 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
15609 (license license:expat)))
15610
15611 (define-public python2-pyclipper
15612 (package-with-python2 python-pyclipper))
15613
15614 (define-public python2-booleanoperations
15615 (package
15616 (name "python2-booleanoperations")
15617 (version "0.7.1")
15618 (source
15619 (origin
15620 (method url-fetch)
15621 (uri (pypi-uri "booleanOperations" version ".zip"))
15622 (sha256
15623 (base32
15624 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
15625 (build-system python-build-system)
15626 (arguments
15627 `(#:python ,python-2))
15628 (native-inputs
15629 `(("unzip" ,unzip)
15630 ("python2-pytest" ,python2-pytest)
15631 ("python2-pytest-runner" ,python2-pytest-runner)))
15632 (propagated-inputs
15633 `(("python-fonttools" ,python2-fonttools)
15634 ("python-pyclipper" ,python2-pyclipper)
15635 ("python-ufolib" ,python2-ufolib)))
15636 (home-page "https://github.com/typemytype/booleanOperations")
15637 (synopsis "Boolean operations on paths")
15638 (description
15639 "BooleanOperations provides a Python library that enables
15640 boolean operations on paths.")
15641 (license license:expat)))
15642
15643 (define-public python-tempdir
15644 (package
15645 (name "python-tempdir")
15646 (version "0.7.1")
15647 (source
15648 (origin
15649 (method url-fetch)
15650 (uri (pypi-uri "tempdir" version))
15651 (sha256
15652 (base32
15653 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
15654 (build-system python-build-system)
15655 (home-page "https://pypi.org/project/tempdir/")
15656 (arguments
15657 ;; the package has no tests
15658 '(#:tests? #f))
15659 (synopsis "Python library for managing temporary directories")
15660 (description
15661 "This library manages temporary directories that are automatically
15662 deleted with all their contents when they are no longer needed. It is
15663 particularly convenient for use in tests.")
15664 (license license:expat)))
15665
15666 (define-public python2-tempdir
15667 (package-with-python2 python-tempdir))
15668
15669 (define-public python-activepapers
15670 (package
15671 (name "python-activepapers")
15672 (version "0.2.2")
15673 (source
15674 (origin
15675 (method url-fetch)
15676 (uri (pypi-uri "ActivePapers.Py" version))
15677 (sha256
15678 (base32
15679 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
15680 (build-system python-build-system)
15681 (arguments
15682 `(#:modules ((ice-9 ftw)
15683 (srfi srfi-1)
15684 (guix build utils)
15685 (guix build python-build-system))
15686
15687 #:phases
15688 (modify-phases %standard-phases
15689 (add-after 'unpack 'delete-python2-code
15690 (lambda _
15691 (for-each delete-file
15692 '("lib/activepapers/builtins2.py"
15693 "lib/activepapers/standardlib2.py"
15694 "lib/activepapers/utility2.py"))))
15695 (replace 'check
15696 (lambda _
15697 ;; Deactivate the test cases that download files
15698 (setenv "NO_NETWORK_ACCESS" "1")
15699 ;; For some strange reason, some tests fail if nosetests runs all
15700 ;; test modules in a single execution. They pass if each test
15701 ;; module is run individually.
15702 (for-each (lambda (filename)
15703 (invoke "nosetests"
15704 (string-append "tests/" filename)))
15705 (scandir "tests"
15706 (lambda (filename)
15707 (string-suffix? ".py" filename)))))))))
15708 (native-inputs
15709 `(("python-tempdir" ,python-tempdir)
15710 ("python-nose" ,python-nose)))
15711 (propagated-inputs
15712 `(("python-h5py" ,python-h5py)))
15713 (home-page "https://www.activepapers.org/")
15714 (synopsis "Executable papers for scientific computing")
15715 (description
15716 "ActivePapers is a tool for working with executable papers, which
15717 combine data, code, and documentation in single-file packages,
15718 suitable for publication as supplementary material or on repositories
15719 such as figshare or Zenodo.")
15720 (properties `((python2-variant . ,(delay python2-activepapers))))
15721 (license license:bsd-3)))
15722
15723 (define-public python2-activepapers
15724 (let ((base (package-with-python2
15725 (strip-python2-variant python-activepapers))))
15726 (package
15727 (inherit base)
15728 (arguments
15729 (substitute-keyword-arguments (package-arguments base)
15730 ((#:phases phases)
15731 `(modify-phases ,phases
15732 (delete 'delete-python2-code)
15733 (add-after 'unpack 'delete-python3-code
15734 (lambda _
15735 (for-each delete-file
15736 '("lib/activepapers/builtins3.py"
15737 "lib/activepapers/standardlib3.py"
15738 "lib/activepapers/utility3.py")))))))))))
15739
15740 (define-public python-semver
15741 (package
15742 (name "python-semver")
15743 (version "2.9.0")
15744 (source
15745 (origin
15746 (method url-fetch)
15747 (uri (pypi-uri "semver" version))
15748 (sha256
15749 (base32
15750 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
15751 (build-system python-build-system)
15752 (native-inputs
15753 `(("python-appdirs" ,python-appdirs)
15754 ("python-distlib" ,python-distlib)
15755 ("python-importlib-metadata" ,python-importlib-metadata)
15756 ("python-filelock" ,python-filelock)
15757 ("python-six" ,python-six)
15758 ("python-tox" ,python-tox)
15759 ("python-virtualenv" ,python-virtualenv)))
15760 (home-page "https://github.com/k-bx/python-semver")
15761 (synopsis "Python helper for Semantic Versioning")
15762 (description "This package provides a Python library for
15763 @url{Semantic Versioning, http://semver.org/}.")
15764 (license license:bsd-3)))
15765
15766 (define-public python2-semver
15767 (package-with-python2 python-semver))
15768
15769 (define-public python-pyro4
15770 (package
15771 (name "python-pyro4")
15772 (version "4.77")
15773 (source
15774 (origin
15775 (method url-fetch)
15776 (uri (pypi-uri "Pyro4" version))
15777 (sha256
15778 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
15779 (build-system python-build-system)
15780 (arguments
15781 '(#:tests? #f)) ;FIXME: Some tests require network access.
15782 (native-inputs
15783 `(("python-cloudpickle" ,python-cloudpickle)
15784 ("python-dill" ,python-dill)
15785 ("python-msgpack" ,python-msgpack)))
15786 (propagated-inputs
15787 `(("python-serpent" ,python-serpent)))
15788 (home-page "https://pyro4.readthedocs.io")
15789 (synopsis "Distributed object middleware for Python")
15790 (description
15791 "Pyro enables you to build applications in which objects can talk to each
15792 other over the network. You can just use normal Python method calls to call
15793 objects on other machines, also known as remote procedure calls (RPC).")
15794 (license license:expat)))
15795
15796 (define-public python2-pyro
15797 (package
15798 (name "python2-pyro")
15799 (version "3.16")
15800 (source
15801 (origin
15802 (method url-fetch)
15803 (uri (pypi-uri "Pyro" version))
15804 (file-name (string-append "Pyro-" version ".tar.gz"))
15805 (sha256
15806 (base32
15807 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15808 (build-system python-build-system)
15809 (arguments
15810 ;; Pyro is not compatible with Python 3
15811 `(#:python ,python-2
15812 ;; Pyro has no test cases for automatic execution
15813 #:tests? #f))
15814 (home-page "https://pythonhosted.org/Pyro/")
15815 (synopsis "Distributed object manager for Python")
15816 (description "Pyro is a Distributed Object Technology system
15817 written in Python that is designed to be easy to use. It resembles
15818 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15819 which is a system and language independent Distributed Object Technology
15820 and has much more to offer than Pyro or RMI. Pyro 3.x is no
15821 longer maintained. New projects should use Pyro4 instead, which
15822 is the new Pyro version that is actively developed.")
15823 (license license:expat)))
15824
15825 (define-public python2-scientific
15826 (package
15827 (name "python2-scientific")
15828 (version "2.9.4")
15829 (source
15830 (origin
15831 (method git-fetch)
15832 (uri (git-reference
15833 (url "https://github.com/khinsen/ScientificPython")
15834 (commit (string-append "rel" version))))
15835 (file-name (git-file-name name version))
15836 (sha256
15837 (base32
15838 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
15839 (build-system python-build-system)
15840 (inputs
15841 `(("netcdf" ,netcdf)))
15842 (propagated-inputs
15843 `(("python-numpy" ,python2-numpy-1.8)
15844 ("python-pyro" ,python2-pyro)))
15845 (arguments
15846 ;; ScientificPython is not compatible with Python 3
15847 `(#:python ,python-2
15848 #:tests? #f ; No test suite
15849 #:phases
15850 (modify-phases %standard-phases
15851 (replace 'build
15852 (lambda* (#:key inputs #:allow-other-keys)
15853 (invoke "python" "setup.py" "build"
15854 (string-append "--netcdf_prefix="
15855 (assoc-ref inputs "netcdf"))))))))
15856 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
15857 (synopsis "Python modules for scientific computing")
15858 (description "ScientificPython is a collection of Python modules that are
15859 useful for scientific computing. Most modules are rather general (Geometry,
15860 physical units, automatic derivatives, ...) whereas others are more
15861 domain-specific (e.g. netCDF and PDB support). The library is currently
15862 not actively maintained and works only with Python 2 and NumPy < 1.9.")
15863 (license license:cecill-c)))
15864
15865 (define-public python2-mmtk
15866 (package
15867 (name "python2-mmtk")
15868 (version "2.7.12")
15869 (source
15870 (origin
15871 (method git-fetch)
15872 (uri (git-reference
15873 (url "https://github.com/khinsen/MMTK")
15874 (commit (string-append "rel" version))))
15875 (file-name (git-file-name name version))
15876 (sha256
15877 (base32
15878 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
15879 (build-system python-build-system)
15880 (native-inputs
15881 `(("netcdf" ,netcdf)))
15882 (propagated-inputs
15883 `(("python-scientific" ,python2-scientific)
15884 ("python-tkinter" ,python-2 "tk")))
15885 (arguments
15886 `(#:python ,python-2
15887 #:tests? #f
15888 #:phases
15889 (modify-phases %standard-phases
15890 (add-before 'build 'includes-from-scientific
15891 (lambda* (#:key inputs #:allow-other-keys)
15892 (mkdir-p "Include/Scientific")
15893 (copy-recursively
15894 (string-append
15895 (assoc-ref inputs "python-scientific")
15896 "/include/python2.7/Scientific")
15897 "Include/Scientific"))))))
15898 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15899 (synopsis "Python library for molecular simulation")
15900 (description "MMTK is a library for molecular simulations with an emphasis
15901 on biomolecules. It provides widely used methods such as Molecular Dynamics
15902 and normal mode analysis, but also basic routines for implementing new methods
15903 for simulation and analysis. The library is currently not actively maintained
15904 and works only with Python 2 and NumPy < 1.9.")
15905 (license license:cecill-c)))
15906
15907 (define-public python-phonenumbers
15908 (package
15909 (name "python-phonenumbers")
15910 (version "8.9.1")
15911 (source
15912 (origin
15913 (method url-fetch)
15914 (uri (pypi-uri "phonenumbers" version))
15915 (sha256
15916 (base32
15917 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15918 (build-system python-build-system)
15919 (home-page
15920 "https://github.com/daviddrysdale/python-phonenumbers")
15921 (synopsis
15922 "Python library for dealing with international phone numbers")
15923 (description
15924 "This package provides a Python port of Google's libphonenumber library.")
15925 (license license:asl2.0)))
15926
15927 (define-public python2-phonenumbers
15928 (package-with-python2 python-phonenumbers))
15929
15930 (define-public python-send2trash
15931 (package
15932 (name "python-send2trash")
15933 (version "1.5.0")
15934 (source
15935 (origin (method git-fetch)
15936 ;; Source tarball on PyPI doesn't include tests.
15937 (uri (git-reference
15938 (url "https://github.com/hsoft/send2trash.git")
15939 (commit version)))
15940 (file-name (git-file-name name version))
15941 (sha256
15942 (base32
15943 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
15944 (build-system python-build-system)
15945 (arguments
15946 '(#:phases
15947 (modify-phases %standard-phases
15948 (add-before 'check 'pre-check
15949 (lambda _
15950 (mkdir-p "/tmp/foo")
15951 (setenv "HOME" "/tmp/foo")
15952 #t)))))
15953 (home-page "https://github.com/hsoft/send2trash")
15954 (synopsis "Send files to the user's @file{~/Trash} directory")
15955 (description "This package provides a Python library to send files to the
15956 user's @file{~/Trash} directory.")
15957 (properties `((python2-variant . ,(delay python2-send2trash))))
15958 (license license:bsd-3)))
15959
15960 (define-public python2-send2trash
15961 (package
15962 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
15963 (arguments
15964 (substitute-keyword-arguments (package-arguments python-send2trash)
15965 ((#:phases phases)
15966 `(modify-phases ,phases
15967 (add-before 'check 'setenv
15968 (lambda _
15969 (setenv "PYTHONPATH"
15970 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
15971 #t))))))))
15972
15973 (define-public python-yapf
15974 (package
15975 (name "python-yapf")
15976 (version "0.29.0")
15977 (source
15978 (origin
15979 (method url-fetch)
15980 (uri (pypi-uri "yapf" version))
15981 (sha256
15982 (base32
15983 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
15984 (build-system python-build-system)
15985 (home-page "https://github.com/google/yapf")
15986 (synopsis "Formatter for Python code")
15987 (description "YAPF is a formatter for Python code. It's based off of
15988 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15989 takes the code and reformats it to the best formatting that conforms to the
15990 style guide, even if the original code didn't violate the style guide.")
15991 (license license:asl2.0)))
15992
15993 (define-public python2-yapf
15994 (package-with-python2 python-yapf))
15995
15996 (define-public python-gyp
15997 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
15998 (revision "0"))
15999 (package
16000 (name "python-gyp")
16001 ;; Google does not release versions,
16002 ;; based on second most recent commit date.
16003 (version (git-version "0.0.0" revision commit))
16004 (source
16005 (origin
16006 ;; Google does not release tarballs,
16007 ;; git checkout is needed.
16008 (method git-fetch)
16009 (uri (git-reference
16010 (url "https://chromium.googlesource.com/external/gyp")
16011 (commit commit)))
16012 (file-name (git-file-name name version))
16013 (sha256
16014 (base32
16015 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
16016 (build-system python-build-system)
16017 (home-page "https://gyp.gsrc.io/")
16018 (synopsis "GYP is a Meta-Build system")
16019 (description
16020 "GYP builds build systems for large, cross platform applications.
16021 It can be used to generate XCode projects, Visual Studio projects, Ninja build
16022 files, and Makefiles.")
16023 (license license:bsd-3))))
16024
16025 (define-public python2-gyp
16026 (package-with-python2 python-gyp))
16027
16028 (define-public python-whatever
16029 (package
16030 (name "python-whatever")
16031 (version "0.6")
16032 (source
16033 (origin
16034 (method git-fetch)
16035 (uri (git-reference
16036 (url "https://github.com/Suor/whatever")
16037 (commit version)))
16038 (file-name (git-file-name name version))
16039 (sha256
16040 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
16041 (build-system python-build-system)
16042 (arguments
16043 `(#:phases
16044 (modify-phases %standard-phases
16045 (replace 'check
16046 (lambda _
16047 (invoke "py.test"))))))
16048 (native-inputs
16049 `(("python-pytest" ,python-pytest)))
16050 (home-page "http://github.com/Suor/whatever")
16051 (synopsis "Make anonymous functions by partial application of operators")
16052 (description "@code{whatever} provides an easy way to make anonymous
16053 functions by partial application of operators.")
16054 (license license:bsd-3)))
16055
16056 (define-public python2-whatever
16057 (package-with-python2 python-whatever))
16058
16059 (define-public python-funcy
16060 (package
16061 (name "python-funcy")
16062 (version "1.11")
16063 (source
16064 (origin
16065 (method git-fetch)
16066 (uri (git-reference
16067 (url "https://github.com/Suor/funcy.git")
16068 (commit version)))
16069 (sha256
16070 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
16071 (file-name (git-file-name name version))))
16072 (build-system python-build-system)
16073 (arguments
16074 `(#:phases
16075 (modify-phases %standard-phases
16076 (replace 'check
16077 (lambda _
16078 (invoke "py.test"))))))
16079 (native-inputs
16080 `(("python-pytest" ,python-pytest)
16081 ("python-whatever" ,python-whatever)))
16082 (home-page "http://github.com/Suor/funcy")
16083 (synopsis "Functional tools")
16084 (description "@code{funcy} is a library that provides functional tools.
16085 Examples are:
16086 @enumerate
16087 @item merge - Merges collections of the same type
16088 @item walk - Type-preserving map
16089 @item select - Selects a part of a collection
16090 @item take - Takes the first n items of a collection
16091 @item first - Takes the first item of a collection
16092 @item remove - Predicated-removes items of a collection
16093 @item concat - Concatenates two collections
16094 @item flatten - Flattens a collection with subcollections
16095 @item distinct - Returns only distinct items
16096 @item split - Predicated-splits a collection
16097 @item split_at - Splits a collection at a given item
16098 @item group_by - Groups items by group
16099 @item pairwise - Pairs off adjacent items
16100 @item partial - Partially-applies a function
16101 @item curry - Curries a function
16102 @item compose - Composes functions
16103 @item complement - Complements a predicate
16104 @item all_fn - \"all\" with predicate
16105 @end enumerate")
16106 (license license:bsd-3)))
16107
16108 (define-public python2-funcy
16109 (package-with-python2 python-funcy))
16110
16111 (define-public python-isoweek
16112 (package
16113 (name "python-isoweek")
16114 (version "1.3.3")
16115 (source
16116 (origin
16117 (method url-fetch)
16118 (uri (pypi-uri "isoweek" version))
16119 (sha256
16120 (base32
16121 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
16122 (build-system python-build-system)
16123 (home-page "https://github.com/gisle/isoweek")
16124 (synopsis "Objects representing a week")
16125 (description "The @code{isoweek} module provide the class Week that
16126 implements the week definition of ISO 8601. This standard also defines
16127 a notation for identifying weeks; yyyyWww (where the W is a literal).
16128 Week instances stringify to this form.")
16129 (license license:bsd-3)))
16130
16131 (define-public python2-isoweek
16132 (package-with-python2 python-isoweek))
16133
16134 (define-public python-tokenize-rt
16135 (package
16136 (name "python-tokenize-rt")
16137 (version "2.0.1")
16138 (source
16139 (origin
16140 (method url-fetch)
16141 (uri (pypi-uri "tokenize-rt" version))
16142 (sha256
16143 (base32
16144 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
16145 (build-system python-build-system)
16146 (home-page "https://github.com/asottile/tokenize-rt")
16147 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
16148 (description
16149 "This Python library is a wrapper around @code{tokenize} from the Python
16150 standard library. It provides two additional tokens @code{ESCAPED_NL} and
16151 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
16152 and @code{tokens_to_src} to roundtrip.")
16153 (license license:expat)))
16154
16155 (define-public python-future-fstrings
16156 (package
16157 (name "python-future-fstrings")
16158 (version "0.4.1")
16159 (source
16160 (origin
16161 (method url-fetch)
16162 (uri (pypi-uri "future_fstrings" version))
16163 (sha256
16164 (base32
16165 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
16166 (build-system python-build-system)
16167 (propagated-inputs
16168 `(("python-tokenize-rt" ,python-tokenize-rt)))
16169 (home-page "https://github.com/asottile/future-fstrings")
16170 (synopsis "Backport of fstrings to Python < 3.6")
16171 (description
16172 "This package provides a UTF-8 compatible encoding
16173 @code{future_fstrings}, which performs source manipulation. It decodes the
16174 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
16175 @code{f} strings.")
16176 (license license:expat)))
16177
16178 (define-public python-typed-ast
16179 (package
16180 (name "python-typed-ast")
16181 (version "1.4.0")
16182 (source
16183 (origin
16184 (method git-fetch)
16185 (uri (git-reference
16186 (url "https://github.com/python/typed_ast.git")
16187 (commit version)))
16188 (sha256
16189 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
16190 (file-name (git-file-name name version))))
16191 (build-system python-build-system)
16192 (arguments
16193 `(#:modules ((guix build utils)
16194 (guix build python-build-system)
16195 (ice-9 ftw)
16196 (srfi srfi-1)
16197 (srfi srfi-26))
16198 #:phases
16199 (modify-phases %standard-phases
16200 (replace 'check
16201 (lambda _
16202 (let ((cwd (getcwd)))
16203 (setenv "PYTHONPATH"
16204 (string-append cwd "/build/"
16205 (find (cut string-prefix? "lib" <>)
16206 (scandir (string-append cwd "/build")))
16207 ":"
16208 (getenv "PYTHONPATH"))))
16209 (invoke "pytest")
16210 #t)))))
16211 (native-inputs `(("python-pytest" ,python-pytest)))
16212 (home-page "https://github.com/python/typed_ast")
16213 (synopsis "Fork of Python @code{ast} modules with type comment support")
16214 (description "This package provides a parser similar to the standard
16215 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
16216 include PEP 484 type comments and are independent of the version of Python
16217 under which they are run. The @code{typed_ast} parsers produce the standard
16218 Python AST (plus type comments), and are both fast and correct, as they are
16219 based on the CPython 2.7 and 3.7 parsers.")
16220 ;; See the file "LICENSE" for the details.
16221 (license (list license:psfl
16222 license:asl2.0
16223 license:expat)))) ;ast27/Parser/spark.py
16224
16225 (define-public python-typing
16226 (package
16227 (name "python-typing")
16228 (version "3.7.4.1")
16229 (source
16230 (origin
16231 (method url-fetch)
16232 (uri (pypi-uri "typing" version))
16233 (sha256
16234 (base32
16235 "08xs7s5pyq99hbrzw23inczmidz90krvpv9q5p1qrvh6yzrydpwi"))))
16236 (build-system python-build-system)
16237 (home-page "https://docs.python.org/3/library/typing.html")
16238 (synopsis "Type hints for Python")
16239 (description "This is a backport of the standard library @code{typing}
16240 module to Python versions older than 3.5. Typing defines a standard notation
16241 for Python function and variable type annotations. The notation can be used
16242 for documenting code in a concise, standard format, and it has been designed
16243 to also be used by static and runtime type checkers, static analyzers, IDEs
16244 and other tools.")
16245 (license license:psfl)))
16246
16247 (define-public python2-typing
16248 (package-with-python2 python-typing))
16249
16250 (define-public python-typing-extensions
16251 (package
16252 (name "python-typing-extensions")
16253 (version "3.7.4.1")
16254 (source
16255 (origin
16256 (method url-fetch)
16257 (uri (pypi-uri "typing_extensions" version))
16258 (sha256
16259 (base32
16260 "1wj1vcgbnm20aiinmphyxfrbv3qi9xdhvw89ab3qm42y9n4wq7h9"))))
16261 (build-system python-build-system)
16262 (home-page
16263 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
16264 (synopsis "Experimental type hints for Python")
16265 (description
16266 "The typing_extensions module contains additional @code{typing} hints not
16267 yet present in the of the @code{typing} standard library.
16268 Included are implementations of:
16269 @enumerate
16270 @item ClassVar
16271 @item ContextManager
16272 @item Counter
16273 @item DefaultDict
16274 @item Deque
16275 @item NewType
16276 @item NoReturn
16277 @item overload
16278 @item Protocol
16279 @item runtime
16280 @item Text
16281 @item Type
16282 @item TYPE_CHECKING
16283 @item AsyncGenerator
16284 @end enumerate\n")
16285 (license license:psfl)))
16286
16287 (define-public bpython
16288 (package
16289 (name "bpython")
16290 (version "0.18")
16291 (source
16292 (origin
16293 (method url-fetch)
16294 (uri (pypi-uri "bpython" version))
16295 (sha256
16296 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
16297 (build-system python-build-system)
16298 (arguments
16299 `(#:phases
16300 (modify-phases %standard-phases
16301 (add-after 'unpack 'remove-failing-test
16302 (lambda _
16303 ;; Remove failing test. FIXME: make it pass
16304 (delete-file "bpython/test/test_args.py")
16305 #t))
16306 (add-after 'wrap 'add-aliases
16307 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
16308 (lambda* (#:key outputs #:allow-other-keys)
16309 (let ((out (assoc-ref outputs "out")))
16310 (for-each
16311 (lambda (old new)
16312 (symlink old (string-append out "/bin/" new)))
16313 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
16314 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
16315 #t)))))
16316 (propagated-inputs
16317 `(("python-pygments" ,python-pygments)
16318 ("python-requests" ,python-requests)
16319 ("python-babel" ,python-babel) ; optional, for internationalization
16320 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
16321 ("python-greenlet" ,python-greenlet)
16322 ("python-urwid" ,python-urwid) ; for bpython-urwid only
16323 ("python-six" ,python-six)))
16324 (native-inputs
16325 `(("python-sphinx" ,python-sphinx)
16326 ("python-mock" ,python-mock)))
16327 (home-page "https://bpython-interpreter.org/")
16328 (synopsis "Fancy interface to the Python interpreter")
16329 (description "Bpython is a fancy interface to the Python
16330 interpreter. bpython's main features are
16331
16332 @enumerate
16333 @item in-line syntax highlighting,
16334 @item readline-like autocomplete with suggestions displayed as you type,
16335 @item expected parameter list for any Python function,
16336 @item \"rewind\" function to pop the last line of code from memory and
16337 re-evaluate,
16338 @item send the code you've entered off to a pastebin,
16339 @item save the code you've entered to a file, and
16340 @item auto-indentation.
16341 @end enumerate")
16342 (license license:expat)))
16343
16344 (define-public bpython2
16345 (let ((base (package-with-python2
16346 (strip-python2-variant bpython))))
16347 (package (inherit base)
16348 (name "bpython2")
16349 (arguments
16350 `(#:python ,python-2
16351 #:phases
16352 (modify-phases %standard-phases
16353 (add-after 'unpack 'remove-failing-test
16354 (lambda _
16355 ;; Remove failing test. FIXME: make it pass
16356 (delete-file "bpython/test/test_args.py")
16357 ;; Disable failing test-cases (renaming inhibits they are
16358 ;; discovered)
16359 (substitute* "bpython/test/test_curtsies_repl.py"
16360 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
16361 (string-append a "xxx_off_" b))
16362 (("^(\\s*def )(test_complex\\W)" _ a b)
16363 (string-append a "xxx_off_" b)))
16364 #t))
16365 (add-before 'build 'rename-scripts
16366 ;; rename the scripts to bypthon2, bpdb2, etc.
16367 (lambda _
16368 (substitute* "setup.py"
16369 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
16370 (string-append name "2" rest "\n"))
16371 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
16372 (string-append name "2" (or sub "") rest "\n")))
16373 #t))))))))
16374
16375 (define-public python-pyinotify
16376 (package
16377 (name "python-pyinotify")
16378 (version "0.9.6")
16379 (source (origin
16380 (method url-fetch)
16381 (uri (pypi-uri "pyinotify" version))
16382 (sha256
16383 (base32
16384 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
16385 (build-system python-build-system)
16386 (arguments `(#:tests? #f)) ;no tests
16387 (home-page "https://github.com/seb-m/pyinotify")
16388 (synopsis "Python library for monitoring inotify events")
16389 (description
16390 "@code{pyinotify} provides a Python interface for monitoring
16391 file system events on Linux.")
16392 (license license:expat)))
16393
16394 (define-public python2-pyinotify
16395 (package-with-python2 python-pyinotify))
16396
16397 ;; Ada parser uses this version.
16398 (define-public python2-quex-0.67.3
16399 (package
16400 (name "python2-quex")
16401 (version "0.67.3")
16402 (source
16403 (origin
16404 (method url-fetch)
16405 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
16406 (version-major+minor version)
16407 "/quex-" version ".zip"))
16408 (sha256
16409 (base32
16410 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
16411 (build-system python-build-system)
16412 (native-inputs
16413 `(("unzip" ,unzip)))
16414 (arguments
16415 `(#:python ,python-2
16416 #:tests? #f
16417 #:phases
16418 (modify-phases %standard-phases
16419 (delete 'configure)
16420 (delete 'build)
16421 (replace 'install
16422 (lambda* (#:key outputs #:allow-other-keys)
16423 (let* ((out (assoc-ref outputs "out"))
16424 (share/quex (string-append out "/share/quex"))
16425 (bin (string-append out "/bin")))
16426 (copy-recursively "." share/quex)
16427 (mkdir-p bin)
16428 (symlink (string-append share/quex "/quex-exe.py")
16429 (string-append bin "/quex"))
16430 #t))))))
16431 (native-search-paths
16432 (list (search-path-specification
16433 (variable "QUEX_PATH")
16434 (files '("share/quex")))))
16435 (home-page "http://quex.sourceforge.net/")
16436 (synopsis "Lexical analyzer generator in Python")
16437 (description "@code{quex} is a lexical analyzer generator in Python.")
16438 (license license:lgpl2.1+))) ; Non-military
16439
16440 (define-public python2-quex
16441 (package (inherit python2-quex-0.67.3)
16442 (name "python2-quex")
16443 (version "0.68.1")
16444 (source
16445 (origin
16446 (method url-fetch)
16447 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
16448 (sha256
16449 (base32
16450 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
16451 (file-name (string-append name "-" version ".tar.gz"))))))
16452
16453 (define-public python-more-itertools
16454 (package
16455 (name "python-more-itertools")
16456 (version "8.2.0")
16457 (source
16458 (origin
16459 (method url-fetch)
16460 (uri (pypi-uri "more-itertools" version))
16461 (sha256
16462 (base32
16463 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
16464 (build-system python-build-system)
16465 (home-page "https://github.com/erikrose/more-itertools")
16466 (synopsis "More routines for operating on iterables, beyond itertools")
16467 (description "Python's built-in @code{itertools} module implements a
16468 number of iterator building blocks inspired by constructs from APL, Haskell,
16469 and SML. @code{more-itertools} includes additional building blocks for
16470 working with iterables.")
16471 (properties `((python2-variant . ,(delay python2-more-itertools))))
16472 (license license:expat)))
16473
16474 ;; The 5.x series are the last versions supporting Python 2.7.
16475 (define-public python2-more-itertools
16476 (package
16477 (inherit python-more-itertools)
16478 (name "python2-more-itertools")
16479 (version "5.0.0")
16480 (source (origin
16481 (method url-fetch)
16482 (uri (pypi-uri "more-itertools" version))
16483 (sha256
16484 (base32
16485 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
16486 (arguments
16487 `(#:python ,python-2))
16488 (propagated-inputs
16489 `(("python2-six" ,python2-six-bootstrap)))))
16490
16491 (define-public python-latexcodec
16492 (package
16493 (name "python-latexcodec")
16494 (version "1.0.7")
16495 (source
16496 (origin
16497 (method url-fetch)
16498 (uri (pypi-uri "latexcodec" version))
16499 (sha256
16500 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
16501 (build-system python-build-system)
16502 (inputs
16503 `(("python-six" ,python-six)))
16504 (home-page "https://readthedocs.org/projects/latexcodec/")
16505 (synopsis "Work with LaTeX code in Python")
16506 (description "Lexer and codec to work with LaTeX code in Python.")
16507 (license license:expat)))
16508
16509 (define-public python-pybtex
16510 (package
16511 (name "python-pybtex")
16512 (version "0.22.2")
16513 (source
16514 (origin
16515 (method url-fetch)
16516 (uri (pypi-uri "pybtex" version))
16517 (sha256
16518 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
16519 (build-system python-build-system)
16520 (native-inputs
16521 `(("python-nose" ,python-nose)))
16522 (inputs
16523 `(("python-latexcodec" ,python-latexcodec)
16524 ("python-pyyaml" ,python-pyyaml)
16525 ("python-six" ,python-six)))
16526 (arguments
16527 `(#:test-target "nosetests"))
16528 (home-page "https://pybtex.org/")
16529 (synopsis "BibTeX-compatible bibliography processor")
16530 (description "Pybtex is a BibTeX-compatible bibliography processor written
16531 in Python. You can simply type pybtex instead of bibtex.")
16532 (license license:expat)))
16533
16534 (define-public python-onetimepass
16535 (package
16536 (name "python-onetimepass")
16537 (version "1.0.1")
16538 (source
16539 (origin
16540 (method url-fetch)
16541 (uri (pypi-uri "onetimepass" version))
16542 (sha256
16543 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
16544 (build-system python-build-system)
16545 (propagated-inputs `(("python-six" ,python-six)))
16546 (home-page "https://github.com/tadeck/onetimepass/")
16547 (synopsis "One-time password library")
16548 (description "Python one-time password library for HMAC-based (HOTP) and
16549 time-based (TOTP) passwords.")
16550 (license license:expat)))
16551
16552 (define-public python-parso
16553 (package
16554 (name "python-parso")
16555 (version "0.7.0")
16556 (source
16557 (origin
16558 (method url-fetch)
16559 (uri (pypi-uri "parso" version))
16560 (sha256
16561 (base32
16562 "0b7irps2dqmzq41sxbpvxbivhh1x2hwmbqp45bbpd82446p9z3lh"))))
16563 (native-inputs
16564 `(("python-pytest" ,python-pytest)))
16565 (build-system python-build-system)
16566 (arguments
16567 `(#:phases (modify-phases %standard-phases
16568 (replace 'check
16569 (lambda _ (invoke "pytest" "-vv"))))))
16570 (home-page "https://github.com/davidhalter/parso")
16571 (synopsis "Python Parser")
16572 (description "Parso is a Python parser that supports error recovery and
16573 round-trip parsing for different Python versions (in multiple Python versions).
16574 Parso is also able to list multiple syntax errors in your Python file.")
16575 (license license:expat)))
16576
16577 (define-public python2-parso
16578 (package-with-python2 python-parso))
16579
16580 (define-public python-async-generator
16581 (package
16582 (name "python-async-generator")
16583 (version "1.10")
16584 (source
16585 (origin
16586 (method url-fetch)
16587 (uri (pypi-uri "async_generator" version))
16588 (sha256
16589 (base32
16590 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
16591 (build-system python-build-system)
16592 (native-inputs
16593 `(("python-pytest" ,python-pytest)))
16594 (home-page "https://github.com/python-trio/async_generator")
16595 (synopsis "Async generators and context managers for Python 3.5+")
16596 (description "@code{async_generator} back-ports Python 3.6's native async
16597 generators and Python 3.7's context managers into Python 3.5.")
16598 ;; Dual licensed.
16599 (license (list license:expat license:asl2.0))))
16600
16601 (define-public python-async-timeout
16602 (package
16603 (name "python-async-timeout")
16604 (version "3.0.1")
16605 (source
16606 (origin
16607 (method url-fetch)
16608 (uri (pypi-uri "async-timeout" version))
16609 (sha256
16610 (base32
16611 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
16612 (build-system python-build-system)
16613 (home-page "https://github.com/aio-libs/async_timeout/")
16614 (synopsis "Timeout context manager for asyncio programs")
16615 (description "@code{async-timeout} provides a timeout timeout context
16616 manager compatible with @code{asyncio}.")
16617 (license license:asl2.0)))
16618
16619 (define-public python-glob2
16620 (package
16621 (name "python-glob2")
16622 (version "0.7")
16623 (source
16624 (origin
16625 (method git-fetch)
16626 (uri (git-reference
16627 (url "https://github.com/miracle2k/python-glob2.git")
16628 (commit (string-append "v" version))))
16629 (file-name (git-file-name name version))
16630 (sha256
16631 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
16632 (build-system python-build-system)
16633 (home-page "https://github.com/miracle2k/python-glob2/")
16634 (synopsis "Extended Version of the python buildin glob module")
16635 (description "This is an extended version of the Python
16636 @url{http://docs.python.org/library/glob.html, built-in glob module} which
16637 adds:
16638
16639 @itemize
16640 @item The ability to capture the text matched by glob patterns, and return
16641 those matches alongside the file names.
16642 @item A recursive @code{**} globbing syntax, akin for example to the
16643 @code{globstar} option of Bash.
16644 @item The ability to replace the file system functions used, in order to glob
16645 on virtual file systems.
16646 @item Compatible with Python 2 and Python 3 (tested with 3.3).
16647 @end itemize
16648
16649 Glob2 currently based on the glob code from Python 3.3.1.")
16650 (license license:bsd-2)))
16651
16652 (define-public python2-glob2
16653 (package-with-python2 python-glob2))
16654
16655 (define-public python-gipc
16656 (package
16657 (name "python-gipc")
16658 (version "0.6.0")
16659 (source
16660 (origin
16661 (method url-fetch)
16662 (uri (pypi-uri "gipc" version ".zip"))
16663 (sha256
16664 (base32
16665 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
16666 (build-system python-build-system)
16667 (native-inputs
16668 `(("unzip" ,unzip)))
16669 (propagated-inputs
16670 `(("python-gevent" ,python-gevent)))
16671 (home-page "https://gehrcke.de/gipc/")
16672 (synopsis "Child process management in the context of gevent")
16673 (description "Usage of Python's multiprocessing package in a
16674 gevent-powered application may raise problems. With @code{gipc},
16675 process-based child processes can safely be created anywhere within a
16676 gevent-powered application.")
16677 (license license:expat)))
16678
16679 (define-public python2-gipc
16680 (package-with-python2 python-gipc))
16681
16682 (define-public python-fusepy
16683 (package
16684 (name "python-fusepy")
16685 (version "2.0.4")
16686 (source
16687 (origin
16688 (method url-fetch)
16689 (uri (pypi-uri "fusepy" version))
16690 (sha256
16691 (base32
16692 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
16693 (build-system python-build-system)
16694 (arguments
16695 `(#:phases
16696 (modify-phases %standard-phases
16697 (add-before 'build 'set-library-file-name
16698 (lambda* (#:key inputs #:allow-other-keys)
16699 (let ((fuse (assoc-ref inputs "fuse")))
16700 (substitute* "fuse.py"
16701 (("find_library\\('fuse'\\)")
16702 (string-append "'" fuse "/lib/libfuse.so'")))
16703 #t))))))
16704 (propagated-inputs
16705 `(("fuse" ,fuse)))
16706 (home-page "https://github.com/fusepy/fusepy")
16707 (synopsis "Simple ctypes bindings for FUSE")
16708 (description "Python module that provides a simple interface to FUSE and
16709 MacFUSE. The binding is created using the standard @code{ctypes} library.")
16710 (license license:isc)))
16711
16712 (define-public python2-fusepy
16713 (package-with-python2 python-fusepy))
16714
16715 (define-public python-fusepyng
16716 (package
16717 (name "python-fusepyng")
16718 (version "1.0.7")
16719 (source
16720 (origin
16721 (method url-fetch)
16722 (uri (pypi-uri "fusepyng" version))
16723 (sha256
16724 (base32
16725 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
16726 (build-system python-build-system)
16727 (arguments
16728 '(#:phases
16729 (modify-phases %standard-phases
16730 (add-after 'unpack 'set-libfuse-path
16731 (lambda* (#:key inputs #:allow-other-keys)
16732 (let ((fuse (assoc-ref inputs "fuse")))
16733 (substitute* "fusepyng.py"
16734 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
16735 (string-append "\"" fuse "/lib/libfuse.so\""))))
16736 #t)))))
16737 (inputs
16738 `(("fuse" ,fuse)))
16739 (propagated-inputs
16740 `(("python-paramiko" ,python-paramiko)))
16741 (home-page "https://github.com/rianhunter/fusepyng")
16742 (synopsis "Simple ctypes bindings for FUSE")
16743 (description "@code{fusepyng} is a Python module that provides a simple
16744 interface to FUSE on various operating systems. It's just one file and is
16745 implemented using @code{ctypes}.")
16746 (license license:isc)))
16747
16748 (define-public python2-gdrivefs
16749 (package
16750 (name "python2-gdrivefs")
16751 (version "0.14.9")
16752 (source
16753 (origin
16754 (method url-fetch)
16755 (uri (pypi-uri "gdrivefs" version))
16756 (sha256
16757 (base32
16758 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
16759 (build-system python-build-system)
16760 (arguments
16761 `(#:python ,python-2
16762 #:phases
16763 (modify-phases %standard-phases
16764 (add-before 'build 'patch-setup-py
16765 (lambda _
16766 ;; Update requirements from dependency==version
16767 ;; to dependency>=version
16768 (substitute* "gdrivefs/resources/requirements.txt"
16769 (("==") ">="))
16770 #t)))))
16771 (native-inputs
16772 `(("python2-gipc" ,python2-gipc)
16773 ("python2-gevent" ,python2-gevent)
16774 ("python2-greenlet" ,python2-greenlet)
16775 ("python2-httplib2" ,python2-httplib2)
16776 ("python2-uritemplate" ,python2-uritemplate)
16777 ("python2-oauth2client" ,python2-oauth2client)
16778 ("python2-six" ,python2-six)))
16779 (propagated-inputs
16780 `(("python2-dateutil" ,python2-dateutil)
16781 ("python2-fusepy" ,python2-fusepy)
16782 ("python2-google-api-client" ,python2-google-api-client)))
16783 (home-page "https://github.com/dsoprea/GDriveFS")
16784 (synopsis "Mount Google Drive as a local file system")
16785 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
16786 under Python 2.7.")
16787 (license license:gpl2)))
16788
16789 (define-public python-userspacefs
16790 (package
16791 (name "python-userspacefs")
16792 (version "1.0.13")
16793 (source
16794 (origin
16795 (method url-fetch)
16796 (uri (pypi-uri "userspacefs" version))
16797 (sha256
16798 (base32
16799 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
16800 (build-system python-build-system)
16801 (propagated-inputs
16802 `(("python-fusepyng" ,python-fusepyng)))
16803 (home-page "https://github.com/rianhunter/userspacefs")
16804 (synopsis "User-space file systems for Python")
16805 (description
16806 "@code{userspacefs} is a library that allows you to easily write
16807 user-space file systems in Python.")
16808 (license license:gpl3+)))
16809
16810 (define-public pybind11
16811 (package
16812 (name "pybind11")
16813 (version "2.4.3")
16814 (source (origin
16815 (method git-fetch)
16816 (uri (git-reference
16817 (url "https://github.com/pybind/pybind11.git")
16818 (commit (string-append "v" version))))
16819 (sha256
16820 (base32
16821 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
16822 (file-name (git-file-name name version))))
16823 (build-system cmake-build-system)
16824 (native-inputs
16825 `(("python" ,python-wrapper)
16826
16827 ;; The following dependencies are used for tests.
16828 ("python-pytest" ,python-pytest)
16829 ("catch" ,catch-framework2-1)
16830 ("eigen" ,eigen)))
16831 (arguments
16832 `(#:configure-flags
16833 (list (string-append "-DCATCH_INCLUDE_DIR="
16834 (assoc-ref %build-inputs "catch")
16835 "/include/catch"))
16836
16837 #:phases (modify-phases %standard-phases
16838 (add-after 'install 'install-python
16839 (lambda* (#:key outputs #:allow-other-keys)
16840 (let ((out (assoc-ref outputs "out")))
16841 (with-directory-excursion "../source"
16842 (setenv "PYBIND11_USE_CMAKE" "yes")
16843 (invoke "python" "setup.py" "install"
16844 "--single-version-externally-managed"
16845 "--root=/"
16846 (string-append "--prefix=" out)))))))
16847
16848 #:test-target "check"))
16849 (home-page "https://github.com/pybind/pybind11/")
16850 (synopsis "Seamless operability between C++11 and Python")
16851 (description
16852 "@code{pybind11} is a lightweight header-only library that exposes C++
16853 types in Python and vice versa, mainly to create Python bindings of existing
16854 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
16855 library: to minimize boilerplate code in traditional extension modules by
16856 inferring type information using compile-time introspection.")
16857 (license license:bsd-3)))
16858
16859 (define-public python-fasteners
16860 (package
16861 (name "python-fasteners")
16862 (version "0.14.1")
16863 (source
16864 (origin
16865 (method url-fetch)
16866 (uri (pypi-uri "fasteners" version))
16867 (sha256
16868 (base32
16869 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16870 (build-system python-build-system)
16871 (propagated-inputs
16872 `(("python-monotonic" ,python-monotonic)
16873 ("python-six" ,python-six)
16874 ("python-testtools" ,python-testtools)))
16875 (home-page "https://github.com/harlowja/fasteners")
16876 (synopsis "Python package that provides useful locks")
16877 (description
16878 "This package provides a Python program that provides following locks:
16879
16880 @itemize
16881 @item Locking decorator
16882 @item Reader-writer locks
16883 @item Inter-process locks
16884 @item Generic helpers
16885 @end itemize\n")
16886 (properties `((python2-variant . ,(delay python2-fasteners))))
16887 (license license:asl2.0)))
16888
16889 (define-public python2-fasteners
16890 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16891 (package
16892 (inherit base)
16893 (propagated-inputs
16894 `(("python2-futures" ,python2-futures)
16895 ,@(package-propagated-inputs base))))))
16896
16897 (define-public python-requests-file
16898 (package
16899 (name "python-requests-file")
16900 (version "1.4.3")
16901 (source
16902 (origin
16903 (method url-fetch)
16904 (uri (pypi-uri "requests-file" version))
16905 (sha256
16906 (base32
16907 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16908 (build-system python-build-system)
16909 (propagated-inputs
16910 `(("python-requests" ,python-requests)
16911 ("python-six" ,python-six)))
16912 (home-page
16913 "https://github.com/dashea/requests-file")
16914 (synopsis "File transport adapter for Requests")
16915 (description
16916 "Requests-File is a transport adapter for use with the Requests Python
16917 library to allow local file system access via @code{file://} URLs.")
16918 (license license:asl2.0)))
16919
16920 (define-public python2-requests-file
16921 (package-with-python2 python-requests-file))
16922
16923 (define-public python-tldextract
16924 (package
16925 (name "python-tldextract")
16926 (version "2.2.0")
16927 (source
16928 (origin
16929 (method url-fetch)
16930 (uri (pypi-uri "tldextract" version))
16931 (sha256
16932 (base32
16933 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16934 (build-system python-build-system)
16935 (native-inputs
16936 `(("python-pytest" ,python-pytest)
16937 ("python-responses" ,python-responses)))
16938 (propagated-inputs
16939 `(("python-idna" ,python-idna)
16940 ("python-requests" ,python-requests)
16941 ("python-requests-file" ,python-requests-file)))
16942 (home-page
16943 "https://github.com/john-kurkowski/tldextract")
16944 (synopsis
16945 "Separate the TLD from the registered domain and subdomains of a URL")
16946 (description
16947 "TLDExtract accurately separates the TLD from the registered domain and
16948 subdomains of a URL, using the Public Suffix List. By default, this includes
16949 the public ICANN TLDs and their exceptions. It can optionally support the
16950 Public Suffix List's private domains as well.")
16951 (license license:bsd-3)))
16952
16953 (define-public python2-tldextract
16954 (package-with-python2 python-tldextract))
16955
16956 (define-public python-pynamecheap
16957 (package
16958 (name "python-pynamecheap")
16959 (version "0.0.3")
16960 (source
16961 (origin
16962 (method url-fetch)
16963 (uri (pypi-uri "PyNamecheap" version))
16964 (sha256
16965 (base32
16966 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16967 (build-system python-build-system)
16968 (propagated-inputs
16969 `(("python-requests" ,python-requests)))
16970 (home-page
16971 "https://github.com/Bemmu/PyNamecheap")
16972 (synopsis
16973 "Namecheap API client in Python")
16974 (description
16975 "PyNamecheap is a Namecheap API client in Python.")
16976 (license license:expat)))
16977
16978 (define-public python2-pynamecheap
16979 (package-with-python2 python-pynamecheap))
16980
16981 (define-public python-dns-lexicon
16982 (package
16983 (name "python-dns-lexicon")
16984 (version "2.4.0")
16985 (source
16986 (origin
16987 (method url-fetch)
16988 (uri (pypi-uri "dns-lexicon" version))
16989 (sha256
16990 (base32
16991 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16992 (build-system python-build-system)
16993 (arguments
16994 `(#:tests? #f)) ;requires internet access
16995 (propagated-inputs
16996 `(("python-future" ,python-future)
16997 ("python-pynamecheap" ,python-pynamecheap)
16998 ("python-requests" ,python-requests)
16999 ("python-tldextract" ,python-tldextract)
17000 ("python-urllib3" ,python-urllib3)))
17001 (home-page "https://github.com/AnalogJ/lexicon")
17002 (synopsis
17003 "Manipulate DNS records on various DNS providers")
17004 (description
17005 "Lexicon provides a way to manipulate DNS records on multiple DNS
17006 providers in a standardized way. It has a CLI but it can also be used as a
17007 Python library. It was designed to be used in automation, specifically with
17008 Let's Encrypt.")
17009 (license license:expat)))
17010
17011 (define-public python2-dns-lexicon
17012 (package-with-python2 python-dns-lexicon))
17013
17014 (define-public python-commandlines
17015 (package
17016 (name "python-commandlines")
17017 (version "0.4.1")
17018 (source
17019 (origin
17020 (method url-fetch)
17021 (uri (pypi-uri "commandlines" version))
17022 (sha256
17023 (base32
17024 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
17025 (build-system python-build-system)
17026 (home-page "https://github.com/chrissimpkins/commandlines")
17027 (synopsis "Command line argument to object parsing library")
17028 (description
17029 "@code{Commandlines} is a Python library for command line application
17030 development that supports command line argument parsing, command string
17031 validation testing and application logic.")
17032 (license license:expat)))
17033
17034 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
17035 ;; python-numba. They have a very unflexible relationship.
17036 (define-public python-numba
17037 (package
17038 (name "python-numba")
17039 (version "0.46.0")
17040 (source
17041 (origin
17042 (method url-fetch)
17043 (uri (pypi-uri "numba" version))
17044 (sha256
17045 (base32
17046 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
17047 (build-system python-build-system)
17048 (arguments
17049 `(#:modules ((guix build utils)
17050 (guix build python-build-system)
17051 (ice-9 ftw)
17052 (srfi srfi-1)
17053 (srfi srfi-26))
17054 #:phases
17055 (modify-phases %standard-phases
17056 (add-after 'unpack 'disable-proprietary-features
17057 (lambda _
17058 (setenv "NUMBA_DISABLE_HSA" "1")
17059 (setenv "NUMBA_DISABLE_CUDA" "1")
17060 #t))
17061 (add-after 'unpack 'remove-failing-tests
17062 (lambda _
17063 ;; FIXME: These tests fail for unknown reasons:
17064 ;; test_non_writable_pycache, test_non_creatable_pycache, and
17065 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
17066 (substitute* "numba/tests/test_dispatcher.py"
17067 (("def test(_non_writable_pycache)" _ m)
17068 (string-append "def guix_skip" m))
17069 (("def test(_non_creatable_pycache)" _ m)
17070 (string-append "def guix_skip" m))
17071 (("def test(_frozen)" _ m)
17072 (string-append "def guix_skip" m)))
17073
17074 ;; These tests fail because we don't run the tests from the build
17075 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
17076 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
17077 (substitute* "numba/tests/test_pycc.py"
17078 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
17079 (string-append "def guix_skip" m)))
17080
17081 ;; These tests fail because our version of Python does not have
17082 ;; a recognizable front-end for the Numba distribution to use
17083 ;; to check against.
17084 (substitute* "numba/tests/test_entrypoints.py"
17085 (("def test(_init_entrypoint)" _ m)
17086 (string-append "def guix_skip" m)))
17087 (substitute* "numba/tests/test_jitclasses.py"
17088 (("def test(_jitclass_longlabel_not_truncated)" _ m)
17089 (string-append "def guix_skip" m)))
17090 #t))
17091 (replace 'check
17092 (lambda _
17093 (let ((cwd (getcwd)))
17094 (setenv "PYTHONPATH"
17095 (string-append cwd "/build/"
17096 (find (cut string-prefix? "lib" <>)
17097 (scandir (string-append cwd "/build")))
17098 ":"
17099 (getenv "PYTHONPATH")))
17100 ;; Something is wrong with the PYTHONPATH when running the
17101 ;; tests from the build directory, as it complains about not being
17102 ;; able to import certain modules.
17103 (with-directory-excursion "/tmp"
17104 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
17105 #t)))))
17106 (propagated-inputs
17107 `(("python-llvmlite" ,python-llvmlite)
17108 ("python-numpy" ,python-numpy)
17109 ("python-singledispatch" ,python-singledispatch)))
17110 ;; Needed for tests.
17111 (inputs
17112 `(("python-jinja2" ,python-jinja2)
17113 ("python-pygments" ,python-pygments)))
17114 (home-page "https://numba.pydata.org")
17115 (synopsis "Compile Python code using LLVM")
17116 (description "Numba gives you the power to speed up your applications with
17117 high performance functions written directly in Python. With a few
17118 annotations, array-oriented and math-heavy Python code can be just-in-time
17119 compiled to native machine instructions, similar in performance to C, C++ and
17120 Fortran, without having to switch languages or Python interpreters.
17121
17122 Numba works by generating optimized machine code using the LLVM compiler
17123 infrastructure at import time, runtime, or statically (using the included pycc
17124 tool).")
17125 (license license:bsd-3)))
17126
17127 (define-public python-numcodecs
17128 (package
17129 (name "python-numcodecs")
17130 (version "0.6.4")
17131 (source
17132 (origin
17133 (method url-fetch)
17134 (uri (pypi-uri "numcodecs" version))
17135 (sha256
17136 (base32
17137 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
17138 (build-system python-build-system)
17139 (propagated-inputs
17140 `(("python-numpy" ,python-numpy)
17141 ("python-msgpack" ,python-msgpack)))
17142 (native-inputs
17143 `(("python-pytest" ,python-pytest)
17144 ("python-setuptools-scm" ,python-setuptools-scm)))
17145 (home-page "https://github.com/zarr-developers/numcodecs")
17146 (synopsis "Buffer compression and transformation codecs")
17147 (description
17148 "This Python package provides buffer compression and transformation
17149 codecs for use in data storage and communication applications.")
17150 (license license:expat)))
17151
17152 (define-public python-asciitree
17153 (package
17154 (name "python-asciitree")
17155 (version "0.3.3")
17156 (source
17157 (origin
17158 (method url-fetch)
17159 (uri (pypi-uri "asciitree" version))
17160 (sha256
17161 (base32
17162 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
17163 (build-system python-build-system)
17164 (home-page "https://github.com/mbr/asciitree")
17165 (synopsis "Draws ASCII trees")
17166 (description "This package draws tree structures using characters.")
17167 (license license:expat)))
17168
17169 (define-public python-zarr
17170 (package
17171 (name "python-zarr")
17172 (version "2.4.0")
17173 (source
17174 (origin
17175 (method url-fetch)
17176 (uri (pypi-uri "zarr" version))
17177 (sha256
17178 (base32
17179 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
17180 (build-system python-build-system)
17181 (arguments
17182 `(#:phases
17183 (modify-phases %standard-phases
17184 (add-after 'unpack 'disable-service-tests
17185 (lambda _
17186 (setenv "ZARR_TEST_ABS" "0")
17187 (setenv "ZARR_TEST_MONGO" "0")
17188 (setenv "ZARR_TEST_REDIS" "0")
17189 #t))
17190 (replace 'check
17191 (lambda _
17192 (invoke "pytest" "-vv" "-k" "not lmdb")
17193 #t)))))
17194 (propagated-inputs
17195 `(("python-asciitree" ,python-asciitree)
17196 ("python-fasteners" ,python-fasteners)
17197 ("python-numcodecs" ,python-numcodecs)
17198 ("python-numpy" ,python-numpy)))
17199 (native-inputs
17200 `(("python-pytest" ,python-pytest)
17201 ("python-setuptools-scm" ,python-setuptools-scm)))
17202 (home-page "https://github.com/zarr-developers/zarr-python")
17203 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
17204 (description
17205 "This package provides an implementation of chunked, compressed,
17206 N-dimensional arrays for Python.")
17207 (license license:expat)))
17208
17209 (define-public python-anndata
17210 (package
17211 (name "python-anndata")
17212 (version "0.7.1")
17213 (source
17214 (origin
17215 (method url-fetch)
17216 (uri (pypi-uri "anndata" version))
17217 (sha256
17218 (base32
17219 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
17220 (build-system python-build-system)
17221 (arguments
17222 `(#:phases
17223 (modify-phases %standard-phases
17224 (add-after 'unpack 'delete-inconvenient-tests
17225 (lambda _
17226 ;; This test depends on python-scikit-learn.
17227 (delete-file "anndata/tests/test_inplace_subset.py")
17228 #t))
17229 (delete 'check)
17230 (add-after 'install 'check
17231 (lambda* (#:key inputs outputs #:allow-other-keys)
17232 (add-installed-pythonpath inputs outputs)
17233 (invoke "pytest" "-vv"))))))
17234 (propagated-inputs
17235 `(("python-h5py" ,python-h5py)
17236 ("python-importlib-metadata" ,python-importlib-metadata)
17237 ("python-natsort" ,python-natsort)
17238 ("python-numcodecs" ,python-numcodecs)
17239 ("python-packaging" ,python-packaging)
17240 ("python-pandas" ,python-pandas)
17241 ("python-scipy" ,python-scipy)
17242 ("python-zarr" ,python-zarr)))
17243 (native-inputs
17244 `(("python-joblib" ,python-joblib)
17245 ("python-pytest" ,python-pytest)
17246 ("python-setuptools-scm" ,python-setuptools-scm)))
17247 (home-page "https://github.com/theislab/anndata")
17248 (synopsis "Annotated data for data analysis pipelines")
17249 (description "Anndata is a package for simple (functional) high-level APIs
17250 for data analysis pipelines. In this context, it provides an efficient,
17251 scalable way of keeping track of data together with learned annotations and
17252 reduces the code overhead typically encountered when using a mostly
17253 object-oriented library such as @code{scikit-learn}.")
17254 (license license:bsd-3)))
17255
17256 (define-public python-dill
17257 (package
17258 (name "python-dill")
17259 (version "0.3.1.1")
17260 (source
17261 (origin
17262 (method url-fetch)
17263 (uri (pypi-uri "dill" version))
17264 (sha256
17265 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
17266 (build-system python-build-system)
17267 (arguments
17268 `(#:phases
17269 (modify-phases %standard-phases
17270 (replace 'check
17271 (lambda _
17272 (with-directory-excursion "/tmp"
17273 (invoke "nosetests" "-v"))
17274 #t)))))
17275 (native-inputs
17276 `(("python-nose" ,python-nose)))
17277 (home-page "https://pypi.org/project/dill/")
17278 (synopsis "Serialize all of Python")
17279 (description "Dill extends Python's @code{pickle} module for serializing
17280 and de-serializing Python objects to the majority of the built-in Python
17281 types. Dill provides the user the same interface as the @code{pickle} module,
17282 and also includes some additional features. In addition to pickling Python
17283 objects, @code{dill} provides the ability to save the state of an interpreter
17284 session in a single command. Hence, it would be feasible to save a
17285 interpreter session, close the interpreter, ship the pickled file to another
17286 computer, open a new interpreter, unpickle the session and thus continue from
17287 the saved state of the original interpreter session.")
17288 (license license:bsd-3)))
17289
17290 (define-public python-multiprocess
17291 (package
17292 (name "python-multiprocess")
17293 (version "0.70.9")
17294 (source
17295 (origin
17296 (method url-fetch)
17297 (uri (pypi-uri "multiprocess" version))
17298 (sha256
17299 (base32
17300 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
17301 (build-system python-build-system)
17302 (arguments
17303 `(#:phases
17304 (modify-phases %standard-phases
17305 (add-after 'unpack 'disable-broken-tests
17306 (lambda _
17307 ;; This test is broken as there is no keyboard interrupt.
17308 (substitute* "py3.7/multiprocess/tests/__init__.py"
17309 (("^(.*)def test_wait_result"
17310 line indent)
17311 (string-append indent
17312 "@unittest.skip(\"Disabled by Guix\")\n"
17313 line)))
17314 #t))
17315 ;; Tests must be run after installation.
17316 (delete 'check)
17317 (add-after 'install 'check
17318 (lambda* (#:key inputs outputs #:allow-other-keys)
17319 (add-installed-pythonpath inputs outputs)
17320 (invoke "python" "-m" "multiprocess.tests")
17321 #t)))))
17322 (propagated-inputs
17323 `(("python-dill" ,python-dill)))
17324 (home-page "https://pypi.org/project/multiprocess/")
17325 (synopsis "Multiprocessing and multithreading in Python")
17326 (description
17327 "This package is a fork of the multiprocessing Python package, a package
17328 which supports the spawning of processes using the API of the standard
17329 library's @code{threading} module.")
17330 (license license:bsd-3)))
17331
17332 (define-public python-toolz
17333 (package
17334 (name "python-toolz")
17335 (version "0.9.0")
17336 (source
17337 (origin
17338 (method url-fetch)
17339 (uri (pypi-uri "toolz" version))
17340 (sha256
17341 (base32
17342 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
17343 (build-system python-build-system)
17344 ;; FIXME: tests cannot be computed: "Can't perform this operation for
17345 ;; unregistered loader type"
17346 (arguments '(#:tests? #f))
17347 (home-page "https://github.com/pytoolz/toolz/")
17348 (synopsis "List processing tools and functional utilities")
17349 (description
17350 "This package provides a set of utility functions for iterators,
17351 functions, and dictionaries.")
17352 (license license:bsd-3)))
17353
17354 (define-public python2-toolz
17355 (package-with-python2 python-toolz))
17356
17357 (define-public python-cytoolz
17358 (package
17359 (name "python-cytoolz")
17360 (version "0.9.0.1")
17361 (source
17362 (origin
17363 (method url-fetch)
17364 (uri (pypi-uri "cytoolz" version))
17365 (sha256
17366 (base32
17367 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
17368 (build-system python-build-system)
17369 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
17370 ;; 'exceptions'"
17371 (arguments '(#:tests? #f))
17372 (propagated-inputs
17373 `(("python-toolz" ,python-toolz)))
17374 (native-inputs
17375 `(("python-cython" ,python-cython)))
17376 (home-page "https://github.com/pytoolz/cytoolz")
17377 (synopsis "High performance functional utilities")
17378 (description
17379 "The cytoolz package implements the same API as provided by toolz. The
17380 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
17381 that is accessible to other projects developed in Cython.")
17382 (license license:bsd-3)))
17383
17384 (define-public python-sortedcontainers
17385 (package
17386 (name "python-sortedcontainers")
17387 (version "2.1.0")
17388 (source
17389 (origin
17390 (method url-fetch)
17391 (uri (pypi-uri "sortedcontainers" version))
17392 (sha256
17393 (base32
17394 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
17395 (build-system python-build-system)
17396 (arguments
17397 ;; FIXME: Tests require many extra dependencies, and would introduce
17398 ;; a circular dependency on hypothesis, which uses this package.
17399 '(#:tests? #f))
17400 (propagated-inputs
17401 `(("python-appdirs" ,python-appdirs)
17402 ("python-distlib" ,python-distlib)
17403 ("python-filelock" ,python-filelock)
17404 ("python-six" ,python-six-bootstrap)))
17405 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
17406 (synopsis "Sorted List, Sorted Dict, Sorted Set")
17407 (description
17408 "This package provides a sorted collections library, written in
17409 pure-Python.")
17410 (license license:asl2.0)))
17411
17412 (define-public python2-sortedcontainers
17413 (package-with-python2 python-sortedcontainers))
17414
17415 (define-public python-cloudpickle
17416 (package
17417 (name "python-cloudpickle")
17418 (version "1.3.0")
17419 (source
17420 (origin
17421 (method url-fetch)
17422 (uri (pypi-uri "cloudpickle" version))
17423 (sha256
17424 (base32
17425 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
17426 (build-system python-build-system)
17427 (arguments
17428 '(#:phases (modify-phases %standard-phases
17429 (add-before 'check 'do-not-override-PYTHONPATH
17430 (lambda _
17431 ;; Append to PYTHONPATH instead of overriding it so
17432 ;; that dependencies from Guix can be found.
17433 (substitute* "tests/testutils.py"
17434 (("env\\['PYTHONPATH'\\] = pythonpath")
17435 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
17436 #t))
17437 (replace 'check
17438 (lambda* (#:key tests? #:allow-other-keys)
17439 (if tests?
17440 (invoke "pytest" "-s" "-vv")
17441 (format #t "test suite not run~%"))
17442 #t)))))
17443 (native-inputs
17444 `(;; For tests.
17445 ("python-psutil" ,python-psutil)
17446 ("python-pytest" ,python-pytest)
17447 ("python-tornado" ,python-tornado)))
17448 (home-page "https://github.com/cloudpipe/cloudpickle")
17449 (synopsis "Extended pickling support for Python objects")
17450 (description
17451 "Cloudpickle makes it possible to serialize Python constructs not
17452 supported by the default pickle module from the Python standard library. It
17453 is especially useful for cluster computing where Python expressions are
17454 shipped over the network to execute on remote hosts, possibly close to the
17455 data.")
17456 (properties `((python2-variant . ,(delay python2-cloudpickle))))
17457 (license license:bsd-3)))
17458
17459 (define-public python2-cloudpickle
17460 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
17461 (package
17462 (inherit base)
17463 (native-inputs
17464 `(("python-mock" ,python2-mock)
17465 ,@(package-native-inputs base)))
17466 (propagated-inputs
17467 `(("python-futures" ,python2-futures)
17468 ,@(package-propagated-inputs base))))))
17469
17470 (define-public python-locket
17471 (package
17472 (name "python-locket")
17473 (version "0.2.0")
17474 (source
17475 (origin
17476 (method url-fetch)
17477 (uri (pypi-uri "locket" version))
17478 (sha256
17479 (base32
17480 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
17481 (build-system python-build-system)
17482 (home-page "https://github.com/mwilliamson/locket.py")
17483 (synopsis "File-based locks for Python")
17484 (description
17485 "Locket implements a lock that can be used by multiple processes provided
17486 they use the same path.")
17487 (license license:bsd-2)))
17488
17489 (define-public python2-locket
17490 (package-with-python2 python-locket))
17491
17492 (define-public python-blosc
17493 (package
17494 (name "python-blosc")
17495 (version "1.5.1")
17496 (source
17497 (origin
17498 (method url-fetch)
17499 (uri (pypi-uri "blosc" version))
17500 (sha256
17501 (base32
17502 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
17503 (build-system python-build-system)
17504 ;; FIXME: all tests pass, but then this error is printed:
17505 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
17506 (arguments '(#:tests? #f))
17507 (propagated-inputs
17508 `(("python-numpy" ,python-numpy)))
17509 (home-page "https://github.com/blosc/python-blosc")
17510 (synopsis "Python wrapper for the Blosc data compressor library")
17511 (description "Blosc is a high performance compressor optimized for binary
17512 data. It has been designed to transmit data to the processor cache faster
17513 than the traditional, non-compressed, direct memory fetch approach via a
17514 @code{memcpy()} system call.
17515
17516 Blosc works well for compressing numerical arrays that contains data with
17517 relatively low entropy, like sparse data, time series, grids with
17518 regular-spaced values, etc.
17519
17520 This Python package wraps the Blosc library.")
17521 (license license:bsd-3)))
17522
17523 (define-public python2-blosc
17524 (package-with-python2 python-blosc))
17525
17526 (define-public python-partd
17527 (package
17528 (name "python-partd")
17529 (version "0.3.9")
17530 (source
17531 (origin
17532 (method url-fetch)
17533 (uri (pypi-uri "partd" version))
17534 (sha256
17535 (base32
17536 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
17537 (build-system python-build-system)
17538 (propagated-inputs
17539 `(("python-blosc" ,python-blosc)
17540 ("python-locket" ,python-locket)
17541 ("python-numpy" ,python-numpy)
17542 ("python-pandas" ,python-pandas)
17543 ("python-pyzmq" ,python-pyzmq)
17544 ("python-toolz" ,python-toolz)))
17545 (home-page "https://github.com/dask/partd/")
17546 (synopsis "Appendable key-value storage")
17547 (description "Partd stores key-value pairs. Values are raw bytes. We
17548 append on old values. Partd excels at shuffling operations.")
17549 (license license:bsd-3)))
17550
17551 (define-public python2-partd
17552 (package-with-python2 python-partd))
17553
17554 (define-public python-fsspec
17555 (package
17556 (name "python-fsspec")
17557 (version "0.6.1")
17558 (source
17559 (origin
17560 (method url-fetch)
17561 (uri (pypi-uri "fsspec" version))
17562 (sha256
17563 (base32
17564 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
17565 (build-system python-build-system)
17566 (arguments '(#:tests? #f)) ; there are none
17567 (home-page "https://github.com/intake/filesystem_spec")
17568 (synopsis "File-system specification")
17569 (description "The purpose of this package is to produce a template or
17570 specification for a file-system interface, that specific implementations
17571 should follow, so that applications making use of them can rely on a common
17572 behavior and not have to worry about the specific internal implementation
17573 decisions with any given backend.")
17574 (license license:bsd-3)))
17575
17576 (define-public python-dask
17577 (package
17578 (name "python-dask")
17579 (version "2.14.0")
17580 (source
17581 (origin
17582 (method url-fetch)
17583 (uri (pypi-uri "dask" version))
17584 (sha256
17585 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
17586 (build-system python-build-system)
17587 (arguments
17588 `(#:phases
17589 (modify-phases %standard-phases
17590 (add-after 'unpack 'disable-broken-tests
17591 (lambda _
17592 ;; This test is marked as xfail when pytest-xdist is used.
17593 (substitute* "dask/tests/test_threaded.py"
17594 (("def test_interrupt\\(\\)" m)
17595 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
17596 m)))
17597 ;; This one fails with a type error:
17598 ;; TypeError: Already tz-aware, use tz_convert to convert.
17599 (substitute* "dask/dataframe/tests/test_shuffle.py"
17600 (("def test_set_index_timestamp\\(\\)" m)
17601 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
17602 m)))
17603 #t))
17604 (replace 'check
17605 (lambda _ (invoke "pytest" "-vv"))))))
17606 (propagated-inputs
17607 `(("python-cloudpickle" ,python-cloudpickle)
17608 ("python-fsspec" ,python-fsspec)
17609 ("python-numpy" ,python-numpy)
17610 ("python-packaging" ,python-packaging)
17611 ("python-pandas" ,python-pandas)
17612 ("python-partd" ,python-partd)
17613 ("python-toolz" ,python-toolz)
17614 ("python-pyyaml" ,python-pyyaml)))
17615 (native-inputs
17616 `(("python-pytest" ,python-pytest)
17617 ("python-pytest-runner" ,python-pytest-runner)))
17618 (home-page "https://github.com/dask/dask/")
17619 (synopsis "Parallel computing with task scheduling")
17620 (description
17621 "Dask is a flexible parallel computing library for analytics. It
17622 consists of two components: dynamic task scheduling optimized for computation,
17623 and large data collections like parallel arrays, dataframes, and lists that
17624 extend common interfaces like NumPy, Pandas, or Python iterators to
17625 larger-than-memory or distributed environments. These parallel collections
17626 run on top of the dynamic task schedulers. ")
17627 (license license:bsd-3)))
17628
17629 (define-public python-ilinkedlist
17630 (package
17631 (name "python-ilinkedlist")
17632 (version "0.4.0")
17633 (source
17634 (origin
17635 (method url-fetch)
17636 (uri (pypi-uri "ilinkedlist" version))
17637 (sha256
17638 (base32
17639 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
17640 (build-system python-build-system)
17641 (native-inputs `(("python-pytest" ,python-pytest)))
17642 (inputs `(("python" ,python)))
17643 (home-page "https://github.com/luther9/ilinkedlist-py")
17644 (synopsis "Immutable linked list library")
17645 (description
17646 "This is a implementation of immutable linked lists for Python. It
17647 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
17648 Since a linked list is treated as immutable, it is hashable, and its length
17649 can be retrieved in constant time. Some of the terminology is inspired by
17650 LISP. It is possible to create an improper list by creating a @code{Pair}
17651 with a non-list @code{cdr}.")
17652 (license license:gpl3+)))
17653
17654 (define-public python-readlike
17655 (package
17656 (name "python-readlike")
17657 (version "0.1.3")
17658 (source
17659 (origin
17660 (method url-fetch)
17661 (uri (pypi-uri "readlike" version))
17662 (sha256
17663 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
17664 (build-system python-build-system)
17665 (home-page "https://github.com/jangler/readlike")
17666 (synopsis "GNU Readline-like line editing module")
17667 (description
17668 "This Python module provides line editing functions similar to the default
17669 Emacs-style ones of GNU Readline. Unlike the Python standard library's
17670 @code{readline} package, this one allows access to those capabilties in settings
17671 outside of a standard command-line interface. It is especially well-suited to
17672 interfacing with Urwid, due to a shared syntax for describing key inputs.
17673
17674 Currently, all stateless Readline commands are implemented. Yanking and history
17675 are not supported.")
17676 (license license:expat)))
17677
17678 (define-public python2-readlike
17679 (package-with-python2 python-readlike))
17680
17681 (define-public python-reparser
17682 (package
17683 (name "python-reparser")
17684 (version "1.4.3")
17685 (source
17686 (origin
17687 (method url-fetch)
17688 (uri (pypi-uri "ReParser" version))
17689 (sha256
17690 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
17691 (build-system python-build-system)
17692 (home-page "https://github.com/xmikos/reparser")
17693 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
17694 (description
17695 "This Python library provides a simple lexer/parser for inline markup based
17696 on regular expressions.")
17697 (license license:expat)))
17698
17699 (define-public python2-reparser
17700 (let ((reparser (package-with-python2
17701 (strip-python2-variant python-reparser))))
17702 (package (inherit reparser)
17703 (propagated-inputs
17704 `(("python2-enum34" ,python2-enum34)
17705 ,@(package-propagated-inputs reparser))))))
17706
17707 (define-public python-precis-i18n
17708 (package
17709 (name "python-precis-i18n")
17710 (version "1.0.0")
17711 (source
17712 (origin
17713 (method url-fetch)
17714 (uri (pypi-uri "precis_i18n" version))
17715 (sha256
17716 (base32
17717 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
17718 (build-system python-build-system)
17719 (home-page "https://github.com/byllyfish/precis_i18n")
17720 (synopsis "Implementation of the PRECIS framework")
17721 (description
17722 "This module implements the PRECIS Framework as described in RFC 8264,
17723 RFC 8265 and RFC 8266.")
17724 (license license:expat)))
17725
17726 (define-public python-absl-py
17727 (package
17728 (name "python-absl-py")
17729 (version "0.6.1")
17730 (source
17731 (origin
17732 (method url-fetch)
17733 (uri (pypi-uri "absl-py" version))
17734 (sha256
17735 (base32
17736 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
17737 (build-system python-build-system)
17738 (propagated-inputs
17739 `(("python-six" ,python-six)))
17740 (home-page "https://github.com/abseil/abseil-py")
17741 (synopsis "Abseil Python common libraries")
17742 (description
17743 "This package provides the Abseil Python Common Libraries, a collection
17744 of Python libraries for building Python applications.")
17745 (license license:asl2.0)))
17746
17747 (define-public python-astor
17748 (package
17749 (name "python-astor")
17750 (version "0.7.1")
17751 (source
17752 (origin
17753 (method url-fetch)
17754 (uri (pypi-uri "astor" version))
17755 (sha256
17756 (base32
17757 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
17758 (build-system python-build-system)
17759 ;; FIXME: There are two errors and two test failures.
17760 (arguments `(#:tests? #f))
17761 (home-page "https://github.com/berkerpeksag/astor")
17762 (synopsis "Read and write Python ASTs")
17763 (description "Astor is designed to allow easy manipulation of Python
17764 source via the Abstract Syntax Tree.")
17765 (license license:bsd-3)))
17766
17767 (define-public python2-astor
17768 (package-with-python2 python-astor))
17769
17770 (define-public python-astunparse
17771 (package
17772 (name "python-astunparse")
17773 (version "1.6.2")
17774 (source
17775 (origin
17776 (method url-fetch)
17777 (uri (pypi-uri "astunparse" version))
17778 (sha256
17779 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
17780 (build-system python-build-system)
17781 (arguments '(#:tests? #f)) ; there are none
17782 (propagated-inputs
17783 `(("python-six" ,python-six)
17784 ("python-wheel" ,python-wheel)))
17785 (home-page "https://github.com/simonpercivall/astunparse")
17786 (synopsis "AST unparser for Python")
17787 (description "This package provides an AST unparser for Python. It is a
17788 factored out version of @code{unparse} found in the Python source
17789 distribution.")
17790 (license license:bsd-3)))
17791
17792 (define-public python-gast
17793 (package
17794 (name "python-gast")
17795 (version "0.3.3")
17796 (source
17797 (origin
17798 (method url-fetch)
17799 (uri (pypi-uri "gast" version))
17800 (sha256
17801 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
17802 (build-system python-build-system)
17803 (propagated-inputs
17804 `(("python-astunparse" ,python-astunparse)))
17805 (home-page "https://pypi.org/project/gast/")
17806 (synopsis "Generic Python AST that abstracts the underlying Python version")
17807 (description
17808 "GAST provides a compatibility layer between the AST of various Python
17809 versions, as produced by @code{ast.parse} from the standard @code{ast}
17810 module.")
17811 (license license:bsd-3)))
17812
17813 (define-public python-wikidata
17814 (package
17815 (name "python-wikidata")
17816 (version "0.6.1")
17817 (source
17818 (origin
17819 (method url-fetch)
17820 (uri (pypi-uri "Wikidata" version))
17821 (sha256
17822 (base32
17823 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
17824 (build-system python-build-system)
17825 (propagated-inputs
17826 `(("python-babel" ,python-babel)))
17827 (home-page "https://github.com/dahlia/wikidata")
17828 (synopsis "Wikidata client library")
17829 (description
17830 "This package provides a Python interface to
17831 @url{https://www.wikidata.org/, Wikidata}.")
17832 (properties '((upstream-name . "Wikidata")))
17833 (license license:gpl3+)))
17834
17835 (define-public python-doctest-ignore-unicode
17836 (package
17837 (name "python-doctest-ignore-unicode")
17838 (version "0.1.2")
17839 (source
17840 (origin
17841 (method url-fetch)
17842 (uri (pypi-uri "doctest-ignore-unicode" version))
17843 (sha256
17844 (base32
17845 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
17846 (build-system python-build-system)
17847 (native-inputs
17848 `(("python-nose" ,python-nose)))
17849 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
17850 (synopsis "Ignore Unicode literal prefixes in doctests")
17851 (description
17852 "This package adds support for a flag to ignore Unicode literal prefixes
17853 in doctests.")
17854 (license license:asl2.0)))
17855
17856 (define-public python-attr
17857 (package
17858 (name "python-attr")
17859 (version "0.3.1")
17860 (source
17861 (origin
17862 (method url-fetch)
17863 (uri (pypi-uri "attr" version))
17864 (sha256
17865 (base32
17866 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
17867 (build-system python-build-system)
17868 (home-page "https://github.com/denis-ryzhkov/attr")
17869 (synopsis "Decorator for attributes of target function or class")
17870 (description "Simple decorator to set attributes of target function or
17871 class in a @acronym{DRY, Don't Repeat Yourself} way.")
17872 (license license:expat)))
17873
17874 (define-public python-construct
17875 (package
17876 (name "python-construct")
17877 (version "2.10.56")
17878 (source
17879 (origin
17880 (method url-fetch)
17881 (uri (pypi-uri "construct" version))
17882 (sha256
17883 (base32
17884 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
17885 (build-system python-build-system)
17886 (arguments
17887 `(#:tests? #f)) ; No tests exist.
17888 (propagated-inputs
17889 `(("python-extras" ,python-extras)
17890 ("python-arrow" ,python-arrow)
17891 ("python-numpy" ,python-numpy)
17892 ("python-ruamel.yaml" ,python-ruamel.yaml)))
17893 (home-page "https://construct.readthedocs.io")
17894 (synopsis "Declarative and symmetrical parser and builder for binary data")
17895 (description
17896 "This package provides both simple, atomic constructs (such as
17897 integers of various sizes), as well as composite ones which allow you
17898 form hierarchical and sequential structures of increasing complexity.
17899 It features bit and byte granularity, easy debugging and testing, an
17900 easy-to-extend subclass system, and lots of primitive constructs to
17901 make your work easier.")
17902 (license license:expat)))
17903
17904 (define-public python-humanize
17905 (package
17906 (name "python-humanize")
17907 (version "0.5.1")
17908 (source
17909 (origin
17910 (method url-fetch)
17911 (uri (pypi-uri "humanize" version))
17912 (sha256
17913 (base32
17914 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17915 (arguments
17916 '(#:tests? #f)) ; tests not in pypi archive
17917 (build-system python-build-system)
17918 (home-page "https://github.com/jmoiron/humanize")
17919 (synopsis "Print numerical information in a human-readable form")
17920 (description "This package provides a Python module that displays numbers
17921 and dates in \"human readable\" forms. For example, it would display
17922 \"12345591313\" as \"12.3 billion\".")
17923 (license license:expat)))
17924
17925 (define-public python-txaio
17926 (package
17927 (name "python-txaio")
17928 (version "18.8.1")
17929 (source
17930 (origin
17931 (method url-fetch)
17932 (uri (pypi-uri "txaio" version))
17933 (sha256
17934 (base32
17935 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17936 (build-system python-build-system)
17937 (propagated-inputs
17938 `(("python-twisted" ,python-twisted)
17939 ("python-six" ,python-six)))
17940 (home-page "https://github.com/crossbario/txaio")
17941 (synopsis "Compatibility layer between Python asyncio and Twisted")
17942 (description "Txaio provides a compatibility layer between the Python
17943 @code{asyncio} module and @code{Twisted}.")
17944 (license license:expat)))
17945
17946 (define-public python-toolshed
17947 (package
17948 (name "python-toolshed")
17949 (version "0.4.6")
17950 (source
17951 (origin
17952 (method url-fetch)
17953 (uri (pypi-uri "toolshed" version))
17954 (sha256
17955 (base32
17956 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17957 (build-system python-build-system)
17958 (native-inputs
17959 `(("python-nose" ,python-nose)))
17960 (home-page "https://github.com/brentp/toolshed/")
17961 (synopsis "Collection of modules and functions for working with data")
17962 (description "This is a collection of well-tested, simple modules and
17963 functions that aim to reduce boilerplate when working with data.")
17964 (license license:bsd-2)))
17965
17966 (define-public python-annoy
17967 (package
17968 (name "python-annoy")
17969 (version "1.15.1")
17970 (source
17971 (origin
17972 (method url-fetch)
17973 (uri (pypi-uri "annoy" version))
17974 (sha256
17975 (base32
17976 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17977 (build-system python-build-system)
17978 (native-inputs
17979 `(("python-nose" ,python-nose)))
17980 (home-page "https://github.com/spotify/annoy/")
17981 (synopsis "Approximate nearest neighbors library")
17982 (description
17983 "Annoy is a C++ library with Python bindings to search for points in
17984 space that are close to a given query point. It also creates large read-only
17985 file-based data structures that are @code{mmap}ped into memory so that many
17986 processes may share the same data.")
17987 (license license:asl2.0)))
17988
17989 (define-public python-pylzma
17990 (package
17991 (name "python-pylzma")
17992 (version "0.5.0")
17993 (source
17994 (origin
17995 (method url-fetch)
17996 (uri (pypi-uri "pylzma" version))
17997 (sha256
17998 (base32
17999 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
18000 (build-system python-build-system)
18001 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
18002 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
18003 (description "This package provides Python bindings for the LZMA library
18004 by Igor Pavlov.")
18005 (license license:lgpl2.1+)))
18006
18007 (define-public python2-pylzma
18008 (package-with-python2 python-pylzma))
18009
18010 (define-public python2-zeroconf
18011 (package
18012 (name "python2-zeroconf")
18013
18014 ;; This is the last version that supports Python 2.x.
18015 (version "0.19.1")
18016 (source
18017 (origin
18018 (method url-fetch)
18019 (uri (pypi-uri "zeroconf" version))
18020 (sha256
18021 (base32
18022 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
18023 (build-system python-build-system)
18024 (arguments
18025 `(#:python ,python-2
18026 #:phases
18027 (modify-phases %standard-phases
18028 (add-after 'unpack 'patch-requires
18029 (lambda* (#:key inputs #:allow-other-keys)
18030 (substitute* "setup.py"
18031 (("enum-compat")
18032 "enum34"))
18033 #t)))))
18034 (native-inputs
18035 `(("python2-six" ,python2-six)
18036 ("python2-enum32" ,python2-enum34)
18037 ("python2-netifaces" ,python2-netifaces)
18038 ("python2-typing" ,python2-typing)))
18039 (home-page "https://github.com/jstasiak/python-zeroconf")
18040 (synopsis "Pure Python mDNS service discovery")
18041 (description
18042 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
18043 compatible).")
18044 (license license:lgpl2.1+)))
18045
18046 (define-public python-bsddb3
18047 (package
18048 (name "python-bsddb3")
18049 (version "6.2.6")
18050 (source
18051 (origin
18052 (method url-fetch)
18053 (uri (pypi-uri "bsddb3" version))
18054 (sha256
18055 (base32
18056 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
18057 (build-system python-build-system)
18058 (inputs
18059 `(("bdb" ,bdb)))
18060 (arguments
18061 '(#:phases
18062 (modify-phases %standard-phases
18063 (add-after 'unpack 'configure-locations
18064 (lambda* (#:key inputs #:allow-other-keys)
18065 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
18066 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
18067 #t))
18068 (replace 'check
18069 (lambda _
18070 (invoke "python3" "test3.py" "-v"))))))
18071 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
18072 (synopsis "Python bindings for Oracle Berkeley DB")
18073 (description
18074 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
18075 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
18076 Transaction objects, and each of these is exposed as a Python type in the
18077 bsddb3.db module. The database objects can use various access methods: btree,
18078 hash, recno, and queue. Complete support of Berkeley DB distributed
18079 transactions. Complete support for Berkeley DB Replication Manager.
18080 Complete support for Berkeley DB Base Replication. Support for RPC.")
18081 (license license:bsd-3)))
18082
18083 (define-public python-dbfread
18084 (package
18085 (name "python-dbfread")
18086 (version "2.0.7")
18087 (source (origin
18088 (method url-fetch)
18089 (uri (pypi-uri "dbfread" version))
18090 (sha256
18091 (base32
18092 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
18093 (build-system python-build-system)
18094 (native-inputs
18095 `(("python-pytest" ,python-pytest)))
18096 (home-page "https://dbfread.readthedocs.io")
18097 (synopsis "Read DBF Files with Python")
18098 (description
18099 "This library reads DBF files and returns the data as native Python data
18100 types for further processing. It is primarily intended for batch jobs and
18101 one-off scripts.")
18102 (license license:expat)))
18103
18104 (define-public python-cached-property
18105 (package
18106 (name "python-cached-property")
18107 (version "1.5.1")
18108 (source
18109 (origin
18110 (method url-fetch)
18111 (uri (pypi-uri "cached-property" version))
18112 (sha256
18113 (base32
18114 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
18115 (build-system python-build-system)
18116 (arguments
18117 `(#:phases
18118 (modify-phases %standard-phases
18119 ;; https://github.com/pydanny/cached-property/issues/131
18120 ;; recent versions of freezegun break one test
18121 (add-after 'unpack 'disable-broken-test
18122 (lambda _
18123 (substitute* "tests/test_cached_property.py"
18124 (("def test_threads_ttl_expiry\\(self\\)" m)
18125 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
18126 " " m)))
18127 #t)))))
18128 (native-inputs
18129 `(("python-freezegun" ,python-freezegun)))
18130 (home-page
18131 "https://github.com/pydanny/cached-property")
18132 (synopsis
18133 "Decorator for caching properties in classes")
18134 (description
18135 "This package provides a decorator which makes caching
18136 time-or-computationally-expensive properties quick and easy and works in Python
18137 2 or 3.")
18138 (license license:bsd-3)))
18139
18140 (define-public python-folium
18141 (package
18142 (name "python-folium")
18143 (version "0.10.1")
18144 (source
18145 (origin
18146 (method url-fetch)
18147 (uri (pypi-uri "folium" version))
18148 (sha256
18149 (base32
18150 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
18151 (build-system python-build-system)
18152 (propagated-inputs
18153 `(("python-branca" ,python-branca)
18154 ("python-jinja2" ,python-jinja2)
18155 ("python-numpy" ,python-numpy)
18156 ("python-requests" ,python-requests)))
18157 (native-inputs
18158 `(("python-pytest" ,python-pytest)))
18159 (home-page "https://github.com/python-visualization/folium")
18160 (synopsis "Make beautiful maps with Leaflet.js & Python")
18161 (description "@code{folium} makes it easy to visualize data that’s been
18162 manipulated in Python on an interactive leaflet map. It enables both the
18163 binding of data to a map for @code{choropleth} visualizations as well as
18164 passing rich vector/raster/HTML visualizations as markers on the map.
18165
18166 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
18167 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
18168 supports Image, Video, GeoJSON and TopoJSON overlays.")
18169 (license license:expat)))
18170
18171 (define-public jube
18172 (package
18173 ;; This is a command-line tool, so no "python-" prefix.
18174 (name "jube")
18175 (version "2.2.2")
18176 (source (origin
18177 (method url-fetch)
18178 (uri (string-append
18179 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
18180 version))
18181 (sha256
18182 (base32
18183 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
18184 (file-name (string-append "jube-" version ".tar.gz"))))
18185 (build-system python-build-system)
18186 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
18187 (synopsis "Benchmarking environment")
18188 (description
18189 "JUBE helps perform and analyze benchmarks in a systematic way. For each
18190 benchmarked application, benchmark data is stored in a format that allows JUBE
18191 to deduct the desired information. This data can be parsed by automatic pre-
18192 and post-processing scripts that draw information and store it more densely
18193 for manual interpretation.")
18194 (license license:gpl3+)))
18195
18196 (define-public python-pyroutelib3
18197 (package
18198 (name "python-pyroutelib3")
18199 (version "1.3.post1")
18200 (source
18201 (origin
18202 (method url-fetch)
18203 (uri (pypi-uri "pyroutelib3" version))
18204 (sha256
18205 (base32
18206 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
18207 (build-system python-build-system)
18208 (propagated-inputs
18209 `(("python-dateutil" ,python-dateutil)))
18210 (home-page "https://github.com/MKuranowski/pyroutelib3")
18211 (synopsis "Library for simple routing on OSM data")
18212 (description "Library for simple routing on OSM data")
18213 (license license:gpl3+)))
18214
18215 (define-public python-bibtexparser
18216 (package
18217 (name "python-bibtexparser")
18218 (version "1.1.0")
18219 (source
18220 (origin
18221 (method url-fetch)
18222 (uri (pypi-uri "bibtexparser" version))
18223 (sha256
18224 (base32
18225 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
18226 (build-system python-build-system)
18227 (propagated-inputs
18228 `(("python-pyparsing" ,python-pyparsing)))
18229 (native-inputs
18230 `(("python-future" ,python-future)))
18231 (home-page "https://github.com/sciunto-org/python-bibtexparser")
18232 (synopsis "Python library to parse BibTeX files")
18233 (description "BibtexParser is a Python library to parse BibTeX files.")
18234 (license (list license:bsd-3 license:lgpl3))))
18235
18236 (define-public python-distro
18237 (package
18238 (name "python-distro")
18239 (version "1.4.0")
18240 (source
18241 (origin
18242 (method url-fetch)
18243 (uri (pypi-uri "distro" version))
18244 (sha256
18245 (base32
18246 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
18247 (build-system python-build-system)
18248 (native-inputs
18249 `(("python-pytest" ,python-pytest)))
18250 (home-page "https://github.com/nir0s/distro")
18251 (synopsis
18252 "OS platform information API")
18253 (description
18254 "@code{distro} provides information about the OS distribution it runs on,
18255 such as a reliable machine-readable ID, or version information.
18256
18257 It is the recommended replacement for Python's original
18258 `platform.linux_distribution` function (which will be removed in Python 3.8).
18259 @code{distro} also provides a command-line interface to output the platform
18260 information in various formats.")
18261 (license license:asl2.0)))
18262
18263 (define-public python-cairosvg
18264 (package
18265 (name "python-cairosvg")
18266 (version "2.4.2")
18267 (source
18268 (origin
18269 (method url-fetch)
18270 (uri (pypi-uri "CairoSVG" version))
18271 (sha256
18272 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
18273 (build-system python-build-system)
18274 (arguments
18275 `(#:phases
18276 (modify-phases %standard-phases
18277 (replace 'check
18278 (lambda _ (invoke "pytest"))))))
18279 (propagated-inputs
18280 `(("python-cairocffi" ,python-cairocffi)
18281 ("python-cssselect2" ,python-cssselect2)
18282 ("python-defusedxml" ,python-defusedxml)
18283 ("python-pillow" ,python-pillow)
18284 ("python-tinycss2" ,python-tinycss2)))
18285 (native-inputs
18286 `(("python-pytest-flake8" ,python-pytest-flake8)
18287 ("python-pytest-isort" ,python-pytest-isort)
18288 ("python-pytest-runner" ,python-pytest-runner)))
18289 (home-page "https://cairosvg.org/")
18290 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
18291 (description "CairoSVG is a SVG converter based on Cairo. It can export
18292 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
18293 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
18294 parsed, the result is drawn to a Cairo surface that can be exported to
18295 qvarious formats: PDF, PostScript, PNG and even SVG.")
18296 (license license:lgpl3+)))
18297
18298 (define-public python-pyphen
18299 (package
18300 (name "python-pyphen")
18301 (version "0.9.5")
18302 (source
18303 (origin
18304 (method url-fetch)
18305 (uri (pypi-uri "Pyphen" version))
18306 (sha256
18307 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
18308 (build-system python-build-system)
18309 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
18310 ;; embedded set provided by upstream - like Debian does.
18311 (home-page "https://github.com/Kozea/Pyphen")
18312 (synopsis "Pure Python module to hyphenate text")
18313 (description "Pyphen is a pure Python module to hyphenate text using
18314 existing Hunspell hyphenation dictionaries.")
18315 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
18316
18317 (define-public python-intelhex
18318 (package
18319 (name "python-intelhex")
18320 (version "2.2.1")
18321 (source
18322 (origin
18323 (method url-fetch)
18324 (uri (pypi-uri "intelhex" version))
18325 (sha256
18326 (base32
18327 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
18328 (build-system python-build-system)
18329 (arguments '(#:tests? #f)) ;issue with version
18330 (home-page "https://pypi.org/project/IntelHex/")
18331 (synopsis "Python library for Intel HEX files manipulations")
18332 (description "The Intel HEX file format is widely used in microprocessors
18333 and microcontrollers area (embedded systems etc.) as the de facto standard for
18334 representation of code to be programmed into microelectronic devices. This
18335 package provides an intelhex Python library to read, write, create from
18336 scratch and manipulate data from Intel HEX file format. It also includes
18337 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
18338 converters and more, those based on the library itself.")
18339 (license license:bsd-3)))
18340
18341 (define-public python-pykwalify
18342 (package
18343 (name "python-pykwalify")
18344 (version "1.7.0")
18345 (source
18346 (origin
18347 (method url-fetch)
18348 (uri (pypi-uri "pykwalify" version))
18349 (sha256
18350 (base32
18351 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
18352 (build-system python-build-system)
18353 (arguments '(#:tests? #f)) ;missing dependencies
18354 (propagated-inputs
18355 `(("python-dateutil" ,python-dateutil)
18356 ("python-docopt" ,python-docopt)
18357 ("python-pyyaml" ,python-pyyaml)))
18358 (home-page "https://github.com/grokzen/pykwalify")
18359 (synopsis
18360 "Python lib/cli for JSON/YAML schema validation")
18361 (description
18362 "This package provides a parser, schema validator, and data binding tool
18363 for YAML and JSON.")
18364 (license license:expat)))
18365
18366 (define-public python-dbusmock
18367 (package
18368 (name "python-dbusmock")
18369 (version "0.18.3")
18370 (source
18371 (origin
18372 (method url-fetch)
18373 (uri (pypi-uri "python-dbusmock" version))
18374 (sha256
18375 (base32
18376 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
18377 (build-system python-build-system)
18378 (arguments
18379 '(#:phases
18380 (modify-phases %standard-phases
18381 (add-after 'unpack 'patch-shell-path
18382 (lambda _
18383 (substitute* "tests/test_code.py"
18384 (("/bin/bash") (which "bash")))
18385 #t)))))
18386 (native-inputs
18387 `(;; For tests.
18388 ("dbus" ,dbus) ; for dbus-daemon
18389 ("python-nose" ,python-nose)
18390 ("which" ,which)))
18391 (propagated-inputs
18392 `(("python-dbus" ,python-dbus)
18393 ("python-pygobject" ,python-pygobject)))
18394 (home-page "https://github.com/martinpitt/python-dbusmock")
18395 (synopsis "Python library for mock D-Bus objects")
18396 (description "python-dbusmock allows for the easy creation of mock objects on
18397 D-Bus. This is useful for writing tests for software which talks to D-Bus
18398 services such as upower, systemd, logind, gnome-session or others, and it is
18399 hard (or impossible without root privileges) to set the state of the real
18400 services to what you expect in your tests.")
18401 (license license:lgpl3+)))
18402
18403 (define-public python-ujson
18404 (package
18405 (name "python-ujson")
18406 (version "2.0.3")
18407 (source
18408 (origin
18409 (method url-fetch)
18410 (uri (pypi-uri "ujson" version))
18411 (sha256
18412 (base32
18413 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
18414 (modules '((guix build utils)))
18415 (snippet
18416 '(begin (delete-file-recursively "deps") #t))))
18417 (build-system python-build-system)
18418 (arguments
18419 `(#:phases
18420 (modify-phases %standard-phases
18421 (add-after 'unpack 'link-to-system-double-conversion
18422 (lambda* (#:key inputs #:allow-other-keys)
18423 (let ((d-c (assoc-ref inputs "double-conversion")))
18424 (substitute* "setup.py"
18425 (("./deps/double-conversion/double-conversion\"")
18426 (string-append d-c "/include/double-conversion\""))
18427 (("-lstdc++" stdc)
18428 (string-append "-L" d-c "/lib\","
18429 " \"-ldouble-conversion\","
18430 " \"" stdc)))
18431 #t)))
18432 (replace 'check
18433 (lambda* (#:key inputs outputs #:allow-other-keys)
18434 (add-installed-pythonpath inputs outputs)
18435 (invoke "pytest"))))))
18436 (native-inputs
18437 `(("double-conversion" ,double-conversion)
18438 ("python-setuptools-scm" ,python-setuptools-scm)
18439 ("python-pytest" ,python-pytest)))
18440 (home-page "https://github.com/ultrajson/ultrajson")
18441 (synopsis "Ultra fast JSON encoder and decoder for Python")
18442 (description
18443 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
18444 bindings for Python 3.")
18445 (license license:bsd-3)))
18446
18447 (define-public python-ujson-1
18448 (package
18449 (inherit python-ujson)
18450 (version "1.35")
18451 (source
18452 (origin
18453 (method url-fetch)
18454 (uri (pypi-uri "ujson" version))
18455 (sha256
18456 (base32
18457 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
18458 (arguments
18459 '(#:phases %standard-phases))
18460 (native-inputs '())
18461 (home-page "http://www.esn.me")
18462 (description
18463 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
18464 bindings for Python 2.5+ and 3.")))
18465
18466 (define-public python2-ujson-1
18467 (package-with-python2 python-ujson-1))
18468
18469 (define-public python-iocapture
18470 ;; The latest release is more than a year older than this commit.
18471 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
18472 (revision "1"))
18473 (package
18474 (name "python-iocapture")
18475 (version "0.1.2")
18476 (source
18477 (origin
18478 (method git-fetch)
18479 (uri (git-reference
18480 (url "https://github.com/oinume/iocapture.git")
18481 (commit commit)))
18482 (file-name (git-file-name name version))
18483 (sha256
18484 (base32
18485 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
18486 (build-system python-build-system)
18487 (arguments
18488 `(#:phases
18489 (modify-phases %standard-phases
18490 (delete 'check)
18491 (add-after 'install 'check
18492 (lambda* (#:key inputs outputs #:allow-other-keys)
18493 (add-installed-pythonpath inputs outputs)
18494 (invoke "py.test" "-v" "tests")
18495 #t)))))
18496 (propagated-inputs
18497 `(("python-flexmock" ,python-flexmock)
18498 ("python-pytest" ,python-pytest)
18499 ("python-pytest-cov" ,python-pytest-cov)
18500 ("python-six" ,python-six)))
18501 (home-page "https://github.com/oinume/iocapture")
18502 (synopsis "Python capturing tool for stdout and stderr")
18503 (description
18504 "This package helps you to capture the standard out (stdout) and the
18505 standard error channel (stderr) in your program.")
18506 (license license:expat))))
18507
18508 (define-public python-argh
18509 ;; There are 21 commits since the latest release containing important
18510 ;; improvements.
18511 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
18512 (revision "1"))
18513 (package
18514 (name "python-argh")
18515 (version (git-version "0.26.2" revision commit))
18516 (source
18517 (origin
18518 (method git-fetch)
18519 (uri (git-reference
18520 (url "https://github.com/neithere/argh.git")
18521 (commit commit)))
18522 (file-name (git-file-name name version))
18523 (sha256
18524 (base32
18525 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
18526 (build-system python-build-system)
18527 (propagated-inputs
18528 `(("python-iocapture" ,python-iocapture)
18529 ("python-mock" ,python-mock)
18530 ("python-pytest" ,python-pytest)
18531 ("python-pytest-cov" ,python-pytest-cov)
18532 ("python-pytest-xdist" ,python-pytest-xdist)
18533 ("python-tox" ,python-tox)))
18534 (home-page "https://github.com/neithere/argh/")
18535 (synopsis "Argparse wrapper with natural syntax")
18536 (description
18537 "python-argh is a small library that provides several layers of
18538 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
18539 always possible to declare a command with the highest possible (and least
18540 flexible) layer and then tune the behaviour with any of the lower layers
18541 including the native API of @code{python-argparse}.")
18542 (license license:lgpl3+))))
18543
18544 (define-public python-ppft
18545 (package
18546 (name "python-ppft")
18547 (version "1.6.6.1")
18548 (source
18549 (origin
18550 (method url-fetch)
18551 (uri (pypi-uri "ppft" version))
18552 (sha256
18553 (base32
18554 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
18555 (build-system python-build-system)
18556 (arguments '(#:tests? #f)) ; there are none
18557 (propagated-inputs
18558 `(("python-six" ,python-six)))
18559 (home-page "https://pypi.org/project/ppft/")
18560 (synopsis "Fork of Parallel Python")
18561 (description
18562 "This package is a fork of Parallel Python. The Parallel Python
18563 module (@code{pp}) provides an easy and efficient way to create
18564 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
18565 computers and clusters. It features cross-platform portability and dynamic
18566 load balancing.")
18567 (license license:bsd-3)))
18568
18569 (define-public python-pox
18570 (package
18571 (name "python-pox")
18572 (version "0.2.7")
18573 (source
18574 (origin
18575 (method url-fetch)
18576 (uri (pypi-uri "pox" version))
18577 (sha256
18578 (base32
18579 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
18580 (build-system python-build-system)
18581 (arguments
18582 `(#:phases
18583 (modify-phases %standard-phases
18584 (replace 'check
18585 (lambda _
18586 (mkdir-p "/tmp/guix")
18587 (setenv "SHELL" "bash")
18588 (setenv "USERNAME" "guix")
18589 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
18590 (invoke "py.test" "-vv")
18591 #t)))))
18592 (native-inputs
18593 `(("python-pytest" ,python-pytest)
18594 ("which" ,which)))
18595 (home-page "https://pypi.org/project/pox/")
18596 (synopsis "Python utilities for filesystem exploration and automated builds")
18597 (description
18598 "Pox provides a collection of utilities for navigating and manipulating
18599 filesystems. This module is designed to facilitate some of the low level
18600 operating system interactions that are useful when exploring a filesystem on a
18601 remote host. Pox provides Python equivalents of several shell commands such
18602 as @command{which} and @command{find}. These commands allow automated
18603 discovery of what has been installed on an operating system, and where the
18604 essential tools are located.")
18605 (license license:bsd-3)))
18606
18607 (define-public python-pathos
18608 (package
18609 (name "python-pathos")
18610 (version "0.2.5")
18611 (source
18612 (origin
18613 (method url-fetch)
18614 (uri (pypi-uri "pathos" version))
18615 (sha256
18616 (base32
18617 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
18618 (build-system python-build-system)
18619 (arguments
18620 '(#:phases
18621 (modify-phases %standard-phases
18622 (replace 'check
18623 (lambda _
18624 (setenv "PYTHONPATH"
18625 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18626 (invoke "python" "./tests/__main__.py"))))))
18627 (propagated-inputs
18628 `(("python-dill" ,python-dill)
18629 ("python-multiprocess" ,python-multiprocess)
18630 ("python-pox" ,python-pox)
18631 ("python-ppft" ,python-ppft)))
18632 (native-inputs
18633 `(("python-pytest" ,python-pytest)))
18634 (home-page "https://pypi.org/project/pathos/")
18635 (synopsis
18636 "Parallel graph management and execution in heterogeneous computing")
18637 (description
18638 "Python-pathos is a framework for heterogenous computing. It provides a
18639 consistent high-level interface for configuring and launching parallel
18640 computations across heterogenous resources. Python-pathos provides configurable
18641 launchers for parallel and distributed computing, where each launcher contains
18642 the syntactic logic to configure and launch jobs in an execution environment.")
18643 (license license:bsd-3)))
18644
18645 (define-public python-flit
18646 (package
18647 (name "python-flit")
18648 (version "2.1.0")
18649 (source
18650 (origin
18651 (method url-fetch)
18652 (uri (pypi-uri "flit" version))
18653 (sha256
18654 (base32
18655 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
18656 (build-system python-build-system)
18657 (arguments
18658 `(#:tests? #f)) ; XXX: Check requires network access.
18659 (home-page "https://flit.readthedocs.io/")
18660 (synopsis
18661 "Simple packaging tool for simple packages")
18662 (description
18663 "Flit is a simple way to put Python packages and modules on PyPI. Flit
18664 packages a single importable module or package at a time, using the import
18665 name as the name on PyPI. All subpackages and data files within a package
18666 are included automatically.")
18667 (license license:bsd-3)))
18668
18669 (define-public python-pathtools
18670 (package
18671 (name "python-pathtools")
18672 (version "0.1.2")
18673 (source
18674 (origin
18675 (method url-fetch)
18676 (uri (pypi-uri "pathtools" version))
18677 (sha256
18678 (base32
18679 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
18680 (build-system python-build-system)
18681 (home-page
18682 "https://github.com/gorakhargosh/pathtools")
18683 (synopsis "Path utilities for Python")
18684 (description "Pattern matching and various utilities for file systems
18685 paths.")
18686 (license license:expat)))
18687
18688 (define-public python-fastentrypoints
18689 (package
18690 (name "python-fastentrypoints")
18691 (version "0.12")
18692 (source
18693 (origin
18694 (method url-fetch)
18695 (uri (pypi-uri "fastentrypoints" version))
18696 (sha256
18697 (base32
18698 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
18699 (build-system python-build-system)
18700 (home-page
18701 "https://github.com/ninjaaron/fast-entry_points")
18702 (synopsis
18703 "Makes entry_points specified in setup.py load more quickly")
18704 (description
18705 "Using entry_points in your setup.py makes scripts that start really
18706 slowly because it imports pkg_resources. This package allows such setup
18707 scripts to load entry points more quickly.")
18708 (license license:bsd-3)))
18709
18710 (define-public python-funcparserlib
18711 (package
18712 (name "python-funcparserlib")
18713 (version "0.3.6")
18714 (source
18715 (origin
18716 (method url-fetch)
18717 (uri (pypi-uri "funcparserlib" version))
18718 (sha256
18719 (base32
18720 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
18721 (native-inputs
18722 `(("python-tox" ,python-tox)))
18723 (arguments
18724 `(#:phases
18725 (modify-phases %standard-phases
18726 (replace 'check
18727 (lambda _
18728 (invoke "tox"))))))
18729 (build-system python-build-system)
18730 (home-page
18731 "https://github.com/vlasovskikh/funcparserlib")
18732 (synopsis
18733 "Recursive descent parsing library based on functional combinators")
18734 (description
18735 "This package is a recursive descent parsing library for Python based on
18736 functional combinators. Parser combinators are just higher-order functions
18737 that take parsers as their arguments and return them as result values.")
18738 (license license:expat)))
18739
18740 (define-public python-speg
18741 (package
18742 (name "python-speg")
18743 (version "0.3")
18744 (source
18745 (origin
18746 (method url-fetch)
18747 (uri (pypi-uri "speg" version ".zip"))
18748 (sha256
18749 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
18750 (arguments
18751 `(#:tests? #f)) ;FIXME: tests fail, not sure why
18752 (native-inputs
18753 `(("unzip" ,unzip)))
18754 (build-system python-build-system)
18755 (home-page "https://github.com/avakar/speg")
18756 (synopsis "PEG-based parser interpreter with memoization")
18757 (description "This package is a PEG-based parser and interpreter with
18758 memoization.")
18759 (license license:expat)))
18760
18761 (define-public python-cson
18762 (package
18763 (name "python-cson")
18764 (version "0.8")
18765 (source
18766 (origin
18767 (method url-fetch)
18768 (uri (pypi-uri "cson" version))
18769 (sha256
18770 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
18771 (build-system python-build-system)
18772 (propagated-inputs
18773 `(("python-speg" ,python-speg)))
18774 (home-page "https://github.com/avakar/pycson")
18775 (synopsis "Parser for Coffeescript Object Notation (CSON)")
18776 (description "This package is a parser for Coffeescript Object
18777 Notation (CSON).")
18778 (license license:expat)))
18779
18780 (define-public python-asynctest
18781 (package
18782 (name "python-asynctest")
18783 (version "0.13.0")
18784 (source
18785 (origin
18786 (method url-fetch)
18787 (uri (pypi-uri "asynctest" version))
18788 (sha256
18789 (base32
18790 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
18791 (build-system python-build-system)
18792 (arguments
18793 '(#:phases
18794 (modify-phases %standard-phases
18795 (replace 'check
18796 (lambda _
18797 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
18798 (add-after 'unpack 'disable-tests
18799 (lambda* _
18800 (substitute* "test/test_selector.py"
18801 ;; XXX: This test fails for unknown reason inside the build
18802 ;; environment.
18803 (("def test_events_watched_outside_test_are_ignored")
18804 "@unittest.skip('disabled by guix')
18805 def test_events_watched_outside_test_are_ignored")))))))
18806 (home-page "https://github.com/Martiusweb/asynctest")
18807 (synopsis "Extension of unittest for testing asyncio libraries")
18808 (description
18809 "The package asynctest is built on top of the standard unittest module
18810 and cuts down boilerplate code when testing libraries for asyncio.")
18811 (license license:asl2.0)))
18812
18813 (define-public python-aionotify
18814 (package
18815 (name "python-aionotify")
18816 (version "0.2.0")
18817 (source
18818 (origin
18819 ;; Source tarball on PyPi lacks tests
18820 (method git-fetch)
18821 (uri (git-reference
18822 (url "https://github.com/rbarrois/aionotify")
18823 (commit (string-append "v" version))))
18824 (file-name (git-file-name name version))
18825 (sha256
18826 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
18827 (build-system python-build-system)
18828 (native-inputs `(("python-asynctest" ,python-asynctest)))
18829 (home-page "https://github.com/rbarrois/aionotify")
18830 (synopsis "Asyncio-powered inotify library")
18831 (description
18832 "@code{aionotify} is a simple, asyncio-based inotify library.")
18833 (license license:bsd-3)))
18834
18835 (define-public python-forbiddenfruit
18836 (package
18837 (name "python-forbiddenfruit")
18838 (version "0.1.3")
18839 (source
18840 (origin
18841 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
18842 (method git-fetch)
18843 (uri (git-reference
18844 (url "https://github.com/clarete/forbiddenfruit")
18845 (commit version)))
18846 (file-name (git-file-name name version))
18847 (sha256
18848 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
18849 (build-system python-build-system)
18850 (arguments
18851 '(#:phases
18852 (modify-phases %standard-phases
18853 (replace 'check
18854 (lambda _
18855 (invoke "make" "SKIP_DEPS=1"))))))
18856 (native-inputs
18857 `(("python-nose" ,python-nose)
18858 ("python-coverage" ,python-coverage)))
18859 (home-page "https://github.com/clarete/forbiddenfruit")
18860 (synopsis "Patch python built-in objects")
18861 (description "This project allows Python code to extend built-in types.")
18862 (license (list license:gpl3+ license:expat))))
18863
18864 (define-public python-shouldbe
18865 (package
18866 (name "python-shouldbe")
18867 (version "0.1.2")
18868 (source
18869 (origin
18870 (method url-fetch)
18871 (uri (pypi-uri "shouldbe" version))
18872 (sha256
18873 (base32
18874 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
18875 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
18876 (build-system python-build-system)
18877 (propagated-inputs
18878 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
18879 (native-inputs
18880 `(("python-nose" ,python-nose)))
18881 (home-page "https://github.com/directxman12/should_be")
18882 (synopsis "Python Assertion Helpers inspired by Shouldly")
18883 (description
18884 "Python Assertion Helpers inspired by Shouldly.")
18885 (license license:isc)))
18886
18887 (define-public python-k5test
18888 (package
18889 (name "python-k5test")
18890 (version "0.9.2")
18891 (source
18892 (origin
18893 (method url-fetch)
18894 (uri (pypi-uri "k5test" version))
18895 (sha256
18896 (base32
18897 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
18898 (build-system python-build-system)
18899 (propagated-inputs
18900 `(("python-six" ,python-six)
18901 ;; `which`, `kadmin.local` binaries called inside library
18902 ("which" ,which)
18903 ("mit-krb5" ,mit-krb5)))
18904 (native-inputs `(("mit-krb5" ,mit-krb5)))
18905 (arguments
18906 '(#:phases
18907 (modify-phases %standard-phases
18908 (add-after 'unpack 'patch-paths
18909 (lambda* _
18910 (substitute* "k5test/realm.py"
18911 (("'kadmin_local'") "'kadmin.local'")))))))
18912 (home-page "https://github.com/pythongssapi/k5test")
18913 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18914 (description
18915 "@code{k5test} is a library for setting up self-contained Kerberos 5
18916 environments, and running Python unit tests inside those environments. It is
18917 based on the file of the same name found alongside the MIT Kerberos 5 unit
18918 tests.")
18919 (license license:isc)))
18920
18921 (define-public python-gssapi
18922 (package
18923 (name "python-gssapi")
18924 (version "1.6.5")
18925 (source
18926 (origin
18927 (method url-fetch)
18928 (uri (pypi-uri "gssapi" version))
18929 (sha256
18930 (base32
18931 "02i5s7998dg5kcr4m0xwamd8vjqk1816xbzldyp68l91f6bynwcr"))))
18932 (build-system python-build-system)
18933 (propagated-inputs
18934 `(("python-decorator" ,python-decorator)
18935 ("python-six" ,python-six)))
18936 (inputs
18937 `(("mit-krb5" ,mit-krb5)))
18938 ;; for tests
18939 (native-inputs
18940 `(("python-shouldbe" ,python-shouldbe)
18941 ("python-parameterized" ,python-parameterized)
18942 ("python-k5test" ,python-k5test)
18943 ("python-nose" ,python-nose)))
18944 (home-page "https://github.com/pythongssapi/python-gssapi")
18945 (synopsis "Python GSSAPI Wrapper")
18946 (description
18947 "Python-GSSAPI provides both low-level and high level wrappers around the
18948 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18949 also be useable with other GSSAPI mechanisms.")
18950 (license license:isc)))
18951
18952 (define-public python-check-manifest
18953 (package
18954 (name "python-check-manifest")
18955 (version "0.37")
18956 (source
18957 (origin
18958 (method url-fetch)
18959 (uri (pypi-uri "check-manifest" version))
18960 (sha256
18961 (base32
18962 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18963 (build-system python-build-system)
18964 (native-inputs
18965 `(("python-mock" ,python-mock)
18966 ("git" ,git)))
18967 (home-page "https://github.com/mgedmin/check-manifest")
18968 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18969 (description "Python package can include a MANIFEST.in file to help with
18970 sending package files to the Python Package Index. This package checks that
18971 file to ensure it completely and accurately describes your project.")
18972 (license license:expat)))
18973
18974 (define-public python-android-stringslib
18975 (package
18976 (name "python-android-stringslib")
18977 (version "0.1.2")
18978 (source
18979 (origin
18980 (method git-fetch)
18981 (uri (git-reference
18982 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18983 (commit (string-append "v" version))))
18984 (file-name (git-file-name name version))
18985 (sha256
18986 (base32
18987 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18988 (build-system python-build-system)
18989 (arguments
18990 `(#:tests? #f))
18991 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18992 (synopsis "Android strings.xml support")
18993 (description "Android Strings Lib provides support for android's strings.xml
18994 files. These files are used to translate strings in android apps.")
18995 (license license:expat)))
18996
18997 (define-public python-watchdog
18998 (package
18999 (name "python-watchdog")
19000 (version "0.9.0")
19001 (source
19002 (origin
19003 (method url-fetch)
19004 (uri (pypi-uri "watchdog" version))
19005 (sha256
19006 (base32
19007 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
19008 (build-system python-build-system)
19009 (arguments
19010 `(#:phases
19011 (modify-phases %standard-phases
19012 (add-before 'check 'remove-failing
19013 (lambda _
19014 (delete-file "tests/test_inotify_buffer.py")
19015 (delete-file "tests/test_snapshot_diff.py")
19016 #t)))))
19017 (propagated-inputs
19018 `(("python-argh" ,python-argh)
19019 ("python-pathtools" ,python-pathtools)
19020 ("python-pyyaml" ,python-pyyaml)))
19021 (native-inputs
19022 `(("python-pytest-cov" ,python-pytest-cov)
19023 ("python-pytest-timeout" ,python-pytest-timeout)))
19024 (home-page "https://github.com/gorakhargosh/watchdog")
19025 (synopsis "Filesystem events monitoring")
19026 (description "This package provides a way to monitor filesystem events
19027 such as a file modification and trigger an action. This is similar to inotify,
19028 but portable.")
19029 (license license:asl2.0)))
19030
19031 (define-public python-wget
19032 (package
19033 (name "python-wget")
19034 (version "3.2")
19035 (source
19036 (origin
19037 (method url-fetch)
19038 (uri (pypi-uri "wget" version ".zip"))
19039 (sha256
19040 (base32
19041 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
19042 (build-system python-build-system)
19043 (native-inputs `(("unzip" ,unzip)))
19044 (home-page "https://bitbucket.org/techtonik/python-wget/")
19045 (synopsis "Pure Python download utility")
19046 (description "The python-wget library provides an API to download files
19047 with features similar to the @command{wget} utility.")
19048 (license license:unlicense)))
19049
19050 (define-public offlate
19051 (package
19052 (name "offlate")
19053 (version "0.5")
19054 (source
19055 (origin
19056 (method git-fetch)
19057 (uri (git-reference
19058 (url "https://framagit.org/tyreunom/offlate")
19059 (commit version)))
19060 (file-name (git-file-name name version))
19061 (sha256
19062 (base32
19063 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
19064 (build-system python-build-system)
19065 (arguments
19066 ;; No tests
19067 `(#:tests? #f))
19068 (propagated-inputs
19069 `(("python-android-stringslib" ,python-android-stringslib)
19070 ("python-dateutil" ,python-dateutil)
19071 ("python-gitlab" ,python-gitlab)
19072 ("python-lxml" ,python-lxml)
19073 ("python-polib" ,python-polib)
19074 ("python-pyenchant" ,python-pyenchant)
19075 ("python-pygit2" ,python-pygit2)
19076 ("python-pygithub" ,python-pygithub)
19077 ("python-pyqt" ,python-pyqt)
19078 ("python-requests" ,python-requests)
19079 ("python-ruamel.yaml" ,python-ruamel.yaml)
19080 ("python-translation-finder" ,python-translation-finder)
19081 ("python-watchdog" ,python-watchdog)))
19082 (native-inputs
19083 `(("qttools" ,qttools)))
19084 (home-page "https://framagit.org/tyreunom/offlate")
19085 (synopsis "Offline translation interface for online translation tools")
19086 (description "Offlate offers a unified interface for different translation
19087 file formats, as well as many different online translation platforms. You can
19088 use it to get work from online platforms, specialized such as the Translation
19089 Project, or not such a gitlab instance when your upstream doesn't use any
19090 dedicated platform. The tool proposes a unified interface for any format and
19091 an upload option to send your work back to the platform.")
19092 (license license:gpl3+)))
19093
19094 (define-public python-titlecase
19095 (package
19096 (name "python-titlecase")
19097 (version "0.12.0")
19098 (source
19099 (origin
19100 (method url-fetch)
19101 (uri (pypi-uri "titlecase" version))
19102 (sha256
19103 (base32
19104 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
19105 (build-system python-build-system)
19106 (native-inputs
19107 `(("python-nose" ,python-nose)))
19108 (home-page "https://github.com/ppannuto/python-titlecase")
19109 (synopsis "Capitalize strings similar to book titles")
19110 (description
19111 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
19112 It capitalizes (predominantly English) strings in a way that is similar to
19113 book titles, using the New York Times Manual of Style to leave certain words
19114 lowercase.")
19115 (license license:expat)))
19116
19117 (define-public python-pypng
19118 (package
19119 (name "python-pypng")
19120 (version "0.0.20")
19121 (source
19122 (origin
19123 (method url-fetch)
19124 (uri (pypi-uri "pypng" version))
19125 (sha256
19126 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
19127 (build-system python-build-system)
19128 (home-page "https://github.com/drj11/pypng")
19129 (synopsis "Pure Python PNG image encoder/decoder")
19130 (description
19131 "The PyPNG module implements support for PNG images. It reads and writes
19132 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
19133 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
19134 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
19135 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
19136 A number of optional chunks can be specified (when writing) and
19137 understood (when reading): tRNS, bKGD, gAMA.
19138
19139 PyPNG is not a high level toolkit for image processing (like PIL) and does not
19140 aim at being a replacement or competitor. Its strength lies in fine-grained
19141 extensive support of PNG features. It can also read and write Netpbm PAM
19142 files, with a focus on its use as an intermediate format for implementing
19143 custom PNG processing.")
19144 (license license:expat)))
19145
19146 (define-public python-fuzzywuzzy
19147 (package
19148 (name "python-fuzzywuzzy")
19149 (version "0.18.0")
19150 (source
19151 (origin
19152 (method url-fetch)
19153 (uri (pypi-uri "fuzzywuzzy" version))
19154 (sha256
19155 (base32
19156 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
19157 (build-system python-build-system)
19158 (native-inputs
19159 `(("python-hypothesis" ,python-hypothesis)
19160 ("python-pycodestyle" ,python-pycodestyle)
19161 ("python-pytest" ,python-pytest)))
19162 (propagated-inputs
19163 `(("python-levenshtein" ,python-levenshtein)))
19164 (home-page "https://github.com/seatgeek/fuzzywuzzy")
19165 (synopsis "Fuzzy string matching in Python")
19166 (description "Approximate string matching using
19167 @emph{Levenshtein Distance} to calculate the differences between
19168 sequences.")
19169 (license license:gpl2)))
19170
19171 (define-public python2-fuzzywuzzy
19172 (package-with-python2 python-fuzzywuzzy))
19173
19174 (define-public python-block-tracing
19175 (package
19176 (name "python-block-tracing")
19177 (version "1.0.1")
19178 (source
19179 (origin
19180 (method url-fetch)
19181 (uri (pypi-uri "block_tracing" version))
19182 (sha256
19183 (base32
19184 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
19185 (build-system python-build-system)
19186 (arguments '(#:tests? #f)) ; no tests
19187 (home-page "https://github.com/rianhunter/block_tracing")
19188 (synopsis "Protect process memory")
19189 (description
19190 "@code{block_tracing} is a tiny Python library that can be used to
19191 prevent debuggers and other applications from inspecting the memory within
19192 your process.")
19193 (license license:expat)))
19194
19195 (define-public python-gcovr
19196 (package
19197 (name "python-gcovr")
19198 (version "4.2")
19199 (source
19200 (origin
19201 (method url-fetch)
19202 (uri (pypi-uri "gcovr" version))
19203 (sha256
19204 (base32
19205 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
19206 (build-system python-build-system)
19207 (propagated-inputs
19208 `(("python-lxml" ,python-lxml)
19209 ("python-jinja2" ,python-jinja2)))
19210 (home-page "https://gcovr.com/")
19211 (synopsis "Utility for generating code coverage results")
19212 (description
19213 "Gcovr provides a utility for managing the use of the GNU gcov
19214 utility and generating summarized code coverage results. It is inspired
19215 by the Python coverage.py package, which provides a similar utility for
19216 Python.")
19217 (license license:bsd-3)))
19218
19219 (define-public python-owslib
19220 (package
19221 (name "python-owslib")
19222 (version "0.19.2")
19223 (source
19224 (origin
19225 (method url-fetch)
19226 (uri (pypi-uri "OWSLib" version))
19227 (sha256
19228 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
19229 (build-system python-build-system)
19230 (arguments
19231 '(#:tests? #f)) ; TODO: package dependencies required for tests.
19232 (synopsis "Interface for Open Geospatial Consortium web service")
19233 (description
19234 "OWSLib is a Python package for client programming with Open Geospatial
19235 Consortium (OGC) web service (hence OWS) interface standards, and their related
19236 content models.")
19237 (home-page "https://geopython.github.io/OWSLib/")
19238 (license license:bsd-3)))
19239
19240 (define-public python-docusign-esign
19241 (package
19242 (name "python-docusign-esign")
19243 (version "3.1.0")
19244 (source (origin
19245 (method url-fetch)
19246 (uri (pypi-uri "docusign_esign" version))
19247 (sha256
19248 (base32
19249 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
19250 (build-system python-build-system)
19251 ;; Testing requires undocumented setup changes, and so testing is disabled here.
19252 (arguments `(#:tests? #f))
19253 (propagated-inputs
19254 `(("python-certifi", python-certifi)
19255 ("python-six", python-six)
19256 ("python-dateutil", python-dateutil)
19257 ("python-urllib3", python-urllib3)
19258 ("python-pyjwt", python-pyjwt)
19259 ("python-cryptography", python-cryptography)
19260 ("python-nose", python-nose)))
19261 (synopsis "DocuSign Python Client")
19262 (description "The Official DocuSign Python Client Library used to interact
19263 with the eSign REST API. Send, sign, and approve documents using this client.")
19264 (home-page "https://www.docusign.com/devcenter")
19265 (license license:expat)))
19266
19267 (define-public python-xattr
19268 (package
19269 (name "python-xattr")
19270 (version "0.9.7")
19271 (source
19272 (origin
19273 (method url-fetch)
19274 (uri (pypi-uri "xattr" version))
19275 (sha256
19276 (base32
19277 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
19278 (build-system python-build-system)
19279 (propagated-inputs
19280 `(("python-cffi" ,python-cffi)))
19281 (home-page "https://github.com/xattr/xattr")
19282 (synopsis
19283 "Python wrapper for extended filesystem attributes")
19284 (description "This package provides a Python wrapper for using extended
19285 filesystem attributes. Extended attributes extend the basic attributes of files
19286 and directories in the file system. They are stored as name:data pairs
19287 associated with file system objects (files, directories, symlinks, etc).")
19288 (license license:expat)))
19289
19290 (define-public python-json-logger
19291 (package
19292 (name "python-json-logger")
19293 (version "0.1.11")
19294 (source
19295 (origin
19296 (method url-fetch)
19297 (uri (pypi-uri "python-json-logger" version))
19298 (sha256
19299 (base32
19300 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
19301 (build-system python-build-system)
19302 (home-page
19303 "https://github.com/madzak/python-json-logger")
19304 (synopsis "JSON log formatter in Python")
19305 (description "This library allows standard Python logging to output log data
19306 as JSON objects. With JSON we can make our logs more readable by machines and
19307 we can stop writing custom parsers for syslog-type records.")
19308 (license license:bsd-3)))
19309
19310 (define-public python-daiquiri
19311 (package
19312 (name "python-daiquiri")
19313 (version "2.1.1")
19314 (source
19315 (origin
19316 (method url-fetch)
19317 (uri (pypi-uri "daiquiri" version))
19318 (sha256
19319 (base32
19320 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
19321 (build-system python-build-system)
19322 (propagated-inputs
19323 `(("python-json-logger" ,python-json-logger)))
19324 (native-inputs
19325 `(("python-mock" ,python-mock)
19326 ("python-pytest" ,python-pytest)
19327 ("python-setuptools-scm" ,python-setuptools-scm)
19328 ("python-six" ,python-six)))
19329 (home-page "https://github.com/jd/daiquiri")
19330 (synopsis
19331 "Library to configure Python logging easily")
19332 (description "The daiquiri library provides an easy way to configure
19333 logging in Python. It also provides some custom formatters and handlers.")
19334 (license license:asl2.0)))
19335
19336 (define-public python-pifpaf
19337 (package
19338 (name "python-pifpaf")
19339 (version "2.4.0")
19340 (source
19341 (origin
19342 (method url-fetch)
19343 (uri (pypi-uri "pifpaf" version))
19344 (sha256
19345 (base32
19346 "150av2pylsjy8ykrpyi0vzy2q24s9rhh2ya01zvwnvj9j5dspviz"))))
19347 (build-system python-build-system)
19348 (arguments
19349 `(#:tests? #f))
19350 (propagated-inputs
19351 `(("python-click" ,python-click)
19352 ("python-daiquiri" ,python-daiquiri)
19353 ("python-fixtures" ,python-fixtures)
19354 ("python-jinja2" ,python-jinja2)
19355 ("python-pbr" ,python-pbr)
19356 ("python-psutil" ,python-psutil)
19357 ("python-six" ,python-six)
19358 ("python-xattr" ,python-xattr)))
19359 (native-inputs
19360 `(("python-mock" ,python-mock)
19361 ("python-os-testr" ,python-os-testr)
19362 ("python-requests" ,python-requests)
19363 ("python-testrepository" ,python-testrepository)
19364 ("python-testtools" ,python-testtools)))
19365 (home-page "https://github.com/jd/pifpaf")
19366 (synopsis "Tools and fixtures to manage daemons for testing in Python")
19367 (description "Pifpaf is a suite of fixtures and a command-line tool that
19368 starts and stops daemons for a quick throw-away usage. This is typically
19369 useful when needing these daemons to run integration testing. It originally
19370 evolved from its precursor @code{overtest}.")
19371 (license license:asl2.0)))
19372
19373 (define-public python-pytest-check-links
19374 (package
19375 (name "python-pytest-check-links")
19376 (version "0.3.0")
19377 (source
19378 (origin
19379 (method url-fetch)
19380 ;; URI uses underscores
19381 (uri (pypi-uri "pytest_check_links" version))
19382 (sha256
19383 (base32
19384 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
19385 (build-system python-build-system)
19386 (propagated-inputs
19387 `(("python-docutils" ,python-docutils)
19388 ("python-html5lib" ,python-html5lib)
19389 ("python-nbconvert" ,python-nbconvert)
19390 ("python-nbformat" ,python-nbformat)
19391 ("python-pytest" ,python-pytest)
19392 ("python-six" ,python-six)))
19393 (native-inputs
19394 `(("python-pbr-minimal" ,python-pbr-minimal)))
19395 (home-page "https://github.com/minrk/pytest-check-links")
19396 (synopsis "Check links in files")
19397 (description "This package provides a pytest plugin that checks URLs for
19398 HTML-containing files.")
19399 (license license:bsd-3)))
19400
19401 (define-public python-json5
19402 (package
19403 (name "python-json5")
19404 (version "0.8.5")
19405 (source
19406 (origin
19407 ;; sample.json5 is missing from PyPi source tarball
19408 (method git-fetch)
19409 (uri (git-reference
19410 (url "https://github.com/dpranke/pyjson5.git")
19411 (commit (string-append "v" version))))
19412 (file-name (git-file-name name version))
19413 (sha256
19414 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
19415 (build-system python-build-system)
19416 (home-page "https://github.com/dpranke/pyjson5")
19417 (synopsis
19418 "Python implementation of the JSON5 data format")
19419 (description
19420 "JSON5 extends the JSON data interchange format to make it slightly more
19421 usable as a configuration language. This Python package implements parsing and
19422 dumping of JSON5 data structures.")
19423 (license license:asl2.0)))
19424
19425 (define-public python-frozendict
19426 (package
19427 (name "python-frozendict")
19428 (version "1.2")
19429 (source
19430 (origin
19431 (method url-fetch)
19432 (uri (pypi-uri "frozendict" version))
19433 (sha256
19434 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
19435 (build-system python-build-system)
19436 (home-page "https://github.com/slezica/python-frozendict")
19437 (synopsis "Simple immutable mapping for Python")
19438 (description
19439 "@dfn{frozendict} is an immutable wrapper around dictionaries that
19440 implements the complete mapping interface. It can be used as a drop-in
19441 replacement for dictionaries where immutability is desired.")
19442 (license license:expat)))
19443
19444 (define-public python-unpaddedbase64
19445 (package
19446 (name "python-unpaddedbase64")
19447 (version "1.1.0")
19448 (source
19449 (origin
19450 (method git-fetch)
19451 (uri (git-reference
19452 (url "https://github.com/matrix-org/python-unpaddedbase64.git")
19453 (commit (string-append "v" version))))
19454 (file-name (git-file-name name version))
19455 (sha256
19456 (base32
19457 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
19458 (build-system python-build-system)
19459 (home-page "https://pypi.org/project/unpaddedbase64/")
19460 (synopsis "Encode and decode Base64 without “=” padding")
19461 (description
19462 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
19463 using “=” characters. However this conveys no benefit so many protocols
19464 choose to use Base64 without the “=” padding.")
19465 (license license:asl2.0)))
19466
19467 (define-public python-canonicaljson
19468 (package
19469 (name "python-canonicaljson")
19470 (version "1.1.4")
19471 (source
19472 (origin
19473 (method url-fetch)
19474 (uri (pypi-uri "canonicaljson" version))
19475 (sha256
19476 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
19477 (build-system python-build-system)
19478 (propagated-inputs
19479 `(("python-six" ,python-six)
19480 ("python-frozendict" ,python-frozendict)
19481 ("python-simplejson" ,python-simplejson)))
19482 (home-page "https://github.com/matrix-org/python-canonicaljson")
19483 (synopsis "Canonical JSON")
19484 (description
19485 "Deterministically encode JSON.
19486
19487 @itemize
19488 @item Encodes objects and arrays as RFC 7159 JSON.
19489 @item Sorts object keys so that you get the same result each time.
19490 @item Has no insignificant whitespace to make the output as small as possible.
19491 @item Escapes only the characters that must be escaped, U+0000 to
19492 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
19493 @item Uses the shortest escape sequence for each escaped character.
19494 @item Encodes the JSON as UTF-8.
19495 @item Can encode frozendict immutable dictionaries.
19496 @end itemize")
19497 (license license:asl2.0)))
19498
19499 (define-public python-signedjson
19500 (package
19501 (name "python-signedjson")
19502 (version "1.1.1")
19503 (source
19504 (origin
19505 (method url-fetch)
19506 (uri (pypi-uri "signedjson" version))
19507 (sha256
19508 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
19509 (build-system python-build-system)
19510 (propagated-inputs
19511 `(("python-canonicaljson" ,python-canonicaljson)
19512 ("python-importlib-metadata" ,python-importlib-metadata)
19513 ("python-pynacl" ,python-pynacl)
19514 ("python-typing-extensions" ,python-typing-extensions)
19515 ("python-unpaddedbase64" ,python-unpaddedbase64)))
19516 (native-inputs
19517 `(("python-setuptools-scm" ,python-setuptools-scm)))
19518 (home-page "https://github.com/matrix-org/python-signedjson")
19519 (synopsis "Sign JSON objects with ED25519 signatures")
19520 (description
19521 "Sign JSON objects with ED25519 signatures.
19522
19523 @itemize
19524 @item More than one entity can sign the same object.
19525 @item Each entity can sign the object with more than one key making it easier to
19526 rotate keys
19527 @item ED25519 can be replaced with a different algorithm.
19528 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
19529 key.
19530 @end itemize")
19531 (license license:asl2.0)))
19532
19533 (define-public python-daemonize
19534 (package
19535 (name "python-daemonize")
19536 (version "2.5.0")
19537 (source
19538 (origin
19539 (method url-fetch)
19540 (uri (pypi-uri "daemonize" version))
19541 (sha256
19542 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
19543 (build-system python-build-system)
19544 (home-page "https://github.com/thesharp/daemonize")
19545 (synopsis "Library for writing system daemons in Python")
19546 (description "Daemonize is a library for writing system daemons in Python.")
19547 (license license:expat)))
19548
19549 (define-public python-pymacaroons
19550 (package
19551 (name "python-pymacaroons")
19552 (version "0.13.0")
19553 (source
19554 (origin
19555 (method url-fetch)
19556 (uri (pypi-uri "pymacaroons" version))
19557 (sha256
19558 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
19559 (build-system python-build-system)
19560 (propagated-inputs
19561 `(("python-six" ,python-six)
19562 ("python-pynacl" ,python-pynacl)))
19563 (home-page "https://github.com/ecordell/pymacaroons")
19564 (synopsis "Python Macaroon Library")
19565 (description
19566 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
19567 tokens, macaroons embed caveats that define specific authorization
19568 requirements for the target service, the service that issued the root macaroon
19569 and which is capable of verifying the integrity of macaroons it receives.
19570
19571 Macaroons allow for delegation and attenuation of authorization. They are
19572 simple and fast to verify, and decouple authorization policy from the
19573 enforcement of that policy.")
19574 (license license:expat)))
19575
19576 (define-public python-ldap3
19577 (package
19578 (name "python-ldap3")
19579 (version "2.7")
19580 (home-page "https://github.com/cannatag/ldap3")
19581 (source
19582 (origin
19583 (method git-fetch)
19584 (uri (git-reference (url home-page)
19585 (commit (string-append "v" version))))
19586 (file-name (git-file-name name version))
19587 (sha256
19588 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
19589 (build-system python-build-system)
19590 (arguments
19591 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
19592 #:phases (modify-phases %standard-phases
19593 (replace 'check
19594 (lambda* (#:key tests? #:allow-other-keys)
19595 (when tests?
19596 (invoke "nosetests" "-s" "test"))
19597 #t)))))
19598 (native-inputs
19599 `(("python-nose" ,python-nose)))
19600 (propagated-inputs
19601 `(("python-gssapi" ,python-gssapi)
19602 ("python-pyasn1" ,python-pyasn1)))
19603 (synopsis "Python LDAP client")
19604 (description
19605 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
19606 library.")
19607 (license license:lgpl3+)))
19608
19609 (define-public python-boltons
19610 (package
19611 (name "python-boltons")
19612 (version "20.0.0")
19613 (source
19614 (origin
19615 (method url-fetch)
19616 (uri (pypi-uri "boltons" version))
19617 (sha256
19618 (base32
19619 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
19620 (build-system python-build-system)
19621 (home-page "https://github.com/mahmoud/boltons")
19622 (synopsis "Extensions to the Python standard library")
19623 (description
19624 "Boltons is a set of over 230 pure-Python utilities in the same spirit
19625 as — and yet conspicuously missing from — the standard library, including:
19626
19627 @itemize
19628 @item Atomic file saving, bolted on with fileutils
19629 @item A highly-optimized OrderedMultiDict, in dictutils
19630 @item Two types of PriorityQueue, in queueutils
19631 @item Chunked and windowed iteration, in iterutils
19632 @item Recursive data structure iteration and merging, with iterutils.remap
19633 @item Exponential backoff functionality, including jitter, through
19634 iterutils.backoff
19635 @item A full-featured TracebackInfo type, for representing stack traces, in
19636 tbutils
19637 @end itemize")
19638 (license license:bsd-3)))
19639
19640 (define-public python-eliot
19641 (package
19642 (name "python-eliot")
19643 (version "1.12.0")
19644 (source
19645 (origin
19646 (method url-fetch)
19647 (uri (pypi-uri "eliot" version))
19648 (sha256
19649 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
19650 (build-system python-build-system)
19651 (arguments
19652 `(#:phases
19653 (modify-phases %standard-phases
19654 (add-after 'unpack 'remove-journald-support
19655 (lambda _
19656 (for-each delete-file
19657 '("eliot/tests/test_journald.py"
19658 "eliot/journald.py"))
19659 #t))
19660 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
19661 ;; remove command-line tool's tests. TODO eliot-prettyprint should
19662 ;; be installed and these tests should pass.
19663 (lambda _
19664 (delete-file "eliot/tests/test_prettyprint.py")
19665 #t)))))
19666 (propagated-inputs
19667 `(("python-boltons" ,python-boltons)
19668 ("python-pyrsistent" ,python-pyrsistent)
19669 ("python-six" ,python-six)
19670 ("python-zope-interface" ,python-zope-interface)))
19671 (native-inputs
19672 `(("python-black" ,python-black)
19673 ("python-coverage" ,python-coverage)
19674 ("python-dask" ,python-dask)
19675 ("python-flake8" ,python-flake8)
19676 ("python-hypothesis" ,python-hypothesis)
19677 ("python-pytest" ,python-pytest)
19678 ("python-setuptools" ,python-setuptools)
19679 ("python-sphinx" ,python-sphinx)
19680 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
19681 ("python-testtools" ,python-testtools)
19682 ("python-twine" ,python-twine)
19683 ("python-twisted" ,python-twisted)))
19684 (home-page "https://github.com/itamarst/eliot/")
19685 (synopsis "Eliot: the logging system that tells you why it happened")
19686 (description
19687 "@dfn{eliot} is a Python logging system that outputs causal chains of
19688 actions: actions can spawn other actions, and eventually they either succeed
19689 or fail. The resulting logs tell you the story of what your software did: what
19690 happened, and what caused it.")
19691 (license license:asl2.0)))
19692
19693 (define-public python-pem
19694 (package
19695 (name "python-pem")
19696 (version "20.1.0")
19697 (source
19698 (origin
19699 (method url-fetch)
19700 (uri (pypi-uri "pem" version))
19701 (sha256
19702 (base32
19703 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
19704 (build-system python-build-system)
19705 (native-inputs
19706 `(("python-certifi" ,python-certifi)
19707 ("python-coverage" ,python-coverage)
19708 ("python-pretend" ,python-pretend)
19709 ("python-pyopenssl" ,python-pyopenssl)
19710 ("python-pytest" ,python-pytest)
19711 ("python-sphinx" ,python-sphinx)
19712 ("python-twisted" ,python-twisted)))
19713 (home-page "https://pem.readthedocs.io/")
19714 (synopsis "Easy PEM file parsing in Python")
19715 (description
19716 "This package provides a Python module for parsing and splitting PEM files.")
19717 (license license:expat)))
19718
19719 (define-public python-txsni
19720 ;; We need a few commits on top of 0.1.9 for compatibility with newer
19721 ;; Python and OpenSSL.
19722 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
19723 (revision "0"))
19724 (package
19725 (name "python-txsni")
19726 (version (git-version "0.1.9" revision commit))
19727 (home-page "https://github.com/glyph/txsni")
19728 (source
19729 (origin
19730 (method git-fetch)
19731 (uri (git-reference (url home-page) (commit commit)))
19732 (file-name (git-file-name name version))
19733 (sha256
19734 (base32
19735 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
19736 (build-system python-build-system)
19737 (propagated-inputs
19738 `(("python-pyopenssl" ,python-pyopenssl)
19739 ("python-service-identity" ,python-service-identity)
19740 ("python-twisted" ,python-twisted)))
19741 (synopsis "Run TLS servers with Twisted")
19742 (description
19743 "This package provides an easy-to-use SNI endpoint for use
19744 with the Twisted web framework.")
19745 (license license:expat))))
19746
19747 (define-public python-txacme
19748 (package
19749 (name "python-txacme")
19750 (version "0.9.2")
19751 (source
19752 (origin
19753 (method url-fetch)
19754 (uri (pypi-uri "txacme" version))
19755 (sha256
19756 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
19757 (build-system python-build-system)
19758 (propagated-inputs
19759 `(("python-acme" ,python-acme)
19760 ("python-attrs" ,python-attrs)
19761 ("python-eliot" ,python-eliot)
19762 ("python-josepy" ,python-josepy)
19763 ("python-pem" ,python-pem)
19764 ("python-treq" ,python-treq)
19765 ("python-twisted" ,python-twisted)
19766 ("python-txsni" ,python-txsni)))
19767 (native-inputs
19768 `(("python-fixtures" ,python-fixtures)
19769 ("python-hypothesis" ,python-hypothesis)
19770 ("python-mock" ,python-mock)
19771 ("python-service-identity"
19772 ,python-service-identity)
19773 ("python-testrepository" ,python-testrepository)
19774 ("python-testscenarios" ,python-testscenarios)
19775 ("python-testtools" ,python-testtools)))
19776 (home-page "https://github.com/twisted/txacme")
19777 (synopsis "Twisted implexmentation of the ACME protocol")
19778 (description
19779 "ACME is Automatic Certificate Management Environment, a protocol that
19780 allows clients and certificate authorities to automate verification and
19781 certificate issuance. The ACME protocol is used by the free Let's Encrypt
19782 Certificate Authority.
19783
19784 txacme is an implementation of the protocol for Twisted, the event-driven
19785 networking engine for Python.")
19786 (license license:expat)))
19787
19788 (define-public python-pysaml2
19789 (package
19790 (name "python-pysaml2")
19791 (version "5.0.0")
19792 (source
19793 (origin
19794 (method url-fetch)
19795 (uri (pypi-uri "pysaml2" version))
19796 (sha256
19797 (base32
19798 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
19799 (build-system python-build-system)
19800 (propagated-inputs
19801 `(("python-cryptography" ,python-cryptography)
19802 ("python-dateutil" ,python-dateutil)
19803 ("python-defusedxml" ,python-defusedxml)
19804 ("python-pyopenssl" ,python-pyopenssl)
19805 ("python-pytz" ,python-pytz)
19806 ("python-requests" ,python-requests)
19807 ("python-six" ,python-six)))
19808 (home-page "https://idpy.org")
19809 (synopsis "Python implementation of SAML Version 2 Standard")
19810 (description
19811 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
19812 It contains all necessary pieces for building a SAML2 service provider or
19813 an identity provider. The distribution contains examples of both.
19814
19815 This package was originally written to work in a WSGI environment, but
19816 there are extensions that allow you to use it with other frameworks.")
19817 (license license:asl2.0)))
19818
19819 (define-public python-click-plugins
19820 (package
19821 (name "python-click-plugins")
19822 (version "1.1.1")
19823 (source
19824 (origin
19825 (method url-fetch)
19826 (uri (pypi-uri "click-plugins" version))
19827 (sha256
19828 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
19829 (build-system python-build-system)
19830 (native-inputs
19831 `(("python-pytest" ,python-pytest)))
19832 (propagated-inputs
19833 `(("python-click" ,python-click)))
19834 (synopsis "Extension for Click to register external CLI commands")
19835 (description "This package provides n extension module for Click to
19836 register external CLI commands via setuptools entry-points.")
19837 (home-page "https://github.com/click-contrib/click-plugins")
19838 (license license:bsd-3)))
19839
19840 (define-public python-diceware
19841 (package
19842 (name "python-diceware")
19843 (version "0.9.6")
19844 (source
19845 (origin
19846 (method url-fetch)
19847 (uri (pypi-uri "diceware" version))
19848 (sha256
19849 (base32
19850 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
19851 (build-system python-build-system)
19852 (native-inputs
19853 `(("python-coverage" ,python-coverage)
19854 ("python-pytest" ,python-pytest)
19855 ("python-pytest-runner" ,python-pytest-runner)))
19856 (home-page "https://github.com/ulif/diceware/")
19857 (synopsis "Generates memorable passphrases")
19858 (description "This package generates passphrases by concatenating words
19859 randomly picked from wordlists. It supports several sources of
19860 randomness (including real life dice) and different wordlists (including
19861 cryptographically signed ones).")
19862 (license license:gpl3+)))
19863
19864 (define-public pyzo
19865 (package
19866 (name "pyzo")
19867 (version "4.10.2")
19868 (source
19869 (origin
19870 (method url-fetch)
19871 (uri (pypi-uri "pyzo" version))
19872 (sha256
19873 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
19874 (build-system python-build-system)
19875 (arguments
19876 `(#:phases
19877 (modify-phases %standard-phases
19878 (add-before 'check 'fix-home-directory
19879 (lambda _
19880 ;; Tests fail with "Permission denied: '/homeless-shelter'".
19881 (setenv "HOME" "/tmp")
19882 #t)))
19883 ;; Tests fail with "Uncaught Python exception: invalid literal for
19884 ;; int() with base 10: 'test'".
19885 #:tests? #f))
19886 (propagated-inputs
19887 `(("python-pyqt" ,python-pyqt)))
19888 (home-page "https://pyzo.org")
19889 (synopsis
19890 "Python IDE for scientific computing")
19891 (description
19892 "Pyzo is a Python IDE focused on interactivity and introspection,
19893 which makes it very suitable for scientific computing. Its practical
19894 design is aimed at simplicity and efficiency.
19895
19896 It consists of two main components, the editor and the shell, and uses
19897 a set of pluggable tools to help the programmer in various ways. Some
19898 example tools are source structure, project manager, interactive help,
19899 workspace...")
19900 (license license:bsd-2)))
19901
19902 (define-public python-osc
19903 (package
19904 (name "python-osc")
19905 (version "1.7.4")
19906 (source
19907 (origin
19908 (method url-fetch)
19909 (uri (pypi-uri "python-osc" version))
19910 (sha256
19911 (base32
19912 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
19913 (build-system python-build-system)
19914 (home-page "https://github.com/attwad/python-osc")
19915 (synopsis "Open Sound Control server and client implementations")
19916 (description
19917 "@code{python-osc} is a pure Python library with no external
19918 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
19919 Open Sound Control 1.0} specification.")
19920 (license license:unlicense)))
19921
19922 (define-public python-voluptuous
19923 (package
19924 (name "python-voluptuous")
19925 (version "0.11.7")
19926 (source
19927 (origin
19928 (method url-fetch)
19929 (uri (pypi-uri "voluptuous" version))
19930 (sha256
19931 (base32
19932 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
19933 (build-system python-build-system)
19934 (native-inputs
19935 `(("python-nose" ,python-nose)))
19936 (home-page "https://github.com/alecthomas/voluptuous")
19937 (synopsis "Python data validation library")
19938 (description
19939 "Voluptuous is a Python data validation library. It is primarily
19940 intended for validating data coming into Python as JSON, YAML, etc.")
19941 (license license:bsd-3)))
19942
19943 (define-public python-cmd2
19944 (package
19945 (name "python-cmd2")
19946 (version "1.0.2")
19947 (source
19948 (origin
19949 (method url-fetch)
19950 (uri (pypi-uri "cmd2" version))
19951 (sha256
19952 (base32
19953 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
19954 (build-system python-build-system)
19955 (propagated-inputs
19956 `(("python-attrs" ,python-attrs)
19957 ("python-colorama" ,python-colorama)
19958 ("python-pyperclip" ,python-pyperclip)
19959 ("python-wcwidth" ,python-wcwidth)))
19960 (native-inputs
19961 `(("python-codecov" ,python-codecov)
19962 ("python-coverage" ,python-coverage)
19963 ("python-doc8" ,python-doc8)
19964 ("python-flake8" ,python-flake8)
19965 ("python-invoke" ,python-invoke)
19966 ("python-mock" ,python-mock)
19967 ("python-pytest" ,python-pytest)
19968 ("python-pytest-cov" ,python-pytest-cov)
19969 ("python-pytest-mock" ,python-pytest-mock)
19970 ("python-setuptools-scm" ,python-setuptools-scm)
19971 ("python-sphinx" ,python-sphinx)
19972 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
19973 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
19974 ("python-tox" ,python-tox)
19975 ("python-twine" ,python-twine)
19976 ("which" ,which)))
19977 (home-page "https://github.com/python-cmd2/cmd2")
19978 (synopsis "Tool for building interactive command line applications")
19979 (description
19980 "Cmd2 is a tool for building interactive command line applications in
19981 Python. Its goal is to make it quick and easy for developers to build
19982 feature-rich and user-friendly interactive command line applications. It
19983 provides a simple API which is an extension of Python's built-in @code{cmd}
19984 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
19985 make your life easier and eliminates much of the boilerplate code which would
19986 be necessary when using @code{cmd}.")
19987 (license license:expat)))
19988
19989 (define-public python-pytidylib
19990 (package
19991 (name "python-pytidylib")
19992 (version "0.3.2")
19993 (source (origin
19994 (method url-fetch)
19995 (uri (pypi-uri "pytidylib" version))
19996 (sha256
19997 (base32
19998 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
19999 (build-system python-build-system)
20000 (arguments
20001 '(#:phases
20002 (modify-phases %standard-phases
20003 (add-before 'build 'qualify-libtidy
20004 (lambda* (#:key inputs #:allow-other-keys)
20005 (let ((libtidy (string-append (assoc-ref inputs "tidy")
20006 "/lib/libtidy.so")))
20007 (substitute* "tidylib/tidy.py"
20008 (("ctypes\\.util\\.find_library\\('tidy'\\)")
20009 (format #f "'~a'" libtidy)))
20010 #t))))))
20011 (inputs `(("tidy" ,tidy)))
20012 (home-page "https://github.com/countergram/pytidylib")
20013 (synopsis "Python wrapper for HTML Tidy library")
20014 (description
20015 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
20016 allows you, from Python code, to “fix” invalid (X)HTML markup.")
20017 (license license:expat)))
20018
20019 (define-public python2-pytidylib
20020 (package-with-python2 python-pytidylib))
20021
20022 (define-public python-mujson
20023 (package
20024 (name "python-mujson")
20025 (version "1.4")
20026 (source
20027 (origin
20028 (method url-fetch)
20029 (uri (pypi-uri "mujson" version))
20030 (sha256
20031 (base32
20032 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
20033 (build-system python-build-system)
20034 (home-page "https://github.com/mattgiles/mujson")
20035 (synopsis "Use the fastest JSON functions available at import time")
20036 (description "This packages selects the fastest JSON functions available
20037 at import time.")
20038 (license license:expat)))
20039
20040 (define-public python-bashlex
20041 (package
20042 (name "python-bashlex")
20043 (version "0.14")
20044 (source
20045 (origin
20046 (method url-fetch)
20047 (uri (pypi-uri "bashlex" version))
20048 (sha256
20049 (base32
20050 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
20051 (build-system python-build-system)
20052 (arguments
20053 `(#:phases
20054 (modify-phases %standard-phases
20055 (add-before 'build 'pregenerate-yacc-tables
20056 (lambda _
20057 ;; parser.py caches tables, which attempts to write to site lib
20058 ;; see https://github.com/idank/bashlex/issues/51
20059 (invoke "python" "-c" "import bashlex"))))))
20060 (home-page
20061 "https://github.com/idank/bashlex")
20062 (synopsis "Python parser for bash")
20063 (description "@code{bashlex} is a Python port of the parser used
20064 internally by GNU bash.
20065
20066 For the most part it's transliterated from C, the major differences are:
20067
20068 @itemize
20069 @item it does not execute anything
20070 @item it is reentrant
20071 @item it generates a complete AST
20072 @end itemize
20073 ")
20074 (license license:gpl3+)))