gnu: Add python-text-unidecode.
[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 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 ng0 <ng0@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 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 Guillaume Le Vaillant <glv@posteo.net>
63 ;;; Copyright © 2019 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 Giacomo Leidi <goodoldpaul@autistici.org>
67 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
68 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
69 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
70 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
71 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
72 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
73 ;;;
74 ;;; This file is part of GNU Guix.
75 ;;;
76 ;;; GNU Guix is free software; you can redistribute it and/or modify it
77 ;;; under the terms of the GNU General Public License as published by
78 ;;; the Free Software Foundation; either version 3 of the License, or (at
79 ;;; your option) any later version.
80 ;;;
81 ;;; GNU Guix is distributed in the hope that it will be useful, but
82 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
83 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84 ;;; GNU General Public License for more details.
85 ;;;
86 ;;; You should have received a copy of the GNU General Public License
87 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
88
89 (define-module (gnu packages python-xyz)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (gnu packages)
92 #:use-module (gnu packages algebra)
93 #:use-module (gnu packages adns)
94 #:use-module (gnu packages attr)
95 #:use-module (gnu packages backup)
96 #:use-module (gnu packages bash)
97 #:use-module (gnu packages check)
98 #:use-module (gnu packages compression)
99 #:use-module (gnu packages crypto)
100 #:use-module (gnu packages databases)
101 #:use-module (gnu packages dbm)
102 #:use-module (gnu packages enchant)
103 #:use-module (gnu packages file)
104 #:use-module (gnu packages fontutils)
105 #:use-module (gnu packages gcc)
106 #:use-module (gnu packages geo)
107 #:use-module (gnu packages ghostscript)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages glib)
110 #:use-module (gnu packages gnome)
111 #:use-module (gnu packages graphviz)
112 #:use-module (gnu packages graphics)
113 #:use-module (gnu packages gstreamer)
114 #:use-module (gnu packages gtk)
115 #:use-module (gnu packages icu4c)
116 #:use-module (gnu packages image)
117 #:use-module (gnu packages imagemagick)
118 #:use-module (gnu packages kerberos)
119 #:use-module (gnu packages libevent)
120 #:use-module (gnu packages libffi)
121 #:use-module (gnu packages linux)
122 #:use-module (gnu packages llvm)
123 #:use-module (gnu packages man)
124 #:use-module (gnu packages maths)
125 #:use-module (gnu packages monitoring)
126 #:use-module (gnu packages multiprecision)
127 #:use-module (gnu packages networking)
128 #:use-module (gnu packages ncurses)
129 #:use-module (gnu packages openstack)
130 #:use-module (gnu packages pcre)
131 #:use-module (gnu packages perl)
132 #:use-module (gnu packages photo)
133 #:use-module (gnu packages pkg-config)
134 #:use-module (gnu packages python)
135 #:use-module (gnu packages python-check)
136 #:use-module (gnu packages python-compression)
137 #:use-module (gnu packages python-crypto)
138 #:use-module (gnu packages python-science)
139 #:use-module (gnu packages python-web)
140 #:use-module (gnu packages qt)
141 #:use-module (gnu packages readline)
142 #:use-module (gnu packages sdl)
143 #:use-module (gnu packages search)
144 #:use-module (gnu packages shells)
145 #:use-module (gnu packages sphinx)
146 #:use-module (gnu packages ssh)
147 #:use-module (gnu packages terminals)
148 #:use-module (gnu packages tex)
149 #:use-module (gnu packages texinfo)
150 #:use-module (gnu packages time)
151 #:use-module (gnu packages tls)
152 #:use-module (gnu packages version-control)
153 #:use-module (gnu packages video)
154 #:use-module (gnu packages web)
155 #:use-module (gnu packages base)
156 #:use-module (gnu packages xml)
157 #:use-module (gnu packages xorg)
158 #:use-module (gnu packages xdisorg)
159 #:use-module (gnu packages tcl)
160 #:use-module (gnu packages bdw-gc)
161 #:use-module (gnu packages serialization)
162 #:use-module (guix packages)
163 #:use-module (guix download)
164 #:use-module (guix git-download)
165 #:use-module (guix hg-download)
166 #:use-module (guix utils)
167 #:use-module (guix build-system gnu)
168 #:use-module (guix build-system cmake)
169 #:use-module (guix build-system python)
170 #:use-module (guix build-system trivial)
171 #:use-module (srfi srfi-1)
172 #:use-module (srfi srfi-26))
173
174 (define-public python-tenacity
175 (package
176 (name "python-tenacity")
177 (version "6.1.0")
178 (source (origin
179 (method url-fetch)
180 (uri (pypi-uri "tenacity" version))
181 (sha256
182 (base32
183 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
184 (build-system python-build-system)
185 (native-inputs
186 `(("python-setuptools-scm" ,python-setuptools-scm)
187 ("python-sphinx" ,python-sphinx)
188 ("python-tornado" ,python-tornado)
189 ("python-pytest" ,python-pytest)))
190 (propagated-inputs
191 `(("python-six" ,python-six)))
192 (arguments
193 `(#:phases (modify-phases %standard-phases
194 (replace 'check
195 (lambda _
196 (invoke "pytest")
197 #t)))))
198 (home-page "https://github.com/jd/tenacity")
199 (synopsis "Retrying library for python")
200 (description "Tenacity is a general-purpose python library to simplify the
201 task of adding retry behavior to just about anything.")
202 (license license:asl2.0)))
203
204 (define-public python-colorlog
205 (package
206 (name "python-colorlog")
207 (version "4.1.0")
208 (source (origin
209 (method url-fetch)
210 (uri (pypi-uri "colorlog" version))
211 (sha256
212 (base32
213 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
214 (build-system python-build-system)
215 (native-inputs
216 `(("python-pytest" ,python-pytest)))
217 (arguments
218 `(#:phases (modify-phases %standard-phases
219 (replace 'check
220 (lambda _
221 ;; Extend PYTHONPATH so the built package will be found.
222 (setenv "PYTHONPATH"
223 (string-append (getcwd) "/build/lib:"
224 (getenv "PYTHONPATH")))
225 (invoke "pytest" "-p" "no:logging")
226 #t)))))
227 (home-page "https://github.com/borntyping/python-colorlog")
228 (synopsis "Log formatting with colors for python")
229 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
230 with Python's logging module that outputs records using terminal colors.")
231 (license license:expat)))
232
233 (define-public python-pyprind
234 (package
235 (name "python-pyprind")
236 (version "2.11.2")
237 (source (origin
238 (method url-fetch)
239 (uri (pypi-uri "PyPrind" version))
240 (sha256
241 (base32
242 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
243 (build-system python-build-system)
244 (propagated-inputs
245 `(("python-psutil" ,python-psutil)))
246 (home-page "https://github.com/rasbt/pyprind")
247 (synopsis "Python Progress Bar and Percent Indicator Utility")
248 (description "The PyPrind (Python Progress Indicator) module provides a
249 progress bar and a percentage indicator object that let you track the progress
250 of a loop structure or other iterative computation.")
251 (license license:bsd-3)))
252
253 (define-public python-gphoto2
254 (package
255 (name "python-gphoto2")
256 (version "2.2.1")
257 (source (origin
258 (method url-fetch)
259 (uri (pypi-uri "gphoto2" version))
260 (sha256
261 (base32
262 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
263 (build-system python-build-system)
264 (native-inputs
265 `(("pkg-config" ,pkg-config)))
266 (inputs
267 `(("libgphoto2" ,libgphoto2)))
268 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
269 (synopsis "Python interface to libgphoto2")
270 (description "@code{python-gphoto2} is a comprehensive Python interface
271 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
272 automatically generate the interface code.")
273 (license license:gpl3+)))
274
275 (define-public python-colour
276 (package
277 (name "python-colour")
278 (version "0.1.5")
279 (source (origin
280 (method url-fetch)
281 (uri (pypi-uri "colour" version))
282 (sha256
283 (base32
284 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
285 (build-system python-build-system)
286 (native-inputs
287 `(("python-d2to1" ,python-d2to1)))
288 (home-page "https://github.com/vaab/colour")
289 (synopsis "Convert and manipulate various color representations")
290 (description "Pythonic way to manipulate color representations (HSL, RVB,
291 web, X11, ...).")
292 (license license:expat)))
293
294 (define-public python-d2to1
295 (package
296 (name "python-d2to1")
297 (version "0.2.12.post1")
298 (source (origin
299 (method url-fetch)
300 (uri (pypi-uri "d2to1" version))
301 (sha256
302 (base32
303 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
304 (build-system python-build-system)
305 (native-inputs
306 `(("python-nose" ,python-nose)))
307 (home-page "https://github.com/embray/d2to1")
308 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
309 in python")
310 (description "The python package d2to1 (the d is for distutils) allows
311 using distutils2-like setup.cfg files for a package's metadata with a
312 distribute/setuptools setup.py script.")
313 (license license:bsd-2)))
314
315 (define-public python-rawkit
316 (package
317 (name "python-rawkit")
318 (version "0.6.0")
319 (source (origin
320 (method url-fetch)
321 (uri (pypi-uri "rawkit" version))
322 (sha256
323 (base32
324 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
325 (build-system python-build-system)
326 (native-inputs
327 `(("python-pytest" ,python-pytest)
328 ("python-mock" ,python-mock)))
329 (inputs
330 `(("libraw" ,libraw)))
331 (home-page "https://rawkit.readthedocs.io")
332 (synopsis "Ctypes-based LibRaw binding for Python")
333 (description "The rawkit package provides two modules: rawkit and libraw.
334 The rawkit module provides a high-level Pythonic interface for developing raw
335 photos, while the libraw module provides a CTypes based interface for
336 interacting with the low-level LibRaw C APIs.")
337 (license license:expat)))
338
339 (define-public python-easygui
340 (package
341 (name "python-easygui")
342 (version "0.98.1")
343 (source (origin
344 (method url-fetch)
345 (uri (pypi-uri "easygui" version))
346 (sha256
347 (base32
348 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
349 (build-system python-build-system)
350 (propagated-inputs
351 `(("python-tkinter" ,python "tk")))
352 (home-page "https://github.com/robertlugg/easygui")
353 (synopsis "GUI programming module for Python")
354 (description "EasyGUI is a module for very simple, very easy GUI
355 programming in Python. EasyGUI is different from other GUI generators in that
356 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
357 simple function calls.")
358 (license license:bsd-3)))
359
360 (define-public python-pymediainfo
361 (package
362 (name "python-pymediainfo")
363 (version "4.1")
364 (source
365 (origin
366 (method url-fetch)
367 (uri (pypi-uri "pymediainfo" version))
368 (sha256
369 (base32
370 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
371 (build-system python-build-system)
372 (native-inputs
373 `(("python-setuptools-scm" ,python-setuptools-scm)
374 ("python-pytest" ,python-pytest)))
375 (inputs
376 `(("libmediainfo" ,libmediainfo)))
377 (arguments
378 `(#:phases
379 (modify-phases %standard-phases
380 (add-after 'unpack 'patch-libmediainfo
381 (lambda _
382 (substitute* "pymediainfo/__init__.py"
383 (("libmediainfo.so.0")
384 (string-append (assoc-ref %build-inputs "libmediainfo")
385 "/lib/libmediainfo.so.0")))
386 #t))
387 (replace 'check
388 (lambda _
389 ;; Extend PYTHONPATH so the built package will be found.
390 (setenv "PYTHONPATH"
391 (string-append (getcwd) "/build/lib:"
392 (getenv "PYTHONPATH")))
393 ;; Skip the only failing test "test_parse_url"
394 (invoke "pytest" "-vv" "-k" "not test_parse_url")
395 #t)))))
396 (home-page
397 "https://github.com/sbraz/pymediainfo")
398 (synopsis
399 "Python wrapper for the mediainfo library")
400 (description
401 "Python wrapper for the mediainfo library to access the technical and tag
402 data for video and audio files.")
403 (license license:expat)))
404
405 (define-public python-psutil
406 (package
407 (name "python-psutil")
408 (version "5.6.5")
409 (source
410 (origin
411 (method url-fetch)
412 (uri (pypi-uri "psutil" version))
413 (sha256
414 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
415 (build-system python-build-system)
416 (arguments
417 ;; FIXME: some tests does not return and times out.
418 '(#:tests? #f))
419 (home-page "https://www.github.com/giampaolo/psutil")
420 (synopsis "Library for retrieving information on running processes")
421 (description
422 "psutil (Python system and process utilities) is a library for retrieving
423 information on running processes and system utilization (CPU, memory, disks,
424 network) in Python. It is useful mainly for system monitoring, profiling and
425 limiting process resources and management of running processes. It implements
426 many functionalities offered by command line tools such as: ps, top, lsof,
427 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
428 pidof, tty, taskset, pmap.")
429 (properties `((python2-variant . ,(delay python2-psutil))))
430 (license license:bsd-3)))
431
432 (define-public python2-psutil
433 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
434 (package
435 (inherit base)
436 (propagated-inputs
437 `(("python2-enum34" ,python2-enum34) ;optional
438 ,@(package-propagated-inputs base))))))
439
440 (define-public python-shapely
441 (package
442 (name "python-shapely")
443 (version "1.6.4.post2")
444 (source
445 (origin
446 (method url-fetch)
447 (uri (pypi-uri "Shapely" version))
448 (sha256
449 (base32
450 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
451 (build-system python-build-system)
452 (native-inputs
453 `(("python-cython" ,python-cython)
454 ("python-matplotlib" ,python-matplotlib)
455 ("python-pytest" ,python-pytest)
456 ("python-pytest-cov" ,python-pytest-cov)))
457 (inputs
458 `(("geos" ,geos)))
459 (propagated-inputs
460 `(("python-numpy" ,python-numpy)))
461 (arguments
462 `(#:phases
463 (modify-phases %standard-phases
464 (add-after 'unpack 'patch-geos-path
465 (lambda* (#:key inputs #:allow-other-keys)
466 (let ((geos (assoc-ref inputs "geos"))
467 (glibc (assoc-ref inputs ,(if (%current-target-system)
468 "cross-libc" "libc"))))
469 (substitute* "shapely/geos.py"
470 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
471 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
472 geos "/lib/libgeos_c.so'])"))
473 (("free = load_dll\\('c'\\)\\.free")
474 (string-append "free = load_dll('c', fallbacks=['"
475 glibc "/lib/libc.so.6']).free"))))
476 #t)))))
477 (home-page "https://github.com/Toblerity/Shapely")
478 (synopsis "Library for the manipulation and analysis of geometric objects")
479 (description "Shapely is a Python package for manipulation and analysis of
480 planar geometric objects. It is based on the @code{GEOS} library.")
481 (license license:bsd-3)))
482
483 (define-public python-shortuuid
484 (package
485 (name "python-shortuuid")
486 (version "0.5.0")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "shortuuid" version))
491 (sha256
492 (base32
493 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
494 (build-system python-build-system)
495 (native-inputs
496 `(("python-pep8" ,python-pep8)))
497 (home-page "https://github.com/skorokithakis/shortuuid")
498 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
499 (description
500 "@code{shortuuid} is a Python library for generating concise, unambiguous
501 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
502 module and then similar looking characters are removed.")
503 (license license:bsd-3)))
504
505 (define-public python-logwrap
506 (package
507 (name "python-logwrap")
508 (version "3.2.1")
509 (source
510 (origin
511 (method url-fetch)
512 (uri (pypi-uri "logwrap" version ".zip"))
513 (sha256
514 (base32
515 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
516 (build-system python-build-system)
517 (propagated-inputs
518 `(("python-six" ,python-six)
519 ("python-typing" ,python-typing)))
520 (native-inputs
521 `(("unzip" ,unzip)
522 ("python-cython" ,python-cython)
523 ("python-pytest" ,python-pytest)
524 ("python-pytest-cov" ,python-pytest-cov)
525 ("python-pytest-runner" ,python-pytest-runner)))
526 (home-page "https://github.com/penguinolog/logwrap")
527 (synopsis "Decorator for logging function arguments")
528 (description "This package provides a decorator to log function arguments
529 and function call return values in a human-readable way.")
530 (license license:asl2.0)))
531
532 (define-public python2-shapely
533 (package-with-python2 python-shapely))
534
535 (define-public python-clyent
536 (package
537 (name "python-clyent")
538 (version "1.2.1")
539 (source
540 (origin
541 (method url-fetch)
542 (uri (pypi-uri "clyent" version))
543 (sha256
544 (base32
545 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
546 (build-system python-build-system)
547 (native-inputs
548 `(("python-mock" ,python-mock)))
549 (home-page "https://github.com/binstar/clyent")
550 (synopsis "Command line client library")
551 (description "Clyent is a Python command line utiliy library. It is used
552 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
553 (license license:bsd-3)))
554
555 (define-public python2-clyent
556 (package-with-python2 python-clyent))
557
558 (define-public python-babel
559 (package
560 (name "python-babel")
561 (version "2.8.0")
562 (source
563 (origin
564 (method url-fetch)
565 (uri (pypi-uri "Babel" version))
566 (sha256
567 (base32
568 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
569 (build-system python-build-system)
570 (native-inputs
571 `(("python-freezegun" ,python-freezegun)
572 ("python-pytest" ,python-pytest)))
573 (propagated-inputs
574 `(("python-pytz" ,python-pytz)))
575 (arguments
576 `(#:phases (modify-phases %standard-phases
577 (replace 'check
578 (lambda _
579 (invoke "pytest" "-vv" "-k"
580 (string-append
581 ;; XXX: These tests fail when using Pytest 4.x and
582 ;; Babel 2.6.0. Try removing this for later versions.
583 "not test_no_inherit_metazone_marker_never_in_output"
584 " and not test_smoke_dates"
585 " and not test_smoke_numbers")))))))
586 (home-page "http://babel.pocoo.org/")
587 (synopsis
588 "Tools for internationalizing Python applications")
589 (description
590 "Babel is composed of two major parts:
591 - tools to build and work with gettext message catalogs
592 - a Python interface to the CLDR (Common Locale Data Repository), providing
593 access to various locale display names, localized number and date formatting,
594 etc. ")
595 (license license:bsd-3)))
596
597 (define-public python2-babel
598 (package-with-python2 python-babel))
599
600 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
601 (define-public python2-babel-2.6
602 (package
603 (inherit python2-babel)
604 (version "2.6.0")
605 (source (origin
606 (method url-fetch)
607 (uri (pypi-uri "Babel" version))
608 (sha256
609 (base32
610 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
611
612 (define-public python2-backport-ssl-match-hostname
613 (package
614 (name "python2-backport-ssl-match-hostname")
615 (version "3.5.0.1")
616 (source
617 (origin
618 (method url-fetch)
619 (uri (pypi-uri "backports.ssl_match_hostname" version))
620 (sha256
621 (base32
622 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
623 (build-system python-build-system)
624 (arguments
625 `(#:python ,python-2
626 #:tests? #f)) ; no test target
627 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
628 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
629 (description
630 "This backport brings the ssl.match_hostname() function to users of
631 earlier versions of Python. The function checks the hostname in the
632 certificate returned by the server to which a connection has been established,
633 and verifies that it matches the intended target hostname.")
634 (license license:psfl)))
635
636 (define-public python-boolean.py
637 (package
638 (name "python-boolean.py")
639 (version "3.6")
640 (source
641 (origin
642 ;; There's no source tarball on PyPI.
643 (method git-fetch)
644 (uri (git-reference
645 (url "https://github.com/bastikr/boolean.py")
646 (commit (string-append "v" version))))
647 (file-name (git-file-name name version))
648 (sha256
649 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
650 (build-system python-build-system)
651 (home-page "https://github.com/bastikr/boolean.py")
652 (synopsis "Boolean algebra in one Python module")
653 (description
654 "This is a small Python library that implements boolean algebra.
655 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
656 @code{Symbol} class that can take on one of these two values. Calculations
657 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
658 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
659 Expressions are constructed from parsed strings or directly in Python.")
660 (license license:bsd-2)))
661
662 (define-public python-hdf4
663 (package
664 (name "python-hdf4")
665 (version "0.9")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri name version))
670 (sha256
671 (base32
672 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
673 (build-system python-build-system)
674 (native-inputs `(("nose" ,python-nose)))
675 (propagated-inputs `(("numpy" ,python-numpy)))
676 (inputs
677 `(("hdf4" ,hdf4)
678 ("libjpeg" ,libjpeg)
679 ("zlib" ,zlib)))
680 (arguments
681 `(#:phases
682 (modify-phases %standard-phases
683 (replace 'check
684 (lambda _
685 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
686 ;; on to import numpy. Somehow this works on their CI system.
687 ;; Let's just manage PYTHONPATH here instead.
688 (substitute* "runexamples.sh"
689 (("export PYTHONPATH=.*") ""))
690 (setenv "PYTHONPATH"
691 (string-append (getcwd) ":"
692 (getenv "PYTHONPATH")))
693 (invoke "./runexamples.sh")
694 (invoke "nosetests" "-v"))))))
695 (home-page "https://github.com/fhs/python-hdf4")
696 (synopsis "Python interface to the NCSA HDF4 library")
697 (description
698 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
699 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
700 NetCDF files can also be read and modified. Python-HDF4 is a fork of
701 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
702 (license license:expat)))
703
704 (define-public python2-hdf4
705 (package-with-python2 python-hdf4))
706
707 (define-public python-h5py
708 (package
709 (name "python-h5py")
710 (version "2.10.0")
711 (source
712 (origin
713 (method url-fetch)
714 (uri (pypi-uri "h5py" version))
715 (sha256
716 (base32
717 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
718 (build-system python-build-system)
719 (arguments
720 `(#:tests? #f ; no test target
721 #:phases
722 (modify-phases %standard-phases
723 (add-after 'unpack 'fix-hdf5-paths
724 (lambda* (#:key inputs #:allow-other-keys)
725 (let ((prefix (assoc-ref inputs "hdf5")))
726 (substitute* "setup_build.py"
727 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
728 (string-append "['" prefix "/lib" "']"))
729 (("'/opt/local/include', '/usr/local/include'")
730 (string-append "'" prefix "/include" "'")))
731 (substitute* "setup_configure.py"
732 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
733 (string-append "['" prefix "/lib" "']")))
734 #t))))))
735 (propagated-inputs
736 `(("python-six" ,python-six)
737 ("python-numpy" ,python-numpy)))
738 (inputs
739 `(("hdf5" ,hdf5-1.10)))
740 (native-inputs
741 `(("python-cython" ,python-cython)
742 ("python-pkgconfig" ,python-pkgconfig)
743 ("pkg-config" ,pkg-config)))
744 (home-page "https://www.h5py.org/")
745 (synopsis "Read and write HDF5 files from Python")
746 (description
747 "The h5py package provides both a high- and low-level interface to the
748 HDF5 library from Python. The low-level interface is intended to be a
749 complete wrapping of the HDF5 API, while the high-level component supports
750 access to HDF5 files, datasets and groups using established Python and NumPy
751 concepts.")
752 (license license:bsd-3)))
753
754 (define-public python2-h5py
755 (package-with-python2 python-h5py))
756
757 (define-public python-sh
758 (package
759 (name "python-sh")
760 (version "1.12.14")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "sh" version))
765 (sha256
766 (base32
767 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
768 (build-system python-build-system)
769 (arguments
770 '(#:phases
771 (modify-phases %standard-phases
772 (replace 'check
773 (lambda _
774 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
775 (setenv "HOME" "/tmp")
776 (invoke "python" "sh.py" "test"))))))
777 (native-inputs
778 `(("python-coverage" ,python-coverage)))
779 (home-page "https://github.com/amoffat/sh")
780 (synopsis "Python subprocess replacement")
781 (description "This package provides a replacement for Python's
782 @code{subprocess} feature.")
783 (license license:expat)))
784
785 (define-public python2-sh
786 (package-with-python2 python-sh))
787
788 (define-public python-cftime
789 (package
790 (name "python-cftime")
791 (version "1.0.4.2")
792 (source
793 (origin
794 (method url-fetch)
795 (uri (pypi-uri "cftime" version))
796 (sha256
797 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
798 (build-system python-build-system)
799 (propagated-inputs
800 `(("python-numpy" ,python-numpy)))
801 (native-inputs
802 `(("python-coveralls" ,python-coveralls)
803 ("python-cython" ,python-cython)
804 ("python-pytest-cov" ,python-pytest-cov)))
805 (home-page "https://github.com/Unidata/cftime")
806 (synopsis "Library for time handling")
807 (description
808 "This package provides time-handling functionality that used to be part
809 of the netcdf4 package before.")
810 ;; This package claims to include code under the GPLv3 but is released
811 ;; under ISC.
812 (license (list license:isc license:gpl3+))))
813
814 (define-public python-netcdf4
815 (package
816 (name "python-netcdf4")
817 (version "1.4.2")
818 (source
819 (origin
820 (method url-fetch)
821 (uri (pypi-uri "netCDF4" version))
822 (sha256
823 (base32
824 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
825 (build-system python-build-system)
826 (arguments
827 '(#:phases
828 (modify-phases %standard-phases
829 (add-after 'unpack 'configure-locations
830 (lambda* (#:key inputs #:allow-other-keys)
831 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
832 #t)))))
833 (native-inputs
834 `(("python-cython" ,python-cython)))
835 (propagated-inputs
836 `(("python-numpy" ,python-numpy)
837 ("python-cftime" ,python-cftime)))
838 (inputs
839 `(("netcdf" ,netcdf)
840 ("hdf4" ,hdf4)
841 ("hdf5" ,hdf5)))
842 (home-page "https://github.com/Unidata/netcdf4-python")
843 (synopsis "Python/numpy interface to the netCDF library")
844 (description "Netcdf4-python is a Python interface to the netCDF C
845 library. netCDF version 4 has many features not found in earlier
846 versions of the library and is implemented on top of HDF5. This module
847 can read and write files in both the new netCDF 4 and the old netCDF 3
848 format, and can create files that are readable by HDF5 clients. The
849 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
850 to users of that module.")
851 ;; The software is mainly ISC, but includes some files covered
852 ;; by the Expat license.
853 (license (list license:isc license:expat))))
854
855 (define-public python2-netcdf4
856 (package-with-python2 python-netcdf4))
857
858 (define-public python-license-expression
859 (package
860 (name "python-license-expression")
861 (version "0.999")
862 (source
863 (origin
864 (method url-fetch)
865 (uri (pypi-uri "license-expression" version))
866 (sha256
867 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
868 (build-system python-build-system)
869 (propagated-inputs
870 `(("python-boolean.py" ,python-boolean.py)))
871 (home-page "https://github.com/nexB/license-expression")
872 (synopsis "Apply boolean logic to license expressions")
873 (description
874 "This Python module defines a tiny language to evaluate and compare
875 license expressions using boolean logic. Logical combinations of licenses can
876 be tested for equality, containment, and equivalence. They can be normalised
877 and simplified. It supports SPDX license expressions as well as other naming
878 conventions and aliases in the same expression.")
879 (license license:gpl2+)))
880
881 (define-public python-lockfile
882 (package
883 (name "python-lockfile")
884 (version "0.12.2")
885 (source
886 (origin
887 (method url-fetch)
888 (uri (pypi-uri "lockfile" version))
889 (sha256
890 (base32
891 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
892 (build-system python-build-system)
893 (arguments '(#:test-target "check"))
894 (native-inputs
895 `(("python-pbr" ,python-pbr)))
896 (home-page "https://launchpad.net/pylockfile")
897 (synopsis "Platform-independent file locking module")
898 (description
899 "The lockfile package exports a LockFile class which provides a simple
900 API for locking files.")
901 (license license:expat)))
902
903 (define-public python2-lockfile
904 (package-with-python2 python-lockfile))
905
906 (define-public python-filelock
907 (package
908 (name "python-filelock")
909 (version "3.0.12")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "filelock" version))
914 (sha256
915 (base32
916 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
917 (build-system python-build-system)
918 (home-page
919 "https://github.com/benediktschmitt/py-filelock")
920 (synopsis "Platform independent file lock")
921 (description "@code{filelock} contains a single module implementing
922 a platform independent file lock in Python, which provides a simple way of
923 inter-process communication.")
924 (license license:unlicense)))
925
926 (define-public python-semantic-version
927 (package
928 (name "python-semantic-version")
929 (version "2.6.0")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "semantic_version" version))
934 (sha256
935 (base32
936 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
937 (build-system python-build-system)
938 (arguments
939 `(#:tests? #f)) ; PyPI tarball lacks tests
940 (home-page "https://github.com/rbarrois/python-semanticversion")
941 (synopsis "Semantic versioning module for Python")
942 (description
943 "The @code{semantic_version} class is a small library for handling
944 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
945
946 It can compare versions, generate a new version that represents a bump in one of
947 the version levels, and check whether any given string is a proper semantic
948 version identifier.")
949 (license license:bsd-3)))
950
951 (define-public python2-semantic-version
952 (package-with-python2 python-semantic-version))
953
954 (define-public python-serpent
955 (package
956 (name "python-serpent")
957 (version "1.28")
958 (source
959 (origin
960 (method url-fetch)
961 (uri (pypi-uri "serpent" version))
962 (sha256
963 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
964 (build-system python-build-system)
965 (native-inputs
966 `(("python-attrs" ,python-attrs)
967 ("python-pytz" ,python-pytz)))
968 (home-page "https://github.com/irmen/Serpent")
969 (synopsis "Serializer for literal Python expressions")
970 (description
971 "Serpent provides @code{ast.literal_eval()}-compatible object tree
972 serialization. It serializes an object tree into bytes (an utf-8 encoded
973 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
974 to rebuild the original object tree.
975
976 Because only safe literals are encoded, it is safe to send serpent data to
977 other machines, such as over the network.")
978 (license license:expat)))
979
980 (define-public python-setuptools
981 (package
982 (name "python-setuptools")
983 (version "41.0.1")
984 (source
985 (origin
986 (method url-fetch)
987 (uri (pypi-uri "setuptools" version ".zip"))
988 (sha256
989 (base32
990 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
991 (modules '((guix build utils)))
992 (snippet
993 '(begin
994 ;; Remove included binaries which are used to build self-extracting
995 ;; installers for Windows.
996 ;; TODO: Find some way to build them ourself so we can include them.
997 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
998 #t))))
999 (build-system python-build-system)
1000 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1001 ;; One could bootstrap with an internal untested setuptools.
1002 (arguments
1003 `(#:tests? #f))
1004 (home-page "https://pypi.org/project/setuptools/")
1005 (synopsis
1006 "Library designed to facilitate packaging Python projects")
1007 (description
1008 "Setuptools is a fully-featured, stable library designed to facilitate
1009 packaging Python projects, where packaging includes:
1010 Python package and module definitions,
1011 distribution package metadata,
1012 test hooks,
1013 project installation,
1014 platform-specific details,
1015 Python 3 support.")
1016 ;; TODO: setuptools now bundles the following libraries:
1017 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1018 (license (list license:psfl ; setuptools itself
1019 license:expat ; six, appdirs, pyparsing
1020 license:asl2.0 ; packaging is dual ASL2/BSD-2
1021 license:bsd-2))))
1022
1023 (define-public python2-setuptools
1024 (package-with-python2 python-setuptools))
1025
1026 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1027 (define-public python-setuptools-for-tensorflow
1028 (hidden-package
1029 (package
1030 (inherit python-setuptools)
1031 (version "39.1.0")
1032 (source (origin
1033 (inherit (package-source python-setuptools))
1034 (uri (pypi-uri "setuptools" version ".zip"))
1035 (sha256
1036 (base32
1037 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1038
1039 (define-public python-uniseg
1040 (package
1041 (name "python-uniseg")
1042 (version "0.7.1")
1043 (source
1044 (origin
1045 (method url-fetch)
1046 (uri (pypi-uri "uniseg" version ".zip"))
1047 (sha256
1048 (base32
1049 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1050 (build-system python-build-system)
1051 (arguments
1052 '(#:tests? #f)) ; The test suite requires network access.
1053 (native-inputs
1054 `(("unzip" ,unzip)))
1055 (home-page
1056 "https://bitbucket.org/emptypage/uniseg-python")
1057 (synopsis
1058 "Python library to determine Unicode text segmentations")
1059 (description
1060 "Uniseg is a Python package used to determine Unicode text segmentations.
1061 Supported segmentations include:
1062 @enumerate
1063 @item @dfn{Code point} (any value in the Unicode codespace)
1064 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1065 multiple Unicode code points, e.g. \"G\" + acute-accent)
1066 @item Word break
1067 @item Sentence break
1068 @item Line break
1069 @end enumerate")
1070 (license license:expat)))
1071
1072 (define-public python2-uniseg
1073 (package-with-python2 python-uniseg))
1074
1075 (define-public python-humanfriendly
1076 (package
1077 (name "python-humanfriendly")
1078 (version "4.4.1")
1079 (source
1080 (origin
1081 (method url-fetch)
1082 (uri (pypi-uri "humanfriendly" version))
1083 (sha256
1084 (base32
1085 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1086 (build-system python-build-system)
1087 (arguments
1088 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1089 #:tests? #f))
1090 (propagated-inputs
1091 `(("python-monotonic" ,python-monotonic)))
1092 (home-page "https://humanfriendly.readthedocs.io")
1093 (synopsis "Human-friendly input and output in Python")
1094 (description
1095 "The functions and classes in @code{humanfriendly} can be used to make
1096 text interfaces more user-friendly. It includes tools to parse and format
1097 numbers, file sizes, and timespans, timers for long-running operations, menus
1098 to allow the user to choose from a list of options, and terminal interaction
1099 helpers.")
1100 (license license:expat)))
1101
1102 (define-public python2-humanfriendly
1103 (package-with-python2 python-humanfriendly))
1104
1105 (define-public python-capturer
1106 (package
1107 (name "python-capturer")
1108 (version "2.4")
1109 (source
1110 (origin
1111 (method url-fetch)
1112 (uri (pypi-uri "capturer" version))
1113 (sha256
1114 (base32
1115 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1116 (build-system python-build-system)
1117 (arguments
1118 `(#:tests? #f))
1119 (propagated-inputs
1120 `(("python-humanfriendly" ,python-humanfriendly)))
1121 (home-page "https://capturer.readthedocs.io")
1122 (synopsis "Capture stdout and stderr streams of the current process")
1123 (description
1124 "The capturer package makes it easy to capture the stdout and stderr
1125 streams of the current process and subprocesses. Output can be relayed
1126 to the terminal in real time but is also available to the Python program
1127 for additional processing.")
1128 (license license:expat)))
1129
1130 (define-public python2-capturer
1131 (package-with-python2 python-capturer))
1132
1133 (define-public python-case
1134 (package
1135 (name "python-case")
1136 (version "1.5.3")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 (uri (pypi-uri "case" version))
1141 (sha256
1142 (base32
1143 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1144 (build-system python-build-system)
1145 (propagated-inputs
1146 `(("python-mock" ,python-mock)
1147 ("python-nose" ,python-nose)
1148 ("python-six" ,python-six)
1149 ("python-unittest2" ,python-unittest2)))
1150 (native-inputs
1151 `(("python-coverage" ,python-coverage)))
1152 (home-page "https://github.com/celery/case")
1153 (synopsis "Unittest utilities and convenience methods")
1154 (description
1155 "The @code{case} package provides utilities on top of unittest, including
1156 some helpful Python 2 compatibility convenience methods.")
1157 (license license:bsd-3)))
1158
1159 (define-public python-verboselogs
1160 (package
1161 (name "python-verboselogs")
1162 (version "1.7")
1163 (source
1164 (origin
1165 (method url-fetch)
1166 (uri (pypi-uri "verboselogs" version))
1167 (sha256
1168 (base32
1169 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1170 (build-system python-build-system)
1171 (arguments
1172 `(#:phases
1173 (modify-phases %standard-phases
1174 (replace 'check
1175 (lambda _
1176 ;; Do not run pylint plugin test, as astroid is an old
1177 ;; unsupported version.
1178 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1179 "verboselogs/tests.py"))))))
1180 (native-inputs
1181 `(("python-mock" ,python-mock)
1182 ("python-pytest" ,python-pytest)))
1183 (home-page "https://verboselogs.readthedocs.io")
1184 (synopsis "Verbose logging level for Python's logging module")
1185 (description
1186 "The @code{verboselogs} package extends Python's @code{logging} module to
1187 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1188 (license license:expat)))
1189
1190 (define-public python2-verboselogs
1191 (package-with-python2 python-verboselogs))
1192
1193 (define-public python-coloredlogs
1194 (package
1195 (name "python-coloredlogs")
1196 (version "10.0")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "coloredlogs" version))
1201 (sha256
1202 (base32
1203 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1204 (build-system python-build-system)
1205 (arguments
1206 `(;Tests require some updated modules
1207 #:tests? #f))
1208 (propagated-inputs
1209 `(("python-capturer" ,python-capturer)))
1210 (home-page "https://coloredlogs.readthedocs.io")
1211 (synopsis "Colored stream handler for Python's logging module")
1212 (description
1213 "The @code{coloredlogs} package enables colored terminal output for
1214 Python's logging module. The @code{ColoredFormatter} class inherits from
1215 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1216 messages in color.")
1217 (license license:expat)))
1218
1219 (define-public python2-coloredlogs
1220 (package-with-python2 python-coloredlogs))
1221
1222 (define-public python-editorconfig
1223 (package
1224 (name "python-editorconfig")
1225 (version "0.12.2")
1226 (source
1227 (origin
1228 (method url-fetch)
1229 (uri (pypi-uri "EditorConfig" version))
1230 (sha256
1231 (base32
1232 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1233 (build-system python-build-system)
1234 (home-page "https://editorconfig.org/")
1235 (synopsis "EditorConfig bindings for python")
1236 (description "The EditorConfig project consists of a file format for
1237 defining coding styles and a collection of text editor plugins that enable
1238 editors to read the file format and adhere to defined styles. EditorConfig
1239 files are easily readable and they work nicely with version control systems.")
1240 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1241 (license (list license:bsd-2 license:psfl))))
1242
1243 (define-public python-et-xmlfile
1244 (package
1245 (name "python-et-xmlfile")
1246 (version "1.0.1")
1247 (source
1248 (origin
1249 (method url-fetch)
1250 (uri (pypi-uri "et_xmlfile" version))
1251 (sha256
1252 (base32
1253 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1254 (build-system python-build-system)
1255 (arguments
1256 `(#:phases (modify-phases %standard-phases
1257 (replace 'check
1258 (lambda _
1259 (invoke "pytest"))))))
1260 (native-inputs
1261 `(("python-pytest" ,python-pytest)
1262 ("python-lxml" ,python-lxml))) ;used for the tests
1263 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1264 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1265 (description "This Python library is based upon the @code{xmlfile} module
1266 from @code{lxml}. It aims to provide a low memory, compatible implementation
1267 of @code{xmlfile}.")
1268 (license license:expat)))
1269
1270 (define-public python2-et-xmlfile
1271 (package-with-python2 python-et-xmlfile))
1272
1273 (define-public python-openpyxl
1274 (package
1275 (name "python-openpyxl")
1276 (version "2.6.2")
1277 (source
1278 (origin
1279 ;; We use the upstream repository, as the tests are not included in the
1280 ;; PyPI releases.
1281 (method hg-fetch)
1282 (uri (hg-reference
1283 (url "https://bitbucket.org/openpyxl/openpyxl")
1284 (changeset version)))
1285 (file-name (string-append name "-" version "-checkout"))
1286 (sha256
1287 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1288 (build-system python-build-system)
1289 (arguments
1290 `(#:phases (modify-phases %standard-phases
1291 (replace 'check
1292 (lambda _
1293 (invoke "pytest"))))))
1294 (native-inputs
1295 ;; For the test suite.
1296 `(("python-lxml" ,python-lxml)
1297 ("python-pillow" ,python-pillow)
1298 ("python-pytest" ,python-pytest)))
1299 (propagated-inputs
1300 `(("python-et-xmlfile" ,python-et-xmlfile)
1301 ("python-jdcal" ,python-jdcal)))
1302 (home-page "https://openpyxl.readthedocs.io")
1303 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1304 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1305 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1306 standard.")
1307 (license license:expat)))
1308
1309 (define-public python-eventlet
1310 (package
1311 (name "python-eventlet")
1312 (version "0.25.1")
1313 (source
1314 (origin
1315 (method url-fetch)
1316 (uri (pypi-uri "eventlet" version))
1317 (sha256
1318 (base32
1319 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1320 (build-system python-build-system)
1321 (propagated-inputs
1322 `(("python-greenlet" ,python-greenlet)))
1323 (arguments
1324 ;; TODO: Requires unpackaged 'enum-compat'.
1325 '(#:tests? #f))
1326 (home-page "https://eventlet.net")
1327 (synopsis "Concurrent networking library for Python")
1328 (description
1329 "Eventlet is a concurrent networking library for Python that
1330 allows you to change how you run your code, not how you write it.
1331 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1332 Coroutines ensure that the developer uses a blocking style of programming
1333 that is similar to threading, but provide the benefits of non-blocking I/O.
1334 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1335 from the Python interpreter, or as a small part of a larger application.")
1336 (license license:expat)))
1337
1338 (define-public python2-eventlet
1339 (let ((base (package-with-python2
1340 (strip-python2-variant python-eventlet))))
1341 (package (inherit base)
1342 (propagated-inputs
1343 `(("python2-enum34" ,python2-enum34)
1344 ,@(package-propagated-inputs base))))))
1345
1346 (define-public python-six
1347 (package
1348 (name "python-six")
1349 (version "1.12.0")
1350 (source
1351 (origin
1352 (method url-fetch)
1353 (uri (pypi-uri "six" version))
1354 (sha256
1355 (base32
1356 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1357 (build-system python-build-system)
1358 (arguments
1359 `(#:phases
1360 (modify-phases %standard-phases
1361 (replace 'check
1362 (lambda _
1363 (invoke "py.test" "-v"))))))
1364 (native-inputs
1365 `(("python-py" ,python-py)
1366 ("python-pytest" ,python-pytest-bootstrap)))
1367 (home-page "https://pypi.org/project/six/")
1368 (synopsis "Python 2 and 3 compatibility utilities")
1369 (description
1370 "Six is a Python 2 and 3 compatibility library. It provides utility
1371 functions for smoothing over the differences between the Python versions with
1372 the goal of writing Python code that is compatible on both Python versions.
1373 Six supports every Python version since 2.5. It is contained in only one
1374 Python file, so it can be easily copied into your project.")
1375 (license license:x11)))
1376
1377 (define-public python2-six
1378 (package-with-python2 python-six))
1379
1380 (define-public python-six-bootstrap
1381 (package
1382 (inherit python-six)
1383 (name "python-six-bootstrap")
1384 (native-inputs `())
1385 (arguments `(#:tests? #f))))
1386
1387 (define-public python2-six-bootstrap
1388 (package-with-python2 python-six-bootstrap))
1389
1390 (define-public python-schedule
1391 (package
1392 (name "python-schedule")
1393 (version "0.4.3")
1394 (source
1395 (origin
1396 (method url-fetch)
1397 (uri (pypi-uri "schedule" version))
1398 (sha256
1399 (base32
1400 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1401 (build-system python-build-system)
1402 (native-inputs
1403 `(("python-pytest" ,python-pytest)
1404 ("python-mock" ,python-mock)))
1405 (home-page "https://github.com/dbader/schedule")
1406 (synopsis "Schedule periodic function calls in Python")
1407 (description
1408 "Schedule is an in-process scheduler for periodic jobs that uses the
1409 builder pattern for configuration. Schedule lets you run Python functions (or
1410 any other callable) periodically at pre-determined intervals using a simple,
1411 human-friendly syntax.")
1412 (license license:expat)))
1413
1414 (define-public python2-schedule
1415 (package-with-python2 python-schedule))
1416
1417 (define-public python2-mechanize
1418 (package
1419 (name "python2-mechanize")
1420 (version "0.2.5")
1421 (source
1422 (origin
1423 (method url-fetch)
1424 (uri (pypi-uri "mechanize" version))
1425 (sha256
1426 (base32
1427 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1428 (build-system python-build-system)
1429 (arguments
1430 `(#:python ,python-2 ; apparently incompatible with Python 3
1431 #:tests? #f))
1432 ;; test fails with message
1433 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1434 ;; (python-3.3.2) or
1435 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1436 ;; (python-2.7.5).
1437 ;; The source code is from March 2011 and probably not up-to-date
1438 ;; with respect to python unit tests.
1439 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1440 (synopsis
1441 "Stateful programmatic web browsing in Python")
1442 (description
1443 "Mechanize implements stateful programmatic web browsing in Python,
1444 after Andy Lester’s Perl module WWW::Mechanize.")
1445 (license (license:non-copyleft
1446 "file://COPYING"
1447 "See COPYING in the distribution."))))
1448
1449
1450 (define-public python-simplejson
1451 (package
1452 (name "python-simplejson")
1453 (version "3.14.0")
1454 (source
1455 (origin
1456 (method url-fetch)
1457 (uri (pypi-uri "simplejson" version))
1458 (sha256
1459 (base32
1460 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1461 (build-system python-build-system)
1462 (home-page "http://simplejson.readthedocs.org/en/latest/")
1463 (synopsis
1464 "Json library for Python")
1465 (description
1466 "JSON (JavaScript Object Notation) is a subset of JavaScript
1467 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1468 format.
1469
1470 Simplejson exposes an API familiar to users of the standard library marshal
1471 and pickle modules. It is the externally maintained version of the json
1472 library contained in Python 2.6, but maintains compatibility with Python 2.5
1473 and (currently) has significant performance advantages, even without using
1474 the optional C extension for speedups. Simplejson is also supported on
1475 Python 3.3+.")
1476 (license license:x11)))
1477
1478 (define-public python2-simplejson
1479 (package-with-python2 python-simplejson))
1480
1481
1482 (define-public python-pyicu
1483 (package
1484 (name "python-pyicu")
1485 (version "2.3.1")
1486 (source
1487 (origin
1488 (method url-fetch)
1489 (uri (pypi-uri "PyICU" version))
1490 (sha256
1491 (base32
1492 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1493 (build-system python-build-system)
1494 (inputs
1495 `(("icu4c" ,icu4c)))
1496 (native-inputs
1497 `(("python-pytest" ,python-pytest)
1498 ("python-six" ,python-six)))
1499 (home-page "https://github.com/ovalhub/pyicu")
1500 (synopsis "Python extension wrapping the ICU C++ API")
1501 (description
1502 "PyICU is a python extension wrapping the ICU C++ API.")
1503 (properties `((python2-variant . ,(delay python2-pyicu))))
1504 (license license:x11)))
1505
1506 (define-public python2-pyicu
1507 (let ((base (package-with-python2
1508 (strip-python2-variant python-pyicu))))
1509 (package
1510 (inherit base)
1511 (arguments
1512 `(,@(package-arguments base)
1513 #:phases
1514 (modify-phases %standard-phases
1515 (add-before 'check 'delete-failing-test
1516 (λ _
1517 ;; XXX: This fails due to Unicode issues unique to Python 2,
1518 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1519 (delete-file "test/test_Script.py")
1520 #t))))))))
1521
1522 (define-public python2-dogtail
1523 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1524 ;; spaces in indentation" with Python 3.
1525 (package
1526 (name "python2-dogtail")
1527 (version "0.9.9")
1528 (source (origin
1529 (method url-fetch)
1530 (uri (pypi-uri "dogtail" version))
1531 (sha256
1532 (base32
1533 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1534 (build-system python-build-system)
1535 (arguments `(#:python ,python-2
1536 #:tests? #f)) ; invalid command "test"
1537 ;; Currently no offical homepage.
1538 (home-page "https://pypi.org/project/dogtail/")
1539 (synopsis "GUI test tool and automation framework written in Python")
1540 (description
1541 "Dogtail is a GUI test tool and automation framework written in Python.
1542 It uses Accessibility (a11y) technologies to communicate with desktop
1543 applications. dogtail scripts are written in Python and executed like any
1544 other Python program.")
1545 (license license:gpl2+)))
1546
1547 (define-public python-empy
1548 (package
1549 (name "python-empy")
1550 (version "3.3.3")
1551 (source (origin
1552 (method url-fetch)
1553 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1554 version ".tar.gz"))
1555 (sha256
1556 (base32
1557 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1558 (build-system python-build-system)
1559 (arguments
1560 `(#:tests? #f)) ; python2 only
1561 (home-page "http://www.alcyone.com/software/empy/")
1562 (synopsis "Templating system for Python")
1563 (description
1564 "EmPy is a system for embedding Python expressions and statements in
1565 template text; it takes an EmPy source file, processes it, and produces
1566 output. This is accomplished via expansions, which are special signals to the
1567 EmPy system and are set off by a special prefix (by default the at sign, @@).
1568 EmPy can expand arbitrary Python expressions and statements in this way, as
1569 well as a variety of special forms. Textual data not explicitly delimited in
1570 this way is sent unaffected to the output, allowing Python to be used in
1571 effect as a markup language. Also supported are callbacks via hooks,
1572 recording and playback via diversions, and dynamic, chainable filters. The
1573 system is highly configurable via command line options and embedded
1574 commands.")
1575 (license license:lgpl2.1+)))
1576
1577 (define-public python2-empy
1578 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1579 (package
1580 (inherit base)
1581 (arguments `(,@(package-arguments base)
1582 #:tests? #t)))))
1583
1584 (define-public python2-element-tree
1585 (package
1586 (name "python2-element-tree")
1587 (version "1.2.6")
1588 (source (origin
1589 (method url-fetch)
1590 (uri (string-append
1591 "http://effbot.org/media/downloads/elementtree-"
1592 version "-20050316.tar.gz"))
1593 (sha256
1594 (base32
1595 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1596 (build-system python-build-system)
1597 (arguments
1598 `(#:python ,python-2 ; seems to be part of Python 3
1599 #:tests? #f)) ; no 'test' sub-command
1600 (synopsis "Toolkit for XML processing in Python")
1601 (description
1602 "ElementTree is a Python library supporting lightweight XML processing.")
1603 (home-page "http://effbot.org/zone/element-index.htm")
1604 (license (license:x11-style
1605 "http://docs.python.org/2/license.html"
1606 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1607
1608 (define-public python2-pybugz
1609 (package
1610 (name "python2-pybugz")
1611 (version "0.6.11")
1612 (source (origin
1613 (method url-fetch)
1614 (uri (string-append
1615 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1616 version ".tar.gz"))
1617 (sha256
1618 (base32
1619 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1620 (patches (search-patches "pybugz-stty.patch"
1621 "pybugz-encode-error.patch"))))
1622 (build-system python-build-system)
1623 (arguments
1624 `(#:python ,python-2 ; SyntaxError with Python 3
1625 #:tests? #f)) ; no 'test' sub-command
1626 (propagated-inputs
1627 `(("element-tree" ,python2-element-tree)))
1628 (synopsis "Python and command-line interface to Bugzilla")
1629 (description
1630 "PyBugz is a Python library and command-line tool to query the Bugzilla
1631 bug tracking system. It is meant as an aid to speed up interaction with the
1632 bug tracker.")
1633 (home-page "http://www.liquidx.net/pybugz/")
1634 (license license:gpl2)))
1635
1636 (define-public python2-enum
1637 (package
1638 (name "python2-enum")
1639 (version "0.4.6")
1640 (source (origin
1641 (method url-fetch)
1642 (uri (pypi-uri "enum" version))
1643 (sha256
1644 (base32
1645 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1646 (build-system python-build-system)
1647 (arguments
1648 `(#:python ,python-2))
1649 (home-page "https://pypi.org/project/enum/")
1650 (synopsis "Robust enumerated type support in Python")
1651 (description
1652 "This provides a module for robust enumerations in Python. It has
1653 been superseded by the Python standard library and is provided only for
1654 compatibility.")
1655 ;; Choice of either license.
1656 (license (list license:gpl3+ license:psfl))))
1657
1658 (define-public python-enum34
1659 (package
1660 (name "python-enum34")
1661 (version "1.1.6")
1662 (source
1663 (origin
1664 (method url-fetch)
1665 (uri (pypi-uri "enum34" version))
1666 (sha256
1667 (base32
1668 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1669 (build-system python-build-system)
1670 (home-page "https://pypi.org/project/enum34/")
1671 (synopsis "Backported Python 3.4 Enum")
1672 (description
1673 "Enum34 is the new Python stdlib enum module available in Python 3.4
1674 backported for previous versions of Python from 2.4 to 3.3.")
1675 (license license:bsd-3)))
1676
1677 (define-public python2-enum34
1678 (package-with-python2 python-enum34))
1679
1680 (define-public python-parse-type
1681 (package
1682 (name "python-parse-type")
1683 (version "0.4.2")
1684 (source
1685 (origin
1686 (method url-fetch)
1687 (uri (pypi-uri "parse_type" version))
1688 (sha256
1689 (base32
1690 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1691 (build-system python-build-system)
1692 (propagated-inputs
1693 `(("python-six" ,python-six)
1694 ("python-parse" ,python-parse)))
1695 (native-inputs
1696 `(("python-pytest" ,python-pytest)
1697 ("python-pytest-runner" ,python-pytest-runner)))
1698 (home-page "https://github.com/jenisys/parse_type")
1699 (synopsis "Extended parse module")
1700 (description
1701 "Parse_type extends the python parse module.")
1702 (properties
1703 `((python2-variant . ,(delay python2-parse-type))))
1704 (license license:bsd-3)))
1705
1706 (define-public python2-parse-type
1707 (let ((base (package-with-python2
1708 (strip-python2-variant python-parse-type))))
1709 (package (inherit base)
1710 (propagated-inputs
1711 `(("python2-enum34" ,python2-enum34)
1712 ,@(package-propagated-inputs base))))))
1713
1714 (define-public python-parse
1715 (package
1716 (name "python-parse")
1717 (version "1.8.4")
1718 (source
1719 (origin
1720 (method url-fetch)
1721 (uri (pypi-uri "parse" version))
1722 (sha256
1723 (base32
1724 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1725 (build-system python-build-system)
1726 (arguments
1727 `(#:phases
1728 (modify-phases %standard-phases
1729 (replace 'check
1730 (lambda _ (invoke "python" "test_parse.py"))))))
1731 (home-page "https://github.com/r1chardj0n3s/parse")
1732 (synopsis "Parse strings")
1733 (description
1734 "Parse strings using a specification based on the Python @code{format()}
1735 syntax.")
1736 (license license:x11)))
1737
1738 (define-public python-polib
1739 (package
1740 (name "python-polib")
1741 (version "1.0.8")
1742 (source (origin
1743 (method url-fetch)
1744 (uri (pypi-uri "polib" version))
1745 (sha256
1746 (base32
1747 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1748 (build-system python-build-system)
1749 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1750 (synopsis "Manipulate, create and modify gettext files")
1751 (description "Polib can manipulate any gettext format (po, pot and mo)
1752 files. It can be used to create po files from scratch or to modify
1753 existing ones.")
1754 (license license:expat)))
1755
1756 (define-public python2-polib
1757 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1758 (package
1759 (inherit base)
1760 (arguments `(,@(package-arguments base)
1761 ;; Tests don't work with python2.
1762 #:tests? #f)))))
1763
1764 (define-public python-poyo
1765 (package
1766 (name "python-poyo")
1767 (version "0.5.0")
1768 (source
1769 (origin
1770 (method url-fetch)
1771 (uri (pypi-uri "poyo" version))
1772 (sha256
1773 (base32
1774 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1775 (build-system python-build-system)
1776 (home-page "https://github.com/hackebrot/poyo")
1777 (synopsis "Lightweight YAML Parser for Python")
1778 (description
1779 "This package provides a lightweight YAML Parser for Python. It supports
1780 only a chosen subset of the YAML format that is required to parse cookiecutter
1781 user configuration files. It does not have support for serializing into YAML
1782 and is not compatible with JSON.")
1783 (license license:expat)))
1784
1785 (define-public scons
1786 (package
1787 (name "scons")
1788 (version "3.0.4")
1789 (source (origin
1790 (method git-fetch)
1791 (uri (git-reference
1792 (url "https://github.com/SCons/scons.git")
1793 (commit version)))
1794 (file-name (git-file-name name version))
1795 (sha256
1796 (base32
1797 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1798 (build-system python-build-system)
1799 (arguments
1800 `(#:use-setuptools? #f ; still relies on distutils
1801 #:tests? #f ; no 'python setup.py test' command
1802 #:phases
1803 (modify-phases %standard-phases
1804 (add-before 'build 'bootstrap
1805 (lambda _
1806 (substitute* "src/engine/SCons/compat/__init__.py"
1807 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1808 "sys.modules[new] = __import__(old)"))
1809 (substitute* "src/engine/SCons/Platform/__init__.py"
1810 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1811 "mod = __import__(full_name)"))
1812 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1813 (chdir "build/scons")
1814 #t)))))
1815 (home-page "https://scons.org/")
1816 (synopsis "Software construction tool written in Python")
1817 (description
1818 "SCons is a software construction tool. Think of SCons as an improved,
1819 cross-platform substitute for the classic Make utility with integrated
1820 functionality similar to autoconf/automake and compiler caches such as ccache.
1821 In short, SCons is an easier, more reliable and faster way to build
1822 software.")
1823 (license license:x11)))
1824
1825 (define-public scons-python2
1826 (package
1827 (inherit (package-with-python2 scons))
1828 (name "scons-python2")))
1829
1830 (define-public python-extras
1831 (package
1832 (name "python-extras")
1833 (version "1.0.0")
1834 (source
1835 (origin
1836 (method url-fetch)
1837 (uri (pypi-uri "extras" version))
1838 (sha256
1839 (base32
1840 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1841 (build-system python-build-system)
1842 (arguments
1843 ;; FIXME: Circular dependency on testtools.
1844 '(#:tests? #f))
1845 (home-page "https://github.com/testing-cabal/extras")
1846 (synopsis "Useful extensions to the Python standard library")
1847 (description
1848 "Extras is a set of extensions to the Python standard library.")
1849 (license license:expat)))
1850
1851 (define-public python2-extras
1852 (package-with-python2 python-extras))
1853
1854 (define-public python-mimeparse
1855 (package
1856 (name "python-mimeparse")
1857 (version "1.6.0")
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (pypi-uri "python-mimeparse" version))
1862 (sha256
1863 (base32
1864 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1865 (build-system python-build-system)
1866 (arguments
1867 '(#:phases
1868 (modify-phases %standard-phases
1869 (replace 'check
1870 (lambda _
1871 (invoke "./mimeparse_test.py"))))))
1872 (home-page
1873 "https://github.com/dbtsai/python-mimeparse")
1874 (synopsis "Python library for parsing MIME types")
1875 (description
1876 "Mimeparse provides basic functions for parsing MIME type names and
1877 matching them against a list of media-ranges.")
1878 (license license:expat)))
1879
1880 (define-public python2-mimeparse
1881 (package-with-python2 python-mimeparse))
1882
1883 (define-public python-miniboa
1884 (package
1885 (name "python-miniboa")
1886 (version "1.0.7")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "miniboa" version))
1891 (sha256
1892 (base32
1893 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1894 (build-system python-build-system)
1895 (home-page "https://github.com/shmup/miniboa")
1896 (synopsis "Simple, single-threaded Telnet server")
1897 (description
1898 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1899 server.")
1900 (license license:asl2.0)))
1901
1902 (define-public python2-miniboa
1903 (package-with-python2 python-miniboa))
1904
1905 (define-public python-pafy
1906 (package
1907 (name "python-pafy")
1908 (version "0.5.3.1")
1909 (source
1910 (origin
1911 (method url-fetch)
1912 (uri (pypi-uri "pafy" version))
1913 (sha256
1914 (base32
1915 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1916 (build-system python-build-system)
1917 (arguments
1918 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1919 (propagated-inputs
1920 ;; Youtube-dl is a python package which is imported in the file
1921 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1922 `(("youtube-dl" ,youtube-dl)))
1923 (home-page "https://np1.github.io/pafy/")
1924 (synopsis "Retrieve YouTube content and metadata")
1925 (description
1926 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1927 (license license:lgpl3+)))
1928
1929 (define-public python2-funcsigs
1930 (package
1931 (name "python2-funcsigs")
1932 (version "1.0.2")
1933 (source (origin
1934 (method url-fetch)
1935 (uri (pypi-uri "funcsigs" version))
1936 (sha256
1937 (base32
1938 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1939 (build-system python-build-system)
1940 (arguments
1941 `(#:python ,python-2))
1942 (native-inputs
1943 `(("python2-unittest2" ,python2-unittest2)))
1944 (home-page "http://funcsigs.readthedocs.org")
1945 (synopsis "Python function signatures from PEP362")
1946 (description
1947 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1948 (license license:asl2.0)))
1949
1950 (define-public python2-funcsigs-bootstrap
1951 (package
1952 (inherit python2-funcsigs)
1953 (name "python2-funcsigs-bootstrap")
1954 (native-inputs `())
1955 (arguments
1956 `(#:tests? #f
1957 ,@(package-arguments python2-funcsigs)))))
1958
1959 (define-public python-py
1960 (package
1961 (name "python-py")
1962 (version "1.8.0")
1963 (source
1964 (origin
1965 (method url-fetch)
1966 (uri (pypi-uri "py" version))
1967 (sha256
1968 (base32
1969 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1970 (build-system python-build-system)
1971 (arguments
1972 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1973 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1974 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1975 ;; Is this module globally installed?"
1976 '(#:tests? #f))
1977 (native-inputs
1978 `(("python-setuptools-scm" ,python-setuptools-scm)))
1979 (home-page "https://github.com/pytest-dev/py")
1980 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1981 (description
1982 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1983 code introspection, and logging.")
1984 (license license:expat)))
1985
1986 (define-public python2-py
1987 (package-with-python2 python-py))
1988
1989 ;; Recent versions of python-fixtures and python-testrepository need
1990 ;; python-pbr for packaging, which itself needs these two packages for
1991 ;; testing.
1992 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1993 ;; same source, just without any test dependencies and with tests disabled.
1994 ;; python-pbr-minmal is then used to package python-fixtures and
1995 ;; python-testrepository.
1996 ;; Strictly speaking we currently could remove the test-requirements from the
1997 ;; normal python-pbr package (and save this package) since test are disabled
1998 ;; there anyway. But this may change in future.
1999 (define-public python-pbr-minimal
2000 (package
2001 (name "python-pbr-minimal")
2002 (version "3.0.1")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 (uri (pypi-uri "pbr" version))
2007 (sha256
2008 (base32
2009 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2010 (build-system python-build-system)
2011 (arguments
2012 `(#:tests? #f))
2013 (home-page "https://docs.openstack.org/pbr/latest/")
2014 (synopsis "Minimal build of python-pbr used for bootstrapping")
2015 (description
2016 "Used only for bootstrapping python2-pbr, you should not need this.")
2017 (license license:asl2.0)))
2018
2019 (define-public python2-pbr-minimal
2020 (package-with-python2 python-pbr-minimal))
2021
2022 (define-public python-pbr
2023 (package
2024 (inherit python-pbr-minimal)
2025 (name "python-pbr")
2026 (arguments
2027 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2028 (propagated-inputs
2029 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2030 (native-inputs
2031 `(("python-fixtures" ,python-fixtures-bootstrap)
2032 ;; discover, coverage, hacking, subunit
2033 ("python-mock" ,python-mock)
2034 ("python-six" ,python-six)
2035 ("python-sphinx" ,python-sphinx)
2036 ("python-testrepository" ,python-testrepository-bootstrap)
2037 ("python-testresources" ,python-testresources-bootstrap)
2038 ("python-testscenarios" ,python-testscenarios-bootstrap)
2039 ("python-testtools" ,python-testtools-bootstrap)
2040 ("python-virtualenv" ,python-virtualenv)))
2041 (synopsis "Enhance the default behavior of Python’s setuptools")
2042 (description
2043 "Python Build Reasonableness (PBR) is a library that injects some useful
2044 and sensible default behaviors into your setuptools run. It will set
2045 versions, process requirements files and generate AUTHORS and ChangeLog file
2046 from git information.
2047 ")))
2048
2049 (define-public python2-pbr
2050 (package-with-python2 python-pbr))
2051
2052 (define-public python-pyrsistent
2053 (package
2054 (name "python-pyrsistent")
2055 (version "0.15.7")
2056 (home-page "https://github.com/tobgu/pyrsistent")
2057 (source (origin
2058 (method url-fetch)
2059 (uri (pypi-uri "pyrsistent" version))
2060 (sha256
2061 (base32
2062 "103j63g6lb5dfspph96zxjdpnq9h991kazd4f09ddgkpxpivbiyd"))))
2063 (build-system python-build-system)
2064 (native-inputs
2065 `(("python-hypothesis" ,python-hypothesis)
2066 ("python-pytest" ,python-pytest)
2067 ("python-pytest-runner" ,python-pytest-runner)))
2068 (propagated-inputs
2069 `(("python-six" ,python-six)))
2070 (synopsis "Persistent data structures for Python")
2071 (description
2072 "Pyrsistent is a number of persistent collections (by some referred to as
2073 functional data structures). Persistent in the sense that they are immutable.
2074
2075 All methods on a data structure that would normally mutate it instead return a
2076 new copy of the structure containing the requested updates. The original
2077 structure is left untouched.")
2078 (license license:expat)))
2079
2080 (define-public python2-pyrsistent
2081 (package-with-python2 python-pyrsistent))
2082
2083 (define-public python-exif-read
2084 (package
2085 (name "python-exif-read")
2086 (version "2.1.2")
2087 (source (origin
2088 (method url-fetch)
2089 (uri (pypi-uri "ExifRead" version))
2090 (sha256
2091 (base32
2092 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2093 (build-system python-build-system)
2094 (arguments `(#:tests? #f)) ; no tests
2095 (home-page "https://github.com/ianare/exif-py")
2096 (synopsis "Python library to extract EXIF data from image files")
2097 (description
2098 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2099 files.")
2100 (license license:bsd-3)))
2101
2102 (define-public python2-exif-read
2103 (package-with-python2 python-exif-read))
2104
2105 (define-public python-pyld
2106 (package
2107 (name "python-pyld")
2108 (version "1.0.5")
2109 (source (origin
2110 (method url-fetch)
2111 (uri (pypi-uri "PyLD" version))
2112 (sha256
2113 (base32
2114 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2115 (build-system python-build-system)
2116 (home-page "https://github.com/digitalbazaar/pyld")
2117 (synopsis "Python implementation of the JSON-LD specification")
2118 (description
2119 "PyLD is an implementation of the JSON-LD specification.")
2120 (license license:bsd-3)))
2121
2122 (define-public python2-pyld
2123 (package-with-python2 python-pyld))
2124
2125 (define-public python-click
2126 (package
2127 (name "python-click")
2128 (version "7.0")
2129 (source
2130 (origin
2131 (method url-fetch)
2132 (uri (pypi-uri "click" version))
2133 (sha256
2134 (base32
2135 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
2136 (build-system python-build-system)
2137 (arguments
2138 `(#:phases
2139 (modify-phases %standard-phases
2140 (add-after 'unpack 'fix-paths
2141 (lambda* (#:key inputs #:allow-other-keys)
2142 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2143 "cross-libc" "libc"))))
2144 (substitute* "click/_unicodefun.py"
2145 (("'locale'")
2146 (string-append "'" glibc "/bin/locale'"))))
2147 #t))
2148 (replace 'check
2149 (lambda _
2150 (invoke "python" "-m" "pytest"))))))
2151 (native-inputs
2152 `(("python-pytest" ,python-pytest)))
2153 (home-page "https://palletsprojects.com/p/click/")
2154 (synopsis "Command line library for Python")
2155 (description
2156 "Click is a Python package for creating command line interfaces in a
2157 composable way with as little code as necessary. Its name stands for
2158 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2159 with sensible defaults out of the box.")
2160 (license license:bsd-3)))
2161
2162 (define-public python2-click
2163 (package-with-python2 python-click))
2164
2165 (define-public python-wheel
2166 (package
2167 (name "python-wheel")
2168 (version "0.33.6")
2169 (source
2170 (origin
2171 (method url-fetch)
2172 (uri (pypi-uri "wheel" version))
2173 (sha256
2174 (base32
2175 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2176 (build-system python-build-system)
2177 (arguments
2178 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2179 ;; fails to find the newly-built bdist_wheel library, even though it is
2180 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2181 '(#:tests? #f))
2182 (home-page "https://bitbucket.org/pypa/wheel/")
2183 (synopsis "Format for built Python packages")
2184 (description
2185 "A wheel is a ZIP-format archive with a specially formatted filename and
2186 the @code{.whl} extension. It is designed to contain all the files for a PEP
2187 376 compatible install in a way that is very close to the on-disk format. Many
2188 packages will be properly installed with only the @code{Unpack} step and the
2189 unpacked archive preserves enough information to @code{Spread} (copy data and
2190 scripts to their final locations) at any later time. Wheel files can be
2191 installed with a newer @code{pip} or with wheel's own command line utility.")
2192 (license license:expat)))
2193
2194 (define-public python2-wheel
2195 (package-with-python2 python-wheel))
2196
2197 (define-public python-vcversioner
2198 (package
2199 (name "python-vcversioner")
2200 (version "2.16.0.0")
2201 (source
2202 (origin
2203 (method url-fetch)
2204 (uri (pypi-uri "vcversioner" version))
2205 (sha256
2206 (base32
2207 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2208 (build-system python-build-system)
2209 (synopsis "Python library for version number discovery")
2210 (description "Vcversioner is a Python library that inspects tagging
2211 information in a variety of version control systems in order to discover
2212 version numbers.")
2213 (home-page "https://github.com/habnabit/vcversioner")
2214 (license license:isc)))
2215
2216 (define-public python2-vcversioner
2217 (package-with-python2 python-vcversioner))
2218
2219 (define-public python-jdcal
2220 (package
2221 (name "python-jdcal")
2222 (version "1.4")
2223 (source
2224 (origin
2225 (method url-fetch)
2226 (uri (pypi-uri "jdcal" version))
2227 (sha256
2228 (base32
2229 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2230 (build-system python-build-system)
2231 (arguments
2232 `(#:phases (modify-phases %standard-phases
2233 (replace 'check
2234 (lambda _
2235 (invoke "pytest"))))))
2236 (native-inputs
2237 `(("python-pytest" ,python-pytest)))
2238 (home-page "https://github.com/phn/jdcal")
2239 (synopsis "Functions to convert between Julian dates Gregorian dates")
2240 (description "This Python library provides functions for converting
2241 between Julian dates and Gregorian dates.")
2242 (license license:bsd-2)))
2243
2244 (define-public python2-jdcal
2245 (package-with-python2 python-jdcal))
2246
2247 (define-public python-jsondiff
2248 (package
2249 (name "python-jsondiff")
2250 (version "1.2.0")
2251 (source
2252 (origin
2253 (method url-fetch)
2254 (uri (pypi-uri "jsondiff" version))
2255 (sha256
2256 (base32
2257 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2258 (build-system python-build-system)
2259 (native-inputs
2260 `(("python-nose" ,python-nose)
2261 ("python-nose-random" ,python-nose-random)))
2262 (home-page
2263 "https://github.com/fzumstein/jsondiff")
2264 (synopsis "Compare JSON and JSON-like structures in Python")
2265 (description "@code{jsondiff} is a Python library which lets you
2266 compare, diff, and patch JSON and JSON-like structures in Python.")
2267 (license license:expat)))
2268
2269 (define-public python-jsonschema
2270 (package
2271 (name "python-jsonschema")
2272 (version "3.0.1")
2273 (source (origin
2274 (method url-fetch)
2275 (uri (pypi-uri "jsonschema" version))
2276 (sha256
2277 (base32
2278 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2279 (build-system python-build-system)
2280 (arguments
2281 '(#:phases
2282 (modify-phases %standard-phases
2283 (replace 'check
2284 (lambda _
2285 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2286 (invoke "trial" "jsonschema"))))))
2287 (native-inputs
2288 `(("python-setuptools_scm" ,python-setuptools-scm)
2289 ("python-twisted" ,python-twisted)))
2290 (propagated-inputs
2291 `(("python-attrs" ,python-attrs)
2292 ("python-pyrsistent" ,python-pyrsistent)
2293 ("python-six" ,python-six)))
2294 (home-page "https://github.com/Julian/jsonschema")
2295 (synopsis "Implementation of JSON Schema for Python")
2296 (description
2297 "Jsonschema is an implementation of JSON Schema for Python.")
2298 (license license:expat)
2299 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2300
2301 (define-public python2-jsonschema
2302 (let ((jsonschema (package-with-python2
2303 (strip-python2-variant python-jsonschema))))
2304 (package (inherit jsonschema)
2305 (propagated-inputs
2306 `(("python2-functools32" ,python2-functools32)
2307 ,@(package-propagated-inputs jsonschema))))))
2308
2309 (define-public python-schema
2310 (package
2311 (name "python-schema")
2312 (version "0.6.6")
2313 (source
2314 (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "schema" version))
2317 (sha256
2318 (base32
2319 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2320 (build-system python-build-system)
2321 (native-inputs
2322 `(("python-pytest" ,python-pytest)))
2323 (home-page "https://github.com/keleshev/schema")
2324 (synopsis "Simple data validation library")
2325 (description
2326 "@code{python-schema} is a library for validating Python data
2327 structures, such as those obtained from config-files, forms, external
2328 services or command-line parsing, converted from JSON/YAML (or
2329 something else) to Python data-types.")
2330 (license license:psfl)))
2331
2332 (define-public python2-schema
2333 (package-with-python2 python-schema))
2334
2335 (define-public python-schema-0.5
2336 (package (inherit python-schema)
2337 (version "0.5.0")
2338 (source
2339 (origin
2340 (method url-fetch)
2341 (uri (pypi-uri "schema" version))
2342 (sha256
2343 (base32
2344 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2345
2346 (define-public python2-schema-0.5
2347 (package-with-python2 python-schema-0.5))
2348
2349 (define-public python-kitchen
2350 (package
2351 (name "python-kitchen")
2352 (version "1.2.5")
2353 (source
2354 (origin
2355 (method url-fetch)
2356 (uri (pypi-uri "kitchen" version))
2357 (sha256
2358 (base32
2359 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2360 (build-system python-build-system)
2361 (propagated-inputs
2362 `(("python-chardet" ,python-chardet)))
2363 (home-page "https://github.com/fedora-infra/kitchen")
2364 (synopsis "Python API for snippets")
2365 (description "@code{kitchen} module provides a python API for all sorts of
2366 little useful snippets of code that everybody ends up writing for their projects
2367 but never seem big enough to build an independent release. Use kitchen and stop
2368 cutting and pasting that code over and over.")
2369 (license (list license:lgpl2.1+
2370 ;; subprocess.py, test_subprocess.py,
2371 ;; kitchen/pycompat25/defaultdict.py:
2372 license:psfl))))
2373
2374 (define-public python2-kitchen
2375 (package-with-python2 python-kitchen))
2376
2377 (define-public python-unidecode
2378 (package
2379 (name "python-unidecode")
2380 (version "1.1.1")
2381 (source (origin
2382 (method url-fetch)
2383 (uri (pypi-uri "Unidecode" version))
2384 (sha256
2385 (base32
2386 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2387 (build-system python-build-system)
2388 (home-page "https://pypi.org/project/Unidecode/")
2389 (synopsis "ASCII transliterations of Unicode text")
2390 (description
2391 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2392 useful when integrating with legacy code that doesn't support Unicode, or for
2393 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2394 machine identifiers from human-readable Unicode strings that should still be
2395 somewhat intelligible.")
2396 (license license:gpl2+)))
2397
2398 (define-public python2-unidecode
2399 (package-with-python2 python-unidecode))
2400
2401 (define-public python-text-unidecode
2402 (package
2403 (name "python-text-unidecode")
2404 (version "1.3")
2405 (source (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "text-unidecode" version))
2408 (sha256
2409 (base32
2410 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2411 (build-system python-build-system)
2412 (arguments
2413 '(#:phases (modify-phases %standard-phases
2414 (replace 'check
2415 (lambda _
2416 (setenv "PYTHONPATH"
2417 (string-append "./build/lib:"
2418 (getenv "PYTHONPATH")))
2419 (invoke "pytest" "-vv"))))))
2420 (native-inputs
2421 `(("python-pytest" ,python-pytest)))
2422 (home-page "https://github.com/kmike/text-unidecode/")
2423 (synopsis "Decode Unicode data")
2424 (description
2425 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2426 Perl library. It can create ASCII representations of Unicode data. In general
2427 users should prefer the @code{python-unidecode} package which offers better
2428 memory usage and transliteration quality.")
2429 ;; The user can choose either license.
2430 (license (list license:clarified-artistic license:gpl2+))))
2431
2432 (define-public python2-text-unidecode
2433 (package-with-python2 python-text-unidecode))
2434
2435 (define-public python-pyjwt
2436 (package
2437 (name "python-pyjwt")
2438 (version "1.7.1")
2439 (source
2440 (origin
2441 (method url-fetch)
2442 (uri (pypi-uri "PyJWT" version))
2443 (sha256
2444 (base32
2445 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2446 (modules '((guix build utils)))
2447 (snippet
2448 '(begin
2449 (for-each delete-file-recursively
2450 (find-files "." "\\.pyc$"))
2451 #t))))
2452 (build-system python-build-system)
2453 (native-inputs
2454 `(("python-pytest" ,python-pytest)
2455 ("python-pytest-cov" ,python-pytest-cov)
2456 ("python-pytest-runner" ,python-pytest-runner)))
2457 (home-page "https://github.com/progrium/pyjwt")
2458 (synopsis "JSON Web Token implementation in Python")
2459 (description
2460 "PyJWT is a JSON Web Token implementation written in Python.")
2461 (license license:expat)))
2462
2463 (define-public python2-pyjwt
2464 (package-with-python2 python-pyjwt))
2465
2466 (define-public python-pykka
2467 (package
2468 (name "python-pykka")
2469 (version "1.2.1")
2470 (source
2471 (origin
2472 (method url-fetch)
2473 (uri (pypi-uri "Pykka" version))
2474 (sha256
2475 (base32
2476 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2477 (build-system python-build-system)
2478 (native-inputs
2479 `(("python-mock" ,python-mock)
2480 ("python-nose" ,python-nose)
2481 ("python-gevent" ,python-gevent)
2482 ("python-eventlet" ,python-eventlet)))
2483 (home-page "https://www.pykka.org/")
2484 (synopsis "Pykka is a Python implementation of the actor model")
2485 (description
2486 "Pykka is a Python implementation of the actor model.
2487 The actor model introduces some simple rules to control the sharing
2488 of state and cooperation between execution units, which makes it
2489 easier to build concurrent applications.")
2490 (license license:asl2.0)))
2491
2492 (define-public python2-pykka
2493 (package-with-python2 python-pykka))
2494
2495 (define-public python-pymsgbox
2496 (package
2497 (name "python-pymsgbox")
2498 (version "1.0.6")
2499 (source
2500 (origin
2501 (method git-fetch)
2502 (uri (git-reference
2503 ;; LICENSE.txt is not present on pypi
2504 (url "https://github.com/asweigart/PyMsgBox")
2505 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2506 (file-name (git-file-name name version))
2507 (sha256
2508 (base32
2509 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2510 (arguments
2511 ;; Circular dependency to run tests:
2512 ;; Tests need pyautogui, which depends on pymsgbox.
2513 '(#:tests? #f))
2514 (build-system python-build-system)
2515 (home-page "https://github.com/asweigart/PyMsgBox")
2516 (synopsis "Python module for JavaScript-like message boxes")
2517 (description
2518 "PyMsgBox is a simple, cross-platform, pure Python module for
2519 JavaScript-like message boxes. Types of dialog boxes include:
2520 @enumerate
2521 @item alert
2522 @item confirm
2523 @item prompt
2524 @item password
2525 @end enumerate
2526 ")
2527 (license license:bsd-3)))
2528
2529 (define-public python-pympler
2530 (package
2531 (name "python-pympler")
2532 (home-page "https://pythonhosted.org/Pympler/")
2533 (version "0.8")
2534 (source (origin
2535 (method url-fetch)
2536 (uri (pypi-uri "Pympler" version))
2537 (sha256
2538 (base32
2539 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2540 (build-system python-build-system)
2541 (arguments
2542 `(#:phases (modify-phases %standard-phases
2543 (delete 'check)
2544 (add-after 'install 'check
2545 (lambda* (#:key inputs outputs #:allow-other-keys)
2546 (add-installed-pythonpath inputs outputs)
2547 (invoke "python" "setup.py" "test"))))))
2548 (synopsis "Measure, monitor and analyze memory behavior")
2549 (description
2550 "Pympler is a development tool to measure, monitor and analyze
2551 the memory behavior of Python objects in a running Python application.
2552
2553 By pympling a Python application, detailed insight in the size and the
2554 lifetime of Python objects can be obtained. Undesirable or unexpected
2555 runtime behavior like memory bloat and other @samp{pymples} can easily
2556 be identified.
2557
2558 A web profiling frontend exposes process statistics, garbage
2559 visualisation and class tracker statistics.")
2560 (license license:asl2.0)))
2561
2562 (define-public python2-pympler
2563 (package-with-python2 python-pympler))
2564
2565 (define-public python-itsdangerous
2566 (package
2567 (name "python-itsdangerous")
2568 (version "1.1.0")
2569 (source
2570 (origin
2571 (method url-fetch)
2572 (uri (pypi-uri "itsdangerous" version))
2573 (sha256
2574 (base32
2575 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2576 (build-system python-build-system)
2577 (home-page "https://palletsprojects.com/p/itsdangerous/")
2578 (synopsis "Python library for passing data to/from untrusted environments")
2579 (description
2580 "Itsdangerous provides various helpers to pass trusted data to untrusted
2581 environments and back.")
2582 (license license:bsd-3)))
2583
2584 (define-public python2-itsdangerous
2585 (package-with-python2 python-itsdangerous))
2586
2587 (define-public python-pyyaml
2588 (package
2589 (name "python-pyyaml")
2590 (version "5.3")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "PyYAML" version))
2595 (sha256
2596 (base32
2597 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
2598 (build-system python-build-system)
2599 (inputs
2600 `(("libyaml" ,libyaml)))
2601 (home-page "https://pyyaml.org")
2602 (synopsis "YAML parser and emitter for Python")
2603 (description
2604 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2605 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2606 API, and sensible error messages. PyYAML supports standard YAML tags and
2607 provides Python-specific tags that allow to represent an arbitrary Python
2608 object.")
2609 (license license:expat)))
2610
2611 (define-public python2-pyyaml
2612 (package-with-python2 python-pyyaml))
2613
2614 (define-public python-vine
2615 (package
2616 (name "python-vine")
2617 (version "1.1.4")
2618 (source
2619 (origin
2620 (method url-fetch)
2621 (uri (pypi-uri "vine" version))
2622 (sha256
2623 (base32
2624 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2625 (build-system python-build-system)
2626 (native-inputs
2627 `(("python-pytest" ,python-pytest)
2628 ("python-case" ,python-case)))
2629 (home-page "https://github.com/celery/vine")
2630 (synopsis "Promises for Python")
2631 (description
2632 "@code{vine} provides a special implementation of promises in that it can
2633 be used both for \"promise of a value\" and lazy evaluation. The biggest
2634 upside for this is that everything in a promise can also be a promise,
2635 e.g. filters, callbacks and errbacks can all be promises.")
2636 (license license:bsd-3)))
2637
2638 (define-public python-virtualenv
2639 (package
2640 (name "python-virtualenv")
2641 (version "20.0.10")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "virtualenv" version))
2646 (sha256
2647 (base32
2648 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
2649 (build-system python-build-system)
2650 (native-inputs
2651 `(("python-mock" ,python-mock)
2652 ("python-pytest" ,python-pytest)
2653 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2654 ;; be an input at all". However, removing the input makes the build error:
2655 ;; File "setup.py", line 4, in <module>
2656 ;; raise RuntimeError("setuptools >= 41 required to build")
2657 ("python-setuptools" ,python-setuptools)
2658 ("python-setuptools-scm" ,python-setuptools-scm)))
2659 (propagated-inputs
2660 `(("python-appdirs" ,python-appdirs)
2661 ("python-distlib" ,python-distlib)
2662 ("python-filelock" ,python-filelock)
2663 ("python-six" ,python-six)
2664 ("python-importlib-metadata" ,python-importlib-metadata)))
2665 (home-page "https://virtualenv.pypa.io/")
2666 (synopsis "Virtual Python environment builder")
2667 (description
2668 "Virtualenv is a tool to create isolated Python environments.")
2669 (properties `((python2-variant . ,(delay python2-virtualenv))))
2670 (license license:expat)))
2671
2672 (define-public python2-virtualenv
2673 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2674 (package
2675 (inherit base)
2676 (arguments
2677 `(#:python ,python-2
2678 #:phases
2679 (modify-phases %standard-phases
2680 (add-after 'set-paths 'adjust-PYTHONPATH
2681 (lambda* (#:key inputs #:allow-other-keys)
2682 (let* ((python (assoc-ref inputs "python"))
2683 (python-sitedir (string-append python "/lib/python2.7"
2684 "/site-packages")))
2685 ;; XXX: 'python2' always comes first on PYTHONPATH
2686 ;; and shadows the 'setuptools' input. Move python2
2687 ;; last: this should be fixed in python-build-system
2688 ;; in a future rebuild cycle.
2689 (setenv "PYTHONPATH"
2690 (string-append (string-join (delete python-sitedir
2691 (string-split
2692 (getenv "PYTHONPATH")
2693 #\:))
2694 ":")
2695 ":" python-sitedir))
2696 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2697 (getenv "PYTHONPATH"))
2698 #t))))))
2699 (propagated-inputs
2700 `(("python-contextlib2" ,python2-contextlib2)
2701 ,@(package-propagated-inputs base))))))
2702
2703 (define-public python-markupsafe
2704 (package
2705 (name "python-markupsafe")
2706 (version "1.1.1")
2707 (source
2708 (origin
2709 (method url-fetch)
2710 (uri (pypi-uri "MarkupSafe" version))
2711 (sha256
2712 (base32
2713 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2714 (build-system python-build-system)
2715 (arguments
2716 `(#:modules ((ice-9 ftw)
2717 (srfi srfi-1)
2718 (srfi srfi-26)
2719 (guix build utils)
2720 (guix build python-build-system))
2721 #:phases (modify-phases %standard-phases
2722 (replace 'check
2723 (lambda _
2724 (let ((cwd (getcwd))
2725 (libdir (find (cut string-prefix? "lib." <>)
2726 (scandir "build"))))
2727 (setenv "PYTHONPATH"
2728 (string-append cwd "/build/" libdir ":"
2729 (getenv "PYTHONPATH")))
2730 (invoke "pytest" "-vv")))))))
2731 (native-inputs
2732 `(("python-pytest" ,python-pytest)))
2733 (home-page "https://github.com/mitsuhiko/markupsafe")
2734 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2735 (description
2736 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2737 for Python.")
2738 (license license:bsd-3)))
2739
2740 (define-public python2-markupsafe
2741 (package-with-python2 python-markupsafe))
2742
2743 (define-public python-jinja2
2744 (package
2745 (name "python-jinja2")
2746 (version "2.11.1")
2747 (source
2748 (origin
2749 (method url-fetch)
2750 (uri (pypi-uri "Jinja2" version))
2751 (sha256
2752 (base32
2753 "0l72c11n959yzb8d3ankckb6yhjhm6x729zm7rkpk040qzxpy64k"))))
2754 (build-system python-build-system)
2755 (arguments
2756 '(#:phases (modify-phases %standard-phases
2757 (replace 'check
2758 (lambda* (#:key tests? #:allow-other-keys)
2759 (if tests?
2760 (begin
2761 (setenv "PYTHONPATH"
2762 (string-append "./build/lib:"
2763 (getenv "PYTHONPATH")))
2764 (invoke "pytest" "-vv"))
2765 (format #t "test suite not run~%"))
2766 #t)))))
2767 (native-inputs
2768 `(("python-pytest" ,python-pytest)))
2769 (propagated-inputs
2770 `(("python-markupsafe" ,python-markupsafe)))
2771 (home-page "http://jinja.pocoo.org/")
2772 (synopsis "Python template engine")
2773 (description
2774 "Jinja2 is a small but fast and easy to use stand-alone template engine
2775 written in pure Python.")
2776 (license license:bsd-3)))
2777
2778 (define-public python2-jinja2
2779 (package-with-python2 python-jinja2))
2780
2781 (define-public python-jinja2-time
2782 (package
2783 (name "python-jinja2-time")
2784 (version "0.2.0")
2785 (source
2786 (origin
2787 (method url-fetch)
2788 (uri (pypi-uri "jinja2-time" version))
2789 (sha256
2790 (base32
2791 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2792 (build-system python-build-system)
2793 (propagated-inputs
2794 `(("python-arrow" ,python-arrow)
2795 ("python-jinja2" ,python-jinja2)))
2796 (home-page
2797 "https://github.com/hackebrot/jinja2-time")
2798 (synopsis "Jinja2 Extension for Dates and Times")
2799 (description
2800 "This package provides an extension for the template engine Jinja2. It
2801 adds a 'now' tag providing a convenient access to the arrow.now() API from
2802 templates. A format string can be provided to control the output.")
2803 (license license:expat)))
2804
2805 (define-public python-pystache
2806 (package
2807 (name "python-pystache")
2808 (version "0.5.4")
2809 (source (origin
2810 (method url-fetch)
2811 (uri (pypi-uri "pystache" version))
2812 (sha256
2813 (base32
2814 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2815 (build-system python-build-system)
2816 (arguments
2817 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2818 (home-page "http://defunkt.io/pystache/")
2819 (synopsis "Python logic-less template engine")
2820 (description
2821 "Pystache is a Python implementation of the framework agnostic,
2822 logic-free templating system Mustache.")
2823 (license license:expat)
2824 (properties `((python2-variant . ,(delay python2-pystache))))))
2825
2826 (define-public python2-pystache
2827 (package (inherit (package-with-python2
2828 (strip-python2-variant python-pystache)))
2829 (arguments
2830 `(#:python ,python-2
2831 #:phases
2832 (modify-phases %standard-phases
2833 (replace 'check
2834 (lambda _
2835 (invoke "python" "test_pystache.py"))))))))
2836
2837 (define-public python-joblib
2838 (package
2839 (name "python-joblib")
2840 (version "0.14.1")
2841 (source (origin
2842 (method url-fetch)
2843 (uri (pypi-uri "joblib" version))
2844 (sha256
2845 (base32
2846 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
2847 (build-system python-build-system)
2848 (arguments
2849 `(#:phases
2850 (modify-phases %standard-phases
2851 (replace 'check
2852 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2853 (native-inputs
2854 `(("python-pytest" ,python-pytest)))
2855 (home-page "https://joblib.readthedocs.io/")
2856 (synopsis "Using Python functions as pipeline jobs")
2857 (description
2858 "Joblib is a set of tools to provide lightweight pipelining in Python.
2859 In particular, joblib offers: transparent disk-caching of the output values
2860 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2861 logging and tracing of the execution.")
2862 (license license:bsd-3)))
2863
2864 (define-public python2-joblib
2865 (package-with-python2 python-joblib))
2866
2867 (define-public python-daemon
2868 (package
2869 (name "python-daemon")
2870 (version "2.2.3")
2871 (source
2872 (origin
2873 (method url-fetch)
2874 (uri (pypi-uri "python-daemon" version))
2875 (sha256
2876 (base32
2877 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2878 (build-system python-build-system)
2879 (arguments
2880 `(#:phases
2881 (modify-phases %standard-phases
2882 (add-before 'check 'disable-tests
2883 (lambda _
2884 ;; FIXME: Determine why test fails
2885 (substitute* "test/test_daemon.py"
2886 (("test_detaches_process_context")
2887 "skip_test_detaches_process_context"))
2888 #t)))))
2889 (propagated-inputs
2890 `(("python-lockfile" ,python-lockfile)))
2891 (native-inputs
2892 `(("python-unittest2" ,python-unittest2)
2893 ("python-testtools" ,python-testtools)
2894 ("python-testscenarios" ,python-testscenarios)
2895 ("python-mock" ,python-mock)
2896 ("python-docutils" ,python-docutils)))
2897 (home-page "https://pagure.io/python-daemon/")
2898 (synopsis "Python library for making a Unix daemon process")
2899 (description "Python-daemon is a library that assists a Python program to
2900 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2901
2902 This library provides a @code{DaemonContext} class that manages the following
2903 important tasks for becoming a daemon process:
2904 @enumerate
2905 @item Detach the process into its own process group.
2906 @item Set process environment appropriate for running inside a chroot.
2907 @item Renounce suid and sgid privileges.
2908 @item Close all open file descriptors.
2909 @item Change the working directory, uid, gid, and umask.
2910 @item Set appropriate signal handlers.
2911 @item Open new file descriptors for stdin, stdout, and stderr.
2912 @item Manage a specified PID lock file.
2913 @item Register cleanup functions for at-exit processing.
2914 @end enumerate")
2915 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2916 (license (list license:asl2.0 license:gpl3+))))
2917
2918 (define-public python-anytree
2919 (package
2920 (name "python-anytree")
2921 (version "2.8.0")
2922 (source (origin
2923 (method url-fetch)
2924 (uri (pypi-uri "anytree" version))
2925 (sha256
2926 (base32
2927 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2928 (build-system python-build-system)
2929 (propagated-inputs
2930 `(("python-six" ,python-six)))
2931 (native-inputs
2932 `(;; For tests.
2933 ("graphviz" ,graphviz) ;for 'dot'
2934 ("python-nose" ,python-nose)))
2935 (home-page "https://github.com/c0fec0de/anytree")
2936 (synopsis "Lightweight tree data library")
2937 (description
2938 "@code{anytree} is a simple, lightweight, and extensible tree data
2939 structure for Python.")
2940 (license license:asl2.0)))
2941
2942 (define-public python-docutils
2943 (package
2944 (name "python-docutils")
2945 (version "0.16")
2946 (source
2947 (origin
2948 (method url-fetch)
2949 (uri (pypi-uri "docutils" version))
2950 (sha256
2951 (base32
2952 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
2953 (build-system python-build-system)
2954 (arguments
2955 '(#:phases (modify-phases %standard-phases
2956 (replace 'check
2957 (lambda* (#:key tests? #:allow-other-keys)
2958 (if tests?
2959 (invoke "python" "test/alltests.py")
2960 (format #t "test suite not run~%"))
2961 #t)))))
2962 (home-page "http://docutils.sourceforge.net/")
2963 (synopsis "Python Documentation Utilities")
2964 (description
2965 "Docutils is a modular system for processing documentation into useful
2966 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2967 reStructuredText.")
2968 ;; Most of the source code is public domain, but some source files are
2969 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2970 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2971
2972 (define-public python2-docutils
2973 (package-with-python2 python-docutils))
2974
2975 ;; python2-sphinx fails its test suite with newer versions.
2976 (define-public python2-docutils-0.14
2977 (package
2978 (inherit python2-docutils)
2979 (version "0.14")
2980 (source (origin
2981 (method url-fetch)
2982 (uri (pypi-uri "docutils" version))
2983 (sha256
2984 (base32
2985 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
2986
2987 (define-public python-pygments
2988 (package
2989 (name "python-pygments")
2990 (version "2.5.2")
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (pypi-uri "Pygments" version))
2995 (sha256
2996 (base32
2997 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
2998 (build-system python-build-system)
2999 (arguments
3000 ;; FIXME: Tests require sphinx, which depends on this.
3001 '(#:tests? #f))
3002 (home-page "https://pygments.org/")
3003 (synopsis "Syntax highlighting")
3004 (description
3005 "Pygments is a syntax highlighting package written in Python.")
3006 (license license:bsd-2)))
3007
3008 (define-public python2-pygments
3009 (package-with-python2 python-pygments))
3010
3011 (define-public python-bumpversion
3012 (package
3013 (name "python-bumpversion")
3014 (version "0.5.3")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "bumpversion" version))
3019 (sha256
3020 (base32
3021 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3022 (build-system python-build-system)
3023 (home-page "https://github.com/peritus/bumpversion")
3024 (synopsis "Tool to bump software version")
3025 (description "This tool provides a command-line interface (CLI) to bump a
3026 software version simply.")
3027 (license license:expat)))
3028
3029 (define-public python-deprecated
3030 (package
3031 (name "python-deprecated")
3032 (version "1.2.5")
3033 (source
3034 (origin
3035 (method git-fetch)
3036 (uri (git-reference
3037 (url "https://github.com/tantale/deprecated.git")
3038 (commit (string-append "v" version))))
3039 (file-name (git-file-name name version))
3040 (sha256
3041 (base32
3042 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3043 (build-system python-build-system)
3044 (arguments
3045 `(#:phases (modify-phases %standard-phases
3046 (replace 'check
3047 (lambda _
3048 (invoke "pytest"))))))
3049 (propagated-inputs
3050 `(("python-wrapt" ,python-wrapt)))
3051 (native-inputs
3052 `(("python-bumpversion" ,python-bumpversion)
3053 ("python-pytest" ,python-pytest)
3054 ("python-pytest-cov" ,python-pytest-cov)
3055 ("python-sphinx" ,python-sphinx)
3056 ("python-tox" ,python-tox)))
3057 (home-page "https://github.com/tantale/deprecated")
3058 (synopsis "Python decorator to deprecate classes, functions or methods")
3059 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3060 to deprecate classes, functions or methods.")
3061 (license license:expat)))
3062
3063 (define-public python-pygithub
3064 (package
3065 (name "python-pygithub")
3066 (version "1.43.8")
3067 (source
3068 ;; We fetch from the Git repo because there are no tests in the PyPI
3069 ;; archive.
3070 (origin
3071 (method git-fetch)
3072 (uri (git-reference
3073 (url "https://github.com/PyGithub/PyGithub.git")
3074 (commit (string-append "v" version))))
3075 (file-name (git-file-name name version))
3076 (sha256
3077 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3078 (build-system python-build-system)
3079 (arguments
3080 `(#:phases (modify-phases %standard-phases
3081 ;; Some tests rely on the network.
3082 (add-after 'unpack 'disable-failing-tests
3083 (lambda _
3084 (substitute* "tests/Issue142.py"
3085 (("testDecodeJson") "disabled_testDecodeJson"))
3086 #t))
3087 (add-before 'check 'prepare-for-tests
3088 (lambda _
3089 (for-each (lambda (f)
3090 (chmod f #o666))
3091 (find-files "./tests"))
3092 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3093 (setenv "PYTHONPATH"
3094 (string-append "./tests:" (getenv "PYTHONPATH")))
3095 #t)))))
3096 (propagated-inputs
3097 `(("python-deprecated" ,python-deprecated)
3098 ("python-pyjwt" ,python-pyjwt)
3099 ("python-requests" ,python-requests)))
3100 (native-inputs `(("python-httpretty" ,python-httpretty)))
3101 (home-page "https://pygithub.readthedocs.io/en/latest/")
3102 (synopsis "Python library for the GitHub API")
3103 (description "This library allows managing GitHub resources such as
3104 repositories, user profiles, and organizations in your Python applications,
3105 using version 3 of the GitHub application programming interface (API).")
3106 (license license:lgpl3+)))
3107
3108 (define-public python-rellu
3109 (package
3110 (name "python-rellu")
3111 (version "0.7")
3112 (source
3113 (origin
3114 (method url-fetch)
3115 (uri (pypi-uri "rellu" version))
3116 (sha256
3117 (base32
3118 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3119 (build-system python-build-system)
3120 (propagated-inputs
3121 `(("python-invoke" ,python-invoke)
3122 ("python-pygithub" ,python-pygithub)))
3123 (home-page "https://github.com/robotframework/rellu")
3124 (synopsis "Utilities to create PyPI releases")
3125 (description "This collection of utilities contains tooling and templates
3126 to assist in creating releases on GitHub and publishing them on PyPI. It is
3127 designed to be used by Robot Framework and tools and libraries in its
3128 ecosystem, but can naturally be used also by other projects.")
3129 (license license:asl2.0)))
3130
3131 (define-public python-robotframework
3132 (package
3133 (name "python-robotframework")
3134 (version "3.1.2")
3135 ;; There are no tests in the PyPI archive.
3136 (source
3137 (origin
3138 (method git-fetch)
3139 (uri (git-reference
3140 (url "https://github.com/robotframework/robotframework.git")
3141 (commit (string-append "v" version))))
3142 (file-name (git-file-name name version))
3143 (sha256
3144 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
3145 (patches (search-patches
3146 "python-robotframework-honor-source-date-epoch.patch"))))
3147 (build-system python-build-system)
3148 (arguments
3149 `(#:phases (modify-phases %standard-phases
3150 (add-before 'build 'build-and-install-doc
3151 (lambda* (#:key outputs #:allow-other-keys)
3152 (let* ((doc-output (assoc-ref outputs "doc"))
3153 (doc (string-append doc-output "/share/"
3154 ,name "-" ,version "/")))
3155 (invoke "invoke" "library-docs" "all")
3156 (mkdir-p doc)
3157 (copy-recursively "doc/libraries"
3158 (string-append doc "/libraries"))
3159 #t)))
3160 (replace 'check
3161 (lambda _
3162 (invoke "python" "utest/run.py"))))))
3163 (native-inputs
3164 `(("python-invoke" ,python-invoke)
3165 ("python-rellu" ,python-rellu)
3166 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3167 (outputs '("out" "doc"))
3168 (home-page "https://robotframework.org")
3169 (synopsis "Generic automation framework")
3170 (description "Robot Framework is a generic automation framework for
3171 acceptance testing, acceptance test driven development (ATDD), and robotic
3172 process automation (RPA).")
3173 (license license:asl2.0)))
3174
3175 (define-public python-robotframework-lint
3176 ;; There is no properly tagged release; the commit below seems to correspond
3177 ;; to the 0.9 stable release available from PyPI. The tests are not
3178 ;; included in the PyPI archive, so we fetch the sources from the upstream
3179 ;; Git repo.
3180 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3181 (revision "1"))
3182 (package
3183 (name "python-robotframework-lint")
3184 (version (git-version "0.9.0" revision commit))
3185 (source
3186 (origin
3187 (method git-fetch)
3188 (uri (git-reference
3189 (url "https://github.com/boakley/robotframework-lint.git")
3190 (commit commit)))
3191 (file-name (git-file-name name version))
3192 (sha256
3193 (base32
3194 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3195 (build-system python-build-system)
3196 (arguments
3197 `(#:phases
3198 (modify-phases %standard-phases
3199 (replace 'check
3200 (lambda _
3201 (invoke "python" "-m" "robot" "-A"
3202 "tests/conf/default.args" "tests"))))))
3203 (propagated-inputs
3204 `(("python-robotframework" ,python-robotframework)))
3205 (home-page "https://github.com/boakley/robotframework-lint/")
3206 (synopsis "Static analysis tool (linter) for Robot Framework")
3207 (description "This package provides the @code{rflint} command-line
3208 utility, a static analysis tool (linter) for Robot Framework source files.")
3209 (license license:asl2.0))))
3210
3211 (define-public python-robotframework-sshlibrary
3212 (package
3213 (name "python-robotframework-sshlibrary")
3214 (version "3.3.0")
3215 ;; There are no tests in the PyPI archive.
3216 (source
3217 (origin
3218 (method git-fetch)
3219 (uri (git-reference
3220 (url "https://github.com/robotframework/SSHLibrary.git")
3221 (commit (string-append "v" version))))
3222 (file-name (git-file-name name version))
3223 (sha256
3224 (base32
3225 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3226 (build-system python-build-system)
3227 (arguments
3228 `(#:phases
3229 (modify-phases %standard-phases
3230 (add-before 'build 'build-and-install-doc
3231 (lambda* (#:key outputs #:allow-other-keys)
3232 (let* ((doc-output (assoc-ref outputs "doc"))
3233 (doc (string-append doc-output "/share/"
3234 ,name "-" ,version "/")))
3235 (invoke "chmod" "-R" "+w" "docs")
3236 (invoke "invoke" "kw-docs" "project-docs")
3237 (mkdir-p doc)
3238 (for-each delete-file (find-files "docs" "\\.rst"))
3239 (copy-recursively "docs" doc)
3240 #t)))
3241 (replace 'check
3242 (lambda _
3243 ;; Some tests require an SSH server; we remove them.
3244 (delete-file "utest/test_client_api.py")
3245 (delete-file "utest/test_scp.py")
3246 (invoke "python" "utest/run.py"))))))
3247 (propagated-inputs
3248 `(("python-robotframework" ,python-robotframework)
3249 ("python-paramiko" ,python-paramiko)
3250 ("python-scp" ,python-scp)))
3251 (native-inputs
3252 `(("openssh" ,openssh)
3253 ("which" ,which)
3254 ;; To generate the documentation
3255 ("python-docutils" ,python-docutils)
3256 ("python-invoke" ,python-invoke)
3257 ("python-pygments" ,python-pygments)
3258 ("python-rellu" ,python-rellu)))
3259 (outputs '("out" "doc"))
3260 (home-page "https://github.com/robotframework/SSHLibrary")
3261 (synopsis "Robot Framework library for SSH and SFTP")
3262 (description "SSHLibrary is a Robot Framework library providing support
3263 for SSH and SFTP. It has the following main usages:
3264 @itemize @bullet
3265 @item Executing commands on the remote machine, either blocking or non-blocking.
3266 @item Writing and reading in an interactive shell.
3267 @item Transferring files and directories over SFTP.
3268 @item Ensuring that files and directories exist on the remote machine.
3269 @end itemize")
3270 (license license:asl2.0)))
3271
3272 (define-public python-rstr
3273 (package
3274 (name "python-rstr")
3275 (version "2.2.6")
3276 (source
3277 (origin
3278 (method url-fetch)
3279 (uri (pypi-uri "rstr" version))
3280 (sha256
3281 (base32
3282 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3283 (build-system python-build-system)
3284 (home-page
3285 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3286 (synopsis "Generate random strings in Python")
3287 (description "This package provides a python module for generating
3288 random strings of various types. It could be useful for fuzz testing,
3289 generating dummy data, or other applications. It has no dependencies
3290 outside the standard library.")
3291 (license license:bsd-3)))
3292
3293 (define-public python-scp
3294 (package
3295 (name "python-scp")
3296 (version "0.13.2")
3297 (source
3298 (origin
3299 (method url-fetch)
3300 (uri (pypi-uri "scp" version))
3301 (sha256
3302 (base32
3303 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3304 (build-system python-build-system)
3305 (arguments
3306 '(#:tests? #f)) ;tests require an SSH server
3307 (propagated-inputs
3308 `(("python-paramiko" ,python-paramiko)))
3309 (home-page "https://github.com/jbardin/scp.py")
3310 (synopsis "SCP protocol module for Python and Paramiko")
3311 (description "The scp module extends the Paramiko library to send and
3312 receive files via the SCP1 protocol, as implemented by the OpenSSH
3313 @command{scp} program.")
3314 (license license:gpl2+)))
3315
3316 (define-public python-rst.linker
3317 (package
3318 (name "python-rst.linker")
3319 (version "1.11")
3320 (source
3321 (origin
3322 (method url-fetch)
3323 (uri (pypi-uri "rst.linker" version))
3324 (sha256
3325 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3326 (build-system python-build-system)
3327 (propagated-inputs
3328 `(("python-dateutil" ,python-dateutil)
3329 ("python-six" ,python-six)))
3330 (native-inputs
3331 `(("python-setuptools-scm" ,python-setuptools-scm)))
3332 ;; Test would require path.py, which would introduce a cyclic dependence.
3333 (arguments `(#:tests? #f))
3334 ;; Note: As of version 1.7 the documentation is not worth building.
3335 (home-page "https://github.com/jaraco/rst.linker")
3336 (synopsis "Sphinx plugin to add links and timestamps")
3337 (description "rst.linker allows to automatically replace text by a
3338 reStructuredText external reference or timestamps. It's primary purpose is to
3339 augment the changelog, but it can be used for other documents, too.")
3340 (license license:expat)))
3341
3342 (define-public python2-rst.linker
3343 (package-with-python2 python-rst.linker))
3344
3345 (define-public python-feedgenerator
3346 (package
3347 (name "python-feedgenerator")
3348 (version "1.9")
3349 (source
3350 (origin
3351 (method url-fetch)
3352 (uri (pypi-uri "feedgenerator" version))
3353 (sha256
3354 (base32
3355 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3356 (modules '((guix build utils)))
3357 (snippet
3358 '(begin
3359 ;; Remove pre-compiled .pyc files from source.
3360 (for-each delete-file-recursively
3361 (find-files "." "__pycache__" #:directories? #t))
3362 (for-each delete-file (find-files "." "\\.pyc$"))
3363 #t))))
3364 (build-system python-build-system)
3365 (propagated-inputs
3366 `(("python-pytz" ,python-pytz)
3367 ("python-six" ,python-six)))
3368 (home-page "https://github.com/getpelican/feedgenerator")
3369 (synopsis
3370 "Standalone version of Django's Atom/RSS feed generator")
3371 (description
3372 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3373 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3374 (license license:bsd-3)))
3375
3376 (define-public python2-feedgenerator
3377 (package-with-python2 python-feedgenerator))
3378
3379 (define-public python-toml
3380 (package
3381 (name "python-toml")
3382 (version "0.9.4")
3383 (source
3384 (origin
3385 (method url-fetch)
3386 (uri (pypi-uri "toml" version))
3387 (sha256
3388 (base32
3389 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3390 (build-system python-build-system)
3391 (arguments
3392 `(#:tests? #f)) ;no tests suite in release
3393 (home-page "https://github.com/uiri/toml")
3394 (synopsis "Library for TOML")
3395 (description
3396 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3397 Language (TOML) configuration files.")
3398 (license license:expat)))
3399
3400 (define-public python-jsonrpc-server
3401 (package
3402 (name "python-jsonrpc-server")
3403 (version "0.3.2")
3404 (source
3405 (origin
3406 (method url-fetch)
3407 (uri (pypi-uri "python-jsonrpc-server" version))
3408 (sha256
3409 (base32
3410 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3411 (build-system python-build-system)
3412 (propagated-inputs
3413 `(("python-future" ,python-future)
3414 ("python-mock" ,python-mock)
3415 ("python-pytest" ,python-pytest)
3416 ("python-ujson" ,python-ujson)))
3417 (home-page
3418 "https://github.com/palantir/python-jsonrpc-server")
3419 (synopsis "JSON RPC 2.0 server library")
3420 (description
3421 "This package provides a JSON RPC 2.0 server library for Python.")
3422 (license license:expat)))
3423
3424 (define-public python-pydocstyle
3425 (package
3426 (name "python-pydocstyle")
3427 (version "3.0.0")
3428 (source
3429 (origin
3430 (method url-fetch)
3431 (uri (pypi-uri "pydocstyle" version))
3432 (sha256
3433 (base32
3434 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3435 (build-system python-build-system)
3436 (propagated-inputs
3437 `(("python-six" ,python-six)
3438 ("python-snowballstemmer" ,python-snowballstemmer)))
3439 (home-page
3440 "https://github.com/PyCQA/pydocstyle/")
3441 (synopsis "Python docstring style checker")
3442 (description
3443 "This package provides a style checker for the Python Language
3444 Server (PLS).")
3445 (license license:expat)))
3446
3447 (define-public python-language-server
3448 (package
3449 (name "python-language-server")
3450 (version "0.31.7")
3451 (source
3452 (origin
3453 (method url-fetch)
3454 (uri (pypi-uri "python-language-server" version))
3455 (sha256
3456 (base32
3457 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
3458 (build-system python-build-system)
3459 (propagated-inputs
3460 `(("python-pluggy" ,python-pluggy)
3461 ("python-jsonrpc-server" ,python-jsonrpc-server)
3462 ("python-jedi" ,python-jedi)
3463 ("python-yapf" ,python-yapf)
3464 ("python-pyflakes" ,python-pyflakes)
3465 ("python-pydocstyle" ,python-pydocstyle)
3466 ("python-pycodestyle" ,python-pycodestyle)
3467 ("python-mccabe" ,python-mccabe)
3468 ("python-rope" ,python-rope)
3469 ("python-autopep8" ,python-autopep8)
3470 ("python-flake8" ,python-flake8)
3471 ("python-pylint" ,python-pylint)))
3472 (home-page "https://github.com/palantir/python-language-server")
3473 (synopsis "Python implementation of the Language Server Protocol")
3474 (description
3475 "The Python Language Server (pyls) is an implementation of the Python 3
3476 language specification for the Language Server Protocol (LSP). This tool is
3477 used in text editing environments to provide a complete and integrated
3478 feature-set for programming Python effectively.")
3479 (license license:expat)))
3480
3481 (define-public python-pathspec
3482 (package
3483 (name "python-pathspec")
3484 (version "0.7.0")
3485 (source
3486 (origin
3487 (method url-fetch)
3488 (uri (pypi-uri "pathspec" version))
3489 (sha256
3490 (base32
3491 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3492 (build-system python-build-system)
3493 (home-page "https://github.com/cpburnz/python-path-specification")
3494 (synopsis "Utility library for gitignore style pattern matching of file paths")
3495 (description
3496 "This package provides a utility library for gitignore style pattern
3497 matching of file paths.")
3498 (license license:mpl2.0)))
3499
3500 (define-public python-black
3501 (package
3502 (name "python-black")
3503 (version "19.10b0")
3504 (source
3505 (origin
3506 (method url-fetch)
3507 (uri (pypi-uri "black" version))
3508 (sha256
3509 (base32
3510 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
3511 (build-system python-build-system)
3512 (arguments
3513 `(#:phases
3514 (modify-phases %standard-phases
3515 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3516 (lambda _
3517 (let ((python3 (which "python3")))
3518 (substitute* '("tests/data/fmtonoff.py"
3519 "tests/data/string_prefixes.py"
3520 "tests/data/function.py"
3521 "tests/data/python37.py")
3522 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3523 (string-append "#!" python3 (if (string? minor-version)
3524 minor-version
3525 "")))))
3526 #t))
3527 (add-after 'unpack 'disable-broken-tests
3528 (lambda _
3529 ;; These tests are supposed to be skipped when the blackd
3530 ;; dependencies are missing, but this doesn't quite work.
3531 (substitute* "tests/test_black.py"
3532 (("( *)class BlackDTestCase.*" match indent)
3533 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3534 indent "class BlackDTestCase(unittest.TestCase):\n"))
3535 (("web.Application") "False")
3536 (("@unittest_run_loop") ""))
3537
3538 ;; Patching the above file breaks the self test
3539 (substitute* "tests/test_black.py"
3540 (("( *)def test_self" match indent)
3541 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3542 #t)))))
3543 (propagated-inputs
3544 `(("python-click" ,python-click)
3545 ("python-attrs" ,python-attrs)
3546 ("python-appdirs" ,python-appdirs)
3547 ("python-pathspec" ,python-pathspec)
3548 ("python-regex" ,python-regex)
3549 ("python-toml" ,python-toml)
3550 ("python-typed-ast" ,python-typed-ast)))
3551 (native-inputs
3552 `(("python-setuptools-scm" ,python-setuptools-scm)))
3553 (home-page "https://github.com/ambv/black")
3554 (synopsis "The uncompromising code formatter")
3555 (description "Black is the uncompromising Python code formatter.")
3556 (license license:expat)))
3557
3558 (define-public python-blinker
3559 (package
3560 (name "python-blinker")
3561 (version "1.4")
3562 (source
3563 (origin
3564 (method url-fetch)
3565 (uri (pypi-uri "blinker" version))
3566 (sha256
3567 (base32
3568 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3569 (build-system python-build-system)
3570 (home-page "https://pythonhosted.org/blinker/")
3571 (synopsis "Fast, simple object-to-object and broadcast signaling")
3572 (description
3573 "Blinker provides a fast dispatching system that allows any number of
3574 interested parties to subscribe to events, or \"signals\".")
3575 (license license:expat)))
3576
3577 (define-public python2-blinker
3578 (package-with-python2 python-blinker))
3579
3580 (define-public pelican
3581 (package
3582 (name "pelican")
3583 (version "4.2.0")
3584 (source
3585 (origin
3586 (method url-fetch)
3587 (uri (pypi-uri "pelican" version))
3588 (sha256
3589 (base32
3590 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3591 (build-system python-build-system)
3592 (propagated-inputs
3593 `(("python-blinker" ,python-blinker)
3594 ("python-dateutil" ,python-dateutil)
3595 ("python-docutils" ,python-docutils)
3596 ("python-feedgenerator" ,python-feedgenerator)
3597 ("python-jinja2" ,python-jinja2)
3598 ("python-markdown" ,python-markdown)
3599 ("python-pygments" ,python-pygments)
3600 ("python-pytz" ,python-pytz)
3601 ("python-six" ,python-six)
3602 ("python-unidecode" ,python-unidecode)))
3603 (home-page "https://getpelican.com/")
3604 (arguments
3605 `(;; XXX Requires a lot more packages to do unit tests :P
3606 #:tests? #f))
3607 (synopsis "Python-based static site publishing system")
3608 (description
3609 "Pelican is a tool to generate a static blog from reStructuredText,
3610 Markdown input files, and more. Pelican uses Jinja2 for templating
3611 and is very extensible.")
3612 (license license:agpl3+)))
3613
3614 (define-public mallard-ducktype
3615 (package
3616 (name "mallard-ducktype")
3617 (version "1.0.2")
3618 (source
3619 (origin
3620 (method git-fetch)
3621 ;; git-reference because tests are not included in pypi source tarball
3622 ;; https://issues.guix.gnu.org/issue/36755#2
3623 (uri (git-reference
3624 (url "https://github.com/projectmallard/mallard-ducktype.git")
3625 (commit version)))
3626 (file-name (git-file-name name version))
3627 (sha256
3628 (base32
3629 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3630 (build-system python-build-system)
3631 (arguments
3632 '(#:phases
3633 (modify-phases %standard-phases
3634 (replace 'check
3635 (lambda _
3636 (with-directory-excursion "tests"
3637 (invoke "sh" "runtests")))))))
3638 (home-page "http://projectmallard.org")
3639 (synopsis "Convert Ducktype to Mallard documentation markup")
3640 (description
3641 "Ducktype is a lightweight syntax that can represent all the semantics
3642 of the Mallard XML documentation system. Ducktype files can be converted to
3643 Mallard using the @command{ducktype} tool. The yelp-tools package
3644 provides additional functionality on the produced Mallard documents.")
3645 (license license:expat)))
3646
3647 (define-public python-cython
3648 (package
3649 (name "python-cython")
3650 (version "0.29.15")
3651 (source
3652 (origin
3653 (method url-fetch)
3654 (uri (pypi-uri "Cython" version))
3655 (sha256
3656 (base32
3657 "0c5cjyxfvba6c0vih1fvhywp8bpz30vwvbjqdm1q1k55xzhmkn30"))))
3658 (build-system python-build-system)
3659 ;; we need the full python package and not just the python-wrapper
3660 ;; because we need libpython3.3m.so
3661 (inputs
3662 `(("python" ,python)))
3663 (arguments
3664 `(#:phases
3665 (modify-phases %standard-phases
3666 (add-before 'check 'set-HOME
3667 ;; some tests require access to "$HOME/.cython"
3668 (lambda _ (setenv "HOME" "/tmp") #t))
3669 (replace 'check
3670 (lambda _
3671 ;; Disable compiler optimizations to greatly reduce the running
3672 ;; time of the test suite.
3673 (setenv "CFLAGS" "-O0")
3674
3675 (invoke "python" "runtests.py" "-vv"
3676 "-j" (number->string (parallel-job-count))))))))
3677 (home-page "https://cython.org/")
3678 (synopsis "C extensions for Python")
3679 (description "Cython is an optimising static compiler for both the Python
3680 programming language and the extended Cython programming language. It makes
3681 writing C extensions for Python as easy as Python itself.")
3682 (license license:asl2.0)
3683 (properties `((python2-variant . ,(delay python2-cython))))))
3684
3685 (define-public python2-cython
3686 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3687 (package
3688 (inherit base)
3689 (name "python2-cython")
3690 (inputs
3691 `(("python-2" ,python-2))) ;this is not automatically changed
3692 (arguments
3693 (substitute-keyword-arguments (package-arguments base)
3694 ((#:phases phases)
3695 `(modify-phases ,phases
3696 ;; XXX: On i686-linux, running the parallel tests fails on many-core
3697 ;; systems, see <https://github.com/cython/cython/issues/2807>.
3698 ;; TODO: Move this logic to the regular check phase in a future
3699 ;; rebuild cycle.
3700 ,@(if (string-prefix? "i686" (%current-system))
3701 '((replace 'check
3702 (lambda _
3703 (setenv "CFLAGS" "-O0")
3704 (invoke "python" "runtests.py" "-vv"
3705 "-j" (number->string (parallel-job-count))
3706 "-x" "run.parallel"))))
3707 '())
3708 (add-before 'check 'adjust-test_embed
3709 (lambda _
3710 (substitute* "runtests.py"
3711 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3712 ;; so it can give the right -L flag to GCC when embedding static
3713 ;; builds of Python. It is unaware that the Python "config"
3714 ;; directory (where the static library lives) was renamed in
3715 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3716 ;; which works fine, because that is where the shared library is.
3717 ;;
3718 ;; It also appears to be unaware that the Makefile in Demos/embed
3719 ;; already unconditionally pass the static library location to GCC,
3720 ;; after checking sysconfig.get_config_var('LIBPL).
3721 ;;
3722 ;; The effect is that the linker is unable to resolve libexpat
3723 ;; symbols when building for Python 2, because neither the Python 2
3724 ;; shared library nor Expat is available. To fix it, we can either
3725 ;; add Expat as an input and make it visible to the linker, or just
3726 ;; prevent it from overriding the Python shared library location.
3727 ;; The end result is identical, so we take the easy route.
3728 ((" or libname not in os\\.listdir\\(libdir\\)")
3729 ""))
3730 #t)))))))))
3731
3732 ;; The RPython toolchain currently does not support Python 3.
3733 (define-public python2-rpython
3734 (package
3735 (name "python2-rpython")
3736 (version "0.2.1")
3737 (source
3738 (origin
3739 (method url-fetch)
3740 (uri (pypi-uri "rpython" version))
3741 (sha256
3742 (base32
3743 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3744 (build-system python-build-system)
3745 (arguments `(#:python ,python-2))
3746 (native-inputs
3747 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3748 (home-page "https://rpython.readthedocs.org")
3749 (synopsis "Framework for implementing interpreters and virtual machines")
3750 (description "RPython is a translation and support framework for
3751 producing implementations of dynamic languages, emphasizing a clean separation
3752 between language specification and implementation aspects.")
3753 (license license:expat)))
3754
3755 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3756 ;; python-scipy still build, as these three packages are often used together.
3757 (define-public python-numpy
3758 (package
3759 (name "python-numpy")
3760 (version "1.17.3")
3761 (source
3762 (origin
3763 (method url-fetch)
3764 (uri (string-append
3765 "https://github.com/numpy/numpy/releases/download/v"
3766 version "/numpy-" version ".tar.gz"))
3767 (sha256
3768 (base32
3769 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3770 (build-system python-build-system)
3771 (inputs
3772 `(("openblas" ,openblas)
3773 ("lapack" ,lapack)))
3774 (native-inputs
3775 `(("python-cython" ,python-cython)
3776 ("python-pytest" ,python-pytest)
3777 ("gfortran" ,gfortran)))
3778 (arguments
3779 `(#:phases
3780 (modify-phases %standard-phases
3781 (add-before 'build 'configure-blas-lapack
3782 (lambda* (#:key inputs #:allow-other-keys)
3783 (call-with-output-file "site.cfg"
3784 (lambda (port)
3785 (format port
3786 "[openblas]
3787 libraries = openblas
3788 library_dirs = ~a/lib
3789 include_dirs = ~a/include
3790
3791 # backslash-n to make emacs happy
3792 \n[lapack]
3793 lapack_libs = lapack
3794 library_dirs = ~a/lib
3795 include_dirs = ~a/include
3796 "
3797 (assoc-ref inputs "openblas")
3798 (assoc-ref inputs "openblas")
3799 (assoc-ref inputs "lapack")
3800 (assoc-ref inputs "lapack"))))
3801 #t))
3802 (add-before 'build 'fix-executable-paths
3803 (lambda* (#:key inputs #:allow-other-keys)
3804 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3805 ;; instead of /bin/sh.
3806 (substitute* "numpy/distutils/exec_command.py"
3807 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3808 (string-append match-start (assoc-ref inputs "bash") match-end)))
3809 ;; Use "gcc" executable, not "cc".
3810 (substitute* "numpy/distutils/system_info.py"
3811 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3812 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3813 #t))
3814 ;; Tests can only be run after the library has been installed and not
3815 ;; within the source directory.
3816 (delete 'check)
3817 (add-after 'install 'check
3818 (lambda* (#:key outputs inputs #:allow-other-keys)
3819 ;; Make installed package available for running the tests
3820 (add-installed-pythonpath inputs outputs)
3821 ;; Make sure "f2py" etc is found.
3822 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3823 ":" (getenv "PATH")))
3824 (with-directory-excursion "/tmp"
3825 (invoke "python" "-c"
3826 "import numpy; numpy.test(verbose=2)")))))))
3827 (home-page "https://numpy.org")
3828 (synopsis "Fundamental package for scientific computing with Python")
3829 (description "NumPy is the fundamental package for scientific computing
3830 with Python. It contains among other things: a powerful N-dimensional array
3831 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3832 and Fortran code, useful linear algebra, Fourier transform, and random number
3833 capabilities.")
3834 (properties `((python2-variant . ,(delay python2-numpy))))
3835 (license license:bsd-3)))
3836
3837 ;; Numpy 1.16.x are the last versions that support Python 2.
3838 (define-public python2-numpy
3839 (let ((numpy (package-with-python2
3840 (strip-python2-variant python-numpy))))
3841 (package/inherit
3842 numpy
3843 (version "1.16.5")
3844 (source (origin
3845 (method url-fetch)
3846 (uri (string-append
3847 "https://github.com/numpy/numpy/releases/download/v"
3848 version "/numpy-" version ".tar.gz"))
3849 (sha256
3850 (base32
3851 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3852
3853 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3854 ;; interest only for legacy code going back to NumPy's predecessor
3855 ;; Numeric.
3856 (define-public python2-numpy-1.8
3857 (package (inherit python2-numpy)
3858 (version "1.8.2")
3859 (source
3860 (origin
3861 (method git-fetch)
3862 (uri (git-reference
3863 (url "https://github.com/numpy/numpy")
3864 (commit (string-append "v" version))))
3865 (file-name (git-file-name "numpy" version))
3866 (sha256
3867 (base32
3868 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3869 (arguments
3870 (substitute-keyword-arguments (package-arguments python2-numpy)
3871 ((#:phases phases)
3872 `(modify-phases ,phases
3873 (replace 'configure-blas-lapack
3874 (lambda* (#:key inputs #:allow-other-keys)
3875 (call-with-output-file "site.cfg"
3876 (lambda (port)
3877 (format port
3878 "[openblas]
3879 libraries = openblas,lapack
3880 library_dirs = ~a/lib:~a/lib
3881 include_dirs = ~a/include:~a/include
3882 "
3883 (assoc-ref inputs "openblas")
3884 (assoc-ref inputs "lapack")
3885 (assoc-ref inputs "openblas")
3886 (assoc-ref inputs "lapack"))))
3887 #t))))))
3888 (native-inputs
3889 `(("python2-nose" ,python2-nose)))
3890 (description "NumPy is the fundamental package for scientific computing
3891 with Python. It contains among other things: a powerful N-dimensional array
3892 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3893 and Fortran code, useful linear algebra, Fourier transform, and random number
3894 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3895 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3896 Numeric.")
3897 (license license:bsd-3)))
3898
3899 (define-public python-munch
3900 (package
3901 (name "python-munch")
3902 (version "2.0.4")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (pypi-uri "munch" version))
3907 (sha256
3908 (base32
3909 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3910 (build-system python-build-system)
3911 (home-page "https://github.com/Infinidat/munch")
3912 (synopsis "Dot-accessible dictionary")
3913 (description "Munch is a dot-accessible dictionary similar to JavaScript
3914 objects.")
3915 (license license:expat)))
3916
3917 (define-public python2-munch
3918 (package-with-python2 python-munch))
3919
3920 (define-public python-colormath
3921 (package
3922 (name "python-colormath")
3923 (version "3.0.0")
3924 (source
3925 (origin
3926 (method url-fetch)
3927 (uri (pypi-uri "colormath" version))
3928 (sha256
3929 (base32
3930 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3931 (build-system python-build-system)
3932 (propagated-inputs
3933 `(("python-networkx" ,python-networkx)
3934 ("python-numpy" ,python-numpy)))
3935 (home-page "https://github.com/gtaylor/python-colormath")
3936 (synopsis "Color math and conversion library")
3937 (description
3938 "This is a Python library for color math and conversions.")
3939 (license license:bsd-3)))
3940
3941 (define-public python2-colormath
3942 (package-with-python2 python-colormath))
3943
3944 (define-public python-spectra
3945 (package
3946 (name "python-spectra")
3947 (version "0.0.11")
3948 (source
3949 (origin
3950 (method url-fetch)
3951 (uri (pypi-uri "spectra" version))
3952 (sha256
3953 (base32
3954 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3955 (build-system python-build-system)
3956 (arguments
3957 `(#:phases
3958 (modify-phases %standard-phases
3959 (replace 'check
3960 (lambda _ (invoke "nosetests" "-v"))))))
3961 (propagated-inputs
3962 `(("python-colormath" ,python-colormath)))
3963 (native-inputs
3964 `(("python-nose" ,python-nose)))
3965 (home-page "https://github.com/jsvine/spectra")
3966 (synopsis "Color scales and color conversion")
3967 (description
3968 "This package provides a Python library intended to make color math,
3969 color scales, and color space conversion easy. It has support for:
3970
3971 @enumerate
3972 @item Color scales
3973 @item Color ranges
3974 @item Color blending
3975 @item Brightening/darkening colors
3976 @item Saturating/desaturating colors
3977 @item Conversion to/from multiple color spaces.
3978 @end enumerate\n")
3979 (license license:expat)))
3980
3981 (define-public python2-spectra
3982 (package-with-python2 python-spectra))
3983
3984 (define-public python-numpy-documentation
3985 (package
3986 (name "python-numpy-documentation")
3987 (version (package-version python-numpy))
3988 (source (package-source python-numpy))
3989 (build-system python-build-system)
3990 (native-inputs
3991 `(("python-matplotlib" ,python-matplotlib)
3992 ("python-numpy" ,python-numpy)
3993 ("pkg-config" ,pkg-config)
3994 ("python-sphinx" ,python-sphinx)
3995 ("python-numpydoc" ,python-numpydoc)
3996 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3997 texlive-fonts-ec
3998 texlive-generic-ifxetex
3999 texlive-generic-pdftex
4000 texlive-amsfonts
4001 texlive-latex-capt-of
4002 texlive-latex-cmap
4003 texlive-latex-environ
4004 texlive-latex-eqparbox
4005 texlive-latex-etoolbox
4006 texlive-latex-expdlist
4007 texlive-latex-fancyhdr
4008 texlive-latex-fancyvrb
4009 texlive-latex-fncychap
4010 texlive-latex-float
4011 texlive-latex-framed
4012 texlive-latex-geometry
4013 texlive-latex-graphics
4014 texlive-latex-hyperref
4015 texlive-latex-mdwtools
4016 texlive-latex-multirow
4017 texlive-latex-needspace
4018 texlive-latex-oberdiek
4019 texlive-latex-parskip
4020 texlive-latex-preview
4021 texlive-latex-tabulary
4022 texlive-latex-threeparttable
4023 texlive-latex-titlesec
4024 texlive-latex-trimspaces
4025 texlive-latex-ucs
4026 texlive-latex-upquote
4027 texlive-latex-url
4028 texlive-latex-varwidth
4029 texlive-latex-wrapfig)))
4030 ("texinfo" ,texinfo)
4031 ("perl" ,perl)
4032 ("scipy-sphinx-theme"
4033 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4034 (method git-fetch)
4035 (uri (git-reference
4036 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4037 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4038 (sha256
4039 (base32
4040 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4041 ,@(package-native-inputs python-numpy)))
4042 (arguments
4043 `(#:tests? #f ; we're only generating the documentation
4044 #:phases
4045 (modify-phases %standard-phases
4046 (delete 'build)
4047 (replace 'install
4048 (lambda* (#:key inputs outputs #:allow-other-keys)
4049 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4050 (doc (string-append
4051 data "/doc/" ,name "-"
4052 ,(package-version python-numpy)))
4053 (info-reader (string-append data "/info"))
4054 (html (string-append doc "/html"))
4055 (scipy-sphinx-theme "scipy-sphinx-theme")
4056 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4057 (pyver ,(string-append "PYVER=")))
4058
4059 ;; FIXME: this is needed to for texlive-union to generate
4060 ;; fonts, which are not found.
4061 (setenv "HOME" "/tmp")
4062
4063 (with-directory-excursion "doc"
4064 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4065 (mkdir-p html)
4066 (invoke "make" "html" pyver)
4067 (invoke "make" "latex" "PAPER=a4" pyver)
4068 (invoke "make" "-C" "build/latex"
4069 "all-pdf" "PAPER=a4" pyver)
4070 ;; FIXME: Generation of the info file fails.
4071 ;; (invoke "make" "info" pyver)
4072 ;; (mkdir-p info)
4073 ;; (copy-file "build/texinfo/numpy.info"
4074 ;; (string-append info "/numpy.info"))
4075 (for-each (lambda (file)
4076 (copy-file (string-append "build/latex" file)
4077 (string-append doc file)))
4078 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4079 (with-directory-excursion "build/html"
4080 (for-each (lambda (file)
4081 (let* ((dir (dirname file))
4082 (tgt-dir (string-append html "/" dir)))
4083 (unless (equal? "." dir)
4084 (mkdir-p tgt-dir))
4085 (install-file file html)))
4086 (find-files "." ".*")))))
4087 #t)))))
4088 (home-page (package-home-page python-numpy))
4089 (synopsis "Documentation for the python-numpy package")
4090 (description (package-description python-numpy))
4091 (license (package-license python-numpy))))
4092
4093 (define-public python2-numpy-documentation
4094 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4095 (package
4096 (inherit numpy-documentation)
4097 (native-inputs `(("python2-functools32" ,python2-functools32)
4098 ,@(package-native-inputs numpy-documentation))))))
4099
4100 (define-public python-pygit2
4101 (package
4102 (name "python-pygit2")
4103 (version "1.1.0")
4104 (source
4105 (origin
4106 (method url-fetch)
4107 (uri (pypi-uri "pygit2" version))
4108 (sha256
4109 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4110 (build-system python-build-system)
4111 (arguments
4112 '(#:tests? #f)) ; tests don't run correctly in our environment
4113 (propagated-inputs
4114 `(("python-cached-property" ,python-cached-property)
4115 ("python-cffi" ,python-cffi)
4116 ("libgit2" ,libgit2)))
4117 (native-inputs
4118 `(("python-pytest" ,python-pytest)))
4119 (home-page "https://github.com/libgit2/pygit2")
4120 (synopsis "Python bindings for libgit2")
4121 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4122 library, libgit2 implements Git plumbing.")
4123 ;; GPL2.0 only, with linking exception.
4124 (license license:gpl2)))
4125
4126 (define-public python-pyparsing
4127 (package
4128 (name "python-pyparsing")
4129 (version "2.3.1")
4130 (source
4131 (origin
4132 (method url-fetch)
4133 (uri (pypi-uri "pyparsing" version))
4134 (sha256
4135 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
4136 (build-system python-build-system)
4137 (outputs '("out" "doc"))
4138 (arguments
4139 `(#:tests? #f ; no test target
4140 #:phases
4141 (modify-phases %standard-phases
4142 (add-after 'install 'install-doc
4143 (lambda* (#:key outputs #:allow-other-keys)
4144 (let* ((doc (string-append (assoc-ref outputs "doc")
4145 "/share/doc/" ,name "-" ,version))
4146 (html-doc (string-append doc "/html"))
4147 (examples (string-append doc "/examples")))
4148 (mkdir-p html-doc)
4149 (mkdir-p examples)
4150 (for-each
4151 (lambda (dir tgt)
4152 (map (lambda (file)
4153 (install-file file tgt))
4154 (find-files dir ".*")))
4155 (list "docs" "htmldoc" "examples")
4156 (list doc html-doc examples))
4157 #t))))))
4158 (home-page "https://github.com/pyparsing/pyparsing")
4159 (synopsis "Python parsing class library")
4160 (description
4161 "The pyparsing module is an alternative approach to creating and
4162 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4163 of regular expressions. The pyparsing module provides a library of classes
4164 that client code uses to construct the grammar directly in Python code.")
4165 (license license:expat)))
4166
4167 (define-public python2-pyparsing
4168 (package-with-python2 python-pyparsing))
4169
4170 (define-public python-numpydoc
4171 (package
4172 (name "python-numpydoc")
4173 (version "0.8.0")
4174 (source
4175 (origin
4176 (method url-fetch)
4177 (uri (pypi-uri "numpydoc" version))
4178 (sha256
4179 (base32
4180 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4181 (build-system python-build-system)
4182 (propagated-inputs
4183 `(("python-sphinx" ,python-sphinx)))
4184 (native-inputs
4185 `(("python-nose" ,python-nose)))
4186 (home-page "https://pypi.org/project/numpydoc/")
4187 (synopsis
4188 "Numpy's Sphinx extensions")
4189 (description
4190 "Sphinx extension to support docstrings in Numpy format.")
4191 (license license:bsd-2)))
4192
4193 (define-public python2-numpydoc
4194 (package-with-python2 python-numpydoc))
4195
4196 (define-public python-numexpr
4197 (package
4198 (name "python-numexpr")
4199 (version "2.6.5")
4200 (source
4201 (origin
4202 (method url-fetch)
4203 (uri (pypi-uri "numexpr" version))
4204 (sha256
4205 (base32
4206 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4207 (build-system python-build-system)
4208 (arguments `(#:tests? #f)) ; no tests included
4209 (propagated-inputs
4210 `(("python-numpy" ,python-numpy)))
4211 (home-page "https://github.com/pydata/numexpr")
4212 (synopsis "Fast numerical expression evaluator for NumPy")
4213 (description
4214 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4215 expressions that operate on arrays are accelerated and use less memory than
4216 doing the same calculation in Python. In addition, its multi-threaded
4217 capabilities can make use of all your cores, which may accelerate
4218 computations, most specially if they are not memory-bounded (e.g. those using
4219 transcendental functions).")
4220 (license license:expat)))
4221
4222 (define-public python2-numexpr
4223 (package-with-python2 python-numexpr))
4224
4225 (define-public python-cycler
4226 (package
4227 (name "python-cycler")
4228 (version "0.10.0")
4229 (source (origin
4230 (method url-fetch)
4231 (uri (pypi-uri "cycler" version))
4232 (sha256
4233 (base32
4234 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4235 (build-system python-build-system)
4236 (arguments
4237 ;; XXX: The current version requires 'coveralls' which we don't have.
4238 ;; Enable this for the next release which uses 'python-pytest'.
4239 '(#:tests? #f))
4240 (propagated-inputs
4241 `(("python-six" ,python-six)))
4242 (home-page "http://matplotlib.org/cycler/")
4243 (synopsis "Composable keyword argument iterator")
4244 (description
4245 "When using @code{matplotlib} and plotting more than one line, it is
4246 common to want to be able to want to be able to cycle over one or more artist
4247 styles; but the plotting logic can quickly become involved.
4248 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4249 @code{Cycler} class was developed.")
4250 (license license:bsd-3)))
4251
4252 (define-public python2-cycler
4253 (package-with-python2 python-cycler))
4254
4255 (define-public python-colorspacious
4256 (package
4257 (name "python-colorspacious")
4258 (version "1.1.2")
4259 (source
4260 (origin
4261 (method git-fetch)
4262 (uri (git-reference
4263 (url "https://github.com/njsmith/colorspacious.git")
4264 (commit (string-append "v" version))))
4265 (file-name (git-file-name name version))
4266 (sha256
4267 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4268 (build-system python-build-system)
4269 (propagated-inputs
4270 `(("python-numpy" ,python-numpy)))
4271 (native-inputs
4272 `(("python-nose" ,python-nose)))
4273 (arguments
4274 `(#:phases
4275 (modify-phases %standard-phases
4276 (replace 'check
4277 (lambda _
4278 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4279 (home-page "https://github.com/njsmith/colorspacious")
4280 (synopsis "Python library for colorspace conversions")
4281 (description "@code{colorspacious} is a Python library that lets you
4282 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4283 (license license:expat)))
4284
4285 (define-public python2-colorspacious
4286 (package-with-python2 python-colorspacious))
4287
4288 (define-public python-matplotlib
4289 (package
4290 (name "python-matplotlib")
4291 (version "3.1.2")
4292 (source
4293 (origin
4294 (method url-fetch)
4295 (uri (pypi-uri "matplotlib" version))
4296 (sha256
4297 (base32
4298 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4299 (build-system python-build-system)
4300 (propagated-inputs ; the following packages are all needed at run time
4301 `(("python-cycler" ,python-cycler)
4302 ("python-kiwisolver" ,python-kiwisolver)
4303 ("python-pyparsing" ,python-pyparsing)
4304 ("python-pygobject" ,python-pygobject)
4305 ("gobject-introspection" ,gobject-introspection)
4306 ("python-tkinter" ,python "tk")
4307 ("python-dateutil" ,python-dateutil)
4308 ("python-numpy" ,python-numpy)
4309 ("python-pillow" ,python-pillow)
4310 ("python-pytz" ,python-pytz)
4311 ("python-six" ,python-six)
4312 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4313 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4314 ;; object. For this reason we need to import both libraries.
4315 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4316 ("python-pycairo" ,python-pycairo)
4317 ("python-cairocffi" ,python-cairocffi)))
4318 (inputs
4319 `(("libpng" ,libpng)
4320 ("imagemagick" ,imagemagick)
4321 ("freetype" ,freetype)
4322 ("cairo" ,cairo)
4323 ("glib" ,glib)
4324 ;; FIXME: Add backends when available.
4325 ;("python-wxpython" ,python-wxpython)
4326 ("tcl" ,tcl)
4327 ("tk" ,tk)))
4328 (native-inputs
4329 `(("pkg-config" ,pkg-config)
4330 ("python-pytest" ,python-pytest)
4331 ("python-mock" ,python-mock)
4332 ("unzip" ,unzip)
4333 ("jquery-ui"
4334 ,(origin
4335 (method url-fetch)
4336 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4337 (sha256
4338 (base32
4339 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4340 (arguments
4341 `(#:phases
4342 (modify-phases %standard-phases
4343 ;; XXX We disable all image comparison tests because we're using a
4344 ;; newer version of FreeType than matplotlib expects. This leads to
4345 ;; minor differences throughout the tests.
4346 (add-after 'unpack 'fix-and-disable-failing-tests
4347 (lambda _
4348 (substitute* (append (find-files "lib/matplotlib/tests/"
4349 "test_.*\\.py$")
4350 (find-files "lib/mpl_toolkits/tests"
4351 "test_.*\\.py$"))
4352 (("^from matplotlib" match)
4353 (string-append "import pytest\n" match))
4354 (("( *)@image_comparison" match indent)
4355 (string-append indent
4356 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4357 match)))
4358 (substitute* "lib/matplotlib/tests/test_animation.py"
4359 (("/bin/sh") (which "sh")))
4360 (for-each delete-file
4361 ;; test_normal_axes, test_get_tightbbox_polar
4362 '("lib/matplotlib/tests/test_axes.py"
4363 ;; We don't use the webagg backend and this test forces it.
4364 "lib/matplotlib/tests/test_backend_webagg.py"
4365 ;; test_outward_ticks
4366 "lib/matplotlib/tests/test_tightlayout.py"
4367 ;; test_hidden_axes fails with minor extent
4368 ;; differences, possibly due to the use of a
4369 ;; different version of FreeType.
4370 "lib/matplotlib/tests/test_constrainedlayout.py"
4371 ;; Fontconfig returns no fonts.
4372 "lib/matplotlib/tests/test_font_manager.py"))
4373 #t))
4374 (add-before 'install 'install-jquery-ui
4375 (lambda* (#:key outputs inputs #:allow-other-keys)
4376 (let ((dir (string-append (assoc-ref outputs "out")
4377 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4378 (mkdir-p dir)
4379 (invoke "unzip"
4380 (assoc-ref inputs "jquery-ui")
4381 "-d" dir))
4382 #t))
4383 (replace 'check
4384 (lambda* (#:key outputs inputs #:allow-other-keys)
4385 (add-installed-pythonpath inputs outputs)
4386 (invoke "python" "tests.py" "-v"
4387 "-m" "not network and not webagg")))
4388 (add-before 'build 'configure-environment
4389 (lambda* (#:key outputs inputs #:allow-other-keys)
4390 (let ((cairo (assoc-ref inputs "cairo")))
4391 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4392 ;; has not effect.
4393 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4394 (setenv "HOME" (getcwd))
4395 (call-with-output-file "setup.cfg"
4396 (lambda (port)
4397 (format port "[directories]~%
4398 basedirlist = ~a,~a~%
4399 [packages]~%
4400 tests = True~%"
4401 (assoc-ref inputs "tcl")
4402 (assoc-ref inputs "tk")))))
4403 #t)))))
4404 (home-page "https://matplotlib.org/")
4405 (synopsis "2D plotting library for Python")
4406 (description
4407 "Matplotlib is a Python 2D plotting library which produces publication
4408 quality figures in a variety of hardcopy formats and interactive environments
4409 across platforms. Matplotlib can be used in Python scripts, the python and
4410 ipython shell, web application servers, and six graphical user interface
4411 toolkits.")
4412 (license license:psfl)
4413 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4414
4415 (define-public python2-matplotlib
4416 (let ((matplotlib (package-with-python2
4417 (strip-python2-variant python-matplotlib))))
4418 (package (inherit matplotlib)
4419 (version "2.2.4")
4420 (source
4421 (origin
4422 (method url-fetch)
4423 (uri (pypi-uri "matplotlib" version))
4424 (sha256
4425 (base32
4426 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4427 (arguments
4428 (substitute-keyword-arguments (package-arguments matplotlib)
4429 ((#:phases phases)
4430 `(modify-phases ,phases
4431 (replace 'install-jquery-ui
4432 (lambda* (#:key outputs inputs #:allow-other-keys)
4433 (let ((dir (string-append (assoc-ref outputs "out")
4434 "/lib/python2.7/site-packages/"
4435 "matplotlib/backends/web_backend/")))
4436 (mkdir-p dir)
4437 (invoke "unzip"
4438 (assoc-ref inputs "jquery-ui")
4439 "-d" dir))
4440 #t))
4441 (delete 'fix-and-disable-failing-tests)
4442 (delete 'check))))) ; These tests weren't run the the past.
4443 ;; Make sure to use special packages for Python 2 instead
4444 ;; of those automatically rewritten by package-with-python2.
4445 (propagated-inputs
4446 `(("python2-pycairo" ,python2-pycairo)
4447 ("python2-backports-functools-lru-cache"
4448 ,python2-backports-functools-lru-cache)
4449 ("python2-functools32" ,python2-functools32)
4450 ("python2-pygobject-2" ,python2-pygobject-2)
4451 ("python2-subprocess32" ,python2-subprocess32)
4452 ("python2-tkinter" ,python-2 "tk")
4453 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4454 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4455
4456 (define-public python-matplotlib-documentation
4457 (package
4458 (name "python-matplotlib-documentation")
4459 (version (package-version python-matplotlib))
4460 (source (package-source python-matplotlib))
4461 (build-system python-build-system)
4462 (native-inputs
4463 `(("python-matplotlib" ,python-matplotlib)
4464 ("python-colorspacious" ,python-colorspacious)
4465 ("python-sphinx" ,python-sphinx)
4466 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4467 ("python-sphinx-gallery" ,python-sphinx-gallery)
4468 ("python-numpydoc" ,python-numpydoc)
4469 ("python-ipython" ,python-ipython)
4470 ("python-ipykernel" ,python-ipykernel)
4471 ("python-mock" ,python-mock)
4472 ("graphviz" ,graphviz)
4473 ("texlive" ,(texlive-union (list texlive-amsfonts
4474 texlive-latex-amsmath
4475 texlive-latex-enumitem
4476 texlive-latex-expdlist
4477 texlive-latex-geometry
4478 texlive-latex-preview
4479 texlive-latex-type1cm
4480 texlive-latex-ucs
4481
4482 texlive-generic-pdftex
4483
4484 texlive-fonts-ec
4485 texlive-fonts-adobe-times
4486 texlive-fonts-txfonts)))
4487 ("texinfo" ,texinfo)
4488 ,@(package-native-inputs python-matplotlib)))
4489 (arguments
4490 `(#:tests? #f ; we're only generating documentation
4491 #:phases
4492 (modify-phases %standard-phases
4493 ;; The tests in python-matplotlib are run after the install phase, so
4494 ;; we need to delete the extra phase here.
4495 (delete 'check)
4496 (replace 'build
4497 (lambda _
4498 (chdir "doc")
4499 (setenv "PYTHONPATH"
4500 (string-append (getenv "PYTHONPATH")
4501 ":" (getcwd) "/../examples/units"))
4502 (substitute* "conf.py"
4503 ;; Don't use git.
4504 (("^SHA = check_output.*")
4505 (string-append "SHA = \"" ,version "\"\n"))
4506 ;; Don't fetch intersphinx files from the Internet
4507 (("^explicit_order_folders" m)
4508 (string-append "intersphinx_mapping = {}\n" m))
4509 (("'sphinx.ext.intersphinx',") "")
4510 ;; Disable URL embedding which requires internet access.
4511 (("'https://docs.scipy.org/doc/numpy'") "None")
4512 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4513 (invoke "make"
4514 "SPHINXBUILD=sphinx-build"
4515 "SPHINXOPTS=" ; don't abort on warnings
4516 "html" "texinfo")))
4517 (replace 'install
4518 (lambda* (#:key inputs outputs #:allow-other-keys)
4519 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4520 (doc (string-append data "/doc/python-matplotlib-" ,version))
4521 (info (string-append data "/info"))
4522 (html (string-append doc "/html")))
4523 (mkdir-p html)
4524 (mkdir-p info)
4525 (copy-recursively "build/html" html)
4526 (symlink (string-append html "/_images")
4527 (string-append info "/matplotlib-figures"))
4528 (with-directory-excursion "build/texinfo"
4529 (substitute* "matplotlib.texi"
4530 (("@image\\{([^,]*)" all file)
4531 (string-append "@image{matplotlib-figures/" file)))
4532 (symlink (string-append html "/_images")
4533 "./matplotlib-figures")
4534 (invoke "makeinfo" "--no-split"
4535 "-o" "matplotlib.info" "matplotlib.texi"))
4536 (install-file "build/texinfo/matplotlib.info" info))
4537 #t)))))
4538 (home-page (package-home-page python-matplotlib))
4539 (synopsis "Documentation for the python-matplotlib package")
4540 (description (package-description python-matplotlib))
4541 (license (package-license python-matplotlib))))
4542
4543 (define-public python2-matplotlib-documentation
4544 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4545 (package
4546 (inherit parent)
4547 (native-inputs
4548 (alist-delete "python-sphinx-copybutton"
4549 (package-native-inputs parent))))))
4550
4551 (define-public python-matplotlib-venn
4552 (package
4553 (name "python-matplotlib-venn")
4554 (version "0.11.5")
4555 (source
4556 (origin
4557 (method url-fetch)
4558 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4559 (sha256
4560 (base32
4561 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4562 (build-system python-build-system)
4563 (arguments '(#:tests? #f)) ; tests are not included
4564 (propagated-inputs
4565 `(("python-matplotlib" ,python-matplotlib)
4566 ("python-numpy" ,python-numpy)
4567 ("python-scipy" ,python-scipy)))
4568 (native-inputs
4569 `(("unzip" ,unzip)))
4570 (home-page "https://github.com/konstantint/matplotlib-venn")
4571 (synopsis "Plot area-proportional Venn diagrams")
4572 (description
4573 "This package provides tools for plotting area-proportional two- and
4574 three-way Venn diagrams in @code{matplotlib}.")
4575 (license license:expat)))
4576
4577 (define-public python2-pysnptools
4578 (package
4579 (name "python2-pysnptools")
4580 (version "0.3.13")
4581 (source
4582 (origin
4583 (method url-fetch)
4584 (uri (pypi-uri "pysnptools" version))
4585 (sha256
4586 (base32
4587 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4588 (build-system python-build-system)
4589 (arguments
4590 `(#:python ,python-2 ; only Python 2.7 is supported
4591 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4592 (propagated-inputs
4593 `(("python2-numpy" ,python2-numpy)
4594 ("python2-scipy" ,python2-scipy)
4595 ("python2-pandas" ,python2-pandas)))
4596 (native-inputs
4597 `(("python2-cython" ,python2-cython)))
4598 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4599 (synopsis "Library for reading and manipulating genetic data")
4600 (description
4601 "PySnpTools is a library for reading and manipulating genetic data. It
4602 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4603 those files. It can also efficiently manipulate ranges of integers using set
4604 operators such as union, intersection, and difference.")
4605 (license license:asl2.0)))
4606
4607 (define-public python-socksipy-branch
4608 (package
4609 (name "python-socksipy-branch")
4610 (version "1.01")
4611 (source
4612 (origin
4613 (method url-fetch)
4614 (uri (pypi-uri "SocksiPy-branch" version))
4615 (sha256
4616 (base32
4617 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4618 (build-system python-build-system)
4619 (arguments
4620 `(#:tests? #f)) ; There are no tests
4621 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4622 (synopsis "Python SOCKS module")
4623 (description
4624 "SocksiPy - A Python SOCKS client module. It provides a
4625 socket-like interface that supports connections to any TCP
4626 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4627 The original version was developed by Dan Haim, this is a
4628 branch created by Mario Vilas to address some open issues,
4629 as the original project seems to have been abandoned circa 2007.")
4630 (license license:bsd-3)))
4631
4632 (define-public python2-socksipy-branch
4633 (package-with-python2 python-socksipy-branch))
4634
4635 (define-public python-socksipychain
4636 (package
4637 (name "python-socksipychain")
4638 (version "2.1.0")
4639 (source
4640 (origin
4641 (method git-fetch)
4642 (uri (git-reference
4643 (url "https://github.com/pagekite/PySocksipyChain.git")
4644 (commit (string-append "v" version))))
4645 (file-name (git-file-name name version))
4646 (sha256
4647 (base32
4648 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4649 (build-system python-build-system)
4650 (arguments
4651 `(#:tests? #f)) ; Tests try to access the network.
4652 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4653 (synopsis "Python SOCKS module with chained proxies support")
4654 (description
4655 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4656 adds support for arbitrary chaining of proxy servers and various modes of
4657 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4658 a simple netcat replacement with chaining support.")
4659 (license license:bsd-3)))
4660
4661 (define-public python-pycodestyle
4662 (package
4663 (name "python-pycodestyle")
4664 (version "2.5.0")
4665 (source
4666 (origin
4667 (method url-fetch)
4668 (uri (pypi-uri "pycodestyle" version))
4669 (sha256
4670 (base32
4671 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4672 (build-system python-build-system)
4673 (home-page "https://pycodestyle.readthedocs.io/")
4674 (synopsis "Python style guide checker")
4675 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4676 Python code against some of the style conventions in
4677 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4678 (license license:expat)))
4679
4680 (define-public python2-pycodestyle
4681 (package-with-python2 python-pycodestyle))
4682
4683 (define-public python-multidict
4684 (package
4685 (name "python-multidict")
4686 (version "4.7.5")
4687 (source
4688 (origin
4689 (method url-fetch)
4690 (uri (pypi-uri "multidict" version))
4691 (sha256
4692 (base32
4693 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
4694 (build-system python-build-system)
4695 (arguments
4696 '(#:modules ((ice-9 ftw)
4697 (srfi srfi-1)
4698 (srfi srfi-26)
4699 (guix build utils)
4700 (guix build python-build-system))
4701 #:phases (modify-phases %standard-phases
4702 (replace 'check
4703 (lambda* (#:key tests? #:allow-other-keys)
4704 (if tests?
4705 (begin
4706 (let ((libdir (find (cut string-prefix? "lib." <>)
4707 (scandir "build"))))
4708 (setenv "PYTHONPATH"
4709 (string-append "./build/" libdir ":"
4710 (getenv "PYTHONPATH")))
4711 (invoke "pytest" "-vv")))
4712 (format #t "test suite not run~%"))
4713 #t)))))
4714 (native-inputs
4715 `(("python-pytest" ,python-pytest)
4716 ("python-pytest-cov" ,python-pytest-cov)))
4717 (home-page "https://github.com/aio-libs/multidict/")
4718 (synopsis "Multidict implementation")
4719 (description "Multidict is dict-like collection of key-value pairs
4720 where key might be occurred more than once in the container.")
4721 (license license:asl2.0)))
4722
4723 (define-public python-orderedmultidict
4724 (package
4725 (name "python-orderedmultidict")
4726 (version "0.7.11")
4727 (source
4728 (origin
4729 (method url-fetch)
4730 (uri (pypi-uri "orderedmultidict" version))
4731 (sha256
4732 (base32
4733 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4734 (build-system python-build-system)
4735 (arguments
4736 `(#:phases
4737 (modify-phases %standard-phases
4738 (add-after 'unpack 'fix-tests
4739 (lambda _
4740 ;; The package uses nosetest for running the tests.
4741 ;; Adding this initfile allows to run the test suite
4742 ;; without requiring nosetest.
4743 (with-output-to-file "tests/__init__.py" newline)
4744 #t)))))
4745 (propagated-inputs
4746 `(("python-six" ,python-six)))
4747 (native-inputs
4748 `(("python-pycodestyle" ,python-pycodestyle)))
4749 (home-page "https://github.com/gruns/orderedmultidict")
4750 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4751 (description "This package contains a library for ordered multivalue
4752 dictionaries. A multivalue dictionary is a dictionary that can store
4753 multiple values for the same key. An ordered multivalue dictionary is a
4754 multivalue dictionary that retains the order of insertions and deletions.")
4755 (license license:unlicense)))
4756
4757 (define-public python2-orderedmultidict
4758 (package-with-python2 python-orderedmultidict))
4759
4760 (define-public python-autopep8
4761 (package
4762 (name "python-autopep8")
4763 (version "1.3.5")
4764 (source
4765 (origin
4766 (method url-fetch)
4767 (uri (pypi-uri "autopep8" version))
4768 (sha256
4769 (base32
4770 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4771 (build-system python-build-system)
4772 (propagated-inputs
4773 `(("python-pycodestyle" ,python-pycodestyle)))
4774 (home-page "https://github.com/hhatto/autopep8")
4775 (synopsis "Format Python code according to the PEP 8 style guide")
4776 (description
4777 "@code{autopep8} automatically formats Python code to conform to
4778 the PEP 8 style guide. It uses the pycodestyle utility to determine
4779 what parts of the code needs to be formatted. @code{autopep8} is
4780 capable of fixing most of the formatting issues that can be reported
4781 by pycodestyle.")
4782 (license (license:non-copyleft
4783 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4784
4785 (define-public python2-autopep8
4786 (package-with-python2 python-autopep8))
4787
4788 (define-public python-distlib
4789 (package
4790 (name "python-distlib")
4791 (version "0.3.0")
4792 (source
4793 (origin
4794 (method url-fetch)
4795 (uri (pypi-uri "distlib" version ".zip"))
4796 (sha256
4797 (base32
4798 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4799 (build-system python-build-system)
4800 (arguments
4801 `(#:phases
4802 (modify-phases %standard-phases
4803 (add-before 'build 'no-/bin/sh
4804 (lambda _
4805 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4806 (("/bin/sh") (which "sh")))
4807 #t))
4808 (add-before 'check 'prepare-test-env
4809 (lambda _
4810 (setenv "HOME" "/tmp")
4811 ;; NOTE: Any value works, the variable just has to be present.
4812 (setenv "SKIP_ONLINE" "1")
4813 #t)))))
4814 (native-inputs `(("unzip" ,unzip)))
4815 (home-page "https://bitbucket.org/pypa/distlib")
4816 (synopsis "Distribution utilities")
4817 (description "Distlib is a library which implements low-level functions that
4818 relate to packaging and distribution of Python software. It is intended to be
4819 used as the basis for third-party packaging tools.")
4820 (license license:psfl)))
4821
4822 (define-public python-distutils-extra
4823 (package
4824 (name "python-distutils-extra")
4825 (version "2.38")
4826 (source
4827 (origin
4828 (method url-fetch)
4829 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4830 version "/+download/python-distutils-extra-"
4831 version ".tar.gz"))
4832 (sha256
4833 (base32
4834 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4835 (build-system python-build-system)
4836 (home-page "https://launchpad.net/python-distutils-extra/")
4837 (synopsis "Enhancements to Python's distutils")
4838 (description
4839 "The python-distutils-extra module enables you to easily integrate
4840 gettext support, themed icons, and scrollkeeper-based documentation into
4841 Python's distutils.")
4842 (license license:gpl2)))
4843
4844 (define-public python2-distutils-extra
4845 (package-with-python2 python-distutils-extra))
4846
4847 (define-public python2-elib.intl
4848 (package
4849 (name "python2-elib.intl")
4850 (version "0.0.3")
4851 (source
4852 (origin
4853 ;; This project doesn't tag releases or publish tarballs, so we take
4854 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4855 (method git-fetch)
4856 (uri (git-reference
4857 (url "https://github.com/dieterv/elib.intl.git")
4858 (commit "d09997cfef")))
4859 (file-name (string-append name "-" version "-checkout"))
4860 (sha256
4861 (base32
4862 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4863 (build-system python-build-system)
4864 (arguments
4865 ;; incompatible with Python 3 (exception syntax)
4866 `(#:python ,python-2
4867 #:tests? #f))
4868 (home-page "https://github.com/dieterv/elib.intl")
4869 (synopsis "Enhanced internationalization for Python")
4870 (description
4871 "The elib.intl module provides enhanced internationalization (I18N)
4872 services for your Python modules and applications.")
4873 (license license:lgpl3+)))
4874
4875 (define-public python-olefile
4876 (package
4877 (name "python-olefile")
4878 (version "0.46")
4879 (source
4880 (origin
4881 (method url-fetch)
4882 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4883 "download/v" version "/olefile-" version ".tar.gz"))
4884 (file-name (string-append name "-" version ".tar.gz"))
4885 (sha256
4886 (base32
4887 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4888 (build-system python-build-system)
4889 (home-page "https://www.decalage.info/python/olefileio")
4890 (synopsis "Read and write Microsoft OLE2 files.")
4891 (description
4892 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4893 Storage or Compound Document, Microsoft Office). It is an improved version of
4894 the OleFileIO module from PIL, the Python Image Library.")
4895 (license license:bsd-3)))
4896
4897 (define-public python2-olefile
4898 (package-with-python2 python-olefile))
4899
4900 (define-public python-pillow
4901 (package
4902 (name "python-pillow")
4903 (version "6.2.1")
4904 (source
4905 (origin
4906 (method url-fetch)
4907 (uri (pypi-uri "Pillow" version))
4908 (sha256
4909 (base32
4910 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4911 (build-system python-build-system)
4912 (native-inputs
4913 `(("python-pytest" ,python-pytest)))
4914 (inputs
4915 `(("freetype" ,freetype)
4916 ("lcms" ,lcms)
4917 ("libjpeg" ,libjpeg)
4918 ("libtiff" ,libtiff)
4919 ("libwebp" ,libwebp)
4920 ("openjpeg" ,openjpeg)
4921 ("zlib" ,zlib)))
4922 (propagated-inputs
4923 `(("python-olefile" ,python-olefile)))
4924 (arguments
4925 `(#:phases
4926 (modify-phases %standard-phases
4927 (add-after 'unpack 'patch-ldconfig
4928 (lambda _
4929 (substitute* "setup.py"
4930 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4931 (replace 'check
4932 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4933 (if tests?
4934 (begin
4935 (setenv "HOME" (getcwd))
4936 ;; Make installed package available for running the tests.
4937 (add-installed-pythonpath inputs outputs)
4938 (invoke "python" "selftest.py" "--installed")
4939 (invoke "python" "-m" "pytest" "-vv"))
4940 #t))))))
4941 (home-page "https://python-pillow.org")
4942 (synopsis "Fork of the Python Imaging Library")
4943 (description
4944 "The Python Imaging Library adds image processing capabilities to your
4945 Python interpreter. This library provides extensive file format support, an
4946 efficient internal representation, and fairly powerful image processing
4947 capabilities. The core image library is designed for fast access to data
4948 stored in a few basic pixel formats. It should provide a solid foundation for
4949 a general image processing tool.")
4950 (license (license:x11-style
4951 "http://www.pythonware.com/products/pil/license.htm"
4952 "The PIL Software License"))))
4953
4954 (define-public python2-pillow
4955 (package-with-python2 python-pillow))
4956
4957 (define-public python-pycparser
4958 (package
4959 (name "python-pycparser")
4960 (version "2.19")
4961 (source
4962 (origin
4963 (method url-fetch)
4964 (uri (pypi-uri "pycparser" version))
4965 (sha256
4966 (base32
4967 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4968 (outputs '("out" "doc"))
4969 (build-system python-build-system)
4970 (native-inputs
4971 `(("pkg-config" ,pkg-config)))
4972 (arguments
4973 `(#:phases
4974 (modify-phases %standard-phases
4975 (replace 'check
4976 (lambda _
4977 (with-directory-excursion "tests"
4978 (invoke "python" "all_tests.py"))
4979 #t))
4980 (add-after 'install 'install-doc
4981 (lambda* (#:key outputs #:allow-other-keys)
4982 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4983 (doc (string-append data "/doc/" ,name "-" ,version))
4984 (examples (string-append doc "/examples")))
4985 (mkdir-p examples)
4986 (for-each (lambda (file)
4987 (copy-file (string-append "." file)
4988 (string-append doc file)))
4989 '("/README.rst" "/CHANGES" "/LICENSE"))
4990 (copy-recursively "examples" examples)
4991 #t))))))
4992 (home-page "https://github.com/eliben/pycparser")
4993 (synopsis "C parser in Python")
4994 (description
4995 "Pycparser is a complete parser of the C language, written in pure Python
4996 using the PLY parsing library. It parses C code into an AST and can serve as
4997 a front-end for C compilers or analysis tools.")
4998 (license license:bsd-3)))
4999
5000 (define-public python2-pycparser
5001 (package-with-python2 python-pycparser))
5002
5003 (define-public python-pywavelets
5004 (package
5005 (name "python-pywavelets")
5006 (version "1.0.1")
5007 (home-page "https://github.com/PyWavelets/pywt")
5008 (source (origin
5009 (method url-fetch)
5010 (uri (pypi-uri "PyWavelets" version))
5011 (sha256
5012 (base32
5013 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
5014 (build-system python-build-system)
5015 (arguments
5016 '(#:modules ((ice-9 ftw)
5017 (srfi srfi-1)
5018 (srfi srfi-26)
5019 (guix build utils)
5020 (guix build python-build-system))
5021 #:phases (modify-phases %standard-phases
5022 (replace 'check
5023 (lambda _
5024 (let ((cwd (getcwd))
5025 (libdir (find (cut string-prefix? "lib." <>)
5026 (scandir "build"))))
5027 (with-directory-excursion (string-append cwd "/build/" libdir)
5028 (invoke "nosetests" "-v" "."))))))))
5029 (native-inputs
5030 `(("python-matplotlib" ,python-matplotlib) ;for tests
5031 ("python-nose" ,python-nose)))
5032 (propagated-inputs
5033 `(("python-numpy" ,python-numpy)))
5034 (synopsis "Wavelet transforms in Python")
5035 (description
5036 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5037 mathematical basis functions that are localized in both time and frequency.
5038 Wavelet transforms are time-frequency transforms employing wavelets. They are
5039 similar to Fourier transforms, the difference being that Fourier transforms are
5040 localized only in frequency instead of in time and frequency.")
5041 (license license:expat)))
5042
5043 (define-public python2-pywavelets
5044 (package-with-python2 python-pywavelets))
5045
5046 (define-public python-xcffib
5047 (package
5048 (name "python-xcffib")
5049 (version "0.6.0")
5050 (source
5051 (origin
5052 (method url-fetch)
5053 (uri (pypi-uri "xcffib" version))
5054 (sha256
5055 (base32
5056 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5057 (build-system python-build-system)
5058 (inputs
5059 `(("libxcb" ,libxcb)))
5060 (propagated-inputs
5061 `(("python-cffi" ,python-cffi) ; used at run time
5062 ("python-six" ,python-six)))
5063 (arguments
5064 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5065 #:tests? #f
5066 #:phases
5067 (modify-phases %standard-phases
5068 (add-after 'unpack 'fix-libxcb-path
5069 (lambda* (#:key inputs #:allow-other-keys)
5070 (let ((libxcb (assoc-ref inputs "libxcb")))
5071 (substitute* '("xcffib/__init__.py")
5072 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5073 #t)))
5074 (add-after 'install 'install-doc
5075 (lambda* (#:key outputs #:allow-other-keys)
5076 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5077 "/doc/" ,name "-" ,version)))
5078 (mkdir-p doc)
5079 (copy-file "README.md"
5080 (string-append doc "/README.md"))
5081 #t))))))
5082 (home-page "https://github.com/tych0/xcffib")
5083 (synopsis "XCB Python bindings")
5084 (description
5085 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5086 support for Python 3 and PyPy. It is based on cffi.")
5087 (license license:expat)))
5088
5089 (define-public python2-xcffib
5090 (package-with-python2 python-xcffib))
5091
5092 (define-public python-cairocffi
5093 (package
5094 (name "python-cairocffi")
5095 (version "0.9.0")
5096 (source
5097 (origin
5098 (method url-fetch)
5099 (uri (pypi-uri "cairocffi" version))
5100 (sha256
5101 (base32
5102 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5103 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5104 (build-system python-build-system)
5105 (outputs '("out" "doc"))
5106 (inputs
5107 `(("glib" ,glib)
5108 ("gtk+" ,gtk+)
5109 ("gdk-pixbuf" ,gdk-pixbuf)
5110 ("cairo" ,cairo)
5111 ("pango" ,pango)))
5112 (native-inputs
5113 `(("pkg-config" ,pkg-config)
5114 ("python-pytest" ,python-pytest)
5115 ("python-pytest-cov" ,python-pytest-cov)
5116 ("python-pytest-runner" ,python-pytest-runner)
5117 ("python-sphinx" ,python-sphinx)
5118 ("python-docutils" ,python-docutils)))
5119 (propagated-inputs
5120 `(("python-xcffib" ,python-xcffib))) ; used at run time
5121 (arguments
5122 `(#:phases
5123 (modify-phases %standard-phases
5124 (add-after 'unpack 'patch-paths
5125 (lambda* (#:key inputs outputs #:allow-other-keys)
5126 (substitute* (find-files "." "\\.py$")
5127 (("dlopen\\(ffi, 'cairo'")
5128 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5129 "/lib/libcairo.so.2'"))
5130 (("dlopen\\(ffi, 'gdk-3'")
5131 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5132 "/lib/libgtk-3.so.0'"))
5133 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5134 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5135 "/lib/libgdk_pixbuf-2.0.so.0'"))
5136 (("dlopen\\(ffi, 'glib-2.0'")
5137 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5138 "/lib/libglib-2.0.so.0'"))
5139 (("dlopen\\(ffi, 'gobject-2.0'")
5140 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5141 "/lib/libgobject-2.0.so.0'"))
5142 (("dlopen\\(ffi, 'pangocairo-1.0'")
5143 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5144 "/lib/libpangocairo-1.0.so.0'"))
5145 (("dlopen\\(ffi, 'pango-1.0'")
5146 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5147 "/lib/libpango-1.0.so.0'")))
5148 #t))
5149 (add-after 'install 'install-doc
5150 (lambda* (#:key inputs outputs #:allow-other-keys)
5151 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5152 (doc (string-append data "/doc/" ,name "-" ,version))
5153 (html (string-append doc "/html")))
5154 (setenv "LD_LIBRARY_PATH"
5155 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5156 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5157 (setenv "LANG" "en_US.UTF-8")
5158 (mkdir-p html)
5159 (for-each (lambda (file)
5160 (copy-file (string-append "." file)
5161 (string-append doc file)))
5162 '("/README.rst" "/CHANGES" "/LICENSE"))
5163 (system* "python" "setup.py" "build_sphinx")
5164 (copy-recursively "docs/_build/html" html)
5165 #t))))))
5166 (home-page "https://github.com/Kozea/cairocffi")
5167 (synopsis "Python bindings and object-oriented API for Cairo")
5168 (description
5169 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5170 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5171 graphics library with support for multiple backends including image buffers,
5172 PNG, PostScript, PDF, and SVG file output.")
5173 (license license:bsd-3)))
5174
5175 (define-public python2-cairocffi
5176 (package-with-python2 python-cairocffi))
5177
5178 (define-public python-decorator
5179 (package
5180 (name "python-decorator")
5181 (version "4.3.0")
5182 (source
5183 (origin
5184 (method url-fetch)
5185 (uri (pypi-uri "decorator" version))
5186 (sha256
5187 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5188 (build-system python-build-system)
5189 (home-page "https://pypi.org/project/decorator/")
5190 (synopsis "Python module to simplify usage of decorators")
5191 (description
5192 "The aim of the decorator module is to simplify the usage of decorators
5193 for the average programmer, and to popularize decorators usage giving examples
5194 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5195 etc. The core of this module is a decorator factory.")
5196 (license license:expat)))
5197
5198 (define-public python2-decorator
5199 (package-with-python2 python-decorator))
5200
5201 (define-public python-drmaa
5202 (package
5203 (name "python-drmaa")
5204 (version "0.7.7")
5205 (source
5206 (origin
5207 (method url-fetch)
5208 (uri (pypi-uri "drmaa" version))
5209 (sha256
5210 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5211 (build-system python-build-system)
5212 ;; The test suite requires libdrmaa which is provided by the cluster
5213 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5214 ;; should be set to the path of the libdrmaa library.
5215 (arguments '(#:tests? #f))
5216 (native-inputs
5217 `(("python-nose" ,python-nose)))
5218 (home-page "https://pypi.org/project/drmaa/")
5219 (synopsis "Python bindings for the DRMAA library")
5220 (description
5221 "A Python package for Distributed Resource Management (DRM) job
5222 submission and control. This package is an implementation of the DRMAA 1.0
5223 Python language binding specification.")
5224 (license license:bsd-3)))
5225
5226 (define-public python2-drmaa
5227 (package-with-python2 python-drmaa))
5228
5229 (define-public python-grako
5230 (package
5231 (name "python-grako")
5232 (version "3.99.9")
5233 (source
5234 (origin
5235 (method url-fetch)
5236 (uri
5237 (pypi-uri "grako" version ".zip"))
5238 (sha256
5239 (base32
5240 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5241 (build-system python-build-system)
5242 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5243 (native-inputs
5244 `(("unzip" ,unzip)
5245 ("python-pytest" ,python-pytest)
5246 ("python-pytest-runner" ,python-pytest-runner)))
5247 (home-page "https://bitbucket.org/neogeny/grako")
5248 (synopsis "EBNF parser generator")
5249 (description
5250 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5251 memoizing PEG/Packrat parser in Python.")
5252 (license license:bsd-3)))
5253
5254 (define-public python2-grako
5255 (package-with-python2 python-grako))
5256
5257 (define-public python-gridmap
5258 (package
5259 (name "python-gridmap")
5260 (version "0.13.0")
5261 (source
5262 (origin
5263 (method git-fetch)
5264 (uri (git-reference
5265 (url "https://github.com/pygridtools/gridmap.git")
5266 (commit (string-append "v" version))))
5267 (file-name (git-file-name name version))
5268 (sha256
5269 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
5270 (build-system python-build-system)
5271 (arguments
5272 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5273 (propagated-inputs
5274 `(("python-psutil" ,python-psutil)
5275 ("python-drmaa" ,python-drmaa)
5276 ("python-pyzmq" ,python-pyzmq)))
5277 (home-page "https://github.com/pygridtools/gridmap")
5278 (synopsis "Create jobs on a cluster directly from Python")
5279 (description
5280 "Gridmap is a Python package to allow you to easily create jobs on the
5281 cluster directly from Python. You can directly map Python functions onto the
5282 cluster without needing to write any wrapper code yourself.")
5283 (license license:gpl3+)))
5284
5285 (define-public python2-gridmap
5286 (package-with-python2 python-gridmap))
5287
5288 (define-public python-honcho
5289 (package
5290 (name "python-honcho")
5291 (version "1.0.1")
5292 (source
5293 (origin
5294 (method git-fetch)
5295 (uri (git-reference
5296 (url "https://github.com/nickstenning/honcho.git")
5297 (commit (string-append "v" version))))
5298 (file-name (git-file-name name version))
5299 (sha256
5300 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5301 (build-system python-build-system)
5302 (native-inputs
5303 `(("python-pytest" ,python-pytest)
5304 ("python-mock" ,python-mock)
5305 ("python-tox" ,python-tox)
5306 ("which" ,which))) ;for tests
5307 (propagated-inputs
5308 `(("python-jinja2" ,python-jinja2)))
5309 (arguments
5310 `(#:phases
5311 (modify-phases %standard-phases
5312 (delete 'check)
5313 (add-after 'install 'check
5314 (lambda* (#:key outputs inputs #:allow-other-keys)
5315 ;; fix honcho path in testsuite
5316 (substitute* "tests/conftest.py"
5317 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5318 "/bin/honcho" "'")))
5319 ;; It's easier to run tests after install.
5320 ;; Make installed package available for running the tests
5321 (add-installed-pythonpath inputs outputs)
5322 (invoke "py.test" "-v"))))))
5323 (home-page "https://github.com/nickstenning/honcho")
5324 (synopsis "Manage Procfile-based applications")
5325 (description
5326 "A Procfile is a file which describes how to run an application
5327 consisting of several processes. honcho starts all listed processes.
5328 The output of all running processes is collected by honcho and
5329 displayed.")
5330 (license license:expat)))
5331
5332 (define-public python2-honcho
5333 (package-with-python2 python-honcho))
5334
5335 (define-public python-pexpect
5336 (package
5337 (name "python-pexpect")
5338 (version "4.6.0")
5339 (source
5340 (origin
5341 (method url-fetch)
5342 (uri (pypi-uri "pexpect" version))
5343 (sha256
5344 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5345 (build-system python-build-system)
5346 (arguments
5347 `(#:phases
5348 (modify-phases %standard-phases
5349 (add-before 'check 'prepare-tests
5350 (lambda _
5351 (substitute* (find-files "tests")
5352 (("/bin/ls") (which "ls"))
5353 (("/bin/echo") (which "echo"))
5354 (("/bin/which") (which "which"))
5355 ;; Many tests try to use the /bin directory which
5356 ;; is not present in the build environment.
5357 ;; Use one that's non-empty and unlikely to change.
5358 (("/bin'") "/dev'"))
5359 ;; XXX: Socket connection test gets "Connection reset by peer".
5360 ;; Why does it not work? Delete for now.
5361 (delete-file "tests/test_socket.py")
5362 #t))
5363 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5364 (native-inputs
5365 `(("python-nose" ,python-nose)
5366 ("python-pytest" ,python-pytest)
5367 ("man-db" ,man-db)
5368 ("which" ,which)
5369 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5370 (propagated-inputs
5371 `(("python-ptyprocess" ,python-ptyprocess)))
5372 (home-page "http://pexpect.readthedocs.org/")
5373 (synopsis "Controlling interactive console applications")
5374 (description
5375 "Pexpect is a pure Python module for spawning child applications;
5376 controlling them; and responding to expected patterns in their output.
5377 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5378 child application and control it as if a human were typing commands.")
5379 (license license:isc)))
5380
5381 (define-public python2-pexpect
5382 (package-with-python2 python-pexpect))
5383
5384 (define-public python-setuptools-scm
5385 (package
5386 (name "python-setuptools-scm")
5387 (version "3.2.0")
5388 (source (origin
5389 (method url-fetch)
5390 (uri (pypi-uri "setuptools_scm" version))
5391 (sha256
5392 (base32
5393 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5394 (build-system python-build-system)
5395 (home-page "https://github.com/pypa/setuptools_scm/")
5396 (synopsis "Manage Python package versions in SCM metadata")
5397 (description
5398 "Setuptools_scm handles managing your Python package versions in
5399 @dfn{software configuration management} (SCM) metadata instead of declaring
5400 them as the version argument or in a SCM managed file.")
5401 (license license:expat)))
5402
5403 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
5404 (define-public python-setuptools-scm-3.3
5405 (package
5406 (inherit python-setuptools-scm)
5407 (version "3.3.3")
5408 (source (origin
5409 (method url-fetch)
5410 (uri (pypi-uri "setuptools_scm" version))
5411 (sha256
5412 (base32
5413 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5414
5415 (define-public python2-setuptools-scm
5416 (package-with-python2 python-setuptools-scm))
5417
5418 (define-public python-pathlib2
5419 (package
5420 (name "python-pathlib2")
5421 (version "2.3.3")
5422 (source
5423 (origin
5424 (method url-fetch)
5425 (uri (pypi-uri "pathlib2" version))
5426 (sha256
5427 (base32
5428 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5429 (build-system python-build-system)
5430 (propagated-inputs
5431 `(("python-scandir" ,python-scandir)
5432 ("python-six" ,python-six)))
5433 (home-page "https://pypi.org/project/pathlib2/")
5434 (synopsis "Object-oriented file system paths")
5435 (description "The goal of pathlib2 is to provide a backport of the
5436 standard @code{pathlib} module which tracks the standard library module, so
5437 all the newest features of the standard @code{pathlib} can be used also on
5438 older Python versions.")
5439 (license license:expat)))
5440
5441 (define-public python2-importlib-resources
5442 (package
5443 (name "python2-importlib-resources")
5444 (version "1.0.2")
5445 (source (origin
5446 (method url-fetch)
5447 (uri (pypi-uri "importlib_resources" version))
5448 (sha256
5449 (base32
5450 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5451 (build-system python-build-system)
5452 (arguments
5453 `(#:python ,python-2))
5454 (native-inputs
5455 `(("python-wheel" ,python2-wheel)))
5456 (propagated-inputs
5457 `(("python-pathlib2" ,python2-pathlib2)
5458 ("python-typing" ,python2-typing)))
5459 (home-page "https://gitlab.com/python-devs/importlib_resources")
5460 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5461 (description
5462 "This package provides an implementation of @code{importlib.resources}
5463 for older versions of Python.")
5464 (license license:asl2.0)))
5465
5466 (define-public python-importlib-metadata
5467 (package
5468 (name "python-importlib-metadata")
5469 (version "1.4.0")
5470 (source
5471 (origin
5472 (method url-fetch)
5473 (uri (pypi-uri "importlib_metadata" version))
5474 (sha256
5475 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
5476 (build-system python-build-system)
5477 (propagated-inputs
5478 `(("python-zipp" ,python-zipp)))
5479 (native-inputs
5480 `(("python-setuptools-scm" ,python-setuptools-scm)
5481 ("python-packaging" ,python-packaging)))
5482 (home-page "https://importlib-metadata.readthedocs.io/")
5483 (synopsis "Read metadata from Python packages")
5484 (description
5485 "@code{importlib_metadata} is a library which provides an API for
5486 accessing an installed Python package's metadata, such as its entry points or
5487 its top-level name. This functionality intends to replace most uses of
5488 @code{pkg_resources} entry point API and metadata API. Along with
5489 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5490 need to use the older and less efficient @code{pkg_resources} package.")
5491 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5492 (license license:asl2.0)))
5493
5494 (define-public python2-importlib-metadata
5495 (let ((base (package-with-python2 (strip-python2-variant
5496 python-importlib-metadata))))
5497 (package/inherit
5498 base
5499 (name "python2-importlib-metadata")
5500 (propagated-inputs
5501 `(("python-configparser" ,python2-configparser)
5502 ("python-contextlib2" ,python2-contextlib2)
5503 ("python-importlib-resources" ,python2-importlib-resources)
5504 ("python-pathlib2" ,python2-pathlib2)
5505 ,@(package-propagated-inputs base))))))
5506
5507 (define-public python-jaraco-packaging
5508 (package
5509 (name "python-jaraco-packaging")
5510 (version "6.1")
5511 (source
5512 (origin
5513 (method url-fetch)
5514 (uri (pypi-uri "jaraco.packaging" version))
5515 (sha256
5516 (base32
5517 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5518 (build-system python-build-system)
5519 (propagated-inputs
5520 `(("python-pytest" ,python-pytest)
5521 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5522 ("python-pytest-flake8" ,python-pytest-flake8)
5523 ("python-rst.linker" ,python-rst.linker)
5524 ("python-setuptools" ,python-setuptools)
5525 ("python-setuptools-scm" ,python-setuptools-scm)
5526 ("python-six" ,python-six)
5527 ("python-sphinx" ,python-sphinx)))
5528 (home-page "https://github.com/jaraco/jaraco.packaging")
5529 (synopsis "Tools to supplement packaging Python releases")
5530 (description
5531 "This package provides various tools to supplement packaging Python
5532 releases.")
5533 (license license:expat)))
5534
5535 (define-public python-pathpy
5536 (package
5537 (name "python-pathpy")
5538 (version "11.5.1")
5539 (source
5540 (origin
5541 (method url-fetch)
5542 (uri (pypi-uri "path.py" version))
5543 (sha256
5544 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5545 (outputs '("out" "doc"))
5546 (build-system python-build-system)
5547 (propagated-inputs
5548 `(("python-appdirs" ,python-appdirs)
5549 ("python-importlib-metadata" ,python-importlib-metadata)))
5550 (native-inputs
5551 `(("python-setuptools-scm" ,python-setuptools-scm)
5552 ("python-sphinx" ,python-sphinx)
5553 ("python-rst.linker" ,python-rst.linker)
5554 ("python-pytest" ,python-pytest)
5555 ("python-pytest-runner" ,python-pytest-runner)
5556 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5557 (arguments
5558 `(#:phases
5559 (modify-phases %standard-phases
5560 (add-after 'build 'build-doc
5561 (lambda _
5562 (setenv "LANG" "en_US.UTF-8")
5563 (invoke "python" "setup.py" "build_sphinx")))
5564 (add-after 'install 'install-doc
5565 (lambda* (#:key outputs #:allow-other-keys)
5566 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5567 (doc (string-append data "/doc/" ,name "-" ,version))
5568 (html (string-append doc "/html")))
5569 (mkdir-p html)
5570 (for-each (lambda (file)
5571 (copy-file file (string-append doc "/" file)))
5572 '("README.rst" "CHANGES.rst"))
5573 (copy-recursively "build/sphinx/html" html)
5574 #t)))
5575 (replace 'check
5576 (lambda _
5577 ;; The import time test aborts if an import takes longer than
5578 ;; 100ms. It may very well take a little longer than that.
5579 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5580 (home-page "https://github.com/jaraco/path.py")
5581 (synopsis "Python module wrapper for built-in os.path")
5582 (description
5583 "@code{path.py} implements path objects as first-class entities, allowing
5584 common operations on files to be invoked on those path objects directly.")
5585 (license license:expat)))
5586
5587 (define-public python2-pathpy
5588 (package-with-python2 python-pathpy))
5589
5590 (define-public python-simplegeneric
5591 (package
5592 (name "python-simplegeneric")
5593 (version "0.8.1")
5594 (source
5595 (origin
5596 (method url-fetch)
5597 (uri (pypi-uri "simplegeneric" version ".zip"))
5598 (sha256
5599 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5600 (build-system python-build-system)
5601 (native-inputs
5602 `(("unzip" ,unzip)))
5603 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5604 (synopsis "Python module for simple generic functions")
5605 (description
5606 "The simplegeneric module lets you define simple single-dispatch generic
5607 functions, akin to Python’s built-in generic functions like @code{len()},
5608 @code{iter()} and so on. However, instead of using specially-named methods,
5609 these generic functions use simple lookup tables, akin to those used by
5610 e.g. @code{pickle.dump()} and other generic functions found in the Python
5611 standard library.")
5612 (license license:zpl2.1)))
5613
5614 (define-public python2-simplegeneric
5615 (package-with-python2 python-simplegeneric))
5616
5617 (define-public python-ipython-genutils
5618 ;; TODO: This package is retired, check if can be removed, see description.
5619 (package
5620 (name "python-ipython-genutils")
5621 (version "0.1.0")
5622 (source
5623 (origin
5624 (method url-fetch)
5625 (uri (pypi-uri "ipython_genutils" version))
5626 (sha256
5627 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5628 (build-system python-build-system)
5629 (arguments `(#:tests? #f)) ; no tests
5630 (home-page "https://ipython.org")
5631 (synopsis "Vestigial utilities from IPython")
5632 (description
5633 "This package provides retired utilities from IPython. No packages
5634 outside IPython/Jupyter should depend on it.
5635
5636 This package shouldn't exist. It contains some common utilities shared by
5637 Jupyter and IPython projects during The Big Split. As soon as possible, those
5638 packages will remove their dependency on this, and this package will go
5639 away.")
5640 (license license:bsd-3)))
5641
5642 (define-public python2-ipython-genutils
5643 (package-with-python2 python-ipython-genutils))
5644
5645 (define-public python-traitlets
5646 (package
5647 (name "python-traitlets")
5648 (version "4.3.3")
5649 (source
5650 (origin
5651 (method url-fetch)
5652 (uri (pypi-uri "traitlets" version))
5653 (sha256
5654 (base32
5655 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5656 (build-system python-build-system)
5657 (arguments
5658 `(#:phases
5659 (modify-phases %standard-phases
5660 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5661 (propagated-inputs
5662 `(("python-ipython-genutils" ,python-ipython-genutils)
5663 ("python-decorator" ,python-decorator)))
5664 (native-inputs
5665 `(("python-pytest" ,python-pytest)))
5666 (properties `((python2-variant . ,(delay python2-traitlets))))
5667 (home-page "https://ipython.org")
5668 (synopsis "Configuration system for Python applications")
5669 (description
5670 "Traitlets is a framework that lets Python classes have attributes with
5671 type checking, dynamically calculated default values, and ‘on change’
5672 callbacks. The package also includes a mechanism to use traitlets for
5673 configuration, loading values from files or from command line arguments. This
5674 is a distinct layer on top of traitlets, so you can use traitlets in your code
5675 without using the configuration machinery.")
5676 (license license:bsd-3)))
5677
5678 (define-public python2-traitlets
5679 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5680 (package
5681 (inherit traitlets)
5682 (propagated-inputs
5683 `(("python2-enum34" ,python2-enum34)
5684 ,@(package-propagated-inputs traitlets))))))
5685
5686 (define-public python-jupyter-core
5687 (package
5688 (name "python-jupyter-core")
5689 (version "4.4.0")
5690 (source
5691 (origin
5692 (method url-fetch)
5693 (uri (string-append (pypi-uri "jupyter_core" version)))
5694 (sha256
5695 (base32
5696 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5697 (build-system python-build-system)
5698 ;; FIXME: not sure how to run the tests
5699 (arguments `(#:tests? #f))
5700 (propagated-inputs
5701 `(("python-traitlets" ,python-traitlets)))
5702 (home-page "http://jupyter.org/")
5703 (synopsis "Jupyter base package")
5704 (description
5705 "Jupyter core is the base package on which Jupyter projects rely.")
5706 (license license:bsd-3)))
5707
5708 (define-public python2-jupyter-core
5709 (package-with-python2 python-jupyter-core))
5710
5711 (define-public python-jupyter-client
5712 (package
5713 (name "python-jupyter-client")
5714 (version "5.2.4")
5715 (source
5716 (origin
5717 (method url-fetch)
5718 (uri (pypi-uri "jupyter_client" version))
5719 (sha256
5720 (base32
5721 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5722 (build-system python-build-system)
5723 ;; Tests fail because of missing native python kernel which I assume is
5724 ;; provided by the ipython package, which we cannot use because it would
5725 ;; cause a dependency cycle.
5726 (arguments
5727 `(#:tests? #f
5728
5729 #:phases (modify-phases %standard-phases
5730 (add-after 'unpack 'set-tool-file-names
5731 (lambda* (#:key inputs #:allow-other-keys)
5732 (let ((iproute (assoc-ref inputs "iproute")))
5733 (substitute* "jupyter_client/localinterfaces.py"
5734 (("'ip'")
5735 (string-append "'" iproute "/sbin/ip'")))
5736 #t))))))
5737 (inputs
5738 `(("iproute" ,iproute)))
5739 (propagated-inputs
5740 `(("python-pyzmq" ,python-pyzmq)
5741 ("python-traitlets" ,python-traitlets)
5742 ("python-jupyter-core" ,python-jupyter-core)))
5743 (home-page "http://jupyter.org/")
5744 (synopsis "Jupyter protocol implementation and client libraries")
5745 (description
5746 "The @code{jupyter_client} package contains the reference implementation
5747 of the Jupyter protocol. It also provides client and kernel management APIs
5748 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5749 installing @code{kernelspec}s for use with Jupyter frontends.")
5750 (license license:bsd-3)))
5751
5752 (define-public python2-jupyter-client
5753 (package-with-python2 python-jupyter-client))
5754
5755 (define-public python-ipykernel
5756 (package
5757 (name "python-ipykernel")
5758 (version "5.1.3")
5759 (source
5760 (origin
5761 (method url-fetch)
5762 (uri (pypi-uri "ipykernel" version))
5763 (sha256
5764 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5765 (build-system python-build-system)
5766 (arguments
5767 `(#:phases
5768 (modify-phases %standard-phases
5769 (replace 'check
5770 (lambda _
5771 (setenv "HOME" "/tmp")
5772 (invoke "pytest" "-v")
5773 #t))
5774 (add-after 'install 'set-python-file-name
5775 (lambda* (#:key outputs #:allow-other-keys)
5776 ;; Record the absolute file name of the 'python' executable in
5777 ;; 'kernel.json'.
5778 (let ((out (assoc-ref outputs "out")))
5779 (substitute* (string-append out "/share/jupyter"
5780 "/kernels/python3/kernel.json")
5781 (("\"python\"")
5782 (string-append "\"" (which "python") "\"")))
5783 #t))))))
5784 (propagated-inputs
5785 `(("python-ipython" ,python-ipython)
5786 ;; imported at runtime during connect
5787 ("python-jupyter-client" ,python-jupyter-client)))
5788 (native-inputs
5789 `(("python-flaky" ,python-flaky)
5790 ("python-nose" ,python-nose)
5791 ("python-pytest" ,python-pytest)))
5792 (home-page "https://ipython.org")
5793 (synopsis "IPython Kernel for Jupyter")
5794 (description
5795 "This package provides the IPython kernel for Jupyter.")
5796 (properties `((python2-variant . ,(delay python2-ipykernel))))
5797 (license license:bsd-3)))
5798
5799 ;; Version 5.x and above no longer support Python 2.
5800 (define-public python2-ipykernel
5801 (package
5802 (name "python2-ipykernel")
5803 (version "4.10.1")
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (pypi-uri "ipykernel" version))
5808 (sha256
5809 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
5810 (build-system python-build-system)
5811 (arguments
5812 `(#:python ,python-2))
5813 (propagated-inputs
5814 `(("python2-ipython" ,python2-ipython)
5815 ;; imported at runtime during connect
5816 ("python2-jupyter-client" ,python2-jupyter-client)
5817 ("python2-tornado" ,python2-tornado)
5818 ("python2-traitlets" ,python2-traitlets)))
5819 (native-inputs
5820 `(("python2-mock" ,python2-mock)
5821 ("python2-nose" ,python2-nose)
5822 ("python2-pytest" ,python2-pytest)
5823 ("python2-pytest-cov" ,python2-pytest-cov)))
5824 (home-page "https://ipython.org")
5825 (synopsis "IPython Kernel for Jupyter")
5826 (description
5827 "This package provides the IPython kernel for Jupyter.")
5828 (license license:bsd-3)))
5829
5830 (define-public python-pari-jupyter
5831 (package
5832 (name "python-pari-jupyter")
5833 (version "1.3.2")
5834 (source
5835 (origin
5836 (method url-fetch)
5837 (uri (pypi-uri "pari_jupyter" version))
5838 (sha256
5839 (base32
5840 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5841 (build-system python-build-system)
5842 (propagated-inputs
5843 `(("python-ipykernel" ,python-ipykernel)))
5844 (inputs
5845 `(("pari-gp" ,pari-gp)
5846 ("readline" ,readline)))
5847 (arguments
5848 `(#:tests? #f)) ; no test suite
5849 (home-page
5850 "https://github.com/jdemeyer/pari_jupyter")
5851 (synopsis "A Jupyter kernel for PARI/GP")
5852 (description "The package provides a PARI/GP kernel for Jupyter.")
5853 (license license:gpl3+)))
5854
5855 (define-public python-backcall
5856 (package
5857 (name "python-backcall")
5858 (version "0.1.0")
5859 (source
5860 (origin
5861 (method url-fetch)
5862 (uri (pypi-uri "backcall" version))
5863 (sha256
5864 (base32
5865 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5866 (build-system python-build-system)
5867 (home-page "https://github.com/takluyver/backcall/")
5868 (synopsis "Specifications for callback functions passed in to an API")
5869 (description
5870 "If your code lets other people supply callback functions, it's important
5871 to specify the function signature you expect, and check that functions support
5872 that. Adding extra parameters later would break other peoples code unless
5873 you're careful. The @code{backcall} package provides a way of specifying the
5874 callback signature using a prototype function.")
5875 (license license:bsd-3)))
5876
5877 (define-public python-ipython
5878 (package
5879 (name "python-ipython")
5880 (version "7.9.0")
5881 (source
5882 (origin
5883 (method url-fetch)
5884 (uri (pypi-uri "ipython" version ".tar.gz"))
5885 (sha256
5886 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5887 (build-system python-build-system)
5888 (propagated-inputs
5889 `(("python-backcall" ,python-backcall)
5890 ("python-pyzmq" ,python-pyzmq)
5891 ("python-prompt-toolkit" ,python-prompt-toolkit)
5892 ("python-terminado" ,python-terminado)
5893 ("python-matplotlib" ,python-matplotlib)
5894 ("python-numpy" ,python-numpy)
5895 ("python-numpydoc" ,python-numpydoc)
5896 ("python-jedi" ,python-jedi)
5897 ("python-jinja2" ,python-jinja2)
5898 ("python-mistune" ,python-mistune)
5899 ("python-pexpect" ,python-pexpect)
5900 ("python-pickleshare" ,python-pickleshare)
5901 ("python-simplegeneric" ,python-simplegeneric)
5902 ("python-jsonschema" ,python-jsonschema)
5903 ("python-traitlets" ,python-traitlets)
5904 ("python-nbformat" ,python-nbformat)
5905 ("python-pygments" ,python-pygments)))
5906 (inputs
5907 `(("readline" ,readline)
5908 ("which" ,which)))
5909 (native-inputs
5910 `(("graphviz" ,graphviz)
5911 ("pkg-config" ,pkg-config)
5912 ("python-requests" ,python-requests) ;; for tests
5913 ("python-testpath" ,python-testpath)
5914 ("python-nose" ,python-nose)))
5915 (arguments
5916 `(#:phases
5917 (modify-phases %standard-phases
5918 (add-after 'unpack 'make-docs-reproducible
5919 (lambda _
5920 (substitute* "IPython/sphinxext/ipython_directive.py"
5921 ((".*import datetime") "")
5922 ((".*datetime.datetime.now\\(\\)") "")
5923 (("%timeit") "# %timeit"))
5924 #t))
5925 ;; Tests can only be run after the library has been installed and not
5926 ;; within the source directory.
5927 (delete 'check)
5928 (add-after 'install 'check
5929 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5930 (if tests?
5931 (begin
5932 ;; Make installed package available for running the tests
5933 (add-installed-pythonpath inputs outputs)
5934 (setenv "HOME" "/tmp/") ;; required by a test
5935 ;; We only test the core because one of the other tests
5936 ;; tries to import ipykernel.
5937 (invoke "python" "IPython/testing/iptest.py"
5938 "-v" "IPython/core/tests"))
5939 #t)))
5940 (add-before 'check 'fix-tests
5941 (lambda* (#:key inputs #:allow-other-keys)
5942 (substitute* "./IPython/utils/_process_posix.py"
5943 (("/usr/bin/env', 'which") (which "which")))
5944 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5945 (("#!/usr/bin/env python")
5946 (string-append "#!" (which "python"))))
5947 ;; This test introduces a circular dependency on ipykernel
5948 ;; (which depends on ipython).
5949 (delete-file "IPython/core/tests/test_display.py")
5950 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5951 (delete-file "IPython/core/tests/test_interactiveshell.py")
5952 #t)))))
5953 (home-page "https://ipython.org")
5954 (synopsis "IPython is a tool for interactive computing in Python")
5955 (description
5956 "IPython provides a rich architecture for interactive computing with:
5957 Powerful interactive shells, a browser-based notebook, support for interactive
5958 data visualization, embeddable interpreters and tools for parallel
5959 computing.")
5960 (properties `((python2-variant . ,(delay python2-ipython))))
5961 (license license:bsd-3)))
5962
5963 ;; This is the latest release of the LTS version of ipython with support for
5964 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5965 ;; dropped support for Python 2.7.
5966 (define-public python2-ipython
5967 (package
5968 (name "python2-ipython")
5969 (version "5.8.0")
5970 (source
5971 (origin
5972 (method url-fetch)
5973 (uri (pypi-uri "ipython" version ".tar.gz"))
5974 (sha256
5975 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5976 (build-system python-build-system)
5977 (propagated-inputs
5978 `(("python2-backports-shutil-get-terminal-size"
5979 ,python2-backports-shutil-get-terminal-size)
5980 ("python2-pathlib2" ,python2-pathlib2)
5981 ("python2-pyzmq" ,python2-pyzmq)
5982 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5983 ("python2-terminado" ,python2-terminado)
5984 ("python2-matplotlib" ,python2-matplotlib)
5985 ("python2-numpy" ,python2-numpy)
5986 ("python2-numpydoc" ,python2-numpydoc)
5987 ("python2-jinja2" ,python2-jinja2)
5988 ("python2-mistune" ,python2-mistune)
5989 ("python2-pexpect" ,python2-pexpect)
5990 ("python2-pickleshare" ,python2-pickleshare)
5991 ("python2-simplegeneric" ,python2-simplegeneric)
5992 ("python2-jsonschema" ,python2-jsonschema)
5993 ("python2-traitlets" ,python2-traitlets)
5994 ("python2-nbformat" ,python2-nbformat)
5995 ("python2-pygments" ,python2-pygments)))
5996 (inputs
5997 `(("readline" ,readline)
5998 ("which" ,which)))
5999 (native-inputs
6000 `(("graphviz" ,graphviz)
6001 ("pkg-config" ,pkg-config)
6002 ("python2-requests" ,python2-requests) ;; for tests
6003 ("python2-testpath" ,python2-testpath)
6004 ("python2-mock" ,python2-mock)
6005 ("python2-nose" ,python2-nose)))
6006 (arguments
6007 `(#:python ,python-2
6008 #:phases
6009 (modify-phases %standard-phases
6010 (add-before 'check 'delete-broken-tests
6011 (lambda* (#:key inputs #:allow-other-keys)
6012 ;; These tests throw errors for unknown reasons.
6013 (delete-file "IPython/core/tests/test_displayhook.py")
6014 (delete-file "IPython/core/tests/test_magic_terminal.py")
6015 (delete-file "IPython/core/tests/test_profile.py")
6016 #t)))))
6017 (home-page "https://ipython.org")
6018 (synopsis "IPython is a tool for interactive computing in Python")
6019 (description
6020 "IPython provides a rich architecture for interactive computing with:
6021 Powerful interactive shells, a browser-based notebook, support for interactive
6022 data visualization, embeddable interpreters and tools for parallel
6023 computing.")
6024 (license license:bsd-3)))
6025
6026 (define-public python-ipython-documentation
6027 (package
6028 (inherit python-ipython)
6029 (name "python-ipython-documentation")
6030 (version (package-version python-ipython))
6031 (arguments
6032 `(#:phases
6033 (modify-phases %standard-phases
6034 (delete 'build)
6035 (delete 'check)
6036 (replace 'install
6037 (lambda* (#:key outputs #:allow-other-keys)
6038 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6039 (doc (string-append data "/doc/" ,name "-" ,version))
6040 (html (string-append doc "/html"))
6041 (man1 (string-append data "/man/man1"))
6042 (info (string-append data "/info"))
6043 (examples (string-append doc "/examples"))
6044 (python-arg (string-append "PYTHON=" (which "python"))))
6045 (setenv "LANG" "en_US.utf8")
6046 (with-directory-excursion "docs"
6047 ;; FIXME: pdf fails to build
6048 ;;(system* "make" "pdf" "PAPER=a4")
6049 (system* "make" python-arg "html")
6050 ;; FIXME: the generated texi file contains ^@^@, which trips
6051 ;; up the parser.
6052 ;; (system* "make" python-arg "info")
6053 )
6054 (copy-recursively "docs/man" man1)
6055 (copy-recursively "examples" examples)
6056 (copy-recursively "docs/build/html" html)
6057 ;; (copy-file "docs/build/latex/ipython.pdf"
6058 ;; (string-append doc "/ipython.pdf"))
6059 (mkdir-p info)
6060 ;; (copy-file "docs/build/texinfo/ipython.info"
6061 ;; (string-append info "/ipython.info"))
6062 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6063 #t)))))
6064 (inputs
6065 `(("python-ipython" ,python-ipython)
6066 ("python-ipykernel" ,python-ipykernel)))
6067 (native-inputs
6068 `(("python-sphinx" ,python-sphinx)
6069 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6070 ;; FIXME: It's possible that a smaller union would work just as well.
6071 ("texlive" ,(texlive-union (list texlive-amsfonts
6072 texlive-fonts-ec
6073 texlive-generic-ifxetex
6074 texlive-generic-pdftex
6075 texlive-latex-capt-of
6076 texlive-latex-cmap
6077 texlive-latex-environ
6078 texlive-latex-eqparbox
6079 texlive-latex-etoolbox
6080 texlive-latex-expdlist
6081 texlive-latex-fancyhdr
6082 texlive-latex-fancyvrb
6083 texlive-latex-fncychap
6084 texlive-latex-float
6085 texlive-latex-framed
6086 texlive-latex-geometry
6087 texlive-latex-graphics
6088 texlive-latex-hyperref
6089 texlive-latex-mdwtools
6090 texlive-latex-multirow
6091 texlive-latex-needspace
6092 texlive-latex-oberdiek
6093 texlive-latex-parskip
6094 texlive-latex-preview
6095 texlive-latex-tabulary
6096 texlive-latex-threeparttable
6097 texlive-latex-titlesec
6098 texlive-latex-trimspaces
6099 texlive-latex-ucs
6100 texlive-latex-upquote
6101 texlive-latex-url
6102 texlive-latex-varwidth
6103 texlive-latex-wrapfig)))
6104 ("texinfo" ,texinfo)))))
6105
6106 (define-public python-urwid
6107 (package
6108 (name "python-urwid")
6109 (version "2.0.1")
6110 (source
6111 (origin
6112 (method url-fetch)
6113 (uri (pypi-uri "urwid" version))
6114 (sha256
6115 (base32
6116 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
6117 (build-system python-build-system)
6118 (home-page "http://urwid.org")
6119 (synopsis "Console user interface library for Python")
6120 (description
6121 "Urwid is a curses-based UI/widget library for Python. It includes many
6122 features useful for text console applications.")
6123 (license license:lgpl2.1+)))
6124
6125 (define-public python2-urwid
6126 (package-with-python2 python-urwid))
6127
6128 (define-public python-urwidtrees
6129 (package
6130 (name "python-urwidtrees")
6131 (version "1.0.2")
6132 (source
6133 (origin
6134 (method git-fetch)
6135 ;; package author intends on distributing via github rather than pypi:
6136 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6137 (uri (git-reference
6138 (url "https://github.com/pazz/urwidtrees")
6139 (commit version)))
6140 (file-name (git-file-name name version))
6141 (sha256
6142 (base32
6143 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
6144 (build-system python-build-system)
6145 (arguments
6146 '(#:use-setuptools? #f
6147 #:tests? #f)) ; no tests
6148 (propagated-inputs `(("python-urwid" ,python-urwid)))
6149 (home-page "https://github.com/pazz/urwidtrees")
6150 (synopsis "Tree widgets for urwid")
6151 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6152 toolkit. Use it to build trees of widgets.")
6153 (license license:gpl3+)))
6154
6155 (define-public python2-urwidtrees
6156 (package-with-python2 python-urwidtrees))
6157
6158 (define-public python-ua-parser
6159 (package
6160 (name "python-ua-parser")
6161 (version "0.8.0")
6162 (source
6163 (origin
6164 (method url-fetch)
6165 (uri (pypi-uri "ua-parser" version))
6166 (sha256
6167 (base32
6168 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
6169 (build-system python-build-system)
6170 (arguments
6171 `(#:tests? #f)) ;no test suite in release
6172 (native-inputs
6173 `(("python-pyyaml" ,python-pyyaml)))
6174 (home-page "https://github.com/ua-parser/uap-python")
6175 (synopsis "User agent parser")
6176 (description
6177 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
6178 (license license:asl2.0)))
6179
6180 (define-public python2-ua-parser
6181 (package-with-python2 python-ua-parser))
6182
6183 (define-public python-user-agents
6184 (package
6185 (name "python-user-agents")
6186 (version "1.1.0")
6187 (source
6188 (origin
6189 (method url-fetch)
6190 (uri (pypi-uri "user-agents" version))
6191 (sha256
6192 (base32
6193 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
6194 (build-system python-build-system)
6195 (arguments
6196 `(#:tests? #f)) ;missing devices.json test file in release
6197 (propagated-inputs
6198 `(("python-ua-parser" ,python-ua-parser)))
6199 (home-page "https://github.com/selwin/python-user-agents")
6200 (synopsis "User Agent strings parsing library")
6201 (description
6202 "A library to identify devices (phones, tablets) and their capabilities by
6203 parsing (browser/HTTP) user agent strings.")
6204 (license license:expat)))
6205
6206 (define-public python2-user-agents
6207 (package-with-python2 python-user-agents))
6208
6209 (define-public python-dbus
6210 (package
6211 (name "python-dbus")
6212 (version "1.2.14")
6213 (source
6214 (origin
6215 (method url-fetch)
6216 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
6217 "dbus-python-" version ".tar.gz"))
6218 (sha256
6219 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
6220 (build-system gnu-build-system)
6221 (native-inputs
6222 `(("pkg-config" ,pkg-config)))
6223 (inputs
6224 `(("python" ,python-wrapper)
6225 ("dbus-glib" ,dbus-glib)))
6226 (synopsis "Python bindings for D-bus")
6227 (description "python-dbus provides bindings for libdbus, the reference
6228 implementation of D-Bus.")
6229 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
6230 (license license:expat)))
6231
6232 (define-public python2-dbus
6233 (package (inherit python-dbus)
6234 (name "python2-dbus")
6235 (inputs `(("python" ,python-2)
6236 ,@(alist-delete "python"
6237 (package-inputs python-dbus)
6238 equal?)))))
6239
6240 (define-public python-notify2
6241 (package
6242 (name "python-notify2")
6243 (version "0.3.1")
6244 (source
6245 (origin
6246 (method url-fetch)
6247 (uri (pypi-uri "notify2" version))
6248 (sha256
6249 (base32
6250 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
6251 (build-system python-build-system)
6252 (arguments `(#:tests? #f)) ; tests depend on system state
6253 (native-inputs
6254 `(("python-dbus" ,python-dbus)))
6255 (home-page "https://bitbucket.org/takluyver/pynotify2")
6256 (synopsis "Python interface to D-Bus notifications")
6257 (description
6258 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6259 It is a reimplementation of pynotify in pure Python, and an alternative to
6260 the GObject Introspection bindings to libnotify for non-GTK applications.")
6261 (license (list license:bsd-2
6262 license:lgpl2.1+))))
6263
6264 (define-public python2-notify2
6265 (package-with-python2 python-notify2))
6266
6267 ;; beautifulsoup4 has a totally different namespace than 3.x,
6268 ;; and pypi seems to put it under its own name, so I guess we should too
6269 (define-public python-beautifulsoup4
6270 (package
6271 (name "python-beautifulsoup4")
6272 (version "4.7.1")
6273 (source
6274 (origin
6275 (method url-fetch)
6276 (uri (pypi-uri "beautifulsoup4" version))
6277 (sha256
6278 (base32
6279 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
6280 (build-system python-build-system)
6281 (arguments
6282 `(#:phases
6283 (modify-phases %standard-phases
6284 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6285 ;; must use this conversion script when building with Python 3. The
6286 ;; conversion script also runs the tests.
6287 ;; For more information, see the file 'convert-py3k' in the source
6288 ;; distribution.
6289 (replace 'check
6290 (lambda _ (invoke "./convert-py3k"))))))
6291 (propagated-inputs
6292 `(("python-soupsieve" ,python-soupsieve)))
6293 (home-page
6294 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6295 (synopsis
6296 "Python screen-scraping library")
6297 (description
6298 "Beautiful Soup is a Python library designed for rapidly setting up
6299 screen-scraping projects. It offers Pythonic idioms for navigating,
6300 searching, and modifying a parse tree, providing a toolkit for
6301 dissecting a document and extracting what you need. It automatically
6302 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6303 (license license:expat)
6304 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6305
6306 (define-public python2-beautifulsoup4
6307 (package
6308 (inherit (package-with-python2
6309 (strip-python2-variant python-beautifulsoup4)))
6310 (arguments `(#:python ,python-2))))
6311
6312 (define-public python-soupsieve
6313 (package
6314 (name "python-soupsieve")
6315 (version "1.9.5")
6316 (source
6317 (origin
6318 (method url-fetch)
6319 (uri (pypi-uri "soupsieve" version))
6320 (sha256
6321 (base32
6322 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
6323 (build-system python-build-system)
6324 (arguments `(#:tests? #f))
6325 ;;XXX: 2 tests fail currently despite claming they were to be
6326 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6327 ;;don't want to create a circular dependency.
6328 (home-page "https://github.com/facelessuser/soupsieve")
6329 (synopsis "CSS selector library")
6330 (description
6331 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6332 Soup 4. It aims to provide selecting, matching, and filtering using modern
6333 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6334 specifications up through the latest CSS level 4 drafts and beyond (though
6335 some are not yet implemented).")
6336 (properties `((python2-variant . ,(delay python2-soupsieve))))
6337 (license license:expat)))
6338
6339 (define-public python2-soupsieve
6340 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6341 (package
6342 (inherit base)
6343 (propagated-inputs
6344 `(("python2-backports-functools-lru-cache"
6345 ,python2-backports-functools-lru-cache)
6346 ,@(package-propagated-inputs base))))))
6347
6348 (define-public python-netifaces
6349 (package
6350 (name "python-netifaces")
6351 (version "0.10.7")
6352 (source
6353 (origin
6354 (method url-fetch)
6355 (uri (pypi-uri "netifaces" version))
6356 (sha256
6357 (base32
6358 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6359 (build-system python-build-system)
6360 (home-page "https://github.com/al45tair/netifaces")
6361 (synopsis
6362 "Python module for portable network interface information")
6363 (description
6364 "Netifaces is a Python module providing information on network
6365 interfaces in an easy and portable manner.")
6366 (license license:expat)))
6367
6368 (define-public python2-netifaces
6369 (package-with-python2 python-netifaces))
6370
6371 (define-public python-networkx
6372 (package
6373 (name "python-networkx")
6374 (version "2.4")
6375 (source
6376 (origin
6377 (method url-fetch)
6378 (uri (pypi-uri "networkx" version))
6379 (sha256
6380 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
6381 (build-system python-build-system)
6382 (arguments
6383 '(#:phases (modify-phases %standard-phases
6384 (replace 'check
6385 (lambda* (#:key tests? #:allow-other-keys)
6386 (if tests?
6387 (invoke "pytest" "-vv" "--pyargs" "networkx")
6388 (format #t "test suite not run~%"))
6389 #t)))))
6390 ;; python-decorator is needed at runtime.
6391 (propagated-inputs
6392 `(("python-decorator" ,python-decorator)))
6393 (native-inputs
6394 `(("python-pytest" ,python-pytest)))
6395 (home-page "https://networkx.github.io/")
6396 (synopsis "Python module for creating and manipulating graphs and networks")
6397 (description
6398 "NetworkX is a Python package for the creation, manipulation, and study
6399 of the structure, dynamics, and functions of complex networks.")
6400 (properties `((python2-variant . ,(delay python2-networkx))))
6401 (license license:bsd-3)))
6402
6403 ;; NetworkX 2.2 is the last version with support for Python 2.
6404 (define-public python2-networkx
6405 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
6406 (package
6407 (inherit base)
6408 (version "2.2")
6409 (source (origin
6410 (method url-fetch)
6411 (uri (pypi-uri "networkx" version ".zip"))
6412 (sha256
6413 (base32
6414 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6415 (arguments
6416 `(#:python ,python-2))
6417 (native-inputs
6418 `(("python-nose" ,python2-nose)
6419 ("unzip" ,unzip))))))
6420
6421 (define-public python-datrie
6422 (package
6423 (name "python-datrie")
6424 (version "0.8")
6425 (source
6426 (origin
6427 (method url-fetch)
6428 (uri (pypi-uri "datrie" version))
6429 (sha256
6430 (base32
6431 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6432 (build-system python-build-system)
6433 (native-inputs
6434 `(("python-cython" ,python-cython)
6435 ("python-hypothesis" ,python-hypothesis)
6436 ("python-pytest" ,python-pytest)
6437 ("python-pytest-runner" ,python-pytest-runner)))
6438 (home-page "https://github.com/kmike/datrie")
6439 (synopsis "Fast, efficiently stored trie for Python")
6440 (description
6441 "This package provides a fast, efficiently stored trie implementation for
6442 Python.")
6443 (license license:lgpl2.1+)))
6444
6445 (define-public snakemake
6446 (package
6447 (name "snakemake")
6448 (version "5.7.1")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (pypi-uri "snakemake" version))
6453 (sha256
6454 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6455 (build-system python-build-system)
6456 (arguments
6457 ;; TODO: Package missing test dependencies.
6458 '(#:tests? #f
6459 #:phases
6460 (modify-phases %standard-phases
6461 ;; For cluster execution Snakemake will call Python. Since there is
6462 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6463 ;; this by calling the snakemake wrapper instead.
6464 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6465 (lambda* (#:key outputs #:allow-other-keys)
6466 (substitute* "snakemake/executors.py"
6467 (("\\{sys.executable\\} -m snakemake")
6468 (string-append (assoc-ref outputs "out")
6469 "/bin/snakemake")))
6470 #t)))))
6471 (propagated-inputs
6472 `(("python-appdirs" ,python-appdirs)
6473 ("python-configargparse" ,python-configargparse)
6474 ("python-datrie" ,python-datrie)
6475 ("python-docutils" ,python-docutils)
6476 ("python-gitpython" ,python-gitpython)
6477 ("python-jinja2" ,python-jinja2)
6478 ("python-jsonschema" ,python-jsonschema)
6479 ("python-networkx" ,python-networkx)
6480 ("python-psutil" ,python-psutil)
6481 ("python-pyyaml" ,python-pyyaml)
6482 ("python-ratelimiter" ,python-ratelimiter)
6483 ("python-requests" ,python-requests)
6484 ("python-wrapt" ,python-wrapt)))
6485 (home-page "https://snakemake.readthedocs.io")
6486 (synopsis "Python-based execution environment for make-like workflows")
6487 (description
6488 "Snakemake aims to reduce the complexity of creating workflows by
6489 providing a clean and modern domain specific specification language (DSL) in
6490 Python style, together with a fast and comfortable execution environment.")
6491 (license license:expat)))
6492
6493 (define-public python-pyqrcode
6494 (package
6495 (name "python-pyqrcode")
6496 (version "1.2.1")
6497 (source
6498 (origin
6499 (method url-fetch)
6500 (uri (pypi-uri "PyQRCode" version))
6501 (sha256
6502 (base32
6503 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6504 (build-system python-build-system)
6505 (home-page
6506 "https://github.com/mnooner256/pyqrcode")
6507 (synopsis "QR code generator")
6508 (description
6509 "Pyqrcode is a QR code generator written purely in Python with
6510 SVG, EPS, PNG and terminal output.")
6511 (license license:bsd-3)))
6512
6513 (define-public python-seaborn
6514 (package
6515 (name "python-seaborn")
6516 (version "0.10.0")
6517 (source
6518 (origin
6519 (method url-fetch)
6520 (uri (pypi-uri "seaborn" version))
6521 (sha256
6522 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
6523 (build-system python-build-system)
6524 (arguments
6525 `(#:phases
6526 (modify-phases %standard-phases
6527 (add-before 'check 'start-xserver
6528 (lambda* (#:key inputs #:allow-other-keys)
6529 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6530 ;; There must be a running X server and make check doesn't
6531 ;; start one. Therefore we must do it.
6532 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6533 (setenv "DISPLAY" ":1")
6534 #t)))
6535 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6536 (propagated-inputs
6537 `(("python-pandas" ,python-pandas)
6538 ("python-matplotlib" ,python-matplotlib)
6539 ("python-numpy" ,python-numpy)
6540 ("python-scipy" ,python-scipy)))
6541 (native-inputs
6542 `(("python-pytest" ,python-pytest)
6543 ("xorg-server" ,xorg-server-for-tests)))
6544 (home-page "https://seaborn.pydata.org/")
6545 (synopsis "Statistical data visualization")
6546 (description
6547 "Seaborn is a library for making attractive and informative statistical
6548 graphics in Python. It is built on top of matplotlib and tightly integrated
6549 with the PyData stack, including support for numpy and pandas data structures
6550 and statistical routines from scipy and statsmodels.")
6551 (properties `((python2-variant . ,(delay python2-seaborn))))
6552 (license license:bsd-3)))
6553
6554 ;; 0.9.1 is the last release with support for Python 2.
6555 (define-public python2-seaborn
6556 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6557 (package
6558 (inherit base)
6559 (version "0.9.1")
6560 (source (origin
6561 (method url-fetch)
6562 (uri (pypi-uri "seaborn" version))
6563 (sha256
6564 (base32
6565 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
6566
6567 (define-public python-mpmath
6568 (package
6569 (name "python-mpmath")
6570 (version "0.19")
6571 (source (origin
6572 (method url-fetch)
6573 (uri (string-append "http://mpmath.org/files/mpmath-"
6574 version ".tar.gz"))
6575 (sha256
6576 (base32
6577 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6578 (build-system python-build-system)
6579 (arguments
6580 '(#:phases
6581 (modify-phases %standard-phases
6582 (replace 'check
6583 (lambda _
6584 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6585 (home-page "http://mpmath.org")
6586 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6587 (description
6588 "@code{mpmath} can be used as an arbitrary-precision substitute for
6589 Python's float/complex types and math/cmath modules, but also does much
6590 more advanced mathematics.")
6591 (license license:bsd-3)))
6592
6593 (define-public python2-mpmath
6594 (package-with-python2 python-mpmath))
6595
6596 (define-public python-bigfloat
6597 (package
6598 (name "python-bigfloat")
6599 (version "0.3.0")
6600 (source
6601 (origin
6602 (method url-fetch)
6603 (uri (pypi-uri "bigfloat" version))
6604 (sha256
6605 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6606 (build-system python-build-system)
6607 (inputs
6608 `(("mpfr" ,mpfr)))
6609 (home-page "https://github.com/mdickinson/bigfloat")
6610 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6611 (description
6612 "This package provides a Python interface to the MPFR library for
6613 multiprecision arithmetic.")
6614 (license license:lgpl3+)))
6615
6616 (define-public python2-bigfloat
6617 (package-with-python2 python-bigfloat))
6618
6619 (define-public python-sympy
6620 (package
6621 (name "python-sympy")
6622 (version "1.1.1")
6623 (source
6624 (origin
6625 (method url-fetch)
6626 (uri (string-append
6627 "https://github.com/sympy/sympy/releases/download/sympy-"
6628 version "/sympy-" version ".tar.gz"))
6629 (sha256
6630 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6631 (build-system python-build-system)
6632 (arguments
6633 `(#:phases
6634 (modify-phases %standard-phases
6635 ;; Run the core tests after installation. By default it would run
6636 ;; *all* tests, which take a very long time to complete and are known
6637 ;; to be flaky.
6638 (delete 'check)
6639 (add-after 'install 'check
6640 (lambda* (#:key outputs #:allow-other-keys)
6641 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6642 #t)))))
6643 (propagated-inputs
6644 `(("python-mpmath" ,python-mpmath)))
6645 (home-page "https://www.sympy.org/")
6646 (synopsis "Python library for symbolic mathematics")
6647 (description
6648 "SymPy is a Python library for symbolic mathematics. It aims to become a
6649 full-featured computer algebra system (CAS) while keeping the code as simple
6650 as possible in order to be comprehensible and easily extensible.")
6651 (license license:bsd-3)))
6652
6653 (define-public python2-sympy
6654 (package
6655 (inherit (package-with-python2 python-sympy))
6656 (arguments
6657 `(#:phases
6658 (modify-phases %standard-phases
6659 ;; Run the core tests after installation. By default it would run
6660 ;; *all* tests, which take a very long time to complete and are known
6661 ;; to be flaky.
6662 (delete 'check)
6663 (add-after 'install 'check
6664 (lambda* (#:key outputs #:allow-other-keys)
6665 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6666 #t)))))))
6667
6668 (define-public python-q
6669 (package
6670 (name "python-q")
6671 (version "2.6")
6672 (source
6673 (origin
6674 (method url-fetch)
6675 (uri (pypi-uri "q" version))
6676 (sha256
6677 (base32
6678 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6679 (build-system python-build-system)
6680 (home-page "https://github.com/zestyping/q")
6681 (synopsis "Quick-and-dirty debugging output for tired programmers")
6682 (description
6683 "q is a Python module for \"print\" style of debugging Python code. It
6684 provides convenient short API for print out of values, tracebacks, and
6685 falling into the Python interpreter.")
6686 (license license:asl2.0)))
6687
6688 (define-public python2-q
6689 (package-with-python2 python-q))
6690
6691 (define-public python2-xlib
6692 (package
6693 (name "python2-xlib")
6694 (version "0.14")
6695 (source (origin
6696 (method url-fetch)
6697 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6698 "/" version "/"
6699 "python-xlib-" version ".tar.gz"))
6700 (sha256
6701 (base32
6702 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6703 (build-system python-build-system)
6704 (arguments
6705 `(#:python ,python-2 ;Python 2 only
6706 #:tests? #f)) ;no tests
6707 (home-page "http://python-xlib.sourceforge.net/")
6708 (synopsis "Python X11 client library")
6709 (description
6710 "The Python X Library is intended to be a fully functional X client
6711 library for Python programs. It is useful to implement low-level X clients.
6712 It is written entirely in Python.")
6713 (license license:gpl2+)))
6714
6715 (define-public python-singledispatch
6716 (package
6717 (name "python-singledispatch")
6718 (version "3.4.0.3")
6719 (source
6720 (origin
6721 (method url-fetch)
6722 (uri (pypi-uri "singledispatch" version))
6723 (sha256
6724 (base32
6725 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6726 (build-system python-build-system)
6727 (native-inputs
6728 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6729 (home-page
6730 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
6731 (synopsis "Backport of singledispatch feature from Python 3.4")
6732 (description
6733 "This library brings functools.singledispatch from Python 3.4 to Python
6734 2.6-3.3.")
6735 (license license:expat)))
6736
6737 (define-public python2-singledispatch
6738 (package-with-python2 python-singledispatch))
6739
6740 ;; the python- version can be removed with python-3.5
6741 (define-public python-backports-abc
6742 (package
6743 (name "python-backports-abc")
6744 (version "0.5")
6745 (source
6746 (origin
6747 (method url-fetch)
6748 (uri (pypi-uri "backports_abc" version))
6749 (sha256
6750 (base32
6751 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6752 (build-system python-build-system)
6753 (home-page "https://github.com/cython/backports_abc")
6754 (synopsis "Backport of additions to the 'collections.abc' module")
6755 (description
6756 "Python-backports-abc provides a backport of additions to the
6757 @code{collections.abc} module in Python-3.5.")
6758 (license license:psfl)))
6759
6760 (define-public python2-backports-abc
6761 (package-with-python2 python-backports-abc))
6762
6763 (define-public python-backports-csv
6764 (package
6765 (name "python-backports-csv")
6766 (version "1.0.5")
6767 (source
6768 (origin
6769 (method url-fetch)
6770 (uri (pypi-uri "backports.csv" version))
6771 (sha256
6772 (base32
6773 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6774 (build-system python-build-system)
6775 (home-page "https://github.com/ryanhiebert/backports.csv")
6776 (synopsis "Backport of Python 3's csv module for Python 2")
6777 (description
6778 "Provides a backport of Python 3's @code{csv} module for parsing
6779 comma separated values. The API of the @code{csv} module in Python 2
6780 is drastically different from the @code{csv} module in Python 3.
6781 This is due, for the most part, to the difference between str in
6782 Python 2 and Python 3.")
6783 (license license:psfl)))
6784
6785 (define-public python2-backports-csv
6786 (package-with-python2 python-backports-csv))
6787
6788 (define-public python2-backports-shutil-get-terminal-size
6789 (package
6790 (name "python2-backports-shutil-get-terminal-size")
6791 (version "1.0.0")
6792 (source
6793 (origin
6794 (method url-fetch)
6795 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6796 (sha256
6797 (base32
6798 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6799 (build-system python-build-system)
6800 (arguments
6801 `(#:python ,python-2
6802 #:phases
6803 (modify-phases %standard-phases
6804 (replace 'check
6805 (lambda _
6806 (invoke "py.test" "-v"))))))
6807 (native-inputs
6808 `(("python2-pytest" ,python2-pytest)))
6809 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6810 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6811 (description
6812 "This package provides a backport of the @code{get_terminal_size
6813 function} from Python 3.3's @code{shutil}.
6814 Unlike the original version it is written in pure Python rather than C,
6815 so it might be a tiny bit slower.")
6816 (license license:expat)))
6817
6818 (define-public python-waf
6819 (package
6820 (name "python-waf")
6821 (version "2.0.19")
6822 (source (origin
6823 (method url-fetch)
6824 (uri (string-append "https://waf.io/"
6825 "waf-" version ".tar.bz2"))
6826 (sha256
6827 (base32
6828 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6829 (build-system python-build-system)
6830 (arguments
6831 '(#:phases
6832 (modify-phases %standard-phases
6833 (replace 'build
6834 (lambda _
6835 ;; XXX: Find a way to add all extra tools.
6836 (let ((tools '("gccdeps"
6837 "clang_compilation_database")))
6838 (invoke "python" "waf-light" "configure" "build"
6839 (string-append "--tools="
6840 (string-join tools ","))))))
6841 (replace 'check
6842 (lambda _
6843 (invoke "python" "waf" "--version")))
6844 (replace 'install
6845 (lambda* (#:key outputs #:allow-other-keys)
6846 (let ((out (assoc-ref outputs "out")))
6847 (install-file "waf" (string-append out "/bin")))
6848 #t))
6849 ;; waf breaks when it is wrapped.
6850 (delete 'wrap))))
6851 (home-page "https://waf.io/")
6852 (synopsis "Python-based build system")
6853 (description
6854 "Waf is a Python-based framework for configuring, compiling and installing
6855 applications.")
6856 (license license:bsd-3)))
6857
6858 (define-public python2-waf
6859 (package-with-python2 python-waf))
6860
6861 (define-public python-pyzmq
6862 (package
6863 (name "python-pyzmq")
6864 (version "17.1.2")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "pyzmq" version))
6869 (sha256
6870 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6871 (build-system python-build-system)
6872 (arguments
6873 `(#:configure-flags
6874 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6875 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6876 ;; --inplace' for 'python setup.py test' to work.
6877 #:tests? #f))
6878 (inputs
6879 `(("zeromq" ,zeromq)))
6880 (native-inputs
6881 `(("pkg-config" ,pkg-config)
6882 ("python-nose" ,python-nose)))
6883 (home-page "https://github.com/zeromq/pyzmq")
6884 (synopsis "Python bindings for 0MQ")
6885 (description
6886 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6887 (license license:bsd-4)))
6888
6889 (define-public python2-pyzmq
6890 (package-with-python2 python-pyzmq))
6891
6892 (define-public python-pep8
6893 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6894 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6895 ;; some dependents' test suites, and nothing more.
6896 (package
6897 (name "python-pep8")
6898 (version "1.7.0")
6899 (source
6900 (origin
6901 (method url-fetch)
6902 (uri (pypi-uri "pep8" version))
6903 (sha256
6904 (base32
6905 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6906 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6907 (build-system python-build-system)
6908 (home-page "https://pep8.readthedocs.org/")
6909 (synopsis "Python style guide checker")
6910 (description
6911 "This tools checks Python code against some of the style conventions in
6912 PEP 8.")
6913 (license license:expat)))
6914
6915 (define-public python2-pep8
6916 (package-with-python2 python-pep8))
6917
6918 (define-public python-pyflakes
6919 (package
6920 (name "python-pyflakes")
6921 (version "2.1.1")
6922 (source
6923 (origin
6924 (method url-fetch)
6925 (uri (pypi-uri "pyflakes" version))
6926 (sha256
6927 (base32
6928 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6929 (build-system python-build-system)
6930 (home-page
6931 "https://github.com/pyflakes/pyflakes")
6932 (synopsis "Passive checker of Python programs")
6933 (description
6934 "Pyflakes statically checks Python source code for common errors.")
6935 (license license:expat)))
6936
6937 (define-public python2-pyflakes
6938 (package-with-python2 python-pyflakes))
6939
6940 (define-public python-mccabe
6941 (package
6942 (name "python-mccabe")
6943 (version "0.6.1")
6944 (source
6945 (origin
6946 (method url-fetch)
6947 (uri (pypi-uri "mccabe" version))
6948 (sha256
6949 (base32
6950 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6951 (build-system python-build-system)
6952 (native-inputs
6953 `(("python-pytest" ,python-pytest-bootstrap)
6954 ("python-pytest-runner" ,python-pytest-runner)))
6955 (home-page "https://github.com/flintwork/mccabe")
6956 (synopsis "McCabe checker, plugin for flake8")
6957 (description
6958 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6959 complexity of Python source code.")
6960 (license license:expat)))
6961
6962 (define-public python2-mccabe
6963 (package-with-python2 python-mccabe))
6964
6965 (define-public python-mccabe-0.2.1
6966 (package (inherit python-mccabe)
6967 (version "0.2.1")
6968 (source
6969 (origin
6970 (method url-fetch)
6971 (uri (pypi-uri "mccabe" version))
6972 (sha256
6973 (base32
6974 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6975
6976 (define-public python2-mccabe-0.2.1
6977 (package-with-python2 python-mccabe-0.2.1))
6978
6979 ;; Flake8 2.4.1 requires an older version of pep8.
6980 ;; This should be removed ASAP.
6981 (define-public python-pep8-1.5.7
6982 (package (inherit python-pep8)
6983 (version "1.5.7")
6984 (source
6985 (origin
6986 (method url-fetch)
6987 (uri (pypi-uri "pep8" version))
6988 (sha256
6989 (base32
6990 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6991 (arguments
6992 ;; XXX Tests not compatible with Python 3.5.
6993 '(#:tests? #f))))
6994
6995 (define-public python2-pep8-1.5.7
6996 (package-with-python2 python-pep8-1.5.7))
6997
6998 ;; Flake8 2.4.1 requires an older version of pyflakes.
6999 ;; This should be removed ASAP.
7000 (define-public python-pyflakes-0.8.1
7001 (package (inherit python-pyflakes)
7002 (version "0.8.1")
7003 (source
7004 (origin
7005 (method url-fetch)
7006 (uri (pypi-uri "pyflakes" version))
7007 (sha256
7008 (base32
7009 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
7010 (arguments
7011 ;; XXX Tests not compatible with Python 3.5.
7012 '(#:tests? #f))))
7013
7014 (define-public python2-pyflakes-0.8.1
7015 (package-with-python2 python-pyflakes-0.8.1))
7016
7017 (define-public python-flake8
7018 (package
7019 (name "python-flake8")
7020 (version "3.7.7")
7021 (source (origin
7022 (method url-fetch)
7023 (uri (pypi-uri "flake8" version))
7024 (sha256
7025 (base32
7026 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
7027 (build-system python-build-system)
7028 (arguments
7029 `(#:phases
7030 (modify-phases %standard-phases
7031 (delete 'check)
7032 (add-after 'install 'check
7033 (lambda* (#:key inputs outputs #:allow-other-keys)
7034 (add-installed-pythonpath inputs outputs)
7035 (invoke "pytest" "-v")
7036 #t)))))
7037 (propagated-inputs
7038 `(("python-pycodestyle" ,python-pycodestyle)
7039 ("python-entrypoints" ,python-entrypoints)
7040 ("python-pyflakes" ,python-pyflakes)
7041 ("python-mccabe" ,python-mccabe)))
7042 (native-inputs
7043 `(("python-mock" ,python-mock)
7044 ("python-pytest" ,python-pytest-bootstrap)
7045 ("python-pytest-runner" ,python-pytest-runner)))
7046 (home-page "https://gitlab.com/pycqa/flake8")
7047 (synopsis
7048 "The modular source code checker: pep8, pyflakes and co")
7049 (description
7050 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7051 (properties `((python2-variant . ,(delay python2-flake8))))
7052 (license license:expat)))
7053
7054 (define-public python2-flake8
7055 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
7056 (package (inherit base)
7057 (propagated-inputs
7058 `(("python2-configparser" ,python2-configparser)
7059 ("python2-enum34" ,python2-enum34)
7060 ("python2-functools32" ,python2-functools32)
7061 ("python2-typing" ,python2-typing)
7062 ,@(package-propagated-inputs base))))))
7063
7064 ;; python-hacking requires flake8 <2.6.0.
7065 (define-public python-flake8-2.5
7066 (package
7067 (inherit python-flake8)
7068 (version "2.5.5")
7069 (source (origin
7070 (method url-fetch)
7071 (uri (pypi-uri "flake8" version))
7072 (sha256
7073 (base32
7074 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
7075 (propagated-inputs
7076 `(("python-pep8" ,python-pep8)
7077 ,@(package-propagated-inputs python-flake8)))
7078 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
7079
7080 (define-public python2-flake8-2.5
7081 (package
7082 (inherit python2-flake8)
7083 (version (package-version python-flake8-2.5))
7084 (source (origin
7085 (inherit (package-source python-flake8-2.5))))
7086 (propagated-inputs
7087 `(("python2-pep8" ,python2-pep8)
7088 ,@(package-propagated-inputs python2-flake8)))))
7089
7090 (define-public python-flake8-polyfill
7091 (package
7092 (name "python-flake8-polyfill")
7093 (version "1.0.2")
7094 (source
7095 (origin
7096 (method url-fetch)
7097 (uri (pypi-uri "flake8-polyfill" version))
7098 (sha256
7099 (base32
7100 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7101 (build-system python-build-system)
7102 (arguments
7103 '(#:phases
7104 (modify-phases %standard-phases
7105 (replace 'check
7106 (lambda _
7107 ;; Be compatible with Pytest 4:
7108 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7109 (substitute* "setup.cfg"
7110 (("\\[pytest\\]")
7111 "[tool:pytest]"))
7112
7113 (setenv "PYTHONPATH"
7114 (string-append (getcwd) "/build/lib:"
7115 (getenv "PYTHONPATH")))
7116 (invoke "py.test" "-v"))))))
7117 (native-inputs
7118 `(("python-flake8" ,python-flake8)
7119 ("python-mock" ,python-mock)
7120 ("python-pep8" ,python-pep8)
7121 ("python-pycodestyle" ,python-pycodestyle)
7122 ("python-pytest" ,python-pytest)))
7123 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7124 (synopsis "Polyfill package for Flake8 plugins")
7125 (description
7126 "This package that provides some compatibility helpers for Flake8
7127 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7128 (license license:expat)))
7129
7130 (define-public python2-flake8-polyfill
7131 (package-with-python2 python-flake8-polyfill))
7132
7133 (define-public python-mistune
7134 (package
7135 (name "python-mistune")
7136 (version "0.8.4")
7137 (source
7138 (origin
7139 (method url-fetch)
7140 (uri (pypi-uri "mistune" version))
7141 (sha256
7142 (base32
7143 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7144 (build-system python-build-system)
7145 (native-inputs
7146 `(("python-nose" ,python-nose)
7147 ("python-cython" ,python-cython)))
7148 (home-page "https://github.com/lepture/mistune")
7149 (synopsis "Markdown parser in pure Python")
7150 (description "This package provides a fast markdown parser in pure
7151 Python.")
7152 (license license:bsd-3)))
7153
7154 (define-public python2-mistune
7155 (package-with-python2 python-mistune))
7156
7157 (define-public python-markdown
7158 (package
7159 (name "python-markdown")
7160 (version "3.2.1")
7161 (source
7162 (origin
7163 (method url-fetch)
7164 (uri (pypi-uri "Markdown" version))
7165 (sha256
7166 (base32
7167 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
7168 (build-system python-build-system)
7169 (native-inputs
7170 `(("python-nose" ,python-nose)
7171 ("python-pyyaml" ,python-pyyaml)))
7172 (home-page "https://python-markdown.github.io/")
7173 (synopsis "Python implementation of Markdown")
7174 (description
7175 "This package provides a Python implementation of John Gruber's
7176 Markdown. The library features international input, various Markdown
7177 extensions, and several HTML output formats. A command line wrapper
7178 markdown_py is also provided to convert Markdown files to HTML.")
7179 (properties `((python2-variant . ,(delay python2-markdown))))
7180 (license license:bsd-3)))
7181
7182 ;; Markdown 3.2 dropped support for Python 2.
7183 (define-public python2-markdown
7184 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7185 (package/inherit
7186 base
7187 (version "3.1.1")
7188 (source (origin
7189 (method url-fetch)
7190 (uri (pypi-uri "Markdown" version))
7191 (sha256
7192 (base32
7193 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
7194
7195 (define-public python-ptyprocess
7196 (package
7197 (name "python-ptyprocess")
7198 (version "0.5.2")
7199 (source
7200 (origin
7201 (method url-fetch)
7202 (uri (pypi-uri "ptyprocess" version))
7203 (sha256
7204 (base32
7205 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7206 (build-system python-build-system)
7207 (native-inputs
7208 `(("python-nose" ,python-nose)))
7209 (arguments
7210 `(#:phases
7211 (modify-phases %standard-phases
7212 (replace 'check
7213 (lambda _ (invoke "nosetests"))))))
7214 (home-page "https://github.com/pexpect/ptyprocess")
7215 (synopsis "Run a subprocess in a pseudo terminal")
7216 (description
7217 "This package provides a Python library used to launch a subprocess in a
7218 pseudo terminal (pty), and interact with both the process and its pty.")
7219 (license license:isc)))
7220
7221 (define-public python2-ptyprocess
7222 (package-with-python2 python-ptyprocess))
7223
7224 (define-public python-cram
7225 (package
7226 (name "python-cram")
7227 (version "0.7")
7228 (home-page "https://bitheap.org/cram/")
7229 (source (origin
7230 (method url-fetch)
7231 (uri (list (string-append home-page "cram-"
7232 version ".tar.gz")
7233 (pypi-uri "cram" version)))
7234 (sha256
7235 (base32
7236 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7237 (arguments
7238 '(#:phases
7239 (modify-phases %standard-phases
7240 (add-after 'unpack 'patch-source
7241 (lambda _
7242 (substitute* (find-files "cram" ".*\\.py$")
7243 ;; Replace default shell path.
7244 (("/bin/sh") (which "sh")))
7245 (substitute* (find-files "tests" ".*\\.t$")
7246 (("md5") "md5sum")
7247 (("/bin/bash") (which "bash"))
7248 (("/bin/sh") (which "sh")))
7249 (substitute* "cram/_test.py"
7250 ;; This hack works around a bug triggered by substituting
7251 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7252 ;; "cram -h", which breaks the output at 80 characters. This
7253 ;; causes the line showing the default shell to break into two
7254 ;; lines, but the test expects a single line...
7255 (("env\\['COLUMNS'\\] = '80'")
7256 "env['COLUMNS'] = '160'"))
7257
7258 (substitute* "Makefile"
7259 ;; Recent versions of python-coverage have caused the test
7260 ;; coverage to decrease (as of version 0.7). Allow that.
7261 (("--fail-under=100")
7262 "--fail-under=90"))
7263
7264 #t))
7265 (replace 'check
7266 ;; The test phase uses the built library and executable.
7267 (lambda* (#:key inputs outputs #:allow-other-keys)
7268 (add-installed-pythonpath inputs outputs)
7269 (setenv "PATH" (string-append (getenv "PATH") ":"
7270 (assoc-ref outputs "out") "/bin"))
7271 (invoke "make" "test"))))))
7272 (build-system python-build-system)
7273 (native-inputs
7274 `(("python-coverage" ,python-coverage)
7275 ("which" ,which)))
7276 (synopsis "Simple testing framework for command line applications")
7277 (description
7278 "Cram is a functional testing framework for command line applications.
7279 Cram tests look like snippets of interactive shell sessions. Cram runs each
7280 command and compares the command output in the test with the command’s actual
7281 output.")
7282 (license license:gpl2+)))
7283
7284 (define-public python2-cram
7285 (package-with-python2 python-cram))
7286
7287 (define-public python-straight-plugin
7288 (package
7289 (name "python-straight-plugin")
7290 (version "1.4.1")
7291 (source
7292 (origin
7293 (method url-fetch)
7294 (uri (pypi-uri "straight.plugin" version))
7295 (sha256
7296 (base32
7297 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7298 (build-system python-build-system)
7299 (home-page "https://github.com/ironfroggy/straight.plugin")
7300 (synopsis "Simple namespaced plugin facility")
7301 (description "Straight Plugin provides a type of plugin you can create from
7302 almost any existing Python modules, and an easy way for outside developers to
7303 add functionality and customization to your projects with their own plugins.")
7304 (license license:expat)))
7305
7306 (define-public python2-straight-plugin
7307 (package-with-python2 python-straight-plugin))
7308
7309 (define-public python-fonttools
7310 (package
7311 (name "python-fonttools")
7312 (version "3.38.0")
7313 (source (origin
7314 (method url-fetch)
7315 (uri (pypi-uri "fonttools" version ".zip"))
7316 (sha256
7317 (base32
7318 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
7319 (build-system python-build-system)
7320 (native-inputs
7321 `(("unzip" ,unzip)
7322 ("python-pytest" ,python-pytest)
7323 ("python-pytest-runner" ,python-pytest-runner)))
7324 (home-page "https://github.com/fonttools/fonttools")
7325 (synopsis "Tools to manipulate font files")
7326 (description
7327 "FontTools/TTX is a library to manipulate font files from Python. It
7328 supports reading and writing of TrueType/OpenType fonts, reading and writing
7329 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7330 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7331 from an XML-based format.")
7332 (license license:expat)))
7333
7334 (define-public python2-fonttools
7335 (package-with-python2 python-fonttools))
7336
7337 (define-public python-ly
7338 (package
7339 (name "python-ly")
7340 (version "0.9.5")
7341 (source
7342 (origin
7343 (method url-fetch)
7344 (uri (pypi-uri name version))
7345 (sha256
7346 (base32
7347 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7348 (build-system python-build-system)
7349 (arguments
7350 ;; FIXME: Some tests need network access.
7351 '(#:tests? #f))
7352 (synopsis "Tool and library for manipulating LilyPond files")
7353 (description "This package provides a Python library to parse, manipulate
7354 or create documents in LilyPond format. A command line program ly is also
7355 provided that can be used to do various manipulations with LilyPond files.")
7356 (home-page "https://pypi.org/project/python-ly/")
7357 (license license:gpl2+)))
7358
7359 (define-public python-appdirs
7360 (package
7361 (name "python-appdirs")
7362 (version "1.4.3")
7363 (source
7364 (origin
7365 (method url-fetch)
7366 (uri (pypi-uri "appdirs" version))
7367 (sha256
7368 (base32
7369 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7370 (build-system python-build-system)
7371 (home-page "https://github.com/ActiveState/appdirs")
7372 (synopsis
7373 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7374 (description
7375 "This module provides a portable way of finding out where user data
7376 should be stored on various operating systems.")
7377 (license license:expat)))
7378
7379 (define-public python2-appdirs
7380 (package-with-python2 python-appdirs))
7381
7382 (define-public python-llfuse
7383 (package
7384 (name "python-llfuse")
7385 (version "1.3.5")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7389 (sha256
7390 (base32
7391 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7392 (build-system python-build-system)
7393 (inputs
7394 `(("fuse" ,fuse)
7395 ("attr" ,attr)))
7396 (native-inputs
7397 `(("pkg-config" ,pkg-config)))
7398 (synopsis "Python bindings for FUSE")
7399 (description
7400 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7401 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7402 (license license:lgpl2.0+)
7403 (properties `((python2-variant . ,(delay python2-llfuse))))))
7404
7405 (define-public python2-llfuse
7406 (package (inherit (package-with-python2
7407 (strip-python2-variant python-llfuse)))
7408 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7409
7410 ;; For attic-0.16
7411 (define-public python-llfuse-0.41
7412 (package (inherit python-llfuse)
7413 (version "0.41.1")
7414 (source (origin
7415 (method url-fetch)
7416 (uri (string-append
7417 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7418 "llfuse-" version ".tar.bz2"))
7419 (sha256
7420 (base32
7421 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7422 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7423 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7424 (license (list license:expat license:lgpl2.0+))))
7425
7426 (define-public python-msgpack
7427 (package
7428 (name "python-msgpack")
7429 (version "0.5.6")
7430 (source (origin
7431 (method url-fetch)
7432 (uri (pypi-uri "msgpack" version))
7433 (sha256
7434 (base32
7435 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7436 (build-system python-build-system)
7437 (arguments
7438 `(#:modules ((guix build utils)
7439 (guix build python-build-system)
7440 (ice-9 ftw)
7441 (srfi srfi-1)
7442 (srfi srfi-26))
7443 #:phases
7444 (modify-phases %standard-phases
7445 (replace 'check
7446 (lambda _
7447 (let ((cwd (getcwd)))
7448 (setenv "PYTHONPATH"
7449 (string-append cwd "/build/"
7450 (find (cut string-prefix? "lib" <>)
7451 (scandir (string-append cwd "/build")))
7452 ":"
7453 (getenv "PYTHONPATH")))
7454 (invoke "pytest" "-v" "test")))))))
7455 (native-inputs
7456 `(("python-pytest" ,python-pytest)))
7457 (synopsis "MessagePack (de)serializer")
7458 (description "MessagePack is a fast, compact binary serialization format,
7459 suitable for similar data to JSON. This package provides CPython bindings for
7460 reading and writing MessagePack data.")
7461 (home-page "https://pypi.org/project/msgpack/")
7462 (license license:asl2.0)))
7463
7464 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7465 ;; release 0.5. Some packages like borg still call it by the old name for now.
7466 ;; <https://bugs.gnu.org/30662>
7467 (define-public python-msgpack-transitional
7468 (package
7469 (inherit python-msgpack)
7470 (name "python-msgpack-transitional")
7471 (arguments
7472 (substitute-keyword-arguments (package-arguments python-msgpack)
7473 ((#:phases phases)
7474 `(modify-phases ,phases
7475 (add-after 'unpack 'configure-transitional
7476 (lambda _
7477 ;; Keep using the old name.
7478 (substitute* "setup.py"
7479 (("TRANSITIONAL = False")
7480 "TRANSITIONAL = 1"))
7481 #t))))))))
7482
7483 (define-public python2-msgpack
7484 (package-with-python2 python-msgpack))
7485
7486 (define-public python-netaddr
7487 (package
7488 (name "python-netaddr")
7489 (version "0.7.19")
7490 (source
7491 (origin
7492 (method url-fetch)
7493 (uri (pypi-uri "netaddr" version))
7494 (sha256
7495 (base32
7496 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7497 (build-system python-build-system)
7498 (arguments `(#:tests? #f)) ;; No tests.
7499 (home-page "https://github.com/drkjam/netaddr/")
7500 (synopsis "Pythonic manipulation of network addresses")
7501 (description
7502 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7503 and MAC network addresses.")
7504 (license license:bsd-3)))
7505
7506 (define-public python2-netaddr
7507 (package-with-python2 python-netaddr))
7508
7509 (define-public python2-pyroute2
7510 (package
7511 (name "python2-pyroute2")
7512 (version "0.5.6")
7513 (source
7514 (origin
7515 (method url-fetch)
7516 (uri (pypi-uri "pyroute2" version))
7517 (sha256
7518 (base32
7519 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7520 (build-system python-build-system)
7521 (arguments
7522 `(#:python ,python-2)) ;Python 3.x is not supported
7523 (home-page "https://github.com/svinota/pyroute2")
7524 (synopsis "Python netlink library")
7525 (description
7526 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7527 Supported netlink families and protocols include:
7528 @itemize
7529 @item rtnl, network settings - addresses, routes, traffic controls
7530 @item nfnetlink - netfilter API: ipset, nftables, ...
7531 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7532 @item devlink - manage and monitor devlink-enabled hardware
7533 @item generic - generic netlink families
7534 @itemize
7535 @item nl80211 - wireless functions API (basic support)
7536 @item taskstats - extended process statistics
7537 @item acpi_events - ACPI events monitoring
7538 @item thermal_events - thermal events monitoring
7539 @item VFS_DQUOT - disk quota events monitoring
7540 @end itemize
7541 @end itemize")
7542 (license license:gpl2+)))
7543
7544 (define-public python-wrapt
7545 (package
7546 (name "python-wrapt")
7547 (version "1.11.2")
7548 (source
7549 (origin
7550 (method url-fetch)
7551 (uri (pypi-uri "wrapt" version))
7552 (sha256
7553 (base32
7554 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7555 (build-system python-build-system)
7556 (arguments
7557 ;; Tests are not included in the tarball, they are only available in the
7558 ;; git repository.
7559 `(#:tests? #f))
7560 (home-page "https://github.com/GrahamDumpleton/wrapt")
7561 (synopsis "Module for decorators, wrappers and monkey patching")
7562 (description
7563 "The aim of the wrapt module is to provide a transparent object proxy for
7564 Python, which can be used as the basis for the construction of function
7565 wrappers and decorator functions.")
7566 (license license:bsd-2)))
7567
7568 (define-public python2-wrapt
7569 (package-with-python2 python-wrapt))
7570
7571 (define-public python-xlrd
7572 (package
7573 (name "python-xlrd")
7574 (version "1.2.0")
7575 (source (origin
7576 (method url-fetch)
7577 (uri (pypi-uri "xlrd" version))
7578 (sha256
7579 (base32
7580 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7581 (build-system python-build-system)
7582 (arguments
7583 `(#:phases
7584 (modify-phases %standard-phases
7585 ;; Some tests depend on writing a temporary file to the user's home
7586 ;; directory.
7587 (add-after 'unpack 'fix-tests
7588 (lambda _
7589 (delete-file "tests/test_open_workbook.py")
7590 #t)))))
7591 (home-page "http://www.python-excel.org/")
7592 (synopsis "Library for extracting data from Excel files")
7593 (description "This package provides a library to extract data from
7594 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7595 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7596 Unicode-aware. It is not intended as an end-user tool.")
7597 (license license:bsd-3)))
7598
7599 (define-public python2-xlrd
7600 (package-with-python2 python-xlrd))
7601
7602 (define-public python-prettytable
7603 (package
7604 (name "python-prettytable")
7605 (version "0.7.2")
7606 (source
7607 (origin
7608 (method url-fetch)
7609 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7610 (sha256
7611 (base32
7612 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7613 (build-system python-build-system)
7614 (home-page "https://code.google.com/archive/p/prettytable/")
7615 (synopsis "Display tabular data in an ASCII table format")
7616 (description
7617 "A library designed to represent tabular data in visually appealing ASCII
7618 tables. PrettyTable allows for selection of which columns are to be printed,
7619 independent alignment of columns (left or right justified or centred) and
7620 printing of sub-tables by specifying a row range.")
7621 (license license:bsd-3)))
7622
7623 (define-public python2-prettytable
7624 (package-with-python2 python-prettytable))
7625
7626 (define-public python-tables
7627 (package
7628 (name "python-tables")
7629 (version "3.4.4")
7630 (source
7631 (origin
7632 (method url-fetch)
7633 (uri (pypi-uri "tables" version))
7634 (sha256
7635 (base32
7636 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7637 (modules '((guix build utils)))
7638 (snippet
7639 '(begin
7640 ;; Remove pre-compiled .pyc files from source.
7641 (for-each delete-file-recursively
7642 (find-files "." "__pycache__" #:directories? #t))
7643 (for-each delete-file (find-files "." "\\.pyc$"))
7644 #t))))
7645 (build-system python-build-system)
7646 (arguments
7647 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7648 ;; or "check", so we must override the build and check phases.
7649 #:phases
7650 (modify-phases %standard-phases
7651 (add-after 'unpack 'use-gcc
7652 (lambda _
7653 (substitute* "setup.py"
7654 (("compiler = new_compiler\\(\\)" line)
7655 (string-append line
7656 "\ncompiler.set_executables(compiler='gcc',"
7657 "compiler_so='gcc',"
7658 "linker_exe='gcc',"
7659 "linker_so='gcc -shared')")))
7660 #t))
7661 (add-after 'unpack 'disable-tuning
7662 (lambda _
7663 (substitute* "setup.py"
7664 (("cpu_flags = .*")
7665 "cpu_flags = ['sse2']\n"))
7666 #t))
7667 (replace 'build
7668 (lambda* (#:key inputs #:allow-other-keys)
7669 (invoke "python" "setup.py" "build"
7670 (string-append "--hdf5="
7671 (assoc-ref inputs "hdf5")))))
7672 (replace 'check
7673 (lambda* (#:key inputs #:allow-other-keys)
7674 (invoke "python" "setup.py" "check"
7675 (string-append "--hdf5="
7676 (assoc-ref inputs "hdf5"))))))))
7677 (propagated-inputs
7678 `(("python-numexpr" ,python-numexpr)
7679 ("python-numpy" ,python-numpy)))
7680 (native-inputs
7681 `(("python-cython" ,python-cython)
7682 ("pkg-config" ,pkg-config)))
7683 (inputs
7684 `(("hdf5" ,hdf5-1.10)
7685 ("bzip2" ,bzip2)
7686 ("zlib" ,zlib)))
7687 (home-page "http://www.pytables.org/")
7688 (synopsis "Hierarchical datasets for Python")
7689 (description "PyTables is a package for managing hierarchical datasets and
7690 designed to efficiently cope with extremely large amounts of data.")
7691 (license license:bsd-3)))
7692
7693 (define-public python2-tables
7694 (package-with-python2 python-tables))
7695
7696 (define-public python-pytest-black
7697 (package
7698 (name "python-pytest-black")
7699 (version "0.3.8")
7700 (source
7701 (origin
7702 (method url-fetch)
7703 (uri (pypi-uri "pytest-black" version))
7704 (sha256
7705 (base32
7706 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7707 (build-system python-build-system)
7708 (propagated-inputs
7709 `(("python-pytest" ,python-pytest)
7710 ("python-black" ,python-black)
7711 ("python-toml" ,python-toml)))
7712 (native-inputs
7713 `(("python-setuptools-scm" ,python-setuptools-scm)))
7714 (home-page "https://github.com/shopkeep/pytest-black")
7715 (synopsis "Pytest plugin to enable format checking with black")
7716 (description
7717 "This package provides a pytest plugin to enable format checking with the
7718 Python code formatter \"black\".")
7719 (license license:expat)))
7720
7721 (define-public python-get-version
7722 (package
7723 (name "python-get-version")
7724 (version "2.1")
7725 (source
7726 (origin
7727 (method url-fetch)
7728 (uri (pypi-uri "get_version" version))
7729 (sha256
7730 (base32
7731 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7732 (build-system python-build-system)
7733 (propagated-inputs
7734 `(("python-pygments" ,python-pygments)
7735 ("python-pytest" ,python-pytest)
7736 ("python-pytest-black" ,python-pytest-black)
7737 ("python-pytest-cov" ,python-pytest-cov)
7738 ("python-setuptools" ,python-setuptools)
7739 ("python-testpath" ,python-testpath)))
7740 (home-page "https://github.com/flying-sheep/get_version")
7741 (synopsis "Version helper in the spirit of versioneer")
7742 (description
7743 "This package provides a version helper that lets you automatically use
7744 the latest @code{vX.X.X} Git tag as the version in your Python package. It
7745 also supports getting the version from Python source distributions or, once
7746 your package is installed, via @code{pkg_resources} (part of
7747 @code{setuptools}).")
7748 (license license:gpl3+)))
7749
7750 (define-public python-legacy-api-wrap
7751 (package
7752 (name "python-legacy-api-wrap")
7753 (version "1.2")
7754 (source
7755 (origin
7756 (method url-fetch)
7757 (uri (pypi-uri "legacy-api-wrap" version))
7758 (sha256
7759 (base32
7760 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7761 (build-system python-build-system)
7762 (propagated-inputs
7763 `(("python-get-version" ,python-get-version)
7764 ("python-pytest" ,python-pytest)
7765 ("python-pytest-black" ,python-pytest-black)
7766 ("python-pytest-cov" ,python-pytest-cov)
7767 ("python-setuptools" ,python-setuptools)))
7768 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7769 (synopsis "Legacy API wrapper")
7770 (description "This module defines a decorator to wrap legacy APIs. The
7771 primary use case is APIs defined before keyword-only parameters existed.")
7772 (license license:gpl3+)))
7773
7774 (define-public python-pyasn1
7775 (package
7776 (name "python-pyasn1")
7777 (version "0.4.3")
7778 (source
7779 (origin
7780 (method url-fetch)
7781 (uri (pypi-uri "pyasn1" version))
7782 (sha256
7783 (base32
7784 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7785 (build-system python-build-system)
7786 (home-page "http://pyasn1.sourceforge.net/")
7787 (synopsis "ASN.1 types and codecs")
7788 (description
7789 "This is an implementation of ASN.1 types and codecs in Python. It is
7790 suitable for a wide range of protocols based on the ASN.1 specification.")
7791 (license license:bsd-2)))
7792
7793 (define-public python2-pyasn1
7794 (package-with-python2 python-pyasn1))
7795
7796 (define-public python-pyasn1-modules
7797 (package
7798 (name "python-pyasn1-modules")
7799 (version "0.2.2")
7800 (source
7801 (origin
7802 (method url-fetch)
7803 (uri (pypi-uri "pyasn1-modules" version))
7804 (sha256
7805 (base32
7806 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7807 (build-system python-build-system)
7808 (propagated-inputs
7809 `(("python-pyasn1" ,python-pyasn1)))
7810 (home-page "https://sourceforge.net/projects/pyasn1/")
7811 (synopsis "ASN.1 codec implementations")
7812 (description
7813 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7814 implementations of ASN.1-based codecs and protocols.")
7815 (license license:bsd-3)))
7816
7817 (define-public python2-pyasn1-modules
7818 (package-with-python2 python-pyasn1-modules))
7819
7820 (define-public python-ipaddress
7821 (package
7822 (name "python-ipaddress")
7823 (version "1.0.22")
7824 (source (origin
7825 (method url-fetch)
7826 (uri (pypi-uri "ipaddress" version))
7827 (sha256
7828 (base32
7829 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7830 (build-system python-build-system)
7831 (home-page "https://github.com/phihag/ipaddress")
7832 (synopsis "IP address manipulation library")
7833 (description
7834 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7835 in Python. This library is used to create, poke at, and manipulate IPv4 and
7836 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7837 module to older versions of Python.")
7838 (license license:psfl)))
7839
7840 (define-public python2-ipaddress
7841 (package-with-python2 python-ipaddress))
7842
7843 (define-public python2-ipaddr
7844 (package
7845 (name "python2-ipaddr")
7846 (version "2.1.11")
7847 (source
7848 (origin
7849 (method url-fetch)
7850 (uri (pypi-uri "ipaddr" version))
7851 (sha256
7852 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7853 (build-system python-build-system)
7854 (arguments
7855 `(#:python ,python-2 ;version 2 only
7856 #:phases
7857 (modify-phases %standard-phases
7858 (replace 'check
7859 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7860 (home-page "https://github.com/google/ipaddr-py")
7861 (synopsis "IP address manipulation library")
7862 (description
7863 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7864 IPv6 addresses and networks.
7865
7866 For new implementations you may prefer to use the standard module
7867 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7868 versions of Python.")
7869 (license license:asl2.0)))
7870
7871 (define-public python-idna
7872 (package
7873 (name "python-idna")
7874 (version "2.8")
7875 (source
7876 (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "idna" version))
7879 (sha256
7880 (base32
7881 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7882 (build-system python-build-system)
7883 (home-page "https://github.com/kjd/idna")
7884 (synopsis "Internationalized domain names in applications")
7885 (description
7886 "This is a library to support the Internationalised Domain Names in
7887 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7888 protocol is often referred to as “IDNA2008” and can produce different results
7889 from the earlier standard from 2003. The library is also intended to act as a
7890 suitable drop-in replacement for the “encodings.idna” module that comes with
7891 the Python standard library but currently only supports the older 2003
7892 specification.")
7893 (license license:bsd-4)))
7894
7895 (define-public python-idna-2.7
7896 (package (inherit python-idna)
7897 (version "2.7")
7898 (source (origin
7899 (method url-fetch)
7900 (uri (pypi-uri "idna" version))
7901 (sha256
7902 (base32
7903 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7904
7905
7906 (define-public python2-idna
7907 (package-with-python2 python-idna))
7908
7909 (define-public python-idna-ssl
7910 (package
7911 (name "python-idna-ssl")
7912 (version "1.0.1")
7913 (source
7914 (origin
7915 (method url-fetch)
7916 (uri (pypi-uri "idna-ssl" version))
7917 (sha256
7918 (base32
7919 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7920 (build-system python-build-system)
7921 (arguments
7922 `(#:tests? #f)) ;circular dependency with python-aiohttp
7923 (home-page "https://github.com/aio-libs/idna-ssl")
7924 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7925 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7926 domains support.")
7927 (license license:expat)))
7928
7929 (define-public python-pretend
7930 (package
7931 (name "python-pretend")
7932 (version "1.0.9")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "pretend" version))
7937 (sha256
7938 (base32
7939 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7940 (build-system python-build-system)
7941 (home-page "https://github.com/alex/pretend")
7942 (synopsis "Library for stubbing in Python")
7943 (description
7944 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7945 technique for writing tests. You may hear the term mixed up with mocks,
7946 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7947 responses, rather than doing any computation.")
7948 (license license:bsd-3)))
7949
7950 (define-public python2-pretend
7951 (package-with-python2 python-pretend))
7952
7953 (define-public python-pip
7954 (package
7955 (name "python-pip")
7956 (version "20.0.2")
7957 (source
7958 (origin
7959 (method url-fetch)
7960 (uri (pypi-uri "pip" version))
7961 (sha256
7962 (base32
7963 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
7964 (build-system python-build-system)
7965 (arguments
7966 '(#:tests? #f)) ; there are no tests in the pypi archive.
7967 (home-page "https://pip.pypa.io/")
7968 (synopsis "Package manager for Python software")
7969 (description
7970 "Pip is a package manager for Python software, that finds packages on the
7971 Python Package Index (PyPI).")
7972 (license license:expat)))
7973
7974 (define-public python2-pip
7975 (package-with-python2 python-pip))
7976
7977 (define-public python-tlsh
7978 (package
7979 (name "python-tlsh")
7980 (version "3.4.5")
7981 (home-page "https://github.com/trendmicro/tlsh")
7982 (source
7983 (origin
7984 (method git-fetch)
7985 (uri (git-reference
7986 (url "https://github.com/trendmicro/tlsh.git")
7987 (commit (string-append "v" version))))
7988 (file-name (git-file-name name version))
7989 (sha256
7990 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7991 (build-system cmake-build-system)
7992 (arguments
7993 '(#:out-of-source? #f
7994 #:phases (modify-phases %standard-phases
7995 (replace
7996 'install
7997 (lambda* (#:key outputs #:allow-other-keys)
7998 ;; Build and install the Python bindings. The underlying
7999 ;; C++ library is apparently not meant to be installed.
8000 (let ((out (assoc-ref outputs "out")))
8001 (with-directory-excursion "py_ext"
8002 (and (system* "python" "setup.py" "build")
8003 (system* "python" "setup.py" "install"
8004 (string-append "--prefix=" out))))))))))
8005 (inputs `(("python" ,python-wrapper))) ;for the bindings
8006 (synopsis "Fuzzy matching library for Python")
8007 (description
8008 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8009 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8010 value which can be used for similarity comparisons. Similar objects have
8011 similar hash values, which allows for the detection of similar objects by
8012 comparing their hash values. The byte stream should have a sufficient amount
8013 of complexity; for example, a byte stream of identical bytes will not generate
8014 a hash value.")
8015 (license license:asl2.0)))
8016
8017 (define-public python2-tlsh
8018 (package
8019 (inherit python-tlsh)
8020 (name "python2-tlsh")
8021 (inputs `(("python" ,python-2)))))
8022
8023 (define-public python-termcolor
8024 (package
8025 (name "python-termcolor")
8026 (version "1.1.0")
8027 (source
8028 (origin
8029 (method url-fetch)
8030 (uri (pypi-uri "termcolor" version))
8031 (sha256
8032 (base32
8033 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8034 (build-system python-build-system)
8035 (arguments
8036 ;; There are no tests.
8037 `(#:tests? #f))
8038 (home-page "https://pypi.org/project/termcolor/")
8039 (synopsis "ANSII Color formatting for terminal output")
8040 (description
8041 "This package provides ANSII Color formatting for output in terminals.")
8042 (license license:expat)))
8043
8044 (define-public python2-termcolor
8045 (package-with-python2 python-termcolor))
8046
8047 (define-public python-libarchive-c
8048 (package
8049 (name "python-libarchive-c")
8050 (version "2.9")
8051 (source (origin
8052 (method url-fetch)
8053 (uri (pypi-uri "libarchive-c" version))
8054 (sha256
8055 (base32
8056 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
8057 (build-system python-build-system)
8058 (arguments
8059 '(#:phases (modify-phases %standard-phases
8060 (add-before
8061 'build 'reference-libarchive
8062 (lambda* (#:key inputs #:allow-other-keys)
8063 ;; Retain the absolute file name of libarchive.so.
8064 (let ((libarchive (assoc-ref inputs "libarchive")))
8065 (substitute* "libarchive/ffi.py"
8066 (("find_library\\('archive'\\)")
8067 (string-append "'" libarchive
8068 "/lib/libarchive.so'"))))))
8069 (replace 'check
8070 (lambda _ (invoke "pytest" "-vv"))))))
8071 (native-inputs
8072 `(("python-mock" ,python-mock)
8073 ("python-pytest" ,python-pytest)))
8074 (inputs
8075 `(("libarchive" ,libarchive)))
8076 (home-page "https://github.com/Changaco/python-libarchive-c")
8077 (synopsis "Python interface to libarchive")
8078 (description
8079 "This package provides Python bindings to libarchive, a C library to
8080 access possibly compressed archives in many different formats. It uses
8081 Python's @code{ctypes} foreign function interface (FFI).")
8082 (license license:lgpl2.0+)))
8083
8084 (define-public python2-libarchive-c
8085 (package-with-python2 python-libarchive-c))
8086
8087 (define-public python-file
8088 (package
8089 (inherit file)
8090 (name "python-file")
8091 (build-system python-build-system)
8092 (arguments
8093 '(#:tests? #f ;no tests
8094 #:configure-flags '("--single-version-externally-managed" "--root=/")
8095 #:phases (modify-phases %standard-phases
8096 (add-before 'build 'change-directory
8097 (lambda _
8098 (chdir "python")
8099 #t))
8100 (add-before 'build 'set-library-file-name
8101 (lambda* (#:key inputs #:allow-other-keys)
8102 (let ((file (assoc-ref inputs "file")))
8103 (substitute* "magic.py"
8104 (("find_library\\('magic'\\)")
8105 (string-append "'" file "/lib/libmagic.so'")))
8106 #t))))))
8107 (inputs `(("file" ,file)))
8108 (native-inputs (if (%current-target-system)
8109 `(("self" ,this-package))
8110 '()))
8111 (synopsis "Python bindings to the libmagic file type guesser. Note that
8112 this module and the python-magic module both provide a \"magic.py\" file;
8113 these two modules, which are different and were developed separately, both
8114 serve the same purpose: provide Python bindings for libmagic.")))
8115
8116 (define-public python2-file
8117 (package-with-python2 python-file))
8118
8119 (define-public python-debian
8120 (package
8121 (name "python-debian")
8122 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
8123 (version "0.1.36")
8124 (source
8125 (origin
8126 ;; Use git-fetch, as pypi doesn't include test suite.
8127 (method git-fetch)
8128 (uri (git-reference
8129 (url home-page)
8130 (commit version)))
8131 (file-name (git-file-name name version))
8132 (sha256
8133 (base32
8134 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
8135 (build-system python-build-system)
8136 (arguments
8137 `(#:phases (modify-phases %standard-phases
8138 (add-after 'unpack 'remove-debian-specific-tests
8139 ;; python-apt, apt and dpkg are not yet available in guix,
8140 ;; and these tests heavily depend on them.
8141 (lambda _
8142 (delete-file "lib/debian/tests/test_deb822.py")
8143 (delete-file "lib/debian/tests/test_debfile.py")
8144 #t)))))
8145 (propagated-inputs
8146 `(("python-six" ,python-six)
8147 ("python-chardet" ,python-chardet)))
8148 (synopsis "Debian package related modules")
8149 (description
8150 ;; XXX: Use @enumerate instead of @itemize to work around
8151 ;; <http://bugs.gnu.org/21772>.
8152 "This package provides Python modules that abstract many formats of
8153 Debian-related files, such as:
8154
8155 @enumerate
8156 @item Debtags information;
8157 @item @file{debian/changelog} files;
8158 @item packages files, pdiffs;
8159 @item control files of single or multiple RFC822-style paragraphs---e.g.
8160 @file{debian/control}, @file{.changes}, @file{.dsc};
8161 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8162 contained files and meta-information.
8163 @end enumerate\n")
8164
8165 ;; Modules are either GPLv2+ or GPLv3+.
8166 (license license:gpl3+)))
8167
8168 (define-public python-nbformat
8169 (package
8170 (name "python-nbformat")
8171 (version "4.4.0")
8172 (source
8173 (origin
8174 (method url-fetch)
8175 (uri (pypi-uri "nbformat" version))
8176 (sha256
8177 (base32
8178 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8179 (build-system python-build-system)
8180 (arguments `(#:tests? #f)) ; no test target
8181 (propagated-inputs
8182 `(("python-ipython-genutils" ,python-ipython-genutils)
8183 ("python-jsonschema" ,python-jsonschema)
8184 ("python-jupyter-core" ,python-jupyter-core)
8185 ("python-traitlets" ,python-traitlets)))
8186 (home-page "http://jupyter.org")
8187 (synopsis "Jupyter Notebook format")
8188 (description "This package provides the reference implementation of the
8189 Jupyter Notebook format and Python APIs for working with notebooks.")
8190 (license license:bsd-3)))
8191
8192 (define-public python2-nbformat
8193 (package-with-python2 python-nbformat))
8194
8195 (define-public python-bleach
8196 (package
8197 (name "python-bleach")
8198 (version "3.1.1")
8199 (source
8200 (origin
8201 (method url-fetch)
8202 (uri (pypi-uri "bleach" version))
8203 (sha256
8204 (base32
8205 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
8206 (build-system python-build-system)
8207 (propagated-inputs
8208 `(("python-webencodings" ,python-webencodings)
8209 ("python-six" ,python-six)))
8210 (native-inputs
8211 `(("python-pytest" ,python-pytest)
8212 ("python-pytest-runner" ,python-pytest-runner-2)))
8213 (home-page "https://github.com/jsocol/bleach")
8214 (synopsis "Whitelist-based HTML-sanitizing tool")
8215 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8216 (license license:asl2.0)))
8217
8218 (define-public python2-bleach
8219 (package-with-python2 python-bleach))
8220
8221 (define-public python-entrypoints
8222 (package
8223 (name "python-entrypoints")
8224 (version "0.3")
8225 (source
8226 (origin
8227 (method url-fetch)
8228 (uri (pypi-uri "entrypoints" version))
8229 (sha256
8230 (base32
8231 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
8232 (build-system python-build-system)
8233 ;; The package does not come with a setup.py file, so we have to generate
8234 ;; one ourselves.
8235 (arguments
8236 `(#:tests? #f
8237 #:phases
8238 (modify-phases %standard-phases
8239 (add-after 'unpack 'create-setup.py
8240 (lambda _
8241 (call-with-output-file "setup.py"
8242 (lambda (port)
8243 (format port "\
8244 from setuptools import setup
8245 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8246 " ,version))))))))
8247 (home-page "https://github.com/takluyver/entrypoints")
8248 (synopsis "Discover and load entry points from installed Python packages")
8249 (description "Entry points are a way for Python packages to advertise
8250 objects with some common interface. The most common examples are
8251 @code{console_scripts} entry points, which define shell commands by
8252 identifying a Python function to run. The @code{entrypoints} module contains
8253 functions to find and load entry points.")
8254 (license license:expat)))
8255
8256 (define-public python2-entrypoints
8257 (package-with-python2 python-entrypoints))
8258
8259 (define-public python-nbconvert
8260 (package
8261 (name "python-nbconvert")
8262 (version "5.0.0b1")
8263 (source
8264 (origin
8265 (method url-fetch)
8266 (uri (pypi-uri "nbconvert" version))
8267 (sha256
8268 (base32
8269 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8270 (build-system python-build-system)
8271 (arguments
8272 `(;; The "bdist_egg" target is disabled by default, causing the installation
8273 ;; to fail.
8274 #:configure-flags (list "bdist_egg")
8275 ;; FIXME: 5 failures, 40 errors.
8276 #:tests? #f))
8277 ;; #:phases
8278 ;; (modify-phases %standard-phases
8279 ;; (replace 'check
8280 ;; (lambda _
8281 ;; (zero? (system* "py.test" "-v")))))
8282 (native-inputs
8283 `(("python-pytest" ,python-pytest)))
8284 (propagated-inputs
8285 `(("python-bleach" ,python-bleach)
8286 ("python-entrypoints" ,python-entrypoints)
8287 ("python-jinja2" ,python-jinja2)
8288 ("python-jupyter-core" ,python-jupyter-core)
8289 ("python-mistune" ,python-mistune)
8290 ("python-nbformat" ,python-nbformat)
8291 ("python-pygments" ,python-pygments)
8292 ("python-traitlets" ,python-traitlets)))
8293 (home-page "http://jupyter.org")
8294 (synopsis "Converting Jupyter Notebooks")
8295 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8296 notebooks to various other formats via Jinja templates. It allows you to
8297 convert an @code{.ipynb} notebook file into various static formats including:
8298
8299 @enumerate
8300 @item HTML
8301 @item LaTeX
8302 @item PDF
8303 @item Reveal JS
8304 @item Markdown (md)
8305 @item ReStructured Text (rst)
8306 @item executable script
8307 @end enumerate\n")
8308 (license license:bsd-3)))
8309
8310 (define-public python2-nbconvert
8311 (package-with-python2 python-nbconvert))
8312
8313 (define-public python-notebook
8314 (package
8315 (name "python-notebook")
8316 (version "5.7.4")
8317 (source (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "notebook" version))
8320 (sha256
8321 (base32
8322 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8323 (build-system python-build-system)
8324 (arguments
8325 `(#:phases
8326 (modify-phases %standard-phases
8327 (replace 'check
8328 (lambda _
8329 ;; These tests require a browser
8330 (delete-file-recursively "notebook/tests/selenium")
8331 ;; Some tests need HOME
8332 (setenv "HOME" "/tmp")
8333 ;; This file contains "warningfilters", which are not supported
8334 ;; by this version of nose.
8335 (delete-file "setup.cfg")
8336 (with-directory-excursion "/tmp"
8337 (invoke "nosetests" "-v"))
8338 #t)))))
8339 (propagated-inputs
8340 `(("python-jupyter-core" ,python-jupyter-core)
8341 ("python-nbformat" ,python-nbformat)
8342 ("python-nbconvert" ,python-nbconvert)
8343 ("python-prometheus-client" ,python-prometheus-client)
8344 ("python-send2trash" ,python-send2trash)
8345 ("python-terminado" ,python-terminado)))
8346 (native-inputs
8347 `(("python-nose" ,python-nose)
8348 ("python-sphinx" ,python-sphinx)
8349 ("python-requests" ,python-requests)))
8350 (home-page "http://jupyter.org/")
8351 (synopsis "Web-based notebook environment for interactive computing")
8352 (description
8353 "The Jupyter HTML notebook is a web-based notebook environment for
8354 interactive computing.")
8355 (properties `((python2-variant . ,(delay python2-notebook))))
8356 (license license:bsd-3)))
8357
8358 (define-public python2-notebook
8359 (let ((base (package-with-python2
8360 (strip-python2-variant python-notebook))))
8361 (package (inherit base)
8362 (native-inputs
8363 `(("python2-mock" ,python2-mock)
8364 ,@(package-native-inputs base)))
8365 (arguments
8366 (substitute-keyword-arguments (package-arguments base)
8367 ((#:phases phases)
8368 `(modify-phases ,phases
8369 (add-before 'check 'disable-test-case
8370 ;; The test requires network access to localhost. Curiously it
8371 ;; fails with Python 2 only. Simply make the test-case return
8372 ;; immediately.
8373 (lambda _
8374 (substitute*
8375 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8376 (("formats = self.nbconvert_api") "return #")))))))))))
8377
8378 (define-public python-widgetsnbextension
8379 (package
8380 (name "python-widgetsnbextension")
8381 (version "3.4.2")
8382 (source
8383 (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "widgetsnbextension" version))
8386 (sha256
8387 (base32
8388 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8389 (build-system python-build-system)
8390 (propagated-inputs
8391 `(("python-ipykernel" ,python-ipykernel)
8392 ("python-notebook" ,python-notebook)))
8393 (native-inputs
8394 `(("python-certifi" ,python-certifi)
8395 ("python-nose" ,python-nose)))
8396 (home-page "https://ipython.org")
8397 (synopsis "IPython HTML widgets for Jupyter")
8398 (description "This package provides interactive HTML widgets for Jupyter
8399 notebooks.")
8400 (license license:bsd-3)))
8401
8402 (define-public python2-widgetsnbextension
8403 (package-with-python2 python-widgetsnbextension))
8404
8405 (define-public python-ipywidgets
8406 (package
8407 (name "python-ipywidgets")
8408 (version "5.2.2")
8409 (source
8410 (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "ipywidgets" version))
8413 (sha256
8414 (base32
8415 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8416 (build-system python-build-system)
8417 (propagated-inputs
8418 `(("python-ipython" ,python-ipython)
8419 ("python-traitlets" ,python-traitlets)
8420 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8421 (native-inputs
8422 `(("python-nose" ,python-nose)
8423 ("python-pytest" ,python-pytest)))
8424 (home-page "https://ipython.org")
8425 (synopsis "IPython HTML widgets for Jupyter")
8426 (description "Ipywidgets are interactive HTML widgets for Jupyter
8427 notebooks and the IPython kernel. Notebooks come alive when interactive
8428 widgets are used. Users gain control of their data and can visualize changes
8429 in the data.")
8430 (license license:bsd-3)))
8431
8432 (define-public python2-ipywidgets
8433 (package-with-python2 python-ipywidgets))
8434
8435 (define-public python-jupyter-console
8436 (package
8437 (name "python-jupyter-console")
8438 (version "6.0.0")
8439 (source
8440 (origin
8441 (method url-fetch)
8442 (uri (pypi-uri "jupyter_console" version))
8443 (sha256
8444 (base32
8445 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8446 (build-system python-build-system)
8447 (propagated-inputs
8448 `(("python-ipykernel" ,python-ipykernel)
8449 ("python-jupyter-client" ,python-jupyter-client)
8450 ("python-prompt-toolkit" ,python-prompt-toolkit)
8451 ("python-pygments" ,python-pygments)))
8452 (native-inputs
8453 `(("python-nose" ,python-nose)))
8454 (home-page "https://jupyter.org")
8455 (synopsis "Jupyter terminal console")
8456 (description "This package provides a terminal-based console frontend for
8457 Jupyter kernels. It also allows for console-based interaction with non-Python
8458 Jupyter kernels such as IJulia and IRKernel.")
8459 (properties `((python2-variant . ,(delay python2-jupyter-console))))
8460 (license license:bsd-3)))
8461
8462 (define-public python2-jupyter-console
8463 (package
8464 (name "python2-jupyter-console")
8465 (version "5.2.0")
8466 (source
8467 (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "jupyter_console" version))
8470 (sha256
8471 (base32
8472 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8473 (build-system python-build-system)
8474 (arguments
8475 `(#:python ,python-2
8476 #:tests? #f)) ; Tests only run in a TTY.
8477 (propagated-inputs
8478 `(("python2-ipykernel" ,python2-ipykernel)
8479 ("python2-jupyter-client" ,python2-jupyter-client)
8480 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8481 ("python2-pygments" ,python2-pygments)))
8482 (native-inputs
8483 `(("python2-nose" ,python2-nose)))
8484 (home-page "https://jupyter.org")
8485 (synopsis "Jupyter terminal console")
8486 (description "This package provides a terminal-based console frontend for
8487 Jupyter kernels. It also allows for console-based interaction with non-Python
8488 Jupyter kernels such as IJulia and IRKernel.")
8489 (license license:bsd-3)))
8490
8491 ;; The python-ipython and python-jupyter-console require each other. To get
8492 ;; the functionality in both packages working, strip down the
8493 ;; python-jupyter-console package when using it as an input to python-ipython.
8494 (define python-jupyter-console-minimal
8495 (package
8496 (inherit python-jupyter-console)
8497 (name "python-jupyter-console-minimal")
8498 (arguments
8499 (substitute-keyword-arguments
8500 (package-arguments python-jupyter-console)
8501 ((#:phases phases)
8502 `(modify-phases ,phases
8503 (add-after 'install 'delete-bin
8504 (lambda* (#:key outputs #:allow-other-keys)
8505 ;; Delete the bin files, to avoid conflicts in profiles
8506 ;; where python-ipython and python-jupyter-console are
8507 ;; both present.
8508 (delete-file-recursively
8509 (string-append
8510 (assoc-ref outputs "out") "/bin"))))))))
8511 ;; Remove the python-ipython propagated input, to avoid the cycle
8512 (propagated-inputs
8513 (alist-delete
8514 "python-ipython"
8515 (package-propagated-inputs python-jupyter-console)))))
8516
8517 (define-public python-qtconsole
8518 (package
8519 (name "python-qtconsole")
8520 (version "4.4.3")
8521 (source
8522 (origin
8523 (method url-fetch)
8524 (uri (pypi-uri "qtconsole" version))
8525 (sha256
8526 (base32
8527 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8528 (build-system python-build-system)
8529 (arguments
8530 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8531 ;; but we only have the LTS version 5.x. This means that there might be
8532 ;; runtime errors, but since this is a dependency of the Jupyter package,
8533 ;; and Jupyter can be used without the qtconsole we can overlook this for
8534 ;; now.
8535 `(#:tests? #f
8536 #:phases
8537 (modify-phases %standard-phases
8538 (add-before 'check 'pre-check
8539 (lambda _
8540 (setenv "QT_QPA_PLATFORM" "offscreen")
8541 #t)))))
8542 (propagated-inputs
8543 `(("python-ipykernel" ,python-ipykernel)
8544 ("python-ipython" ,python-ipython)))
8545 (native-inputs
8546 `(("python-pytest" ,python-pytest)))
8547 (home-page "http://jupyter.org")
8548 (synopsis "Jupyter Qt console")
8549 (description "This package provides a Qt-based console for Jupyter with
8550 support for rich media output.")
8551 (license license:bsd-3)))
8552
8553 (define-public python-jsbeautifier
8554 (package
8555 (name "python-jsbeautifier")
8556 (version "1.10.2")
8557 (home-page "https://github.com/beautify-web/js-beautify")
8558 (source (origin
8559 (method git-fetch)
8560 (uri (git-reference
8561 (url home-page)
8562 (commit (string-append "v" version))))
8563 (file-name (git-file-name name version))
8564 (sha256
8565 (base32
8566 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8567 (build-system python-build-system)
8568 (arguments
8569 `(#:phases (modify-phases %standard-phases
8570 (add-after 'unpack 'chdir
8571 (lambda _
8572 ;; The upstream Git repository contains all the code,
8573 ;; but this package only builds the python code.
8574 (chdir "python")
8575 #t))
8576 (add-after 'unpack 'patch-python-six-requirements
8577 (lambda _
8578 (substitute* "python/setup.py"
8579 (("six>=1.12.0")
8580 "six>=1.11.0"))
8581 #t)))))
8582 (propagated-inputs
8583 `(("python-editorconfig" ,python-editorconfig)
8584 ("python-six" ,python-six)))
8585 (native-inputs
8586 `(("python-pytest" ,python-pytest)))
8587 (synopsis "JavaScript unobfuscator and beautifier")
8588 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8589 popular online obfuscators.")
8590 (license license:expat)))
8591
8592 (define-public jupyter
8593 (package
8594 (name "jupyter")
8595 (version "1.0.0")
8596 (source
8597 (origin
8598 (method url-fetch)
8599 (uri (pypi-uri "jupyter" version))
8600 (sha256
8601 (base32
8602 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8603 (build-system python-build-system)
8604 (arguments '(#:tests? #f)) ; there are none.
8605 (propagated-inputs
8606 `(("python-ipykernel" ,python-ipykernel)
8607 ("python-ipywidgets" ,python-ipywidgets)
8608 ("python-jupyter-console" ,python-jupyter-console)
8609 ("python-nbconvert" ,python-nbconvert)
8610 ("python-notebook" ,python-notebook)
8611 ("python-qtconsole" ,python-qtconsole)))
8612 (native-search-paths
8613 (list (search-path-specification
8614 (variable "JUPYTER_PATH")
8615 (files '("share/jupyter")))))
8616 (home-page "https://jupyter.org")
8617 (synopsis "Web application for interactive documents")
8618 (description
8619 "The Jupyter Notebook is a web application that allows you to create and
8620 share documents that contain live code, equations, visualizations and
8621 explanatory text. Uses include: data cleaning and transformation, numerical
8622 simulation, statistical modeling, machine learning and much more.")
8623 (license license:bsd-3)))
8624
8625 (define-public python-chardet
8626 (package
8627 (name "python-chardet")
8628 (version "3.0.4")
8629 (source
8630 (origin
8631 (method url-fetch)
8632 (uri (pypi-uri "chardet" version))
8633 (sha256
8634 (base32
8635 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8636 (native-inputs
8637 `(("python-hypothesis" ,python-hypothesis)
8638 ("python-pytest" ,python-pytest)
8639 ("python-pytest-runner" ,python-pytest-runner)))
8640 (build-system python-build-system)
8641 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8642 (arguments `(#:tests? #f))
8643 (home-page "https://github.com/chardet/chardet")
8644 (synopsis "Universal encoding detector for Python 2 and 3")
8645 (description
8646 "This package provides @code{chardet}, a Python module that can
8647 automatically detect a wide range of file encodings.")
8648 (license license:lgpl2.1+)))
8649
8650 (define-public python2-chardet
8651 (package-with-python2 python-chardet))
8652
8653 (define-public python-docopt
8654 (package
8655 (name "python-docopt")
8656 (version "0.6.2")
8657 (source
8658 (origin
8659 (method git-fetch)
8660 ;; The release on PyPI does not include tests.
8661 (uri (git-reference
8662 (url "https://github.com/docopt/docopt")
8663 (commit version)))
8664 (file-name (git-file-name name version))
8665 (sha256
8666 (base32
8667 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8668 (build-system python-build-system)
8669 (native-inputs
8670 `(("python-pytest" ,python-pytest)))
8671 (arguments
8672 `(#:phases
8673 (modify-phases %standard-phases
8674 (replace 'check
8675 (lambda _ (invoke "py.test"))))))
8676 (home-page "http://docopt.org")
8677 (synopsis "Command-line interface description language for Python")
8678 (description "This library allows the user to define a command-line
8679 interface from a program's help message rather than specifying it
8680 programmatically with command-line parsers like @code{getopt} and
8681 @code{argparse}.")
8682 (license license:expat)))
8683
8684 (define-public python2-docopt
8685 (package-with-python2 python-docopt))
8686
8687 (define-public python-pythondialog
8688 (package
8689 (name "python-pythondialog")
8690 (version "3.4.0")
8691 (source
8692 (origin
8693 (method url-fetch)
8694 (uri (pypi-uri "pythondialog" version))
8695 (sha256
8696 (base32
8697 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8698 (build-system python-build-system)
8699 (arguments
8700 `(#:phases
8701 (modify-phases %standard-phases
8702 (add-after 'unpack 'patch-path
8703 (lambda* (#:key inputs #:allow-other-keys)
8704 (let* ((dialog (assoc-ref inputs "dialog")))
8705 ;; Since this library really wants to grovel the search path, we
8706 ;; must hardcode dialog's store path into it.
8707 (substitute* "dialog.py"
8708 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8709 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8710 #t))))
8711 #:tests? #f)) ; no test suite
8712 (propagated-inputs
8713 `(("dialog" ,dialog)))
8714 (home-page "http://pythondialog.sourceforge.net/")
8715 (synopsis "Python interface to the UNIX dialog utility")
8716 (description "A Python wrapper for the dialog utility. Its purpose is to
8717 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8718 This allows one to make simple text-mode user interfaces on Unix-like systems")
8719 (license license:lgpl2.1)
8720 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8721
8722 (define-public python2-pythondialog
8723 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8724 (package
8725 (inherit base)
8726 (version (package-version python-pythondialog))
8727 (source (origin
8728 (method url-fetch)
8729 (uri (pypi-uri "python2-pythondialog" version))
8730 (sha256
8731 (base32
8732 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8733
8734 (define-public python-configobj
8735 (package
8736 (name "python-configobj")
8737 (version "5.0.6")
8738 (source (origin
8739 (method url-fetch)
8740 (uri (pypi-uri "configobj" version))
8741 (sha256
8742 (base32
8743 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8744 ;; Patch setup.py so it looks for python-setuptools, which is
8745 ;; required to parse the keyword 'install_requires' in setup.py.
8746 (patches (search-patches "python-configobj-setuptools.patch"))))
8747 (build-system python-build-system)
8748 (propagated-inputs
8749 `(("python-six" ,python-six)))
8750 (synopsis "Config file reading, writing and validation")
8751 (description "ConfigObj is a simple but powerful config file reader and
8752 writer: an ini file round tripper. Its main feature is that it is very easy to
8753 use, with a straightforward programmer’s interface and a simple syntax for
8754 config files.")
8755 (home-page "https://github.com/DiffSK/configobj")
8756 (license license:bsd-3)))
8757
8758 (define-public python2-configobj
8759 (package-with-python2 python-configobj))
8760
8761 (define-public python-configargparse
8762 (package
8763 (name "python-configargparse")
8764 (version "0.14.0")
8765 (source (origin
8766 (method url-fetch)
8767 (uri (pypi-uri "ConfigArgParse" version))
8768 (sha256
8769 (base32
8770 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8771 (build-system python-build-system)
8772 (native-inputs
8773 `(("python-pyyaml" ,python-pyyaml)))
8774 (arguments
8775 `(#:phases
8776 (modify-phases %standard-phases
8777 (replace 'check
8778 (lambda _
8779 ;; Bypass setuptools-shim because one test relies on "setup.py"
8780 ;; being the first argument passed to the python call.
8781 ;;
8782 ;; NOTE: Many tests do not run because they rely on Python's
8783 ;; built-in test.test_argparse, but we remove the unit tests from
8784 ;; our Python installation.
8785 (invoke "python" "setup.py" "test"))))))
8786 (synopsis "Replacement for argparse")
8787 (description "A drop-in replacement for argparse that allows options to also
8788 be set via config files and/or environment variables.")
8789 (home-page "https://github.com/bw2/ConfigArgParse")
8790 (license license:expat)))
8791
8792 (define-public python2-configargparse
8793 (package-with-python2 python-configargparse))
8794
8795 (define-public python-argparse-manpage
8796 (package
8797 (name "python-argparse-manpage")
8798 (version "1.1")
8799 (source
8800 (origin
8801 (method url-fetch)
8802 (uri (pypi-uri "argparse-manpage" version))
8803 (sha256
8804 (base32
8805 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8806 (build-system python-build-system)
8807 (home-page "https://github.com/praiskup/argparse-manpage")
8808 (synopsis "Build manual page from Python's ArgumentParser object")
8809 (description
8810 "This package provides tools to build manual pages from Python's
8811 @code{ArgumentParser} object.")
8812 (license license:asl2.0)))
8813
8814 (define-public python-contextlib2
8815 (package
8816 (name "python-contextlib2")
8817 (version "0.6.0.post1")
8818 (source
8819 (origin
8820 (method url-fetch)
8821 (uri (pypi-uri "contextlib2" version))
8822 (sha256
8823 (base32
8824 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
8825 (build-system python-build-system)
8826 (home-page "https://contextlib2.readthedocs.org/")
8827 (synopsis "Tools for decorators and context managers")
8828 (description "This module is primarily a backport of the Python
8829 3.2 contextlib to earlier Python versions. Like contextlib, it
8830 provides utilities for common tasks involving decorators and context
8831 managers. It also contains additional features that are not part of
8832 the standard library.")
8833 (properties `((python2-variant . ,(delay python2-contextlib2))))
8834 (license license:psfl)))
8835
8836 (define-public python2-contextlib2
8837 (let ((base (package-with-python2
8838 (strip-python2-variant python-contextlib2))))
8839 (package
8840 (inherit base)
8841 (arguments
8842 (substitute-keyword-arguments (package-arguments base)
8843 ((#:phases phases)
8844 `(modify-phases ,phases
8845 (replace 'check
8846 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8847 (native-inputs
8848 `(("python2-unittest2" ,python2-unittest2))))))
8849
8850 (define-public python-texttable
8851 (package
8852 (name "python-texttable")
8853 (version "1.6.2")
8854 (source
8855 (origin
8856 (method url-fetch)
8857 (uri (pypi-uri "texttable" version))
8858 (sha256
8859 (base32
8860 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
8861 (build-system python-build-system)
8862 (arguments
8863 `(#:phases
8864 (modify-phases %standard-phases
8865 (replace 'check
8866 (lambda _ (invoke "pytest" "tests.py"))))))
8867 (native-inputs
8868 `(("python-pytest" ,python-pytest)))
8869 (home-page "https://github.com/foutaise/texttable/")
8870 (synopsis "Python module for creating simple ASCII tables")
8871 (description "Texttable is a Python module for creating simple ASCII
8872 tables.")
8873 (license license:expat)))
8874
8875 (define-public python2-texttable
8876 (package-with-python2 python-texttable))
8877
8878 (define-public python-atomicwrites
8879 (package
8880 (name "python-atomicwrites")
8881 (version "1.3.0")
8882 (source (origin
8883 (method url-fetch)
8884 (uri (pypi-uri "atomicwrites" version))
8885 (sha256
8886 (base32
8887 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8888 (build-system python-build-system)
8889 (synopsis "Atomic file writes in Python")
8890 (description "Library for atomic file writes using platform dependent tools
8891 for atomic file system operations.")
8892 (home-page "https://github.com/untitaker/python-atomicwrites")
8893 (license license:expat)))
8894
8895 (define-public python2-atomicwrites
8896 (package-with-python2 python-atomicwrites))
8897
8898 (define-public python-click-threading
8899 (package
8900 (name "python-click-threading")
8901 (version "0.4.4")
8902 (source (origin
8903 (method url-fetch)
8904 (uri (pypi-uri "click-threading" version))
8905 (sha256
8906 (base32
8907 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8908 (build-system python-build-system)
8909 (propagated-inputs
8910 `(("python-click" ,python-click)))
8911 (synopsis "Utilities for multithreading in Click")
8912 (description "This package provides utilities for multithreading in Click
8913 applications.")
8914 (home-page "https://github.com/click-contrib/click-threading")
8915 (license license:expat)))
8916
8917 (define-public python-click-log
8918 (package
8919 (name "python-click-log")
8920 (version "0.3.2")
8921 (source (origin
8922 (method url-fetch)
8923 (uri (pypi-uri "click-log" version))
8924 (sha256
8925 (base32
8926 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8927 (build-system python-build-system)
8928 (propagated-inputs
8929 `(("python-click" ,python-click)))
8930 (synopsis "Logging for click applications")
8931 (description "This package provides a Python library for logging Click
8932 applications.")
8933 (home-page "https://github.com/click-contrib/click-log")
8934 (license license:expat)))
8935
8936 (define-public python-apipkg
8937 (package
8938 (name "python-apipkg")
8939 (version "1.4")
8940 (source (origin
8941 (method url-fetch)
8942 (uri (pypi-uri "apipkg" version))
8943 (sha256
8944 (base32
8945 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8946 (build-system python-build-system)
8947 (native-inputs
8948 `(("python-pytest" ,python-pytest)))
8949 (synopsis "Namespace control and lazy-import mechanism")
8950 (description "With apipkg you can control the exported namespace of a Python
8951 package and greatly reduce the number of imports for your users. It is a small
8952 pure Python module that works on virtually all Python versions.")
8953 (home-page "https://github.com/pytest-dev/apipkg")
8954 (license license:expat)))
8955
8956 (define-public python2-apipkg
8957 (package-with-python2 python-apipkg))
8958
8959 (define-public python-execnet
8960 (package
8961 (name "python-execnet")
8962 (version "1.4.1")
8963 (source (origin
8964 (method url-fetch)
8965 (uri (pypi-uri "execnet" version))
8966 (sha256
8967 (base32
8968 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8969 (build-system python-build-system)
8970 (arguments
8971 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8972 ;; The two test failures are caused by the lack of an `ssh` executable.
8973 ;; The test suite can be run with pytest after the 'install' phase.
8974 #:tests? #f))
8975 (native-inputs
8976 `(("python-pytest" ,python-pytest)
8977 ("python-setuptools-scm" ,python-setuptools-scm)))
8978 (propagated-inputs
8979 `(("python-apipkg" ,python-apipkg)))
8980 (synopsis "Rapid multi-Python deployment")
8981 (description "Execnet provides a share-nothing model with
8982 channel-send/receive communication for distributing execution across many
8983 Python interpreters across version, platform and network barriers. It has a
8984 minimal and fast API targeting the following uses:
8985 @enumerate
8986 @item distribute tasks to (many) local or remote CPUs
8987 @item write and deploy hybrid multi-process applications
8988 @item write scripts to administer multiple environments
8989 @end enumerate")
8990 (home-page "https://codespeak.net/execnet/")
8991 (license license:expat)))
8992
8993 (define-public python2-execnet
8994 (package-with-python2 python-execnet))
8995
8996 (define-public python-icalendar
8997 (package
8998 (name "python-icalendar")
8999 (version "4.0.4")
9000 (source (origin
9001 (method url-fetch)
9002 (uri (pypi-uri "icalendar" version))
9003 (sha256
9004 (base32
9005 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
9006 (build-system python-build-system)
9007 (propagated-inputs
9008 `(("python-dateutil" ,python-dateutil)
9009 ("python-pytz" ,python-pytz)))
9010 (synopsis "Python library for parsing iCalendar files")
9011 (description "The icalendar package is a parser/generator of iCalendar
9012 files for use with Python.")
9013 (home-page "https://github.com/collective/icalendar")
9014 (license license:bsd-2)))
9015
9016 (define-public python-args
9017 (package
9018 (name "python-args")
9019 (version "0.1.0")
9020 (source (origin
9021 (method url-fetch)
9022 (uri (pypi-uri "args" version))
9023 (sha256
9024 (base32
9025 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9026 (build-system python-build-system)
9027 (home-page "https://github.com/kennethreitz/args")
9028 (synopsis "Command-line argument parser")
9029 (description
9030 "This library provides a Python module to parse command-line arguments.")
9031 (license license:bsd-3)))
9032
9033 (define-public python2-args
9034 (package-with-python2 python-args))
9035
9036 (define-public python-clint
9037 (package
9038 (name "python-clint")
9039 (version "0.5.1")
9040 (source (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "clint" version))
9043 (sha256
9044 (base32
9045 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9046 (build-system python-build-system)
9047 (arguments
9048 '(#:phases
9049 (modify-phases %standard-phases
9050 (replace 'check
9051 (lambda _ (invoke "py.test" "-v"))))))
9052 (native-inputs
9053 `(("python-pytest" ,python-pytest)))
9054 (propagated-inputs
9055 `(("python-args" ,python-args)))
9056 (home-page "https://github.com/kennethreitz/clint")
9057 (synopsis "Command-line interface tools")
9058 (description
9059 "Clint is a Python module filled with a set of tools for developing
9060 command-line applications, including tools for colored and indented
9061 output, progress bar display, and pipes.")
9062 (license license:isc)))
9063
9064 (define-public python2-clint
9065 (package-with-python2 python-clint))
9066
9067 (define-public python-rply
9068 (package
9069 (name "python-rply")
9070 (version "0.7.5")
9071 (source (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "rply" version))
9074 (sha256
9075 (base32
9076 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9077 (build-system python-build-system)
9078 (propagated-inputs
9079 `(("python-appdirs" ,python-appdirs)))
9080 (home-page "https://github.com/alex/rply")
9081 (synopsis "Parser generator for Python")
9082 (description
9083 "This package provides a pure Python based parser generator, that also
9084 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9085 with a new public API, and RPython support.")
9086 (license license:bsd-3)))
9087
9088 (define-public python2-rply
9089 (package-with-python2 python-rply))
9090
9091 (define-public python-hy
9092 (package
9093 (name "python-hy")
9094 (version "0.17.0")
9095 (source (origin
9096 (method url-fetch)
9097 (uri (pypi-uri "hy" version))
9098 (sha256
9099 (base32
9100 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
9101 (build-system python-build-system)
9102 (arguments
9103 '(#:phases
9104 (modify-phases %standard-phases
9105 (add-before 'install 'set-HOME
9106 (lambda _
9107 (setenv "HOME" "/tmp")))
9108 (replace 'check
9109 (lambda _
9110 ;; Tests require write access to HOME.
9111 (setenv "HOME" "/tmp")
9112 (invoke "nosetests"))))))
9113 (native-inputs
9114 `(("python-coverage" ,python-coverage)
9115 ("python-nose" ,python-nose)))
9116 (propagated-inputs
9117 `(("python-astor" ,python-astor)
9118 ("python-clint" ,python-clint)
9119 ("python-rply" ,python-rply)
9120 ("python-fastentrypoints"
9121 ,python-fastentrypoints)
9122 ("python-funcparserlib"
9123 ,python-funcparserlib)))
9124 (home-page "http://hylang.org/")
9125 (synopsis "Lisp frontend to Python")
9126 (description
9127 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9128 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9129 Python at your fingertips, in Lisp form.")
9130 (license license:expat)))
9131
9132 (define-public python2-hy
9133 (package-with-python2 python-hy))
9134
9135 (define-public python2-functools32
9136 (package
9137 (name "python2-functools32")
9138 (version "3.2.3-2")
9139 (source
9140 (origin
9141 (method url-fetch)
9142 (uri (pypi-uri "functools32" version))
9143 (sha256
9144 (base32
9145 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9146 (build-system python-build-system)
9147 (arguments
9148 `(#:python ,python-2
9149 #:tests? #f)) ; no test target
9150 (home-page "https://github.com/MiCHiLU/python-functools32")
9151 (synopsis
9152 "Backport of the functools module from Python 3.2.3")
9153 (description
9154 "This package is a backport of the @code{functools} module from Python
9155 3.2.3 for use with older versions of Python and PyPy.")
9156 (license license:expat)))
9157
9158 (define-public python2-subprocess32
9159 (package
9160 (name "python2-subprocess32")
9161 (version "3.2.7")
9162 (source (origin
9163 (method url-fetch)
9164 (uri (pypi-uri "subprocess32" version))
9165 (sha256
9166 (base32
9167 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9168 (patches
9169 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9170 (build-system python-build-system)
9171 (arguments
9172 `(#:python ,python-2
9173 ;; The test suite fails with Python > 2.7.13:
9174 ;; import test.support
9175 ;; ImportError: No module named support
9176 #:tests? #f
9177 #:phases
9178 (modify-phases %standard-phases
9179 (add-after 'unpack 'patch-/bin/sh
9180 (lambda _
9181 (substitute* '("subprocess32.py"
9182 "test_subprocess32.py")
9183 (("/bin/sh") (which "sh")))
9184 #t)))))
9185 (home-page "https://github.com/google/python-subprocess32")
9186 (synopsis "Backport of the subprocess module from Python 3.2")
9187 (description
9188 "This is a backport of the @code{subprocess} standard library module
9189 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9190 new features. On POSIX systems it is guaranteed to be reliable when used
9191 in threaded applications. It includes timeout support from Python 3.3 but
9192 otherwise matches 3.2’s API.")
9193 (license license:psfl)))
9194
9195 (define-public python2-futures
9196 (package
9197 (name "python2-futures")
9198 (version "3.2.0")
9199 (source
9200 (origin
9201 (method url-fetch)
9202 (uri (pypi-uri "futures" version))
9203 (sha256
9204 (base32
9205 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9206 (build-system python-build-system)
9207 (arguments
9208 `(#:python ,python-2
9209 #:phases
9210 (modify-phases %standard-phases
9211 (replace 'check
9212 (lambda _
9213 (invoke "python" "test_futures.py")
9214 #t)))))
9215 (home-page "https://github.com/agronholm/pythonfutures")
9216 (synopsis
9217 "Backport of the concurrent.futures package from Python 3.2")
9218 (description
9219 "The concurrent.futures module provides a high-level interface for
9220 asynchronously executing callables. This package backports the
9221 concurrent.futures package from Python 3.2")
9222 (license license:bsd-3)))
9223
9224 (define-public python-promise
9225 (package
9226 (name "python-promise")
9227 (version "0.4.2")
9228 (source
9229 (origin
9230 (method url-fetch)
9231 (uri (pypi-uri "promise" version))
9232 (sha256
9233 (base32
9234 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9235 (build-system python-build-system)
9236 ;; Tests wants python-futures, which is a python2 only program, and
9237 ;; can't be found by python-promise at test time.
9238 (arguments `(#:tests? #f))
9239 (home-page "https://github.com/syrusakbary/promise")
9240 (synopsis "Promises/A+ implementation for Python")
9241 (description
9242 "Promises/A+ implementation for Python")
9243 (properties `((python2-variant . ,(delay python2-promise))))
9244 (license license:expat)))
9245
9246 (define-public python2-promise
9247 (let ((promise (package-with-python2
9248 (strip-python2-variant python-promise))))
9249 (package (inherit promise)
9250 (arguments (substitute-keyword-arguments (package-arguments promise)
9251 ((#:tests? _) #t)))
9252 (native-inputs
9253 `(("python2-futures" ,python2-futures)
9254 ("python2-pytest" ,python2-pytest)
9255 ,@(package-native-inputs promise))))))
9256
9257 (define-public python-progressbar33
9258 (package
9259 (name "python-progressbar33")
9260 (version "2.4")
9261 (source
9262 (origin
9263 (method url-fetch)
9264 (uri (pypi-uri "progressbar33" version))
9265 (sha256
9266 (base32
9267 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
9268 (build-system python-build-system)
9269 (home-page "http://github.com/germangh/python-progressbar")
9270 (synopsis "Text progress bar library for Python")
9271 (description
9272 "This package provides a text progress bar library for Python. This
9273 version only differs from the original @code{progressbar} package in that it
9274 uses relative package imports instead of absolute imports, which is necessary
9275 for the module to work under Python 3.3.")
9276 ;; Either or both of these licenses may be selected.
9277 (license (list license:lgpl2.1+ license:bsd-3))))
9278
9279 (define-public python-colorama
9280 (package
9281 (name "python-colorama")
9282 (version "0.4.3")
9283 (source
9284 (origin
9285 (method url-fetch)
9286 (uri (pypi-uri "colorama" version))
9287 (sha256
9288 (base32
9289 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
9290 (build-system python-build-system)
9291 (synopsis "Colored terminal text rendering for Python")
9292 (description "Colorama is a Python library for rendering colored terminal
9293 text.")
9294 (home-page "https://pypi.org/project/colorama/")
9295 (license license:bsd-3)))
9296
9297 (define-public python2-colorama
9298 (package-with-python2 python-colorama))
9299
9300 (define-public python-rsa
9301 (package
9302 (name "python-rsa")
9303 (version "3.4.2")
9304 (source
9305 (origin
9306 (method url-fetch)
9307 (uri (pypi-uri "rsa" version))
9308 (sha256
9309 (base32
9310 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9311 (build-system python-build-system)
9312 (propagated-inputs
9313 `(("python-pyasn1" ,python-pyasn1)))
9314 (synopsis "Pure-Python RSA implementation")
9315 (description "Python-RSA is a pure-Python RSA implementation. It supports
9316 encryption and decryption, signing and verifying signatures, and key
9317 generation according to PKCS#1 version 1.5. It can be used as a Python
9318 library as well as on the command line.")
9319 (home-page "https://stuvel.eu/rsa")
9320 (license license:asl2.0)))
9321
9322 (define-public python2-rsa
9323 (package-with-python2 python-rsa))
9324
9325 (define-public python-pluggy
9326 (package
9327 (name "python-pluggy")
9328 (version "0.11.0")
9329 (source
9330 (origin
9331 (method url-fetch)
9332 (uri (pypi-uri "pluggy" version))
9333 (sha256
9334 (base32
9335 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
9336 (build-system python-build-system)
9337 (native-inputs
9338 `(("python-setuptools-scm" ,python-setuptools-scm)))
9339 (synopsis "Plugin and hook calling mechanism for Python")
9340 (description "Pluggy is an extraction of the plugin manager as used by
9341 Pytest but stripped of Pytest specific details.")
9342 (home-page "https://pypi.org/project/pluggy/")
9343 (license license:expat)))
9344
9345 (define-public python2-pluggy
9346 (package-with-python2 python-pluggy))
9347
9348 (define-public python-tox
9349 (package
9350 (name "python-tox")
9351 (version "2.8.1")
9352 (source
9353 (origin
9354 (method url-fetch)
9355 (uri (pypi-uri "tox" version))
9356 (sha256
9357 (base32
9358 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9359 (build-system python-build-system)
9360 (arguments
9361 ;; FIXME: Tests require pytest-timeout, which itself requires
9362 ;; pytest>=2.8.0 for installation.
9363 '(#:tests? #f))
9364 (propagated-inputs
9365 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9366 ("python-py" ,python-py)
9367 ("python-virtualenv" ,python-virtualenv)))
9368 (native-inputs
9369 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9370 ("python-pytest" ,python-pytest) ; >= 2.3.5
9371 ("python-setuptools-scm" ,python-setuptools-scm)))
9372 (home-page "https://tox.readthedocs.io")
9373 (synopsis "Virtualenv-based automation of test activities")
9374 (description "Tox is a generic virtualenv management and test command line
9375 tool. It can be used to check that a package installs correctly with
9376 different Python versions and interpreters, or run tests in each type of
9377 supported environment, or act as a frontend to continuous integration
9378 servers.")
9379 (license license:expat)))
9380
9381 (define-public python2-tox
9382 (package-with-python2 python-tox))
9383
9384 (define-public python-jmespath
9385 (package
9386 (name "python-jmespath")
9387 (version "0.9.4")
9388 (source
9389 (origin
9390 (method url-fetch)
9391 (uri (pypi-uri "jmespath" version))
9392 (sha256
9393 (base32
9394 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
9395 (build-system python-build-system)
9396 (native-inputs
9397 `(("python-nose" ,python-nose)))
9398 (synopsis "JSON Matching Expressions")
9399 (description "JMESPath (pronounced “james path”) is a Python library that
9400 allows one to declaratively specify how to extract elements from a JSON
9401 document.")
9402 (home-page "https://github.com/jmespath/jmespath.py")
9403 (license license:expat)))
9404
9405 (define-public python2-jmespath
9406 (package-with-python2 python-jmespath))
9407
9408 (define-public python-botocore
9409 (package
9410 (name "python-botocore")
9411 (version "1.12.149")
9412 (source
9413 (origin
9414 (method url-fetch)
9415 (uri (pypi-uri "botocore" version))
9416 (sha256
9417 (base32
9418 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9419 (build-system python-build-system)
9420 (arguments
9421 ;; FIXME: Many tests are failing.
9422 '(#:tests? #f))
9423 (propagated-inputs
9424 `(("python-dateutil" ,python-dateutil)
9425 ("python-docutils" ,python-docutils)
9426 ("python-jmespath" ,python-jmespath)))
9427 (native-inputs
9428 `(("python-mock" ,python-mock)
9429 ("python-nose" ,python-nose)
9430 ("behave" ,behave)
9431 ("python-tox" ,python-tox)
9432 ("python-urllib3" ,python-urllib3)
9433 ("python-wheel" ,python-wheel)))
9434 (home-page "https://github.com/boto/botocore")
9435 (synopsis "Low-level interface to AWS")
9436 (description "Botocore is a Python library that provides a low-level
9437 interface to the Amazon Web Services (AWS) API.")
9438 (license license:asl2.0)))
9439
9440 (define-public python2-botocore
9441 (package-with-python2 python-botocore))
9442
9443 (define-public python-xdo
9444 (package
9445 (name "python-xdo")
9446 (version "0.3")
9447 (source (origin
9448 (method url-fetch)
9449 (uri (string-append
9450 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9451 "python-xdo_" version ".orig.tar.gz"))
9452 (sha256
9453 (base32
9454 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9455 (build-system python-build-system)
9456 (arguments
9457 '(#:phases
9458 (modify-phases %standard-phases
9459 (add-before 'install 'patch-libxdo-path
9460 ;; Hardcode the path of dynamically loaded libxdo library.
9461 (lambda* (#:key inputs #:allow-other-keys)
9462 (let ((libxdo (string-append
9463 (assoc-ref inputs "xdotool")
9464 "/lib/libxdo.so")))
9465 (substitute* "xdo/_xdo.py"
9466 (("find_library\\(\"xdo\"\\)")
9467 (simple-format #f "\"~a\"" libxdo)))
9468 #t))))
9469 #:tests? #f)) ; no tests provided
9470 (propagated-inputs
9471 `(("python-six" ,python-six)))
9472 (inputs
9473 `(("xdotool" ,xdotool)
9474 ("libX11" ,libx11)))
9475 (home-page "https://tracker.debian.org/pkg/python-xdo")
9476 (synopsis "Python library for simulating X11 keyboard/mouse input")
9477 (description "Provides bindings to libxdo for manipulating X11 via simulated
9478 input. (Note that this is mostly a legacy library; you may wish to look at
9479 python-xdo for newer bindings.)")
9480 (license license:bsd-3)))
9481
9482 (define-public python2-xdo
9483 (package-with-python2 python-xdo))
9484
9485 (define-public python-mako
9486 (package
9487 (name "python-mako")
9488 (version "1.1.1")
9489 (source
9490 (origin
9491 (method url-fetch)
9492 (uri (pypi-uri "Mako" version))
9493 (sha256
9494 (base32
9495 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
9496 (build-system python-build-system)
9497 (arguments
9498 `(#:phases (modify-phases %standard-phases
9499 (replace 'check
9500 (lambda _
9501 (invoke "pytest" "-vv"))))))
9502 (propagated-inputs
9503 `(("python-markupsafe" ,python-markupsafe)))
9504 (native-inputs
9505 `(("python-mock" ,python-mock)
9506 ("python-pytest" ,python-pytest)))
9507 (home-page "https://www.makotemplates.org/")
9508 (synopsis "Templating language for Python")
9509 (description "Mako is a templating language for Python that compiles
9510 templates into Python modules.")
9511 (license license:expat)))
9512
9513 (define-public python2-mako
9514 (package-with-python2 python-mako))
9515
9516 (define-public python-waitress
9517 (package
9518 (name "python-waitress")
9519 (version "1.1.0")
9520 (source
9521 (origin
9522 (method url-fetch)
9523 (uri (pypi-uri "waitress" version))
9524 (patches (search-patches "python-waitress-fix-tests.patch"))
9525 (sha256
9526 (base32
9527 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9528 (build-system python-build-system)
9529 (home-page "https://github.com/Pylons/waitress")
9530 (synopsis "Waitress WSGI server")
9531 (description "Waitress is meant to be a production-quality pure-Python WSGI
9532 server with very acceptable performance.")
9533 (license license:zpl2.1)))
9534
9535 (define-public python2-waitress
9536 (package-with-python2 python-waitress))
9537
9538 (define-public python-whichcraft
9539 (package
9540 (name "python-whichcraft")
9541 (version "0.6.1")
9542 (source
9543 (origin
9544 (method url-fetch)
9545 (uri (pypi-uri "whichcraft" version))
9546 (sha256
9547 (base32
9548 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9549 (build-system python-build-system)
9550 (native-inputs
9551 `(("python-pytest" ,python-pytest)))
9552 (home-page "https://github.com/pydanny/whichcraft")
9553 (synopsis "Cross-platform cross-python shutil.which functionality")
9554 (description
9555 "This package provides a shim of the shutil.which function that's
9556 designed to work across multiple versions of Python.")
9557 (license license:bsd-3)))
9558
9559 (define-public python-cookiecutter
9560 (package
9561 (name "python-cookiecutter")
9562 (version "1.6.0")
9563 (source
9564 (origin
9565 (method url-fetch)
9566 (uri (pypi-uri "cookiecutter" version))
9567 (sha256
9568 (base32
9569 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9570 (build-system python-build-system)
9571 (native-inputs
9572 `(("python-freezegun" ,python-freezegun)
9573 ("python-pytest" ,python-pytest)
9574 ("python-pytest-catchlog" ,python-pytest-catchlog)
9575 ("python-pytest-cov" ,python-pytest-cov)
9576 ("python-pytest-mock" ,python-pytest-mock)))
9577 (propagated-inputs
9578 `(("python-binaryornot" ,python-binaryornot)
9579 ("python-click" ,python-click)
9580 ("python-future" ,python-future)
9581 ("python-jinja2" ,python-jinja2)
9582 ("python-jinja2-time" ,python-jinja2-time)
9583 ("python-poyo" ,python-poyo)
9584 ("python-requests" ,python-requests)
9585 ("python-whichcraft" ,python-whichcraft)))
9586 (home-page "https://github.com/audreyr/cookiecutter")
9587 (synopsis
9588 "Command-line utility that creates projects from project templates")
9589 (description
9590 "This package provides a command-line utility that creates projects from
9591 project templates, e.g. creating a Python package project from a Python package
9592 project template.")
9593 (license license:bsd-3)))
9594
9595 (define-public python-pyquery
9596 (package
9597 (name "python-pyquery")
9598 (version "1.2.17")
9599 (source
9600 (origin
9601 (method url-fetch)
9602 (uri (pypi-uri "pyquery" version))
9603 (sha256
9604 (base32
9605 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9606 (build-system python-build-system)
9607 (native-inputs
9608 `(("python-webob" ,python-webob)
9609 ("python-webtest" ,python-webtest)))
9610 (propagated-inputs
9611 `(("python-lxml" ,python-lxml)
9612 ("python-cssselect" ,python-cssselect)))
9613 (home-page "https://github.com/gawel/pyquery")
9614 (synopsis "Make jQuery-like queries on xml documents")
9615 (description "pyquery allows you to make jQuery queries on xml documents.
9616 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9617 fast xml and html manipulation.")
9618 (license license:bsd-3)))
9619
9620 (define-public python-anyjson
9621 (package
9622 (name "python-anyjson")
9623 (version "0.3.3")
9624 (source
9625 (origin
9626 (method url-fetch)
9627 (uri (pypi-uri "anyjson" version))
9628 (sha256
9629 (base32
9630 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9631 (build-system python-build-system)
9632 (arguments
9633 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9634 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9635 ;; whatever) so this transformation needs to be done before the tests
9636 ;; can be run. Maybe we could add a build step to transform beforehand
9637 ;; but it could be annoying/difficult.
9638 ;; We can enable tests for the Python 2 version, though, and do below.
9639 #:tests? #f))
9640 (home-page "https://bitbucket.org/runeh/anyjson/")
9641 (synopsis
9642 "Wraps best available JSON implementation in a common interface")
9643 (description
9644 "Anyjson loads whichever is the fastest JSON module installed
9645 and provides a uniform API regardless of which JSON implementation is used.")
9646 (license license:bsd-3)
9647 (properties `((python2-variant . ,(delay python2-anyjson))))))
9648
9649 (define-public python2-anyjson
9650 (let ((anyjson (package-with-python2
9651 (strip-python2-variant python-anyjson))))
9652 (package
9653 (inherit anyjson)
9654 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9655 #:tests? #t
9656 ,@(package-arguments anyjson)))
9657 (native-inputs `(("python2-nose" ,python2-nose))))))
9658
9659 (define-public python-amqp
9660 (package
9661 (name "python-amqp")
9662 (version "2.3.2")
9663 (source
9664 (origin
9665 (method url-fetch)
9666 (uri (pypi-uri "amqp" version))
9667 (sha256
9668 (base32
9669 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9670 (build-system python-build-system)
9671 (native-inputs
9672 `(("python-case" ,python-case)
9673 ("python-pytest-sugar" ,python-pytest-sugar)
9674 ("python-mock" ,python-mock)))
9675 (propagated-inputs
9676 `(("python-vine" ,python-vine)))
9677 (home-page "https://github.com/celery/py-amqp")
9678 (synopsis
9679 "Low-level AMQP client for Python (fork of amqplib)")
9680 (description
9681 "This is a fork of amqplib which was originally written by Barry Pederson.
9682 It is maintained by the Celery project, and used by kombu as a pure python
9683 alternative when librabbitmq is not available.")
9684 (license license:lgpl2.1+)
9685 (properties `((python2-variant . ,(delay python2-amqp))))))
9686
9687 (define-public python2-amqp
9688 (let ((amqp (package-with-python2
9689 (strip-python2-variant python-amqp))))
9690 (package
9691 (inherit amqp)
9692 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9693 ;; unmaintained. Weirdly, does not do this on the python 3
9694 ;; version?
9695 #:tests? #f
9696 ,@(package-arguments amqp))))))
9697
9698 (define-public python-txamqp
9699 (package
9700 (name "python-txamqp")
9701 (version "0.8.2")
9702 (source
9703 (origin
9704 (method url-fetch)
9705 (uri (pypi-uri "txAMQP" version))
9706 (sha256
9707 (base32
9708 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9709 (build-system python-build-system)
9710 (propagated-inputs
9711 `(("python-six" ,python-six)
9712 ("python-twisted" ,python-twisted)))
9713 (home-page "https://github.com/txamqp/txamqp")
9714 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9715 (description
9716 "This package provides a Python library for communicating with AMQP peers
9717 and brokers using the asynchronous networking framework Twisted. It contains
9718 all the necessary code to connect, send and receive messages to/from an
9719 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9720 also includes support for using Thrift RPC over AMQP in Twisted
9721 applications.")
9722 (license license:asl2.0)))
9723
9724 (define-public python2-txamqp
9725 (package-with-python2 python-txamqp))
9726
9727 (define-public python-kombu
9728 (package
9729 (name "python-kombu")
9730 (version "4.2.2")
9731 (source
9732 (origin
9733 (method url-fetch)
9734 (uri (pypi-uri "kombu" version))
9735 (sha256
9736 (base32
9737 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9738 (build-system python-build-system)
9739 (native-inputs
9740 `(("python-mock" ,python-mock)
9741 ("python-case" ,python-case)
9742 ("python-pyro4" ,python-pyro4)
9743 ("python-pytest-sugar" ,python-pytest-sugar)
9744 ("python-pytz" ,python-pytz)))
9745 (propagated-inputs
9746 `(("python-anyjson" ,python-anyjson)
9747 ("python-amqp" ,python-amqp)
9748 ("python-redis" ,python-redis)))
9749 (home-page "https://kombu.readthedocs.io")
9750 (synopsis "Message passing library for Python")
9751 (description "The aim of Kombu is to make messaging in Python as easy as
9752 possible by providing an idiomatic high-level interface for the AMQ protocol,
9753 and also provide proven and tested solutions to common messaging problems.
9754 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9755 message orientation, queuing, routing, reliability and security, for which the
9756 RabbitMQ messaging server is the most popular implementation.")
9757 (license license:bsd-3)
9758 (properties `((python2-variant . ,(delay python2-kombu))))))
9759
9760 (define-public python2-kombu
9761 (let ((kombu (package-with-python2
9762 (strip-python2-variant python-kombu))))
9763 (package
9764 (inherit kombu)
9765 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9766 ;; It works fine on the python3 variant.
9767 #:tests? #f
9768 ,@(package-arguments kombu)))
9769 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9770 ,@(package-native-inputs kombu))))))
9771
9772 (define-public python-billiard
9773 (package
9774 (name "python-billiard")
9775 (version "3.5.0.5")
9776 (source
9777 (origin
9778 (method url-fetch)
9779 (uri (pypi-uri "billiard" version))
9780 (sha256
9781 (base32
9782 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9783 (build-system python-build-system)
9784 (native-inputs
9785 `(("python-case" ,python-case)
9786 ("python-pytest" ,python-pytest)))
9787 (home-page "https://github.com/celery/billiard")
9788 (synopsis
9789 "Python multiprocessing fork with improvements and bugfixes")
9790 (description
9791 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9792 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9793 pyprocessing package. This standalone variant is intended to be compatible with
9794 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9795 (license license:bsd-3)
9796 (properties `((python2-variant . ,(delay python2-billiard))))))
9797
9798 (define-public python2-billiard
9799 (let ((billiard (package-with-python2
9800 (strip-python2-variant python-billiard))))
9801 (package
9802 (inherit billiard)
9803 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9804 ("python2-mock" ,python2-mock)
9805 ,@(package-native-inputs billiard))))))
9806
9807 (define-public python-celery
9808 (package
9809 (name "python-celery")
9810 (version "4.2.1")
9811 (source
9812 (origin
9813 (method url-fetch)
9814 (uri (pypi-uri "celery" version))
9815 (sha256
9816 (base32
9817 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9818 (build-system python-build-system)
9819 (arguments
9820 '(;; TODO The tests fail with Python 3.7
9821 ;; https://github.com/celery/celery/issues/4849
9822 #:tests? #f
9823 #:phases
9824 (modify-phases %standard-phases
9825 (add-after 'unpack 'patch-requirements
9826 (lambda _
9827 (substitute* "requirements/test.txt"
9828 (("pytest>=3\\.0,<3\\.3")
9829 "pytest>=3.0"))
9830 #t)))))
9831 (native-inputs
9832 `(("python-case" ,python-case)
9833 ("python-pytest" ,python-pytest)))
9834 (propagated-inputs
9835 `(("python-pytz" ,python-pytz)
9836 ("python-billiard" ,python-billiard)
9837 ("python-kombu" ,python-kombu)))
9838 (home-page "https://celeryproject.org")
9839 (synopsis "Distributed Task Queue")
9840 (description "Celery is an asynchronous task queue/job queue based on
9841 distributed message passing. It is focused on real-time operation, but
9842 supports scheduling as well. The execution units, called tasks, are executed
9843 concurrently on a single or more worker servers using multiprocessing,
9844 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9845 synchronously (wait until ready).")
9846 (license license:bsd-3)
9847 (properties `((python2-variant . ,(delay python2-celery))))))
9848
9849 (define-public python2-celery
9850 (let ((celery (package-with-python2
9851 (strip-python2-variant python-celery))))
9852 (package
9853 (inherit celery)
9854 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9855 ("python2-mock" ,python2-mock)
9856 ,@(package-native-inputs celery))))))
9857
9858 (define-public python-translitcodec
9859 (package
9860 (name "python-translitcodec")
9861 (version "0.4.0")
9862 (source
9863 (origin
9864 (method url-fetch)
9865 (uri (pypi-uri "translitcodec" version))
9866 (sha256
9867 (base32
9868 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9869 (build-system python-build-system)
9870 (arguments
9871 `(#:tests? #f)) ; no tests provided
9872 (home-page
9873 "https://github.com/claudep/translitcodec")
9874 (synopsis
9875 "Unicode to 8-bit charset transliteration codec")
9876 (description
9877 "This package contains codecs for transliterating ISO 10646 texts into
9878 best-effort representations using smaller coded character sets (ASCII,
9879 ISO 8859, etc.).")
9880 (license license:expat)))
9881
9882 (define-public python2-translitcodec
9883 (package-with-python2 python-translitcodec))
9884
9885 (define-public python-editor
9886 (package
9887 (name "python-editor")
9888 (version "1.0.4")
9889 (source
9890 (origin
9891 (method url-fetch)
9892 (uri (pypi-uri "python-editor" version))
9893 (sha256
9894 (base32
9895 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
9896 (build-system python-build-system)
9897 (arguments
9898 '(#:tests? #f)) ;XXX: needs a TTY and an editor
9899 (home-page "https://github.com/fmoo/python-editor")
9900 (synopsis "Programmatically open an editor, capture the result")
9901 (description
9902 "python-editor is a library that provides the editor module for
9903 programmatically interfacing with your system's $EDITOR.")
9904 (license license:asl2.0)))
9905
9906 (define-public python2-editor
9907 (package-with-python2 python-editor))
9908
9909 (define-public python-vobject
9910 (package
9911 (name "python-vobject")
9912 (version "0.9.5")
9913 (source (origin
9914 (method url-fetch)
9915 (uri (pypi-uri "vobject" version))
9916 (sha256
9917 (base32
9918 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9919 (build-system python-build-system)
9920 (arguments
9921 '(;; The test suite relies on some non-portable Windows interfaces.
9922 #:tests? #f))
9923 (propagated-inputs
9924 `(("python-dateutil" ,python-dateutil)
9925 ("python-pyicu" ,python-pyicu)))
9926 (synopsis "Parse and generate vCard and vCalendar files")
9927 (description "Vobject is intended to be a full featured Python package for
9928 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9929 are supported and well tested. vCard 3.0 files are supported, and all data
9930 should be imported, but only a few components are understood in a sophisticated
9931 way.")
9932 (home-page "https://eventable.github.io/vobject/")
9933 (license license:asl2.0)))
9934
9935 (define-public python2-vobject
9936 (package-with-python2 python-vobject))
9937
9938 (define-public python-munkres
9939 (package
9940 (name "python-munkres")
9941 (version "1.0.8")
9942 (source (origin
9943 (method url-fetch)
9944 (uri (pypi-uri "munkres" version))
9945 (sha256
9946 (base32
9947 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9948 (build-system python-build-system)
9949 (arguments
9950 '(#:tests? #f)) ; no test suite
9951 (home-page "https://software.clapper.org/munkres/")
9952 (synopsis "Implementation of the Munkres algorithm")
9953 (description "The Munkres module provides an implementation of the Munkres
9954 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9955 useful for solving the Assignment Problem.")
9956 (license license:bsd-3)))
9957
9958 (define-public python2-munkres
9959 (package-with-python2 python-munkres))
9960
9961 (define-public python-whoosh
9962 (package
9963 (name "python-whoosh")
9964 (version "2.7.4")
9965 (source
9966 (origin
9967 (method url-fetch)
9968 (uri (pypi-uri "Whoosh" version))
9969 (sha256
9970 (base32
9971 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9972 (build-system python-build-system)
9973 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9974 (native-inputs
9975 `(("python-pytest" ,python-pytest)))
9976 (home-page "https://bitbucket.org/mchaput/whoosh")
9977 (synopsis "Full text indexing, search, and spell checking library")
9978 (description
9979 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9980 checking library.")
9981 (license license:bsd-2)))
9982
9983 (define-public python2-whoosh
9984 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9985 (package (inherit whoosh)
9986 (propagated-inputs
9987 `(("python2-backport-ssl-match-hostname"
9988 ,python2-backport-ssl-match-hostname)
9989 ,@(package-propagated-inputs whoosh))))))
9990
9991 (define-public python-pathlib
9992 (package
9993 (name "python-pathlib")
9994 (version "1.0.1")
9995 (source (origin
9996 (method url-fetch)
9997 (uri (pypi-uri "pathlib" version))
9998 (sha256
9999 (base32
10000 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10001 (build-system python-build-system)
10002 ;; The tests depend on the internal "test" module, which does not provide
10003 ;; a stable interface.
10004 (arguments `(#:tests? #f))
10005 (home-page "https://pathlib.readthedocs.org/")
10006 (synopsis "Object-oriented file system paths")
10007 (description "Pathlib offers a set of classes to handle file system paths.
10008 It offers the following advantages over using string objects:
10009
10010 @enumerate
10011 @item No more cumbersome use of os and os.path functions. Everything can
10012 be done easily through operators, attribute accesses, and method calls.
10013 @item Embodies the semantics of different path types. For example,
10014 comparing Windows paths ignores casing.
10015 @item Well-defined semantics, eliminating any inconsistencies or
10016 ambiguities (forward vs. backward slashes, etc.).
10017 @end enumerate
10018
10019 Note: In Python 3.4, pathlib is now part of the standard library. For other
10020 Python versions please consider python-pathlib2 instead, which tracks the
10021 standard library module. This module (python-pathlib) isn't maintained
10022 anymore.")
10023 (license license:expat)))
10024
10025 (define-public python2-pathlib
10026 (package-with-python2 python-pathlib))
10027
10028 (define-public python2-pathlib2
10029 (package
10030 (name "python2-pathlib2")
10031 (version "2.3.3")
10032 (source (origin
10033 (method url-fetch)
10034 (uri (pypi-uri "pathlib2" version))
10035 (sha256
10036 (base32
10037 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
10038 (build-system python-build-system)
10039 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10040 ;; version is 3.4 which already includes this package as part of the
10041 ;; standard library.
10042 (arguments
10043 `(#:python ,python-2))
10044 (propagated-inputs
10045 `(("python2-scandir" ,python2-scandir)
10046 ("python2-six" ,python2-six)))
10047 (home-page "https://pypi.org/project/pathlib2/")
10048 (synopsis "Object-oriented file system paths - backport of standard
10049 pathlib module")
10050 (description "The goal of pathlib2 is to provide a backport of standard
10051 pathlib module which tracks the standard library module, so all the newest
10052 features of the standard pathlib can be used also on older Python versions.
10053
10054 Pathlib offers a set of classes to handle file system paths. It offers the
10055 following advantages over using string objects:
10056
10057 @enumerate
10058 @item No more cumbersome use of os and os.path functions. Everything can
10059 be done easily through operators, attribute accesses, and method calls.
10060 @item Embodies the semantics of different path types. For example,
10061 comparing Windows paths ignores casing.
10062 @item Well-defined semantics, eliminating any inconsistencies or
10063 ambiguities (forward vs. backward slashes, etc.).
10064 @end enumerate")
10065 (license license:expat)))
10066
10067 (define-public python2-pathlib2-bootstrap
10068 (hidden-package
10069 (package
10070 (inherit python2-pathlib2)
10071 (name "python2-pathlib2-bootstrap")
10072 (propagated-inputs
10073 `(("python2-scandir" ,python2-scandir)
10074 ("python2-six" ,python2-six-bootstrap))))))
10075
10076 (define-public python-jellyfish
10077 (package
10078 (name "python-jellyfish")
10079 (version "0.5.6")
10080 (source (origin
10081 (method url-fetch)
10082 (uri (pypi-uri "jellyfish" version))
10083 (sha256
10084 (base32
10085 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10086 (build-system python-build-system)
10087 (native-inputs
10088 `(("python-pytest" ,python-pytest)))
10089 (home-page "https://github.com/jamesturk/jellyfish")
10090 (synopsis "Approximate and phonetic matching of strings")
10091 (description "Jellyfish uses a variety of string comparison and phonetic
10092 encoding algorithms to do fuzzy string matching.")
10093 (license license:bsd-2)
10094 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10095
10096 (define-public python2-jellyfish
10097 (let ((jellyfish (package-with-python2
10098 (strip-python2-variant python-jellyfish))))
10099 (package (inherit jellyfish)
10100 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10101 ,@(package-native-inputs jellyfish))))))
10102
10103 (define-public python2-unicodecsv
10104 (package
10105 (name "python2-unicodecsv")
10106 (version "0.14.1")
10107 (source (origin
10108 (method git-fetch)
10109 ;; The test suite is not included in the PyPi release.
10110 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10111 (uri (git-reference
10112 (url "https://github.com/jdunck/python-unicodecsv")
10113 (commit version)))
10114 (file-name (git-file-name name version))
10115 (sha256
10116 (base32
10117 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
10118 (build-system python-build-system)
10119 (arguments
10120 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10121 #:python ,python-2))
10122 (native-inputs
10123 `(("python2-unittest2" ,python2-unittest2)))
10124 (home-page "https://github.com/jdunck/python-unicodecsv")
10125 (synopsis "Unicode CSV module for Python 2")
10126 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10127 module, adding support for Unicode strings.")
10128 (license license:bsd-2)))
10129
10130 (define-public python-rarfile
10131 (package
10132 (name "python-rarfile")
10133 (version "2.8")
10134 (source (origin
10135 (method url-fetch)
10136 (uri (pypi-uri "rarfile" version))
10137 (sha256
10138 (base32
10139 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10140 (build-system python-build-system)
10141 (arguments
10142 '(#:phases
10143 (modify-phases %standard-phases
10144 (replace 'check
10145 ;; Many tests fail, but the installation proceeds.
10146 (lambda _ (invoke "make" "-C" "test" "test"))))))
10147 (native-inputs
10148 `(("which" ,which))) ; required for tests
10149 (propagated-inputs
10150 `(("libarchive" ,libarchive)))
10151 (home-page "https://github.com/markokr/rarfile")
10152 (synopsis "RAR archive reader for Python")
10153 (description "This is Python module for RAR archive reading. The interface
10154 is made as zipfile like as possible.")
10155 (license license:isc)))
10156
10157 (define-public python2-rarfile
10158 (package-with-python2 python-rarfile))
10159
10160 (define-public python-magic
10161 (package
10162 (name "python-magic")
10163 (version "0.4.15")
10164 (source
10165 (origin
10166 (method url-fetch)
10167 (uri (pypi-uri "python-magic" version))
10168 (sha256
10169 (base32
10170 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
10171 (file-name (string-append name "-" version "-checkout"))))
10172 (build-system python-build-system)
10173 (arguments
10174 ;; The tests are unreliable, so don't run them. The tests fail
10175 ;; under Python3 because they were written for Python2 and
10176 ;; contain import statements that do not work in Python3. One of
10177 ;; the tests fails under Python2 because its assertions are
10178 ;; overly stringent; it relies on comparing output strings which
10179 ;; are brittle and can change depending on the version of
10180 ;; libmagic being used and the system on which the test is
10181 ;; running. In my case, under GuixSD 0.10.0, only one test
10182 ;; failed, and it seems to have failed only because the version
10183 ;; of libmagic that is packaged in Guix outputs a slightly
10184 ;; different (but not wrong) string than the one that the test
10185 ;; expected.
10186 '(#:tests? #f
10187 #:phases (modify-phases %standard-phases
10188 ;; Replace a specific method call with a hard-coded
10189 ;; path to the necessary libmagic.so file in the
10190 ;; store. If we don't do this, then the method call
10191 ;; will fail to find the libmagic.so file, which in
10192 ;; turn will cause any application using
10193 ;; python-magic to fail.
10194 (add-before 'build 'hard-code-path-to-libmagic
10195 (lambda* (#:key inputs #:allow-other-keys)
10196 (let ((file (assoc-ref inputs "file")))
10197 (substitute* "magic.py"
10198 (("ctypes.util.find_library\\('magic'\\)")
10199 (string-append "'" file "/lib/libmagic.so'")))
10200 #t)))
10201 (add-before 'install 'disable-egg-compression
10202 (lambda _
10203 (let ((port (open-file "setup.cfg" "a")))
10204 (display "\n[easy_install]\nzip_ok = 0\n"
10205 port)
10206 (close-port port)
10207 #t))))))
10208 (inputs
10209 ;; python-magic needs to be able to find libmagic.so.
10210 `(("file" ,file)))
10211 (home-page
10212 "https://github.com/ahupp/python-magic")
10213 (synopsis
10214 "File type identification using libmagic")
10215 (description
10216 "This module uses ctypes to access the libmagic file type
10217 identification library. It makes use of the local magic database and
10218 supports both textual and MIME-type output. Note that this module and
10219 the python-file module both provide a \"magic.py\" file; these two
10220 modules, which are different and were developed separately, both serve
10221 the same purpose: to provide Python bindings for libmagic.")
10222 (license license:expat)))
10223
10224 (define-public python2-magic
10225 (package-with-python2 python-magic))
10226
10227 (define-public python2-s3cmd
10228 (package
10229 (name "python2-s3cmd")
10230 (version "1.6.1")
10231 (source
10232 (origin
10233 (method url-fetch)
10234 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10235 "s3cmd-" version ".tar.gz"))
10236 (sha256
10237 (base32
10238 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10239 (build-system python-build-system)
10240 (arguments
10241 ;; s3cmd is written for python2 only and contains no tests.
10242 `(#:python ,python-2
10243 #:tests? #f))
10244 (propagated-inputs
10245 `(("python2-dateutil" ,python2-dateutil)
10246 ;; The python-file package also provides a magic.py module.
10247 ;; This is an unfortunate state of affairs; however, s3cmd
10248 ;; fails to install if it cannot find specifically the
10249 ;; python-magic package. Thus we include it, instead of using
10250 ;; python-file. Ironically, s3cmd sometimes works better
10251 ;; without libmagic bindings at all:
10252 ;; https://github.com/s3tools/s3cmd/issues/198
10253 ("python2-magic" ,python2-magic)))
10254 (home-page "http://s3tools.org/s3cmd")
10255 (synopsis "Command line tool for S3-compatible storage services")
10256 (description
10257 "S3cmd is a command line tool for uploading, retrieving and managing data
10258 in storage services that are compatible with the Amazon Simple Storage
10259 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10260 GnuPG encryption, and more. It also supports management of Amazon's
10261 CloudFront content delivery network.")
10262 (license license:gpl2+)))
10263
10264 (define-public python-pkgconfig
10265 (package
10266 (name "python-pkgconfig")
10267 (version "1.3.1")
10268 (source
10269 (origin
10270 (method url-fetch)
10271 (uri (pypi-uri "pkgconfig" version))
10272 (sha256
10273 (base32
10274 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10275 (build-system python-build-system)
10276 (native-inputs
10277 `(("python-nose" ,python-nose)))
10278 (inputs
10279 `(("pkg-config" ,pkg-config)))
10280 (arguments
10281 `(#:phases
10282 (modify-phases %standard-phases
10283 (add-before 'build 'patch
10284 ;; Hard-code the path to pkg-config.
10285 (lambda _
10286 (substitute* "pkgconfig/pkgconfig.py"
10287 (("cmd = 'pkg-config")
10288 (string-append "cmd = '" (which "pkg-config"))))
10289 #t))
10290 (replace 'check
10291 (lambda _
10292 (invoke "nosetests" "test.py"))))))
10293 (home-page "https://github.com/matze/pkgconfig")
10294 (synopsis "Python interface for pkg-config")
10295 (description "This module provides a Python interface to pkg-config. It
10296 can be used to find all pkg-config packages, check if a package exists,
10297 check if a package meets certain version requirements, query CFLAGS and
10298 LDFLAGS and parse the output to build extensions with setup.py.")
10299 (license license:expat)))
10300
10301 (define-public python2-pkgconfig
10302 (package-with-python2 python-pkgconfig))
10303
10304 (define-public python-bz2file
10305 (package
10306 (name "python-bz2file")
10307 (version "0.98")
10308 (source
10309 (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "bz2file" version))
10312 (sha256
10313 (base32
10314 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10315 (build-system python-build-system)
10316 (arguments
10317 `(#:tests? #f)) ; Tests use deprecated python modules.
10318 (home-page "https://github.com/nvawda/bz2file")
10319 (synopsis "Read and write bzip2-compressed files")
10320 (description
10321 "Bz2file is a Python library for reading and writing bzip2-compressed
10322 files. It contains a drop-in replacement for the I/O interface in the
10323 standard library's @code{bz2} module, including features from the latest
10324 development version of CPython that are not available in older releases.")
10325 (license license:asl2.0)))
10326
10327 (define-public python2-bz2file
10328 (package-with-python2 python-bz2file))
10329
10330 (define-public python-future
10331 (package
10332 (name "python-future")
10333 (version "0.17.1")
10334 (source
10335 (origin
10336 (method url-fetch)
10337 (uri (pypi-uri "future" version))
10338 (sha256
10339 (base32
10340 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
10341 (build-system python-build-system)
10342 ;; Many tests connect to the network or are otherwise flawed.
10343 ;; https://github.com/PythonCharmers/python-future/issues/210
10344 (arguments
10345 `(#:tests? #f))
10346 (home-page "http://python-future.org")
10347 (synopsis "Single-source support for Python 3 and 2")
10348 (description
10349 "@code{python-future} is the missing compatibility layer between Python 2 and
10350 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10351 to support both Python 2 and Python 3 with minimal overhead.")
10352 (license license:expat)))
10353
10354 (define-public python2-future
10355 (package-with-python2 python-future))
10356
10357 (define-public python-cysignals
10358 (package
10359 (name "python-cysignals")
10360 (version "1.9.0")
10361 (source
10362 (origin
10363 (method url-fetch)
10364 (uri (pypi-uri "cysignals" version))
10365 (sha256
10366 (base32
10367 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
10368 (build-system python-build-system)
10369 (native-inputs
10370 `(("python-cython" ,python-cython)
10371 ("python-sphinx" ,python-sphinx)))
10372 (inputs
10373 `(("pari-gp" ,pari-gp)))
10374 (arguments
10375 `(#:modules ((guix build python-build-system)
10376 ((guix build gnu-build-system) #:prefix gnu:)
10377 (guix build utils))
10378 ;; FIXME: Tests are executed after installation and currently fail
10379 ;; when not installing into standard locations; the author is working
10380 ;; on a fix.
10381 #:tests? #f
10382 #:phases
10383 (modify-phases %standard-phases
10384 (add-before
10385 'build 'configure
10386 (assoc-ref gnu:%standard-phases 'configure)))))
10387 (home-page
10388 "https://github.com/sagemath/cysignals")
10389 (synopsis
10390 "Handling of interrupts and signals for Cython")
10391 (description
10392 "The cysignals package provides mechanisms to handle interrupts (and
10393 other signals and errors) in Cython code, using two related approaches,
10394 for mixed Cython/Python code or external C libraries and pure Cython code,
10395 respectively.")
10396 (license license:lgpl3+)))
10397
10398 (define-public python2-cysignals
10399 (package-with-python2 python-cysignals))
10400
10401 (define-public python2-shedskin
10402 (package
10403 (name "python2-shedskin")
10404 (version "0.9.4")
10405 (source
10406 (origin
10407 (method url-fetch)
10408 (uri (string-append "https://github.com/shedskin/shedskin/"
10409 "releases/download/v" version
10410 "/shedskin-" version ".tgz"))
10411 (sha256
10412 (base32
10413 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10414 (build-system python-build-system)
10415 (arguments
10416 `(#:python ,python-2
10417 #:phases (modify-phases %standard-phases
10418 (add-after 'unpack 'fix-resulting-include-libs
10419 (lambda* (#:key inputs #:allow-other-keys)
10420 (let ((libgc (assoc-ref inputs "libgc"))
10421 (pcre (assoc-ref inputs "pcre")))
10422 (substitute* "shedskin/makefile.py"
10423 (("variable == 'CCFLAGS':[ ]*")
10424 (string-append "variable == 'CCFLAGS':\n"
10425 " line += ' -I " pcre "/include"
10426 " -I " libgc "/include'"))
10427 (("variable == 'LFLAGS':[ ]*")
10428 (string-append "variable == 'LFLAGS':\n"
10429 " line += ' -L" pcre "/lib"
10430 " -L " libgc "/lib'")))
10431 #t))))))
10432 (inputs `(("pcre" ,pcre)
10433 ("libgc" ,libgc)))
10434 (home-page "https://shedskin.github.io/")
10435 (synopsis "Experimental Python-2 to C++ Compiler")
10436 (description (string-append "This is an experimental compiler for a subset of
10437 Python. It generates C++ code and a Makefile."))
10438 (license (list license:gpl3 license:bsd-3 license:expat))))
10439
10440 (define-public python2-rope
10441 (package
10442 (name "python2-rope")
10443 (version "0.11.0")
10444 (source
10445 (origin
10446 (method url-fetch)
10447 (uri (pypi-uri "rope" version))
10448 (sha256
10449 (base32
10450 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10451 (arguments
10452 ;; Rope has only partial python3 support, see `python-rope'
10453 `(#:python ,python-2))
10454 (build-system python-build-system)
10455 (native-inputs
10456 `(("python2-unittest2" ,python2-unittest2)))
10457 (home-page "https://github.com/python-rope/rope")
10458 (synopsis "Refactoring library for Python")
10459 (description "Rope is a refactoring library for Python. It facilitates
10460 the renaming, moving and extracting of attributes, functions, modules, fields
10461 and parameters in Python 2 source code. These refactorings can also be applied
10462 to occurrences in strings and comments.")
10463 (license license:gpl2)))
10464
10465 (define-public python-rope
10466 (package
10467 (inherit python2-rope)
10468 (name "python-rope")
10469 (arguments `(#:python ,python-wrapper
10470 ;; XXX: Only partial python3 support, results in some failing
10471 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10472 #:tests? #f))
10473 (properties `((python2-variant . ,(delay python2-rope))))))
10474
10475 (define-public python-py3status
10476 (package
10477 (name "python-py3status")
10478 (version "3.21")
10479 (source
10480 (origin
10481 (method url-fetch)
10482 (uri (pypi-uri "py3status" version))
10483 (sha256
10484 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10485 (build-system python-build-system)
10486 (inputs
10487 `(("file" ,file)))
10488 (arguments
10489 '(#:phases
10490 (modify-phases %standard-phases
10491 ;; 'file' is used for detection of configuration file encoding
10492 ;; let's make link the dependency to particular input
10493 (add-before 'build 'patch-file-path
10494 (lambda* (#:key inputs #:allow-other-keys)
10495 (let ((file-path (assoc-ref inputs "file")))
10496 (substitute* "py3status/parse_config.py"
10497 (("\\[\"file\", \"-b\"")
10498 (string-append "['" file-path "/bin/file', '-b'")))
10499 #t))))
10500 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10501 (home-page "https://github.com/ultrabug/py3status")
10502 (synopsis "Extensible i3status wrapper written in Python")
10503 (description "py3status is an i3status wrapper which extends i3status
10504 functionality in a modular way, allowing you to extend your panel with your
10505 own code, responding to click events and updating clock every second.")
10506 (license license:bsd-3)))
10507
10508 (define-public python-tblib
10509 (package
10510 (name "python-tblib")
10511 (version "1.6.0")
10512 (source (origin
10513 (method url-fetch)
10514 (uri (pypi-uri "tblib" version))
10515 (sha256
10516 (base32
10517 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
10518 (build-system python-build-system)
10519 (arguments
10520 `(#:phases
10521 (modify-phases %standard-phases
10522 (replace 'check
10523 (lambda _
10524 ;; Upstream runs tests after installation and the package itself
10525 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10526 ;; found.
10527 (setenv "PYTHONPATH"
10528 (string-append (getcwd) "/build/lib:"
10529 (getenv "PYTHONPATH")))
10530 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10531 (native-inputs
10532 `(("python-pytest" ,python-pytest)
10533 ("python-six" ,python-six)))
10534 (home-page "https://github.com/ionelmc/python-tblib")
10535 (synopsis "Traceback serialization library")
10536 (description
10537 "Traceback serialization allows you to:
10538
10539 @enumerate
10540 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10541 different processes. This allows better error handling when running code over
10542 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10543
10544 @item Parse traceback strings and raise with the parsed tracebacks.
10545 @end enumerate\n")
10546 (license license:bsd-3)))
10547
10548 (define-public python2-tblib
10549 (package-with-python2 python-tblib))
10550
10551 (define-public python-greenlet
10552 (package
10553 (name "python-greenlet")
10554 (version "0.4.15")
10555 (source (origin
10556 (method url-fetch)
10557 (uri (pypi-uri "greenlet" version))
10558 (sha256
10559 (base32
10560 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10561 (build-system python-build-system)
10562 (home-page "https://greenlet.readthedocs.io/")
10563 (synopsis "Lightweight in-process concurrent programming")
10564 (description
10565 "Greenlet package is a spin-off of Stackless, a version of CPython
10566 that supports micro-threads called \"tasklets\". Tasklets run
10567 pseudo-concurrently (typically in a single or a few OS-level threads) and
10568 are synchronized with data exchanges on \"channels\".")
10569 (license (list license:psfl license:expat))))
10570
10571 (define-public python2-greenlet
10572 (package-with-python2 python-greenlet))
10573
10574 (define-public python-objgraph
10575 (package
10576 (name "python-objgraph")
10577 (version "3.4.1")
10578 (source
10579 (origin
10580 (method url-fetch)
10581 (uri (pypi-uri "objgraph" version))
10582 (sha256
10583 (base32
10584 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
10585 (build-system python-build-system)
10586 (propagated-inputs
10587 `(("python-graphviz" ,python-graphviz)))
10588 (native-inputs
10589 `(("python-mock" ,python-mock)
10590 ("graphviz" ,graphviz)))
10591 (home-page "https://mg.pov.lt/objgraph/")
10592 (synopsis "Draw Python object reference graphs with graphviz")
10593 (description
10594 "This package provides tools to draw Python object reference graphs with
10595 graphviz.")
10596 (license license:expat)))
10597
10598 (define-public python2-objgraph
10599 (package-with-python2 python-objgraph))
10600
10601 (define-public python-gevent
10602 (package
10603 (name "python-gevent")
10604 (version "1.4.0")
10605 (source (origin
10606 (method url-fetch)
10607 (uri (pypi-uri "gevent" version))
10608 (sha256
10609 (base32
10610 "1lchr4akw2jkm5v4kz7bdm4wv3knkfhbfn9vkkz4s5yrkcxzmdqy"))
10611 (modules '((guix build utils)))
10612 (snippet
10613 '(begin
10614 ;; unbunding libev and c-ares
10615 (delete-file-recursively "deps")
10616 #t))))
10617 (build-system python-build-system)
10618 (arguments
10619 `(#:modules ((ice-9 ftw)
10620 (ice-9 match)
10621 (srfi srfi-26)
10622 (guix build utils)
10623 (guix build python-build-system))
10624 #:phases (modify-phases %standard-phases
10625 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10626 (lambda _
10627 (substitute* "src/gevent/subprocess.py"
10628 (("/bin/sh") (which "sh")))
10629 (for-each (lambda (file)
10630 (substitute* file
10631 (("/bin/sh") (which "sh"))
10632 (("/bin/true") (which "true"))))
10633 (find-files "src/greentest" "\\.py$"))
10634 #t))
10635 (add-before 'build 'do-not-use-bundled-sources
10636 (lambda* (#:key inputs #:allow-other-keys)
10637 (setenv "GEVENTSETUP_EMBED" "0")
10638
10639 ;; Prevent building bundled libev.
10640 (substitute* "setup.py"
10641 (("run_make=_BUILDING")
10642 "run_make=False"))
10643
10644 (let ((greenlet (string-append
10645 (assoc-ref inputs "python-greenlet")
10646 "/include")))
10647 (match (scandir greenlet
10648 (lambda (item)
10649 (string-prefix? "python" item)))
10650 ((python)
10651 (setenv "C_INCLUDE_PATH"
10652 (string-append greenlet "/" python ":"
10653 (or (getenv "C_INCLUDE_PATH")
10654 ""))))))
10655 #t))
10656 (add-before 'check 'pretend-to-be-CI
10657 (lambda _
10658 ;; A few tests are skipped due to network constraints or
10659 ;; get longer timeouts when running in a CI environment.
10660 ;; Piggy-back on that, as we need the same adjustments.
10661 (setenv "TRAVIS" "1")
10662 (setenv "APPVEYOR" "1")
10663 #t))
10664 (add-before 'check 'adjust-tests
10665 (lambda _
10666 (let ((disabled-tests
10667 '(;; These tests rely on networking which is not
10668 ;; available in the build container.
10669 "test_urllib2net.py"
10670 "test__server.py"
10671 "test__server_pywsgi.py"
10672 "test_socket.py"
10673 "test__socket.py"
10674 "test__socket_ssl.py"
10675 "test__socket_dns.py"
10676 "test__socket_dns6.py"
10677 "test___example_servers.py"
10678 "test__getaddrinfo_import.py"
10679 "test__examples.py"
10680 "test_httplib.py"
10681 "test_https.py"
10682 "test_urllib2_localnet.py"
10683 "test_ssl.py"
10684 "test__ssl.py"
10685 ;; XXX: These tests borrow functionality from the
10686 ;; Python builtin 'test' module, but it is not
10687 ;; installed with the Guix Python distribution.
10688 "test_smtpd.py"
10689 "test_wsgiref.py"
10690 "test_urllib2.py"
10691 "test_thread.py"
10692 "test_threading.py"
10693 "test__threading_2.py"
10694 ;; FIXME: test_patch_twice_warning_events fails for
10695 ;; no apparent reason. Needs more investigation!
10696 "test__monkey.py"
10697 ;; These tests rely on KeyboardInterrupts which do not
10698 ;; work inside the build container for some reason
10699 ;; (lack of controlling terminal?).
10700 "test_subprocess.py"
10701 "test__issues461_471.py"
10702 ;; TODO: Patch out the tests that use getprotobyname, etc
10703 ;; instead of disabling all the tests from these files.
10704 "test__all__.py"
10705 "test___config.py"
10706 "test__execmodules.py")))
10707 (call-with-output-file "skipped_tests.txt"
10708 (lambda (port)
10709 (display (string-join disabled-tests "\n") port)))
10710 #t)))
10711 (replace 'check
10712 (lambda _
10713 ;; Make sure the build directory is on PYTHONPATH.
10714 (setenv "PYTHONPATH"
10715 (string-append
10716 (getenv "PYTHONPATH") ":"
10717 (getcwd) "/build/"
10718 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10719
10720 ;; Use the build daemons configured number of workers.
10721 (setenv "NWORKERS" (number->string (parallel-job-count)))
10722
10723 (invoke "python" "-m" "gevent.tests" "--config"
10724 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
10725 (propagated-inputs
10726 `(("python-greenlet" ,python-greenlet)
10727 ("python-objgraph" ,python-objgraph)))
10728 (native-inputs
10729 `(("python-six" ,python-six)
10730
10731 ;; For tests.
10732 ("python-dnspython" ,python-dnspython)
10733 ("python-psutil" ,python-psutil)
10734 ("python-zope.event" ,python-zope-event)
10735 ("python-zope.interface" ,python-zope-interface)))
10736 (inputs
10737 `(("c-ares" ,c-ares)
10738 ("libev" ,libev)))
10739 (home-page "http://www.gevent.org/")
10740 (synopsis "Coroutine-based network library")
10741 (description
10742 "gevent is a coroutine-based Python networking library that uses greenlet
10743 to provide a high-level synchronous API on top of the libev event loop.")
10744 (license license:expat)
10745 (properties `((python2-variant . ,(delay python2-gevent))))))
10746
10747 (define-public python2-gevent
10748 (let ((base (package-with-python2
10749 (strip-python2-variant python-gevent))))
10750 (package
10751 (inherit base)
10752 (native-inputs `(,@(package-native-inputs base)
10753 ("python-mock" ,python2-mock))))))
10754
10755 (define-public python-fastimport
10756 (package
10757 (name "python-fastimport")
10758 (version "0.9.6")
10759 (source
10760 (origin
10761 (method url-fetch)
10762 (uri (pypi-uri "fastimport" version))
10763 (sha256
10764 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10765 (build-system python-build-system)
10766 (home-page "https://github.com/jelmer/python-fastimport")
10767 (synopsis "VCS fastimport parser and generator in Python")
10768 (description "This package provides a parser for and generator of the Git
10769 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10770 format.")
10771 (license license:gpl2+)))
10772
10773 (define-public python2-fastimport
10774 (package-with-python2 python-fastimport))
10775
10776 (define-public python-twisted
10777 (package
10778 (name "python-twisted")
10779 (version "19.7.0")
10780 (source (origin
10781 (method url-fetch)
10782 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10783 (sha256
10784 (base32
10785 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10786 (build-system python-build-system)
10787 (arguments
10788 '(#:tests? #f)) ; FIXME: some tests fail
10789 (propagated-inputs
10790 `(("python-zope-interface" ,python-zope-interface)
10791 ("python-pyhamcrest" ,python-pyhamcrest)
10792 ("python-incremental" ,python-incremental)
10793 ("python-hyperlink" ,python-hyperlink)
10794 ("python-constantly" ,python-constantly)
10795 ("python-automat" ,python-automat)))
10796 (home-page "https://twistedmatrix.com/")
10797 (synopsis "Asynchronous networking framework written in Python")
10798 (description
10799 "Twisted is an extensible framework for Python programming, with special
10800 focus on event-based network programming and multiprotocol integration.")
10801 (license license:expat)))
10802
10803 (define-public python2-twisted
10804 (package-with-python2 python-twisted))
10805
10806 (define-public python-pika
10807 (package
10808 (name "python-pika")
10809 (version "0.12.0")
10810 (source
10811 (origin
10812 (method url-fetch)
10813 (uri (pypi-uri "pika" version))
10814 (sha256
10815 (base32
10816 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10817 (build-system python-build-system)
10818 (native-inputs
10819 `(("python-pyev" ,python-pyev)
10820 ("python-tornado" ,python-tornado)
10821 ("python-twisted" ,python-twisted)))
10822 (home-page "https://pika.readthedocs.org")
10823 (synopsis "Pure Python AMQP Client Library")
10824 (description
10825 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10826 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10827 network support library.")
10828 (license license:bsd-3)))
10829
10830 (define-public python2-pika
10831 (package-with-python2 python-pika))
10832
10833 (define-public python-ply
10834 (package
10835 (name "python-ply")
10836 (version "3.10")
10837 (source
10838 (origin
10839 (method url-fetch)
10840 (uri (pypi-uri "ply" version))
10841 (sha256
10842 (base32
10843 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10844 (build-system python-build-system)
10845 (home-page "http://www.dabeaz.com/ply/")
10846 (synopsis "Python Lex & Yacc")
10847 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10848 It uses LR parsing and does extensive error checking.")
10849 (license license:bsd-3)))
10850
10851 (define-public python2-ply
10852 (package-with-python2 python-ply))
10853
10854 (define-public python-tabulate
10855 (package
10856 (name "python-tabulate")
10857 (version "0.7.7")
10858 (source (origin
10859 (method url-fetch)
10860 (uri (pypi-uri "tabulate" version))
10861 (sha256
10862 (base32
10863 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10864 (build-system python-build-system)
10865 (arguments
10866 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10867 ;; and the latest release is not tagged in the upstream repository.
10868 '(#:tests? #f))
10869 (home-page "https://bitbucket.org/astanin/python-tabulate")
10870 (synopsis "Pretty-print tabular data")
10871 (description
10872 "Tabulate is a library and command-line utility to pretty-print tabular
10873 data in Python.")
10874 (license license:expat)))
10875
10876 (define-public python2-tabulate
10877 (package-with-python2 python-tabulate))
10878
10879 (define-public python-kazoo
10880 (package
10881 (name "python-kazoo")
10882 (version "2.4.0")
10883 (source
10884 (origin
10885 (method url-fetch)
10886 (uri (pypi-uri "kazoo" version))
10887 (sha256
10888 (base32
10889 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10890 (build-system python-build-system)
10891 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10892 (propagated-inputs
10893 `(("python-six" ,python-six)))
10894 (home-page "https://kazoo.readthedocs.org")
10895 (synopsis "High-level Zookeeper client library")
10896 (description
10897 "Kazoo is a Python client library for the Apache Zookeeper distributed
10898 application service. It is designed to be easy to use and to avoid common
10899 programming errors.")
10900 (license license:asl2.0)))
10901
10902 (define-public python2-kazoo
10903 (package-with-python2 python-kazoo))
10904
10905 (define-public python-pykafka
10906 (package
10907 (name "python-pykafka")
10908 (version "2.4.0")
10909 (source (origin
10910 (method url-fetch)
10911 (uri (pypi-uri "pykafka" version))
10912 (sha256
10913 (base32
10914 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10915 (build-system python-build-system)
10916 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10917 (propagated-inputs
10918 `(("python-gevent" ,python-gevent)
10919 ("python-kazoo" ,python-kazoo)
10920 ("python-tabulate" ,python-tabulate)))
10921 (inputs
10922 `(("librdkafka" ,librdkafka)))
10923 (home-page "https://pykafka.readthedocs.io/")
10924 (synopsis "Apache Kafka client for Python")
10925 (description
10926 "PyKafka is a client for the Apache Kafka distributed messaging system.
10927 It includes Python implementations of Kafka producers and consumers, which
10928 are optionally backed by a C extension built on librdkafka.")
10929 (license license:asl2.0)))
10930
10931 (define-public python2-pykafka
10932 (package-with-python2 python-pykafka))
10933
10934 (define-public python-wcwidth
10935 (package
10936 (name "python-wcwidth")
10937 (version "0.1.8")
10938 (source (origin
10939 (method url-fetch)
10940 (uri (pypi-uri "wcwidth" version))
10941 (sha256
10942 (base32
10943 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10944 (build-system python-build-system)
10945 (home-page "https://github.com/jquast/wcwidth")
10946 (synopsis "Measure number of terminal column cells of wide-character codes")
10947 (description "Wcwidth measures the number of terminal column cells of
10948 wide-character codes. It is useful for those implementing a terminal emulator,
10949 or programs that carefully produce output to be interpreted by one. It is a
10950 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10951 specified in POSIX.1-2001 and POSIX.1-2008.")
10952 (license license:expat)))
10953
10954 (define-public python2-wcwidth
10955 (package-with-python2 python-wcwidth))
10956
10957 (define-public python2-jsonrpclib
10958 (package
10959 (name "python2-jsonrpclib")
10960 (version "0.1.7")
10961 (source (origin
10962 (method url-fetch)
10963 (uri (pypi-uri "jsonrpclib" version))
10964 (sha256
10965 (base32
10966 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10967 (build-system python-build-system)
10968 (arguments
10969 `(#:tests? #f
10970 #:python ,python-2))
10971 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10972 (synopsis "Implementation of JSON-RPC specification for Python")
10973 (description
10974 "This library is an implementation of the JSON-RPC specification.
10975 It supports both the original 1.0 specification, as well as the
10976 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10977 etc.")
10978 (license license:asl2.0)))
10979
10980 (define-public python-chai
10981 (package
10982 (name "python-chai")
10983 (version "1.1.2")
10984 (source (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "chai" version))
10987 (sha256
10988 (base32
10989 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10990 (build-system python-build-system)
10991 (home-page "https://github.com/agoragames/chai")
10992 (synopsis "Mocking framework for Python")
10993 (description
10994 "Chai provides an api for mocking, stubbing and spying your python
10995 objects, patterned after the Mocha library for Ruby.")
10996 (license license:bsd-3)))
10997
10998 (define-public python2-chai
10999 (package-with-python2 python-chai))
11000
11001 (define-public python-inflection
11002 (package
11003 (name "python-inflection")
11004 (version "0.3.1")
11005 (source
11006 (origin (method url-fetch)
11007 (uri (pypi-uri "inflection" version))
11008 (sha256
11009 (base32
11010 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11011 (build-system python-build-system)
11012 (native-inputs
11013 `(("python-pytest" ,python-pytest)))
11014 (home-page "https://github.com/jpvanhal/inflection")
11015 (synopsis "Python string transformation library")
11016 (description
11017 "Inflection is a string transformation library. It singularizes
11018 and pluralizes English words, and transforms strings from CamelCase to
11019 underscored string.")
11020 (license license:expat)))
11021
11022 (define-public python2-inflection
11023 (package-with-python2 python-inflection))
11024
11025 (define-public python-pylev
11026 (package
11027 (name "python-pylev")
11028 (version "1.3.0")
11029 (source (origin
11030 (method url-fetch)
11031 (uri (pypi-uri "pylev" version))
11032 (sha256
11033 (base32
11034 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11035 (build-system python-build-system)
11036 (home-page "https://github.com/toastdriven/pylev")
11037 (synopsis "Levenshtein distance implementation in Python")
11038 (description "Pure Python Levenshtein implementation, based off the
11039 Wikipedia code samples at
11040 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11041 (license license:bsd-3)))
11042
11043 (define-public python2-pylev
11044 (package-with-python2 python-pylev))
11045
11046 (define-public python-cleo
11047 (package
11048 (name "python-cleo")
11049 (version "0.7.6")
11050 (source (origin
11051 (method url-fetch)
11052 (uri (pypi-uri "cleo" version))
11053 (sha256
11054 (base32
11055 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
11056 (build-system python-build-system)
11057 (native-inputs
11058 `( ;; For testing
11059 ("python-mock" ,python-mock)
11060 ("python-pytest-mock" ,python-pytest-mock)
11061 ("python-pytest" ,python-pytest)))
11062 (propagated-inputs
11063 `(("python-backpack" ,python-backpack)
11064 ("python-clikit" ,python-clikit)
11065 ("python-pastel" ,python-pastel)
11066 ("python-pylev" ,python-pylev)))
11067 (home-page "https://github.com/sdispater/cleo")
11068 (synopsis "Command-line arguments library for Python")
11069 (description
11070 "Cleo allows you to create command-line commands with signature in
11071 docstring and colored output.")
11072 (license license:expat)))
11073
11074 (define-public python2-cleo
11075 (package-with-python2 python-cleo))
11076
11077 (define-public python-tomlkit
11078 (package
11079 (name "python-tomlkit")
11080 (version "0.5.11")
11081 (source
11082 (origin
11083 (method url-fetch)
11084 (uri (pypi-uri "tomlkit" version))
11085 (sha256
11086 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
11087 (build-system python-build-system)
11088 (native-inputs
11089 `(("python-pytest" ,python-pytest)))
11090 (home-page "https://github.com/sdispater/tomlkit")
11091 (synopsis "Style-preserving TOML library")
11092 (description
11093 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11094 preserves all comments, indentations, whitespace and internal element ordering,
11095 and makes them accessible and editable via an intuitive API. It can also
11096 create new TOML documents from scratch using the provided helpers. Part of the
11097 implementation has been adapted, improved, and fixed from Molten.")
11098 (license license:expat)))
11099
11100 (define-public python-shellingham
11101 (package
11102 (name "python-shellingham")
11103 (version "1.3.1")
11104 (source
11105 (origin
11106 (method url-fetch)
11107 (uri (pypi-uri "shellingham" version))
11108 (sha256
11109 (base32
11110 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
11111 (build-system python-build-system)
11112 (home-page
11113 "https://github.com/sarugaku/shellingham")
11114 (synopsis "Tool to detect surrounding shell")
11115 (description
11116 "Shellingham detects what shell the current Python executable is
11117 running in.")
11118 (license license:isc)))
11119
11120 (define-public python-memcached
11121 (package
11122 (name "python-memcached")
11123 (version "1.59")
11124 (source
11125 (origin
11126 (method url-fetch)
11127 (uri (pypi-uri "python-memcached" version))
11128 (sha256
11129 (base32
11130 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
11131 (build-system python-build-system)
11132 (propagated-inputs `(("python-six" ,python-six)))
11133 (home-page
11134 "https://github.com/linsomniac/python-memcached")
11135 (synopsis "Pure python memcached client")
11136 (description
11137 "This software is a pure Python interface to the memcached memory cache
11138 daemon. It is the client side software which allows storing values in one or
11139 more, possibly remote, memcached servers.")
11140 (license license:psfl)))
11141
11142 (define-public python-clikit
11143 (package
11144 (name "python-clikit")
11145 (version "0.4.1")
11146 (source
11147 (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "clikit" version))
11150 (sha256
11151 (base32
11152 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
11153 (build-system python-build-system)
11154 (propagated-inputs
11155 `(("python-pastel" ,python-pastel)
11156 ("python-pylev" ,python-pylev)))
11157 (home-page "https://github.com/sdispater/clikit")
11158 (synopsis "Group of utilities to build command line interfaces")
11159 (description
11160 "CliKit is a group of utilities to build testable command line
11161 interfaces.")
11162 (properties `((python2-variant . ,(delay python2-clikit))))
11163 (license license:expat)))
11164
11165 (define-public python2-clikit
11166 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
11167 (package/inherit
11168 base
11169 (propagated-inputs
11170 `(("python-enum34" ,python2-enum34)
11171 ("python-typing" ,python2-typing)
11172 ,@(package-propagated-inputs base))))))
11173
11174 (define-public python-msgpack-python
11175 (package
11176 (name "python-msgpack-python")
11177 (version "0.5.6")
11178 (source
11179 (origin
11180 (method url-fetch)
11181 (uri (pypi-uri "msgpack-python" version))
11182 (sha256
11183 (base32
11184 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
11185 (build-system python-build-system)
11186 (home-page "http://msgpack.org/")
11187 (synopsis "Package to deserialize messages in MessagePack binary format")
11188 (description
11189 "MessagePack is an efficient binary serialization format. It lets you
11190 exchange data among multiple languages like JSON. But it's faster and
11191 smaller. Small integers are encoded into a single byte, and typical short
11192 strings require only one extra byte in addition to the strings themselves.")
11193 (license license:asl2.0)))
11194
11195 (define-public python-cachy
11196 (package
11197 (name "python-cachy")
11198 (version "0.2.0")
11199 (source
11200 (origin
11201 (method url-fetch)
11202 (uri (pypi-uri "cachy" version))
11203 (sha256
11204 (base32
11205 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
11206 (build-system python-build-system)
11207 (native-inputs
11208 `(("python-fakeredis" ,python-fakeredis)
11209 ("python-flexmock" ,python-flexmock)
11210 ("python-pytest" ,python-pytest)))
11211 (propagated-inputs
11212 `(("python-memcached" ,python-memcached)
11213 ("python-msgpack-python" ,python-msgpack-python)
11214 ("python-redis" ,python-redis)))
11215 (home-page "https://github.com/sdispater/cachy")
11216 (synopsis "Simple yet effective caching library")
11217 (description
11218 "Cachy provides a simple yet effective caching library. A simple but
11219 powerful API: thread-safety; decorator syntax; support for memcached, redis,
11220 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
11221 (license license:expat)))
11222
11223 (define-public poetry
11224 (package
11225 (name "poetry")
11226 (version "0.12.17")
11227 ;; Poetry can only be built from source with poetry.
11228 (source
11229 (origin
11230 (method url-fetch)
11231 (uri (pypi-uri "poetry" version))
11232 (sha256
11233 (base32
11234 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
11235 (build-system python-build-system)
11236 (arguments
11237 `(#:tests? #f ;; Pypi does not have tests.
11238 #:phases
11239 (modify-phases %standard-phases
11240 (replace 'build
11241 (lambda _
11242 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
11243 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
11244 "setup.py")
11245 #t)))))
11246 (propagated-inputs
11247 `(("python-cachecontrol" ,python-cachecontrol)
11248 ("python-cachy" ,python-cachy)
11249 ("python-cleo" ,python-cleo)
11250 ("python-glob2" ,python-glob2)
11251 ("python-html5lib" ,python-html5lib)
11252 ("python-jsonschema" ,python-jsonschema)
11253 ("python-msgpack" ,python-msgpack)
11254 ("python-pkginfo" ,python-pkginfo)
11255 ("python-pyparsing" ,python-pyparsing)
11256 ("python-pyrsistent" ,python-pyrsistent)
11257 ("python-requests" ,python-requests)
11258 ("python-requests-toolbelt" ,python-requests-toolbelt)
11259 ("python-shellingham" ,python-shellingham)
11260 ("python-tomlkit" ,python-tomlkit)
11261 ("python-virtualenv" ,python-virtualenv)))
11262 (home-page "https://poetry.eustace.io/")
11263 (synopsis "Python dependency management and packaging made easy")
11264 (description "Poetry is a tool for dependency management and packaging
11265 in Python. It allows you to declare the libraries your project depends on and
11266 it will manage (install/update) them for you.")
11267 (license license:expat)))
11268
11269 (define-public python-lazy-object-proxy
11270 (package
11271 (name "python-lazy-object-proxy")
11272 (version "1.4.3")
11273 (source (origin
11274 (method url-fetch)
11275 (uri (pypi-uri "lazy-object-proxy" version))
11276 (sha256
11277 (base32
11278 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
11279 (native-inputs
11280 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
11281 (build-system python-build-system)
11282 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11283 (synopsis "Lazy object proxy for python")
11284 (description
11285 "Lazy object proxy is an object that wraps a callable but defers the call
11286 until the object is actually required, and caches the result of said call.")
11287 (license license:bsd-2)))
11288
11289 (define-public python2-lazy-object-proxy
11290 (package-with-python2 python-lazy-object-proxy))
11291
11292 (define-public python-dnspython
11293 (package
11294 (name "python-dnspython")
11295 (version "1.15.0")
11296 (source (origin
11297 (method url-fetch)
11298 (uri (string-append "http://www.dnspython.org/kits/"
11299 version "/dnspython-" version ".tar.gz"))
11300 (sha256
11301 (base32
11302 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11303 (build-system python-build-system)
11304 (arguments '(#:tests? #f)) ; XXX: requires internet access
11305 (home-page "http://www.dnspython.org")
11306 (synopsis "DNS toolkit for Python")
11307 (description
11308 "dnspython is a DNS toolkit for Python. It supports almost all record
11309 types. It can be used for queries, zone transfers, and dynamic updates.
11310 It supports TSIG authenticated messages and EDNS0.")
11311 (license license:expat)))
11312
11313 (define-public python2-dnspython
11314 (package-with-python2 python-dnspython))
11315
11316 (define-public python-email-validator
11317 (package
11318 (name "python-email-validator")
11319 (version "1.0.2")
11320 (source
11321 (origin (method url-fetch)
11322 (uri (pypi-uri "email_validator" version))
11323 (sha256
11324 (base32
11325 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11326 (build-system python-build-system)
11327 (arguments
11328 '(#:phases
11329 (modify-phases %standard-phases
11330 (add-before 'build 'use-dnspython
11331 (lambda _
11332 (substitute* "setup.py"
11333 (("dnspython3") "dnspython"))
11334 #t)))))
11335 (propagated-inputs
11336 `(("python-dnspython" ,python-dnspython)
11337 ("python-idna" ,python-idna)))
11338 (home-page "https://github.com/JoshData/python-email-validator")
11339 (synopsis "Email address validation library for Python")
11340 (description
11341 "This library validates email address syntax and deliverability.")
11342 (license license:cc0)))
11343
11344 (define-public python2-email-validator
11345 (package-with-python2 python-email-validator))
11346
11347 (define-public python-ukpostcodeparser
11348 (package
11349 (name "python-ukpostcodeparser")
11350 (version "1.0.3")
11351 (source (origin
11352 (method url-fetch)
11353 (uri (pypi-uri "UkPostcodeParser" version))
11354 (sha256
11355 (base32
11356 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11357 (build-system python-build-system)
11358 (home-page "https://github.com/hamstah/ukpostcodeparser")
11359 (synopsis "UK Postcode parser for Python")
11360 (description
11361 "This library provides the @code{parse_uk_postcode} function for
11362 parsing UK postcodes.")
11363 (license license:expat)))
11364
11365 (define-public python2-ukpostcodeparser
11366 (package-with-python2 python-ukpostcodeparser))
11367
11368 (define-public python-faker
11369 (package
11370 (name "python-faker")
11371 (version "0.7.9")
11372 (source (origin
11373 (method url-fetch)
11374 (uri (pypi-uri "Faker" version))
11375 (sha256
11376 (base32
11377 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11378 (patches
11379 (search-patches "python-faker-fix-build-32bit.patch"))
11380 (modules '((guix build utils)))
11381 (snippet
11382 '(begin
11383 (for-each delete-file (find-files "." "\\.pyc$"))
11384 #t))))
11385 (build-system python-build-system)
11386 (arguments
11387 '(#:phases
11388 (modify-phases %standard-phases
11389 (replace 'check
11390 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
11391 (native-inputs
11392 `(;; For testing
11393 ("python-email-validator" ,python-email-validator)
11394 ("python-mock" ,python-mock)
11395 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11396 (propagated-inputs
11397 `(("python-dateutil" ,python-dateutil)
11398 ("python-six" ,python-six)))
11399 (home-page "https://github.com/joke2k/faker")
11400 (synopsis "Python package that generates fake data")
11401 (description
11402 "Faker is a Python package that generates fake data such as names,
11403 addresses, and phone numbers.")
11404 (license license:expat)
11405 (properties `((python2-variant . ,(delay python2-faker))))))
11406
11407 (define-public python2-faker
11408 (let ((base (package-with-python2 (strip-python2-variant
11409 python-faker))))
11410 (package
11411 (inherit base)
11412 (propagated-inputs
11413 `(("python2-ipaddress" ,python2-ipaddress)
11414 ,@(package-propagated-inputs base))))))
11415
11416 (define-public python-pyaml
11417 (package
11418 (name "python-pyaml")
11419 (version "18.11.0")
11420 (source (origin
11421 (method url-fetch)
11422 (uri (pypi-uri "pyaml" version))
11423 (sha256
11424 (base32
11425 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11426 (build-system python-build-system)
11427 (native-inputs
11428 `(("python-unidecode" ,python-unidecode)))
11429 (propagated-inputs
11430 `(("python-pyyaml" ,python-pyyaml)))
11431 (home-page "https://github.com/mk-fg/pretty-yaml")
11432 (synopsis "YAML pretty-print library for Python")
11433 (description
11434 "pyaml is a PyYAML based python module to produce pretty and readable
11435 YAML-serialized data.")
11436 (license license:wtfpl2)))
11437
11438 (define-public python2-pyaml
11439 (package-with-python2 python-pyaml))
11440
11441 (define-public python-backpack
11442 (package
11443 (name "python-backpack")
11444 (version "0.1")
11445 (source
11446 (origin
11447 (method url-fetch)
11448 (uri (pypi-uri "backpack" version))
11449 (sha256
11450 (base32
11451 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11452 (build-system python-build-system)
11453 (native-inputs
11454 `(("python-pytest" ,python-pytest)
11455 ("python-nose" ,python-nose)))
11456 (propagated-inputs
11457 `(("python-simplejson" ,python-simplejson)))
11458 (home-page "https://github.com/sdispater/backpack")
11459 (synopsis "Utilities for working with Python collections")
11460 (description "Backpack provides some useful utilities for working with
11461 collections of data.")
11462 (license license:expat)))
11463
11464 (define-public python2-backpack
11465 (package-with-python2 python-backpack))
11466
11467 (define-public python-prompt-toolkit
11468 (package
11469 (name "python-prompt-toolkit")
11470 (version "2.0.7")
11471 (source
11472 (origin
11473 (method url-fetch)
11474 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11475 (sha256
11476 (base32
11477 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11478 (build-system python-build-system)
11479 (arguments
11480 `(#:phases
11481 (modify-phases %standard-phases
11482 (delete 'check)
11483 (add-after 'install 'post-install-check
11484 (lambda* (#:key inputs outputs #:allow-other-keys)
11485 ;; HOME is needed for the test
11486 ;; "test_pathcompleter_can_expanduser".
11487 (setenv "HOME" "/tmp")
11488 (add-installed-pythonpath inputs outputs)
11489 (invoke "py.test"))))))
11490 (propagated-inputs
11491 `(("python-wcwidth" ,python-wcwidth)
11492 ("python-six" ,python-six)
11493 ("python-pygments" ,python-pygments)))
11494 (native-inputs
11495 `(("python-pytest" ,python-pytest)))
11496 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11497 (synopsis "Library for building command line interfaces in Python")
11498 (description
11499 "Prompt-Toolkit is a library for building interactive command line
11500 interfaces in Python. It's like GNU Readline but it also features syntax
11501 highlighting while typing, out-of-the-box multi-line input editing, advanced
11502 code completion, incremental search, support for Chinese double-width
11503 characters, mouse support, and auto suggestions.")
11504 (license license:bsd-3)))
11505
11506 (define-public python2-prompt-toolkit
11507 (package-with-python2 python-prompt-toolkit))
11508
11509 (define-public python-prompt-toolkit-1
11510 (package (inherit python-prompt-toolkit)
11511 (version "1.0.15")
11512 (source
11513 (origin
11514 (method url-fetch)
11515 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11516 (sha256
11517 (base32
11518 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11519
11520 (define-public python2-prompt-toolkit-1
11521 (package-with-python2 python-prompt-toolkit-1))
11522
11523 (define-public python-jedi
11524 (package
11525 (name "python-jedi")
11526 (version "0.16.0")
11527 (source
11528 (origin
11529 (method url-fetch)
11530 (uri (pypi-uri "jedi" version))
11531 (patches (search-patches "python-jedi-deleted-variables.patch"))
11532 (sha256
11533 (base32
11534 "1mb5kmrk9bkc3kwzx02j62cdan1jqd92q1z7h7wi9d30jg5p3j6m"))))
11535 (build-system python-build-system)
11536 (arguments
11537 `(#:phases
11538 (modify-phases %standard-phases
11539 (replace 'check
11540 (lambda _
11541 (setenv "HOME" "/tmp")
11542 (invoke "python" "-m" "pytest"))))))
11543 (native-inputs
11544 `(("python-pytest" ,python-pytest)
11545 ("python-docopt" ,python-docopt)))
11546 (propagated-inputs
11547 `(("python-parso" ,python-parso)))
11548 (home-page "https://github.com/davidhalter/jedi")
11549 (synopsis "Autocompletion and static analysis library for Python")
11550 (description
11551 "Jedi is a static analysis tool for Python that can be used in Integrated
11552 Development Environments (@dfn{IDE}s) and text editors. It understands Python
11553 on a deeper level than many other static analysis frameworks for Python.
11554
11555 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11556 well.")
11557 (license license:expat)))
11558
11559 (define-public python2-jedi
11560 (package-with-python2 python-jedi))
11561
11562 (define-public ptpython
11563 (package
11564 (name "ptpython")
11565 (version "0.34")
11566 (source (origin
11567 (method url-fetch)
11568 (uri (pypi-uri "ptpython" version))
11569 (sha256
11570 (base32
11571 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11572 (build-system python-build-system)
11573 (arguments
11574 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11575 (propagated-inputs
11576 `(("python-docopt" ,python-docopt)
11577 ("python-jedi" ,python-jedi)
11578 ("python-prompt-toolkit" ,python-prompt-toolkit)
11579 ("python-pygments" ,python-pygments)))
11580 (home-page "https://github.com/jonathanslenders/ptpython")
11581 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11582 (description
11583 "ptpython is a Python read-eval-print loop with IDE-like features.
11584 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11585 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11586 etc.")
11587 (license license:bsd-3)
11588 (properties `((python2-variant . ,(delay ptpython-2))))))
11589
11590 (define-public ptpython-2
11591 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11592 (package
11593 (inherit base)
11594 (name "ptpython2"))))
11595
11596 (define-public python-stem
11597 (package
11598 (name "python-stem")
11599 (version "1.8.0")
11600 (source
11601 (origin
11602 (method url-fetch)
11603 (uri (pypi-uri "stem" version))
11604 (sha256
11605 (base32
11606 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
11607 (build-system python-build-system)
11608 (arguments
11609 `(#:phases
11610 (modify-phases %standard-phases
11611 (replace 'check
11612 (lambda _
11613 (invoke "./run_tests.py" "--unit")
11614 #t)))))
11615 (native-inputs
11616 `(("python-mock" ,python-mock)
11617 ("python-pycodestyle" ,python-pycodestyle)
11618 ("python-pyflakes" ,python-pyflakes)))
11619 (home-page "https://stem.torproject.org/")
11620 (synopsis
11621 "Python controller library that allows applications to interact with Tor")
11622 (description
11623 "Stem is a Python controller library for Tor. With it you can use Tor's
11624 control protocol to script against the Tor process and read descriptor data
11625 relays publish about themselves.")
11626 (license license:lgpl3)))
11627
11628 (define-public python2-stem
11629 (package-with-python2 python-stem))
11630
11631 (define-public python-pyserial
11632 (package
11633 (name "python-pyserial")
11634 (version "3.4")
11635 (source
11636 (origin
11637 (method url-fetch)
11638 (uri (pypi-uri "pyserial" version))
11639 (sha256
11640 (base32
11641 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11642 (build-system python-build-system)
11643 (arguments
11644 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11645 ;; #:phases
11646 ;; (modify-phases %standard-phases
11647 ;; (replace 'check
11648 ;; (lambda _
11649 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11650 (home-page
11651 "https://github.com/pyserial/pyserial")
11652 (synopsis "Python Serial Port Bindings")
11653 (description "@code{pyserial} provide serial port bindings for Python. It
11654 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11655 and/or Xon/Xoff. The port is accessed in RAW mode.")
11656 (license license:bsd-3)))
11657
11658 (define-public python2-pyserial
11659 (package-with-python2 python-pyserial))
11660
11661 (define-public python-kivy
11662 (package
11663 (name "python-kivy")
11664 (version "1.10.1")
11665 (source
11666 (origin
11667 (method url-fetch)
11668 (uri (pypi-uri "Kivy" version))
11669 (file-name (string-append name "-" version ".tar.gz"))
11670 (sha256
11671 (base32
11672 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11673 (build-system python-build-system)
11674 (arguments
11675 `(#:tests? #f ; Tests require many optional packages
11676 #:phases
11677 (modify-phases %standard-phases
11678 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11679 (lambda* (#:key inputs #:allow-other-keys)
11680 (setenv "KIVY_SDL2_PATH"
11681 (string-append (assoc-ref inputs "sdl-union")
11682 "/include/SDL2"))
11683 #t)))))
11684 (native-inputs
11685 `(("pkg-config" ,pkg-config)
11686 ("python-cython" ,python-cython)))
11687 (inputs
11688 `(("gstreamer" ,gstreamer)
11689 ("mesa" ,mesa)
11690 ("sdl-union"
11691 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11692 (home-page "http://kivy.org")
11693 (synopsis
11694 "Multitouch application framework")
11695 (description
11696 "A software library for rapid development of
11697 hardware-accelerated multitouch applications.")
11698 (license license:expat)))
11699
11700 (define-public python2-kivy
11701 (package-with-python2 python-kivy))
11702
11703 (define-public python-kivy-next
11704 (deprecated-package "python-kivy-next" python-kivy))
11705
11706 (define-public python2-kivy-next
11707 (deprecated-package "python2-kivy-next" python2-kivy))
11708
11709 (define-public python-binaryornot
11710 (package
11711 (name "python-binaryornot")
11712 (version "0.4.4")
11713 (source (origin
11714 (method url-fetch)
11715 (uri (pypi-uri "binaryornot" version))
11716 (sha256
11717 (base32
11718 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11719 (build-system python-build-system)
11720 (arguments
11721 `(#:phases
11722 (modify-phases %standard-phases
11723 (add-after 'unpack 'patch-tests
11724 (lambda _
11725 ;; TypeError: binary() got an unexpected keyword argument
11726 ;; 'average_size'.
11727 (substitute* "tests/test_check.py"
11728 (("average_size=512") ""))
11729 #t)))))
11730 (propagated-inputs
11731 `(("python-chardet" ,python-chardet)
11732 ("python-hypothesis" ,python-hypothesis)))
11733 (home-page "https://github.com/audreyr/binaryornot")
11734 (synopsis "Package to check if a file is binary or text")
11735 (description "Ultra-lightweight pure Python package to check if a file is
11736 binary or text.")
11737 (license license:bsd-3)
11738 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11739
11740 (define-public python2-binaryornot
11741 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11742 (package (inherit base)
11743 (propagated-inputs
11744 `(("python2-enum34" ,python2-enum34)
11745 ,@(package-propagated-inputs base))))))
11746
11747 (define-public python-binwalk
11748 (package
11749 (name "python-binwalk")
11750 (version "2.2.0")
11751 (source
11752 (origin
11753 (method git-fetch)
11754 (uri (git-reference
11755 (url "https://github.com/ReFirmLabs/binwalk")
11756 (commit (string-append "v" version))))
11757 (file-name (git-file-name name version))
11758 (sha256
11759 (base32
11760 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11761 (build-system python-build-system)
11762 (arguments
11763 `(#:phases
11764 (modify-phases %standard-phases
11765 (add-before 'check 'set-pythonpath
11766 (lambda _
11767 (setenv "PYTHONPATH"
11768 (string-append
11769 (getcwd) "/src/"
11770 ":" (getenv "PYTHONPATH")))
11771 (setenv "HOME" "")
11772 #t)))))
11773 (native-inputs
11774 `(("python-coverage" ,python-coverage)
11775 ("python-nose" ,python-nose)))
11776 (home-page "https://github.com/ReFirmLabs/binwalk")
11777 (synopsis "Firmware analysis tool")
11778 (description "Binwalk is a tool for analyzing, reverse engineering, and
11779 extracting firmware images")
11780 (license license:expat)))
11781
11782 (define-public python-nltk
11783 (package
11784 (name "python-nltk")
11785 (version "3.2.1")
11786 (source (origin
11787 (method url-fetch)
11788 (uri (pypi-uri "nltk" version))
11789 (sha256
11790 (base32
11791 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11792 (build-system python-build-system)
11793 (arguments
11794 '(;; The tests require some extra resources to be downloaded.
11795 ;; TODO Try packaging these resources.
11796 #:tests? #f))
11797 (home-page "http://nltk.org/")
11798 (synopsis "Natural Language Toolkit")
11799 (description "It provides interfaces to over 50 corpora and lexical
11800 resources such as WordNet, along with a suite of text processing libraries
11801 for classification, tokenization, stemming, tagging, parsing, and semantic
11802 reasoning, wrappers for natural language processing libraries.")
11803 (license license:asl2.0)))
11804
11805 (define-public python2-nltk
11806 (package-with-python2 python-nltk))
11807
11808 (define-public python-pymongo
11809 (package
11810 (name "python-pymongo")
11811 (version "3.7.2")
11812 (source (origin
11813 (method url-fetch)
11814 (uri (pypi-uri "pymongo" version))
11815 (sha256
11816 (base32
11817 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11818 (build-system python-build-system)
11819 (propagated-inputs
11820 `(("python-certifi" ,python-certifi)))
11821 (home-page "https://github.com/mongodb/mongo-python-driver")
11822 (synopsis "Python driver for MongoDB")
11823 (description "Python driver for MongoDB.")
11824 (license license:asl2.0)))
11825
11826 (define-public python2-pymongo
11827 (package-with-python2 python-pymongo))
11828
11829 (define-public python-consul
11830 (package
11831 (name "python-consul")
11832 (version "0.6.1")
11833 (source
11834 (origin
11835 (method url-fetch)
11836 (uri (pypi-uri "python-consul" version))
11837 (sha256
11838 (base32
11839 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11840 (build-system python-build-system)
11841 (arguments
11842 '(#:tests? #f)) ; The tests are not distributed
11843 (propagated-inputs
11844 `(("python-requests" ,python-requests)
11845 ("python-six" ,python-six)))
11846 (home-page "https://github.com/cablehead/python-consul")
11847 (synopsis "Python client for Consul")
11848 (description
11849 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11850 discovery, monitoring and configuration.")
11851 (license license:expat)))
11852
11853 (define-public python2-consul
11854 (package-with-python2 python-consul))
11855
11856 (define-public python-schematics
11857 (package
11858 (name "python-schematics")
11859 (version "1.1.1")
11860 (source
11861 (origin
11862 (method git-fetch)
11863 (uri (git-reference
11864 (url "https://github.com/schematics/schematics.git")
11865 (commit (string-append "v" version))))
11866 (file-name (git-file-name name version))
11867 (sha256
11868 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11869 (build-system python-build-system)
11870 (propagated-inputs
11871 `(("python-six" ,python-six)))
11872 (arguments
11873 ;; The tests require a bunch of not very nice packages with fixed
11874 ;; version requirements (e.g. python-coveralls).
11875 `(#:tests? #f))
11876 (home-page "https://github.com/schematics/schematics")
11877 (synopsis "Python Data Structures for Humans")
11878 (description "Python Data Structures for Humans.")
11879 (license license:bsd-3)))
11880
11881 (define-public python2-schematics
11882 (package-with-python2 python-schematics))
11883
11884 (define-public python-odfpy
11885 (package
11886 (name "python-odfpy")
11887 (version "1.3.3")
11888 (source (origin
11889 (method url-fetch)
11890 (uri (pypi-uri "odfpy" version))
11891 (sha256
11892 (base32
11893 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11894 (arguments
11895 `(#:modules ((srfi srfi-1)
11896 (guix build python-build-system)
11897 (guix build utils))
11898 #:phases
11899 (modify-phases %standard-phases
11900 (replace 'check
11901 ;; The test runner invokes python2 and python3 for test*.py.
11902 ;; To avoid having both in inputs, we replicate it here.
11903 (lambda _
11904 (for-each (lambda (test-file) (invoke "python" test-file))
11905 (find-files "tests" "^test.*\\.py$"))
11906 #t)))))
11907 (build-system python-build-system)
11908 (home-page "https://github.com/eea/odfpy")
11909 (synopsis "Python API and tools to manipulate OpenDocument files")
11910 (description "Collection of libraries and utility programs written in
11911 Python to manipulate OpenDocument 1.2 files.")
11912 (license
11913 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11914 ;; number of files with other licenses.
11915 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11916
11917 (define-public python2-odfpy
11918 (package-with-python2 python-odfpy))
11919
11920 (define-public python-natsort
11921 (package
11922 (name "python-natsort")
11923 (version "7.0.1")
11924 (source (origin
11925 (method url-fetch)
11926 (uri (pypi-uri "natsort" version))
11927 (sha256
11928 (base32
11929 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
11930 (build-system python-build-system)
11931 (arguments
11932 `(#:modules ((guix build utils)
11933 (guix build python-build-system)
11934 (srfi srfi-1)
11935 (srfi srfi-26)
11936 (ice-9 ftw))
11937 #:phases
11938 (modify-phases %standard-phases
11939 (add-before 'check 'set-cachedir
11940 ;; Tests require write access to $HOME by default
11941 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11942 (replace 'check
11943 (lambda _
11944 (let ((cwd (getcwd)))
11945 (setenv "PYTHONPATH"
11946 (string-append
11947 cwd "/build/"
11948 (find (cut string-prefix? "lib" <>)
11949 (scandir (string-append cwd "/build")))
11950 ":"
11951 (getenv "PYTHONPATH")))
11952 (invoke "pytest" "-v")))))))
11953 (native-inputs
11954 `(("python-hypothesis" ,python-hypothesis)
11955 ("python-pytest-cov" ,python-pytest-cov)
11956 ("python-pytest-mock" ,python-pytest-mock)
11957 ("python-pytest" ,python-pytest)))
11958 (propagated-inputs ; TODO: Add python-fastnumbers.
11959 `(("python-pyicu" ,python-pyicu)))
11960 (home-page "https://github.com/SethMMorton/natsort")
11961 (synopsis "Natural sorting for python and shell")
11962 (description
11963 "Natsort lets you apply natural sorting on lists instead of
11964 lexicographical. If you use the built-in @code{sorted} method in python
11965 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11966 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11967 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11968 identifies numbers and sorts them separately from strings. It can also sort
11969 version numbers, real numbers, mixed types and more, and comes with a shell
11970 command @command{natsort} that exposes this functionality in the command line.")
11971 (license license:expat)
11972 (properties `((python2-variant . ,(delay python2-natsort))))))
11973
11974 ;; Natsort 6.x are the last versions with support for Python 2.
11975 (define-public python2-natsort
11976 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11977 (package (inherit base)
11978 (version "6.2.1")
11979 (source (origin
11980 (method url-fetch)
11981 (uri (pypi-uri "natsort" version))
11982 (sha256
11983 (base32
11984 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
11985 (native-inputs
11986 `(("python2-pathlib" ,python2-pathlib)
11987 ,@(package-native-inputs base))))))
11988
11989 (define-public glances
11990 (package
11991 (name "glances")
11992 (version "3.1.4")
11993 (source
11994 (origin
11995 (method url-fetch)
11996 (uri (pypi-uri "Glances" version))
11997 (sha256
11998 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
11999 (modules '((guix build utils)))
12000 (snippet
12001 '(begin
12002 ;; Glances phones PyPI for weekly update checks by default.
12003 ;; Disable these. The user can re-enable them if desired.
12004 (substitute* "glances/outdated.py"
12005 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
12006 (string-append indentation
12007 "self.args.disable_check_update = True\n"
12008 line)))
12009 #t))))
12010 (build-system python-build-system)
12011 (propagated-inputs
12012 `(("python-future" ,python-future)
12013 ("python-psutil" ,python-psutil)))
12014 (home-page "https://github.com/nicolargo/glances")
12015 (synopsis "Cross-platform curses-based monitoring tool")
12016 (description
12017 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12018 Glances uses the PsUtil library to get information from your system. It
12019 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12020 (license license:lgpl3+)))
12021
12022 (define-public python-glances
12023 (deprecated-package "python-glances" glances))
12024
12025 (define-public python-graphql-core
12026 (package
12027 (name "python-graphql-core")
12028 (version "0.5.3")
12029 (source
12030 (origin
12031 (method url-fetch)
12032 (uri (pypi-uri "graphql-core" version))
12033 (sha256
12034 (base32
12035 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12036 (build-system python-build-system)
12037 (arguments
12038 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12039 #:phases
12040 (modify-phases %standard-phases
12041 (add-after 'unpack 'patch-hardcoded-version
12042 (lambda _ (substitute*
12043 "setup.py"
12044 (("'gevent==1.1rc1'") "'gevent'"))
12045 #t)))))
12046 (native-inputs
12047 `(("python-gevent" ,python-gevent)
12048 ("python-mock" ,python-mock)
12049 ("python-pytest-mock" ,python-pytest-mock)))
12050 (propagated-inputs
12051 `(("python-promise" ,python-promise)
12052 ("python-six" ,python-six)))
12053 (home-page "https://github.com/graphql-python/graphql-core")
12054 (synopsis "GraphQL implementation for Python")
12055 (description
12056 "GraphQL implementation for Python. GraphQL is a data query language and
12057 runtime designed and used to request and deliver data to mobile and web apps.
12058 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12059 to Python.")
12060 (license license:expat)))
12061
12062 (define-public python2-graphql-core
12063 (package-with-python2 python-graphql-core))
12064
12065 (define-public python-graphql-relay
12066 (package
12067 (name "python-graphql-relay")
12068 (version "0.4.5")
12069 (source
12070 (origin
12071 (method url-fetch)
12072 (uri (pypi-uri "graphql-relay" version))
12073 (sha256
12074 (base32
12075 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12076 (build-system python-build-system)
12077 (arguments
12078 '(#:tests? #f)) ; The tests are not distributed
12079 (propagated-inputs
12080 `(("python-graphql-core" ,python-graphql-core)
12081 ("python-promise" ,python-promise)
12082 ("python-six" ,python-six)))
12083 (home-page "https://github.com/graphql-python/graphql-relay-py")
12084 (synopsis "Relay implementation for Python")
12085 (description
12086 "This is a library to allow the easy creation of Relay-compliant servers
12087 using the GraphQL Python reference implementation of a GraphQL server. It
12088 should be noted that the code is a exact port of the original
12089 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12090 from Facebook.")
12091 (license license:expat)))
12092
12093 (define-public python2-graphql-relay
12094 (package-with-python2 python-graphql-relay))
12095
12096 (define-public python-graphene
12097 (package
12098 (name "python-graphene")
12099 (version "0.10.2")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (pypi-uri "graphene" version))
12104 (sha256
12105 (base32
12106 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12107 (build-system python-build-system)
12108 (propagated-inputs
12109 `(("python-graphql-core" ,python-graphql-core)
12110 ("python-graphql-relay" ,python-graphql-relay)
12111 ("python-iso8601" ,python-iso8601)
12112 ("python-promise" ,python-promise)
12113 ("python-six" ,python-six)))
12114 (arguments
12115 `(#:tests? #f)) ; no tests/ in the PyPI tarball
12116 (home-page "https://graphene-python.org/")
12117 (synopsis "GraphQL Framework for Python")
12118 (description
12119 "Graphene is a Python library for building GraphQL schemas/types.
12120 A GraphQL schema describes your data model, and provides a GraphQL server
12121 with an associated set of resolve methods that know how to fetch data.")
12122 (properties `((python2-variant . ,(delay python2-graphene))))
12123 (license license:expat)))
12124
12125 (define-public python2-graphene
12126 (let ((base (package-with-python2
12127 (strip-python2-variant python-graphene))))
12128 (package (inherit base)
12129 (native-inputs
12130 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12131 ,@(package-native-inputs base))))))
12132
12133 (define-public python-nautilus
12134 (package
12135 (name "python-nautilus")
12136 (version "0.4.9")
12137 (source
12138 (origin
12139 (method url-fetch)
12140 (uri (pypi-uri "nautilus" version))
12141 (sha256
12142 (base32
12143 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12144 (build-system python-build-system)
12145 (arguments `(#:tests? #f)) ; fails to import test modules
12146 (propagated-inputs
12147 `(("python-bcrypt" ,python-bcrypt)
12148 ("python-click" ,python-click)
12149 ("python-consul" ,python-consul)
12150 ("python-graphene" ,python-graphene)
12151 ("python-jinja2" ,python-jinja2)
12152 ("python-peewee" ,python-peewee)
12153 ("python-pika" ,python-pika)
12154 ("python-tornado" ,python-tornado)
12155 ("python-wtforms" ,python-wtforms)))
12156 (native-inputs
12157 `(("python-nose2" ,python-nose2)))
12158 (home-page "https://github.com/AlecAivazis/nautilus")
12159 (synopsis "Library for creating microservice applications")
12160 (description
12161 "Nautilus is a framework for flux based microservices that looks to
12162 provide extendible implementations of common aspects of a cloud so that you can
12163 focus on building massively scalable web applications.")
12164 (license license:expat)))
12165
12166 (define-public python-snowballstemmer
12167 (package
12168 (name "python-snowballstemmer")
12169 (version "2.0.0")
12170 (source (origin
12171 (method url-fetch)
12172 (uri (pypi-uri "snowballstemmer" version))
12173 (sha256
12174 (base32
12175 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
12176 (build-system python-build-system)
12177 (arguments
12178 `(;; No tests exist
12179 #:tests? #f))
12180 (home-page "https://github.com/shibukawa/snowball_py")
12181 (synopsis "Snowball stemming library collection for Python")
12182 (description "This package provides 16 word stemmer algorithms generated
12183 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12184 English stemmer.")
12185 (license license:bsd-3)))
12186
12187 (define-public python2-snowballstemmer
12188 (package-with-python2 python-snowballstemmer))
12189
12190 (define-public python-setproctitle
12191 (package
12192 (name "python-setproctitle")
12193 (version "1.1.10")
12194 (source
12195 (origin
12196 (method url-fetch)
12197 (uri (pypi-uri "setproctitle" version))
12198 (sha256
12199 (base32
12200 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12201 (build-system python-build-system)
12202 (arguments
12203 '(#:phases
12204 (modify-phases %standard-phases
12205 (add-before 'check 'patch-Makefile
12206 ;; Stricly this is only required for the python2 variant.
12207 ;; But adding a phase in an inherited package seems to be
12208 ;; cumbersum. So we patch even for python3.
12209 (lambda _
12210 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12211 (when nose
12212 (substitute* "Makefile"
12213 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12214 (string-append nose "/bin/nosetests "))))
12215 #t)))
12216 (replace 'check
12217 (lambda _
12218 (setenv "PYTHON" (or (which "python3") (which "python")))
12219 (setenv "PYCONFIG" (or (which "python3-config")
12220 (which "python-config")))
12221 (setenv "CC" "gcc")
12222 ;; No need to extend PYTHONPATH to find the built package, since
12223 ;; the Makefile will build anyway
12224 (invoke "make" "check"))))))
12225 (native-inputs
12226 `(("procps" ,procps))) ; required for tests
12227 (home-page
12228 "https://github.com/dvarrazzo/py-setproctitle")
12229 (synopsis
12230 "Setproctitle implementation for Python to customize the process title")
12231 (description "The library allows a process to change its title (as displayed
12232 by system tools such as ps and top).
12233
12234 Changing the title is mostly useful in multi-process systems, for
12235 example when a master process is forked: changing the children's title
12236 allows to identify the task each process is busy with. The technique
12237 is used by PostgreSQL and the OpenSSH Server for example.")
12238 (license license:bsd-3)
12239 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12240
12241 (define-public python2-setproctitle
12242 (let ((base (package-with-python2
12243 (strip-python2-variant python-setproctitle))))
12244 (package
12245 (inherit base)
12246 (native-inputs `(("python2-nose" ,python2-nose)
12247 ,@(package-native-inputs base))))))
12248
12249 (define-public python-validictory
12250 (package
12251 (name "python-validictory")
12252 (version "1.0.1")
12253 (source
12254 (origin
12255 (method url-fetch)
12256 (uri (pypi-uri "validictory" version))
12257 (sha256
12258 (base32
12259 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12260 (build-system python-build-system)
12261 (arguments
12262 '(#:phases
12263 (modify-phases %standard-phases
12264 (add-after 'unpack 'bootstrap
12265 ;; Move the tests out of the package directory to avoid
12266 ;; packaging them.
12267 (lambda* _
12268 (rename-file "validictory/tests" "tests")
12269 (delete-file "tests/__init__.py")))
12270 (replace 'check
12271 (lambda _
12272 ;; Extend PYTHONPATH so the built package will be found.
12273 (setenv "PYTHONPATH"
12274 (string-append (getcwd) "/build/lib:"
12275 (getenv "PYTHONPATH")))
12276 (invoke "py.test" "-vv" ))))))
12277 (native-inputs
12278 `(("python-pytest" ,python-pytest)))
12279 (home-page
12280 "https://github.com/jamesturk/validictory")
12281 (synopsis "General purpose Python data validator")
12282 (description "It allows validation of arbitrary Python data structures.
12283
12284 The schema format is based on the JSON Schema
12285 proposal (http://json-schema.org), so combined with json the library is also
12286 useful as a validator for JSON data.")
12287 (license license:expat)))
12288
12289 (define-public python2-validictory
12290 (package-with-python2 python-validictory))
12291
12292 (define-public python-pyelftools
12293 (package
12294 (name "python-pyelftools")
12295 (version "0.25")
12296 (source
12297 (origin
12298 (method url-fetch)
12299 (uri (pypi-uri "pyelftools" version))
12300 (sha256
12301 (base32
12302 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
12303 (build-system python-build-system)
12304 (arguments
12305 `(#:phases
12306 (modify-phases %standard-phases
12307 (add-before 'check 'set-pythonpath
12308 (lambda _
12309 (setenv "PYTHONPATH"
12310 (string-append
12311 (getcwd) "/test/"
12312 ":" (getenv "PYTHONPATH")))
12313 #t)))))
12314 (home-page
12315 "https://github.com/eliben/pyelftools")
12316 (synopsis
12317 "Analyze binary and library file information")
12318 (description "This Python library provides interfaces for parsing and
12319 analyzing two binary and library file formats; the Executable and Linking
12320 Format (ELF), and debugging information in the Debugging With Attributed
12321 Record Format (DWARF).")
12322 (license license:public-domain)))
12323
12324 (define-public python-pyev
12325 (package
12326 (name "python-pyev")
12327 (version "0.9.0")
12328 (source
12329 (origin
12330 (method url-fetch)
12331 (uri (pypi-uri "pyev" version))
12332 (sha256
12333 (base32
12334 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12335 (build-system python-build-system)
12336 (arguments
12337 `(#:tests? #f ; no test suite
12338 #:phases
12339 (modify-phases %standard-phases
12340 (add-after 'unpack 'patch
12341 (lambda* (#:key inputs #:allow-other-keys)
12342 (let ((libev (string-append (assoc-ref inputs "libev")
12343 "/lib/libev.so.4")))
12344 (substitute* "setup.py"
12345 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12346 (string-append "libev_dll_name = \"" libev "\"")))))))))
12347 (inputs
12348 `(("libev" ,libev)))
12349 (home-page "http://pythonhosted.org/pyev/")
12350 (synopsis "Python libev interface")
12351 (description "Pyev provides a Python interface to libev.")
12352 (license license:gpl3)))
12353
12354 (define-public python2-pyev
12355 (package-with-python2 python-pyev))
12356
12357 (define-public python-imagesize
12358 (package
12359 (name "python-imagesize")
12360 (version "1.2.0")
12361 (source
12362 (origin
12363 (method url-fetch)
12364 (uri (pypi-uri "imagesize" version))
12365 (sha256
12366 (base32
12367 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
12368 (build-system python-build-system)
12369 (home-page "https://github.com/shibukawa/imagesize_py")
12370 (synopsis "Gets image size of files in various formats in Python")
12371 (description
12372 "This package allows determination of image size from
12373 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12374 (license license:expat)))
12375
12376 (define-public python2-imagesize
12377 (package-with-python2 python-imagesize))
12378
12379 (define-public python-termstyle
12380 (package
12381 (name "python-termstyle")
12382 (version "0.1.11")
12383 (source
12384 (origin
12385 (method url-fetch)
12386 (uri (pypi-uri "termstyle" version))
12387 (sha256
12388 (base32
12389 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12390 (build-system python-build-system)
12391 (arguments
12392 '(#:phases
12393 (modify-phases %standard-phases
12394 (replace 'check
12395 (lambda _
12396 (invoke "python" "test3.py"))))))
12397 (home-page "https://github.com/gfxmonk/termstyle")
12398 (synopsis "Console text coloring for Python")
12399 (description "This package provides console text coloring for Python.")
12400 (license license:bsd-3)))
12401
12402 (define-public python-argcomplete
12403 (package
12404 (name "python-argcomplete")
12405 (version "1.10.3")
12406 (source
12407 (origin
12408 (method url-fetch)
12409 (uri (pypi-uri "argcomplete" version))
12410 (sha256
12411 (base32
12412 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
12413 (build-system python-build-system)
12414 (arguments
12415 `(#:phases
12416 (modify-phases %standard-phases
12417 (add-after 'unpack 'embed-tool-references
12418 (lambda _
12419 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12420 ((" grep")
12421 (string-append " " (which "grep")))
12422 ((" egrep")
12423 (string-append " " (which "egrep")))
12424 (("elif which")
12425 (string-append "elif " (which "which")))
12426 (("\\$\\(which")
12427 (string-append "$(" (which "which"))))
12428 #t)))))
12429 (inputs
12430 `(("grep" ,grep)
12431 ("which" ,which)))
12432 (native-inputs
12433 `(("python-coverage" ,python-coverage)
12434 ("python-flake8" ,python-flake8)
12435 ("python-pexpect" ,python-pexpect)
12436 ("python-wheel" ,python-wheel)
12437 ("tcsh" ,tcsh)
12438 ("fish" ,fish)
12439 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
12440 (home-page "https://github.com/kislyuk/argcomplete")
12441 (synopsis "Shell tab completion for Python argparse")
12442 (description "argcomplete provides extensible command line tab completion
12443 of arguments and options for Python scripts using @code{argparse}. It's
12444 particularly useful for programs with many options or sub-parsers that can
12445 dynamically suggest completions; for example, when browsing resources over the
12446 network.")
12447 (license license:asl2.0)))
12448
12449 (define-public python2-argcomplete
12450 (package-with-python2 python-argcomplete))
12451
12452 (define-public python-xopen
12453 (package
12454 (name "python-xopen")
12455 (version "0.5.0")
12456 (source
12457 (origin
12458 (method url-fetch)
12459 (uri (pypi-uri "xopen" version))
12460 (sha256
12461 (base32
12462 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
12463 (build-system python-build-system)
12464 (propagated-inputs
12465 `(("python-setuptools-scm" ,python-setuptools-scm)))
12466 (home-page "https://github.com/marcelm/xopen/")
12467 (synopsis "Open compressed files transparently")
12468 (description "This module provides an @code{xopen} function that works like
12469 Python's built-in @code{open} function, but can also deal with compressed files.
12470 Supported compression formats are gzip, bzip2 and, xz, and are automatically
12471 recognized by their file extensions. The focus is on being as efficient as
12472 possible on all supported Python versions.")
12473 (license license:expat)))
12474
12475 (define-public python2-xopen
12476 (let ((base (package-with-python2
12477 (strip-python2-variant python-xopen))))
12478 (package
12479 (inherit base)
12480 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12481 ,@(package-propagated-inputs base))))))
12482
12483 (define-public python-cheetah
12484 (package
12485 (name "python-cheetah")
12486 (version "3.1.0")
12487 (source
12488 (origin
12489 (method url-fetch)
12490 (uri (pypi-uri "Cheetah3" version))
12491 (sha256
12492 (base32
12493 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12494 (build-system python-build-system)
12495 (arguments
12496 `(#:modules ((guix build utils)
12497 (guix build python-build-system)
12498 (ice-9 ftw)
12499 (srfi srfi-1)
12500 (srfi srfi-26))
12501 #:phases (modify-phases %standard-phases
12502 (add-after 'unpack 'use-absolute-python
12503 (lambda _
12504 (substitute* "Cheetah/CheetahWrapper.py"
12505 (("#!/usr/bin/env python")
12506 (string-append "#!" (which "python"))))
12507 #t))
12508 (replace 'check
12509 (lambda _
12510 (let ((cwd (getcwd)))
12511 (setenv "PYTHONPATH"
12512 (string-append
12513 cwd "/build/"
12514 (find (cut string-prefix? "lib" <>)
12515 (scandir (string-append cwd "/build")))
12516 ":" (getenv "PYTHONPATH")))
12517 (setenv "PATH"
12518 (string-append (getenv "PATH")
12519 ":" cwd "/bin"))
12520 (setenv "TMPDIR" "/tmp")
12521
12522 (substitute* "Cheetah/Tests/Test.py"
12523 (("unittest.TextTestRunner\\(\\)")
12524 "unittest.TextTestRunner(verbosity=2)"))
12525
12526 (invoke "python" "Cheetah/Tests/Test.py")))))))
12527 (propagated-inputs
12528 `(("python-markdown" ,python-markdown))) ;optional
12529 (home-page "http://cheetahtemplate.org/")
12530 (synopsis "Template engine")
12531 (description "Cheetah is a text-based template engine and Python code
12532 generator.
12533
12534 Cheetah can be used as a standalone templating utility or referenced as
12535 a library from other Python applications. It has many potential uses,
12536 but web developers looking for a viable alternative to ASP, JSP, PHP and
12537 PSP are expected to be its principle user group.
12538
12539 Features:
12540 @enumerate
12541 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12542 text-based format.
12543 @item Cleanly separates content, graphic design, and program code.
12544 @item Blends the power and flexibility of Python with a simple template language
12545 that non-programmers can understand.
12546 @item Gives template writers full access to any Python data structure, module,
12547 function, object, or method in their templates.
12548 @item Makes code reuse easy by providing an object-orientated interface to
12549 templates that is accessible from Python code or other Cheetah templates.
12550 One template can subclass another and selectively reimplement sections of it.
12551 @item Provides a simple, yet powerful, caching mechanism that can dramatically
12552 improve the performance of a dynamic website.
12553 @item Compiles templates into optimized, yet readable, Python code.
12554 @end enumerate")
12555 (license (license:x11-style "file://LICENSE"))))
12556
12557 (define-public python2-cheetah
12558 (package-with-python2 python-cheetah))
12559
12560 (define-public python-dulwich
12561 (package
12562 (name "python-dulwich")
12563 (version "0.18.6")
12564 (source
12565 (origin
12566 (method url-fetch)
12567 (uri (list (string-append "https://www.dulwich.io/releases/"
12568 "dulwich-" version ".tar.gz")
12569 (pypi-uri "dulwich" version)))
12570 (sha256
12571 (base32
12572 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12573 (build-system python-build-system)
12574 (arguments
12575 `(#:phases
12576 (modify-phases %standard-phases
12577 (add-before 'check 'fix-tests
12578 (lambda* (#:key inputs #:allow-other-keys)
12579 ;; The tests use Popen with a custom environment which doesn't
12580 ;; include PATH.
12581 (substitute* "dulwich/tests/compat/utils.py"
12582 (("'git'") (string-append "'"
12583 (which "git")
12584 "'")))
12585 (substitute* '("dulwich/tests/test_repository.py"
12586 "dulwich/tests/test_hooks.py")
12587 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12588 (setenv "TEST_RUNNER" "unittest")
12589 (setenv "PYTHONHASHSEED" "random")
12590 #t)))))
12591 (propagated-inputs
12592 `(("python-fastimport" ,python-fastimport)))
12593 (native-inputs
12594 `(("python-mock" ,python-mock)
12595 ("python-geventhttpclient" ,python-geventhttpclient)
12596 ("git" ,git)))
12597 (home-page "https://www.dulwich.io/")
12598 (synopsis "Git implementation in Python")
12599 (description "Dulwich is an implementation of the Git file formats and
12600 protocols written in pure Python.")
12601 ;; Can be used with either license.
12602 (license (list license:asl2.0 license:gpl2+))))
12603
12604 (define-public python2-dulwich
12605 (package-with-python2 python-dulwich))
12606
12607 (define-public python-pbkdf2
12608 (package
12609 (name "python-pbkdf2")
12610 (version "1.3")
12611 (source
12612 (origin
12613 (method url-fetch)
12614 (uri (pypi-uri "pbkdf2" version))
12615 (sha256
12616 (base32
12617 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12618 (build-system python-build-system)
12619 (arguments
12620 '(#:phases
12621 (modify-phases %standard-phases
12622 (replace 'check
12623 (lambda _
12624 (setenv "PYTHONPATH"
12625 (string-append (getcwd) "/build/lib:"
12626 (getenv "PYTHONPATH")))
12627 (invoke "python" "test/test_pbkdf2.py"))))))
12628 (propagated-inputs
12629 `(("python-pycrypto" ,python-pycrypto))) ; optional
12630 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12631 (synopsis "Password-based key derivation")
12632 (description "This module implements the password-based key derivation
12633 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12634
12635 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12636 is part of the RSA Public Key Cryptography Standards series. The provided
12637 implementation takes a password or a passphrase and a salt value (and
12638 optionally a iteration count, a digest module, and a MAC module) and provides
12639 a file-like object from which an arbitrarly-sized key can be read.")
12640 (license license:expat)))
12641
12642 (define-public python2-pbkdf2
12643 (package-with-python2 python-pbkdf2))
12644
12645 (define-public python-qrcode
12646 (package
12647 (name "python-qrcode")
12648 (version "6.1")
12649 (source
12650 (origin
12651 (method url-fetch)
12652 (uri (pypi-uri "qrcode" version))
12653 (sha256
12654 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12655 (build-system python-build-system)
12656 (arguments
12657 ;; FIXME: Tests require packaging 'pymaging'.
12658 '(#:tests? #f))
12659 (propagated-inputs
12660 `(("python-lxml" ,python-lxml) ; for SVG output
12661 ("python-pillow" ,python-pillow) ; for PNG output
12662 ("python-six" ,python-six)))
12663 (home-page "https://github.com/lincolnloop/python-qrcode")
12664 (synopsis "QR Code image generator")
12665 (description "This package provides a pure Python QR Code generator
12666 module. It uses the Python Imaging Library (PIL) to allow for the generation
12667 of QR Codes.
12668
12669 In addition this package provides a command line tool to generate QR codes and
12670 either write these QR codes to a file or do the output as ascii art at the
12671 console.")
12672 (license license:bsd-3)))
12673
12674 (define-public python2-qrcode
12675 (package-with-python2 python-qrcode))
12676
12677 (define-public python-rst2ansi
12678 (package
12679 (name "python-rst2ansi")
12680 (version "0.1.5")
12681 (source
12682 (origin
12683 (method url-fetch)
12684 (uri (pypi-uri "rst2ansi" version))
12685 (sha256
12686 (base32
12687 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12688 (build-system python-build-system)
12689 (propagated-inputs
12690 `(("python-docutils" ,python-docutils)))
12691 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12692 (synopsis "Convert RST to ANSI-decorated console output")
12693 (description
12694 "Python module dedicated to rendering RST (reStructuredText) documents
12695 to ansi-escaped strings suitable for display in a terminal.")
12696 (license license:expat)))
12697
12698 (define-public python-ansi2html
12699 (package
12700 (name "python-ansi2html")
12701 (version "1.2.0")
12702 (source
12703 (origin
12704 (method url-fetch)
12705 (uri (pypi-uri "ansi2html" version))
12706 (sha256
12707 (base32
12708 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12709 (build-system python-build-system)
12710 (native-inputs
12711 `(("python-mock" ,python-mock)
12712 ("python-nose" ,python-nose)))
12713 (propagated-inputs
12714 `(("python-six" ,python-six)))
12715 (home-page "https://github.com/ralphbean/ansi2html")
12716 (synopsis "Convert ANSI-decorated console output to HTML")
12717 (description
12718 "@command{ansi2html} is a Python library and command line utility for
12719 convering text with ANSI color codes to HTML or LaTeX.")
12720 (license license:gpl3+)))
12721
12722 (define-public python2-ansi2html
12723 (package-with-python2 python-ansi2html))
12724
12725 (define-public python-ddt
12726 (package
12727 (name "python-ddt")
12728 (version "1.1.3")
12729 (source
12730 (origin
12731 (method url-fetch)
12732 (uri (pypi-uri "ddt" version))
12733 (sha256
12734 (base32
12735 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12736 (build-system python-build-system)
12737 (native-inputs
12738 `(("python-mock" ,python-mock)
12739 ("python-nose" ,python-nose)))
12740 (propagated-inputs
12741 `(("python-six" ,python-six)
12742 ("python-pyyaml" ,python-pyyaml)))
12743 (home-page "https://github.com/txels/ddt")
12744 (synopsis "Data-Driven Tests")
12745 (description
12746 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12747 running it with different test data, and make it appear as multiple test
12748 cases.")
12749 (license license:expat)))
12750
12751 (define-public python2-ddt
12752 (package-with-python2 python-ddt))
12753
12754 (define-public python-pycountry
12755 (package
12756 (name "python-pycountry")
12757 (version "18.5.26")
12758 (source
12759 (origin
12760 (method url-fetch)
12761 (uri (pypi-uri "pycountry" version))
12762 (sha256
12763 (base32
12764 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12765 (build-system python-build-system)
12766 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12767 (synopsis "ISO databases for languages, countries, currencies, etc.")
12768 (description
12769 "@code{pycountry} provides the ISO databases for the standards:
12770 @enumerate
12771 @item 639-3 (Languages)
12772 @item 3166 (Countries)
12773 @item 3166-3 (Deleted Countries)
12774 @item 3166-2 (Subdivisions of countries)
12775 @item 4217 (Currencies)
12776 @item 15924 (Scripts)
12777 @end enumerate
12778 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12779 through a Python API.")
12780 (license license:lgpl2.1+)))
12781
12782 (define-public python2-pycountry
12783 (package-with-python2 python-pycountry))
12784
12785 (define-public python-pycosat
12786 (package
12787 (name "python-pycosat")
12788 (version "0.6.1")
12789 (source
12790 (origin
12791 (method url-fetch)
12792 (uri (pypi-uri "pycosat" version))
12793 (sha256
12794 (base32
12795 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12796 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12797 (build-system python-build-system)
12798 (home-page "https://github.com/ContinuumIO/pycosat")
12799 (synopsis "Bindings to picosat (a SAT solver)")
12800 (description
12801 "This package provides efficient Python bindings to @code{picosat} on
12802 the C level. When importing pycosat, the @code{picosat} solver becomes part
12803 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12804 Problem} (SAT) solver.")
12805 (license license:expat)))
12806
12807 (define-public python2-pycosat
12808 (package-with-python2 python-pycosat))
12809
12810 (define-public python2-ruamel.ordereddict
12811 (package
12812 (name "python2-ruamel.ordereddict")
12813 (version "0.4.9")
12814 (source
12815 (origin
12816 (method url-fetch)
12817 (uri (pypi-uri "ruamel.ordereddict" version))
12818 (sha256
12819 (base32
12820 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12821 (build-system python-build-system)
12822 (arguments
12823 `(#:python ,python-2
12824 #:phases
12825 (modify-phases %standard-phases
12826 (delete 'check)
12827 (add-after 'install 'check
12828 (lambda* (#:key inputs outputs #:allow-other-keys)
12829 (add-installed-pythonpath inputs outputs)
12830 (invoke "python" "test/testordereddict.py"))))))
12831 (home-page "https://bitbucket.org/ruamel/ordereddict")
12832 (synopsis "Version of dict that keeps keys in insertion order")
12833 (description
12834 "This is an implementation of an ordered dictionary with @dfn{Key
12835 Insertion Order} (KIO: updates of values do not affect the position of the
12836 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12837 removed and put at the back). The standard library module @code{OrderedDict},
12838 implemented later, implements a subset of @code{ordereddict} functionality.
12839 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12840 Order} (KSO, no sorting function can be specified, but a transform can be
12841 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12842 (license license:expat)))
12843
12844 (define-public python-pypeg2
12845 (package
12846 (name "python-pypeg2")
12847 (version "2.15.2")
12848 (source
12849 (origin
12850 (method url-fetch)
12851 (uri (pypi-uri "pyPEG2" version))
12852 (sha256
12853 (base32
12854 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12855 (build-system python-build-system)
12856 (propagated-inputs `(("python-lxml" ,python-lxml)))
12857 (arguments
12858 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12859 '(#:tests? #f))
12860 (home-page "https://fdik.org/pyPEG/")
12861 (synopsis "Parsering Expression Grammars in Python")
12862 (description "PyPEG is an intrinsic parser interpreter framework for
12863 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12864 parse many formal languages.")
12865 (license license:gpl2)))
12866
12867 (define-public python-incremental
12868 (package
12869 (name "python-incremental")
12870 (version "17.5.0")
12871 (source
12872 (origin
12873 (method url-fetch)
12874 (uri (pypi-uri "incremental" version))
12875 (sha256
12876 (base32
12877 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12878 (build-system python-build-system)
12879 (home-page "https://github.com/hawkowl/incremental")
12880 (synopsis "Library for versioning Python projects")
12881 (description "Incremental is a small library that versions your Python
12882 projects.")
12883 (license license:expat)))
12884
12885 (define-public python2-incremental
12886 (package-with-python2 python-incremental))
12887
12888 (define-public python-invoke
12889 (package
12890 (name "python-invoke")
12891 (home-page "https://www.pyinvoke.org/")
12892 (version "1.3.0")
12893 (source (origin
12894 (method url-fetch)
12895 (uri (pypi-uri "invoke" version))
12896 (sha256
12897 (base32
12898 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12899 (build-system python-build-system)
12900 (arguments
12901 ;; XXX: Requires many dependencies that are not yet in Guix.
12902 `(#:tests? #f))
12903 (synopsis "Pythonic task execution")
12904 (description
12905 "Invoke is a Python task execution tool and library, drawing inspiration
12906 from various sources to arrive at a powerful and clean feature set. It is
12907 evolved from the Fabric project, but focuses on local and abstract concerns
12908 instead of servers and network commands.")
12909 (license license:bsd-3)))
12910
12911 (define-public python2-invoke
12912 (package-with-python2 python-invoke))
12913
12914 (define-public python-automat
12915 (package
12916 (name "python-automat")
12917 (version "0.7.0")
12918 (source (origin
12919 (method url-fetch)
12920 (uri (pypi-uri "Automat" version))
12921 (sha256
12922 (base32
12923 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12924 (build-system python-build-system)
12925 ;; We disable the tests because they require python-twisted, while
12926 ;; python-twisted depends on python-automat. Twisted is optional, but the
12927 ;; tests fail if it is not available. Also see
12928 ;; <https://github.com/glyph/automat/issues/71>.
12929 (arguments '(#:tests? #f))
12930 (native-inputs
12931 `(("python-m2r" ,python-m2r)
12932 ("python-setuptools-scm" ,python-setuptools-scm)
12933 ("python-graphviz" ,python-graphviz)))
12934 (propagated-inputs
12935 `(("python-six" ,python-six)
12936 ("python-attrs" ,python-attrs)))
12937 (home-page "https://github.com/glyph/Automat")
12938 (synopsis "Self-service finite-state machines")
12939 (description "Automat is a library for concise, idiomatic Python
12940 expression of finite-state automata (particularly deterministic finite-state
12941 transducers).")
12942 (license license:expat)))
12943
12944 (define-public python2-automat
12945 (package-with-python2 python-automat))
12946
12947 (define-public python-m2r
12948 (package
12949 (name "python-m2r")
12950 (version "0.2.1")
12951 (source (origin
12952 (method url-fetch)
12953 (uri (pypi-uri "m2r" version))
12954 (sha256
12955 (base32
12956 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12957 (build-system python-build-system)
12958 (propagated-inputs
12959 `(("python-docutils" ,python-docutils)
12960 ("python-mistune" ,python-mistune)))
12961 (native-inputs
12962 `(("python-pygments" ,python-pygments)
12963 ("python-mock" ,python-mock)))
12964 (home-page "https://github.com/miyakogi/m2r")
12965 (synopsis "Markdown to reStructuredText converter")
12966 (description "M2R converts a markdown file including reST markups to valid
12967 reST format.")
12968 (license license:expat)))
12969
12970 (define-public python2-m2r
12971 (package-with-python2 python-m2r))
12972
12973 (define-public python-constantly
12974 (package
12975 (name "python-constantly")
12976 (version "15.1.0")
12977 (source (origin
12978 (method url-fetch)
12979 (uri (pypi-uri "constantly" version))
12980 (sha256
12981 (base32
12982 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12983 (build-system python-build-system)
12984 (home-page "https://github.com/twisted/constantly")
12985 (synopsis "Symbolic constants in Python")
12986 (description "Constantly is a Python library that provides symbolic
12987 constant support. It includes collections and constants with text, numeric,
12988 and bit flag values.")
12989 (license license:expat)))
12990
12991 (define-public python2-constantly
12992 (package-with-python2 python-constantly))
12993
12994 (define-public python-attrs
12995 (package
12996 (name "python-attrs")
12997 (version "19.1.0")
12998 (source (origin
12999 (method url-fetch)
13000 (uri (pypi-uri "attrs" version))
13001 (sha256
13002 (base32
13003 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
13004 (build-system python-build-system)
13005 (arguments
13006 `(#:modules ((guix build utils)
13007 (guix build python-build-system)
13008 (ice-9 ftw)
13009 (srfi srfi-1)
13010 (srfi srfi-26))
13011 #:phases (modify-phases %standard-phases
13012 (replace 'check
13013 (lambda _
13014 (let ((cwd (getcwd)))
13015 (setenv "PYTHONPATH"
13016 (string-append
13017 cwd "/build/"
13018 (find (cut string-prefix? "lib" <>)
13019 (scandir (string-append cwd "/build")))
13020 ":"
13021 (getenv "PYTHONPATH")))
13022 (invoke "python" "-m" "pytest")))))))
13023 (native-inputs
13024 `(("python-coverage" ,python-coverage)
13025 ("python-hypothesis" ,python-hypothesis)
13026 ("python-pympler" ,python-pympler)
13027 ("python-pytest" ,python-pytest)
13028 ("python-six" ,python-six)
13029 ("python-sphinx" ,python-sphinx)
13030 ("python-zope-interface" ,python-zope-interface)))
13031 (home-page "https://github.com/python-attrs/attrs/")
13032 (synopsis "Attributes without boilerplate")
13033 (description "@code{attrs} is a Python package with class decorators that
13034 ease the chores of implementing the most common attribute-related object
13035 protocols.")
13036 (license license:expat)))
13037
13038 (define-public python2-attrs
13039 (package-with-python2 python-attrs))
13040
13041 (define-public python-attrs-bootstrap
13042 (package
13043 (inherit python-attrs)
13044 (name "python-attrs-bootstrap")
13045 (native-inputs `())
13046 (arguments `(#:tests? #f))))
13047
13048 (define-public python2-attrs-bootstrap
13049 (package-with-python2 python-attrs-bootstrap))
13050
13051 (define-public python2-cliapp
13052 (package
13053 (name "python2-cliapp")
13054 (version "1.20180812.1")
13055 (source
13056 (origin
13057 (method url-fetch)
13058 (uri (string-append
13059 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13060 version ".tar.gz"))
13061 (sha256
13062 (base32
13063 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
13064 (build-system python-build-system)
13065 (arguments
13066 `(#:python ,python-2
13067 #:phases
13068 (modify-phases %standard-phases
13069 ;; check phase needs to be run before the build phase. If not,
13070 ;; coverage-test-runner looks for tests for the built source files,
13071 ;; and fails.
13072 (delete 'check)
13073 (add-before 'build 'check
13074 (lambda _
13075 ;; Disable python3 tests
13076 (substitute* "check"
13077 (("python3") "# python3"))
13078 (invoke "./check"))))))
13079 (native-inputs
13080 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13081 ("python2-pep8" ,python2-pep8)))
13082 (propagated-inputs
13083 `(("python2-pyaml" ,python2-pyaml)))
13084 (home-page "https://liw.fi/cliapp/")
13085 (synopsis "Python framework for command line programs")
13086 (description "@code{python2-cliapp} is a python framework for
13087 command line programs. It contains the typical stuff such programs
13088 need to do, such as parsing the command line for options, and
13089 iterating over input files.")
13090 (license license:gpl2+)))
13091
13092 (define-public python2-ttystatus
13093 (package
13094 (name "python2-ttystatus")
13095 (version "0.36")
13096 (source
13097 (origin
13098 (method url-fetch)
13099 (uri (string-append
13100 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13101 version ".tar.gz"))
13102 (sha256
13103 (base32
13104 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
13105 (build-system python-build-system)
13106 (native-inputs
13107 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13108 ("python2-pep8" ,python2-pep8)))
13109 (arguments
13110 `(#:python ,python-2
13111 #:phases
13112 (modify-phases %standard-phases
13113 ;; check phase needs to be run before the build phase. If not,
13114 ;; coverage-test-runner looks for tests for the built source files,
13115 ;; and fails.
13116 (delete 'check)
13117 (add-before 'build 'check
13118 (lambda _ (invoke "make" "check"))))))
13119 (home-page "https://liw.fi/ttystatus/")
13120 (synopsis "Python library for showing progress reporting and
13121 status updates on terminals")
13122 (description "@code{python2-ttystatus} is a python library for
13123 showing progress reporting and status updates on terminals, for
13124 command line programs. Output is automatically adapted to the width
13125 of the terminal: truncated if it does not fit, and resized if the
13126 terminal size changes.")
13127 (license license:gpl3+)))
13128
13129 (define-public python2-tracing
13130 (package
13131 (name "python2-tracing")
13132 (version "0.10")
13133 (source
13134 (origin
13135 (method url-fetch)
13136 (uri (string-append
13137 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13138 version ".tar.gz"))
13139 (sha256
13140 (base32
13141 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13142 (build-system python-build-system)
13143 (arguments
13144 `(#:python ,python-2))
13145 (home-page "https://liw.fi/tracing/")
13146 (synopsis "Python debug logging helper")
13147 (description "@code{python2-tracing} is a python library for
13148 logging debug messages. It provides a way to turn debugging messages
13149 on and off, based on the filename they occur in. It is much faster
13150 than using @code{logging.Filter} to accomplish the same thing, which
13151 matters when code is run in production mode. The actual logging still
13152 happens using the @code{logging} library.")
13153 (license license:gpl3+)))
13154
13155 (define-public python2-larch
13156 (package
13157 (name "python2-larch")
13158 (version "1.20151025")
13159 (source
13160 (origin
13161 (method url-fetch)
13162 (uri (string-append
13163 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13164 version ".tar.gz"))
13165 (patches (search-patches
13166 "python2-larch-coverage-4.0a6-compatibility.patch"))
13167 (sha256
13168 (base32
13169 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13170 (build-system python-build-system)
13171 (arguments
13172 `(#:python ,python-2
13173 #:phases
13174 (modify-phases %standard-phases
13175 ;; check phase needs to be run before the build phase. If not,
13176 ;; coverage-test-runner looks for tests for the built source files,
13177 ;; and fails.
13178 (delete 'check)
13179 (add-before 'build 'check
13180 (lambda _ (invoke "make" "check"))))))
13181 (native-inputs
13182 `(("cmdtest" ,cmdtest)
13183 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13184 (propagated-inputs
13185 `(("python2-tracing" ,python2-tracing)))
13186 (home-page "https://liw.fi/larch/")
13187 (synopsis "Python copy-on-write B-tree library")
13188 (description "@code{python2-larch} is an implementation of
13189 particular kind of B-tree, based on research by Ohad Rodeh. See
13190 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13191 on the data structure.
13192
13193 The distinctive feature of this B-tree is that a node is never
13194 (conceptually) modified. Instead, all updates are done by
13195 copy-on-write. This makes it easy to clone a tree, and modify only the
13196 clone, while other processes access the original tree.")
13197 (license license:gpl3+)))
13198
13199 (define-public python-astroid
13200 (package
13201 (name "python-astroid")
13202 (version "2.3.3")
13203 (source
13204 (origin
13205 (method url-fetch)
13206 (uri (pypi-uri "astroid" version))
13207 (sha256
13208 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
13209 (build-system python-build-system)
13210 (propagated-inputs
13211 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13212 ("python-six" ,python-six)
13213 ("python-typed-ast" ,python-typed-ast)
13214 ("python-wrapt" ,python-wrapt)))
13215 (native-inputs
13216 `(("python-dateutil" ,python-dateutil)
13217 ("python-nose" ,python-nose)
13218 ("python-pytest" ,python-pytest)
13219 ("python-pytest-runner" ,python-pytest-runner)))
13220 (arguments
13221 `(#:phases
13222 (modify-phases %standard-phases
13223 (add-after 'unpack 'remove-spurious-test
13224 (lambda _
13225 ;; This can be removed after upgrading from python-3.7
13226 ;; https://github.com/PyCQA/astroid/issues/593
13227 ;; https://bugs.python.org/issue34056
13228 (delete-file "astroid/tests/unittest_modutils.py")
13229 #t))
13230 (replace 'check
13231 (lambda _
13232 (invoke "pytest" "astroid"))))))
13233 (home-page "https://github.com/PyCQA/astroid")
13234 (synopsis "Common base representation of python source code for pylint and
13235 other projects")
13236 (description "@code{python-astroid} provides a common base representation
13237 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13238
13239 It provides a compatible representation which comes from the _ast module. It
13240 rebuilds the tree generated by the builtin _ast module by recursively walking
13241 down the AST and building an extended ast. The new node classes have
13242 additional methods and attributes for different usages. They include some
13243 support for static inference and local name scopes. Furthermore, astroid
13244 builds partial trees by inspecting living objects.")
13245 (license license:lgpl2.1+)
13246 (properties `((python2-variant . ,(delay python2-astroid))))))
13247
13248 (define-public python2-astroid
13249 (let ((base (package-with-python2
13250 (strip-python2-variant python-astroid))))
13251 (package (inherit base)
13252 ;; Version 2.x removes python2 support.
13253 (version "1.6.5")
13254 (source
13255 (origin
13256 (method url-fetch)
13257 (uri (pypi-uri "astroid" version))
13258 (sha256
13259 (base32
13260 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13261 (arguments
13262 (substitute-keyword-arguments (package-arguments base)
13263 ((#:phases phases)
13264 `(modify-phases ,phases
13265 (add-after 'unpack 'remove-spurious-test
13266 (lambda _
13267 ;; https://github.com/PyCQA/astroid/issues/276
13268 (delete-file "astroid/tests/unittest_brain.py")
13269 #t))
13270 (replace 'check
13271 (lambda _
13272 (invoke"python" "-m" "unittest" "discover"
13273 "-p" "unittest*.py")))))))
13274 (native-inputs `())
13275 (propagated-inputs
13276 `(("python2-backports-functools-lru-cache"
13277 ,python2-backports-functools-lru-cache)
13278 ("python2-enum34" ,python2-enum34)
13279 ("python2-singledispatch" ,python2-singledispatch)
13280 ,@(alist-delete "python-typed-ast"
13281 (package-propagated-inputs base)))))))
13282
13283 (define-public python-isort
13284 (package
13285 (name "python-isort")
13286 (version "4.3.4")
13287 (source
13288 (origin
13289 (method git-fetch)
13290 (uri (git-reference
13291 ;; Tests pass only from the Github sources
13292 (url "https://github.com/timothycrosley/isort")
13293 (commit version)))
13294 (file-name (git-file-name name version))
13295 (sha256
13296 (base32
13297 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
13298 (build-system python-build-system)
13299 (native-inputs
13300 `(("python-mock" ,python-mock)
13301 ("python-pytest" ,python-pytest)))
13302 (home-page "https://github.com/timothycrosley/isort")
13303 (synopsis "Python utility/library to sort python imports")
13304 (description "@code{python-isort} is a python utility/library to sort
13305 imports alphabetically, and automatically separated into sections. It
13306 provides a command line utility, a python library and plugins for various
13307 editors.")
13308 (license license:expat)
13309 (properties `((python2-variant . ,(delay python2-isort))))))
13310
13311 (define-public python2-isort
13312 (let ((base (package-with-python2
13313 (strip-python2-variant python-isort))))
13314 (package (inherit base)
13315 (native-inputs
13316 `(("python2-futures" ,python2-futures)
13317 ,@(package-native-inputs base))))))
13318
13319 (define-public python2-backports-functools-lru-cache
13320 (package
13321 (name "python2-backports-functools-lru-cache")
13322 (version "1.5")
13323 (source
13324 (origin
13325 (method url-fetch)
13326 ;; only the pypi tarballs contain the necessary metadata
13327 (uri (pypi-uri "backports.functools_lru_cache" version))
13328 (sha256
13329 (base32
13330 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
13331 (build-system python-build-system)
13332 (native-inputs
13333 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13334 (arguments
13335 `(#:python ,python-2))
13336 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13337 (synopsis "Backport of functools.lru_cache from Python 3.3")
13338 (description "@code{python2-backports-functools-lru-cache} is a backport
13339 of @code{functools.lru_cache} from python 3.3.")
13340 (license license:expat)))
13341
13342 (define-public python-configparser
13343 (package
13344 (name "python-configparser")
13345 (version "3.7.1")
13346 (source
13347 (origin
13348 (method url-fetch)
13349 (uri (pypi-uri "configparser" version))
13350 (sha256
13351 (base32
13352 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
13353 (build-system python-build-system)
13354 (home-page "https://github.com/jaraco/configparser/")
13355 (synopsis "Backport of configparser from python 3.5")
13356 (description "@code{python-configparser} is a backport of
13357 @code{configparser} from Python 3.5 so that it can be used directly
13358 in other versions.")
13359 (license license:expat)))
13360
13361 (define-public python2-configparser
13362 (package-with-python2 python-configparser))
13363
13364 (define-public python-mando
13365 (package
13366 (name "python-mando")
13367 (version "0.6.4")
13368 (source (origin
13369 (method url-fetch)
13370 (uri (pypi-uri "mando" version))
13371 (sha256
13372 (base32
13373 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13374 (build-system python-build-system)
13375 (propagated-inputs
13376 `(("python-rst2ansi" ,python-rst2ansi)
13377 ("python-six" ,python-six)))
13378 (native-inputs
13379 `(("python-pytest" ,python-pytest)))
13380 (home-page "https://mando.readthedocs.org/")
13381 (synopsis
13382 "Wrapper around argparse, allowing creation of complete CLI applications")
13383 (description
13384 "This package is a wrapper around argparse, allowing you to write complete CLI
13385 applications in seconds while maintaining all the flexibility.")
13386 (license license:expat)))
13387
13388 (define-public python2-mando
13389 (package-with-python2 python-mando))
13390
13391 (define-public python2-argparse
13392 (package
13393 (name "python2-argparse")
13394 (version "1.4.0")
13395 (source
13396 (origin
13397 (method url-fetch)
13398 (uri (pypi-uri "argparse" version))
13399 (sha256
13400 (base32
13401 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13402 (build-system python-build-system)
13403 (arguments
13404 `(#:python ,python-2))
13405 (home-page "https://github.com/ThomasWaldmann/argparse/")
13406 (synopsis "Python command-line parsing library")
13407 (description
13408 "This package is mostly for people who want to have @code{argparse} on
13409 older Pythons because it was not part of the standard library back then.")
13410 (license license:psfl)))
13411
13412 (define-public python-fudge
13413 (package
13414 (name "python-fudge")
13415 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13416 ;; package, which is currently the only use of this package.
13417 (version "0.9.6")
13418 (source
13419 (origin
13420 (method url-fetch)
13421 (uri (pypi-uri "fudge" version))
13422 (sha256
13423 (base32
13424 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13425 (build-system python-build-system)
13426 (arguments
13427 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13428 (home-page "https://github.com/fudge-py/fudge")
13429 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13430 (description
13431 "Fudge is a Python module for using fake objects (mocks and stubs) to
13432 test real ones.
13433
13434 In readable Python code, you declare the methods available on your fake object
13435 and how they should be called. Then you inject that into your application and
13436 start testing. This declarative approach means you don’t have to record and
13437 playback actions and you don’t have to inspect your fakes after running code.
13438 If the fake object was used incorrectly then you’ll see an informative
13439 exception message with a traceback that points to the culprit.")
13440 (license license:expat)))
13441
13442 (define-public python2-fudge
13443 (package-with-python2 python-fudge))
13444
13445 (define-public python-mwclient
13446 (package
13447 (name "python-mwclient")
13448 (version "0.10.0")
13449 (source
13450 (origin
13451 (method git-fetch)
13452 ;; The PyPI version wouldn't contain tests.
13453 (uri (git-reference
13454 (url "https://github.com/mwclient/mwclient")
13455 (commit (string-append "v" version))))
13456 (file-name (git-file-name name version))
13457 (sha256
13458 (base32
13459 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
13460 (build-system python-build-system)
13461 (propagated-inputs
13462 `(("python-requests-oauthlib" ,python-requests-oauthlib)
13463 ("python-six" ,python-six)))
13464 (native-inputs
13465 `(("python-mock" ,python-mock)
13466 ("python-pytest" ,python-pytest)
13467 ("python-pytest-cov" ,python-pytest-cov)
13468 ("python-pytest-runner" ,python-pytest-runner)
13469 ("python-responses" ,python-responses)))
13470 (home-page "https://github.com/btongminh/mwclient")
13471 (synopsis "MediaWiki API client")
13472 (description "This package provides a MediaWiki API client.")
13473 (license license:expat)))
13474
13475 (define-public python2-mwclient
13476 (package-with-python2 python-mwclient))
13477
13478 (define-public python-utils
13479 (package
13480 (name "python-utils")
13481 (version "2.1.0")
13482 (source (origin
13483 (method url-fetch)
13484 (uri (pypi-uri "python-utils" version))
13485 (sha256
13486 (base32
13487 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13488 (build-system python-build-system)
13489 (native-inputs
13490 `(("pytest-runner" ,python-pytest-runner)
13491 ("pytest" ,python-pytest)
13492 ("six" ,python-six)))
13493 (home-page "https://github.com/WoLpH/python-utils")
13494 (synopsis "Convenient utilities not included with the standard Python install")
13495 (description
13496 "Python Utils is a collection of small Python functions and classes which
13497 make common patterns shorter and easier.")
13498 (license license:bsd-2)))
13499
13500 (define-public python2-utils
13501 (package-with-python2 python-utils))
13502
13503 (define-public python-diff-match-patch
13504 (package
13505 (name "python-diff-match-patch")
13506 (version "20121119")
13507 (source
13508 (origin
13509 (method url-fetch)
13510 (uri (pypi-uri "diff-match-patch" version))
13511 (sha256
13512 (base32
13513 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13514 (build-system python-build-system)
13515 (home-page "https://code.google.com/p/google-diff-match-patch")
13516 (synopsis "Synchronize plain text")
13517 (description "Diff Match and Patch libraries offer robust algorithms to
13518 perform the operations required for synchronizing plain text.")
13519 (license license:asl2.0)))
13520
13521 (define-public python2-diff-match-patch
13522 (package-with-python2 python-diff-match-patch))
13523
13524 (define-public python-dirsync
13525 (package
13526 (name "python-dirsync")
13527 (version "2.2.3")
13528 (source
13529 (origin
13530 (method url-fetch)
13531 (uri (pypi-uri "dirsync" version))
13532 (sha256
13533 (base32
13534 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13535 (build-system python-build-system)
13536 (propagated-inputs
13537 `(("six" ,python-six)))
13538 (home-page "https://bitbucket.org/tkhyn/dirsync")
13539 (synopsis "Advanced directory tree synchronisation tool")
13540 (description "Advanced directory tree synchronisation tool.")
13541 (license license:expat)))
13542
13543 (define-public python2-dirsync
13544 (package-with-python2 python-dirsync))
13545
13546 (define-public python-levenshtein
13547 (package
13548 (name "python-levenshtein")
13549 (version "0.12.0")
13550 (source
13551 (origin
13552 (method url-fetch)
13553 (uri (pypi-uri "python-Levenshtein" version))
13554 (sha256
13555 (base32
13556 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13557 (build-system python-build-system)
13558 (home-page "https://github.com/ztane/python-Levenshtein")
13559 (synopsis "Fast computation of Levenshtein distance and string similarity")
13560 (description
13561 "The Levenshtein Python C extension module contains functions for fast computation of
13562 @enumerate
13563 @item Levenshtein (edit) distance, and edit operations
13564 @item string similarity
13565 @item approximate median strings, and generally string averaging
13566 @item string sequence and set similarity
13567 @end enumerate
13568 It supports both normal and Unicode strings.")
13569 (license license:gpl2+)))
13570
13571 (define-public python2-levenshtein
13572 (package-with-python2 python-levenshtein))
13573
13574 (define-public python-scandir
13575 (package
13576 (name "python-scandir")
13577 (version "1.9.0")
13578 (source
13579 (origin
13580 (method url-fetch)
13581 (uri (pypi-uri "scandir" version))
13582 (sha256
13583 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13584 (build-system python-build-system)
13585 (arguments
13586 `(#:phases (modify-phases %standard-phases
13587 (replace 'check
13588 (lambda _
13589 (invoke "python" "test/run_tests.py"))))))
13590 (home-page "https://github.com/benhoyt/scandir")
13591 (synopsis "Directory iteration function")
13592 (description
13593 "Directory iteration function like os.listdir(), except that instead of
13594 returning a list of bare filenames, it yields DirEntry objects that include
13595 file type and stat information along with the name. Using scandir() increases
13596 the speed of os.walk() by 2-20 times (depending on the platform and file
13597 system) by avoiding unnecessary calls to os.stat() in most cases.
13598
13599 This package is part of the Python standard library since version 3.5.")
13600 (license license:bsd-3)))
13601
13602 (define-public python2-scandir
13603 (package-with-python2 python-scandir))
13604
13605 (define-public python2-stemming
13606 (package
13607 (name "python2-stemming")
13608 (version "1.0.1")
13609 (source
13610 (origin
13611 (method url-fetch)
13612 (uri (pypi-uri "stemming" version))
13613 (sha256
13614 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13615 (build-system python-build-system)
13616 (arguments
13617 `(#:python ,python-2))
13618 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13619 (synopsis "Python implementations of various stemming algorithms")
13620 (description
13621 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13622 stemming algorithms for English. These implementations are straightforward and
13623 efficient, unlike some Python versions of the same algorithms available on the
13624 Web. This package is an extraction of the stemming code included in the Whoosh
13625 search engine.")
13626 (license license:public-domain)))
13627
13628 (define-public python-factory-boy
13629 (package
13630 (name "python-factory-boy")
13631 (version "2.8.1")
13632 (source
13633 (origin
13634 (method url-fetch)
13635 (uri (pypi-uri "factory_boy" version))
13636 (sha256
13637 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13638 (build-system python-build-system)
13639 (arguments
13640 ;; Tests are not included in the tarball.
13641 `(#:tests? #f))
13642 (propagated-inputs
13643 `(("faker" ,python-faker)))
13644 (home-page "https://github.com/benhoyt/scandir")
13645 (synopsis "Versatile test fixtures replacement")
13646 (description
13647 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13648
13649 As a fixtures replacement tool, it aims to replace static, hard to maintain
13650 fixtures with easy-to-use factories for complex object.
13651
13652 Instead of building an exhaustive test setup with every possible combination
13653 of corner cases, factory_boy allows you to use objects customized for the
13654 current test, while only declaring the test-specific fields")
13655 (license license:expat)))
13656
13657 (define-public python2-factory-boy
13658 (package-with-python2 python-factory-boy))
13659
13660 (define-public python-translate-toolkit
13661 (package
13662 (name "python-translate-toolkit")
13663 (version "2.1.0")
13664 (source
13665 (origin
13666 (method url-fetch)
13667 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13668 (sha256
13669 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13670 (build-system python-build-system)
13671 (native-inputs
13672 `(("python-pytest" ,python-pytest)
13673 ("python-sphinx" ,python-sphinx)))
13674 (propagated-inputs
13675 `(("python-babel" ,python-babel)
13676 ("python-beautifulsoup4" ,python-beautifulsoup4)
13677 ("python-chardet" ,python-chardet)
13678 ("python-diff-match-patch" ,python-diff-match-patch)
13679 ("python-levenshtein" ,python-levenshtein)
13680 ("python-lxml" ,python-lxml)
13681 ("python-six" ,python-six)
13682 ("python-vobject" ,python-vobject)
13683 ("python-pyyaml" ,python-pyyaml)))
13684 (arguments
13685 ;; TODO: tests are not run, because they end with
13686 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13687 ;; 'parse_funcs'
13688 ;; during test setup.
13689 `(#:tests? #f))
13690 (home-page "https://toolkit.translatehouse.org")
13691 (synopsis "Tools and API for translation and localization engineering")
13692 (description
13693 "Tools and API for translation and localization engineering. It contains
13694 several utilities, as well as an API for building localization tools.")
13695 (license license:gpl2+)))
13696
13697 (define-public python2-translate-toolkit
13698 (package-with-python2 python-translate-toolkit))
13699
13700 (define-public python-packaging
13701 (package
13702 (name "python-packaging")
13703 (version "20.0")
13704 (source
13705 (origin
13706 (method url-fetch)
13707 (uri (pypi-uri "packaging" version))
13708 ;; XXX: The URL in the patch file is wrong, it should be
13709 ;; <https://github.com/pypa/packaging/pull/256>.
13710 (patches (search-patches "python-packaging-test-arch.patch"))
13711 (sha256
13712 (base32
13713 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13714 (build-system python-build-system)
13715 (arguments
13716 `(#:phases (modify-phases %standard-phases
13717 (replace 'check
13718 (lambda _ (invoke "py.test" "-vv"))))))
13719 (native-inputs
13720 `(("python-pretend" ,python-pretend)
13721 ("python-pytest" ,python-pytest)))
13722 (propagated-inputs
13723 `(("python-pyparsing" ,python-pyparsing)
13724 ("python-six" ,python-six)))
13725 (home-page "https://github.com/pypa/packaging")
13726 (synopsis "Core utilities for Python packages")
13727 (description "Packaging is a Python module for dealing with Python packages.
13728 It offers an interface for working with package versions, names, and dependency
13729 information.")
13730 ;; From 'LICENSE': This software is made available under the terms of
13731 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13732 ;; Contributions to this software is made under the terms of *both* these
13733 ;; licenses.
13734 (license (list license:asl2.0 license:bsd-2))))
13735
13736 (define-public python2-packaging
13737 (package-with-python2 python-packaging))
13738
13739 (define-public python-relatorio
13740 (package
13741 (name "python-relatorio")
13742 (version "0.8.0")
13743 (source
13744 (origin
13745 (method url-fetch)
13746 (uri (pypi-uri "relatorio" version))
13747 (sha256
13748 (base32
13749 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13750 (build-system python-build-system)
13751 (propagated-inputs
13752 `(("python-lxml" ,python-lxml)
13753 ("python-genshi" ,python-genshi)))
13754 (native-inputs
13755 `(("python-magic" ,python-magic)))
13756 (home-page "https://relatorio.tryton.org/")
13757 (synopsis "Templating library able to output ODT and PDF files")
13758 (description "Relatorio is a templating library which provides a way to
13759 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13760 for more filetypes can be easily added by creating plugins for them.")
13761 (license license:gpl3+)))
13762
13763 (define-public python2-relatorio
13764 (package-with-python2 python-relatorio))
13765
13766 (define-public python-radon
13767 (package
13768 (name "python-radon")
13769 (version "4.1.0")
13770 (source
13771 (origin
13772 (method url-fetch)
13773 (uri (pypi-uri "radon" version))
13774 (sha256
13775 (base32
13776 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
13777 (build-system python-build-system)
13778 (arguments
13779 `(#:phases (modify-phases %standard-phases
13780 (replace 'check
13781 (lambda _
13782 (invoke "python" "radon/tests/run.py"))))))
13783 (propagated-inputs
13784 `(("python-colorama" ,python-colorama)
13785 ("python-flake8-polyfill" ,python-flake8-polyfill)
13786 ("python-mando" ,python-mando)))
13787 (native-inputs
13788 `(("python-pytest" ,python-pytest)
13789 ("python-pytest-mock" ,python-pytest-mock)))
13790 (home-page "https://radon.readthedocs.org/")
13791 (synopsis "Code Metrics in Python")
13792 (description "Radon is a Python tool which computes various code metrics.
13793 Supported metrics are:
13794 @itemize @bullet
13795 @item raw metrics: SLOC, comment lines, blank lines, &c.
13796 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13797 @item Halstead metrics (all of them)
13798 @item the Maintainability Index (a Visual Studio metric)
13799 @end itemize")
13800 (properties `((python2-variant . ,(delay python2-radon))))
13801 (license license:expat)))
13802
13803 (define-public python2-radon
13804 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
13805 (package
13806 (inherit base)
13807 (propagated-inputs
13808 `(("python-configparser" ,python2-configparser)
13809 ("python-future" ,python2-future)
13810 ,@(package-propagated-inputs base))))))
13811
13812 (define-public python-sure
13813 (package
13814 (name "python-sure")
13815 (version "1.4.11")
13816 (source
13817 (origin
13818 (method url-fetch)
13819 (uri (pypi-uri "sure" version))
13820 (sha256
13821 (base32
13822 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13823 (build-system python-build-system)
13824 (propagated-inputs
13825 `(("python-mock" ,python-mock)
13826 ("python-six" ,python-six)))
13827 (native-inputs
13828 `(("python-nose" ,python-nose)))
13829 (home-page "https://github.com/gabrielfalcao/sure")
13830 (synopsis "Automated testing library in python for python")
13831 (description
13832 "Sure is a python library that leverages a DSL for writing assertions.
13833 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13834 (license license:gpl3+)))
13835
13836 (define-public python2-sure
13837 (package-with-python2 python-sure))
13838
13839 (define-public python2-couleur
13840 ;; This package does not seem to support python3 at all, hence,
13841 ;; only the python2 variant definition is provided.
13842 (package
13843 (name "python2-couleur")
13844 (version "0.6.2")
13845 (source
13846 (origin
13847 (method url-fetch)
13848 (uri (pypi-uri "couleur" version))
13849 (sha256
13850 (base32
13851 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13852 (build-system python-build-system)
13853 (arguments
13854 `(#:python ,python-2))
13855 (home-page "https://github.com/gabrielfalcao/couleur")
13856 (synopsis
13857 "ANSI terminal tool for python, colored shell and other handy fancy features")
13858 (description
13859 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13860 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13861 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13862 ;; https://github.com/gabrielfalcao/couleur/issues/11
13863 (license license:lgpl3+)))
13864
13865 (define-public python-misaka
13866 (package
13867 (name "python-misaka")
13868 (version "2.1.1")
13869 (source
13870 (origin
13871 (method url-fetch)
13872 (uri (pypi-uri "misaka" version))
13873 (sha256
13874 (base32
13875 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13876 (build-system python-build-system)
13877 (arguments
13878 `(;; Line 37 of setup.py calls self.run_command('develop')
13879 ;; in the 'check' phase. This command seems to be trying
13880 ;; to write to
13881 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13882 ;; for which it does not have the permission to write.
13883 #:tests? #f))
13884 (propagated-inputs
13885 `(("python-cffi" ,python-cffi)))
13886 (home-page "https://github.com/FSX/misaka")
13887 (synopsis "Python binding for Hoedown")
13888 (description
13889 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13890 library written in C. It features a fast HTML renderer and functionality to make custom
13891 renderers (e.g. man pages or LaTeX).")
13892 (license license:expat)))
13893
13894 (define-public python2-misaka
13895 (package-with-python2 python-misaka))
13896
13897 (define-public python2-steadymark
13898 ;; This is forced into being a python2 only variant
13899 ;; due to its dependence on couleur that has no support
13900 ;; for python3
13901 (package
13902 (name "python2-steadymark")
13903 (version "0.7.3")
13904 (source
13905 (origin
13906 (method url-fetch)
13907 (uri (pypi-uri "steadymark" version))
13908 (sha256
13909 (base32
13910 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13911 (build-system python-build-system)
13912 (native-inputs
13913 `(("python-couleur" ,python2-couleur)
13914 ("python-sure" ,python2-sure)
13915 ("python-misaka" ,python2-misaka)))
13916 (arguments
13917 `(#:python ,python-2
13918 #:phases
13919 (modify-phases %standard-phases
13920 (add-before 'build 'patch-setup-py
13921 (lambda _
13922 ;; Update requirements from dependency==version
13923 ;; to dependency>=version
13924 (substitute* "setup.py"
13925 (("==") ">="))
13926 #t)))))
13927 (home-page "https://github.com/gabrielfalcao/steadymark")
13928 (synopsis "Markdown-based test runner for python")
13929 (description
13930 "@code{Steadymark} allows documentation to be written in github-flavoured
13931 markdown. The documentation may contain snippets of code surrounded by python
13932 code blocks and @code{Steadymark} will find these snippets and run them, making
13933 sure that there are no old malfunctional examples in the documentation examples.")
13934 (license license:expat)))
13935
13936 (define-public python-jsonpointer
13937 (package
13938 (name "python-jsonpointer")
13939 (version "1.10")
13940 (source
13941 (origin
13942 (method url-fetch)
13943 (uri (pypi-uri "jsonpointer" version))
13944 (sha256
13945 (base32
13946 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13947 (build-system python-build-system)
13948 (home-page "https://github.com/stefankoegl/python-json-pointer")
13949 (synopsis "Identify specific nodes in a JSON document")
13950 (description "@code{jsonpointer} allows you to access specific nodes
13951 by path in a JSON document (see RFC 6901).")
13952 (license license:bsd-3)))
13953
13954 (define-public python2-jsonpointer
13955 (package-with-python2 python-jsonpointer))
13956
13957 (define-public python-jsonpatch
13958 (package
13959 (name "python-jsonpatch")
13960 (version "1.16")
13961 (source
13962 (origin
13963 (method git-fetch)
13964 ;; pypi version lacks tests.js
13965 (uri (git-reference
13966 (url "https://github.com/stefankoegl/python-json-patch")
13967 (commit (string-append "v" version))))
13968 (file-name (git-file-name name version))
13969 (sha256
13970 (base32
13971 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13972 (build-system python-build-system)
13973 (native-inputs
13974 `(("python-jsonpointer" ,python-jsonpointer)))
13975 (home-page "https://github.com/stefankoegl/python-json-patch")
13976 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13977 (description "@code{jsonpatch} is a library and program that allows
13978 applying JSON Patches according to RFC 6902.")
13979 (license license:bsd-3)))
13980
13981 (define-public python2-jsonpatch
13982 (package-with-python2 python-jsonpatch))
13983
13984 (define-public python-jsonpatch-0.4
13985 (package (inherit python-jsonpatch)
13986 (name "python-jsonpatch")
13987 (version "0.4")
13988 (source
13989 (origin
13990 (method git-fetch)
13991 (uri (git-reference
13992 (url "https://github.com/stefankoegl/python-json-patch")
13993 (commit (string-append "v" version))))
13994 (file-name (git-file-name name version))
13995 (sha256
13996 (base32
13997 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13998
13999 (define-public python2-jsonpatch-0.4
14000 (package-with-python2 python-jsonpatch-0.4))
14001
14002 (define-public python-rfc3986
14003 (package
14004 (name "python-rfc3986")
14005 (version "1.1.0")
14006 (source (origin
14007 (method url-fetch)
14008 (uri (pypi-uri "rfc3986" version))
14009 (sha256
14010 (base32
14011 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
14012 (build-system python-build-system)
14013 (arguments
14014 `(#:modules ((guix build utils)
14015 (guix build python-build-system)
14016 (ice-9 ftw)
14017 (srfi srfi-1)
14018 (srfi srfi-26))
14019 #:phases
14020 (modify-phases %standard-phases
14021 (replace 'check
14022 (lambda _
14023 (let ((cwd (getcwd)))
14024 (setenv "PYTHONPATH"
14025 (string-append cwd "/build/"
14026 (find (cut string-prefix? "lib" <>)
14027 (scandir (string-append cwd "/build")))
14028 ":"
14029 (getenv "PYTHONPATH")))
14030 (invoke "pytest" "-v")))))))
14031 (native-inputs
14032 `(("python-pytest" ,python-pytest)))
14033 (home-page "https://rfc3986.readthedocs.io/")
14034 (synopsis "Parse and validate URI references")
14035 (description
14036 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14037 validation and authority parsing. This module also supports RFC@tie{}6874
14038 which adds support for zone identifiers to IPv6 addresses.")
14039 (license license:asl2.0)))
14040
14041 (define-public python2-rfc3986
14042 (package-with-python2 python-rfc3986))
14043
14044 (define-public python-rfc3987
14045 (package
14046 (name "python-rfc3987")
14047 (version "1.3.7")
14048 (source
14049 (origin
14050 (method url-fetch)
14051 (uri (pypi-uri "rfc3987" version))
14052 (sha256
14053 (base32
14054 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14055 (build-system python-build-system)
14056 (home-page "https://pypi.org/project/rfc3987/")
14057 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14058 (description "@code{rfc3987} provides routines for parsing and
14059 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14060 (license license:gpl3+)))
14061
14062 (define-public python2-rfc3987
14063 (package-with-python2 python-rfc3987))
14064
14065 (define-public python-validate-email
14066 (package
14067 (name "python-validate-email")
14068 (version "1.3")
14069 (source
14070 (origin
14071 (method url-fetch)
14072 (uri (pypi-uri "validate_email" version))
14073 (sha256
14074 (base32
14075 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14076 (build-system python-build-system)
14077 (home-page "https://github.com/syrusakbary/validate_email")
14078 (synopsis "Verifies if an email address is valid and really exists")
14079 (description "@code{validate_email} can be used to verify if an email
14080 address is valid and really exists.")
14081 (license license:lgpl3+)))
14082
14083 (define-public python2-validate-email
14084 (package-with-python2 python-validate-email))
14085
14086 (define-public python-flex
14087 (package
14088 (name "python-flex")
14089 (version "6.10.0")
14090 (source
14091 (origin
14092 (method url-fetch)
14093 (uri (pypi-uri "flex" version))
14094 (sha256
14095 (base32
14096 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14097 (build-system python-build-system)
14098 (propagated-inputs
14099 `(("python-click" ,python-click)
14100 ("python-iso8601" ,python-iso8601)
14101 ("python-jsonpointer" ,python-jsonpointer)
14102 ("python-pyyaml" ,python-pyyaml)
14103 ("python-requests" ,python-requests)
14104 ("python-rfc3987" ,python-rfc3987)
14105 ("python-six" ,python-six)
14106 ("python-validate-email" ,python-validate-email)))
14107 (home-page "https://github.com/pipermerriam/flex")
14108 (synopsis "Validates Swagger schemata")
14109 (description "@code{flex} can be used to validate Swagger schemata.")
14110 (license license:bsd-3)))
14111
14112 (define-public python2-flex
14113 (package-with-python2 python-flex))
14114
14115 (define-public python-marshmallow
14116 (package
14117 (name "python-marshmallow")
14118 (version "3.0.0b14")
14119 (source
14120 (origin
14121 (method url-fetch)
14122 (uri (pypi-uri "marshmallow" version))
14123 (sha256
14124 (base32
14125 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14126 (build-system python-build-system)
14127 (propagated-inputs
14128 `(("python-dateutil" ,python-dateutil)
14129 ("python-simplejson" ,python-simplejson)))
14130 (native-inputs
14131 `(("python-pytest" ,python-pytest)
14132 ("python-pytz" ,python-pytz)))
14133 (home-page "https://github.com/marshmallow-code/marshmallow")
14134 (synopsis "Convert complex datatypes to and from native
14135 Python datatypes.")
14136 (description "@code{marshmallow} provides a library for converting
14137 complex datatypes to and from native Python datatypes.")
14138 (license license:expat)))
14139
14140 (define-public python2-marshmallow
14141 (package-with-python2 python-marshmallow))
14142
14143 (define-public python-apispec
14144 (package
14145 (name "python-apispec")
14146 (version "0.25.3")
14147 (source
14148 (origin
14149 (method url-fetch)
14150 (uri (pypi-uri "apispec" version))
14151 (sha256
14152 (base32
14153 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14154 (build-system python-build-system)
14155 (propagated-inputs
14156 `(("python-pyyaml" ,python-pyyaml)))
14157 (native-inputs
14158 `(("python-pytest" ,python-pytest)
14159 ("python-flask" ,python-flask)
14160 ("python-marshmallow" ,python-marshmallow)
14161 ("python-tornado" ,python-tornado)
14162 ("python-bottle" ,python-bottle)
14163 ("python-mock" ,python-mock)))
14164 (home-page "https://github.com/marshmallow-code/apispec")
14165 (synopsis "Swagger 2.0 API specification generator")
14166 (description "@code{python-apispec} is a pluggable API specification
14167 generator. Currently supports the OpenAPI specification (f.k.a.
14168 Swagger 2.0).")
14169 (license license:expat)))
14170
14171 (define-public python2-apispec
14172 (package-with-python2 python-apispec))
14173
14174 (define-public python-flasgger
14175 (package
14176 (name "python-flasgger")
14177 (version "0.6.3")
14178 (source
14179 (origin
14180 (method git-fetch)
14181 (uri (git-reference
14182 (url "https://github.com/rochacbruno/flasgger.git")
14183 (commit version)))
14184 (file-name (git-file-name name version))
14185 (sha256
14186 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
14187 (build-system python-build-system)
14188 (arguments
14189 `(#:phases
14190 (modify-phases %standard-phases
14191 (replace 'check
14192 (lambda* (#:key inputs outputs #:allow-other-keys)
14193 (substitute* "Makefile"
14194 (("flake8 flasgger --ignore=F403")
14195 "flake8 flasgger --ignore=E731,F403"))
14196 (setenv "PYTHONPATH" (string-append (getcwd)
14197 ":"
14198 (getenv "PYTHONPATH")))
14199 (invoke "py.test"))))))
14200 (propagated-inputs
14201 `(("python-flask" ,python-flask)
14202 ("python-pyyaml" ,python-pyyaml)
14203 ("python-jsonschema" ,python-jsonschema)
14204 ("python-mistune" ,python-mistune)
14205 ("python-six" ,python-six)))
14206 (native-inputs
14207 `(("python-decorator" ,python-decorator)
14208 ("python-flake8" ,python-flake8)
14209 ("python-flask-restful" ,python-flask-restful)
14210 ("python-flex" ,python-flex)
14211 ("python-pytest" ,python-pytest)
14212 ("python-pytest-cov" ,python-pytest-cov)
14213 ("python-marshmallow" ,python-marshmallow)
14214 ("python-apispec" ,python-apispec)))
14215 (home-page "https://github.com/rochacbruno/flasgger/")
14216 (synopsis "Extract Swagger specs from your Flask project")
14217 (description "@code{python-flasgger} allows extracting Swagger specs
14218 from your Flask project. It is a fork of Flask-Swagger.")
14219 (license license:expat)))
14220
14221 (define-public python2-flasgger
14222 (package-with-python2 python-flasgger))
14223
14224 (define-public python-swagger-spec-validator
14225 (package
14226 (name "python-swagger-spec-validator")
14227 (version "2.4.3")
14228 (source
14229 (origin
14230 (method url-fetch)
14231 (uri (pypi-uri "swagger-spec-validator" version))
14232 (sha256
14233 (base32
14234 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
14235 (build-system python-build-system)
14236 (propagated-inputs
14237 `(("python-jsonschema" ,python-jsonschema)
14238 ("python-pyyaml" ,python-pyyaml)
14239 ("python-six" ,python-six)))
14240 (home-page
14241 "https://github.com/Yelp/swagger_spec_validator")
14242 (synopsis "Validation of Swagger specifications")
14243 (description "@code{swagger_spec_validator} provides a library for
14244 validating Swagger API specifications.")
14245 (license license:asl2.0)))
14246
14247 (define-public python2-swagger-spec-validator
14248 (package-with-python2 python-swagger-spec-validator))
14249
14250 (define-public python-apache-libcloud
14251 (package
14252 (name "python-apache-libcloud")
14253 (version "2.4.0")
14254 (source
14255 (origin
14256 (method url-fetch)
14257 (uri (pypi-uri "apache-libcloud" version))
14258 (sha256
14259 (base32
14260 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
14261 (build-system python-build-system)
14262 (arguments
14263 `(#:phases
14264 (modify-phases %standard-phases
14265 (add-after 'unpack 'patch-ssh
14266 (lambda* (#:key inputs #:allow-other-keys)
14267 (substitute* "libcloud/compute/ssh.py"
14268 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
14269 "/bin/ssh" "'")))
14270 #t))
14271 (add-after 'unpack 'patch-tests
14272 (lambda _
14273 (substitute* "./libcloud/test/test_file_fixtures.py"
14274 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
14275 (("def _ascii") "def _raw_data(self, method, url, body, headers):
14276 return (httplib.OK,
14277 \"1234abcd\",
14278 {\"test\": \"value\"},
14279 httplib.responses[httplib.OK])
14280 def _ascii"))
14281 (substitute* "libcloud/test/compute/test_ssh_client.py"
14282 (("class ShellOutSSHClientTests")
14283 "@unittest.skip(\"Guix container doesn't have ssh service\")
14284 class ShellOutSSHClientTests")
14285 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
14286 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
14287 (("'.xF0', '.x90', '.x8D', '.x88'")
14288 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
14289 #t))
14290 (add-before 'check 'copy-secret
14291 (lambda _
14292 (copy-file "libcloud/test/secrets.py-dist"
14293 "libcloud/test/secrets.py")
14294 #t)))))
14295 (inputs
14296 `(("openssh" ,openssh)))
14297 (propagated-inputs
14298 `(("python-paramiko" ,python-paramiko)
14299 ("python-requests" ,python-requests)))
14300 (native-inputs
14301 `(("python-lockfile" ,python-lockfile)
14302 ("python-mock" ,python-mock)
14303 ("python-pytest" ,python-pytest)
14304 ("python-pytest-runner" ,python-pytest-runner)
14305 ("python-requests-mock" ,python-requests-mock)))
14306 (home-page "https://libcloud.apache.org/")
14307 (synopsis "Unified Cloud API")
14308 (description "@code{libcloud} is a Python library for interacting with
14309 many of the popular cloud service providers using a unified API.")
14310 (license license:asl2.0)))
14311
14312 (define-public python2-apache-libcloud
14313 (package-with-python2 python-apache-libcloud))
14314
14315 (define-public python-smmap
14316 (package
14317 (name "python-smmap")
14318 (version "3.0.1")
14319 (source
14320 (origin
14321 (method url-fetch)
14322 (uri (pypi-uri "smmap" version))
14323 (sha256
14324 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
14325 (build-system python-build-system)
14326 (native-inputs
14327 `(("python-nosexcover" ,python-nosexcover)))
14328 (home-page "https://github.com/Byron/smmap")
14329 (synopsis "Python sliding window memory map manager")
14330 (description "@code{smmap} is a pure Python implementation of a sliding
14331 window memory map manager.")
14332 (license license:bsd-3)))
14333
14334 (define-public python-smmap2
14335 (deprecated-package "python-smmap2" python-smmap))
14336
14337 (define-public python2-smmap
14338 (package-with-python2 python-smmap))
14339
14340 (define-public python2-smmap2
14341 (deprecated-package "python2-smmap2" python2-smmap))
14342
14343 (define-public python-regex
14344 (package
14345 (name "python-regex")
14346 (version "2019.04.14")
14347 (source (origin
14348 (method url-fetch)
14349 (uri (pypi-uri "regex" version))
14350 (sha256
14351 (base32
14352 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
14353 ;; TODO: Fix and enable regex_test.py tests that complain about the
14354 ;; test.support module not existing.
14355 (build-system python-build-system)
14356 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
14357 (synopsis "Alternative regular expression module")
14358 (description "This regular expression implementation is backwards-
14359 compatible with the standard @code{re} module, but offers additional
14360 functionality like full case-folding for case-insensitive matches in Unicode.")
14361 (license license:psfl)))
14362
14363 (define-public python2-regex
14364 (package-with-python2 python-regex))
14365
14366 (define-public python2-pyopengl
14367 (package
14368 (name "python2-pyopengl")
14369 (version "3.1.0")
14370 (source
14371 (origin
14372 (method url-fetch)
14373 (uri (pypi-uri "PyOpenGL" version))
14374 (sha256
14375 (base32
14376 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14377 (arguments
14378 `(#:python ,python-2))
14379 (build-system python-build-system)
14380 (home-page "http://pyopengl.sourceforge.net")
14381 (synopsis "Standard OpenGL bindings for Python")
14382 (description
14383 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14384 related APIs. The binding is created using the standard @code{ctypes}
14385 library.")
14386 (license license:bsd-3)))
14387
14388 (define-public python2-pyopengl-accelerate
14389 (package
14390 (inherit python2-pyopengl)
14391 (name "python2-pyopengl-accelerate")
14392 (version "3.1.0")
14393 (source
14394 (origin
14395 (method url-fetch)
14396 (uri (pypi-uri "PyOpenGL-accelerate" version))
14397 (sha256
14398 (base32
14399 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14400 (synopsis "Acceleration code for PyOpenGL")
14401 (description
14402 "This is the Cython-coded accelerator module for PyOpenGL.")))
14403
14404 (define-public python-rencode
14405 (package
14406 (name "python-rencode")
14407 (version "1.0.5")
14408 (source
14409 (origin
14410 (method url-fetch)
14411 (uri (pypi-uri "rencode" version))
14412 (sha256
14413 (base32
14414 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14415 (build-system python-build-system)
14416 (arguments
14417 `(#:phases
14418 (modify-phases %standard-phases
14419 (add-before 'check 'delete-bogus-test
14420 ;; This test requires /home/aresch/Downloads, which is not provided by
14421 ;; the build environment.
14422 (lambda _
14423 (delete-file "rencode/t.py")
14424 #t)))))
14425 (native-inputs `(("pkg-config" ,pkg-config)
14426 ("python-cython" ,python-cython)))
14427 (home-page "https://github.com/aresch/rencode")
14428 (synopsis "Serialization of heterogeneous data structures")
14429 (description
14430 "The @code{rencode} module is a data structure serialization library,
14431 similar to @code{bencode} from the BitTorrent project. For complex,
14432 heterogeneous data structures with many small elements, r-encoding stake up
14433 significantly less space than b-encodings. This version of rencode is a
14434 complete rewrite in Cython to attempt to increase the performance over the
14435 pure Python module.")
14436 (license license:bsd-3)))
14437
14438 (define-public python2-rencode
14439 (package-with-python2 python-rencode))
14440
14441 (define-public python-xenon
14442 (package
14443 (name "python-xenon")
14444 (version "0.7.0")
14445 (source
14446 (origin
14447 (method url-fetch)
14448 (uri (pypi-uri "xenon" version))
14449 (sha256
14450 (base32
14451 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
14452 (build-system python-build-system)
14453 (native-inputs
14454 `(("python-pyyaml" ,python-pyyaml)
14455 ("python-radon" ,python-radon)
14456 ("python-requests" ,python-requests)
14457 ("python-flake8" ,python-flake8)
14458 ("python-tox" ,python-tox)))
14459 (arguments
14460 `(#:tests? #f ;test suite not shipped with the PyPI archive
14461 #:phases
14462 (modify-phases %standard-phases
14463 (add-before 'build 'patch-test-requirements
14464 (lambda _
14465 ;; Remove httpretty dependency for tests.
14466 (substitute* "setup.py"
14467 (("httpretty") ""))
14468 #t)))))
14469 (home-page "https://xenon.readthedocs.org/")
14470 (synopsis "Monitor code metrics for Python on your CI server")
14471 (description
14472 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14473 Ideally, @code{xenon} is run every time code is committed. Through command
14474 line options, various thresholds can be set for the complexity of code. It
14475 will fail (i.e. it will exit with a non-zero exit code) when any of these
14476 requirements is not met.")
14477 (license license:expat)))
14478
14479 (define-public python2-xenon
14480 (package-with-python2 python-xenon))
14481
14482 (define-public python-pysocks
14483 (package
14484 (name "python-pysocks")
14485 (version "1.7.0")
14486 (source
14487 (origin
14488 (method url-fetch)
14489 (uri (pypi-uri "PySocks" version))
14490 (sha256
14491 (base32
14492 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
14493 (build-system python-build-system)
14494 (arguments `(#:tests? #f))
14495 (home-page "https://github.com/Anorov/PySocks")
14496 (synopsis "SOCKS client module")
14497 (description "@code{pysocks} is an updated and semi-actively maintained
14498 version of @code{SocksiPy} with bug fixes and extra features.")
14499 (license license:bsd-3)))
14500
14501 (define-public python2-pysocks
14502 (package-with-python2 python-pysocks))
14503
14504 (define-public python-pydiff
14505 (package
14506 (name "python-pydiff")
14507 (version "0.2")
14508 (source
14509 (origin
14510 (method url-fetch)
14511 (uri (pypi-uri "pydiff" version))
14512 (sha256
14513 (base32
14514 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14515 (build-system python-build-system)
14516 (home-page "https://github.com/myint/pydiff")
14517 (synopsis "Library to diff two Python files at the bytecode level")
14518 (description
14519 "@code{pydiff} makes it easy to look for actual code changes while
14520 ignoring formatting changes.")
14521 (license license:expat)))
14522
14523 (define-public python2-pydiff
14524 (package-with-python2 python-pydiff))
14525
14526 (define-public python-tqdm
14527 (package
14528 (name "python-tqdm")
14529 (version "4.43.0")
14530 (source
14531 (origin
14532 (method url-fetch)
14533 (uri (pypi-uri "tqdm" version))
14534 (sha256
14535 (base32
14536 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
14537 (build-system python-build-system)
14538 (arguments
14539 '(#:phases (modify-phases %standard-phases
14540 (replace 'check
14541 (lambda* (#:key inputs outputs #:allow-other-keys)
14542 (add-installed-pythonpath inputs outputs)
14543 ;; This invokation is taken from tox.ini.
14544 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
14545 "-d" "-v" "tqdm/"))))))
14546 (native-inputs
14547 `(("python-nose" ,python-nose)))
14548 (home-page "https://github.com/tqdm/tqdm")
14549 (synopsis "Fast, extensible progress meter")
14550 (description
14551 "Make loops show a progress bar on the console by just wrapping any
14552 iterable with @code{|tqdm(iterable)|}. Offers many options to define
14553 design and layout.")
14554 (license (list license:mpl2.0 license:expat))))
14555
14556 (define-public python2-tqdm
14557 (package-with-python2 python-tqdm))
14558
14559 (define-public python-pkginfo
14560 (package
14561 (name "python-pkginfo")
14562 (version "1.4.2")
14563 (source
14564 (origin
14565 (method url-fetch)
14566 (uri (pypi-uri "pkginfo" version))
14567 (sha256
14568 (base32
14569 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14570 (build-system python-build-system)
14571 (arguments
14572 ;; The tests are broken upstream.
14573 '(#:tests? #f))
14574 (home-page
14575 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14576 (synopsis
14577 "Query metadatdata from sdists, bdists, and installed packages")
14578 (description
14579 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14580 source distriubtion (an sdist) or a binary distribution (e.g., created by
14581 running bdist_egg). It can also query the EGG-INFO directory of an installed
14582 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14583 created by running @code{python setup.py develop}).")
14584 (license license:expat)))
14585
14586 (define-public python2-pkginfo
14587 (package-with-python2 python-pkginfo))
14588
14589 (define-public python-twine
14590 (package
14591 (name "python-twine")
14592 (version "1.9.1")
14593 (source
14594 (origin
14595 (method url-fetch)
14596 (uri (pypi-uri "twine" version))
14597 (sha256
14598 (base32
14599 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14600 (build-system python-build-system)
14601 (propagated-inputs
14602 `(("python-tqdm" ,python-tqdm)
14603 ("python-pkginfo" ,python-pkginfo)
14604 ("python-requests" ,python-requests)
14605 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14606 (home-page "https://github.com/pypa/twine")
14607 (synopsis "Collection of utilities for interacting with PyPI")
14608 (description
14609 "@code{twine} currently supports registering projects and uploading
14610 distributions. It authenticates the user over HTTPS, allows them to pre-sign
14611 their files and supports any packaging format (including wheels).")
14612 (license license:asl2.0)))
14613
14614 (define-public python2-twine
14615 (package-with-python2 python-twine))
14616
14617 (define-public python-linecache2
14618 (package
14619 (name "python-linecache2")
14620 (version "1.0.0")
14621 (source
14622 (origin
14623 (method url-fetch)
14624 (uri (pypi-uri "linecache2" version))
14625 (sha256
14626 (base32
14627 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14628 (build-system python-build-system)
14629 (arguments
14630 `(;; The tests depend on unittest2, and our version is a bit too old.
14631 #:tests? #f))
14632 (native-inputs
14633 `(("python-pbr" ,python-pbr-minimal)))
14634 (home-page
14635 "https://github.com/testing-cabal/linecache2")
14636 (synopsis "Backports of the linecache module")
14637 (description
14638 "The linecache module allows one to get any line from any file, while
14639 attempting to optimize internally, using a cache, the common case where many
14640 lines are read from a single file.")
14641 (license license:psfl)))
14642
14643 (define-public python2-linecache2
14644 (package-with-python2 python-linecache2))
14645
14646 (define-public python-traceback2
14647 (package
14648 (name "python-traceback2")
14649 (version "1.4.0")
14650 (source
14651 (origin
14652 (method url-fetch)
14653 (uri (pypi-uri "traceback2" version))
14654 (sha256
14655 (base32
14656 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14657 (build-system python-build-system)
14658 (arguments
14659 `(;; python-traceback2 and python-unittest2 depend on one another.
14660 #:tests? #f))
14661 (native-inputs
14662 `(("python-pbr" ,python-pbr-minimal)))
14663 (propagated-inputs
14664 `(("python-linecache2" ,python-linecache2)))
14665 (home-page
14666 "https://github.com/testing-cabal/traceback2")
14667 (synopsis "Backports of the traceback module")
14668 (description
14669 "This module provides a standard interface to extract, format and print
14670 stack traces of Python programs. It exactly mimics the behavior of the Python
14671 interpreter when it prints a stack trace.")
14672 (license license:psfl)))
14673
14674 (define-public python2-traceback2
14675 (package-with-python2 python-traceback2))
14676
14677 (define-public python-ratelimiter
14678 (package
14679 (name "python-ratelimiter")
14680 (version "1.2.0")
14681 (source
14682 (origin
14683 (method url-fetch)
14684 (uri (pypi-uri "ratelimiter" version))
14685 (sha256
14686 (base32
14687 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14688 (build-system python-build-system)
14689 (arguments
14690 '(#:tests? #f)) ; There are no tests in the pypi archive.
14691 (home-page "https://github.com/RazerM/ratelimiter")
14692 (synopsis "Simple rate limiting object")
14693 (description
14694 "The @code{ratelimiter} module ensures that an operation will not be
14695 executed more than a given number of times during a given period.")
14696 (license license:asl2.0)))
14697
14698 (define-public python2-ratelimiter
14699 (package-with-python2 python-ratelimiter))
14700
14701 (define-public python-dukpy
14702 (package
14703 (name "python-dukpy")
14704 (version "0.3")
14705 (source
14706 (origin
14707 (method git-fetch)
14708 (uri (git-reference
14709 (url "https://github.com/kovidgoyal/dukpy.git")
14710 (commit (string-append "v" version))))
14711 (file-name (git-file-name name version))
14712 (sha256
14713 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14714 (build-system python-build-system)
14715 (home-page "https://github.com/kovidgoyal/dukpy")
14716 (synopsis "Run JavaScript in python")
14717 (description
14718 "dukpy is a JavaScript runtime environment for Python using the duktape
14719 embeddable JavaScript engine.")
14720 ;; Dukpy is licensed under MIT like the embedded duktape library,
14721 ;; with 'errors.c' as GPL3.
14722 (license (list license:expat license:gpl3))))
14723
14724 (define-public python2-dukpy
14725 (package-with-python2 python-dukpy))
14726
14727 (define-public python-jsonrpclib-pelix
14728 (package
14729 (name "python-jsonrpclib-pelix")
14730 (version "0.3.2")
14731 (source
14732 (origin
14733 (method url-fetch)
14734 (uri (pypi-uri "jsonrpclib-pelix" version))
14735 (sha256
14736 (base32
14737 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14738 (build-system python-build-system)
14739 (arguments
14740 `(#:tests? #f)) ; no tests in PyPI tarball
14741 (home-page "https://github.com/tcalmant/jsonrpclib/")
14742 (synopsis "JSON-RPC 2.0 client library for Python")
14743 (description
14744 "This library implements the JSON-RPC v2.0
14745 specification (backwards-compatible) as a client library for Python. This
14746 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14747 services.")
14748 (license license:asl2.0)))
14749
14750 (define-public python2-jsonrpclib-pelix
14751 (package-with-python2 python-jsonrpclib-pelix))
14752
14753 (define-public python-setuptools-scm-git-archive
14754 (package
14755 (name "python-setuptools-scm-git-archive")
14756 (version "1.0")
14757 (source
14758 (origin
14759 (method url-fetch)
14760 (uri (pypi-uri "setuptools_scm_git_archive" version))
14761 (sha256
14762 (base32
14763 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14764 (build-system python-build-system)
14765 (native-inputs
14766 `(("python-pytest" ,python-pytest)))
14767 (propagated-inputs
14768 `(("python-setuptools-scm" ,python-setuptools-scm)))
14769 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14770 (synopsis "Setuptools_scm plugin for git archives")
14771 (description
14772 "The setuptools_scm_git_archive package is a plugin to
14773 setuptools_scm, which supports obtaining versions from git archives that
14774 belong to tagged versions.")
14775 (license license:expat)))
14776
14777 (define-public python2-setuptools-scm-git-archive
14778 (package-with-python2 python-setuptools-scm-git-archive))
14779
14780 (define-public python-setuptools-git
14781 (package
14782 (name "python-setuptools-git")
14783 (version "1.2")
14784 (source
14785 (origin
14786 (method url-fetch)
14787 (uri (pypi-uri "setuptools-git" version))
14788 (sha256
14789 (base32
14790 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14791 (build-system python-build-system)
14792 (arguments
14793 `(#:phases
14794 (modify-phases %standard-phases
14795 ;; This is needed for tests.
14796 (add-after 'unpack 'configure-git
14797 (lambda _
14798 (setenv "HOME" "/tmp")
14799 (invoke "git" "config" "--global" "user.email" "guix")
14800 (invoke "git" "config" "--global" "user.name" "guix")
14801 #t)))))
14802 (native-inputs
14803 `(("git" ,git-minimal)))
14804 (home-page "https://github.com/msabramo/setuptools-git")
14805 (synopsis "Setuptools revision control system plugin for Git")
14806 (description
14807 "This package provides a plugin for Setuptools for revision control with
14808 Git.")
14809 (license license:bsd-3)))
14810
14811 (define-public python-pyclipper
14812 (package
14813 (name "python-pyclipper")
14814 (version "1.1.0.post3")
14815 (source
14816 (origin
14817 (method url-fetch)
14818 (uri (pypi-uri "pyclipper" version ".zip"))
14819 (sha256
14820 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14821 (modules '((guix build utils)))
14822 (snippet
14823 '(begin
14824 ;; This file is generated by Cython.
14825 (delete-file "pyclipper/pyclipper.cpp") #t))))
14826 (build-system python-build-system)
14827 (arguments
14828 `(#:phases
14829 (modify-phases %standard-phases
14830 (add-before 'build 'cythonize-sources
14831 (lambda _
14832 (with-directory-excursion "pyclipper"
14833 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14834 (propagated-inputs
14835 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14836 (native-inputs
14837 `(("python-cython" ,python-cython)
14838 ("python-pytest" ,python-pytest)
14839 ("python-pytest-runner" ,python-pytest-runner)
14840 ("python-unittest2" ,python-unittest2)
14841 ("unzip" ,unzip)))
14842 (home-page "https://github.com/greginvm/pyclipper")
14843 (synopsis "Wrapper for Angus Johnson's Clipper library")
14844 (description
14845 "Pyclipper is a Cython wrapper for the C++ translation of the
14846 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14847 (license license:expat)))
14848
14849 (define-public python2-pyclipper
14850 (package-with-python2 python-pyclipper))
14851
14852 (define-public python2-booleanoperations
14853 (package
14854 (name "python2-booleanoperations")
14855 (version "0.7.1")
14856 (source
14857 (origin
14858 (method url-fetch)
14859 (uri (pypi-uri "booleanOperations" version ".zip"))
14860 (sha256
14861 (base32
14862 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14863 (build-system python-build-system)
14864 (arguments
14865 `(#:python ,python-2))
14866 (native-inputs
14867 `(("unzip" ,unzip)
14868 ("python2-pytest" ,python2-pytest)
14869 ("python2-pytest-runner" ,python2-pytest-runner)))
14870 (propagated-inputs
14871 `(("python-fonttools" ,python2-fonttools)
14872 ("python-pyclipper" ,python2-pyclipper)
14873 ("python-ufolib" ,python2-ufolib)))
14874 (home-page "https://github.com/typemytype/booleanOperations")
14875 (synopsis "Boolean operations on paths")
14876 (description
14877 "BooleanOperations provides a Python library that enables
14878 boolean operations on paths.")
14879 (license license:expat)))
14880
14881 (define-public python-tempdir
14882 (package
14883 (name "python-tempdir")
14884 (version "0.7.1")
14885 (source
14886 (origin
14887 (method url-fetch)
14888 (uri (pypi-uri "tempdir" version))
14889 (sha256
14890 (base32
14891 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14892 (build-system python-build-system)
14893 (home-page "https://pypi.org/project/tempdir/")
14894 (arguments
14895 ;; the package has no tests
14896 '(#:tests? #f))
14897 (synopsis "Python library for managing temporary directories")
14898 (description
14899 "This library manages temporary directories that are automatically
14900 deleted with all their contents when they are no longer needed. It is
14901 particularly convenient for use in tests.")
14902 (license license:expat)))
14903
14904 (define-public python2-tempdir
14905 (package-with-python2 python-tempdir))
14906
14907 (define-public python-activepapers
14908 (package
14909 (name "python-activepapers")
14910 (version "0.2.2")
14911 (source
14912 (origin
14913 (method url-fetch)
14914 (uri (pypi-uri "ActivePapers.Py" version))
14915 (sha256
14916 (base32
14917 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14918 (build-system python-build-system)
14919 (arguments
14920 `(#:modules ((ice-9 ftw)
14921 (srfi srfi-1)
14922 (guix build utils)
14923 (guix build python-build-system))
14924
14925 #:phases
14926 (modify-phases %standard-phases
14927 (add-after 'unpack 'delete-python2-code
14928 (lambda _
14929 (for-each delete-file
14930 '("lib/activepapers/builtins2.py"
14931 "lib/activepapers/standardlib2.py"
14932 "lib/activepapers/utility2.py"))))
14933 (replace 'check
14934 (lambda _
14935 ;; Deactivate the test cases that download files
14936 (setenv "NO_NETWORK_ACCESS" "1")
14937 ;; For some strange reason, some tests fail if nosetests runs all
14938 ;; test modules in a single execution. They pass if each test
14939 ;; module is run individually.
14940 (for-each (lambda (filename)
14941 (invoke "nosetests"
14942 (string-append "tests/" filename)))
14943 (scandir "tests"
14944 (lambda (filename)
14945 (string-suffix? ".py" filename)))))))))
14946 (native-inputs
14947 `(("python-tempdir" ,python-tempdir)
14948 ("python-nose" ,python-nose)))
14949 (propagated-inputs
14950 `(("python-h5py" ,python-h5py)))
14951 (home-page "https://www.activepapers.org/")
14952 (synopsis "Executable papers for scientific computing")
14953 (description
14954 "ActivePapers is a tool for working with executable papers, which
14955 combine data, code, and documentation in single-file packages,
14956 suitable for publication as supplementary material or on repositories
14957 such as figshare or Zenodo.")
14958 (properties `((python2-variant . ,(delay python2-activepapers))))
14959 (license license:bsd-3)))
14960
14961 (define-public python2-activepapers
14962 (let ((base (package-with-python2
14963 (strip-python2-variant python-activepapers))))
14964 (package
14965 (inherit base)
14966 (arguments
14967 (substitute-keyword-arguments (package-arguments base)
14968 ((#:phases phases)
14969 `(modify-phases ,phases
14970 (delete 'delete-python2-code)
14971 (add-after 'unpack 'delete-python3-code
14972 (lambda _
14973 (for-each delete-file
14974 '("lib/activepapers/builtins3.py"
14975 "lib/activepapers/standardlib3.py"
14976 "lib/activepapers/utility3.py")))))))))))
14977
14978 (define-public python-semver
14979 (package
14980 (name "python-semver")
14981 (version "2.9.0")
14982 (source
14983 (origin
14984 (method url-fetch)
14985 (uri (pypi-uri "semver" version))
14986 (sha256
14987 (base32
14988 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14989 (build-system python-build-system)
14990 (native-inputs
14991 `(("python-appdirs" ,python-appdirs)
14992 ("python-distlib" ,python-distlib)
14993 ("python-importlib-metadata" ,python-importlib-metadata)
14994 ("python-filelock" ,python-filelock)
14995 ("python-six" ,python-six)
14996 ("python-tox" ,python-tox)
14997 ("python-virtualenv" ,python-virtualenv)))
14998 (home-page "https://github.com/k-bx/python-semver")
14999 (synopsis "Python helper for Semantic Versioning")
15000 (description "This package provides a Python library for
15001 @url{Semantic Versioning, http://semver.org/}.")
15002 (license license:bsd-3)))
15003
15004 (define-public python2-semver
15005 (package-with-python2 python-semver))
15006
15007 (define-public python-pyro4
15008 (package
15009 (name "python-pyro4")
15010 (version "4.77")
15011 (source
15012 (origin
15013 (method url-fetch)
15014 (uri (pypi-uri "Pyro4" version))
15015 (sha256
15016 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
15017 (build-system python-build-system)
15018 (arguments
15019 '(#:tests? #f)) ;FIXME: Some tests require network access.
15020 (native-inputs
15021 `(("python-cloudpickle" ,python-cloudpickle)
15022 ("python-dill" ,python-dill)
15023 ("python-msgpack" ,python-msgpack)))
15024 (propagated-inputs
15025 `(("python-serpent" ,python-serpent)))
15026 (home-page "https://pyro4.readthedocs.io")
15027 (synopsis "Distributed object middleware for Python")
15028 (description
15029 "Pyro enables you to build applications in which objects can talk to each
15030 other over the network. You can just use normal Python method calls to call
15031 objects on other machines, also known as remote procedure calls (RPC).")
15032 (license license:expat)))
15033
15034 (define-public python2-pyro
15035 (package
15036 (name "python2-pyro")
15037 (version "3.16")
15038 (source
15039 (origin
15040 (method url-fetch)
15041 (uri (pypi-uri "Pyro" version))
15042 (file-name (string-append "Pyro-" version ".tar.gz"))
15043 (sha256
15044 (base32
15045 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15046 (build-system python-build-system)
15047 (arguments
15048 ;; Pyro is not compatible with Python 3
15049 `(#:python ,python-2
15050 ;; Pyro has no test cases for automatic execution
15051 #:tests? #f))
15052 (home-page "http://pythonhosted.org/Pyro/")
15053 (synopsis "Distributed object manager for Python")
15054 (description "Pyro is a Distributed Object Technology system
15055 written in Python that is designed to be easy to use. It resembles
15056 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15057 which is a system and language independent Distributed Object Technology
15058 and has much more to offer than Pyro or RMI. Pyro 3.x is no
15059 longer maintained. New projects should use Pyro4 instead, which
15060 is the new Pyro version that is actively developed.")
15061 (license license:expat)))
15062
15063 (define-public python2-scientific
15064 (package
15065 (name "python2-scientific")
15066 (version "2.9.4")
15067 (source
15068 (origin
15069 (method git-fetch)
15070 (uri (git-reference
15071 (url "https://github.com/khinsen/ScientificPython")
15072 (commit (string-append "rel" version))))
15073 (file-name (git-file-name name version))
15074 (sha256
15075 (base32
15076 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
15077 (build-system python-build-system)
15078 (inputs
15079 `(("netcdf" ,netcdf)))
15080 (propagated-inputs
15081 `(("python-numpy" ,python2-numpy-1.8)
15082 ("python-pyro" ,python2-pyro)))
15083 (arguments
15084 ;; ScientificPython is not compatible with Python 3
15085 `(#:python ,python-2
15086 #:tests? #f ; No test suite
15087 #:phases
15088 (modify-phases %standard-phases
15089 (replace 'build
15090 (lambda* (#:key inputs #:allow-other-keys)
15091 (invoke "python" "setup.py" "build"
15092 (string-append "--netcdf_prefix="
15093 (assoc-ref inputs "netcdf"))))))))
15094 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
15095 (synopsis "Python modules for scientific computing")
15096 (description "ScientificPython is a collection of Python modules that are
15097 useful for scientific computing. Most modules are rather general (Geometry,
15098 physical units, automatic derivatives, ...) whereas others are more
15099 domain-specific (e.g. netCDF and PDB support). The library is currently
15100 not actively maintained and works only with Python 2 and NumPy < 1.9.")
15101 (license license:cecill-c)))
15102
15103 (define-public python2-mmtk
15104 (package
15105 (name "python2-mmtk")
15106 (version "2.7.12")
15107 (source
15108 (origin
15109 (method git-fetch)
15110 (uri (git-reference
15111 (url "https://github.com/khinsen/MMTK")
15112 (commit (string-append "rel" version))))
15113 (file-name (git-file-name name version))
15114 (sha256
15115 (base32
15116 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
15117 (build-system python-build-system)
15118 (native-inputs
15119 `(("netcdf" ,netcdf)))
15120 (propagated-inputs
15121 `(("python-scientific" ,python2-scientific)
15122 ("python-tkinter" ,python-2 "tk")))
15123 (arguments
15124 `(#:python ,python-2
15125 #:tests? #f
15126 #:phases
15127 (modify-phases %standard-phases
15128 (add-before 'build 'includes-from-scientific
15129 (lambda* (#:key inputs #:allow-other-keys)
15130 (mkdir-p "Include/Scientific")
15131 (copy-recursively
15132 (string-append
15133 (assoc-ref inputs "python-scientific")
15134 "/include/python2.7/Scientific")
15135 "Include/Scientific"))))))
15136 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15137 (synopsis "Python library for molecular simulation")
15138 (description "MMTK is a library for molecular simulations with an emphasis
15139 on biomolecules. It provides widely used methods such as Molecular Dynamics
15140 and normal mode analysis, but also basic routines for implementing new methods
15141 for simulation and analysis. The library is currently not actively maintained
15142 and works only with Python 2 and NumPy < 1.9.")
15143 (license license:cecill-c)))
15144
15145 (define-public python-phonenumbers
15146 (package
15147 (name "python-phonenumbers")
15148 (version "8.9.1")
15149 (source
15150 (origin
15151 (method url-fetch)
15152 (uri (pypi-uri "phonenumbers" version))
15153 (sha256
15154 (base32
15155 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15156 (build-system python-build-system)
15157 (home-page
15158 "https://github.com/daviddrysdale/python-phonenumbers")
15159 (synopsis
15160 "Python library for dealing with international phone numbers")
15161 (description
15162 "This package provides a Python port of Google's libphonenumber library.")
15163 (license license:asl2.0)))
15164
15165 (define-public python2-phonenumbers
15166 (package-with-python2 python-phonenumbers))
15167
15168 (define-public python-send2trash
15169 (package
15170 (name "python-send2trash")
15171 (version "1.5.0")
15172 (source
15173 (origin (method git-fetch)
15174 ;; Source tarball on PyPI doesn't include tests.
15175 (uri (git-reference
15176 (url "https://github.com/hsoft/send2trash.git")
15177 (commit version)))
15178 (file-name (git-file-name name version))
15179 (sha256
15180 (base32
15181 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
15182 (build-system python-build-system)
15183 (arguments
15184 '(#:phases
15185 (modify-phases %standard-phases
15186 (add-before 'check 'pre-check
15187 (lambda _
15188 (mkdir-p "/tmp/foo")
15189 (setenv "HOME" "/tmp/foo")
15190 #t)))))
15191 (home-page "https://github.com/hsoft/send2trash")
15192 (synopsis "Send files to the user's @file{~/Trash} directory")
15193 (description "This package provides a Python library to send files to the
15194 user's @file{~/Trash} directory.")
15195 (properties `((python2-variant . ,(delay python2-send2trash))))
15196 (license license:bsd-3)))
15197
15198 (define-public python2-send2trash
15199 (package
15200 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
15201 (arguments
15202 (substitute-keyword-arguments (package-arguments python-send2trash)
15203 ((#:phases phases)
15204 `(modify-phases ,phases
15205 (add-before 'check 'setenv
15206 (lambda _
15207 (setenv "PYTHONPATH"
15208 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
15209 #t))))))))
15210
15211 (define-public python-yapf
15212 (package
15213 (name "python-yapf")
15214 (version "0.29.0")
15215 (source
15216 (origin
15217 (method url-fetch)
15218 (uri (pypi-uri "yapf" version))
15219 (sha256
15220 (base32
15221 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
15222 (build-system python-build-system)
15223 (home-page "https://github.com/google/yapf")
15224 (synopsis "Formatter for Python code")
15225 (description "YAPF is a formatter for Python code. It's based off of
15226 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15227 takes the code and reformats it to the best formatting that conforms to the
15228 style guide, even if the original code didn't violate the style guide.")
15229 (license license:asl2.0)))
15230
15231 (define-public python2-yapf
15232 (package-with-python2 python-yapf))
15233
15234 (define-public python-gyp
15235 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
15236 (revision "0"))
15237 (package
15238 (name "python-gyp")
15239 ;; Google does not release versions,
15240 ;; based on second most recent commit date.
15241 (version (git-version "0.0.0" revision commit))
15242 (source
15243 (origin
15244 ;; Google does not release tarballs,
15245 ;; git checkout is needed.
15246 (method git-fetch)
15247 (uri (git-reference
15248 (url "https://chromium.googlesource.com/external/gyp")
15249 (commit commit)))
15250 (file-name (git-file-name name version))
15251 (sha256
15252 (base32
15253 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
15254 (build-system python-build-system)
15255 (home-page "https://gyp.gsrc.io/")
15256 (synopsis "GYP is a Meta-Build system")
15257 (description
15258 "GYP builds build systems for large, cross platform applications.
15259 It can be used to generate XCode projects, Visual Studio projects, Ninja build
15260 files, and Makefiles.")
15261 (license license:bsd-3))))
15262
15263 (define-public python2-gyp
15264 (package-with-python2 python-gyp))
15265
15266 (define-public python-whatever
15267 (package
15268 (name "python-whatever")
15269 (version "0.6")
15270 (source
15271 (origin
15272 (method git-fetch)
15273 (uri (git-reference
15274 (url "https://github.com/Suor/whatever")
15275 (commit version)))
15276 (file-name (git-file-name name version))
15277 (sha256
15278 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
15279 (build-system python-build-system)
15280 (arguments
15281 `(#:phases
15282 (modify-phases %standard-phases
15283 (replace 'check
15284 (lambda _
15285 (invoke "py.test"))))))
15286 (native-inputs
15287 `(("python-pytest" ,python-pytest)))
15288 (home-page "http://github.com/Suor/whatever")
15289 (synopsis "Make anonymous functions by partial application of operators")
15290 (description "@code{whatever} provides an easy way to make anonymous
15291 functions by partial application of operators.")
15292 (license license:bsd-3)))
15293
15294 (define-public python2-whatever
15295 (package-with-python2 python-whatever))
15296
15297 (define-public python-funcy
15298 (package
15299 (name "python-funcy")
15300 (version "1.11")
15301 (source
15302 (origin
15303 (method git-fetch)
15304 (uri (git-reference
15305 (url "https://github.com/Suor/funcy.git")
15306 (commit version)))
15307 (sha256
15308 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
15309 (file-name (git-file-name name version))))
15310 (build-system python-build-system)
15311 (arguments
15312 `(#:phases
15313 (modify-phases %standard-phases
15314 (replace 'check
15315 (lambda _
15316 (invoke "py.test"))))))
15317 (native-inputs
15318 `(("python-pytest" ,python-pytest)
15319 ("python-whatever" ,python-whatever)))
15320 (home-page "http://github.com/Suor/funcy")
15321 (synopsis "Functional tools")
15322 (description "@code{funcy} is a library that provides functional tools.
15323 Examples are:
15324 @enumerate
15325 @item merge - Merges collections of the same type
15326 @item walk - Type-preserving map
15327 @item select - Selects a part of a collection
15328 @item take - Takes the first n items of a collection
15329 @item first - Takes the first item of a collection
15330 @item remove - Predicated-removes items of a collection
15331 @item concat - Concatenates two collections
15332 @item flatten - Flattens a collection with subcollections
15333 @item distinct - Returns only distinct items
15334 @item split - Predicated-splits a collection
15335 @item split_at - Splits a collection at a given item
15336 @item group_by - Groups items by group
15337 @item pairwise - Pairs off adjacent items
15338 @item partial - Partially-applies a function
15339 @item curry - Curries a function
15340 @item compose - Composes functions
15341 @item complement - Complements a predicate
15342 @item all_fn - \"all\" with predicate
15343 @end enumerate")
15344 (license license:bsd-3)))
15345
15346 (define-public python2-funcy
15347 (package-with-python2 python-funcy))
15348
15349 (define-public python-isoweek
15350 (package
15351 (name "python-isoweek")
15352 (version "1.3.3")
15353 (source
15354 (origin
15355 (method url-fetch)
15356 (uri (pypi-uri "isoweek" version))
15357 (sha256
15358 (base32
15359 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
15360 (build-system python-build-system)
15361 (home-page "https://github.com/gisle/isoweek")
15362 (synopsis "Objects representing a week")
15363 (description "The @code{isoweek} module provide the class Week that
15364 implements the week definition of ISO 8601. This standard also defines
15365 a notation for identifying weeks; yyyyWww (where the W is a literal).
15366 Week instances stringify to this form.")
15367 (license license:bsd-3)))
15368
15369 (define-public python2-isoweek
15370 (package-with-python2 python-isoweek))
15371
15372 (define-public python-tokenize-rt
15373 (package
15374 (name "python-tokenize-rt")
15375 (version "2.0.1")
15376 (source
15377 (origin
15378 (method url-fetch)
15379 (uri (pypi-uri "tokenize-rt" version))
15380 (sha256
15381 (base32
15382 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15383 (build-system python-build-system)
15384 (home-page "https://github.com/asottile/tokenize-rt")
15385 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15386 (description
15387 "This Python library is a wrapper around @code{tokenize} from the Python
15388 standard library. It provides two additional tokens @code{ESCAPED_NL} and
15389 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15390 and @code{tokens_to_src} to roundtrip.")
15391 (license license:expat)))
15392
15393 (define-public python-future-fstrings
15394 (package
15395 (name "python-future-fstrings")
15396 (version "0.4.1")
15397 (source
15398 (origin
15399 (method url-fetch)
15400 (uri (pypi-uri "future_fstrings" version))
15401 (sha256
15402 (base32
15403 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15404 (build-system python-build-system)
15405 (propagated-inputs
15406 `(("python-tokenize-rt" ,python-tokenize-rt)))
15407 (home-page "https://github.com/asottile/future-fstrings")
15408 (synopsis "Backport of fstrings to Python < 3.6")
15409 (description
15410 "This package provides a UTF-8 compatible encoding
15411 @code{future_fstrings}, which performs source manipulation. It decodes the
15412 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15413 @code{f} strings.")
15414 (license license:expat)))
15415
15416 (define-public python-typed-ast
15417 (package
15418 (name "python-typed-ast")
15419 (version "1.4.0")
15420 (source
15421 (origin
15422 (method git-fetch)
15423 (uri (git-reference
15424 (url "https://github.com/python/typed_ast.git")
15425 (commit version)))
15426 (sha256
15427 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15428 (file-name (git-file-name name version))))
15429 (build-system python-build-system)
15430 (arguments
15431 `(#:modules ((guix build utils)
15432 (guix build python-build-system)
15433 (ice-9 ftw)
15434 (srfi srfi-1)
15435 (srfi srfi-26))
15436 #:phases
15437 (modify-phases %standard-phases
15438 (replace 'check
15439 (lambda _
15440 (let ((cwd (getcwd)))
15441 (setenv "PYTHONPATH"
15442 (string-append cwd "/build/"
15443 (find (cut string-prefix? "lib" <>)
15444 (scandir (string-append cwd "/build")))
15445 ":"
15446 (getenv "PYTHONPATH"))))
15447 (invoke "pytest")
15448 #t)))))
15449 (native-inputs `(("python-pytest" ,python-pytest)))
15450 (home-page "https://github.com/python/typed_ast")
15451 (synopsis "Fork of Python @code{ast} modules with type comment support")
15452 (description "This package provides a parser similar to the standard
15453 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15454 include PEP 484 type comments and are independent of the version of Python
15455 under which they are run. The @code{typed_ast} parsers produce the standard
15456 Python AST (plus type comments), and are both fast and correct, as they are
15457 based on the CPython 2.7 and 3.7 parsers.")
15458 ;; See the file "LICENSE" for the details.
15459 (license (list license:psfl
15460 license:asl2.0
15461 license:expat)))) ;ast27/Parser/spark.py
15462
15463 (define-public python-typing
15464 (package
15465 (name "python-typing")
15466 (version "3.6.6")
15467 (source
15468 (origin
15469 (method url-fetch)
15470 (uri (pypi-uri "typing" version))
15471 (sha256
15472 (base32
15473 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15474 (build-system python-build-system)
15475 (home-page "https://docs.python.org/3/library/typing.html")
15476 (synopsis "Type hints for Python")
15477 (description "This is a backport of the standard library @code{typing}
15478 module to Python versions older than 3.5. Typing defines a standard notation
15479 for Python function and variable type annotations. The notation can be used
15480 for documenting code in a concise, standard format, and it has been designed
15481 to also be used by static and runtime type checkers, static analyzers, IDEs
15482 and other tools.")
15483 (license license:psfl)))
15484
15485 (define-public python2-typing
15486 (package-with-python2 python-typing))
15487
15488 (define-public python-typing-extensions
15489 (package
15490 (name "python-typing-extensions")
15491 (version "3.7.2")
15492 (source
15493 (origin
15494 (method url-fetch)
15495 (uri (pypi-uri "typing_extensions" version))
15496 (sha256
15497 (base32
15498 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15499 (build-system python-build-system)
15500 (home-page
15501 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15502 (synopsis "Experimental type hints for Python")
15503 (description
15504 "The typing_extensions module contains additional @code{typing} hints not
15505 yet present in the of the @code{typing} standard library.
15506 Included are implementations of:
15507 @enumerate
15508 @item ClassVar
15509 @item ContextManager
15510 @item Counter
15511 @item DefaultDict
15512 @item Deque
15513 @item NewType
15514 @item NoReturn
15515 @item overload
15516 @item Protocol
15517 @item runtime
15518 @item Text
15519 @item Type
15520 @item TYPE_CHECKING
15521 @item AsyncGenerator
15522 @end enumerate\n")
15523 (license license:psfl)))
15524
15525 (define-public bpython
15526 (package
15527 (name "bpython")
15528 (version "0.18")
15529 (source
15530 (origin
15531 (method url-fetch)
15532 (uri (pypi-uri "bpython" version))
15533 (sha256
15534 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
15535 (build-system python-build-system)
15536 (arguments
15537 `(#:phases
15538 (modify-phases %standard-phases
15539 (add-after 'unpack 'remove-failing-test
15540 (lambda _
15541 ;; Remove failing test. FIXME: make it pass
15542 (delete-file "bpython/test/test_args.py")
15543 #t))
15544 (add-after 'wrap 'add-aliases
15545 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15546 (lambda* (#:key outputs #:allow-other-keys)
15547 (let ((out (assoc-ref outputs "out")))
15548 (for-each
15549 (lambda (old new)
15550 (symlink old (string-append out "/bin/" new)))
15551 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15552 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15553 #t)))))
15554 (propagated-inputs
15555 `(("python-pygments" ,python-pygments)
15556 ("python-requests" ,python-requests)
15557 ("python-babel" ,python-babel) ; optional, for internationalization
15558 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15559 ("python-greenlet" ,python-greenlet)
15560 ("python-urwid" ,python-urwid) ; for bpython-urwid only
15561 ("python-six" ,python-six)))
15562 (native-inputs
15563 `(("python-sphinx" ,python-sphinx)
15564 ("python-mock" ,python-mock)))
15565 (home-page "https://bpython-interpreter.org/")
15566 (synopsis "Fancy interface to the Python interpreter")
15567 (description "Bpython is a fancy interface to the Python
15568 interpreter. bpython's main features are
15569
15570 @enumerate
15571 @item in-line syntax highlighting,
15572 @item readline-like autocomplete with suggestions displayed as you type,
15573 @item expected parameter list for any Python function,
15574 @item \"rewind\" function to pop the last line of code from memory and
15575 re-evaluate,
15576 @item send the code you've entered off to a pastebin,
15577 @item save the code you've entered to a file, and
15578 @item auto-indentation.
15579 @end enumerate")
15580 (license license:expat)))
15581
15582 (define-public bpython2
15583 (let ((base (package-with-python2
15584 (strip-python2-variant bpython))))
15585 (package (inherit base)
15586 (name "bpython2")
15587 (arguments
15588 `(#:python ,python-2
15589 #:phases
15590 (modify-phases %standard-phases
15591 (add-after 'unpack 'remove-failing-test
15592 (lambda _
15593 ;; Remove failing test. FIXME: make it pass
15594 (delete-file "bpython/test/test_args.py")
15595 ;; Disable failing test-cases (renaming inhibits they are
15596 ;; discovered)
15597 (substitute* "bpython/test/test_curtsies_repl.py"
15598 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15599 (string-append a "xxx_off_" b))
15600 (("^(\\s*def )(test_complex\\W)" _ a b)
15601 (string-append a "xxx_off_" b)))
15602 #t))
15603 (add-before 'build 'rename-scripts
15604 ;; rename the scripts to bypthon2, bpdb2, etc.
15605 (lambda _
15606 (substitute* "setup.py"
15607 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15608 (string-append name "2" rest "\n"))
15609 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15610 (string-append name "2" (or sub "") rest "\n")))
15611 #t))))))))
15612
15613 (define-public python-pyinotify
15614 (package
15615 (name "python-pyinotify")
15616 (version "0.9.6")
15617 (source (origin
15618 (method url-fetch)
15619 (uri (pypi-uri "pyinotify" version))
15620 (sha256
15621 (base32
15622 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15623 (build-system python-build-system)
15624 (arguments `(#:tests? #f)) ;no tests
15625 (home-page "https://github.com/seb-m/pyinotify")
15626 (synopsis "Python library for monitoring inotify events")
15627 (description
15628 "@code{pyinotify} provides a Python interface for monitoring
15629 file system events on Linux.")
15630 (license license:expat)))
15631
15632 (define-public python2-pyinotify
15633 (package-with-python2 python-pyinotify))
15634
15635 ;; Ada parser uses this version.
15636 (define-public python2-quex-0.67.3
15637 (package
15638 (name "python2-quex")
15639 (version "0.67.3")
15640 (source
15641 (origin
15642 (method url-fetch)
15643 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15644 (version-major+minor version)
15645 "/quex-" version ".zip"))
15646 (sha256
15647 (base32
15648 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15649 (build-system python-build-system)
15650 (native-inputs
15651 `(("unzip" ,unzip)))
15652 (arguments
15653 `(#:python ,python-2
15654 #:tests? #f
15655 #:phases
15656 (modify-phases %standard-phases
15657 (delete 'configure)
15658 (delete 'build)
15659 (replace 'install
15660 (lambda* (#:key outputs #:allow-other-keys)
15661 (let* ((out (assoc-ref outputs "out"))
15662 (share/quex (string-append out "/share/quex"))
15663 (bin (string-append out "/bin")))
15664 (copy-recursively "." share/quex)
15665 (mkdir-p bin)
15666 (symlink (string-append share/quex "/quex-exe.py")
15667 (string-append bin "/quex"))
15668 #t))))))
15669 (native-search-paths
15670 (list (search-path-specification
15671 (variable "QUEX_PATH")
15672 (files '("share/quex")))))
15673 (home-page "http://quex.sourceforge.net/")
15674 (synopsis "Lexical analyzer generator in Python")
15675 (description "@code{quex} is a lexical analyzer generator in Python.")
15676 (license license:lgpl2.1+))) ; Non-military
15677
15678 (define-public python2-quex
15679 (package (inherit python2-quex-0.67.3)
15680 (name "python2-quex")
15681 (version "0.68.1")
15682 (source
15683 (origin
15684 (method url-fetch)
15685 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15686 (sha256
15687 (base32
15688 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15689 (file-name (string-append name "-" version ".tar.gz"))))))
15690
15691 (define-public python-more-itertools
15692 (package
15693 (name "python-more-itertools")
15694 (version "7.1.0")
15695 (source
15696 (origin
15697 (method url-fetch)
15698 (uri (pypi-uri "more-itertools" version))
15699 (sha256
15700 (base32
15701 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15702 (build-system python-build-system)
15703 (home-page "https://github.com/erikrose/more-itertools")
15704 (synopsis "More routines for operating on iterables, beyond itertools")
15705 (description "Python's built-in @code{itertools} module implements a
15706 number of iterator building blocks inspired by constructs from APL, Haskell,
15707 and SML. @code{more-itertools} includes additional building blocks for
15708 working with iterables.")
15709 (properties `((python2-variant . ,(delay python2-more-itertools))))
15710 (license license:expat)))
15711
15712 ;; The 5.x series are the last versions supporting Python 2.7.
15713 (define-public python2-more-itertools
15714 (package
15715 (inherit python-more-itertools)
15716 (name "python2-more-itertools")
15717 (version "5.0.0")
15718 (source (origin
15719 (method url-fetch)
15720 (uri (pypi-uri "more-itertools" version))
15721 (sha256
15722 (base32
15723 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15724 (arguments
15725 `(#:python ,python2-minimal))
15726 (propagated-inputs
15727 `(("python2-six" ,python2-six-bootstrap)))))
15728
15729 (define-public python-latexcodec
15730 (package
15731 (name "python-latexcodec")
15732 (version "1.0.7")
15733 (source
15734 (origin
15735 (method url-fetch)
15736 (uri (pypi-uri "latexcodec" version))
15737 (sha256
15738 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15739 (build-system python-build-system)
15740 (inputs
15741 `(("python-six" ,python-six)))
15742 (home-page "https://readthedocs.org/projects/latexcodec/")
15743 (synopsis "Work with LaTeX code in Python")
15744 (description "Lexer and codec to work with LaTeX code in Python.")
15745 (license license:expat)))
15746
15747 (define-public python-pybtex
15748 (package
15749 (name "python-pybtex")
15750 (version "0.22.2")
15751 (source
15752 (origin
15753 (method url-fetch)
15754 (uri (pypi-uri "pybtex" version))
15755 (sha256
15756 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15757 (build-system python-build-system)
15758 (native-inputs
15759 `(("python-nose" ,python-nose)))
15760 (inputs
15761 `(("python-latexcodec" ,python-latexcodec)
15762 ("python-pyyaml" ,python-pyyaml)
15763 ("python-six" ,python-six)))
15764 (arguments
15765 `(#:test-target "nosetests"))
15766 (home-page "https://pybtex.org/")
15767 (synopsis "BibTeX-compatible bibliography processor")
15768 (description "Pybtex is a BibTeX-compatible bibliography processor written
15769 in Python. You can simply type pybtex instead of bibtex.")
15770 (license license:expat)))
15771
15772 (define-public python-onetimepass
15773 (package
15774 (name "python-onetimepass")
15775 (version "1.0.1")
15776 (source
15777 (origin
15778 (method url-fetch)
15779 (uri (pypi-uri "onetimepass" version))
15780 (sha256
15781 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15782 (build-system python-build-system)
15783 (propagated-inputs `(("python-six" ,python-six)))
15784 (home-page "https://github.com/tadeck/onetimepass/")
15785 (synopsis "One-time password library")
15786 (description "Python one-time password library for HMAC-based (HOTP) and
15787 time-based (TOTP) passwords.")
15788 (license license:expat)))
15789
15790 (define-public python-parso
15791 (package
15792 (name "python-parso")
15793 (version "0.6.2")
15794 (source
15795 (origin
15796 (method url-fetch)
15797 (uri (pypi-uri "parso" version))
15798 (sha256
15799 (base32
15800 "0mr1j4ijqnrihz1yap34g6i8vjldg5lz814sz4v0d8pbqvh5jmhc"))))
15801 (native-inputs
15802 `(("python-pytest" ,python-pytest)))
15803 (build-system python-build-system)
15804 (arguments
15805 `(#:phases (modify-phases %standard-phases
15806 (replace 'check
15807 (lambda _ (invoke "pytest" "-vv"))))))
15808 (home-page "https://github.com/davidhalter/parso")
15809 (synopsis "Python Parser")
15810 (description "Parso is a Python parser that supports error recovery and
15811 round-trip parsing for different Python versions (in multiple Python versions).
15812 Parso is also able to list multiple syntax errors in your Python file.")
15813 (license license:expat)))
15814
15815 (define-public python2-parso
15816 (package-with-python2 python-parso))
15817
15818 (define-public python-async-generator
15819 (package
15820 (name "python-async-generator")
15821 (version "1.10")
15822 (source
15823 (origin
15824 (method url-fetch)
15825 (uri (pypi-uri "async_generator" version))
15826 (sha256
15827 (base32
15828 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15829 (build-system python-build-system)
15830 (native-inputs
15831 `(("python-pytest" ,python-pytest)))
15832 (home-page "https://github.com/python-trio/async_generator")
15833 (synopsis "Async generators and context managers for Python 3.5+")
15834 (description "@code{async_generator} back-ports Python 3.6's native async
15835 generators and Python 3.7's context managers into Python 3.5.")
15836 ;; Dual licensed.
15837 (license (list license:expat license:asl2.0))))
15838
15839 (define-public python-async-timeout
15840 (package
15841 (name "python-async-timeout")
15842 (version "3.0.1")
15843 (source
15844 (origin
15845 (method url-fetch)
15846 (uri (pypi-uri "async-timeout" version))
15847 (sha256
15848 (base32
15849 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15850 (build-system python-build-system)
15851 (home-page "https://github.com/aio-libs/async_timeout/")
15852 (synopsis "Timeout context manager for asyncio programs")
15853 (description "@code{async-timeout} provides a timeout timeout context
15854 manager compatible with @code{asyncio}.")
15855 (license license:asl2.0)))
15856
15857 (define-public python-glob2
15858 (package
15859 (name "python-glob2")
15860 (version "0.7")
15861 (source
15862 (origin
15863 (method git-fetch)
15864 (uri (git-reference
15865 (url "https://github.com/miracle2k/python-glob2.git")
15866 (commit (string-append "v" version))))
15867 (file-name (git-file-name name version))
15868 (sha256
15869 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15870 (build-system python-build-system)
15871 (home-page "https://github.com/miracle2k/python-glob2/")
15872 (synopsis "Extended Version of the python buildin glob module")
15873 (description "This is an extended version of the Python
15874 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15875 adds:
15876
15877 @itemize
15878 @item The ability to capture the text matched by glob patterns, and return
15879 those matches alongside the file names.
15880 @item A recursive @code{**} globbing syntax, akin for example to the
15881 @code{globstar} option of Bash.
15882 @item The ability to replace the file system functions used, in order to glob
15883 on virtual file systems.
15884 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15885 @end itemize
15886
15887 Glob2 currently based on the glob code from Python 3.3.1.")
15888 (license license:bsd-2)))
15889
15890 (define-public python2-glob2
15891 (package-with-python2 python-glob2))
15892
15893 (define-public python-gipc
15894 (package
15895 (name "python-gipc")
15896 (version "0.6.0")
15897 (source
15898 (origin
15899 (method url-fetch)
15900 (uri (pypi-uri "gipc" version ".zip"))
15901 (sha256
15902 (base32
15903 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15904 (build-system python-build-system)
15905 (native-inputs
15906 `(("unzip" ,unzip)))
15907 (propagated-inputs
15908 `(("python-gevent" ,python-gevent)))
15909 (home-page "https://gehrcke.de/gipc/")
15910 (synopsis "Child process management in the context of gevent")
15911 (description "Usage of Python's multiprocessing package in a
15912 gevent-powered application may raise problems. With @code{gipc},
15913 process-based child processes can safely be created anywhere within a
15914 gevent-powered application.")
15915 (license license:expat)))
15916
15917 (define-public python2-gipc
15918 (package-with-python2 python-gipc))
15919
15920 (define-public python-fusepy
15921 (package
15922 (name "python-fusepy")
15923 (version "2.0.4")
15924 (source
15925 (origin
15926 (method url-fetch)
15927 (uri (pypi-uri "fusepy" version))
15928 (sha256
15929 (base32
15930 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15931 (build-system python-build-system)
15932 (arguments
15933 `(#:phases
15934 (modify-phases %standard-phases
15935 (add-before 'build 'set-library-file-name
15936 (lambda* (#:key inputs #:allow-other-keys)
15937 (let ((fuse (assoc-ref inputs "fuse")))
15938 (substitute* "fuse.py"
15939 (("find_library\\('fuse'\\)")
15940 (string-append "'" fuse "/lib/libfuse.so'")))
15941 #t))))))
15942 (propagated-inputs
15943 `(("fuse" ,fuse)))
15944 (home-page "https://github.com/fusepy/fusepy")
15945 (synopsis "Simple ctypes bindings for FUSE")
15946 (description "Python module that provides a simple interface to FUSE and
15947 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15948 (license license:isc)))
15949
15950 (define-public python2-fusepy
15951 (package-with-python2 python-fusepy))
15952
15953 (define-public python2-gdrivefs
15954 (package
15955 (name "python2-gdrivefs")
15956 (version "0.14.9")
15957 (source
15958 (origin
15959 (method url-fetch)
15960 (uri (pypi-uri "gdrivefs" version))
15961 (sha256
15962 (base32
15963 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15964 (build-system python-build-system)
15965 (arguments
15966 `(#:python ,python-2
15967 #:phases
15968 (modify-phases %standard-phases
15969 (add-before 'build 'patch-setup-py
15970 (lambda _
15971 ;; Update requirements from dependency==version
15972 ;; to dependency>=version
15973 (substitute* "gdrivefs/resources/requirements.txt"
15974 (("==") ">="))
15975 #t)))))
15976 (native-inputs
15977 `(("python2-gipc" ,python2-gipc)
15978 ("python2-gevent" ,python2-gevent)
15979 ("python2-greenlet" ,python2-greenlet)
15980 ("python2-httplib2" ,python2-httplib2)
15981 ("python2-uritemplate" ,python2-uritemplate)
15982 ("python2-oauth2client" ,python2-oauth2client)
15983 ("python2-six" ,python2-six)))
15984 (propagated-inputs
15985 `(("python2-dateutil" ,python2-dateutil)
15986 ("python2-fusepy" ,python2-fusepy)
15987 ("python2-google-api-client" ,python2-google-api-client)))
15988 (home-page "https://github.com/dsoprea/GDriveFS")
15989 (synopsis "Mount Google Drive as a local file system")
15990 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15991 under Python 2.7.")
15992 (license license:gpl2)))
15993
15994 (define-public pybind11
15995 (package
15996 (name "pybind11")
15997 (version "2.4.3")
15998 (source (origin
15999 (method git-fetch)
16000 (uri (git-reference
16001 (url "https://github.com/pybind/pybind11.git")
16002 (commit (string-append "v" version))))
16003 (sha256
16004 (base32
16005 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
16006 (file-name (git-file-name name version))))
16007 (build-system cmake-build-system)
16008 (native-inputs
16009 `(("python" ,python-wrapper)
16010
16011 ;; The following dependencies are used for tests.
16012 ("python-pytest" ,python-pytest)
16013 ("catch" ,catch-framework2-1)
16014 ("eigen" ,eigen)))
16015 (arguments
16016 `(#:configure-flags
16017 (list (string-append "-DCATCH_INCLUDE_DIR="
16018 (assoc-ref %build-inputs "catch")
16019 "/include/catch"))
16020
16021 #:phases (modify-phases %standard-phases
16022 (add-after 'install 'install-python
16023 (lambda* (#:key outputs #:allow-other-keys)
16024 (let ((out (assoc-ref outputs "out")))
16025 (with-directory-excursion "../source"
16026 (setenv "PYBIND11_USE_CMAKE" "yes")
16027 (invoke "python" "setup.py" "install"
16028 "--single-version-externally-managed"
16029 "--root=/"
16030 (string-append "--prefix=" out)))))))
16031
16032 #:test-target "check"))
16033 (home-page "https://github.com/pybind/pybind11/")
16034 (synopsis "Seamless operability between C++11 and Python")
16035 (description
16036 "@code{pybind11} is a lightweight header-only library that exposes C++
16037 types in Python and vice versa, mainly to create Python bindings of existing
16038 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
16039 library: to minimize boilerplate code in traditional extension modules by
16040 inferring type information using compile-time introspection.")
16041 (license license:bsd-3)))
16042
16043 (define-public python-fasteners
16044 (package
16045 (name "python-fasteners")
16046 (version "0.14.1")
16047 (source
16048 (origin
16049 (method url-fetch)
16050 (uri (pypi-uri "fasteners" version))
16051 (sha256
16052 (base32
16053 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16054 (build-system python-build-system)
16055 (propagated-inputs
16056 `(("python-monotonic" ,python-monotonic)
16057 ("python-six" ,python-six)
16058 ("python-testtools" ,python-testtools)))
16059 (home-page "https://github.com/harlowja/fasteners")
16060 (synopsis "Python package that provides useful locks")
16061 (description
16062 "This package provides a Python program that provides following locks:
16063
16064 @itemize
16065 @item Locking decorator
16066 @item Reader-writer locks
16067 @item Inter-process locks
16068 @item Generic helpers
16069 @end itemize\n")
16070 (properties `((python2-variant . ,(delay python2-fasteners))))
16071 (license license:asl2.0)))
16072
16073 (define-public python2-fasteners
16074 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16075 (package
16076 (inherit base)
16077 (propagated-inputs
16078 `(("python2-futures" ,python2-futures)
16079 ,@(package-propagated-inputs base))))))
16080
16081 (define-public python-requests-file
16082 (package
16083 (name "python-requests-file")
16084 (version "1.4.3")
16085 (source
16086 (origin
16087 (method url-fetch)
16088 (uri (pypi-uri "requests-file" version))
16089 (sha256
16090 (base32
16091 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16092 (build-system python-build-system)
16093 (propagated-inputs
16094 `(("python-requests" ,python-requests)
16095 ("python-six" ,python-six)))
16096 (home-page
16097 "https://github.com/dashea/requests-file")
16098 (synopsis "File transport adapter for Requests")
16099 (description
16100 "Requests-File is a transport adapter for use with the Requests Python
16101 library to allow local file system access via @code{file://} URLs.")
16102 (license license:asl2.0)))
16103
16104 (define-public python2-requests-file
16105 (package-with-python2 python-requests-file))
16106
16107 (define-public python-tldextract
16108 (package
16109 (name "python-tldextract")
16110 (version "2.2.0")
16111 (source
16112 (origin
16113 (method url-fetch)
16114 (uri (pypi-uri "tldextract" version))
16115 (sha256
16116 (base32
16117 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16118 (build-system python-build-system)
16119 (native-inputs
16120 `(("python-pytest" ,python-pytest)
16121 ("python-responses" ,python-responses)))
16122 (propagated-inputs
16123 `(("python-idna" ,python-idna)
16124 ("python-requests" ,python-requests)
16125 ("python-requests-file" ,python-requests-file)))
16126 (home-page
16127 "https://github.com/john-kurkowski/tldextract")
16128 (synopsis
16129 "Separate the TLD from the registered domain and subdomains of a URL")
16130 (description
16131 "TLDExtract accurately separates the TLD from the registered domain and
16132 subdomains of a URL, using the Public Suffix List. By default, this includes
16133 the public ICANN TLDs and their exceptions. It can optionally support the
16134 Public Suffix List's private domains as well.")
16135 (license license:bsd-3)))
16136
16137 (define-public python2-tldextract
16138 (package-with-python2 python-tldextract))
16139
16140 (define-public python-pynamecheap
16141 (package
16142 (name "python-pynamecheap")
16143 (version "0.0.3")
16144 (source
16145 (origin
16146 (method url-fetch)
16147 (uri (pypi-uri "PyNamecheap" version))
16148 (sha256
16149 (base32
16150 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16151 (build-system python-build-system)
16152 (propagated-inputs
16153 `(("python-requests" ,python-requests)))
16154 (home-page
16155 "https://github.com/Bemmu/PyNamecheap")
16156 (synopsis
16157 "Namecheap API client in Python")
16158 (description
16159 "PyNamecheap is a Namecheap API client in Python.")
16160 (license license:expat)))
16161
16162 (define-public python2-pynamecheap
16163 (package-with-python2 python-pynamecheap))
16164
16165 (define-public python-dns-lexicon
16166 (package
16167 (name "python-dns-lexicon")
16168 (version "2.4.0")
16169 (source
16170 (origin
16171 (method url-fetch)
16172 (uri (pypi-uri "dns-lexicon" version))
16173 (sha256
16174 (base32
16175 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16176 (build-system python-build-system)
16177 (arguments
16178 `(#:tests? #f)) ;requires internet access
16179 (propagated-inputs
16180 `(("python-future" ,python-future)
16181 ("python-pynamecheap" ,python-pynamecheap)
16182 ("python-requests" ,python-requests)
16183 ("python-tldextract" ,python-tldextract)
16184 ("python-urllib3" ,python-urllib3)))
16185 (home-page "https://github.com/AnalogJ/lexicon")
16186 (synopsis
16187 "Manipulate DNS records on various DNS providers")
16188 (description
16189 "Lexicon provides a way to manipulate DNS records on multiple DNS
16190 providers in a standardized way. It has a CLI but it can also be used as a
16191 Python library. It was designed to be used in automation, specifically with
16192 Let's Encrypt.")
16193 (license license:expat)))
16194
16195 (define-public python2-dns-lexicon
16196 (package-with-python2 python-dns-lexicon))
16197
16198 (define-public python-commandlines
16199 (package
16200 (name "python-commandlines")
16201 (version "0.4.1")
16202 (source
16203 (origin
16204 (method url-fetch)
16205 (uri (pypi-uri "commandlines" version))
16206 (sha256
16207 (base32
16208 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
16209 (build-system python-build-system)
16210 (home-page "https://github.com/chrissimpkins/commandlines")
16211 (synopsis "Command line argument to object parsing library")
16212 (description
16213 "@code{Commandlines} is a Python library for command line application
16214 development that supports command line argument parsing, command string
16215 validation testing and application logic.")
16216 (license license:expat)))
16217
16218 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
16219 ;; python-numba. They have a very unflexible relationship.
16220 (define-public python-numba
16221 (package
16222 (name "python-numba")
16223 (version "0.46.0")
16224 (source
16225 (origin
16226 (method url-fetch)
16227 (uri (pypi-uri "numba" version))
16228 (sha256
16229 (base32
16230 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
16231 (build-system python-build-system)
16232 (arguments
16233 `(#:modules ((guix build utils)
16234 (guix build python-build-system)
16235 (ice-9 ftw)
16236 (srfi srfi-1)
16237 (srfi srfi-26))
16238 #:phases
16239 (modify-phases %standard-phases
16240 (add-after 'unpack 'disable-proprietary-features
16241 (lambda _
16242 (setenv "NUMBA_DISABLE_HSA" "1")
16243 (setenv "NUMBA_DISABLE_CUDA" "1")
16244 #t))
16245 (add-after 'unpack 'remove-failing-tests
16246 (lambda _
16247 ;; FIXME: These tests fail for unknown reasons:
16248 ;; test_non_writable_pycache, test_non_creatable_pycache, and
16249 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
16250 (substitute* "numba/tests/test_dispatcher.py"
16251 (("def test(_non_writable_pycache)" _ m)
16252 (string-append "def guix_skip" m))
16253 (("def test(_non_creatable_pycache)" _ m)
16254 (string-append "def guix_skip" m))
16255 (("def test(_frozen)" _ m)
16256 (string-append "def guix_skip" m)))
16257
16258 ;; These tests fail because we don't run the tests from the build
16259 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
16260 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
16261 (substitute* "numba/tests/test_pycc.py"
16262 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
16263 (string-append "def guix_skip" m)))
16264
16265 ;; These tests fail because our version of Python does not have
16266 ;; a recognizable front-end for the Numba distribution to use
16267 ;; to check against.
16268 (substitute* "numba/tests/test_entrypoints.py"
16269 (("def test(_init_entrypoint)" _ m)
16270 (string-append "def guix_skip" m)))
16271 (substitute* "numba/tests/test_jitclasses.py"
16272 (("def test(_jitclass_longlabel_not_truncated)" _ m)
16273 (string-append "def guix_skip" m)))
16274 #t))
16275 (replace 'check
16276 (lambda _
16277 (let ((cwd (getcwd)))
16278 (setenv "PYTHONPATH"
16279 (string-append cwd "/build/"
16280 (find (cut string-prefix? "lib" <>)
16281 (scandir (string-append cwd "/build")))
16282 ":"
16283 (getenv "PYTHONPATH")))
16284 ;; Something is wrong with the PYTHONPATH when running the
16285 ;; tests from the build directory, as it complains about not being
16286 ;; able to import certain modules.
16287 (with-directory-excursion "/tmp"
16288 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
16289 #t)))))
16290 (propagated-inputs
16291 `(("python-llvmlite" ,python-llvmlite)
16292 ("python-numpy" ,python-numpy)
16293 ("python-singledispatch" ,python-singledispatch)))
16294 ;; Needed for tests.
16295 (inputs
16296 `(("python-jinja2" ,python-jinja2)
16297 ("python-pygments" ,python-pygments)))
16298 (home-page "https://numba.pydata.org")
16299 (synopsis "Compile Python code using LLVM")
16300 (description "Numba gives you the power to speed up your applications with
16301 high performance functions written directly in Python. With a few
16302 annotations, array-oriented and math-heavy Python code can be just-in-time
16303 compiled to native machine instructions, similar in performance to C, C++ and
16304 Fortran, without having to switch languages or Python interpreters.
16305
16306 Numba works by generating optimized machine code using the LLVM compiler
16307 infrastructure at import time, runtime, or statically (using the included pycc
16308 tool).")
16309 (license license:bsd-3)))
16310
16311 (define-public python-numcodecs
16312 (package
16313 (name "python-numcodecs")
16314 (version "0.6.4")
16315 (source
16316 (origin
16317 (method url-fetch)
16318 (uri (pypi-uri "numcodecs" version))
16319 (sha256
16320 (base32
16321 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
16322 (build-system python-build-system)
16323 (propagated-inputs
16324 `(("python-numpy" ,python-numpy)
16325 ("python-msgpack" ,python-msgpack)))
16326 (native-inputs
16327 `(("python-pytest" ,python-pytest)
16328 ("python-setuptools-scm" ,python-setuptools-scm)))
16329 (home-page "https://github.com/zarr-developers/numcodecs")
16330 (synopsis "Buffer compression and transformation codecs")
16331 (description
16332 "This Python package provides buffer compression and transformation
16333 codecs for use in data storage and communication applications.")
16334 (license license:expat)))
16335
16336 (define-public python-asciitree
16337 (package
16338 (name "python-asciitree")
16339 (version "0.3.3")
16340 (source
16341 (origin
16342 (method url-fetch)
16343 (uri (pypi-uri "asciitree" version))
16344 (sha256
16345 (base32
16346 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
16347 (build-system python-build-system)
16348 (home-page "https://github.com/mbr/asciitree")
16349 (synopsis "Draws ASCII trees")
16350 (description "This package draws tree structures using characters.")
16351 (license license:expat)))
16352
16353 (define-public python-zarr
16354 (package
16355 (name "python-zarr")
16356 (version "2.4.0")
16357 (source
16358 (origin
16359 (method url-fetch)
16360 (uri (pypi-uri "zarr" version))
16361 (sha256
16362 (base32
16363 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
16364 (build-system python-build-system)
16365 (arguments
16366 `(#:phases
16367 (modify-phases %standard-phases
16368 (add-after 'unpack 'disable-service-tests
16369 (lambda _
16370 (setenv "ZARR_TEST_ABS" "0")
16371 (setenv "ZARR_TEST_MONGO" "0")
16372 (setenv "ZARR_TEST_REDIS" "0")
16373 #t))
16374 (replace 'check
16375 (lambda _
16376 (invoke "pytest" "-vv" "-k" "not lmdb")
16377 #t)))))
16378 (propagated-inputs
16379 `(("python-asciitree" ,python-asciitree)
16380 ("python-fasteners" ,python-fasteners)
16381 ("python-numcodecs" ,python-numcodecs)
16382 ("python-numpy" ,python-numpy)))
16383 (native-inputs
16384 `(("python-pytest" ,python-pytest)
16385 ("python-setuptools-scm" ,python-setuptools-scm)))
16386 (home-page "https://github.com/zarr-developers/zarr-python")
16387 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16388 (description
16389 "This package provides an implementation of chunked, compressed,
16390 N-dimensional arrays for Python.")
16391 (license license:expat)))
16392
16393 (define-public python-anndata
16394 (package
16395 (name "python-anndata")
16396 (version "0.7.1")
16397 (source
16398 (origin
16399 (method url-fetch)
16400 (uri (pypi-uri "anndata" version))
16401 (sha256
16402 (base32
16403 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
16404 (build-system python-build-system)
16405 (arguments
16406 `(#:phases
16407 (modify-phases %standard-phases
16408 (add-after 'unpack 'delete-inconvenient-tests
16409 (lambda _
16410 ;; This test depends on python-scikit-learn.
16411 (delete-file "anndata/tests/test_inplace_subset.py")
16412 #t))
16413 (delete 'check)
16414 (add-after 'install 'check
16415 (lambda* (#:key inputs outputs #:allow-other-keys)
16416 (add-installed-pythonpath inputs outputs)
16417 (invoke "pytest" "-vv"))))))
16418 (propagated-inputs
16419 `(("python-h5py" ,python-h5py)
16420 ("python-importlib-metadata" ,python-importlib-metadata)
16421 ("python-natsort" ,python-natsort)
16422 ("python-numcodecs" ,python-numcodecs)
16423 ("python-packaging" ,python-packaging)
16424 ("python-pandas" ,python-pandas)
16425 ("python-scipy" ,python-scipy)
16426 ("python-zarr" ,python-zarr)))
16427 (native-inputs
16428 `(("python-joblib" ,python-joblib)
16429 ("python-pytest" ,python-pytest)
16430 ("python-setuptools-scm" ,python-setuptools-scm)))
16431 (home-page "https://github.com/theislab/anndata")
16432 (synopsis "Annotated data for data analysis pipelines")
16433 (description "Anndata is a package for simple (functional) high-level APIs
16434 for data analysis pipelines. In this context, it provides an efficient,
16435 scalable way of keeping track of data together with learned annotations and
16436 reduces the code overhead typically encountered when using a mostly
16437 object-oriented library such as @code{scikit-learn}.")
16438 (license license:bsd-3)))
16439
16440 (define-public python-dill
16441 (package
16442 (name "python-dill")
16443 (version "0.3.1.1")
16444 (source
16445 (origin
16446 (method url-fetch)
16447 (uri (pypi-uri "dill" version))
16448 (sha256
16449 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
16450 (build-system python-build-system)
16451 (arguments
16452 `(#:phases
16453 (modify-phases %standard-phases
16454 (replace 'check
16455 (lambda _
16456 (with-directory-excursion "/tmp"
16457 (invoke "nosetests" "-v"))
16458 #t)))))
16459 (native-inputs
16460 `(("python-nose" ,python-nose)))
16461 (home-page "https://pypi.org/project/dill/")
16462 (synopsis "Serialize all of Python")
16463 (description "Dill extends Python's @code{pickle} module for serializing
16464 and de-serializing Python objects to the majority of the built-in Python
16465 types. Dill provides the user the same interface as the @code{pickle} module,
16466 and also includes some additional features. In addition to pickling Python
16467 objects, @code{dill} provides the ability to save the state of an interpreter
16468 session in a single command. Hence, it would be feasible to save a
16469 interpreter session, close the interpreter, ship the pickled file to another
16470 computer, open a new interpreter, unpickle the session and thus continue from
16471 the saved state of the original interpreter session.")
16472 (license license:bsd-3)))
16473
16474 (define-public python-multiprocess
16475 (package
16476 (name "python-multiprocess")
16477 (version "0.70.9")
16478 (source
16479 (origin
16480 (method url-fetch)
16481 (uri (pypi-uri "multiprocess" version))
16482 (sha256
16483 (base32
16484 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
16485 (build-system python-build-system)
16486 (arguments
16487 `(#:phases
16488 (modify-phases %standard-phases
16489 (add-after 'unpack 'disable-broken-tests
16490 (lambda _
16491 ;; This test is broken as there is no keyboard interrupt.
16492 (substitute* "py3.7/multiprocess/tests/__init__.py"
16493 (("^(.*)def test_wait_result"
16494 line indent)
16495 (string-append indent
16496 "@unittest.skip(\"Disabled by Guix\")\n"
16497 line)))
16498 #t))
16499 ;; Tests must be run after installation.
16500 (delete 'check)
16501 (add-after 'install 'check
16502 (lambda* (#:key inputs outputs #:allow-other-keys)
16503 (add-installed-pythonpath inputs outputs)
16504 (invoke "python" "-m" "multiprocess.tests")
16505 #t)))))
16506 (propagated-inputs
16507 `(("python-dill" ,python-dill)))
16508 (home-page "https://pypi.org/project/multiprocess/")
16509 (synopsis "Multiprocessing and multithreading in Python")
16510 (description
16511 "This package is a fork of the multiprocessing Python package, a package
16512 which supports the spawning of processes using the API of the standard
16513 library's @code{threading} module.")
16514 (license license:bsd-3)))
16515
16516 (define-public python-toolz
16517 (package
16518 (name "python-toolz")
16519 (version "0.9.0")
16520 (source
16521 (origin
16522 (method url-fetch)
16523 (uri (pypi-uri "toolz" version))
16524 (sha256
16525 (base32
16526 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16527 (build-system python-build-system)
16528 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16529 ;; unregistered loader type"
16530 (arguments '(#:tests? #f))
16531 (home-page "https://github.com/pytoolz/toolz/")
16532 (synopsis "List processing tools and functional utilities")
16533 (description
16534 "This package provides a set of utility functions for iterators,
16535 functions, and dictionaries.")
16536 (license license:bsd-3)))
16537
16538 (define-public python2-toolz
16539 (package-with-python2 python-toolz))
16540
16541 (define-public python-cytoolz
16542 (package
16543 (name "python-cytoolz")
16544 (version "0.9.0.1")
16545 (source
16546 (origin
16547 (method url-fetch)
16548 (uri (pypi-uri "cytoolz" version))
16549 (sha256
16550 (base32
16551 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16552 (build-system python-build-system)
16553 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16554 ;; 'exceptions'"
16555 (arguments '(#:tests? #f))
16556 (propagated-inputs
16557 `(("python-toolz" ,python-toolz)))
16558 (native-inputs
16559 `(("python-cython" ,python-cython)))
16560 (home-page "https://github.com/pytoolz/cytoolz")
16561 (synopsis "High performance functional utilities")
16562 (description
16563 "The cytoolz package implements the same API as provided by toolz. The
16564 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16565 that is accessible to other projects developed in Cython.")
16566 (license license:bsd-3)))
16567
16568 (define-public python-sortedcontainers
16569 (package
16570 (name "python-sortedcontainers")
16571 (version "2.1.0")
16572 (source
16573 (origin
16574 (method url-fetch)
16575 (uri (pypi-uri "sortedcontainers" version))
16576 (sha256
16577 (base32
16578 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
16579 (build-system python-build-system)
16580 (native-inputs
16581 `(("python-tox" ,python-tox)))
16582 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16583 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16584 (description
16585 "This package provides a sorted collections library, written in
16586 pure-Python.")
16587 (license license:asl2.0)))
16588
16589 (define-public python-cloudpickle
16590 (package
16591 (name "python-cloudpickle")
16592 (version "0.6.1")
16593 (source
16594 (origin
16595 (method url-fetch)
16596 (uri (pypi-uri "cloudpickle" version))
16597 (sha256
16598 (base32
16599 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16600 (build-system python-build-system)
16601 ;; FIXME: there are 5 errors in 122 tests:
16602 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16603 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16604 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16605 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16606 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16607 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16608 (arguments '(#:tests? #f))
16609 (native-inputs
16610 `(("python-pytest" ,python-pytest)
16611 ("python-mock" ,python-mock)
16612 ("python-tornado" ,python-tornado)))
16613 (home-page "https://github.com/cloudpipe/cloudpickle")
16614 (synopsis "Extended pickling support for Python objects")
16615 (description
16616 "Cloudpickle makes it possible to serialize Python constructs not
16617 supported by the default pickle module from the Python standard library. It
16618 is especially useful for cluster computing where Python expressions are
16619 shipped over the network to execute on remote hosts, possibly close to the
16620 data.")
16621 (license license:bsd-3)))
16622
16623 (define-public python2-cloudpickle
16624 (package-with-python2 python-cloudpickle))
16625
16626 (define-public python-locket
16627 (package
16628 (name "python-locket")
16629 (version "0.2.0")
16630 (source
16631 (origin
16632 (method url-fetch)
16633 (uri (pypi-uri "locket" version))
16634 (sha256
16635 (base32
16636 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16637 (build-system python-build-system)
16638 (home-page "https://github.com/mwilliamson/locket.py")
16639 (synopsis "File-based locks for Python")
16640 (description
16641 "Locket implements a lock that can be used by multiple processes provided
16642 they use the same path.")
16643 (license license:bsd-2)))
16644
16645 (define-public python2-locket
16646 (package-with-python2 python-locket))
16647
16648 (define-public python-blosc
16649 (package
16650 (name "python-blosc")
16651 (version "1.5.1")
16652 (source
16653 (origin
16654 (method url-fetch)
16655 (uri (pypi-uri "blosc" version))
16656 (sha256
16657 (base32
16658 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16659 (build-system python-build-system)
16660 ;; FIXME: all tests pass, but then this error is printed:
16661 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16662 (arguments '(#:tests? #f))
16663 (propagated-inputs
16664 `(("python-numpy" ,python-numpy)))
16665 (home-page "https://github.com/blosc/python-blosc")
16666 (synopsis "Python wrapper for the Blosc data compressor library")
16667 (description "Blosc is a high performance compressor optimized for binary
16668 data. It has been designed to transmit data to the processor cache faster
16669 than the traditional, non-compressed, direct memory fetch approach via a
16670 @code{memcpy()} system call.
16671
16672 Blosc works well for compressing numerical arrays that contains data with
16673 relatively low entropy, like sparse data, time series, grids with
16674 regular-spaced values, etc.
16675
16676 This Python package wraps the Blosc library.")
16677 (license license:bsd-3)))
16678
16679 (define-public python2-blosc
16680 (package-with-python2 python-blosc))
16681
16682 (define-public python-partd
16683 (package
16684 (name "python-partd")
16685 (version "0.3.9")
16686 (source
16687 (origin
16688 (method url-fetch)
16689 (uri (pypi-uri "partd" version))
16690 (sha256
16691 (base32
16692 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16693 (build-system python-build-system)
16694 (propagated-inputs
16695 `(("python-blosc" ,python-blosc)
16696 ("python-locket" ,python-locket)
16697 ("python-numpy" ,python-numpy)
16698 ("python-pandas" ,python-pandas)
16699 ("python-pyzmq" ,python-pyzmq)
16700 ("python-toolz" ,python-toolz)))
16701 (home-page "https://github.com/dask/partd/")
16702 (synopsis "Appendable key-value storage")
16703 (description "Partd stores key-value pairs. Values are raw bytes. We
16704 append on old values. Partd excels at shuffling operations.")
16705 (license license:bsd-3)))
16706
16707 (define-public python2-partd
16708 (package-with-python2 python-partd))
16709
16710 (define-public python-fsspec
16711 (package
16712 (name "python-fsspec")
16713 (version "0.6.1")
16714 (source
16715 (origin
16716 (method url-fetch)
16717 (uri (pypi-uri "fsspec" version))
16718 (sha256
16719 (base32
16720 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16721 (build-system python-build-system)
16722 (arguments '(#:tests? #f)) ; there are none
16723 (home-page "https://github.com/intake/filesystem_spec")
16724 (synopsis "File-system specification")
16725 (description "The purpose of this package is to produce a template or
16726 specification for a file-system interface, that specific implementations
16727 should follow, so that applications making use of them can rely on a common
16728 behavior and not have to worry about the specific internal implementation
16729 decisions with any given backend.")
16730 (license license:bsd-3)))
16731
16732 (define-public python-dask
16733 (package
16734 (name "python-dask")
16735 (version "2.9.0")
16736 (source
16737 (origin
16738 (method url-fetch)
16739 (uri (pypi-uri "dask" version))
16740 (sha256
16741 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
16742 (build-system python-build-system)
16743 (arguments
16744 `(#:phases
16745 (modify-phases %standard-phases
16746 (add-after 'unpack 'disable-broken-tests
16747 (lambda _
16748 ;; This test is marked as xfail when pytest-xdist is used.
16749 (substitute* "dask/tests/test_threaded.py"
16750 (("def test_interrupt\\(\\)" m)
16751 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16752 m)))
16753 ;; This one fails with a type error:
16754 ;; TypeError: Already tz-aware, use tz_convert to convert.
16755 (substitute* "dask/dataframe/tests/test_shuffle.py"
16756 (("def test_set_index_timestamp\\(\\)" m)
16757 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16758 m)))
16759 #t))
16760 (replace 'check
16761 (lambda _ (invoke "pytest" "-vv"))))))
16762 (propagated-inputs
16763 `(("python-cloudpickle" ,python-cloudpickle)
16764 ("python-fsspec" ,python-fsspec)
16765 ("python-numpy" ,python-numpy)
16766 ("python-packaging" ,python-packaging)
16767 ("python-pandas" ,python-pandas)
16768 ("python-partd" ,python-partd)
16769 ("python-toolz" ,python-toolz)
16770 ("python-pyyaml" ,python-pyyaml)))
16771 (native-inputs
16772 `(("python-pytest" ,python-pytest)
16773 ("python-pytest-runner" ,python-pytest-runner)))
16774 (home-page "https://github.com/dask/dask/")
16775 (synopsis "Parallel computing with task scheduling")
16776 (description
16777 "Dask is a flexible parallel computing library for analytics. It
16778 consists of two components: dynamic task scheduling optimized for computation,
16779 and large data collections like parallel arrays, dataframes, and lists that
16780 extend common interfaces like NumPy, Pandas, or Python iterators to
16781 larger-than-memory or distributed environments. These parallel collections
16782 run on top of the dynamic task schedulers. ")
16783 (license license:bsd-3)))
16784
16785 (define-public python-ilinkedlist
16786 (package
16787 (name "python-ilinkedlist")
16788 (version "0.4.0")
16789 (source
16790 (origin
16791 (method url-fetch)
16792 (uri (pypi-uri "ilinkedlist" version))
16793 (sha256
16794 (base32
16795 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16796 (build-system python-build-system)
16797 (native-inputs `(("python-pytest" ,python-pytest)))
16798 (inputs `(("python" ,python)))
16799 (home-page "https://github.com/luther9/ilinkedlist-py")
16800 (synopsis "Immutable linked list library")
16801 (description
16802 "This is a implementation of immutable linked lists for Python. It
16803 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16804 Since a linked list is treated as immutable, it is hashable, and its length
16805 can be retrieved in constant time. Some of the terminology is inspired by
16806 LISP. It is possible to create an improper list by creating a @code{Pair}
16807 with a non-list @code{cdr}.")
16808 (license license:gpl3+)))
16809
16810 (define-public python-readlike
16811 (package
16812 (name "python-readlike")
16813 (version "0.1.3")
16814 (source
16815 (origin
16816 (method url-fetch)
16817 (uri (pypi-uri "readlike" version))
16818 (sha256
16819 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16820 (build-system python-build-system)
16821 (home-page "https://github.com/jangler/readlike")
16822 (synopsis "GNU Readline-like line editing module")
16823 (description
16824 "This Python module provides line editing functions similar to the default
16825 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16826 @code{readline} package, this one allows access to those capabilties in settings
16827 outside of a standard command-line interface. It is especially well-suited to
16828 interfacing with Urwid, due to a shared syntax for describing key inputs.
16829
16830 Currently, all stateless Readline commands are implemented. Yanking and history
16831 are not supported.")
16832 (license license:expat)))
16833
16834 (define-public python2-readlike
16835 (package-with-python2 python-readlike))
16836
16837 (define-public python-reparser
16838 (package
16839 (name "python-reparser")
16840 (version "1.4.3")
16841 (source
16842 (origin
16843 (method url-fetch)
16844 (uri (pypi-uri "ReParser" version))
16845 (sha256
16846 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16847 (build-system python-build-system)
16848 (home-page "https://github.com/xmikos/reparser")
16849 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16850 (description
16851 "This Python library provides a simple lexer/parser for inline markup based
16852 on regular expressions.")
16853 (license license:expat)))
16854
16855 (define-public python2-reparser
16856 (let ((reparser (package-with-python2
16857 (strip-python2-variant python-reparser))))
16858 (package (inherit reparser)
16859 (propagated-inputs
16860 `(("python2-enum34" ,python2-enum34)
16861 ,@(package-propagated-inputs reparser))))))
16862
16863 (define-public python-precis-i18n
16864 (package
16865 (name "python-precis-i18n")
16866 (version "1.0.0")
16867 (source
16868 (origin
16869 (method url-fetch)
16870 (uri (pypi-uri "precis_i18n" version))
16871 (sha256
16872 (base32
16873 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16874 (build-system python-build-system)
16875 (home-page "https://github.com/byllyfish/precis_i18n")
16876 (synopsis "Implementation of the PRECIS framework")
16877 (description
16878 "This module implements the PRECIS Framework as described in RFC 8264,
16879 RFC 8265 and RFC 8266.")
16880 (license license:expat)))
16881
16882 (define-public python-absl-py
16883 (package
16884 (name "python-absl-py")
16885 (version "0.6.1")
16886 (source
16887 (origin
16888 (method url-fetch)
16889 (uri (pypi-uri "absl-py" version))
16890 (sha256
16891 (base32
16892 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16893 (build-system python-build-system)
16894 (propagated-inputs
16895 `(("python-six" ,python-six)))
16896 (home-page "https://github.com/abseil/abseil-py")
16897 (synopsis "Abseil Python common libraries")
16898 (description
16899 "This package provides the Abseil Python Common Libraries, a collection
16900 of Python libraries for building Python applications.")
16901 (license license:asl2.0)))
16902
16903 (define-public python-astor
16904 (package
16905 (name "python-astor")
16906 (version "0.7.1")
16907 (source
16908 (origin
16909 (method url-fetch)
16910 (uri (pypi-uri "astor" version))
16911 (sha256
16912 (base32
16913 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16914 (build-system python-build-system)
16915 ;; FIXME: There are two errors and two test failures.
16916 (arguments `(#:tests? #f))
16917 (home-page "https://github.com/berkerpeksag/astor")
16918 (synopsis "Read and write Python ASTs")
16919 (description "Astor is designed to allow easy manipulation of Python
16920 source via the Abstract Syntax Tree.")
16921 (license license:bsd-3)))
16922
16923 (define-public python2-astor
16924 (package-with-python2 python-astor))
16925
16926 (define-public python-grpcio
16927 (package
16928 (name "python-grpcio")
16929 (version "1.17.1")
16930 (source
16931 (origin
16932 (method url-fetch)
16933 (uri (pypi-uri "grpcio" version))
16934 (sha256
16935 (base32
16936 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16937 (build-system python-build-system)
16938 (propagated-inputs
16939 `(("python-six" ,python-six)))
16940 (home-page "https://grpc.io")
16941 (synopsis "HTTP/2-based RPC framework")
16942 (description "This package provides a Python library for communicating
16943 with the HTTP/2-based RPC framework gRPC.")
16944 (license license:asl2.0)))
16945
16946 (define-public python-astunparse
16947 (package
16948 (name "python-astunparse")
16949 (version "1.6.2")
16950 (source
16951 (origin
16952 (method url-fetch)
16953 (uri (pypi-uri "astunparse" version))
16954 (sha256
16955 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16956 (build-system python-build-system)
16957 (arguments '(#:tests? #f)) ; there are none
16958 (propagated-inputs
16959 `(("python-six" ,python-six)
16960 ("python-wheel" ,python-wheel)))
16961 (home-page "https://github.com/simonpercivall/astunparse")
16962 (synopsis "AST unparser for Python")
16963 (description "This package provides an AST unparser for Python. It is a
16964 factored out version of @code{unparse} found in the Python source
16965 distribution.")
16966 (license license:bsd-3)))
16967
16968 (define-public python-gast
16969 (package
16970 (name "python-gast")
16971 (version "0.2.2")
16972 (source
16973 (origin
16974 (method url-fetch)
16975 (uri (pypi-uri "gast" version))
16976 (sha256
16977 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16978 (build-system python-build-system)
16979 (propagated-inputs
16980 `(("python-astunparse" ,python-astunparse)))
16981 (home-page "https://pypi.org/project/gast/")
16982 (synopsis "Generic Python AST that abstracts the underlying Python version")
16983 (description
16984 "GAST provides a compatibility layer between the AST of various Python
16985 versions, as produced by @code{ast.parse} from the standard @code{ast}
16986 module.")
16987 (license license:bsd-3)))
16988
16989 (define-public python-wikidata
16990 (package
16991 (name "python-wikidata")
16992 (version "0.6.1")
16993 (source
16994 (origin
16995 (method url-fetch)
16996 (uri (pypi-uri "Wikidata" version))
16997 (sha256
16998 (base32
16999 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
17000 (build-system python-build-system)
17001 (propagated-inputs
17002 `(("python-babel" ,python-babel)))
17003 (home-page "https://github.com/dahlia/wikidata")
17004 (synopsis "Wikidata client library")
17005 (description
17006 "This package provides a Python interface to
17007 @url{https://www.wikidata.org/, Wikidata}.")
17008 (properties '((upstream-name . "Wikidata")))
17009 (license license:gpl3+)))
17010
17011 (define-public python-doctest-ignore-unicode
17012 (package
17013 (name "python-doctest-ignore-unicode")
17014 (version "0.1.2")
17015 (source
17016 (origin
17017 (method url-fetch)
17018 (uri (pypi-uri "doctest-ignore-unicode" version))
17019 (sha256
17020 (base32
17021 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
17022 (build-system python-build-system)
17023 (native-inputs
17024 `(("python-nose" ,python-nose)))
17025 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
17026 (synopsis "Ignore Unicode literal prefixes in doctests")
17027 (description
17028 "This package adds support for a flag to ignore Unicode literal prefixes
17029 in doctests.")
17030 (license license:asl2.0)))
17031
17032 (define-public python-attr
17033 (package
17034 (name "python-attr")
17035 (version "0.3.1")
17036 (source
17037 (origin
17038 (method url-fetch)
17039 (uri (pypi-uri "attr" version))
17040 (sha256
17041 (base32
17042 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
17043 (build-system python-build-system)
17044 (home-page "https://github.com/denis-ryzhkov/attr")
17045 (synopsis "Decorator for attributes of target function or class")
17046 (description "Simple decorator to set attributes of target function or
17047 class in a @acronym{DRY, Don't Repeat Yourself} way.")
17048 (license license:expat)))
17049
17050 (define-public python-construct
17051 (package
17052 (name "python-construct")
17053 (version "2.10.56")
17054 (source
17055 (origin
17056 (method url-fetch)
17057 (uri (pypi-uri "construct" version))
17058 (sha256
17059 (base32
17060 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
17061 (build-system python-build-system)
17062 (arguments
17063 `(#:tests? #f)) ; No tests exist.
17064 (propagated-inputs
17065 `(("python-extras" ,python-extras)
17066 ("python-arrow" ,python-arrow)
17067 ("python-numpy" ,python-numpy)
17068 ("python-ruamel.yaml" ,python-ruamel.yaml)))
17069 (home-page "https://construct.readthedocs.io")
17070 (synopsis "Declarative and symmetrical parser and builder for binary data")
17071 (description
17072 "This package provides both simple, atomic constructs (such as
17073 integers of various sizes), as well as composite ones which allow you
17074 form hierarchical and sequential structures of increasing complexity.
17075 It features bit and byte granularity, easy debugging and testing, an
17076 easy-to-extend subclass system, and lots of primitive constructs to
17077 make your work easier.")
17078 (license license:expat)))
17079
17080 (define-public python-humanize
17081 (package
17082 (name "python-humanize")
17083 (version "0.5.1")
17084 (source
17085 (origin
17086 (method url-fetch)
17087 (uri (pypi-uri "humanize" version))
17088 (sha256
17089 (base32
17090 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17091 (arguments
17092 '(#:tests? #f)) ; tests not in pypi archive
17093 (build-system python-build-system)
17094 (home-page "https://github.com/jmoiron/humanize")
17095 (synopsis "Print numerical information in a human-readable form")
17096 (description "This package provides a Python module that displays numbers
17097 and dates in \"human readable\" forms. For example, it would display
17098 \"12345591313\" as \"12.3 billion\".")
17099 (license license:expat)))
17100
17101 (define-public python-txaio
17102 (package
17103 (name "python-txaio")
17104 (version "18.8.1")
17105 (source
17106 (origin
17107 (method url-fetch)
17108 (uri (pypi-uri "txaio" version))
17109 (sha256
17110 (base32
17111 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17112 (build-system python-build-system)
17113 (propagated-inputs
17114 `(("python-twisted" ,python-twisted)
17115 ("python-six" ,python-six)))
17116 (home-page "https://github.com/crossbario/txaio")
17117 (synopsis "Compatibility layer between Python asyncio and Twisted")
17118 (description "Txaio provides a compatibility layer between the Python
17119 @code{asyncio} module and @code{Twisted}.")
17120 (license license:expat)))
17121
17122 (define-public python-toolshed
17123 (package
17124 (name "python-toolshed")
17125 (version "0.4.6")
17126 (source
17127 (origin
17128 (method url-fetch)
17129 (uri (pypi-uri "toolshed" version))
17130 (sha256
17131 (base32
17132 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17133 (build-system python-build-system)
17134 (native-inputs
17135 `(("python-nose" ,python-nose)))
17136 (home-page "https://github.com/brentp/toolshed/")
17137 (synopsis "Collection of modules and functions for working with data")
17138 (description "This is a collection of well-tested, simple modules and
17139 functions that aim to reduce boilerplate when working with data.")
17140 (license license:bsd-2)))
17141
17142 (define-public python-annoy
17143 (package
17144 (name "python-annoy")
17145 (version "1.15.1")
17146 (source
17147 (origin
17148 (method url-fetch)
17149 (uri (pypi-uri "annoy" version))
17150 (sha256
17151 (base32
17152 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17153 (build-system python-build-system)
17154 (native-inputs
17155 `(("python-nose" ,python-nose)))
17156 (home-page "https://github.com/spotify/annoy/")
17157 (synopsis "Approximate nearest neighbors library")
17158 (description
17159 "Annoy is a C++ library with Python bindings to search for points in
17160 space that are close to a given query point. It also creates large read-only
17161 file-based data structures that are @code{mmap}ped into memory so that many
17162 processes may share the same data.")
17163 (license license:asl2.0)))
17164
17165 (define-public python-pylzma
17166 (package
17167 (name "python-pylzma")
17168 (version "0.5.0")
17169 (source
17170 (origin
17171 (method url-fetch)
17172 (uri (pypi-uri "pylzma" version))
17173 (sha256
17174 (base32
17175 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
17176 (build-system python-build-system)
17177 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
17178 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
17179 (description "This package provides Python bindings for the LZMA library
17180 by Igor Pavlov.")
17181 (license license:lgpl2.1+)))
17182
17183 (define-public python2-pylzma
17184 (package-with-python2 python-pylzma))
17185
17186 (define-public python2-zeroconf
17187 (package
17188 (name "python2-zeroconf")
17189
17190 ;; This is the last version that supports Python 2.x.
17191 (version "0.19.1")
17192 (source
17193 (origin
17194 (method url-fetch)
17195 (uri (pypi-uri "zeroconf" version))
17196 (sha256
17197 (base32
17198 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
17199 (build-system python-build-system)
17200 (arguments
17201 `(#:python ,python-2
17202 #:phases
17203 (modify-phases %standard-phases
17204 (add-after 'unpack 'patch-requires
17205 (lambda* (#:key inputs #:allow-other-keys)
17206 (substitute* "setup.py"
17207 (("enum-compat")
17208 "enum34"))
17209 #t)))))
17210 (native-inputs
17211 `(("python2-six" ,python2-six)
17212 ("python2-enum32" ,python2-enum34)
17213 ("python2-netifaces" ,python2-netifaces)
17214 ("python2-typing" ,python2-typing)))
17215 (home-page "https://github.com/jstasiak/python-zeroconf")
17216 (synopsis "Pure Python mDNS service discovery")
17217 (description
17218 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
17219 compatible).")
17220 (license license:lgpl2.1+)))
17221
17222 (define-public python-bsddb3
17223 (package
17224 (name "python-bsddb3")
17225 (version "6.2.6")
17226 (source
17227 (origin
17228 (method url-fetch)
17229 (uri (pypi-uri "bsddb3" version))
17230 (sha256
17231 (base32
17232 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
17233 (build-system python-build-system)
17234 (inputs
17235 `(("bdb" ,bdb)))
17236 (arguments
17237 '(#:phases
17238 (modify-phases %standard-phases
17239 (add-after 'unpack 'configure-locations
17240 (lambda* (#:key inputs #:allow-other-keys)
17241 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
17242 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
17243 #t))
17244 (replace 'check
17245 (lambda _
17246 (invoke "python3" "test3.py" "-v"))))))
17247 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
17248 (synopsis "Python bindings for Oracle Berkeley DB")
17249 (description
17250 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
17251 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
17252 Transaction objects, and each of these is exposed as a Python type in the
17253 bsddb3.db module. The database objects can use various access methods: btree,
17254 hash, recno, and queue. Complete support of Berkeley DB distributed
17255 transactions. Complete support for Berkeley DB Replication Manager.
17256 Complete support for Berkeley DB Base Replication. Support for RPC.")
17257 (license license:bsd-3)))
17258
17259 (define-public python-dbfread
17260 (package
17261 (name "python-dbfread")
17262 (version "2.0.7")
17263 (source (origin
17264 (method url-fetch)
17265 (uri (pypi-uri "dbfread" version))
17266 (sha256
17267 (base32
17268 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
17269 (build-system python-build-system)
17270 (native-inputs
17271 `(("python-pytest" ,python-pytest)))
17272 (home-page "https://dbfread.readthedocs.io")
17273 (synopsis "Read DBF Files with Python")
17274 (description
17275 "This library reads DBF files and returns the data as native Python data
17276 types for further processing. It is primarily intended for batch jobs and
17277 one-off scripts.")
17278 (license license:expat)))
17279
17280 (define-public python-cached-property
17281 (package
17282 (name "python-cached-property")
17283 (version "1.5.1")
17284 (source
17285 (origin
17286 (method url-fetch)
17287 (uri (pypi-uri "cached-property" version))
17288 (sha256
17289 (base32
17290 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
17291 (build-system python-build-system)
17292 (arguments
17293 `(#:phases
17294 (modify-phases %standard-phases
17295 ;; https://github.com/pydanny/cached-property/issues/131
17296 ;; recent versions of freezegun break one test
17297 (add-after 'unpack 'disable-broken-test
17298 (lambda _
17299 (substitute* "tests/test_cached_property.py"
17300 (("def test_threads_ttl_expiry\\(self\\)" m)
17301 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
17302 " " m)))
17303 #t)))))
17304 (native-inputs
17305 `(("python-freezegun" ,python-freezegun)))
17306 (home-page
17307 "https://github.com/pydanny/cached-property")
17308 (synopsis
17309 "Decorator for caching properties in classes")
17310 (description
17311 "This package provides a decorator which makes caching
17312 time-or-computationally-expensive properties quick and easy and works in Python
17313 2 or 3.")
17314 (license license:bsd-3)))
17315
17316 (define-public python-folium
17317 (package
17318 (name "python-folium")
17319 (version "0.10.1")
17320 (source
17321 (origin
17322 (method url-fetch)
17323 (uri (pypi-uri "folium" version))
17324 (sha256
17325 (base32
17326 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
17327 (build-system python-build-system)
17328 (propagated-inputs
17329 `(("python-branca" ,python-branca)
17330 ("python-jinja2" ,python-jinja2)
17331 ("python-numpy" ,python-numpy)
17332 ("python-requests" ,python-requests)))
17333 (native-inputs
17334 `(("python-pytest" ,python-pytest)))
17335 (home-page "https://github.com/python-visualization/folium")
17336 (synopsis "Make beautiful maps with Leaflet.js & Python")
17337 (description "@code{folium} makes it easy to visualize data that’s been
17338 manipulated in Python on an interactive leaflet map. It enables both the
17339 binding of data to a map for @code{choropleth} visualizations as well as
17340 passing rich vector/raster/HTML visualizations as markers on the map.
17341
17342 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
17343 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
17344 supports Image, Video, GeoJSON and TopoJSON overlays.")
17345 (license license:expat)))
17346
17347 (define-public jube
17348 (package
17349 ;; This is a command-line tool, so no "python-" prefix.
17350 (name "jube")
17351 (version "2.2.2")
17352 (source (origin
17353 (method url-fetch)
17354 (uri (string-append
17355 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
17356 version))
17357 (sha256
17358 (base32
17359 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
17360 (file-name (string-append "jube-" version ".tar.gz"))))
17361 (build-system python-build-system)
17362 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
17363 (synopsis "Benchmarking environment")
17364 (description
17365 "JUBE helps perform and analyze benchmarks in a systematic way. For each
17366 benchmarked application, benchmark data is stored in a format that allows JUBE
17367 to deduct the desired information. This data can be parsed by automatic pre-
17368 and post-processing scripts that draw information and store it more densely
17369 for manual interpretation.")
17370 (license license:gpl3+)))
17371
17372 (define-public python-pyroutelib3
17373 (package
17374 (name "python-pyroutelib3")
17375 (version "1.3.post1")
17376 (source
17377 (origin
17378 (method url-fetch)
17379 (uri (pypi-uri "pyroutelib3" version))
17380 (sha256
17381 (base32
17382 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17383 (build-system python-build-system)
17384 (propagated-inputs
17385 `(("python-dateutil" ,python-dateutil)))
17386 (home-page "https://github.com/MKuranowski/pyroutelib3")
17387 (synopsis "Library for simple routing on OSM data")
17388 (description "Library for simple routing on OSM data")
17389 (license license:gpl3+)))
17390
17391 (define-public python-bibtexparser
17392 (package
17393 (name "python-bibtexparser")
17394 (version "1.1.0")
17395 (source
17396 (origin
17397 (method url-fetch)
17398 (uri (pypi-uri "bibtexparser" version))
17399 (sha256
17400 (base32
17401 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17402 (build-system python-build-system)
17403 (propagated-inputs
17404 `(("python-pyparsing" ,python-pyparsing)))
17405 (native-inputs
17406 `(("python-future" ,python-future)))
17407 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17408 (synopsis "Python library to parse BibTeX files")
17409 (description "BibtexParser is a Python library to parse BibTeX files.")
17410 (license (list license:bsd-3 license:lgpl3))))
17411
17412 (define-public python-distro
17413 (package
17414 (name "python-distro")
17415 (version "1.4.0")
17416 (source
17417 (origin
17418 (method url-fetch)
17419 (uri (pypi-uri "distro" version))
17420 (sha256
17421 (base32
17422 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17423 (build-system python-build-system)
17424 (native-inputs
17425 `(("python-pytest" ,python-pytest)))
17426 (home-page "https://github.com/nir0s/distro")
17427 (synopsis
17428 "OS platform information API")
17429 (description
17430 "@code{distro} provides information about the OS distribution it runs on,
17431 such as a reliable machine-readable ID, or version information.
17432
17433 It is the recommended replacement for Python's original
17434 `platform.linux_distribution` function (which will be removed in Python 3.8).
17435 @code{distro} also provides a command-line interface to output the platform
17436 information in various formats.")
17437 (license license:asl2.0)))
17438
17439 (define-public python-cairosvg
17440 (package
17441 (name "python-cairosvg")
17442 (version "2.4.2")
17443 (source
17444 (origin
17445 (method url-fetch)
17446 (uri (pypi-uri "CairoSVG" version))
17447 (sha256
17448 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17449 (build-system python-build-system)
17450 (arguments
17451 `(#:phases
17452 (modify-phases %standard-phases
17453 (replace 'check
17454 (lambda _ (invoke "pytest"))))))
17455 (propagated-inputs
17456 `(("python-cairocffi" ,python-cairocffi)
17457 ("python-cssselect2" ,python-cssselect2)
17458 ("python-defusedxml" ,python-defusedxml)
17459 ("python-pillow" ,python-pillow)
17460 ("python-tinycss2" ,python-tinycss2)))
17461 (native-inputs
17462 `(("python-pytest-flake8" ,python-pytest-flake8)
17463 ("python-pytest-isort" ,python-pytest-isort)
17464 ("python-pytest-runner" ,python-pytest-runner)))
17465 (home-page "https://cairosvg.org/")
17466 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17467 (description "CairoSVG is a SVG converter based on Cairo. It can export
17468 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17469 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17470 parsed, the result is drawn to a Cairo surface that can be exported to
17471 qvarious formats: PDF, PostScript, PNG and even SVG.")
17472 (license license:lgpl3+)))
17473
17474 (define-public python-pyphen
17475 (package
17476 (name "python-pyphen")
17477 (version "0.9.5")
17478 (source
17479 (origin
17480 (method url-fetch)
17481 (uri (pypi-uri "Pyphen" version))
17482 (sha256
17483 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17484 (build-system python-build-system)
17485 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17486 ;; embedded set provided by upstream - like Debian does.
17487 (home-page "https://github.com/Kozea/Pyphen")
17488 (synopsis "Pure Python module to hyphenate text")
17489 (description "Pyphen is a pure Python module to hyphenate text using
17490 existing Hunspell hyphenation dictionaries.")
17491 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
17492
17493 (define-public python-intelhex
17494 (package
17495 (name "python-intelhex")
17496 (version "2.2.1")
17497 (source
17498 (origin
17499 (method url-fetch)
17500 (uri (pypi-uri "intelhex" version))
17501 (sha256
17502 (base32
17503 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17504 (build-system python-build-system)
17505 (arguments '(#:tests? #f)) ;issue with version
17506 (home-page "https://pypi.org/project/IntelHex/")
17507 (synopsis "Python library for Intel HEX files manipulations")
17508 (description "The Intel HEX file format is widely used in microprocessors
17509 and microcontrollers area (embedded systems etc.) as the de facto standard for
17510 representation of code to be programmed into microelectronic devices. This
17511 package provides an intelhex Python library to read, write, create from
17512 scratch and manipulate data from Intel HEX file format. It also includes
17513 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17514 converters and more, those based on the library itself.")
17515 (license license:bsd-3)))
17516
17517 (define-public python-pykwalify
17518 (package
17519 (name "python-pykwalify")
17520 (version "1.7.0")
17521 (source
17522 (origin
17523 (method url-fetch)
17524 (uri (pypi-uri "pykwalify" version))
17525 (sha256
17526 (base32
17527 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17528 (build-system python-build-system)
17529 (arguments '(#:tests? #f)) ;missing dependencies
17530 (propagated-inputs
17531 `(("python-dateutil" ,python-dateutil)
17532 ("python-docopt" ,python-docopt)
17533 ("python-pyyaml" ,python-pyyaml)))
17534 (home-page "https://github.com/grokzen/pykwalify")
17535 (synopsis
17536 "Python lib/cli for JSON/YAML schema validation")
17537 (description
17538 "This package provides a parser, schema validator, and data binding tool
17539 for YAML and JSON.")
17540 (license license:expat)))
17541
17542 (define-public python-dbusmock
17543 (package
17544 (name "python-dbusmock")
17545 (version "0.18.3")
17546 (source
17547 (origin
17548 (method url-fetch)
17549 (uri (pypi-uri "python-dbusmock" version))
17550 (sha256
17551 (base32
17552 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17553 (build-system python-build-system)
17554 (arguments
17555 '(#:phases
17556 (modify-phases %standard-phases
17557 (add-after 'unpack 'patch-shell-path
17558 (lambda _
17559 (substitute* "tests/test_code.py"
17560 (("/bin/bash") (which "bash")))
17561 #t)))))
17562 (native-inputs
17563 `(;; For tests.
17564 ("dbus" ,dbus) ; for dbus-daemon
17565 ("python-nose" ,python-nose)
17566 ("which" ,which)))
17567 (propagated-inputs
17568 `(("python-dbus" ,python-dbus)
17569 ("python-pygobject" ,python-pygobject)))
17570 (home-page "https://github.com/martinpitt/python-dbusmock")
17571 (synopsis "Python library for mock D-Bus objects")
17572 (description "python-dbusmock allows for the easy creation of mock objects on
17573 D-Bus. This is useful for writing tests for software which talks to D-Bus
17574 services such as upower, systemd, logind, gnome-session or others, and it is
17575 hard (or impossible without root privileges) to set the state of the real
17576 services to what you expect in your tests.")
17577 (license license:lgpl3+)))
17578
17579 (define-public python-ujson
17580 (package
17581 (name "python-ujson")
17582 (version "1.35")
17583 (source
17584 (origin
17585 (method url-fetch)
17586 (uri (pypi-uri "ujson" version))
17587 (sha256
17588 (base32
17589 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17590 (build-system python-build-system)
17591 (home-page "http://www.esn.me")
17592 (synopsis
17593 "Ultra fast JSON encoder and decoder for Python")
17594 (description
17595 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17596 bindings for Python 2.5+ and 3.")
17597 (license license:bsd-3)))
17598
17599 (define-public python2-ujson
17600 (package-with-python2 python-ujson))
17601
17602 (define-public python-iocapture
17603 ;; The latest release is more than a year older than this commit.
17604 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17605 (revision "1"))
17606 (package
17607 (name "python-iocapture")
17608 (version "0.1.2")
17609 (source
17610 (origin
17611 (method git-fetch)
17612 (uri (git-reference
17613 (url "https://github.com/oinume/iocapture.git")
17614 (commit commit)))
17615 (file-name (git-file-name name version))
17616 (sha256
17617 (base32
17618 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17619 (build-system python-build-system)
17620 (arguments
17621 `(#:phases
17622 (modify-phases %standard-phases
17623 (delete 'check)
17624 (add-after 'install 'check
17625 (lambda* (#:key inputs outputs #:allow-other-keys)
17626 (add-installed-pythonpath inputs outputs)
17627 (invoke "py.test" "-v" "tests")
17628 #t)))))
17629 (propagated-inputs
17630 `(("python-flexmock" ,python-flexmock)
17631 ("python-pytest" ,python-pytest)
17632 ("python-pytest-cov" ,python-pytest-cov)
17633 ("python-six" ,python-six)))
17634 (home-page "https://github.com/oinume/iocapture")
17635 (synopsis "Python capturing tool for stdout and stderr")
17636 (description
17637 "This package helps you to capture the standard out (stdout) and the
17638 standard error channel (stderr) in your program.")
17639 (license license:expat))))
17640
17641 (define-public python-argh
17642 ;; There are 21 commits since the latest release containing important
17643 ;; improvements.
17644 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17645 (revision "1"))
17646 (package
17647 (name "python-argh")
17648 (version (git-version "0.26.2" revision commit))
17649 (source
17650 (origin
17651 (method git-fetch)
17652 (uri (git-reference
17653 (url "https://github.com/neithere/argh.git")
17654 (commit commit)))
17655 (file-name (git-file-name name version))
17656 (sha256
17657 (base32
17658 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17659 (build-system python-build-system)
17660 (propagated-inputs
17661 `(("python-iocapture" ,python-iocapture)
17662 ("python-mock" ,python-mock)
17663 ("python-pytest" ,python-pytest)
17664 ("python-pytest-cov" ,python-pytest-cov)
17665 ("python-pytest-xdist" ,python-pytest-xdist)
17666 ("python-tox" ,python-tox)))
17667 (home-page "https://github.com/neithere/argh/")
17668 (synopsis "Argparse wrapper with natural syntax")
17669 (description
17670 "python-argh is a small library that provides several layers of
17671 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17672 always possible to declare a command with the highest possible (and least
17673 flexible) layer and then tune the behaviour with any of the lower layers
17674 including the native API of @code{python-argparse}.")
17675 (license license:lgpl3+))))
17676
17677 (define-public python-ppft
17678 (package
17679 (name "python-ppft")
17680 (version "1.6.6.1")
17681 (source
17682 (origin
17683 (method url-fetch)
17684 (uri (pypi-uri "ppft" version))
17685 (sha256
17686 (base32
17687 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17688 (build-system python-build-system)
17689 (arguments '(#:tests? #f)) ; there are none
17690 (propagated-inputs
17691 `(("python-six" ,python-six)))
17692 (home-page "https://pypi.org/project/ppft/")
17693 (synopsis "Fork of Parallel Python")
17694 (description
17695 "This package is a fork of Parallel Python. The Parallel Python
17696 module (@code{pp}) provides an easy and efficient way to create
17697 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17698 computers and clusters. It features cross-platform portability and dynamic
17699 load balancing.")
17700 (license license:bsd-3)))
17701
17702 (define-public python-pox
17703 (package
17704 (name "python-pox")
17705 (version "0.2.7")
17706 (source
17707 (origin
17708 (method url-fetch)
17709 (uri (pypi-uri "pox" version))
17710 (sha256
17711 (base32
17712 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17713 (build-system python-build-system)
17714 (arguments
17715 `(#:phases
17716 (modify-phases %standard-phases
17717 (replace 'check
17718 (lambda _
17719 (mkdir-p "/tmp/guix")
17720 (setenv "SHELL" "bash")
17721 (setenv "USERNAME" "guix")
17722 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17723 (invoke "py.test" "-vv")
17724 #t)))))
17725 (native-inputs
17726 `(("python-pytest" ,python-pytest)
17727 ("which" ,which)))
17728 (home-page "https://pypi.org/project/pox/")
17729 (synopsis "Python utilities for filesystem exploration and automated builds")
17730 (description
17731 "Pox provides a collection of utilities for navigating and manipulating
17732 filesystems. This module is designed to facilitate some of the low level
17733 operating system interactions that are useful when exploring a filesystem on a
17734 remote host. Pox provides Python equivalents of several shell commands such
17735 as @command{which} and @command{find}. These commands allow automated
17736 discovery of what has been installed on an operating system, and where the
17737 essential tools are located.")
17738 (license license:bsd-3)))
17739
17740 (define-public python-pathos
17741 (package
17742 (name "python-pathos")
17743 (version "0.2.5")
17744 (source
17745 (origin
17746 (method url-fetch)
17747 (uri (pypi-uri "pathos" version))
17748 (sha256
17749 (base32
17750 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17751 (build-system python-build-system)
17752 (arguments
17753 '(#:phases
17754 (modify-phases %standard-phases
17755 (replace 'check
17756 (lambda _
17757 (setenv "PYTHONPATH"
17758 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17759 (invoke "python" "./tests/__main__.py"))))))
17760 (propagated-inputs
17761 `(("python-dill" ,python-dill)
17762 ("python-multiprocess" ,python-multiprocess)
17763 ("python-pox" ,python-pox)
17764 ("python-ppft" ,python-ppft)))
17765 (native-inputs
17766 `(("python-pytest" ,python-pytest)))
17767 (home-page "https://pypi.org/project/pathos/")
17768 (synopsis
17769 "Parallel graph management and execution in heterogeneous computing")
17770 (description
17771 "Python-pathos is a framework for heterogenous computing. It provides a
17772 consistent high-level interface for configuring and launching parallel
17773 computations across heterogenous resources. Python-pathos provides configurable
17774 launchers for parallel and distributed computing, where each launcher contains
17775 the syntactic logic to configure and launch jobs in an execution environment.")
17776 (license license:bsd-3)))
17777
17778 (define-public python-flit
17779 (package
17780 (name "python-flit")
17781 (version "2.1.0")
17782 (source
17783 (origin
17784 (method url-fetch)
17785 (uri (pypi-uri "flit" version))
17786 (sha256
17787 (base32
17788 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17789 (build-system python-build-system)
17790 (arguments
17791 `(#:tests? #f)) ; XXX: Check requires network access.
17792 (home-page "https://flit.readthedocs.io/")
17793 (synopsis
17794 "Simple packaging tool for simple packages")
17795 (description
17796 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17797 packages a single importable module or package at a time, using the import
17798 name as the name on PyPI. All subpackages and data files within a package
17799 are included automatically.")
17800 (license license:bsd-3)))
17801
17802 (define-public python-pathtools
17803 (package
17804 (name "python-pathtools")
17805 (version "0.1.2")
17806 (source
17807 (origin
17808 (method url-fetch)
17809 (uri (pypi-uri "pathtools" version))
17810 (sha256
17811 (base32
17812 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17813 (build-system python-build-system)
17814 (home-page
17815 "https://github.com/gorakhargosh/pathtools")
17816 (synopsis "Path utilities for Python")
17817 (description "Pattern matching and various utilities for file systems
17818 paths.")
17819 (license license:expat)))
17820
17821 (define-public python-fastentrypoints
17822 (package
17823 (name "python-fastentrypoints")
17824 (version "0.12")
17825 (source
17826 (origin
17827 (method url-fetch)
17828 (uri (pypi-uri "fastentrypoints" version))
17829 (sha256
17830 (base32
17831 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17832 (build-system python-build-system)
17833 (home-page
17834 "https://github.com/ninjaaron/fast-entry_points")
17835 (synopsis
17836 "Makes entry_points specified in setup.py load more quickly")
17837 (description
17838 "Using entry_points in your setup.py makes scripts that start really
17839 slowly because it imports pkg_resources. This package allows such setup
17840 scripts to load entry points more quickly.")
17841 (license license:bsd-3)))
17842
17843 (define-public python-funcparserlib
17844 (package
17845 (name "python-funcparserlib")
17846 (version "0.3.6")
17847 (source
17848 (origin
17849 (method url-fetch)
17850 (uri (pypi-uri "funcparserlib" version))
17851 (sha256
17852 (base32
17853 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17854 (native-inputs
17855 `(("python-tox" ,python-tox)))
17856 (arguments
17857 `(#:phases
17858 (modify-phases %standard-phases
17859 (replace 'check
17860 (lambda _
17861 (invoke "tox"))))))
17862 (build-system python-build-system)
17863 (home-page
17864 "https://github.com/vlasovskikh/funcparserlib")
17865 (synopsis
17866 "Recursive descent parsing library based on functional combinators")
17867 (description
17868 "This package is a recursive descent parsing library for Python based on
17869 functional combinators. Parser combinators are just higher-order functions
17870 that take parsers as their arguments and return them as result values.")
17871 (license license:expat)))
17872
17873 (define-public python-speg
17874 (package
17875 (name "python-speg")
17876 (version "0.3")
17877 (source
17878 (origin
17879 (method url-fetch)
17880 (uri (pypi-uri "speg" version ".zip"))
17881 (sha256
17882 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17883 (arguments
17884 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17885 (native-inputs
17886 `(("unzip" ,unzip)))
17887 (build-system python-build-system)
17888 (home-page "https://github.com/avakar/speg")
17889 (synopsis "PEG-based parser interpreter with memoization")
17890 (description "This package is a PEG-based parser and interpreter with
17891 memoization.")
17892 (license license:expat)))
17893
17894 (define-public python-cson
17895 (package
17896 (name "python-cson")
17897 (version "0.8")
17898 (source
17899 (origin
17900 (method url-fetch)
17901 (uri (pypi-uri "cson" version))
17902 (sha256
17903 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17904 (build-system python-build-system)
17905 (propagated-inputs
17906 `(("python-speg" ,python-speg)))
17907 (home-page "https://github.com/avakar/pycson")
17908 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17909 (description "This package is a parser for Coffeescript Object
17910 Notation (CSON).")
17911 (license license:expat)))
17912
17913 (define-public python-asynctest
17914 (package
17915 (name "python-asynctest")
17916 (version "0.13.0")
17917 (source
17918 (origin
17919 (method url-fetch)
17920 (uri (pypi-uri "asynctest" version))
17921 (sha256
17922 (base32
17923 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17924 (build-system python-build-system)
17925 (arguments
17926 '(#:phases
17927 (modify-phases %standard-phases
17928 (replace 'check
17929 (lambda _
17930 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17931 (add-after 'unpack 'disable-tests
17932 (lambda* _
17933 (substitute* "test/test_selector.py"
17934 ;; XXX: This test fails for unknown reason inside the build
17935 ;; environment.
17936 (("def test_events_watched_outside_test_are_ignored")
17937 "@unittest.skip('disabled by guix')
17938 def test_events_watched_outside_test_are_ignored")))))))
17939 (home-page "https://github.com/Martiusweb/asynctest")
17940 (synopsis "Extension of unittest for testing asyncio libraries")
17941 (description
17942 "The package asynctest is built on top of the standard unittest module
17943 and cuts down boilerplate code when testing libraries for asyncio.")
17944 (license license:asl2.0)))
17945
17946 (define-public python-aionotify
17947 (package
17948 (name "python-aionotify")
17949 (version "0.2.0")
17950 (source
17951 (origin
17952 ;; Source tarball on PyPi lacks tests
17953 (method git-fetch)
17954 (uri (git-reference
17955 (url "https://github.com/rbarrois/aionotify")
17956 (commit (string-append "v" version))))
17957 (file-name (git-file-name name version))
17958 (sha256
17959 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17960 (build-system python-build-system)
17961 (native-inputs `(("python-asynctest" ,python-asynctest)))
17962 (home-page "https://github.com/rbarrois/aionotify")
17963 (synopsis "Asyncio-powered inotify library")
17964 (description
17965 "@code{aionotify} is a simple, asyncio-based inotify library.")
17966 (license license:bsd-3)))
17967
17968 (define-public python-forbiddenfruit
17969 (package
17970 (name "python-forbiddenfruit")
17971 (version "0.1.3")
17972 (source
17973 (origin
17974 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17975 (method git-fetch)
17976 (uri (git-reference
17977 (url "https://github.com/clarete/forbiddenfruit")
17978 (commit version)))
17979 (file-name (git-file-name name version))
17980 (sha256
17981 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17982 (build-system python-build-system)
17983 (arguments
17984 '(#:phases
17985 (modify-phases %standard-phases
17986 (replace 'check
17987 (lambda _
17988 (invoke "make" "SKIP_DEPS=1"))))))
17989 (native-inputs
17990 `(("python-nose" ,python-nose)
17991 ("python-coverage" ,python-coverage)))
17992 (home-page "https://github.com/clarete/forbiddenfruit")
17993 (synopsis "Patch python built-in objects")
17994 (description "This project allows Python code to extend built-in types.")
17995 (license (list license:gpl3+ license:expat))))
17996
17997 (define-public python-shouldbe
17998 (package
17999 (name "python-shouldbe")
18000 (version "0.1.2")
18001 (source
18002 (origin
18003 (method url-fetch)
18004 (uri (pypi-uri "shouldbe" version))
18005 (sha256
18006 (base32
18007 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
18008 (build-system python-build-system)
18009 (propagated-inputs
18010 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
18011 (native-inputs
18012 `(("python-nose" ,python-nose)))
18013 (home-page "https://github.com/directxman12/should_be")
18014 (synopsis "Python Assertion Helpers inspired by Shouldly")
18015 (description
18016 "Python Assertion Helpers inspired by Shouldly.")
18017 (license license:isc)))
18018
18019 (define-public python-k5test
18020 (package
18021 (name "python-k5test")
18022 (version "0.9.2")
18023 (source
18024 (origin
18025 (method url-fetch)
18026 (uri (pypi-uri "k5test" version))
18027 (sha256
18028 (base32
18029 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
18030 (build-system python-build-system)
18031 (propagated-inputs
18032 `(("python-six" ,python-six)
18033 ;; `which`, `kadmin.local` binaries called inside library
18034 ("which" ,which)
18035 ("mit-krb5" ,mit-krb5)))
18036 (native-inputs `(("mit-krb5" ,mit-krb5)))
18037 (arguments
18038 '(#:phases
18039 (modify-phases %standard-phases
18040 (add-after 'unpack 'patch-paths
18041 (lambda* _
18042 (substitute* "k5test/realm.py"
18043 (("'kadmin_local'") "'kadmin.local'")))))))
18044 (home-page "https://github.com/pythongssapi/k5test")
18045 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18046 (description
18047 "@code{k5test} is a library for setting up self-contained Kerberos 5
18048 environments, and running Python unit tests inside those environments. It is
18049 based on the file of the same name found alongside the MIT Kerberos 5 unit
18050 tests.")
18051 (license license:isc)))
18052
18053 (define-public python-gssapi
18054 (package
18055 (name "python-gssapi")
18056 (version "1.6.1")
18057 (source
18058 (origin
18059 (method url-fetch)
18060 (uri (pypi-uri "gssapi" version))
18061 (sha256
18062 (base32
18063 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
18064 (build-system python-build-system)
18065 (propagated-inputs
18066 `(("python-decorator" ,python-decorator)
18067 ("python-six" ,python-six)))
18068 (inputs
18069 `(("mit-krb5" ,mit-krb5)))
18070 ;; for tests
18071 (native-inputs
18072 `(("python-shouldbe" ,python-shouldbe)
18073 ("python-parameterized" ,python-parameterized)
18074 ("python-k5test" ,python-k5test)
18075 ("python-nose" ,python-nose)))
18076 (home-page "https://github.com/pythongssapi/python-gssapi")
18077 (synopsis "Python GSSAPI Wrapper")
18078 (description
18079 "Python-GSSAPI provides both low-level and high level wrappers around the
18080 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18081 also be useable with other GSSAPI mechanisms.")
18082 (license license:isc)))
18083
18084 (define-public python-check-manifest
18085 (package
18086 (name "python-check-manifest")
18087 (version "0.37")
18088 (source
18089 (origin
18090 (method url-fetch)
18091 (uri (pypi-uri "check-manifest" version))
18092 (sha256
18093 (base32
18094 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18095 (build-system python-build-system)
18096 (native-inputs
18097 `(("python-mock" ,python-mock)
18098 ("git" ,git)))
18099 (home-page "https://github.com/mgedmin/check-manifest")
18100 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18101 (description "Python package can include a MANIFEST.in file to help with
18102 sending package files to the Python Package Index. This package checks that
18103 file to ensure it completely and accurately describes your project.")
18104 (license license:expat)))
18105
18106 (define-public python-android-stringslib
18107 (package
18108 (name "python-android-stringslib")
18109 (version "0.1.2")
18110 (source
18111 (origin
18112 (method git-fetch)
18113 (uri (git-reference
18114 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18115 (commit (string-append "v" version))))
18116 (file-name (git-file-name name version))
18117 (sha256
18118 (base32
18119 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18120 (build-system python-build-system)
18121 (arguments
18122 `(#:tests? #f))
18123 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18124 (synopsis "Android strings.xml support")
18125 (description "Android Strings Lib provides support for android's strings.xml
18126 files. These files are used to translate strings in android apps.")
18127 (license license:expat)))
18128
18129 (define-public python-watchdog
18130 (package
18131 (name "python-watchdog")
18132 (version "0.9.0")
18133 (source
18134 (origin
18135 (method url-fetch)
18136 (uri (pypi-uri "watchdog" version))
18137 (sha256
18138 (base32
18139 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
18140 (build-system python-build-system)
18141 (arguments
18142 `(#:phases
18143 (modify-phases %standard-phases
18144 (add-before 'check 'remove-failing
18145 (lambda _
18146 (delete-file "tests/test_inotify_buffer.py")
18147 (delete-file "tests/test_snapshot_diff.py")
18148 #t)))))
18149 (propagated-inputs
18150 `(("python-argh" ,python-argh)
18151 ("python-pathtools" ,python-pathtools)
18152 ("python-pyyaml" ,python-pyyaml)))
18153 (native-inputs
18154 `(("python-pytest-cov" ,python-pytest-cov)
18155 ("python-pytest-timeout" ,python-pytest-timeout)))
18156 (home-page "https://github.com/gorakhargosh/watchdog")
18157 (synopsis "Filesystem events monitoring")
18158 (description "This package provides a way to monitor filesystem events
18159 such as a file modification and trigger an action. This is similar to inotify,
18160 but portable.")
18161 (license license:asl2.0)))
18162
18163 (define-public python-wget
18164 (package
18165 (name "python-wget")
18166 (version "3.2")
18167 (source
18168 (origin
18169 (method url-fetch)
18170 (uri (pypi-uri "wget" version ".zip"))
18171 (sha256
18172 (base32
18173 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
18174 (build-system python-build-system)
18175 (native-inputs `(("unzip" ,unzip)))
18176 (home-page "https://bitbucket.org/techtonik/python-wget/")
18177 (synopsis "Pure Python download utility")
18178 (description "The python-wget library provides an API to download files
18179 with features similar to the @command{wget} utility.")
18180 (license license:unlicense)))
18181
18182 (define-public offlate
18183 (package
18184 (name "offlate")
18185 (version "0.5")
18186 (source
18187 (origin
18188 (method git-fetch)
18189 (uri (git-reference
18190 (url "https://framagit.org/tyreunom/offlate")
18191 (commit version)))
18192 (file-name (git-file-name name version))
18193 (sha256
18194 (base32
18195 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
18196 (build-system python-build-system)
18197 (arguments
18198 ;; No tests
18199 `(#:tests? #f))
18200 (propagated-inputs
18201 `(("python-android-stringslib" ,python-android-stringslib)
18202 ("python-dateutil" ,python-dateutil)
18203 ("python-gitlab" ,python-gitlab)
18204 ("python-lxml" ,python-lxml)
18205 ("python-polib" ,python-polib)
18206 ("python-pyenchant" ,python-pyenchant)
18207 ("python-pygit2" ,python-pygit2)
18208 ("python-pygithub" ,python-pygithub)
18209 ("python-pyqt" ,python-pyqt)
18210 ("python-requests" ,python-requests)
18211 ("python-ruamel.yaml" ,python-ruamel.yaml)
18212 ("python-translation-finder" ,python-translation-finder)
18213 ("python-watchdog" ,python-watchdog)))
18214 (native-inputs
18215 `(("qttools" ,qttools)))
18216 (home-page "https://framagit.org/tyreunom/offlate")
18217 (synopsis "Offline translation interface for online translation tools")
18218 (description "Offlate offers a unified interface for different translation
18219 file formats, as well as many different online translation platforms. You can
18220 use it to get work from online platforms, specialized such as the Translation
18221 Project, or not such a gitlab instance when your upstream doesn't use any
18222 dedicated platform. The tool proposes a unified interface for any format and
18223 an upload option to send your work back to the platform.")
18224 (license license:gpl3+)))
18225
18226 (define-public python-pypng
18227 (package
18228 (name "python-pypng")
18229 (version "0.0.20")
18230 (source
18231 (origin
18232 (method url-fetch)
18233 (uri (pypi-uri "pypng" version))
18234 (sha256
18235 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
18236 (build-system python-build-system)
18237 (home-page "https://github.com/drj11/pypng")
18238 (synopsis "Pure Python PNG image encoder/decoder")
18239 (description
18240 "The PyPNG module implements support for PNG images. It reads and writes
18241 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
18242 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
18243 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
18244 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
18245 A number of optional chunks can be specified (when writing) and
18246 understood (when reading): tRNS, bKGD, gAMA.
18247
18248 PyPNG is not a high level toolkit for image processing (like PIL) and does not
18249 aim at being a replacement or competitor. Its strength lies in fine-grained
18250 extensive support of PNG features. It can also read and write Netpbm PAM
18251 files, with a focus on its use as an intermediate format for implementing
18252 custom PNG processing.")
18253 (license license:expat)))
18254
18255 (define-public python-fuzzywuzzy
18256 (package
18257 (name "python-fuzzywuzzy")
18258 (version "0.18.0")
18259 (source
18260 (origin
18261 (method url-fetch)
18262 (uri (pypi-uri "fuzzywuzzy" version))
18263 (sha256
18264 (base32
18265 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
18266 (build-system python-build-system)
18267 (native-inputs
18268 `(("python-hypothesis" ,python-hypothesis)
18269 ("python-pycodestyle" ,python-pycodestyle)
18270 ("python-pytest" ,python-pytest)))
18271 (propagated-inputs
18272 `(("python-levenshtein" ,python-levenshtein)))
18273 (home-page "https://github.com/seatgeek/fuzzywuzzy")
18274 (synopsis "Fuzzy string matching in Python")
18275 (description "Approximate string matching using
18276 @emph{Levenshtein Distance} to calculate the differences between
18277 sequences.")
18278 (license license:gpl2)))
18279
18280 (define-public python2-fuzzywuzzy
18281 (package-with-python2 python-fuzzywuzzy))