gnu: python-can: Update to 3.3.3.
[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.5")
7340 (source
7341 (origin
7342 (method url-fetch)
7343 (uri (pypi-uri "backports.csv" version))
7344 (sha256
7345 (base32
7346 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
7347 (build-system python-build-system)
7348 (home-page "https://github.com/ryanhiebert/backports.csv")
7349 (synopsis "Backport of Python 3's csv module for Python 2")
7350 (description
7351 "Provides a backport of Python 3's @code{csv} module for parsing
7352 comma separated values. The API of the @code{csv} module in Python 2
7353 is drastically different from the @code{csv} module in Python 3.
7354 This is due, for the most part, to the difference between str in
7355 Python 2 and Python 3.")
7356 (license license:psfl)))
7357
7358 (define-public python2-backports-csv
7359 (package-with-python2 python-backports-csv))
7360
7361 (define-public python2-backports-shutil-get-terminal-size
7362 (package
7363 (name "python2-backports-shutil-get-terminal-size")
7364 (version "1.0.0")
7365 (source
7366 (origin
7367 (method url-fetch)
7368 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7369 (sha256
7370 (base32
7371 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7372 (build-system python-build-system)
7373 (arguments
7374 `(#:python ,python-2
7375 #:phases
7376 (modify-phases %standard-phases
7377 (replace 'check
7378 (lambda _
7379 (setenv "PYTHONPATH" (string-append "./build/lib:"
7380 (getenv "PYTHONPATH")))
7381 (invoke "py.test" "-v"))))))
7382 (native-inputs
7383 `(("python2-pytest" ,python2-pytest)))
7384 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7385 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7386 (description
7387 "This package provides a backport of the @code{get_terminal_size
7388 function} from Python 3.3's @code{shutil}.
7389 Unlike the original version it is written in pure Python rather than C,
7390 so it might be a tiny bit slower.")
7391 (license license:expat)))
7392
7393 (define-public python-waf
7394 (package
7395 (name "python-waf")
7396 (version "2.0.19")
7397 (source (origin
7398 (method url-fetch)
7399 (uri (string-append "https://waf.io/"
7400 "waf-" version ".tar.bz2"))
7401 (sha256
7402 (base32
7403 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7404 (build-system python-build-system)
7405 (arguments
7406 '(#:phases
7407 (modify-phases %standard-phases
7408 (replace 'build
7409 (lambda _
7410 ;; XXX: Find a way to add all extra tools.
7411 (let ((tools '("gccdeps"
7412 "clang_compilation_database")))
7413 (invoke "python" "waf-light" "configure" "build"
7414 (string-append "--tools="
7415 (string-join tools ","))))))
7416 (replace 'check
7417 (lambda _
7418 (invoke "python" "waf" "--version")))
7419 (replace 'install
7420 (lambda* (#:key outputs #:allow-other-keys)
7421 (let ((out (assoc-ref outputs "out")))
7422 (install-file "waf" (string-append out "/bin")))
7423 #t))
7424 ;; waf breaks when it is wrapped.
7425 (delete 'wrap))))
7426 (home-page "https://waf.io/")
7427 (synopsis "Python-based build system")
7428 (description
7429 "Waf is a Python-based framework for configuring, compiling and installing
7430 applications.")
7431 (license license:bsd-3)))
7432
7433 (define-public python2-waf
7434 (package-with-python2 python-waf))
7435
7436 (define-public python-pyzmq
7437 (package
7438 (name "python-pyzmq")
7439 (version "17.1.2")
7440 (source
7441 (origin
7442 (method url-fetch)
7443 (uri (pypi-uri "pyzmq" version))
7444 (sha256
7445 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
7446 (build-system python-build-system)
7447 (arguments
7448 `(#:configure-flags
7449 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
7450 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
7451 ;; --inplace' for 'python setup.py test' to work.
7452 #:tests? #f))
7453 (inputs
7454 `(("zeromq" ,zeromq)))
7455 (native-inputs
7456 `(("pkg-config" ,pkg-config)
7457 ("python-nose" ,python-nose)))
7458 (home-page "https://github.com/zeromq/pyzmq")
7459 (synopsis "Python bindings for 0MQ")
7460 (description
7461 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
7462 (license license:bsd-4)))
7463
7464 (define-public python2-pyzmq
7465 (package-with-python2 python-pyzmq))
7466
7467 (define-public python-pep8
7468 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
7469 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
7470 ;; some dependents' test suites, and nothing more.
7471 (package
7472 (name "python-pep8")
7473 (version "1.7.0")
7474 (source
7475 (origin
7476 (method url-fetch)
7477 (uri (pypi-uri "pep8" version))
7478 (sha256
7479 (base32
7480 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
7481 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
7482 (build-system python-build-system)
7483 (home-page "https://pep8.readthedocs.org/")
7484 (synopsis "Python style guide checker")
7485 (description
7486 "This tools checks Python code against some of the style conventions in
7487 PEP 8.")
7488 (license license:expat)))
7489
7490 (define-public python2-pep8
7491 (package-with-python2 python-pep8))
7492
7493 (define-public python-pyflakes
7494 (package
7495 (name "python-pyflakes")
7496 (version "2.1.1")
7497 (source
7498 (origin
7499 (method url-fetch)
7500 (uri (pypi-uri "pyflakes" version))
7501 (sha256
7502 (base32
7503 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
7504 (build-system python-build-system)
7505 (home-page
7506 "https://github.com/pyflakes/pyflakes")
7507 (synopsis "Passive checker of Python programs")
7508 (description
7509 "Pyflakes statically checks Python source code for common errors.")
7510 (license license:expat)))
7511
7512 (define-public python2-pyflakes
7513 (package-with-python2 python-pyflakes))
7514
7515 ;; Flake8 2.6 requires an older version of pyflakes.
7516 ;; This should be removed ASAP.
7517 (define-public python-pyflakes-1.2
7518 (package (inherit python-pyflakes)
7519 (version "1.2.3")
7520 (source
7521 (origin
7522 (method url-fetch)
7523 (uri (pypi-uri "pyflakes" version))
7524 (sha256
7525 (base32
7526 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
7527 (arguments
7528 '(#:phases
7529 (modify-phases %standard-phases
7530 ;; This one test fails.
7531 (replace 'check
7532 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
7533 (native-inputs
7534 `(("python-pytest" ,python-pytest)))))
7535
7536 (define-public python-mccabe
7537 (package
7538 (name "python-mccabe")
7539 (version "0.6.1")
7540 (source
7541 (origin
7542 (method url-fetch)
7543 (uri (pypi-uri "mccabe" version))
7544 (sha256
7545 (base32
7546 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
7547 (build-system python-build-system)
7548 (native-inputs
7549 `(("python-pytest" ,python-pytest-bootstrap)
7550 ("python-pytest-runner" ,python-pytest-runner)))
7551 (home-page "https://github.com/flintwork/mccabe")
7552 (synopsis "McCabe checker, plugin for flake8")
7553 (description
7554 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7555 complexity of Python source code.")
7556 (license license:expat)))
7557
7558 (define-public python2-mccabe
7559 (package-with-python2 python-mccabe))
7560
7561 (define-public python-mccabe-0.2.1
7562 (package (inherit python-mccabe)
7563 (version "0.2.1")
7564 (source
7565 (origin
7566 (method url-fetch)
7567 (uri (pypi-uri "mccabe" version))
7568 (sha256
7569 (base32
7570 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7571
7572 (define-public python2-mccabe-0.2.1
7573 (package-with-python2 python-mccabe-0.2.1))
7574
7575 ;; Flake8 2.4.1 requires an older version of pep8.
7576 ;; This should be removed ASAP.
7577 (define-public python-pep8-1.5.7
7578 (package (inherit python-pep8)
7579 (version "1.5.7")
7580 (source
7581 (origin
7582 (method url-fetch)
7583 (uri (pypi-uri "pep8" version))
7584 (sha256
7585 (base32
7586 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7587 (arguments
7588 ;; XXX Tests not compatible with Python 3.5.
7589 '(#:tests? #f))))
7590
7591 (define-public python2-pep8-1.5.7
7592 (package-with-python2 python-pep8-1.5.7))
7593
7594 (define-public python-flake8
7595 (package
7596 (name "python-flake8")
7597 (version "3.7.9")
7598 (source (origin
7599 (method url-fetch)
7600 (uri (pypi-uri "flake8" version))
7601 (sha256
7602 (base32
7603 "1yscj6avirm6m12bjh4fn2lfgxaamqsjh9pirdqfi0fcgq8ils25"))))
7604 (build-system python-build-system)
7605 (arguments
7606 `(#:phases
7607 (modify-phases %standard-phases
7608 (delete 'check)
7609 (add-after 'install 'check
7610 (lambda* (#:key inputs outputs #:allow-other-keys)
7611 (add-installed-pythonpath inputs outputs)
7612 (invoke "pytest" "-v")
7613 #t)))))
7614 (propagated-inputs
7615 `(("python-pycodestyle" ,python-pycodestyle)
7616 ("python-entrypoints" ,python-entrypoints)
7617 ("python-pyflakes" ,python-pyflakes)
7618 ("python-mccabe" ,python-mccabe)))
7619 (native-inputs
7620 `(("python-mock" ,python-mock)
7621 ("python-pytest" ,python-pytest-bootstrap)))
7622 (home-page "https://gitlab.com/pycqa/flake8")
7623 (synopsis
7624 "The modular source code checker: pep8, pyflakes and co")
7625 (description
7626 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7627 (properties `((python2-variant . ,(delay python2-flake8))))
7628 (license license:expat)))
7629
7630 (define-public python2-flake8
7631 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
7632 (package (inherit base)
7633 (propagated-inputs
7634 `(("python2-configparser" ,python2-configparser)
7635 ("python2-enum34" ,python2-enum34)
7636 ("python2-functools32" ,python2-functools32)
7637 ("python2-typing" ,python2-typing)
7638 ,@(package-propagated-inputs base))))))
7639
7640 ;; python-hacking requires flake8 <2.7.0.
7641 (define-public python-flake8-2.6
7642 (package
7643 (inherit python-flake8)
7644 (version "2.6.2")
7645 (source (origin
7646 (method url-fetch)
7647 (uri (pypi-uri "flake8" version))
7648 (sha256
7649 (base32
7650 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
7651 (arguments
7652 `(#:phases
7653 (modify-phases %standard-phases
7654 (add-after 'unpack 'use-later-pycodestyles
7655 (lambda __
7656 (substitute* '("flake8.egg-info/requires.txt"
7657 "setup.py")
7658 (("pycodestyle >= 2.0, < 2.1")
7659 "pycodestyle >= 2.0"))
7660 #t))
7661 (delete 'check)
7662 (add-after 'install 'check
7663 (lambda* (#:key inputs outputs #:allow-other-keys)
7664 (add-installed-pythonpath inputs outputs)
7665 (invoke "pytest" "-v")
7666 #t)))))
7667 (propagated-inputs
7668 `(("python-pep8" ,python-pep8)
7669 ("python-pycodestyle" ,python-pycodestyle)
7670 ("python-entrypoints" ,python-entrypoints)
7671 ("python-pyflakes" ,python-pyflakes-1.2)
7672 ("python-mccabe" ,python-mccabe)))))
7673
7674 (define-public python-flake8-polyfill
7675 (package
7676 (name "python-flake8-polyfill")
7677 (version "1.0.2")
7678 (source
7679 (origin
7680 (method url-fetch)
7681 (uri (pypi-uri "flake8-polyfill" version))
7682 (sha256
7683 (base32
7684 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7685 (build-system python-build-system)
7686 (arguments
7687 '(#:phases
7688 (modify-phases %standard-phases
7689 (replace 'check
7690 (lambda _
7691 ;; Be compatible with Pytest 4:
7692 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7693 (substitute* "setup.cfg"
7694 (("\\[pytest\\]")
7695 "[tool:pytest]"))
7696
7697 (setenv "PYTHONPATH"
7698 (string-append (getcwd) "/build/lib:"
7699 (getenv "PYTHONPATH")))
7700 (invoke "py.test" "-v"))))))
7701 (native-inputs
7702 `(("python-flake8" ,python-flake8)
7703 ("python-mock" ,python-mock)
7704 ("python-pep8" ,python-pep8)
7705 ("python-pycodestyle" ,python-pycodestyle)
7706 ("python-pytest" ,python-pytest)))
7707 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7708 (synopsis "Polyfill package for Flake8 plugins")
7709 (description
7710 "This package that provides some compatibility helpers for Flake8
7711 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7712 (license license:expat)))
7713
7714 (define-public python2-flake8-polyfill
7715 (package-with-python2 python-flake8-polyfill))
7716
7717 (define-public python-mistune
7718 (package
7719 (name "python-mistune")
7720 (version "0.8.4")
7721 (source
7722 (origin
7723 (method url-fetch)
7724 (uri (pypi-uri "mistune" version))
7725 (sha256
7726 (base32
7727 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7728 (build-system python-build-system)
7729 (native-inputs
7730 `(("python-nose" ,python-nose)
7731 ("python-cython" ,python-cython)))
7732 (home-page "https://github.com/lepture/mistune")
7733 (synopsis "Markdown parser in pure Python")
7734 (description "This package provides a fast markdown parser in pure
7735 Python.")
7736 (license license:bsd-3)))
7737
7738 (define-public python2-mistune
7739 (package-with-python2 python-mistune))
7740
7741 (define-public python-markdown
7742 (package
7743 (name "python-markdown")
7744 (version "3.2.1")
7745 (source
7746 (origin
7747 (method url-fetch)
7748 (uri (pypi-uri "Markdown" version))
7749 (sha256
7750 (base32
7751 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
7752 (build-system python-build-system)
7753 (native-inputs
7754 `(("python-nose" ,python-nose)
7755 ("python-pyyaml" ,python-pyyaml)))
7756 (home-page "https://python-markdown.github.io/")
7757 (synopsis "Python implementation of Markdown")
7758 (description
7759 "This package provides a Python implementation of John Gruber's
7760 Markdown. The library features international input, various Markdown
7761 extensions, and several HTML output formats. A command line wrapper
7762 markdown_py is also provided to convert Markdown files to HTML.")
7763 (properties `((python2-variant . ,(delay python2-markdown))))
7764 (license license:bsd-3)))
7765
7766 ;; Markdown 3.2 dropped support for Python 2.
7767 (define-public python2-markdown
7768 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7769 (package/inherit
7770 base
7771 (version "3.1.1")
7772 (source (origin
7773 (method url-fetch)
7774 (uri (pypi-uri "Markdown" version))
7775 (sha256
7776 (base32
7777 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
7778
7779 (define-public python-ptyprocess
7780 (package
7781 (name "python-ptyprocess")
7782 (version "0.5.2")
7783 (source
7784 (origin
7785 (method url-fetch)
7786 (uri (pypi-uri "ptyprocess" version))
7787 (sha256
7788 (base32
7789 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7790 (build-system python-build-system)
7791 (native-inputs
7792 `(("python-nose" ,python-nose)))
7793 (arguments
7794 `(#:phases
7795 (modify-phases %standard-phases
7796 (replace 'check
7797 (lambda _ (invoke "nosetests"))))))
7798 (home-page "https://github.com/pexpect/ptyprocess")
7799 (synopsis "Run a subprocess in a pseudo terminal")
7800 (description
7801 "This package provides a Python library used to launch a subprocess in a
7802 pseudo terminal (pty), and interact with both the process and its pty.")
7803 (license license:isc)))
7804
7805 (define-public python2-ptyprocess
7806 (package-with-python2 python-ptyprocess))
7807
7808 (define-public python-cram
7809 (package
7810 (name "python-cram")
7811 (version "0.7")
7812 (home-page "https://bitheap.org/cram/")
7813 (source (origin
7814 (method url-fetch)
7815 (uri (list (string-append home-page "cram-"
7816 version ".tar.gz")
7817 (pypi-uri "cram" version)))
7818 (sha256
7819 (base32
7820 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7821 (arguments
7822 '(#:phases
7823 (modify-phases %standard-phases
7824 (add-after 'unpack 'patch-source
7825 (lambda _
7826 (substitute* (find-files "cram" ".*\\.py$")
7827 ;; Replace default shell path.
7828 (("/bin/sh") (which "sh")))
7829 (substitute* (find-files "tests" ".*\\.t$")
7830 (("md5") "md5sum")
7831 (("/bin/bash") (which "bash"))
7832 (("/bin/sh") (which "sh")))
7833 (substitute* "cram/_test.py"
7834 ;; This hack works around a bug triggered by substituting
7835 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7836 ;; "cram -h", which breaks the output at 80 characters. This
7837 ;; causes the line showing the default shell to break into two
7838 ;; lines, but the test expects a single line...
7839 (("env\\['COLUMNS'\\] = '80'")
7840 "env['COLUMNS'] = '160'"))
7841
7842 (substitute* "Makefile"
7843 ;; Recent versions of python-coverage have caused the test
7844 ;; coverage to decrease (as of version 0.7). Allow that.
7845 (("--fail-under=100")
7846 "--fail-under=90"))
7847
7848 #t))
7849 (replace 'check
7850 ;; The test phase uses the built library and executable.
7851 (lambda* (#:key inputs outputs #:allow-other-keys)
7852 (add-installed-pythonpath inputs outputs)
7853 (setenv "PATH" (string-append (getenv "PATH") ":"
7854 (assoc-ref outputs "out") "/bin"))
7855 (invoke "make" "test"))))))
7856 (build-system python-build-system)
7857 (native-inputs
7858 `(("python-coverage" ,python-coverage)
7859 ("which" ,which)))
7860 (synopsis "Simple testing framework for command line applications")
7861 (description
7862 "Cram is a functional testing framework for command line applications.
7863 Cram tests look like snippets of interactive shell sessions. Cram runs each
7864 command and compares the command output in the test with the command’s actual
7865 output.")
7866 (license license:gpl2+)))
7867
7868 (define-public python2-cram
7869 (package-with-python2 python-cram))
7870
7871 (define-public python-straight-plugin
7872 (package
7873 (name "python-straight-plugin")
7874 (version "1.4.1")
7875 (source
7876 (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "straight.plugin" version))
7879 (sha256
7880 (base32
7881 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7882 (build-system python-build-system)
7883 (home-page "https://github.com/ironfroggy/straight.plugin")
7884 (synopsis "Simple namespaced plugin facility")
7885 (description "Straight Plugin provides a type of plugin you can create from
7886 almost any existing Python modules, and an easy way for outside developers to
7887 add functionality and customization to your projects with their own plugins.")
7888 (license license:expat)))
7889
7890 (define-public python2-straight-plugin
7891 (package-with-python2 python-straight-plugin))
7892
7893 (define-public python-fonttools
7894 (package
7895 (name "python-fonttools")
7896 (version "4.6.0")
7897 (source (origin
7898 (method url-fetch)
7899 (uri (pypi-uri "fonttools" version ".zip"))
7900 (sha256
7901 (base32
7902 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
7903 (build-system python-build-system)
7904 (native-inputs
7905 `(("unzip" ,unzip)
7906 ("python-pytest" ,python-pytest)
7907 ("python-pytest-runner" ,python-pytest-runner)))
7908 (home-page "https://github.com/fonttools/fonttools")
7909 (synopsis "Tools to manipulate font files")
7910 (description
7911 "FontTools/TTX is a library to manipulate font files from Python. It
7912 supports reading and writing of TrueType/OpenType fonts, reading and writing
7913 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7914 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7915 from an XML-based format.")
7916 (license license:expat)))
7917
7918 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
7919 (define-public python2-fonttools
7920 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
7921 (package/inherit
7922 base
7923 (version "3.44.0")
7924 (source (origin
7925 (method url-fetch)
7926 (uri (pypi-uri "fonttools" version ".zip"))
7927 (sha256
7928 (base32
7929 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
7930
7931 (define-public python-ly
7932 (package
7933 (name "python-ly")
7934 (version "0.9.5")
7935 (source
7936 (origin
7937 (method url-fetch)
7938 (uri (pypi-uri name version))
7939 (sha256
7940 (base32
7941 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7942 (build-system python-build-system)
7943 (arguments
7944 ;; FIXME: Some tests need network access.
7945 '(#:tests? #f))
7946 (synopsis "Tool and library for manipulating LilyPond files")
7947 (description "This package provides a Python library to parse, manipulate
7948 or create documents in LilyPond format. A command line program ly is also
7949 provided that can be used to do various manipulations with LilyPond files.")
7950 (home-page "https://pypi.org/project/python-ly/")
7951 (license license:gpl2+)))
7952
7953 (define-public python-appdirs
7954 (package
7955 (name "python-appdirs")
7956 (version "1.4.3")
7957 (source
7958 (origin
7959 (method url-fetch)
7960 (uri (pypi-uri "appdirs" version))
7961 (sha256
7962 (base32
7963 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7964 (build-system python-build-system)
7965 (home-page "https://github.com/ActiveState/appdirs")
7966 (synopsis
7967 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7968 (description
7969 "This module provides a portable way of finding out where user data
7970 should be stored on various operating systems.")
7971 (license license:expat)))
7972
7973 (define-public python2-appdirs
7974 (package-with-python2 python-appdirs))
7975
7976 (define-public python-llfuse
7977 (package
7978 (name "python-llfuse")
7979 (version "1.3.6")
7980 (source (origin
7981 (method url-fetch)
7982 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7983 (sha256
7984 (base32
7985 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
7986 (build-system python-build-system)
7987 (inputs
7988 `(("fuse" ,fuse)
7989 ("attr" ,attr)))
7990 (native-inputs
7991 `(("pkg-config" ,pkg-config)))
7992 (synopsis "Python bindings for FUSE")
7993 (description
7994 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7995 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7996 (license license:lgpl2.0+)
7997 (properties `((python2-variant . ,(delay python2-llfuse))))))
7998
7999 (define-public python2-llfuse
8000 (package (inherit (package-with-python2
8001 (strip-python2-variant python-llfuse)))
8002 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8003
8004 ;; For attic-0.16
8005 (define-public python-llfuse-0.41
8006 (package (inherit python-llfuse)
8007 (version "0.41.1")
8008 (source (origin
8009 (method url-fetch)
8010 (uri (string-append
8011 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8012 "llfuse-" version ".tar.bz2"))
8013 (sha256
8014 (base32
8015 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8016 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8017 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8018 (license (list license:expat license:lgpl2.0+))))
8019
8020 (define-public python-msgpack
8021 (package
8022 (name "python-msgpack")
8023 (version "1.0.0")
8024 (source (origin
8025 (method url-fetch)
8026 (uri (pypi-uri "msgpack" version))
8027 (sha256
8028 (base32
8029 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8030 (build-system python-build-system)
8031 (arguments
8032 `(#:modules ((guix build utils)
8033 (guix build python-build-system)
8034 (ice-9 ftw)
8035 (srfi srfi-1)
8036 (srfi srfi-26))
8037 #:phases
8038 (modify-phases %standard-phases
8039 (replace 'check
8040 (lambda _
8041 (let ((cwd (getcwd)))
8042 (setenv "PYTHONPATH"
8043 (string-append cwd "/build/"
8044 (find (cut string-prefix? "lib" <>)
8045 (scandir (string-append cwd "/build")))
8046 ":"
8047 (getenv "PYTHONPATH")))
8048 (invoke "pytest" "-v" "test")))))))
8049 (native-inputs
8050 `(("python-pytest" ,python-pytest)))
8051 (synopsis "MessagePack (de)serializer")
8052 (description "MessagePack is a fast, compact binary serialization format,
8053 suitable for similar data to JSON. This package provides CPython bindings for
8054 reading and writing MessagePack data.")
8055 (home-page "https://pypi.org/project/msgpack/")
8056 (license license:asl2.0)))
8057
8058 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8059 ;; release 0.5. Some packages like borg still call it by the old name for now.
8060 ;; <https://bugs.gnu.org/30662>
8061 (define-public python-msgpack-transitional
8062 (package
8063 (inherit python-msgpack)
8064 (name "python-msgpack-transitional")
8065 (version "0.5.6")
8066 (source (origin
8067 (method url-fetch)
8068 (uri (pypi-uri "msgpack" version))
8069 (sha256
8070 (base32
8071 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8072 (arguments
8073 (substitute-keyword-arguments (package-arguments python-msgpack)
8074 ((#:phases phases)
8075 `(modify-phases ,phases
8076 (add-after 'unpack 'configure-transitional
8077 (lambda _
8078 ;; Keep using the old name.
8079 (substitute* "setup.py"
8080 (("TRANSITIONAL = False")
8081 "TRANSITIONAL = 1"))
8082 #t))))))))
8083
8084 (define-public python2-msgpack
8085 (package-with-python2 python-msgpack))
8086
8087 (define-public python-netaddr
8088 (package
8089 (name "python-netaddr")
8090 (version "0.7.19")
8091 (source
8092 (origin
8093 (method url-fetch)
8094 (uri (pypi-uri "netaddr" version))
8095 (sha256
8096 (base32
8097 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8098 (build-system python-build-system)
8099 (arguments `(#:tests? #f)) ;; No tests.
8100 (home-page "https://github.com/drkjam/netaddr/")
8101 (synopsis "Pythonic manipulation of network addresses")
8102 (description
8103 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8104 and MAC network addresses.")
8105 (license license:bsd-3)))
8106
8107 (define-public python2-netaddr
8108 (package-with-python2 python-netaddr))
8109
8110 (define-public python2-pyroute2
8111 (package
8112 (name "python2-pyroute2")
8113 (version "0.5.6")
8114 (source
8115 (origin
8116 (method url-fetch)
8117 (uri (pypi-uri "pyroute2" version))
8118 (sha256
8119 (base32
8120 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8121 (build-system python-build-system)
8122 (arguments
8123 `(#:python ,python-2)) ;Python 3.x is not supported
8124 (home-page "https://github.com/svinota/pyroute2")
8125 (synopsis "Python netlink library")
8126 (description
8127 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8128 Supported netlink families and protocols include:
8129 @itemize
8130 @item rtnl, network settings - addresses, routes, traffic controls
8131 @item nfnetlink - netfilter API: ipset, nftables, ...
8132 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8133 @item devlink - manage and monitor devlink-enabled hardware
8134 @item generic - generic netlink families
8135 @itemize
8136 @item nl80211 - wireless functions API (basic support)
8137 @item taskstats - extended process statistics
8138 @item acpi_events - ACPI events monitoring
8139 @item thermal_events - thermal events monitoring
8140 @item VFS_DQUOT - disk quota events monitoring
8141 @end itemize
8142 @end itemize")
8143 (license license:gpl2+)))
8144
8145 (define-public python-wrapt
8146 (package
8147 (name "python-wrapt")
8148 (version "1.11.2")
8149 (source
8150 (origin
8151 (method url-fetch)
8152 (uri (pypi-uri "wrapt" version))
8153 (sha256
8154 (base32
8155 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8156 (build-system python-build-system)
8157 (arguments
8158 ;; Tests are not included in the tarball, they are only available in the
8159 ;; git repository.
8160 `(#:tests? #f))
8161 (home-page "https://github.com/GrahamDumpleton/wrapt")
8162 (synopsis "Module for decorators, wrappers and monkey patching")
8163 (description
8164 "The aim of the wrapt module is to provide a transparent object proxy for
8165 Python, which can be used as the basis for the construction of function
8166 wrappers and decorator functions.")
8167 (license license:bsd-2)))
8168
8169 (define-public python2-wrapt
8170 (package-with-python2 python-wrapt))
8171
8172 (define-public python-xlrd
8173 (package
8174 (name "python-xlrd")
8175 (version "1.2.0")
8176 (source (origin
8177 (method url-fetch)
8178 (uri (pypi-uri "xlrd" version))
8179 (sha256
8180 (base32
8181 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8182 (build-system python-build-system)
8183 (arguments
8184 `(#:phases
8185 (modify-phases %standard-phases
8186 ;; Some tests depend on writing a temporary file to the user's home
8187 ;; directory.
8188 (add-after 'unpack 'fix-tests
8189 (lambda _
8190 (delete-file "tests/test_open_workbook.py")
8191 #t)))))
8192 (home-page "http://www.python-excel.org/")
8193 (synopsis "Library for extracting data from Excel files")
8194 (description "This package provides a library to extract data from
8195 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8196 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8197 Unicode-aware. It is not intended as an end-user tool.")
8198 (license license:bsd-3)))
8199
8200 (define-public python2-xlrd
8201 (package-with-python2 python-xlrd))
8202
8203 (define-public python-prettytable
8204 (package
8205 (name "python-prettytable")
8206 (version "0.7.2")
8207 (source
8208 (origin
8209 (method url-fetch)
8210 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8211 (sha256
8212 (base32
8213 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8214 (build-system python-build-system)
8215 (home-page "https://code.google.com/archive/p/prettytable/")
8216 (synopsis "Display tabular data in an ASCII table format")
8217 (description
8218 "A library designed to represent tabular data in visually appealing ASCII
8219 tables. PrettyTable allows for selection of which columns are to be printed,
8220 independent alignment of columns (left or right justified or centred) and
8221 printing of sub-tables by specifying a row range.")
8222 (license license:bsd-3)))
8223
8224 (define-public python2-prettytable
8225 (package-with-python2 python-prettytable))
8226
8227 (define-public python-tables
8228 (package
8229 (name "python-tables")
8230 (version "3.6.1")
8231 (source
8232 (origin
8233 (method url-fetch)
8234 (uri (pypi-uri "tables" version))
8235 (sha256
8236 (base32
8237 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
8238 (modules '((guix build utils)))
8239 (snippet
8240 '(begin
8241 ;; Remove pre-compiled .pyc files from source.
8242 (for-each delete-file-recursively
8243 (find-files "." "__pycache__" #:directories? #t))
8244 (for-each delete-file (find-files "." "\\.pyc$"))
8245 #t))))
8246 (build-system python-build-system)
8247 (arguments
8248 `(;; FIXME: python-build-system does not pass configure-flags to "build"
8249 ;; or "check", so we must override the build and check phases.
8250 #:phases
8251 (modify-phases %standard-phases
8252 (add-after 'unpack 'use-gcc
8253 (lambda _
8254 (substitute* "setup.py"
8255 (("^( +)compiler = new_compiler\\(\\)" line indent)
8256 (string-append line
8257 "\n"
8258 indent
8259 "compiler.set_executables(compiler='gcc',"
8260 "compiler_so='gcc',"
8261 "linker_exe='gcc',"
8262 "linker_so='gcc -shared')")))
8263 #t))
8264 (add-after 'unpack 'disable-tuning
8265 (lambda _
8266 (substitute* "setup.py"
8267 (("cpu_flags = .*")
8268 "cpu_flags = ['sse2']\n"))
8269 #t))
8270 (replace 'build
8271 (lambda* (#:key inputs #:allow-other-keys)
8272 (invoke "python" "setup.py" "build"
8273 (string-append "--hdf5="
8274 (assoc-ref inputs "hdf5")))))
8275 (replace 'check
8276 (lambda* (#:key inputs #:allow-other-keys)
8277 (invoke "python" "setup.py" "check"
8278 (string-append "--hdf5="
8279 (assoc-ref inputs "hdf5"))))))))
8280 (propagated-inputs
8281 `(("python-numexpr" ,python-numexpr)
8282 ("python-numpy" ,python-numpy)))
8283 (native-inputs
8284 `(("python-cython" ,python-cython)
8285 ("pkg-config" ,pkg-config)))
8286 (inputs
8287 `(("hdf5" ,hdf5-1.10)
8288 ("bzip2" ,bzip2)
8289 ("zlib" ,zlib)))
8290 (home-page "https://www.pytables.org/")
8291 (synopsis "Hierarchical datasets for Python")
8292 (description "PyTables is a package for managing hierarchical datasets and
8293 designed to efficiently cope with extremely large amounts of data.")
8294 (license license:bsd-3)))
8295
8296 (define-public python2-tables
8297 (package-with-python2 python-tables))
8298
8299 (define-public python-pytest-black
8300 (package
8301 (name "python-pytest-black")
8302 (version "0.3.8")
8303 (source
8304 (origin
8305 (method url-fetch)
8306 (uri (pypi-uri "pytest-black" version))
8307 (sha256
8308 (base32
8309 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
8310 (build-system python-build-system)
8311 (propagated-inputs
8312 `(("python-pytest" ,python-pytest)
8313 ("python-black" ,python-black)
8314 ("python-toml" ,python-toml)))
8315 (native-inputs
8316 `(("python-setuptools-scm" ,python-setuptools-scm)))
8317 (home-page "https://github.com/shopkeep/pytest-black")
8318 (synopsis "Pytest plugin to enable format checking with black")
8319 (description
8320 "This package provides a pytest plugin to enable format checking with the
8321 Python code formatter \"black\".")
8322 (license license:expat)))
8323
8324 (define-public python-get-version
8325 (package
8326 (name "python-get-version")
8327 (version "2.1")
8328 (source
8329 (origin
8330 (method url-fetch)
8331 (uri (pypi-uri "get_version" version))
8332 (sha256
8333 (base32
8334 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
8335 (build-system python-build-system)
8336 (propagated-inputs
8337 `(("python-pygments" ,python-pygments)
8338 ("python-pytest" ,python-pytest)
8339 ("python-pytest-black" ,python-pytest-black)
8340 ("python-pytest-cov" ,python-pytest-cov)
8341 ("python-setuptools" ,python-setuptools)
8342 ("python-testpath" ,python-testpath)))
8343 (home-page "https://github.com/flying-sheep/get_version")
8344 (synopsis "Version helper in the spirit of versioneer")
8345 (description
8346 "This package provides a version helper that lets you automatically use
8347 the latest @code{vX.X.X} Git tag as the version in your Python package. It
8348 also supports getting the version from Python source distributions or, once
8349 your package is installed, via @code{pkg_resources} (part of
8350 @code{setuptools}).")
8351 (license license:gpl3+)))
8352
8353 (define-public python-legacy-api-wrap
8354 (package
8355 (name "python-legacy-api-wrap")
8356 (version "1.2")
8357 (source
8358 (origin
8359 (method url-fetch)
8360 (uri (pypi-uri "legacy-api-wrap" version))
8361 (sha256
8362 (base32
8363 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
8364 (build-system python-build-system)
8365 (propagated-inputs
8366 `(("python-get-version" ,python-get-version)
8367 ("python-pytest" ,python-pytest)
8368 ("python-pytest-black" ,python-pytest-black)
8369 ("python-pytest-cov" ,python-pytest-cov)
8370 ("python-setuptools" ,python-setuptools)))
8371 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
8372 (synopsis "Legacy API wrapper")
8373 (description "This module defines a decorator to wrap legacy APIs. The
8374 primary use case is APIs defined before keyword-only parameters existed.")
8375 (license license:gpl3+)))
8376
8377 (define-public python-pyasn1
8378 (package
8379 (name "python-pyasn1")
8380 (version "0.4.8")
8381 (source
8382 (origin
8383 (method url-fetch)
8384 (uri (pypi-uri "pyasn1" version))
8385 (sha256
8386 (base32
8387 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
8388 (build-system python-build-system)
8389 (home-page "http://pyasn1.sourceforge.net/")
8390 (synopsis "ASN.1 types and codecs")
8391 (description
8392 "This is an implementation of ASN.1 types and codecs in Python. It is
8393 suitable for a wide range of protocols based on the ASN.1 specification.")
8394 (license license:bsd-2)))
8395
8396 (define-public python2-pyasn1
8397 (package-with-python2 python-pyasn1))
8398
8399 (define-public python-pyasn1-modules
8400 (package
8401 (name "python-pyasn1-modules")
8402 (version "0.2.2")
8403 (source
8404 (origin
8405 (method url-fetch)
8406 (uri (pypi-uri "pyasn1-modules" version))
8407 (sha256
8408 (base32
8409 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
8410 (build-system python-build-system)
8411 (propagated-inputs
8412 `(("python-pyasn1" ,python-pyasn1)))
8413 (home-page "https://sourceforge.net/projects/pyasn1/")
8414 (synopsis "ASN.1 codec implementations")
8415 (description
8416 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
8417 implementations of ASN.1-based codecs and protocols.")
8418 (license license:bsd-3)))
8419
8420 (define-public python2-pyasn1-modules
8421 (package-with-python2 python-pyasn1-modules))
8422
8423 (define-public python-ipaddress
8424 (package
8425 (name "python-ipaddress")
8426 (version "1.0.22")
8427 (source (origin
8428 (method url-fetch)
8429 (uri (pypi-uri "ipaddress" version))
8430 (sha256
8431 (base32
8432 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
8433 (build-system python-build-system)
8434 (home-page "https://github.com/phihag/ipaddress")
8435 (synopsis "IP address manipulation library")
8436 (description
8437 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
8438 in Python. This library is used to create, poke at, and manipulate IPv4 and
8439 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
8440 module to older versions of Python.")
8441 (license license:psfl)))
8442
8443 (define-public python2-ipaddress
8444 (package-with-python2 python-ipaddress))
8445
8446 (define-public python2-ipaddr
8447 (package
8448 (name "python2-ipaddr")
8449 (version "2.1.11")
8450 (source
8451 (origin
8452 (method url-fetch)
8453 (uri (pypi-uri "ipaddr" version))
8454 (sha256
8455 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
8456 (build-system python-build-system)
8457 (arguments
8458 `(#:python ,python-2 ;version 2 only
8459 #:phases
8460 (modify-phases %standard-phases
8461 (replace 'check
8462 (lambda _ (invoke "python" "ipaddr_test.py"))))))
8463 (home-page "https://github.com/google/ipaddr-py")
8464 (synopsis "IP address manipulation library")
8465 (description
8466 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
8467 IPv6 addresses and networks.
8468
8469 For new implementations you may prefer to use the standard module
8470 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
8471 versions of Python.")
8472 (license license:asl2.0)))
8473
8474 (define-public python-idna
8475 (package
8476 (name "python-idna")
8477 (version "2.8")
8478 (source
8479 (origin
8480 (method url-fetch)
8481 (uri (pypi-uri "idna" version))
8482 (sha256
8483 (base32
8484 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
8485 (build-system python-build-system)
8486 (home-page "https://github.com/kjd/idna")
8487 (synopsis "Internationalized domain names in applications")
8488 (description
8489 "This is a library to support the Internationalised Domain Names in
8490 Applications (IDNA) protocol as specified in RFC 5891. This version of the
8491 protocol is often referred to as “IDNA2008” and can produce different results
8492 from the earlier standard from 2003. The library is also intended to act as a
8493 suitable drop-in replacement for the “encodings.idna” module that comes with
8494 the Python standard library but currently only supports the older 2003
8495 specification.")
8496 (license license:bsd-4)))
8497
8498 (define-public python-idna-2.7
8499 (package (inherit python-idna)
8500 (version "2.7")
8501 (source (origin
8502 (method url-fetch)
8503 (uri (pypi-uri "idna" version))
8504 (sha256
8505 (base32
8506 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
8507
8508
8509 (define-public python2-idna
8510 (package-with-python2 python-idna))
8511
8512 (define-public python-idna-ssl
8513 (package
8514 (name "python-idna-ssl")
8515 (version "1.0.1")
8516 (source
8517 (origin
8518 (method url-fetch)
8519 (uri (pypi-uri "idna-ssl" version))
8520 (sha256
8521 (base32
8522 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
8523 (build-system python-build-system)
8524 (arguments
8525 `(#:tests? #f)) ;circular dependency with python-aiohttp
8526 (home-page "https://github.com/aio-libs/idna-ssl")
8527 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
8528 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
8529 domains support.")
8530 (license license:expat)))
8531
8532 (define-public python-pretend
8533 (package
8534 (name "python-pretend")
8535 (version "1.0.9")
8536 (source
8537 (origin
8538 (method url-fetch)
8539 (uri (pypi-uri "pretend" version))
8540 (sha256
8541 (base32
8542 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
8543 (build-system python-build-system)
8544 (home-page "https://github.com/alex/pretend")
8545 (synopsis "Library for stubbing in Python")
8546 (description
8547 "Pretend is a library to make stubbing with Python easier. Stubbing is a
8548 technique for writing tests. You may hear the term mixed up with mocks,
8549 fakes, or doubles. Basically, a stub is an object that returns pre-canned
8550 responses, rather than doing any computation.")
8551 (license license:bsd-3)))
8552
8553 (define-public python2-pretend
8554 (package-with-python2 python-pretend))
8555
8556 (define-public python-pip
8557 (package
8558 (name "python-pip")
8559 (version "20.0.2")
8560 (source
8561 (origin
8562 (method url-fetch)
8563 (uri (pypi-uri "pip" version))
8564 (sha256
8565 (base32
8566 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
8567 (build-system python-build-system)
8568 (arguments
8569 '(#:tests? #f)) ; there are no tests in the pypi archive.
8570 (home-page "https://pip.pypa.io/")
8571 (synopsis "Package manager for Python software")
8572 (description
8573 "Pip is a package manager for Python software, that finds packages on the
8574 Python Package Index (PyPI).")
8575 (license license:expat)))
8576
8577 (define-public python2-pip
8578 (package-with-python2 python-pip))
8579
8580 (define-public python-tlsh
8581 (package
8582 (name "python-tlsh")
8583 (version "3.4.5")
8584 (home-page "https://github.com/trendmicro/tlsh")
8585 (source
8586 (origin
8587 (method git-fetch)
8588 (uri (git-reference
8589 (url "https://github.com/trendmicro/tlsh.git")
8590 (commit (string-append "v" version))))
8591 (file-name (git-file-name name version))
8592 (sha256
8593 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
8594 (build-system cmake-build-system)
8595 (arguments
8596 '(#:out-of-source? #f
8597 #:phases (modify-phases %standard-phases
8598 (replace
8599 'install
8600 (lambda* (#:key outputs #:allow-other-keys)
8601 ;; Build and install the Python bindings. The underlying
8602 ;; C++ library is apparently not meant to be installed.
8603 (let ((out (assoc-ref outputs "out")))
8604 (with-directory-excursion "py_ext"
8605 (and (system* "python" "setup.py" "build")
8606 (system* "python" "setup.py" "install"
8607 (string-append "--prefix=" out))))))))))
8608 (inputs `(("python" ,python-wrapper))) ;for the bindings
8609 (synopsis "Fuzzy matching library for Python")
8610 (description
8611 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8612 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8613 value which can be used for similarity comparisons. Similar objects have
8614 similar hash values, which allows for the detection of similar objects by
8615 comparing their hash values. The byte stream should have a sufficient amount
8616 of complexity; for example, a byte stream of identical bytes will not generate
8617 a hash value.")
8618 (license license:asl2.0)))
8619
8620 (define-public python2-tlsh
8621 (package
8622 (inherit python-tlsh)
8623 (name "python2-tlsh")
8624 (inputs `(("python" ,python-2)))))
8625
8626 (define-public python-termcolor
8627 (package
8628 (name "python-termcolor")
8629 (version "1.1.0")
8630 (source
8631 (origin
8632 (method url-fetch)
8633 (uri (pypi-uri "termcolor" version))
8634 (sha256
8635 (base32
8636 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8637 (build-system python-build-system)
8638 (arguments
8639 ;; There are no tests.
8640 `(#:tests? #f))
8641 (home-page "https://pypi.org/project/termcolor/")
8642 (synopsis "ANSII Color formatting for terminal output")
8643 (description
8644 "This package provides ANSII Color formatting for output in terminals.")
8645 (license license:expat)))
8646
8647 (define-public python2-termcolor
8648 (package-with-python2 python-termcolor))
8649
8650 (define-public python-libarchive-c
8651 (package
8652 (name "python-libarchive-c")
8653 (version "2.9")
8654 (source (origin
8655 (method url-fetch)
8656 (uri (pypi-uri "libarchive-c" version))
8657 (sha256
8658 (base32
8659 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
8660 (build-system python-build-system)
8661 (arguments
8662 '(#:phases (modify-phases %standard-phases
8663 (add-before
8664 'build 'reference-libarchive
8665 (lambda* (#:key inputs #:allow-other-keys)
8666 ;; Retain the absolute file name of libarchive.so.
8667 (let ((libarchive (assoc-ref inputs "libarchive")))
8668 (substitute* "libarchive/ffi.py"
8669 (("find_library\\('archive'\\)")
8670 (string-append "'" libarchive
8671 "/lib/libarchive.so'"))))))
8672 (replace 'check
8673 (lambda _ (invoke "pytest" "-vv"))))))
8674 (native-inputs
8675 `(("python-mock" ,python-mock)
8676 ("python-pytest" ,python-pytest)))
8677 (inputs
8678 `(("libarchive" ,libarchive)))
8679 (home-page "https://github.com/Changaco/python-libarchive-c")
8680 (synopsis "Python interface to libarchive")
8681 (description
8682 "This package provides Python bindings to libarchive, a C library to
8683 access possibly compressed archives in many different formats. It uses
8684 Python's @code{ctypes} foreign function interface (FFI).")
8685 (license license:lgpl2.0+)))
8686
8687 (define-public python2-libarchive-c
8688 (package-with-python2 python-libarchive-c))
8689
8690 (define-public python-file
8691 (package
8692 (inherit file)
8693 (name "python-file")
8694 (build-system python-build-system)
8695 (arguments
8696 '(#:tests? #f ;no tests
8697 #:configure-flags '("--single-version-externally-managed" "--root=/")
8698 #:phases (modify-phases %standard-phases
8699 (add-before 'build 'change-directory
8700 (lambda _
8701 (chdir "python")
8702 #t))
8703 (add-before 'build 'set-library-file-name
8704 (lambda* (#:key inputs #:allow-other-keys)
8705 (let ((file (assoc-ref inputs "file")))
8706 (substitute* "magic.py"
8707 (("find_library\\('magic'\\)")
8708 (string-append "'" file "/lib/libmagic.so'")))
8709 #t))))))
8710 (inputs `(("file" ,file)))
8711 (native-inputs (if (%current-target-system)
8712 `(("self" ,this-package))
8713 '()))
8714 (synopsis "Python bindings to the libmagic file type guesser. Note that
8715 this module and the python-magic module both provide a \"magic.py\" file;
8716 these two modules, which are different and were developed separately, both
8717 serve the same purpose: provide Python bindings for libmagic.")))
8718
8719 (define-public python2-file
8720 (package-with-python2 python-file))
8721
8722 (define-public python-debian
8723 (package
8724 (name "python-debian")
8725 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
8726 (version "0.1.36")
8727 (source
8728 (origin
8729 ;; Use git-fetch, as pypi doesn't include test suite.
8730 (method git-fetch)
8731 (uri (git-reference
8732 (url home-page)
8733 (commit version)))
8734 (file-name (git-file-name name version))
8735 (sha256
8736 (base32
8737 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
8738 (build-system python-build-system)
8739 (arguments
8740 `(#:phases (modify-phases %standard-phases
8741 (add-after 'unpack 'remove-debian-specific-tests
8742 ;; python-apt, apt and dpkg are not yet available in guix,
8743 ;; and these tests heavily depend on them.
8744 (lambda _
8745 (delete-file "lib/debian/tests/test_deb822.py")
8746 (delete-file "lib/debian/tests/test_debfile.py")
8747 #t)))))
8748 (propagated-inputs
8749 `(("python-six" ,python-six)
8750 ("python-chardet" ,python-chardet)))
8751 (synopsis "Debian package related modules")
8752 (description
8753 ;; XXX: Use @enumerate instead of @itemize to work around
8754 ;; <http://bugs.gnu.org/21772>.
8755 "This package provides Python modules that abstract many formats of
8756 Debian-related files, such as:
8757
8758 @enumerate
8759 @item Debtags information;
8760 @item @file{debian/changelog} files;
8761 @item packages files, pdiffs;
8762 @item control files of single or multiple RFC822-style paragraphs---e.g.
8763 @file{debian/control}, @file{.changes}, @file{.dsc};
8764 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8765 contained files and meta-information.
8766 @end enumerate\n")
8767
8768 ;; Modules are either GPLv2+ or GPLv3+.
8769 (license license:gpl3+)))
8770
8771 (define-public python-nbformat
8772 (package
8773 (name "python-nbformat")
8774 (version "4.4.0")
8775 (source
8776 (origin
8777 (method url-fetch)
8778 (uri (pypi-uri "nbformat" version))
8779 (sha256
8780 (base32
8781 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8782 (build-system python-build-system)
8783 (arguments `(#:tests? #f)) ; no test target
8784 (propagated-inputs
8785 `(("python-ipython-genutils" ,python-ipython-genutils)
8786 ("python-jsonschema" ,python-jsonschema)
8787 ("python-jupyter-core" ,python-jupyter-core)
8788 ("python-traitlets" ,python-traitlets)))
8789 (home-page "http://jupyter.org")
8790 (synopsis "Jupyter Notebook format")
8791 (description "This package provides the reference implementation of the
8792 Jupyter Notebook format and Python APIs for working with notebooks.")
8793 (license license:bsd-3)))
8794
8795 (define-public python2-nbformat
8796 (package-with-python2 python-nbformat))
8797
8798 (define-public python-bleach
8799 (package
8800 (name "python-bleach")
8801 (version "3.1.3")
8802 (source
8803 (origin
8804 (method url-fetch)
8805 (uri (pypi-uri "bleach" version))
8806 (sha256
8807 (base32
8808 "0al437aw4p2xp83az5hhlrp913nsf0cg6kg4qj3fjhv4wakxipzq"))))
8809 (build-system python-build-system)
8810 (propagated-inputs
8811 `(("python-webencodings" ,python-webencodings)
8812 ("python-six" ,python-six)))
8813 (native-inputs
8814 `(("python-datrie" ,python-datrie)
8815 ("python-genshi" ,python-genshi)
8816 ("python-lxml" ,python-lxml)
8817 ("python-pytest" ,python-pytest)))
8818 (home-page "https://github.com/mozilla/bleach")
8819 (synopsis "Whitelist-based HTML-sanitizing tool")
8820 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8821 (license license:asl2.0)))
8822
8823 (define-public python2-bleach
8824 (package-with-python2 python-bleach))
8825
8826 (define-public python-entrypoints
8827 (package
8828 (name "python-entrypoints")
8829 (version "0.3")
8830 (source
8831 (origin
8832 (method url-fetch)
8833 (uri (pypi-uri "entrypoints" version))
8834 (sha256
8835 (base32
8836 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
8837 (build-system python-build-system)
8838 ;; The package does not come with a setup.py file, so we have to generate
8839 ;; one ourselves.
8840 (arguments
8841 `(#:tests? #f
8842 #:phases
8843 (modify-phases %standard-phases
8844 (add-after 'unpack 'create-setup.py
8845 (lambda _
8846 (call-with-output-file "setup.py"
8847 (lambda (port)
8848 (format port "\
8849 from setuptools import setup
8850 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8851 " ,version))))))))
8852 (home-page "https://github.com/takluyver/entrypoints")
8853 (synopsis "Discover and load entry points from installed Python packages")
8854 (description "Entry points are a way for Python packages to advertise
8855 objects with some common interface. The most common examples are
8856 @code{console_scripts} entry points, which define shell commands by
8857 identifying a Python function to run. The @code{entrypoints} module contains
8858 functions to find and load entry points.")
8859 (license license:expat)))
8860
8861 (define-public python2-entrypoints
8862 (package-with-python2 python-entrypoints))
8863
8864 (define-public python-epc
8865 (package
8866 (name "python-epc")
8867 (version "0.0.5")
8868 (source
8869 (origin
8870 (method url-fetch)
8871 (uri (pypi-uri "epc" version))
8872 (sha256
8873 (base32
8874 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
8875 (build-system python-build-system)
8876 (propagated-inputs
8877 `(("python-sexpdata" ,python-sexpdata)))
8878 (native-inputs
8879 `(("python-nose" ,python-nose)))
8880 (home-page "https://github.com/tkf/python-epc")
8881 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
8882 (description
8883 "Python-EPC can call elisp functions from Python and Python functions
8884 from elisp.")
8885 (license license:gpl3)))
8886
8887 (define-public python-nbconvert
8888 (package
8889 (name "python-nbconvert")
8890 (version "5.0.0b1")
8891 (source
8892 (origin
8893 (method url-fetch)
8894 (uri (pypi-uri "nbconvert" version))
8895 (sha256
8896 (base32
8897 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8898 (build-system python-build-system)
8899 (arguments
8900 `(;; The "bdist_egg" target is disabled by default, causing the installation
8901 ;; to fail.
8902 #:configure-flags (list "bdist_egg")
8903 ;; FIXME: 5 failures, 40 errors.
8904 #:tests? #f))
8905 ;; #:phases
8906 ;; (modify-phases %standard-phases
8907 ;; (replace 'check
8908 ;; (lambda _
8909 ;; (zero? (system* "py.test" "-v")))))
8910 (native-inputs
8911 `(("python-pytest" ,python-pytest)))
8912 (propagated-inputs
8913 `(("python-bleach" ,python-bleach)
8914 ("python-entrypoints" ,python-entrypoints)
8915 ("python-jinja2" ,python-jinja2)
8916 ("python-jupyter-core" ,python-jupyter-core)
8917 ("python-mistune" ,python-mistune)
8918 ("python-nbformat" ,python-nbformat)
8919 ("python-pygments" ,python-pygments)
8920 ("python-traitlets" ,python-traitlets)))
8921 (home-page "http://jupyter.org")
8922 (synopsis "Converting Jupyter Notebooks")
8923 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8924 notebooks to various other formats via Jinja templates. It allows you to
8925 convert an @code{.ipynb} notebook file into various static formats including:
8926
8927 @enumerate
8928 @item HTML
8929 @item LaTeX
8930 @item PDF
8931 @item Reveal JS
8932 @item Markdown (md)
8933 @item ReStructured Text (rst)
8934 @item executable script
8935 @end enumerate\n")
8936 (license license:bsd-3)))
8937
8938 (define-public python2-nbconvert
8939 (package-with-python2 python-nbconvert))
8940
8941 (define-public python-notebook
8942 (package
8943 (name "python-notebook")
8944 (version "5.7.4")
8945 (source (origin
8946 (method url-fetch)
8947 (uri (pypi-uri "notebook" version))
8948 (sha256
8949 (base32
8950 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8951 (build-system python-build-system)
8952 (arguments
8953 `(#:phases
8954 (modify-phases %standard-phases
8955 (replace 'check
8956 (lambda _
8957 ;; These tests require a browser
8958 (delete-file-recursively "notebook/tests/selenium")
8959 ;; Some tests need HOME
8960 (setenv "HOME" "/tmp")
8961 ;; This file contains "warningfilters", which are not supported
8962 ;; by this version of nose.
8963 (delete-file "setup.cfg")
8964 (with-directory-excursion "/tmp"
8965 (invoke "nosetests" "-v"))
8966 #t)))))
8967 (propagated-inputs
8968 `(("python-jupyter-core" ,python-jupyter-core)
8969 ("python-nbformat" ,python-nbformat)
8970 ("python-nbconvert" ,python-nbconvert)
8971 ("python-prometheus-client" ,python-prometheus-client)
8972 ("python-send2trash" ,python-send2trash)
8973 ("python-terminado" ,python-terminado)))
8974 (native-inputs
8975 `(("python-nose" ,python-nose)
8976 ("python-sphinx" ,python-sphinx)
8977 ("python-requests" ,python-requests)))
8978 (home-page "http://jupyter.org/")
8979 (synopsis "Web-based notebook environment for interactive computing")
8980 (description
8981 "The Jupyter HTML notebook is a web-based notebook environment for
8982 interactive computing.")
8983 (properties `((python2-variant . ,(delay python2-notebook))))
8984 (license license:bsd-3)))
8985
8986 (define-public python2-notebook
8987 (let ((base (package-with-python2
8988 (strip-python2-variant python-notebook))))
8989 (package (inherit base)
8990 (native-inputs
8991 `(("python2-mock" ,python2-mock)
8992 ,@(package-native-inputs base)))
8993 (arguments
8994 (substitute-keyword-arguments (package-arguments base)
8995 ((#:phases phases)
8996 `(modify-phases ,phases
8997 (add-before 'check 'disable-test-case
8998 ;; The test requires network access to localhost. Curiously it
8999 ;; fails with Python 2 only. Simply make the test-case return
9000 ;; immediately.
9001 (lambda _
9002 (substitute*
9003 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9004 (("formats = self.nbconvert_api") "return #")))))))))))
9005
9006 (define-public python-widgetsnbextension
9007 (package
9008 (name "python-widgetsnbextension")
9009 (version "3.5.1")
9010 (source
9011 (origin
9012 (method url-fetch)
9013 (uri (pypi-uri "widgetsnbextension" version))
9014 (sha256
9015 (base32
9016 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9017 (build-system python-build-system)
9018 (propagated-inputs
9019 `(("python-ipykernel"
9020 ,(prompt-toolkit-2-instead-of-prompt-toolkit python-ipykernel))
9021 ("python-notebook" ,python-notebook)))
9022 (native-inputs
9023 `(("python-certifi" ,python-certifi)
9024 ("python-nose" ,python-nose)))
9025 (home-page "https://ipython.org")
9026 (synopsis "IPython HTML widgets for Jupyter")
9027 (description "This package provides interactive HTML widgets for Jupyter
9028 notebooks.")
9029 (license license:bsd-3)))
9030
9031 (define-public python2-widgetsnbextension
9032 (package-with-python2 python-widgetsnbextension))
9033
9034 (define-public python-ipywidgets
9035 (package
9036 (name "python-ipywidgets")
9037 (version "7.5.1")
9038 (source
9039 (origin
9040 (method url-fetch)
9041 (uri (pypi-uri "ipywidgets" version))
9042 (sha256
9043 (base32
9044 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
9045 (build-system python-build-system)
9046 (propagated-inputs
9047 `(("python-ipython" ,(prompt-toolkit-2-instead-of-prompt-toolkit
9048 python-ipython))
9049 ("python-traitlets" ,python-traitlets)
9050 ("python-widgetsnbextension" ,python-widgetsnbextension)))
9051 (native-inputs
9052 `(("python-nose" ,python-nose)
9053 ("python-pytest" ,python-pytest)))
9054 (home-page "https://ipython.org")
9055 (synopsis "IPython HTML widgets for Jupyter")
9056 (description "Ipywidgets are interactive HTML widgets for Jupyter
9057 notebooks and the IPython kernel. Notebooks come alive when interactive
9058 widgets are used. Users gain control of their data and can visualize changes
9059 in the data.")
9060 (license license:bsd-3)))
9061
9062 (define-public python2-ipywidgets
9063 (package-with-python2 python-ipywidgets))
9064
9065 (define-public python-jupyter-console
9066 (package
9067 (name "python-jupyter-console")
9068 (version "6.1.0")
9069 (source
9070 (origin
9071 (method url-fetch)
9072 (uri (pypi-uri "jupyter_console" version))
9073 (sha256
9074 (base32
9075 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
9076 (build-system python-build-system)
9077 (propagated-inputs
9078 `(("python-ipykernel" ,(prompt-toolkit-2-instead-of-prompt-toolkit
9079 python-ipykernel))
9080 ("python-jupyter-client" ,python-jupyter-client)
9081 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
9082 ("python-pygments" ,python-pygments)))
9083 (native-inputs
9084 `(("python-nose" ,python-nose)))
9085 (home-page "https://jupyter.org")
9086 (synopsis "Jupyter terminal console")
9087 (description "This package provides a terminal-based console frontend for
9088 Jupyter kernels. It also allows for console-based interaction with non-Python
9089 Jupyter kernels such as IJulia and IRKernel.")
9090 (properties `((python2-variant . ,(delay python2-jupyter-console))))
9091 (license license:bsd-3)))
9092
9093 (define-public python2-jupyter-console
9094 (package
9095 (name "python2-jupyter-console")
9096 (version "5.2.0")
9097 (source
9098 (origin
9099 (method url-fetch)
9100 (uri (pypi-uri "jupyter_console" version))
9101 (sha256
9102 (base32
9103 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
9104 (build-system python-build-system)
9105 (arguments
9106 `(#:python ,python-2
9107 #:tests? #f)) ; Tests only run in a TTY.
9108 (propagated-inputs
9109 `(("python2-ipykernel" ,python2-ipykernel)
9110 ("python2-jupyter-client" ,python2-jupyter-client)
9111 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
9112 ("python2-pygments" ,python2-pygments)))
9113 (native-inputs
9114 `(("python2-nose" ,python2-nose)))
9115 (home-page "https://jupyter.org")
9116 (synopsis "Jupyter terminal console")
9117 (description "This package provides a terminal-based console frontend for
9118 Jupyter kernels. It also allows for console-based interaction with non-Python
9119 Jupyter kernels such as IJulia and IRKernel.")
9120 (license license:bsd-3)))
9121
9122 ;; The python-ipython and python-jupyter-console require each other. To get
9123 ;; the functionality in both packages working, strip down the
9124 ;; python-jupyter-console package when using it as an input to python-ipython.
9125 (define python-jupyter-console-minimal
9126 (package
9127 (inherit python-jupyter-console)
9128 (name "python-jupyter-console-minimal")
9129 (arguments
9130 (substitute-keyword-arguments
9131 (package-arguments python-jupyter-console)
9132 ((#:phases phases)
9133 `(modify-phases ,phases
9134 (add-after 'install 'delete-bin
9135 (lambda* (#:key outputs #:allow-other-keys)
9136 ;; Delete the bin files, to avoid conflicts in profiles
9137 ;; where python-ipython and python-jupyter-console are
9138 ;; both present.
9139 (delete-file-recursively
9140 (string-append
9141 (assoc-ref outputs "out") "/bin"))))))))
9142 ;; Remove the python-ipython propagated input, to avoid the cycle
9143 (propagated-inputs
9144 (alist-delete
9145 "python-ipython"
9146 (package-propagated-inputs python-jupyter-console)))))
9147
9148 (define-public python-qtconsole
9149 (package
9150 (name "python-qtconsole")
9151 (version "4.4.3")
9152 (source
9153 (origin
9154 (method url-fetch)
9155 (uri (pypi-uri "qtconsole" version))
9156 (sha256
9157 (base32
9158 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
9159 (build-system python-build-system)
9160 (arguments
9161 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
9162 ;; but we only have the LTS version 5.x. This means that there might be
9163 ;; runtime errors, but since this is a dependency of the Jupyter package,
9164 ;; and Jupyter can be used without the qtconsole we can overlook this for
9165 ;; now.
9166 `(#:tests? #f
9167 #:phases
9168 (modify-phases %standard-phases
9169 (add-before 'check 'pre-check
9170 (lambda _
9171 (setenv "QT_QPA_PLATFORM" "offscreen")
9172 #t)))))
9173 (propagated-inputs
9174 `(("python-ipykernel" ,python-ipykernel)
9175 ("python-ipython" ,python-ipython)))
9176 (native-inputs
9177 `(("python-pytest" ,python-pytest)))
9178 (home-page "http://jupyter.org")
9179 (synopsis "Jupyter Qt console")
9180 (description "This package provides a Qt-based console for Jupyter with
9181 support for rich media output.")
9182 (license license:bsd-3)))
9183
9184 (define-public python-jsbeautifier
9185 (package
9186 (name "python-jsbeautifier")
9187 (version "1.10.2")
9188 (home-page "https://github.com/beautify-web/js-beautify")
9189 (source (origin
9190 (method git-fetch)
9191 (uri (git-reference
9192 (url home-page)
9193 (commit (string-append "v" version))))
9194 (file-name (git-file-name name version))
9195 (sha256
9196 (base32
9197 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
9198 (build-system python-build-system)
9199 (arguments
9200 `(#:phases (modify-phases %standard-phases
9201 (add-after 'unpack 'chdir
9202 (lambda _
9203 ;; The upstream Git repository contains all the code,
9204 ;; but this package only builds the python code.
9205 (chdir "python")
9206 #t))
9207 (add-after 'unpack 'patch-python-six-requirements
9208 (lambda _
9209 (substitute* "python/setup.py"
9210 (("six>=1.12.0")
9211 "six>=1.11.0"))
9212 #t)))))
9213 (propagated-inputs
9214 `(("python-editorconfig" ,python-editorconfig)
9215 ("python-six" ,python-six)))
9216 (native-inputs
9217 `(("python-pytest" ,python-pytest)))
9218 (synopsis "JavaScript unobfuscator and beautifier")
9219 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
9220 popular online obfuscators.")
9221 (license license:expat)))
9222
9223 (define-public jupyter
9224 (package
9225 (name "jupyter")
9226 (version "1.0.0")
9227 (source
9228 (origin
9229 (method url-fetch)
9230 (uri (pypi-uri "jupyter" version))
9231 (sha256
9232 (base32
9233 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
9234 (build-system python-build-system)
9235 (arguments '(#:tests? #f)) ; there are none.
9236 (propagated-inputs
9237 `(("python-ipykernel" ,python-ipykernel)
9238 ("python-ipywidgets" ,python-ipywidgets)
9239 ("python-jupyter-console" ,python-jupyter-console)
9240 ("python-nbconvert" ,python-nbconvert)
9241 ("python-notebook" ,python-notebook)
9242 ("python-qtconsole" ,python-qtconsole)))
9243 (native-search-paths
9244 (list (search-path-specification
9245 (variable "JUPYTER_PATH")
9246 (files '("share/jupyter")))))
9247 (home-page "https://jupyter.org")
9248 (synopsis "Web application for interactive documents")
9249 (description
9250 "The Jupyter Notebook is a web application that allows you to create and
9251 share documents that contain live code, equations, visualizations and
9252 explanatory text. Uses include: data cleaning and transformation, numerical
9253 simulation, statistical modeling, machine learning and much more.")
9254 (license license:bsd-3)))
9255
9256 (define-public python-chardet
9257 (package
9258 (name "python-chardet")
9259 (version "3.0.4")
9260 (source
9261 (origin
9262 (method url-fetch)
9263 (uri (pypi-uri "chardet" version))
9264 (sha256
9265 (base32
9266 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
9267 (native-inputs
9268 `(("python-hypothesis" ,python-hypothesis)
9269 ("python-pytest" ,python-pytest)
9270 ("python-pytest-runner" ,python-pytest-runner)))
9271 (build-system python-build-system)
9272 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
9273 (arguments `(#:tests? #f))
9274 (home-page "https://github.com/chardet/chardet")
9275 (synopsis "Universal encoding detector for Python 2 and 3")
9276 (description
9277 "This package provides @code{chardet}, a Python module that can
9278 automatically detect a wide range of file encodings.")
9279 (license license:lgpl2.1+)))
9280
9281 (define-public python2-chardet
9282 (package-with-python2 python-chardet))
9283
9284 (define-public python-docopt
9285 (package
9286 (name "python-docopt")
9287 (version "0.6.2")
9288 (source
9289 (origin
9290 (method git-fetch)
9291 ;; The release on PyPI does not include tests.
9292 (uri (git-reference
9293 (url "https://github.com/docopt/docopt")
9294 (commit version)))
9295 (file-name (git-file-name name version))
9296 (sha256
9297 (base32
9298 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
9299 (build-system python-build-system)
9300 (native-inputs
9301 `(("python-pytest" ,python-pytest)))
9302 (arguments
9303 `(#:phases
9304 (modify-phases %standard-phases
9305 (replace 'check
9306 (lambda _ (invoke "py.test"))))))
9307 (home-page "http://docopt.org")
9308 (synopsis "Command-line interface description language for Python")
9309 (description "This library allows the user to define a command-line
9310 interface from a program's help message rather than specifying it
9311 programmatically with command-line parsers like @code{getopt} and
9312 @code{argparse}.")
9313 (license license:expat)))
9314
9315 (define-public python2-docopt
9316 (package-with-python2 python-docopt))
9317
9318 (define-public python-pythondialog
9319 (package
9320 (name "python-pythondialog")
9321 (version "3.4.0")
9322 (source
9323 (origin
9324 (method url-fetch)
9325 (uri (pypi-uri "pythondialog" version))
9326 (sha256
9327 (base32
9328 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
9329 (build-system python-build-system)
9330 (arguments
9331 `(#:phases
9332 (modify-phases %standard-phases
9333 (add-after 'unpack 'patch-path
9334 (lambda* (#:key inputs #:allow-other-keys)
9335 (let* ((dialog (assoc-ref inputs "dialog")))
9336 ;; Since this library really wants to grovel the search path, we
9337 ;; must hardcode dialog's store path into it.
9338 (substitute* "dialog.py"
9339 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
9340 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
9341 #t))))
9342 #:tests? #f)) ; no test suite
9343 (propagated-inputs
9344 `(("dialog" ,dialog)))
9345 (home-page "http://pythondialog.sourceforge.net/")
9346 (synopsis "Python interface to the UNIX dialog utility")
9347 (description "A Python wrapper for the dialog utility. Its purpose is to
9348 provide an easy to use, pythonic and comprehensive Python interface to dialog.
9349 This allows one to make simple text-mode user interfaces on Unix-like systems")
9350 (license license:lgpl2.1)
9351 (properties `((python2-variant . ,(delay python2-pythondialog))))))
9352
9353 (define-public python2-pythondialog
9354 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
9355 (package
9356 (inherit base)
9357 (version (package-version python-pythondialog))
9358 (source (origin
9359 (method url-fetch)
9360 (uri (pypi-uri "python2-pythondialog" version))
9361 (sha256
9362 (base32
9363 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
9364
9365 (define-public python-configobj
9366 (package
9367 (name "python-configobj")
9368 (version "5.0.6")
9369 (source (origin
9370 (method url-fetch)
9371 (uri (pypi-uri "configobj" version))
9372 (sha256
9373 (base32
9374 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9375 ;; Patch setup.py so it looks for python-setuptools, which is
9376 ;; required to parse the keyword 'install_requires' in setup.py.
9377 (patches (search-patches "python-configobj-setuptools.patch"))))
9378 (build-system python-build-system)
9379 (propagated-inputs
9380 `(("python-six" ,python-six)))
9381 (synopsis "Config file reading, writing and validation")
9382 (description "ConfigObj is a simple but powerful config file reader and
9383 writer: an ini file round tripper. Its main feature is that it is very easy to
9384 use, with a straightforward programmer’s interface and a simple syntax for
9385 config files.")
9386 (home-page "https://github.com/DiffSK/configobj")
9387 (license license:bsd-3)))
9388
9389 (define-public python2-configobj
9390 (package-with-python2 python-configobj))
9391
9392 (define-public python-configargparse
9393 (package
9394 (name "python-configargparse")
9395 (version "0.14.0")
9396 (source (origin
9397 (method url-fetch)
9398 (uri (pypi-uri "ConfigArgParse" version))
9399 (sha256
9400 (base32
9401 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
9402 (build-system python-build-system)
9403 (native-inputs
9404 `(("python-pyyaml" ,python-pyyaml)))
9405 (arguments
9406 `(#:phases
9407 (modify-phases %standard-phases
9408 (replace 'check
9409 (lambda _
9410 ;; Bypass setuptools-shim because one test relies on "setup.py"
9411 ;; being the first argument passed to the python call.
9412 ;;
9413 ;; NOTE: Many tests do not run because they rely on Python's
9414 ;; built-in test.test_argparse, but we remove the unit tests from
9415 ;; our Python installation.
9416 (invoke "python" "setup.py" "test"))))))
9417 (synopsis "Replacement for argparse")
9418 (description "A drop-in replacement for argparse that allows options to also
9419 be set via config files and/or environment variables.")
9420 (home-page "https://github.com/bw2/ConfigArgParse")
9421 (license license:expat)))
9422
9423 (define-public python2-configargparse
9424 (package-with-python2 python-configargparse))
9425
9426 (define-public python-argparse-manpage
9427 (package
9428 (name "python-argparse-manpage")
9429 (version "1.1")
9430 (source
9431 (origin
9432 (method url-fetch)
9433 (uri (pypi-uri "argparse-manpage" version))
9434 (sha256
9435 (base32
9436 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
9437 (build-system python-build-system)
9438 (home-page "https://github.com/praiskup/argparse-manpage")
9439 (synopsis "Build manual page from Python's ArgumentParser object")
9440 (description
9441 "This package provides tools to build manual pages from Python's
9442 @code{ArgumentParser} object.")
9443 (license license:asl2.0)))
9444
9445 (define-public python-contextlib2
9446 (package
9447 (name "python-contextlib2")
9448 (version "0.6.0.post1")
9449 (source
9450 (origin
9451 (method url-fetch)
9452 (uri (pypi-uri "contextlib2" version))
9453 (sha256
9454 (base32
9455 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
9456 (build-system python-build-system)
9457 (home-page "https://contextlib2.readthedocs.org/")
9458 (synopsis "Tools for decorators and context managers")
9459 (description "This module is primarily a backport of the Python
9460 3.2 contextlib to earlier Python versions. Like contextlib, it
9461 provides utilities for common tasks involving decorators and context
9462 managers. It also contains additional features that are not part of
9463 the standard library.")
9464 (properties `((python2-variant . ,(delay python2-contextlib2))))
9465 (license license:psfl)))
9466
9467 (define-public python2-contextlib2
9468 (let ((base (package-with-python2
9469 (strip-python2-variant python-contextlib2))))
9470 (package
9471 (inherit base)
9472 (arguments
9473 (substitute-keyword-arguments (package-arguments base)
9474 ((#:phases phases)
9475 `(modify-phases ,phases
9476 (replace 'check
9477 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
9478 (native-inputs
9479 `(("python2-unittest2" ,python2-unittest2))))))
9480
9481 ;; This package is used by python2-pytest via python2-importlib-metadata,
9482 ;; and thus can not depend on python-unittest2 (which depends on pytest).
9483 (define-public python2-contextlib2-bootstrap
9484 (hidden-package
9485 (package/inherit
9486 python2-contextlib2
9487 (name "python2-contextlib2-bootstrap")
9488 (arguments
9489 `(#:tests? #f
9490 ,@(package-arguments python2-contextlib2)))
9491 (native-inputs '()))))
9492
9493 (define-public python-texttable
9494 (package
9495 (name "python-texttable")
9496 (version "1.6.2")
9497 (source
9498 (origin
9499 (method url-fetch)
9500 (uri (pypi-uri "texttable" version))
9501 (sha256
9502 (base32
9503 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
9504 (build-system python-build-system)
9505 (arguments
9506 `(#:phases
9507 (modify-phases %standard-phases
9508 (replace 'check
9509 (lambda _ (invoke "pytest" "tests.py"))))))
9510 (native-inputs
9511 `(("python-pytest" ,python-pytest)))
9512 (home-page "https://github.com/foutaise/texttable/")
9513 (synopsis "Python module for creating simple ASCII tables")
9514 (description "Texttable is a Python module for creating simple ASCII
9515 tables.")
9516 (license license:expat)))
9517
9518 (define-public python2-texttable
9519 (package-with-python2 python-texttable))
9520
9521 (define-public python-atomicwrites
9522 (package
9523 (name "python-atomicwrites")
9524 (version "1.3.0")
9525 (source (origin
9526 (method url-fetch)
9527 (uri (pypi-uri "atomicwrites" version))
9528 (sha256
9529 (base32
9530 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
9531 (build-system python-build-system)
9532 (synopsis "Atomic file writes in Python")
9533 (description "Library for atomic file writes using platform dependent tools
9534 for atomic file system operations.")
9535 (home-page "https://github.com/untitaker/python-atomicwrites")
9536 (license license:expat)))
9537
9538 (define-public python2-atomicwrites
9539 (package-with-python2 python-atomicwrites))
9540
9541 (define-public python-click-threading
9542 (package
9543 (name "python-click-threading")
9544 (version "0.4.4")
9545 (source (origin
9546 (method url-fetch)
9547 (uri (pypi-uri "click-threading" version))
9548 (sha256
9549 (base32
9550 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
9551 (build-system python-build-system)
9552 (propagated-inputs
9553 `(("python-click" ,python-click)))
9554 (synopsis "Utilities for multithreading in Click")
9555 (description "This package provides utilities for multithreading in Click
9556 applications.")
9557 (home-page "https://github.com/click-contrib/click-threading")
9558 (license license:expat)))
9559
9560 (define-public python-click-log
9561 (package
9562 (name "python-click-log")
9563 (version "0.3.2")
9564 (source (origin
9565 (method url-fetch)
9566 (uri (pypi-uri "click-log" version))
9567 (sha256
9568 (base32
9569 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
9570 (build-system python-build-system)
9571 (propagated-inputs
9572 `(("python-click" ,python-click)))
9573 (synopsis "Logging for click applications")
9574 (description "This package provides a Python library for logging Click
9575 applications.")
9576 (home-page "https://github.com/click-contrib/click-log")
9577 (license license:expat)))
9578
9579 (define-public python-apipkg
9580 (package
9581 (name "python-apipkg")
9582 (version "1.5")
9583 (source (origin
9584 (method url-fetch)
9585 (uri (pypi-uri "apipkg" version))
9586 (sha256
9587 (base32
9588 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
9589 (build-system python-build-system)
9590 (native-inputs
9591 `(("python-pytest" ,python-pytest)
9592 ("python-setuptools-scm" ,python-setuptools-scm)))
9593 (synopsis "Namespace control and lazy-import mechanism")
9594 (description "With apipkg you can control the exported namespace of a Python
9595 package and greatly reduce the number of imports for your users. It is a small
9596 pure Python module that works on virtually all Python versions.")
9597 (home-page "https://github.com/pytest-dev/apipkg")
9598 (license license:expat)))
9599
9600 (define-public python-execnet
9601 (package
9602 (name "python-execnet")
9603 (version "1.4.1")
9604 (source (origin
9605 (method url-fetch)
9606 (uri (pypi-uri "execnet" version))
9607 (sha256
9608 (base32
9609 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9610 (build-system python-build-system)
9611 (arguments
9612 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9613 ;; The two test failures are caused by the lack of an `ssh` executable.
9614 ;; The test suite can be run with pytest after the 'install' phase.
9615 #:tests? #f))
9616 (native-inputs
9617 `(("python-pytest" ,python-pytest)
9618 ("python-setuptools-scm" ,python-setuptools-scm)))
9619 (propagated-inputs
9620 `(("python-apipkg" ,python-apipkg)))
9621 (synopsis "Rapid multi-Python deployment")
9622 (description "Execnet provides a share-nothing model with
9623 channel-send/receive communication for distributing execution across many
9624 Python interpreters across version, platform and network barriers. It has a
9625 minimal and fast API targeting the following uses:
9626 @enumerate
9627 @item distribute tasks to (many) local or remote CPUs
9628 @item write and deploy hybrid multi-process applications
9629 @item write scripts to administer multiple environments
9630 @end enumerate")
9631 (home-page "https://codespeak.net/execnet/")
9632 (license license:expat)))
9633
9634 (define-public python2-execnet
9635 (package-with-python2 python-execnet))
9636
9637 (define-public python-icalendar
9638 (package
9639 (name "python-icalendar")
9640 (version "4.0.5")
9641 (source (origin
9642 (method url-fetch)
9643 (uri (pypi-uri "icalendar" version))
9644 (sha256
9645 (base32
9646 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
9647 (build-system python-build-system)
9648 (propagated-inputs
9649 `(("python-dateutil" ,python-dateutil)
9650 ("python-pytz" ,python-pytz)))
9651 (synopsis "Python library for parsing iCalendar files")
9652 (description "The icalendar package is a parser/generator of iCalendar
9653 files for use with Python.")
9654 (home-page "https://github.com/collective/icalendar")
9655 (license license:bsd-2)))
9656
9657 (define-public python-args
9658 (package
9659 (name "python-args")
9660 (version "0.1.0")
9661 (source (origin
9662 (method url-fetch)
9663 (uri (pypi-uri "args" version))
9664 (sha256
9665 (base32
9666 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9667 (build-system python-build-system)
9668 (home-page "https://github.com/kennethreitz/args")
9669 (synopsis "Command-line argument parser")
9670 (description
9671 "This library provides a Python module to parse command-line arguments.")
9672 (license license:bsd-3)))
9673
9674 (define-public python2-args
9675 (package-with-python2 python-args))
9676
9677 (define-public python-clint
9678 (package
9679 (name "python-clint")
9680 (version "0.5.1")
9681 (source (origin
9682 (method url-fetch)
9683 (uri (pypi-uri "clint" version))
9684 (sha256
9685 (base32
9686 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9687 (build-system python-build-system)
9688 (arguments
9689 '(#:phases
9690 (modify-phases %standard-phases
9691 (replace 'check
9692 (lambda _ (invoke "py.test" "-v"))))))
9693 (native-inputs
9694 `(("python-pytest" ,python-pytest)))
9695 (propagated-inputs
9696 `(("python-args" ,python-args)))
9697 (home-page "https://github.com/kennethreitz/clint")
9698 (synopsis "Command-line interface tools")
9699 (description
9700 "Clint is a Python module filled with a set of tools for developing
9701 command-line applications, including tools for colored and indented
9702 output, progress bar display, and pipes.")
9703 (license license:isc)))
9704
9705 (define-public python2-clint
9706 (package-with-python2 python-clint))
9707
9708 (define-public python-rply
9709 (package
9710 (name "python-rply")
9711 (version "0.7.5")
9712 (source (origin
9713 (method url-fetch)
9714 (uri (pypi-uri "rply" version))
9715 (sha256
9716 (base32
9717 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9718 (build-system python-build-system)
9719 (propagated-inputs
9720 `(("python-appdirs" ,python-appdirs)))
9721 (home-page "https://github.com/alex/rply")
9722 (synopsis "Parser generator for Python")
9723 (description
9724 "This package provides a pure Python based parser generator, that also
9725 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9726 with a new public API, and RPython support.")
9727 (license license:bsd-3)))
9728
9729 (define-public python2-rply
9730 (package-with-python2 python-rply))
9731
9732 (define-public python-hy
9733 (package
9734 (name "python-hy")
9735 (version "0.18.0")
9736 (source (origin
9737 (method url-fetch)
9738 (uri (pypi-uri "hy" version))
9739 (sha256
9740 (base32
9741 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
9742 (build-system python-build-system)
9743 (arguments
9744 '(#:phases
9745 (modify-phases %standard-phases
9746 (add-before 'install 'set-HOME
9747 (lambda _
9748 (setenv "HOME" "/tmp") #t))
9749 (replace 'check
9750 (lambda _
9751 ;; Tests require write access to HOME.
9752 (setenv "HOME" "/tmp")
9753 (invoke "nosetests"))))))
9754 (native-inputs
9755 `(("python-coverage" ,python-coverage)
9756 ("python-nose" ,python-nose)))
9757 (propagated-inputs
9758 `(("python-astor" ,python-astor)
9759 ("python-colorama" ,python-colorama)
9760 ("python-rply" ,python-rply)
9761 ("python-funcparserlib"
9762 ,python-funcparserlib)))
9763 (home-page "http://hylang.org/")
9764 (synopsis "Lisp frontend to Python")
9765 (description
9766 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9767 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9768 Python at your fingertips, in Lisp form.")
9769 (license license:expat)))
9770
9771 (define-public python2-functools32
9772 (package
9773 (name "python2-functools32")
9774 (version "3.2.3-2")
9775 (source
9776 (origin
9777 (method url-fetch)
9778 (uri (pypi-uri "functools32" version))
9779 (sha256
9780 (base32
9781 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9782 (build-system python-build-system)
9783 (arguments
9784 `(#:python ,python-2
9785 #:tests? #f)) ; no test target
9786 (home-page "https://github.com/MiCHiLU/python-functools32")
9787 (synopsis
9788 "Backport of the functools module from Python 3.2.3")
9789 (description
9790 "This package is a backport of the @code{functools} module from Python
9791 3.2.3 for use with older versions of Python and PyPy.")
9792 (license license:expat)))
9793
9794 (define-public python2-subprocess32
9795 (package
9796 (name "python2-subprocess32")
9797 (version "3.2.7")
9798 (source (origin
9799 (method url-fetch)
9800 (uri (pypi-uri "subprocess32" version))
9801 (sha256
9802 (base32
9803 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9804 (patches
9805 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9806 (build-system python-build-system)
9807 (arguments
9808 `(#:python ,python-2
9809 ;; The test suite fails with Python > 2.7.13:
9810 ;; import test.support
9811 ;; ImportError: No module named support
9812 #:tests? #f
9813 #:phases
9814 (modify-phases %standard-phases
9815 (add-after 'unpack 'patch-/bin/sh
9816 (lambda _
9817 (substitute* '("subprocess32.py"
9818 "test_subprocess32.py")
9819 (("/bin/sh") (which "sh")))
9820 #t)))))
9821 (home-page "https://github.com/google/python-subprocess32")
9822 (synopsis "Backport of the subprocess module from Python 3.2")
9823 (description
9824 "This is a backport of the @code{subprocess} standard library module
9825 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9826 new features. On POSIX systems it is guaranteed to be reliable when used
9827 in threaded applications. It includes timeout support from Python 3.3 but
9828 otherwise matches 3.2’s API.")
9829 (license license:psfl)))
9830
9831 (define-public python2-futures
9832 (package
9833 (name "python2-futures")
9834 (version "3.2.0")
9835 (source
9836 (origin
9837 (method url-fetch)
9838 (uri (pypi-uri "futures" version))
9839 (sha256
9840 (base32
9841 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9842 (build-system python-build-system)
9843 (arguments
9844 `(#:python ,python-2
9845 #:phases
9846 (modify-phases %standard-phases
9847 (replace 'check
9848 (lambda _
9849 (invoke "python" "test_futures.py")
9850 #t)))))
9851 (home-page "https://github.com/agronholm/pythonfutures")
9852 (synopsis
9853 "Backport of the concurrent.futures package from Python 3.2")
9854 (description
9855 "The concurrent.futures module provides a high-level interface for
9856 asynchronously executing callables. This package backports the
9857 concurrent.futures package from Python 3.2")
9858 (license license:bsd-3)))
9859
9860 (define-public python-promise
9861 (package
9862 (name "python-promise")
9863 (version "0.4.2")
9864 (source
9865 (origin
9866 (method url-fetch)
9867 (uri (pypi-uri "promise" version))
9868 (sha256
9869 (base32
9870 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9871 (build-system python-build-system)
9872 ;; Tests wants python-futures, which is a python2 only program, and
9873 ;; can't be found by python-promise at test time.
9874 (arguments `(#:tests? #f))
9875 (home-page "https://github.com/syrusakbary/promise")
9876 (synopsis "Promises/A+ implementation for Python")
9877 (description
9878 "Promises/A+ implementation for Python")
9879 (properties `((python2-variant . ,(delay python2-promise))))
9880 (license license:expat)))
9881
9882 (define-public python2-promise
9883 (let ((promise (package-with-python2
9884 (strip-python2-variant python-promise))))
9885 (package (inherit promise)
9886 (arguments (substitute-keyword-arguments (package-arguments promise)
9887 ((#:tests? _) #t)))
9888 (native-inputs
9889 `(("python2-futures" ,python2-futures)
9890 ("python2-pytest" ,python2-pytest)
9891 ,@(package-native-inputs promise))))))
9892
9893 (define-public python-progressbar33
9894 (package
9895 (name "python-progressbar33")
9896 (version "2.4")
9897 (source
9898 (origin
9899 (method url-fetch)
9900 (uri (pypi-uri "progressbar33" version))
9901 (sha256
9902 (base32
9903 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
9904 (build-system python-build-system)
9905 (home-page "http://github.com/germangh/python-progressbar")
9906 (synopsis "Text progress bar library for Python")
9907 (description
9908 "This package provides a text progress bar library for Python. This
9909 version only differs from the original @code{progressbar} package in that it
9910 uses relative package imports instead of absolute imports, which is necessary
9911 for the module to work under Python 3.3.")
9912 ;; Either or both of these licenses may be selected.
9913 (license (list license:lgpl2.1+ license:bsd-3))))
9914
9915 (define-public python-colorama
9916 (package
9917 (name "python-colorama")
9918 (version "0.4.3")
9919 (source
9920 (origin
9921 (method url-fetch)
9922 (uri (pypi-uri "colorama" version))
9923 (sha256
9924 (base32
9925 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
9926 (build-system python-build-system)
9927 (synopsis "Colored terminal text rendering for Python")
9928 (description "Colorama is a Python library for rendering colored terminal
9929 text.")
9930 (home-page "https://pypi.org/project/colorama/")
9931 (license license:bsd-3)))
9932
9933 (define-public python2-colorama
9934 (package-with-python2 python-colorama))
9935
9936 (define-public python-rsa
9937 (package
9938 (name "python-rsa")
9939 (version "3.4.2")
9940 (source
9941 (origin
9942 (method url-fetch)
9943 (uri (pypi-uri "rsa" version))
9944 (sha256
9945 (base32
9946 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9947 (build-system python-build-system)
9948 (propagated-inputs
9949 `(("python-pyasn1" ,python-pyasn1)))
9950 (synopsis "Pure-Python RSA implementation")
9951 (description "Python-RSA is a pure-Python RSA implementation. It supports
9952 encryption and decryption, signing and verifying signatures, and key
9953 generation according to PKCS#1 version 1.5. It can be used as a Python
9954 library as well as on the command line.")
9955 (home-page "https://stuvel.eu/rsa")
9956 (license license:asl2.0)))
9957
9958 (define-public python2-rsa
9959 (package-with-python2 python-rsa))
9960
9961 (define-public python-pluggy
9962 (package
9963 (name "python-pluggy")
9964 (version "0.13.1")
9965 (source
9966 (origin
9967 (method url-fetch)
9968 (uri (pypi-uri "pluggy" version))
9969 (sha256
9970 (base32
9971 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
9972 (build-system python-build-system)
9973 (native-inputs
9974 `(("python-setuptools-scm" ,python-setuptools-scm)))
9975 (synopsis "Plugin and hook calling mechanism for Python")
9976 (description "Pluggy is an extraction of the plugin manager as used by
9977 Pytest but stripped of Pytest specific details.")
9978 (home-page "https://pypi.org/project/pluggy/")
9979 (properties `((python2-variant . ,(delay python2-pluggy))))
9980 (license license:expat)))
9981
9982 (define-public python2-pluggy
9983 (let ((base (package-with-python2 (strip-python2-variant
9984 python-pluggy))))
9985 (package/inherit
9986 base
9987 (propagated-inputs
9988 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
9989
9990 ;; This package requires python2-importlib-metadata, but that package
9991 ;; ends up needing python2-pluggy via python2-pytest, so we need this
9992 ;; variant to solve the circular dependency.
9993 (define-public python2-pluggy-bootstrap
9994 (hidden-package
9995 (package/inherit
9996 python2-pluggy
9997 (name "python2-pluggy-bootstrap")
9998 (arguments
9999 `(#:tests? #f
10000 ,@(package-arguments python2-pluggy)))
10001 (propagated-inputs
10002 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10003
10004 (define-public python-tox
10005 (package
10006 (name "python-tox")
10007 (version "2.8.1")
10008 (source
10009 (origin
10010 (method url-fetch)
10011 (uri (pypi-uri "tox" version))
10012 (sha256
10013 (base32
10014 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
10015 (build-system python-build-system)
10016 (arguments
10017 ;; FIXME: Tests require pytest-timeout, which itself requires
10018 ;; pytest>=2.8.0 for installation.
10019 '(#:tests? #f))
10020 (propagated-inputs
10021 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
10022 ("python-py" ,python-py)
10023 ("python-virtualenv" ,python-virtualenv)))
10024 (native-inputs
10025 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
10026 ("python-pytest" ,python-pytest) ; >= 2.3.5
10027 ("python-setuptools-scm" ,python-setuptools-scm)))
10028 (home-page "https://tox.readthedocs.io")
10029 (synopsis "Virtualenv-based automation of test activities")
10030 (description "Tox is a generic virtualenv management and test command line
10031 tool. It can be used to check that a package installs correctly with
10032 different Python versions and interpreters, or run tests in each type of
10033 supported environment, or act as a frontend to continuous integration
10034 servers.")
10035 (license license:expat)))
10036
10037 (define-public python2-tox
10038 (package-with-python2 python-tox))
10039
10040 (define-public python-jmespath
10041 (package
10042 (name "python-jmespath")
10043 (version "0.9.4")
10044 (source
10045 (origin
10046 (method url-fetch)
10047 (uri (pypi-uri "jmespath" version))
10048 (sha256
10049 (base32
10050 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
10051 (build-system python-build-system)
10052 (native-inputs
10053 `(("python-nose" ,python-nose)))
10054 (synopsis "JSON Matching Expressions")
10055 (description "JMESPath (pronounced “james path”) is a Python library that
10056 allows one to declaratively specify how to extract elements from a JSON
10057 document.")
10058 (home-page "https://github.com/jmespath/jmespath.py")
10059 (license license:expat)))
10060
10061 (define-public python2-jmespath
10062 (package-with-python2 python-jmespath))
10063
10064 (define-public python-botocore
10065 (package
10066 (name "python-botocore")
10067 (version "1.15.26")
10068 (source
10069 (origin
10070 (method url-fetch)
10071 (uri (pypi-uri "botocore" version))
10072 (sha256
10073 (base32
10074 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
10075 (build-system python-build-system)
10076 (arguments
10077 ;; FIXME: Many tests are failing.
10078 '(#:tests? #f))
10079 (propagated-inputs
10080 `(("python-dateutil" ,python-dateutil)
10081 ("python-docutils" ,python-docutils)
10082 ("python-jmespath" ,python-jmespath)))
10083 (native-inputs
10084 `(("python-mock" ,python-mock)
10085 ("python-nose" ,python-nose)
10086 ("behave" ,behave)
10087 ("python-tox" ,python-tox)
10088 ("python-urllib3" ,python-urllib3)
10089 ("python-wheel" ,python-wheel)))
10090 (home-page "https://github.com/boto/botocore")
10091 (synopsis "Low-level interface to AWS")
10092 (description "Botocore is a Python library that provides a low-level
10093 interface to the Amazon Web Services (AWS) API.")
10094 (license license:asl2.0)))
10095
10096 (define-public python2-botocore
10097 (package-with-python2 python-botocore))
10098
10099 (define-public python-xdo
10100 (package
10101 (name "python-xdo")
10102 (version "0.3")
10103 (source (origin
10104 (method url-fetch)
10105 (uri (string-append
10106 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10107 "python-xdo_" version ".orig.tar.gz"))
10108 (sha256
10109 (base32
10110 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
10111 (build-system python-build-system)
10112 (arguments
10113 '(#:phases
10114 (modify-phases %standard-phases
10115 (add-before 'install 'patch-libxdo-path
10116 ;; Hardcode the path of dynamically loaded libxdo library.
10117 (lambda* (#:key inputs #:allow-other-keys)
10118 (let ((libxdo (string-append
10119 (assoc-ref inputs "xdotool")
10120 "/lib/libxdo.so")))
10121 (substitute* "xdo/_xdo.py"
10122 (("find_library\\(\"xdo\"\\)")
10123 (simple-format #f "\"~a\"" libxdo)))
10124 #t))))
10125 #:tests? #f)) ; no tests provided
10126 (propagated-inputs
10127 `(("python-six" ,python-six)))
10128 (inputs
10129 `(("xdotool" ,xdotool)
10130 ("libX11" ,libx11)))
10131 (home-page "https://tracker.debian.org/pkg/python-xdo")
10132 (synopsis "Python library for simulating X11 keyboard/mouse input")
10133 (description "Provides bindings to libxdo for manipulating X11 via simulated
10134 input. (Note that this is mostly a legacy library; you may wish to look at
10135 python-xdo for newer bindings.)")
10136 (license license:bsd-3)))
10137
10138 (define-public python2-xdo
10139 (package-with-python2 python-xdo))
10140
10141 (define-public python-mako
10142 (package
10143 (name "python-mako")
10144 (version "1.1.1")
10145 (source
10146 (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "Mako" version))
10149 (sha256
10150 (base32
10151 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
10152 (build-system python-build-system)
10153 (arguments
10154 `(#:phases (modify-phases %standard-phases
10155 (replace 'check
10156 (lambda* (#:key tests? #:allow-other-keys)
10157 (if tests?
10158 (invoke "nosetests" "-v")
10159 (format #t "test suite not run~%"))
10160 #t)))))
10161 (propagated-inputs
10162 `(("python-markupsafe" ,python-markupsafe)))
10163 (native-inputs
10164 `(("python-mock" ,python-mock)
10165 ("python-nose" ,python-nose)))
10166 (home-page "https://www.makotemplates.org/")
10167 (synopsis "Templating language for Python")
10168 (description "Mako is a templating language for Python that compiles
10169 templates into Python modules.")
10170 (license license:expat)))
10171
10172 (define-public python2-mako
10173 (package-with-python2 python-mako))
10174
10175 (define-public python-waitress
10176 (package
10177 (name "python-waitress")
10178 (version "1.1.0")
10179 (source
10180 (origin
10181 (method url-fetch)
10182 (uri (pypi-uri "waitress" version))
10183 (patches (search-patches "python-waitress-fix-tests.patch"))
10184 (sha256
10185 (base32
10186 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
10187 (build-system python-build-system)
10188 (home-page "https://github.com/Pylons/waitress")
10189 (synopsis "Waitress WSGI server")
10190 (description "Waitress is meant to be a production-quality pure-Python WSGI
10191 server with very acceptable performance.")
10192 (license license:zpl2.1)))
10193
10194 (define-public python2-waitress
10195 (package-with-python2 python-waitress))
10196
10197 (define-public python-whichcraft
10198 (package
10199 (name "python-whichcraft")
10200 (version "0.6.1")
10201 (source
10202 (origin
10203 (method url-fetch)
10204 (uri (pypi-uri "whichcraft" version))
10205 (sha256
10206 (base32
10207 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
10208 (build-system python-build-system)
10209 (native-inputs
10210 `(("python-pytest" ,python-pytest)))
10211 (home-page "https://github.com/pydanny/whichcraft")
10212 (synopsis "Cross-platform cross-python shutil.which functionality")
10213 (description
10214 "This package provides a shim of the shutil.which function that's
10215 designed to work across multiple versions of Python.")
10216 (license license:bsd-3)))
10217
10218 (define-public python-cookiecutter
10219 (package
10220 (name "python-cookiecutter")
10221 (version "1.6.0")
10222 (source
10223 (origin
10224 (method url-fetch)
10225 (uri (pypi-uri "cookiecutter" version))
10226 (sha256
10227 (base32
10228 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
10229 (build-system python-build-system)
10230 (native-inputs
10231 `(("python-freezegun" ,python-freezegun)
10232 ("python-pytest" ,python-pytest)
10233 ("python-pytest-catchlog" ,python-pytest-catchlog)
10234 ("python-pytest-cov" ,python-pytest-cov)
10235 ("python-pytest-mock" ,python-pytest-mock)))
10236 (propagated-inputs
10237 `(("python-binaryornot" ,python-binaryornot)
10238 ("python-click" ,python-click)
10239 ("python-future" ,python-future)
10240 ("python-jinja2" ,python-jinja2)
10241 ("python-jinja2-time" ,python-jinja2-time)
10242 ("python-poyo" ,python-poyo)
10243 ("python-requests" ,python-requests)
10244 ("python-whichcraft" ,python-whichcraft)))
10245 (home-page "https://github.com/audreyr/cookiecutter")
10246 (synopsis
10247 "Command-line utility that creates projects from project templates")
10248 (description
10249 "This package provides a command-line utility that creates projects from
10250 project templates, e.g. creating a Python package project from a Python package
10251 project template.")
10252 (license license:bsd-3)))
10253
10254 (define-public python-pyquery
10255 (package
10256 (name "python-pyquery")
10257 (version "1.2.17")
10258 (source
10259 (origin
10260 (method url-fetch)
10261 (uri (pypi-uri "pyquery" version))
10262 (sha256
10263 (base32
10264 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10265 (build-system python-build-system)
10266 (native-inputs
10267 `(("python-webob" ,python-webob)
10268 ("python-webtest" ,python-webtest)))
10269 (propagated-inputs
10270 `(("python-lxml" ,python-lxml)
10271 ("python-cssselect" ,python-cssselect)))
10272 (home-page "https://github.com/gawel/pyquery")
10273 (synopsis "Make jQuery-like queries on xml documents")
10274 (description "pyquery allows you to make jQuery queries on xml documents.
10275 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10276 fast xml and html manipulation.")
10277 (license license:bsd-3)))
10278
10279 (define-public python-anyjson
10280 (package
10281 (name "python-anyjson")
10282 (version "0.3.3")
10283 (source
10284 (origin
10285 (method url-fetch)
10286 (uri (pypi-uri "anyjson" version))
10287 (sha256
10288 (base32
10289 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10290 (build-system python-build-system)
10291 (arguments
10292 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10293 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10294 ;; whatever) so this transformation needs to be done before the tests
10295 ;; can be run. Maybe we could add a build step to transform beforehand
10296 ;; but it could be annoying/difficult.
10297 ;; We can enable tests for the Python 2 version, though, and do below.
10298 #:tests? #f))
10299 (home-page "https://bitbucket.org/runeh/anyjson/")
10300 (synopsis
10301 "Wraps best available JSON implementation in a common interface")
10302 (description
10303 "Anyjson loads whichever is the fastest JSON module installed
10304 and provides a uniform API regardless of which JSON implementation is used.")
10305 (license license:bsd-3)
10306 (properties `((python2-variant . ,(delay python2-anyjson))))))
10307
10308 (define-public python2-anyjson
10309 (let ((anyjson (package-with-python2
10310 (strip-python2-variant python-anyjson))))
10311 (package
10312 (inherit anyjson)
10313 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10314 #:tests? #t
10315 ,@(package-arguments anyjson)))
10316 (native-inputs `(("python2-nose" ,python2-nose))))))
10317
10318 (define-public python-amqp
10319 (package
10320 (name "python-amqp")
10321 (version "2.3.2")
10322 (source
10323 (origin
10324 (method url-fetch)
10325 (uri (pypi-uri "amqp" version))
10326 (sha256
10327 (base32
10328 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
10329 (build-system python-build-system)
10330 (native-inputs
10331 `(("python-case" ,python-case)
10332 ("python-pytest-sugar" ,python-pytest-sugar)
10333 ("python-mock" ,python-mock)))
10334 (propagated-inputs
10335 `(("python-vine" ,python-vine)))
10336 (home-page "https://github.com/celery/py-amqp")
10337 (synopsis
10338 "Low-level AMQP client for Python (fork of amqplib)")
10339 (description
10340 "This is a fork of amqplib which was originally written by Barry Pederson.
10341 It is maintained by the Celery project, and used by kombu as a pure python
10342 alternative when librabbitmq is not available.")
10343 (license license:lgpl2.1+)
10344 (properties `((python2-variant . ,(delay python2-amqp))))))
10345
10346 (define-public python2-amqp
10347 (let ((amqp (package-with-python2
10348 (strip-python2-variant python-amqp))))
10349 (package
10350 (inherit amqp)
10351 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10352 ;; unmaintained. Weirdly, does not do this on the python 3
10353 ;; version?
10354 #:tests? #f
10355 ,@(package-arguments amqp))))))
10356
10357 (define-public python-txamqp
10358 (package
10359 (name "python-txamqp")
10360 (version "0.8.2")
10361 (source
10362 (origin
10363 (method url-fetch)
10364 (uri (pypi-uri "txAMQP" version))
10365 (sha256
10366 (base32
10367 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
10368 (build-system python-build-system)
10369 (propagated-inputs
10370 `(("python-six" ,python-six)
10371 ("python-twisted" ,python-twisted)))
10372 (home-page "https://github.com/txamqp/txamqp")
10373 (synopsis "Communicate with AMQP peers and brokers using Twisted")
10374 (description
10375 "This package provides a Python library for communicating with AMQP peers
10376 and brokers using the asynchronous networking framework Twisted. It contains
10377 all the necessary code to connect, send and receive messages to/from an
10378 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
10379 also includes support for using Thrift RPC over AMQP in Twisted
10380 applications.")
10381 (license license:asl2.0)))
10382
10383 (define-public python2-txamqp
10384 (package-with-python2 python-txamqp))
10385
10386 (define-public python-kombu
10387 (package
10388 (name "python-kombu")
10389 (version "4.2.2")
10390 (source
10391 (origin
10392 (method url-fetch)
10393 (uri (pypi-uri "kombu" version))
10394 (sha256
10395 (base32
10396 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
10397 (build-system python-build-system)
10398 (native-inputs
10399 `(("python-mock" ,python-mock)
10400 ("python-case" ,python-case)
10401 ("python-pyro4" ,python-pyro4)
10402 ("python-pytest-sugar" ,python-pytest-sugar)
10403 ("python-pytz" ,python-pytz)))
10404 (propagated-inputs
10405 `(("python-anyjson" ,python-anyjson)
10406 ("python-amqp" ,python-amqp)
10407 ("python-redis" ,python-redis)))
10408 (home-page "https://kombu.readthedocs.io")
10409 (synopsis "Message passing library for Python")
10410 (description "The aim of Kombu is to make messaging in Python as easy as
10411 possible by providing an idiomatic high-level interface for the AMQ protocol,
10412 and also provide proven and tested solutions to common messaging problems.
10413 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10414 message orientation, queuing, routing, reliability and security, for which the
10415 RabbitMQ messaging server is the most popular implementation.")
10416 (license license:bsd-3)
10417 (properties `((python2-variant . ,(delay python2-kombu))))))
10418
10419 (define-public python2-kombu
10420 (let ((kombu (package-with-python2
10421 (strip-python2-variant python-kombu))))
10422 (package
10423 (inherit kombu)
10424 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10425 ;; It works fine on the python3 variant.
10426 #:tests? #f
10427 ,@(package-arguments kombu)))
10428 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10429 ,@(package-native-inputs kombu))))))
10430
10431 (define-public python-billiard
10432 (package
10433 (name "python-billiard")
10434 (version "3.5.0.5")
10435 (source
10436 (origin
10437 (method url-fetch)
10438 (uri (pypi-uri "billiard" version))
10439 (sha256
10440 (base32
10441 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
10442 (build-system python-build-system)
10443 (native-inputs
10444 `(("python-case" ,python-case)
10445 ("python-pytest" ,python-pytest)))
10446 (home-page "https://github.com/celery/billiard")
10447 (synopsis
10448 "Python multiprocessing fork with improvements and bugfixes")
10449 (description
10450 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10451 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10452 pyprocessing package. This standalone variant is intended to be compatible with
10453 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10454 (license license:bsd-3)
10455 (properties `((python2-variant . ,(delay python2-billiard))))))
10456
10457 (define-public python2-billiard
10458 (let ((billiard (package-with-python2
10459 (strip-python2-variant python-billiard))))
10460 (package
10461 (inherit billiard)
10462 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10463 ("python2-mock" ,python2-mock)
10464 ,@(package-native-inputs billiard))))))
10465
10466 (define-public python-celery
10467 (package
10468 (name "python-celery")
10469 (version "4.2.1")
10470 (source
10471 (origin
10472 (method url-fetch)
10473 (uri (pypi-uri "celery" version))
10474 (sha256
10475 (base32
10476 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
10477 (build-system python-build-system)
10478 (arguments
10479 '(;; TODO The tests fail with Python 3.7
10480 ;; https://github.com/celery/celery/issues/4849
10481 #:tests? #f
10482 #:phases
10483 (modify-phases %standard-phases
10484 (add-after 'unpack 'patch-requirements
10485 (lambda _
10486 (substitute* "requirements/test.txt"
10487 (("pytest>=3\\.0,<3\\.3")
10488 "pytest>=3.0"))
10489 #t)))))
10490 (native-inputs
10491 `(("python-case" ,python-case)
10492 ("python-pytest" ,python-pytest)))
10493 (propagated-inputs
10494 `(("python-pytz" ,python-pytz)
10495 ("python-billiard" ,python-billiard)
10496 ("python-kombu" ,python-kombu)))
10497 (home-page "https://celeryproject.org")
10498 (synopsis "Distributed Task Queue")
10499 (description "Celery is an asynchronous task queue/job queue based on
10500 distributed message passing. It is focused on real-time operation, but
10501 supports scheduling as well. The execution units, called tasks, are executed
10502 concurrently on a single or more worker servers using multiprocessing,
10503 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10504 synchronously (wait until ready).")
10505 (license license:bsd-3)
10506 (properties `((python2-variant . ,(delay python2-celery))))))
10507
10508 (define-public python2-celery
10509 (let ((celery (package-with-python2
10510 (strip-python2-variant python-celery))))
10511 (package
10512 (inherit celery)
10513 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10514 ("python2-mock" ,python2-mock)
10515 ,@(package-native-inputs celery))))))
10516
10517 (define-public python-translitcodec
10518 (package
10519 (name "python-translitcodec")
10520 (version "0.4.0")
10521 (source
10522 (origin
10523 (method url-fetch)
10524 (uri (pypi-uri "translitcodec" version))
10525 (sha256
10526 (base32
10527 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10528 (build-system python-build-system)
10529 (arguments
10530 `(#:tests? #f)) ; no tests provided
10531 (home-page
10532 "https://github.com/claudep/translitcodec")
10533 (synopsis
10534 "Unicode to 8-bit charset transliteration codec")
10535 (description
10536 "This package contains codecs for transliterating ISO 10646 texts into
10537 best-effort representations using smaller coded character sets (ASCII,
10538 ISO 8859, etc.).")
10539 (license license:expat)))
10540
10541 (define-public python2-translitcodec
10542 (package-with-python2 python-translitcodec))
10543
10544 (define-public python-editor
10545 (package
10546 (name "python-editor")
10547 (version "1.0.4")
10548 (source
10549 (origin
10550 (method url-fetch)
10551 (uri (pypi-uri "python-editor" version))
10552 (sha256
10553 (base32
10554 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
10555 (build-system python-build-system)
10556 (arguments
10557 '(#:tests? #f)) ;XXX: needs a TTY and an editor
10558 (home-page "https://github.com/fmoo/python-editor")
10559 (synopsis "Programmatically open an editor, capture the result")
10560 (description
10561 "python-editor is a library that provides the editor module for
10562 programmatically interfacing with your system's $EDITOR.")
10563 (license license:asl2.0)))
10564
10565 (define-public python2-editor
10566 (package-with-python2 python-editor))
10567
10568 (define-public python-vobject
10569 (package
10570 (name "python-vobject")
10571 (version "0.9.6.1")
10572 (source (origin
10573 (method url-fetch)
10574 (uri (pypi-uri "vobject" version))
10575 (sha256
10576 (base32
10577 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
10578 (build-system python-build-system)
10579 (arguments
10580 '(;; The test suite relies on some non-portable Windows interfaces.
10581 #:tests? #f))
10582 (propagated-inputs
10583 `(("python-dateutil" ,python-dateutil)
10584 ("python-pyicu" ,python-pyicu)))
10585 (synopsis "Parse and generate vCard and vCalendar files")
10586 (description "Vobject is intended to be a full featured Python package for
10587 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10588 are supported and well tested. vCard 3.0 files are supported, and all data
10589 should be imported, but only a few components are understood in a sophisticated
10590 way.")
10591 (home-page "https://eventable.github.io/vobject/")
10592 (license license:asl2.0)))
10593
10594 (define-public python2-vobject
10595 (package-with-python2 python-vobject))
10596
10597 (define-public python-munkres
10598 (package
10599 (name "python-munkres")
10600 (version "1.0.8")
10601 (source (origin
10602 (method url-fetch)
10603 (uri (pypi-uri "munkres" version))
10604 (sha256
10605 (base32
10606 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10607 (build-system python-build-system)
10608 (arguments
10609 '(#:tests? #f)) ; no test suite
10610 (home-page "https://software.clapper.org/munkres/")
10611 (synopsis "Implementation of the Munkres algorithm")
10612 (description "The Munkres module provides an implementation of the Munkres
10613 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10614 useful for solving the Assignment Problem.")
10615 (license license:bsd-3)))
10616
10617 (define-public python2-munkres
10618 (package-with-python2 python-munkres))
10619
10620 (define-public python-whoosh
10621 (package
10622 (name "python-whoosh")
10623 (version "2.7.4")
10624 (source
10625 (origin
10626 (method url-fetch)
10627 (uri (pypi-uri "Whoosh" version))
10628 (sha256
10629 (base32
10630 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10631 (build-system python-build-system)
10632 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
10633 (native-inputs
10634 `(("python-pytest" ,python-pytest)))
10635 (home-page "https://bitbucket.org/mchaput/whoosh")
10636 (synopsis "Full text indexing, search, and spell checking library")
10637 (description
10638 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10639 checking library.")
10640 (license license:bsd-2)))
10641
10642 (define-public python2-whoosh
10643 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10644 (package (inherit whoosh)
10645 (propagated-inputs
10646 `(("python2-backport-ssl-match-hostname"
10647 ,python2-backport-ssl-match-hostname)
10648 ,@(package-propagated-inputs whoosh))))))
10649
10650 (define-public python-pathlib
10651 (package
10652 (name "python-pathlib")
10653 (version "1.0.1")
10654 (source (origin
10655 (method url-fetch)
10656 (uri (pypi-uri "pathlib" version))
10657 (sha256
10658 (base32
10659 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10660 (build-system python-build-system)
10661 ;; The tests depend on the internal "test" module, which does not provide
10662 ;; a stable interface.
10663 (arguments `(#:tests? #f))
10664 (home-page "https://pathlib.readthedocs.org/")
10665 (synopsis "Object-oriented file system paths")
10666 (description "Pathlib offers a set of classes to handle file system paths.
10667 It offers the following advantages over using string objects:
10668
10669 @enumerate
10670 @item No more cumbersome use of os and os.path functions. Everything can
10671 be done easily through operators, attribute accesses, and method calls.
10672 @item Embodies the semantics of different path types. For example,
10673 comparing Windows paths ignores casing.
10674 @item Well-defined semantics, eliminating any inconsistencies or
10675 ambiguities (forward vs. backward slashes, etc.).
10676 @end enumerate
10677
10678 Note: In Python 3.4, pathlib is now part of the standard library. For other
10679 Python versions please consider python-pathlib2 instead, which tracks the
10680 standard library module. This module (python-pathlib) isn't maintained
10681 anymore.")
10682 (license license:expat)))
10683
10684 (define-public python2-pathlib
10685 (package-with-python2 python-pathlib))
10686
10687 (define-public python2-pathlib2
10688 (package
10689 (name "python2-pathlib2")
10690 (version "2.3.5")
10691 (source (origin
10692 (method url-fetch)
10693 (uri (pypi-uri "pathlib2" version))
10694 (sha256
10695 (base32
10696 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
10697 (build-system python-build-system)
10698 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10699 ;; version is 3.4 which already includes this package as part of the
10700 ;; standard library.
10701 (arguments
10702 `(#:python ,python-2))
10703 (propagated-inputs
10704 `(("python2-scandir" ,python2-scandir)
10705 ("python2-six" ,python2-six)))
10706 (home-page "https://pypi.org/project/pathlib2/")
10707 (synopsis "Object-oriented file system paths - backport of standard
10708 pathlib module")
10709 (description "The goal of pathlib2 is to provide a backport of standard
10710 pathlib module which tracks the standard library module, so all the newest
10711 features of the standard pathlib can be used also on older Python versions.
10712
10713 Pathlib offers a set of classes to handle file system paths. It offers the
10714 following advantages over using string objects:
10715
10716 @enumerate
10717 @item No more cumbersome use of os and os.path functions. Everything can
10718 be done easily through operators, attribute accesses, and method calls.
10719 @item Embodies the semantics of different path types. For example,
10720 comparing Windows paths ignores casing.
10721 @item Well-defined semantics, eliminating any inconsistencies or
10722 ambiguities (forward vs. backward slashes, etc.).
10723 @end enumerate")
10724 (license license:expat)))
10725
10726 (define-public python2-pathlib2-bootstrap
10727 (hidden-package
10728 (package
10729 (inherit python2-pathlib2)
10730 (name "python2-pathlib2-bootstrap")
10731 (propagated-inputs
10732 `(("python2-scandir" ,python2-scandir)
10733 ("python2-six" ,python2-six-bootstrap))))))
10734
10735 (define-public python-jellyfish
10736 (package
10737 (name "python-jellyfish")
10738 (version "0.5.6")
10739 (source (origin
10740 (method url-fetch)
10741 (uri (pypi-uri "jellyfish" version))
10742 (sha256
10743 (base32
10744 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10745 (build-system python-build-system)
10746 (native-inputs
10747 `(("python-pytest" ,python-pytest)))
10748 (home-page "https://github.com/jamesturk/jellyfish")
10749 (synopsis "Approximate and phonetic matching of strings")
10750 (description "Jellyfish uses a variety of string comparison and phonetic
10751 encoding algorithms to do fuzzy string matching.")
10752 (license license:bsd-2)
10753 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10754
10755 (define-public python2-jellyfish
10756 (let ((jellyfish (package-with-python2
10757 (strip-python2-variant python-jellyfish))))
10758 (package (inherit jellyfish)
10759 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10760 ,@(package-native-inputs jellyfish))))))
10761
10762 (define-public python2-unicodecsv
10763 (package
10764 (name "python2-unicodecsv")
10765 (version "0.14.1")
10766 (source (origin
10767 (method git-fetch)
10768 ;; The test suite is not included in the PyPi release.
10769 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10770 (uri (git-reference
10771 (url "https://github.com/jdunck/python-unicodecsv")
10772 (commit version)))
10773 (file-name (git-file-name name version))
10774 (sha256
10775 (base32
10776 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
10777 (build-system python-build-system)
10778 (arguments
10779 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10780 #:python ,python-2))
10781 (native-inputs
10782 `(("python2-unittest2" ,python2-unittest2)))
10783 (home-page "https://github.com/jdunck/python-unicodecsv")
10784 (synopsis "Unicode CSV module for Python 2")
10785 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10786 module, adding support for Unicode strings.")
10787 (license license:bsd-2)))
10788
10789 (define-public python-rarfile
10790 (package
10791 (name "python-rarfile")
10792 (version "2.8")
10793 (source (origin
10794 (method url-fetch)
10795 (uri (pypi-uri "rarfile" version))
10796 (sha256
10797 (base32
10798 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10799 (build-system python-build-system)
10800 (arguments
10801 '(#:phases
10802 (modify-phases %standard-phases
10803 (replace 'check
10804 ;; Many tests fail, but the installation proceeds.
10805 (lambda _ (invoke "make" "-C" "test" "test"))))))
10806 (native-inputs
10807 `(("which" ,which))) ; required for tests
10808 (propagated-inputs
10809 `(("libarchive" ,libarchive)))
10810 (home-page "https://github.com/markokr/rarfile")
10811 (synopsis "RAR archive reader for Python")
10812 (description "This is Python module for RAR archive reading. The interface
10813 is made as zipfile like as possible.")
10814 (license license:isc)))
10815
10816 (define-public python2-rarfile
10817 (package-with-python2 python-rarfile))
10818
10819 (define-public python-magic
10820 (package
10821 (name "python-magic")
10822 (version "0.4.15")
10823 (source
10824 (origin
10825 (method url-fetch)
10826 (uri (pypi-uri "python-magic" version))
10827 (sha256
10828 (base32
10829 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
10830 (file-name (string-append name "-" version "-checkout"))))
10831 (build-system python-build-system)
10832 (arguments
10833 ;; The tests are unreliable, so don't run them. The tests fail
10834 ;; under Python3 because they were written for Python2 and
10835 ;; contain import statements that do not work in Python3. One of
10836 ;; the tests fails under Python2 because its assertions are
10837 ;; overly stringent; it relies on comparing output strings which
10838 ;; are brittle and can change depending on the version of
10839 ;; libmagic being used and the system on which the test is
10840 ;; running. In my case, under GuixSD 0.10.0, only one test
10841 ;; failed, and it seems to have failed only because the version
10842 ;; of libmagic that is packaged in Guix outputs a slightly
10843 ;; different (but not wrong) string than the one that the test
10844 ;; expected.
10845 '(#:tests? #f
10846 #:phases (modify-phases %standard-phases
10847 ;; Replace a specific method call with a hard-coded
10848 ;; path to the necessary libmagic.so file in the
10849 ;; store. If we don't do this, then the method call
10850 ;; will fail to find the libmagic.so file, which in
10851 ;; turn will cause any application using
10852 ;; python-magic to fail.
10853 (add-before 'build 'hard-code-path-to-libmagic
10854 (lambda* (#:key inputs #:allow-other-keys)
10855 (let ((file (assoc-ref inputs "file")))
10856 (substitute* "magic.py"
10857 (("ctypes.util.find_library\\('magic'\\)")
10858 (string-append "'" file "/lib/libmagic.so'")))
10859 #t)))
10860 (add-before 'install 'disable-egg-compression
10861 (lambda _
10862 (let ((port (open-file "setup.cfg" "a")))
10863 (display "\n[easy_install]\nzip_ok = 0\n"
10864 port)
10865 (close-port port)
10866 #t))))))
10867 (inputs
10868 ;; python-magic needs to be able to find libmagic.so.
10869 `(("file" ,file)))
10870 (home-page
10871 "https://github.com/ahupp/python-magic")
10872 (synopsis
10873 "File type identification using libmagic")
10874 (description
10875 "This module uses ctypes to access the libmagic file type
10876 identification library. It makes use of the local magic database and
10877 supports both textual and MIME-type output. Note that this module and
10878 the python-file module both provide a \"magic.py\" file; these two
10879 modules, which are different and were developed separately, both serve
10880 the same purpose: to provide Python bindings for libmagic.")
10881 (license license:expat)))
10882
10883 (define-public python2-magic
10884 (package-with-python2 python-magic))
10885
10886 (define-public python2-s3cmd
10887 (package
10888 (name "python2-s3cmd")
10889 (version "1.6.1")
10890 (source
10891 (origin
10892 (method url-fetch)
10893 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10894 "s3cmd-" version ".tar.gz"))
10895 (sha256
10896 (base32
10897 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10898 (build-system python-build-system)
10899 (arguments
10900 ;; s3cmd is written for python2 only and contains no tests.
10901 `(#:python ,python-2
10902 #:tests? #f))
10903 (propagated-inputs
10904 `(("python2-dateutil" ,python2-dateutil)
10905 ;; The python-file package also provides a magic.py module.
10906 ;; This is an unfortunate state of affairs; however, s3cmd
10907 ;; fails to install if it cannot find specifically the
10908 ;; python-magic package. Thus we include it, instead of using
10909 ;; python-file. Ironically, s3cmd sometimes works better
10910 ;; without libmagic bindings at all:
10911 ;; https://github.com/s3tools/s3cmd/issues/198
10912 ("python2-magic" ,python2-magic)))
10913 (home-page "https://s3tools.org/s3cmd")
10914 (synopsis "Command line tool for S3-compatible storage services")
10915 (description
10916 "S3cmd is a command line tool for uploading, retrieving and managing data
10917 in storage services that are compatible with the Amazon Simple Storage
10918 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10919 GnuPG encryption, and more. It also supports management of Amazon's
10920 CloudFront content delivery network.")
10921 (license license:gpl2+)))
10922
10923 (define-public python-pkgconfig
10924 (package
10925 (name "python-pkgconfig")
10926 (version "1.3.1")
10927 (source
10928 (origin
10929 (method url-fetch)
10930 (uri (pypi-uri "pkgconfig" version))
10931 (sha256
10932 (base32
10933 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10934 (build-system python-build-system)
10935 (native-inputs
10936 `(("python-nose" ,python-nose)))
10937 (inputs
10938 `(("pkg-config" ,pkg-config)))
10939 (arguments
10940 `(#:phases
10941 (modify-phases %standard-phases
10942 (add-before 'build 'patch
10943 ;; Hard-code the path to pkg-config.
10944 (lambda _
10945 (substitute* "pkgconfig/pkgconfig.py"
10946 (("cmd = 'pkg-config")
10947 (string-append "cmd = '" (which "pkg-config"))))
10948 #t))
10949 (replace 'check
10950 (lambda _
10951 (invoke "nosetests" "test.py"))))))
10952 (home-page "https://github.com/matze/pkgconfig")
10953 (synopsis "Python interface for pkg-config")
10954 (description "This module provides a Python interface to pkg-config. It
10955 can be used to find all pkg-config packages, check if a package exists,
10956 check if a package meets certain version requirements, query CFLAGS and
10957 LDFLAGS and parse the output to build extensions with setup.py.")
10958 (license license:expat)))
10959
10960 (define-public python2-pkgconfig
10961 (package-with-python2 python-pkgconfig))
10962
10963 (define-public python-bz2file
10964 (package
10965 (name "python-bz2file")
10966 (version "0.98")
10967 (source
10968 (origin
10969 (method url-fetch)
10970 (uri (pypi-uri "bz2file" version))
10971 (sha256
10972 (base32
10973 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10974 (build-system python-build-system)
10975 (arguments
10976 `(#:tests? #f)) ; Tests use deprecated python modules.
10977 (home-page "https://github.com/nvawda/bz2file")
10978 (synopsis "Read and write bzip2-compressed files")
10979 (description
10980 "Bz2file is a Python library for reading and writing bzip2-compressed
10981 files. It contains a drop-in replacement for the I/O interface in the
10982 standard library's @code{bz2} module, including features from the latest
10983 development version of CPython that are not available in older releases.")
10984 (license license:asl2.0)))
10985
10986 (define-public python2-bz2file
10987 (package-with-python2 python-bz2file))
10988
10989 (define-public python-future
10990 (package
10991 (name "python-future")
10992 (version "0.17.1")
10993 (source
10994 (origin
10995 (method url-fetch)
10996 (uri (pypi-uri "future" version))
10997 (sha256
10998 (base32
10999 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
11000 (build-system python-build-system)
11001 ;; Many tests connect to the network or are otherwise flawed.
11002 ;; https://github.com/PythonCharmers/python-future/issues/210
11003 (arguments
11004 `(#:tests? #f))
11005 (home-page "https://python-future.org")
11006 (synopsis "Single-source support for Python 3 and 2")
11007 (description
11008 "@code{python-future} is the missing compatibility layer between Python 2 and
11009 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11010 to support both Python 2 and Python 3 with minimal overhead.")
11011 (license license:expat)))
11012
11013 (define-public python2-future
11014 (package-with-python2 python-future))
11015
11016 (define-public python-cysignals
11017 (package
11018 (name "python-cysignals")
11019 (version "1.9.0")
11020 (source
11021 (origin
11022 (method url-fetch)
11023 (uri (pypi-uri "cysignals" version))
11024 (sha256
11025 (base32
11026 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
11027 (build-system python-build-system)
11028 (native-inputs
11029 `(("python-cython" ,python-cython)
11030 ("python-sphinx" ,python-sphinx)))
11031 (inputs
11032 `(("pari-gp" ,pari-gp)))
11033 (arguments
11034 `(#:modules ((guix build python-build-system)
11035 ((guix build gnu-build-system) #:prefix gnu:)
11036 (guix build utils))
11037 ;; FIXME: Tests are executed after installation and currently fail
11038 ;; when not installing into standard locations; the author is working
11039 ;; on a fix.
11040 #:tests? #f
11041 #:phases
11042 (modify-phases %standard-phases
11043 (add-before
11044 'build 'configure
11045 (assoc-ref gnu:%standard-phases 'configure)))))
11046 (home-page
11047 "https://github.com/sagemath/cysignals")
11048 (synopsis
11049 "Handling of interrupts and signals for Cython")
11050 (description
11051 "The cysignals package provides mechanisms to handle interrupts (and
11052 other signals and errors) in Cython code, using two related approaches,
11053 for mixed Cython/Python code or external C libraries and pure Cython code,
11054 respectively.")
11055 (license license:lgpl3+)))
11056
11057 (define-public python2-cysignals
11058 (package-with-python2 python-cysignals))
11059
11060 (define-public python2-shedskin
11061 (package
11062 (name "python2-shedskin")
11063 (version "0.9.4")
11064 (source
11065 (origin
11066 (method url-fetch)
11067 (uri (string-append "https://github.com/shedskin/shedskin/"
11068 "releases/download/v" version
11069 "/shedskin-" version ".tgz"))
11070 (sha256
11071 (base32
11072 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11073 (build-system python-build-system)
11074 (arguments
11075 `(#:python ,python-2
11076 #:phases (modify-phases %standard-phases
11077 (add-after 'unpack 'fix-resulting-include-libs
11078 (lambda* (#:key inputs #:allow-other-keys)
11079 (let ((libgc (assoc-ref inputs "libgc"))
11080 (pcre (assoc-ref inputs "pcre")))
11081 (substitute* "shedskin/makefile.py"
11082 (("variable == 'CCFLAGS':[ ]*")
11083 (string-append "variable == 'CCFLAGS':\n"
11084 " line += ' -I " pcre "/include"
11085 " -I " libgc "/include'"))
11086 (("variable == 'LFLAGS':[ ]*")
11087 (string-append "variable == 'LFLAGS':\n"
11088 " line += ' -L" pcre "/lib"
11089 " -L " libgc "/lib'")))
11090 #t))))))
11091 (inputs `(("pcre" ,pcre)
11092 ("libgc" ,libgc)))
11093 (home-page "https://shedskin.github.io/")
11094 (synopsis "Experimental Python-2 to C++ Compiler")
11095 (description (string-append "This is an experimental compiler for a subset of
11096 Python. It generates C++ code and a Makefile."))
11097 (license (list license:gpl3 license:bsd-3 license:expat))))
11098
11099 (define-public python2-rope
11100 (package
11101 (name "python2-rope")
11102 (version "0.11.0")
11103 (source
11104 (origin
11105 (method url-fetch)
11106 (uri (pypi-uri "rope" version))
11107 (sha256
11108 (base32
11109 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
11110 (arguments
11111 ;; Rope has only partial python3 support, see `python-rope'
11112 `(#:python ,python-2))
11113 (build-system python-build-system)
11114 (native-inputs
11115 `(("python2-unittest2" ,python2-unittest2)))
11116 (home-page "https://github.com/python-rope/rope")
11117 (synopsis "Refactoring library for Python")
11118 (description "Rope is a refactoring library for Python. It facilitates
11119 the renaming, moving and extracting of attributes, functions, modules, fields
11120 and parameters in Python 2 source code. These refactorings can also be applied
11121 to occurrences in strings and comments.")
11122 (license license:gpl2)))
11123
11124 (define-public python-rope
11125 (package
11126 (inherit python2-rope)
11127 (name "python-rope")
11128 (arguments `(#:python ,python-wrapper
11129 ;; XXX: Only partial python3 support, results in some failing
11130 ;; tests: <https://github.com/python-rope/rope/issues/247>.
11131 #:tests? #f))
11132 (properties `((python2-variant . ,(delay python2-rope))))))
11133
11134 (define-public python-py3status
11135 (package
11136 (name "python-py3status")
11137 (version "3.21")
11138 (source
11139 (origin
11140 (method url-fetch)
11141 (uri (pypi-uri "py3status" version))
11142 (sha256
11143 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
11144 (build-system python-build-system)
11145 (inputs
11146 `(("file" ,file)))
11147 (arguments
11148 '(#:phases
11149 (modify-phases %standard-phases
11150 ;; 'file' is used for detection of configuration file encoding
11151 ;; let's make link the dependency to particular input
11152 (add-before 'build 'patch-file-path
11153 (lambda* (#:key inputs #:allow-other-keys)
11154 (let ((file-path (assoc-ref inputs "file")))
11155 (substitute* "py3status/parse_config.py"
11156 (("\\[\"file\", \"-b\"")
11157 (string-append "['" file-path "/bin/file', '-b'")))
11158 #t))))
11159 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
11160 (home-page "https://github.com/ultrabug/py3status")
11161 (synopsis "Extensible i3status wrapper written in Python")
11162 (description "py3status is an i3status wrapper which extends i3status
11163 functionality in a modular way, allowing you to extend your panel with your
11164 own code, responding to click events and updating clock every second.")
11165 (license license:bsd-3)))
11166
11167 (define-public python-tblib
11168 (package
11169 (name "python-tblib")
11170 (version "1.6.0")
11171 (source (origin
11172 (method url-fetch)
11173 (uri (pypi-uri "tblib" version))
11174 (sha256
11175 (base32
11176 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
11177 (build-system python-build-system)
11178 (arguments
11179 `(#:phases
11180 (modify-phases %standard-phases
11181 (replace 'check
11182 (lambda _
11183 ;; Upstream runs tests after installation and the package itself
11184 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11185 ;; found.
11186 (setenv "PYTHONPATH"
11187 (string-append (getcwd) "/build/lib:"
11188 (getenv "PYTHONPATH")))
11189 (invoke "py.test" "-vv" "tests" "README.rst"))))))
11190 (native-inputs
11191 `(("python-pytest" ,python-pytest)
11192 ("python-six" ,python-six)))
11193 (home-page "https://github.com/ionelmc/python-tblib")
11194 (synopsis "Traceback serialization library")
11195 (description
11196 "Traceback serialization allows you to:
11197
11198 @enumerate
11199 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11200 different processes. This allows better error handling when running code over
11201 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11202
11203 @item Parse traceback strings and raise with the parsed tracebacks.
11204 @end enumerate\n")
11205 (license license:bsd-3)))
11206
11207 (define-public python2-tblib
11208 (package-with-python2 python-tblib))
11209
11210 (define-public python-greenlet
11211 (package
11212 (name "python-greenlet")
11213 (version "0.4.15")
11214 (source (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "greenlet" version))
11217 (sha256
11218 (base32
11219 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
11220 (build-system python-build-system)
11221 (home-page "https://greenlet.readthedocs.io/")
11222 (synopsis "Lightweight in-process concurrent programming")
11223 (description
11224 "Greenlet package is a spin-off of Stackless, a version of CPython
11225 that supports micro-threads called \"tasklets\". Tasklets run
11226 pseudo-concurrently (typically in a single or a few OS-level threads) and
11227 are synchronized with data exchanges on \"channels\".")
11228 (license (list license:psfl license:expat))))
11229
11230 (define-public python2-greenlet
11231 (package-with-python2 python-greenlet))
11232
11233 (define-public python-objgraph
11234 (package
11235 (name "python-objgraph")
11236 (version "3.4.1")
11237 (source
11238 (origin
11239 (method url-fetch)
11240 (uri (pypi-uri "objgraph" version))
11241 (sha256
11242 (base32
11243 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
11244 (build-system python-build-system)
11245 (propagated-inputs
11246 `(("python-graphviz" ,python-graphviz)))
11247 (native-inputs
11248 `(("python-mock" ,python-mock)
11249 ("graphviz" ,graphviz)))
11250 (home-page "https://mg.pov.lt/objgraph/")
11251 (synopsis "Draw Python object reference graphs with graphviz")
11252 (description
11253 "This package provides tools to draw Python object reference graphs with
11254 graphviz.")
11255 (license license:expat)))
11256
11257 (define-public python2-objgraph
11258 (package-with-python2 python-objgraph))
11259
11260 (define-public python-gevent
11261 (package
11262 (name "python-gevent")
11263 (version "20.5.0")
11264 (source (origin
11265 (method url-fetch)
11266 (uri (pypi-uri "gevent" version))
11267 (sha256
11268 (base32
11269 "1yppsrs0ccld9j9zfbsd0bxb987b2zkh2ar7whjxcrqzpkvg3iqx"))
11270 (modules '((guix build utils)))
11271 (snippet
11272 '(begin
11273 ;; unbunding libev and c-ares
11274 (delete-file-recursively "deps")
11275 #t))))
11276 (build-system python-build-system)
11277 (arguments
11278 `(#:modules ((ice-9 ftw)
11279 (ice-9 match)
11280 (srfi srfi-26)
11281 (guix build utils)
11282 (guix build python-build-system))
11283 #:phases (modify-phases %standard-phases
11284 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
11285 (lambda _
11286 (substitute* "src/gevent/subprocess.py"
11287 (("/bin/sh") (which "sh")))
11288 (for-each (lambda (file)
11289 (substitute* file
11290 (("/bin/sh") (which "sh"))
11291 (("/bin/true") (which "true"))))
11292 (find-files "src/greentest" "\\.py$"))
11293 #t))
11294 (add-before 'build 'do-not-use-bundled-sources
11295 (lambda _
11296 (setenv "GEVENTSETUP_EMBED" "0")
11297
11298 ;; Prevent building bundled libev.
11299 (substitute* "setup.py"
11300 (("run_make=_BUILDING")
11301 "run_make=False"))
11302 #t))
11303 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
11304 (lambda* (#:key inputs #:allow-other-keys)
11305 (let ((greenlet (string-append
11306 (assoc-ref inputs "python-greenlet")
11307 "/include")))
11308 (match (scandir greenlet
11309 (lambda (item)
11310 (string-prefix? "python" item)))
11311 ((python)
11312 (setenv "C_INCLUDE_PATH"
11313 (string-append greenlet "/" python ":"
11314 (or (getenv "C_INCLUDE_PATH")
11315 ""))))))
11316 #t))
11317 (add-before 'check 'pretend-to-be-CI
11318 (lambda _
11319 ;; A few tests are skipped due to network constraints or
11320 ;; get longer timeouts when running in a CI environment.
11321 ;; Piggy-back on that, as we need the same adjustments.
11322 (setenv "TRAVIS" "1")
11323 (setenv "APPVEYOR" "1")
11324 #t))
11325 (add-before 'check 'adjust-tests
11326 (lambda _
11327 (let ((disabled-tests
11328 '(;; These tests rely on networking which is not
11329 ;; available in the build container.
11330 "test_urllib2net.py"
11331 "test__server.py"
11332 "test__server_pywsgi.py"
11333 "test_socket.py"
11334 "test__socket.py"
11335 "test__socket_ssl.py"
11336 "test__socket_dns.py"
11337 "test__socket_dns6.py"
11338 "test___example_servers.py"
11339 "test__getaddrinfo_import.py"
11340 "test__examples.py"
11341 "test_httplib.py"
11342 "test_https.py"
11343 "test_urllib2_localnet.py"
11344 "test_ssl.py"
11345 "test__ssl.py"
11346 ;; XXX: These tests borrow functionality from the
11347 ;; Python builtin 'test' module, but it is not
11348 ;; installed with the Guix Python distribution.
11349 "test_smtpd.py"
11350 "test_wsgiref.py"
11351 "test_urllib2.py"
11352 "test_thread.py"
11353 "test_threading.py"
11354 "test__threading_2.py"
11355 ;; These tests rely on KeyboardInterrupts which do not
11356 ;; work inside the build container for some reason
11357 ;; (lack of controlling terminal?).
11358 "test_subprocess.py"
11359 "test__issues461_471.py"
11360 ;; TODO: Patch out the tests that use getprotobyname, etc
11361 ;; instead of disabling all the tests from these files.
11362 "test__resolver_dnspython.py"
11363 "test__doctests.py"
11364 "test__all__.py"
11365 "test___config.py"
11366 "test__execmodules.py")))
11367 (call-with-output-file "skipped_tests.txt"
11368 (lambda (port)
11369 (format port "~a~%"
11370 (string-join disabled-tests "\n"))))
11371 #t)))
11372 (replace 'check
11373 (lambda _
11374 ;; Make sure the build directory is on PYTHONPATH.
11375 (setenv "PYTHONPATH"
11376 (string-append
11377 (getenv "PYTHONPATH") ":"
11378 (getcwd) "/build/"
11379 (car (scandir "build" (cut string-prefix? "lib." <>)))))
11380
11381 ;; Use the build daemons configured number of workers.
11382 (setenv "NWORKERS" (number->string (parallel-job-count)))
11383
11384 (invoke "python" "-m" "gevent.tests" "--config"
11385 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
11386 (propagated-inputs
11387 `(("python-greenlet" ,python-greenlet)
11388 ("python-objgraph" ,python-objgraph)))
11389 (native-inputs
11390 `(("python-six" ,python-six)
11391
11392 ;; For tests.
11393 ("python-dnspython" ,python-dnspython)
11394 ("python-psutil" ,python-psutil)
11395 ("python-zope.event" ,python-zope-event)
11396 ("python-zope.interface" ,python-zope-interface)))
11397 (inputs
11398 `(("c-ares" ,c-ares)
11399 ("libev" ,libev)))
11400 (home-page "http://www.gevent.org/")
11401 (synopsis "Coroutine-based network library")
11402 (description
11403 "gevent is a coroutine-based Python networking library that uses greenlet
11404 to provide a high-level synchronous API on top of the libev event loop.")
11405 (license license:expat)
11406 (properties `((python2-variant . ,(delay python2-gevent))))))
11407
11408 (define-public python2-gevent
11409 (let ((base (package-with-python2
11410 (strip-python2-variant python-gevent))))
11411 (package
11412 (inherit base)
11413 (native-inputs `(,@(package-native-inputs base)
11414 ("python-mock" ,python2-mock))))))
11415
11416 (define-public python-fastimport
11417 (package
11418 (name "python-fastimport")
11419 (version "0.9.6")
11420 (source
11421 (origin
11422 (method url-fetch)
11423 (uri (pypi-uri "fastimport" version))
11424 (sha256
11425 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11426 (build-system python-build-system)
11427 (home-page "https://github.com/jelmer/python-fastimport")
11428 (synopsis "VCS fastimport parser and generator in Python")
11429 (description "This package provides a parser for and generator of the Git
11430 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11431 format.")
11432 (license license:gpl2+)))
11433
11434 (define-public python2-fastimport
11435 (package-with-python2 python-fastimport))
11436
11437 (define-public python-twisted
11438 (package
11439 (name "python-twisted")
11440 (version "19.7.0")
11441 (source (origin
11442 (method url-fetch)
11443 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11444 (sha256
11445 (base32
11446 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
11447 (build-system python-build-system)
11448 (arguments
11449 '(#:tests? #f)) ; FIXME: some tests fail
11450 (propagated-inputs
11451 `(("python-zope-interface" ,python-zope-interface)
11452 ("python-pyhamcrest" ,python-pyhamcrest)
11453 ("python-incremental" ,python-incremental)
11454 ("python-hyperlink" ,python-hyperlink)
11455 ("python-constantly" ,python-constantly)
11456 ("python-automat" ,python-automat)))
11457 (home-page "https://twistedmatrix.com/")
11458 (synopsis "Asynchronous networking framework written in Python")
11459 (description
11460 "Twisted is an extensible framework for Python programming, with special
11461 focus on event-based network programming and multiprotocol integration.")
11462 (license license:expat)))
11463
11464 (define-public python2-twisted
11465 (package-with-python2 python-twisted))
11466
11467 (define-public python-pika
11468 (package
11469 (name "python-pika")
11470 (version "0.12.0")
11471 (source
11472 (origin
11473 (method url-fetch)
11474 (uri (pypi-uri "pika" version))
11475 (sha256
11476 (base32
11477 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
11478 (build-system python-build-system)
11479 (native-inputs
11480 `(("python-pyev" ,python-pyev)
11481 ("python-tornado" ,python-tornado)
11482 ("python-twisted" ,python-twisted)))
11483 (home-page "https://pika.readthedocs.org")
11484 (synopsis "Pure Python AMQP Client Library")
11485 (description
11486 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11487 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11488 network support library.")
11489 (license license:bsd-3)))
11490
11491 (define-public python2-pika
11492 (package-with-python2 python-pika))
11493
11494 (define-public python-ply
11495 (package
11496 (name "python-ply")
11497 (version "3.11")
11498 (source
11499 (origin
11500 (method url-fetch)
11501 (uri (pypi-uri "ply" version))
11502 (sha256
11503 (base32
11504 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
11505 (build-system python-build-system)
11506 (home-page "http://www.dabeaz.com/ply/")
11507 (synopsis "Python Lex & Yacc")
11508 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11509 It uses LR parsing and does extensive error checking.")
11510 (license license:bsd-3)))
11511
11512 (define-public python-tabulate
11513 (package
11514 (name "python-tabulate")
11515 (version "0.7.7")
11516 (source (origin
11517 (method url-fetch)
11518 (uri (pypi-uri "tabulate" version))
11519 (sha256
11520 (base32
11521 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11522 (build-system python-build-system)
11523 (arguments
11524 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11525 ;; and the latest release is not tagged in the upstream repository.
11526 '(#:tests? #f))
11527 (home-page "https://bitbucket.org/astanin/python-tabulate")
11528 (synopsis "Pretty-print tabular data")
11529 (description
11530 "Tabulate is a library and command-line utility to pretty-print tabular
11531 data in Python.")
11532 (license license:expat)))
11533
11534 (define-public python2-tabulate
11535 (package-with-python2 python-tabulate))
11536
11537 (define-public python-kazoo
11538 (package
11539 (name "python-kazoo")
11540 (version "2.4.0")
11541 (source
11542 (origin
11543 (method url-fetch)
11544 (uri (pypi-uri "kazoo" version))
11545 (sha256
11546 (base32
11547 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
11548 (build-system python-build-system)
11549 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11550 (propagated-inputs
11551 `(("python-six" ,python-six)))
11552 (home-page "https://kazoo.readthedocs.org")
11553 (synopsis "High-level Zookeeper client library")
11554 (description
11555 "Kazoo is a Python client library for the Apache Zookeeper distributed
11556 application service. It is designed to be easy to use and to avoid common
11557 programming errors.")
11558 (license license:asl2.0)))
11559
11560 (define-public python2-kazoo
11561 (package-with-python2 python-kazoo))
11562
11563 (define-public python-pykafka
11564 (package
11565 (name "python-pykafka")
11566 (version "2.4.0")
11567 (source (origin
11568 (method url-fetch)
11569 (uri (pypi-uri "pykafka" version))
11570 (sha256
11571 (base32
11572 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11573 (build-system python-build-system)
11574 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11575 (propagated-inputs
11576 `(("python-gevent" ,python-gevent)
11577 ("python-kazoo" ,python-kazoo)
11578 ("python-tabulate" ,python-tabulate)))
11579 (inputs
11580 `(("librdkafka" ,librdkafka)))
11581 (home-page "https://pykafka.readthedocs.io/")
11582 (synopsis "Apache Kafka client for Python")
11583 (description
11584 "PyKafka is a client for the Apache Kafka distributed messaging system.
11585 It includes Python implementations of Kafka producers and consumers, which
11586 are optionally backed by a C extension built on librdkafka.")
11587 (license license:asl2.0)))
11588
11589 (define-public python2-pykafka
11590 (package-with-python2 python-pykafka))
11591
11592 (define-public python-wcwidth
11593 (package
11594 (name "python-wcwidth")
11595 (version "0.1.8")
11596 (source (origin
11597 (method url-fetch)
11598 (uri (pypi-uri "wcwidth" version))
11599 (sha256
11600 (base32
11601 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
11602 (build-system python-build-system)
11603 (home-page "https://github.com/jquast/wcwidth")
11604 (synopsis "Measure number of terminal column cells of wide-character codes")
11605 (description "Wcwidth measures the number of terminal column cells of
11606 wide-character codes. It is useful for those implementing a terminal emulator,
11607 or programs that carefully produce output to be interpreted by one. It is a
11608 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11609 specified in POSIX.1-2001 and POSIX.1-2008.")
11610 (license license:expat)))
11611
11612 (define-public python2-wcwidth
11613 (package-with-python2 python-wcwidth))
11614
11615 (define-public python2-jsonrpclib
11616 (package
11617 (name "python2-jsonrpclib")
11618 (version "0.1.7")
11619 (source (origin
11620 (method url-fetch)
11621 (uri (pypi-uri "jsonrpclib" version))
11622 (sha256
11623 (base32
11624 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11625 (build-system python-build-system)
11626 (arguments
11627 `(#:tests? #f
11628 #:python ,python-2))
11629 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11630 (synopsis "Implementation of JSON-RPC specification for Python")
11631 (description
11632 "This library is an implementation of the JSON-RPC specification.
11633 It supports both the original 1.0 specification, as well as the
11634 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11635 etc.")
11636 (license license:asl2.0)))
11637
11638 (define-public python-chai
11639 (package
11640 (name "python-chai")
11641 (version "1.1.2")
11642 (source (origin
11643 (method url-fetch)
11644 (uri (pypi-uri "chai" version))
11645 (sha256
11646 (base32
11647 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
11648 (build-system python-build-system)
11649 (home-page "https://github.com/agoragames/chai")
11650 (synopsis "Mocking framework for Python")
11651 (description
11652 "Chai provides an api for mocking, stubbing and spying your python
11653 objects, patterned after the Mocha library for Ruby.")
11654 (license license:bsd-3)))
11655
11656 (define-public python2-chai
11657 (package-with-python2 python-chai))
11658
11659 (define-public python-inflection
11660 (package
11661 (name "python-inflection")
11662 (version "0.3.1")
11663 (source
11664 (origin (method url-fetch)
11665 (uri (pypi-uri "inflection" version))
11666 (sha256
11667 (base32
11668 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11669 (build-system python-build-system)
11670 (native-inputs
11671 `(("python-pytest" ,python-pytest)))
11672 (home-page "https://github.com/jpvanhal/inflection")
11673 (synopsis "Python string transformation library")
11674 (description
11675 "Inflection is a string transformation library. It singularizes
11676 and pluralizes English words, and transforms strings from CamelCase to
11677 underscored string.")
11678 (license license:expat)))
11679
11680 (define-public python2-inflection
11681 (package-with-python2 python-inflection))
11682
11683 (define-public python-pylev
11684 (package
11685 (name "python-pylev")
11686 (version "1.3.0")
11687 (source (origin
11688 (method url-fetch)
11689 (uri (pypi-uri "pylev" version))
11690 (sha256
11691 (base32
11692 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11693 (build-system python-build-system)
11694 (home-page "https://github.com/toastdriven/pylev")
11695 (synopsis "Levenshtein distance implementation in Python")
11696 (description "Pure Python Levenshtein implementation, based off the
11697 Wikipedia code samples at
11698 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11699 (license license:bsd-3)))
11700
11701 (define-public python2-pylev
11702 (package-with-python2 python-pylev))
11703
11704 (define-public python-cleo
11705 (package
11706 (name "python-cleo")
11707 (version "0.7.6")
11708 (source (origin
11709 (method url-fetch)
11710 (uri (pypi-uri "cleo" version))
11711 (sha256
11712 (base32
11713 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
11714 (build-system python-build-system)
11715 (native-inputs
11716 `( ;; For testing
11717 ("python-mock" ,python-mock)
11718 ("python-pytest-mock" ,python-pytest-mock)
11719 ("python-pytest" ,python-pytest)))
11720 (propagated-inputs
11721 `(("python-backpack" ,python-backpack)
11722 ("python-clikit" ,python-clikit)
11723 ("python-pastel" ,python-pastel)
11724 ("python-pylev" ,python-pylev)))
11725 (home-page "https://github.com/sdispater/cleo")
11726 (synopsis "Command-line arguments library for Python")
11727 (description
11728 "Cleo allows you to create command-line commands with signature in
11729 docstring and colored output.")
11730 (license license:expat)))
11731
11732 (define-public python2-cleo
11733 (package-with-python2 python-cleo))
11734
11735 (define-public python-tomlkit
11736 (package
11737 (name "python-tomlkit")
11738 (version "0.5.11")
11739 (source
11740 (origin
11741 (method url-fetch)
11742 (uri (pypi-uri "tomlkit" version))
11743 (sha256
11744 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
11745 (build-system python-build-system)
11746 (native-inputs
11747 `(("python-pytest" ,python-pytest)))
11748 (home-page "https://github.com/sdispater/tomlkit")
11749 (synopsis "Style-preserving TOML library")
11750 (description
11751 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11752 preserves all comments, indentations, whitespace and internal element ordering,
11753 and makes them accessible and editable via an intuitive API. It can also
11754 create new TOML documents from scratch using the provided helpers. Part of the
11755 implementation has been adapted, improved, and fixed from Molten.")
11756 (license license:expat)))
11757
11758 (define-public python-shellingham
11759 (package
11760 (name "python-shellingham")
11761 (version "1.3.1")
11762 (source
11763 (origin
11764 (method url-fetch)
11765 (uri (pypi-uri "shellingham" version))
11766 (sha256
11767 (base32
11768 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
11769 (build-system python-build-system)
11770 (home-page
11771 "https://github.com/sarugaku/shellingham")
11772 (synopsis "Tool to detect surrounding shell")
11773 (description
11774 "Shellingham detects what shell the current Python executable is
11775 running in.")
11776 (license license:isc)))
11777
11778 (define-public python-memcached
11779 (package
11780 (name "python-memcached")
11781 (version "1.59")
11782 (source
11783 (origin
11784 (method url-fetch)
11785 (uri (pypi-uri "python-memcached" version))
11786 (sha256
11787 (base32
11788 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
11789 (build-system python-build-system)
11790 (propagated-inputs `(("python-six" ,python-six)))
11791 (home-page
11792 "https://github.com/linsomniac/python-memcached")
11793 (synopsis "Pure python memcached client")
11794 (description
11795 "This software is a pure Python interface to the memcached memory cache
11796 daemon. It is the client side software which allows storing values in one or
11797 more, possibly remote, memcached servers.")
11798 (license license:psfl)))
11799
11800 (define-public python-clikit
11801 (package
11802 (name "python-clikit")
11803 (version "0.4.2")
11804 (source
11805 (origin
11806 (method url-fetch)
11807 (uri (pypi-uri "clikit" version))
11808 (sha256
11809 (base32
11810 "1jnnr21hvzx4i29nbph1z96ympv0njiwyvngjq48w1q05133cwzn"))))
11811 (build-system python-build-system)
11812 (propagated-inputs
11813 `(("python-pastel" ,python-pastel)
11814 ("python-pylev" ,python-pylev)))
11815 (home-page "https://github.com/sdispater/clikit")
11816 (synopsis "Group of utilities to build command line interfaces")
11817 (description
11818 "CliKit is a group of utilities to build testable command line
11819 interfaces.")
11820 (properties `((python2-variant . ,(delay python2-clikit))))
11821 (license license:expat)))
11822
11823 (define-public python2-clikit
11824 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
11825 (package/inherit
11826 base
11827 (propagated-inputs
11828 `(("python-enum34" ,python2-enum34)
11829 ("python-typing" ,python2-typing)
11830 ,@(package-propagated-inputs base))))))
11831
11832 (define-public python-msgpack-python
11833 (package
11834 (name "python-msgpack-python")
11835 (version "0.5.6")
11836 (source
11837 (origin
11838 (method url-fetch)
11839 (uri (pypi-uri "msgpack-python" version))
11840 (sha256
11841 (base32
11842 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
11843 (build-system python-build-system)
11844 (home-page "http://msgpack.org/")
11845 (synopsis "Package to deserialize messages in MessagePack binary format")
11846 (description
11847 "MessagePack is an efficient binary serialization format. It lets you
11848 exchange data among multiple languages like JSON. But it's faster and
11849 smaller. Small integers are encoded into a single byte, and typical short
11850 strings require only one extra byte in addition to the strings themselves.")
11851 (license license:asl2.0)))
11852
11853 (define-public python-cachy
11854 (package
11855 (name "python-cachy")
11856 (version "0.3.0")
11857 (source
11858 (origin
11859 (method url-fetch)
11860 (uri (pypi-uri "cachy" version))
11861 (sha256
11862 (base32
11863 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
11864 (build-system python-build-system)
11865 (arguments
11866 '(#:phases
11867 (modify-phases %standard-phases
11868 (replace 'check
11869 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
11870 "pytest"))))))
11871 (native-inputs
11872 `(("memcached" ,memcached)
11873 ("python-fakeredis" ,python-fakeredis)
11874 ("python-flexmock" ,python-flexmock)
11875 ("python-pifpaf" ,python-pifpaf)
11876 ("python-pytest" ,python-pytest)))
11877 (propagated-inputs
11878 `(("python-memcached" ,python-memcached)
11879 ("python-msgpack-python" ,python-msgpack-python)
11880 ("python-redis" ,python-redis)))
11881 (home-page "https://github.com/sdispater/cachy")
11882 (synopsis "Simple yet effective caching library")
11883 (description
11884 "Cachy provides a simple yet effective caching library. A simple but
11885 powerful API: thread-safety; decorator syntax; support for memcached, redis,
11886 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
11887 (license license:expat)))
11888
11889 (define-public poetry
11890 (package
11891 (name "poetry")
11892 (version "1.0.5")
11893 ;; Poetry can only be built from source with Poetry.
11894 (source
11895 (origin
11896 (method url-fetch)
11897 (uri (pypi-uri "poetry" version))
11898 (sha256
11899 (base32
11900 "02h387k0xssvv78yy82pcpknpq4w5ym2in1zl8cg9r5wljl5w6cf"))))
11901 (build-system python-build-system)
11902 (arguments
11903 `(#:tests? #f ;; Pypi does not have tests.
11904 #:phases
11905 (modify-phases %standard-phases
11906 (add-before 'build 'patch-setup-py
11907 (lambda _
11908 (substitute* "setup.py"
11909 ;; poetry won't update version as 21.0.0 relies on python > 3.6
11910 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
11911 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.16.0")
11912 (("importlib-metadata>=1.1.3,<1.2.0") "importlib-metadata>=1.1.3,<1.5.0"))
11913 #t)))))
11914 (propagated-inputs
11915 `(("python-cachecontrol" ,python-cachecontrol)
11916 ("python-cachy" ,python-cachy)
11917 ("python-cleo" ,python-cleo)
11918 ("python-clikit" ,python-clikit)
11919 ("python-html5lib" ,python-html5lib)
11920 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
11921 ("python-jsonschema" ,python-jsonschema)
11922 ("python-keyring" ,python-keyring)
11923 ("python-pexpect" ,python-pexpect)
11924 ("python-pkginfo" ,python-pkginfo)
11925 ("python-pyparsing" ,python-pyparsing)
11926 ("python-pyrsistent" ,python-pyrsistent)
11927 ("python-requests" ,python-requests)
11928 ("python-requests-toolbelt" ,python-requests-toolbelt)
11929 ("python-shellingham" ,python-shellingham)
11930 ("python-tomlkit" ,python-tomlkit)
11931 ("python-virtualenv" ,python-virtualenv)))
11932 (home-page "https://python-poetry.org")
11933 (synopsis "Python dependency management and packaging made easy")
11934 (description "Poetry is a tool for dependency management and packaging
11935 in Python. It allows you to declare the libraries your project depends on and
11936 it will manage (install/update) them for you.")
11937 (license license:expat)))
11938
11939 (define-public python-lazy-object-proxy
11940 (package
11941 (name "python-lazy-object-proxy")
11942 (version "1.4.3")
11943 (source (origin
11944 (method url-fetch)
11945 (uri (pypi-uri "lazy-object-proxy" version))
11946 (sha256
11947 (base32
11948 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
11949 (native-inputs
11950 `(("python-setuptools-scm" ,python-setuptools-scm)))
11951 (build-system python-build-system)
11952 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11953 (synopsis "Lazy object proxy for python")
11954 (description
11955 "Lazy object proxy is an object that wraps a callable but defers the call
11956 until the object is actually required, and caches the result of said call.")
11957 (license license:bsd-2)))
11958
11959 (define-public python2-lazy-object-proxy
11960 (package-with-python2 python-lazy-object-proxy))
11961
11962 (define-public python-dnspython
11963 (package
11964 (name "python-dnspython")
11965 (version "1.16.0")
11966 (source (origin
11967 (method url-fetch)
11968 (uri (string-append "http://www.dnspython.org/kits/"
11969 version "/dnspython-" version ".tar.gz"))
11970 (sha256
11971 (base32
11972 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
11973 (build-system python-build-system)
11974 (arguments '(#:tests? #f)) ; XXX: requires internet access
11975 (home-page "http://www.dnspython.org")
11976 (synopsis "DNS toolkit for Python")
11977 (description
11978 "dnspython is a DNS toolkit for Python. It supports almost all record
11979 types. It can be used for queries, zone transfers, and dynamic updates.
11980 It supports TSIG authenticated messages and EDNS0.")
11981 (license license:expat)))
11982
11983 (define-public python2-dnspython
11984 (package-with-python2 python-dnspython))
11985
11986 (define-public python-email-validator
11987 (package
11988 (name "python-email-validator")
11989 (version "1.0.2")
11990 (source
11991 (origin (method url-fetch)
11992 (uri (pypi-uri "email_validator" version))
11993 (sha256
11994 (base32
11995 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11996 (build-system python-build-system)
11997 (arguments
11998 '(#:phases
11999 (modify-phases %standard-phases
12000 (add-before 'build 'use-dnspython
12001 (lambda _
12002 (substitute* "setup.py"
12003 (("dnspython3") "dnspython"))
12004 #t)))))
12005 (propagated-inputs
12006 `(("python-dnspython" ,python-dnspython)
12007 ("python-idna" ,python-idna)))
12008 (home-page "https://github.com/JoshData/python-email-validator")
12009 (synopsis "Email address validation library for Python")
12010 (description
12011 "This library validates email address syntax and deliverability.")
12012 (license license:cc0)))
12013
12014 (define-public python2-email-validator
12015 (package-with-python2 python-email-validator))
12016
12017 (define-public python-ukpostcodeparser
12018 (package
12019 (name "python-ukpostcodeparser")
12020 (version "1.0.3")
12021 (source (origin
12022 (method url-fetch)
12023 (uri (pypi-uri "UkPostcodeParser" version))
12024 (sha256
12025 (base32
12026 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
12027 (build-system python-build-system)
12028 (home-page "https://github.com/hamstah/ukpostcodeparser")
12029 (synopsis "UK Postcode parser for Python")
12030 (description
12031 "This library provides the @code{parse_uk_postcode} function for
12032 parsing UK postcodes.")
12033 (license license:expat)))
12034
12035 (define-public python2-ukpostcodeparser
12036 (package-with-python2 python-ukpostcodeparser))
12037
12038 (define-public python-faker
12039 (package
12040 (name "python-faker")
12041 (version "4.0.2")
12042 (source (origin
12043 (method url-fetch)
12044 (uri (pypi-uri "Faker" version))
12045 (sha256
12046 (base32
12047 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
12048 (build-system python-build-system)
12049 (arguments
12050 '(#:phases
12051 (modify-phases %standard-phases
12052 (replace 'check
12053 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
12054 (native-inputs
12055 `(;; For testing
12056 ("python-freezegun" ,python-freezegun)
12057 ("python-pytest" ,python-pytest)
12058 ("python-random2" ,python-random2)
12059 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
12060 ("python-validators" ,python-validators)))
12061 (propagated-inputs
12062 `(("python-dateutil" ,python-dateutil)
12063 ("python-text-unidecode" ,python-text-unidecode)))
12064 (home-page "https://github.com/joke2k/faker")
12065 (synopsis "Python package that generates fake data")
12066 (description
12067 "Faker is a Python package that generates fake data such as names,
12068 addresses, and phone numbers.")
12069 (license license:expat)
12070 (properties `((python2-variant . ,(delay python2-faker))))))
12071
12072 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
12073 (define-public python2-faker
12074 (let ((base (package-with-python2 (strip-python2-variant
12075 python-faker))))
12076 (package
12077 (inherit base)
12078 (version "3.0.1")
12079 (source (origin
12080 (method url-fetch)
12081 (uri (pypi-uri "Faker" version))
12082 (sha256
12083 (base32
12084 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
12085 (native-inputs
12086 `(("python-mock" ,python2-mock)
12087 ,@(package-native-inputs base)))
12088 (propagated-inputs
12089 `(("python2-ipaddress" ,python2-ipaddress)
12090 ("python2-six" ,python2-six)
12091 ,@(package-propagated-inputs base))))))
12092
12093 (define-public python-pyaml
12094 (package
12095 (name "python-pyaml")
12096 (version "18.11.0")
12097 (source (origin
12098 (method url-fetch)
12099 (uri (pypi-uri "pyaml" version))
12100 (sha256
12101 (base32
12102 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
12103 (build-system python-build-system)
12104 (native-inputs
12105 `(("python-unidecode" ,python-unidecode)))
12106 (propagated-inputs
12107 `(("python-pyyaml" ,python-pyyaml)))
12108 (home-page "https://github.com/mk-fg/pretty-yaml")
12109 (synopsis "YAML pretty-print library for Python")
12110 (description
12111 "pyaml is a PyYAML based python module to produce pretty and readable
12112 YAML-serialized data.")
12113 (license license:wtfpl2)))
12114
12115 (define-public python2-pyaml
12116 (package-with-python2 python-pyaml))
12117
12118 (define-public python-backpack
12119 (package
12120 (name "python-backpack")
12121 (version "0.1")
12122 (source
12123 (origin
12124 (method url-fetch)
12125 (uri (pypi-uri "backpack" version))
12126 (sha256
12127 (base32
12128 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
12129 (build-system python-build-system)
12130 (native-inputs
12131 `(("python-pytest" ,python-pytest)
12132 ("python-nose" ,python-nose)))
12133 (propagated-inputs
12134 `(("python-simplejson" ,python-simplejson)))
12135 (home-page "https://github.com/sdispater/backpack")
12136 (synopsis "Utilities for working with Python collections")
12137 (description "Backpack provides some useful utilities for working with
12138 collections of data.")
12139 (license license:expat)))
12140
12141 (define-public python2-backpack
12142 (package-with-python2 python-backpack))
12143
12144 (define-public python-prompt-toolkit
12145 (package
12146 (name "python-prompt-toolkit")
12147 (version "3.0.5")
12148 (source
12149 (origin
12150 (method url-fetch)
12151 (uri (pypi-uri "prompt_toolkit" version))
12152 (sha256
12153 (base32
12154 "1j3x5s4gp4ih73sbcni0a0vffbzvrxbrbnkvb3fzjgxn810ilgan"))))
12155 (build-system python-build-system)
12156 (arguments
12157 `(#:phases
12158 (modify-phases %standard-phases
12159 (delete 'check)
12160 (add-after 'install 'post-install-check
12161 (lambda* (#:key inputs outputs #:allow-other-keys)
12162 ;; HOME is needed for the test
12163 ;; "test_pathcompleter_can_expanduser".
12164 (setenv "HOME" "/tmp")
12165 (add-installed-pythonpath inputs outputs)
12166 (invoke "py.test"))))))
12167 (propagated-inputs
12168 `(("python-wcwidth" ,python-wcwidth)))
12169 (native-inputs
12170 `(("python-pytest" ,python-pytest)))
12171 (home-page
12172 "https://github.com/prompt-toolkit/python-prompt-toolkit")
12173 (synopsis "Library for building command line interfaces in Python")
12174 (description
12175 "Prompt-Toolkit is a library for building interactive command line
12176 interfaces in Python. It's like GNU Readline but it also features syntax
12177 highlighting while typing, out-of-the-box multi-line input editing, advanced
12178 code completion, incremental search, support for Chinese double-width
12179 characters, mouse support, and auto suggestions.")
12180 (license license:bsd-3)))
12181
12182 (define-public python-prompt-toolkit-2
12183 (package (inherit python-prompt-toolkit)
12184 (name "python-prompt-toolkit")
12185 (version "2.0.7")
12186 (source
12187 (origin
12188 (method url-fetch)
12189 (uri (pypi-uri "prompt_toolkit" version))
12190 (sha256
12191 (base32
12192 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
12193 (propagated-inputs
12194 `(("python-wcwidth" ,python-wcwidth)
12195 ("python-six" ,python-six)
12196 ("python-pygments" ,python-pygments)))))
12197
12198 (define-public prompt-toolkit-2-instead-of-prompt-toolkit
12199 (package-input-rewriting/spec
12200 `(("python-prompt-toolkit" . ,(const python-prompt-toolkit-2)))))
12201
12202 (define-public python2-prompt-toolkit
12203 (package-with-python2 python-prompt-toolkit-2))
12204
12205 (define-public python-prompt-toolkit-1
12206 (package (inherit python-prompt-toolkit-2)
12207 (version "1.0.15")
12208 (source
12209 (origin
12210 (method url-fetch)
12211 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
12212 (sha256
12213 (base32
12214 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
12215
12216 (define-public python2-prompt-toolkit-1
12217 (package-with-python2 python-prompt-toolkit-1))
12218
12219 (define-public python-jedi
12220 (package
12221 (name "python-jedi")
12222 (version "0.17.0")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (pypi-uri "jedi" version))
12227 (patches (search-patches "python-jedi-sort-project-test.patch"))
12228 (sha256
12229 (base32
12230 "0c1h9x3a9klvk2g288wl328x8xgzw7136k6vs9hkd56b85vcjh6z"))))
12231 (build-system python-build-system)
12232 (arguments
12233 `(#:phases
12234 (modify-phases %standard-phases
12235 (add-before 'check 'adjust-test-for-python-3.8
12236 (lambda _
12237 ;; Mimic upstream commit e7feeef64 to allow for extra output lines
12238 ;; in TestSetupReadline on Python 3.8. Remove for jedi > 0.17.0.
12239 (substitute* "test/test_utils.py"
12240 (("assert len\\(difference\\) < 20")
12241 "assert len(difference) < 22"))
12242 #t))
12243 (replace 'check
12244 (lambda _
12245 (setenv "HOME" "/tmp")
12246 (invoke "python" "-m" "pytest" "-vv"))))))
12247 (native-inputs
12248 `(("python-pytest" ,python-pytest)
12249 ("python-docopt" ,python-docopt)))
12250 (propagated-inputs
12251 `(("python-parso" ,python-parso)))
12252 (home-page "https://github.com/davidhalter/jedi")
12253 (synopsis "Autocompletion and static analysis library for Python")
12254 (description
12255 "Jedi is a static analysis tool for Python that can be used in Integrated
12256 Development Environments (@dfn{IDE}s) and text editors. It understands Python
12257 on a deeper level than many other static analysis frameworks for Python.
12258
12259 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
12260 well.")
12261 (license license:expat)))
12262
12263 (define-public python2-jedi
12264 (package-with-python2 python-jedi))
12265
12266 (define-public ptpython
12267 (package
12268 (name "ptpython")
12269 (version "0.34")
12270 (source (origin
12271 (method url-fetch)
12272 (uri (pypi-uri "ptpython" version))
12273 (sha256
12274 (base32
12275 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12276 (build-system python-build-system)
12277 (arguments
12278 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
12279 (propagated-inputs
12280 `(("python-docopt" ,python-docopt)
12281 ("python-jedi" ,python-jedi)
12282 ("python-prompt-toolkit" ,python-prompt-toolkit)
12283 ("python-pygments" ,python-pygments)))
12284 (home-page "https://github.com/jonathanslenders/ptpython")
12285 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12286 (description
12287 "ptpython is a Python read-eval-print loop with IDE-like features.
12288 It supports syntax highlighting, multiline editing, autocompletion, mouse,
12289 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12290 etc.")
12291 (license license:bsd-3)
12292 (properties `((python2-variant . ,(delay ptpython-2))))))
12293
12294 (define-public ptpython-2
12295 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12296 (package
12297 (inherit base)
12298 (name "ptpython2"))))
12299
12300 (define-public python-stem
12301 (package
12302 (name "python-stem")
12303 (version "1.8.0")
12304 (source
12305 (origin
12306 (method url-fetch)
12307 (uri (pypi-uri "stem" version))
12308 (sha256
12309 (base32
12310 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
12311 (build-system python-build-system)
12312 (arguments
12313 `(#:phases
12314 (modify-phases %standard-phases
12315 (replace 'check
12316 (lambda _
12317 (invoke "./run_tests.py" "--unit")
12318 #t)))))
12319 (native-inputs
12320 `(("python-mock" ,python-mock)
12321 ("python-pycodestyle" ,python-pycodestyle)
12322 ("python-pyflakes" ,python-pyflakes)))
12323 (home-page "https://stem.torproject.org/")
12324 (synopsis
12325 "Python controller library that allows applications to interact with Tor")
12326 (description
12327 "Stem is a Python controller library for Tor. With it you can use Tor's
12328 control protocol to script against the Tor process and read descriptor data
12329 relays publish about themselves.")
12330 (license license:lgpl3)))
12331
12332 (define-public python2-stem
12333 (package-with-python2 python-stem))
12334
12335 (define-public python-pyserial
12336 (package
12337 (name "python-pyserial")
12338 (version "3.4")
12339 (source
12340 (origin
12341 (method url-fetch)
12342 (uri (pypi-uri "pyserial" version))
12343 (sha256
12344 (base32
12345 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
12346 (build-system python-build-system)
12347 (arguments
12348 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12349 ;; #:phases
12350 ;; (modify-phases %standard-phases
12351 ;; (replace 'check
12352 ;; (lambda _
12353 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12354 (home-page
12355 "https://github.com/pyserial/pyserial")
12356 (synopsis "Python Serial Port Bindings")
12357 (description "@code{pyserial} provide serial port bindings for Python. It
12358 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12359 and/or Xon/Xoff. The port is accessed in RAW mode.")
12360 (license license:bsd-3)))
12361
12362 (define-public python2-pyserial
12363 (package-with-python2 python-pyserial))
12364
12365 (define-public python-kivy
12366 (package
12367 (name "python-kivy")
12368 (version "1.10.1")
12369 (source
12370 (origin
12371 (method url-fetch)
12372 (uri (pypi-uri "Kivy" version))
12373 (file-name (string-append name "-" version ".tar.gz"))
12374 (sha256
12375 (base32
12376 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
12377 (build-system python-build-system)
12378 (arguments
12379 `(#:tests? #f ; Tests require many optional packages
12380 #:phases
12381 (modify-phases %standard-phases
12382 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12383 (lambda* (#:key inputs #:allow-other-keys)
12384 (setenv "KIVY_SDL2_PATH"
12385 (string-append (assoc-ref inputs "sdl-union")
12386 "/include/SDL2"))
12387 #t)))))
12388 (native-inputs
12389 `(("pkg-config" ,pkg-config)
12390 ("python-cython" ,python-cython)))
12391 (inputs
12392 `(("gstreamer" ,gstreamer)
12393 ("mesa" ,mesa)
12394 ("sdl-union"
12395 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12396 (home-page "https://kivy.org")
12397 (synopsis
12398 "Multitouch application framework")
12399 (description
12400 "A software library for rapid development of
12401 hardware-accelerated multitouch applications.")
12402 (license license:expat)))
12403
12404 (define-public python2-kivy
12405 (package-with-python2 python-kivy))
12406
12407 (define-public python-binaryornot
12408 (package
12409 (name "python-binaryornot")
12410 (version "0.4.4")
12411 (source (origin
12412 (method url-fetch)
12413 (uri (pypi-uri "binaryornot" version))
12414 (sha256
12415 (base32
12416 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
12417 (build-system python-build-system)
12418 (arguments
12419 `(#:phases
12420 (modify-phases %standard-phases
12421 (add-after 'unpack 'patch-tests
12422 (lambda _
12423 ;; TypeError: binary() got an unexpected keyword argument
12424 ;; 'average_size'.
12425 (substitute* "tests/test_check.py"
12426 (("average_size=512") ""))
12427 #t)))))
12428 (propagated-inputs
12429 `(("python-chardet" ,python-chardet)
12430 ("python-hypothesis" ,python-hypothesis)))
12431 (home-page "https://github.com/audreyr/binaryornot")
12432 (synopsis "Package to check if a file is binary or text")
12433 (description "Ultra-lightweight pure Python package to check if a file is
12434 binary or text.")
12435 (license license:bsd-3)
12436 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12437
12438 (define-public python2-binaryornot
12439 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12440 (package (inherit base)
12441 (propagated-inputs
12442 `(("python2-enum34" ,python2-enum34)
12443 ,@(package-propagated-inputs base))))))
12444
12445 (define-public python-binwalk
12446 (package
12447 (name "python-binwalk")
12448 (version "2.2.0")
12449 (source
12450 (origin
12451 (method git-fetch)
12452 (uri (git-reference
12453 (url "https://github.com/ReFirmLabs/binwalk")
12454 (commit (string-append "v" version))))
12455 (file-name (git-file-name name version))
12456 (sha256
12457 (base32
12458 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
12459 (build-system python-build-system)
12460 (arguments
12461 `(#:phases
12462 (modify-phases %standard-phases
12463 (add-before 'check 'set-pythonpath
12464 (lambda _
12465 (setenv "PYTHONPATH"
12466 (string-append
12467 (getcwd) "/src/"
12468 ":" (getenv "PYTHONPATH")))
12469 (setenv "HOME" "")
12470 #t)))))
12471 (native-inputs
12472 `(("python-coverage" ,python-coverage)
12473 ("python-nose" ,python-nose)))
12474 (home-page "https://github.com/ReFirmLabs/binwalk")
12475 (synopsis "Firmware analysis tool")
12476 (description "Binwalk is a tool for analyzing, reverse engineering, and
12477 extracting firmware images")
12478 (license license:expat)))
12479
12480 (define-public python-nltk
12481 (package
12482 (name "python-nltk")
12483 (version "3.2.1")
12484 (source (origin
12485 (method url-fetch)
12486 (uri (pypi-uri "nltk" version))
12487 (sha256
12488 (base32
12489 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12490 (build-system python-build-system)
12491 (arguments
12492 '(;; The tests require some extra resources to be downloaded.
12493 ;; TODO Try packaging these resources.
12494 #:tests? #f))
12495 (home-page "http://nltk.org/")
12496 (synopsis "Natural Language Toolkit")
12497 (description "It provides interfaces to over 50 corpora and lexical
12498 resources such as WordNet, along with a suite of text processing libraries
12499 for classification, tokenization, stemming, tagging, parsing, and semantic
12500 reasoning, wrappers for natural language processing libraries.")
12501 (license license:asl2.0)))
12502
12503 (define-public python2-nltk
12504 (package-with-python2 python-nltk))
12505
12506 (define-public python-pymongo
12507 (package
12508 (name "python-pymongo")
12509 (version "3.7.2")
12510 (source (origin
12511 (method url-fetch)
12512 (uri (pypi-uri "pymongo" version))
12513 (sha256
12514 (base32
12515 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
12516 (build-system python-build-system)
12517 (propagated-inputs
12518 `(("python-certifi" ,python-certifi)))
12519 (home-page "https://github.com/mongodb/mongo-python-driver")
12520 (synopsis "Python driver for MongoDB")
12521 (description "Python driver for MongoDB.")
12522 (license license:asl2.0)))
12523
12524 (define-public python2-pymongo
12525 (package-with-python2 python-pymongo))
12526
12527 (define-public python-consul
12528 (package
12529 (name "python-consul")
12530 (version "0.6.1")
12531 (source
12532 (origin
12533 (method url-fetch)
12534 (uri (pypi-uri "python-consul" version))
12535 (sha256
12536 (base32
12537 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12538 (build-system python-build-system)
12539 (arguments
12540 '(#:tests? #f)) ; The tests are not distributed
12541 (propagated-inputs
12542 `(("python-requests" ,python-requests)
12543 ("python-six" ,python-six)))
12544 (home-page "https://github.com/cablehead/python-consul")
12545 (synopsis "Python client for Consul")
12546 (description
12547 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12548 discovery, monitoring and configuration.")
12549 (license license:expat)))
12550
12551 (define-public python2-consul
12552 (package-with-python2 python-consul))
12553
12554 (define-public python-schematics
12555 (package
12556 (name "python-schematics")
12557 (version "1.1.1")
12558 (source
12559 (origin
12560 (method git-fetch)
12561 (uri (git-reference
12562 (url "https://github.com/schematics/schematics.git")
12563 (commit (string-append "v" version))))
12564 (file-name (git-file-name name version))
12565 (sha256
12566 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
12567 (build-system python-build-system)
12568 (propagated-inputs
12569 `(("python-six" ,python-six)))
12570 (arguments
12571 ;; The tests require a bunch of not very nice packages with fixed
12572 ;; version requirements (e.g. python-coveralls).
12573 `(#:tests? #f))
12574 (home-page "https://github.com/schematics/schematics")
12575 (synopsis "Python Data Structures for Humans")
12576 (description "Python Data Structures for Humans.")
12577 (license license:bsd-3)))
12578
12579 (define-public python2-schematics
12580 (package-with-python2 python-schematics))
12581
12582 (define-public python-odfpy
12583 (package
12584 (name "python-odfpy")
12585 (version "1.3.3")
12586 (source (origin
12587 (method url-fetch)
12588 (uri (pypi-uri "odfpy" version))
12589 (sha256
12590 (base32
12591 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12592 (arguments
12593 `(#:modules ((srfi srfi-1)
12594 (guix build python-build-system)
12595 (guix build utils))
12596 #:phases
12597 (modify-phases %standard-phases
12598 (replace 'check
12599 ;; The test runner invokes python2 and python3 for test*.py.
12600 ;; To avoid having both in inputs, we replicate it here.
12601 (lambda _
12602 (for-each (lambda (test-file) (invoke "python" test-file))
12603 (find-files "tests" "^test.*\\.py$"))
12604 #t)))))
12605 (build-system python-build-system)
12606 (home-page "https://github.com/eea/odfpy")
12607 (synopsis "Python API and tools to manipulate OpenDocument files")
12608 (description "Collection of libraries and utility programs written in
12609 Python to manipulate OpenDocument 1.2 files.")
12610 (license
12611 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12612 ;; number of files with other licenses.
12613 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12614
12615 (define-public python2-odfpy
12616 (package-with-python2 python-odfpy))
12617
12618 (define-public python-natsort
12619 (package
12620 (name "python-natsort")
12621 (version "7.0.1")
12622 (source (origin
12623 (method url-fetch)
12624 (uri (pypi-uri "natsort" version))
12625 (sha256
12626 (base32
12627 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
12628 (build-system python-build-system)
12629 (arguments
12630 `(#:modules ((guix build utils)
12631 (guix build python-build-system)
12632 (srfi srfi-1)
12633 (srfi srfi-26)
12634 (ice-9 ftw))
12635 #:phases
12636 (modify-phases %standard-phases
12637 (add-before 'check 'set-cachedir
12638 ;; Tests require write access to $HOME by default
12639 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
12640 (replace 'check
12641 (lambda _
12642 (let ((cwd (getcwd)))
12643 (setenv "PYTHONPATH"
12644 (string-append
12645 cwd "/build/"
12646 (find (cut string-prefix? "lib" <>)
12647 (scandir (string-append cwd "/build")))
12648 ":"
12649 (getenv "PYTHONPATH")))
12650 (invoke "pytest" "-v")))))))
12651 (native-inputs
12652 `(("python-hypothesis" ,python-hypothesis)
12653 ("python-pytest-cov" ,python-pytest-cov)
12654 ("python-pytest-mock" ,python-pytest-mock)
12655 ("python-pytest" ,python-pytest)))
12656 (propagated-inputs ; TODO: Add python-fastnumbers.
12657 `(("python-pyicu" ,python-pyicu)))
12658 (home-page "https://github.com/SethMMorton/natsort")
12659 (synopsis "Natural sorting for python and shell")
12660 (description
12661 "Natsort lets you apply natural sorting on lists instead of
12662 lexicographical. If you use the built-in @code{sorted} method in python
12663 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
12664 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
12665 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
12666 identifies numbers and sorts them separately from strings. It can also sort
12667 version numbers, real numbers, mixed types and more, and comes with a shell
12668 command @command{natsort} that exposes this functionality in the command line.")
12669 (license license:expat)
12670 (properties `((python2-variant . ,(delay python2-natsort))))))
12671
12672 ;; Natsort 6.x are the last versions with support for Python 2.
12673 (define-public python2-natsort
12674 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12675 (package (inherit base)
12676 (version "6.2.1")
12677 (source (origin
12678 (method url-fetch)
12679 (uri (pypi-uri "natsort" version))
12680 (sha256
12681 (base32
12682 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
12683 (native-inputs
12684 `(("python2-pathlib" ,python2-pathlib)
12685 ,@(package-native-inputs base))))))
12686
12687 (define-public glances
12688 (package
12689 (name "glances")
12690 (version "3.1.4")
12691 (source
12692 (origin
12693 (method url-fetch)
12694 (uri (pypi-uri "Glances" version))
12695 (sha256
12696 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
12697 (modules '((guix build utils)))
12698 (snippet
12699 '(begin
12700 ;; Glances phones PyPI for weekly update checks by default.
12701 ;; Disable these. The user can re-enable them if desired.
12702 (substitute* "glances/outdated.py"
12703 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
12704 (string-append indentation
12705 "self.args.disable_check_update = True\n"
12706 line)))
12707 #t))))
12708 (build-system python-build-system)
12709 (propagated-inputs
12710 `(("python-future" ,python-future)
12711 ("python-psutil" ,python-psutil)))
12712 (home-page "https://github.com/nicolargo/glances")
12713 (synopsis "Cross-platform curses-based monitoring tool")
12714 (description
12715 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12716 Glances uses the PsUtil library to get information from your system. It
12717 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12718 (license license:lgpl3+)))
12719
12720 (define-public python-glances
12721 (deprecated-package "python-glances" glances))
12722
12723 (define-public python-graphql-core
12724 (package
12725 (name "python-graphql-core")
12726 (version "0.5.3")
12727 (source
12728 (origin
12729 (method url-fetch)
12730 (uri (pypi-uri "graphql-core" version))
12731 (sha256
12732 (base32
12733 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12734 (build-system python-build-system)
12735 (arguments
12736 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12737 #:phases
12738 (modify-phases %standard-phases
12739 (add-after 'unpack 'patch-hardcoded-version
12740 (lambda _ (substitute*
12741 "setup.py"
12742 (("'gevent==1.1rc1'") "'gevent'"))
12743 #t)))))
12744 (native-inputs
12745 `(("python-gevent" ,python-gevent)
12746 ("python-mock" ,python-mock)
12747 ("python-pytest-mock" ,python-pytest-mock)))
12748 (propagated-inputs
12749 `(("python-promise" ,python-promise)
12750 ("python-six" ,python-six)))
12751 (home-page "https://github.com/graphql-python/graphql-core")
12752 (synopsis "GraphQL implementation for Python")
12753 (description
12754 "GraphQL implementation for Python. GraphQL is a data query language and
12755 runtime designed and used to request and deliver data to mobile and web apps.
12756 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12757 to Python.")
12758 (license license:expat)))
12759
12760 (define-public python2-graphql-core
12761 (package-with-python2 python-graphql-core))
12762
12763 (define-public python-graphql-relay
12764 (package
12765 (name "python-graphql-relay")
12766 (version "0.4.5")
12767 (source
12768 (origin
12769 (method url-fetch)
12770 (uri (pypi-uri "graphql-relay" version))
12771 (sha256
12772 (base32
12773 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12774 (build-system python-build-system)
12775 (arguments
12776 '(#:tests? #f)) ; The tests are not distributed
12777 (propagated-inputs
12778 `(("python-graphql-core" ,python-graphql-core)
12779 ("python-promise" ,python-promise)
12780 ("python-six" ,python-six)))
12781 (home-page "https://github.com/graphql-python/graphql-relay-py")
12782 (synopsis "Relay implementation for Python")
12783 (description
12784 "This is a library to allow the easy creation of Relay-compliant servers
12785 using the GraphQL Python reference implementation of a GraphQL server. It
12786 should be noted that the code is a exact port of the original
12787 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12788 from Facebook.")
12789 (license license:expat)))
12790
12791 (define-public python2-graphql-relay
12792 (package-with-python2 python-graphql-relay))
12793
12794 (define-public python-graphene
12795 (package
12796 (name "python-graphene")
12797 (version "0.10.2")
12798 (source
12799 (origin
12800 (method url-fetch)
12801 (uri (pypi-uri "graphene" version))
12802 (sha256
12803 (base32
12804 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12805 (build-system python-build-system)
12806 (propagated-inputs
12807 `(("python-graphql-core" ,python-graphql-core)
12808 ("python-graphql-relay" ,python-graphql-relay)
12809 ("python-iso8601" ,python-iso8601)
12810 ("python-promise" ,python-promise)
12811 ("python-six" ,python-six)))
12812 (arguments
12813 `(#:tests? #f)) ; no tests/ in the PyPI tarball
12814 (home-page "https://graphene-python.org/")
12815 (synopsis "GraphQL Framework for Python")
12816 (description
12817 "Graphene is a Python library for building GraphQL schemas/types.
12818 A GraphQL schema describes your data model, and provides a GraphQL server
12819 with an associated set of resolve methods that know how to fetch data.")
12820 (properties `((python2-variant . ,(delay python2-graphene))))
12821 (license license:expat)))
12822
12823 (define-public python2-graphene
12824 (let ((base (package-with-python2
12825 (strip-python2-variant python-graphene))))
12826 (package (inherit base)
12827 (native-inputs
12828 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12829 ,@(package-native-inputs base))))))
12830
12831 (define-public python-nautilus
12832 (package
12833 (name "python-nautilus")
12834 (version "0.4.9")
12835 (source
12836 (origin
12837 (method url-fetch)
12838 (uri (pypi-uri "nautilus" version))
12839 (sha256
12840 (base32
12841 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12842 (build-system python-build-system)
12843 (arguments `(#:tests? #f)) ; fails to import test modules
12844 (propagated-inputs
12845 `(("python-bcrypt" ,python-bcrypt)
12846 ("python-click" ,python-click)
12847 ("python-consul" ,python-consul)
12848 ("python-graphene" ,python-graphene)
12849 ("python-jinja2" ,python-jinja2)
12850 ("python-peewee" ,python-peewee)
12851 ("python-pika" ,python-pika)
12852 ("python-tornado" ,python-tornado)
12853 ("python-wtforms" ,python-wtforms)))
12854 (native-inputs
12855 `(("python-nose2" ,python-nose2)))
12856 (home-page "https://github.com/AlecAivazis/nautilus")
12857 (synopsis "Library for creating microservice applications")
12858 (description
12859 "Nautilus is a framework for flux based microservices that looks to
12860 provide extendible implementations of common aspects of a cloud so that you can
12861 focus on building massively scalable web applications.")
12862 (license license:expat)))
12863
12864 (define-public python-random2
12865 (package
12866 (name "python-random2")
12867 (version "1.0.1")
12868 (source (origin
12869 (method url-fetch)
12870 (uri (pypi-uri "random2" version ".zip"))
12871 (sha256
12872 (base32
12873 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
12874 (build-system python-build-system)
12875 (native-inputs `(("unzip" ,unzip)))
12876 (home-page "http://pypi.python.org/pypi/random2")
12877 (synopsis "Python 3 version of the Python 2 @code{random} module")
12878 (description
12879 "This package provides a Python 3 ported version of Python 2.7’s
12880 @code{random} module. It has also been back-ported to work in Python 2.6.
12881
12882 In Python 3, the implementation of @code{randrange()} was changed, so that
12883 even with the same seed you get different sequences in Python 2 and 3.
12884
12885 This package closes that gap, allowing stable random number generation
12886 between the different Python versions.")
12887 (license license:psfl)))
12888
12889 (define-public python2-random2
12890 (package-with-python2 python-random2))
12891
12892 (define-public python-snowballstemmer
12893 (package
12894 (name "python-snowballstemmer")
12895 (version "2.0.0")
12896 (source (origin
12897 (method url-fetch)
12898 (uri (pypi-uri "snowballstemmer" version))
12899 (sha256
12900 (base32
12901 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
12902 (build-system python-build-system)
12903 (arguments
12904 `(;; No tests exist
12905 #:tests? #f))
12906 (home-page "https://github.com/shibukawa/snowball_py")
12907 (synopsis "Snowball stemming library collection for Python")
12908 (description "This package provides 16 word stemmer algorithms generated
12909 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12910 English stemmer.")
12911 (license license:bsd-3)))
12912
12913 (define-public python2-snowballstemmer
12914 (package-with-python2 python-snowballstemmer))
12915
12916 (define-public python-setproctitle
12917 (package
12918 (name "python-setproctitle")
12919 (version "1.1.10")
12920 (source
12921 (origin
12922 (method url-fetch)
12923 (uri (pypi-uri "setproctitle" version))
12924 (sha256
12925 (base32
12926 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12927 (build-system python-build-system)
12928 (arguments
12929 '(#:phases
12930 (modify-phases %standard-phases
12931 (add-before 'check 'patch-Makefile
12932 ;; Stricly this is only required for the python2 variant.
12933 ;; But adding a phase in an inherited package seems to be
12934 ;; cumbersum. So we patch even for python3.
12935 (lambda _
12936 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12937 (when nose
12938 (substitute* "Makefile"
12939 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12940 (string-append nose "/bin/nosetests "))))
12941 #t)))
12942 (replace 'check
12943 (lambda _
12944 (setenv "PYTHON" (or (which "python3") (which "python")))
12945 (setenv "PYCONFIG" (or (which "python3-config")
12946 (which "python-config")))
12947 (setenv "CC" "gcc")
12948 ;; No need to extend PYTHONPATH to find the built package, since
12949 ;; the Makefile will build anyway
12950 (invoke "make" "check"))))))
12951 (native-inputs
12952 `(("procps" ,procps))) ; required for tests
12953 (home-page
12954 "https://github.com/dvarrazzo/py-setproctitle")
12955 (synopsis
12956 "Setproctitle implementation for Python to customize the process title")
12957 (description "The library allows a process to change its title (as displayed
12958 by system tools such as ps and top).
12959
12960 Changing the title is mostly useful in multi-process systems, for
12961 example when a master process is forked: changing the children's title
12962 allows identifying the task each process is busy with. The technique
12963 is used by PostgreSQL and the OpenSSH Server for example.")
12964 (license license:bsd-3)
12965 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12966
12967 (define-public python2-setproctitle
12968 (let ((base (package-with-python2
12969 (strip-python2-variant python-setproctitle))))
12970 (package
12971 (inherit base)
12972 (native-inputs `(("python2-nose" ,python2-nose)
12973 ,@(package-native-inputs base))))))
12974
12975 (define-public python-validictory
12976 (package
12977 (name "python-validictory")
12978 (version "1.0.1")
12979 (source
12980 (origin
12981 (method url-fetch)
12982 (uri (pypi-uri "validictory" version))
12983 (sha256
12984 (base32
12985 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12986 (build-system python-build-system)
12987 (arguments
12988 '(#:phases
12989 (modify-phases %standard-phases
12990 (add-after 'unpack 'bootstrap
12991 ;; Move the tests out of the package directory to avoid
12992 ;; packaging them.
12993 (lambda* _
12994 (rename-file "validictory/tests" "tests")
12995 (delete-file "tests/__init__.py")))
12996 (replace 'check
12997 (lambda _
12998 ;; Extend PYTHONPATH so the built package will be found.
12999 (setenv "PYTHONPATH"
13000 (string-append (getcwd) "/build/lib:"
13001 (getenv "PYTHONPATH")))
13002 (invoke "py.test" "-vv" ))))))
13003 (native-inputs
13004 `(("python-pytest" ,python-pytest)))
13005 (home-page
13006 "https://github.com/jamesturk/validictory")
13007 (synopsis "General purpose Python data validator")
13008 (description "It allows validation of arbitrary Python data structures.
13009
13010 The schema format is based on the JSON Schema
13011 proposal (http://json-schema.org), so combined with json the library is also
13012 useful as a validator for JSON data.")
13013 (license license:expat)))
13014
13015 (define-public python2-validictory
13016 (package-with-python2 python-validictory))
13017
13018 (define-public python-pyelftools
13019 (package
13020 (name "python-pyelftools")
13021 (version "0.25")
13022 (source
13023 (origin
13024 (method url-fetch)
13025 (uri (pypi-uri "pyelftools" version))
13026 (sha256
13027 (base32
13028 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
13029 (build-system python-build-system)
13030 (arguments
13031 `(#:phases
13032 (modify-phases %standard-phases
13033 (add-before 'check 'set-pythonpath
13034 (lambda _
13035 (setenv "PYTHONPATH"
13036 (string-append
13037 (getcwd) "/test/"
13038 ":" (getenv "PYTHONPATH")))
13039 #t)))))
13040 (home-page
13041 "https://github.com/eliben/pyelftools")
13042 (synopsis
13043 "Analyze binary and library file information")
13044 (description "This Python library provides interfaces for parsing and
13045 analyzing two binary and library file formats; the Executable and Linking
13046 Format (ELF), and debugging information in the Debugging With Attributed
13047 Record Format (DWARF).")
13048 (license license:public-domain)))
13049
13050 (define-public python-pyev
13051 (package
13052 (name "python-pyev")
13053 (version "0.9.0")
13054 (source
13055 (origin
13056 (method url-fetch)
13057 (uri (pypi-uri "pyev" version))
13058 (sha256
13059 (base32
13060 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13061 (build-system python-build-system)
13062 (arguments
13063 `(#:tests? #f ; no test suite
13064 #:phases
13065 (modify-phases %standard-phases
13066 (add-after 'unpack 'patch
13067 (lambda* (#:key inputs #:allow-other-keys)
13068 (let ((libev (string-append (assoc-ref inputs "libev")
13069 "/lib/libev.so.4")))
13070 (substitute* "setup.py"
13071 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13072 (string-append "libev_dll_name = \"" libev "\"")))))))))
13073 (inputs
13074 `(("libev" ,libev)))
13075 (home-page "http://pythonhosted.org/pyev/")
13076 (synopsis "Python libev interface")
13077 (description "Pyev provides a Python interface to libev.")
13078 (license license:gpl3)))
13079
13080 (define-public python2-pyev
13081 (package-with-python2 python-pyev))
13082
13083 (define-public python-imagesize
13084 (package
13085 (name "python-imagesize")
13086 (version "1.2.0")
13087 (source
13088 (origin
13089 (method url-fetch)
13090 (uri (pypi-uri "imagesize" version))
13091 (sha256
13092 (base32
13093 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
13094 (build-system python-build-system)
13095 (home-page "https://github.com/shibukawa/imagesize_py")
13096 (synopsis "Gets image size of files in various formats in Python")
13097 (description
13098 "This package allows determination of image size from
13099 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13100 (license license:expat)))
13101
13102 (define-public python2-imagesize
13103 (package-with-python2 python-imagesize))
13104
13105 (define-public python-termstyle
13106 (package
13107 (name "python-termstyle")
13108 (version "0.1.11")
13109 (source
13110 (origin
13111 (method url-fetch)
13112 (uri (pypi-uri "termstyle" version))
13113 (sha256
13114 (base32
13115 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13116 (build-system python-build-system)
13117 (arguments
13118 '(#:phases
13119 (modify-phases %standard-phases
13120 (replace 'check
13121 (lambda _
13122 (invoke "python" "test3.py"))))))
13123 (home-page "https://github.com/gfxmonk/termstyle")
13124 (synopsis "Console text coloring for Python")
13125 (description "This package provides console text coloring for Python.")
13126 (license license:bsd-3)))
13127
13128 (define-public python-argcomplete
13129 (package
13130 (name "python-argcomplete")
13131 (version "1.11.1")
13132 (source
13133 (origin
13134 (method url-fetch)
13135 (uri (pypi-uri "argcomplete" version))
13136 (sha256
13137 (base32
13138 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
13139 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
13140 (build-system python-build-system)
13141 (native-inputs
13142 `(("python-coverage" ,python-coverage)
13143 ("python-flake8" ,python-flake8)
13144 ("python-pexpect" ,python-pexpect)
13145 ("python-wheel" ,python-wheel)
13146 ("tcsh" ,tcsh)
13147 ("fish" ,fish)
13148 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
13149 (home-page "https://github.com/kislyuk/argcomplete")
13150 (synopsis "Shell tab completion for Python argparse")
13151 (description "argcomplete provides extensible command line tab completion
13152 of arguments and options for Python scripts using @code{argparse}. It's
13153 particularly useful for programs with many options or sub-parsers that can
13154 dynamically suggest completions; for example, when browsing resources over the
13155 network.")
13156 (license license:asl2.0)))
13157
13158 (define-public python2-argcomplete
13159 (package-with-python2 python-argcomplete))
13160
13161 (define-public python-xopen
13162 (package
13163 (name "python-xopen")
13164 (version "0.5.0")
13165 (source
13166 (origin
13167 (method url-fetch)
13168 (uri (pypi-uri "xopen" version))
13169 (sha256
13170 (base32
13171 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
13172 (build-system python-build-system)
13173 (propagated-inputs
13174 `(("python-setuptools-scm" ,python-setuptools-scm)))
13175 (home-page "https://github.com/marcelm/xopen/")
13176 (synopsis "Open compressed files transparently")
13177 (description "This module provides an @code{xopen} function that works like
13178 Python's built-in @code{open} function, but can also deal with compressed files.
13179 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13180 recognized by their file extensions. The focus is on being as efficient as
13181 possible on all supported Python versions.")
13182 (license license:expat)))
13183
13184 (define-public python2-xopen
13185 (let ((base (package-with-python2
13186 (strip-python2-variant python-xopen))))
13187 (package
13188 (inherit base)
13189 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
13190 ,@(package-propagated-inputs base))))))
13191
13192 (define-public python-cheetah
13193 (package
13194 (name "python-cheetah")
13195 (version "3.2.4")
13196 (source
13197 (origin
13198 (method url-fetch)
13199 (uri (pypi-uri "Cheetah3" version))
13200 (sha256
13201 (base32
13202 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
13203 (build-system python-build-system)
13204 (arguments
13205 `(#:modules ((guix build utils)
13206 (guix build python-build-system)
13207 (ice-9 ftw)
13208 (srfi srfi-1)
13209 (srfi srfi-26))
13210 #:phases (modify-phases %standard-phases
13211 (add-after 'unpack 'use-absolute-python
13212 (lambda _
13213 (substitute* "Cheetah/CheetahWrapper.py"
13214 (("#!/usr/bin/env python")
13215 (string-append "#!" (which "python"))))
13216 #t))
13217 (add-after 'unpack 'fix-tests
13218 (lambda _
13219 (substitute* "Cheetah/Tests/ImportHooks.py"
13220 (("os.path.dirname\\(__file__\\)")
13221 (string-append "'" (getcwd) "/Cheetah/Tests'")))
13222 #t))
13223 (replace 'check
13224 (lambda _
13225 (let ((cwd (getcwd)))
13226 (setenv "PYTHONPATH"
13227 (string-append
13228 cwd "/build/"
13229 (find (cut string-prefix? "lib" <>)
13230 (scandir (string-append cwd "/build")))
13231 ":" (getenv "PYTHONPATH")))
13232 (setenv "PATH"
13233 (string-append (getenv "PATH")
13234 ":" cwd "/bin"))
13235 (setenv "TMPDIR" "/tmp")
13236
13237 (substitute* "Cheetah/Tests/Test.py"
13238 (("unittest.TextTestRunner\\(\\)")
13239 "unittest.TextTestRunner(verbosity=2)"))
13240
13241 (invoke "python" "Cheetah/Tests/Test.py")))))))
13242 (propagated-inputs
13243 `(("python-markdown" ,python-markdown))) ;optional
13244 (home-page "https://cheetahtemplate.org/")
13245 (synopsis "Template engine")
13246 (description "Cheetah is a text-based template engine and Python code
13247 generator.
13248
13249 Cheetah can be used as a standalone templating utility or referenced as
13250 a library from other Python applications. It has many potential uses,
13251 but web developers looking for a viable alternative to ASP, JSP, PHP and
13252 PSP are expected to be its principle user group.
13253
13254 Features:
13255 @enumerate
13256 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13257 text-based format.
13258 @item Cleanly separates content, graphic design, and program code.
13259 @item Blends the power and flexibility of Python with a simple template language
13260 that non-programmers can understand.
13261 @item Gives template writers full access to any Python data structure, module,
13262 function, object, or method in their templates.
13263 @item Makes code reuse easy by providing an object-orientated interface to
13264 templates that is accessible from Python code or other Cheetah templates.
13265 One template can subclass another and selectively reimplement sections of it.
13266 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13267 improve the performance of a dynamic website.
13268 @item Compiles templates into optimized, yet readable, Python code.
13269 @end enumerate")
13270 (license (license:x11-style "file://LICENSE"))))
13271
13272 (define-public python2-cheetah
13273 (package-with-python2 python-cheetah))
13274
13275 (define-public python-dulwich
13276 (package
13277 (name "python-dulwich")
13278 (version "0.19.16")
13279 (source
13280 (origin
13281 (method url-fetch)
13282 (uri (list (string-append "https://www.dulwich.io/releases/"
13283 "dulwich-" version ".tar.gz")
13284 (pypi-uri "dulwich" version)))
13285 (sha256
13286 (base32
13287 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
13288 (build-system python-build-system)
13289 (arguments
13290 `(#:phases
13291 (modify-phases %standard-phases
13292 (add-before 'check 'fix-tests
13293 (lambda* (#:key inputs #:allow-other-keys)
13294 ;; The tests use Popen with a custom environment which doesn't
13295 ;; include PATH.
13296 (substitute* "dulwich/tests/compat/utils.py"
13297 (("'git'") (string-append "'"
13298 (which "git")
13299 "'")))
13300 (substitute* '("dulwich/tests/test_repository.py"
13301 "dulwich/tests/test_hooks.py")
13302 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13303 (setenv "TEST_RUNNER" "unittest")
13304 (setenv "PYTHONHASHSEED" "random")
13305 #t)))))
13306 (propagated-inputs
13307 `(("python-fastimport" ,python-fastimport)
13308 ("python-urllib3" ,python-urllib3)))
13309 (native-inputs
13310 `(("python-mock" ,python-mock)
13311 ("python-geventhttpclient" ,python-geventhttpclient)
13312 ("git" ,git)))
13313 (home-page "https://www.dulwich.io/")
13314 (synopsis "Git implementation in Python")
13315 (description "Dulwich is an implementation of the Git file formats and
13316 protocols written in pure Python.")
13317 ;; Can be used with either license.
13318 (license (list license:asl2.0 license:gpl2+))))
13319
13320 (define-public python2-dulwich
13321 (package-with-python2 python-dulwich))
13322
13323 (define-public python-pbkdf2
13324 (package
13325 (name "python-pbkdf2")
13326 (version "1.3")
13327 (source
13328 (origin
13329 (method url-fetch)
13330 (uri (pypi-uri "pbkdf2" version))
13331 (sha256
13332 (base32
13333 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13334 (build-system python-build-system)
13335 (arguments
13336 '(#:phases
13337 (modify-phases %standard-phases
13338 (replace 'check
13339 (lambda _
13340 (setenv "PYTHONPATH"
13341 (string-append (getcwd) "/build/lib:"
13342 (getenv "PYTHONPATH")))
13343 (invoke "python" "test/test_pbkdf2.py"))))))
13344 (propagated-inputs
13345 `(("python-pycrypto" ,python-pycrypto))) ; optional
13346 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
13347 (synopsis "Password-based key derivation")
13348 (description "This module implements the password-based key derivation
13349 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13350
13351 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13352 is part of the RSA Public Key Cryptography Standards series. The provided
13353 implementation takes a password or a passphrase and a salt value (and
13354 optionally a iteration count, a digest module, and a MAC module) and provides
13355 a file-like object from which an arbitrarly-sized key can be read.")
13356 (license license:expat)))
13357
13358 (define-public python2-pbkdf2
13359 (package-with-python2 python-pbkdf2))
13360
13361 (define-public python-qrcode
13362 (package
13363 (name "python-qrcode")
13364 (version "6.1")
13365 (source
13366 (origin
13367 (method url-fetch)
13368 (uri (pypi-uri "qrcode" version))
13369 (sha256
13370 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
13371 (build-system python-build-system)
13372 (arguments
13373 ;; FIXME: Tests require packaging 'pymaging'.
13374 '(#:tests? #f))
13375 (propagated-inputs
13376 `(("python-lxml" ,python-lxml) ; for SVG output
13377 ("python-pillow" ,python-pillow) ; for PNG output
13378 ("python-six" ,python-six)))
13379 (home-page "https://github.com/lincolnloop/python-qrcode")
13380 (synopsis "QR Code image generator")
13381 (description "This package provides a pure Python QR Code generator
13382 module. It uses the Python Imaging Library (PIL) to allow for the generation
13383 of QR Codes.
13384
13385 In addition this package provides a command line tool to generate QR codes and
13386 either write these QR codes to a file or do the output as ascii art at the
13387 console.")
13388 (license license:bsd-3)))
13389
13390 (define-public python2-qrcode
13391 (package-with-python2 python-qrcode))
13392
13393 (define-public python-rst2ansi
13394 (package
13395 (name "python-rst2ansi")
13396 (version "0.1.5")
13397 (source
13398 (origin
13399 (method url-fetch)
13400 (uri (pypi-uri "rst2ansi" version))
13401 (sha256
13402 (base32
13403 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13404 (build-system python-build-system)
13405 (propagated-inputs
13406 `(("python-docutils" ,python-docutils)))
13407 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13408 (synopsis "Convert RST to ANSI-decorated console output")
13409 (description
13410 "Python module dedicated to rendering RST (reStructuredText) documents
13411 to ansi-escaped strings suitable for display in a terminal.")
13412 (license license:expat)))
13413
13414 (define-public python-ansi2html
13415 (package
13416 (name "python-ansi2html")
13417 (version "1.2.0")
13418 (source
13419 (origin
13420 (method url-fetch)
13421 (uri (pypi-uri "ansi2html" version))
13422 (sha256
13423 (base32
13424 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13425 (build-system python-build-system)
13426 (native-inputs
13427 `(("python-mock" ,python-mock)
13428 ("python-nose" ,python-nose)))
13429 (propagated-inputs
13430 `(("python-six" ,python-six)))
13431 (home-page "https://github.com/ralphbean/ansi2html")
13432 (synopsis "Convert ANSI-decorated console output to HTML")
13433 (description
13434 "@command{ansi2html} is a Python library and command line utility for
13435 convering text with ANSI color codes to HTML or LaTeX.")
13436 (license license:gpl3+)))
13437
13438 (define-public python2-ansi2html
13439 (package-with-python2 python-ansi2html))
13440
13441 (define-public python-ddt
13442 (package
13443 (name "python-ddt")
13444 (version "1.1.3")
13445 (source
13446 (origin
13447 (method url-fetch)
13448 (uri (pypi-uri "ddt" version))
13449 (sha256
13450 (base32
13451 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
13452 (build-system python-build-system)
13453 (native-inputs
13454 `(("python-mock" ,python-mock)
13455 ("python-nose" ,python-nose)))
13456 (propagated-inputs
13457 `(("python-six" ,python-six)
13458 ("python-pyyaml" ,python-pyyaml)))
13459 (home-page "https://github.com/txels/ddt")
13460 (synopsis "Data-Driven Tests")
13461 (description
13462 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
13463 running it with different test data, and make it appear as multiple test
13464 cases.")
13465 (license license:expat)))
13466
13467 (define-public python2-ddt
13468 (package-with-python2 python-ddt))
13469
13470 (define-public python-pycountry
13471 (package
13472 (name "python-pycountry")
13473 (version "18.5.26")
13474 (source
13475 (origin
13476 (method url-fetch)
13477 (uri (pypi-uri "pycountry" version))
13478 (sha256
13479 (base32
13480 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
13481 (build-system python-build-system)
13482 (home-page "https://bitbucket.org/flyingcircus/pycountry")
13483 (synopsis "ISO databases for languages, countries, currencies, etc.")
13484 (description
13485 "@code{pycountry} provides the ISO databases for the standards:
13486 @enumerate
13487 @item 639-3 (Languages)
13488 @item 3166 (Countries)
13489 @item 3166-3 (Deleted Countries)
13490 @item 3166-2 (Subdivisions of countries)
13491 @item 4217 (Currencies)
13492 @item 15924 (Scripts)
13493 @end enumerate
13494 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
13495 through a Python API.")
13496 (license license:lgpl2.1+)))
13497
13498 (define-public python2-pycountry
13499 (package-with-python2 python-pycountry))
13500
13501 (define-public python-pycosat
13502 (package
13503 (name "python-pycosat")
13504 (version "0.6.1")
13505 (source
13506 (origin
13507 (method url-fetch)
13508 (uri (pypi-uri "pycosat" version))
13509 (sha256
13510 (base32
13511 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13512 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13513 (build-system python-build-system)
13514 (home-page "https://github.com/ContinuumIO/pycosat")
13515 (synopsis "Bindings to picosat (a SAT solver)")
13516 (description
13517 "This package provides efficient Python bindings to @code{picosat} on
13518 the C level. When importing pycosat, the @code{picosat} solver becomes part
13519 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13520 Problem} (SAT) solver.")
13521 (license license:expat)))
13522
13523 (define-public python2-pycosat
13524 (package-with-python2 python-pycosat))
13525
13526 (define-public python2-ruamel.ordereddict
13527 (package
13528 (name "python2-ruamel.ordereddict")
13529 (version "0.4.9")
13530 (source
13531 (origin
13532 (method url-fetch)
13533 (uri (pypi-uri "ruamel.ordereddict" version))
13534 (sha256
13535 (base32
13536 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13537 (build-system python-build-system)
13538 (arguments
13539 `(#:python ,python-2
13540 #:phases
13541 (modify-phases %standard-phases
13542 (delete 'check)
13543 (add-after 'install 'check
13544 (lambda* (#:key inputs outputs #:allow-other-keys)
13545 (add-installed-pythonpath inputs outputs)
13546 (invoke "python" "test/testordereddict.py"))))))
13547 (home-page "https://bitbucket.org/ruamel/ordereddict")
13548 (synopsis "Version of dict that keeps keys in insertion order")
13549 (description
13550 "This is an implementation of an ordered dictionary with @dfn{Key
13551 Insertion Order} (KIO: updates of values do not affect the position of the
13552 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13553 removed and put at the back). The standard library module @code{OrderedDict},
13554 implemented later, implements a subset of @code{ordereddict} functionality.
13555 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13556 Order} (KSO, no sorting function can be specified, but a transform can be
13557 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13558 (license license:expat)))
13559
13560 (define-public python-pypeg2
13561 (package
13562 (name "python-pypeg2")
13563 (version "2.15.2")
13564 (source
13565 (origin
13566 (method url-fetch)
13567 (uri (pypi-uri "pyPEG2" version))
13568 (sha256
13569 (base32
13570 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13571 (build-system python-build-system)
13572 (propagated-inputs `(("python-lxml" ,python-lxml)))
13573 (arguments
13574 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13575 '(#:tests? #f))
13576 (home-page "https://fdik.org/pyPEG/")
13577 (synopsis "Parsering Expression Grammars in Python")
13578 (description "PyPEG is an intrinsic parser interpreter framework for
13579 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13580 parse many formal languages.")
13581 (license license:gpl2)))
13582
13583 (define-public python-incremental
13584 (package
13585 (name "python-incremental")
13586 (version "17.5.0")
13587 (source
13588 (origin
13589 (method url-fetch)
13590 (uri (pypi-uri "incremental" version))
13591 (sha256
13592 (base32
13593 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
13594 (build-system python-build-system)
13595 (home-page "https://github.com/hawkowl/incremental")
13596 (synopsis "Library for versioning Python projects")
13597 (description "Incremental is a small library that versions your Python
13598 projects.")
13599 (license license:expat)))
13600
13601 (define-public python2-incremental
13602 (package-with-python2 python-incremental))
13603
13604 (define-public python-invoke
13605 (package
13606 (name "python-invoke")
13607 (home-page "https://www.pyinvoke.org/")
13608 (version "1.3.0")
13609 (source (origin
13610 (method url-fetch)
13611 (uri (pypi-uri "invoke" version))
13612 (sha256
13613 (base32
13614 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
13615 (build-system python-build-system)
13616 (arguments
13617 ;; XXX: Requires many dependencies that are not yet in Guix.
13618 `(#:tests? #f))
13619 (synopsis "Pythonic task execution")
13620 (description
13621 "Invoke is a Python task execution tool and library, drawing inspiration
13622 from various sources to arrive at a powerful and clean feature set. It is
13623 evolved from the Fabric project, but focuses on local and abstract concerns
13624 instead of servers and network commands.")
13625 (license license:bsd-3)))
13626
13627 (define-public python2-invoke
13628 (package-with-python2 python-invoke))
13629
13630 (define-public python-automat
13631 (package
13632 (name "python-automat")
13633 (version "20.2.0")
13634 (source (origin
13635 (method url-fetch)
13636 (uri (pypi-uri "Automat" version))
13637 (sha256
13638 (base32
13639 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
13640 (build-system python-build-system)
13641 ;; We disable the tests because they require python-twisted, while
13642 ;; python-twisted depends on python-automat. Twisted is optional, but the
13643 ;; tests fail if it is not available. Also see
13644 ;; <https://github.com/glyph/automat/issues/71>.
13645 (arguments '(#:tests? #f))
13646 (native-inputs
13647 `(("python-m2r" ,python-m2r)
13648 ("python-setuptools-scm" ,python-setuptools-scm)
13649 ("python-graphviz" ,python-graphviz)))
13650 (propagated-inputs
13651 `(("python-six" ,python-six)
13652 ("python-attrs" ,python-attrs)))
13653 (home-page "https://github.com/glyph/Automat")
13654 (synopsis "Self-service finite-state machines")
13655 (description "Automat is a library for concise, idiomatic Python
13656 expression of finite-state automata (particularly deterministic finite-state
13657 transducers).")
13658 (license license:expat)))
13659
13660 (define-public python2-automat
13661 (package-with-python2 python-automat))
13662
13663 (define-public python-m2r
13664 (package
13665 (name "python-m2r")
13666 (version "0.2.1")
13667 (source (origin
13668 (method url-fetch)
13669 (uri (pypi-uri "m2r" version))
13670 (sha256
13671 (base32
13672 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
13673 (build-system python-build-system)
13674 (propagated-inputs
13675 `(("python-docutils" ,python-docutils)
13676 ("python-mistune" ,python-mistune)))
13677 (native-inputs
13678 `(("python-pygments" ,python-pygments)
13679 ("python-mock" ,python-mock)))
13680 (home-page "https://github.com/miyakogi/m2r")
13681 (synopsis "Markdown to reStructuredText converter")
13682 (description "M2R converts a markdown file including reST markups to valid
13683 reST format.")
13684 (license license:expat)))
13685
13686 (define-public python2-m2r
13687 (package-with-python2 python-m2r))
13688
13689 (define-public python-constantly
13690 (package
13691 (name "python-constantly")
13692 (version "15.1.0")
13693 (source (origin
13694 (method url-fetch)
13695 (uri (pypi-uri "constantly" version))
13696 (sha256
13697 (base32
13698 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
13699 (build-system python-build-system)
13700 (home-page "https://github.com/twisted/constantly")
13701 (synopsis "Symbolic constants in Python")
13702 (description "Constantly is a Python library that provides symbolic
13703 constant support. It includes collections and constants with text, numeric,
13704 and bit flag values.")
13705 (license license:expat)))
13706
13707 (define-public python2-constantly
13708 (package-with-python2 python-constantly))
13709
13710 (define-public python-attrs
13711 (package
13712 (name "python-attrs")
13713 (version "19.3.0")
13714 (source (origin
13715 (method url-fetch)
13716 (uri (pypi-uri "attrs" version))
13717 (sha256
13718 (base32
13719 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
13720 (build-system python-build-system)
13721 (arguments
13722 `(#:modules ((guix build utils)
13723 (guix build python-build-system)
13724 (ice-9 ftw)
13725 (srfi srfi-1)
13726 (srfi srfi-26))
13727 #:phases (modify-phases %standard-phases
13728 (replace 'check
13729 (lambda _
13730 (let ((cwd (getcwd)))
13731 (setenv "PYTHONPATH"
13732 (string-append
13733 cwd "/build/"
13734 (find (cut string-prefix? "lib" <>)
13735 (scandir (string-append cwd "/build")))
13736 ":"
13737 (getenv "PYTHONPATH")))
13738 (invoke "python" "-m" "pytest")))))))
13739 (native-inputs
13740 `(("python-coverage" ,python-coverage)
13741 ("python-hypothesis" ,python-hypothesis)
13742 ("python-pympler" ,python-pympler)
13743 ("python-pytest" ,python-pytest)
13744 ("python-six" ,python-six)
13745 ("python-sphinx" ,python-sphinx)
13746 ("python-zope-interface" ,python-zope-interface)))
13747 (home-page "https://github.com/python-attrs/attrs/")
13748 (synopsis "Attributes without boilerplate")
13749 (description "@code{attrs} is a Python package with class decorators that
13750 ease the chores of implementing the most common attribute-related object
13751 protocols.")
13752 (license license:expat)))
13753
13754 (define-public python2-attrs
13755 (package-with-python2 python-attrs))
13756
13757 (define-public python-attrs-bootstrap
13758 (package
13759 (inherit python-attrs)
13760 (name "python-attrs-bootstrap")
13761 (native-inputs `())
13762 (arguments `(#:tests? #f))))
13763
13764 (define-public python2-attrs-bootstrap
13765 (package-with-python2 python-attrs-bootstrap))
13766
13767 (define-public python2-cliapp
13768 (package
13769 (name "python2-cliapp")
13770 (version "1.20180812.1")
13771 (source
13772 (origin
13773 (method url-fetch)
13774 (uri (string-append
13775 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13776 version ".tar.gz"))
13777 (sha256
13778 (base32
13779 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
13780 (build-system python-build-system)
13781 (arguments
13782 `(#:python ,python-2
13783 #:phases
13784 (modify-phases %standard-phases
13785 ;; check phase needs to be run before the build phase. If not,
13786 ;; coverage-test-runner looks for tests for the built source files,
13787 ;; and fails.
13788 (delete 'check)
13789 (add-before 'build 'check
13790 (lambda _
13791 ;; Disable python3 tests
13792 (substitute* "check"
13793 (("python3") "# python3"))
13794 (invoke "./check"))))))
13795 (native-inputs
13796 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13797 ("python2-pep8" ,python2-pep8)))
13798 (propagated-inputs
13799 `(("python2-pyaml" ,python2-pyaml)))
13800 (home-page "https://liw.fi/cliapp/")
13801 (synopsis "Python framework for command line programs")
13802 (description "@code{python2-cliapp} is a python framework for
13803 command line programs. It contains the typical stuff such programs
13804 need to do, such as parsing the command line for options, and
13805 iterating over input files.")
13806 (license license:gpl2+)))
13807
13808 (define-public python2-ttystatus
13809 (package
13810 (name "python2-ttystatus")
13811 (version "0.36")
13812 (source
13813 (origin
13814 (method url-fetch)
13815 (uri (string-append
13816 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13817 version ".tar.gz"))
13818 (sha256
13819 (base32
13820 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
13821 (build-system python-build-system)
13822 (native-inputs
13823 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13824 ("python2-pep8" ,python2-pep8)))
13825 (arguments
13826 `(#:python ,python-2
13827 #:phases
13828 (modify-phases %standard-phases
13829 ;; check phase needs to be run before the build phase. If not,
13830 ;; coverage-test-runner looks for tests for the built source files,
13831 ;; and fails.
13832 (delete 'check)
13833 (add-before 'build 'check
13834 (lambda _ (invoke "make" "check"))))))
13835 (home-page "https://liw.fi/ttystatus/")
13836 (synopsis "Python library for showing progress reporting and
13837 status updates on terminals")
13838 (description "@code{python2-ttystatus} is a python library for
13839 showing progress reporting and status updates on terminals, for
13840 command line programs. Output is automatically adapted to the width
13841 of the terminal: truncated if it does not fit, and resized if the
13842 terminal size changes.")
13843 (license license:gpl3+)))
13844
13845 (define-public python2-tracing
13846 (package
13847 (name "python2-tracing")
13848 (version "0.10")
13849 (source
13850 (origin
13851 (method url-fetch)
13852 (uri (string-append
13853 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13854 version ".tar.gz"))
13855 (sha256
13856 (base32
13857 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13858 (build-system python-build-system)
13859 (arguments
13860 `(#:python ,python-2))
13861 (home-page "https://liw.fi/tracing/")
13862 (synopsis "Python debug logging helper")
13863 (description "@code{python2-tracing} is a python library for
13864 logging debug messages. It provides a way to turn debugging messages
13865 on and off, based on the filename they occur in. It is much faster
13866 than using @code{logging.Filter} to accomplish the same thing, which
13867 matters when code is run in production mode. The actual logging still
13868 happens using the @code{logging} library.")
13869 (license license:gpl3+)))
13870
13871 (define-public python2-larch
13872 (package
13873 (name "python2-larch")
13874 (version "1.20151025")
13875 (source
13876 (origin
13877 (method url-fetch)
13878 (uri (string-append
13879 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13880 version ".tar.gz"))
13881 (patches (search-patches
13882 "python2-larch-coverage-4.0a6-compatibility.patch"))
13883 (sha256
13884 (base32
13885 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13886 (build-system python-build-system)
13887 (arguments
13888 `(#:python ,python-2
13889 #:phases
13890 (modify-phases %standard-phases
13891 ;; check phase needs to be run before the build phase. If not,
13892 ;; coverage-test-runner looks for tests for the built source files,
13893 ;; and fails.
13894 (delete 'check)
13895 (add-before 'build 'check
13896 (lambda _ (invoke "make" "check"))))))
13897 (native-inputs
13898 `(("cmdtest" ,cmdtest)
13899 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13900 (propagated-inputs
13901 `(("python2-tracing" ,python2-tracing)))
13902 (home-page "https://liw.fi/larch/")
13903 (synopsis "Python copy-on-write B-tree library")
13904 (description "@code{python2-larch} is an implementation of
13905 particular kind of B-tree, based on research by Ohad Rodeh. See
13906 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13907 on the data structure.
13908
13909 The distinctive feature of this B-tree is that a node is never
13910 (conceptually) modified. Instead, all updates are done by
13911 copy-on-write. This makes it easy to clone a tree, and modify only the
13912 clone, while other processes access the original tree.")
13913 (license license:gpl3+)))
13914
13915 (define-public python-astroid
13916 (package
13917 (name "python-astroid")
13918 (version "2.4.1")
13919 (source
13920 (origin
13921 (method url-fetch)
13922 (uri (pypi-uri "astroid" version))
13923 (sha256
13924 (base32 "1h99jal7ax07xna1djw5z7hpgb8vjrl3hrrg49p1phljwniww5sc"))))
13925 (build-system python-build-system)
13926 (propagated-inputs
13927 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13928 ("python-six" ,python-six)
13929 ("python-wrapt" ,python-wrapt)))
13930 (native-inputs
13931 `(("python-dateutil" ,python-dateutil)
13932 ("python-pytest" ,python-pytest)
13933 ("python-pytest-runner" ,python-pytest-runner)))
13934 (home-page "https://github.com/PyCQA/astroid")
13935 (synopsis "Common base representation of python source code for pylint and
13936 other projects")
13937 (description "@code{python-astroid} provides a common base representation
13938 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13939
13940 It provides a compatible representation which comes from the _ast module. It
13941 rebuilds the tree generated by the builtin _ast module by recursively walking
13942 down the AST and building an extended ast. The new node classes have
13943 additional methods and attributes for different usages. They include some
13944 support for static inference and local name scopes. Furthermore, astroid
13945 builds partial trees by inspecting living objects.")
13946 (license license:lgpl2.1+)
13947 (properties `((python2-variant . ,(delay python2-astroid))))))
13948
13949 (define-public python2-astroid
13950 (let ((base (package-with-python2
13951 (strip-python2-variant python-astroid))))
13952 (package (inherit base)
13953 ;; Version 2.x removes python2 support.
13954 (version "1.6.5")
13955 (source
13956 (origin
13957 (method url-fetch)
13958 (uri (pypi-uri "astroid" version))
13959 (sha256
13960 (base32
13961 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13962 (arguments
13963 (substitute-keyword-arguments (package-arguments base)
13964 ((#:phases phases)
13965 `(modify-phases ,phases
13966 (add-after 'unpack 'remove-spurious-test
13967 (lambda _
13968 ;; https://github.com/PyCQA/astroid/issues/276
13969 (delete-file "astroid/tests/unittest_brain.py")
13970 #t))
13971 (replace 'check
13972 (lambda _
13973 (invoke"python" "-m" "unittest" "discover"
13974 "-p" "unittest*.py")))))))
13975 (native-inputs `())
13976 (propagated-inputs
13977 `(("python2-backports-functools-lru-cache"
13978 ,python2-backports-functools-lru-cache)
13979 ("python2-enum34" ,python2-enum34)
13980 ("python2-singledispatch" ,python2-singledispatch)
13981 ,@(alist-delete "python-typed-ast"
13982 (package-propagated-inputs base)))))))
13983
13984 (define-public python-isort
13985 (package
13986 (name "python-isort")
13987 (version "4.3.4")
13988 (source
13989 (origin
13990 (method git-fetch)
13991 (uri (git-reference
13992 ;; Tests pass only from the Github sources
13993 (url "https://github.com/timothycrosley/isort")
13994 (commit version)))
13995 (file-name (git-file-name name version))
13996 (sha256
13997 (base32
13998 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
13999 (build-system python-build-system)
14000 (native-inputs
14001 `(("python-mock" ,python-mock)
14002 ("python-pytest" ,python-pytest)))
14003 (home-page "https://github.com/timothycrosley/isort")
14004 (synopsis "Python utility/library to sort python imports")
14005 (description "@code{python-isort} is a python utility/library to sort
14006 imports alphabetically, and automatically separated into sections. It
14007 provides a command line utility, a python library and plugins for various
14008 editors.")
14009 (license license:expat)
14010 (properties `((python2-variant . ,(delay python2-isort))))))
14011
14012 (define-public python2-isort
14013 (let ((base (package-with-python2
14014 (strip-python2-variant python-isort))))
14015 (package (inherit base)
14016 (native-inputs
14017 `(("python2-futures" ,python2-futures)
14018 ,@(package-native-inputs base))))))
14019
14020 (define-public python2-backports-functools-lru-cache
14021 (package
14022 (name "python2-backports-functools-lru-cache")
14023 (version "1.5")
14024 (source
14025 (origin
14026 (method url-fetch)
14027 ;; only the pypi tarballs contain the necessary metadata
14028 (uri (pypi-uri "backports.functools_lru_cache" version))
14029 (sha256
14030 (base32
14031 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
14032 (build-system python-build-system)
14033 (native-inputs
14034 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14035 (arguments
14036 `(#:python ,python-2))
14037 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14038 (synopsis "Backport of functools.lru_cache from Python 3.3")
14039 (description "@code{python2-backports-functools-lru-cache} is a backport
14040 of @code{functools.lru_cache} from python 3.3.")
14041 (license license:expat)))
14042
14043 (define-public python-configparser
14044 (package
14045 (name "python-configparser")
14046 (version "4.0.2")
14047 (source
14048 (origin
14049 (method url-fetch)
14050 (uri (pypi-uri "configparser" version))
14051 (sha256
14052 (base32
14053 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
14054 (native-inputs
14055 `(("python-setuptools_scm" ,python-setuptools-scm)))
14056 (build-system python-build-system)
14057 (home-page "https://github.com/jaraco/configparser/")
14058 (synopsis "Backport of configparser from python 3.5")
14059 (description "@code{python-configparser} is a backport of
14060 @code{configparser} from Python 3.5 so that it can be used directly
14061 in other versions.")
14062 (license license:expat)))
14063
14064 (define-public python2-configparser
14065 (package-with-python2 python-configparser))
14066
14067 (define-public python-mando
14068 (package
14069 (name "python-mando")
14070 (version "0.6.4")
14071 (source (origin
14072 (method url-fetch)
14073 (uri (pypi-uri "mando" version))
14074 (sha256
14075 (base32
14076 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
14077 (build-system python-build-system)
14078 (propagated-inputs
14079 `(("python-rst2ansi" ,python-rst2ansi)
14080 ("python-six" ,python-six)))
14081 (native-inputs
14082 `(("python-pytest" ,python-pytest)))
14083 (home-page "https://mando.readthedocs.org/")
14084 (synopsis
14085 "Wrapper around argparse, allowing creation of complete CLI applications")
14086 (description
14087 "This package is a wrapper around argparse, allowing you to write complete CLI
14088 applications in seconds while maintaining all the flexibility.")
14089 (license license:expat)))
14090
14091 (define-public python2-mando
14092 (package-with-python2 python-mando))
14093
14094 (define-public python2-argparse
14095 (package
14096 (name "python2-argparse")
14097 (version "1.4.0")
14098 (source
14099 (origin
14100 (method url-fetch)
14101 (uri (pypi-uri "argparse" version))
14102 (sha256
14103 (base32
14104 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
14105 (build-system python-build-system)
14106 (arguments
14107 `(#:python ,python-2))
14108 (home-page "https://github.com/ThomasWaldmann/argparse/")
14109 (synopsis "Python command-line parsing library")
14110 (description
14111 "This package is mostly for people who want to have @code{argparse} on
14112 older Pythons because it was not part of the standard library back then.")
14113 (license license:psfl)))
14114
14115 (define-public python-fudge
14116 (package
14117 (name "python-fudge")
14118 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14119 ;; package, which is currently the only use of this package.
14120 (version "0.9.6")
14121 (source
14122 (origin
14123 (method url-fetch)
14124 (uri (pypi-uri "fudge" version))
14125 (sha256
14126 (base32
14127 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14128 (build-system python-build-system)
14129 (arguments
14130 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14131 (home-page "https://github.com/fudge-py/fudge")
14132 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14133 (description
14134 "Fudge is a Python module for using fake objects (mocks and stubs) to
14135 test real ones.
14136
14137 In readable Python code, you declare the methods available on your fake object
14138 and how they should be called. Then you inject that into your application and
14139 start testing. This declarative approach means you don’t have to record and
14140 playback actions and you don’t have to inspect your fakes after running code.
14141 If the fake object was used incorrectly then you’ll see an informative
14142 exception message with a traceback that points to the culprit.")
14143 (license license:expat)))
14144
14145 (define-public python2-fudge
14146 (package-with-python2 python-fudge))
14147
14148 (define-public python-mwclient
14149 (package
14150 (name "python-mwclient")
14151 (version "0.10.0")
14152 (source
14153 (origin
14154 (method git-fetch)
14155 ;; The PyPI version wouldn't contain tests.
14156 (uri (git-reference
14157 (url "https://github.com/mwclient/mwclient")
14158 (commit (string-append "v" version))))
14159 (file-name (git-file-name name version))
14160 (sha256
14161 (base32
14162 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
14163 (build-system python-build-system)
14164 (propagated-inputs
14165 `(("python-requests-oauthlib" ,python-requests-oauthlib)
14166 ("python-six" ,python-six)))
14167 (native-inputs
14168 `(("python-mock" ,python-mock)
14169 ("python-pytest" ,python-pytest)
14170 ("python-pytest-cov" ,python-pytest-cov)
14171 ("python-pytest-runner" ,python-pytest-runner)
14172 ("python-responses" ,python-responses)))
14173 (home-page "https://github.com/btongminh/mwclient")
14174 (synopsis "MediaWiki API client")
14175 (description "This package provides a MediaWiki API client.")
14176 (license license:expat)))
14177
14178 (define-public python2-mwclient
14179 (package-with-python2 python-mwclient))
14180
14181 (define-public python-utils
14182 (package
14183 (name "python-utils")
14184 (version "2.1.0")
14185 (source (origin
14186 (method url-fetch)
14187 (uri (pypi-uri "python-utils" version))
14188 (sha256
14189 (base32
14190 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14191 (build-system python-build-system)
14192 (native-inputs
14193 `(("pytest-runner" ,python-pytest-runner)
14194 ("pytest" ,python-pytest)
14195 ("six" ,python-six)))
14196 (home-page "https://github.com/WoLpH/python-utils")
14197 (synopsis "Convenient utilities not included with the standard Python install")
14198 (description
14199 "Python Utils is a collection of small Python functions and classes which
14200 make common patterns shorter and easier.")
14201 (license license:bsd-2)))
14202
14203 (define-public python2-utils
14204 (package-with-python2 python-utils))
14205
14206 (define-public python-diff-match-patch
14207 (package
14208 (name "python-diff-match-patch")
14209 (version "20121119")
14210 (source
14211 (origin
14212 (method url-fetch)
14213 (uri (pypi-uri "diff-match-patch" version))
14214 (sha256
14215 (base32
14216 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14217 (build-system python-build-system)
14218 (home-page "https://code.google.com/p/google-diff-match-patch")
14219 (synopsis "Synchronize plain text")
14220 (description "Diff Match and Patch libraries offer robust algorithms to
14221 perform the operations required for synchronizing plain text.")
14222 (license license:asl2.0)))
14223
14224 (define-public python2-diff-match-patch
14225 (package-with-python2 python-diff-match-patch))
14226
14227 (define-public python-dirsync
14228 (package
14229 (name "python-dirsync")
14230 (version "2.2.3")
14231 (source
14232 (origin
14233 (method url-fetch)
14234 (uri (pypi-uri "dirsync" version))
14235 (sha256
14236 (base32
14237 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
14238 (build-system python-build-system)
14239 (propagated-inputs
14240 `(("six" ,python-six)))
14241 (home-page "https://bitbucket.org/tkhyn/dirsync")
14242 (synopsis "Advanced directory tree synchronisation tool")
14243 (description "Advanced directory tree synchronisation tool.")
14244 (license license:expat)))
14245
14246 (define-public python2-dirsync
14247 (package-with-python2 python-dirsync))
14248
14249 (define-public python-levenshtein
14250 (package
14251 (name "python-levenshtein")
14252 (version "0.12.0")
14253 (source
14254 (origin
14255 (method url-fetch)
14256 (uri (pypi-uri "python-Levenshtein" version))
14257 (sha256
14258 (base32
14259 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14260 (build-system python-build-system)
14261 (home-page "https://github.com/ztane/python-Levenshtein")
14262 (synopsis "Fast computation of Levenshtein distance and string similarity")
14263 (description
14264 "The Levenshtein Python C extension module contains functions for fast computation of
14265 @enumerate
14266 @item Levenshtein (edit) distance, and edit operations
14267 @item string similarity
14268 @item approximate median strings, and generally string averaging
14269 @item string sequence and set similarity
14270 @end enumerate
14271 It supports both normal and Unicode strings.")
14272 (license license:gpl2+)))
14273
14274 (define-public python2-levenshtein
14275 (package-with-python2 python-levenshtein))
14276
14277 (define-public python-scandir
14278 (package
14279 (name "python-scandir")
14280 (version "1.10.0")
14281 (source
14282 (origin
14283 (method url-fetch)
14284 (uri (pypi-uri "scandir" version))
14285 (sha256
14286 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
14287 (build-system python-build-system)
14288 (arguments
14289 `(#:phases (modify-phases %standard-phases
14290 (replace 'check
14291 (lambda _
14292 (invoke "python" "test/run_tests.py"))))))
14293 (home-page "https://github.com/benhoyt/scandir")
14294 (synopsis "Directory iteration function")
14295 (description
14296 "Directory iteration function like os.listdir(), except that instead of
14297 returning a list of bare filenames, it yields DirEntry objects that include
14298 file type and stat information along with the name. Using scandir() increases
14299 the speed of os.walk() by 2-20 times (depending on the platform and file
14300 system) by avoiding unnecessary calls to os.stat() in most cases.
14301
14302 This package is part of the Python standard library since version 3.5.")
14303 (license license:bsd-3)))
14304
14305 (define-public python2-scandir
14306 (package-with-python2 python-scandir))
14307
14308 (define-public python2-stemming
14309 (package
14310 (name "python2-stemming")
14311 (version "1.0.1")
14312 (source
14313 (origin
14314 (method url-fetch)
14315 (uri (pypi-uri "stemming" version))
14316 (sha256
14317 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14318 (build-system python-build-system)
14319 (arguments
14320 `(#:python ,python-2))
14321 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14322 (synopsis "Python implementations of various stemming algorithms")
14323 (description
14324 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14325 stemming algorithms for English. These implementations are straightforward and
14326 efficient, unlike some Python versions of the same algorithms available on the
14327 Web. This package is an extraction of the stemming code included in the Whoosh
14328 search engine.")
14329 (license license:public-domain)))
14330
14331 (define-public python-factory-boy
14332 (package
14333 (name "python-factory-boy")
14334 (version "2.8.1")
14335 (source
14336 (origin
14337 (method url-fetch)
14338 (uri (pypi-uri "factory_boy" version))
14339 (sha256
14340 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14341 (build-system python-build-system)
14342 (arguments
14343 ;; Tests are not included in the tarball.
14344 `(#:tests? #f))
14345 (propagated-inputs
14346 `(("faker" ,python-faker)))
14347 (home-page "https://github.com/benhoyt/scandir")
14348 (synopsis "Versatile test fixtures replacement")
14349 (description
14350 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14351
14352 As a fixtures replacement tool, it aims to replace static, hard to maintain
14353 fixtures with easy-to-use factories for complex object.
14354
14355 Instead of building an exhaustive test setup with every possible combination
14356 of corner cases, factory_boy allows you to use objects customized for the
14357 current test, while only declaring the test-specific fields")
14358 (license license:expat)))
14359
14360 (define-public python2-factory-boy
14361 (package-with-python2 python-factory-boy))
14362
14363 (define-public python-translate-toolkit
14364 (package
14365 (name "python-translate-toolkit")
14366 (version "2.1.0")
14367 (source
14368 (origin
14369 (method url-fetch)
14370 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14371 (sha256
14372 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14373 (build-system python-build-system)
14374 (native-inputs
14375 `(("python-pytest" ,python-pytest)
14376 ("python-sphinx" ,python-sphinx)))
14377 (propagated-inputs
14378 `(("python-babel" ,python-babel)
14379 ("python-beautifulsoup4" ,python-beautifulsoup4)
14380 ("python-chardet" ,python-chardet)
14381 ("python-diff-match-patch" ,python-diff-match-patch)
14382 ("python-levenshtein" ,python-levenshtein)
14383 ("python-lxml" ,python-lxml)
14384 ("python-six" ,python-six)
14385 ("python-vobject" ,python-vobject)
14386 ("python-pyyaml" ,python-pyyaml)))
14387 (arguments
14388 ;; TODO: tests are not run, because they end with
14389 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14390 ;; 'parse_funcs'
14391 ;; during test setup.
14392 `(#:tests? #f))
14393 (home-page "https://toolkit.translatehouse.org")
14394 (synopsis "Tools and API for translation and localization engineering")
14395 (description
14396 "Tools and API for translation and localization engineering. It contains
14397 several utilities, as well as an API for building localization tools.")
14398 (license license:gpl2+)))
14399
14400 (define-public python2-translate-toolkit
14401 (package-with-python2 python-translate-toolkit))
14402
14403 (define-public python-packaging
14404 (package
14405 (name "python-packaging")
14406 (version "20.0")
14407 (source
14408 (origin
14409 (method url-fetch)
14410 (uri (pypi-uri "packaging" version))
14411 ;; XXX: The URL in the patch file is wrong, it should be
14412 ;; <https://github.com/pypa/packaging/pull/256>.
14413 (patches (search-patches "python-packaging-test-arch.patch"))
14414 (sha256
14415 (base32
14416 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
14417 (build-system python-build-system)
14418 (arguments
14419 `(#:phases (modify-phases %standard-phases
14420 (replace 'check
14421 (lambda* (#:key tests? #:allow-other-keys)
14422 (if tests?
14423 (invoke "py.test" "-vv")
14424 (format #t "test suite not run~%"))
14425 #t)))))
14426 (native-inputs
14427 `(("python-pretend" ,python-pretend)
14428 ("python-pytest" ,python-pytest)))
14429 (propagated-inputs
14430 `(("python-pyparsing" ,python-pyparsing)
14431 ("python-six" ,python-six)))
14432 (home-page "https://github.com/pypa/packaging")
14433 (synopsis "Core utilities for Python packages")
14434 (description "Packaging is a Python module for dealing with Python packages.
14435 It offers an interface for working with package versions, names, and dependency
14436 information.")
14437 ;; From 'LICENSE': This software is made available under the terms of
14438 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14439 ;; Contributions to this software is made under the terms of *both* these
14440 ;; licenses.
14441 (license (list license:asl2.0 license:bsd-2))))
14442
14443 (define-public python2-packaging
14444 (package-with-python2 python-packaging))
14445
14446 ;; Variants with minimal dependencies, for bootstrapping Pytest.
14447 (define-public python-packaging-bootstrap
14448 (hidden-package
14449 (package/inherit
14450 python-packaging
14451 (name "python-packaging-bootstrap")
14452 (native-inputs '())
14453 (propagated-inputs
14454 `(("python-pyparsing" ,python-pyparsing)))
14455 (arguments '(#:tests? #f)))))
14456
14457 (define-public python2-packaging-bootstrap
14458 (hidden-package
14459 (package/inherit
14460 python2-packaging
14461 (name "python2-packaging-bootstrap")
14462 (native-inputs '())
14463 (propagated-inputs
14464 `(("python-pyparsing" ,python2-pyparsing)))
14465 (arguments
14466 `(#:tests? #f
14467 ,@(package-arguments python2-packaging))))))
14468
14469 (define-public python-relatorio
14470 (package
14471 (name "python-relatorio")
14472 (version "0.8.0")
14473 (source
14474 (origin
14475 (method url-fetch)
14476 (uri (pypi-uri "relatorio" version))
14477 (sha256
14478 (base32
14479 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
14480 (build-system python-build-system)
14481 (propagated-inputs
14482 `(("python-lxml" ,python-lxml)
14483 ("python-genshi" ,python-genshi)))
14484 (native-inputs
14485 `(("python-magic" ,python-magic)))
14486 (home-page "https://relatorio.tryton.org/")
14487 (synopsis "Templating library able to output ODT and PDF files")
14488 (description "Relatorio is a templating library which provides a way to
14489 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14490 for more filetypes can be easily added by creating plugins for them.")
14491 (license license:gpl3+)))
14492
14493 (define-public python2-relatorio
14494 (package-with-python2 python-relatorio))
14495
14496 (define-public python-radon
14497 (package
14498 (name "python-radon")
14499 (version "4.1.0")
14500 (source
14501 (origin
14502 (method url-fetch)
14503 (uri (pypi-uri "radon" version))
14504 (sha256
14505 (base32
14506 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
14507 (build-system python-build-system)
14508 (arguments
14509 `(#:phases (modify-phases %standard-phases
14510 (replace 'check
14511 (lambda _
14512 (invoke "python" "radon/tests/run.py"))))))
14513 (propagated-inputs
14514 `(("python-colorama" ,python-colorama)
14515 ("python-flake8-polyfill" ,python-flake8-polyfill)
14516 ("python-mando" ,python-mando)))
14517 (native-inputs
14518 `(("python-pytest" ,python-pytest)
14519 ("python-pytest-mock" ,python-pytest-mock)))
14520 (home-page "https://radon.readthedocs.org/")
14521 (synopsis "Code Metrics in Python")
14522 (description "Radon is a Python tool which computes various code metrics.
14523 Supported metrics are:
14524 @itemize @bullet
14525 @item raw metrics: SLOC, comment lines, blank lines, &c.
14526 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14527 @item Halstead metrics (all of them)
14528 @item the Maintainability Index (a Visual Studio metric)
14529 @end itemize")
14530 (properties `((python2-variant . ,(delay python2-radon))))
14531 (license license:expat)))
14532
14533 (define-public python2-radon
14534 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
14535 (package
14536 (inherit base)
14537 (propagated-inputs
14538 `(("python-configparser" ,python2-configparser)
14539 ("python-future" ,python2-future)
14540 ,@(package-propagated-inputs base))))))
14541
14542 (define-public python-sure
14543 (package
14544 (name "python-sure")
14545 (version "1.4.11")
14546 (source
14547 (origin
14548 (method url-fetch)
14549 (uri (pypi-uri "sure" version))
14550 (sha256
14551 (base32
14552 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
14553 (build-system python-build-system)
14554 (propagated-inputs
14555 `(("python-mock" ,python-mock)
14556 ("python-six" ,python-six)))
14557 (native-inputs
14558 `(("python-nose" ,python-nose)))
14559 (home-page "https://github.com/gabrielfalcao/sure")
14560 (synopsis "Automated testing library in python for python")
14561 (description
14562 "Sure is a python library that leverages a DSL for writing assertions.
14563 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
14564 (license license:gpl3+)))
14565
14566 (define-public python2-sure
14567 (package-with-python2 python-sure))
14568
14569 (define-public python2-couleur
14570 ;; This package does not seem to support python3 at all, hence,
14571 ;; only the python2 variant definition is provided.
14572 (package
14573 (name "python2-couleur")
14574 (version "0.6.2")
14575 (source
14576 (origin
14577 (method url-fetch)
14578 (uri (pypi-uri "couleur" version))
14579 (sha256
14580 (base32
14581 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
14582 (build-system python-build-system)
14583 (arguments
14584 `(#:python ,python-2))
14585 (home-page "https://github.com/gabrielfalcao/couleur")
14586 (synopsis
14587 "ANSI terminal tool for python, colored shell and other handy fancy features")
14588 (description
14589 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
14590 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
14591 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
14592 ;; https://github.com/gabrielfalcao/couleur/issues/11
14593 (license license:lgpl3+)))
14594
14595 (define-public python-misaka
14596 (package
14597 (name "python-misaka")
14598 (version "2.1.1")
14599 (source
14600 (origin
14601 (method url-fetch)
14602 (uri (pypi-uri "misaka" version))
14603 (sha256
14604 (base32
14605 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
14606 (build-system python-build-system)
14607 (arguments
14608 `(;; Line 37 of setup.py calls self.run_command('develop')
14609 ;; in the 'check' phase. This command seems to be trying
14610 ;; to write to
14611 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
14612 ;; for which it does not have the permission to write.
14613 #:tests? #f))
14614 (propagated-inputs
14615 `(("python-cffi" ,python-cffi)))
14616 (home-page "https://github.com/FSX/misaka")
14617 (synopsis "Python binding for Hoedown")
14618 (description
14619 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
14620 library written in C. It features a fast HTML renderer and functionality to make custom
14621 renderers (e.g. man pages or LaTeX).")
14622 (license license:expat)))
14623
14624 (define-public python2-misaka
14625 (package-with-python2 python-misaka))
14626
14627 (define-public python2-steadymark
14628 ;; This is forced into being a python2 only variant
14629 ;; due to its dependence on couleur that has no support
14630 ;; for python3
14631 (package
14632 (name "python2-steadymark")
14633 (version "0.7.3")
14634 (source
14635 (origin
14636 (method url-fetch)
14637 (uri (pypi-uri "steadymark" version))
14638 (sha256
14639 (base32
14640 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
14641 (build-system python-build-system)
14642 (native-inputs
14643 `(("python-couleur" ,python2-couleur)
14644 ("python-sure" ,python2-sure)
14645 ("python-misaka" ,python2-misaka)))
14646 (arguments
14647 `(#:python ,python-2
14648 #:phases
14649 (modify-phases %standard-phases
14650 (add-before 'build 'patch-setup-py
14651 (lambda _
14652 ;; Update requirements from dependency==version
14653 ;; to dependency>=version
14654 (substitute* "setup.py"
14655 (("==") ">="))
14656 #t)))))
14657 (home-page "https://github.com/gabrielfalcao/steadymark")
14658 (synopsis "Markdown-based test runner for python")
14659 (description
14660 "@code{Steadymark} allows documentation to be written in github-flavoured
14661 markdown. The documentation may contain snippets of code surrounded by python
14662 code blocks and @code{Steadymark} will find these snippets and run them, making
14663 sure that there are no old malfunctional examples in the documentation examples.")
14664 (license license:expat)))
14665
14666 (define-public python-jsonpointer
14667 (package
14668 (name "python-jsonpointer")
14669 (version "1.10")
14670 (source
14671 (origin
14672 (method url-fetch)
14673 (uri (pypi-uri "jsonpointer" version))
14674 (sha256
14675 (base32
14676 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
14677 (build-system python-build-system)
14678 (home-page "https://github.com/stefankoegl/python-json-pointer")
14679 (synopsis "Identify specific nodes in a JSON document")
14680 (description "@code{jsonpointer} allows you to access specific nodes
14681 by path in a JSON document (see RFC 6901).")
14682 (license license:bsd-3)))
14683
14684 (define-public python2-jsonpointer
14685 (package-with-python2 python-jsonpointer))
14686
14687 (define-public python-jsonpatch
14688 (package
14689 (name "python-jsonpatch")
14690 (version "1.16")
14691 (source
14692 (origin
14693 (method git-fetch)
14694 ;; pypi version lacks tests.js
14695 (uri (git-reference
14696 (url "https://github.com/stefankoegl/python-json-patch")
14697 (commit (string-append "v" version))))
14698 (file-name (git-file-name name version))
14699 (sha256
14700 (base32
14701 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
14702 (build-system python-build-system)
14703 (native-inputs
14704 `(("python-jsonpointer" ,python-jsonpointer)))
14705 (home-page "https://github.com/stefankoegl/python-json-patch")
14706 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
14707 (description "@code{jsonpatch} is a library and program that allows
14708 applying JSON Patches according to RFC 6902.")
14709 (license license:bsd-3)))
14710
14711 (define-public python2-jsonpatch
14712 (package-with-python2 python-jsonpatch))
14713
14714 (define-public python-jsonpatch-0.4
14715 (package (inherit python-jsonpatch)
14716 (name "python-jsonpatch")
14717 (version "0.4")
14718 (source
14719 (origin
14720 (method git-fetch)
14721 (uri (git-reference
14722 (url "https://github.com/stefankoegl/python-json-patch")
14723 (commit (string-append "v" version))))
14724 (file-name (git-file-name name version))
14725 (sha256
14726 (base32
14727 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
14728
14729 (define-public python2-jsonpatch-0.4
14730 (package-with-python2 python-jsonpatch-0.4))
14731
14732 (define-public python-rfc3986
14733 (package
14734 (name "python-rfc3986")
14735 (version "1.1.0")
14736 (source (origin
14737 (method url-fetch)
14738 (uri (pypi-uri "rfc3986" version))
14739 (sha256
14740 (base32
14741 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
14742 (build-system python-build-system)
14743 (arguments
14744 `(#:modules ((guix build utils)
14745 (guix build python-build-system)
14746 (ice-9 ftw)
14747 (srfi srfi-1)
14748 (srfi srfi-26))
14749 #:phases
14750 (modify-phases %standard-phases
14751 (replace 'check
14752 (lambda _
14753 (let ((cwd (getcwd)))
14754 (setenv "PYTHONPATH"
14755 (string-append cwd "/build/"
14756 (find (cut string-prefix? "lib" <>)
14757 (scandir (string-append cwd "/build")))
14758 ":"
14759 (getenv "PYTHONPATH")))
14760 (invoke "pytest" "-v")))))))
14761 (native-inputs
14762 `(("python-pytest" ,python-pytest)))
14763 (home-page "https://rfc3986.readthedocs.io/")
14764 (synopsis "Parse and validate URI references")
14765 (description
14766 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14767 validation and authority parsing. This module also supports RFC@tie{}6874
14768 which adds support for zone identifiers to IPv6 addresses.")
14769 (license license:asl2.0)))
14770
14771 (define-public python2-rfc3986
14772 (package-with-python2 python-rfc3986))
14773
14774 (define-public python-rfc3987
14775 (package
14776 (name "python-rfc3987")
14777 (version "1.3.7")
14778 (source
14779 (origin
14780 (method url-fetch)
14781 (uri (pypi-uri "rfc3987" version))
14782 (sha256
14783 (base32
14784 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14785 (build-system python-build-system)
14786 (home-page "https://pypi.org/project/rfc3987/")
14787 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14788 (description "@code{rfc3987} provides routines for parsing and
14789 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14790 (license license:gpl3+)))
14791
14792 (define-public python2-rfc3987
14793 (package-with-python2 python-rfc3987))
14794
14795 (define-public python-validators
14796 (package
14797 (name "python-validators")
14798 (version "0.14.2")
14799 (source (origin
14800 (method url-fetch)
14801 (uri (pypi-uri "validators" version))
14802 (sha256
14803 (base32
14804 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
14805 (build-system python-build-system)
14806 (arguments
14807 '(#:phases (modify-phases %standard-phases
14808 (replace 'check
14809 (lambda _
14810 (invoke "pytest" "-vv"))))))
14811 (propagated-inputs
14812 `(("python-decorator" ,python-decorator)
14813 ("python-six" ,python-six)))
14814 (native-inputs
14815 `(("python-flake8" ,python-flake8)
14816 ("python-isort" ,python-isort)
14817 ("python-pytest" ,python-pytest)))
14818 (home-page "https://github.com/kvesteri/validators")
14819 (synopsis "Data validation library")
14820 (description
14821 "This package contains validators for different things such as email
14822 addresses, IP addresses, URLs, hashes and more. It has been designed to
14823 be easy to use and not require defining a schema or form just to validate
14824 some input.")
14825 (license license:expat)))
14826
14827 (define-public python2-validators
14828 (package-with-python2 python-validators))
14829
14830 (define-public python-validate-email
14831 (package
14832 (name "python-validate-email")
14833 (version "1.3")
14834 (source
14835 (origin
14836 (method url-fetch)
14837 (uri (pypi-uri "validate_email" version))
14838 (sha256
14839 (base32
14840 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14841 (build-system python-build-system)
14842 (home-page "https://github.com/syrusakbary/validate_email")
14843 (synopsis "Verifies if an email address is valid and really exists")
14844 (description "@code{validate_email} can be used to verify if an email
14845 address is valid and really exists.")
14846 (license license:lgpl3+)))
14847
14848 (define-public python2-validate-email
14849 (package-with-python2 python-validate-email))
14850
14851 (define-public python-flex
14852 (package
14853 (name "python-flex")
14854 (version "6.10.0")
14855 (source
14856 (origin
14857 (method url-fetch)
14858 (uri (pypi-uri "flex" version))
14859 (sha256
14860 (base32
14861 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14862 (build-system python-build-system)
14863 (propagated-inputs
14864 `(("python-click" ,python-click)
14865 ("python-iso8601" ,python-iso8601)
14866 ("python-jsonpointer" ,python-jsonpointer)
14867 ("python-pyyaml" ,python-pyyaml)
14868 ("python-requests" ,python-requests)
14869 ("python-rfc3987" ,python-rfc3987)
14870 ("python-six" ,python-six)
14871 ("python-validate-email" ,python-validate-email)))
14872 (home-page "https://github.com/pipermerriam/flex")
14873 (synopsis "Validates Swagger schemata")
14874 (description "@code{flex} can be used to validate Swagger schemata.")
14875 (license license:bsd-3)))
14876
14877 (define-public python2-flex
14878 (package-with-python2 python-flex))
14879
14880 (define-public python-marshmallow
14881 (package
14882 (name "python-marshmallow")
14883 (version "3.0.0b14")
14884 (source
14885 (origin
14886 (method url-fetch)
14887 (uri (pypi-uri "marshmallow" version))
14888 (sha256
14889 (base32
14890 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14891 (build-system python-build-system)
14892 (propagated-inputs
14893 `(("python-dateutil" ,python-dateutil)
14894 ("python-simplejson" ,python-simplejson)))
14895 (native-inputs
14896 `(("python-pytest" ,python-pytest)
14897 ("python-pytz" ,python-pytz)))
14898 (home-page "https://github.com/marshmallow-code/marshmallow")
14899 (synopsis "Convert complex datatypes to and from native
14900 Python datatypes.")
14901 (description "@code{marshmallow} provides a library for converting
14902 complex datatypes to and from native Python datatypes.")
14903 (license license:expat)))
14904
14905 (define-public python2-marshmallow
14906 (package-with-python2 python-marshmallow))
14907
14908 (define-public python-apispec
14909 (package
14910 (name "python-apispec")
14911 (version "0.25.3")
14912 (source
14913 (origin
14914 (method url-fetch)
14915 (uri (pypi-uri "apispec" version))
14916 (sha256
14917 (base32
14918 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14919 (build-system python-build-system)
14920 (propagated-inputs
14921 `(("python-pyyaml" ,python-pyyaml)))
14922 (native-inputs
14923 `(("python-pytest" ,python-pytest)
14924 ("python-flask" ,python-flask)
14925 ("python-marshmallow" ,python-marshmallow)
14926 ("python-tornado" ,python-tornado)
14927 ("python-bottle" ,python-bottle)
14928 ("python-mock" ,python-mock)))
14929 (home-page "https://github.com/marshmallow-code/apispec")
14930 (synopsis "Swagger 2.0 API specification generator")
14931 (description "@code{python-apispec} is a pluggable API specification
14932 generator. Currently supports the OpenAPI specification (f.k.a.
14933 Swagger 2.0).")
14934 (license license:expat)))
14935
14936 (define-public python2-apispec
14937 (package-with-python2 python-apispec))
14938
14939 (define-public python-flasgger
14940 (package
14941 (name "python-flasgger")
14942 (version "0.6.3")
14943 (source
14944 (origin
14945 (method git-fetch)
14946 (uri (git-reference
14947 (url "https://github.com/rochacbruno/flasgger.git")
14948 (commit version)))
14949 (file-name (git-file-name name version))
14950 (sha256
14951 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
14952 (build-system python-build-system)
14953 (arguments
14954 `(#:phases
14955 (modify-phases %standard-phases
14956 (replace 'check
14957 (lambda* (#:key inputs outputs #:allow-other-keys)
14958 (substitute* "Makefile"
14959 (("flake8 flasgger --ignore=F403")
14960 "flake8 flasgger --ignore=E731,F403"))
14961 (setenv "PYTHONPATH" (string-append (getcwd)
14962 ":"
14963 (getenv "PYTHONPATH")))
14964 (invoke "py.test"))))))
14965 (propagated-inputs
14966 `(("python-flask" ,python-flask)
14967 ("python-pyyaml" ,python-pyyaml)
14968 ("python-jsonschema" ,python-jsonschema)
14969 ("python-mistune" ,python-mistune)
14970 ("python-six" ,python-six)))
14971 (native-inputs
14972 `(("python-decorator" ,python-decorator)
14973 ("python-flake8" ,python-flake8)
14974 ("python-flask-restful" ,python-flask-restful)
14975 ("python-flex" ,python-flex)
14976 ("python-pytest" ,python-pytest)
14977 ("python-pytest-cov" ,python-pytest-cov)
14978 ("python-marshmallow" ,python-marshmallow)
14979 ("python-apispec" ,python-apispec)))
14980 (home-page "https://github.com/rochacbruno/flasgger/")
14981 (synopsis "Extract Swagger specs from your Flask project")
14982 (description "@code{python-flasgger} allows extracting Swagger specs
14983 from your Flask project. It is a fork of Flask-Swagger.")
14984 (license license:expat)))
14985
14986 (define-public python2-flasgger
14987 (package-with-python2 python-flasgger))
14988
14989 (define-public python-swagger-spec-validator
14990 (package
14991 (name "python-swagger-spec-validator")
14992 (version "2.4.3")
14993 (source
14994 (origin
14995 (method url-fetch)
14996 (uri (pypi-uri "swagger-spec-validator" version))
14997 (sha256
14998 (base32
14999 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
15000 (build-system python-build-system)
15001 (propagated-inputs
15002 `(("python-jsonschema" ,python-jsonschema)
15003 ("python-pyyaml" ,python-pyyaml)
15004 ("python-six" ,python-six)))
15005 (home-page
15006 "https://github.com/Yelp/swagger_spec_validator")
15007 (synopsis "Validation of Swagger specifications")
15008 (description "@code{swagger_spec_validator} provides a library for
15009 validating Swagger API specifications.")
15010 (license license:asl2.0)))
15011
15012 (define-public python2-swagger-spec-validator
15013 (package-with-python2 python-swagger-spec-validator))
15014
15015 (define-public python-apache-libcloud
15016 (package
15017 (name "python-apache-libcloud")
15018 (version "2.4.0")
15019 (source
15020 (origin
15021 (method url-fetch)
15022 (uri (pypi-uri "apache-libcloud" version))
15023 (sha256
15024 (base32
15025 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
15026 (build-system python-build-system)
15027 (arguments
15028 `(#:phases
15029 (modify-phases %standard-phases
15030 (add-after 'unpack 'patch-ssh
15031 (lambda* (#:key inputs #:allow-other-keys)
15032 (substitute* "libcloud/compute/ssh.py"
15033 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15034 "/bin/ssh" "'")))
15035 #t))
15036 (add-after 'unpack 'patch-tests
15037 (lambda _
15038 (substitute* "./libcloud/test/test_file_fixtures.py"
15039 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15040 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15041 return (httplib.OK,
15042 \"1234abcd\",
15043 {\"test\": \"value\"},
15044 httplib.responses[httplib.OK])
15045 def _ascii"))
15046 (substitute* "libcloud/test/compute/test_ssh_client.py"
15047 (("class ShellOutSSHClientTests")
15048 "@unittest.skip(\"Guix container doesn't have ssh service\")
15049 class ShellOutSSHClientTests")
15050 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15051 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15052 (("'.xF0', '.x90', '.x8D', '.x88'")
15053 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15054 #t))
15055 (add-before 'check 'copy-secret
15056 (lambda _
15057 (copy-file "libcloud/test/secrets.py-dist"
15058 "libcloud/test/secrets.py")
15059 #t)))))
15060 (inputs
15061 `(("openssh" ,openssh)))
15062 (propagated-inputs
15063 `(("python-paramiko" ,python-paramiko)
15064 ("python-requests" ,python-requests)))
15065 (native-inputs
15066 `(("python-lockfile" ,python-lockfile)
15067 ("python-mock" ,python-mock)
15068 ("python-pytest" ,python-pytest)
15069 ("python-pytest-runner" ,python-pytest-runner)
15070 ("python-requests-mock" ,python-requests-mock)))
15071 (home-page "https://libcloud.apache.org/")
15072 (synopsis "Unified Cloud API")
15073 (description "@code{libcloud} is a Python library for interacting with
15074 many of the popular cloud service providers using a unified API.")
15075 (license license:asl2.0)))
15076
15077 (define-public python2-apache-libcloud
15078 (package-with-python2 python-apache-libcloud))
15079
15080 (define-public python-smmap
15081 (package
15082 (name "python-smmap")
15083 (version "3.0.1")
15084 (source
15085 (origin
15086 (method url-fetch)
15087 (uri (pypi-uri "smmap" version))
15088 (sha256
15089 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
15090 (build-system python-build-system)
15091 (native-inputs
15092 `(("python-nosexcover" ,python-nosexcover)))
15093 (home-page "https://github.com/Byron/smmap")
15094 (synopsis "Python sliding window memory map manager")
15095 (description "@code{smmap} is a pure Python implementation of a sliding
15096 window memory map manager.")
15097 (license license:bsd-3)))
15098
15099 (define-public python-smmap2
15100 (deprecated-package "python-smmap2" python-smmap))
15101
15102 (define-public python2-smmap
15103 (package-with-python2 python-smmap))
15104
15105 (define-public python2-smmap2
15106 (deprecated-package "python2-smmap2" python2-smmap))
15107
15108 (define-public python-regex
15109 (package
15110 (name "python-regex")
15111 (version "2019.04.14")
15112 (source (origin
15113 (method url-fetch)
15114 (uri (pypi-uri "regex" version))
15115 (sha256
15116 (base32
15117 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
15118 ;; TODO: Fix and enable regex_test.py tests that complain about the
15119 ;; test.support module not existing.
15120 (build-system python-build-system)
15121 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15122 (synopsis "Alternative regular expression module")
15123 (description "This regular expression implementation is backwards-
15124 compatible with the standard @code{re} module, but offers additional
15125 functionality like full case-folding for case-insensitive matches in Unicode.")
15126 (license license:psfl)))
15127
15128 (define-public python2-regex
15129 (package-with-python2 python-regex))
15130
15131 (define-public python2-pyopengl
15132 (package
15133 (name "python2-pyopengl")
15134 (version "3.1.0")
15135 (source
15136 (origin
15137 (method url-fetch)
15138 (uri (pypi-uri "PyOpenGL" version))
15139 (sha256
15140 (base32
15141 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15142 (arguments
15143 `(#:python ,python-2))
15144 (build-system python-build-system)
15145 (home-page "http://pyopengl.sourceforge.net")
15146 (synopsis "Standard OpenGL bindings for Python")
15147 (description
15148 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15149 related APIs. The binding is created using the standard @code{ctypes}
15150 library.")
15151 (license license:bsd-3)))
15152
15153 (define-public python2-pyopengl-accelerate
15154 (package
15155 (inherit python2-pyopengl)
15156 (name "python2-pyopengl-accelerate")
15157 (version "3.1.0")
15158 (source
15159 (origin
15160 (method url-fetch)
15161 (uri (pypi-uri "PyOpenGL-accelerate" version))
15162 (sha256
15163 (base32
15164 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
15165 (synopsis "Acceleration code for PyOpenGL")
15166 (description
15167 "This is the Cython-coded accelerator module for PyOpenGL.")))
15168
15169 (define-public python-rencode
15170 (package
15171 (name "python-rencode")
15172 (version "1.0.5")
15173 (source
15174 (origin
15175 (method url-fetch)
15176 (uri (pypi-uri "rencode" version))
15177 (sha256
15178 (base32
15179 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
15180 (build-system python-build-system)
15181 (arguments
15182 `(#:phases
15183 (modify-phases %standard-phases
15184 (add-before 'check 'delete-bogus-test
15185 ;; This test requires /home/aresch/Downloads, which is not provided by
15186 ;; the build environment.
15187 (lambda _
15188 (delete-file "rencode/t.py")
15189 #t)))))
15190 (native-inputs `(("pkg-config" ,pkg-config)
15191 ("python-cython" ,python-cython)))
15192 (home-page "https://github.com/aresch/rencode")
15193 (synopsis "Serialization of heterogeneous data structures")
15194 (description
15195 "The @code{rencode} module is a data structure serialization library,
15196 similar to @code{bencode} from the BitTorrent project. For complex,
15197 heterogeneous data structures with many small elements, r-encoding stake up
15198 significantly less space than b-encodings. This version of rencode is a
15199 complete rewrite in Cython to attempt to increase the performance over the
15200 pure Python module.")
15201 (license license:bsd-3)))
15202
15203 (define-public python2-rencode
15204 (package-with-python2 python-rencode))
15205
15206 (define-public python-xenon
15207 (package
15208 (name "python-xenon")
15209 (version "0.7.0")
15210 (source
15211 (origin
15212 (method url-fetch)
15213 (uri (pypi-uri "xenon" version))
15214 (sha256
15215 (base32
15216 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
15217 (build-system python-build-system)
15218 (native-inputs
15219 `(("python-pyyaml" ,python-pyyaml)
15220 ("python-radon" ,python-radon)
15221 ("python-requests" ,python-requests)
15222 ("python-flake8" ,python-flake8)
15223 ("python-tox" ,python-tox)))
15224 (arguments
15225 `(#:tests? #f ;test suite not shipped with the PyPI archive
15226 #:phases
15227 (modify-phases %standard-phases
15228 (add-before 'build 'patch-test-requirements
15229 (lambda _
15230 ;; Remove httpretty dependency for tests.
15231 (substitute* "setup.py"
15232 (("httpretty") ""))
15233 #t)))))
15234 (home-page "https://xenon.readthedocs.org/")
15235 (synopsis "Monitor code metrics for Python on your CI server")
15236 (description
15237 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
15238 Ideally, @code{xenon} is run every time code is committed. Through command
15239 line options, various thresholds can be set for the complexity of code. It
15240 will fail (i.e. it will exit with a non-zero exit code) when any of these
15241 requirements is not met.")
15242 (license license:expat)))
15243
15244 (define-public python2-xenon
15245 (package-with-python2 python-xenon))
15246
15247 (define-public python-pysocks
15248 (package
15249 (name "python-pysocks")
15250 (version "1.7.0")
15251 (source
15252 (origin
15253 (method url-fetch)
15254 (uri (pypi-uri "PySocks" version))
15255 (sha256
15256 (base32
15257 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
15258 (build-system python-build-system)
15259 (arguments `(#:tests? #f))
15260 (home-page "https://github.com/Anorov/PySocks")
15261 (synopsis "SOCKS client module")
15262 (description "@code{pysocks} is an updated and semi-actively maintained
15263 version of @code{SocksiPy} with bug fixes and extra features.")
15264 (license license:bsd-3)))
15265
15266 (define-public python2-pysocks
15267 (package-with-python2 python-pysocks))
15268
15269 (define-public python-pydiff
15270 (package
15271 (name "python-pydiff")
15272 (version "0.2")
15273 (source
15274 (origin
15275 (method url-fetch)
15276 (uri (pypi-uri "pydiff" version))
15277 (sha256
15278 (base32
15279 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
15280 (build-system python-build-system)
15281 (home-page "https://github.com/myint/pydiff")
15282 (synopsis "Library to diff two Python files at the bytecode level")
15283 (description
15284 "@code{pydiff} makes it easy to look for actual code changes while
15285 ignoring formatting changes.")
15286 (license license:expat)))
15287
15288 (define-public python2-pydiff
15289 (package-with-python2 python-pydiff))
15290
15291 (define-public python-tqdm
15292 (package
15293 (name "python-tqdm")
15294 (version "4.43.0")
15295 (source
15296 (origin
15297 (method url-fetch)
15298 (uri (pypi-uri "tqdm" version))
15299 (sha256
15300 (base32
15301 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
15302 (build-system python-build-system)
15303 (arguments
15304 '(#:phases (modify-phases %standard-phases
15305 (replace 'check
15306 (lambda* (#:key inputs outputs #:allow-other-keys)
15307 (add-installed-pythonpath inputs outputs)
15308 ;; This invokation is taken from tox.ini.
15309 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
15310 "-d" "-v" "tqdm/"))))))
15311 (native-inputs
15312 `(("python-nose" ,python-nose)))
15313 (home-page "https://github.com/tqdm/tqdm")
15314 (synopsis "Fast, extensible progress meter")
15315 (description
15316 "Make loops show a progress bar on the console by just wrapping any
15317 iterable with @code{|tqdm(iterable)|}. Offers many options to define
15318 design and layout.")
15319 (license (list license:mpl2.0 license:expat))))
15320
15321 (define-public python2-tqdm
15322 (package-with-python2 python-tqdm))
15323
15324 (define-public python-pkginfo
15325 (package
15326 (name "python-pkginfo")
15327 (version "1.4.2")
15328 (source
15329 (origin
15330 (method url-fetch)
15331 (uri (pypi-uri "pkginfo" version))
15332 (sha256
15333 (base32
15334 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
15335 (build-system python-build-system)
15336 (arguments
15337 ;; The tests are broken upstream.
15338 '(#:tests? #f))
15339 (home-page
15340 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
15341 (synopsis
15342 "Query metadatdata from sdists, bdists, and installed packages")
15343 (description
15344 "API to query the distutils metadata written in @file{PKG-INFO} inside a
15345 source distriubtion (an sdist) or a binary distribution (e.g., created by
15346 running bdist_egg). It can also query the EGG-INFO directory of an installed
15347 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
15348 created by running @code{python setup.py develop}).")
15349 (license license:expat)))
15350
15351 (define-public python2-pkginfo
15352 (package-with-python2 python-pkginfo))
15353
15354 (define-public python-twine
15355 (package
15356 (name "python-twine")
15357 (version "1.9.1")
15358 (source
15359 (origin
15360 (method url-fetch)
15361 (uri (pypi-uri "twine" version))
15362 (sha256
15363 (base32
15364 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
15365 (build-system python-build-system)
15366 (propagated-inputs
15367 `(("python-tqdm" ,python-tqdm)
15368 ("python-pkginfo" ,python-pkginfo)
15369 ("python-requests" ,python-requests)
15370 ("python-requests-toolbelt" ,python-requests-toolbelt)))
15371 (home-page "https://github.com/pypa/twine")
15372 (synopsis "Collection of utilities for interacting with PyPI")
15373 (description
15374 "@code{twine} currently supports registering projects and uploading
15375 distributions. It authenticates the user over HTTPS, allows them to pre-sign
15376 their files and supports any packaging format (including wheels).")
15377 (license license:asl2.0)))
15378
15379 (define-public python2-twine
15380 (package-with-python2 python-twine))
15381
15382 (define-public python-linecache2
15383 (package
15384 (name "python-linecache2")
15385 (version "1.0.0")
15386 (source
15387 (origin
15388 (method url-fetch)
15389 (uri (pypi-uri "linecache2" version))
15390 (sha256
15391 (base32
15392 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
15393 (build-system python-build-system)
15394 (arguments
15395 `(;; The tests depend on unittest2, and our version is a bit too old.
15396 #:tests? #f))
15397 (native-inputs
15398 `(("python-pbr" ,python-pbr-minimal)))
15399 (home-page
15400 "https://github.com/testing-cabal/linecache2")
15401 (synopsis "Backports of the linecache module")
15402 (description
15403 "The linecache module allows one to get any line from any file, while
15404 attempting to optimize internally, using a cache, the common case where many
15405 lines are read from a single file.")
15406 (license license:psfl)))
15407
15408 (define-public python2-linecache2
15409 (package-with-python2 python-linecache2))
15410
15411 (define-public python-traceback2
15412 (package
15413 (name "python-traceback2")
15414 (version "1.4.0")
15415 (source
15416 (origin
15417 (method url-fetch)
15418 (uri (pypi-uri "traceback2" version))
15419 (sha256
15420 (base32
15421 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
15422 (build-system python-build-system)
15423 (arguments
15424 `(;; python-traceback2 and python-unittest2 depend on one another.
15425 #:tests? #f))
15426 (native-inputs
15427 `(("python-pbr" ,python-pbr-minimal)))
15428 (propagated-inputs
15429 `(("python-linecache2" ,python-linecache2)))
15430 (home-page
15431 "https://github.com/testing-cabal/traceback2")
15432 (synopsis "Backports of the traceback module")
15433 (description
15434 "This module provides a standard interface to extract, format and print
15435 stack traces of Python programs. It exactly mimics the behavior of the Python
15436 interpreter when it prints a stack trace.")
15437 (license license:psfl)))
15438
15439 (define-public python2-traceback2
15440 (package-with-python2 python-traceback2))
15441
15442 (define-public python-ratelimiter
15443 (package
15444 (name "python-ratelimiter")
15445 (version "1.2.0")
15446 (source
15447 (origin
15448 (method url-fetch)
15449 (uri (pypi-uri "ratelimiter" version))
15450 (sha256
15451 (base32
15452 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
15453 (build-system python-build-system)
15454 (arguments
15455 '(#:tests? #f)) ; There are no tests in the pypi archive.
15456 (home-page "https://github.com/RazerM/ratelimiter")
15457 (synopsis "Simple rate limiting object")
15458 (description
15459 "The @code{ratelimiter} module ensures that an operation will not be
15460 executed more than a given number of times during a given period.")
15461 (license license:asl2.0)))
15462
15463 (define-public python2-ratelimiter
15464 (package-with-python2 python-ratelimiter))
15465
15466 (define-public python-dukpy
15467 (package
15468 (name "python-dukpy")
15469 (version "0.3")
15470 (source
15471 (origin
15472 (method git-fetch)
15473 (uri (git-reference
15474 (url "https://github.com/kovidgoyal/dukpy.git")
15475 (commit (string-append "v" version))))
15476 (file-name (git-file-name name version))
15477 (sha256
15478 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
15479 (build-system python-build-system)
15480 (home-page "https://github.com/kovidgoyal/dukpy")
15481 (synopsis "Run JavaScript in python")
15482 (description
15483 "dukpy is a JavaScript runtime environment for Python using the duktape
15484 embeddable JavaScript engine.")
15485 ;; Dukpy is licensed under MIT like the embedded duktape library,
15486 ;; with 'errors.c' as GPL3.
15487 (license (list license:expat license:gpl3))))
15488
15489 (define-public python2-dukpy
15490 (package-with-python2 python-dukpy))
15491
15492 (define-public python-jsonrpclib-pelix
15493 (package
15494 (name "python-jsonrpclib-pelix")
15495 (version "0.3.2")
15496 (source
15497 (origin
15498 (method url-fetch)
15499 (uri (pypi-uri "jsonrpclib-pelix" version))
15500 (sha256
15501 (base32
15502 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
15503 (build-system python-build-system)
15504 (arguments
15505 `(#:tests? #f)) ; no tests in PyPI tarball
15506 (home-page "https://github.com/tcalmant/jsonrpclib/")
15507 (synopsis "JSON-RPC 2.0 client library for Python")
15508 (description
15509 "This library implements the JSON-RPC v2.0
15510 specification (backwards-compatible) as a client library for Python. This
15511 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
15512 services.")
15513 (license license:asl2.0)))
15514
15515 (define-public python2-jsonrpclib-pelix
15516 (package-with-python2 python-jsonrpclib-pelix))
15517
15518 (define-public python-setuptools-scm-git-archive
15519 (package
15520 (name "python-setuptools-scm-git-archive")
15521 (version "1.0")
15522 (source
15523 (origin
15524 (method url-fetch)
15525 (uri (pypi-uri "setuptools_scm_git_archive" version))
15526 (sha256
15527 (base32
15528 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
15529 (build-system python-build-system)
15530 (native-inputs
15531 `(("python-pytest" ,python-pytest)))
15532 (propagated-inputs
15533 `(("python-setuptools-scm" ,python-setuptools-scm)))
15534 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
15535 (synopsis "Setuptools_scm plugin for git archives")
15536 (description
15537 "The setuptools_scm_git_archive package is a plugin to
15538 setuptools_scm, which supports obtaining versions from git archives that
15539 belong to tagged versions.")
15540 (license license:expat)))
15541
15542 (define-public python2-setuptools-scm-git-archive
15543 (package-with-python2 python-setuptools-scm-git-archive))
15544
15545 (define-public python-setuptools-git
15546 (package
15547 (name "python-setuptools-git")
15548 (version "1.2")
15549 (source
15550 (origin
15551 (method url-fetch)
15552 (uri (pypi-uri "setuptools-git" version))
15553 (sha256
15554 (base32
15555 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
15556 (build-system python-build-system)
15557 (arguments
15558 `(#:phases
15559 (modify-phases %standard-phases
15560 ;; This is needed for tests.
15561 (add-after 'unpack 'configure-git
15562 (lambda _
15563 (setenv "HOME" "/tmp")
15564 (invoke "git" "config" "--global" "user.email" "guix")
15565 (invoke "git" "config" "--global" "user.name" "guix")
15566 #t)))))
15567 (native-inputs
15568 `(("git" ,git-minimal)))
15569 (home-page "https://github.com/msabramo/setuptools-git")
15570 (synopsis "Setuptools revision control system plugin for Git")
15571 (description
15572 "This package provides a plugin for Setuptools for revision control with
15573 Git.")
15574 (license license:bsd-3)))
15575
15576 (define-public python-pyclipper
15577 (package
15578 (name "python-pyclipper")
15579 (version "1.1.0.post3")
15580 (source
15581 (origin
15582 (method url-fetch)
15583 (uri (pypi-uri "pyclipper" version ".zip"))
15584 (sha256
15585 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
15586 (modules '((guix build utils)))
15587 (snippet
15588 '(begin
15589 ;; This file is generated by Cython.
15590 (delete-file "pyclipper/pyclipper.cpp") #t))))
15591 (build-system python-build-system)
15592 (arguments
15593 `(#:phases
15594 (modify-phases %standard-phases
15595 (add-before 'build 'cythonize-sources
15596 (lambda _
15597 (with-directory-excursion "pyclipper"
15598 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
15599 (propagated-inputs
15600 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
15601 (native-inputs
15602 `(("python-cython" ,python-cython)
15603 ("python-pytest" ,python-pytest)
15604 ("python-pytest-runner" ,python-pytest-runner)
15605 ("python-unittest2" ,python-unittest2)
15606 ("unzip" ,unzip)))
15607 (home-page "https://github.com/greginvm/pyclipper")
15608 (synopsis "Wrapper for Angus Johnson's Clipper library")
15609 (description
15610 "Pyclipper is a Cython wrapper for the C++ translation of the
15611 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
15612 (license license:expat)))
15613
15614 (define-public python2-pyclipper
15615 (package-with-python2 python-pyclipper))
15616
15617 (define-public python2-booleanoperations
15618 (package
15619 (name "python2-booleanoperations")
15620 (version "0.7.1")
15621 (source
15622 (origin
15623 (method url-fetch)
15624 (uri (pypi-uri "booleanOperations" version ".zip"))
15625 (sha256
15626 (base32
15627 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
15628 (build-system python-build-system)
15629 (arguments
15630 `(#:python ,python-2))
15631 (native-inputs
15632 `(("unzip" ,unzip)
15633 ("python2-pytest" ,python2-pytest)
15634 ("python2-pytest-runner" ,python2-pytest-runner)))
15635 (propagated-inputs
15636 `(("python-fonttools" ,python2-fonttools)
15637 ("python-pyclipper" ,python2-pyclipper)
15638 ("python-ufolib" ,python2-ufolib)))
15639 (home-page "https://github.com/typemytype/booleanOperations")
15640 (synopsis "Boolean operations on paths")
15641 (description
15642 "BooleanOperations provides a Python library that enables
15643 boolean operations on paths.")
15644 (license license:expat)))
15645
15646 (define-public python-tempdir
15647 (package
15648 (name "python-tempdir")
15649 (version "0.7.1")
15650 (source
15651 (origin
15652 (method url-fetch)
15653 (uri (pypi-uri "tempdir" version))
15654 (sha256
15655 (base32
15656 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
15657 (build-system python-build-system)
15658 (home-page "https://pypi.org/project/tempdir/")
15659 (arguments
15660 ;; the package has no tests
15661 '(#:tests? #f))
15662 (synopsis "Python library for managing temporary directories")
15663 (description
15664 "This library manages temporary directories that are automatically
15665 deleted with all their contents when they are no longer needed. It is
15666 particularly convenient for use in tests.")
15667 (license license:expat)))
15668
15669 (define-public python2-tempdir
15670 (package-with-python2 python-tempdir))
15671
15672 (define-public python-activepapers
15673 (package
15674 (name "python-activepapers")
15675 (version "0.2.2")
15676 (source
15677 (origin
15678 (method url-fetch)
15679 (uri (pypi-uri "ActivePapers.Py" version))
15680 (sha256
15681 (base32
15682 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
15683 (build-system python-build-system)
15684 (arguments
15685 `(#:modules ((ice-9 ftw)
15686 (srfi srfi-1)
15687 (guix build utils)
15688 (guix build python-build-system))
15689
15690 #:phases
15691 (modify-phases %standard-phases
15692 (add-after 'unpack 'delete-python2-code
15693 (lambda _
15694 (for-each delete-file
15695 '("lib/activepapers/builtins2.py"
15696 "lib/activepapers/standardlib2.py"
15697 "lib/activepapers/utility2.py"))))
15698 (replace 'check
15699 (lambda _
15700 ;; Deactivate the test cases that download files
15701 (setenv "NO_NETWORK_ACCESS" "1")
15702 ;; For some strange reason, some tests fail if nosetests runs all
15703 ;; test modules in a single execution. They pass if each test
15704 ;; module is run individually.
15705 (for-each (lambda (filename)
15706 (invoke "nosetests"
15707 (string-append "tests/" filename)))
15708 (scandir "tests"
15709 (lambda (filename)
15710 (string-suffix? ".py" filename)))))))))
15711 (native-inputs
15712 `(("python-tempdir" ,python-tempdir)
15713 ("python-nose" ,python-nose)))
15714 (propagated-inputs
15715 `(("python-h5py" ,python-h5py)))
15716 (home-page "https://www.activepapers.org/")
15717 (synopsis "Executable papers for scientific computing")
15718 (description
15719 "ActivePapers is a tool for working with executable papers, which
15720 combine data, code, and documentation in single-file packages,
15721 suitable for publication as supplementary material or on repositories
15722 such as figshare or Zenodo.")
15723 (properties `((python2-variant . ,(delay python2-activepapers))))
15724 (license license:bsd-3)))
15725
15726 (define-public python2-activepapers
15727 (let ((base (package-with-python2
15728 (strip-python2-variant python-activepapers))))
15729 (package
15730 (inherit base)
15731 (arguments
15732 (substitute-keyword-arguments (package-arguments base)
15733 ((#:phases phases)
15734 `(modify-phases ,phases
15735 (delete 'delete-python2-code)
15736 (add-after 'unpack 'delete-python3-code
15737 (lambda _
15738 (for-each delete-file
15739 '("lib/activepapers/builtins3.py"
15740 "lib/activepapers/standardlib3.py"
15741 "lib/activepapers/utility3.py")))))))))))
15742
15743 (define-public python-semver
15744 (package
15745 (name "python-semver")
15746 (version "2.9.0")
15747 (source
15748 (origin
15749 (method url-fetch)
15750 (uri (pypi-uri "semver" version))
15751 (sha256
15752 (base32
15753 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
15754 (build-system python-build-system)
15755 (native-inputs
15756 `(("python-appdirs" ,python-appdirs)
15757 ("python-distlib" ,python-distlib)
15758 ("python-importlib-metadata" ,python-importlib-metadata)
15759 ("python-filelock" ,python-filelock)
15760 ("python-six" ,python-six)
15761 ("python-tox" ,python-tox)
15762 ("python-virtualenv" ,python-virtualenv)))
15763 (home-page "https://github.com/k-bx/python-semver")
15764 (synopsis "Python helper for Semantic Versioning")
15765 (description "This package provides a Python library for
15766 @url{Semantic Versioning, http://semver.org/}.")
15767 (license license:bsd-3)))
15768
15769 (define-public python2-semver
15770 (package-with-python2 python-semver))
15771
15772 (define-public python-pyro4
15773 (package
15774 (name "python-pyro4")
15775 (version "4.77")
15776 (source
15777 (origin
15778 (method url-fetch)
15779 (uri (pypi-uri "Pyro4" version))
15780 (sha256
15781 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
15782 (build-system python-build-system)
15783 (arguments
15784 '(#:tests? #f)) ;FIXME: Some tests require network access.
15785 (native-inputs
15786 `(("python-cloudpickle" ,python-cloudpickle)
15787 ("python-dill" ,python-dill)
15788 ("python-msgpack" ,python-msgpack)))
15789 (propagated-inputs
15790 `(("python-serpent" ,python-serpent)))
15791 (home-page "https://pyro4.readthedocs.io")
15792 (synopsis "Distributed object middleware for Python")
15793 (description
15794 "Pyro enables you to build applications in which objects can talk to each
15795 other over the network. You can just use normal Python method calls to call
15796 objects on other machines, also known as remote procedure calls (RPC).")
15797 (license license:expat)))
15798
15799 (define-public python2-pyro
15800 (package
15801 (name "python2-pyro")
15802 (version "3.16")
15803 (source
15804 (origin
15805 (method url-fetch)
15806 (uri (pypi-uri "Pyro" version))
15807 (file-name (string-append "Pyro-" version ".tar.gz"))
15808 (sha256
15809 (base32
15810 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15811 (build-system python-build-system)
15812 (arguments
15813 ;; Pyro is not compatible with Python 3
15814 `(#:python ,python-2
15815 ;; Pyro has no test cases for automatic execution
15816 #:tests? #f))
15817 (home-page "https://pythonhosted.org/Pyro/")
15818 (synopsis "Distributed object manager for Python")
15819 (description "Pyro is a Distributed Object Technology system
15820 written in Python that is designed to be easy to use. It resembles
15821 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15822 which is a system and language independent Distributed Object Technology
15823 and has much more to offer than Pyro or RMI. Pyro 3.x is no
15824 longer maintained. New projects should use Pyro4 instead, which
15825 is the new Pyro version that is actively developed.")
15826 (license license:expat)))
15827
15828 (define-public python2-scientific
15829 (package
15830 (name "python2-scientific")
15831 (version "2.9.4")
15832 (source
15833 (origin
15834 (method git-fetch)
15835 (uri (git-reference
15836 (url "https://github.com/khinsen/ScientificPython")
15837 (commit (string-append "rel" version))))
15838 (file-name (git-file-name name version))
15839 (sha256
15840 (base32
15841 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
15842 (build-system python-build-system)
15843 (inputs
15844 `(("netcdf" ,netcdf)))
15845 (propagated-inputs
15846 `(("python-numpy" ,python2-numpy-1.8)
15847 ("python-pyro" ,python2-pyro)))
15848 (arguments
15849 ;; ScientificPython is not compatible with Python 3
15850 `(#:python ,python-2
15851 #:tests? #f ; No test suite
15852 #:phases
15853 (modify-phases %standard-phases
15854 (replace 'build
15855 (lambda* (#:key inputs #:allow-other-keys)
15856 (invoke "python" "setup.py" "build"
15857 (string-append "--netcdf_prefix="
15858 (assoc-ref inputs "netcdf"))))))))
15859 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
15860 (synopsis "Python modules for scientific computing")
15861 (description "ScientificPython is a collection of Python modules that are
15862 useful for scientific computing. Most modules are rather general (Geometry,
15863 physical units, automatic derivatives, ...) whereas others are more
15864 domain-specific (e.g. netCDF and PDB support). The library is currently
15865 not actively maintained and works only with Python 2 and NumPy < 1.9.")
15866 (license license:cecill-c)))
15867
15868 (define-public python2-mmtk
15869 (package
15870 (name "python2-mmtk")
15871 (version "2.7.12")
15872 (source
15873 (origin
15874 (method git-fetch)
15875 (uri (git-reference
15876 (url "https://github.com/khinsen/MMTK")
15877 (commit (string-append "rel" version))))
15878 (file-name (git-file-name name version))
15879 (sha256
15880 (base32
15881 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
15882 (build-system python-build-system)
15883 (native-inputs
15884 `(("netcdf" ,netcdf)))
15885 (propagated-inputs
15886 `(("python-scientific" ,python2-scientific)
15887 ("python-tkinter" ,python-2 "tk")))
15888 (arguments
15889 `(#:python ,python-2
15890 #:tests? #f
15891 #:phases
15892 (modify-phases %standard-phases
15893 (add-before 'build 'includes-from-scientific
15894 (lambda* (#:key inputs #:allow-other-keys)
15895 (mkdir-p "Include/Scientific")
15896 (copy-recursively
15897 (string-append
15898 (assoc-ref inputs "python-scientific")
15899 "/include/python2.7/Scientific")
15900 "Include/Scientific"))))))
15901 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15902 (synopsis "Python library for molecular simulation")
15903 (description "MMTK is a library for molecular simulations with an emphasis
15904 on biomolecules. It provides widely used methods such as Molecular Dynamics
15905 and normal mode analysis, but also basic routines for implementing new methods
15906 for simulation and analysis. The library is currently not actively maintained
15907 and works only with Python 2 and NumPy < 1.9.")
15908 (license license:cecill-c)))
15909
15910 (define-public python-phonenumbers
15911 (package
15912 (name "python-phonenumbers")
15913 (version "8.9.1")
15914 (source
15915 (origin
15916 (method url-fetch)
15917 (uri (pypi-uri "phonenumbers" version))
15918 (sha256
15919 (base32
15920 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15921 (build-system python-build-system)
15922 (home-page
15923 "https://github.com/daviddrysdale/python-phonenumbers")
15924 (synopsis
15925 "Python library for dealing with international phone numbers")
15926 (description
15927 "This package provides a Python port of Google's libphonenumber library.")
15928 (license license:asl2.0)))
15929
15930 (define-public python2-phonenumbers
15931 (package-with-python2 python-phonenumbers))
15932
15933 (define-public python-send2trash
15934 (package
15935 (name "python-send2trash")
15936 (version "1.5.0")
15937 (source
15938 (origin (method git-fetch)
15939 ;; Source tarball on PyPI doesn't include tests.
15940 (uri (git-reference
15941 (url "https://github.com/hsoft/send2trash.git")
15942 (commit version)))
15943 (file-name (git-file-name name version))
15944 (sha256
15945 (base32
15946 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
15947 (build-system python-build-system)
15948 (arguments
15949 '(#:phases
15950 (modify-phases %standard-phases
15951 (add-before 'check 'pre-check
15952 (lambda _
15953 (mkdir-p "/tmp/foo")
15954 (setenv "HOME" "/tmp/foo")
15955 #t)))))
15956 (home-page "https://github.com/hsoft/send2trash")
15957 (synopsis "Send files to the user's @file{~/Trash} directory")
15958 (description "This package provides a Python library to send files to the
15959 user's @file{~/Trash} directory.")
15960 (properties `((python2-variant . ,(delay python2-send2trash))))
15961 (license license:bsd-3)))
15962
15963 (define-public python2-send2trash
15964 (package
15965 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
15966 (arguments
15967 (substitute-keyword-arguments (package-arguments python-send2trash)
15968 ((#:phases phases)
15969 `(modify-phases ,phases
15970 (add-before 'check 'setenv
15971 (lambda _
15972 (setenv "PYTHONPATH"
15973 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
15974 #t))))))))
15975
15976 (define-public python-yapf
15977 (package
15978 (name "python-yapf")
15979 (version "0.29.0")
15980 (source
15981 (origin
15982 (method url-fetch)
15983 (uri (pypi-uri "yapf" version))
15984 (sha256
15985 (base32
15986 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
15987 (build-system python-build-system)
15988 (home-page "https://github.com/google/yapf")
15989 (synopsis "Formatter for Python code")
15990 (description "YAPF is a formatter for Python code. It's based off of
15991 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15992 takes the code and reformats it to the best formatting that conforms to the
15993 style guide, even if the original code didn't violate the style guide.")
15994 (license license:asl2.0)))
15995
15996 (define-public python2-yapf
15997 (package-with-python2 python-yapf))
15998
15999 (define-public python-gyp
16000 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
16001 (revision "0"))
16002 (package
16003 (name "python-gyp")
16004 ;; Google does not release versions,
16005 ;; based on second most recent commit date.
16006 (version (git-version "0.0.0" revision commit))
16007 (source
16008 (origin
16009 ;; Google does not release tarballs,
16010 ;; git checkout is needed.
16011 (method git-fetch)
16012 (uri (git-reference
16013 (url "https://chromium.googlesource.com/external/gyp")
16014 (commit commit)))
16015 (file-name (git-file-name name version))
16016 (sha256
16017 (base32
16018 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
16019 (build-system python-build-system)
16020 (home-page "https://gyp.gsrc.io/")
16021 (synopsis "GYP is a Meta-Build system")
16022 (description
16023 "GYP builds build systems for large, cross platform applications.
16024 It can be used to generate XCode projects, Visual Studio projects, Ninja build
16025 files, and Makefiles.")
16026 (license license:bsd-3))))
16027
16028 (define-public python2-gyp
16029 (package-with-python2 python-gyp))
16030
16031 (define-public python-whatever
16032 (package
16033 (name "python-whatever")
16034 (version "0.6")
16035 (source
16036 (origin
16037 (method git-fetch)
16038 (uri (git-reference
16039 (url "https://github.com/Suor/whatever")
16040 (commit version)))
16041 (file-name (git-file-name name version))
16042 (sha256
16043 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
16044 (build-system python-build-system)
16045 (arguments
16046 `(#:phases
16047 (modify-phases %standard-phases
16048 (replace 'check
16049 (lambda _
16050 (invoke "py.test"))))))
16051 (native-inputs
16052 `(("python-pytest" ,python-pytest)))
16053 (home-page "http://github.com/Suor/whatever")
16054 (synopsis "Make anonymous functions by partial application of operators")
16055 (description "@code{whatever} provides an easy way to make anonymous
16056 functions by partial application of operators.")
16057 (license license:bsd-3)))
16058
16059 (define-public python2-whatever
16060 (package-with-python2 python-whatever))
16061
16062 (define-public python-funcy
16063 (package
16064 (name "python-funcy")
16065 (version "1.11")
16066 (source
16067 (origin
16068 (method git-fetch)
16069 (uri (git-reference
16070 (url "https://github.com/Suor/funcy.git")
16071 (commit version)))
16072 (sha256
16073 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
16074 (file-name (git-file-name name version))))
16075 (build-system python-build-system)
16076 (arguments
16077 `(#:phases
16078 (modify-phases %standard-phases
16079 (replace 'check
16080 (lambda _
16081 (invoke "py.test"))))))
16082 (native-inputs
16083 `(("python-pytest" ,python-pytest)
16084 ("python-whatever" ,python-whatever)))
16085 (home-page "http://github.com/Suor/funcy")
16086 (synopsis "Functional tools")
16087 (description "@code{funcy} is a library that provides functional tools.
16088 Examples are:
16089 @enumerate
16090 @item merge - Merges collections of the same type
16091 @item walk - Type-preserving map
16092 @item select - Selects a part of a collection
16093 @item take - Takes the first n items of a collection
16094 @item first - Takes the first item of a collection
16095 @item remove - Predicated-removes items of a collection
16096 @item concat - Concatenates two collections
16097 @item flatten - Flattens a collection with subcollections
16098 @item distinct - Returns only distinct items
16099 @item split - Predicated-splits a collection
16100 @item split_at - Splits a collection at a given item
16101 @item group_by - Groups items by group
16102 @item pairwise - Pairs off adjacent items
16103 @item partial - Partially-applies a function
16104 @item curry - Curries a function
16105 @item compose - Composes functions
16106 @item complement - Complements a predicate
16107 @item all_fn - \"all\" with predicate
16108 @end enumerate")
16109 (license license:bsd-3)))
16110
16111 (define-public python2-funcy
16112 (package-with-python2 python-funcy))
16113
16114 (define-public python-isoweek
16115 (package
16116 (name "python-isoweek")
16117 (version "1.3.3")
16118 (source
16119 (origin
16120 (method url-fetch)
16121 (uri (pypi-uri "isoweek" version))
16122 (sha256
16123 (base32
16124 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
16125 (build-system python-build-system)
16126 (home-page "https://github.com/gisle/isoweek")
16127 (synopsis "Objects representing a week")
16128 (description "The @code{isoweek} module provide the class Week that
16129 implements the week definition of ISO 8601. This standard also defines
16130 a notation for identifying weeks; yyyyWww (where the W is a literal).
16131 Week instances stringify to this form.")
16132 (license license:bsd-3)))
16133
16134 (define-public python2-isoweek
16135 (package-with-python2 python-isoweek))
16136
16137 (define-public python-tokenize-rt
16138 (package
16139 (name "python-tokenize-rt")
16140 (version "2.0.1")
16141 (source
16142 (origin
16143 (method url-fetch)
16144 (uri (pypi-uri "tokenize-rt" version))
16145 (sha256
16146 (base32
16147 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
16148 (build-system python-build-system)
16149 (home-page "https://github.com/asottile/tokenize-rt")
16150 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
16151 (description
16152 "This Python library is a wrapper around @code{tokenize} from the Python
16153 standard library. It provides two additional tokens @code{ESCAPED_NL} and
16154 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
16155 and @code{tokens_to_src} to roundtrip.")
16156 (license license:expat)))
16157
16158 (define-public python-future-fstrings
16159 (package
16160 (name "python-future-fstrings")
16161 (version "0.4.1")
16162 (source
16163 (origin
16164 (method url-fetch)
16165 (uri (pypi-uri "future_fstrings" version))
16166 (sha256
16167 (base32
16168 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
16169 (build-system python-build-system)
16170 (propagated-inputs
16171 `(("python-tokenize-rt" ,python-tokenize-rt)))
16172 (home-page "https://github.com/asottile/future-fstrings")
16173 (synopsis "Backport of fstrings to Python < 3.6")
16174 (description
16175 "This package provides a UTF-8 compatible encoding
16176 @code{future_fstrings}, which performs source manipulation. It decodes the
16177 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
16178 @code{f} strings.")
16179 (license license:expat)))
16180
16181 (define-public python-typed-ast
16182 (package
16183 (name "python-typed-ast")
16184 (version "1.4.0")
16185 (source
16186 (origin
16187 (method git-fetch)
16188 (uri (git-reference
16189 (url "https://github.com/python/typed_ast.git")
16190 (commit version)))
16191 (sha256
16192 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
16193 (file-name (git-file-name name version))))
16194 (build-system python-build-system)
16195 (arguments
16196 `(#:modules ((guix build utils)
16197 (guix build python-build-system)
16198 (ice-9 ftw)
16199 (srfi srfi-1)
16200 (srfi srfi-26))
16201 #:phases
16202 (modify-phases %standard-phases
16203 (replace 'check
16204 (lambda _
16205 (let ((cwd (getcwd)))
16206 (setenv "PYTHONPATH"
16207 (string-append cwd "/build/"
16208 (find (cut string-prefix? "lib" <>)
16209 (scandir (string-append cwd "/build")))
16210 ":"
16211 (getenv "PYTHONPATH"))))
16212 (invoke "pytest")
16213 #t)))))
16214 (native-inputs `(("python-pytest" ,python-pytest)))
16215 (home-page "https://github.com/python/typed_ast")
16216 (synopsis "Fork of Python @code{ast} modules with type comment support")
16217 (description "This package provides a parser similar to the standard
16218 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
16219 include PEP 484 type comments and are independent of the version of Python
16220 under which they are run. The @code{typed_ast} parsers produce the standard
16221 Python AST (plus type comments), and are both fast and correct, as they are
16222 based on the CPython 2.7 and 3.7 parsers.")
16223 ;; See the file "LICENSE" for the details.
16224 (license (list license:psfl
16225 license:asl2.0
16226 license:expat)))) ;ast27/Parser/spark.py
16227
16228 (define-public python-typing
16229 (package
16230 (name "python-typing")
16231 (version "3.7.4.1")
16232 (source
16233 (origin
16234 (method url-fetch)
16235 (uri (pypi-uri "typing" version))
16236 (sha256
16237 (base32
16238 "08xs7s5pyq99hbrzw23inczmidz90krvpv9q5p1qrvh6yzrydpwi"))))
16239 (build-system python-build-system)
16240 (home-page "https://docs.python.org/3/library/typing.html")
16241 (synopsis "Type hints for Python")
16242 (description "This is a backport of the standard library @code{typing}
16243 module to Python versions older than 3.5. Typing defines a standard notation
16244 for Python function and variable type annotations. The notation can be used
16245 for documenting code in a concise, standard format, and it has been designed
16246 to also be used by static and runtime type checkers, static analyzers, IDEs
16247 and other tools.")
16248 (license license:psfl)))
16249
16250 (define-public python2-typing
16251 (package-with-python2 python-typing))
16252
16253 (define-public python-typing-extensions
16254 (package
16255 (name "python-typing-extensions")
16256 (version "3.7.4.1")
16257 (source
16258 (origin
16259 (method url-fetch)
16260 (uri (pypi-uri "typing_extensions" version))
16261 (sha256
16262 (base32
16263 "1wj1vcgbnm20aiinmphyxfrbv3qi9xdhvw89ab3qm42y9n4wq7h9"))))
16264 (build-system python-build-system)
16265 (home-page
16266 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
16267 (synopsis "Experimental type hints for Python")
16268 (description
16269 "The typing_extensions module contains additional @code{typing} hints not
16270 yet present in the of the @code{typing} standard library.
16271 Included are implementations of:
16272 @enumerate
16273 @item ClassVar
16274 @item ContextManager
16275 @item Counter
16276 @item DefaultDict
16277 @item Deque
16278 @item NewType
16279 @item NoReturn
16280 @item overload
16281 @item Protocol
16282 @item runtime
16283 @item Text
16284 @item Type
16285 @item TYPE_CHECKING
16286 @item AsyncGenerator
16287 @end enumerate\n")
16288 (license license:psfl)))
16289
16290 (define-public bpython
16291 (package
16292 (name "bpython")
16293 (version "0.18")
16294 (source
16295 (origin
16296 (method url-fetch)
16297 (uri (pypi-uri "bpython" version))
16298 (sha256
16299 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
16300 (build-system python-build-system)
16301 (arguments
16302 `(#:phases
16303 (modify-phases %standard-phases
16304 (add-after 'unpack 'remove-failing-test
16305 (lambda _
16306 ;; Remove failing test. FIXME: make it pass
16307 (delete-file "bpython/test/test_args.py")
16308 #t))
16309 (add-after 'wrap 'add-aliases
16310 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
16311 (lambda* (#:key outputs #:allow-other-keys)
16312 (let ((out (assoc-ref outputs "out")))
16313 (for-each
16314 (lambda (old new)
16315 (symlink old (string-append out "/bin/" new)))
16316 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
16317 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
16318 #t)))))
16319 (propagated-inputs
16320 `(("python-pygments" ,python-pygments)
16321 ("python-requests" ,python-requests)
16322 ("python-babel" ,python-babel) ; optional, for internationalization
16323 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
16324 ("python-greenlet" ,python-greenlet)
16325 ("python-urwid" ,python-urwid) ; for bpython-urwid only
16326 ("python-six" ,python-six)))
16327 (native-inputs
16328 `(("python-sphinx" ,python-sphinx)
16329 ("python-mock" ,python-mock)))
16330 (home-page "https://bpython-interpreter.org/")
16331 (synopsis "Fancy interface to the Python interpreter")
16332 (description "Bpython is a fancy interface to the Python
16333 interpreter. bpython's main features are
16334
16335 @enumerate
16336 @item in-line syntax highlighting,
16337 @item readline-like autocomplete with suggestions displayed as you type,
16338 @item expected parameter list for any Python function,
16339 @item \"rewind\" function to pop the last line of code from memory and
16340 re-evaluate,
16341 @item send the code you've entered off to a pastebin,
16342 @item save the code you've entered to a file, and
16343 @item auto-indentation.
16344 @end enumerate")
16345 (license license:expat)))
16346
16347 (define-public bpython2
16348 (let ((base (package-with-python2
16349 (strip-python2-variant bpython))))
16350 (package (inherit base)
16351 (name "bpython2")
16352 (arguments
16353 `(#:python ,python-2
16354 #:phases
16355 (modify-phases %standard-phases
16356 (add-after 'unpack 'remove-failing-test
16357 (lambda _
16358 ;; Remove failing test. FIXME: make it pass
16359 (delete-file "bpython/test/test_args.py")
16360 ;; Disable failing test-cases (renaming inhibits they are
16361 ;; discovered)
16362 (substitute* "bpython/test/test_curtsies_repl.py"
16363 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
16364 (string-append a "xxx_off_" b))
16365 (("^(\\s*def )(test_complex\\W)" _ a b)
16366 (string-append a "xxx_off_" b)))
16367 #t))
16368 (add-before 'build 'rename-scripts
16369 ;; rename the scripts to bypthon2, bpdb2, etc.
16370 (lambda _
16371 (substitute* "setup.py"
16372 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
16373 (string-append name "2" rest "\n"))
16374 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
16375 (string-append name "2" (or sub "") rest "\n")))
16376 #t))))))))
16377
16378 (define-public python-pyinotify
16379 (package
16380 (name "python-pyinotify")
16381 (version "0.9.6")
16382 (source (origin
16383 (method url-fetch)
16384 (uri (pypi-uri "pyinotify" version))
16385 (sha256
16386 (base32
16387 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
16388 (build-system python-build-system)
16389 (arguments `(#:tests? #f)) ;no tests
16390 (home-page "https://github.com/seb-m/pyinotify")
16391 (synopsis "Python library for monitoring inotify events")
16392 (description
16393 "@code{pyinotify} provides a Python interface for monitoring
16394 file system events on Linux.")
16395 (license license:expat)))
16396
16397 (define-public python2-pyinotify
16398 (package-with-python2 python-pyinotify))
16399
16400 ;; Ada parser uses this version.
16401 (define-public python2-quex-0.67.3
16402 (package
16403 (name "python2-quex")
16404 (version "0.67.3")
16405 (source
16406 (origin
16407 (method url-fetch)
16408 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
16409 (version-major+minor version)
16410 "/quex-" version ".zip"))
16411 (sha256
16412 (base32
16413 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
16414 (build-system python-build-system)
16415 (native-inputs
16416 `(("unzip" ,unzip)))
16417 (arguments
16418 `(#:python ,python-2
16419 #:tests? #f
16420 #:phases
16421 (modify-phases %standard-phases
16422 (delete 'configure)
16423 (delete 'build)
16424 (replace 'install
16425 (lambda* (#:key outputs #:allow-other-keys)
16426 (let* ((out (assoc-ref outputs "out"))
16427 (share/quex (string-append out "/share/quex"))
16428 (bin (string-append out "/bin")))
16429 (copy-recursively "." share/quex)
16430 (mkdir-p bin)
16431 (symlink (string-append share/quex "/quex-exe.py")
16432 (string-append bin "/quex"))
16433 #t))))))
16434 (native-search-paths
16435 (list (search-path-specification
16436 (variable "QUEX_PATH")
16437 (files '("share/quex")))))
16438 (home-page "http://quex.sourceforge.net/")
16439 (synopsis "Lexical analyzer generator in Python")
16440 (description "@code{quex} is a lexical analyzer generator in Python.")
16441 (license license:lgpl2.1+))) ; Non-military
16442
16443 (define-public python2-quex
16444 (package (inherit python2-quex-0.67.3)
16445 (name "python2-quex")
16446 (version "0.68.1")
16447 (source
16448 (origin
16449 (method url-fetch)
16450 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
16451 (sha256
16452 (base32
16453 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
16454 (file-name (string-append name "-" version ".tar.gz"))))))
16455
16456 (define-public python-more-itertools
16457 (package
16458 (name "python-more-itertools")
16459 (version "8.2.0")
16460 (source
16461 (origin
16462 (method url-fetch)
16463 (uri (pypi-uri "more-itertools" version))
16464 (sha256
16465 (base32
16466 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
16467 (build-system python-build-system)
16468 (home-page "https://github.com/erikrose/more-itertools")
16469 (synopsis "More routines for operating on iterables, beyond itertools")
16470 (description "Python's built-in @code{itertools} module implements a
16471 number of iterator building blocks inspired by constructs from APL, Haskell,
16472 and SML. @code{more-itertools} includes additional building blocks for
16473 working with iterables.")
16474 (properties `((python2-variant . ,(delay python2-more-itertools))))
16475 (license license:expat)))
16476
16477 ;; The 5.x series are the last versions supporting Python 2.7.
16478 (define-public python2-more-itertools
16479 (package
16480 (inherit python-more-itertools)
16481 (name "python2-more-itertools")
16482 (version "5.0.0")
16483 (source (origin
16484 (method url-fetch)
16485 (uri (pypi-uri "more-itertools" version))
16486 (sha256
16487 (base32
16488 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
16489 (arguments
16490 `(#:python ,python-2))
16491 (propagated-inputs
16492 `(("python2-six" ,python2-six-bootstrap)))))
16493
16494 (define-public python-latexcodec
16495 (package
16496 (name "python-latexcodec")
16497 (version "1.0.7")
16498 (source
16499 (origin
16500 (method url-fetch)
16501 (uri (pypi-uri "latexcodec" version))
16502 (sha256
16503 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
16504 (build-system python-build-system)
16505 (inputs
16506 `(("python-six" ,python-six)))
16507 (home-page "https://readthedocs.org/projects/latexcodec/")
16508 (synopsis "Work with LaTeX code in Python")
16509 (description "Lexer and codec to work with LaTeX code in Python.")
16510 (license license:expat)))
16511
16512 (define-public python-pybtex
16513 (package
16514 (name "python-pybtex")
16515 (version "0.22.2")
16516 (source
16517 (origin
16518 (method url-fetch)
16519 (uri (pypi-uri "pybtex" version))
16520 (sha256
16521 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
16522 (build-system python-build-system)
16523 (native-inputs
16524 `(("python-nose" ,python-nose)))
16525 (inputs
16526 `(("python-latexcodec" ,python-latexcodec)
16527 ("python-pyyaml" ,python-pyyaml)
16528 ("python-six" ,python-six)))
16529 (arguments
16530 `(#:test-target "nosetests"))
16531 (home-page "https://pybtex.org/")
16532 (synopsis "BibTeX-compatible bibliography processor")
16533 (description "Pybtex is a BibTeX-compatible bibliography processor written
16534 in Python. You can simply type pybtex instead of bibtex.")
16535 (license license:expat)))
16536
16537 (define-public python-onetimepass
16538 (package
16539 (name "python-onetimepass")
16540 (version "1.0.1")
16541 (source
16542 (origin
16543 (method url-fetch)
16544 (uri (pypi-uri "onetimepass" version))
16545 (sha256
16546 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
16547 (build-system python-build-system)
16548 (propagated-inputs `(("python-six" ,python-six)))
16549 (home-page "https://github.com/tadeck/onetimepass/")
16550 (synopsis "One-time password library")
16551 (description "Python one-time password library for HMAC-based (HOTP) and
16552 time-based (TOTP) passwords.")
16553 (license license:expat)))
16554
16555 (define-public python-parso
16556 (package
16557 (name "python-parso")
16558 (version "0.7.0")
16559 (source
16560 (origin
16561 (method url-fetch)
16562 (uri (pypi-uri "parso" version))
16563 (sha256
16564 (base32
16565 "0b7irps2dqmzq41sxbpvxbivhh1x2hwmbqp45bbpd82446p9z3lh"))))
16566 (native-inputs
16567 `(("python-pytest" ,python-pytest)))
16568 (build-system python-build-system)
16569 (arguments
16570 `(#:phases (modify-phases %standard-phases
16571 (replace 'check
16572 (lambda _ (invoke "pytest" "-vv"))))))
16573 (home-page "https://github.com/davidhalter/parso")
16574 (synopsis "Python Parser")
16575 (description "Parso is a Python parser that supports error recovery and
16576 round-trip parsing for different Python versions (in multiple Python versions).
16577 Parso is also able to list multiple syntax errors in your Python file.")
16578 (license license:expat)))
16579
16580 (define-public python2-parso
16581 (package-with-python2 python-parso))
16582
16583 (define-public python-async-generator
16584 (package
16585 (name "python-async-generator")
16586 (version "1.10")
16587 (source
16588 (origin
16589 (method url-fetch)
16590 (uri (pypi-uri "async_generator" version))
16591 (sha256
16592 (base32
16593 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
16594 (build-system python-build-system)
16595 (native-inputs
16596 `(("python-pytest" ,python-pytest)))
16597 (home-page "https://github.com/python-trio/async_generator")
16598 (synopsis "Async generators and context managers for Python 3.5+")
16599 (description "@code{async_generator} back-ports Python 3.6's native async
16600 generators and Python 3.7's context managers into Python 3.5.")
16601 ;; Dual licensed.
16602 (license (list license:expat license:asl2.0))))
16603
16604 (define-public python-async-timeout
16605 (package
16606 (name "python-async-timeout")
16607 (version "3.0.1")
16608 (source
16609 (origin
16610 (method url-fetch)
16611 (uri (pypi-uri "async-timeout" version))
16612 (sha256
16613 (base32
16614 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
16615 (build-system python-build-system)
16616 (home-page "https://github.com/aio-libs/async_timeout/")
16617 (synopsis "Timeout context manager for asyncio programs")
16618 (description "@code{async-timeout} provides a timeout timeout context
16619 manager compatible with @code{asyncio}.")
16620 (license license:asl2.0)))
16621
16622 (define-public python-glob2
16623 (package
16624 (name "python-glob2")
16625 (version "0.7")
16626 (source
16627 (origin
16628 (method git-fetch)
16629 (uri (git-reference
16630 (url "https://github.com/miracle2k/python-glob2.git")
16631 (commit (string-append "v" version))))
16632 (file-name (git-file-name name version))
16633 (sha256
16634 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
16635 (build-system python-build-system)
16636 (home-page "https://github.com/miracle2k/python-glob2/")
16637 (synopsis "Extended Version of the python buildin glob module")
16638 (description "This is an extended version of the Python
16639 @url{http://docs.python.org/library/glob.html, built-in glob module} which
16640 adds:
16641
16642 @itemize
16643 @item The ability to capture the text matched by glob patterns, and return
16644 those matches alongside the file names.
16645 @item A recursive @code{**} globbing syntax, akin for example to the
16646 @code{globstar} option of Bash.
16647 @item The ability to replace the file system functions used, in order to glob
16648 on virtual file systems.
16649 @item Compatible with Python 2 and Python 3 (tested with 3.3).
16650 @end itemize
16651
16652 Glob2 currently based on the glob code from Python 3.3.1.")
16653 (license license:bsd-2)))
16654
16655 (define-public python2-glob2
16656 (package-with-python2 python-glob2))
16657
16658 (define-public python-gipc
16659 (package
16660 (name "python-gipc")
16661 (version "0.6.0")
16662 (source
16663 (origin
16664 (method url-fetch)
16665 (uri (pypi-uri "gipc" version ".zip"))
16666 (sha256
16667 (base32
16668 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
16669 (build-system python-build-system)
16670 (native-inputs
16671 `(("unzip" ,unzip)))
16672 (propagated-inputs
16673 `(("python-gevent" ,python-gevent)))
16674 (home-page "https://gehrcke.de/gipc/")
16675 (synopsis "Child process management in the context of gevent")
16676 (description "Usage of Python's multiprocessing package in a
16677 gevent-powered application may raise problems. With @code{gipc},
16678 process-based child processes can safely be created anywhere within a
16679 gevent-powered application.")
16680 (license license:expat)))
16681
16682 (define-public python2-gipc
16683 (package-with-python2 python-gipc))
16684
16685 (define-public python-fusepy
16686 (package
16687 (name "python-fusepy")
16688 (version "2.0.4")
16689 (source
16690 (origin
16691 (method url-fetch)
16692 (uri (pypi-uri "fusepy" version))
16693 (sha256
16694 (base32
16695 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
16696 (build-system python-build-system)
16697 (arguments
16698 `(#:phases
16699 (modify-phases %standard-phases
16700 (add-before 'build 'set-library-file-name
16701 (lambda* (#:key inputs #:allow-other-keys)
16702 (let ((fuse (assoc-ref inputs "fuse")))
16703 (substitute* "fuse.py"
16704 (("find_library\\('fuse'\\)")
16705 (string-append "'" fuse "/lib/libfuse.so'")))
16706 #t))))))
16707 (propagated-inputs
16708 `(("fuse" ,fuse)))
16709 (home-page "https://github.com/fusepy/fusepy")
16710 (synopsis "Simple ctypes bindings for FUSE")
16711 (description "Python module that provides a simple interface to FUSE and
16712 MacFUSE. The binding is created using the standard @code{ctypes} library.")
16713 (license license:isc)))
16714
16715 (define-public python2-fusepy
16716 (package-with-python2 python-fusepy))
16717
16718 (define-public python-fusepyng
16719 (package
16720 (name "python-fusepyng")
16721 (version "1.0.7")
16722 (source
16723 (origin
16724 (method url-fetch)
16725 (uri (pypi-uri "fusepyng" version))
16726 (sha256
16727 (base32
16728 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
16729 (build-system python-build-system)
16730 (arguments
16731 '(#:phases
16732 (modify-phases %standard-phases
16733 (add-after 'unpack 'set-libfuse-path
16734 (lambda* (#:key inputs #:allow-other-keys)
16735 (let ((fuse (assoc-ref inputs "fuse")))
16736 (substitute* "fusepyng.py"
16737 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
16738 (string-append "\"" fuse "/lib/libfuse.so\""))))
16739 #t)))))
16740 (inputs
16741 `(("fuse" ,fuse)))
16742 (propagated-inputs
16743 `(("python-paramiko" ,python-paramiko)))
16744 (home-page "https://github.com/rianhunter/fusepyng")
16745 (synopsis "Simple ctypes bindings for FUSE")
16746 (description "@code{fusepyng} is a Python module that provides a simple
16747 interface to FUSE on various operating systems. It's just one file and is
16748 implemented using @code{ctypes}.")
16749 (license license:isc)))
16750
16751 (define-public python2-gdrivefs
16752 (package
16753 (name "python2-gdrivefs")
16754 (version "0.14.9")
16755 (source
16756 (origin
16757 (method url-fetch)
16758 (uri (pypi-uri "gdrivefs" version))
16759 (sha256
16760 (base32
16761 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
16762 (build-system python-build-system)
16763 (arguments
16764 `(#:python ,python-2
16765 #:phases
16766 (modify-phases %standard-phases
16767 (add-before 'build 'patch-setup-py
16768 (lambda _
16769 ;; Update requirements from dependency==version
16770 ;; to dependency>=version
16771 (substitute* "gdrivefs/resources/requirements.txt"
16772 (("==") ">="))
16773 #t)))))
16774 (native-inputs
16775 `(("python2-gipc" ,python2-gipc)
16776 ("python2-gevent" ,python2-gevent)
16777 ("python2-greenlet" ,python2-greenlet)
16778 ("python2-httplib2" ,python2-httplib2)
16779 ("python2-uritemplate" ,python2-uritemplate)
16780 ("python2-oauth2client" ,python2-oauth2client)
16781 ("python2-six" ,python2-six)))
16782 (propagated-inputs
16783 `(("python2-dateutil" ,python2-dateutil)
16784 ("python2-fusepy" ,python2-fusepy)
16785 ("python2-google-api-client" ,python2-google-api-client)))
16786 (home-page "https://github.com/dsoprea/GDriveFS")
16787 (synopsis "Mount Google Drive as a local file system")
16788 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
16789 under Python 2.7.")
16790 (license license:gpl2)))
16791
16792 (define-public python-userspacefs
16793 (package
16794 (name "python-userspacefs")
16795 (version "1.0.13")
16796 (source
16797 (origin
16798 (method url-fetch)
16799 (uri (pypi-uri "userspacefs" version))
16800 (sha256
16801 (base32
16802 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
16803 (build-system python-build-system)
16804 (propagated-inputs
16805 `(("python-fusepyng" ,python-fusepyng)))
16806 (home-page "https://github.com/rianhunter/userspacefs")
16807 (synopsis "User-space file systems for Python")
16808 (description
16809 "@code{userspacefs} is a library that allows you to easily write
16810 user-space file systems in Python.")
16811 (license license:gpl3+)))
16812
16813 (define-public pybind11
16814 (package
16815 (name "pybind11")
16816 (version "2.4.3")
16817 (source (origin
16818 (method git-fetch)
16819 (uri (git-reference
16820 (url "https://github.com/pybind/pybind11.git")
16821 (commit (string-append "v" version))))
16822 (sha256
16823 (base32
16824 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
16825 (file-name (git-file-name name version))))
16826 (build-system cmake-build-system)
16827 (native-inputs
16828 `(("python" ,python-wrapper)
16829
16830 ;; The following dependencies are used for tests.
16831 ("python-pytest" ,python-pytest)
16832 ("catch" ,catch-framework2-1)
16833 ("eigen" ,eigen)))
16834 (arguments
16835 `(#:configure-flags
16836 (list (string-append "-DCATCH_INCLUDE_DIR="
16837 (assoc-ref %build-inputs "catch")
16838 "/include/catch"))
16839
16840 #:phases (modify-phases %standard-phases
16841 (add-after 'install 'install-python
16842 (lambda* (#:key outputs #:allow-other-keys)
16843 (let ((out (assoc-ref outputs "out")))
16844 (with-directory-excursion "../source"
16845 (setenv "PYBIND11_USE_CMAKE" "yes")
16846 (invoke "python" "setup.py" "install"
16847 "--single-version-externally-managed"
16848 "--root=/"
16849 (string-append "--prefix=" out)))))))
16850
16851 #:test-target "check"))
16852 (home-page "https://github.com/pybind/pybind11/")
16853 (synopsis "Seamless operability between C++11 and Python")
16854 (description
16855 "@code{pybind11} is a lightweight header-only library that exposes C++
16856 types in Python and vice versa, mainly to create Python bindings of existing
16857 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
16858 library: to minimize boilerplate code in traditional extension modules by
16859 inferring type information using compile-time introspection.")
16860 (license license:bsd-3)))
16861
16862 (define-public python-fasteners
16863 (package
16864 (name "python-fasteners")
16865 (version "0.14.1")
16866 (source
16867 (origin
16868 (method url-fetch)
16869 (uri (pypi-uri "fasteners" version))
16870 (sha256
16871 (base32
16872 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16873 (build-system python-build-system)
16874 (propagated-inputs
16875 `(("python-monotonic" ,python-monotonic)
16876 ("python-six" ,python-six)
16877 ("python-testtools" ,python-testtools)))
16878 (home-page "https://github.com/harlowja/fasteners")
16879 (synopsis "Python package that provides useful locks")
16880 (description
16881 "This package provides a Python program that provides following locks:
16882
16883 @itemize
16884 @item Locking decorator
16885 @item Reader-writer locks
16886 @item Inter-process locks
16887 @item Generic helpers
16888 @end itemize\n")
16889 (properties `((python2-variant . ,(delay python2-fasteners))))
16890 (license license:asl2.0)))
16891
16892 (define-public python2-fasteners
16893 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16894 (package
16895 (inherit base)
16896 (propagated-inputs
16897 `(("python2-futures" ,python2-futures)
16898 ,@(package-propagated-inputs base))))))
16899
16900 (define-public python-requests-file
16901 (package
16902 (name "python-requests-file")
16903 (version "1.4.3")
16904 (source
16905 (origin
16906 (method url-fetch)
16907 (uri (pypi-uri "requests-file" version))
16908 (sha256
16909 (base32
16910 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16911 (build-system python-build-system)
16912 (propagated-inputs
16913 `(("python-requests" ,python-requests)
16914 ("python-six" ,python-six)))
16915 (home-page
16916 "https://github.com/dashea/requests-file")
16917 (synopsis "File transport adapter for Requests")
16918 (description
16919 "Requests-File is a transport adapter for use with the Requests Python
16920 library to allow local file system access via @code{file://} URLs.")
16921 (license license:asl2.0)))
16922
16923 (define-public python2-requests-file
16924 (package-with-python2 python-requests-file))
16925
16926 (define-public python-tldextract
16927 (package
16928 (name "python-tldextract")
16929 (version "2.2.0")
16930 (source
16931 (origin
16932 (method url-fetch)
16933 (uri (pypi-uri "tldextract" version))
16934 (sha256
16935 (base32
16936 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16937 (build-system python-build-system)
16938 (native-inputs
16939 `(("python-pytest" ,python-pytest)
16940 ("python-responses" ,python-responses)))
16941 (propagated-inputs
16942 `(("python-idna" ,python-idna)
16943 ("python-requests" ,python-requests)
16944 ("python-requests-file" ,python-requests-file)))
16945 (home-page
16946 "https://github.com/john-kurkowski/tldextract")
16947 (synopsis
16948 "Separate the TLD from the registered domain and subdomains of a URL")
16949 (description
16950 "TLDExtract accurately separates the TLD from the registered domain and
16951 subdomains of a URL, using the Public Suffix List. By default, this includes
16952 the public ICANN TLDs and their exceptions. It can optionally support the
16953 Public Suffix List's private domains as well.")
16954 (license license:bsd-3)))
16955
16956 (define-public python2-tldextract
16957 (package-with-python2 python-tldextract))
16958
16959 (define-public python-pynamecheap
16960 (package
16961 (name "python-pynamecheap")
16962 (version "0.0.3")
16963 (source
16964 (origin
16965 (method url-fetch)
16966 (uri (pypi-uri "PyNamecheap" version))
16967 (sha256
16968 (base32
16969 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16970 (build-system python-build-system)
16971 (propagated-inputs
16972 `(("python-requests" ,python-requests)))
16973 (home-page
16974 "https://github.com/Bemmu/PyNamecheap")
16975 (synopsis
16976 "Namecheap API client in Python")
16977 (description
16978 "PyNamecheap is a Namecheap API client in Python.")
16979 (license license:expat)))
16980
16981 (define-public python2-pynamecheap
16982 (package-with-python2 python-pynamecheap))
16983
16984 (define-public python-dns-lexicon
16985 (package
16986 (name "python-dns-lexicon")
16987 (version "2.4.0")
16988 (source
16989 (origin
16990 (method url-fetch)
16991 (uri (pypi-uri "dns-lexicon" version))
16992 (sha256
16993 (base32
16994 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16995 (build-system python-build-system)
16996 (arguments
16997 `(#:tests? #f)) ;requires internet access
16998 (propagated-inputs
16999 `(("python-future" ,python-future)
17000 ("python-pynamecheap" ,python-pynamecheap)
17001 ("python-requests" ,python-requests)
17002 ("python-tldextract" ,python-tldextract)
17003 ("python-urllib3" ,python-urllib3)))
17004 (home-page "https://github.com/AnalogJ/lexicon")
17005 (synopsis
17006 "Manipulate DNS records on various DNS providers")
17007 (description
17008 "Lexicon provides a way to manipulate DNS records on multiple DNS
17009 providers in a standardized way. It has a CLI but it can also be used as a
17010 Python library. It was designed to be used in automation, specifically with
17011 Let's Encrypt.")
17012 (license license:expat)))
17013
17014 (define-public python2-dns-lexicon
17015 (package-with-python2 python-dns-lexicon))
17016
17017 (define-public python-commandlines
17018 (package
17019 (name "python-commandlines")
17020 (version "0.4.1")
17021 (source
17022 (origin
17023 (method url-fetch)
17024 (uri (pypi-uri "commandlines" version))
17025 (sha256
17026 (base32
17027 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
17028 (build-system python-build-system)
17029 (home-page "https://github.com/chrissimpkins/commandlines")
17030 (synopsis "Command line argument to object parsing library")
17031 (description
17032 "@code{Commandlines} is a Python library for command line application
17033 development that supports command line argument parsing, command string
17034 validation testing and application logic.")
17035 (license license:expat)))
17036
17037 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
17038 ;; python-numba. They have a very unflexible relationship.
17039 (define-public python-numba
17040 (package
17041 (name "python-numba")
17042 (version "0.46.0")
17043 (source
17044 (origin
17045 (method url-fetch)
17046 (uri (pypi-uri "numba" version))
17047 (sha256
17048 (base32
17049 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
17050 (build-system python-build-system)
17051 (arguments
17052 `(#:modules ((guix build utils)
17053 (guix build python-build-system)
17054 (ice-9 ftw)
17055 (srfi srfi-1)
17056 (srfi srfi-26))
17057 #:phases
17058 (modify-phases %standard-phases
17059 (add-after 'unpack 'disable-proprietary-features
17060 (lambda _
17061 (setenv "NUMBA_DISABLE_HSA" "1")
17062 (setenv "NUMBA_DISABLE_CUDA" "1")
17063 #t))
17064 (add-after 'unpack 'remove-failing-tests
17065 (lambda _
17066 ;; FIXME: These tests fail for unknown reasons:
17067 ;; test_non_writable_pycache, test_non_creatable_pycache, and
17068 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
17069 (substitute* "numba/tests/test_dispatcher.py"
17070 (("def test(_non_writable_pycache)" _ m)
17071 (string-append "def guix_skip" m))
17072 (("def test(_non_creatable_pycache)" _ m)
17073 (string-append "def guix_skip" m))
17074 (("def test(_frozen)" _ m)
17075 (string-append "def guix_skip" m)))
17076
17077 ;; These tests fail because we don't run the tests from the build
17078 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
17079 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
17080 (substitute* "numba/tests/test_pycc.py"
17081 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
17082 (string-append "def guix_skip" m)))
17083
17084 ;; These tests fail because our version of Python does not have
17085 ;; a recognizable front-end for the Numba distribution to use
17086 ;; to check against.
17087 (substitute* "numba/tests/test_entrypoints.py"
17088 (("def test(_init_entrypoint)" _ m)
17089 (string-append "def guix_skip" m)))
17090 (substitute* "numba/tests/test_jitclasses.py"
17091 (("def test(_jitclass_longlabel_not_truncated)" _ m)
17092 (string-append "def guix_skip" m)))
17093 #t))
17094 (replace 'check
17095 (lambda _
17096 (let ((cwd (getcwd)))
17097 (setenv "PYTHONPATH"
17098 (string-append cwd "/build/"
17099 (find (cut string-prefix? "lib" <>)
17100 (scandir (string-append cwd "/build")))
17101 ":"
17102 (getenv "PYTHONPATH")))
17103 ;; Something is wrong with the PYTHONPATH when running the
17104 ;; tests from the build directory, as it complains about not being
17105 ;; able to import certain modules.
17106 (with-directory-excursion "/tmp"
17107 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
17108 #t)))))
17109 (propagated-inputs
17110 `(("python-llvmlite" ,python-llvmlite)
17111 ("python-numpy" ,python-numpy)
17112 ("python-singledispatch" ,python-singledispatch)))
17113 ;; Needed for tests.
17114 (inputs
17115 `(("python-jinja2" ,python-jinja2)
17116 ("python-pygments" ,python-pygments)))
17117 (home-page "https://numba.pydata.org")
17118 (synopsis "Compile Python code using LLVM")
17119 (description "Numba gives you the power to speed up your applications with
17120 high performance functions written directly in Python. With a few
17121 annotations, array-oriented and math-heavy Python code can be just-in-time
17122 compiled to native machine instructions, similar in performance to C, C++ and
17123 Fortran, without having to switch languages or Python interpreters.
17124
17125 Numba works by generating optimized machine code using the LLVM compiler
17126 infrastructure at import time, runtime, or statically (using the included pycc
17127 tool).")
17128 (license license:bsd-3)))
17129
17130 (define-public python-numcodecs
17131 (package
17132 (name "python-numcodecs")
17133 (version "0.6.4")
17134 (source
17135 (origin
17136 (method url-fetch)
17137 (uri (pypi-uri "numcodecs" version))
17138 (sha256
17139 (base32
17140 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
17141 (build-system python-build-system)
17142 (propagated-inputs
17143 `(("python-numpy" ,python-numpy)
17144 ("python-msgpack" ,python-msgpack)))
17145 (native-inputs
17146 `(("python-pytest" ,python-pytest)
17147 ("python-setuptools-scm" ,python-setuptools-scm)))
17148 (home-page "https://github.com/zarr-developers/numcodecs")
17149 (synopsis "Buffer compression and transformation codecs")
17150 (description
17151 "This Python package provides buffer compression and transformation
17152 codecs for use in data storage and communication applications.")
17153 (license license:expat)))
17154
17155 (define-public python-asciitree
17156 (package
17157 (name "python-asciitree")
17158 (version "0.3.3")
17159 (source
17160 (origin
17161 (method url-fetch)
17162 (uri (pypi-uri "asciitree" version))
17163 (sha256
17164 (base32
17165 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
17166 (build-system python-build-system)
17167 (home-page "https://github.com/mbr/asciitree")
17168 (synopsis "Draws ASCII trees")
17169 (description "This package draws tree structures using characters.")
17170 (license license:expat)))
17171
17172 (define-public python-zarr
17173 (package
17174 (name "python-zarr")
17175 (version "2.4.0")
17176 (source
17177 (origin
17178 (method url-fetch)
17179 (uri (pypi-uri "zarr" version))
17180 (sha256
17181 (base32
17182 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
17183 (build-system python-build-system)
17184 (arguments
17185 `(#:phases
17186 (modify-phases %standard-phases
17187 (add-after 'unpack 'disable-service-tests
17188 (lambda _
17189 (setenv "ZARR_TEST_ABS" "0")
17190 (setenv "ZARR_TEST_MONGO" "0")
17191 (setenv "ZARR_TEST_REDIS" "0")
17192 #t))
17193 (replace 'check
17194 (lambda _
17195 (invoke "pytest" "-vv" "-k" "not lmdb")
17196 #t)))))
17197 (propagated-inputs
17198 `(("python-asciitree" ,python-asciitree)
17199 ("python-fasteners" ,python-fasteners)
17200 ("python-numcodecs" ,python-numcodecs)
17201 ("python-numpy" ,python-numpy)))
17202 (native-inputs
17203 `(("python-pytest" ,python-pytest)
17204 ("python-setuptools-scm" ,python-setuptools-scm)))
17205 (home-page "https://github.com/zarr-developers/zarr-python")
17206 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
17207 (description
17208 "This package provides an implementation of chunked, compressed,
17209 N-dimensional arrays for Python.")
17210 (license license:expat)))
17211
17212 (define-public python-anndata
17213 (package
17214 (name "python-anndata")
17215 (version "0.7.1")
17216 (source
17217 (origin
17218 (method url-fetch)
17219 (uri (pypi-uri "anndata" version))
17220 (sha256
17221 (base32
17222 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
17223 (build-system python-build-system)
17224 (arguments
17225 `(#:phases
17226 (modify-phases %standard-phases
17227 (add-after 'unpack 'delete-inconvenient-tests
17228 (lambda _
17229 ;; This test depends on python-scikit-learn.
17230 (delete-file "anndata/tests/test_inplace_subset.py")
17231 #t))
17232 (delete 'check)
17233 (add-after 'install 'check
17234 (lambda* (#:key inputs outputs #:allow-other-keys)
17235 (add-installed-pythonpath inputs outputs)
17236 (invoke "pytest" "-vv"))))))
17237 (propagated-inputs
17238 `(("python-h5py" ,python-h5py)
17239 ("python-importlib-metadata" ,python-importlib-metadata)
17240 ("python-natsort" ,python-natsort)
17241 ("python-numcodecs" ,python-numcodecs)
17242 ("python-packaging" ,python-packaging)
17243 ("python-pandas" ,python-pandas)
17244 ("python-scipy" ,python-scipy)
17245 ("python-zarr" ,python-zarr)))
17246 (native-inputs
17247 `(("python-joblib" ,python-joblib)
17248 ("python-pytest" ,python-pytest)
17249 ("python-setuptools-scm" ,python-setuptools-scm)))
17250 (home-page "https://github.com/theislab/anndata")
17251 (synopsis "Annotated data for data analysis pipelines")
17252 (description "Anndata is a package for simple (functional) high-level APIs
17253 for data analysis pipelines. In this context, it provides an efficient,
17254 scalable way of keeping track of data together with learned annotations and
17255 reduces the code overhead typically encountered when using a mostly
17256 object-oriented library such as @code{scikit-learn}.")
17257 (license license:bsd-3)))
17258
17259 (define-public python-dill
17260 (package
17261 (name "python-dill")
17262 (version "0.3.1.1")
17263 (source
17264 (origin
17265 (method url-fetch)
17266 (uri (pypi-uri "dill" version))
17267 (sha256
17268 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
17269 (build-system python-build-system)
17270 (arguments
17271 `(#:phases
17272 (modify-phases %standard-phases
17273 (replace 'check
17274 (lambda _
17275 (with-directory-excursion "/tmp"
17276 (invoke "nosetests" "-v"))
17277 #t)))))
17278 (native-inputs
17279 `(("python-nose" ,python-nose)))
17280 (home-page "https://pypi.org/project/dill/")
17281 (synopsis "Serialize all of Python")
17282 (description "Dill extends Python's @code{pickle} module for serializing
17283 and de-serializing Python objects to the majority of the built-in Python
17284 types. Dill provides the user the same interface as the @code{pickle} module,
17285 and also includes some additional features. In addition to pickling Python
17286 objects, @code{dill} provides the ability to save the state of an interpreter
17287 session in a single command. Hence, it would be feasible to save a
17288 interpreter session, close the interpreter, ship the pickled file to another
17289 computer, open a new interpreter, unpickle the session and thus continue from
17290 the saved state of the original interpreter session.")
17291 (license license:bsd-3)))
17292
17293 (define-public python-multiprocess
17294 (package
17295 (name "python-multiprocess")
17296 (version "0.70.9")
17297 (source
17298 (origin
17299 (method url-fetch)
17300 (uri (pypi-uri "multiprocess" version))
17301 (sha256
17302 (base32
17303 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
17304 (build-system python-build-system)
17305 (arguments
17306 `(#:phases
17307 (modify-phases %standard-phases
17308 (add-after 'unpack 'disable-broken-tests
17309 (lambda _
17310 ;; This test is broken as there is no keyboard interrupt.
17311 (substitute* "py3.7/multiprocess/tests/__init__.py"
17312 (("^(.*)def test_wait_result"
17313 line indent)
17314 (string-append indent
17315 "@unittest.skip(\"Disabled by Guix\")\n"
17316 line)))
17317 #t))
17318 ;; Tests must be run after installation.
17319 (delete 'check)
17320 (add-after 'install 'check
17321 (lambda* (#:key inputs outputs #:allow-other-keys)
17322 (add-installed-pythonpath inputs outputs)
17323 (invoke "python" "-m" "multiprocess.tests")
17324 #t)))))
17325 (propagated-inputs
17326 `(("python-dill" ,python-dill)))
17327 (home-page "https://pypi.org/project/multiprocess/")
17328 (synopsis "Multiprocessing and multithreading in Python")
17329 (description
17330 "This package is a fork of the multiprocessing Python package, a package
17331 which supports the spawning of processes using the API of the standard
17332 library's @code{threading} module.")
17333 (license license:bsd-3)))
17334
17335 (define-public python-toolz
17336 (package
17337 (name "python-toolz")
17338 (version "0.9.0")
17339 (source
17340 (origin
17341 (method url-fetch)
17342 (uri (pypi-uri "toolz" version))
17343 (sha256
17344 (base32
17345 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
17346 (build-system python-build-system)
17347 ;; FIXME: tests cannot be computed: "Can't perform this operation for
17348 ;; unregistered loader type"
17349 (arguments '(#:tests? #f))
17350 (home-page "https://github.com/pytoolz/toolz/")
17351 (synopsis "List processing tools and functional utilities")
17352 (description
17353 "This package provides a set of utility functions for iterators,
17354 functions, and dictionaries.")
17355 (license license:bsd-3)))
17356
17357 (define-public python2-toolz
17358 (package-with-python2 python-toolz))
17359
17360 (define-public python-cytoolz
17361 (package
17362 (name "python-cytoolz")
17363 (version "0.9.0.1")
17364 (source
17365 (origin
17366 (method url-fetch)
17367 (uri (pypi-uri "cytoolz" version))
17368 (sha256
17369 (base32
17370 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
17371 (build-system python-build-system)
17372 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
17373 ;; 'exceptions'"
17374 (arguments '(#:tests? #f))
17375 (propagated-inputs
17376 `(("python-toolz" ,python-toolz)))
17377 (native-inputs
17378 `(("python-cython" ,python-cython)))
17379 (home-page "https://github.com/pytoolz/cytoolz")
17380 (synopsis "High performance functional utilities")
17381 (description
17382 "The cytoolz package implements the same API as provided by toolz. The
17383 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
17384 that is accessible to other projects developed in Cython.")
17385 (license license:bsd-3)))
17386
17387 (define-public python-sortedcontainers
17388 (package
17389 (name "python-sortedcontainers")
17390 (version "2.1.0")
17391 (source
17392 (origin
17393 (method url-fetch)
17394 (uri (pypi-uri "sortedcontainers" version))
17395 (sha256
17396 (base32
17397 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
17398 (build-system python-build-system)
17399 (arguments
17400 ;; FIXME: Tests require many extra dependencies, and would introduce
17401 ;; a circular dependency on hypothesis, which uses this package.
17402 '(#:tests? #f))
17403 (propagated-inputs
17404 `(("python-appdirs" ,python-appdirs)
17405 ("python-distlib" ,python-distlib)
17406 ("python-filelock" ,python-filelock)
17407 ("python-six" ,python-six-bootstrap)))
17408 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
17409 (synopsis "Sorted List, Sorted Dict, Sorted Set")
17410 (description
17411 "This package provides a sorted collections library, written in
17412 pure-Python.")
17413 (license license:asl2.0)))
17414
17415 (define-public python2-sortedcontainers
17416 (package-with-python2 python-sortedcontainers))
17417
17418 (define-public python-cloudpickle
17419 (package
17420 (name "python-cloudpickle")
17421 (version "1.3.0")
17422 (source
17423 (origin
17424 (method url-fetch)
17425 (uri (pypi-uri "cloudpickle" version))
17426 (sha256
17427 (base32
17428 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
17429 (build-system python-build-system)
17430 (arguments
17431 '(#:phases (modify-phases %standard-phases
17432 (add-before 'check 'do-not-override-PYTHONPATH
17433 (lambda _
17434 ;; Append to PYTHONPATH instead of overriding it so
17435 ;; that dependencies from Guix can be found.
17436 (substitute* "tests/testutils.py"
17437 (("env\\['PYTHONPATH'\\] = pythonpath")
17438 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
17439 #t))
17440 (replace 'check
17441 (lambda* (#:key tests? #:allow-other-keys)
17442 (if tests?
17443 (invoke "pytest" "-s" "-vv")
17444 (format #t "test suite not run~%"))
17445 #t)))))
17446 (native-inputs
17447 `(;; For tests.
17448 ("python-psutil" ,python-psutil)
17449 ("python-pytest" ,python-pytest)
17450 ("python-tornado" ,python-tornado)))
17451 (home-page "https://github.com/cloudpipe/cloudpickle")
17452 (synopsis "Extended pickling support for Python objects")
17453 (description
17454 "Cloudpickle makes it possible to serialize Python constructs not
17455 supported by the default pickle module from the Python standard library. It
17456 is especially useful for cluster computing where Python expressions are
17457 shipped over the network to execute on remote hosts, possibly close to the
17458 data.")
17459 (properties `((python2-variant . ,(delay python2-cloudpickle))))
17460 (license license:bsd-3)))
17461
17462 (define-public python2-cloudpickle
17463 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
17464 (package
17465 (inherit base)
17466 (native-inputs
17467 `(("python-mock" ,python2-mock)
17468 ,@(package-native-inputs base)))
17469 (propagated-inputs
17470 `(("python-futures" ,python2-futures)
17471 ,@(package-propagated-inputs base))))))
17472
17473 (define-public python-locket
17474 (package
17475 (name "python-locket")
17476 (version "0.2.0")
17477 (source
17478 (origin
17479 (method url-fetch)
17480 (uri (pypi-uri "locket" version))
17481 (sha256
17482 (base32
17483 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
17484 (build-system python-build-system)
17485 (home-page "https://github.com/mwilliamson/locket.py")
17486 (synopsis "File-based locks for Python")
17487 (description
17488 "Locket implements a lock that can be used by multiple processes provided
17489 they use the same path.")
17490 (license license:bsd-2)))
17491
17492 (define-public python2-locket
17493 (package-with-python2 python-locket))
17494
17495 (define-public python-blosc
17496 (package
17497 (name "python-blosc")
17498 (version "1.5.1")
17499 (source
17500 (origin
17501 (method url-fetch)
17502 (uri (pypi-uri "blosc" version))
17503 (sha256
17504 (base32
17505 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
17506 (build-system python-build-system)
17507 ;; FIXME: all tests pass, but then this error is printed:
17508 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
17509 (arguments '(#:tests? #f))
17510 (propagated-inputs
17511 `(("python-numpy" ,python-numpy)))
17512 (home-page "https://github.com/blosc/python-blosc")
17513 (synopsis "Python wrapper for the Blosc data compressor library")
17514 (description "Blosc is a high performance compressor optimized for binary
17515 data. It has been designed to transmit data to the processor cache faster
17516 than the traditional, non-compressed, direct memory fetch approach via a
17517 @code{memcpy()} system call.
17518
17519 Blosc works well for compressing numerical arrays that contains data with
17520 relatively low entropy, like sparse data, time series, grids with
17521 regular-spaced values, etc.
17522
17523 This Python package wraps the Blosc library.")
17524 (license license:bsd-3)))
17525
17526 (define-public python2-blosc
17527 (package-with-python2 python-blosc))
17528
17529 (define-public python-partd
17530 (package
17531 (name "python-partd")
17532 (version "0.3.9")
17533 (source
17534 (origin
17535 (method url-fetch)
17536 (uri (pypi-uri "partd" version))
17537 (sha256
17538 (base32
17539 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
17540 (build-system python-build-system)
17541 (propagated-inputs
17542 `(("python-blosc" ,python-blosc)
17543 ("python-locket" ,python-locket)
17544 ("python-numpy" ,python-numpy)
17545 ("python-pandas" ,python-pandas)
17546 ("python-pyzmq" ,python-pyzmq)
17547 ("python-toolz" ,python-toolz)))
17548 (home-page "https://github.com/dask/partd/")
17549 (synopsis "Appendable key-value storage")
17550 (description "Partd stores key-value pairs. Values are raw bytes. We
17551 append on old values. Partd excels at shuffling operations.")
17552 (license license:bsd-3)))
17553
17554 (define-public python2-partd
17555 (package-with-python2 python-partd))
17556
17557 (define-public python-fsspec
17558 (package
17559 (name "python-fsspec")
17560 (version "0.6.1")
17561 (source
17562 (origin
17563 (method url-fetch)
17564 (uri (pypi-uri "fsspec" version))
17565 (sha256
17566 (base32
17567 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
17568 (build-system python-build-system)
17569 (arguments '(#:tests? #f)) ; there are none
17570 (home-page "https://github.com/intake/filesystem_spec")
17571 (synopsis "File-system specification")
17572 (description "The purpose of this package is to produce a template or
17573 specification for a file-system interface, that specific implementations
17574 should follow, so that applications making use of them can rely on a common
17575 behavior and not have to worry about the specific internal implementation
17576 decisions with any given backend.")
17577 (license license:bsd-3)))
17578
17579 (define-public python-dask
17580 (package
17581 (name "python-dask")
17582 (version "2.14.0")
17583 (source
17584 (origin
17585 (method url-fetch)
17586 (uri (pypi-uri "dask" version))
17587 (sha256
17588 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
17589 (build-system python-build-system)
17590 (arguments
17591 `(#:phases
17592 (modify-phases %standard-phases
17593 (add-after 'unpack 'disable-broken-tests
17594 (lambda _
17595 ;; This test is marked as xfail when pytest-xdist is used.
17596 (substitute* "dask/tests/test_threaded.py"
17597 (("def test_interrupt\\(\\)" m)
17598 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
17599 m)))
17600 ;; This one fails with a type error:
17601 ;; TypeError: Already tz-aware, use tz_convert to convert.
17602 (substitute* "dask/dataframe/tests/test_shuffle.py"
17603 (("def test_set_index_timestamp\\(\\)" m)
17604 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
17605 m)))
17606 #t))
17607 (replace 'check
17608 (lambda _ (invoke "pytest" "-vv"))))))
17609 (propagated-inputs
17610 `(("python-cloudpickle" ,python-cloudpickle)
17611 ("python-fsspec" ,python-fsspec)
17612 ("python-numpy" ,python-numpy)
17613 ("python-packaging" ,python-packaging)
17614 ("python-pandas" ,python-pandas)
17615 ("python-partd" ,python-partd)
17616 ("python-toolz" ,python-toolz)
17617 ("python-pyyaml" ,python-pyyaml)))
17618 (native-inputs
17619 `(("python-pytest" ,python-pytest)
17620 ("python-pytest-runner" ,python-pytest-runner)))
17621 (home-page "https://github.com/dask/dask/")
17622 (synopsis "Parallel computing with task scheduling")
17623 (description
17624 "Dask is a flexible parallel computing library for analytics. It
17625 consists of two components: dynamic task scheduling optimized for computation,
17626 and large data collections like parallel arrays, dataframes, and lists that
17627 extend common interfaces like NumPy, Pandas, or Python iterators to
17628 larger-than-memory or distributed environments. These parallel collections
17629 run on top of the dynamic task schedulers. ")
17630 (license license:bsd-3)))
17631
17632 (define-public python-ilinkedlist
17633 (package
17634 (name "python-ilinkedlist")
17635 (version "0.4.0")
17636 (source
17637 (origin
17638 (method url-fetch)
17639 (uri (pypi-uri "ilinkedlist" version))
17640 (sha256
17641 (base32
17642 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
17643 (build-system python-build-system)
17644 (native-inputs `(("python-pytest" ,python-pytest)))
17645 (inputs `(("python" ,python)))
17646 (home-page "https://github.com/luther9/ilinkedlist-py")
17647 (synopsis "Immutable linked list library")
17648 (description
17649 "This is a implementation of immutable linked lists for Python. It
17650 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
17651 Since a linked list is treated as immutable, it is hashable, and its length
17652 can be retrieved in constant time. Some of the terminology is inspired by
17653 LISP. It is possible to create an improper list by creating a @code{Pair}
17654 with a non-list @code{cdr}.")
17655 (license license:gpl3+)))
17656
17657 (define-public python-readlike
17658 (package
17659 (name "python-readlike")
17660 (version "0.1.3")
17661 (source
17662 (origin
17663 (method url-fetch)
17664 (uri (pypi-uri "readlike" version))
17665 (sha256
17666 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
17667 (build-system python-build-system)
17668 (home-page "https://github.com/jangler/readlike")
17669 (synopsis "GNU Readline-like line editing module")
17670 (description
17671 "This Python module provides line editing functions similar to the default
17672 Emacs-style ones of GNU Readline. Unlike the Python standard library's
17673 @code{readline} package, this one allows access to those capabilties in settings
17674 outside of a standard command-line interface. It is especially well-suited to
17675 interfacing with Urwid, due to a shared syntax for describing key inputs.
17676
17677 Currently, all stateless Readline commands are implemented. Yanking and history
17678 are not supported.")
17679 (license license:expat)))
17680
17681 (define-public python2-readlike
17682 (package-with-python2 python-readlike))
17683
17684 (define-public python-reparser
17685 (package
17686 (name "python-reparser")
17687 (version "1.4.3")
17688 (source
17689 (origin
17690 (method url-fetch)
17691 (uri (pypi-uri "ReParser" version))
17692 (sha256
17693 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
17694 (build-system python-build-system)
17695 (home-page "https://github.com/xmikos/reparser")
17696 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
17697 (description
17698 "This Python library provides a simple lexer/parser for inline markup based
17699 on regular expressions.")
17700 (license license:expat)))
17701
17702 (define-public python2-reparser
17703 (let ((reparser (package-with-python2
17704 (strip-python2-variant python-reparser))))
17705 (package (inherit reparser)
17706 (propagated-inputs
17707 `(("python2-enum34" ,python2-enum34)
17708 ,@(package-propagated-inputs reparser))))))
17709
17710 (define-public python-precis-i18n
17711 (package
17712 (name "python-precis-i18n")
17713 (version "1.0.0")
17714 (source
17715 (origin
17716 (method url-fetch)
17717 (uri (pypi-uri "precis_i18n" version))
17718 (sha256
17719 (base32
17720 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
17721 (build-system python-build-system)
17722 (home-page "https://github.com/byllyfish/precis_i18n")
17723 (synopsis "Implementation of the PRECIS framework")
17724 (description
17725 "This module implements the PRECIS Framework as described in RFC 8264,
17726 RFC 8265 and RFC 8266.")
17727 (license license:expat)))
17728
17729 (define-public python-absl-py
17730 (package
17731 (name "python-absl-py")
17732 (version "0.6.1")
17733 (source
17734 (origin
17735 (method url-fetch)
17736 (uri (pypi-uri "absl-py" version))
17737 (sha256
17738 (base32
17739 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
17740 (build-system python-build-system)
17741 (propagated-inputs
17742 `(("python-six" ,python-six)))
17743 (home-page "https://github.com/abseil/abseil-py")
17744 (synopsis "Abseil Python common libraries")
17745 (description
17746 "This package provides the Abseil Python Common Libraries, a collection
17747 of Python libraries for building Python applications.")
17748 (license license:asl2.0)))
17749
17750 (define-public python-astor
17751 (package
17752 (name "python-astor")
17753 (version "0.7.1")
17754 (source
17755 (origin
17756 (method url-fetch)
17757 (uri (pypi-uri "astor" version))
17758 (sha256
17759 (base32
17760 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
17761 (build-system python-build-system)
17762 ;; FIXME: There are two errors and two test failures.
17763 (arguments `(#:tests? #f))
17764 (home-page "https://github.com/berkerpeksag/astor")
17765 (synopsis "Read and write Python ASTs")
17766 (description "Astor is designed to allow easy manipulation of Python
17767 source via the Abstract Syntax Tree.")
17768 (license license:bsd-3)))
17769
17770 (define-public python2-astor
17771 (package-with-python2 python-astor))
17772
17773 (define-public python-astunparse
17774 (package
17775 (name "python-astunparse")
17776 (version "1.6.2")
17777 (source
17778 (origin
17779 (method url-fetch)
17780 (uri (pypi-uri "astunparse" version))
17781 (sha256
17782 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
17783 (build-system python-build-system)
17784 (arguments '(#:tests? #f)) ; there are none
17785 (propagated-inputs
17786 `(("python-six" ,python-six)
17787 ("python-wheel" ,python-wheel)))
17788 (home-page "https://github.com/simonpercivall/astunparse")
17789 (synopsis "AST unparser for Python")
17790 (description "This package provides an AST unparser for Python. It is a
17791 factored out version of @code{unparse} found in the Python source
17792 distribution.")
17793 (license license:bsd-3)))
17794
17795 (define-public python-gast
17796 (package
17797 (name "python-gast")
17798 (version "0.3.3")
17799 (source
17800 (origin
17801 (method url-fetch)
17802 (uri (pypi-uri "gast" version))
17803 (sha256
17804 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
17805 (build-system python-build-system)
17806 (propagated-inputs
17807 `(("python-astunparse" ,python-astunparse)))
17808 (home-page "https://pypi.org/project/gast/")
17809 (synopsis "Generic Python AST that abstracts the underlying Python version")
17810 (description
17811 "GAST provides a compatibility layer between the AST of various Python
17812 versions, as produced by @code{ast.parse} from the standard @code{ast}
17813 module.")
17814 (license license:bsd-3)))
17815
17816 (define-public python-wikidata
17817 (package
17818 (name "python-wikidata")
17819 (version "0.6.1")
17820 (source
17821 (origin
17822 (method url-fetch)
17823 (uri (pypi-uri "Wikidata" version))
17824 (sha256
17825 (base32
17826 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
17827 (build-system python-build-system)
17828 (propagated-inputs
17829 `(("python-babel" ,python-babel)))
17830 (home-page "https://github.com/dahlia/wikidata")
17831 (synopsis "Wikidata client library")
17832 (description
17833 "This package provides a Python interface to
17834 @url{https://www.wikidata.org/, Wikidata}.")
17835 (properties '((upstream-name . "Wikidata")))
17836 (license license:gpl3+)))
17837
17838 (define-public python-doctest-ignore-unicode
17839 (package
17840 (name "python-doctest-ignore-unicode")
17841 (version "0.1.2")
17842 (source
17843 (origin
17844 (method url-fetch)
17845 (uri (pypi-uri "doctest-ignore-unicode" version))
17846 (sha256
17847 (base32
17848 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
17849 (build-system python-build-system)
17850 (native-inputs
17851 `(("python-nose" ,python-nose)))
17852 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
17853 (synopsis "Ignore Unicode literal prefixes in doctests")
17854 (description
17855 "This package adds support for a flag to ignore Unicode literal prefixes
17856 in doctests.")
17857 (license license:asl2.0)))
17858
17859 (define-public python-attr
17860 (package
17861 (name "python-attr")
17862 (version "0.3.1")
17863 (source
17864 (origin
17865 (method url-fetch)
17866 (uri (pypi-uri "attr" version))
17867 (sha256
17868 (base32
17869 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
17870 (build-system python-build-system)
17871 (home-page "https://github.com/denis-ryzhkov/attr")
17872 (synopsis "Decorator for attributes of target function or class")
17873 (description "Simple decorator to set attributes of target function or
17874 class in a @acronym{DRY, Don't Repeat Yourself} way.")
17875 (license license:expat)))
17876
17877 (define-public python-construct
17878 (package
17879 (name "python-construct")
17880 (version "2.10.56")
17881 (source
17882 (origin
17883 (method url-fetch)
17884 (uri (pypi-uri "construct" version))
17885 (sha256
17886 (base32
17887 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
17888 (build-system python-build-system)
17889 (arguments
17890 `(#:tests? #f)) ; No tests exist.
17891 (propagated-inputs
17892 `(("python-extras" ,python-extras)
17893 ("python-arrow" ,python-arrow)
17894 ("python-numpy" ,python-numpy)
17895 ("python-ruamel.yaml" ,python-ruamel.yaml)))
17896 (home-page "https://construct.readthedocs.io")
17897 (synopsis "Declarative and symmetrical parser and builder for binary data")
17898 (description
17899 "This package provides both simple, atomic constructs (such as
17900 integers of various sizes), as well as composite ones which allow you
17901 form hierarchical and sequential structures of increasing complexity.
17902 It features bit and byte granularity, easy debugging and testing, an
17903 easy-to-extend subclass system, and lots of primitive constructs to
17904 make your work easier.")
17905 (license license:expat)))
17906
17907 (define-public python-humanize
17908 (package
17909 (name "python-humanize")
17910 (version "0.5.1")
17911 (source
17912 (origin
17913 (method url-fetch)
17914 (uri (pypi-uri "humanize" version))
17915 (sha256
17916 (base32
17917 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17918 (arguments
17919 '(#:tests? #f)) ; tests not in pypi archive
17920 (build-system python-build-system)
17921 (home-page "https://github.com/jmoiron/humanize")
17922 (synopsis "Print numerical information in a human-readable form")
17923 (description "This package provides a Python module that displays numbers
17924 and dates in \"human readable\" forms. For example, it would display
17925 \"12345591313\" as \"12.3 billion\".")
17926 (license license:expat)))
17927
17928 (define-public python-txaio
17929 (package
17930 (name "python-txaio")
17931 (version "18.8.1")
17932 (source
17933 (origin
17934 (method url-fetch)
17935 (uri (pypi-uri "txaio" version))
17936 (sha256
17937 (base32
17938 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17939 (build-system python-build-system)
17940 (propagated-inputs
17941 `(("python-twisted" ,python-twisted)
17942 ("python-six" ,python-six)))
17943 (home-page "https://github.com/crossbario/txaio")
17944 (synopsis "Compatibility layer between Python asyncio and Twisted")
17945 (description "Txaio provides a compatibility layer between the Python
17946 @code{asyncio} module and @code{Twisted}.")
17947 (license license:expat)))
17948
17949 (define-public python-toolshed
17950 (package
17951 (name "python-toolshed")
17952 (version "0.4.6")
17953 (source
17954 (origin
17955 (method url-fetch)
17956 (uri (pypi-uri "toolshed" version))
17957 (sha256
17958 (base32
17959 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17960 (build-system python-build-system)
17961 (native-inputs
17962 `(("python-nose" ,python-nose)))
17963 (home-page "https://github.com/brentp/toolshed/")
17964 (synopsis "Collection of modules and functions for working with data")
17965 (description "This is a collection of well-tested, simple modules and
17966 functions that aim to reduce boilerplate when working with data.")
17967 (license license:bsd-2)))
17968
17969 (define-public python-annoy
17970 (package
17971 (name "python-annoy")
17972 (version "1.15.1")
17973 (source
17974 (origin
17975 (method url-fetch)
17976 (uri (pypi-uri "annoy" version))
17977 (sha256
17978 (base32
17979 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17980 (build-system python-build-system)
17981 (native-inputs
17982 `(("python-nose" ,python-nose)))
17983 (home-page "https://github.com/spotify/annoy/")
17984 (synopsis "Approximate nearest neighbors library")
17985 (description
17986 "Annoy is a C++ library with Python bindings to search for points in
17987 space that are close to a given query point. It also creates large read-only
17988 file-based data structures that are @code{mmap}ped into memory so that many
17989 processes may share the same data.")
17990 (license license:asl2.0)))
17991
17992 (define-public python-pylzma
17993 (package
17994 (name "python-pylzma")
17995 (version "0.5.0")
17996 (source
17997 (origin
17998 (method url-fetch)
17999 (uri (pypi-uri "pylzma" version))
18000 (sha256
18001 (base32
18002 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
18003 (build-system python-build-system)
18004 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
18005 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
18006 (description "This package provides Python bindings for the LZMA library
18007 by Igor Pavlov.")
18008 (license license:lgpl2.1+)))
18009
18010 (define-public python2-pylzma
18011 (package-with-python2 python-pylzma))
18012
18013 (define-public python2-zeroconf
18014 (package
18015 (name "python2-zeroconf")
18016
18017 ;; This is the last version that supports Python 2.x.
18018 (version "0.19.1")
18019 (source
18020 (origin
18021 (method url-fetch)
18022 (uri (pypi-uri "zeroconf" version))
18023 (sha256
18024 (base32
18025 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
18026 (build-system python-build-system)
18027 (arguments
18028 `(#:python ,python-2
18029 #:phases
18030 (modify-phases %standard-phases
18031 (add-after 'unpack 'patch-requires
18032 (lambda* (#:key inputs #:allow-other-keys)
18033 (substitute* "setup.py"
18034 (("enum-compat")
18035 "enum34"))
18036 #t)))))
18037 (native-inputs
18038 `(("python2-six" ,python2-six)
18039 ("python2-enum32" ,python2-enum34)
18040 ("python2-netifaces" ,python2-netifaces)
18041 ("python2-typing" ,python2-typing)))
18042 (home-page "https://github.com/jstasiak/python-zeroconf")
18043 (synopsis "Pure Python mDNS service discovery")
18044 (description
18045 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
18046 compatible).")
18047 (license license:lgpl2.1+)))
18048
18049 (define-public python-bsddb3
18050 (package
18051 (name "python-bsddb3")
18052 (version "6.2.6")
18053 (source
18054 (origin
18055 (method url-fetch)
18056 (uri (pypi-uri "bsddb3" version))
18057 (sha256
18058 (base32
18059 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
18060 (build-system python-build-system)
18061 (inputs
18062 `(("bdb" ,bdb)))
18063 (arguments
18064 '(#:phases
18065 (modify-phases %standard-phases
18066 (add-after 'unpack 'configure-locations
18067 (lambda* (#:key inputs #:allow-other-keys)
18068 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
18069 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
18070 #t))
18071 (replace 'check
18072 (lambda _
18073 (invoke "python3" "test3.py" "-v"))))))
18074 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
18075 (synopsis "Python bindings for Oracle Berkeley DB")
18076 (description
18077 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
18078 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
18079 Transaction objects, and each of these is exposed as a Python type in the
18080 bsddb3.db module. The database objects can use various access methods: btree,
18081 hash, recno, and queue. Complete support of Berkeley DB distributed
18082 transactions. Complete support for Berkeley DB Replication Manager.
18083 Complete support for Berkeley DB Base Replication. Support for RPC.")
18084 (license license:bsd-3)))
18085
18086 (define-public python-dbfread
18087 (package
18088 (name "python-dbfread")
18089 (version "2.0.7")
18090 (source (origin
18091 (method url-fetch)
18092 (uri (pypi-uri "dbfread" version))
18093 (sha256
18094 (base32
18095 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
18096 (build-system python-build-system)
18097 (native-inputs
18098 `(("python-pytest" ,python-pytest)))
18099 (home-page "https://dbfread.readthedocs.io")
18100 (synopsis "Read DBF Files with Python")
18101 (description
18102 "This library reads DBF files and returns the data as native Python data
18103 types for further processing. It is primarily intended for batch jobs and
18104 one-off scripts.")
18105 (license license:expat)))
18106
18107 (define-public python-cached-property
18108 (package
18109 (name "python-cached-property")
18110 (version "1.5.1")
18111 (source
18112 (origin
18113 (method url-fetch)
18114 (uri (pypi-uri "cached-property" version))
18115 (sha256
18116 (base32
18117 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
18118 (build-system python-build-system)
18119 (arguments
18120 `(#:phases
18121 (modify-phases %standard-phases
18122 ;; https://github.com/pydanny/cached-property/issues/131
18123 ;; recent versions of freezegun break one test
18124 (add-after 'unpack 'disable-broken-test
18125 (lambda _
18126 (substitute* "tests/test_cached_property.py"
18127 (("def test_threads_ttl_expiry\\(self\\)" m)
18128 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
18129 " " m)))
18130 #t)))))
18131 (native-inputs
18132 `(("python-freezegun" ,python-freezegun)))
18133 (home-page
18134 "https://github.com/pydanny/cached-property")
18135 (synopsis
18136 "Decorator for caching properties in classes")
18137 (description
18138 "This package provides a decorator which makes caching
18139 time-or-computationally-expensive properties quick and easy and works in Python
18140 2 or 3.")
18141 (license license:bsd-3)))
18142
18143 (define-public python-folium
18144 (package
18145 (name "python-folium")
18146 (version "0.10.1")
18147 (source
18148 (origin
18149 (method url-fetch)
18150 (uri (pypi-uri "folium" version))
18151 (sha256
18152 (base32
18153 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
18154 (build-system python-build-system)
18155 (propagated-inputs
18156 `(("python-branca" ,python-branca)
18157 ("python-jinja2" ,python-jinja2)
18158 ("python-numpy" ,python-numpy)
18159 ("python-requests" ,python-requests)))
18160 (native-inputs
18161 `(("python-pytest" ,python-pytest)))
18162 (home-page "https://github.com/python-visualization/folium")
18163 (synopsis "Make beautiful maps with Leaflet.js & Python")
18164 (description "@code{folium} makes it easy to visualize data that’s been
18165 manipulated in Python on an interactive leaflet map. It enables both the
18166 binding of data to a map for @code{choropleth} visualizations as well as
18167 passing rich vector/raster/HTML visualizations as markers on the map.
18168
18169 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
18170 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
18171 supports Image, Video, GeoJSON and TopoJSON overlays.")
18172 (license license:expat)))
18173
18174 (define-public jube
18175 (package
18176 ;; This is a command-line tool, so no "python-" prefix.
18177 (name "jube")
18178 (version "2.2.2")
18179 (source (origin
18180 (method url-fetch)
18181 (uri (string-append
18182 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
18183 version))
18184 (sha256
18185 (base32
18186 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
18187 (file-name (string-append "jube-" version ".tar.gz"))))
18188 (build-system python-build-system)
18189 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
18190 (synopsis "Benchmarking environment")
18191 (description
18192 "JUBE helps perform and analyze benchmarks in a systematic way. For each
18193 benchmarked application, benchmark data is stored in a format that allows JUBE
18194 to deduct the desired information. This data can be parsed by automatic pre-
18195 and post-processing scripts that draw information and store it more densely
18196 for manual interpretation.")
18197 (license license:gpl3+)))
18198
18199 (define-public python-pyroutelib3
18200 (package
18201 (name "python-pyroutelib3")
18202 (version "1.3.post1")
18203 (source
18204 (origin
18205 (method url-fetch)
18206 (uri (pypi-uri "pyroutelib3" version))
18207 (sha256
18208 (base32
18209 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
18210 (build-system python-build-system)
18211 (propagated-inputs
18212 `(("python-dateutil" ,python-dateutil)))
18213 (home-page "https://github.com/MKuranowski/pyroutelib3")
18214 (synopsis "Library for simple routing on OSM data")
18215 (description "Library for simple routing on OSM data")
18216 (license license:gpl3+)))
18217
18218 (define-public python-bibtexparser
18219 (package
18220 (name "python-bibtexparser")
18221 (version "1.1.0")
18222 (source
18223 (origin
18224 (method url-fetch)
18225 (uri (pypi-uri "bibtexparser" version))
18226 (sha256
18227 (base32
18228 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
18229 (build-system python-build-system)
18230 (propagated-inputs
18231 `(("python-pyparsing" ,python-pyparsing)))
18232 (native-inputs
18233 `(("python-future" ,python-future)))
18234 (home-page "https://github.com/sciunto-org/python-bibtexparser")
18235 (synopsis "Python library to parse BibTeX files")
18236 (description "BibtexParser is a Python library to parse BibTeX files.")
18237 (license (list license:bsd-3 license:lgpl3))))
18238
18239 (define-public python-distro
18240 (package
18241 (name "python-distro")
18242 (version "1.4.0")
18243 (source
18244 (origin
18245 (method url-fetch)
18246 (uri (pypi-uri "distro" version))
18247 (sha256
18248 (base32
18249 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
18250 (build-system python-build-system)
18251 (native-inputs
18252 `(("python-pytest" ,python-pytest)))
18253 (home-page "https://github.com/nir0s/distro")
18254 (synopsis
18255 "OS platform information API")
18256 (description
18257 "@code{distro} provides information about the OS distribution it runs on,
18258 such as a reliable machine-readable ID, or version information.
18259
18260 It is the recommended replacement for Python's original
18261 `platform.linux_distribution` function (which will be removed in Python 3.8).
18262 @code{distro} also provides a command-line interface to output the platform
18263 information in various formats.")
18264 (license license:asl2.0)))
18265
18266 (define-public python-cairosvg
18267 (package
18268 (name "python-cairosvg")
18269 (version "2.4.2")
18270 (source
18271 (origin
18272 (method url-fetch)
18273 (uri (pypi-uri "CairoSVG" version))
18274 (sha256
18275 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
18276 (build-system python-build-system)
18277 (arguments
18278 `(#:phases
18279 (modify-phases %standard-phases
18280 (replace 'check
18281 (lambda _ (invoke "pytest"))))))
18282 (propagated-inputs
18283 `(("python-cairocffi" ,python-cairocffi)
18284 ("python-cssselect2" ,python-cssselect2)
18285 ("python-defusedxml" ,python-defusedxml)
18286 ("python-pillow" ,python-pillow)
18287 ("python-tinycss2" ,python-tinycss2)))
18288 (native-inputs
18289 `(("python-pytest-flake8" ,python-pytest-flake8)
18290 ("python-pytest-isort" ,python-pytest-isort)
18291 ("python-pytest-runner" ,python-pytest-runner)))
18292 (home-page "https://cairosvg.org/")
18293 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
18294 (description "CairoSVG is a SVG converter based on Cairo. It can export
18295 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
18296 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
18297 parsed, the result is drawn to a Cairo surface that can be exported to
18298 qvarious formats: PDF, PostScript, PNG and even SVG.")
18299 (license license:lgpl3+)))
18300
18301 (define-public python-pyphen
18302 (package
18303 (name "python-pyphen")
18304 (version "0.9.5")
18305 (source
18306 (origin
18307 (method url-fetch)
18308 (uri (pypi-uri "Pyphen" version))
18309 (sha256
18310 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
18311 (build-system python-build-system)
18312 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
18313 ;; embedded set provided by upstream - like Debian does.
18314 (home-page "https://github.com/Kozea/Pyphen")
18315 (synopsis "Pure Python module to hyphenate text")
18316 (description "Pyphen is a pure Python module to hyphenate text using
18317 existing Hunspell hyphenation dictionaries.")
18318 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
18319
18320 (define-public python-intelhex
18321 (package
18322 (name "python-intelhex")
18323 (version "2.2.1")
18324 (source
18325 (origin
18326 (method url-fetch)
18327 (uri (pypi-uri "intelhex" version))
18328 (sha256
18329 (base32
18330 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
18331 (build-system python-build-system)
18332 (arguments '(#:tests? #f)) ;issue with version
18333 (home-page "https://pypi.org/project/IntelHex/")
18334 (synopsis "Python library for Intel HEX files manipulations")
18335 (description "The Intel HEX file format is widely used in microprocessors
18336 and microcontrollers area (embedded systems etc.) as the de facto standard for
18337 representation of code to be programmed into microelectronic devices. This
18338 package provides an intelhex Python library to read, write, create from
18339 scratch and manipulate data from Intel HEX file format. It also includes
18340 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
18341 converters and more, those based on the library itself.")
18342 (license license:bsd-3)))
18343
18344 (define-public python-pykwalify
18345 (package
18346 (name "python-pykwalify")
18347 (version "1.7.0")
18348 (source
18349 (origin
18350 (method url-fetch)
18351 (uri (pypi-uri "pykwalify" version))
18352 (sha256
18353 (base32
18354 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
18355 (build-system python-build-system)
18356 (arguments '(#:tests? #f)) ;missing dependencies
18357 (propagated-inputs
18358 `(("python-dateutil" ,python-dateutil)
18359 ("python-docopt" ,python-docopt)
18360 ("python-pyyaml" ,python-pyyaml)))
18361 (home-page "https://github.com/grokzen/pykwalify")
18362 (synopsis
18363 "Python lib/cli for JSON/YAML schema validation")
18364 (description
18365 "This package provides a parser, schema validator, and data binding tool
18366 for YAML and JSON.")
18367 (license license:expat)))
18368
18369 (define-public python-dbusmock
18370 (package
18371 (name "python-dbusmock")
18372 (version "0.18.3")
18373 (source
18374 (origin
18375 (method url-fetch)
18376 (uri (pypi-uri "python-dbusmock" version))
18377 (sha256
18378 (base32
18379 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
18380 (build-system python-build-system)
18381 (arguments
18382 '(#:phases
18383 (modify-phases %standard-phases
18384 (add-after 'unpack 'patch-shell-path
18385 (lambda _
18386 (substitute* "tests/test_code.py"
18387 (("/bin/bash") (which "bash")))
18388 #t)))))
18389 (native-inputs
18390 `(;; For tests.
18391 ("dbus" ,dbus) ; for dbus-daemon
18392 ("python-nose" ,python-nose)
18393 ("which" ,which)))
18394 (propagated-inputs
18395 `(("python-dbus" ,python-dbus)
18396 ("python-pygobject" ,python-pygobject)))
18397 (home-page "https://github.com/martinpitt/python-dbusmock")
18398 (synopsis "Python library for mock D-Bus objects")
18399 (description "python-dbusmock allows for the easy creation of mock objects on
18400 D-Bus. This is useful for writing tests for software which talks to D-Bus
18401 services such as upower, systemd, logind, gnome-session or others, and it is
18402 hard (or impossible without root privileges) to set the state of the real
18403 services to what you expect in your tests.")
18404 (license license:lgpl3+)))
18405
18406 (define-public python-ujson
18407 (package
18408 (name "python-ujson")
18409 (version "2.0.3")
18410 (source
18411 (origin
18412 (method url-fetch)
18413 (uri (pypi-uri "ujson" version))
18414 (sha256
18415 (base32
18416 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
18417 (modules '((guix build utils)))
18418 (snippet
18419 '(begin (delete-file-recursively "deps") #t))))
18420 (build-system python-build-system)
18421 (arguments
18422 `(#:phases
18423 (modify-phases %standard-phases
18424 (add-after 'unpack 'link-to-system-double-conversion
18425 (lambda* (#:key inputs #:allow-other-keys)
18426 (let ((d-c (assoc-ref inputs "double-conversion")))
18427 (substitute* "setup.py"
18428 (("./deps/double-conversion/double-conversion\"")
18429 (string-append d-c "/include/double-conversion\""))
18430 (("-lstdc++" stdc)
18431 (string-append "-L" d-c "/lib\","
18432 " \"-ldouble-conversion\","
18433 " \"" stdc)))
18434 #t)))
18435 (replace 'check
18436 (lambda* (#:key inputs outputs #:allow-other-keys)
18437 (add-installed-pythonpath inputs outputs)
18438 (invoke "pytest"))))))
18439 (native-inputs
18440 `(("double-conversion" ,double-conversion)
18441 ("python-setuptools-scm" ,python-setuptools-scm)
18442 ("python-pytest" ,python-pytest)))
18443 (home-page "https://github.com/ultrajson/ultrajson")
18444 (synopsis "Ultra fast JSON encoder and decoder for Python")
18445 (description
18446 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
18447 bindings for Python 3.")
18448 (license license:bsd-3)))
18449
18450 (define-public python-ujson-1
18451 (package
18452 (inherit python-ujson)
18453 (version "1.35")
18454 (source
18455 (origin
18456 (method url-fetch)
18457 (uri (pypi-uri "ujson" version))
18458 (sha256
18459 (base32
18460 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
18461 (arguments
18462 '(#:phases %standard-phases))
18463 (native-inputs '())
18464 (home-page "http://www.esn.me")
18465 (description
18466 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
18467 bindings for Python 2.5+ and 3.")))
18468
18469 (define-public python2-ujson-1
18470 (package-with-python2 python-ujson-1))
18471
18472 (define-public python-iocapture
18473 ;; The latest release is more than a year older than this commit.
18474 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
18475 (revision "1"))
18476 (package
18477 (name "python-iocapture")
18478 (version "0.1.2")
18479 (source
18480 (origin
18481 (method git-fetch)
18482 (uri (git-reference
18483 (url "https://github.com/oinume/iocapture.git")
18484 (commit commit)))
18485 (file-name (git-file-name name version))
18486 (sha256
18487 (base32
18488 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
18489 (build-system python-build-system)
18490 (arguments
18491 `(#:phases
18492 (modify-phases %standard-phases
18493 (delete 'check)
18494 (add-after 'install 'check
18495 (lambda* (#:key inputs outputs #:allow-other-keys)
18496 (add-installed-pythonpath inputs outputs)
18497 (invoke "py.test" "-v" "tests")
18498 #t)))))
18499 (propagated-inputs
18500 `(("python-flexmock" ,python-flexmock)
18501 ("python-pytest" ,python-pytest)
18502 ("python-pytest-cov" ,python-pytest-cov)
18503 ("python-six" ,python-six)))
18504 (home-page "https://github.com/oinume/iocapture")
18505 (synopsis "Python capturing tool for stdout and stderr")
18506 (description
18507 "This package helps you to capture the standard out (stdout) and the
18508 standard error channel (stderr) in your program.")
18509 (license license:expat))))
18510
18511 (define-public python-argh
18512 ;; There are 21 commits since the latest release containing important
18513 ;; improvements.
18514 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
18515 (revision "1"))
18516 (package
18517 (name "python-argh")
18518 (version (git-version "0.26.2" revision commit))
18519 (source
18520 (origin
18521 (method git-fetch)
18522 (uri (git-reference
18523 (url "https://github.com/neithere/argh.git")
18524 (commit commit)))
18525 (file-name (git-file-name name version))
18526 (sha256
18527 (base32
18528 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
18529 (build-system python-build-system)
18530 (propagated-inputs
18531 `(("python-iocapture" ,python-iocapture)
18532 ("python-mock" ,python-mock)
18533 ("python-pytest" ,python-pytest)
18534 ("python-pytest-cov" ,python-pytest-cov)
18535 ("python-pytest-xdist" ,python-pytest-xdist)
18536 ("python-tox" ,python-tox)))
18537 (home-page "https://github.com/neithere/argh/")
18538 (synopsis "Argparse wrapper with natural syntax")
18539 (description
18540 "python-argh is a small library that provides several layers of
18541 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
18542 always possible to declare a command with the highest possible (and least
18543 flexible) layer and then tune the behaviour with any of the lower layers
18544 including the native API of @code{python-argparse}.")
18545 (license license:lgpl3+))))
18546
18547 (define-public python-ppft
18548 (package
18549 (name "python-ppft")
18550 (version "1.6.6.1")
18551 (source
18552 (origin
18553 (method url-fetch)
18554 (uri (pypi-uri "ppft" version))
18555 (sha256
18556 (base32
18557 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
18558 (build-system python-build-system)
18559 (arguments '(#:tests? #f)) ; there are none
18560 (propagated-inputs
18561 `(("python-six" ,python-six)))
18562 (home-page "https://pypi.org/project/ppft/")
18563 (synopsis "Fork of Parallel Python")
18564 (description
18565 "This package is a fork of Parallel Python. The Parallel Python
18566 module (@code{pp}) provides an easy and efficient way to create
18567 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
18568 computers and clusters. It features cross-platform portability and dynamic
18569 load balancing.")
18570 (license license:bsd-3)))
18571
18572 (define-public python-pox
18573 (package
18574 (name "python-pox")
18575 (version "0.2.7")
18576 (source
18577 (origin
18578 (method url-fetch)
18579 (uri (pypi-uri "pox" version))
18580 (sha256
18581 (base32
18582 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
18583 (build-system python-build-system)
18584 (arguments
18585 `(#:phases
18586 (modify-phases %standard-phases
18587 (replace 'check
18588 (lambda _
18589 (mkdir-p "/tmp/guix")
18590 (setenv "SHELL" "bash")
18591 (setenv "USERNAME" "guix")
18592 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
18593 (invoke "py.test" "-vv")
18594 #t)))))
18595 (native-inputs
18596 `(("python-pytest" ,python-pytest)
18597 ("which" ,which)))
18598 (home-page "https://pypi.org/project/pox/")
18599 (synopsis "Python utilities for filesystem exploration and automated builds")
18600 (description
18601 "Pox provides a collection of utilities for navigating and manipulating
18602 filesystems. This module is designed to facilitate some of the low level
18603 operating system interactions that are useful when exploring a filesystem on a
18604 remote host. Pox provides Python equivalents of several shell commands such
18605 as @command{which} and @command{find}. These commands allow automated
18606 discovery of what has been installed on an operating system, and where the
18607 essential tools are located.")
18608 (license license:bsd-3)))
18609
18610 (define-public python-pathos
18611 (package
18612 (name "python-pathos")
18613 (version "0.2.5")
18614 (source
18615 (origin
18616 (method url-fetch)
18617 (uri (pypi-uri "pathos" version))
18618 (sha256
18619 (base32
18620 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
18621 (build-system python-build-system)
18622 (arguments
18623 '(#:phases
18624 (modify-phases %standard-phases
18625 (replace 'check
18626 (lambda _
18627 (setenv "PYTHONPATH"
18628 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18629 (invoke "python" "./tests/__main__.py"))))))
18630 (propagated-inputs
18631 `(("python-dill" ,python-dill)
18632 ("python-multiprocess" ,python-multiprocess)
18633 ("python-pox" ,python-pox)
18634 ("python-ppft" ,python-ppft)))
18635 (native-inputs
18636 `(("python-pytest" ,python-pytest)))
18637 (home-page "https://pypi.org/project/pathos/")
18638 (synopsis
18639 "Parallel graph management and execution in heterogeneous computing")
18640 (description
18641 "Python-pathos is a framework for heterogenous computing. It provides a
18642 consistent high-level interface for configuring and launching parallel
18643 computations across heterogenous resources. Python-pathos provides configurable
18644 launchers for parallel and distributed computing, where each launcher contains
18645 the syntactic logic to configure and launch jobs in an execution environment.")
18646 (license license:bsd-3)))
18647
18648 (define-public python-flit
18649 (package
18650 (name "python-flit")
18651 (version "2.1.0")
18652 (source
18653 (origin
18654 (method url-fetch)
18655 (uri (pypi-uri "flit" version))
18656 (sha256
18657 (base32
18658 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
18659 (build-system python-build-system)
18660 (arguments
18661 `(#:tests? #f)) ; XXX: Check requires network access.
18662 (home-page "https://flit.readthedocs.io/")
18663 (synopsis
18664 "Simple packaging tool for simple packages")
18665 (description
18666 "Flit is a simple way to put Python packages and modules on PyPI. Flit
18667 packages a single importable module or package at a time, using the import
18668 name as the name on PyPI. All subpackages and data files within a package
18669 are included automatically.")
18670 (license license:bsd-3)))
18671
18672 (define-public python-pathtools
18673 (package
18674 (name "python-pathtools")
18675 (version "0.1.2")
18676 (source
18677 (origin
18678 (method url-fetch)
18679 (uri (pypi-uri "pathtools" version))
18680 (sha256
18681 (base32
18682 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
18683 (build-system python-build-system)
18684 (home-page
18685 "https://github.com/gorakhargosh/pathtools")
18686 (synopsis "Path utilities for Python")
18687 (description "Pattern matching and various utilities for file systems
18688 paths.")
18689 (license license:expat)))
18690
18691 (define-public python-fastentrypoints
18692 (package
18693 (name "python-fastentrypoints")
18694 (version "0.12")
18695 (source
18696 (origin
18697 (method url-fetch)
18698 (uri (pypi-uri "fastentrypoints" version))
18699 (sha256
18700 (base32
18701 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
18702 (build-system python-build-system)
18703 (home-page
18704 "https://github.com/ninjaaron/fast-entry_points")
18705 (synopsis
18706 "Makes entry_points specified in setup.py load more quickly")
18707 (description
18708 "Using entry_points in your setup.py makes scripts that start really
18709 slowly because it imports pkg_resources. This package allows such setup
18710 scripts to load entry points more quickly.")
18711 (license license:bsd-3)))
18712
18713 (define-public python-funcparserlib
18714 (package
18715 (name "python-funcparserlib")
18716 (version "0.3.6")
18717 (source
18718 (origin
18719 (method url-fetch)
18720 (uri (pypi-uri "funcparserlib" version))
18721 (sha256
18722 (base32
18723 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
18724 (native-inputs
18725 `(("python-tox" ,python-tox)))
18726 (arguments
18727 `(#:phases
18728 (modify-phases %standard-phases
18729 (replace 'check
18730 (lambda _
18731 (invoke "tox"))))))
18732 (build-system python-build-system)
18733 (home-page
18734 "https://github.com/vlasovskikh/funcparserlib")
18735 (synopsis
18736 "Recursive descent parsing library based on functional combinators")
18737 (description
18738 "This package is a recursive descent parsing library for Python based on
18739 functional combinators. Parser combinators are just higher-order functions
18740 that take parsers as their arguments and return them as result values.")
18741 (license license:expat)))
18742
18743 (define-public python-speg
18744 (package
18745 (name "python-speg")
18746 (version "0.3")
18747 (source
18748 (origin
18749 (method url-fetch)
18750 (uri (pypi-uri "speg" version ".zip"))
18751 (sha256
18752 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
18753 (arguments
18754 `(#:tests? #f)) ;FIXME: tests fail, not sure why
18755 (native-inputs
18756 `(("unzip" ,unzip)))
18757 (build-system python-build-system)
18758 (home-page "https://github.com/avakar/speg")
18759 (synopsis "PEG-based parser interpreter with memoization")
18760 (description "This package is a PEG-based parser and interpreter with
18761 memoization.")
18762 (license license:expat)))
18763
18764 (define-public python-cson
18765 (package
18766 (name "python-cson")
18767 (version "0.8")
18768 (source
18769 (origin
18770 (method url-fetch)
18771 (uri (pypi-uri "cson" version))
18772 (sha256
18773 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
18774 (build-system python-build-system)
18775 (propagated-inputs
18776 `(("python-speg" ,python-speg)))
18777 (home-page "https://github.com/avakar/pycson")
18778 (synopsis "Parser for Coffeescript Object Notation (CSON)")
18779 (description "This package is a parser for Coffeescript Object
18780 Notation (CSON).")
18781 (license license:expat)))
18782
18783 (define-public python-asynctest
18784 (package
18785 (name "python-asynctest")
18786 (version "0.13.0")
18787 (source
18788 (origin
18789 (method url-fetch)
18790 (uri (pypi-uri "asynctest" version))
18791 (sha256
18792 (base32
18793 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
18794 (build-system python-build-system)
18795 (arguments
18796 '(#:phases
18797 (modify-phases %standard-phases
18798 (replace 'check
18799 (lambda _
18800 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
18801 (add-after 'unpack 'disable-tests
18802 (lambda* _
18803 (substitute* "test/test_selector.py"
18804 ;; XXX: This test fails for unknown reason inside the build
18805 ;; environment.
18806 (("def test_events_watched_outside_test_are_ignored")
18807 "@unittest.skip('disabled by guix')
18808 def test_events_watched_outside_test_are_ignored")))))))
18809 (home-page "https://github.com/Martiusweb/asynctest")
18810 (synopsis "Extension of unittest for testing asyncio libraries")
18811 (description
18812 "The package asynctest is built on top of the standard unittest module
18813 and cuts down boilerplate code when testing libraries for asyncio.")
18814 (license license:asl2.0)))
18815
18816 (define-public python-aionotify
18817 (package
18818 (name "python-aionotify")
18819 (version "0.2.0")
18820 (source
18821 (origin
18822 ;; Source tarball on PyPi lacks tests
18823 (method git-fetch)
18824 (uri (git-reference
18825 (url "https://github.com/rbarrois/aionotify")
18826 (commit (string-append "v" version))))
18827 (file-name (git-file-name name version))
18828 (sha256
18829 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
18830 (build-system python-build-system)
18831 (native-inputs `(("python-asynctest" ,python-asynctest)))
18832 (home-page "https://github.com/rbarrois/aionotify")
18833 (synopsis "Asyncio-powered inotify library")
18834 (description
18835 "@code{aionotify} is a simple, asyncio-based inotify library.")
18836 (license license:bsd-3)))
18837
18838 (define-public python-forbiddenfruit
18839 (package
18840 (name "python-forbiddenfruit")
18841 (version "0.1.3")
18842 (source
18843 (origin
18844 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
18845 (method git-fetch)
18846 (uri (git-reference
18847 (url "https://github.com/clarete/forbiddenfruit")
18848 (commit version)))
18849 (file-name (git-file-name name version))
18850 (sha256
18851 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
18852 (build-system python-build-system)
18853 (arguments
18854 '(#:phases
18855 (modify-phases %standard-phases
18856 (replace 'check
18857 (lambda _
18858 (invoke "make" "SKIP_DEPS=1"))))))
18859 (native-inputs
18860 `(("python-nose" ,python-nose)
18861 ("python-coverage" ,python-coverage)))
18862 (home-page "https://github.com/clarete/forbiddenfruit")
18863 (synopsis "Patch python built-in objects")
18864 (description "This project allows Python code to extend built-in types.")
18865 (license (list license:gpl3+ license:expat))))
18866
18867 (define-public python-shouldbe
18868 (package
18869 (name "python-shouldbe")
18870 (version "0.1.2")
18871 (source
18872 (origin
18873 (method url-fetch)
18874 (uri (pypi-uri "shouldbe" version))
18875 (sha256
18876 (base32
18877 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
18878 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
18879 (build-system python-build-system)
18880 (propagated-inputs
18881 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
18882 (native-inputs
18883 `(("python-nose" ,python-nose)))
18884 (home-page "https://github.com/directxman12/should_be")
18885 (synopsis "Python Assertion Helpers inspired by Shouldly")
18886 (description
18887 "Python Assertion Helpers inspired by Shouldly.")
18888 (license license:isc)))
18889
18890 (define-public python-k5test
18891 (package
18892 (name "python-k5test")
18893 (version "0.9.2")
18894 (source
18895 (origin
18896 (method url-fetch)
18897 (uri (pypi-uri "k5test" version))
18898 (sha256
18899 (base32
18900 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
18901 (build-system python-build-system)
18902 (propagated-inputs
18903 `(("python-six" ,python-six)
18904 ;; `which`, `kadmin.local` binaries called inside library
18905 ("which" ,which)
18906 ("mit-krb5" ,mit-krb5)))
18907 (native-inputs `(("mit-krb5" ,mit-krb5)))
18908 (arguments
18909 '(#:phases
18910 (modify-phases %standard-phases
18911 (add-after 'unpack 'patch-paths
18912 (lambda* _
18913 (substitute* "k5test/realm.py"
18914 (("'kadmin_local'") "'kadmin.local'")))))))
18915 (home-page "https://github.com/pythongssapi/k5test")
18916 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18917 (description
18918 "@code{k5test} is a library for setting up self-contained Kerberos 5
18919 environments, and running Python unit tests inside those environments. It is
18920 based on the file of the same name found alongside the MIT Kerberos 5 unit
18921 tests.")
18922 (license license:isc)))
18923
18924 (define-public python-gssapi
18925 (package
18926 (name "python-gssapi")
18927 (version "1.6.5")
18928 (source
18929 (origin
18930 (method url-fetch)
18931 (uri (pypi-uri "gssapi" version))
18932 (sha256
18933 (base32
18934 "02i5s7998dg5kcr4m0xwamd8vjqk1816xbzldyp68l91f6bynwcr"))))
18935 (build-system python-build-system)
18936 (propagated-inputs
18937 `(("python-decorator" ,python-decorator)
18938 ("python-six" ,python-six)))
18939 (inputs
18940 `(("mit-krb5" ,mit-krb5)))
18941 ;; for tests
18942 (native-inputs
18943 `(("python-shouldbe" ,python-shouldbe)
18944 ("python-parameterized" ,python-parameterized)
18945 ("python-k5test" ,python-k5test)
18946 ("python-nose" ,python-nose)))
18947 (home-page "https://github.com/pythongssapi/python-gssapi")
18948 (synopsis "Python GSSAPI Wrapper")
18949 (description
18950 "Python-GSSAPI provides both low-level and high level wrappers around the
18951 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18952 also be useable with other GSSAPI mechanisms.")
18953 (license license:isc)))
18954
18955 (define-public python-check-manifest
18956 (package
18957 (name "python-check-manifest")
18958 (version "0.37")
18959 (source
18960 (origin
18961 (method url-fetch)
18962 (uri (pypi-uri "check-manifest" version))
18963 (sha256
18964 (base32
18965 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18966 (build-system python-build-system)
18967 (native-inputs
18968 `(("python-mock" ,python-mock)
18969 ("git" ,git)))
18970 (home-page "https://github.com/mgedmin/check-manifest")
18971 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18972 (description "Python package can include a MANIFEST.in file to help with
18973 sending package files to the Python Package Index. This package checks that
18974 file to ensure it completely and accurately describes your project.")
18975 (license license:expat)))
18976
18977 (define-public python-android-stringslib
18978 (package
18979 (name "python-android-stringslib")
18980 (version "0.1.2")
18981 (source
18982 (origin
18983 (method git-fetch)
18984 (uri (git-reference
18985 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18986 (commit (string-append "v" version))))
18987 (file-name (git-file-name name version))
18988 (sha256
18989 (base32
18990 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18991 (build-system python-build-system)
18992 (arguments
18993 `(#:tests? #f))
18994 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18995 (synopsis "Android strings.xml support")
18996 (description "Android Strings Lib provides support for android's strings.xml
18997 files. These files are used to translate strings in android apps.")
18998 (license license:expat)))
18999
19000 (define-public python-watchdog
19001 (package
19002 (name "python-watchdog")
19003 (version "0.9.0")
19004 (source
19005 (origin
19006 (method url-fetch)
19007 (uri (pypi-uri "watchdog" version))
19008 (sha256
19009 (base32
19010 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
19011 (build-system python-build-system)
19012 (arguments
19013 `(#:phases
19014 (modify-phases %standard-phases
19015 (add-before 'check 'remove-failing
19016 (lambda _
19017 (delete-file "tests/test_inotify_buffer.py")
19018 (delete-file "tests/test_snapshot_diff.py")
19019 #t)))))
19020 (propagated-inputs
19021 `(("python-argh" ,python-argh)
19022 ("python-pathtools" ,python-pathtools)
19023 ("python-pyyaml" ,python-pyyaml)))
19024 (native-inputs
19025 `(("python-pytest-cov" ,python-pytest-cov)
19026 ("python-pytest-timeout" ,python-pytest-timeout)))
19027 (home-page "https://github.com/gorakhargosh/watchdog")
19028 (synopsis "Filesystem events monitoring")
19029 (description "This package provides a way to monitor filesystem events
19030 such as a file modification and trigger an action. This is similar to inotify,
19031 but portable.")
19032 (license license:asl2.0)))
19033
19034 (define-public python-wget
19035 (package
19036 (name "python-wget")
19037 (version "3.2")
19038 (source
19039 (origin
19040 (method url-fetch)
19041 (uri (pypi-uri "wget" version ".zip"))
19042 (sha256
19043 (base32
19044 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
19045 (build-system python-build-system)
19046 (native-inputs `(("unzip" ,unzip)))
19047 (home-page "https://bitbucket.org/techtonik/python-wget/")
19048 (synopsis "Pure Python download utility")
19049 (description "The python-wget library provides an API to download files
19050 with features similar to the @command{wget} utility.")
19051 (license license:unlicense)))
19052
19053 (define-public offlate
19054 (package
19055 (name "offlate")
19056 (version "0.5")
19057 (source
19058 (origin
19059 (method git-fetch)
19060 (uri (git-reference
19061 (url "https://framagit.org/tyreunom/offlate")
19062 (commit version)))
19063 (file-name (git-file-name name version))
19064 (sha256
19065 (base32
19066 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
19067 (build-system python-build-system)
19068 (arguments
19069 ;; No tests
19070 `(#:tests? #f))
19071 (propagated-inputs
19072 `(("python-android-stringslib" ,python-android-stringslib)
19073 ("python-dateutil" ,python-dateutil)
19074 ("python-gitlab" ,python-gitlab)
19075 ("python-lxml" ,python-lxml)
19076 ("python-polib" ,python-polib)
19077 ("python-pyenchant" ,python-pyenchant)
19078 ("python-pygit2" ,python-pygit2)
19079 ("python-pygithub" ,python-pygithub)
19080 ("python-pyqt" ,python-pyqt)
19081 ("python-requests" ,python-requests)
19082 ("python-ruamel.yaml" ,python-ruamel.yaml)
19083 ("python-translation-finder" ,python-translation-finder)
19084 ("python-watchdog" ,python-watchdog)))
19085 (native-inputs
19086 `(("qttools" ,qttools)))
19087 (home-page "https://framagit.org/tyreunom/offlate")
19088 (synopsis "Offline translation interface for online translation tools")
19089 (description "Offlate offers a unified interface for different translation
19090 file formats, as well as many different online translation platforms. You can
19091 use it to get work from online platforms, specialized such as the Translation
19092 Project, or not such a gitlab instance when your upstream doesn't use any
19093 dedicated platform. The tool proposes a unified interface for any format and
19094 an upload option to send your work back to the platform.")
19095 (license license:gpl3+)))
19096
19097 (define-public python-titlecase
19098 (package
19099 (name "python-titlecase")
19100 (version "0.12.0")
19101 (source
19102 (origin
19103 (method url-fetch)
19104 (uri (pypi-uri "titlecase" version))
19105 (sha256
19106 (base32
19107 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
19108 (build-system python-build-system)
19109 (native-inputs
19110 `(("python-nose" ,python-nose)))
19111 (home-page "https://github.com/ppannuto/python-titlecase")
19112 (synopsis "Capitalize strings similar to book titles")
19113 (description
19114 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
19115 It capitalizes (predominantly English) strings in a way that is similar to
19116 book titles, using the New York Times Manual of Style to leave certain words
19117 lowercase.")
19118 (license license:expat)))
19119
19120 (define-public python-pypng
19121 (package
19122 (name "python-pypng")
19123 (version "0.0.20")
19124 (source
19125 (origin
19126 (method url-fetch)
19127 (uri (pypi-uri "pypng" version))
19128 (sha256
19129 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
19130 (build-system python-build-system)
19131 (home-page "https://github.com/drj11/pypng")
19132 (synopsis "Pure Python PNG image encoder/decoder")
19133 (description
19134 "The PyPNG module implements support for PNG images. It reads and writes
19135 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
19136 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
19137 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
19138 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
19139 A number of optional chunks can be specified (when writing) and
19140 understood (when reading): tRNS, bKGD, gAMA.
19141
19142 PyPNG is not a high level toolkit for image processing (like PIL) and does not
19143 aim at being a replacement or competitor. Its strength lies in fine-grained
19144 extensive support of PNG features. It can also read and write Netpbm PAM
19145 files, with a focus on its use as an intermediate format for implementing
19146 custom PNG processing.")
19147 (license license:expat)))
19148
19149 (define-public python-fuzzywuzzy
19150 (package
19151 (name "python-fuzzywuzzy")
19152 (version "0.18.0")
19153 (source
19154 (origin
19155 (method url-fetch)
19156 (uri (pypi-uri "fuzzywuzzy" version))
19157 (sha256
19158 (base32
19159 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
19160 (build-system python-build-system)
19161 (native-inputs
19162 `(("python-hypothesis" ,python-hypothesis)
19163 ("python-pycodestyle" ,python-pycodestyle)
19164 ("python-pytest" ,python-pytest)))
19165 (propagated-inputs
19166 `(("python-levenshtein" ,python-levenshtein)))
19167 (home-page "https://github.com/seatgeek/fuzzywuzzy")
19168 (synopsis "Fuzzy string matching in Python")
19169 (description "Approximate string matching using
19170 @emph{Levenshtein Distance} to calculate the differences between
19171 sequences.")
19172 (license license:gpl2)))
19173
19174 (define-public python2-fuzzywuzzy
19175 (package-with-python2 python-fuzzywuzzy))
19176
19177 (define-public python-block-tracing
19178 (package
19179 (name "python-block-tracing")
19180 (version "1.0.1")
19181 (source
19182 (origin
19183 (method url-fetch)
19184 (uri (pypi-uri "block_tracing" version))
19185 (sha256
19186 (base32
19187 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
19188 (build-system python-build-system)
19189 (arguments '(#:tests? #f)) ; no tests
19190 (home-page "https://github.com/rianhunter/block_tracing")
19191 (synopsis "Protect process memory")
19192 (description
19193 "@code{block_tracing} is a tiny Python library that can be used to
19194 prevent debuggers and other applications from inspecting the memory within
19195 your process.")
19196 (license license:expat)))
19197
19198 (define-public python-gcovr
19199 (package
19200 (name "python-gcovr")
19201 (version "4.2")
19202 (source
19203 (origin
19204 (method url-fetch)
19205 (uri (pypi-uri "gcovr" version))
19206 (sha256
19207 (base32
19208 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
19209 (build-system python-build-system)
19210 (propagated-inputs
19211 `(("python-lxml" ,python-lxml)
19212 ("python-jinja2" ,python-jinja2)))
19213 (home-page "https://gcovr.com/")
19214 (synopsis "Utility for generating code coverage results")
19215 (description
19216 "Gcovr provides a utility for managing the use of the GNU gcov
19217 utility and generating summarized code coverage results. It is inspired
19218 by the Python coverage.py package, which provides a similar utility for
19219 Python.")
19220 (license license:bsd-3)))
19221
19222 (define-public python-owslib
19223 (package
19224 (name "python-owslib")
19225 (version "0.19.2")
19226 (source
19227 (origin
19228 (method url-fetch)
19229 (uri (pypi-uri "OWSLib" version))
19230 (sha256
19231 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
19232 (build-system python-build-system)
19233 (arguments
19234 '(#:tests? #f)) ; TODO: package dependencies required for tests.
19235 (synopsis "Interface for Open Geospatial Consortium web service")
19236 (description
19237 "OWSLib is a Python package for client programming with Open Geospatial
19238 Consortium (OGC) web service (hence OWS) interface standards, and their related
19239 content models.")
19240 (home-page "https://geopython.github.io/OWSLib/")
19241 (license license:bsd-3)))
19242
19243 (define-public python-docusign-esign
19244 (package
19245 (name "python-docusign-esign")
19246 (version "3.1.0")
19247 (source (origin
19248 (method url-fetch)
19249 (uri (pypi-uri "docusign_esign" version))
19250 (sha256
19251 (base32
19252 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
19253 (build-system python-build-system)
19254 ;; Testing requires undocumented setup changes, and so testing is disabled here.
19255 (arguments `(#:tests? #f))
19256 (propagated-inputs
19257 `(("python-certifi", python-certifi)
19258 ("python-six", python-six)
19259 ("python-dateutil", python-dateutil)
19260 ("python-urllib3", python-urllib3)
19261 ("python-pyjwt", python-pyjwt)
19262 ("python-cryptography", python-cryptography)
19263 ("python-nose", python-nose)))
19264 (synopsis "DocuSign Python Client")
19265 (description "The Official DocuSign Python Client Library used to interact
19266 with the eSign REST API. Send, sign, and approve documents using this client.")
19267 (home-page "https://www.docusign.com/devcenter")
19268 (license license:expat)))
19269
19270 (define-public python-xattr
19271 (package
19272 (name "python-xattr")
19273 (version "0.9.7")
19274 (source
19275 (origin
19276 (method url-fetch)
19277 (uri (pypi-uri "xattr" version))
19278 (sha256
19279 (base32
19280 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
19281 (build-system python-build-system)
19282 (propagated-inputs
19283 `(("python-cffi" ,python-cffi)))
19284 (home-page "https://github.com/xattr/xattr")
19285 (synopsis
19286 "Python wrapper for extended filesystem attributes")
19287 (description "This package provides a Python wrapper for using extended
19288 filesystem attributes. Extended attributes extend the basic attributes of files
19289 and directories in the file system. They are stored as name:data pairs
19290 associated with file system objects (files, directories, symlinks, etc).")
19291 (license license:expat)))
19292
19293 (define-public python-json-logger
19294 (package
19295 (name "python-json-logger")
19296 (version "0.1.11")
19297 (source
19298 (origin
19299 (method url-fetch)
19300 (uri (pypi-uri "python-json-logger" version))
19301 (sha256
19302 (base32
19303 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
19304 (build-system python-build-system)
19305 (home-page
19306 "https://github.com/madzak/python-json-logger")
19307 (synopsis "JSON log formatter in Python")
19308 (description "This library allows standard Python logging to output log data
19309 as JSON objects. With JSON we can make our logs more readable by machines and
19310 we can stop writing custom parsers for syslog-type records.")
19311 (license license:bsd-3)))
19312
19313 (define-public python-daiquiri
19314 (package
19315 (name "python-daiquiri")
19316 (version "2.1.1")
19317 (source
19318 (origin
19319 (method url-fetch)
19320 (uri (pypi-uri "daiquiri" version))
19321 (sha256
19322 (base32
19323 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
19324 (build-system python-build-system)
19325 (propagated-inputs
19326 `(("python-json-logger" ,python-json-logger)))
19327 (native-inputs
19328 `(("python-mock" ,python-mock)
19329 ("python-pytest" ,python-pytest)
19330 ("python-setuptools-scm" ,python-setuptools-scm)
19331 ("python-six" ,python-six)))
19332 (home-page "https://github.com/jd/daiquiri")
19333 (synopsis
19334 "Library to configure Python logging easily")
19335 (description "The daiquiri library provides an easy way to configure
19336 logging in Python. It also provides some custom formatters and handlers.")
19337 (license license:asl2.0)))
19338
19339 (define-public python-pifpaf
19340 (package
19341 (name "python-pifpaf")
19342 (version "2.4.0")
19343 (source
19344 (origin
19345 (method url-fetch)
19346 (uri (pypi-uri "pifpaf" version))
19347 (sha256
19348 (base32
19349 "150av2pylsjy8ykrpyi0vzy2q24s9rhh2ya01zvwnvj9j5dspviz"))))
19350 (build-system python-build-system)
19351 (arguments
19352 `(#:tests? #f))
19353 (propagated-inputs
19354 `(("python-click" ,python-click)
19355 ("python-daiquiri" ,python-daiquiri)
19356 ("python-fixtures" ,python-fixtures)
19357 ("python-jinja2" ,python-jinja2)
19358 ("python-pbr" ,python-pbr)
19359 ("python-psutil" ,python-psutil)
19360 ("python-six" ,python-six)
19361 ("python-xattr" ,python-xattr)))
19362 (native-inputs
19363 `(("python-mock" ,python-mock)
19364 ("python-os-testr" ,python-os-testr)
19365 ("python-requests" ,python-requests)
19366 ("python-testrepository" ,python-testrepository)
19367 ("python-testtools" ,python-testtools)))
19368 (home-page "https://github.com/jd/pifpaf")
19369 (synopsis "Tools and fixtures to manage daemons for testing in Python")
19370 (description "Pifpaf is a suite of fixtures and a command-line tool that
19371 starts and stops daemons for a quick throw-away usage. This is typically
19372 useful when needing these daemons to run integration testing. It originally
19373 evolved from its precursor @code{overtest}.")
19374 (license license:asl2.0)))
19375
19376 (define-public python-pytest-check-links
19377 (package
19378 (name "python-pytest-check-links")
19379 (version "0.3.0")
19380 (source
19381 (origin
19382 (method url-fetch)
19383 ;; URI uses underscores
19384 (uri (pypi-uri "pytest_check_links" version))
19385 (sha256
19386 (base32
19387 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
19388 (build-system python-build-system)
19389 (propagated-inputs
19390 `(("python-docutils" ,python-docutils)
19391 ("python-html5lib" ,python-html5lib)
19392 ("python-nbconvert" ,python-nbconvert)
19393 ("python-nbformat" ,python-nbformat)
19394 ("python-pytest" ,python-pytest)
19395 ("python-six" ,python-six)))
19396 (native-inputs
19397 `(("python-pbr-minimal" ,python-pbr-minimal)))
19398 (home-page "https://github.com/minrk/pytest-check-links")
19399 (synopsis "Check links in files")
19400 (description "This package provides a pytest plugin that checks URLs for
19401 HTML-containing files.")
19402 (license license:bsd-3)))
19403
19404 (define-public python-json5
19405 (package
19406 (name "python-json5")
19407 (version "0.8.5")
19408 (source
19409 (origin
19410 ;; sample.json5 is missing from PyPi source tarball
19411 (method git-fetch)
19412 (uri (git-reference
19413 (url "https://github.com/dpranke/pyjson5.git")
19414 (commit (string-append "v" version))))
19415 (file-name (git-file-name name version))
19416 (sha256
19417 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
19418 (build-system python-build-system)
19419 (home-page "https://github.com/dpranke/pyjson5")
19420 (synopsis
19421 "Python implementation of the JSON5 data format")
19422 (description
19423 "JSON5 extends the JSON data interchange format to make it slightly more
19424 usable as a configuration language. This Python package implements parsing and
19425 dumping of JSON5 data structures.")
19426 (license license:asl2.0)))
19427
19428 (define-public python-frozendict
19429 (package
19430 (name "python-frozendict")
19431 (version "1.2")
19432 (source
19433 (origin
19434 (method url-fetch)
19435 (uri (pypi-uri "frozendict" version))
19436 (sha256
19437 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
19438 (build-system python-build-system)
19439 (home-page "https://github.com/slezica/python-frozendict")
19440 (synopsis "Simple immutable mapping for Python")
19441 (description
19442 "@dfn{frozendict} is an immutable wrapper around dictionaries that
19443 implements the complete mapping interface. It can be used as a drop-in
19444 replacement for dictionaries where immutability is desired.")
19445 (license license:expat)))
19446
19447 (define-public python-unpaddedbase64
19448 (package
19449 (name "python-unpaddedbase64")
19450 (version "1.1.0")
19451 (source
19452 (origin
19453 (method git-fetch)
19454 (uri (git-reference
19455 (url "https://github.com/matrix-org/python-unpaddedbase64.git")
19456 (commit (string-append "v" version))))
19457 (file-name (git-file-name name version))
19458 (sha256
19459 (base32
19460 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
19461 (build-system python-build-system)
19462 (home-page "https://pypi.org/project/unpaddedbase64/")
19463 (synopsis "Encode and decode Base64 without “=” padding")
19464 (description
19465 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
19466 using “=” characters. However this conveys no benefit so many protocols
19467 choose to use Base64 without the “=” padding.")
19468 (license license:asl2.0)))
19469
19470 (define-public python-canonicaljson
19471 (package
19472 (name "python-canonicaljson")
19473 (version "1.1.4")
19474 (source
19475 (origin
19476 (method url-fetch)
19477 (uri (pypi-uri "canonicaljson" version))
19478 (sha256
19479 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
19480 (build-system python-build-system)
19481 (propagated-inputs
19482 `(("python-six" ,python-six)
19483 ("python-frozendict" ,python-frozendict)
19484 ("python-simplejson" ,python-simplejson)))
19485 (home-page "https://github.com/matrix-org/python-canonicaljson")
19486 (synopsis "Canonical JSON")
19487 (description
19488 "Deterministically encode JSON.
19489
19490 @itemize
19491 @item Encodes objects and arrays as RFC 7159 JSON.
19492 @item Sorts object keys so that you get the same result each time.
19493 @item Has no insignificant whitespace to make the output as small as possible.
19494 @item Escapes only the characters that must be escaped, U+0000 to
19495 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
19496 @item Uses the shortest escape sequence for each escaped character.
19497 @item Encodes the JSON as UTF-8.
19498 @item Can encode frozendict immutable dictionaries.
19499 @end itemize")
19500 (license license:asl2.0)))
19501
19502 (define-public python-signedjson
19503 (package
19504 (name "python-signedjson")
19505 (version "1.1.1")
19506 (source
19507 (origin
19508 (method url-fetch)
19509 (uri (pypi-uri "signedjson" version))
19510 (sha256
19511 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
19512 (build-system python-build-system)
19513 (propagated-inputs
19514 `(("python-canonicaljson" ,python-canonicaljson)
19515 ("python-importlib-metadata" ,python-importlib-metadata)
19516 ("python-pynacl" ,python-pynacl)
19517 ("python-typing-extensions" ,python-typing-extensions)
19518 ("python-unpaddedbase64" ,python-unpaddedbase64)))
19519 (native-inputs
19520 `(("python-setuptools-scm" ,python-setuptools-scm)))
19521 (home-page "https://github.com/matrix-org/python-signedjson")
19522 (synopsis "Sign JSON objects with ED25519 signatures")
19523 (description
19524 "Sign JSON objects with ED25519 signatures.
19525
19526 @itemize
19527 @item More than one entity can sign the same object.
19528 @item Each entity can sign the object with more than one key making it easier to
19529 rotate keys
19530 @item ED25519 can be replaced with a different algorithm.
19531 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
19532 key.
19533 @end itemize")
19534 (license license:asl2.0)))
19535
19536 (define-public python-daemonize
19537 (package
19538 (name "python-daemonize")
19539 (version "2.5.0")
19540 (source
19541 (origin
19542 (method url-fetch)
19543 (uri (pypi-uri "daemonize" version))
19544 (sha256
19545 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
19546 (build-system python-build-system)
19547 (home-page "https://github.com/thesharp/daemonize")
19548 (synopsis "Library for writing system daemons in Python")
19549 (description "Daemonize is a library for writing system daemons in Python.")
19550 (license license:expat)))
19551
19552 (define-public python-pymacaroons
19553 (package
19554 (name "python-pymacaroons")
19555 (version "0.13.0")
19556 (source
19557 (origin
19558 (method url-fetch)
19559 (uri (pypi-uri "pymacaroons" version))
19560 (sha256
19561 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
19562 (build-system python-build-system)
19563 (propagated-inputs
19564 `(("python-six" ,python-six)
19565 ("python-pynacl" ,python-pynacl)))
19566 (home-page "https://github.com/ecordell/pymacaroons")
19567 (synopsis "Python Macaroon Library")
19568 (description
19569 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
19570 tokens, macaroons embed caveats that define specific authorization
19571 requirements for the target service, the service that issued the root macaroon
19572 and which is capable of verifying the integrity of macaroons it receives.
19573
19574 Macaroons allow for delegation and attenuation of authorization. They are
19575 simple and fast to verify, and decouple authorization policy from the
19576 enforcement of that policy.")
19577 (license license:expat)))
19578
19579 (define-public python-ldap3
19580 (package
19581 (name "python-ldap3")
19582 (version "2.7")
19583 (home-page "https://github.com/cannatag/ldap3")
19584 (source
19585 (origin
19586 (method git-fetch)
19587 (uri (git-reference (url home-page)
19588 (commit (string-append "v" version))))
19589 (file-name (git-file-name name version))
19590 (sha256
19591 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
19592 (build-system python-build-system)
19593 (arguments
19594 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
19595 #:phases (modify-phases %standard-phases
19596 (replace 'check
19597 (lambda* (#:key tests? #:allow-other-keys)
19598 (when tests?
19599 (invoke "nosetests" "-s" "test"))
19600 #t)))))
19601 (native-inputs
19602 `(("python-nose" ,python-nose)))
19603 (propagated-inputs
19604 `(("python-gssapi" ,python-gssapi)
19605 ("python-pyasn1" ,python-pyasn1)))
19606 (synopsis "Python LDAP client")
19607 (description
19608 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
19609 library.")
19610 (license license:lgpl3+)))
19611
19612 (define-public python-boltons
19613 (package
19614 (name "python-boltons")
19615 (version "20.0.0")
19616 (source
19617 (origin
19618 (method url-fetch)
19619 (uri (pypi-uri "boltons" version))
19620 (sha256
19621 (base32
19622 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
19623 (build-system python-build-system)
19624 (home-page "https://github.com/mahmoud/boltons")
19625 (synopsis "Extensions to the Python standard library")
19626 (description
19627 "Boltons is a set of over 230 pure-Python utilities in the same spirit
19628 as — and yet conspicuously missing from — the standard library, including:
19629
19630 @itemize
19631 @item Atomic file saving, bolted on with fileutils
19632 @item A highly-optimized OrderedMultiDict, in dictutils
19633 @item Two types of PriorityQueue, in queueutils
19634 @item Chunked and windowed iteration, in iterutils
19635 @item Recursive data structure iteration and merging, with iterutils.remap
19636 @item Exponential backoff functionality, including jitter, through
19637 iterutils.backoff
19638 @item A full-featured TracebackInfo type, for representing stack traces, in
19639 tbutils
19640 @end itemize")
19641 (license license:bsd-3)))
19642
19643 (define-public python-eliot
19644 (package
19645 (name "python-eliot")
19646 (version "1.12.0")
19647 (source
19648 (origin
19649 (method url-fetch)
19650 (uri (pypi-uri "eliot" version))
19651 (sha256
19652 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
19653 (build-system python-build-system)
19654 (arguments
19655 `(#:phases
19656 (modify-phases %standard-phases
19657 (add-after 'unpack 'remove-journald-support
19658 (lambda _
19659 (for-each delete-file
19660 '("eliot/tests/test_journald.py"
19661 "eliot/journald.py"))
19662 #t))
19663 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
19664 ;; remove command-line tool's tests. TODO eliot-prettyprint should
19665 ;; be installed and these tests should pass.
19666 (lambda _
19667 (delete-file "eliot/tests/test_prettyprint.py")
19668 #t)))))
19669 (propagated-inputs
19670 `(("python-boltons" ,python-boltons)
19671 ("python-pyrsistent" ,python-pyrsistent)
19672 ("python-six" ,python-six)
19673 ("python-zope-interface" ,python-zope-interface)))
19674 (native-inputs
19675 `(("python-black" ,python-black)
19676 ("python-coverage" ,python-coverage)
19677 ("python-dask" ,python-dask)
19678 ("python-flake8" ,python-flake8)
19679 ("python-hypothesis" ,python-hypothesis)
19680 ("python-pytest" ,python-pytest)
19681 ("python-setuptools" ,python-setuptools)
19682 ("python-sphinx" ,python-sphinx)
19683 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
19684 ("python-testtools" ,python-testtools)
19685 ("python-twine" ,python-twine)
19686 ("python-twisted" ,python-twisted)))
19687 (home-page "https://github.com/itamarst/eliot/")
19688 (synopsis "Eliot: the logging system that tells you why it happened")
19689 (description
19690 "@dfn{eliot} is a Python logging system that outputs causal chains of
19691 actions: actions can spawn other actions, and eventually they either succeed
19692 or fail. The resulting logs tell you the story of what your software did: what
19693 happened, and what caused it.")
19694 (license license:asl2.0)))
19695
19696 (define-public python-pem
19697 (package
19698 (name "python-pem")
19699 (version "20.1.0")
19700 (source
19701 (origin
19702 (method url-fetch)
19703 (uri (pypi-uri "pem" version))
19704 (sha256
19705 (base32
19706 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
19707 (build-system python-build-system)
19708 (native-inputs
19709 `(("python-certifi" ,python-certifi)
19710 ("python-coverage" ,python-coverage)
19711 ("python-pretend" ,python-pretend)
19712 ("python-pyopenssl" ,python-pyopenssl)
19713 ("python-pytest" ,python-pytest)
19714 ("python-sphinx" ,python-sphinx)
19715 ("python-twisted" ,python-twisted)))
19716 (home-page "https://pem.readthedocs.io/")
19717 (synopsis "Easy PEM file parsing in Python")
19718 (description
19719 "This package provides a Python module for parsing and splitting PEM files.")
19720 (license license:expat)))
19721
19722 (define-public python-txsni
19723 ;; We need a few commits on top of 0.1.9 for compatibility with newer
19724 ;; Python and OpenSSL.
19725 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
19726 (revision "0"))
19727 (package
19728 (name "python-txsni")
19729 (version (git-version "0.1.9" revision commit))
19730 (home-page "https://github.com/glyph/txsni")
19731 (source
19732 (origin
19733 (method git-fetch)
19734 (uri (git-reference (url home-page) (commit commit)))
19735 (file-name (git-file-name name version))
19736 (sha256
19737 (base32
19738 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
19739 (build-system python-build-system)
19740 (propagated-inputs
19741 `(("python-pyopenssl" ,python-pyopenssl)
19742 ("python-service-identity" ,python-service-identity)
19743 ("python-twisted" ,python-twisted)))
19744 (synopsis "Run TLS servers with Twisted")
19745 (description
19746 "This package provides an easy-to-use SNI endpoint for use
19747 with the Twisted web framework.")
19748 (license license:expat))))
19749
19750 (define-public python-txacme
19751 (package
19752 (name "python-txacme")
19753 (version "0.9.2")
19754 (source
19755 (origin
19756 (method url-fetch)
19757 (uri (pypi-uri "txacme" version))
19758 (sha256
19759 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
19760 (build-system python-build-system)
19761 (propagated-inputs
19762 `(("python-acme" ,python-acme)
19763 ("python-attrs" ,python-attrs)
19764 ("python-eliot" ,python-eliot)
19765 ("python-josepy" ,python-josepy)
19766 ("python-pem" ,python-pem)
19767 ("python-treq" ,python-treq)
19768 ("python-twisted" ,python-twisted)
19769 ("python-txsni" ,python-txsni)))
19770 (native-inputs
19771 `(("python-fixtures" ,python-fixtures)
19772 ("python-hypothesis" ,python-hypothesis)
19773 ("python-mock" ,python-mock)
19774 ("python-service-identity"
19775 ,python-service-identity)
19776 ("python-testrepository" ,python-testrepository)
19777 ("python-testscenarios" ,python-testscenarios)
19778 ("python-testtools" ,python-testtools)))
19779 (home-page "https://github.com/twisted/txacme")
19780 (synopsis "Twisted implexmentation of the ACME protocol")
19781 (description
19782 "ACME is Automatic Certificate Management Environment, a protocol that
19783 allows clients and certificate authorities to automate verification and
19784 certificate issuance. The ACME protocol is used by the free Let's Encrypt
19785 Certificate Authority.
19786
19787 txacme is an implementation of the protocol for Twisted, the event-driven
19788 networking engine for Python.")
19789 (license license:expat)))
19790
19791 (define-public python-pysaml2
19792 (package
19793 (name "python-pysaml2")
19794 (version "5.0.0")
19795 (source
19796 (origin
19797 (method url-fetch)
19798 (uri (pypi-uri "pysaml2" version))
19799 (sha256
19800 (base32
19801 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
19802 (build-system python-build-system)
19803 (propagated-inputs
19804 `(("python-cryptography" ,python-cryptography)
19805 ("python-dateutil" ,python-dateutil)
19806 ("python-defusedxml" ,python-defusedxml)
19807 ("python-pyopenssl" ,python-pyopenssl)
19808 ("python-pytz" ,python-pytz)
19809 ("python-requests" ,python-requests)
19810 ("python-six" ,python-six)))
19811 (home-page "https://idpy.org")
19812 (synopsis "Python implementation of SAML Version 2 Standard")
19813 (description
19814 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
19815 It contains all necessary pieces for building a SAML2 service provider or
19816 an identity provider. The distribution contains examples of both.
19817
19818 This package was originally written to work in a WSGI environment, but
19819 there are extensions that allow you to use it with other frameworks.")
19820 (license license:asl2.0)))
19821
19822 (define-public python-click-plugins
19823 (package
19824 (name "python-click-plugins")
19825 (version "1.1.1")
19826 (source
19827 (origin
19828 (method url-fetch)
19829 (uri (pypi-uri "click-plugins" version))
19830 (sha256
19831 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
19832 (build-system python-build-system)
19833 (native-inputs
19834 `(("python-pytest" ,python-pytest)))
19835 (propagated-inputs
19836 `(("python-click" ,python-click)))
19837 (synopsis "Extension for Click to register external CLI commands")
19838 (description "This package provides n extension module for Click to
19839 register external CLI commands via setuptools entry-points.")
19840 (home-page "https://github.com/click-contrib/click-plugins")
19841 (license license:bsd-3)))
19842
19843 (define-public python-diceware
19844 (package
19845 (name "python-diceware")
19846 (version "0.9.6")
19847 (source
19848 (origin
19849 (method url-fetch)
19850 (uri (pypi-uri "diceware" version))
19851 (sha256
19852 (base32
19853 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
19854 (build-system python-build-system)
19855 (native-inputs
19856 `(("python-coverage" ,python-coverage)
19857 ("python-pytest" ,python-pytest)
19858 ("python-pytest-runner" ,python-pytest-runner)))
19859 (home-page "https://github.com/ulif/diceware/")
19860 (synopsis "Generates memorable passphrases")
19861 (description "This package generates passphrases by concatenating words
19862 randomly picked from wordlists. It supports several sources of
19863 randomness (including real life dice) and different wordlists (including
19864 cryptographically signed ones).")
19865 (license license:gpl3+)))
19866
19867 (define-public pyzo
19868 (package
19869 (name "pyzo")
19870 (version "4.10.2")
19871 (source
19872 (origin
19873 (method url-fetch)
19874 (uri (pypi-uri "pyzo" version))
19875 (sha256
19876 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
19877 (build-system python-build-system)
19878 (arguments
19879 `(#:phases
19880 (modify-phases %standard-phases
19881 (add-before 'check 'fix-home-directory
19882 (lambda _
19883 ;; Tests fail with "Permission denied: '/homeless-shelter'".
19884 (setenv "HOME" "/tmp")
19885 #t)))
19886 ;; Tests fail with "Uncaught Python exception: invalid literal for
19887 ;; int() with base 10: 'test'".
19888 #:tests? #f))
19889 (propagated-inputs
19890 `(("python-pyqt" ,python-pyqt)))
19891 (home-page "https://pyzo.org")
19892 (synopsis
19893 "Python IDE for scientific computing")
19894 (description
19895 "Pyzo is a Python IDE focused on interactivity and introspection,
19896 which makes it very suitable for scientific computing. Its practical
19897 design is aimed at simplicity and efficiency.
19898
19899 It consists of two main components, the editor and the shell, and uses
19900 a set of pluggable tools to help the programmer in various ways. Some
19901 example tools are source structure, project manager, interactive help,
19902 workspace...")
19903 (license license:bsd-2)))
19904
19905 (define-public python-osc
19906 (package
19907 (name "python-osc")
19908 (version "1.7.4")
19909 (source
19910 (origin
19911 (method url-fetch)
19912 (uri (pypi-uri "python-osc" version))
19913 (sha256
19914 (base32
19915 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
19916 (build-system python-build-system)
19917 (home-page "https://github.com/attwad/python-osc")
19918 (synopsis "Open Sound Control server and client implementations")
19919 (description
19920 "@code{python-osc} is a pure Python library with no external
19921 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
19922 Open Sound Control 1.0} specification.")
19923 (license license:unlicense)))
19924
19925 (define-public python-voluptuous
19926 (package
19927 (name "python-voluptuous")
19928 (version "0.11.7")
19929 (source
19930 (origin
19931 (method url-fetch)
19932 (uri (pypi-uri "voluptuous" version))
19933 (sha256
19934 (base32
19935 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
19936 (build-system python-build-system)
19937 (native-inputs
19938 `(("python-nose" ,python-nose)))
19939 (home-page "https://github.com/alecthomas/voluptuous")
19940 (synopsis "Python data validation library")
19941 (description
19942 "Voluptuous is a Python data validation library. It is primarily
19943 intended for validating data coming into Python as JSON, YAML, etc.")
19944 (license license:bsd-3)))
19945
19946 (define-public python-cmd2
19947 (package
19948 (name "python-cmd2")
19949 (version "1.0.2")
19950 (source
19951 (origin
19952 (method url-fetch)
19953 (uri (pypi-uri "cmd2" version))
19954 (sha256
19955 (base32
19956 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
19957 (build-system python-build-system)
19958 (propagated-inputs
19959 `(("python-attrs" ,python-attrs)
19960 ("python-colorama" ,python-colorama)
19961 ("python-pyperclip" ,python-pyperclip)
19962 ("python-wcwidth" ,python-wcwidth)))
19963 (native-inputs
19964 `(("python-codecov" ,python-codecov)
19965 ("python-coverage" ,python-coverage)
19966 ("python-doc8" ,python-doc8)
19967 ("python-flake8" ,python-flake8)
19968 ("python-invoke" ,python-invoke)
19969 ("python-mock" ,python-mock)
19970 ("python-pytest" ,python-pytest)
19971 ("python-pytest-cov" ,python-pytest-cov)
19972 ("python-pytest-mock" ,python-pytest-mock)
19973 ("python-setuptools-scm" ,python-setuptools-scm)
19974 ("python-sphinx" ,python-sphinx)
19975 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
19976 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
19977 ("python-tox" ,python-tox)
19978 ("python-twine" ,python-twine)
19979 ("which" ,which)))
19980 (home-page "https://github.com/python-cmd2/cmd2")
19981 (synopsis "Tool for building interactive command line applications")
19982 (description
19983 "Cmd2 is a tool for building interactive command line applications in
19984 Python. Its goal is to make it quick and easy for developers to build
19985 feature-rich and user-friendly interactive command line applications. It
19986 provides a simple API which is an extension of Python's built-in @code{cmd}
19987 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
19988 make your life easier and eliminates much of the boilerplate code which would
19989 be necessary when using @code{cmd}.")
19990 (license license:expat)))
19991
19992 (define-public python-pytidylib
19993 (package
19994 (name "python-pytidylib")
19995 (version "0.3.2")
19996 (source (origin
19997 (method url-fetch)
19998 (uri (pypi-uri "pytidylib" version))
19999 (sha256
20000 (base32
20001 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
20002 (build-system python-build-system)
20003 (arguments
20004 '(#:phases
20005 (modify-phases %standard-phases
20006 (add-before 'build 'qualify-libtidy
20007 (lambda* (#:key inputs #:allow-other-keys)
20008 (let ((libtidy (string-append (assoc-ref inputs "tidy")
20009 "/lib/libtidy.so")))
20010 (substitute* "tidylib/tidy.py"
20011 (("ctypes\\.util\\.find_library\\('tidy'\\)")
20012 (format #f "'~a'" libtidy)))
20013 #t))))))
20014 (inputs `(("tidy" ,tidy)))
20015 (home-page "https://github.com/countergram/pytidylib")
20016 (synopsis "Python wrapper for HTML Tidy library")
20017 (description
20018 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
20019 allows you, from Python code, to “fix” invalid (X)HTML markup.")
20020 (license license:expat)))
20021
20022 (define-public python2-pytidylib
20023 (package-with-python2 python-pytidylib))
20024
20025 (define-public python-mujson
20026 (package
20027 (name "python-mujson")
20028 (version "1.4")
20029 (source
20030 (origin
20031 (method url-fetch)
20032 (uri (pypi-uri "mujson" version))
20033 (sha256
20034 (base32
20035 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
20036 (build-system python-build-system)
20037 (home-page "https://github.com/mattgiles/mujson")
20038 (synopsis "Use the fastest JSON functions available at import time")
20039 (description "This packages selects the fastest JSON functions available
20040 at import time.")
20041 (license license:expat)))
20042
20043 (define-public python-bashlex
20044 (package
20045 (name "python-bashlex")
20046 (version "0.14")
20047 (source
20048 (origin
20049 (method url-fetch)
20050 (uri (pypi-uri "bashlex" version))
20051 (sha256
20052 (base32
20053 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
20054 (build-system python-build-system)
20055 (arguments
20056 `(#:phases
20057 (modify-phases %standard-phases
20058 (add-before 'build 'pregenerate-yacc-tables
20059 (lambda _
20060 ;; parser.py caches tables, which attempts to write to site lib
20061 ;; see https://github.com/idank/bashlex/issues/51
20062 (invoke "python" "-c" "import bashlex"))))))
20063 (home-page
20064 "https://github.com/idank/bashlex")
20065 (synopsis "Python parser for bash")
20066 (description "@code{bashlex} is a Python port of the parser used
20067 internally by GNU bash.
20068
20069 For the most part it's transliterated from C, the major differences are:
20070
20071 @itemize
20072 @item it does not execute anything
20073 @item it is reentrant
20074 @item it generates a complete AST
20075 @end itemize
20076 ")
20077 (license license:gpl3+)))