gnu: python2-cython: Exclude parallel tests on i686 systems.
[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 ;; This old version is still required by docker-compose as of 1.24.0.
2310 (define-public python-jsonschema-2.6
2311 (package
2312 (name "python-jsonschema")
2313 (version "2.6.0")
2314 (source (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "jsonschema" version))
2317 (sha256
2318 (base32
2319 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2320 (build-system python-build-system)
2321 (arguments
2322 '(#:phases
2323 (modify-phases %standard-phases
2324 (replace 'check (lambda _ (invoke "nosetests"))))))
2325 (native-inputs
2326 `(("python-nose" ,python-nose)
2327 ("python-vcversioner" ,python-vcversioner)))
2328 (home-page "https://github.com/Julian/jsonschema")
2329 (synopsis "Implementation of JSON Schema for Python")
2330 (description
2331 "Jsonschema is an implementation of JSON Schema for Python.")
2332 (license license:expat)
2333 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2334
2335 (define-public python-schema
2336 (package
2337 (name "python-schema")
2338 (version "0.6.6")
2339 (source
2340 (origin
2341 (method url-fetch)
2342 (uri (pypi-uri "schema" version))
2343 (sha256
2344 (base32
2345 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2346 (build-system python-build-system)
2347 (native-inputs
2348 `(("python-pytest" ,python-pytest)))
2349 (home-page "https://github.com/keleshev/schema")
2350 (synopsis "Simple data validation library")
2351 (description
2352 "@code{python-schema} is a library for validating Python data
2353 structures, such as those obtained from config-files, forms, external
2354 services or command-line parsing, converted from JSON/YAML (or
2355 something else) to Python data-types.")
2356 (license license:psfl)))
2357
2358 (define-public python2-schema
2359 (package-with-python2 python-schema))
2360
2361 (define-public python-schema-0.5
2362 (package (inherit python-schema)
2363 (version "0.5.0")
2364 (source
2365 (origin
2366 (method url-fetch)
2367 (uri (pypi-uri "schema" version))
2368 (sha256
2369 (base32
2370 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2371
2372 (define-public python2-schema-0.5
2373 (package-with-python2 python-schema-0.5))
2374
2375 (define-public python-kitchen
2376 (package
2377 (name "python-kitchen")
2378 (version "1.2.5")
2379 (source
2380 (origin
2381 (method url-fetch)
2382 (uri (pypi-uri "kitchen" version))
2383 (sha256
2384 (base32
2385 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2386 (build-system python-build-system)
2387 (propagated-inputs
2388 `(("python-chardet" ,python-chardet)))
2389 (home-page "https://github.com/fedora-infra/kitchen")
2390 (synopsis "Python API for snippets")
2391 (description "@code{kitchen} module provides a python API for all sorts of
2392 little useful snippets of code that everybody ends up writing for their projects
2393 but never seem big enough to build an independent release. Use kitchen and stop
2394 cutting and pasting that code over and over.")
2395 (license (list license:lgpl2.1+
2396 ;; subprocess.py, test_subprocess.py,
2397 ;; kitchen/pycompat25/defaultdict.py:
2398 license:psfl))))
2399
2400 (define-public python2-kitchen
2401 (package-with-python2 python-kitchen))
2402
2403 (define-public python-unidecode
2404 (package
2405 (name "python-unidecode")
2406 (version "1.1.1")
2407 (source (origin
2408 (method url-fetch)
2409 (uri (pypi-uri "Unidecode" version))
2410 (sha256
2411 (base32
2412 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2413 (build-system python-build-system)
2414 (home-page "https://pypi.org/project/Unidecode/")
2415 (synopsis "ASCII transliterations of Unicode text")
2416 (description
2417 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2418 useful when integrating with legacy code that doesn't support Unicode, or for
2419 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2420 machine identifiers from human-readable Unicode strings that should still be
2421 somewhat intelligible.")
2422 (license license:gpl2+)))
2423
2424 (define-public python2-unidecode
2425 (package-with-python2 python-unidecode))
2426
2427 (define-public python-pyjwt
2428 (package
2429 (name "python-pyjwt")
2430 (version "1.7.1")
2431 (source
2432 (origin
2433 (method url-fetch)
2434 (uri (pypi-uri "PyJWT" version))
2435 (sha256
2436 (base32
2437 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2438 (modules '((guix build utils)))
2439 (snippet
2440 '(begin
2441 (for-each delete-file-recursively
2442 (find-files "." "\\.pyc$"))
2443 #t))))
2444 (build-system python-build-system)
2445 (native-inputs
2446 `(("python-pytest" ,python-pytest)
2447 ("python-pytest-cov" ,python-pytest-cov)
2448 ("python-pytest-runner" ,python-pytest-runner)))
2449 (home-page "https://github.com/progrium/pyjwt")
2450 (synopsis "JSON Web Token implementation in Python")
2451 (description
2452 "PyJWT is a JSON Web Token implementation written in Python.")
2453 (license license:expat)))
2454
2455 (define-public python2-pyjwt
2456 (package-with-python2 python-pyjwt))
2457
2458 (define-public python-pykka
2459 (package
2460 (name "python-pykka")
2461 (version "1.2.1")
2462 (source
2463 (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "Pykka" version))
2466 (sha256
2467 (base32
2468 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2469 (build-system python-build-system)
2470 (native-inputs
2471 `(("python-mock" ,python-mock)
2472 ("python-nose" ,python-nose)
2473 ("python-gevent" ,python-gevent)
2474 ("python-eventlet" ,python-eventlet)))
2475 (home-page "https://www.pykka.org/")
2476 (synopsis "Pykka is a Python implementation of the actor model")
2477 (description
2478 "Pykka is a Python implementation of the actor model.
2479 The actor model introduces some simple rules to control the sharing
2480 of state and cooperation between execution units, which makes it
2481 easier to build concurrent applications.")
2482 (license license:asl2.0)))
2483
2484 (define-public python2-pykka
2485 (package-with-python2 python-pykka))
2486
2487 (define-public python-pymsgbox
2488 (package
2489 (name "python-pymsgbox")
2490 (version "1.0.6")
2491 (source
2492 (origin
2493 (method git-fetch)
2494 (uri (git-reference
2495 ;; LICENSE.txt is not present on pypi
2496 (url "https://github.com/asweigart/PyMsgBox")
2497 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2498 (file-name (git-file-name name version))
2499 (sha256
2500 (base32
2501 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2502 (arguments
2503 ;; Circular dependency to run tests:
2504 ;; Tests need pyautogui, which depends on pymsgbox.
2505 '(#:tests? #f))
2506 (build-system python-build-system)
2507 (home-page "https://github.com/asweigart/PyMsgBox")
2508 (synopsis "Python module for JavaScript-like message boxes")
2509 (description
2510 "PyMsgBox is a simple, cross-platform, pure Python module for
2511 JavaScript-like message boxes. Types of dialog boxes include:
2512 @enumerate
2513 @item alert
2514 @item confirm
2515 @item prompt
2516 @item password
2517 @end enumerate
2518 ")
2519 (license license:bsd-3)))
2520
2521 (define-public python-pympler
2522 (package
2523 (name "python-pympler")
2524 (home-page "https://pythonhosted.org/Pympler/")
2525 (version "0.8")
2526 (source (origin
2527 (method url-fetch)
2528 (uri (pypi-uri "Pympler" version))
2529 (sha256
2530 (base32
2531 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2532 (build-system python-build-system)
2533 (arguments
2534 `(#:phases (modify-phases %standard-phases
2535 (delete 'check)
2536 (add-after 'install 'check
2537 (lambda* (#:key inputs outputs #:allow-other-keys)
2538 (add-installed-pythonpath inputs outputs)
2539 (invoke "python" "setup.py" "test"))))))
2540 (synopsis "Measure, monitor and analyze memory behavior")
2541 (description
2542 "Pympler is a development tool to measure, monitor and analyze
2543 the memory behavior of Python objects in a running Python application.
2544
2545 By pympling a Python application, detailed insight in the size and the
2546 lifetime of Python objects can be obtained. Undesirable or unexpected
2547 runtime behavior like memory bloat and other @samp{pymples} can easily
2548 be identified.
2549
2550 A web profiling frontend exposes process statistics, garbage
2551 visualisation and class tracker statistics.")
2552 (license license:asl2.0)))
2553
2554 (define-public python2-pympler
2555 (package-with-python2 python-pympler))
2556
2557 (define-public python-itsdangerous
2558 (package
2559 (name "python-itsdangerous")
2560 (version "1.1.0")
2561 (source
2562 (origin
2563 (method url-fetch)
2564 (uri (pypi-uri "itsdangerous" version))
2565 (sha256
2566 (base32
2567 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2568 (build-system python-build-system)
2569 (home-page "https://palletsprojects.com/p/itsdangerous/")
2570 (synopsis "Python library for passing data to/from untrusted environments")
2571 (description
2572 "Itsdangerous provides various helpers to pass trusted data to untrusted
2573 environments and back.")
2574 (license license:bsd-3)))
2575
2576 (define-public python2-itsdangerous
2577 (package-with-python2 python-itsdangerous))
2578
2579 (define-public python-pyyaml
2580 (package
2581 (name "python-pyyaml")
2582 (version "5.3")
2583 (source
2584 (origin
2585 (method url-fetch)
2586 (uri (pypi-uri "PyYAML" version))
2587 (sha256
2588 (base32
2589 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
2590 (build-system python-build-system)
2591 (inputs
2592 `(("libyaml" ,libyaml)))
2593 (home-page "https://pyyaml.org")
2594 (synopsis "YAML parser and emitter for Python")
2595 (description
2596 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2597 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2598 API, and sensible error messages. PyYAML supports standard YAML tags and
2599 provides Python-specific tags that allow to represent an arbitrary Python
2600 object.")
2601 (license license:expat)))
2602
2603 (define-public python2-pyyaml
2604 (package-with-python2 python-pyyaml))
2605
2606 (define-public python-vine
2607 (package
2608 (name "python-vine")
2609 (version "1.1.4")
2610 (source
2611 (origin
2612 (method url-fetch)
2613 (uri (pypi-uri "vine" version))
2614 (sha256
2615 (base32
2616 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2617 (build-system python-build-system)
2618 (native-inputs
2619 `(("python-pytest" ,python-pytest)
2620 ("python-case" ,python-case)))
2621 (home-page "https://github.com/celery/vine")
2622 (synopsis "Promises for Python")
2623 (description
2624 "@code{vine} provides a special implementation of promises in that it can
2625 be used both for \"promise of a value\" and lazy evaluation. The biggest
2626 upside for this is that everything in a promise can also be a promise,
2627 e.g. filters, callbacks and errbacks can all be promises.")
2628 (license license:bsd-3)))
2629
2630 (define-public python-virtualenv
2631 (package
2632 (name "python-virtualenv")
2633 (version "20.0.10")
2634 (source
2635 (origin
2636 (method url-fetch)
2637 (uri (pypi-uri "virtualenv" version))
2638 (sha256
2639 (base32
2640 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
2641 (build-system python-build-system)
2642 (native-inputs
2643 `(("python-mock" ,python-mock)
2644 ("python-pytest" ,python-pytest)
2645 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2646 ;; be an input at all". However, removing the input makes the build error:
2647 ;; File "setup.py", line 4, in <module>
2648 ;; raise RuntimeError("setuptools >= 41 required to build")
2649 ("python-setuptools" ,python-setuptools)
2650 ("python-setuptools-scm" ,python-setuptools-scm)))
2651 (propagated-inputs
2652 `(("python-appdirs" ,python-appdirs)
2653 ("python-distlib" ,python-distlib)
2654 ("python-filelock" ,python-filelock)
2655 ("python-six" ,python-six)
2656 ("python-importlib-metadata" ,python-importlib-metadata)))
2657 (home-page "https://virtualenv.pypa.io/")
2658 (synopsis "Virtual Python environment builder")
2659 (description
2660 "Virtualenv is a tool to create isolated Python environments.")
2661 (properties `((python2-variant . ,(delay python2-virtualenv))))
2662 (license license:expat)))
2663
2664 (define-public python2-virtualenv
2665 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2666 (package
2667 (inherit base)
2668 (arguments
2669 `(#:python ,python-2
2670 #:phases
2671 (modify-phases %standard-phases
2672 (add-after 'set-paths 'adjust-PYTHONPATH
2673 (lambda* (#:key inputs #:allow-other-keys)
2674 (let* ((python (assoc-ref inputs "python"))
2675 (python-sitedir (string-append python "/lib/python2.7"
2676 "/site-packages")))
2677 ;; XXX: 'python2' always comes first on PYTHONPATH
2678 ;; and shadows the 'setuptools' input. Move python2
2679 ;; last: this should be fixed in python-build-system
2680 ;; in a future rebuild cycle.
2681 (setenv "PYTHONPATH"
2682 (string-append (string-join (delete python-sitedir
2683 (string-split
2684 (getenv "PYTHONPATH")
2685 #\:))
2686 ":")
2687 ":" python-sitedir))
2688 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2689 (getenv "PYTHONPATH"))
2690 #t))))))
2691 (propagated-inputs
2692 `(("python-contextlib2" ,python2-contextlib2)
2693 ,@(package-propagated-inputs base))))))
2694
2695 (define-public python-markupsafe
2696 (package
2697 (name "python-markupsafe")
2698 (version "1.1.1")
2699 (source
2700 (origin
2701 (method url-fetch)
2702 (uri (pypi-uri "MarkupSafe" version))
2703 (sha256
2704 (base32
2705 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2706 (build-system python-build-system)
2707 (arguments
2708 `(#:modules ((ice-9 ftw)
2709 (srfi srfi-1)
2710 (srfi srfi-26)
2711 (guix build utils)
2712 (guix build python-build-system))
2713 #:phases (modify-phases %standard-phases
2714 (replace 'check
2715 (lambda _
2716 (let ((cwd (getcwd))
2717 (libdir (find (cut string-prefix? "lib." <>)
2718 (scandir "build"))))
2719 (setenv "PYTHONPATH"
2720 (string-append cwd "/build/" libdir ":"
2721 (getenv "PYTHONPATH")))
2722 (invoke "pytest" "-vv")))))))
2723 (native-inputs
2724 `(("python-pytest" ,python-pytest)))
2725 (home-page "https://github.com/mitsuhiko/markupsafe")
2726 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2727 (description
2728 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2729 for Python.")
2730 (license license:bsd-3)))
2731
2732 (define-public python2-markupsafe
2733 (package-with-python2 python-markupsafe))
2734
2735 (define-public python-jinja2
2736 (package
2737 (name "python-jinja2")
2738 (version "2.11.1")
2739 (source
2740 (origin
2741 (method url-fetch)
2742 (uri (pypi-uri "Jinja2" version))
2743 (sha256
2744 (base32
2745 "0l72c11n959yzb8d3ankckb6yhjhm6x729zm7rkpk040qzxpy64k"))))
2746 (build-system python-build-system)
2747 (arguments
2748 '(#:phases (modify-phases %standard-phases
2749 (replace 'check
2750 (lambda* (#:key tests? #:allow-other-keys)
2751 (if tests?
2752 (begin
2753 (setenv "PYTHONPATH"
2754 (string-append "./build/lib:"
2755 (getenv "PYTHONPATH")))
2756 (invoke "pytest" "-vv"))
2757 (format #t "test suite not run~%"))
2758 #t)))))
2759 (native-inputs
2760 `(("python-pytest" ,python-pytest)))
2761 (propagated-inputs
2762 `(("python-markupsafe" ,python-markupsafe)))
2763 (home-page "http://jinja.pocoo.org/")
2764 (synopsis "Python template engine")
2765 (description
2766 "Jinja2 is a small but fast and easy to use stand-alone template engine
2767 written in pure Python.")
2768 (license license:bsd-3)))
2769
2770 (define-public python2-jinja2
2771 (package-with-python2 python-jinja2))
2772
2773 (define-public python-jinja2-time
2774 (package
2775 (name "python-jinja2-time")
2776 (version "0.2.0")
2777 (source
2778 (origin
2779 (method url-fetch)
2780 (uri (pypi-uri "jinja2-time" version))
2781 (sha256
2782 (base32
2783 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2784 (build-system python-build-system)
2785 (propagated-inputs
2786 `(("python-arrow" ,python-arrow)
2787 ("python-jinja2" ,python-jinja2)))
2788 (home-page
2789 "https://github.com/hackebrot/jinja2-time")
2790 (synopsis "Jinja2 Extension for Dates and Times")
2791 (description
2792 "This package provides an extension for the template engine Jinja2. It
2793 adds a 'now' tag providing a convenient access to the arrow.now() API from
2794 templates. A format string can be provided to control the output.")
2795 (license license:expat)))
2796
2797 (define-public python-pystache
2798 (package
2799 (name "python-pystache")
2800 (version "0.5.4")
2801 (source (origin
2802 (method url-fetch)
2803 (uri (pypi-uri "pystache" version))
2804 (sha256
2805 (base32
2806 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2807 (build-system python-build-system)
2808 (arguments
2809 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2810 (home-page "http://defunkt.io/pystache/")
2811 (synopsis "Python logic-less template engine")
2812 (description
2813 "Pystache is a Python implementation of the framework agnostic,
2814 logic-free templating system Mustache.")
2815 (license license:expat)
2816 (properties `((python2-variant . ,(delay python2-pystache))))))
2817
2818 (define-public python2-pystache
2819 (package (inherit (package-with-python2
2820 (strip-python2-variant python-pystache)))
2821 (arguments
2822 `(#:python ,python-2
2823 #:phases
2824 (modify-phases %standard-phases
2825 (replace 'check
2826 (lambda _
2827 (invoke "python" "test_pystache.py"))))))))
2828
2829 (define-public python-joblib
2830 (package
2831 (name "python-joblib")
2832 (version "0.14.1")
2833 (source (origin
2834 (method url-fetch)
2835 (uri (pypi-uri "joblib" version))
2836 (sha256
2837 (base32
2838 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
2839 (build-system python-build-system)
2840 (arguments
2841 `(#:phases
2842 (modify-phases %standard-phases
2843 (replace 'check
2844 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2845 (native-inputs
2846 `(("python-pytest" ,python-pytest)))
2847 (home-page "https://joblib.readthedocs.io/")
2848 (synopsis "Using Python functions as pipeline jobs")
2849 (description
2850 "Joblib is a set of tools to provide lightweight pipelining in Python.
2851 In particular, joblib offers: transparent disk-caching of the output values
2852 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2853 logging and tracing of the execution.")
2854 (license license:bsd-3)))
2855
2856 (define-public python2-joblib
2857 (package-with-python2 python-joblib))
2858
2859 (define-public python-daemon
2860 (package
2861 (name "python-daemon")
2862 (version "2.2.3")
2863 (source
2864 (origin
2865 (method url-fetch)
2866 (uri (pypi-uri "python-daemon" version))
2867 (sha256
2868 (base32
2869 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2870 (build-system python-build-system)
2871 (arguments
2872 `(#:phases
2873 (modify-phases %standard-phases
2874 (add-before 'check 'disable-tests
2875 (lambda _
2876 ;; FIXME: Determine why test fails
2877 (substitute* "test/test_daemon.py"
2878 (("test_detaches_process_context")
2879 "skip_test_detaches_process_context"))
2880 #t)))))
2881 (propagated-inputs
2882 `(("python-lockfile" ,python-lockfile)))
2883 (native-inputs
2884 `(("python-unittest2" ,python-unittest2)
2885 ("python-testtools" ,python-testtools)
2886 ("python-testscenarios" ,python-testscenarios)
2887 ("python-mock" ,python-mock)
2888 ("python-docutils" ,python-docutils)))
2889 (home-page "https://pagure.io/python-daemon/")
2890 (synopsis "Python library for making a Unix daemon process")
2891 (description "Python-daemon is a library that assists a Python program to
2892 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2893
2894 This library provides a @code{DaemonContext} class that manages the following
2895 important tasks for becoming a daemon process:
2896 @enumerate
2897 @item Detach the process into its own process group.
2898 @item Set process environment appropriate for running inside a chroot.
2899 @item Renounce suid and sgid privileges.
2900 @item Close all open file descriptors.
2901 @item Change the working directory, uid, gid, and umask.
2902 @item Set appropriate signal handlers.
2903 @item Open new file descriptors for stdin, stdout, and stderr.
2904 @item Manage a specified PID lock file.
2905 @item Register cleanup functions for at-exit processing.
2906 @end enumerate")
2907 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2908 (license (list license:asl2.0 license:gpl3+))))
2909
2910 (define-public python-anytree
2911 (package
2912 (name "python-anytree")
2913 (version "2.8.0")
2914 (source (origin
2915 (method url-fetch)
2916 (uri (pypi-uri "anytree" version))
2917 (sha256
2918 (base32
2919 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2920 (build-system python-build-system)
2921 (propagated-inputs
2922 `(("python-six" ,python-six)))
2923 (native-inputs
2924 `(;; For tests.
2925 ("graphviz" ,graphviz) ;for 'dot'
2926 ("python-nose" ,python-nose)))
2927 (home-page "https://github.com/c0fec0de/anytree")
2928 (synopsis "Lightweight tree data library")
2929 (description
2930 "@code{anytree} is a simple, lightweight, and extensible tree data
2931 structure for Python.")
2932 (license license:asl2.0)))
2933
2934 (define-public python-docutils
2935 (package
2936 (name "python-docutils")
2937 (version "0.16")
2938 (source
2939 (origin
2940 (method url-fetch)
2941 (uri (pypi-uri "docutils" version))
2942 (sha256
2943 (base32
2944 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
2945 (build-system python-build-system)
2946 (arguments
2947 '(#:phases (modify-phases %standard-phases
2948 (replace 'check
2949 (lambda* (#:key tests? #:allow-other-keys)
2950 (if tests?
2951 (invoke "python" "test/alltests.py")
2952 (format #t "test suite not run~%"))
2953 #t)))))
2954 (home-page "http://docutils.sourceforge.net/")
2955 (synopsis "Python Documentation Utilities")
2956 (description
2957 "Docutils is a modular system for processing documentation into useful
2958 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2959 reStructuredText.")
2960 ;; Most of the source code is public domain, but some source files are
2961 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2962 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2963
2964 (define-public python2-docutils
2965 (package-with-python2 python-docutils))
2966
2967 ;; python2-sphinx fails its test suite with newer versions.
2968 (define-public python2-docutils-0.14
2969 (package
2970 (inherit python2-docutils)
2971 (version "0.14")
2972 (source (origin
2973 (method url-fetch)
2974 (uri (pypi-uri "docutils" version))
2975 (sha256
2976 (base32
2977 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
2978
2979 (define-public python-pygments
2980 (package
2981 (name "python-pygments")
2982 (version "2.5.2")
2983 (source
2984 (origin
2985 (method url-fetch)
2986 (uri (pypi-uri "Pygments" version))
2987 (sha256
2988 (base32
2989 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
2990 (build-system python-build-system)
2991 (arguments
2992 ;; FIXME: Tests require sphinx, which depends on this.
2993 '(#:tests? #f))
2994 (home-page "https://pygments.org/")
2995 (synopsis "Syntax highlighting")
2996 (description
2997 "Pygments is a syntax highlighting package written in Python.")
2998 (license license:bsd-2)))
2999
3000 (define-public python2-pygments
3001 (package-with-python2 python-pygments))
3002
3003 (define-public python-bumpversion
3004 (package
3005 (name "python-bumpversion")
3006 (version "0.5.3")
3007 (source
3008 (origin
3009 (method url-fetch)
3010 (uri (pypi-uri "bumpversion" version))
3011 (sha256
3012 (base32
3013 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3014 (build-system python-build-system)
3015 (home-page "https://github.com/peritus/bumpversion")
3016 (synopsis "Tool to bump software version")
3017 (description "This tool provides a command-line interface (CLI) to bump a
3018 software version simply.")
3019 (license license:expat)))
3020
3021 (define-public python-deprecated
3022 (package
3023 (name "python-deprecated")
3024 (version "1.2.5")
3025 (source
3026 (origin
3027 (method git-fetch)
3028 (uri (git-reference
3029 (url "https://github.com/tantale/deprecated.git")
3030 (commit (string-append "v" version))))
3031 (file-name (git-file-name name version))
3032 (sha256
3033 (base32
3034 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3035 (build-system python-build-system)
3036 (arguments
3037 `(#:phases (modify-phases %standard-phases
3038 (replace 'check
3039 (lambda _
3040 (invoke "pytest"))))))
3041 (propagated-inputs
3042 `(("python-wrapt" ,python-wrapt)))
3043 (native-inputs
3044 `(("python-bumpversion" ,python-bumpversion)
3045 ("python-pytest" ,python-pytest)
3046 ("python-pytest-cov" ,python-pytest-cov)
3047 ("python-sphinx" ,python-sphinx)
3048 ("python-tox" ,python-tox)))
3049 (home-page "https://github.com/tantale/deprecated")
3050 (synopsis "Python decorator to deprecate classes, functions or methods")
3051 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3052 to deprecate classes, functions or methods.")
3053 (license license:expat)))
3054
3055 (define-public python-pygithub
3056 (package
3057 (name "python-pygithub")
3058 (version "1.43.8")
3059 (source
3060 ;; We fetch from the Git repo because there are no tests in the PyPI
3061 ;; archive.
3062 (origin
3063 (method git-fetch)
3064 (uri (git-reference
3065 (url "https://github.com/PyGithub/PyGithub.git")
3066 (commit (string-append "v" version))))
3067 (file-name (git-file-name name version))
3068 (sha256
3069 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3070 (build-system python-build-system)
3071 (arguments
3072 `(#:phases (modify-phases %standard-phases
3073 ;; Some tests rely on the network.
3074 (add-after 'unpack 'disable-failing-tests
3075 (lambda _
3076 (substitute* "tests/Issue142.py"
3077 (("testDecodeJson") "disabled_testDecodeJson"))
3078 #t))
3079 (add-before 'check 'prepare-for-tests
3080 (lambda _
3081 (for-each (lambda (f)
3082 (chmod f #o666))
3083 (find-files "./tests"))
3084 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3085 (setenv "PYTHONPATH"
3086 (string-append "./tests:" (getenv "PYTHONPATH")))
3087 #t)))))
3088 (propagated-inputs
3089 `(("python-deprecated" ,python-deprecated)
3090 ("python-pyjwt" ,python-pyjwt)
3091 ("python-requests" ,python-requests)))
3092 (native-inputs `(("python-httpretty" ,python-httpretty)))
3093 (home-page "https://pygithub.readthedocs.io/en/latest/")
3094 (synopsis "Python library for the GitHub API")
3095 (description "This library allows managing GitHub resources such as
3096 repositories, user profiles, and organizations in your Python applications,
3097 using version 3 of the GitHub application programming interface (API).")
3098 (license license:lgpl3+)))
3099
3100 (define-public python-rellu
3101 (package
3102 (name "python-rellu")
3103 (version "0.7")
3104 (source
3105 (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "rellu" version))
3108 (sha256
3109 (base32
3110 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3111 (build-system python-build-system)
3112 (propagated-inputs
3113 `(("python-invoke" ,python-invoke)
3114 ("python-pygithub" ,python-pygithub)))
3115 (home-page "https://github.com/robotframework/rellu")
3116 (synopsis "Utilities to create PyPI releases")
3117 (description "This collection of utilities contains tooling and templates
3118 to assist in creating releases on GitHub and publishing them on PyPI. It is
3119 designed to be used by Robot Framework and tools and libraries in its
3120 ecosystem, but can naturally be used also by other projects.")
3121 (license license:asl2.0)))
3122
3123 (define-public python-robotframework
3124 (package
3125 (name "python-robotframework")
3126 (version "3.1.2")
3127 ;; There are no tests in the PyPI archive.
3128 (source
3129 (origin
3130 (method git-fetch)
3131 (uri (git-reference
3132 (url "https://github.com/robotframework/robotframework.git")
3133 (commit (string-append "v" version))))
3134 (file-name (git-file-name name version))
3135 (sha256
3136 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
3137 (patches (search-patches
3138 "python-robotframework-honor-source-date-epoch.patch"))))
3139 (build-system python-build-system)
3140 (arguments
3141 `(#:phases (modify-phases %standard-phases
3142 (add-before 'build 'build-and-install-doc
3143 (lambda* (#:key outputs #:allow-other-keys)
3144 (let* ((doc-output (assoc-ref outputs "doc"))
3145 (doc (string-append doc-output "/share/"
3146 ,name "-" ,version "/")))
3147 (invoke "invoke" "library-docs" "all")
3148 (mkdir-p doc)
3149 (copy-recursively "doc/libraries"
3150 (string-append doc "/libraries"))
3151 #t)))
3152 (replace 'check
3153 (lambda _
3154 (invoke "python" "utest/run.py"))))))
3155 (native-inputs
3156 `(("python-invoke" ,python-invoke)
3157 ("python-rellu" ,python-rellu)
3158 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3159 (outputs '("out" "doc"))
3160 (home-page "https://robotframework.org")
3161 (synopsis "Generic automation framework")
3162 (description "Robot Framework is a generic automation framework for
3163 acceptance testing, acceptance test driven development (ATDD), and robotic
3164 process automation (RPA).")
3165 (license license:asl2.0)))
3166
3167 (define-public python-robotframework-lint
3168 ;; There is no properly tagged release; the commit below seems to correspond
3169 ;; to the 0.9 stable release available from PyPI. The tests are not
3170 ;; included in the PyPI archive, so we fetch the sources from the upstream
3171 ;; Git repo.
3172 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3173 (revision "1"))
3174 (package
3175 (name "python-robotframework-lint")
3176 (version (git-version "0.9.0" revision commit))
3177 (source
3178 (origin
3179 (method git-fetch)
3180 (uri (git-reference
3181 (url "https://github.com/boakley/robotframework-lint.git")
3182 (commit commit)))
3183 (file-name (git-file-name name version))
3184 (sha256
3185 (base32
3186 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3187 (build-system python-build-system)
3188 (arguments
3189 `(#:phases
3190 (modify-phases %standard-phases
3191 (replace 'check
3192 (lambda _
3193 (invoke "python" "-m" "robot" "-A"
3194 "tests/conf/default.args" "tests"))))))
3195 (propagated-inputs
3196 `(("python-robotframework" ,python-robotframework)))
3197 (home-page "https://github.com/boakley/robotframework-lint/")
3198 (synopsis "Static analysis tool (linter) for Robot Framework")
3199 (description "This package provides the @code{rflint} command-line
3200 utility, a static analysis tool (linter) for Robot Framework source files.")
3201 (license license:asl2.0))))
3202
3203 (define-public python-robotframework-sshlibrary
3204 (package
3205 (name "python-robotframework-sshlibrary")
3206 (version "3.3.0")
3207 ;; There are no tests in the PyPI archive.
3208 (source
3209 (origin
3210 (method git-fetch)
3211 (uri (git-reference
3212 (url "https://github.com/robotframework/SSHLibrary.git")
3213 (commit (string-append "v" version))))
3214 (file-name (git-file-name name version))
3215 (sha256
3216 (base32
3217 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3218 (build-system python-build-system)
3219 (arguments
3220 `(#:phases
3221 (modify-phases %standard-phases
3222 (add-before 'build 'build-and-install-doc
3223 (lambda* (#:key outputs #:allow-other-keys)
3224 (let* ((doc-output (assoc-ref outputs "doc"))
3225 (doc (string-append doc-output "/share/"
3226 ,name "-" ,version "/")))
3227 (invoke "chmod" "-R" "+w" "docs")
3228 (invoke "invoke" "kw-docs" "project-docs")
3229 (mkdir-p doc)
3230 (for-each delete-file (find-files "docs" "\\.rst"))
3231 (copy-recursively "docs" doc)
3232 #t)))
3233 (replace 'check
3234 (lambda _
3235 ;; Some tests require an SSH server; we remove them.
3236 (delete-file "utest/test_client_api.py")
3237 (delete-file "utest/test_scp.py")
3238 (invoke "python" "utest/run.py"))))))
3239 (propagated-inputs
3240 `(("python-robotframework" ,python-robotframework)
3241 ("python-paramiko" ,python-paramiko)
3242 ("python-scp" ,python-scp)))
3243 (native-inputs
3244 `(("openssh" ,openssh)
3245 ("which" ,which)
3246 ;; To generate the documentation
3247 ("python-docutils" ,python-docutils)
3248 ("python-invoke" ,python-invoke)
3249 ("python-pygments" ,python-pygments)
3250 ("python-rellu" ,python-rellu)))
3251 (outputs '("out" "doc"))
3252 (home-page "https://github.com/robotframework/SSHLibrary")
3253 (synopsis "Robot Framework library for SSH and SFTP")
3254 (description "SSHLibrary is a Robot Framework library providing support
3255 for SSH and SFTP. It has the following main usages:
3256 @itemize @bullet
3257 @item Executing commands on the remote machine, either blocking or non-blocking.
3258 @item Writing and reading in an interactive shell.
3259 @item Transferring files and directories over SFTP.
3260 @item Ensuring that files and directories exist on the remote machine.
3261 @end itemize")
3262 (license license:asl2.0)))
3263
3264 (define-public python-rstr
3265 (package
3266 (name "python-rstr")
3267 (version "2.2.6")
3268 (source
3269 (origin
3270 (method url-fetch)
3271 (uri (pypi-uri "rstr" version))
3272 (sha256
3273 (base32
3274 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3275 (build-system python-build-system)
3276 (home-page
3277 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3278 (synopsis "Generate random strings in Python")
3279 (description "This package provides a python module for generating
3280 random strings of various types. It could be useful for fuzz testing,
3281 generating dummy data, or other applications. It has no dependencies
3282 outside the standard library.")
3283 (license license:bsd-3)))
3284
3285 (define-public python-scp
3286 (package
3287 (name "python-scp")
3288 (version "0.13.2")
3289 (source
3290 (origin
3291 (method url-fetch)
3292 (uri (pypi-uri "scp" version))
3293 (sha256
3294 (base32
3295 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3296 (build-system python-build-system)
3297 (arguments
3298 '(#:tests? #f)) ;tests require an SSH server
3299 (propagated-inputs
3300 `(("python-paramiko" ,python-paramiko)))
3301 (home-page "https://github.com/jbardin/scp.py")
3302 (synopsis "SCP protocol module for Python and Paramiko")
3303 (description "The scp module extends the Paramiko library to send and
3304 receive files via the SCP1 protocol, as implemented by the OpenSSH
3305 @command{scp} program.")
3306 (license license:gpl2+)))
3307
3308 (define-public python-rst.linker
3309 (package
3310 (name "python-rst.linker")
3311 (version "1.11")
3312 (source
3313 (origin
3314 (method url-fetch)
3315 (uri (pypi-uri "rst.linker" version))
3316 (sha256
3317 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3318 (build-system python-build-system)
3319 (propagated-inputs
3320 `(("python-dateutil" ,python-dateutil)
3321 ("python-six" ,python-six)))
3322 (native-inputs
3323 `(("python-setuptools-scm" ,python-setuptools-scm)))
3324 ;; Test would require path.py, which would introduce a cyclic dependence.
3325 (arguments `(#:tests? #f))
3326 ;; Note: As of version 1.7 the documentation is not worth building.
3327 (home-page "https://github.com/jaraco/rst.linker")
3328 (synopsis "Sphinx plugin to add links and timestamps")
3329 (description "rst.linker allows to automatically replace text by a
3330 reStructuredText external reference or timestamps. It's primary purpose is to
3331 augment the changelog, but it can be used for other documents, too.")
3332 (license license:expat)))
3333
3334 (define-public python2-rst.linker
3335 (package-with-python2 python-rst.linker))
3336
3337 (define-public python-feedgenerator
3338 (package
3339 (name "python-feedgenerator")
3340 (version "1.9")
3341 (source
3342 (origin
3343 (method url-fetch)
3344 (uri (pypi-uri "feedgenerator" version))
3345 (sha256
3346 (base32
3347 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3348 (modules '((guix build utils)))
3349 (snippet
3350 '(begin
3351 ;; Remove pre-compiled .pyc files from source.
3352 (for-each delete-file-recursively
3353 (find-files "." "__pycache__" #:directories? #t))
3354 (for-each delete-file (find-files "." "\\.pyc$"))
3355 #t))))
3356 (build-system python-build-system)
3357 (propagated-inputs
3358 `(("python-pytz" ,python-pytz)
3359 ("python-six" ,python-six)))
3360 (home-page "https://github.com/getpelican/feedgenerator")
3361 (synopsis
3362 "Standalone version of Django's Atom/RSS feed generator")
3363 (description
3364 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3365 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3366 (license license:bsd-3)))
3367
3368 (define-public python2-feedgenerator
3369 (package-with-python2 python-feedgenerator))
3370
3371 (define-public python-toml
3372 (package
3373 (name "python-toml")
3374 (version "0.9.4")
3375 (source
3376 (origin
3377 (method url-fetch)
3378 (uri (pypi-uri "toml" version))
3379 (sha256
3380 (base32
3381 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3382 (build-system python-build-system)
3383 (arguments
3384 `(#:tests? #f)) ;no tests suite in release
3385 (home-page "https://github.com/uiri/toml")
3386 (synopsis "Library for TOML")
3387 (description
3388 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3389 Language (TOML) configuration files.")
3390 (license license:expat)))
3391
3392 (define-public python-jsonrpc-server
3393 (package
3394 (name "python-jsonrpc-server")
3395 (version "0.3.2")
3396 (source
3397 (origin
3398 (method url-fetch)
3399 (uri (pypi-uri "python-jsonrpc-server" version))
3400 (sha256
3401 (base32
3402 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3403 (build-system python-build-system)
3404 (propagated-inputs
3405 `(("python-future" ,python-future)
3406 ("python-mock" ,python-mock)
3407 ("python-pytest" ,python-pytest)
3408 ("python-ujson" ,python-ujson)))
3409 (home-page
3410 "https://github.com/palantir/python-jsonrpc-server")
3411 (synopsis "JSON RPC 2.0 server library")
3412 (description
3413 "This package provides a JSON RPC 2.0 server library for Python.")
3414 (license license:expat)))
3415
3416 (define-public python-pydocstyle
3417 (package
3418 (name "python-pydocstyle")
3419 (version "3.0.0")
3420 (source
3421 (origin
3422 (method url-fetch)
3423 (uri (pypi-uri "pydocstyle" version))
3424 (sha256
3425 (base32
3426 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3427 (build-system python-build-system)
3428 (propagated-inputs
3429 `(("python-six" ,python-six)
3430 ("python-snowballstemmer" ,python-snowballstemmer)))
3431 (home-page
3432 "https://github.com/PyCQA/pydocstyle/")
3433 (synopsis "Python docstring style checker")
3434 (description
3435 "This package provides a style checker for the Python Language
3436 Server (PLS).")
3437 (license license:expat)))
3438
3439 (define-public python-language-server
3440 (package
3441 (name "python-language-server")
3442 (version "0.31.7")
3443 (source
3444 (origin
3445 (method url-fetch)
3446 (uri (pypi-uri "python-language-server" version))
3447 (sha256
3448 (base32
3449 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
3450 (build-system python-build-system)
3451 (propagated-inputs
3452 `(("python-pluggy" ,python-pluggy)
3453 ("python-jsonrpc-server" ,python-jsonrpc-server)
3454 ("python-jedi" ,python-jedi)
3455 ("python-yapf" ,python-yapf)
3456 ("python-pyflakes" ,python-pyflakes)
3457 ("python-pydocstyle" ,python-pydocstyle)
3458 ("python-pycodestyle" ,python-pycodestyle)
3459 ("python-mccabe" ,python-mccabe)
3460 ("python-rope" ,python-rope)
3461 ("python-autopep8" ,python-autopep8)
3462 ("python-flake8" ,python-flake8)
3463 ("python-pylint" ,python-pylint)))
3464 (home-page "https://github.com/palantir/python-language-server")
3465 (synopsis "Python implementation of the Language Server Protocol")
3466 (description
3467 "The Python Language Server (pyls) is an implementation of the Python 3
3468 language specification for the Language Server Protocol (LSP). This tool is
3469 used in text editing environments to provide a complete and integrated
3470 feature-set for programming Python effectively.")
3471 (license license:expat)))
3472
3473 (define-public python-pathspec
3474 (package
3475 (name "python-pathspec")
3476 (version "0.7.0")
3477 (source
3478 (origin
3479 (method url-fetch)
3480 (uri (pypi-uri "pathspec" version))
3481 (sha256
3482 (base32
3483 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3484 (build-system python-build-system)
3485 (home-page "https://github.com/cpburnz/python-path-specification")
3486 (synopsis "Utility library for gitignore style pattern matching of file paths")
3487 (description
3488 "This package provides a utility library for gitignore style pattern
3489 matching of file paths.")
3490 (license license:mpl2.0)))
3491
3492 (define-public python-black
3493 (package
3494 (name "python-black")
3495 (version "19.10b0")
3496 (source
3497 (origin
3498 (method url-fetch)
3499 (uri (pypi-uri "black" version))
3500 (sha256
3501 (base32
3502 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
3503 (build-system python-build-system)
3504 (arguments
3505 `(#:phases
3506 (modify-phases %standard-phases
3507 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3508 (lambda _
3509 (let ((python3 (which "python3")))
3510 (substitute* '("tests/data/fmtonoff.py"
3511 "tests/data/string_prefixes.py"
3512 "tests/data/function.py"
3513 "tests/data/python37.py")
3514 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3515 (string-append "#!" python3 (if (string? minor-version)
3516 minor-version
3517 "")))))
3518 #t))
3519 (add-after 'unpack 'disable-broken-tests
3520 (lambda _
3521 ;; These tests are supposed to be skipped when the blackd
3522 ;; dependencies are missing, but this doesn't quite work.
3523 (substitute* "tests/test_black.py"
3524 (("( *)class BlackDTestCase.*" match indent)
3525 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3526 indent "class BlackDTestCase(unittest.TestCase):\n"))
3527 (("web.Application") "False")
3528 (("@unittest_run_loop") ""))
3529
3530 ;; Patching the above file breaks the self test
3531 (substitute* "tests/test_black.py"
3532 (("( *)def test_self" match indent)
3533 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3534 #t)))))
3535 (propagated-inputs
3536 `(("python-click" ,python-click)
3537 ("python-attrs" ,python-attrs)
3538 ("python-appdirs" ,python-appdirs)
3539 ("python-pathspec" ,python-pathspec)
3540 ("python-regex" ,python-regex)
3541 ("python-toml" ,python-toml)
3542 ("python-typed-ast" ,python-typed-ast)))
3543 (native-inputs
3544 `(("python-setuptools-scm" ,python-setuptools-scm)))
3545 (home-page "https://github.com/ambv/black")
3546 (synopsis "The uncompromising code formatter")
3547 (description "Black is the uncompromising Python code formatter.")
3548 (license license:expat)))
3549
3550 (define-public python-blinker
3551 (package
3552 (name "python-blinker")
3553 (version "1.4")
3554 (source
3555 (origin
3556 (method url-fetch)
3557 (uri (pypi-uri "blinker" version))
3558 (sha256
3559 (base32
3560 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3561 (build-system python-build-system)
3562 (home-page "https://pythonhosted.org/blinker/")
3563 (synopsis "Fast, simple object-to-object and broadcast signaling")
3564 (description
3565 "Blinker provides a fast dispatching system that allows any number of
3566 interested parties to subscribe to events, or \"signals\".")
3567 (license license:expat)))
3568
3569 (define-public python2-blinker
3570 (package-with-python2 python-blinker))
3571
3572 (define-public pelican
3573 (package
3574 (name "pelican")
3575 (version "4.2.0")
3576 (source
3577 (origin
3578 (method url-fetch)
3579 (uri (pypi-uri "pelican" version))
3580 (sha256
3581 (base32
3582 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3583 (build-system python-build-system)
3584 (propagated-inputs
3585 `(("python-blinker" ,python-blinker)
3586 ("python-dateutil" ,python-dateutil)
3587 ("python-docutils" ,python-docutils)
3588 ("python-feedgenerator" ,python-feedgenerator)
3589 ("python-jinja2" ,python-jinja2)
3590 ("python-markdown" ,python-markdown)
3591 ("python-pygments" ,python-pygments)
3592 ("python-pytz" ,python-pytz)
3593 ("python-six" ,python-six)
3594 ("python-unidecode" ,python-unidecode)))
3595 (home-page "https://getpelican.com/")
3596 (arguments
3597 `(;; XXX Requires a lot more packages to do unit tests :P
3598 #:tests? #f))
3599 (synopsis "Python-based static site publishing system")
3600 (description
3601 "Pelican is a tool to generate a static blog from reStructuredText,
3602 Markdown input files, and more. Pelican uses Jinja2 for templating
3603 and is very extensible.")
3604 (license license:agpl3+)))
3605
3606 (define-public mallard-ducktype
3607 (package
3608 (name "mallard-ducktype")
3609 (version "1.0.2")
3610 (source
3611 (origin
3612 (method git-fetch)
3613 ;; git-reference because tests are not included in pypi source tarball
3614 ;; https://issues.guix.gnu.org/issue/36755#2
3615 (uri (git-reference
3616 (url "https://github.com/projectmallard/mallard-ducktype.git")
3617 (commit version)))
3618 (file-name (git-file-name name version))
3619 (sha256
3620 (base32
3621 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3622 (build-system python-build-system)
3623 (arguments
3624 '(#:phases
3625 (modify-phases %standard-phases
3626 (replace 'check
3627 (lambda _
3628 (with-directory-excursion "tests"
3629 (invoke "sh" "runtests")))))))
3630 (home-page "http://projectmallard.org")
3631 (synopsis "Convert Ducktype to Mallard documentation markup")
3632 (description
3633 "Ducktype is a lightweight syntax that can represent all the semantics
3634 of the Mallard XML documentation system. Ducktype files can be converted to
3635 Mallard using the @command{ducktype} tool. The yelp-tools package
3636 provides additional functionality on the produced Mallard documents.")
3637 (license license:expat)))
3638
3639 (define-public python-cython
3640 (package
3641 (name "python-cython")
3642 (version "0.29.15")
3643 (source
3644 (origin
3645 (method url-fetch)
3646 (uri (pypi-uri "Cython" version))
3647 (sha256
3648 (base32
3649 "0c5cjyxfvba6c0vih1fvhywp8bpz30vwvbjqdm1q1k55xzhmkn30"))))
3650 (build-system python-build-system)
3651 ;; we need the full python package and not just the python-wrapper
3652 ;; because we need libpython3.3m.so
3653 (inputs
3654 `(("python" ,python)))
3655 (arguments
3656 `(#:phases
3657 (modify-phases %standard-phases
3658 (add-before 'check 'set-HOME
3659 ;; some tests require access to "$HOME/.cython"
3660 (lambda _ (setenv "HOME" "/tmp") #t))
3661 (replace 'check
3662 (lambda _
3663 ;; Disable compiler optimizations to greatly reduce the running
3664 ;; time of the test suite.
3665 (setenv "CFLAGS" "-O0")
3666
3667 (invoke "python" "runtests.py" "-vv"
3668 "-j" (number->string (parallel-job-count))))))))
3669 (home-page "https://cython.org/")
3670 (synopsis "C extensions for Python")
3671 (description "Cython is an optimising static compiler for both the Python
3672 programming language and the extended Cython programming language. It makes
3673 writing C extensions for Python as easy as Python itself.")
3674 (license license:asl2.0)
3675 (properties `((python2-variant . ,(delay python2-cython))))))
3676
3677 (define-public python2-cython
3678 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3679 (package
3680 (inherit base)
3681 (name "python2-cython")
3682 (inputs
3683 `(("python-2" ,python-2))) ;this is not automatically changed
3684 (arguments
3685 (substitute-keyword-arguments (package-arguments base)
3686 ((#:phases phases)
3687 `(modify-phases ,phases
3688 ;; XXX: On i686-linux, running the parallel tests fails on many-core
3689 ;; systems, see <https://github.com/cython/cython/issues/2807>.
3690 ;; TODO: Move this logic to the regular check phase in a future
3691 ;; rebuild cycle.
3692 ,@(if (string-prefix? "i686" (%current-system))
3693 '((replace 'check
3694 (lambda _
3695 (setenv "CFLAGS" "-O0")
3696 (invoke "python" "runtests.py" "-vv"
3697 "-j" (number->string (parallel-job-count))
3698 "-x" "run.parallel"))))
3699 '())
3700 (add-before 'check 'adjust-test_embed
3701 (lambda _
3702 (substitute* "runtests.py"
3703 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3704 ;; so it can give the right -L flag to GCC when embedding static
3705 ;; builds of Python. It is unaware that the Python "config"
3706 ;; directory (where the static library lives) was renamed in
3707 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3708 ;; which works fine, because that is where the shared library is.
3709 ;;
3710 ;; It also appears to be unaware that the Makefile in Demos/embed
3711 ;; already unconditionally pass the static library location to GCC,
3712 ;; after checking sysconfig.get_config_var('LIBPL).
3713 ;;
3714 ;; The effect is that the linker is unable to resolve libexpat
3715 ;; symbols when building for Python 2, because neither the Python 2
3716 ;; shared library nor Expat is available. To fix it, we can either
3717 ;; add Expat as an input and make it visible to the linker, or just
3718 ;; prevent it from overriding the Python shared library location.
3719 ;; The end result is identical, so we take the easy route.
3720 ((" or libname not in os\\.listdir\\(libdir\\)")
3721 ""))
3722 #t)))))))))
3723
3724 ;; The RPython toolchain currently does not support Python 3.
3725 (define-public python2-rpython
3726 (package
3727 (name "python2-rpython")
3728 (version "0.2.1")
3729 (source
3730 (origin
3731 (method url-fetch)
3732 (uri (pypi-uri "rpython" version))
3733 (sha256
3734 (base32
3735 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3736 (build-system python-build-system)
3737 (arguments `(#:python ,python-2))
3738 (native-inputs
3739 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3740 (home-page "https://rpython.readthedocs.org")
3741 (synopsis "Framework for implementing interpreters and virtual machines")
3742 (description "RPython is a translation and support framework for
3743 producing implementations of dynamic languages, emphasizing a clean separation
3744 between language specification and implementation aspects.")
3745 (license license:expat)))
3746
3747 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3748 ;; python-scipy still build, as these three packages are often used together.
3749 (define-public python-numpy
3750 (package
3751 (name "python-numpy")
3752 (version "1.17.3")
3753 (source
3754 (origin
3755 (method url-fetch)
3756 (uri (string-append
3757 "https://github.com/numpy/numpy/releases/download/v"
3758 version "/numpy-" version ".tar.gz"))
3759 (sha256
3760 (base32
3761 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3762 (build-system python-build-system)
3763 (inputs
3764 `(("openblas" ,openblas)
3765 ("lapack" ,lapack)))
3766 (native-inputs
3767 `(("python-cython" ,python-cython)
3768 ("python-pytest" ,python-pytest)
3769 ("gfortran" ,gfortran)))
3770 (arguments
3771 `(#:phases
3772 (modify-phases %standard-phases
3773 (add-before 'build 'configure-blas-lapack
3774 (lambda* (#:key inputs #:allow-other-keys)
3775 (call-with-output-file "site.cfg"
3776 (lambda (port)
3777 (format port
3778 "[openblas]
3779 libraries = openblas
3780 library_dirs = ~a/lib
3781 include_dirs = ~a/include
3782
3783 # backslash-n to make emacs happy
3784 \n[lapack]
3785 lapack_libs = lapack
3786 library_dirs = ~a/lib
3787 include_dirs = ~a/include
3788 "
3789 (assoc-ref inputs "openblas")
3790 (assoc-ref inputs "openblas")
3791 (assoc-ref inputs "lapack")
3792 (assoc-ref inputs "lapack"))))
3793 #t))
3794 (add-before 'build 'fix-executable-paths
3795 (lambda* (#:key inputs #:allow-other-keys)
3796 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3797 ;; instead of /bin/sh.
3798 (substitute* "numpy/distutils/exec_command.py"
3799 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3800 (string-append match-start (assoc-ref inputs "bash") match-end)))
3801 ;; Use "gcc" executable, not "cc".
3802 (substitute* "numpy/distutils/system_info.py"
3803 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3804 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3805 #t))
3806 ;; Tests can only be run after the library has been installed and not
3807 ;; within the source directory.
3808 (delete 'check)
3809 (add-after 'install 'check
3810 (lambda* (#:key outputs inputs #:allow-other-keys)
3811 ;; Make installed package available for running the tests
3812 (add-installed-pythonpath inputs outputs)
3813 ;; Make sure "f2py" etc is found.
3814 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3815 ":" (getenv "PATH")))
3816 (with-directory-excursion "/tmp"
3817 (invoke "python" "-c"
3818 "import numpy; numpy.test(verbose=2)")))))))
3819 (home-page "https://numpy.org")
3820 (synopsis "Fundamental package for scientific computing with Python")
3821 (description "NumPy is the fundamental package for scientific computing
3822 with Python. It contains among other things: a powerful N-dimensional array
3823 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3824 and Fortran code, useful linear algebra, Fourier transform, and random number
3825 capabilities.")
3826 (properties `((python2-variant . ,(delay python2-numpy))))
3827 (license license:bsd-3)))
3828
3829 ;; Numpy 1.16.x are the last versions that support Python 2.
3830 (define-public python2-numpy
3831 (let ((numpy (package-with-python2
3832 (strip-python2-variant python-numpy))))
3833 (package/inherit
3834 numpy
3835 (version "1.16.5")
3836 (source (origin
3837 (method url-fetch)
3838 (uri (string-append
3839 "https://github.com/numpy/numpy/releases/download/v"
3840 version "/numpy-" version ".tar.gz"))
3841 (sha256
3842 (base32
3843 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3844
3845 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3846 ;; interest only for legacy code going back to NumPy's predecessor
3847 ;; Numeric.
3848 (define-public python2-numpy-1.8
3849 (package (inherit python2-numpy)
3850 (version "1.8.2")
3851 (source
3852 (origin
3853 (method git-fetch)
3854 (uri (git-reference
3855 (url "https://github.com/numpy/numpy")
3856 (commit (string-append "v" version))))
3857 (file-name (git-file-name "numpy" version))
3858 (sha256
3859 (base32
3860 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3861 (arguments
3862 (substitute-keyword-arguments (package-arguments python2-numpy)
3863 ((#:phases phases)
3864 `(modify-phases ,phases
3865 (replace 'configure-blas-lapack
3866 (lambda* (#:key inputs #:allow-other-keys)
3867 (call-with-output-file "site.cfg"
3868 (lambda (port)
3869 (format port
3870 "[openblas]
3871 libraries = openblas,lapack
3872 library_dirs = ~a/lib:~a/lib
3873 include_dirs = ~a/include:~a/include
3874 "
3875 (assoc-ref inputs "openblas")
3876 (assoc-ref inputs "lapack")
3877 (assoc-ref inputs "openblas")
3878 (assoc-ref inputs "lapack"))))
3879 #t))))))
3880 (native-inputs
3881 `(("python2-nose" ,python2-nose)))
3882 (description "NumPy is the fundamental package for scientific computing
3883 with Python. It contains among other things: a powerful N-dimensional array
3884 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3885 and Fortran code, useful linear algebra, Fourier transform, and random number
3886 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3887 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3888 Numeric.")
3889 (license license:bsd-3)))
3890
3891 (define-public python-munch
3892 (package
3893 (name "python-munch")
3894 (version "2.0.4")
3895 (source
3896 (origin
3897 (method url-fetch)
3898 (uri (pypi-uri "munch" version))
3899 (sha256
3900 (base32
3901 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3902 (build-system python-build-system)
3903 (home-page "https://github.com/Infinidat/munch")
3904 (synopsis "Dot-accessible dictionary")
3905 (description "Munch is a dot-accessible dictionary similar to JavaScript
3906 objects.")
3907 (license license:expat)))
3908
3909 (define-public python2-munch
3910 (package-with-python2 python-munch))
3911
3912 (define-public python-colormath
3913 (package
3914 (name "python-colormath")
3915 (version "3.0.0")
3916 (source
3917 (origin
3918 (method url-fetch)
3919 (uri (pypi-uri "colormath" version))
3920 (sha256
3921 (base32
3922 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3923 (build-system python-build-system)
3924 (propagated-inputs
3925 `(("python-networkx" ,python-networkx)
3926 ("python-numpy" ,python-numpy)))
3927 (home-page "https://github.com/gtaylor/python-colormath")
3928 (synopsis "Color math and conversion library")
3929 (description
3930 "This is a Python library for color math and conversions.")
3931 (license license:bsd-3)))
3932
3933 (define-public python2-colormath
3934 (package-with-python2 python-colormath))
3935
3936 (define-public python-spectra
3937 (package
3938 (name "python-spectra")
3939 (version "0.0.11")
3940 (source
3941 (origin
3942 (method url-fetch)
3943 (uri (pypi-uri "spectra" version))
3944 (sha256
3945 (base32
3946 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3947 (build-system python-build-system)
3948 (arguments
3949 `(#:phases
3950 (modify-phases %standard-phases
3951 (replace 'check
3952 (lambda _ (invoke "nosetests" "-v"))))))
3953 (propagated-inputs
3954 `(("python-colormath" ,python-colormath)))
3955 (native-inputs
3956 `(("python-nose" ,python-nose)))
3957 (home-page "https://github.com/jsvine/spectra")
3958 (synopsis "Color scales and color conversion")
3959 (description
3960 "This package provides a Python library intended to make color math,
3961 color scales, and color space conversion easy. It has support for:
3962
3963 @enumerate
3964 @item Color scales
3965 @item Color ranges
3966 @item Color blending
3967 @item Brightening/darkening colors
3968 @item Saturating/desaturating colors
3969 @item Conversion to/from multiple color spaces.
3970 @end enumerate\n")
3971 (license license:expat)))
3972
3973 (define-public python2-spectra
3974 (package-with-python2 python-spectra))
3975
3976 (define-public python-numpy-documentation
3977 (package
3978 (name "python-numpy-documentation")
3979 (version (package-version python-numpy))
3980 (source (package-source python-numpy))
3981 (build-system python-build-system)
3982 (native-inputs
3983 `(("python-matplotlib" ,python-matplotlib)
3984 ("python-numpy" ,python-numpy)
3985 ("pkg-config" ,pkg-config)
3986 ("python-sphinx" ,python-sphinx)
3987 ("python-numpydoc" ,python-numpydoc)
3988 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3989 texlive-fonts-ec
3990 texlive-generic-ifxetex
3991 texlive-generic-pdftex
3992 texlive-amsfonts
3993 texlive-latex-capt-of
3994 texlive-latex-cmap
3995 texlive-latex-environ
3996 texlive-latex-eqparbox
3997 texlive-latex-etoolbox
3998 texlive-latex-expdlist
3999 texlive-latex-fancyhdr
4000 texlive-latex-fancyvrb
4001 texlive-latex-fncychap
4002 texlive-latex-float
4003 texlive-latex-framed
4004 texlive-latex-geometry
4005 texlive-latex-graphics
4006 texlive-latex-hyperref
4007 texlive-latex-mdwtools
4008 texlive-latex-multirow
4009 texlive-latex-needspace
4010 texlive-latex-oberdiek
4011 texlive-latex-parskip
4012 texlive-latex-preview
4013 texlive-latex-tabulary
4014 texlive-latex-threeparttable
4015 texlive-latex-titlesec
4016 texlive-latex-trimspaces
4017 texlive-latex-ucs
4018 texlive-latex-upquote
4019 texlive-latex-url
4020 texlive-latex-varwidth
4021 texlive-latex-wrapfig)))
4022 ("texinfo" ,texinfo)
4023 ("perl" ,perl)
4024 ("scipy-sphinx-theme"
4025 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4026 (method git-fetch)
4027 (uri (git-reference
4028 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4029 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4030 (sha256
4031 (base32
4032 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4033 ,@(package-native-inputs python-numpy)))
4034 (arguments
4035 `(#:tests? #f ; we're only generating the documentation
4036 #:phases
4037 (modify-phases %standard-phases
4038 (delete 'build)
4039 (replace 'install
4040 (lambda* (#:key inputs outputs #:allow-other-keys)
4041 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4042 (doc (string-append
4043 data "/doc/" ,name "-"
4044 ,(package-version python-numpy)))
4045 (info-reader (string-append data "/info"))
4046 (html (string-append doc "/html"))
4047 (scipy-sphinx-theme "scipy-sphinx-theme")
4048 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4049 (pyver ,(string-append "PYVER=")))
4050
4051 ;; FIXME: this is needed to for texlive-union to generate
4052 ;; fonts, which are not found.
4053 (setenv "HOME" "/tmp")
4054
4055 (with-directory-excursion "doc"
4056 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4057 (mkdir-p html)
4058 (invoke "make" "html" pyver)
4059 (invoke "make" "latex" "PAPER=a4" pyver)
4060 (invoke "make" "-C" "build/latex"
4061 "all-pdf" "PAPER=a4" pyver)
4062 ;; FIXME: Generation of the info file fails.
4063 ;; (invoke "make" "info" pyver)
4064 ;; (mkdir-p info)
4065 ;; (copy-file "build/texinfo/numpy.info"
4066 ;; (string-append info "/numpy.info"))
4067 (for-each (lambda (file)
4068 (copy-file (string-append "build/latex" file)
4069 (string-append doc file)))
4070 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4071 (with-directory-excursion "build/html"
4072 (for-each (lambda (file)
4073 (let* ((dir (dirname file))
4074 (tgt-dir (string-append html "/" dir)))
4075 (unless (equal? "." dir)
4076 (mkdir-p tgt-dir))
4077 (install-file file html)))
4078 (find-files "." ".*")))))
4079 #t)))))
4080 (home-page (package-home-page python-numpy))
4081 (synopsis "Documentation for the python-numpy package")
4082 (description (package-description python-numpy))
4083 (license (package-license python-numpy))))
4084
4085 (define-public python2-numpy-documentation
4086 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4087 (package
4088 (inherit numpy-documentation)
4089 (native-inputs `(("python2-functools32" ,python2-functools32)
4090 ,@(package-native-inputs numpy-documentation))))))
4091
4092 (define-public python-pygit2
4093 (package
4094 (name "python-pygit2")
4095 (version "1.1.0")
4096 (source
4097 (origin
4098 (method url-fetch)
4099 (uri (pypi-uri "pygit2" version))
4100 (sha256
4101 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4102 (build-system python-build-system)
4103 (arguments
4104 '(#:tests? #f)) ; tests don't run correctly in our environment
4105 (propagated-inputs
4106 `(("python-cached-property" ,python-cached-property)
4107 ("python-cffi" ,python-cffi)
4108 ("libgit2" ,libgit2)))
4109 (native-inputs
4110 `(("python-pytest" ,python-pytest)))
4111 (home-page "https://github.com/libgit2/pygit2")
4112 (synopsis "Python bindings for libgit2")
4113 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4114 library, libgit2 implements Git plumbing.")
4115 ;; GPL2.0 only, with linking exception.
4116 (license license:gpl2)))
4117
4118 (define-public python-pyparsing
4119 (package
4120 (name "python-pyparsing")
4121 (version "2.3.1")
4122 (source
4123 (origin
4124 (method url-fetch)
4125 (uri (pypi-uri "pyparsing" version))
4126 (sha256
4127 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
4128 (build-system python-build-system)
4129 (outputs '("out" "doc"))
4130 (arguments
4131 `(#:tests? #f ; no test target
4132 #:phases
4133 (modify-phases %standard-phases
4134 (add-after 'install 'install-doc
4135 (lambda* (#:key outputs #:allow-other-keys)
4136 (let* ((doc (string-append (assoc-ref outputs "doc")
4137 "/share/doc/" ,name "-" ,version))
4138 (html-doc (string-append doc "/html"))
4139 (examples (string-append doc "/examples")))
4140 (mkdir-p html-doc)
4141 (mkdir-p examples)
4142 (for-each
4143 (lambda (dir tgt)
4144 (map (lambda (file)
4145 (install-file file tgt))
4146 (find-files dir ".*")))
4147 (list "docs" "htmldoc" "examples")
4148 (list doc html-doc examples))
4149 #t))))))
4150 (home-page "https://github.com/pyparsing/pyparsing")
4151 (synopsis "Python parsing class library")
4152 (description
4153 "The pyparsing module is an alternative approach to creating and
4154 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4155 of regular expressions. The pyparsing module provides a library of classes
4156 that client code uses to construct the grammar directly in Python code.")
4157 (license license:expat)))
4158
4159 (define-public python2-pyparsing
4160 (package-with-python2 python-pyparsing))
4161
4162 (define-public python-numpydoc
4163 (package
4164 (name "python-numpydoc")
4165 (version "0.8.0")
4166 (source
4167 (origin
4168 (method url-fetch)
4169 (uri (pypi-uri "numpydoc" version))
4170 (sha256
4171 (base32
4172 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4173 (build-system python-build-system)
4174 (propagated-inputs
4175 `(("python-sphinx" ,python-sphinx)))
4176 (native-inputs
4177 `(("python-nose" ,python-nose)))
4178 (home-page "https://pypi.org/project/numpydoc/")
4179 (synopsis
4180 "Numpy's Sphinx extensions")
4181 (description
4182 "Sphinx extension to support docstrings in Numpy format.")
4183 (license license:bsd-2)))
4184
4185 (define-public python2-numpydoc
4186 (package-with-python2 python-numpydoc))
4187
4188 (define-public python-numexpr
4189 (package
4190 (name "python-numexpr")
4191 (version "2.6.5")
4192 (source
4193 (origin
4194 (method url-fetch)
4195 (uri (pypi-uri "numexpr" version))
4196 (sha256
4197 (base32
4198 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4199 (build-system python-build-system)
4200 (arguments `(#:tests? #f)) ; no tests included
4201 (propagated-inputs
4202 `(("python-numpy" ,python-numpy)))
4203 (home-page "https://github.com/pydata/numexpr")
4204 (synopsis "Fast numerical expression evaluator for NumPy")
4205 (description
4206 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4207 expressions that operate on arrays are accelerated and use less memory than
4208 doing the same calculation in Python. In addition, its multi-threaded
4209 capabilities can make use of all your cores, which may accelerate
4210 computations, most specially if they are not memory-bounded (e.g. those using
4211 transcendental functions).")
4212 (license license:expat)))
4213
4214 (define-public python2-numexpr
4215 (package-with-python2 python-numexpr))
4216
4217 (define-public python-cycler
4218 (package
4219 (name "python-cycler")
4220 (version "0.10.0")
4221 (source (origin
4222 (method url-fetch)
4223 (uri (pypi-uri "cycler" version))
4224 (sha256
4225 (base32
4226 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4227 (build-system python-build-system)
4228 (arguments
4229 ;; XXX: The current version requires 'coveralls' which we don't have.
4230 ;; Enable this for the next release which uses 'python-pytest'.
4231 '(#:tests? #f))
4232 (propagated-inputs
4233 `(("python-six" ,python-six)))
4234 (home-page "http://matplotlib.org/cycler/")
4235 (synopsis "Composable keyword argument iterator")
4236 (description
4237 "When using @code{matplotlib} and plotting more than one line, it is
4238 common to want to be able to want to be able to cycle over one or more artist
4239 styles; but the plotting logic can quickly become involved.
4240 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4241 @code{Cycler} class was developed.")
4242 (license license:bsd-3)))
4243
4244 (define-public python2-cycler
4245 (package-with-python2 python-cycler))
4246
4247 (define-public python-colorspacious
4248 (package
4249 (name "python-colorspacious")
4250 (version "1.1.2")
4251 (source
4252 (origin
4253 (method git-fetch)
4254 (uri (git-reference
4255 (url "https://github.com/njsmith/colorspacious.git")
4256 (commit (string-append "v" version))))
4257 (file-name (git-file-name name version))
4258 (sha256
4259 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4260 (build-system python-build-system)
4261 (propagated-inputs
4262 `(("python-numpy" ,python-numpy)))
4263 (native-inputs
4264 `(("python-nose" ,python-nose)))
4265 (arguments
4266 `(#:phases
4267 (modify-phases %standard-phases
4268 (replace 'check
4269 (lambda _
4270 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4271 (home-page "https://github.com/njsmith/colorspacious")
4272 (synopsis "Python library for colorspace conversions")
4273 (description "@code{colorspacious} is a Python library that lets you
4274 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4275 (license license:expat)))
4276
4277 (define-public python2-colorspacious
4278 (package-with-python2 python-colorspacious))
4279
4280 (define-public python-matplotlib
4281 (package
4282 (name "python-matplotlib")
4283 (version "3.1.2")
4284 (source
4285 (origin
4286 (method url-fetch)
4287 (uri (pypi-uri "matplotlib" version))
4288 (sha256
4289 (base32
4290 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4291 (build-system python-build-system)
4292 (propagated-inputs ; the following packages are all needed at run time
4293 `(("python-cycler" ,python-cycler)
4294 ("python-kiwisolver" ,python-kiwisolver)
4295 ("python-pyparsing" ,python-pyparsing)
4296 ("python-pygobject" ,python-pygobject)
4297 ("gobject-introspection" ,gobject-introspection)
4298 ("python-tkinter" ,python "tk")
4299 ("python-dateutil" ,python-dateutil)
4300 ("python-numpy" ,python-numpy)
4301 ("python-pillow" ,python-pillow)
4302 ("python-pytz" ,python-pytz)
4303 ("python-six" ,python-six)
4304 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4305 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4306 ;; object. For this reason we need to import both libraries.
4307 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4308 ("python-pycairo" ,python-pycairo)
4309 ("python-cairocffi" ,python-cairocffi)))
4310 (inputs
4311 `(("libpng" ,libpng)
4312 ("imagemagick" ,imagemagick)
4313 ("freetype" ,freetype)
4314 ("cairo" ,cairo)
4315 ("glib" ,glib)
4316 ;; FIXME: Add backends when available.
4317 ;("python-wxpython" ,python-wxpython)
4318 ("tcl" ,tcl)
4319 ("tk" ,tk)))
4320 (native-inputs
4321 `(("pkg-config" ,pkg-config)
4322 ("python-pytest" ,python-pytest)
4323 ("python-mock" ,python-mock)
4324 ("unzip" ,unzip)
4325 ("jquery-ui"
4326 ,(origin
4327 (method url-fetch)
4328 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4329 (sha256
4330 (base32
4331 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4332 (arguments
4333 `(#:phases
4334 (modify-phases %standard-phases
4335 ;; XXX We disable all image comparison tests because we're using a
4336 ;; newer version of FreeType than matplotlib expects. This leads to
4337 ;; minor differences throughout the tests.
4338 (add-after 'unpack 'fix-and-disable-failing-tests
4339 (lambda _
4340 (substitute* (append (find-files "lib/matplotlib/tests/"
4341 "test_.*\\.py$")
4342 (find-files "lib/mpl_toolkits/tests"
4343 "test_.*\\.py$"))
4344 (("^from matplotlib" match)
4345 (string-append "import pytest\n" match))
4346 (("( *)@image_comparison" match indent)
4347 (string-append indent
4348 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4349 match)))
4350 (substitute* "lib/matplotlib/tests/test_animation.py"
4351 (("/bin/sh") (which "sh")))
4352 (for-each delete-file
4353 ;; test_normal_axes, test_get_tightbbox_polar
4354 '("lib/matplotlib/tests/test_axes.py"
4355 ;; We don't use the webagg backend and this test forces it.
4356 "lib/matplotlib/tests/test_backend_webagg.py"
4357 ;; test_outward_ticks
4358 "lib/matplotlib/tests/test_tightlayout.py"
4359 ;; test_hidden_axes fails with minor extent
4360 ;; differences, possibly due to the use of a
4361 ;; different version of FreeType.
4362 "lib/matplotlib/tests/test_constrainedlayout.py"
4363 ;; Fontconfig returns no fonts.
4364 "lib/matplotlib/tests/test_font_manager.py"))
4365 #t))
4366 (add-before 'install 'install-jquery-ui
4367 (lambda* (#:key outputs inputs #:allow-other-keys)
4368 (let ((dir (string-append (assoc-ref outputs "out")
4369 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4370 (mkdir-p dir)
4371 (invoke "unzip"
4372 (assoc-ref inputs "jquery-ui")
4373 "-d" dir))
4374 #t))
4375 (replace 'check
4376 (lambda* (#:key outputs inputs #:allow-other-keys)
4377 (add-installed-pythonpath inputs outputs)
4378 (invoke "python" "tests.py" "-v"
4379 "-m" "not network and not webagg")))
4380 (add-before 'build 'configure-environment
4381 (lambda* (#:key outputs inputs #:allow-other-keys)
4382 (let ((cairo (assoc-ref inputs "cairo")))
4383 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4384 ;; has not effect.
4385 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4386 (setenv "HOME" (getcwd))
4387 (call-with-output-file "setup.cfg"
4388 (lambda (port)
4389 (format port "[directories]~%
4390 basedirlist = ~a,~a~%
4391 [packages]~%
4392 tests = True~%"
4393 (assoc-ref inputs "tcl")
4394 (assoc-ref inputs "tk")))))
4395 #t)))))
4396 (home-page "https://matplotlib.org/")
4397 (synopsis "2D plotting library for Python")
4398 (description
4399 "Matplotlib is a Python 2D plotting library which produces publication
4400 quality figures in a variety of hardcopy formats and interactive environments
4401 across platforms. Matplotlib can be used in Python scripts, the python and
4402 ipython shell, web application servers, and six graphical user interface
4403 toolkits.")
4404 (license license:psfl)
4405 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4406
4407 (define-public python2-matplotlib
4408 (let ((matplotlib (package-with-python2
4409 (strip-python2-variant python-matplotlib))))
4410 (package (inherit matplotlib)
4411 (version "2.2.4")
4412 (source
4413 (origin
4414 (method url-fetch)
4415 (uri (pypi-uri "matplotlib" version))
4416 (sha256
4417 (base32
4418 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4419 (arguments
4420 (substitute-keyword-arguments (package-arguments matplotlib)
4421 ((#:phases phases)
4422 `(modify-phases ,phases
4423 (replace 'install-jquery-ui
4424 (lambda* (#:key outputs inputs #:allow-other-keys)
4425 (let ((dir (string-append (assoc-ref outputs "out")
4426 "/lib/python2.7/site-packages/"
4427 "matplotlib/backends/web_backend/")))
4428 (mkdir-p dir)
4429 (invoke "unzip"
4430 (assoc-ref inputs "jquery-ui")
4431 "-d" dir))
4432 #t))
4433 (delete 'fix-and-disable-failing-tests)
4434 (delete 'check))))) ; These tests weren't run the the past.
4435 ;; Make sure to use special packages for Python 2 instead
4436 ;; of those automatically rewritten by package-with-python2.
4437 (propagated-inputs
4438 `(("python2-pycairo" ,python2-pycairo)
4439 ("python2-backports-functools-lru-cache"
4440 ,python2-backports-functools-lru-cache)
4441 ("python2-functools32" ,python2-functools32)
4442 ("python2-pygobject-2" ,python2-pygobject-2)
4443 ("python2-subprocess32" ,python2-subprocess32)
4444 ("python2-tkinter" ,python-2 "tk")
4445 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4446 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4447
4448 (define-public python-matplotlib-documentation
4449 (package
4450 (name "python-matplotlib-documentation")
4451 (version (package-version python-matplotlib))
4452 (source (package-source python-matplotlib))
4453 (build-system python-build-system)
4454 (native-inputs
4455 `(("python-matplotlib" ,python-matplotlib)
4456 ("python-colorspacious" ,python-colorspacious)
4457 ("python-sphinx" ,python-sphinx)
4458 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4459 ("python-sphinx-gallery" ,python-sphinx-gallery)
4460 ("python-numpydoc" ,python-numpydoc)
4461 ("python-ipython" ,python-ipython)
4462 ("python-ipykernel" ,python-ipykernel)
4463 ("python-mock" ,python-mock)
4464 ("graphviz" ,graphviz)
4465 ("texlive" ,(texlive-union (list texlive-amsfonts
4466 texlive-latex-amsmath
4467 texlive-latex-enumitem
4468 texlive-latex-expdlist
4469 texlive-latex-geometry
4470 texlive-latex-preview
4471 texlive-latex-type1cm
4472 texlive-latex-ucs
4473
4474 texlive-generic-pdftex
4475
4476 texlive-fonts-ec
4477 texlive-fonts-adobe-times
4478 texlive-fonts-txfonts)))
4479 ("texinfo" ,texinfo)
4480 ,@(package-native-inputs python-matplotlib)))
4481 (arguments
4482 `(#:tests? #f ; we're only generating documentation
4483 #:phases
4484 (modify-phases %standard-phases
4485 ;; The tests in python-matplotlib are run after the install phase, so
4486 ;; we need to delete the extra phase here.
4487 (delete 'check)
4488 (replace 'build
4489 (lambda _
4490 (chdir "doc")
4491 (setenv "PYTHONPATH"
4492 (string-append (getenv "PYTHONPATH")
4493 ":" (getcwd) "/../examples/units"))
4494 (substitute* "conf.py"
4495 ;; Don't use git.
4496 (("^SHA = check_output.*")
4497 (string-append "SHA = \"" ,version "\"\n"))
4498 ;; Don't fetch intersphinx files from the Internet
4499 (("^explicit_order_folders" m)
4500 (string-append "intersphinx_mapping = {}\n" m))
4501 (("'sphinx.ext.intersphinx',") "")
4502 ;; Disable URL embedding which requires internet access.
4503 (("'https://docs.scipy.org/doc/numpy'") "None")
4504 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4505 (invoke "make"
4506 "SPHINXBUILD=sphinx-build"
4507 "SPHINXOPTS=" ; don't abort on warnings
4508 "html" "texinfo")))
4509 (replace 'install
4510 (lambda* (#:key inputs outputs #:allow-other-keys)
4511 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4512 (doc (string-append data "/doc/python-matplotlib-" ,version))
4513 (info (string-append data "/info"))
4514 (html (string-append doc "/html")))
4515 (mkdir-p html)
4516 (mkdir-p info)
4517 (copy-recursively "build/html" html)
4518 (symlink (string-append html "/_images")
4519 (string-append info "/matplotlib-figures"))
4520 (with-directory-excursion "build/texinfo"
4521 (substitute* "matplotlib.texi"
4522 (("@image\\{([^,]*)" all file)
4523 (string-append "@image{matplotlib-figures/" file)))
4524 (symlink (string-append html "/_images")
4525 "./matplotlib-figures")
4526 (invoke "makeinfo" "--no-split"
4527 "-o" "matplotlib.info" "matplotlib.texi"))
4528 (install-file "build/texinfo/matplotlib.info" info))
4529 #t)))))
4530 (home-page (package-home-page python-matplotlib))
4531 (synopsis "Documentation for the python-matplotlib package")
4532 (description (package-description python-matplotlib))
4533 (license (package-license python-matplotlib))))
4534
4535 (define-public python2-matplotlib-documentation
4536 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4537 (package
4538 (inherit parent)
4539 (native-inputs
4540 (alist-delete "python-sphinx-copybutton"
4541 (package-native-inputs parent))))))
4542
4543 (define-public python-matplotlib-venn
4544 (package
4545 (name "python-matplotlib-venn")
4546 (version "0.11.5")
4547 (source
4548 (origin
4549 (method url-fetch)
4550 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4551 (sha256
4552 (base32
4553 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4554 (build-system python-build-system)
4555 (arguments '(#:tests? #f)) ; tests are not included
4556 (propagated-inputs
4557 `(("python-matplotlib" ,python-matplotlib)
4558 ("python-numpy" ,python-numpy)
4559 ("python-scipy" ,python-scipy)))
4560 (native-inputs
4561 `(("unzip" ,unzip)))
4562 (home-page "https://github.com/konstantint/matplotlib-venn")
4563 (synopsis "Plot area-proportional Venn diagrams")
4564 (description
4565 "This package provides tools for plotting area-proportional two- and
4566 three-way Venn diagrams in @code{matplotlib}.")
4567 (license license:expat)))
4568
4569 (define-public python2-pysnptools
4570 (package
4571 (name "python2-pysnptools")
4572 (version "0.3.13")
4573 (source
4574 (origin
4575 (method url-fetch)
4576 (uri (pypi-uri "pysnptools" version))
4577 (sha256
4578 (base32
4579 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4580 (build-system python-build-system)
4581 (arguments
4582 `(#:python ,python-2 ; only Python 2.7 is supported
4583 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4584 (propagated-inputs
4585 `(("python2-numpy" ,python2-numpy)
4586 ("python2-scipy" ,python2-scipy)
4587 ("python2-pandas" ,python2-pandas)))
4588 (native-inputs
4589 `(("python2-cython" ,python2-cython)))
4590 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4591 (synopsis "Library for reading and manipulating genetic data")
4592 (description
4593 "PySnpTools is a library for reading and manipulating genetic data. It
4594 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4595 those files. It can also efficiently manipulate ranges of integers using set
4596 operators such as union, intersection, and difference.")
4597 (license license:asl2.0)))
4598
4599 (define-public python-socksipy-branch
4600 (package
4601 (name "python-socksipy-branch")
4602 (version "1.01")
4603 (source
4604 (origin
4605 (method url-fetch)
4606 (uri (pypi-uri "SocksiPy-branch" version))
4607 (sha256
4608 (base32
4609 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4610 (build-system python-build-system)
4611 (arguments
4612 `(#:tests? #f)) ; There are no tests
4613 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4614 (synopsis "Python SOCKS module")
4615 (description
4616 "SocksiPy - A Python SOCKS client module. It provides a
4617 socket-like interface that supports connections to any TCP
4618 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4619 The original version was developed by Dan Haim, this is a
4620 branch created by Mario Vilas to address some open issues,
4621 as the original project seems to have been abandoned circa 2007.")
4622 (license license:bsd-3)))
4623
4624 (define-public python2-socksipy-branch
4625 (package-with-python2 python-socksipy-branch))
4626
4627 (define-public python-socksipychain
4628 (package
4629 (name "python-socksipychain")
4630 (version "2.1.0")
4631 (source
4632 (origin
4633 (method git-fetch)
4634 (uri (git-reference
4635 (url "https://github.com/pagekite/PySocksipyChain.git")
4636 (commit (string-append "v" version))))
4637 (file-name (git-file-name name version))
4638 (sha256
4639 (base32
4640 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4641 (build-system python-build-system)
4642 (arguments
4643 `(#:tests? #f)) ; Tests try to access the network.
4644 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4645 (synopsis "Python SOCKS module with chained proxies support")
4646 (description
4647 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4648 adds support for arbitrary chaining of proxy servers and various modes of
4649 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4650 a simple netcat replacement with chaining support.")
4651 (license license:bsd-3)))
4652
4653 (define-public python-pycodestyle
4654 (package
4655 (name "python-pycodestyle")
4656 (version "2.5.0")
4657 (source
4658 (origin
4659 (method url-fetch)
4660 (uri (pypi-uri "pycodestyle" version))
4661 (sha256
4662 (base32
4663 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4664 (build-system python-build-system)
4665 (home-page "https://pycodestyle.readthedocs.io/")
4666 (synopsis "Python style guide checker")
4667 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4668 Python code against some of the style conventions in
4669 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4670 (license license:expat)))
4671
4672 (define-public python2-pycodestyle
4673 (package-with-python2 python-pycodestyle))
4674
4675 (define-public python-multidict
4676 (package
4677 (name "python-multidict")
4678 (version "4.7.5")
4679 (source
4680 (origin
4681 (method url-fetch)
4682 (uri (pypi-uri "multidict" version))
4683 (sha256
4684 (base32
4685 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
4686 (build-system python-build-system)
4687 (arguments
4688 '(#:modules ((ice-9 ftw)
4689 (srfi srfi-1)
4690 (srfi srfi-26)
4691 (guix build utils)
4692 (guix build python-build-system))
4693 #:phases (modify-phases %standard-phases
4694 (replace 'check
4695 (lambda* (#:key tests? #:allow-other-keys)
4696 (if tests?
4697 (begin
4698 (let ((libdir (find (cut string-prefix? "lib." <>)
4699 (scandir "build"))))
4700 (setenv "PYTHONPATH"
4701 (string-append "./build/" libdir ":"
4702 (getenv "PYTHONPATH")))
4703 (invoke "pytest" "-vv")))
4704 (format #t "test suite not run~%"))
4705 #t)))))
4706 (native-inputs
4707 `(("python-pytest" ,python-pytest)
4708 ("python-pytest-cov" ,python-pytest-cov)))
4709 (home-page "https://github.com/aio-libs/multidict/")
4710 (synopsis "Multidict implementation")
4711 (description "Multidict is dict-like collection of key-value pairs
4712 where key might be occurred more than once in the container.")
4713 (license license:asl2.0)))
4714
4715 (define-public python-orderedmultidict
4716 (package
4717 (name "python-orderedmultidict")
4718 (version "0.7.11")
4719 (source
4720 (origin
4721 (method url-fetch)
4722 (uri (pypi-uri "orderedmultidict" version))
4723 (sha256
4724 (base32
4725 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4726 (build-system python-build-system)
4727 (arguments
4728 `(#:phases
4729 (modify-phases %standard-phases
4730 (add-after 'unpack 'fix-tests
4731 (lambda _
4732 ;; The package uses nosetest for running the tests.
4733 ;; Adding this initfile allows to run the test suite
4734 ;; without requiring nosetest.
4735 (with-output-to-file "tests/__init__.py" newline)
4736 #t)))))
4737 (propagated-inputs
4738 `(("python-six" ,python-six)))
4739 (native-inputs
4740 `(("python-pycodestyle" ,python-pycodestyle)))
4741 (home-page "https://github.com/gruns/orderedmultidict")
4742 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4743 (description "This package contains a library for ordered multivalue
4744 dictionaries. A multivalue dictionary is a dictionary that can store
4745 multiple values for the same key. An ordered multivalue dictionary is a
4746 multivalue dictionary that retains the order of insertions and deletions.")
4747 (license license:unlicense)))
4748
4749 (define-public python2-orderedmultidict
4750 (package-with-python2 python-orderedmultidict))
4751
4752 (define-public python-autopep8
4753 (package
4754 (name "python-autopep8")
4755 (version "1.3.5")
4756 (source
4757 (origin
4758 (method url-fetch)
4759 (uri (pypi-uri "autopep8" version))
4760 (sha256
4761 (base32
4762 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4763 (build-system python-build-system)
4764 (propagated-inputs
4765 `(("python-pycodestyle" ,python-pycodestyle)))
4766 (home-page "https://github.com/hhatto/autopep8")
4767 (synopsis "Format Python code according to the PEP 8 style guide")
4768 (description
4769 "@code{autopep8} automatically formats Python code to conform to
4770 the PEP 8 style guide. It uses the pycodestyle utility to determine
4771 what parts of the code needs to be formatted. @code{autopep8} is
4772 capable of fixing most of the formatting issues that can be reported
4773 by pycodestyle.")
4774 (license (license:non-copyleft
4775 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4776
4777 (define-public python2-autopep8
4778 (package-with-python2 python-autopep8))
4779
4780 (define-public python-distlib
4781 (package
4782 (name "python-distlib")
4783 (version "0.3.0")
4784 (source
4785 (origin
4786 (method url-fetch)
4787 (uri (pypi-uri "distlib" version ".zip"))
4788 (sha256
4789 (base32
4790 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4791 (build-system python-build-system)
4792 (arguments
4793 `(#:phases
4794 (modify-phases %standard-phases
4795 (add-before 'build 'no-/bin/sh
4796 (lambda _
4797 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4798 (("/bin/sh") (which "sh")))
4799 #t))
4800 (add-before 'check 'prepare-test-env
4801 (lambda _
4802 (setenv "HOME" "/tmp")
4803 ;; NOTE: Any value works, the variable just has to be present.
4804 (setenv "SKIP_ONLINE" "1")
4805 #t)))))
4806 (native-inputs `(("unzip" ,unzip)))
4807 (home-page "https://bitbucket.org/pypa/distlib")
4808 (synopsis "Distribution utilities")
4809 (description "Distlib is a library which implements low-level functions that
4810 relate to packaging and distribution of Python software. It is intended to be
4811 used as the basis for third-party packaging tools.")
4812 (license license:psfl)))
4813
4814 (define-public python-distutils-extra
4815 (package
4816 (name "python-distutils-extra")
4817 (version "2.38")
4818 (source
4819 (origin
4820 (method url-fetch)
4821 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4822 version "/+download/python-distutils-extra-"
4823 version ".tar.gz"))
4824 (sha256
4825 (base32
4826 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4827 (build-system python-build-system)
4828 (home-page "https://launchpad.net/python-distutils-extra/")
4829 (synopsis "Enhancements to Python's distutils")
4830 (description
4831 "The python-distutils-extra module enables you to easily integrate
4832 gettext support, themed icons, and scrollkeeper-based documentation into
4833 Python's distutils.")
4834 (license license:gpl2)))
4835
4836 (define-public python2-distutils-extra
4837 (package-with-python2 python-distutils-extra))
4838
4839 (define-public python2-elib.intl
4840 (package
4841 (name "python2-elib.intl")
4842 (version "0.0.3")
4843 (source
4844 (origin
4845 ;; This project doesn't tag releases or publish tarballs, so we take
4846 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4847 (method git-fetch)
4848 (uri (git-reference
4849 (url "https://github.com/dieterv/elib.intl.git")
4850 (commit "d09997cfef")))
4851 (file-name (string-append name "-" version "-checkout"))
4852 (sha256
4853 (base32
4854 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4855 (build-system python-build-system)
4856 (arguments
4857 ;; incompatible with Python 3 (exception syntax)
4858 `(#:python ,python-2
4859 #:tests? #f))
4860 (home-page "https://github.com/dieterv/elib.intl")
4861 (synopsis "Enhanced internationalization for Python")
4862 (description
4863 "The elib.intl module provides enhanced internationalization (I18N)
4864 services for your Python modules and applications.")
4865 (license license:lgpl3+)))
4866
4867 (define-public python-olefile
4868 (package
4869 (name "python-olefile")
4870 (version "0.46")
4871 (source
4872 (origin
4873 (method url-fetch)
4874 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4875 "download/v" version "/olefile-" version ".tar.gz"))
4876 (file-name (string-append name "-" version ".tar.gz"))
4877 (sha256
4878 (base32
4879 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4880 (build-system python-build-system)
4881 (home-page "https://www.decalage.info/python/olefileio")
4882 (synopsis "Read and write Microsoft OLE2 files.")
4883 (description
4884 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4885 Storage or Compound Document, Microsoft Office). It is an improved version of
4886 the OleFileIO module from PIL, the Python Image Library.")
4887 (license license:bsd-3)))
4888
4889 (define-public python2-olefile
4890 (package-with-python2 python-olefile))
4891
4892 (define-public python-pillow
4893 (package
4894 (name "python-pillow")
4895 (version "6.2.1")
4896 (source
4897 (origin
4898 (method url-fetch)
4899 (uri (pypi-uri "Pillow" version))
4900 (sha256
4901 (base32
4902 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4903 (build-system python-build-system)
4904 (native-inputs
4905 `(("python-pytest" ,python-pytest)))
4906 (inputs
4907 `(("freetype" ,freetype)
4908 ("lcms" ,lcms)
4909 ("libjpeg" ,libjpeg)
4910 ("libtiff" ,libtiff)
4911 ("libwebp" ,libwebp)
4912 ("openjpeg" ,openjpeg)
4913 ("zlib" ,zlib)))
4914 (propagated-inputs
4915 `(("python-olefile" ,python-olefile)))
4916 (arguments
4917 `(#:phases
4918 (modify-phases %standard-phases
4919 (add-after 'unpack 'patch-ldconfig
4920 (lambda _
4921 (substitute* "setup.py"
4922 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4923 (replace 'check
4924 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4925 (if tests?
4926 (begin
4927 (setenv "HOME" (getcwd))
4928 ;; Make installed package available for running the tests.
4929 (add-installed-pythonpath inputs outputs)
4930 (invoke "python" "selftest.py" "--installed")
4931 (invoke "python" "-m" "pytest" "-vv"))
4932 #t))))))
4933 (home-page "https://python-pillow.org")
4934 (synopsis "Fork of the Python Imaging Library")
4935 (description
4936 "The Python Imaging Library adds image processing capabilities to your
4937 Python interpreter. This library provides extensive file format support, an
4938 efficient internal representation, and fairly powerful image processing
4939 capabilities. The core image library is designed for fast access to data
4940 stored in a few basic pixel formats. It should provide a solid foundation for
4941 a general image processing tool.")
4942 (license (license:x11-style
4943 "http://www.pythonware.com/products/pil/license.htm"
4944 "The PIL Software License"))))
4945
4946 (define-public python2-pillow
4947 (package-with-python2 python-pillow))
4948
4949 (define-public python-pycparser
4950 (package
4951 (name "python-pycparser")
4952 (version "2.19")
4953 (source
4954 (origin
4955 (method url-fetch)
4956 (uri (pypi-uri "pycparser" version))
4957 (sha256
4958 (base32
4959 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4960 (outputs '("out" "doc"))
4961 (build-system python-build-system)
4962 (native-inputs
4963 `(("pkg-config" ,pkg-config)))
4964 (arguments
4965 `(#:phases
4966 (modify-phases %standard-phases
4967 (replace 'check
4968 (lambda _
4969 (with-directory-excursion "tests"
4970 (invoke "python" "all_tests.py"))
4971 #t))
4972 (add-after 'install 'install-doc
4973 (lambda* (#:key outputs #:allow-other-keys)
4974 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4975 (doc (string-append data "/doc/" ,name "-" ,version))
4976 (examples (string-append doc "/examples")))
4977 (mkdir-p examples)
4978 (for-each (lambda (file)
4979 (copy-file (string-append "." file)
4980 (string-append doc file)))
4981 '("/README.rst" "/CHANGES" "/LICENSE"))
4982 (copy-recursively "examples" examples)
4983 #t))))))
4984 (home-page "https://github.com/eliben/pycparser")
4985 (synopsis "C parser in Python")
4986 (description
4987 "Pycparser is a complete parser of the C language, written in pure Python
4988 using the PLY parsing library. It parses C code into an AST and can serve as
4989 a front-end for C compilers or analysis tools.")
4990 (license license:bsd-3)))
4991
4992 (define-public python2-pycparser
4993 (package-with-python2 python-pycparser))
4994
4995 (define-public python-pywavelets
4996 (package
4997 (name "python-pywavelets")
4998 (version "1.0.1")
4999 (home-page "https://github.com/PyWavelets/pywt")
5000 (source (origin
5001 (method url-fetch)
5002 (uri (pypi-uri "PyWavelets" version))
5003 (sha256
5004 (base32
5005 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
5006 (build-system python-build-system)
5007 (arguments
5008 '(#:modules ((ice-9 ftw)
5009 (srfi srfi-1)
5010 (srfi srfi-26)
5011 (guix build utils)
5012 (guix build python-build-system))
5013 #:phases (modify-phases %standard-phases
5014 (replace 'check
5015 (lambda _
5016 (let ((cwd (getcwd))
5017 (libdir (find (cut string-prefix? "lib." <>)
5018 (scandir "build"))))
5019 (with-directory-excursion (string-append cwd "/build/" libdir)
5020 (invoke "nosetests" "-v" "."))))))))
5021 (native-inputs
5022 `(("python-matplotlib" ,python-matplotlib) ;for tests
5023 ("python-nose" ,python-nose)))
5024 (propagated-inputs
5025 `(("python-numpy" ,python-numpy)))
5026 (synopsis "Wavelet transforms in Python")
5027 (description
5028 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5029 mathematical basis functions that are localized in both time and frequency.
5030 Wavelet transforms are time-frequency transforms employing wavelets. They are
5031 similar to Fourier transforms, the difference being that Fourier transforms are
5032 localized only in frequency instead of in time and frequency.")
5033 (license license:expat)))
5034
5035 (define-public python2-pywavelets
5036 (package-with-python2 python-pywavelets))
5037
5038 (define-public python-xcffib
5039 (package
5040 (name "python-xcffib")
5041 (version "0.6.0")
5042 (source
5043 (origin
5044 (method url-fetch)
5045 (uri (pypi-uri "xcffib" version))
5046 (sha256
5047 (base32
5048 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5049 (build-system python-build-system)
5050 (inputs
5051 `(("libxcb" ,libxcb)))
5052 (propagated-inputs
5053 `(("python-cffi" ,python-cffi) ; used at run time
5054 ("python-six" ,python-six)))
5055 (arguments
5056 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5057 #:tests? #f
5058 #:phases
5059 (modify-phases %standard-phases
5060 (add-after 'unpack 'fix-libxcb-path
5061 (lambda* (#:key inputs #:allow-other-keys)
5062 (let ((libxcb (assoc-ref inputs "libxcb")))
5063 (substitute* '("xcffib/__init__.py")
5064 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5065 #t)))
5066 (add-after 'install 'install-doc
5067 (lambda* (#:key outputs #:allow-other-keys)
5068 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5069 "/doc/" ,name "-" ,version)))
5070 (mkdir-p doc)
5071 (copy-file "README.md"
5072 (string-append doc "/README.md"))
5073 #t))))))
5074 (home-page "https://github.com/tych0/xcffib")
5075 (synopsis "XCB Python bindings")
5076 (description
5077 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5078 support for Python 3 and PyPy. It is based on cffi.")
5079 (license license:expat)))
5080
5081 (define-public python2-xcffib
5082 (package-with-python2 python-xcffib))
5083
5084 (define-public python-cairocffi
5085 (package
5086 (name "python-cairocffi")
5087 (version "0.9.0")
5088 (source
5089 (origin
5090 (method url-fetch)
5091 (uri (pypi-uri "cairocffi" version))
5092 (sha256
5093 (base32
5094 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5095 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5096 (build-system python-build-system)
5097 (outputs '("out" "doc"))
5098 (inputs
5099 `(("glib" ,glib)
5100 ("gtk+" ,gtk+)
5101 ("gdk-pixbuf" ,gdk-pixbuf)
5102 ("cairo" ,cairo)
5103 ("pango" ,pango)))
5104 (native-inputs
5105 `(("pkg-config" ,pkg-config)
5106 ("python-pytest" ,python-pytest)
5107 ("python-pytest-cov" ,python-pytest-cov)
5108 ("python-pytest-runner" ,python-pytest-runner)
5109 ("python-sphinx" ,python-sphinx)
5110 ("python-docutils" ,python-docutils)))
5111 (propagated-inputs
5112 `(("python-xcffib" ,python-xcffib))) ; used at run time
5113 (arguments
5114 `(#:phases
5115 (modify-phases %standard-phases
5116 (add-after 'unpack 'patch-paths
5117 (lambda* (#:key inputs outputs #:allow-other-keys)
5118 (substitute* (find-files "." "\\.py$")
5119 (("dlopen\\(ffi, 'cairo'")
5120 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5121 "/lib/libcairo.so.2'"))
5122 (("dlopen\\(ffi, 'gdk-3'")
5123 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5124 "/lib/libgtk-3.so.0'"))
5125 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5126 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5127 "/lib/libgdk_pixbuf-2.0.so.0'"))
5128 (("dlopen\\(ffi, 'glib-2.0'")
5129 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5130 "/lib/libglib-2.0.so.0'"))
5131 (("dlopen\\(ffi, 'gobject-2.0'")
5132 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5133 "/lib/libgobject-2.0.so.0'"))
5134 (("dlopen\\(ffi, 'pangocairo-1.0'")
5135 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5136 "/lib/libpangocairo-1.0.so.0'"))
5137 (("dlopen\\(ffi, 'pango-1.0'")
5138 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5139 "/lib/libpango-1.0.so.0'")))
5140 #t))
5141 (add-after 'install 'install-doc
5142 (lambda* (#:key inputs outputs #:allow-other-keys)
5143 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5144 (doc (string-append data "/doc/" ,name "-" ,version))
5145 (html (string-append doc "/html")))
5146 (setenv "LD_LIBRARY_PATH"
5147 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5148 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5149 (setenv "LANG" "en_US.UTF-8")
5150 (mkdir-p html)
5151 (for-each (lambda (file)
5152 (copy-file (string-append "." file)
5153 (string-append doc file)))
5154 '("/README.rst" "/CHANGES" "/LICENSE"))
5155 (system* "python" "setup.py" "build_sphinx")
5156 (copy-recursively "docs/_build/html" html)
5157 #t))))))
5158 (home-page "https://github.com/Kozea/cairocffi")
5159 (synopsis "Python bindings and object-oriented API for Cairo")
5160 (description
5161 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5162 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5163 graphics library with support for multiple backends including image buffers,
5164 PNG, PostScript, PDF, and SVG file output.")
5165 (license license:bsd-3)))
5166
5167 (define-public python2-cairocffi
5168 (package-with-python2 python-cairocffi))
5169
5170 (define-public python-decorator
5171 (package
5172 (name "python-decorator")
5173 (version "4.3.0")
5174 (source
5175 (origin
5176 (method url-fetch)
5177 (uri (pypi-uri "decorator" version))
5178 (sha256
5179 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5180 (build-system python-build-system)
5181 (home-page "https://pypi.org/project/decorator/")
5182 (synopsis "Python module to simplify usage of decorators")
5183 (description
5184 "The aim of the decorator module is to simplify the usage of decorators
5185 for the average programmer, and to popularize decorators usage giving examples
5186 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5187 etc. The core of this module is a decorator factory.")
5188 (license license:expat)))
5189
5190 (define-public python2-decorator
5191 (package-with-python2 python-decorator))
5192
5193 (define-public python-drmaa
5194 (package
5195 (name "python-drmaa")
5196 (version "0.7.7")
5197 (source
5198 (origin
5199 (method url-fetch)
5200 (uri (pypi-uri "drmaa" version))
5201 (sha256
5202 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5203 (build-system python-build-system)
5204 ;; The test suite requires libdrmaa which is provided by the cluster
5205 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5206 ;; should be set to the path of the libdrmaa library.
5207 (arguments '(#:tests? #f))
5208 (native-inputs
5209 `(("python-nose" ,python-nose)))
5210 (home-page "https://pypi.org/project/drmaa/")
5211 (synopsis "Python bindings for the DRMAA library")
5212 (description
5213 "A Python package for Distributed Resource Management (DRM) job
5214 submission and control. This package is an implementation of the DRMAA 1.0
5215 Python language binding specification.")
5216 (license license:bsd-3)))
5217
5218 (define-public python2-drmaa
5219 (package-with-python2 python-drmaa))
5220
5221 (define-public python-grako
5222 (package
5223 (name "python-grako")
5224 (version "3.99.9")
5225 (source
5226 (origin
5227 (method url-fetch)
5228 (uri
5229 (pypi-uri "grako" version ".zip"))
5230 (sha256
5231 (base32
5232 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5233 (build-system python-build-system)
5234 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5235 (native-inputs
5236 `(("unzip" ,unzip)
5237 ("python-pytest" ,python-pytest)
5238 ("python-pytest-runner" ,python-pytest-runner)))
5239 (home-page "https://bitbucket.org/neogeny/grako")
5240 (synopsis "EBNF parser generator")
5241 (description
5242 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5243 memoizing PEG/Packrat parser in Python.")
5244 (license license:bsd-3)))
5245
5246 (define-public python2-grako
5247 (package-with-python2 python-grako))
5248
5249 (define-public python-gridmap
5250 (package
5251 (name "python-gridmap")
5252 (version "0.13.0")
5253 (source
5254 (origin
5255 (method git-fetch)
5256 (uri (git-reference
5257 (url "https://github.com/pygridtools/gridmap.git")
5258 (commit (string-append "v" version))))
5259 (file-name (git-file-name name version))
5260 (sha256
5261 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
5262 (build-system python-build-system)
5263 (arguments
5264 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5265 (propagated-inputs
5266 `(("python-psutil" ,python-psutil)
5267 ("python-drmaa" ,python-drmaa)
5268 ("python-pyzmq" ,python-pyzmq)))
5269 (home-page "https://github.com/pygridtools/gridmap")
5270 (synopsis "Create jobs on a cluster directly from Python")
5271 (description
5272 "Gridmap is a Python package to allow you to easily create jobs on the
5273 cluster directly from Python. You can directly map Python functions onto the
5274 cluster without needing to write any wrapper code yourself.")
5275 (license license:gpl3+)))
5276
5277 (define-public python2-gridmap
5278 (package-with-python2 python-gridmap))
5279
5280 (define-public python-honcho
5281 (package
5282 (name "python-honcho")
5283 (version "1.0.1")
5284 (source
5285 (origin
5286 (method git-fetch)
5287 (uri (git-reference
5288 (url "https://github.com/nickstenning/honcho.git")
5289 (commit (string-append "v" version))))
5290 (file-name (git-file-name name version))
5291 (sha256
5292 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5293 (build-system python-build-system)
5294 (native-inputs
5295 `(("python-pytest" ,python-pytest)
5296 ("python-mock" ,python-mock)
5297 ("python-tox" ,python-tox)
5298 ("which" ,which))) ;for tests
5299 (propagated-inputs
5300 `(("python-jinja2" ,python-jinja2)))
5301 (arguments
5302 `(#:phases
5303 (modify-phases %standard-phases
5304 (delete 'check)
5305 (add-after 'install 'check
5306 (lambda* (#:key outputs inputs #:allow-other-keys)
5307 ;; fix honcho path in testsuite
5308 (substitute* "tests/conftest.py"
5309 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5310 "/bin/honcho" "'")))
5311 ;; It's easier to run tests after install.
5312 ;; Make installed package available for running the tests
5313 (add-installed-pythonpath inputs outputs)
5314 (invoke "py.test" "-v"))))))
5315 (home-page "https://github.com/nickstenning/honcho")
5316 (synopsis "Manage Procfile-based applications")
5317 (description
5318 "A Procfile is a file which describes how to run an application
5319 consisting of several processes. honcho starts all listed processes.
5320 The output of all running processes is collected by honcho and
5321 displayed.")
5322 (license license:expat)))
5323
5324 (define-public python2-honcho
5325 (package-with-python2 python-honcho))
5326
5327 (define-public python-pexpect
5328 (package
5329 (name "python-pexpect")
5330 (version "4.6.0")
5331 (source
5332 (origin
5333 (method url-fetch)
5334 (uri (pypi-uri "pexpect" version))
5335 (sha256
5336 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5337 (build-system python-build-system)
5338 (arguments
5339 `(#:phases
5340 (modify-phases %standard-phases
5341 (add-before 'check 'prepare-tests
5342 (lambda _
5343 (substitute* (find-files "tests")
5344 (("/bin/ls") (which "ls"))
5345 (("/bin/echo") (which "echo"))
5346 (("/bin/which") (which "which"))
5347 ;; Many tests try to use the /bin directory which
5348 ;; is not present in the build environment.
5349 ;; Use one that's non-empty and unlikely to change.
5350 (("/bin'") "/dev'"))
5351 ;; XXX: Socket connection test gets "Connection reset by peer".
5352 ;; Why does it not work? Delete for now.
5353 (delete-file "tests/test_socket.py")
5354 #t))
5355 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5356 (native-inputs
5357 `(("python-nose" ,python-nose)
5358 ("python-pytest" ,python-pytest)
5359 ("man-db" ,man-db)
5360 ("which" ,which)
5361 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5362 (propagated-inputs
5363 `(("python-ptyprocess" ,python-ptyprocess)))
5364 (home-page "http://pexpect.readthedocs.org/")
5365 (synopsis "Controlling interactive console applications")
5366 (description
5367 "Pexpect is a pure Python module for spawning child applications;
5368 controlling them; and responding to expected patterns in their output.
5369 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5370 child application and control it as if a human were typing commands.")
5371 (license license:isc)))
5372
5373 (define-public python2-pexpect
5374 (package-with-python2 python-pexpect))
5375
5376 (define-public python-setuptools-scm
5377 (package
5378 (name "python-setuptools-scm")
5379 (version "3.2.0")
5380 (source (origin
5381 (method url-fetch)
5382 (uri (pypi-uri "setuptools_scm" version))
5383 (sha256
5384 (base32
5385 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5386 (build-system python-build-system)
5387 (home-page "https://github.com/pypa/setuptools_scm/")
5388 (synopsis "Manage Python package versions in SCM metadata")
5389 (description
5390 "Setuptools_scm handles managing your Python package versions in
5391 @dfn{software configuration management} (SCM) metadata instead of declaring
5392 them as the version argument or in a SCM managed file.")
5393 (license license:expat)))
5394
5395 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
5396 (define-public python-setuptools-scm-3.3
5397 (package
5398 (inherit python-setuptools-scm)
5399 (version "3.3.3")
5400 (source (origin
5401 (method url-fetch)
5402 (uri (pypi-uri "setuptools_scm" version))
5403 (sha256
5404 (base32
5405 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5406
5407 (define-public python2-setuptools-scm
5408 (package-with-python2 python-setuptools-scm))
5409
5410 (define-public python-pathlib2
5411 (package
5412 (name "python-pathlib2")
5413 (version "2.3.3")
5414 (source
5415 (origin
5416 (method url-fetch)
5417 (uri (pypi-uri "pathlib2" version))
5418 (sha256
5419 (base32
5420 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5421 (build-system python-build-system)
5422 (propagated-inputs
5423 `(("python-scandir" ,python-scandir)
5424 ("python-six" ,python-six)))
5425 (home-page "https://pypi.org/project/pathlib2/")
5426 (synopsis "Object-oriented file system paths")
5427 (description "The goal of pathlib2 is to provide a backport of the
5428 standard @code{pathlib} module which tracks the standard library module, so
5429 all the newest features of the standard @code{pathlib} can be used also on
5430 older Python versions.")
5431 (license license:expat)))
5432
5433 (define-public python2-importlib-resources
5434 (package
5435 (name "python2-importlib-resources")
5436 (version "1.0.2")
5437 (source (origin
5438 (method url-fetch)
5439 (uri (pypi-uri "importlib_resources" version))
5440 (sha256
5441 (base32
5442 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5443 (build-system python-build-system)
5444 (arguments
5445 `(#:python ,python-2))
5446 (native-inputs
5447 `(("python-wheel" ,python2-wheel)))
5448 (propagated-inputs
5449 `(("python-pathlib2" ,python2-pathlib2)
5450 ("python-typing" ,python2-typing)))
5451 (home-page "https://gitlab.com/python-devs/importlib_resources")
5452 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5453 (description
5454 "This package provides an implementation of @code{importlib.resources}
5455 for older versions of Python.")
5456 (license license:asl2.0)))
5457
5458 (define-public python-importlib-metadata
5459 (package
5460 (name "python-importlib-metadata")
5461 (version "1.4.0")
5462 (source
5463 (origin
5464 (method url-fetch)
5465 (uri (pypi-uri "importlib_metadata" version))
5466 (sha256
5467 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
5468 (build-system python-build-system)
5469 (propagated-inputs
5470 `(("python-zipp" ,python-zipp)))
5471 (native-inputs
5472 `(("python-setuptools-scm" ,python-setuptools-scm)
5473 ("python-packaging" ,python-packaging)))
5474 (home-page "https://importlib-metadata.readthedocs.io/")
5475 (synopsis "Read metadata from Python packages")
5476 (description
5477 "@code{importlib_metadata} is a library which provides an API for
5478 accessing an installed Python package's metadata, such as its entry points or
5479 its top-level name. This functionality intends to replace most uses of
5480 @code{pkg_resources} entry point API and metadata API. Along with
5481 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5482 need to use the older and less efficient @code{pkg_resources} package.")
5483 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5484 (license license:asl2.0)))
5485
5486 (define-public python2-importlib-metadata
5487 (let ((base (package-with-python2 (strip-python2-variant
5488 python-importlib-metadata))))
5489 (package/inherit
5490 base
5491 (name "python2-importlib-metadata")
5492 (propagated-inputs
5493 `(("python-configparser" ,python2-configparser)
5494 ("python-contextlib2" ,python2-contextlib2)
5495 ("python-importlib-resources" ,python2-importlib-resources)
5496 ("python-pathlib2" ,python2-pathlib2)
5497 ,@(package-propagated-inputs base))))))
5498
5499 (define-public python-jaraco-packaging
5500 (package
5501 (name "python-jaraco-packaging")
5502 (version "6.1")
5503 (source
5504 (origin
5505 (method url-fetch)
5506 (uri (pypi-uri "jaraco.packaging" version))
5507 (sha256
5508 (base32
5509 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5510 (build-system python-build-system)
5511 (propagated-inputs
5512 `(("python-pytest" ,python-pytest)
5513 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5514 ("python-pytest-flake8" ,python-pytest-flake8)
5515 ("python-rst.linker" ,python-rst.linker)
5516 ("python-setuptools" ,python-setuptools)
5517 ("python-setuptools-scm" ,python-setuptools-scm)
5518 ("python-six" ,python-six)
5519 ("python-sphinx" ,python-sphinx)))
5520 (home-page "https://github.com/jaraco/jaraco.packaging")
5521 (synopsis "Tools to supplement packaging Python releases")
5522 (description
5523 "This package provides various tools to supplement packaging Python
5524 releases.")
5525 (license license:expat)))
5526
5527 (define-public python-pathpy
5528 (package
5529 (name "python-pathpy")
5530 (version "11.5.1")
5531 (source
5532 (origin
5533 (method url-fetch)
5534 (uri (pypi-uri "path.py" version))
5535 (sha256
5536 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5537 (outputs '("out" "doc"))
5538 (build-system python-build-system)
5539 (propagated-inputs
5540 `(("python-appdirs" ,python-appdirs)
5541 ("python-importlib-metadata" ,python-importlib-metadata)))
5542 (native-inputs
5543 `(("python-setuptools-scm" ,python-setuptools-scm)
5544 ("python-sphinx" ,python-sphinx)
5545 ("python-rst.linker" ,python-rst.linker)
5546 ("python-pytest" ,python-pytest)
5547 ("python-pytest-runner" ,python-pytest-runner)
5548 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5549 (arguments
5550 `(#:phases
5551 (modify-phases %standard-phases
5552 (add-after 'build 'build-doc
5553 (lambda _
5554 (setenv "LANG" "en_US.UTF-8")
5555 (invoke "python" "setup.py" "build_sphinx")))
5556 (add-after 'install 'install-doc
5557 (lambda* (#:key outputs #:allow-other-keys)
5558 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5559 (doc (string-append data "/doc/" ,name "-" ,version))
5560 (html (string-append doc "/html")))
5561 (mkdir-p html)
5562 (for-each (lambda (file)
5563 (copy-file file (string-append doc "/" file)))
5564 '("README.rst" "CHANGES.rst"))
5565 (copy-recursively "build/sphinx/html" html)
5566 #t)))
5567 (replace 'check
5568 (lambda _
5569 ;; The import time test aborts if an import takes longer than
5570 ;; 100ms. It may very well take a little longer than that.
5571 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5572 (home-page "https://github.com/jaraco/path.py")
5573 (synopsis "Python module wrapper for built-in os.path")
5574 (description
5575 "@code{path.py} implements path objects as first-class entities, allowing
5576 common operations on files to be invoked on those path objects directly.")
5577 (license license:expat)))
5578
5579 (define-public python2-pathpy
5580 (package-with-python2 python-pathpy))
5581
5582 (define-public python-simplegeneric
5583 (package
5584 (name "python-simplegeneric")
5585 (version "0.8.1")
5586 (source
5587 (origin
5588 (method url-fetch)
5589 (uri (pypi-uri "simplegeneric" version ".zip"))
5590 (sha256
5591 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5592 (build-system python-build-system)
5593 (native-inputs
5594 `(("unzip" ,unzip)))
5595 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5596 (synopsis "Python module for simple generic functions")
5597 (description
5598 "The simplegeneric module lets you define simple single-dispatch generic
5599 functions, akin to Python’s built-in generic functions like @code{len()},
5600 @code{iter()} and so on. However, instead of using specially-named methods,
5601 these generic functions use simple lookup tables, akin to those used by
5602 e.g. @code{pickle.dump()} and other generic functions found in the Python
5603 standard library.")
5604 (license license:zpl2.1)))
5605
5606 (define-public python2-simplegeneric
5607 (package-with-python2 python-simplegeneric))
5608
5609 (define-public python-ipython-genutils
5610 ;; TODO: This package is retired, check if can be removed, see description.
5611 (package
5612 (name "python-ipython-genutils")
5613 (version "0.1.0")
5614 (source
5615 (origin
5616 (method url-fetch)
5617 (uri (pypi-uri "ipython_genutils" version))
5618 (sha256
5619 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5620 (build-system python-build-system)
5621 (arguments `(#:tests? #f)) ; no tests
5622 (home-page "https://ipython.org")
5623 (synopsis "Vestigial utilities from IPython")
5624 (description
5625 "This package provides retired utilities from IPython. No packages
5626 outside IPython/Jupyter should depend on it.
5627
5628 This package shouldn't exist. It contains some common utilities shared by
5629 Jupyter and IPython projects during The Big Split. As soon as possible, those
5630 packages will remove their dependency on this, and this package will go
5631 away.")
5632 (license license:bsd-3)))
5633
5634 (define-public python2-ipython-genutils
5635 (package-with-python2 python-ipython-genutils))
5636
5637 (define-public python-traitlets
5638 (package
5639 (name "python-traitlets")
5640 (version "4.3.3")
5641 (source
5642 (origin
5643 (method url-fetch)
5644 (uri (pypi-uri "traitlets" version))
5645 (sha256
5646 (base32
5647 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5648 (build-system python-build-system)
5649 (arguments
5650 `(#:phases
5651 (modify-phases %standard-phases
5652 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5653 (propagated-inputs
5654 `(("python-ipython-genutils" ,python-ipython-genutils)
5655 ("python-decorator" ,python-decorator)))
5656 (native-inputs
5657 `(("python-pytest" ,python-pytest)))
5658 (properties `((python2-variant . ,(delay python2-traitlets))))
5659 (home-page "https://ipython.org")
5660 (synopsis "Configuration system for Python applications")
5661 (description
5662 "Traitlets is a framework that lets Python classes have attributes with
5663 type checking, dynamically calculated default values, and ‘on change’
5664 callbacks. The package also includes a mechanism to use traitlets for
5665 configuration, loading values from files or from command line arguments. This
5666 is a distinct layer on top of traitlets, so you can use traitlets in your code
5667 without using the configuration machinery.")
5668 (license license:bsd-3)))
5669
5670 (define-public python2-traitlets
5671 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5672 (package
5673 (inherit traitlets)
5674 (propagated-inputs
5675 `(("python2-enum34" ,python2-enum34)
5676 ,@(package-propagated-inputs traitlets))))))
5677
5678 (define-public python-jupyter-core
5679 (package
5680 (name "python-jupyter-core")
5681 (version "4.4.0")
5682 (source
5683 (origin
5684 (method url-fetch)
5685 (uri (string-append (pypi-uri "jupyter_core" version)))
5686 (sha256
5687 (base32
5688 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5689 (build-system python-build-system)
5690 ;; FIXME: not sure how to run the tests
5691 (arguments `(#:tests? #f))
5692 (propagated-inputs
5693 `(("python-traitlets" ,python-traitlets)))
5694 (home-page "http://jupyter.org/")
5695 (synopsis "Jupyter base package")
5696 (description
5697 "Jupyter core is the base package on which Jupyter projects rely.")
5698 (license license:bsd-3)))
5699
5700 (define-public python2-jupyter-core
5701 (package-with-python2 python-jupyter-core))
5702
5703 (define-public python-jupyter-client
5704 (package
5705 (name "python-jupyter-client")
5706 (version "5.2.4")
5707 (source
5708 (origin
5709 (method url-fetch)
5710 (uri (pypi-uri "jupyter_client" version))
5711 (sha256
5712 (base32
5713 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5714 (build-system python-build-system)
5715 ;; Tests fail because of missing native python kernel which I assume is
5716 ;; provided by the ipython package, which we cannot use because it would
5717 ;; cause a dependency cycle.
5718 (arguments
5719 `(#:tests? #f
5720
5721 #:phases (modify-phases %standard-phases
5722 (add-after 'unpack 'set-tool-file-names
5723 (lambda* (#:key inputs #:allow-other-keys)
5724 (let ((iproute (assoc-ref inputs "iproute")))
5725 (substitute* "jupyter_client/localinterfaces.py"
5726 (("'ip'")
5727 (string-append "'" iproute "/sbin/ip'")))
5728 #t))))))
5729 (inputs
5730 `(("iproute" ,iproute)))
5731 (propagated-inputs
5732 `(("python-pyzmq" ,python-pyzmq)
5733 ("python-traitlets" ,python-traitlets)
5734 ("python-jupyter-core" ,python-jupyter-core)))
5735 (home-page "http://jupyter.org/")
5736 (synopsis "Jupyter protocol implementation and client libraries")
5737 (description
5738 "The @code{jupyter_client} package contains the reference implementation
5739 of the Jupyter protocol. It also provides client and kernel management APIs
5740 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5741 installing @code{kernelspec}s for use with Jupyter frontends.")
5742 (license license:bsd-3)))
5743
5744 (define-public python2-jupyter-client
5745 (package-with-python2 python-jupyter-client))
5746
5747 (define-public python-ipykernel
5748 (package
5749 (name "python-ipykernel")
5750 (version "5.1.3")
5751 (source
5752 (origin
5753 (method url-fetch)
5754 (uri (pypi-uri "ipykernel" version))
5755 (sha256
5756 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5757 (build-system python-build-system)
5758 (arguments
5759 `(#:phases
5760 (modify-phases %standard-phases
5761 (replace 'check
5762 (lambda _
5763 (setenv "HOME" "/tmp")
5764 (invoke "pytest" "-v")
5765 #t))
5766 (add-after 'install 'set-python-file-name
5767 (lambda* (#:key outputs #:allow-other-keys)
5768 ;; Record the absolute file name of the 'python' executable in
5769 ;; 'kernel.json'.
5770 (let ((out (assoc-ref outputs "out")))
5771 (substitute* (string-append out "/share/jupyter"
5772 "/kernels/python3/kernel.json")
5773 (("\"python\"")
5774 (string-append "\"" (which "python") "\"")))
5775 #t))))))
5776 (propagated-inputs
5777 `(("python-ipython" ,python-ipython)
5778 ;; imported at runtime during connect
5779 ("python-jupyter-client" ,python-jupyter-client)))
5780 (native-inputs
5781 `(("python-flaky" ,python-flaky)
5782 ("python-nose" ,python-nose)
5783 ("python-pytest" ,python-pytest)))
5784 (home-page "https://ipython.org")
5785 (synopsis "IPython Kernel for Jupyter")
5786 (description
5787 "This package provides the IPython kernel for Jupyter.")
5788 (properties `((python2-variant . ,(delay python2-ipykernel))))
5789 (license license:bsd-3)))
5790
5791 ;; Version 5.x and above no longer support Python 2.
5792 (define-public python2-ipykernel
5793 (package
5794 (name "python2-ipykernel")
5795 (version "4.10.1")
5796 (source
5797 (origin
5798 (method url-fetch)
5799 (uri (pypi-uri "ipykernel" version))
5800 (sha256
5801 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
5802 (build-system python-build-system)
5803 (arguments
5804 `(#:python ,python-2))
5805 (propagated-inputs
5806 `(("python2-ipython" ,python2-ipython)
5807 ;; imported at runtime during connect
5808 ("python2-jupyter-client" ,python2-jupyter-client)
5809 ("python2-tornado" ,python2-tornado)
5810 ("python2-traitlets" ,python2-traitlets)))
5811 (native-inputs
5812 `(("python2-mock" ,python2-mock)
5813 ("python2-nose" ,python2-nose)
5814 ("python2-pytest" ,python2-pytest)
5815 ("python2-pytest-cov" ,python2-pytest-cov)))
5816 (home-page "https://ipython.org")
5817 (synopsis "IPython Kernel for Jupyter")
5818 (description
5819 "This package provides the IPython kernel for Jupyter.")
5820 (license license:bsd-3)))
5821
5822 (define-public python-pari-jupyter
5823 (package
5824 (name "python-pari-jupyter")
5825 (version "1.3.2")
5826 (source
5827 (origin
5828 (method url-fetch)
5829 (uri (pypi-uri "pari_jupyter" version))
5830 (sha256
5831 (base32
5832 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5833 (build-system python-build-system)
5834 (propagated-inputs
5835 `(("python-ipykernel" ,python-ipykernel)))
5836 (inputs
5837 `(("pari-gp" ,pari-gp)
5838 ("readline" ,readline)))
5839 (arguments
5840 `(#:tests? #f)) ; no test suite
5841 (home-page
5842 "https://github.com/jdemeyer/pari_jupyter")
5843 (synopsis "A Jupyter kernel for PARI/GP")
5844 (description "The package provides a PARI/GP kernel for Jupyter.")
5845 (license license:gpl3+)))
5846
5847 (define-public python-backcall
5848 (package
5849 (name "python-backcall")
5850 (version "0.1.0")
5851 (source
5852 (origin
5853 (method url-fetch)
5854 (uri (pypi-uri "backcall" version))
5855 (sha256
5856 (base32
5857 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5858 (build-system python-build-system)
5859 (home-page "https://github.com/takluyver/backcall/")
5860 (synopsis "Specifications for callback functions passed in to an API")
5861 (description
5862 "If your code lets other people supply callback functions, it's important
5863 to specify the function signature you expect, and check that functions support
5864 that. Adding extra parameters later would break other peoples code unless
5865 you're careful. The @code{backcall} package provides a way of specifying the
5866 callback signature using a prototype function.")
5867 (license license:bsd-3)))
5868
5869 (define-public python-ipython
5870 (package
5871 (name "python-ipython")
5872 (version "7.9.0")
5873 (source
5874 (origin
5875 (method url-fetch)
5876 (uri (pypi-uri "ipython" version ".tar.gz"))
5877 (sha256
5878 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5879 (build-system python-build-system)
5880 (propagated-inputs
5881 `(("python-backcall" ,python-backcall)
5882 ("python-pyzmq" ,python-pyzmq)
5883 ("python-prompt-toolkit" ,python-prompt-toolkit)
5884 ("python-terminado" ,python-terminado)
5885 ("python-matplotlib" ,python-matplotlib)
5886 ("python-numpy" ,python-numpy)
5887 ("python-numpydoc" ,python-numpydoc)
5888 ("python-jedi" ,python-jedi)
5889 ("python-jinja2" ,python-jinja2)
5890 ("python-mistune" ,python-mistune)
5891 ("python-pexpect" ,python-pexpect)
5892 ("python-pickleshare" ,python-pickleshare)
5893 ("python-simplegeneric" ,python-simplegeneric)
5894 ("python-jsonschema" ,python-jsonschema)
5895 ("python-traitlets" ,python-traitlets)
5896 ("python-nbformat" ,python-nbformat)
5897 ("python-pygments" ,python-pygments)))
5898 (inputs
5899 `(("readline" ,readline)
5900 ("which" ,which)))
5901 (native-inputs
5902 `(("graphviz" ,graphviz)
5903 ("pkg-config" ,pkg-config)
5904 ("python-requests" ,python-requests) ;; for tests
5905 ("python-testpath" ,python-testpath)
5906 ("python-nose" ,python-nose)))
5907 (arguments
5908 `(#:phases
5909 (modify-phases %standard-phases
5910 (add-after 'unpack 'make-docs-reproducible
5911 (lambda _
5912 (substitute* "IPython/sphinxext/ipython_directive.py"
5913 ((".*import datetime") "")
5914 ((".*datetime.datetime.now\\(\\)") "")
5915 (("%timeit") "# %timeit"))
5916 #t))
5917 ;; Tests can only be run after the library has been installed and not
5918 ;; within the source directory.
5919 (delete 'check)
5920 (add-after 'install 'check
5921 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5922 (if tests?
5923 (begin
5924 ;; Make installed package available for running the tests
5925 (add-installed-pythonpath inputs outputs)
5926 (setenv "HOME" "/tmp/") ;; required by a test
5927 ;; We only test the core because one of the other tests
5928 ;; tries to import ipykernel.
5929 (invoke "python" "IPython/testing/iptest.py"
5930 "-v" "IPython/core/tests"))
5931 #t)))
5932 (add-before 'check 'fix-tests
5933 (lambda* (#:key inputs #:allow-other-keys)
5934 (substitute* "./IPython/utils/_process_posix.py"
5935 (("/usr/bin/env', 'which") (which "which")))
5936 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5937 (("#!/usr/bin/env python")
5938 (string-append "#!" (which "python"))))
5939 ;; This test introduces a circular dependency on ipykernel
5940 ;; (which depends on ipython).
5941 (delete-file "IPython/core/tests/test_display.py")
5942 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5943 (delete-file "IPython/core/tests/test_interactiveshell.py")
5944 #t)))))
5945 (home-page "https://ipython.org")
5946 (synopsis "IPython is a tool for interactive computing in Python")
5947 (description
5948 "IPython provides a rich architecture for interactive computing with:
5949 Powerful interactive shells, a browser-based notebook, support for interactive
5950 data visualization, embeddable interpreters and tools for parallel
5951 computing.")
5952 (properties `((python2-variant . ,(delay python2-ipython))))
5953 (license license:bsd-3)))
5954
5955 ;; This is the latest release of the LTS version of ipython with support for
5956 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5957 ;; dropped support for Python 2.7.
5958 (define-public python2-ipython
5959 (package
5960 (name "python2-ipython")
5961 (version "5.8.0")
5962 (source
5963 (origin
5964 (method url-fetch)
5965 (uri (pypi-uri "ipython" version ".tar.gz"))
5966 (sha256
5967 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5968 (build-system python-build-system)
5969 (propagated-inputs
5970 `(("python2-backports-shutil-get-terminal-size"
5971 ,python2-backports-shutil-get-terminal-size)
5972 ("python2-pathlib2" ,python2-pathlib2)
5973 ("python2-pyzmq" ,python2-pyzmq)
5974 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5975 ("python2-terminado" ,python2-terminado)
5976 ("python2-matplotlib" ,python2-matplotlib)
5977 ("python2-numpy" ,python2-numpy)
5978 ("python2-numpydoc" ,python2-numpydoc)
5979 ("python2-jinja2" ,python2-jinja2)
5980 ("python2-mistune" ,python2-mistune)
5981 ("python2-pexpect" ,python2-pexpect)
5982 ("python2-pickleshare" ,python2-pickleshare)
5983 ("python2-simplegeneric" ,python2-simplegeneric)
5984 ("python2-jsonschema" ,python2-jsonschema)
5985 ("python2-traitlets" ,python2-traitlets)
5986 ("python2-nbformat" ,python2-nbformat)
5987 ("python2-pygments" ,python2-pygments)))
5988 (inputs
5989 `(("readline" ,readline)
5990 ("which" ,which)))
5991 (native-inputs
5992 `(("graphviz" ,graphviz)
5993 ("pkg-config" ,pkg-config)
5994 ("python2-requests" ,python2-requests) ;; for tests
5995 ("python2-testpath" ,python2-testpath)
5996 ("python2-mock" ,python2-mock)
5997 ("python2-nose" ,python2-nose)))
5998 (arguments
5999 `(#:python ,python-2
6000 #:phases
6001 (modify-phases %standard-phases
6002 (add-before 'check 'delete-broken-tests
6003 (lambda* (#:key inputs #:allow-other-keys)
6004 ;; These tests throw errors for unknown reasons.
6005 (delete-file "IPython/core/tests/test_displayhook.py")
6006 (delete-file "IPython/core/tests/test_magic_terminal.py")
6007 (delete-file "IPython/core/tests/test_profile.py")
6008 #t)))))
6009 (home-page "https://ipython.org")
6010 (synopsis "IPython is a tool for interactive computing in Python")
6011 (description
6012 "IPython provides a rich architecture for interactive computing with:
6013 Powerful interactive shells, a browser-based notebook, support for interactive
6014 data visualization, embeddable interpreters and tools for parallel
6015 computing.")
6016 (license license:bsd-3)))
6017
6018 (define-public python-ipython-documentation
6019 (package
6020 (inherit python-ipython)
6021 (name "python-ipython-documentation")
6022 (version (package-version python-ipython))
6023 (arguments
6024 `(#:phases
6025 (modify-phases %standard-phases
6026 (delete 'build)
6027 (delete 'check)
6028 (replace 'install
6029 (lambda* (#:key outputs #:allow-other-keys)
6030 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6031 (doc (string-append data "/doc/" ,name "-" ,version))
6032 (html (string-append doc "/html"))
6033 (man1 (string-append data "/man/man1"))
6034 (info (string-append data "/info"))
6035 (examples (string-append doc "/examples"))
6036 (python-arg (string-append "PYTHON=" (which "python"))))
6037 (setenv "LANG" "en_US.utf8")
6038 (with-directory-excursion "docs"
6039 ;; FIXME: pdf fails to build
6040 ;;(system* "make" "pdf" "PAPER=a4")
6041 (system* "make" python-arg "html")
6042 ;; FIXME: the generated texi file contains ^@^@, which trips
6043 ;; up the parser.
6044 ;; (system* "make" python-arg "info")
6045 )
6046 (copy-recursively "docs/man" man1)
6047 (copy-recursively "examples" examples)
6048 (copy-recursively "docs/build/html" html)
6049 ;; (copy-file "docs/build/latex/ipython.pdf"
6050 ;; (string-append doc "/ipython.pdf"))
6051 (mkdir-p info)
6052 ;; (copy-file "docs/build/texinfo/ipython.info"
6053 ;; (string-append info "/ipython.info"))
6054 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6055 #t)))))
6056 (inputs
6057 `(("python-ipython" ,python-ipython)
6058 ("python-ipykernel" ,python-ipykernel)))
6059 (native-inputs
6060 `(("python-sphinx" ,python-sphinx)
6061 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6062 ;; FIXME: It's possible that a smaller union would work just as well.
6063 ("texlive" ,(texlive-union (list texlive-amsfonts
6064 texlive-fonts-ec
6065 texlive-generic-ifxetex
6066 texlive-generic-pdftex
6067 texlive-latex-capt-of
6068 texlive-latex-cmap
6069 texlive-latex-environ
6070 texlive-latex-eqparbox
6071 texlive-latex-etoolbox
6072 texlive-latex-expdlist
6073 texlive-latex-fancyhdr
6074 texlive-latex-fancyvrb
6075 texlive-latex-fncychap
6076 texlive-latex-float
6077 texlive-latex-framed
6078 texlive-latex-geometry
6079 texlive-latex-graphics
6080 texlive-latex-hyperref
6081 texlive-latex-mdwtools
6082 texlive-latex-multirow
6083 texlive-latex-needspace
6084 texlive-latex-oberdiek
6085 texlive-latex-parskip
6086 texlive-latex-preview
6087 texlive-latex-tabulary
6088 texlive-latex-threeparttable
6089 texlive-latex-titlesec
6090 texlive-latex-trimspaces
6091 texlive-latex-ucs
6092 texlive-latex-upquote
6093 texlive-latex-url
6094 texlive-latex-varwidth
6095 texlive-latex-wrapfig)))
6096 ("texinfo" ,texinfo)))))
6097
6098 (define-public python-urwid
6099 (package
6100 (name "python-urwid")
6101 (version "2.0.1")
6102 (source
6103 (origin
6104 (method url-fetch)
6105 (uri (pypi-uri "urwid" version))
6106 (sha256
6107 (base32
6108 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
6109 (build-system python-build-system)
6110 (home-page "http://urwid.org")
6111 (synopsis "Console user interface library for Python")
6112 (description
6113 "Urwid is a curses-based UI/widget library for Python. It includes many
6114 features useful for text console applications.")
6115 (license license:lgpl2.1+)))
6116
6117 (define-public python2-urwid
6118 (package-with-python2 python-urwid))
6119
6120 (define-public python-urwidtrees
6121 (package
6122 (name "python-urwidtrees")
6123 (version "1.0.2")
6124 (source
6125 (origin
6126 (method git-fetch)
6127 ;; package author intends on distributing via github rather than pypi:
6128 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6129 (uri (git-reference
6130 (url "https://github.com/pazz/urwidtrees")
6131 (commit version)))
6132 (file-name (git-file-name name version))
6133 (sha256
6134 (base32
6135 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
6136 (build-system python-build-system)
6137 (arguments
6138 '(#:use-setuptools? #f
6139 #:tests? #f)) ; no tests
6140 (propagated-inputs `(("python-urwid" ,python-urwid)))
6141 (home-page "https://github.com/pazz/urwidtrees")
6142 (synopsis "Tree widgets for urwid")
6143 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6144 toolkit. Use it to build trees of widgets.")
6145 (license license:gpl3+)))
6146
6147 (define-public python2-urwidtrees
6148 (package-with-python2 python-urwidtrees))
6149
6150 (define-public python-ua-parser
6151 (package
6152 (name "python-ua-parser")
6153 (version "0.8.0")
6154 (source
6155 (origin
6156 (method url-fetch)
6157 (uri (pypi-uri "ua-parser" version))
6158 (sha256
6159 (base32
6160 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
6161 (build-system python-build-system)
6162 (arguments
6163 `(#:tests? #f)) ;no test suite in release
6164 (native-inputs
6165 `(("python-pyyaml" ,python-pyyaml)))
6166 (home-page "https://github.com/ua-parser/uap-python")
6167 (synopsis "User agent parser")
6168 (description
6169 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
6170 (license license:asl2.0)))
6171
6172 (define-public python2-ua-parser
6173 (package-with-python2 python-ua-parser))
6174
6175 (define-public python-user-agents
6176 (package
6177 (name "python-user-agents")
6178 (version "1.1.0")
6179 (source
6180 (origin
6181 (method url-fetch)
6182 (uri (pypi-uri "user-agents" version))
6183 (sha256
6184 (base32
6185 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
6186 (build-system python-build-system)
6187 (arguments
6188 `(#:tests? #f)) ;missing devices.json test file in release
6189 (propagated-inputs
6190 `(("python-ua-parser" ,python-ua-parser)))
6191 (home-page "https://github.com/selwin/python-user-agents")
6192 (synopsis "User Agent strings parsing library")
6193 (description
6194 "A library to identify devices (phones, tablets) and their capabilities by
6195 parsing (browser/HTTP) user agent strings.")
6196 (license license:expat)))
6197
6198 (define-public python2-user-agents
6199 (package-with-python2 python-user-agents))
6200
6201 (define-public python-dbus
6202 (package
6203 (name "python-dbus")
6204 (version "1.2.14")
6205 (source
6206 (origin
6207 (method url-fetch)
6208 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
6209 "dbus-python-" version ".tar.gz"))
6210 (sha256
6211 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
6212 (build-system gnu-build-system)
6213 (native-inputs
6214 `(("pkg-config" ,pkg-config)))
6215 (inputs
6216 `(("python" ,python-wrapper)
6217 ("dbus-glib" ,dbus-glib)))
6218 (synopsis "Python bindings for D-bus")
6219 (description "python-dbus provides bindings for libdbus, the reference
6220 implementation of D-Bus.")
6221 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
6222 (license license:expat)))
6223
6224 (define-public python2-dbus
6225 (package (inherit python-dbus)
6226 (name "python2-dbus")
6227 (inputs `(("python" ,python-2)
6228 ,@(alist-delete "python"
6229 (package-inputs python-dbus)
6230 equal?)))))
6231
6232 (define-public python-notify2
6233 (package
6234 (name "python-notify2")
6235 (version "0.3.1")
6236 (source
6237 (origin
6238 (method url-fetch)
6239 (uri (pypi-uri "notify2" version))
6240 (sha256
6241 (base32
6242 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
6243 (build-system python-build-system)
6244 (arguments `(#:tests? #f)) ; tests depend on system state
6245 (native-inputs
6246 `(("python-dbus" ,python-dbus)))
6247 (home-page "https://bitbucket.org/takluyver/pynotify2")
6248 (synopsis "Python interface to D-Bus notifications")
6249 (description
6250 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6251 It is a reimplementation of pynotify in pure Python, and an alternative to
6252 the GObject Introspection bindings to libnotify for non-GTK applications.")
6253 (license (list license:bsd-2
6254 license:lgpl2.1+))))
6255
6256 (define-public python2-notify2
6257 (package-with-python2 python-notify2))
6258
6259 ;; beautifulsoup4 has a totally different namespace than 3.x,
6260 ;; and pypi seems to put it under its own name, so I guess we should too
6261 (define-public python-beautifulsoup4
6262 (package
6263 (name "python-beautifulsoup4")
6264 (version "4.7.1")
6265 (source
6266 (origin
6267 (method url-fetch)
6268 (uri (pypi-uri "beautifulsoup4" version))
6269 (sha256
6270 (base32
6271 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
6272 (build-system python-build-system)
6273 (arguments
6274 `(#:phases
6275 (modify-phases %standard-phases
6276 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6277 ;; must use this conversion script when building with Python 3. The
6278 ;; conversion script also runs the tests.
6279 ;; For more information, see the file 'convert-py3k' in the source
6280 ;; distribution.
6281 (replace 'check
6282 (lambda _ (invoke "./convert-py3k"))))))
6283 (propagated-inputs
6284 `(("python-soupsieve" ,python-soupsieve)))
6285 (home-page
6286 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6287 (synopsis
6288 "Python screen-scraping library")
6289 (description
6290 "Beautiful Soup is a Python library designed for rapidly setting up
6291 screen-scraping projects. It offers Pythonic idioms for navigating,
6292 searching, and modifying a parse tree, providing a toolkit for
6293 dissecting a document and extracting what you need. It automatically
6294 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6295 (license license:expat)
6296 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6297
6298 (define-public python2-beautifulsoup4
6299 (package
6300 (inherit (package-with-python2
6301 (strip-python2-variant python-beautifulsoup4)))
6302 (arguments `(#:python ,python-2))))
6303
6304 (define-public python-soupsieve
6305 (package
6306 (name "python-soupsieve")
6307 (version "1.9.5")
6308 (source
6309 (origin
6310 (method url-fetch)
6311 (uri (pypi-uri "soupsieve" version))
6312 (sha256
6313 (base32
6314 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
6315 (build-system python-build-system)
6316 (arguments `(#:tests? #f))
6317 ;;XXX: 2 tests fail currently despite claming they were to be
6318 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6319 ;;don't want to create a circular dependency.
6320 (home-page "https://github.com/facelessuser/soupsieve")
6321 (synopsis "CSS selector library")
6322 (description
6323 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6324 Soup 4. It aims to provide selecting, matching, and filtering using modern
6325 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6326 specifications up through the latest CSS level 4 drafts and beyond (though
6327 some are not yet implemented).")
6328 (properties `((python2-variant . ,(delay python2-soupsieve))))
6329 (license license:expat)))
6330
6331 (define-public python2-soupsieve
6332 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6333 (package
6334 (inherit base)
6335 (propagated-inputs
6336 `(("python2-backports-functools-lru-cache"
6337 ,python2-backports-functools-lru-cache)
6338 ,@(package-propagated-inputs base))))))
6339
6340 (define-public python-netifaces
6341 (package
6342 (name "python-netifaces")
6343 (version "0.10.7")
6344 (source
6345 (origin
6346 (method url-fetch)
6347 (uri (pypi-uri "netifaces" version))
6348 (sha256
6349 (base32
6350 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6351 (build-system python-build-system)
6352 (home-page "https://github.com/al45tair/netifaces")
6353 (synopsis
6354 "Python module for portable network interface information")
6355 (description
6356 "Netifaces is a Python module providing information on network
6357 interfaces in an easy and portable manner.")
6358 (license license:expat)))
6359
6360 (define-public python2-netifaces
6361 (package-with-python2 python-netifaces))
6362
6363 (define-public python-networkx
6364 (package
6365 (name "python-networkx")
6366 (version "2.4")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "networkx" version))
6371 (sha256
6372 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
6373 (build-system python-build-system)
6374 (arguments
6375 '(#:phases (modify-phases %standard-phases
6376 (replace 'check
6377 (lambda* (#:key tests? #:allow-other-keys)
6378 (if tests?
6379 (invoke "pytest" "-vv" "--pyargs" "networkx")
6380 (format #t "test suite not run~%"))
6381 #t)))))
6382 ;; python-decorator is needed at runtime.
6383 (propagated-inputs
6384 `(("python-decorator" ,python-decorator)))
6385 (native-inputs
6386 `(("python-pytest" ,python-pytest)))
6387 (home-page "https://networkx.github.io/")
6388 (synopsis "Python module for creating and manipulating graphs and networks")
6389 (description
6390 "NetworkX is a Python package for the creation, manipulation, and study
6391 of the structure, dynamics, and functions of complex networks.")
6392 (properties `((python2-variant . ,(delay python2-networkx))))
6393 (license license:bsd-3)))
6394
6395 ;; NetworkX 2.2 is the last version with support for Python 2.
6396 (define-public python2-networkx
6397 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
6398 (package
6399 (inherit base)
6400 (version "2.2")
6401 (source (origin
6402 (method url-fetch)
6403 (uri (pypi-uri "networkx" version ".zip"))
6404 (sha256
6405 (base32
6406 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6407 (arguments
6408 `(#:python ,python-2))
6409 (native-inputs
6410 `(("python-nose" ,python2-nose)
6411 ("unzip" ,unzip))))))
6412
6413 (define-public python-datrie
6414 (package
6415 (name "python-datrie")
6416 (version "0.8")
6417 (source
6418 (origin
6419 (method url-fetch)
6420 (uri (pypi-uri "datrie" version))
6421 (sha256
6422 (base32
6423 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6424 (build-system python-build-system)
6425 (native-inputs
6426 `(("python-cython" ,python-cython)
6427 ("python-hypothesis" ,python-hypothesis)
6428 ("python-pytest" ,python-pytest)
6429 ("python-pytest-runner" ,python-pytest-runner)))
6430 (home-page "https://github.com/kmike/datrie")
6431 (synopsis "Fast, efficiently stored trie for Python")
6432 (description
6433 "This package provides a fast, efficiently stored trie implementation for
6434 Python.")
6435 (license license:lgpl2.1+)))
6436
6437 (define-public snakemake
6438 (package
6439 (name "snakemake")
6440 (version "5.7.1")
6441 (source
6442 (origin
6443 (method url-fetch)
6444 (uri (pypi-uri "snakemake" version))
6445 (sha256
6446 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6447 (build-system python-build-system)
6448 (arguments
6449 ;; TODO: Package missing test dependencies.
6450 '(#:tests? #f
6451 #:phases
6452 (modify-phases %standard-phases
6453 ;; For cluster execution Snakemake will call Python. Since there is
6454 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6455 ;; this by calling the snakemake wrapper instead.
6456 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6457 (lambda* (#:key outputs #:allow-other-keys)
6458 (substitute* "snakemake/executors.py"
6459 (("\\{sys.executable\\} -m snakemake")
6460 (string-append (assoc-ref outputs "out")
6461 "/bin/snakemake")))
6462 #t)))))
6463 (propagated-inputs
6464 `(("python-appdirs" ,python-appdirs)
6465 ("python-configargparse" ,python-configargparse)
6466 ("python-datrie" ,python-datrie)
6467 ("python-docutils" ,python-docutils)
6468 ("python-gitpython" ,python-gitpython)
6469 ("python-jinja2" ,python-jinja2)
6470 ("python-jsonschema" ,python-jsonschema)
6471 ("python-networkx" ,python-networkx)
6472 ("python-psutil" ,python-psutil)
6473 ("python-pyyaml" ,python-pyyaml)
6474 ("python-ratelimiter" ,python-ratelimiter)
6475 ("python-requests" ,python-requests)
6476 ("python-wrapt" ,python-wrapt)))
6477 (home-page "https://snakemake.readthedocs.io")
6478 (synopsis "Python-based execution environment for make-like workflows")
6479 (description
6480 "Snakemake aims to reduce the complexity of creating workflows by
6481 providing a clean and modern domain specific specification language (DSL) in
6482 Python style, together with a fast and comfortable execution environment.")
6483 (license license:expat)))
6484
6485 (define-public python-pyqrcode
6486 (package
6487 (name "python-pyqrcode")
6488 (version "1.2.1")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (pypi-uri "PyQRCode" version))
6493 (sha256
6494 (base32
6495 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6496 (build-system python-build-system)
6497 (home-page
6498 "https://github.com/mnooner256/pyqrcode")
6499 (synopsis "QR code generator")
6500 (description
6501 "Pyqrcode is a QR code generator written purely in Python with
6502 SVG, EPS, PNG and terminal output.")
6503 (license license:bsd-3)))
6504
6505 (define-public python-seaborn
6506 (package
6507 (name "python-seaborn")
6508 (version "0.10.0")
6509 (source
6510 (origin
6511 (method url-fetch)
6512 (uri (pypi-uri "seaborn" version))
6513 (sha256
6514 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
6515 (build-system python-build-system)
6516 (arguments
6517 `(#:phases
6518 (modify-phases %standard-phases
6519 (add-before 'check 'start-xserver
6520 (lambda* (#:key inputs #:allow-other-keys)
6521 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6522 ;; There must be a running X server and make check doesn't
6523 ;; start one. Therefore we must do it.
6524 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6525 (setenv "DISPLAY" ":1")
6526 #t)))
6527 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6528 (propagated-inputs
6529 `(("python-pandas" ,python-pandas)
6530 ("python-matplotlib" ,python-matplotlib)
6531 ("python-numpy" ,python-numpy)
6532 ("python-scipy" ,python-scipy)))
6533 (native-inputs
6534 `(("python-pytest" ,python-pytest)
6535 ("xorg-server" ,xorg-server-for-tests)))
6536 (home-page "https://seaborn.pydata.org/")
6537 (synopsis "Statistical data visualization")
6538 (description
6539 "Seaborn is a library for making attractive and informative statistical
6540 graphics in Python. It is built on top of matplotlib and tightly integrated
6541 with the PyData stack, including support for numpy and pandas data structures
6542 and statistical routines from scipy and statsmodels.")
6543 (properties `((python2-variant . ,(delay python2-seaborn))))
6544 (license license:bsd-3)))
6545
6546 ;; 0.9.1 is the last release with support for Python 2.
6547 (define-public python2-seaborn
6548 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6549 (package
6550 (inherit base)
6551 (version "0.9.1")
6552 (source (origin
6553 (method url-fetch)
6554 (uri (pypi-uri "seaborn" version))
6555 (sha256
6556 (base32
6557 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
6558
6559 (define-public python-mpmath
6560 (package
6561 (name "python-mpmath")
6562 (version "0.19")
6563 (source (origin
6564 (method url-fetch)
6565 (uri (string-append "http://mpmath.org/files/mpmath-"
6566 version ".tar.gz"))
6567 (sha256
6568 (base32
6569 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6570 (build-system python-build-system)
6571 (arguments
6572 '(#:phases
6573 (modify-phases %standard-phases
6574 (replace 'check
6575 (lambda _
6576 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6577 (home-page "http://mpmath.org")
6578 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6579 (description
6580 "@code{mpmath} can be used as an arbitrary-precision substitute for
6581 Python's float/complex types and math/cmath modules, but also does much
6582 more advanced mathematics.")
6583 (license license:bsd-3)))
6584
6585 (define-public python2-mpmath
6586 (package-with-python2 python-mpmath))
6587
6588 (define-public python-bigfloat
6589 (package
6590 (name "python-bigfloat")
6591 (version "0.3.0")
6592 (source
6593 (origin
6594 (method url-fetch)
6595 (uri (pypi-uri "bigfloat" version))
6596 (sha256
6597 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6598 (build-system python-build-system)
6599 (inputs
6600 `(("mpfr" ,mpfr)))
6601 (home-page "https://github.com/mdickinson/bigfloat")
6602 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6603 (description
6604 "This package provides a Python interface to the MPFR library for
6605 multiprecision arithmetic.")
6606 (license license:lgpl3+)))
6607
6608 (define-public python2-bigfloat
6609 (package-with-python2 python-bigfloat))
6610
6611 (define-public python-sympy
6612 (package
6613 (name "python-sympy")
6614 (version "1.1.1")
6615 (source
6616 (origin
6617 (method url-fetch)
6618 (uri (string-append
6619 "https://github.com/sympy/sympy/releases/download/sympy-"
6620 version "/sympy-" version ".tar.gz"))
6621 (sha256
6622 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6623 (build-system python-build-system)
6624 (arguments
6625 `(#:phases
6626 (modify-phases %standard-phases
6627 ;; Run the core tests after installation. By default it would run
6628 ;; *all* tests, which take a very long time to complete and are known
6629 ;; to be flaky.
6630 (delete 'check)
6631 (add-after 'install 'check
6632 (lambda* (#:key outputs #:allow-other-keys)
6633 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6634 #t)))))
6635 (propagated-inputs
6636 `(("python-mpmath" ,python-mpmath)))
6637 (home-page "https://www.sympy.org/")
6638 (synopsis "Python library for symbolic mathematics")
6639 (description
6640 "SymPy is a Python library for symbolic mathematics. It aims to become a
6641 full-featured computer algebra system (CAS) while keeping the code as simple
6642 as possible in order to be comprehensible and easily extensible.")
6643 (license license:bsd-3)))
6644
6645 (define-public python2-sympy
6646 (package
6647 (inherit (package-with-python2 python-sympy))
6648 (arguments
6649 `(#:phases
6650 (modify-phases %standard-phases
6651 ;; Run the core tests after installation. By default it would run
6652 ;; *all* tests, which take a very long time to complete and are known
6653 ;; to be flaky.
6654 (delete 'check)
6655 (add-after 'install 'check
6656 (lambda* (#:key outputs #:allow-other-keys)
6657 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6658 #t)))))))
6659
6660 (define-public python-q
6661 (package
6662 (name "python-q")
6663 (version "2.6")
6664 (source
6665 (origin
6666 (method url-fetch)
6667 (uri (pypi-uri "q" version))
6668 (sha256
6669 (base32
6670 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6671 (build-system python-build-system)
6672 (home-page "https://github.com/zestyping/q")
6673 (synopsis "Quick-and-dirty debugging output for tired programmers")
6674 (description
6675 "q is a Python module for \"print\" style of debugging Python code. It
6676 provides convenient short API for print out of values, tracebacks, and
6677 falling into the Python interpreter.")
6678 (license license:asl2.0)))
6679
6680 (define-public python2-q
6681 (package-with-python2 python-q))
6682
6683 (define-public python2-xlib
6684 (package
6685 (name "python2-xlib")
6686 (version "0.14")
6687 (source (origin
6688 (method url-fetch)
6689 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6690 "/" version "/"
6691 "python-xlib-" version ".tar.gz"))
6692 (sha256
6693 (base32
6694 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6695 (build-system python-build-system)
6696 (arguments
6697 `(#:python ,python-2 ;Python 2 only
6698 #:tests? #f)) ;no tests
6699 (home-page "http://python-xlib.sourceforge.net/")
6700 (synopsis "Python X11 client library")
6701 (description
6702 "The Python X Library is intended to be a fully functional X client
6703 library for Python programs. It is useful to implement low-level X clients.
6704 It is written entirely in Python.")
6705 (license license:gpl2+)))
6706
6707 (define-public python-singledispatch
6708 (package
6709 (name "python-singledispatch")
6710 (version "3.4.0.3")
6711 (source
6712 (origin
6713 (method url-fetch)
6714 (uri (pypi-uri "singledispatch" version))
6715 (sha256
6716 (base32
6717 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6718 (build-system python-build-system)
6719 (native-inputs
6720 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6721 (home-page
6722 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
6723 (synopsis "Backport of singledispatch feature from Python 3.4")
6724 (description
6725 "This library brings functools.singledispatch from Python 3.4 to Python
6726 2.6-3.3.")
6727 (license license:expat)))
6728
6729 (define-public python2-singledispatch
6730 (package-with-python2 python-singledispatch))
6731
6732 ;; the python- version can be removed with python-3.5
6733 (define-public python-backports-abc
6734 (package
6735 (name "python-backports-abc")
6736 (version "0.5")
6737 (source
6738 (origin
6739 (method url-fetch)
6740 (uri (pypi-uri "backports_abc" version))
6741 (sha256
6742 (base32
6743 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6744 (build-system python-build-system)
6745 (home-page "https://github.com/cython/backports_abc")
6746 (synopsis "Backport of additions to the 'collections.abc' module")
6747 (description
6748 "Python-backports-abc provides a backport of additions to the
6749 @code{collections.abc} module in Python-3.5.")
6750 (license license:psfl)))
6751
6752 (define-public python2-backports-abc
6753 (package-with-python2 python-backports-abc))
6754
6755 (define-public python-backports-csv
6756 (package
6757 (name "python-backports-csv")
6758 (version "1.0.5")
6759 (source
6760 (origin
6761 (method url-fetch)
6762 (uri (pypi-uri "backports.csv" version))
6763 (sha256
6764 (base32
6765 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6766 (build-system python-build-system)
6767 (home-page "https://github.com/ryanhiebert/backports.csv")
6768 (synopsis "Backport of Python 3's csv module for Python 2")
6769 (description
6770 "Provides a backport of Python 3's @code{csv} module for parsing
6771 comma separated values. The API of the @code{csv} module in Python 2
6772 is drastically different from the @code{csv} module in Python 3.
6773 This is due, for the most part, to the difference between str in
6774 Python 2 and Python 3.")
6775 (license license:psfl)))
6776
6777 (define-public python2-backports-csv
6778 (package-with-python2 python-backports-csv))
6779
6780 (define-public python2-backports-shutil-get-terminal-size
6781 (package
6782 (name "python2-backports-shutil-get-terminal-size")
6783 (version "1.0.0")
6784 (source
6785 (origin
6786 (method url-fetch)
6787 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6788 (sha256
6789 (base32
6790 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6791 (build-system python-build-system)
6792 (arguments
6793 `(#:python ,python-2
6794 #:phases
6795 (modify-phases %standard-phases
6796 (replace 'check
6797 (lambda _
6798 (invoke "py.test" "-v"))))))
6799 (native-inputs
6800 `(("python2-pytest" ,python2-pytest)))
6801 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6802 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6803 (description
6804 "This package provides a backport of the @code{get_terminal_size
6805 function} from Python 3.3's @code{shutil}.
6806 Unlike the original version it is written in pure Python rather than C,
6807 so it might be a tiny bit slower.")
6808 (license license:expat)))
6809
6810 (define-public python-waf
6811 (package
6812 (name "python-waf")
6813 (version "2.0.19")
6814 (source (origin
6815 (method url-fetch)
6816 (uri (string-append "https://waf.io/"
6817 "waf-" version ".tar.bz2"))
6818 (sha256
6819 (base32
6820 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6821 (build-system python-build-system)
6822 (arguments
6823 '(#:phases
6824 (modify-phases %standard-phases
6825 (replace 'build
6826 (lambda _
6827 ;; XXX: Find a way to add all extra tools.
6828 (let ((tools '("gccdeps"
6829 "clang_compilation_database")))
6830 (invoke "python" "waf-light" "configure" "build"
6831 (string-append "--tools="
6832 (string-join tools ","))))))
6833 (replace 'check
6834 (lambda _
6835 (invoke "python" "waf" "--version")))
6836 (replace 'install
6837 (lambda* (#:key outputs #:allow-other-keys)
6838 (let ((out (assoc-ref outputs "out")))
6839 (install-file "waf" (string-append out "/bin")))
6840 #t))
6841 ;; waf breaks when it is wrapped.
6842 (delete 'wrap))))
6843 (home-page "https://waf.io/")
6844 (synopsis "Python-based build system")
6845 (description
6846 "Waf is a Python-based framework for configuring, compiling and installing
6847 applications.")
6848 (license license:bsd-3)))
6849
6850 (define-public python2-waf
6851 (package-with-python2 python-waf))
6852
6853 (define-public python-pyzmq
6854 (package
6855 (name "python-pyzmq")
6856 (version "17.1.2")
6857 (source
6858 (origin
6859 (method url-fetch)
6860 (uri (pypi-uri "pyzmq" version))
6861 (sha256
6862 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6863 (build-system python-build-system)
6864 (arguments
6865 `(#:configure-flags
6866 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6867 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6868 ;; --inplace' for 'python setup.py test' to work.
6869 #:tests? #f))
6870 (inputs
6871 `(("zeromq" ,zeromq)))
6872 (native-inputs
6873 `(("pkg-config" ,pkg-config)
6874 ("python-nose" ,python-nose)))
6875 (home-page "https://github.com/zeromq/pyzmq")
6876 (synopsis "Python bindings for 0MQ")
6877 (description
6878 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6879 (license license:bsd-4)))
6880
6881 (define-public python2-pyzmq
6882 (package-with-python2 python-pyzmq))
6883
6884 (define-public python-pep8
6885 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6886 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6887 ;; some dependents' test suites, and nothing more.
6888 (package
6889 (name "python-pep8")
6890 (version "1.7.0")
6891 (source
6892 (origin
6893 (method url-fetch)
6894 (uri (pypi-uri "pep8" version))
6895 (sha256
6896 (base32
6897 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6898 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6899 (build-system python-build-system)
6900 (home-page "https://pep8.readthedocs.org/")
6901 (synopsis "Python style guide checker")
6902 (description
6903 "This tools checks Python code against some of the style conventions in
6904 PEP 8.")
6905 (license license:expat)))
6906
6907 (define-public python2-pep8
6908 (package-with-python2 python-pep8))
6909
6910 (define-public python-pyflakes
6911 (package
6912 (name "python-pyflakes")
6913 (version "2.1.1")
6914 (source
6915 (origin
6916 (method url-fetch)
6917 (uri (pypi-uri "pyflakes" version))
6918 (sha256
6919 (base32
6920 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6921 (build-system python-build-system)
6922 (home-page
6923 "https://github.com/pyflakes/pyflakes")
6924 (synopsis "Passive checker of Python programs")
6925 (description
6926 "Pyflakes statically checks Python source code for common errors.")
6927 (license license:expat)))
6928
6929 (define-public python2-pyflakes
6930 (package-with-python2 python-pyflakes))
6931
6932 (define-public python-mccabe
6933 (package
6934 (name "python-mccabe")
6935 (version "0.6.1")
6936 (source
6937 (origin
6938 (method url-fetch)
6939 (uri (pypi-uri "mccabe" version))
6940 (sha256
6941 (base32
6942 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6943 (build-system python-build-system)
6944 (native-inputs
6945 `(("python-pytest" ,python-pytest-bootstrap)
6946 ("python-pytest-runner" ,python-pytest-runner)))
6947 (home-page "https://github.com/flintwork/mccabe")
6948 (synopsis "McCabe checker, plugin for flake8")
6949 (description
6950 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6951 complexity of Python source code.")
6952 (license license:expat)))
6953
6954 (define-public python2-mccabe
6955 (package-with-python2 python-mccabe))
6956
6957 (define-public python-mccabe-0.2.1
6958 (package (inherit python-mccabe)
6959 (version "0.2.1")
6960 (source
6961 (origin
6962 (method url-fetch)
6963 (uri (pypi-uri "mccabe" version))
6964 (sha256
6965 (base32
6966 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6967
6968 (define-public python2-mccabe-0.2.1
6969 (package-with-python2 python-mccabe-0.2.1))
6970
6971 ;; Flake8 2.4.1 requires an older version of pep8.
6972 ;; This should be removed ASAP.
6973 (define-public python-pep8-1.5.7
6974 (package (inherit python-pep8)
6975 (version "1.5.7")
6976 (source
6977 (origin
6978 (method url-fetch)
6979 (uri (pypi-uri "pep8" version))
6980 (sha256
6981 (base32
6982 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6983 (arguments
6984 ;; XXX Tests not compatible with Python 3.5.
6985 '(#:tests? #f))))
6986
6987 (define-public python2-pep8-1.5.7
6988 (package-with-python2 python-pep8-1.5.7))
6989
6990 ;; Flake8 2.4.1 requires an older version of pyflakes.
6991 ;; This should be removed ASAP.
6992 (define-public python-pyflakes-0.8.1
6993 (package (inherit python-pyflakes)
6994 (version "0.8.1")
6995 (source
6996 (origin
6997 (method url-fetch)
6998 (uri (pypi-uri "pyflakes" version))
6999 (sha256
7000 (base32
7001 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
7002 (arguments
7003 ;; XXX Tests not compatible with Python 3.5.
7004 '(#:tests? #f))))
7005
7006 (define-public python2-pyflakes-0.8.1
7007 (package-with-python2 python-pyflakes-0.8.1))
7008
7009 (define-public python-flake8
7010 (package
7011 (name "python-flake8")
7012 (version "3.7.7")
7013 (source (origin
7014 (method url-fetch)
7015 (uri (pypi-uri "flake8" version))
7016 (sha256
7017 (base32
7018 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
7019 (build-system python-build-system)
7020 (arguments
7021 `(#:phases
7022 (modify-phases %standard-phases
7023 (delete 'check)
7024 (add-after 'install 'check
7025 (lambda* (#:key inputs outputs #:allow-other-keys)
7026 (add-installed-pythonpath inputs outputs)
7027 (invoke "pytest" "-v")
7028 #t)))))
7029 (propagated-inputs
7030 `(("python-pycodestyle" ,python-pycodestyle)
7031 ("python-entrypoints" ,python-entrypoints)
7032 ("python-pyflakes" ,python-pyflakes)
7033 ("python-mccabe" ,python-mccabe)))
7034 (native-inputs
7035 `(("python-mock" ,python-mock)
7036 ("python-pytest" ,python-pytest-bootstrap)
7037 ("python-pytest-runner" ,python-pytest-runner)))
7038 (home-page "https://gitlab.com/pycqa/flake8")
7039 (synopsis
7040 "The modular source code checker: pep8, pyflakes and co")
7041 (description
7042 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7043 (properties `((python2-variant . ,(delay python2-flake8))))
7044 (license license:expat)))
7045
7046 (define-public python2-flake8
7047 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
7048 (package (inherit base)
7049 (propagated-inputs
7050 `(("python2-configparser" ,python2-configparser)
7051 ("python2-enum34" ,python2-enum34)
7052 ("python2-functools32" ,python2-functools32)
7053 ("python2-typing" ,python2-typing)
7054 ,@(package-propagated-inputs base))))))
7055
7056 ;; python-hacking requires flake8 <2.6.0.
7057 (define-public python-flake8-2.5
7058 (package
7059 (inherit python-flake8)
7060 (version "2.5.5")
7061 (source (origin
7062 (method url-fetch)
7063 (uri (pypi-uri "flake8" version))
7064 (sha256
7065 (base32
7066 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
7067 (propagated-inputs
7068 `(("python-pep8" ,python-pep8)
7069 ,@(package-propagated-inputs python-flake8)))
7070 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
7071
7072 (define-public python2-flake8-2.5
7073 (package
7074 (inherit python2-flake8)
7075 (version (package-version python-flake8-2.5))
7076 (source (origin
7077 (inherit (package-source python-flake8-2.5))))
7078 (propagated-inputs
7079 `(("python2-pep8" ,python2-pep8)
7080 ,@(package-propagated-inputs python2-flake8)))))
7081
7082 (define-public python-flake8-polyfill
7083 (package
7084 (name "python-flake8-polyfill")
7085 (version "1.0.2")
7086 (source
7087 (origin
7088 (method url-fetch)
7089 (uri (pypi-uri "flake8-polyfill" version))
7090 (sha256
7091 (base32
7092 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7093 (build-system python-build-system)
7094 (arguments
7095 '(#:phases
7096 (modify-phases %standard-phases
7097 (replace 'check
7098 (lambda _
7099 ;; Be compatible with Pytest 4:
7100 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7101 (substitute* "setup.cfg"
7102 (("\\[pytest\\]")
7103 "[tool:pytest]"))
7104
7105 (setenv "PYTHONPATH"
7106 (string-append (getcwd) "/build/lib:"
7107 (getenv "PYTHONPATH")))
7108 (invoke "py.test" "-v"))))))
7109 (native-inputs
7110 `(("python-flake8" ,python-flake8)
7111 ("python-mock" ,python-mock)
7112 ("python-pep8" ,python-pep8)
7113 ("python-pycodestyle" ,python-pycodestyle)
7114 ("python-pytest" ,python-pytest)))
7115 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7116 (synopsis "Polyfill package for Flake8 plugins")
7117 (description
7118 "This package that provides some compatibility helpers for Flake8
7119 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7120 (license license:expat)))
7121
7122 (define-public python2-flake8-polyfill
7123 (package-with-python2 python-flake8-polyfill))
7124
7125 (define-public python-mistune
7126 (package
7127 (name "python-mistune")
7128 (version "0.8.4")
7129 (source
7130 (origin
7131 (method url-fetch)
7132 (uri (pypi-uri "mistune" version))
7133 (sha256
7134 (base32
7135 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7136 (build-system python-build-system)
7137 (native-inputs
7138 `(("python-nose" ,python-nose)
7139 ("python-cython" ,python-cython)))
7140 (home-page "https://github.com/lepture/mistune")
7141 (synopsis "Markdown parser in pure Python")
7142 (description "This package provides a fast markdown parser in pure
7143 Python.")
7144 (license license:bsd-3)))
7145
7146 (define-public python2-mistune
7147 (package-with-python2 python-mistune))
7148
7149 (define-public python-markdown
7150 (package
7151 (name "python-markdown")
7152 (version "3.2.1")
7153 (source
7154 (origin
7155 (method url-fetch)
7156 (uri (pypi-uri "Markdown" version))
7157 (sha256
7158 (base32
7159 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
7160 (build-system python-build-system)
7161 (native-inputs
7162 `(("python-nose" ,python-nose)
7163 ("python-pyyaml" ,python-pyyaml)))
7164 (home-page "https://python-markdown.github.io/")
7165 (synopsis "Python implementation of Markdown")
7166 (description
7167 "This package provides a Python implementation of John Gruber's
7168 Markdown. The library features international input, various Markdown
7169 extensions, and several HTML output formats. A command line wrapper
7170 markdown_py is also provided to convert Markdown files to HTML.")
7171 (properties `((python2-variant . ,(delay python2-markdown))))
7172 (license license:bsd-3)))
7173
7174 ;; Markdown 3.2 dropped support for Python 2.
7175 (define-public python2-markdown
7176 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7177 (package/inherit
7178 base
7179 (version "3.1.1")
7180 (source (origin
7181 (method url-fetch)
7182 (uri (pypi-uri "Markdown" version))
7183 (sha256
7184 (base32
7185 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
7186
7187 (define-public python-ptyprocess
7188 (package
7189 (name "python-ptyprocess")
7190 (version "0.5.2")
7191 (source
7192 (origin
7193 (method url-fetch)
7194 (uri (pypi-uri "ptyprocess" version))
7195 (sha256
7196 (base32
7197 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7198 (build-system python-build-system)
7199 (native-inputs
7200 `(("python-nose" ,python-nose)))
7201 (arguments
7202 `(#:phases
7203 (modify-phases %standard-phases
7204 (replace 'check
7205 (lambda _ (invoke "nosetests"))))))
7206 (home-page "https://github.com/pexpect/ptyprocess")
7207 (synopsis "Run a subprocess in a pseudo terminal")
7208 (description
7209 "This package provides a Python library used to launch a subprocess in a
7210 pseudo terminal (pty), and interact with both the process and its pty.")
7211 (license license:isc)))
7212
7213 (define-public python2-ptyprocess
7214 (package-with-python2 python-ptyprocess))
7215
7216 (define-public python-cram
7217 (package
7218 (name "python-cram")
7219 (version "0.7")
7220 (home-page "https://bitheap.org/cram/")
7221 (source (origin
7222 (method url-fetch)
7223 (uri (list (string-append home-page "cram-"
7224 version ".tar.gz")
7225 (pypi-uri "cram" version)))
7226 (sha256
7227 (base32
7228 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7229 (arguments
7230 '(#:phases
7231 (modify-phases %standard-phases
7232 (add-after 'unpack 'patch-source
7233 (lambda _
7234 (substitute* (find-files "cram" ".*\\.py$")
7235 ;; Replace default shell path.
7236 (("/bin/sh") (which "sh")))
7237 (substitute* (find-files "tests" ".*\\.t$")
7238 (("md5") "md5sum")
7239 (("/bin/bash") (which "bash"))
7240 (("/bin/sh") (which "sh")))
7241 (substitute* "cram/_test.py"
7242 ;; This hack works around a bug triggered by substituting
7243 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7244 ;; "cram -h", which breaks the output at 80 characters. This
7245 ;; causes the line showing the default shell to break into two
7246 ;; lines, but the test expects a single line...
7247 (("env\\['COLUMNS'\\] = '80'")
7248 "env['COLUMNS'] = '160'"))
7249
7250 (substitute* "Makefile"
7251 ;; Recent versions of python-coverage have caused the test
7252 ;; coverage to decrease (as of version 0.7). Allow that.
7253 (("--fail-under=100")
7254 "--fail-under=90"))
7255
7256 #t))
7257 (replace 'check
7258 ;; The test phase uses the built library and executable.
7259 (lambda* (#:key inputs outputs #:allow-other-keys)
7260 (add-installed-pythonpath inputs outputs)
7261 (setenv "PATH" (string-append (getenv "PATH") ":"
7262 (assoc-ref outputs "out") "/bin"))
7263 (invoke "make" "test"))))))
7264 (build-system python-build-system)
7265 (native-inputs
7266 `(("python-coverage" ,python-coverage)
7267 ("which" ,which)))
7268 (synopsis "Simple testing framework for command line applications")
7269 (description
7270 "Cram is a functional testing framework for command line applications.
7271 Cram tests look like snippets of interactive shell sessions. Cram runs each
7272 command and compares the command output in the test with the command’s actual
7273 output.")
7274 (license license:gpl2+)))
7275
7276 (define-public python2-cram
7277 (package-with-python2 python-cram))
7278
7279 (define-public python-straight-plugin
7280 (package
7281 (name "python-straight-plugin")
7282 (version "1.4.1")
7283 (source
7284 (origin
7285 (method url-fetch)
7286 (uri (pypi-uri "straight.plugin" version))
7287 (sha256
7288 (base32
7289 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7290 (build-system python-build-system)
7291 (home-page "https://github.com/ironfroggy/straight.plugin")
7292 (synopsis "Simple namespaced plugin facility")
7293 (description "Straight Plugin provides a type of plugin you can create from
7294 almost any existing Python modules, and an easy way for outside developers to
7295 add functionality and customization to your projects with their own plugins.")
7296 (license license:expat)))
7297
7298 (define-public python2-straight-plugin
7299 (package-with-python2 python-straight-plugin))
7300
7301 (define-public python-fonttools
7302 (package
7303 (name "python-fonttools")
7304 (version "3.38.0")
7305 (source (origin
7306 (method url-fetch)
7307 (uri (pypi-uri "fonttools" version ".zip"))
7308 (sha256
7309 (base32
7310 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
7311 (build-system python-build-system)
7312 (native-inputs
7313 `(("unzip" ,unzip)
7314 ("python-pytest" ,python-pytest)
7315 ("python-pytest-runner" ,python-pytest-runner)))
7316 (home-page "https://github.com/fonttools/fonttools")
7317 (synopsis "Tools to manipulate font files")
7318 (description
7319 "FontTools/TTX is a library to manipulate font files from Python. It
7320 supports reading and writing of TrueType/OpenType fonts, reading and writing
7321 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7322 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7323 from an XML-based format.")
7324 (license license:expat)))
7325
7326 (define-public python2-fonttools
7327 (package-with-python2 python-fonttools))
7328
7329 (define-public python-ly
7330 (package
7331 (name "python-ly")
7332 (version "0.9.5")
7333 (source
7334 (origin
7335 (method url-fetch)
7336 (uri (pypi-uri name version))
7337 (sha256
7338 (base32
7339 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7340 (build-system python-build-system)
7341 (arguments
7342 ;; FIXME: Some tests need network access.
7343 '(#:tests? #f))
7344 (synopsis "Tool and library for manipulating LilyPond files")
7345 (description "This package provides a Python library to parse, manipulate
7346 or create documents in LilyPond format. A command line program ly is also
7347 provided that can be used to do various manipulations with LilyPond files.")
7348 (home-page "https://pypi.org/project/python-ly/")
7349 (license license:gpl2+)))
7350
7351 (define-public python-appdirs
7352 (package
7353 (name "python-appdirs")
7354 (version "1.4.3")
7355 (source
7356 (origin
7357 (method url-fetch)
7358 (uri (pypi-uri "appdirs" version))
7359 (sha256
7360 (base32
7361 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7362 (build-system python-build-system)
7363 (home-page "https://github.com/ActiveState/appdirs")
7364 (synopsis
7365 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7366 (description
7367 "This module provides a portable way of finding out where user data
7368 should be stored on various operating systems.")
7369 (license license:expat)))
7370
7371 (define-public python2-appdirs
7372 (package-with-python2 python-appdirs))
7373
7374 (define-public python-llfuse
7375 (package
7376 (name "python-llfuse")
7377 (version "1.3.5")
7378 (source (origin
7379 (method url-fetch)
7380 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7381 (sha256
7382 (base32
7383 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7384 (build-system python-build-system)
7385 (inputs
7386 `(("fuse" ,fuse)
7387 ("attr" ,attr)))
7388 (native-inputs
7389 `(("pkg-config" ,pkg-config)))
7390 (synopsis "Python bindings for FUSE")
7391 (description
7392 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7393 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7394 (license license:lgpl2.0+)
7395 (properties `((python2-variant . ,(delay python2-llfuse))))))
7396
7397 (define-public python2-llfuse
7398 (package (inherit (package-with-python2
7399 (strip-python2-variant python-llfuse)))
7400 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7401
7402 ;; For attic-0.16
7403 (define-public python-llfuse-0.41
7404 (package (inherit python-llfuse)
7405 (version "0.41.1")
7406 (source (origin
7407 (method url-fetch)
7408 (uri (string-append
7409 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7410 "llfuse-" version ".tar.bz2"))
7411 (sha256
7412 (base32
7413 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7414 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7415 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7416 (license (list license:expat license:lgpl2.0+))))
7417
7418 (define-public python-msgpack
7419 (package
7420 (name "python-msgpack")
7421 (version "0.5.6")
7422 (source (origin
7423 (method url-fetch)
7424 (uri (pypi-uri "msgpack" version))
7425 (sha256
7426 (base32
7427 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7428 (build-system python-build-system)
7429 (arguments
7430 `(#:modules ((guix build utils)
7431 (guix build python-build-system)
7432 (ice-9 ftw)
7433 (srfi srfi-1)
7434 (srfi srfi-26))
7435 #:phases
7436 (modify-phases %standard-phases
7437 (replace 'check
7438 (lambda _
7439 (let ((cwd (getcwd)))
7440 (setenv "PYTHONPATH"
7441 (string-append cwd "/build/"
7442 (find (cut string-prefix? "lib" <>)
7443 (scandir (string-append cwd "/build")))
7444 ":"
7445 (getenv "PYTHONPATH")))
7446 (invoke "pytest" "-v" "test")))))))
7447 (native-inputs
7448 `(("python-pytest" ,python-pytest)))
7449 (synopsis "MessagePack (de)serializer")
7450 (description "MessagePack is a fast, compact binary serialization format,
7451 suitable for similar data to JSON. This package provides CPython bindings for
7452 reading and writing MessagePack data.")
7453 (home-page "https://pypi.org/project/msgpack/")
7454 (license license:asl2.0)))
7455
7456 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7457 ;; release 0.5. Some packages like borg still call it by the old name for now.
7458 ;; <https://bugs.gnu.org/30662>
7459 (define-public python-msgpack-transitional
7460 (package
7461 (inherit python-msgpack)
7462 (name "python-msgpack-transitional")
7463 (arguments
7464 (substitute-keyword-arguments (package-arguments python-msgpack)
7465 ((#:phases phases)
7466 `(modify-phases ,phases
7467 (add-after 'unpack 'configure-transitional
7468 (lambda _
7469 ;; Keep using the old name.
7470 (substitute* "setup.py"
7471 (("TRANSITIONAL = False")
7472 "TRANSITIONAL = 1"))
7473 #t))))))))
7474
7475 (define-public python2-msgpack
7476 (package-with-python2 python-msgpack))
7477
7478 (define-public python-netaddr
7479 (package
7480 (name "python-netaddr")
7481 (version "0.7.19")
7482 (source
7483 (origin
7484 (method url-fetch)
7485 (uri (pypi-uri "netaddr" version))
7486 (sha256
7487 (base32
7488 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7489 (build-system python-build-system)
7490 (arguments `(#:tests? #f)) ;; No tests.
7491 (home-page "https://github.com/drkjam/netaddr/")
7492 (synopsis "Pythonic manipulation of network addresses")
7493 (description
7494 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7495 and MAC network addresses.")
7496 (license license:bsd-3)))
7497
7498 (define-public python2-netaddr
7499 (package-with-python2 python-netaddr))
7500
7501 (define-public python2-pyroute2
7502 (package
7503 (name "python2-pyroute2")
7504 (version "0.5.6")
7505 (source
7506 (origin
7507 (method url-fetch)
7508 (uri (pypi-uri "pyroute2" version))
7509 (sha256
7510 (base32
7511 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7512 (build-system python-build-system)
7513 (arguments
7514 `(#:python ,python-2)) ;Python 3.x is not supported
7515 (home-page "https://github.com/svinota/pyroute2")
7516 (synopsis "Python netlink library")
7517 (description
7518 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7519 Supported netlink families and protocols include:
7520 @itemize
7521 @item rtnl, network settings - addresses, routes, traffic controls
7522 @item nfnetlink - netfilter API: ipset, nftables, ...
7523 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7524 @item devlink - manage and monitor devlink-enabled hardware
7525 @item generic - generic netlink families
7526 @itemize
7527 @item nl80211 - wireless functions API (basic support)
7528 @item taskstats - extended process statistics
7529 @item acpi_events - ACPI events monitoring
7530 @item thermal_events - thermal events monitoring
7531 @item VFS_DQUOT - disk quota events monitoring
7532 @end itemize
7533 @end itemize")
7534 (license license:gpl2+)))
7535
7536 (define-public python-wrapt
7537 (package
7538 (name "python-wrapt")
7539 (version "1.11.2")
7540 (source
7541 (origin
7542 (method url-fetch)
7543 (uri (pypi-uri "wrapt" version))
7544 (sha256
7545 (base32
7546 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7547 (build-system python-build-system)
7548 (arguments
7549 ;; Tests are not included in the tarball, they are only available in the
7550 ;; git repository.
7551 `(#:tests? #f))
7552 (home-page "https://github.com/GrahamDumpleton/wrapt")
7553 (synopsis "Module for decorators, wrappers and monkey patching")
7554 (description
7555 "The aim of the wrapt module is to provide a transparent object proxy for
7556 Python, which can be used as the basis for the construction of function
7557 wrappers and decorator functions.")
7558 (license license:bsd-2)))
7559
7560 (define-public python2-wrapt
7561 (package-with-python2 python-wrapt))
7562
7563 (define-public python-xlrd
7564 (package
7565 (name "python-xlrd")
7566 (version "1.2.0")
7567 (source (origin
7568 (method url-fetch)
7569 (uri (pypi-uri "xlrd" version))
7570 (sha256
7571 (base32
7572 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7573 (build-system python-build-system)
7574 (arguments
7575 `(#:phases
7576 (modify-phases %standard-phases
7577 ;; Some tests depend on writing a temporary file to the user's home
7578 ;; directory.
7579 (add-after 'unpack 'fix-tests
7580 (lambda _
7581 (delete-file "tests/test_open_workbook.py")
7582 #t)))))
7583 (home-page "http://www.python-excel.org/")
7584 (synopsis "Library for extracting data from Excel files")
7585 (description "This package provides a library to extract data from
7586 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7587 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7588 Unicode-aware. It is not intended as an end-user tool.")
7589 (license license:bsd-3)))
7590
7591 (define-public python2-xlrd
7592 (package-with-python2 python-xlrd))
7593
7594 (define-public python-prettytable
7595 (package
7596 (name "python-prettytable")
7597 (version "0.7.2")
7598 (source
7599 (origin
7600 (method url-fetch)
7601 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7602 (sha256
7603 (base32
7604 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7605 (build-system python-build-system)
7606 (home-page "https://code.google.com/archive/p/prettytable/")
7607 (synopsis "Display tabular data in an ASCII table format")
7608 (description
7609 "A library designed to represent tabular data in visually appealing ASCII
7610 tables. PrettyTable allows for selection of which columns are to be printed,
7611 independent alignment of columns (left or right justified or centred) and
7612 printing of sub-tables by specifying a row range.")
7613 (license license:bsd-3)))
7614
7615 (define-public python2-prettytable
7616 (package-with-python2 python-prettytable))
7617
7618 (define-public python-tables
7619 (package
7620 (name "python-tables")
7621 (version "3.4.4")
7622 (source
7623 (origin
7624 (method url-fetch)
7625 (uri (pypi-uri "tables" version))
7626 (sha256
7627 (base32
7628 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7629 (modules '((guix build utils)))
7630 (snippet
7631 '(begin
7632 ;; Remove pre-compiled .pyc files from source.
7633 (for-each delete-file-recursively
7634 (find-files "." "__pycache__" #:directories? #t))
7635 (for-each delete-file (find-files "." "\\.pyc$"))
7636 #t))))
7637 (build-system python-build-system)
7638 (arguments
7639 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7640 ;; or "check", so we must override the build and check phases.
7641 #:phases
7642 (modify-phases %standard-phases
7643 (add-after 'unpack 'use-gcc
7644 (lambda _
7645 (substitute* "setup.py"
7646 (("compiler = new_compiler\\(\\)" line)
7647 (string-append line
7648 "\ncompiler.set_executables(compiler='gcc',"
7649 "compiler_so='gcc',"
7650 "linker_exe='gcc',"
7651 "linker_so='gcc -shared')")))
7652 #t))
7653 (add-after 'unpack 'disable-tuning
7654 (lambda _
7655 (substitute* "setup.py"
7656 (("cpu_flags = .*")
7657 "cpu_flags = ['sse2']\n"))
7658 #t))
7659 (replace 'build
7660 (lambda* (#:key inputs #:allow-other-keys)
7661 (invoke "python" "setup.py" "build"
7662 (string-append "--hdf5="
7663 (assoc-ref inputs "hdf5")))))
7664 (replace 'check
7665 (lambda* (#:key inputs #:allow-other-keys)
7666 (invoke "python" "setup.py" "check"
7667 (string-append "--hdf5="
7668 (assoc-ref inputs "hdf5"))))))))
7669 (propagated-inputs
7670 `(("python-numexpr" ,python-numexpr)
7671 ("python-numpy" ,python-numpy)))
7672 (native-inputs
7673 `(("python-cython" ,python-cython)
7674 ("pkg-config" ,pkg-config)))
7675 (inputs
7676 `(("hdf5" ,hdf5-1.10)
7677 ("bzip2" ,bzip2)
7678 ("zlib" ,zlib)))
7679 (home-page "http://www.pytables.org/")
7680 (synopsis "Hierarchical datasets for Python")
7681 (description "PyTables is a package for managing hierarchical datasets and
7682 designed to efficiently cope with extremely large amounts of data.")
7683 (license license:bsd-3)))
7684
7685 (define-public python2-tables
7686 (package-with-python2 python-tables))
7687
7688 (define-public python-pytest-black
7689 (package
7690 (name "python-pytest-black")
7691 (version "0.3.8")
7692 (source
7693 (origin
7694 (method url-fetch)
7695 (uri (pypi-uri "pytest-black" version))
7696 (sha256
7697 (base32
7698 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7699 (build-system python-build-system)
7700 (propagated-inputs
7701 `(("python-pytest" ,python-pytest)
7702 ("python-black" ,python-black)
7703 ("python-toml" ,python-toml)))
7704 (native-inputs
7705 `(("python-setuptools-scm" ,python-setuptools-scm)))
7706 (home-page "https://github.com/shopkeep/pytest-black")
7707 (synopsis "Pytest plugin to enable format checking with black")
7708 (description
7709 "This package provides a pytest plugin to enable format checking with the
7710 Python code formatter \"black\".")
7711 (license license:expat)))
7712
7713 (define-public python-get-version
7714 (package
7715 (name "python-get-version")
7716 (version "2.1")
7717 (source
7718 (origin
7719 (method url-fetch)
7720 (uri (pypi-uri "get_version" version))
7721 (sha256
7722 (base32
7723 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7724 (build-system python-build-system)
7725 (propagated-inputs
7726 `(("python-pygments" ,python-pygments)
7727 ("python-pytest" ,python-pytest)
7728 ("python-pytest-black" ,python-pytest-black)
7729 ("python-pytest-cov" ,python-pytest-cov)
7730 ("python-setuptools" ,python-setuptools)
7731 ("python-testpath" ,python-testpath)))
7732 (home-page "https://github.com/flying-sheep/get_version")
7733 (synopsis "Version helper in the spirit of versioneer")
7734 (description
7735 "This package provides a version helper that lets you automatically use
7736 the latest @code{vX.X.X} Git tag as the version in your Python package. It
7737 also supports getting the version from Python source distributions or, once
7738 your package is installed, via @code{pkg_resources} (part of
7739 @code{setuptools}).")
7740 (license license:gpl3+)))
7741
7742 (define-public python-legacy-api-wrap
7743 (package
7744 (name "python-legacy-api-wrap")
7745 (version "1.2")
7746 (source
7747 (origin
7748 (method url-fetch)
7749 (uri (pypi-uri "legacy-api-wrap" version))
7750 (sha256
7751 (base32
7752 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7753 (build-system python-build-system)
7754 (propagated-inputs
7755 `(("python-get-version" ,python-get-version)
7756 ("python-pytest" ,python-pytest)
7757 ("python-pytest-black" ,python-pytest-black)
7758 ("python-pytest-cov" ,python-pytest-cov)
7759 ("python-setuptools" ,python-setuptools)))
7760 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7761 (synopsis "Legacy API wrapper")
7762 (description "This module defines a decorator to wrap legacy APIs. The
7763 primary use case is APIs defined before keyword-only parameters existed.")
7764 (license license:gpl3+)))
7765
7766 (define-public python-pyasn1
7767 (package
7768 (name "python-pyasn1")
7769 (version "0.4.3")
7770 (source
7771 (origin
7772 (method url-fetch)
7773 (uri (pypi-uri "pyasn1" version))
7774 (sha256
7775 (base32
7776 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7777 (build-system python-build-system)
7778 (home-page "http://pyasn1.sourceforge.net/")
7779 (synopsis "ASN.1 types and codecs")
7780 (description
7781 "This is an implementation of ASN.1 types and codecs in Python. It is
7782 suitable for a wide range of protocols based on the ASN.1 specification.")
7783 (license license:bsd-2)))
7784
7785 (define-public python2-pyasn1
7786 (package-with-python2 python-pyasn1))
7787
7788 (define-public python-pyasn1-modules
7789 (package
7790 (name "python-pyasn1-modules")
7791 (version "0.2.2")
7792 (source
7793 (origin
7794 (method url-fetch)
7795 (uri (pypi-uri "pyasn1-modules" version))
7796 (sha256
7797 (base32
7798 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7799 (build-system python-build-system)
7800 (propagated-inputs
7801 `(("python-pyasn1" ,python-pyasn1)))
7802 (home-page "https://sourceforge.net/projects/pyasn1/")
7803 (synopsis "ASN.1 codec implementations")
7804 (description
7805 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7806 implementations of ASN.1-based codecs and protocols.")
7807 (license license:bsd-3)))
7808
7809 (define-public python2-pyasn1-modules
7810 (package-with-python2 python-pyasn1-modules))
7811
7812 (define-public python-ipaddress
7813 (package
7814 (name "python-ipaddress")
7815 (version "1.0.22")
7816 (source (origin
7817 (method url-fetch)
7818 (uri (pypi-uri "ipaddress" version))
7819 (sha256
7820 (base32
7821 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7822 (build-system python-build-system)
7823 (home-page "https://github.com/phihag/ipaddress")
7824 (synopsis "IP address manipulation library")
7825 (description
7826 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7827 in Python. This library is used to create, poke at, and manipulate IPv4 and
7828 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7829 module to older versions of Python.")
7830 (license license:psfl)))
7831
7832 (define-public python2-ipaddress
7833 (package-with-python2 python-ipaddress))
7834
7835 (define-public python2-ipaddr
7836 (package
7837 (name "python2-ipaddr")
7838 (version "2.1.11")
7839 (source
7840 (origin
7841 (method url-fetch)
7842 (uri (pypi-uri "ipaddr" version))
7843 (sha256
7844 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7845 (build-system python-build-system)
7846 (arguments
7847 `(#:python ,python-2 ;version 2 only
7848 #:phases
7849 (modify-phases %standard-phases
7850 (replace 'check
7851 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7852 (home-page "https://github.com/google/ipaddr-py")
7853 (synopsis "IP address manipulation library")
7854 (description
7855 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7856 IPv6 addresses and networks.
7857
7858 For new implementations you may prefer to use the standard module
7859 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7860 versions of Python.")
7861 (license license:asl2.0)))
7862
7863 (define-public python-idna
7864 (package
7865 (name "python-idna")
7866 (version "2.8")
7867 (source
7868 (origin
7869 (method url-fetch)
7870 (uri (pypi-uri "idna" version))
7871 (sha256
7872 (base32
7873 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7874 (build-system python-build-system)
7875 (home-page "https://github.com/kjd/idna")
7876 (synopsis "Internationalized domain names in applications")
7877 (description
7878 "This is a library to support the Internationalised Domain Names in
7879 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7880 protocol is often referred to as “IDNA2008” and can produce different results
7881 from the earlier standard from 2003. The library is also intended to act as a
7882 suitable drop-in replacement for the “encodings.idna” module that comes with
7883 the Python standard library but currently only supports the older 2003
7884 specification.")
7885 (license license:bsd-4)))
7886
7887 (define-public python-idna-2.7
7888 (package (inherit python-idna)
7889 (version "2.7")
7890 (source (origin
7891 (method url-fetch)
7892 (uri (pypi-uri "idna" version))
7893 (sha256
7894 (base32
7895 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7896
7897
7898 (define-public python2-idna
7899 (package-with-python2 python-idna))
7900
7901 (define-public python-idna-ssl
7902 (package
7903 (name "python-idna-ssl")
7904 (version "1.0.1")
7905 (source
7906 (origin
7907 (method url-fetch)
7908 (uri (pypi-uri "idna-ssl" version))
7909 (sha256
7910 (base32
7911 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7912 (build-system python-build-system)
7913 (arguments
7914 `(#:tests? #f)) ;circular dependency with python-aiohttp
7915 (home-page "https://github.com/aio-libs/idna-ssl")
7916 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7917 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7918 domains support.")
7919 (license license:expat)))
7920
7921 (define-public python-pretend
7922 (package
7923 (name "python-pretend")
7924 (version "1.0.9")
7925 (source
7926 (origin
7927 (method url-fetch)
7928 (uri (pypi-uri "pretend" version))
7929 (sha256
7930 (base32
7931 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7932 (build-system python-build-system)
7933 (home-page "https://github.com/alex/pretend")
7934 (synopsis "Library for stubbing in Python")
7935 (description
7936 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7937 technique for writing tests. You may hear the term mixed up with mocks,
7938 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7939 responses, rather than doing any computation.")
7940 (license license:bsd-3)))
7941
7942 (define-public python2-pretend
7943 (package-with-python2 python-pretend))
7944
7945 (define-public python-pip
7946 (package
7947 (name "python-pip")
7948 (version "20.0.2")
7949 (source
7950 (origin
7951 (method url-fetch)
7952 (uri (pypi-uri "pip" version))
7953 (sha256
7954 (base32
7955 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
7956 (build-system python-build-system)
7957 (arguments
7958 '(#:tests? #f)) ; there are no tests in the pypi archive.
7959 (home-page "https://pip.pypa.io/")
7960 (synopsis "Package manager for Python software")
7961 (description
7962 "Pip is a package manager for Python software, that finds packages on the
7963 Python Package Index (PyPI).")
7964 (license license:expat)))
7965
7966 (define-public python2-pip
7967 (package-with-python2 python-pip))
7968
7969 (define-public python-tlsh
7970 (package
7971 (name "python-tlsh")
7972 (version "3.4.5")
7973 (home-page "https://github.com/trendmicro/tlsh")
7974 (source
7975 (origin
7976 (method git-fetch)
7977 (uri (git-reference
7978 (url "https://github.com/trendmicro/tlsh.git")
7979 (commit (string-append "v" version))))
7980 (file-name (git-file-name name version))
7981 (sha256
7982 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7983 (build-system cmake-build-system)
7984 (arguments
7985 '(#:out-of-source? #f
7986 #:phases (modify-phases %standard-phases
7987 (replace
7988 'install
7989 (lambda* (#:key outputs #:allow-other-keys)
7990 ;; Build and install the Python bindings. The underlying
7991 ;; C++ library is apparently not meant to be installed.
7992 (let ((out (assoc-ref outputs "out")))
7993 (with-directory-excursion "py_ext"
7994 (and (system* "python" "setup.py" "build")
7995 (system* "python" "setup.py" "install"
7996 (string-append "--prefix=" out))))))))))
7997 (inputs `(("python" ,python-wrapper))) ;for the bindings
7998 (synopsis "Fuzzy matching library for Python")
7999 (description
8000 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8001 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8002 value which can be used for similarity comparisons. Similar objects have
8003 similar hash values, which allows for the detection of similar objects by
8004 comparing their hash values. The byte stream should have a sufficient amount
8005 of complexity; for example, a byte stream of identical bytes will not generate
8006 a hash value.")
8007 (license license:asl2.0)))
8008
8009 (define-public python2-tlsh
8010 (package
8011 (inherit python-tlsh)
8012 (name "python2-tlsh")
8013 (inputs `(("python" ,python-2)))))
8014
8015 (define-public python-termcolor
8016 (package
8017 (name "python-termcolor")
8018 (version "1.1.0")
8019 (source
8020 (origin
8021 (method url-fetch)
8022 (uri (pypi-uri "termcolor" version))
8023 (sha256
8024 (base32
8025 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8026 (build-system python-build-system)
8027 (arguments
8028 ;; There are no tests.
8029 `(#:tests? #f))
8030 (home-page "https://pypi.org/project/termcolor/")
8031 (synopsis "ANSII Color formatting for terminal output")
8032 (description
8033 "This package provides ANSII Color formatting for output in terminals.")
8034 (license license:expat)))
8035
8036 (define-public python2-termcolor
8037 (package-with-python2 python-termcolor))
8038
8039 (define-public python-libarchive-c
8040 (package
8041 (name "python-libarchive-c")
8042 (version "2.9")
8043 (source (origin
8044 (method url-fetch)
8045 (uri (pypi-uri "libarchive-c" version))
8046 (sha256
8047 (base32
8048 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
8049 (build-system python-build-system)
8050 (arguments
8051 '(#:phases (modify-phases %standard-phases
8052 (add-before
8053 'build 'reference-libarchive
8054 (lambda* (#:key inputs #:allow-other-keys)
8055 ;; Retain the absolute file name of libarchive.so.
8056 (let ((libarchive (assoc-ref inputs "libarchive")))
8057 (substitute* "libarchive/ffi.py"
8058 (("find_library\\('archive'\\)")
8059 (string-append "'" libarchive
8060 "/lib/libarchive.so'"))))))
8061 (replace 'check
8062 (lambda _ (invoke "pytest" "-vv"))))))
8063 (native-inputs
8064 `(("python-mock" ,python-mock)
8065 ("python-pytest" ,python-pytest)))
8066 (inputs
8067 `(("libarchive" ,libarchive)))
8068 (home-page "https://github.com/Changaco/python-libarchive-c")
8069 (synopsis "Python interface to libarchive")
8070 (description
8071 "This package provides Python bindings to libarchive, a C library to
8072 access possibly compressed archives in many different formats. It uses
8073 Python's @code{ctypes} foreign function interface (FFI).")
8074 (license license:lgpl2.0+)))
8075
8076 (define-public python2-libarchive-c
8077 (package-with-python2 python-libarchive-c))
8078
8079 (define-public python-file
8080 (package
8081 (inherit file)
8082 (name "python-file")
8083 (build-system python-build-system)
8084 (arguments
8085 '(#:tests? #f ;no tests
8086 #:configure-flags '("--single-version-externally-managed" "--root=/")
8087 #:phases (modify-phases %standard-phases
8088 (add-before 'build 'change-directory
8089 (lambda _
8090 (chdir "python")
8091 #t))
8092 (add-before 'build 'set-library-file-name
8093 (lambda* (#:key inputs #:allow-other-keys)
8094 (let ((file (assoc-ref inputs "file")))
8095 (substitute* "magic.py"
8096 (("find_library\\('magic'\\)")
8097 (string-append "'" file "/lib/libmagic.so'")))
8098 #t))))))
8099 (inputs `(("file" ,file)))
8100 (native-inputs (if (%current-target-system)
8101 `(("self" ,this-package))
8102 '()))
8103 (synopsis "Python bindings to the libmagic file type guesser. Note that
8104 this module and the python-magic module both provide a \"magic.py\" file;
8105 these two modules, which are different and were developed separately, both
8106 serve the same purpose: provide Python bindings for libmagic.")))
8107
8108 (define-public python2-file
8109 (package-with-python2 python-file))
8110
8111 (define-public python-debian
8112 (package
8113 (name "python-debian")
8114 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
8115 (version "0.1.36")
8116 (source
8117 (origin
8118 ;; Use git-fetch, as pypi doesn't include test suite.
8119 (method git-fetch)
8120 (uri (git-reference
8121 (url home-page)
8122 (commit version)))
8123 (file-name (git-file-name name version))
8124 (sha256
8125 (base32
8126 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
8127 (build-system python-build-system)
8128 (arguments
8129 `(#:phases (modify-phases %standard-phases
8130 (add-after 'unpack 'remove-debian-specific-tests
8131 ;; python-apt, apt and dpkg are not yet available in guix,
8132 ;; and these tests heavily depend on them.
8133 (lambda _
8134 (delete-file "lib/debian/tests/test_deb822.py")
8135 (delete-file "lib/debian/tests/test_debfile.py")
8136 #t)))))
8137 (propagated-inputs
8138 `(("python-six" ,python-six)
8139 ("python-chardet" ,python-chardet)))
8140 (synopsis "Debian package related modules")
8141 (description
8142 ;; XXX: Use @enumerate instead of @itemize to work around
8143 ;; <http://bugs.gnu.org/21772>.
8144 "This package provides Python modules that abstract many formats of
8145 Debian-related files, such as:
8146
8147 @enumerate
8148 @item Debtags information;
8149 @item @file{debian/changelog} files;
8150 @item packages files, pdiffs;
8151 @item control files of single or multiple RFC822-style paragraphs---e.g.
8152 @file{debian/control}, @file{.changes}, @file{.dsc};
8153 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8154 contained files and meta-information.
8155 @end enumerate\n")
8156
8157 ;; Modules are either GPLv2+ or GPLv3+.
8158 (license license:gpl3+)))
8159
8160 (define-public python-nbformat
8161 (package
8162 (name "python-nbformat")
8163 (version "4.4.0")
8164 (source
8165 (origin
8166 (method url-fetch)
8167 (uri (pypi-uri "nbformat" version))
8168 (sha256
8169 (base32
8170 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8171 (build-system python-build-system)
8172 (arguments `(#:tests? #f)) ; no test target
8173 (propagated-inputs
8174 `(("python-ipython-genutils" ,python-ipython-genutils)
8175 ("python-jsonschema" ,python-jsonschema)
8176 ("python-jupyter-core" ,python-jupyter-core)
8177 ("python-traitlets" ,python-traitlets)))
8178 (home-page "http://jupyter.org")
8179 (synopsis "Jupyter Notebook format")
8180 (description "This package provides the reference implementation of the
8181 Jupyter Notebook format and Python APIs for working with notebooks.")
8182 (license license:bsd-3)))
8183
8184 (define-public python2-nbformat
8185 (package-with-python2 python-nbformat))
8186
8187 (define-public python-bleach
8188 (package
8189 (name "python-bleach")
8190 (version "3.1.1")
8191 (source
8192 (origin
8193 (method url-fetch)
8194 (uri (pypi-uri "bleach" version))
8195 (sha256
8196 (base32
8197 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
8198 (build-system python-build-system)
8199 (propagated-inputs
8200 `(("python-webencodings" ,python-webencodings)
8201 ("python-six" ,python-six)))
8202 (native-inputs
8203 `(("python-pytest" ,python-pytest)
8204 ("python-pytest-runner" ,python-pytest-runner-2)))
8205 (home-page "https://github.com/jsocol/bleach")
8206 (synopsis "Whitelist-based HTML-sanitizing tool")
8207 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8208 (license license:asl2.0)))
8209
8210 (define-public python2-bleach
8211 (package-with-python2 python-bleach))
8212
8213 (define-public python-entrypoints
8214 (package
8215 (name "python-entrypoints")
8216 (version "0.3")
8217 (source
8218 (origin
8219 (method url-fetch)
8220 (uri (pypi-uri "entrypoints" version))
8221 (sha256
8222 (base32
8223 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
8224 (build-system python-build-system)
8225 ;; The package does not come with a setup.py file, so we have to generate
8226 ;; one ourselves.
8227 (arguments
8228 `(#:tests? #f
8229 #:phases
8230 (modify-phases %standard-phases
8231 (add-after 'unpack 'create-setup.py
8232 (lambda _
8233 (call-with-output-file "setup.py"
8234 (lambda (port)
8235 (format port "\
8236 from setuptools import setup
8237 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8238 " ,version))))))))
8239 (home-page "https://github.com/takluyver/entrypoints")
8240 (synopsis "Discover and load entry points from installed Python packages")
8241 (description "Entry points are a way for Python packages to advertise
8242 objects with some common interface. The most common examples are
8243 @code{console_scripts} entry points, which define shell commands by
8244 identifying a Python function to run. The @code{entrypoints} module contains
8245 functions to find and load entry points.")
8246 (license license:expat)))
8247
8248 (define-public python2-entrypoints
8249 (package-with-python2 python-entrypoints))
8250
8251 (define-public python-nbconvert
8252 (package
8253 (name "python-nbconvert")
8254 (version "5.0.0b1")
8255 (source
8256 (origin
8257 (method url-fetch)
8258 (uri (pypi-uri "nbconvert" version))
8259 (sha256
8260 (base32
8261 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8262 (build-system python-build-system)
8263 (arguments
8264 `(;; The "bdist_egg" target is disabled by default, causing the installation
8265 ;; to fail.
8266 #:configure-flags (list "bdist_egg")
8267 ;; FIXME: 5 failures, 40 errors.
8268 #:tests? #f))
8269 ;; #:phases
8270 ;; (modify-phases %standard-phases
8271 ;; (replace 'check
8272 ;; (lambda _
8273 ;; (zero? (system* "py.test" "-v")))))
8274 (native-inputs
8275 `(("python-pytest" ,python-pytest)))
8276 (propagated-inputs
8277 `(("python-bleach" ,python-bleach)
8278 ("python-entrypoints" ,python-entrypoints)
8279 ("python-jinja2" ,python-jinja2)
8280 ("python-jupyter-core" ,python-jupyter-core)
8281 ("python-mistune" ,python-mistune)
8282 ("python-nbformat" ,python-nbformat)
8283 ("python-pygments" ,python-pygments)
8284 ("python-traitlets" ,python-traitlets)))
8285 (home-page "http://jupyter.org")
8286 (synopsis "Converting Jupyter Notebooks")
8287 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8288 notebooks to various other formats via Jinja templates. It allows you to
8289 convert an @code{.ipynb} notebook file into various static formats including:
8290
8291 @enumerate
8292 @item HTML
8293 @item LaTeX
8294 @item PDF
8295 @item Reveal JS
8296 @item Markdown (md)
8297 @item ReStructured Text (rst)
8298 @item executable script
8299 @end enumerate\n")
8300 (license license:bsd-3)))
8301
8302 (define-public python2-nbconvert
8303 (package-with-python2 python-nbconvert))
8304
8305 (define-public python-notebook
8306 (package
8307 (name "python-notebook")
8308 (version "5.7.4")
8309 (source (origin
8310 (method url-fetch)
8311 (uri (pypi-uri "notebook" version))
8312 (sha256
8313 (base32
8314 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8315 (build-system python-build-system)
8316 (arguments
8317 `(#:phases
8318 (modify-phases %standard-phases
8319 (replace 'check
8320 (lambda _
8321 ;; These tests require a browser
8322 (delete-file-recursively "notebook/tests/selenium")
8323 ;; Some tests need HOME
8324 (setenv "HOME" "/tmp")
8325 ;; This file contains "warningfilters", which are not supported
8326 ;; by this version of nose.
8327 (delete-file "setup.cfg")
8328 (with-directory-excursion "/tmp"
8329 (invoke "nosetests" "-v"))
8330 #t)))))
8331 (propagated-inputs
8332 `(("python-jupyter-core" ,python-jupyter-core)
8333 ("python-nbformat" ,python-nbformat)
8334 ("python-nbconvert" ,python-nbconvert)
8335 ("python-prometheus-client" ,python-prometheus-client)
8336 ("python-send2trash" ,python-send2trash)
8337 ("python-terminado" ,python-terminado)))
8338 (native-inputs
8339 `(("python-nose" ,python-nose)
8340 ("python-sphinx" ,python-sphinx)
8341 ("python-requests" ,python-requests)))
8342 (home-page "http://jupyter.org/")
8343 (synopsis "Web-based notebook environment for interactive computing")
8344 (description
8345 "The Jupyter HTML notebook is a web-based notebook environment for
8346 interactive computing.")
8347 (properties `((python2-variant . ,(delay python2-notebook))))
8348 (license license:bsd-3)))
8349
8350 (define-public python2-notebook
8351 (let ((base (package-with-python2
8352 (strip-python2-variant python-notebook))))
8353 (package (inherit base)
8354 (native-inputs
8355 `(("python2-mock" ,python2-mock)
8356 ,@(package-native-inputs base)))
8357 (arguments
8358 (substitute-keyword-arguments (package-arguments base)
8359 ((#:phases phases)
8360 `(modify-phases ,phases
8361 (add-before 'check 'disable-test-case
8362 ;; The test requires network access to localhost. Curiously it
8363 ;; fails with Python 2 only. Simply make the test-case return
8364 ;; immediately.
8365 (lambda _
8366 (substitute*
8367 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8368 (("formats = self.nbconvert_api") "return #")))))))))))
8369
8370 (define-public python-widgetsnbextension
8371 (package
8372 (name "python-widgetsnbextension")
8373 (version "3.4.2")
8374 (source
8375 (origin
8376 (method url-fetch)
8377 (uri (pypi-uri "widgetsnbextension" version))
8378 (sha256
8379 (base32
8380 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8381 (build-system python-build-system)
8382 (propagated-inputs
8383 `(("python-ipykernel" ,python-ipykernel)
8384 ("python-notebook" ,python-notebook)))
8385 (native-inputs
8386 `(("python-certifi" ,python-certifi)
8387 ("python-nose" ,python-nose)))
8388 (home-page "https://ipython.org")
8389 (synopsis "IPython HTML widgets for Jupyter")
8390 (description "This package provides interactive HTML widgets for Jupyter
8391 notebooks.")
8392 (license license:bsd-3)))
8393
8394 (define-public python2-widgetsnbextension
8395 (package-with-python2 python-widgetsnbextension))
8396
8397 (define-public python-ipywidgets
8398 (package
8399 (name "python-ipywidgets")
8400 (version "5.2.2")
8401 (source
8402 (origin
8403 (method url-fetch)
8404 (uri (pypi-uri "ipywidgets" version))
8405 (sha256
8406 (base32
8407 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8408 (build-system python-build-system)
8409 (propagated-inputs
8410 `(("python-ipython" ,python-ipython)
8411 ("python-traitlets" ,python-traitlets)
8412 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8413 (native-inputs
8414 `(("python-nose" ,python-nose)
8415 ("python-pytest" ,python-pytest)))
8416 (home-page "https://ipython.org")
8417 (synopsis "IPython HTML widgets for Jupyter")
8418 (description "Ipywidgets are interactive HTML widgets for Jupyter
8419 notebooks and the IPython kernel. Notebooks come alive when interactive
8420 widgets are used. Users gain control of their data and can visualize changes
8421 in the data.")
8422 (license license:bsd-3)))
8423
8424 (define-public python2-ipywidgets
8425 (package-with-python2 python-ipywidgets))
8426
8427 (define-public python-jupyter-console
8428 (package
8429 (name "python-jupyter-console")
8430 (version "6.0.0")
8431 (source
8432 (origin
8433 (method url-fetch)
8434 (uri (pypi-uri "jupyter_console" version))
8435 (sha256
8436 (base32
8437 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8438 (build-system python-build-system)
8439 (propagated-inputs
8440 `(("python-ipykernel" ,python-ipykernel)
8441 ("python-jupyter-client" ,python-jupyter-client)
8442 ("python-prompt-toolkit" ,python-prompt-toolkit)
8443 ("python-pygments" ,python-pygments)))
8444 (native-inputs
8445 `(("python-nose" ,python-nose)))
8446 (home-page "https://jupyter.org")
8447 (synopsis "Jupyter terminal console")
8448 (description "This package provides a terminal-based console frontend for
8449 Jupyter kernels. It also allows for console-based interaction with non-Python
8450 Jupyter kernels such as IJulia and IRKernel.")
8451 (properties `((python2-variant . ,(delay python2-jupyter-console))))
8452 (license license:bsd-3)))
8453
8454 (define-public python2-jupyter-console
8455 (package
8456 (name "python2-jupyter-console")
8457 (version "5.2.0")
8458 (source
8459 (origin
8460 (method url-fetch)
8461 (uri (pypi-uri "jupyter_console" version))
8462 (sha256
8463 (base32
8464 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8465 (build-system python-build-system)
8466 (arguments
8467 `(#:python ,python-2
8468 #:tests? #f)) ; Tests only run in a TTY.
8469 (propagated-inputs
8470 `(("python2-ipykernel" ,python2-ipykernel)
8471 ("python2-jupyter-client" ,python2-jupyter-client)
8472 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8473 ("python2-pygments" ,python2-pygments)))
8474 (native-inputs
8475 `(("python2-nose" ,python2-nose)))
8476 (home-page "https://jupyter.org")
8477 (synopsis "Jupyter terminal console")
8478 (description "This package provides a terminal-based console frontend for
8479 Jupyter kernels. It also allows for console-based interaction with non-Python
8480 Jupyter kernels such as IJulia and IRKernel.")
8481 (license license:bsd-3)))
8482
8483 ;; The python-ipython and python-jupyter-console require each other. To get
8484 ;; the functionality in both packages working, strip down the
8485 ;; python-jupyter-console package when using it as an input to python-ipython.
8486 (define python-jupyter-console-minimal
8487 (package
8488 (inherit python-jupyter-console)
8489 (name "python-jupyter-console-minimal")
8490 (arguments
8491 (substitute-keyword-arguments
8492 (package-arguments python-jupyter-console)
8493 ((#:phases phases)
8494 `(modify-phases ,phases
8495 (add-after 'install 'delete-bin
8496 (lambda* (#:key outputs #:allow-other-keys)
8497 ;; Delete the bin files, to avoid conflicts in profiles
8498 ;; where python-ipython and python-jupyter-console are
8499 ;; both present.
8500 (delete-file-recursively
8501 (string-append
8502 (assoc-ref outputs "out") "/bin"))))))))
8503 ;; Remove the python-ipython propagated input, to avoid the cycle
8504 (propagated-inputs
8505 (alist-delete
8506 "python-ipython"
8507 (package-propagated-inputs python-jupyter-console)))))
8508
8509 (define-public python-qtconsole
8510 (package
8511 (name "python-qtconsole")
8512 (version "4.4.3")
8513 (source
8514 (origin
8515 (method url-fetch)
8516 (uri (pypi-uri "qtconsole" version))
8517 (sha256
8518 (base32
8519 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8520 (build-system python-build-system)
8521 (arguments
8522 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8523 ;; but we only have the LTS version 5.x. This means that there might be
8524 ;; runtime errors, but since this is a dependency of the Jupyter package,
8525 ;; and Jupyter can be used without the qtconsole we can overlook this for
8526 ;; now.
8527 `(#:tests? #f
8528 #:phases
8529 (modify-phases %standard-phases
8530 (add-before 'check 'pre-check
8531 (lambda _
8532 (setenv "QT_QPA_PLATFORM" "offscreen")
8533 #t)))))
8534 (propagated-inputs
8535 `(("python-ipykernel" ,python-ipykernel)
8536 ("python-ipython" ,python-ipython)))
8537 (native-inputs
8538 `(("python-pytest" ,python-pytest)))
8539 (home-page "http://jupyter.org")
8540 (synopsis "Jupyter Qt console")
8541 (description "This package provides a Qt-based console for Jupyter with
8542 support for rich media output.")
8543 (license license:bsd-3)))
8544
8545 (define-public python-jsbeautifier
8546 (package
8547 (name "python-jsbeautifier")
8548 (version "1.10.2")
8549 (home-page "https://github.com/beautify-web/js-beautify")
8550 (source (origin
8551 (method git-fetch)
8552 (uri (git-reference
8553 (url home-page)
8554 (commit (string-append "v" version))))
8555 (file-name (git-file-name name version))
8556 (sha256
8557 (base32
8558 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8559 (build-system python-build-system)
8560 (arguments
8561 `(#:phases (modify-phases %standard-phases
8562 (add-after 'unpack 'chdir
8563 (lambda _
8564 ;; The upstream Git repository contains all the code,
8565 ;; but this package only builds the python code.
8566 (chdir "python")
8567 #t))
8568 (add-after 'unpack 'patch-python-six-requirements
8569 (lambda _
8570 (substitute* "python/setup.py"
8571 (("six>=1.12.0")
8572 "six>=1.11.0"))
8573 #t)))))
8574 (propagated-inputs
8575 `(("python-editorconfig" ,python-editorconfig)
8576 ("python-six" ,python-six)))
8577 (native-inputs
8578 `(("python-pytest" ,python-pytest)))
8579 (synopsis "JavaScript unobfuscator and beautifier")
8580 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8581 popular online obfuscators.")
8582 (license license:expat)))
8583
8584 (define-public jupyter
8585 (package
8586 (name "jupyter")
8587 (version "1.0.0")
8588 (source
8589 (origin
8590 (method url-fetch)
8591 (uri (pypi-uri "jupyter" version))
8592 (sha256
8593 (base32
8594 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8595 (build-system python-build-system)
8596 (arguments '(#:tests? #f)) ; there are none.
8597 (propagated-inputs
8598 `(("python-ipykernel" ,python-ipykernel)
8599 ("python-ipywidgets" ,python-ipywidgets)
8600 ("python-jupyter-console" ,python-jupyter-console)
8601 ("python-nbconvert" ,python-nbconvert)
8602 ("python-notebook" ,python-notebook)
8603 ("python-qtconsole" ,python-qtconsole)))
8604 (native-search-paths
8605 (list (search-path-specification
8606 (variable "JUPYTER_PATH")
8607 (files '("share/jupyter")))))
8608 (home-page "https://jupyter.org")
8609 (synopsis "Web application for interactive documents")
8610 (description
8611 "The Jupyter Notebook is a web application that allows you to create and
8612 share documents that contain live code, equations, visualizations and
8613 explanatory text. Uses include: data cleaning and transformation, numerical
8614 simulation, statistical modeling, machine learning and much more.")
8615 (license license:bsd-3)))
8616
8617 (define-public python-chardet
8618 (package
8619 (name "python-chardet")
8620 (version "3.0.4")
8621 (source
8622 (origin
8623 (method url-fetch)
8624 (uri (pypi-uri "chardet" version))
8625 (sha256
8626 (base32
8627 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8628 (native-inputs
8629 `(("python-hypothesis" ,python-hypothesis)
8630 ("python-pytest" ,python-pytest)
8631 ("python-pytest-runner" ,python-pytest-runner)))
8632 (build-system python-build-system)
8633 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8634 (arguments `(#:tests? #f))
8635 (home-page "https://github.com/chardet/chardet")
8636 (synopsis "Universal encoding detector for Python 2 and 3")
8637 (description
8638 "This package provides @code{chardet}, a Python module that can
8639 automatically detect a wide range of file encodings.")
8640 (license license:lgpl2.1+)))
8641
8642 (define-public python2-chardet
8643 (package-with-python2 python-chardet))
8644
8645 (define-public python-docopt
8646 (package
8647 (name "python-docopt")
8648 (version "0.6.2")
8649 (source
8650 (origin
8651 (method git-fetch)
8652 ;; The release on PyPI does not include tests.
8653 (uri (git-reference
8654 (url "https://github.com/docopt/docopt")
8655 (commit version)))
8656 (file-name (git-file-name name version))
8657 (sha256
8658 (base32
8659 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8660 (build-system python-build-system)
8661 (native-inputs
8662 `(("python-pytest" ,python-pytest)))
8663 (arguments
8664 `(#:phases
8665 (modify-phases %standard-phases
8666 (replace 'check
8667 (lambda _ (invoke "py.test"))))))
8668 (home-page "http://docopt.org")
8669 (synopsis "Command-line interface description language for Python")
8670 (description "This library allows the user to define a command-line
8671 interface from a program's help message rather than specifying it
8672 programmatically with command-line parsers like @code{getopt} and
8673 @code{argparse}.")
8674 (license license:expat)))
8675
8676 (define-public python2-docopt
8677 (package-with-python2 python-docopt))
8678
8679 (define-public python-pythondialog
8680 (package
8681 (name "python-pythondialog")
8682 (version "3.4.0")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "pythondialog" version))
8687 (sha256
8688 (base32
8689 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8690 (build-system python-build-system)
8691 (arguments
8692 `(#:phases
8693 (modify-phases %standard-phases
8694 (add-after 'unpack 'patch-path
8695 (lambda* (#:key inputs #:allow-other-keys)
8696 (let* ((dialog (assoc-ref inputs "dialog")))
8697 ;; Since this library really wants to grovel the search path, we
8698 ;; must hardcode dialog's store path into it.
8699 (substitute* "dialog.py"
8700 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8701 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8702 #t))))
8703 #:tests? #f)) ; no test suite
8704 (propagated-inputs
8705 `(("dialog" ,dialog)))
8706 (home-page "http://pythondialog.sourceforge.net/")
8707 (synopsis "Python interface to the UNIX dialog utility")
8708 (description "A Python wrapper for the dialog utility. Its purpose is to
8709 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8710 This allows one to make simple text-mode user interfaces on Unix-like systems")
8711 (license license:lgpl2.1)
8712 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8713
8714 (define-public python2-pythondialog
8715 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8716 (package
8717 (inherit base)
8718 (version (package-version python-pythondialog))
8719 (source (origin
8720 (method url-fetch)
8721 (uri (pypi-uri "python2-pythondialog" version))
8722 (sha256
8723 (base32
8724 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8725
8726 (define-public python-configobj
8727 (package
8728 (name "python-configobj")
8729 (version "5.0.6")
8730 (source (origin
8731 (method url-fetch)
8732 (uri (pypi-uri "configobj" version))
8733 (sha256
8734 (base32
8735 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8736 ;; Patch setup.py so it looks for python-setuptools, which is
8737 ;; required to parse the keyword 'install_requires' in setup.py.
8738 (patches (search-patches "python-configobj-setuptools.patch"))))
8739 (build-system python-build-system)
8740 (propagated-inputs
8741 `(("python-six" ,python-six)))
8742 (synopsis "Config file reading, writing and validation")
8743 (description "ConfigObj is a simple but powerful config file reader and
8744 writer: an ini file round tripper. Its main feature is that it is very easy to
8745 use, with a straightforward programmer’s interface and a simple syntax for
8746 config files.")
8747 (home-page "https://github.com/DiffSK/configobj")
8748 (license license:bsd-3)))
8749
8750 (define-public python2-configobj
8751 (package-with-python2 python-configobj))
8752
8753 (define-public python-configargparse
8754 (package
8755 (name "python-configargparse")
8756 (version "0.14.0")
8757 (source (origin
8758 (method url-fetch)
8759 (uri (pypi-uri "ConfigArgParse" version))
8760 (sha256
8761 (base32
8762 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8763 (build-system python-build-system)
8764 (native-inputs
8765 `(("python-pyyaml" ,python-pyyaml)))
8766 (arguments
8767 `(#:phases
8768 (modify-phases %standard-phases
8769 (replace 'check
8770 (lambda _
8771 ;; Bypass setuptools-shim because one test relies on "setup.py"
8772 ;; being the first argument passed to the python call.
8773 ;;
8774 ;; NOTE: Many tests do not run because they rely on Python's
8775 ;; built-in test.test_argparse, but we remove the unit tests from
8776 ;; our Python installation.
8777 (invoke "python" "setup.py" "test"))))))
8778 (synopsis "Replacement for argparse")
8779 (description "A drop-in replacement for argparse that allows options to also
8780 be set via config files and/or environment variables.")
8781 (home-page "https://github.com/bw2/ConfigArgParse")
8782 (license license:expat)))
8783
8784 (define-public python2-configargparse
8785 (package-with-python2 python-configargparse))
8786
8787 (define-public python-argparse-manpage
8788 (package
8789 (name "python-argparse-manpage")
8790 (version "1.1")
8791 (source
8792 (origin
8793 (method url-fetch)
8794 (uri (pypi-uri "argparse-manpage" version))
8795 (sha256
8796 (base32
8797 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8798 (build-system python-build-system)
8799 (home-page "https://github.com/praiskup/argparse-manpage")
8800 (synopsis "Build manual page from Python's ArgumentParser object")
8801 (description
8802 "This package provides tools to build manual pages from Python's
8803 @code{ArgumentParser} object.")
8804 (license license:asl2.0)))
8805
8806 (define-public python-contextlib2
8807 (package
8808 (name "python-contextlib2")
8809 (version "0.6.0.post1")
8810 (source
8811 (origin
8812 (method url-fetch)
8813 (uri (pypi-uri "contextlib2" version))
8814 (sha256
8815 (base32
8816 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
8817 (build-system python-build-system)
8818 (home-page "https://contextlib2.readthedocs.org/")
8819 (synopsis "Tools for decorators and context managers")
8820 (description "This module is primarily a backport of the Python
8821 3.2 contextlib to earlier Python versions. Like contextlib, it
8822 provides utilities for common tasks involving decorators and context
8823 managers. It also contains additional features that are not part of
8824 the standard library.")
8825 (properties `((python2-variant . ,(delay python2-contextlib2))))
8826 (license license:psfl)))
8827
8828 (define-public python2-contextlib2
8829 (let ((base (package-with-python2
8830 (strip-python2-variant python-contextlib2))))
8831 (package
8832 (inherit base)
8833 (arguments
8834 (substitute-keyword-arguments (package-arguments base)
8835 ((#:phases phases)
8836 `(modify-phases ,phases
8837 (replace 'check
8838 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8839 (native-inputs
8840 `(("python2-unittest2" ,python2-unittest2))))))
8841
8842 (define-public python-texttable
8843 (package
8844 (name "python-texttable")
8845 (version "1.6.2")
8846 (source
8847 (origin
8848 (method url-fetch)
8849 (uri (pypi-uri "texttable" version))
8850 (sha256
8851 (base32
8852 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
8853 (build-system python-build-system)
8854 (arguments
8855 `(#:phases
8856 (modify-phases %standard-phases
8857 (replace 'check
8858 (lambda _ (invoke "pytest" "tests.py"))))))
8859 (native-inputs
8860 `(("python-pytest" ,python-pytest)))
8861 (home-page "https://github.com/foutaise/texttable/")
8862 (synopsis "Python module for creating simple ASCII tables")
8863 (description "Texttable is a Python module for creating simple ASCII
8864 tables.")
8865 (license license:expat)))
8866
8867 (define-public python2-texttable
8868 (package-with-python2 python-texttable))
8869
8870 (define-public python-atomicwrites
8871 (package
8872 (name "python-atomicwrites")
8873 (version "1.3.0")
8874 (source (origin
8875 (method url-fetch)
8876 (uri (pypi-uri "atomicwrites" version))
8877 (sha256
8878 (base32
8879 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8880 (build-system python-build-system)
8881 (synopsis "Atomic file writes in Python")
8882 (description "Library for atomic file writes using platform dependent tools
8883 for atomic file system operations.")
8884 (home-page "https://github.com/untitaker/python-atomicwrites")
8885 (license license:expat)))
8886
8887 (define-public python2-atomicwrites
8888 (package-with-python2 python-atomicwrites))
8889
8890 (define-public python-click-threading
8891 (package
8892 (name "python-click-threading")
8893 (version "0.4.4")
8894 (source (origin
8895 (method url-fetch)
8896 (uri (pypi-uri "click-threading" version))
8897 (sha256
8898 (base32
8899 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8900 (build-system python-build-system)
8901 (propagated-inputs
8902 `(("python-click" ,python-click)))
8903 (synopsis "Utilities for multithreading in Click")
8904 (description "This package provides utilities for multithreading in Click
8905 applications.")
8906 (home-page "https://github.com/click-contrib/click-threading")
8907 (license license:expat)))
8908
8909 (define-public python-click-log
8910 (package
8911 (name "python-click-log")
8912 (version "0.3.2")
8913 (source (origin
8914 (method url-fetch)
8915 (uri (pypi-uri "click-log" version))
8916 (sha256
8917 (base32
8918 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8919 (build-system python-build-system)
8920 (propagated-inputs
8921 `(("python-click" ,python-click)))
8922 (synopsis "Logging for click applications")
8923 (description "This package provides a Python library for logging Click
8924 applications.")
8925 (home-page "https://github.com/click-contrib/click-log")
8926 (license license:expat)))
8927
8928 (define-public python-apipkg
8929 (package
8930 (name "python-apipkg")
8931 (version "1.4")
8932 (source (origin
8933 (method url-fetch)
8934 (uri (pypi-uri "apipkg" version))
8935 (sha256
8936 (base32
8937 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8938 (build-system python-build-system)
8939 (native-inputs
8940 `(("python-pytest" ,python-pytest)))
8941 (synopsis "Namespace control and lazy-import mechanism")
8942 (description "With apipkg you can control the exported namespace of a Python
8943 package and greatly reduce the number of imports for your users. It is a small
8944 pure Python module that works on virtually all Python versions.")
8945 (home-page "https://github.com/pytest-dev/apipkg")
8946 (license license:expat)))
8947
8948 (define-public python2-apipkg
8949 (package-with-python2 python-apipkg))
8950
8951 (define-public python-execnet
8952 (package
8953 (name "python-execnet")
8954 (version "1.4.1")
8955 (source (origin
8956 (method url-fetch)
8957 (uri (pypi-uri "execnet" version))
8958 (sha256
8959 (base32
8960 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8961 (build-system python-build-system)
8962 (arguments
8963 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8964 ;; The two test failures are caused by the lack of an `ssh` executable.
8965 ;; The test suite can be run with pytest after the 'install' phase.
8966 #:tests? #f))
8967 (native-inputs
8968 `(("python-pytest" ,python-pytest)
8969 ("python-setuptools-scm" ,python-setuptools-scm)))
8970 (propagated-inputs
8971 `(("python-apipkg" ,python-apipkg)))
8972 (synopsis "Rapid multi-Python deployment")
8973 (description "Execnet provides a share-nothing model with
8974 channel-send/receive communication for distributing execution across many
8975 Python interpreters across version, platform and network barriers. It has a
8976 minimal and fast API targeting the following uses:
8977 @enumerate
8978 @item distribute tasks to (many) local or remote CPUs
8979 @item write and deploy hybrid multi-process applications
8980 @item write scripts to administer multiple environments
8981 @end enumerate")
8982 (home-page "https://codespeak.net/execnet/")
8983 (license license:expat)))
8984
8985 (define-public python2-execnet
8986 (package-with-python2 python-execnet))
8987
8988 (define-public python-icalendar
8989 (package
8990 (name "python-icalendar")
8991 (version "4.0.4")
8992 (source (origin
8993 (method url-fetch)
8994 (uri (pypi-uri "icalendar" version))
8995 (sha256
8996 (base32
8997 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8998 (build-system python-build-system)
8999 (propagated-inputs
9000 `(("python-dateutil" ,python-dateutil)
9001 ("python-pytz" ,python-pytz)))
9002 (synopsis "Python library for parsing iCalendar files")
9003 (description "The icalendar package is a parser/generator of iCalendar
9004 files for use with Python.")
9005 (home-page "https://github.com/collective/icalendar")
9006 (license license:bsd-2)))
9007
9008 (define-public python-args
9009 (package
9010 (name "python-args")
9011 (version "0.1.0")
9012 (source (origin
9013 (method url-fetch)
9014 (uri (pypi-uri "args" version))
9015 (sha256
9016 (base32
9017 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9018 (build-system python-build-system)
9019 (home-page "https://github.com/kennethreitz/args")
9020 (synopsis "Command-line argument parser")
9021 (description
9022 "This library provides a Python module to parse command-line arguments.")
9023 (license license:bsd-3)))
9024
9025 (define-public python2-args
9026 (package-with-python2 python-args))
9027
9028 (define-public python-clint
9029 (package
9030 (name "python-clint")
9031 (version "0.5.1")
9032 (source (origin
9033 (method url-fetch)
9034 (uri (pypi-uri "clint" version))
9035 (sha256
9036 (base32
9037 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9038 (build-system python-build-system)
9039 (arguments
9040 '(#:phases
9041 (modify-phases %standard-phases
9042 (replace 'check
9043 (lambda _ (invoke "py.test" "-v"))))))
9044 (native-inputs
9045 `(("python-pytest" ,python-pytest)))
9046 (propagated-inputs
9047 `(("python-args" ,python-args)))
9048 (home-page "https://github.com/kennethreitz/clint")
9049 (synopsis "Command-line interface tools")
9050 (description
9051 "Clint is a Python module filled with a set of tools for developing
9052 command-line applications, including tools for colored and indented
9053 output, progress bar display, and pipes.")
9054 (license license:isc)))
9055
9056 (define-public python2-clint
9057 (package-with-python2 python-clint))
9058
9059 (define-public python-rply
9060 (package
9061 (name "python-rply")
9062 (version "0.7.5")
9063 (source (origin
9064 (method url-fetch)
9065 (uri (pypi-uri "rply" version))
9066 (sha256
9067 (base32
9068 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9069 (build-system python-build-system)
9070 (propagated-inputs
9071 `(("python-appdirs" ,python-appdirs)))
9072 (home-page "https://github.com/alex/rply")
9073 (synopsis "Parser generator for Python")
9074 (description
9075 "This package provides a pure Python based parser generator, that also
9076 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9077 with a new public API, and RPython support.")
9078 (license license:bsd-3)))
9079
9080 (define-public python2-rply
9081 (package-with-python2 python-rply))
9082
9083 (define-public python-hy
9084 (package
9085 (name "python-hy")
9086 (version "0.17.0")
9087 (source (origin
9088 (method url-fetch)
9089 (uri (pypi-uri "hy" version))
9090 (sha256
9091 (base32
9092 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
9093 (build-system python-build-system)
9094 (arguments
9095 '(#:phases
9096 (modify-phases %standard-phases
9097 (add-before 'install 'set-HOME
9098 (lambda _
9099 (setenv "HOME" "/tmp")))
9100 (replace 'check
9101 (lambda _
9102 ;; Tests require write access to HOME.
9103 (setenv "HOME" "/tmp")
9104 (invoke "nosetests"))))))
9105 (native-inputs
9106 `(("python-coverage" ,python-coverage)
9107 ("python-nose" ,python-nose)))
9108 (propagated-inputs
9109 `(("python-astor" ,python-astor)
9110 ("python-clint" ,python-clint)
9111 ("python-rply" ,python-rply)
9112 ("python-fastentrypoints"
9113 ,python-fastentrypoints)
9114 ("python-funcparserlib"
9115 ,python-funcparserlib)))
9116 (home-page "http://hylang.org/")
9117 (synopsis "Lisp frontend to Python")
9118 (description
9119 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9120 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9121 Python at your fingertips, in Lisp form.")
9122 (license license:expat)))
9123
9124 (define-public python2-hy
9125 (package-with-python2 python-hy))
9126
9127 (define-public python2-functools32
9128 (package
9129 (name "python2-functools32")
9130 (version "3.2.3-2")
9131 (source
9132 (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "functools32" version))
9135 (sha256
9136 (base32
9137 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9138 (build-system python-build-system)
9139 (arguments
9140 `(#:python ,python-2
9141 #:tests? #f)) ; no test target
9142 (home-page "https://github.com/MiCHiLU/python-functools32")
9143 (synopsis
9144 "Backport of the functools module from Python 3.2.3")
9145 (description
9146 "This package is a backport of the @code{functools} module from Python
9147 3.2.3 for use with older versions of Python and PyPy.")
9148 (license license:expat)))
9149
9150 (define-public python2-subprocess32
9151 (package
9152 (name "python2-subprocess32")
9153 (version "3.2.7")
9154 (source (origin
9155 (method url-fetch)
9156 (uri (pypi-uri "subprocess32" version))
9157 (sha256
9158 (base32
9159 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9160 (patches
9161 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9162 (build-system python-build-system)
9163 (arguments
9164 `(#:python ,python-2
9165 ;; The test suite fails with Python > 2.7.13:
9166 ;; import test.support
9167 ;; ImportError: No module named support
9168 #:tests? #f
9169 #:phases
9170 (modify-phases %standard-phases
9171 (add-after 'unpack 'patch-/bin/sh
9172 (lambda _
9173 (substitute* '("subprocess32.py"
9174 "test_subprocess32.py")
9175 (("/bin/sh") (which "sh")))
9176 #t)))))
9177 (home-page "https://github.com/google/python-subprocess32")
9178 (synopsis "Backport of the subprocess module from Python 3.2")
9179 (description
9180 "This is a backport of the @code{subprocess} standard library module
9181 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9182 new features. On POSIX systems it is guaranteed to be reliable when used
9183 in threaded applications. It includes timeout support from Python 3.3 but
9184 otherwise matches 3.2’s API.")
9185 (license license:psfl)))
9186
9187 (define-public python2-futures
9188 (package
9189 (name "python2-futures")
9190 (version "3.2.0")
9191 (source
9192 (origin
9193 (method url-fetch)
9194 (uri (pypi-uri "futures" version))
9195 (sha256
9196 (base32
9197 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9198 (build-system python-build-system)
9199 (arguments
9200 `(#:python ,python-2
9201 #:phases
9202 (modify-phases %standard-phases
9203 (replace 'check
9204 (lambda _
9205 (invoke "python" "test_futures.py")
9206 #t)))))
9207 (home-page "https://github.com/agronholm/pythonfutures")
9208 (synopsis
9209 "Backport of the concurrent.futures package from Python 3.2")
9210 (description
9211 "The concurrent.futures module provides a high-level interface for
9212 asynchronously executing callables. This package backports the
9213 concurrent.futures package from Python 3.2")
9214 (license license:bsd-3)))
9215
9216 (define-public python-promise
9217 (package
9218 (name "python-promise")
9219 (version "0.4.2")
9220 (source
9221 (origin
9222 (method url-fetch)
9223 (uri (pypi-uri "promise" version))
9224 (sha256
9225 (base32
9226 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9227 (build-system python-build-system)
9228 ;; Tests wants python-futures, which is a python2 only program, and
9229 ;; can't be found by python-promise at test time.
9230 (arguments `(#:tests? #f))
9231 (home-page "https://github.com/syrusakbary/promise")
9232 (synopsis "Promises/A+ implementation for Python")
9233 (description
9234 "Promises/A+ implementation for Python")
9235 (properties `((python2-variant . ,(delay python2-promise))))
9236 (license license:expat)))
9237
9238 (define-public python2-promise
9239 (let ((promise (package-with-python2
9240 (strip-python2-variant python-promise))))
9241 (package (inherit promise)
9242 (arguments (substitute-keyword-arguments (package-arguments promise)
9243 ((#:tests? _) #t)))
9244 (native-inputs
9245 `(("python2-futures" ,python2-futures)
9246 ("python2-pytest" ,python2-pytest)
9247 ,@(package-native-inputs promise))))))
9248
9249 (define-public python-progressbar33
9250 (package
9251 (name "python-progressbar33")
9252 (version "2.4")
9253 (source
9254 (origin
9255 (method url-fetch)
9256 (uri (pypi-uri "progressbar33" version))
9257 (sha256
9258 (base32
9259 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
9260 (build-system python-build-system)
9261 (home-page "http://github.com/germangh/python-progressbar")
9262 (synopsis "Text progress bar library for Python")
9263 (description
9264 "This package provides a text progress bar library for Python. This
9265 version only differs from the original @code{progressbar} package in that it
9266 uses relative package imports instead of absolute imports, which is necessary
9267 for the module to work under Python 3.3.")
9268 ;; Either or both of these licenses may be selected.
9269 (license (list license:lgpl2.1+ license:bsd-3))))
9270
9271 (define-public python-colorama
9272 (package
9273 (name "python-colorama")
9274 (version "0.4.3")
9275 (source
9276 (origin
9277 (method url-fetch)
9278 (uri (pypi-uri "colorama" version))
9279 (sha256
9280 (base32
9281 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
9282 (build-system python-build-system)
9283 (synopsis "Colored terminal text rendering for Python")
9284 (description "Colorama is a Python library for rendering colored terminal
9285 text.")
9286 (home-page "https://pypi.org/project/colorama/")
9287 (license license:bsd-3)))
9288
9289 (define-public python2-colorama
9290 (package-with-python2 python-colorama))
9291
9292 (define-public python-rsa
9293 (package
9294 (name "python-rsa")
9295 (version "3.4.2")
9296 (source
9297 (origin
9298 (method url-fetch)
9299 (uri (pypi-uri "rsa" version))
9300 (sha256
9301 (base32
9302 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9303 (build-system python-build-system)
9304 (propagated-inputs
9305 `(("python-pyasn1" ,python-pyasn1)))
9306 (synopsis "Pure-Python RSA implementation")
9307 (description "Python-RSA is a pure-Python RSA implementation. It supports
9308 encryption and decryption, signing and verifying signatures, and key
9309 generation according to PKCS#1 version 1.5. It can be used as a Python
9310 library as well as on the command line.")
9311 (home-page "https://stuvel.eu/rsa")
9312 (license license:asl2.0)))
9313
9314 (define-public python2-rsa
9315 (package-with-python2 python-rsa))
9316
9317 (define-public python-pluggy
9318 (package
9319 (name "python-pluggy")
9320 (version "0.11.0")
9321 (source
9322 (origin
9323 (method url-fetch)
9324 (uri (pypi-uri "pluggy" version))
9325 (sha256
9326 (base32
9327 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
9328 (build-system python-build-system)
9329 (native-inputs
9330 `(("python-setuptools-scm" ,python-setuptools-scm)))
9331 (synopsis "Plugin and hook calling mechanism for Python")
9332 (description "Pluggy is an extraction of the plugin manager as used by
9333 Pytest but stripped of Pytest specific details.")
9334 (home-page "https://pypi.org/project/pluggy/")
9335 (license license:expat)))
9336
9337 (define-public python2-pluggy
9338 (package-with-python2 python-pluggy))
9339
9340 (define-public python-tox
9341 (package
9342 (name "python-tox")
9343 (version "2.8.1")
9344 (source
9345 (origin
9346 (method url-fetch)
9347 (uri (pypi-uri "tox" version))
9348 (sha256
9349 (base32
9350 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9351 (build-system python-build-system)
9352 (arguments
9353 ;; FIXME: Tests require pytest-timeout, which itself requires
9354 ;; pytest>=2.8.0 for installation.
9355 '(#:tests? #f))
9356 (propagated-inputs
9357 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9358 ("python-py" ,python-py)
9359 ("python-virtualenv" ,python-virtualenv)))
9360 (native-inputs
9361 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9362 ("python-pytest" ,python-pytest) ; >= 2.3.5
9363 ("python-setuptools-scm" ,python-setuptools-scm)))
9364 (home-page "https://tox.readthedocs.io")
9365 (synopsis "Virtualenv-based automation of test activities")
9366 (description "Tox is a generic virtualenv management and test command line
9367 tool. It can be used to check that a package installs correctly with
9368 different Python versions and interpreters, or run tests in each type of
9369 supported environment, or act as a frontend to continuous integration
9370 servers.")
9371 (license license:expat)))
9372
9373 (define-public python2-tox
9374 (package-with-python2 python-tox))
9375
9376 (define-public python-jmespath
9377 (package
9378 (name "python-jmespath")
9379 (version "0.9.4")
9380 (source
9381 (origin
9382 (method url-fetch)
9383 (uri (pypi-uri "jmespath" version))
9384 (sha256
9385 (base32
9386 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
9387 (build-system python-build-system)
9388 (native-inputs
9389 `(("python-nose" ,python-nose)))
9390 (synopsis "JSON Matching Expressions")
9391 (description "JMESPath (pronounced “james path”) is a Python library that
9392 allows one to declaratively specify how to extract elements from a JSON
9393 document.")
9394 (home-page "https://github.com/jmespath/jmespath.py")
9395 (license license:expat)))
9396
9397 (define-public python2-jmespath
9398 (package-with-python2 python-jmespath))
9399
9400 (define-public python-botocore
9401 (package
9402 (name "python-botocore")
9403 (version "1.12.149")
9404 (source
9405 (origin
9406 (method url-fetch)
9407 (uri (pypi-uri "botocore" version))
9408 (sha256
9409 (base32
9410 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9411 (build-system python-build-system)
9412 (arguments
9413 ;; FIXME: Many tests are failing.
9414 '(#:tests? #f))
9415 (propagated-inputs
9416 `(("python-dateutil" ,python-dateutil)
9417 ("python-docutils" ,python-docutils)
9418 ("python-jmespath" ,python-jmespath)))
9419 (native-inputs
9420 `(("python-mock" ,python-mock)
9421 ("python-nose" ,python-nose)
9422 ("behave" ,behave)
9423 ("python-tox" ,python-tox)
9424 ("python-urllib3" ,python-urllib3)
9425 ("python-wheel" ,python-wheel)))
9426 (home-page "https://github.com/boto/botocore")
9427 (synopsis "Low-level interface to AWS")
9428 (description "Botocore is a Python library that provides a low-level
9429 interface to the Amazon Web Services (AWS) API.")
9430 (license license:asl2.0)))
9431
9432 (define-public python2-botocore
9433 (package-with-python2 python-botocore))
9434
9435 (define-public python-xdo
9436 (package
9437 (name "python-xdo")
9438 (version "0.3")
9439 (source (origin
9440 (method url-fetch)
9441 (uri (string-append
9442 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9443 "python-xdo_" version ".orig.tar.gz"))
9444 (sha256
9445 (base32
9446 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9447 (build-system python-build-system)
9448 (arguments
9449 '(#:phases
9450 (modify-phases %standard-phases
9451 (add-before 'install 'patch-libxdo-path
9452 ;; Hardcode the path of dynamically loaded libxdo library.
9453 (lambda* (#:key inputs #:allow-other-keys)
9454 (let ((libxdo (string-append
9455 (assoc-ref inputs "xdotool")
9456 "/lib/libxdo.so")))
9457 (substitute* "xdo/_xdo.py"
9458 (("find_library\\(\"xdo\"\\)")
9459 (simple-format #f "\"~a\"" libxdo)))
9460 #t))))
9461 #:tests? #f)) ; no tests provided
9462 (propagated-inputs
9463 `(("python-six" ,python-six)))
9464 (inputs
9465 `(("xdotool" ,xdotool)
9466 ("libX11" ,libx11)))
9467 (home-page "https://tracker.debian.org/pkg/python-xdo")
9468 (synopsis "Python library for simulating X11 keyboard/mouse input")
9469 (description "Provides bindings to libxdo for manipulating X11 via simulated
9470 input. (Note that this is mostly a legacy library; you may wish to look at
9471 python-xdo for newer bindings.)")
9472 (license license:bsd-3)))
9473
9474 (define-public python2-xdo
9475 (package-with-python2 python-xdo))
9476
9477 (define-public python-mako
9478 (package
9479 (name "python-mako")
9480 (version "1.1.1")
9481 (source
9482 (origin
9483 (method url-fetch)
9484 (uri (pypi-uri "Mako" version))
9485 (sha256
9486 (base32
9487 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
9488 (build-system python-build-system)
9489 (arguments
9490 `(#:phases (modify-phases %standard-phases
9491 (replace 'check
9492 (lambda _
9493 (invoke "pytest" "-vv"))))))
9494 (propagated-inputs
9495 `(("python-markupsafe" ,python-markupsafe)))
9496 (native-inputs
9497 `(("python-mock" ,python-mock)
9498 ("python-pytest" ,python-pytest)))
9499 (home-page "https://www.makotemplates.org/")
9500 (synopsis "Templating language for Python")
9501 (description "Mako is a templating language for Python that compiles
9502 templates into Python modules.")
9503 (license license:expat)))
9504
9505 (define-public python2-mako
9506 (package-with-python2 python-mako))
9507
9508 (define-public python-waitress
9509 (package
9510 (name "python-waitress")
9511 (version "1.1.0")
9512 (source
9513 (origin
9514 (method url-fetch)
9515 (uri (pypi-uri "waitress" version))
9516 (patches (search-patches "python-waitress-fix-tests.patch"))
9517 (sha256
9518 (base32
9519 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9520 (build-system python-build-system)
9521 (home-page "https://github.com/Pylons/waitress")
9522 (synopsis "Waitress WSGI server")
9523 (description "Waitress is meant to be a production-quality pure-Python WSGI
9524 server with very acceptable performance.")
9525 (license license:zpl2.1)))
9526
9527 (define-public python2-waitress
9528 (package-with-python2 python-waitress))
9529
9530 (define-public python-whichcraft
9531 (package
9532 (name "python-whichcraft")
9533 (version "0.6.1")
9534 (source
9535 (origin
9536 (method url-fetch)
9537 (uri (pypi-uri "whichcraft" version))
9538 (sha256
9539 (base32
9540 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9541 (build-system python-build-system)
9542 (native-inputs
9543 `(("python-pytest" ,python-pytest)))
9544 (home-page "https://github.com/pydanny/whichcraft")
9545 (synopsis "Cross-platform cross-python shutil.which functionality")
9546 (description
9547 "This package provides a shim of the shutil.which function that's
9548 designed to work across multiple versions of Python.")
9549 (license license:bsd-3)))
9550
9551 (define-public python-cookiecutter
9552 (package
9553 (name "python-cookiecutter")
9554 (version "1.6.0")
9555 (source
9556 (origin
9557 (method url-fetch)
9558 (uri (pypi-uri "cookiecutter" version))
9559 (sha256
9560 (base32
9561 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9562 (build-system python-build-system)
9563 (native-inputs
9564 `(("python-freezegun" ,python-freezegun)
9565 ("python-pytest" ,python-pytest)
9566 ("python-pytest-catchlog" ,python-pytest-catchlog)
9567 ("python-pytest-cov" ,python-pytest-cov)
9568 ("python-pytest-mock" ,python-pytest-mock)))
9569 (propagated-inputs
9570 `(("python-binaryornot" ,python-binaryornot)
9571 ("python-click" ,python-click)
9572 ("python-future" ,python-future)
9573 ("python-jinja2" ,python-jinja2)
9574 ("python-jinja2-time" ,python-jinja2-time)
9575 ("python-poyo" ,python-poyo)
9576 ("python-requests" ,python-requests)
9577 ("python-whichcraft" ,python-whichcraft)))
9578 (home-page "https://github.com/audreyr/cookiecutter")
9579 (synopsis
9580 "Command-line utility that creates projects from project templates")
9581 (description
9582 "This package provides a command-line utility that creates projects from
9583 project templates, e.g. creating a Python package project from a Python package
9584 project template.")
9585 (license license:bsd-3)))
9586
9587 (define-public python-pyquery
9588 (package
9589 (name "python-pyquery")
9590 (version "1.2.17")
9591 (source
9592 (origin
9593 (method url-fetch)
9594 (uri (pypi-uri "pyquery" version))
9595 (sha256
9596 (base32
9597 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9598 (build-system python-build-system)
9599 (native-inputs
9600 `(("python-webob" ,python-webob)
9601 ("python-webtest" ,python-webtest)))
9602 (propagated-inputs
9603 `(("python-lxml" ,python-lxml)
9604 ("python-cssselect" ,python-cssselect)))
9605 (home-page "https://github.com/gawel/pyquery")
9606 (synopsis "Make jQuery-like queries on xml documents")
9607 (description "pyquery allows you to make jQuery queries on xml documents.
9608 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9609 fast xml and html manipulation.")
9610 (license license:bsd-3)))
9611
9612 (define-public python-anyjson
9613 (package
9614 (name "python-anyjson")
9615 (version "0.3.3")
9616 (source
9617 (origin
9618 (method url-fetch)
9619 (uri (pypi-uri "anyjson" version))
9620 (sha256
9621 (base32
9622 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9623 (build-system python-build-system)
9624 (arguments
9625 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9626 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9627 ;; whatever) so this transformation needs to be done before the tests
9628 ;; can be run. Maybe we could add a build step to transform beforehand
9629 ;; but it could be annoying/difficult.
9630 ;; We can enable tests for the Python 2 version, though, and do below.
9631 #:tests? #f))
9632 (home-page "https://bitbucket.org/runeh/anyjson/")
9633 (synopsis
9634 "Wraps best available JSON implementation in a common interface")
9635 (description
9636 "Anyjson loads whichever is the fastest JSON module installed
9637 and provides a uniform API regardless of which JSON implementation is used.")
9638 (license license:bsd-3)
9639 (properties `((python2-variant . ,(delay python2-anyjson))))))
9640
9641 (define-public python2-anyjson
9642 (let ((anyjson (package-with-python2
9643 (strip-python2-variant python-anyjson))))
9644 (package
9645 (inherit anyjson)
9646 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9647 #:tests? #t
9648 ,@(package-arguments anyjson)))
9649 (native-inputs `(("python2-nose" ,python2-nose))))))
9650
9651 (define-public python-amqp
9652 (package
9653 (name "python-amqp")
9654 (version "2.3.2")
9655 (source
9656 (origin
9657 (method url-fetch)
9658 (uri (pypi-uri "amqp" version))
9659 (sha256
9660 (base32
9661 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9662 (build-system python-build-system)
9663 (native-inputs
9664 `(("python-case" ,python-case)
9665 ("python-pytest-sugar" ,python-pytest-sugar)
9666 ("python-mock" ,python-mock)))
9667 (propagated-inputs
9668 `(("python-vine" ,python-vine)))
9669 (home-page "https://github.com/celery/py-amqp")
9670 (synopsis
9671 "Low-level AMQP client for Python (fork of amqplib)")
9672 (description
9673 "This is a fork of amqplib which was originally written by Barry Pederson.
9674 It is maintained by the Celery project, and used by kombu as a pure python
9675 alternative when librabbitmq is not available.")
9676 (license license:lgpl2.1+)
9677 (properties `((python2-variant . ,(delay python2-amqp))))))
9678
9679 (define-public python2-amqp
9680 (let ((amqp (package-with-python2
9681 (strip-python2-variant python-amqp))))
9682 (package
9683 (inherit amqp)
9684 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9685 ;; unmaintained. Weirdly, does not do this on the python 3
9686 ;; version?
9687 #:tests? #f
9688 ,@(package-arguments amqp))))))
9689
9690 (define-public python-txamqp
9691 (package
9692 (name "python-txamqp")
9693 (version "0.8.2")
9694 (source
9695 (origin
9696 (method url-fetch)
9697 (uri (pypi-uri "txAMQP" version))
9698 (sha256
9699 (base32
9700 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9701 (build-system python-build-system)
9702 (propagated-inputs
9703 `(("python-six" ,python-six)
9704 ("python-twisted" ,python-twisted)))
9705 (home-page "https://github.com/txamqp/txamqp")
9706 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9707 (description
9708 "This package provides a Python library for communicating with AMQP peers
9709 and brokers using the asynchronous networking framework Twisted. It contains
9710 all the necessary code to connect, send and receive messages to/from an
9711 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9712 also includes support for using Thrift RPC over AMQP in Twisted
9713 applications.")
9714 (license license:asl2.0)))
9715
9716 (define-public python2-txamqp
9717 (package-with-python2 python-txamqp))
9718
9719 (define-public python-kombu
9720 (package
9721 (name "python-kombu")
9722 (version "4.2.2")
9723 (source
9724 (origin
9725 (method url-fetch)
9726 (uri (pypi-uri "kombu" version))
9727 (sha256
9728 (base32
9729 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9730 (build-system python-build-system)
9731 (native-inputs
9732 `(("python-mock" ,python-mock)
9733 ("python-case" ,python-case)
9734 ("python-pyro4" ,python-pyro4)
9735 ("python-pytest-sugar" ,python-pytest-sugar)
9736 ("python-pytz" ,python-pytz)))
9737 (propagated-inputs
9738 `(("python-anyjson" ,python-anyjson)
9739 ("python-amqp" ,python-amqp)
9740 ("python-redis" ,python-redis)))
9741 (home-page "https://kombu.readthedocs.io")
9742 (synopsis "Message passing library for Python")
9743 (description "The aim of Kombu is to make messaging in Python as easy as
9744 possible by providing an idiomatic high-level interface for the AMQ protocol,
9745 and also provide proven and tested solutions to common messaging problems.
9746 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9747 message orientation, queuing, routing, reliability and security, for which the
9748 RabbitMQ messaging server is the most popular implementation.")
9749 (license license:bsd-3)
9750 (properties `((python2-variant . ,(delay python2-kombu))))))
9751
9752 (define-public python2-kombu
9753 (let ((kombu (package-with-python2
9754 (strip-python2-variant python-kombu))))
9755 (package
9756 (inherit kombu)
9757 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9758 ;; It works fine on the python3 variant.
9759 #:tests? #f
9760 ,@(package-arguments kombu)))
9761 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9762 ,@(package-native-inputs kombu))))))
9763
9764 (define-public python-billiard
9765 (package
9766 (name "python-billiard")
9767 (version "3.5.0.5")
9768 (source
9769 (origin
9770 (method url-fetch)
9771 (uri (pypi-uri "billiard" version))
9772 (sha256
9773 (base32
9774 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9775 (build-system python-build-system)
9776 (native-inputs
9777 `(("python-case" ,python-case)
9778 ("python-pytest" ,python-pytest)))
9779 (home-page "https://github.com/celery/billiard")
9780 (synopsis
9781 "Python multiprocessing fork with improvements and bugfixes")
9782 (description
9783 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9784 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9785 pyprocessing package. This standalone variant is intended to be compatible with
9786 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9787 (license license:bsd-3)
9788 (properties `((python2-variant . ,(delay python2-billiard))))))
9789
9790 (define-public python2-billiard
9791 (let ((billiard (package-with-python2
9792 (strip-python2-variant python-billiard))))
9793 (package
9794 (inherit billiard)
9795 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9796 ("python2-mock" ,python2-mock)
9797 ,@(package-native-inputs billiard))))))
9798
9799 (define-public python-celery
9800 (package
9801 (name "python-celery")
9802 (version "4.2.1")
9803 (source
9804 (origin
9805 (method url-fetch)
9806 (uri (pypi-uri "celery" version))
9807 (sha256
9808 (base32
9809 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9810 (build-system python-build-system)
9811 (arguments
9812 '(;; TODO The tests fail with Python 3.7
9813 ;; https://github.com/celery/celery/issues/4849
9814 #:tests? #f
9815 #:phases
9816 (modify-phases %standard-phases
9817 (add-after 'unpack 'patch-requirements
9818 (lambda _
9819 (substitute* "requirements/test.txt"
9820 (("pytest>=3\\.0,<3\\.3")
9821 "pytest>=3.0"))
9822 #t)))))
9823 (native-inputs
9824 `(("python-case" ,python-case)
9825 ("python-pytest" ,python-pytest)))
9826 (propagated-inputs
9827 `(("python-pytz" ,python-pytz)
9828 ("python-billiard" ,python-billiard)
9829 ("python-kombu" ,python-kombu)))
9830 (home-page "https://celeryproject.org")
9831 (synopsis "Distributed Task Queue")
9832 (description "Celery is an asynchronous task queue/job queue based on
9833 distributed message passing. It is focused on real-time operation, but
9834 supports scheduling as well. The execution units, called tasks, are executed
9835 concurrently on a single or more worker servers using multiprocessing,
9836 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9837 synchronously (wait until ready).")
9838 (license license:bsd-3)
9839 (properties `((python2-variant . ,(delay python2-celery))))))
9840
9841 (define-public python2-celery
9842 (let ((celery (package-with-python2
9843 (strip-python2-variant python-celery))))
9844 (package
9845 (inherit celery)
9846 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9847 ("python2-mock" ,python2-mock)
9848 ,@(package-native-inputs celery))))))
9849
9850 (define-public python-translitcodec
9851 (package
9852 (name "python-translitcodec")
9853 (version "0.4.0")
9854 (source
9855 (origin
9856 (method url-fetch)
9857 (uri (pypi-uri "translitcodec" version))
9858 (sha256
9859 (base32
9860 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9861 (build-system python-build-system)
9862 (arguments
9863 `(#:tests? #f)) ; no tests provided
9864 (home-page
9865 "https://github.com/claudep/translitcodec")
9866 (synopsis
9867 "Unicode to 8-bit charset transliteration codec")
9868 (description
9869 "This package contains codecs for transliterating ISO 10646 texts into
9870 best-effort representations using smaller coded character sets (ASCII,
9871 ISO 8859, etc.).")
9872 (license license:expat)))
9873
9874 (define-public python2-translitcodec
9875 (package-with-python2 python-translitcodec))
9876
9877 (define-public python-editor
9878 (package
9879 (name "python-editor")
9880 (version "1.0.4")
9881 (source
9882 (origin
9883 (method url-fetch)
9884 (uri (pypi-uri "python-editor" version))
9885 (sha256
9886 (base32
9887 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
9888 (build-system python-build-system)
9889 (arguments
9890 '(#:tests? #f)) ;XXX: needs a TTY and an editor
9891 (home-page "https://github.com/fmoo/python-editor")
9892 (synopsis "Programmatically open an editor, capture the result")
9893 (description
9894 "python-editor is a library that provides the editor module for
9895 programmatically interfacing with your system's $EDITOR.")
9896 (license license:asl2.0)))
9897
9898 (define-public python2-editor
9899 (package-with-python2 python-editor))
9900
9901 (define-public python-vobject
9902 (package
9903 (name "python-vobject")
9904 (version "0.9.5")
9905 (source (origin
9906 (method url-fetch)
9907 (uri (pypi-uri "vobject" version))
9908 (sha256
9909 (base32
9910 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9911 (build-system python-build-system)
9912 (arguments
9913 '(;; The test suite relies on some non-portable Windows interfaces.
9914 #:tests? #f))
9915 (propagated-inputs
9916 `(("python-dateutil" ,python-dateutil)
9917 ("python-pyicu" ,python-pyicu)))
9918 (synopsis "Parse and generate vCard and vCalendar files")
9919 (description "Vobject is intended to be a full featured Python package for
9920 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9921 are supported and well tested. vCard 3.0 files are supported, and all data
9922 should be imported, but only a few components are understood in a sophisticated
9923 way.")
9924 (home-page "https://eventable.github.io/vobject/")
9925 (license license:asl2.0)))
9926
9927 (define-public python2-vobject
9928 (package-with-python2 python-vobject))
9929
9930 (define-public python-munkres
9931 (package
9932 (name "python-munkres")
9933 (version "1.0.8")
9934 (source (origin
9935 (method url-fetch)
9936 (uri (pypi-uri "munkres" version))
9937 (sha256
9938 (base32
9939 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9940 (build-system python-build-system)
9941 (arguments
9942 '(#:tests? #f)) ; no test suite
9943 (home-page "https://software.clapper.org/munkres/")
9944 (synopsis "Implementation of the Munkres algorithm")
9945 (description "The Munkres module provides an implementation of the Munkres
9946 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9947 useful for solving the Assignment Problem.")
9948 (license license:bsd-3)))
9949
9950 (define-public python2-munkres
9951 (package-with-python2 python-munkres))
9952
9953 (define-public python-whoosh
9954 (package
9955 (name "python-whoosh")
9956 (version "2.7.4")
9957 (source
9958 (origin
9959 (method url-fetch)
9960 (uri (pypi-uri "Whoosh" version))
9961 (sha256
9962 (base32
9963 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9964 (build-system python-build-system)
9965 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9966 (native-inputs
9967 `(("python-pytest" ,python-pytest)))
9968 (home-page "https://bitbucket.org/mchaput/whoosh")
9969 (synopsis "Full text indexing, search, and spell checking library")
9970 (description
9971 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9972 checking library.")
9973 (license license:bsd-2)))
9974
9975 (define-public python2-whoosh
9976 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9977 (package (inherit whoosh)
9978 (propagated-inputs
9979 `(("python2-backport-ssl-match-hostname"
9980 ,python2-backport-ssl-match-hostname)
9981 ,@(package-propagated-inputs whoosh))))))
9982
9983 (define-public python-pathlib
9984 (package
9985 (name "python-pathlib")
9986 (version "1.0.1")
9987 (source (origin
9988 (method url-fetch)
9989 (uri (pypi-uri "pathlib" version))
9990 (sha256
9991 (base32
9992 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9993 (build-system python-build-system)
9994 ;; The tests depend on the internal "test" module, which does not provide
9995 ;; a stable interface.
9996 (arguments `(#:tests? #f))
9997 (home-page "https://pathlib.readthedocs.org/")
9998 (synopsis "Object-oriented file system paths")
9999 (description "Pathlib offers a set of classes to handle file system paths.
10000 It offers the following advantages over using string objects:
10001
10002 @enumerate
10003 @item No more cumbersome use of os and os.path functions. Everything can
10004 be done easily through operators, attribute accesses, and method calls.
10005 @item Embodies the semantics of different path types. For example,
10006 comparing Windows paths ignores casing.
10007 @item Well-defined semantics, eliminating any inconsistencies or
10008 ambiguities (forward vs. backward slashes, etc.).
10009 @end enumerate
10010
10011 Note: In Python 3.4, pathlib is now part of the standard library. For other
10012 Python versions please consider python-pathlib2 instead, which tracks the
10013 standard library module. This module (python-pathlib) isn't maintained
10014 anymore.")
10015 (license license:expat)))
10016
10017 (define-public python2-pathlib
10018 (package-with-python2 python-pathlib))
10019
10020 (define-public python2-pathlib2
10021 (package
10022 (name "python2-pathlib2")
10023 (version "2.3.3")
10024 (source (origin
10025 (method url-fetch)
10026 (uri (pypi-uri "pathlib2" version))
10027 (sha256
10028 (base32
10029 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
10030 (build-system python-build-system)
10031 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10032 ;; version is 3.4 which already includes this package as part of the
10033 ;; standard library.
10034 (arguments
10035 `(#:python ,python-2))
10036 (propagated-inputs
10037 `(("python2-scandir" ,python2-scandir)
10038 ("python2-six" ,python2-six)))
10039 (home-page "https://pypi.org/project/pathlib2/")
10040 (synopsis "Object-oriented file system paths - backport of standard
10041 pathlib module")
10042 (description "The goal of pathlib2 is to provide a backport of standard
10043 pathlib module which tracks the standard library module, so all the newest
10044 features of the standard pathlib can be used also on older Python versions.
10045
10046 Pathlib offers a set of classes to handle file system paths. It offers the
10047 following advantages over using string objects:
10048
10049 @enumerate
10050 @item No more cumbersome use of os and os.path functions. Everything can
10051 be done easily through operators, attribute accesses, and method calls.
10052 @item Embodies the semantics of different path types. For example,
10053 comparing Windows paths ignores casing.
10054 @item Well-defined semantics, eliminating any inconsistencies or
10055 ambiguities (forward vs. backward slashes, etc.).
10056 @end enumerate")
10057 (license license:expat)))
10058
10059 (define-public python2-pathlib2-bootstrap
10060 (hidden-package
10061 (package
10062 (inherit python2-pathlib2)
10063 (name "python2-pathlib2-bootstrap")
10064 (propagated-inputs
10065 `(("python2-scandir" ,python2-scandir)
10066 ("python2-six" ,python2-six-bootstrap))))))
10067
10068 (define-public python-jellyfish
10069 (package
10070 (name "python-jellyfish")
10071 (version "0.5.6")
10072 (source (origin
10073 (method url-fetch)
10074 (uri (pypi-uri "jellyfish" version))
10075 (sha256
10076 (base32
10077 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10078 (build-system python-build-system)
10079 (native-inputs
10080 `(("python-pytest" ,python-pytest)))
10081 (home-page "https://github.com/jamesturk/jellyfish")
10082 (synopsis "Approximate and phonetic matching of strings")
10083 (description "Jellyfish uses a variety of string comparison and phonetic
10084 encoding algorithms to do fuzzy string matching.")
10085 (license license:bsd-2)
10086 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10087
10088 (define-public python2-jellyfish
10089 (let ((jellyfish (package-with-python2
10090 (strip-python2-variant python-jellyfish))))
10091 (package (inherit jellyfish)
10092 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10093 ,@(package-native-inputs jellyfish))))))
10094
10095 (define-public python2-unicodecsv
10096 (package
10097 (name "python2-unicodecsv")
10098 (version "0.14.1")
10099 (source (origin
10100 (method git-fetch)
10101 ;; The test suite is not included in the PyPi release.
10102 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10103 (uri (git-reference
10104 (url "https://github.com/jdunck/python-unicodecsv")
10105 (commit version)))
10106 (file-name (git-file-name name version))
10107 (sha256
10108 (base32
10109 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
10110 (build-system python-build-system)
10111 (arguments
10112 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10113 #:python ,python-2))
10114 (native-inputs
10115 `(("python2-unittest2" ,python2-unittest2)))
10116 (home-page "https://github.com/jdunck/python-unicodecsv")
10117 (synopsis "Unicode CSV module for Python 2")
10118 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10119 module, adding support for Unicode strings.")
10120 (license license:bsd-2)))
10121
10122 (define-public python-rarfile
10123 (package
10124 (name "python-rarfile")
10125 (version "2.8")
10126 (source (origin
10127 (method url-fetch)
10128 (uri (pypi-uri "rarfile" version))
10129 (sha256
10130 (base32
10131 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10132 (build-system python-build-system)
10133 (arguments
10134 '(#:phases
10135 (modify-phases %standard-phases
10136 (replace 'check
10137 ;; Many tests fail, but the installation proceeds.
10138 (lambda _ (invoke "make" "-C" "test" "test"))))))
10139 (native-inputs
10140 `(("which" ,which))) ; required for tests
10141 (propagated-inputs
10142 `(("libarchive" ,libarchive)))
10143 (home-page "https://github.com/markokr/rarfile")
10144 (synopsis "RAR archive reader for Python")
10145 (description "This is Python module for RAR archive reading. The interface
10146 is made as zipfile like as possible.")
10147 (license license:isc)))
10148
10149 (define-public python2-rarfile
10150 (package-with-python2 python-rarfile))
10151
10152 (define-public python-magic
10153 (package
10154 (name "python-magic")
10155 (version "0.4.15")
10156 (source
10157 (origin
10158 (method url-fetch)
10159 (uri (pypi-uri "python-magic" version))
10160 (sha256
10161 (base32
10162 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
10163 (file-name (string-append name "-" version "-checkout"))))
10164 (build-system python-build-system)
10165 (arguments
10166 ;; The tests are unreliable, so don't run them. The tests fail
10167 ;; under Python3 because they were written for Python2 and
10168 ;; contain import statements that do not work in Python3. One of
10169 ;; the tests fails under Python2 because its assertions are
10170 ;; overly stringent; it relies on comparing output strings which
10171 ;; are brittle and can change depending on the version of
10172 ;; libmagic being used and the system on which the test is
10173 ;; running. In my case, under GuixSD 0.10.0, only one test
10174 ;; failed, and it seems to have failed only because the version
10175 ;; of libmagic that is packaged in Guix outputs a slightly
10176 ;; different (but not wrong) string than the one that the test
10177 ;; expected.
10178 '(#:tests? #f
10179 #:phases (modify-phases %standard-phases
10180 ;; Replace a specific method call with a hard-coded
10181 ;; path to the necessary libmagic.so file in the
10182 ;; store. If we don't do this, then the method call
10183 ;; will fail to find the libmagic.so file, which in
10184 ;; turn will cause any application using
10185 ;; python-magic to fail.
10186 (add-before 'build 'hard-code-path-to-libmagic
10187 (lambda* (#:key inputs #:allow-other-keys)
10188 (let ((file (assoc-ref inputs "file")))
10189 (substitute* "magic.py"
10190 (("ctypes.util.find_library\\('magic'\\)")
10191 (string-append "'" file "/lib/libmagic.so'")))
10192 #t)))
10193 (add-before 'install 'disable-egg-compression
10194 (lambda _
10195 (let ((port (open-file "setup.cfg" "a")))
10196 (display "\n[easy_install]\nzip_ok = 0\n"
10197 port)
10198 (close-port port)
10199 #t))))))
10200 (inputs
10201 ;; python-magic needs to be able to find libmagic.so.
10202 `(("file" ,file)))
10203 (home-page
10204 "https://github.com/ahupp/python-magic")
10205 (synopsis
10206 "File type identification using libmagic")
10207 (description
10208 "This module uses ctypes to access the libmagic file type
10209 identification library. It makes use of the local magic database and
10210 supports both textual and MIME-type output. Note that this module and
10211 the python-file module both provide a \"magic.py\" file; these two
10212 modules, which are different and were developed separately, both serve
10213 the same purpose: to provide Python bindings for libmagic.")
10214 (license license:expat)))
10215
10216 (define-public python2-magic
10217 (package-with-python2 python-magic))
10218
10219 (define-public python2-s3cmd
10220 (package
10221 (name "python2-s3cmd")
10222 (version "1.6.1")
10223 (source
10224 (origin
10225 (method url-fetch)
10226 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10227 "s3cmd-" version ".tar.gz"))
10228 (sha256
10229 (base32
10230 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10231 (build-system python-build-system)
10232 (arguments
10233 ;; s3cmd is written for python2 only and contains no tests.
10234 `(#:python ,python-2
10235 #:tests? #f))
10236 (propagated-inputs
10237 `(("python2-dateutil" ,python2-dateutil)
10238 ;; The python-file package also provides a magic.py module.
10239 ;; This is an unfortunate state of affairs; however, s3cmd
10240 ;; fails to install if it cannot find specifically the
10241 ;; python-magic package. Thus we include it, instead of using
10242 ;; python-file. Ironically, s3cmd sometimes works better
10243 ;; without libmagic bindings at all:
10244 ;; https://github.com/s3tools/s3cmd/issues/198
10245 ("python2-magic" ,python2-magic)))
10246 (home-page "http://s3tools.org/s3cmd")
10247 (synopsis "Command line tool for S3-compatible storage services")
10248 (description
10249 "S3cmd is a command line tool for uploading, retrieving and managing data
10250 in storage services that are compatible with the Amazon Simple Storage
10251 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10252 GnuPG encryption, and more. It also supports management of Amazon's
10253 CloudFront content delivery network.")
10254 (license license:gpl2+)))
10255
10256 (define-public python-pkgconfig
10257 (package
10258 (name "python-pkgconfig")
10259 (version "1.3.1")
10260 (source
10261 (origin
10262 (method url-fetch)
10263 (uri (pypi-uri "pkgconfig" version))
10264 (sha256
10265 (base32
10266 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10267 (build-system python-build-system)
10268 (native-inputs
10269 `(("python-nose" ,python-nose)))
10270 (inputs
10271 `(("pkg-config" ,pkg-config)))
10272 (arguments
10273 `(#:phases
10274 (modify-phases %standard-phases
10275 (add-before 'build 'patch
10276 ;; Hard-code the path to pkg-config.
10277 (lambda _
10278 (substitute* "pkgconfig/pkgconfig.py"
10279 (("cmd = 'pkg-config")
10280 (string-append "cmd = '" (which "pkg-config"))))
10281 #t))
10282 (replace 'check
10283 (lambda _
10284 (invoke "nosetests" "test.py"))))))
10285 (home-page "https://github.com/matze/pkgconfig")
10286 (synopsis "Python interface for pkg-config")
10287 (description "This module provides a Python interface to pkg-config. It
10288 can be used to find all pkg-config packages, check if a package exists,
10289 check if a package meets certain version requirements, query CFLAGS and
10290 LDFLAGS and parse the output to build extensions with setup.py.")
10291 (license license:expat)))
10292
10293 (define-public python2-pkgconfig
10294 (package-with-python2 python-pkgconfig))
10295
10296 (define-public python-bz2file
10297 (package
10298 (name "python-bz2file")
10299 (version "0.98")
10300 (source
10301 (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "bz2file" version))
10304 (sha256
10305 (base32
10306 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10307 (build-system python-build-system)
10308 (arguments
10309 `(#:tests? #f)) ; Tests use deprecated python modules.
10310 (home-page "https://github.com/nvawda/bz2file")
10311 (synopsis "Read and write bzip2-compressed files")
10312 (description
10313 "Bz2file is a Python library for reading and writing bzip2-compressed
10314 files. It contains a drop-in replacement for the I/O interface in the
10315 standard library's @code{bz2} module, including features from the latest
10316 development version of CPython that are not available in older releases.")
10317 (license license:asl2.0)))
10318
10319 (define-public python2-bz2file
10320 (package-with-python2 python-bz2file))
10321
10322 (define-public python-future
10323 (package
10324 (name "python-future")
10325 (version "0.17.1")
10326 (source
10327 (origin
10328 (method url-fetch)
10329 (uri (pypi-uri "future" version))
10330 (sha256
10331 (base32
10332 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
10333 (build-system python-build-system)
10334 ;; Many tests connect to the network or are otherwise flawed.
10335 ;; https://github.com/PythonCharmers/python-future/issues/210
10336 (arguments
10337 `(#:tests? #f))
10338 (home-page "http://python-future.org")
10339 (synopsis "Single-source support for Python 3 and 2")
10340 (description
10341 "@code{python-future} is the missing compatibility layer between Python 2 and
10342 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10343 to support both Python 2 and Python 3 with minimal overhead.")
10344 (license license:expat)))
10345
10346 (define-public python2-future
10347 (package-with-python2 python-future))
10348
10349 (define-public python-cysignals
10350 (package
10351 (name "python-cysignals")
10352 (version "1.9.0")
10353 (source
10354 (origin
10355 (method url-fetch)
10356 (uri (pypi-uri "cysignals" version))
10357 (sha256
10358 (base32
10359 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
10360 (build-system python-build-system)
10361 (native-inputs
10362 `(("python-cython" ,python-cython)
10363 ("python-sphinx" ,python-sphinx)))
10364 (inputs
10365 `(("pari-gp" ,pari-gp)))
10366 (arguments
10367 `(#:modules ((guix build python-build-system)
10368 ((guix build gnu-build-system) #:prefix gnu:)
10369 (guix build utils))
10370 ;; FIXME: Tests are executed after installation and currently fail
10371 ;; when not installing into standard locations; the author is working
10372 ;; on a fix.
10373 #:tests? #f
10374 #:phases
10375 (modify-phases %standard-phases
10376 (add-before
10377 'build 'configure
10378 (assoc-ref gnu:%standard-phases 'configure)))))
10379 (home-page
10380 "https://github.com/sagemath/cysignals")
10381 (synopsis
10382 "Handling of interrupts and signals for Cython")
10383 (description
10384 "The cysignals package provides mechanisms to handle interrupts (and
10385 other signals and errors) in Cython code, using two related approaches,
10386 for mixed Cython/Python code or external C libraries and pure Cython code,
10387 respectively.")
10388 (license license:lgpl3+)))
10389
10390 (define-public python2-cysignals
10391 (package-with-python2 python-cysignals))
10392
10393 (define-public python2-shedskin
10394 (package
10395 (name "python2-shedskin")
10396 (version "0.9.4")
10397 (source
10398 (origin
10399 (method url-fetch)
10400 (uri (string-append "https://github.com/shedskin/shedskin/"
10401 "releases/download/v" version
10402 "/shedskin-" version ".tgz"))
10403 (sha256
10404 (base32
10405 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10406 (build-system python-build-system)
10407 (arguments
10408 `(#:python ,python-2
10409 #:phases (modify-phases %standard-phases
10410 (add-after 'unpack 'fix-resulting-include-libs
10411 (lambda* (#:key inputs #:allow-other-keys)
10412 (let ((libgc (assoc-ref inputs "libgc"))
10413 (pcre (assoc-ref inputs "pcre")))
10414 (substitute* "shedskin/makefile.py"
10415 (("variable == 'CCFLAGS':[ ]*")
10416 (string-append "variable == 'CCFLAGS':\n"
10417 " line += ' -I " pcre "/include"
10418 " -I " libgc "/include'"))
10419 (("variable == 'LFLAGS':[ ]*")
10420 (string-append "variable == 'LFLAGS':\n"
10421 " line += ' -L" pcre "/lib"
10422 " -L " libgc "/lib'")))
10423 #t))))))
10424 (inputs `(("pcre" ,pcre)
10425 ("libgc" ,libgc)))
10426 (home-page "https://shedskin.github.io/")
10427 (synopsis "Experimental Python-2 to C++ Compiler")
10428 (description (string-append "This is an experimental compiler for a subset of
10429 Python. It generates C++ code and a Makefile."))
10430 (license (list license:gpl3 license:bsd-3 license:expat))))
10431
10432 (define-public python2-rope
10433 (package
10434 (name "python2-rope")
10435 (version "0.11.0")
10436 (source
10437 (origin
10438 (method url-fetch)
10439 (uri (pypi-uri "rope" version))
10440 (sha256
10441 (base32
10442 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10443 (arguments
10444 ;; Rope has only partial python3 support, see `python-rope'
10445 `(#:python ,python-2))
10446 (build-system python-build-system)
10447 (native-inputs
10448 `(("python2-unittest2" ,python2-unittest2)))
10449 (home-page "https://github.com/python-rope/rope")
10450 (synopsis "Refactoring library for Python")
10451 (description "Rope is a refactoring library for Python. It facilitates
10452 the renaming, moving and extracting of attributes, functions, modules, fields
10453 and parameters in Python 2 source code. These refactorings can also be applied
10454 to occurrences in strings and comments.")
10455 (license license:gpl2)))
10456
10457 (define-public python-rope
10458 (package
10459 (inherit python2-rope)
10460 (name "python-rope")
10461 (arguments `(#:python ,python-wrapper
10462 ;; XXX: Only partial python3 support, results in some failing
10463 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10464 #:tests? #f))
10465 (properties `((python2-variant . ,(delay python2-rope))))))
10466
10467 (define-public python-py3status
10468 (package
10469 (name "python-py3status")
10470 (version "3.21")
10471 (source
10472 (origin
10473 (method url-fetch)
10474 (uri (pypi-uri "py3status" version))
10475 (sha256
10476 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10477 (build-system python-build-system)
10478 (inputs
10479 `(("file" ,file)))
10480 (arguments
10481 '(#:phases
10482 (modify-phases %standard-phases
10483 ;; 'file' is used for detection of configuration file encoding
10484 ;; let's make link the dependency to particular input
10485 (add-before 'build 'patch-file-path
10486 (lambda* (#:key inputs #:allow-other-keys)
10487 (let ((file-path (assoc-ref inputs "file")))
10488 (substitute* "py3status/parse_config.py"
10489 (("\\[\"file\", \"-b\"")
10490 (string-append "['" file-path "/bin/file', '-b'")))
10491 #t))))
10492 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10493 (home-page "https://github.com/ultrabug/py3status")
10494 (synopsis "Extensible i3status wrapper written in Python")
10495 (description "py3status is an i3status wrapper which extends i3status
10496 functionality in a modular way, allowing you to extend your panel with your
10497 own code, responding to click events and updating clock every second.")
10498 (license license:bsd-3)))
10499
10500 (define-public python-tblib
10501 (package
10502 (name "python-tblib")
10503 (version "1.6.0")
10504 (source (origin
10505 (method url-fetch)
10506 (uri (pypi-uri "tblib" version))
10507 (sha256
10508 (base32
10509 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
10510 (build-system python-build-system)
10511 (arguments
10512 `(#:phases
10513 (modify-phases %standard-phases
10514 (replace 'check
10515 (lambda _
10516 ;; Upstream runs tests after installation and the package itself
10517 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10518 ;; found.
10519 (setenv "PYTHONPATH"
10520 (string-append (getcwd) "/build/lib:"
10521 (getenv "PYTHONPATH")))
10522 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10523 (native-inputs
10524 `(("python-pytest" ,python-pytest)
10525 ("python-six" ,python-six)))
10526 (home-page "https://github.com/ionelmc/python-tblib")
10527 (synopsis "Traceback serialization library")
10528 (description
10529 "Traceback serialization allows you to:
10530
10531 @enumerate
10532 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10533 different processes. This allows better error handling when running code over
10534 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10535
10536 @item Parse traceback strings and raise with the parsed tracebacks.
10537 @end enumerate\n")
10538 (license license:bsd-3)))
10539
10540 (define-public python2-tblib
10541 (package-with-python2 python-tblib))
10542
10543 (define-public python-greenlet
10544 (package
10545 (name "python-greenlet")
10546 (version "0.4.15")
10547 (source (origin
10548 (method url-fetch)
10549 (uri (pypi-uri "greenlet" version))
10550 (sha256
10551 (base32
10552 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10553 (build-system python-build-system)
10554 (home-page "https://greenlet.readthedocs.io/")
10555 (synopsis "Lightweight in-process concurrent programming")
10556 (description
10557 "Greenlet package is a spin-off of Stackless, a version of CPython
10558 that supports micro-threads called \"tasklets\". Tasklets run
10559 pseudo-concurrently (typically in a single or a few OS-level threads) and
10560 are synchronized with data exchanges on \"channels\".")
10561 (license (list license:psfl license:expat))))
10562
10563 (define-public python2-greenlet
10564 (package-with-python2 python-greenlet))
10565
10566 (define-public python-objgraph
10567 (package
10568 (name "python-objgraph")
10569 (version "3.4.1")
10570 (source
10571 (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "objgraph" version))
10574 (sha256
10575 (base32
10576 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
10577 (build-system python-build-system)
10578 (propagated-inputs
10579 `(("python-graphviz" ,python-graphviz)))
10580 (native-inputs
10581 `(("python-mock" ,python-mock)
10582 ("graphviz" ,graphviz)))
10583 (home-page "https://mg.pov.lt/objgraph/")
10584 (synopsis "Draw Python object reference graphs with graphviz")
10585 (description
10586 "This package provides tools to draw Python object reference graphs with
10587 graphviz.")
10588 (license license:expat)))
10589
10590 (define-public python2-objgraph
10591 (package-with-python2 python-objgraph))
10592
10593 (define-public python-gevent
10594 (package
10595 (name "python-gevent")
10596 (version "1.4.0")
10597 (source (origin
10598 (method url-fetch)
10599 (uri (pypi-uri "gevent" version))
10600 (sha256
10601 (base32
10602 "1lchr4akw2jkm5v4kz7bdm4wv3knkfhbfn9vkkz4s5yrkcxzmdqy"))
10603 (modules '((guix build utils)))
10604 (snippet
10605 '(begin
10606 ;; unbunding libev and c-ares
10607 (delete-file-recursively "deps")
10608 #t))))
10609 (build-system python-build-system)
10610 (arguments
10611 `(#:modules ((ice-9 ftw)
10612 (ice-9 match)
10613 (srfi srfi-26)
10614 (guix build utils)
10615 (guix build python-build-system))
10616 #:phases (modify-phases %standard-phases
10617 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10618 (lambda _
10619 (substitute* "src/gevent/subprocess.py"
10620 (("/bin/sh") (which "sh")))
10621 (for-each (lambda (file)
10622 (substitute* file
10623 (("/bin/sh") (which "sh"))
10624 (("/bin/true") (which "true"))))
10625 (find-files "src/greentest" "\\.py$"))
10626 #t))
10627 (add-before 'build 'do-not-use-bundled-sources
10628 (lambda* (#:key inputs #:allow-other-keys)
10629 (setenv "GEVENTSETUP_EMBED" "0")
10630
10631 ;; Prevent building bundled libev.
10632 (substitute* "setup.py"
10633 (("run_make=_BUILDING")
10634 "run_make=False"))
10635
10636 (let ((greenlet (string-append
10637 (assoc-ref inputs "python-greenlet")
10638 "/include")))
10639 (match (scandir greenlet
10640 (lambda (item)
10641 (string-prefix? "python" item)))
10642 ((python)
10643 (setenv "C_INCLUDE_PATH"
10644 (string-append greenlet "/" python ":"
10645 (or (getenv "C_INCLUDE_PATH")
10646 ""))))))
10647 #t))
10648 (add-before 'check 'pretend-to-be-CI
10649 (lambda _
10650 ;; A few tests are skipped due to network constraints or
10651 ;; get longer timeouts when running in a CI environment.
10652 ;; Piggy-back on that, as we need the same adjustments.
10653 (setenv "TRAVIS" "1")
10654 (setenv "APPVEYOR" "1")
10655 #t))
10656 (add-before 'check 'adjust-tests
10657 (lambda _
10658 (let ((disabled-tests
10659 '(;; These tests rely on networking which is not
10660 ;; available in the build container.
10661 "test_urllib2net.py"
10662 "test__server.py"
10663 "test__server_pywsgi.py"
10664 "test_socket.py"
10665 "test__socket.py"
10666 "test__socket_ssl.py"
10667 "test__socket_dns.py"
10668 "test__socket_dns6.py"
10669 "test___example_servers.py"
10670 "test__getaddrinfo_import.py"
10671 "test__examples.py"
10672 "test_httplib.py"
10673 "test_https.py"
10674 "test_urllib2_localnet.py"
10675 "test_ssl.py"
10676 "test__ssl.py"
10677 ;; XXX: These tests borrow functionality from the
10678 ;; Python builtin 'test' module, but it is not
10679 ;; installed with the Guix Python distribution.
10680 "test_smtpd.py"
10681 "test_wsgiref.py"
10682 "test_urllib2.py"
10683 "test_thread.py"
10684 "test_threading.py"
10685 "test__threading_2.py"
10686 ;; FIXME: test_patch_twice_warning_events fails for
10687 ;; no apparent reason. Needs more investigation!
10688 "test__monkey.py"
10689 ;; These tests rely on KeyboardInterrupts which do not
10690 ;; work inside the build container for some reason
10691 ;; (lack of controlling terminal?).
10692 "test_subprocess.py"
10693 "test__issues461_471.py"
10694 ;; TODO: Patch out the tests that use getprotobyname, etc
10695 ;; instead of disabling all the tests from these files.
10696 "test__all__.py"
10697 "test___config.py"
10698 "test__execmodules.py")))
10699 (call-with-output-file "skipped_tests.txt"
10700 (lambda (port)
10701 (display (string-join disabled-tests "\n") port)))
10702 #t)))
10703 (replace 'check
10704 (lambda _
10705 ;; Make sure the build directory is on PYTHONPATH.
10706 (setenv "PYTHONPATH"
10707 (string-append
10708 (getenv "PYTHONPATH") ":"
10709 (getcwd) "/build/"
10710 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10711
10712 ;; Use the build daemons configured number of workers.
10713 (setenv "NWORKERS" (number->string (parallel-job-count)))
10714
10715 (invoke "python" "-m" "gevent.tests" "--config"
10716 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
10717 (propagated-inputs
10718 `(("python-greenlet" ,python-greenlet)
10719 ("python-objgraph" ,python-objgraph)))
10720 (native-inputs
10721 `(("python-six" ,python-six)
10722
10723 ;; For tests.
10724 ("python-dnspython" ,python-dnspython)
10725 ("python-psutil" ,python-psutil)
10726 ("python-zope.event" ,python-zope-event)
10727 ("python-zope.interface" ,python-zope-interface)))
10728 (inputs
10729 `(("c-ares" ,c-ares)
10730 ("libev" ,libev)))
10731 (home-page "http://www.gevent.org/")
10732 (synopsis "Coroutine-based network library")
10733 (description
10734 "gevent is a coroutine-based Python networking library that uses greenlet
10735 to provide a high-level synchronous API on top of the libev event loop.")
10736 (license license:expat)
10737 (properties `((python2-variant . ,(delay python2-gevent))))))
10738
10739 (define-public python2-gevent
10740 (let ((base (package-with-python2
10741 (strip-python2-variant python-gevent))))
10742 (package
10743 (inherit base)
10744 (native-inputs `(,@(package-native-inputs base)
10745 ("python-mock" ,python2-mock))))))
10746
10747 (define-public python-fastimport
10748 (package
10749 (name "python-fastimport")
10750 (version "0.9.6")
10751 (source
10752 (origin
10753 (method url-fetch)
10754 (uri (pypi-uri "fastimport" version))
10755 (sha256
10756 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10757 (build-system python-build-system)
10758 (home-page "https://github.com/jelmer/python-fastimport")
10759 (synopsis "VCS fastimport parser and generator in Python")
10760 (description "This package provides a parser for and generator of the Git
10761 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10762 format.")
10763 (license license:gpl2+)))
10764
10765 (define-public python2-fastimport
10766 (package-with-python2 python-fastimport))
10767
10768 (define-public python-twisted
10769 (package
10770 (name "python-twisted")
10771 (version "19.7.0")
10772 (source (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10775 (sha256
10776 (base32
10777 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10778 (build-system python-build-system)
10779 (arguments
10780 '(#:tests? #f)) ; FIXME: some tests fail
10781 (propagated-inputs
10782 `(("python-zope-interface" ,python-zope-interface)
10783 ("python-pyhamcrest" ,python-pyhamcrest)
10784 ("python-incremental" ,python-incremental)
10785 ("python-hyperlink" ,python-hyperlink)
10786 ("python-constantly" ,python-constantly)
10787 ("python-automat" ,python-automat)))
10788 (home-page "https://twistedmatrix.com/")
10789 (synopsis "Asynchronous networking framework written in Python")
10790 (description
10791 "Twisted is an extensible framework for Python programming, with special
10792 focus on event-based network programming and multiprotocol integration.")
10793 (license license:expat)))
10794
10795 (define-public python2-twisted
10796 (package-with-python2 python-twisted))
10797
10798 (define-public python-pika
10799 (package
10800 (name "python-pika")
10801 (version "0.12.0")
10802 (source
10803 (origin
10804 (method url-fetch)
10805 (uri (pypi-uri "pika" version))
10806 (sha256
10807 (base32
10808 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10809 (build-system python-build-system)
10810 (native-inputs
10811 `(("python-pyev" ,python-pyev)
10812 ("python-tornado" ,python-tornado)
10813 ("python-twisted" ,python-twisted)))
10814 (home-page "https://pika.readthedocs.org")
10815 (synopsis "Pure Python AMQP Client Library")
10816 (description
10817 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10818 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10819 network support library.")
10820 (license license:bsd-3)))
10821
10822 (define-public python2-pika
10823 (package-with-python2 python-pika))
10824
10825 (define-public python-ply
10826 (package
10827 (name "python-ply")
10828 (version "3.10")
10829 (source
10830 (origin
10831 (method url-fetch)
10832 (uri (pypi-uri "ply" version))
10833 (sha256
10834 (base32
10835 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10836 (build-system python-build-system)
10837 (home-page "http://www.dabeaz.com/ply/")
10838 (synopsis "Python Lex & Yacc")
10839 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10840 It uses LR parsing and does extensive error checking.")
10841 (license license:bsd-3)))
10842
10843 (define-public python2-ply
10844 (package-with-python2 python-ply))
10845
10846 (define-public python-tabulate
10847 (package
10848 (name "python-tabulate")
10849 (version "0.7.7")
10850 (source (origin
10851 (method url-fetch)
10852 (uri (pypi-uri "tabulate" version))
10853 (sha256
10854 (base32
10855 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10856 (build-system python-build-system)
10857 (arguments
10858 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10859 ;; and the latest release is not tagged in the upstream repository.
10860 '(#:tests? #f))
10861 (home-page "https://bitbucket.org/astanin/python-tabulate")
10862 (synopsis "Pretty-print tabular data")
10863 (description
10864 "Tabulate is a library and command-line utility to pretty-print tabular
10865 data in Python.")
10866 (license license:expat)))
10867
10868 (define-public python2-tabulate
10869 (package-with-python2 python-tabulate))
10870
10871 (define-public python-kazoo
10872 (package
10873 (name "python-kazoo")
10874 (version "2.4.0")
10875 (source
10876 (origin
10877 (method url-fetch)
10878 (uri (pypi-uri "kazoo" version))
10879 (sha256
10880 (base32
10881 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10882 (build-system python-build-system)
10883 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10884 (propagated-inputs
10885 `(("python-six" ,python-six)))
10886 (home-page "https://kazoo.readthedocs.org")
10887 (synopsis "High-level Zookeeper client library")
10888 (description
10889 "Kazoo is a Python client library for the Apache Zookeeper distributed
10890 application service. It is designed to be easy to use and to avoid common
10891 programming errors.")
10892 (license license:asl2.0)))
10893
10894 (define-public python2-kazoo
10895 (package-with-python2 python-kazoo))
10896
10897 (define-public python-pykafka
10898 (package
10899 (name "python-pykafka")
10900 (version "2.4.0")
10901 (source (origin
10902 (method url-fetch)
10903 (uri (pypi-uri "pykafka" version))
10904 (sha256
10905 (base32
10906 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10907 (build-system python-build-system)
10908 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10909 (propagated-inputs
10910 `(("python-gevent" ,python-gevent)
10911 ("python-kazoo" ,python-kazoo)
10912 ("python-tabulate" ,python-tabulate)))
10913 (inputs
10914 `(("librdkafka" ,librdkafka)))
10915 (home-page "https://pykafka.readthedocs.io/")
10916 (synopsis "Apache Kafka client for Python")
10917 (description
10918 "PyKafka is a client for the Apache Kafka distributed messaging system.
10919 It includes Python implementations of Kafka producers and consumers, which
10920 are optionally backed by a C extension built on librdkafka.")
10921 (license license:asl2.0)))
10922
10923 (define-public python2-pykafka
10924 (package-with-python2 python-pykafka))
10925
10926 (define-public python-wcwidth
10927 (package
10928 (name "python-wcwidth")
10929 (version "0.1.8")
10930 (source (origin
10931 (method url-fetch)
10932 (uri (pypi-uri "wcwidth" version))
10933 (sha256
10934 (base32
10935 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10936 (build-system python-build-system)
10937 (home-page "https://github.com/jquast/wcwidth")
10938 (synopsis "Measure number of terminal column cells of wide-character codes")
10939 (description "Wcwidth measures the number of terminal column cells of
10940 wide-character codes. It is useful for those implementing a terminal emulator,
10941 or programs that carefully produce output to be interpreted by one. It is a
10942 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10943 specified in POSIX.1-2001 and POSIX.1-2008.")
10944 (license license:expat)))
10945
10946 (define-public python2-wcwidth
10947 (package-with-python2 python-wcwidth))
10948
10949 (define-public python2-jsonrpclib
10950 (package
10951 (name "python2-jsonrpclib")
10952 (version "0.1.7")
10953 (source (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "jsonrpclib" version))
10956 (sha256
10957 (base32
10958 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10959 (build-system python-build-system)
10960 (arguments
10961 `(#:tests? #f
10962 #:python ,python-2))
10963 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10964 (synopsis "Implementation of JSON-RPC specification for Python")
10965 (description
10966 "This library is an implementation of the JSON-RPC specification.
10967 It supports both the original 1.0 specification, as well as the
10968 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10969 etc.")
10970 (license license:asl2.0)))
10971
10972 (define-public python-chai
10973 (package
10974 (name "python-chai")
10975 (version "1.1.2")
10976 (source (origin
10977 (method url-fetch)
10978 (uri (pypi-uri "chai" version))
10979 (sha256
10980 (base32
10981 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10982 (build-system python-build-system)
10983 (home-page "https://github.com/agoragames/chai")
10984 (synopsis "Mocking framework for Python")
10985 (description
10986 "Chai provides an api for mocking, stubbing and spying your python
10987 objects, patterned after the Mocha library for Ruby.")
10988 (license license:bsd-3)))
10989
10990 (define-public python2-chai
10991 (package-with-python2 python-chai))
10992
10993 (define-public python-inflection
10994 (package
10995 (name "python-inflection")
10996 (version "0.3.1")
10997 (source
10998 (origin (method url-fetch)
10999 (uri (pypi-uri "inflection" version))
11000 (sha256
11001 (base32
11002 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11003 (build-system python-build-system)
11004 (native-inputs
11005 `(("python-pytest" ,python-pytest)))
11006 (home-page "https://github.com/jpvanhal/inflection")
11007 (synopsis "Python string transformation library")
11008 (description
11009 "Inflection is a string transformation library. It singularizes
11010 and pluralizes English words, and transforms strings from CamelCase to
11011 underscored string.")
11012 (license license:expat)))
11013
11014 (define-public python2-inflection
11015 (package-with-python2 python-inflection))
11016
11017 (define-public python-pylev
11018 (package
11019 (name "python-pylev")
11020 (version "1.3.0")
11021 (source (origin
11022 (method url-fetch)
11023 (uri (pypi-uri "pylev" version))
11024 (sha256
11025 (base32
11026 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11027 (build-system python-build-system)
11028 (home-page "https://github.com/toastdriven/pylev")
11029 (synopsis "Levenshtein distance implementation in Python")
11030 (description "Pure Python Levenshtein implementation, based off the
11031 Wikipedia code samples at
11032 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11033 (license license:bsd-3)))
11034
11035 (define-public python2-pylev
11036 (package-with-python2 python-pylev))
11037
11038 (define-public python-cleo
11039 (package
11040 (name "python-cleo")
11041 (version "0.7.6")
11042 (source (origin
11043 (method url-fetch)
11044 (uri (pypi-uri "cleo" version))
11045 (sha256
11046 (base32
11047 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
11048 (build-system python-build-system)
11049 (native-inputs
11050 `( ;; For testing
11051 ("python-mock" ,python-mock)
11052 ("python-pytest-mock" ,python-pytest-mock)
11053 ("python-pytest" ,python-pytest)))
11054 (propagated-inputs
11055 `(("python-backpack" ,python-backpack)
11056 ("python-clikit" ,python-clikit)
11057 ("python-pastel" ,python-pastel)
11058 ("python-pylev" ,python-pylev)))
11059 (home-page "https://github.com/sdispater/cleo")
11060 (synopsis "Command-line arguments library for Python")
11061 (description
11062 "Cleo allows you to create command-line commands with signature in
11063 docstring and colored output.")
11064 (license license:expat)))
11065
11066 (define-public python2-cleo
11067 (package-with-python2 python-cleo))
11068
11069 (define-public python-tomlkit
11070 (package
11071 (name "python-tomlkit")
11072 (version "0.5.11")
11073 (source
11074 (origin
11075 (method url-fetch)
11076 (uri (pypi-uri "tomlkit" version))
11077 (sha256
11078 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
11079 (build-system python-build-system)
11080 (native-inputs
11081 `(("python-pytest" ,python-pytest)))
11082 (home-page "https://github.com/sdispater/tomlkit")
11083 (synopsis "Style-preserving TOML library")
11084 (description
11085 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11086 preserves all comments, indentations, whitespace and internal element ordering,
11087 and makes them accessible and editable via an intuitive API. It can also
11088 create new TOML documents from scratch using the provided helpers. Part of the
11089 implementation has been adapted, improved, and fixed from Molten.")
11090 (license license:expat)))
11091
11092 (define-public python-shellingham
11093 (package
11094 (name "python-shellingham")
11095 (version "1.3.1")
11096 (source
11097 (origin
11098 (method url-fetch)
11099 (uri (pypi-uri "shellingham" version))
11100 (sha256
11101 (base32
11102 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
11103 (build-system python-build-system)
11104 (home-page
11105 "https://github.com/sarugaku/shellingham")
11106 (synopsis "Tool to detect surrounding shell")
11107 (description
11108 "Shellingham detects what shell the current Python executable is
11109 running in.")
11110 (license license:isc)))
11111
11112 (define-public python-memcached
11113 (package
11114 (name "python-memcached")
11115 (version "1.59")
11116 (source
11117 (origin
11118 (method url-fetch)
11119 (uri (pypi-uri "python-memcached" version))
11120 (sha256
11121 (base32
11122 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
11123 (build-system python-build-system)
11124 (propagated-inputs `(("python-six" ,python-six)))
11125 (home-page
11126 "https://github.com/linsomniac/python-memcached")
11127 (synopsis "Pure python memcached client")
11128 (description
11129 "This software is a pure Python interface to the memcached memory cache
11130 daemon. It is the client side software which allows storing values in one or
11131 more, possibly remote, memcached servers.")
11132 (license license:psfl)))
11133
11134 (define-public python-clikit
11135 (package
11136 (name "python-clikit")
11137 (version "0.4.1")
11138 (source
11139 (origin
11140 (method url-fetch)
11141 (uri (pypi-uri "clikit" version))
11142 (sha256
11143 (base32
11144 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
11145 (build-system python-build-system)
11146 (propagated-inputs
11147 `(("python-pastel" ,python-pastel)
11148 ("python-pylev" ,python-pylev)))
11149 (home-page "https://github.com/sdispater/clikit")
11150 (synopsis "Group of utilities to build command line interfaces")
11151 (description
11152 "CliKit is a group of utilities to build testable command line
11153 interfaces.")
11154 (license license:expat)))
11155
11156 (define-public python-msgpack-python
11157 (package
11158 (name "python-msgpack-python")
11159 (version "0.5.6")
11160 (source
11161 (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "msgpack-python" version))
11164 (sha256
11165 (base32
11166 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
11167 (build-system python-build-system)
11168 (home-page "http://msgpack.org/")
11169 (synopsis "Package to deserialize messages in MessagePack binary format")
11170 (description
11171 "MessagePack is an efficient binary serialization format. It lets you
11172 exchange data among multiple languages like JSON. But it's faster and
11173 smaller. Small integers are encoded into a single byte, and typical short
11174 strings require only one extra byte in addition to the strings themselves.")
11175 (license license:asl2.0)))
11176
11177 (define-public python-cachy
11178 (package
11179 (name "python-cachy")
11180 (version "0.2.0")
11181 (source
11182 (origin
11183 (method url-fetch)
11184 (uri (pypi-uri "cachy" version))
11185 (sha256
11186 (base32
11187 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
11188 (build-system python-build-system)
11189 (native-inputs
11190 `(("python-fakeredis" ,python-fakeredis)
11191 ("python-flexmock" ,python-flexmock)
11192 ("python-pytest" ,python-pytest)))
11193 (propagated-inputs
11194 `(("python-memcached" ,python-memcached)
11195 ("python-msgpack-python" ,python-msgpack-python)
11196 ("python-redis" ,python-redis)))
11197 (home-page "https://github.com/sdispater/cachy")
11198 (synopsis "Simple yet effective caching library")
11199 (description
11200 "Cachy provides a simple yet effective caching library. A simple but
11201 powerful API: thread-safety; decorator syntax; support for memcached, redis,
11202 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
11203 (license license:expat)))
11204
11205 (define-public poetry
11206 (package
11207 (name "poetry")
11208 (version "0.12.17")
11209 ;; Poetry can only be built from source with poetry.
11210 (source
11211 (origin
11212 (method url-fetch)
11213 (uri (pypi-uri "poetry" version))
11214 (sha256
11215 (base32
11216 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
11217 (build-system python-build-system)
11218 (arguments
11219 `(#:tests? #f ;; Pypi does not have tests.
11220 #:phases
11221 (modify-phases %standard-phases
11222 (replace 'build
11223 (lambda _
11224 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
11225 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
11226 "setup.py")
11227 #t)))))
11228 (propagated-inputs
11229 `(("python-cachecontrol" ,python-cachecontrol)
11230 ("python-cachy" ,python-cachy)
11231 ("python-cleo" ,python-cleo)
11232 ("python-glob2" ,python-glob2)
11233 ("python-html5lib" ,python-html5lib)
11234 ("python-jsonschema" ,python-jsonschema)
11235 ("python-msgpack" ,python-msgpack)
11236 ("python-pkginfo" ,python-pkginfo)
11237 ("python-pyparsing" ,python-pyparsing)
11238 ("python-pyrsistent" ,python-pyrsistent)
11239 ("python-requests" ,python-requests)
11240 ("python-requests-toolbelt" ,python-requests-toolbelt)
11241 ("python-shellingham" ,python-shellingham)
11242 ("python-tomlkit" ,python-tomlkit)
11243 ("python-virtualenv" ,python-virtualenv)))
11244 (home-page "https://poetry.eustace.io/")
11245 (synopsis "Python dependency management and packaging made easy")
11246 (description "Poetry is a tool for dependency management and packaging
11247 in Python. It allows you to declare the libraries your project depends on and
11248 it will manage (install/update) them for you.")
11249 (license license:expat)))
11250
11251 (define-public python-lazy-object-proxy
11252 (package
11253 (name "python-lazy-object-proxy")
11254 (version "1.4.3")
11255 (source (origin
11256 (method url-fetch)
11257 (uri (pypi-uri "lazy-object-proxy" version))
11258 (sha256
11259 (base32
11260 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
11261 (native-inputs
11262 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
11263 (build-system python-build-system)
11264 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11265 (synopsis "Lazy object proxy for python")
11266 (description
11267 "Lazy object proxy is an object that wraps a callable but defers the call
11268 until the object is actually required, and caches the result of said call.")
11269 (license license:bsd-2)))
11270
11271 (define-public python2-lazy-object-proxy
11272 (package-with-python2 python-lazy-object-proxy))
11273
11274 (define-public python-dnspython
11275 (package
11276 (name "python-dnspython")
11277 (version "1.15.0")
11278 (source (origin
11279 (method url-fetch)
11280 (uri (string-append "http://www.dnspython.org/kits/"
11281 version "/dnspython-" version ".tar.gz"))
11282 (sha256
11283 (base32
11284 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11285 (build-system python-build-system)
11286 (arguments '(#:tests? #f)) ; XXX: requires internet access
11287 (home-page "http://www.dnspython.org")
11288 (synopsis "DNS toolkit for Python")
11289 (description
11290 "dnspython is a DNS toolkit for Python. It supports almost all record
11291 types. It can be used for queries, zone transfers, and dynamic updates.
11292 It supports TSIG authenticated messages and EDNS0.")
11293 (license license:expat)))
11294
11295 (define-public python2-dnspython
11296 (package-with-python2 python-dnspython))
11297
11298 (define-public python-email-validator
11299 (package
11300 (name "python-email-validator")
11301 (version "1.0.2")
11302 (source
11303 (origin (method url-fetch)
11304 (uri (pypi-uri "email_validator" version))
11305 (sha256
11306 (base32
11307 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11308 (build-system python-build-system)
11309 (arguments
11310 '(#:phases
11311 (modify-phases %standard-phases
11312 (add-before 'build 'use-dnspython
11313 (lambda _
11314 (substitute* "setup.py"
11315 (("dnspython3") "dnspython"))
11316 #t)))))
11317 (propagated-inputs
11318 `(("python-dnspython" ,python-dnspython)
11319 ("python-idna" ,python-idna)))
11320 (home-page "https://github.com/JoshData/python-email-validator")
11321 (synopsis "Email address validation library for Python")
11322 (description
11323 "This library validates email address syntax and deliverability.")
11324 (license license:cc0)))
11325
11326 (define-public python2-email-validator
11327 (package-with-python2 python-email-validator))
11328
11329 (define-public python-ukpostcodeparser
11330 (package
11331 (name "python-ukpostcodeparser")
11332 (version "1.0.3")
11333 (source (origin
11334 (method url-fetch)
11335 (uri (pypi-uri "UkPostcodeParser" version))
11336 (sha256
11337 (base32
11338 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11339 (build-system python-build-system)
11340 (home-page "https://github.com/hamstah/ukpostcodeparser")
11341 (synopsis "UK Postcode parser for Python")
11342 (description
11343 "This library provides the @code{parse_uk_postcode} function for
11344 parsing UK postcodes.")
11345 (license license:expat)))
11346
11347 (define-public python2-ukpostcodeparser
11348 (package-with-python2 python-ukpostcodeparser))
11349
11350 (define-public python-faker
11351 (package
11352 (name "python-faker")
11353 (version "0.7.9")
11354 (source (origin
11355 (method url-fetch)
11356 (uri (pypi-uri "Faker" version))
11357 (sha256
11358 (base32
11359 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11360 (patches
11361 (search-patches "python-faker-fix-build-32bit.patch"))
11362 (modules '((guix build utils)))
11363 (snippet
11364 '(begin
11365 (for-each delete-file (find-files "." "\\.pyc$"))
11366 #t))))
11367 (build-system python-build-system)
11368 (arguments
11369 '(#:phases
11370 (modify-phases %standard-phases
11371 (replace 'check
11372 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
11373 (native-inputs
11374 `(;; For testing
11375 ("python-email-validator" ,python-email-validator)
11376 ("python-mock" ,python-mock)
11377 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11378 (propagated-inputs
11379 `(("python-dateutil" ,python-dateutil)
11380 ("python-six" ,python-six)))
11381 (home-page "https://github.com/joke2k/faker")
11382 (synopsis "Python package that generates fake data")
11383 (description
11384 "Faker is a Python package that generates fake data such as names,
11385 addresses, and phone numbers.")
11386 (license license:expat)
11387 (properties `((python2-variant . ,(delay python2-faker))))))
11388
11389 (define-public python2-faker
11390 (let ((base (package-with-python2 (strip-python2-variant
11391 python-faker))))
11392 (package
11393 (inherit base)
11394 (propagated-inputs
11395 `(("python2-ipaddress" ,python2-ipaddress)
11396 ,@(package-propagated-inputs base))))))
11397
11398 (define-public python-pyaml
11399 (package
11400 (name "python-pyaml")
11401 (version "18.11.0")
11402 (source (origin
11403 (method url-fetch)
11404 (uri (pypi-uri "pyaml" version))
11405 (sha256
11406 (base32
11407 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11408 (build-system python-build-system)
11409 (native-inputs
11410 `(("python-unidecode" ,python-unidecode)))
11411 (propagated-inputs
11412 `(("python-pyyaml" ,python-pyyaml)))
11413 (home-page "https://github.com/mk-fg/pretty-yaml")
11414 (synopsis "YAML pretty-print library for Python")
11415 (description
11416 "pyaml is a PyYAML based python module to produce pretty and readable
11417 YAML-serialized data.")
11418 (license license:wtfpl2)))
11419
11420 (define-public python2-pyaml
11421 (package-with-python2 python-pyaml))
11422
11423 (define-public python-backpack
11424 (package
11425 (name "python-backpack")
11426 (version "0.1")
11427 (source
11428 (origin
11429 (method url-fetch)
11430 (uri (pypi-uri "backpack" version))
11431 (sha256
11432 (base32
11433 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11434 (build-system python-build-system)
11435 (native-inputs
11436 `(("python-pytest" ,python-pytest)
11437 ("python-nose" ,python-nose)))
11438 (propagated-inputs
11439 `(("python-simplejson" ,python-simplejson)))
11440 (home-page "https://github.com/sdispater/backpack")
11441 (synopsis "Utilities for working with Python collections")
11442 (description "Backpack provides some useful utilities for working with
11443 collections of data.")
11444 (license license:expat)))
11445
11446 (define-public python2-backpack
11447 (package-with-python2 python-backpack))
11448
11449 (define-public python-prompt-toolkit
11450 (package
11451 (name "python-prompt-toolkit")
11452 (version "2.0.7")
11453 (source
11454 (origin
11455 (method url-fetch)
11456 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11457 (sha256
11458 (base32
11459 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11460 (build-system python-build-system)
11461 (arguments
11462 `(#:phases
11463 (modify-phases %standard-phases
11464 (delete 'check)
11465 (add-after 'install 'post-install-check
11466 (lambda* (#:key inputs outputs #:allow-other-keys)
11467 ;; HOME is needed for the test
11468 ;; "test_pathcompleter_can_expanduser".
11469 (setenv "HOME" "/tmp")
11470 (add-installed-pythonpath inputs outputs)
11471 (invoke "py.test"))))))
11472 (propagated-inputs
11473 `(("python-wcwidth" ,python-wcwidth)
11474 ("python-six" ,python-six)
11475 ("python-pygments" ,python-pygments)))
11476 (native-inputs
11477 `(("python-pytest" ,python-pytest)))
11478 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11479 (synopsis "Library for building command line interfaces in Python")
11480 (description
11481 "Prompt-Toolkit is a library for building interactive command line
11482 interfaces in Python. It's like GNU Readline but it also features syntax
11483 highlighting while typing, out-of-the-box multi-line input editing, advanced
11484 code completion, incremental search, support for Chinese double-width
11485 characters, mouse support, and auto suggestions.")
11486 (license license:bsd-3)))
11487
11488 (define-public python2-prompt-toolkit
11489 (package-with-python2 python-prompt-toolkit))
11490
11491 (define-public python-prompt-toolkit-1
11492 (package (inherit python-prompt-toolkit)
11493 (version "1.0.15")
11494 (source
11495 (origin
11496 (method url-fetch)
11497 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11498 (sha256
11499 (base32
11500 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11501
11502 (define-public python2-prompt-toolkit-1
11503 (package-with-python2 python-prompt-toolkit-1))
11504
11505 (define-public python-jedi
11506 (package
11507 (name "python-jedi")
11508 (version "0.16.0")
11509 (source
11510 (origin
11511 (method url-fetch)
11512 (uri (pypi-uri "jedi" version))
11513 (patches (search-patches "python-jedi-deleted-variables.patch"))
11514 (sha256
11515 (base32
11516 "1mb5kmrk9bkc3kwzx02j62cdan1jqd92q1z7h7wi9d30jg5p3j6m"))))
11517 (build-system python-build-system)
11518 (arguments
11519 `(#:phases
11520 (modify-phases %standard-phases
11521 (replace 'check
11522 (lambda _
11523 (setenv "HOME" "/tmp")
11524 (invoke "python" "-m" "pytest"))))))
11525 (native-inputs
11526 `(("python-pytest" ,python-pytest)
11527 ("python-docopt" ,python-docopt)))
11528 (propagated-inputs
11529 `(("python-parso" ,python-parso)))
11530 (home-page "https://github.com/davidhalter/jedi")
11531 (synopsis "Autocompletion and static analysis library for Python")
11532 (description
11533 "Jedi is a static analysis tool for Python that can be used in Integrated
11534 Development Environments (@dfn{IDE}s) and text editors. It understands Python
11535 on a deeper level than many other static analysis frameworks for Python.
11536
11537 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11538 well.")
11539 (license license:expat)))
11540
11541 (define-public python2-jedi
11542 (package-with-python2 python-jedi))
11543
11544 (define-public ptpython
11545 (package
11546 (name "ptpython")
11547 (version "0.34")
11548 (source (origin
11549 (method url-fetch)
11550 (uri (pypi-uri "ptpython" version))
11551 (sha256
11552 (base32
11553 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11554 (build-system python-build-system)
11555 (arguments
11556 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11557 (propagated-inputs
11558 `(("python-docopt" ,python-docopt)
11559 ("python-jedi" ,python-jedi)
11560 ("python-prompt-toolkit" ,python-prompt-toolkit)
11561 ("python-pygments" ,python-pygments)))
11562 (home-page "https://github.com/jonathanslenders/ptpython")
11563 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11564 (description
11565 "ptpython is a Python read-eval-print loop with IDE-like features.
11566 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11567 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11568 etc.")
11569 (license license:bsd-3)
11570 (properties `((python2-variant . ,(delay ptpython-2))))))
11571
11572 (define-public ptpython-2
11573 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11574 (package
11575 (inherit base)
11576 (name "ptpython2"))))
11577
11578 (define-public python-stem
11579 (package
11580 (name "python-stem")
11581 (version "1.8.0")
11582 (source
11583 (origin
11584 (method url-fetch)
11585 (uri (pypi-uri "stem" version))
11586 (sha256
11587 (base32
11588 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
11589 (build-system python-build-system)
11590 (arguments
11591 `(#:phases
11592 (modify-phases %standard-phases
11593 (replace 'check
11594 (lambda _
11595 (invoke "./run_tests.py" "--unit")
11596 #t)))))
11597 (native-inputs
11598 `(("python-mock" ,python-mock)
11599 ("python-pycodestyle" ,python-pycodestyle)
11600 ("python-pyflakes" ,python-pyflakes)))
11601 (home-page "https://stem.torproject.org/")
11602 (synopsis
11603 "Python controller library that allows applications to interact with Tor")
11604 (description
11605 "Stem is a Python controller library for Tor. With it you can use Tor's
11606 control protocol to script against the Tor process and read descriptor data
11607 relays publish about themselves.")
11608 (license license:lgpl3)))
11609
11610 (define-public python2-stem
11611 (package-with-python2 python-stem))
11612
11613 (define-public python-pyserial
11614 (package
11615 (name "python-pyserial")
11616 (version "3.4")
11617 (source
11618 (origin
11619 (method url-fetch)
11620 (uri (pypi-uri "pyserial" version))
11621 (sha256
11622 (base32
11623 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11624 (build-system python-build-system)
11625 (arguments
11626 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11627 ;; #:phases
11628 ;; (modify-phases %standard-phases
11629 ;; (replace 'check
11630 ;; (lambda _
11631 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11632 (home-page
11633 "https://github.com/pyserial/pyserial")
11634 (synopsis "Python Serial Port Bindings")
11635 (description "@code{pyserial} provide serial port bindings for Python. It
11636 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11637 and/or Xon/Xoff. The port is accessed in RAW mode.")
11638 (license license:bsd-3)))
11639
11640 (define-public python2-pyserial
11641 (package-with-python2 python-pyserial))
11642
11643 (define-public python-kivy
11644 (package
11645 (name "python-kivy")
11646 (version "1.10.1")
11647 (source
11648 (origin
11649 (method url-fetch)
11650 (uri (pypi-uri "Kivy" version))
11651 (file-name (string-append name "-" version ".tar.gz"))
11652 (sha256
11653 (base32
11654 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11655 (build-system python-build-system)
11656 (arguments
11657 `(#:tests? #f ; Tests require many optional packages
11658 #:phases
11659 (modify-phases %standard-phases
11660 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11661 (lambda* (#:key inputs #:allow-other-keys)
11662 (setenv "KIVY_SDL2_PATH"
11663 (string-append (assoc-ref inputs "sdl-union")
11664 "/include/SDL2"))
11665 #t)))))
11666 (native-inputs
11667 `(("pkg-config" ,pkg-config)
11668 ("python-cython" ,python-cython)))
11669 (inputs
11670 `(("gstreamer" ,gstreamer)
11671 ("mesa" ,mesa)
11672 ("sdl-union"
11673 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11674 (home-page "http://kivy.org")
11675 (synopsis
11676 "Multitouch application framework")
11677 (description
11678 "A software library for rapid development of
11679 hardware-accelerated multitouch applications.")
11680 (license license:expat)))
11681
11682 (define-public python2-kivy
11683 (package-with-python2 python-kivy))
11684
11685 (define-public python-kivy-next
11686 (deprecated-package "python-kivy-next" python-kivy))
11687
11688 (define-public python2-kivy-next
11689 (deprecated-package "python2-kivy-next" python2-kivy))
11690
11691 (define-public python-binaryornot
11692 (package
11693 (name "python-binaryornot")
11694 (version "0.4.4")
11695 (source (origin
11696 (method url-fetch)
11697 (uri (pypi-uri "binaryornot" version))
11698 (sha256
11699 (base32
11700 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11701 (build-system python-build-system)
11702 (arguments
11703 `(#:phases
11704 (modify-phases %standard-phases
11705 (add-after 'unpack 'patch-tests
11706 (lambda _
11707 ;; TypeError: binary() got an unexpected keyword argument
11708 ;; 'average_size'.
11709 (substitute* "tests/test_check.py"
11710 (("average_size=512") ""))
11711 #t)))))
11712 (propagated-inputs
11713 `(("python-chardet" ,python-chardet)
11714 ("python-hypothesis" ,python-hypothesis)))
11715 (home-page "https://github.com/audreyr/binaryornot")
11716 (synopsis "Package to check if a file is binary or text")
11717 (description "Ultra-lightweight pure Python package to check if a file is
11718 binary or text.")
11719 (license license:bsd-3)
11720 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11721
11722 (define-public python2-binaryornot
11723 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11724 (package (inherit base)
11725 (propagated-inputs
11726 `(("python2-enum34" ,python2-enum34)
11727 ,@(package-propagated-inputs base))))))
11728
11729 (define-public python-binwalk
11730 (package
11731 (name "python-binwalk")
11732 (version "2.2.0")
11733 (source
11734 (origin
11735 (method git-fetch)
11736 (uri (git-reference
11737 (url "https://github.com/ReFirmLabs/binwalk")
11738 (commit (string-append "v" version))))
11739 (file-name (git-file-name name version))
11740 (sha256
11741 (base32
11742 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11743 (build-system python-build-system)
11744 (arguments
11745 `(#:phases
11746 (modify-phases %standard-phases
11747 (add-before 'check 'set-pythonpath
11748 (lambda _
11749 (setenv "PYTHONPATH"
11750 (string-append
11751 (getcwd) "/src/"
11752 ":" (getenv "PYTHONPATH")))
11753 (setenv "HOME" "")
11754 #t)))))
11755 (native-inputs
11756 `(("python-coverage" ,python-coverage)
11757 ("python-nose" ,python-nose)))
11758 (home-page "https://github.com/ReFirmLabs/binwalk")
11759 (synopsis "Firmware analysis tool")
11760 (description "Binwalk is a tool for analyzing, reverse engineering, and
11761 extracting firmware images")
11762 (license license:expat)))
11763
11764 (define-public python-nltk
11765 (package
11766 (name "python-nltk")
11767 (version "3.2.1")
11768 (source (origin
11769 (method url-fetch)
11770 (uri (pypi-uri "nltk" version))
11771 (sha256
11772 (base32
11773 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11774 (build-system python-build-system)
11775 (arguments
11776 '(;; The tests require some extra resources to be downloaded.
11777 ;; TODO Try packaging these resources.
11778 #:tests? #f))
11779 (home-page "http://nltk.org/")
11780 (synopsis "Natural Language Toolkit")
11781 (description "It provides interfaces to over 50 corpora and lexical
11782 resources such as WordNet, along with a suite of text processing libraries
11783 for classification, tokenization, stemming, tagging, parsing, and semantic
11784 reasoning, wrappers for natural language processing libraries.")
11785 (license license:asl2.0)))
11786
11787 (define-public python2-nltk
11788 (package-with-python2 python-nltk))
11789
11790 (define-public python-pymongo
11791 (package
11792 (name "python-pymongo")
11793 (version "3.7.2")
11794 (source (origin
11795 (method url-fetch)
11796 (uri (pypi-uri "pymongo" version))
11797 (sha256
11798 (base32
11799 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11800 (build-system python-build-system)
11801 (propagated-inputs
11802 `(("python-certifi" ,python-certifi)))
11803 (home-page "https://github.com/mongodb/mongo-python-driver")
11804 (synopsis "Python driver for MongoDB")
11805 (description "Python driver for MongoDB.")
11806 (license license:asl2.0)))
11807
11808 (define-public python2-pymongo
11809 (package-with-python2 python-pymongo))
11810
11811 (define-public python-consul
11812 (package
11813 (name "python-consul")
11814 (version "0.6.1")
11815 (source
11816 (origin
11817 (method url-fetch)
11818 (uri (pypi-uri "python-consul" version))
11819 (sha256
11820 (base32
11821 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11822 (build-system python-build-system)
11823 (arguments
11824 '(#:tests? #f)) ; The tests are not distributed
11825 (propagated-inputs
11826 `(("python-requests" ,python-requests)
11827 ("python-six" ,python-six)))
11828 (home-page "https://github.com/cablehead/python-consul")
11829 (synopsis "Python client for Consul")
11830 (description
11831 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11832 discovery, monitoring and configuration.")
11833 (license license:expat)))
11834
11835 (define-public python2-consul
11836 (package-with-python2 python-consul))
11837
11838 (define-public python-schematics
11839 (package
11840 (name "python-schematics")
11841 (version "1.1.1")
11842 (source
11843 (origin
11844 (method git-fetch)
11845 (uri (git-reference
11846 (url "https://github.com/schematics/schematics.git")
11847 (commit (string-append "v" version))))
11848 (file-name (git-file-name name version))
11849 (sha256
11850 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11851 (build-system python-build-system)
11852 (propagated-inputs
11853 `(("python-six" ,python-six)))
11854 (arguments
11855 ;; The tests require a bunch of not very nice packages with fixed
11856 ;; version requirements (e.g. python-coveralls).
11857 `(#:tests? #f))
11858 (home-page "https://github.com/schematics/schematics")
11859 (synopsis "Python Data Structures for Humans")
11860 (description "Python Data Structures for Humans.")
11861 (license license:bsd-3)))
11862
11863 (define-public python2-schematics
11864 (package-with-python2 python-schematics))
11865
11866 (define-public python-odfpy
11867 (package
11868 (name "python-odfpy")
11869 (version "1.3.3")
11870 (source (origin
11871 (method url-fetch)
11872 (uri (pypi-uri "odfpy" version))
11873 (sha256
11874 (base32
11875 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11876 (arguments
11877 `(#:modules ((srfi srfi-1)
11878 (guix build python-build-system)
11879 (guix build utils))
11880 #:phases
11881 (modify-phases %standard-phases
11882 (replace 'check
11883 ;; The test runner invokes python2 and python3 for test*.py.
11884 ;; To avoid having both in inputs, we replicate it here.
11885 (lambda _
11886 (for-each (lambda (test-file) (invoke "python" test-file))
11887 (find-files "tests" "^test.*\\.py$"))
11888 #t)))))
11889 (build-system python-build-system)
11890 (home-page "https://github.com/eea/odfpy")
11891 (synopsis "Python API and tools to manipulate OpenDocument files")
11892 (description "Collection of libraries and utility programs written in
11893 Python to manipulate OpenDocument 1.2 files.")
11894 (license
11895 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11896 ;; number of files with other licenses.
11897 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11898
11899 (define-public python2-odfpy
11900 (package-with-python2 python-odfpy))
11901
11902 (define-public python-natsort
11903 (package
11904 (name "python-natsort")
11905 (version "7.0.1")
11906 (source (origin
11907 (method url-fetch)
11908 (uri (pypi-uri "natsort" version))
11909 (sha256
11910 (base32
11911 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
11912 (build-system python-build-system)
11913 (arguments
11914 `(#:modules ((guix build utils)
11915 (guix build python-build-system)
11916 (srfi srfi-1)
11917 (srfi srfi-26)
11918 (ice-9 ftw))
11919 #:phases
11920 (modify-phases %standard-phases
11921 (add-before 'check 'set-cachedir
11922 ;; Tests require write access to $HOME by default
11923 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11924 (replace 'check
11925 (lambda _
11926 (let ((cwd (getcwd)))
11927 (setenv "PYTHONPATH"
11928 (string-append
11929 cwd "/build/"
11930 (find (cut string-prefix? "lib" <>)
11931 (scandir (string-append cwd "/build")))
11932 ":"
11933 (getenv "PYTHONPATH")))
11934 (invoke "pytest" "-v")))))))
11935 (native-inputs
11936 `(("python-hypothesis" ,python-hypothesis)
11937 ("python-pytest-cov" ,python-pytest-cov)
11938 ("python-pytest-mock" ,python-pytest-mock)
11939 ("python-pytest" ,python-pytest)))
11940 (propagated-inputs ; TODO: Add python-fastnumbers.
11941 `(("python-pyicu" ,python-pyicu)))
11942 (home-page "https://github.com/SethMMorton/natsort")
11943 (synopsis "Natural sorting for python and shell")
11944 (description
11945 "Natsort lets you apply natural sorting on lists instead of
11946 lexicographical. If you use the built-in @code{sorted} method in python
11947 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11948 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11949 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11950 identifies numbers and sorts them separately from strings. It can also sort
11951 version numbers, real numbers, mixed types and more, and comes with a shell
11952 command @command{natsort} that exposes this functionality in the command line.")
11953 (license license:expat)
11954 (properties `((python2-variant . ,(delay python2-natsort))))))
11955
11956 ;; Natsort 6.x are the last versions with support for Python 2.
11957 (define-public python2-natsort
11958 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11959 (package (inherit base)
11960 (version "6.2.1")
11961 (source (origin
11962 (method url-fetch)
11963 (uri (pypi-uri "natsort" version))
11964 (sha256
11965 (base32
11966 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
11967 (native-inputs
11968 `(("python2-pathlib" ,python2-pathlib)
11969 ,@(package-native-inputs base))))))
11970
11971 (define-public glances
11972 (package
11973 (name "glances")
11974 (version "3.1.4")
11975 (source
11976 (origin
11977 (method url-fetch)
11978 (uri (pypi-uri "Glances" version))
11979 (sha256
11980 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
11981 (modules '((guix build utils)))
11982 (snippet
11983 '(begin
11984 ;; Glances phones PyPI for weekly update checks by default.
11985 ;; Disable these. The user can re-enable them if desired.
11986 (substitute* "glances/outdated.py"
11987 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11988 (string-append indentation
11989 "self.args.disable_check_update = True\n"
11990 line)))
11991 #t))))
11992 (build-system python-build-system)
11993 (propagated-inputs
11994 `(("python-future" ,python-future)
11995 ("python-psutil" ,python-psutil)))
11996 (home-page "https://github.com/nicolargo/glances")
11997 (synopsis "Cross-platform curses-based monitoring tool")
11998 (description
11999 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12000 Glances uses the PsUtil library to get information from your system. It
12001 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12002 (license license:lgpl3+)))
12003
12004 (define-public python-glances
12005 (deprecated-package "python-glances" glances))
12006
12007 (define-public python-graphql-core
12008 (package
12009 (name "python-graphql-core")
12010 (version "0.5.3")
12011 (source
12012 (origin
12013 (method url-fetch)
12014 (uri (pypi-uri "graphql-core" version))
12015 (sha256
12016 (base32
12017 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12018 (build-system python-build-system)
12019 (arguments
12020 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12021 #:phases
12022 (modify-phases %standard-phases
12023 (add-after 'unpack 'patch-hardcoded-version
12024 (lambda _ (substitute*
12025 "setup.py"
12026 (("'gevent==1.1rc1'") "'gevent'"))
12027 #t)))))
12028 (native-inputs
12029 `(("python-gevent" ,python-gevent)
12030 ("python-mock" ,python-mock)
12031 ("python-pytest-mock" ,python-pytest-mock)))
12032 (propagated-inputs
12033 `(("python-promise" ,python-promise)
12034 ("python-six" ,python-six)))
12035 (home-page "https://github.com/graphql-python/graphql-core")
12036 (synopsis "GraphQL implementation for Python")
12037 (description
12038 "GraphQL implementation for Python. GraphQL is a data query language and
12039 runtime designed and used to request and deliver data to mobile and web apps.
12040 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12041 to Python.")
12042 (license license:expat)))
12043
12044 (define-public python2-graphql-core
12045 (package-with-python2 python-graphql-core))
12046
12047 (define-public python-graphql-relay
12048 (package
12049 (name "python-graphql-relay")
12050 (version "0.4.5")
12051 (source
12052 (origin
12053 (method url-fetch)
12054 (uri (pypi-uri "graphql-relay" version))
12055 (sha256
12056 (base32
12057 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12058 (build-system python-build-system)
12059 (arguments
12060 '(#:tests? #f)) ; The tests are not distributed
12061 (propagated-inputs
12062 `(("python-graphql-core" ,python-graphql-core)
12063 ("python-promise" ,python-promise)
12064 ("python-six" ,python-six)))
12065 (home-page "https://github.com/graphql-python/graphql-relay-py")
12066 (synopsis "Relay implementation for Python")
12067 (description
12068 "This is a library to allow the easy creation of Relay-compliant servers
12069 using the GraphQL Python reference implementation of a GraphQL server. It
12070 should be noted that the code is a exact port of the original
12071 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12072 from Facebook.")
12073 (license license:expat)))
12074
12075 (define-public python2-graphql-relay
12076 (package-with-python2 python-graphql-relay))
12077
12078 (define-public python-graphene
12079 (package
12080 (name "python-graphene")
12081 (version "0.10.2")
12082 (source
12083 (origin
12084 (method url-fetch)
12085 (uri (pypi-uri "graphene" version))
12086 (sha256
12087 (base32
12088 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12089 (build-system python-build-system)
12090 (propagated-inputs
12091 `(("python-graphql-core" ,python-graphql-core)
12092 ("python-graphql-relay" ,python-graphql-relay)
12093 ("python-iso8601" ,python-iso8601)
12094 ("python-promise" ,python-promise)
12095 ("python-six" ,python-six)))
12096 (arguments
12097 `(#:tests? #f)) ; no tests/ in the PyPI tarball
12098 (home-page "https://graphene-python.org/")
12099 (synopsis "GraphQL Framework for Python")
12100 (description
12101 "Graphene is a Python library for building GraphQL schemas/types.
12102 A GraphQL schema describes your data model, and provides a GraphQL server
12103 with an associated set of resolve methods that know how to fetch data.")
12104 (properties `((python2-variant . ,(delay python2-graphene))))
12105 (license license:expat)))
12106
12107 (define-public python2-graphene
12108 (let ((base (package-with-python2
12109 (strip-python2-variant python-graphene))))
12110 (package (inherit base)
12111 (native-inputs
12112 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12113 ,@(package-native-inputs base))))))
12114
12115 (define-public python-nautilus
12116 (package
12117 (name "python-nautilus")
12118 (version "0.4.9")
12119 (source
12120 (origin
12121 (method url-fetch)
12122 (uri (pypi-uri "nautilus" version))
12123 (sha256
12124 (base32
12125 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12126 (build-system python-build-system)
12127 (arguments `(#:tests? #f)) ; fails to import test modules
12128 (propagated-inputs
12129 `(("python-bcrypt" ,python-bcrypt)
12130 ("python-click" ,python-click)
12131 ("python-consul" ,python-consul)
12132 ("python-graphene" ,python-graphene)
12133 ("python-jinja2" ,python-jinja2)
12134 ("python-peewee" ,python-peewee)
12135 ("python-pika" ,python-pika)
12136 ("python-tornado" ,python-tornado)
12137 ("python-wtforms" ,python-wtforms)))
12138 (native-inputs
12139 `(("python-nose2" ,python-nose2)))
12140 (home-page "https://github.com/AlecAivazis/nautilus")
12141 (synopsis "Library for creating microservice applications")
12142 (description
12143 "Nautilus is a framework for flux based microservices that looks to
12144 provide extendible implementations of common aspects of a cloud so that you can
12145 focus on building massively scalable web applications.")
12146 (license license:expat)))
12147
12148 (define-public python-snowballstemmer
12149 (package
12150 (name "python-snowballstemmer")
12151 (version "2.0.0")
12152 (source (origin
12153 (method url-fetch)
12154 (uri (pypi-uri "snowballstemmer" version))
12155 (sha256
12156 (base32
12157 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
12158 (build-system python-build-system)
12159 (arguments
12160 `(;; No tests exist
12161 #:tests? #f))
12162 (home-page "https://github.com/shibukawa/snowball_py")
12163 (synopsis "Snowball stemming library collection for Python")
12164 (description "This package provides 16 word stemmer algorithms generated
12165 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12166 English stemmer.")
12167 (license license:bsd-3)))
12168
12169 (define-public python2-snowballstemmer
12170 (package-with-python2 python-snowballstemmer))
12171
12172 (define-public python-setproctitle
12173 (package
12174 (name "python-setproctitle")
12175 (version "1.1.10")
12176 (source
12177 (origin
12178 (method url-fetch)
12179 (uri (pypi-uri "setproctitle" version))
12180 (sha256
12181 (base32
12182 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12183 (build-system python-build-system)
12184 (arguments
12185 '(#:phases
12186 (modify-phases %standard-phases
12187 (add-before 'check 'patch-Makefile
12188 ;; Stricly this is only required for the python2 variant.
12189 ;; But adding a phase in an inherited package seems to be
12190 ;; cumbersum. So we patch even for python3.
12191 (lambda _
12192 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12193 (when nose
12194 (substitute* "Makefile"
12195 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12196 (string-append nose "/bin/nosetests "))))
12197 #t)))
12198 (replace 'check
12199 (lambda _
12200 (setenv "PYTHON" (or (which "python3") (which "python")))
12201 (setenv "PYCONFIG" (or (which "python3-config")
12202 (which "python-config")))
12203 (setenv "CC" "gcc")
12204 ;; No need to extend PYTHONPATH to find the built package, since
12205 ;; the Makefile will build anyway
12206 (invoke "make" "check"))))))
12207 (native-inputs
12208 `(("procps" ,procps))) ; required for tests
12209 (home-page
12210 "https://github.com/dvarrazzo/py-setproctitle")
12211 (synopsis
12212 "Setproctitle implementation for Python to customize the process title")
12213 (description "The library allows a process to change its title (as displayed
12214 by system tools such as ps and top).
12215
12216 Changing the title is mostly useful in multi-process systems, for
12217 example when a master process is forked: changing the children's title
12218 allows to identify the task each process is busy with. The technique
12219 is used by PostgreSQL and the OpenSSH Server for example.")
12220 (license license:bsd-3)
12221 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12222
12223 (define-public python2-setproctitle
12224 (let ((base (package-with-python2
12225 (strip-python2-variant python-setproctitle))))
12226 (package
12227 (inherit base)
12228 (native-inputs `(("python2-nose" ,python2-nose)
12229 ,@(package-native-inputs base))))))
12230
12231 (define-public python-validictory
12232 (package
12233 (name "python-validictory")
12234 (version "1.0.1")
12235 (source
12236 (origin
12237 (method url-fetch)
12238 (uri (pypi-uri "validictory" version))
12239 (sha256
12240 (base32
12241 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12242 (build-system python-build-system)
12243 (arguments
12244 '(#:phases
12245 (modify-phases %standard-phases
12246 (add-after 'unpack 'bootstrap
12247 ;; Move the tests out of the package directory to avoid
12248 ;; packaging them.
12249 (lambda* _
12250 (rename-file "validictory/tests" "tests")
12251 (delete-file "tests/__init__.py")))
12252 (replace 'check
12253 (lambda _
12254 ;; Extend PYTHONPATH so the built package will be found.
12255 (setenv "PYTHONPATH"
12256 (string-append (getcwd) "/build/lib:"
12257 (getenv "PYTHONPATH")))
12258 (invoke "py.test" "-vv" ))))))
12259 (native-inputs
12260 `(("python-pytest" ,python-pytest)))
12261 (home-page
12262 "https://github.com/jamesturk/validictory")
12263 (synopsis "General purpose Python data validator")
12264 (description "It allows validation of arbitrary Python data structures.
12265
12266 The schema format is based on the JSON Schema
12267 proposal (http://json-schema.org), so combined with json the library is also
12268 useful as a validator for JSON data.")
12269 (license license:expat)))
12270
12271 (define-public python2-validictory
12272 (package-with-python2 python-validictory))
12273
12274 (define-public python-pyelftools
12275 (package
12276 (name "python-pyelftools")
12277 (version "0.25")
12278 (source
12279 (origin
12280 (method url-fetch)
12281 (uri (pypi-uri "pyelftools" version))
12282 (sha256
12283 (base32
12284 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
12285 (build-system python-build-system)
12286 (arguments
12287 `(#:phases
12288 (modify-phases %standard-phases
12289 (add-before 'check 'set-pythonpath
12290 (lambda _
12291 (setenv "PYTHONPATH"
12292 (string-append
12293 (getcwd) "/test/"
12294 ":" (getenv "PYTHONPATH")))
12295 #t)))))
12296 (home-page
12297 "https://github.com/eliben/pyelftools")
12298 (synopsis
12299 "Analyze binary and library file information")
12300 (description "This Python library provides interfaces for parsing and
12301 analyzing two binary and library file formats; the Executable and Linking
12302 Format (ELF), and debugging information in the Debugging With Attributed
12303 Record Format (DWARF).")
12304 (license license:public-domain)))
12305
12306 (define-public python-pyev
12307 (package
12308 (name "python-pyev")
12309 (version "0.9.0")
12310 (source
12311 (origin
12312 (method url-fetch)
12313 (uri (pypi-uri "pyev" version))
12314 (sha256
12315 (base32
12316 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12317 (build-system python-build-system)
12318 (arguments
12319 `(#:tests? #f ; no test suite
12320 #:phases
12321 (modify-phases %standard-phases
12322 (add-after 'unpack 'patch
12323 (lambda* (#:key inputs #:allow-other-keys)
12324 (let ((libev (string-append (assoc-ref inputs "libev")
12325 "/lib/libev.so.4")))
12326 (substitute* "setup.py"
12327 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12328 (string-append "libev_dll_name = \"" libev "\"")))))))))
12329 (inputs
12330 `(("libev" ,libev)))
12331 (home-page "http://pythonhosted.org/pyev/")
12332 (synopsis "Python libev interface")
12333 (description "Pyev provides a Python interface to libev.")
12334 (license license:gpl3)))
12335
12336 (define-public python2-pyev
12337 (package-with-python2 python-pyev))
12338
12339 (define-public python-imagesize
12340 (package
12341 (name "python-imagesize")
12342 (version "1.2.0")
12343 (source
12344 (origin
12345 (method url-fetch)
12346 (uri (pypi-uri "imagesize" version))
12347 (sha256
12348 (base32
12349 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
12350 (build-system python-build-system)
12351 (home-page "https://github.com/shibukawa/imagesize_py")
12352 (synopsis "Gets image size of files in various formats in Python")
12353 (description
12354 "This package allows determination of image size from
12355 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12356 (license license:expat)))
12357
12358 (define-public python2-imagesize
12359 (package-with-python2 python-imagesize))
12360
12361 (define-public python-termstyle
12362 (package
12363 (name "python-termstyle")
12364 (version "0.1.11")
12365 (source
12366 (origin
12367 (method url-fetch)
12368 (uri (pypi-uri "termstyle" version))
12369 (sha256
12370 (base32
12371 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12372 (build-system python-build-system)
12373 (arguments
12374 '(#:phases
12375 (modify-phases %standard-phases
12376 (replace 'check
12377 (lambda _
12378 (invoke "python" "test3.py"))))))
12379 (home-page "https://github.com/gfxmonk/termstyle")
12380 (synopsis "Console text coloring for Python")
12381 (description "This package provides console text coloring for Python.")
12382 (license license:bsd-3)))
12383
12384 (define-public python-argcomplete
12385 (package
12386 (name "python-argcomplete")
12387 (version "1.10.3")
12388 (source
12389 (origin
12390 (method url-fetch)
12391 (uri (pypi-uri "argcomplete" version))
12392 (sha256
12393 (base32
12394 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
12395 (build-system python-build-system)
12396 (arguments
12397 `(#:phases
12398 (modify-phases %standard-phases
12399 (add-after 'unpack 'embed-tool-references
12400 (lambda _
12401 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12402 ((" grep")
12403 (string-append " " (which "grep")))
12404 ((" egrep")
12405 (string-append " " (which "egrep")))
12406 (("elif which")
12407 (string-append "elif " (which "which")))
12408 (("\\$\\(which")
12409 (string-append "$(" (which "which"))))
12410 #t)))))
12411 (inputs
12412 `(("grep" ,grep)
12413 ("which" ,which)))
12414 (native-inputs
12415 `(("python-coverage" ,python-coverage)
12416 ("python-flake8" ,python-flake8)
12417 ("python-pexpect" ,python-pexpect)
12418 ("python-wheel" ,python-wheel)
12419 ("tcsh" ,tcsh)
12420 ("fish" ,fish)
12421 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
12422 (home-page "https://github.com/kislyuk/argcomplete")
12423 (synopsis "Shell tab completion for Python argparse")
12424 (description "argcomplete provides extensible command line tab completion
12425 of arguments and options for Python scripts using @code{argparse}. It's
12426 particularly useful for programs with many options or sub-parsers that can
12427 dynamically suggest completions; for example, when browsing resources over the
12428 network.")
12429 (license license:asl2.0)))
12430
12431 (define-public python2-argcomplete
12432 (package-with-python2 python-argcomplete))
12433
12434 (define-public python-xopen
12435 (package
12436 (name "python-xopen")
12437 (version "0.5.0")
12438 (source
12439 (origin
12440 (method url-fetch)
12441 (uri (pypi-uri "xopen" version))
12442 (sha256
12443 (base32
12444 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
12445 (build-system python-build-system)
12446 (propagated-inputs
12447 `(("python-setuptools-scm" ,python-setuptools-scm)))
12448 (home-page "https://github.com/marcelm/xopen/")
12449 (synopsis "Open compressed files transparently")
12450 (description "This module provides an @code{xopen} function that works like
12451 Python's built-in @code{open} function, but can also deal with compressed files.
12452 Supported compression formats are gzip, bzip2 and, xz, and are automatically
12453 recognized by their file extensions. The focus is on being as efficient as
12454 possible on all supported Python versions.")
12455 (license license:expat)))
12456
12457 (define-public python2-xopen
12458 (let ((base (package-with-python2
12459 (strip-python2-variant python-xopen))))
12460 (package
12461 (inherit base)
12462 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12463 ,@(package-propagated-inputs base))))))
12464
12465 (define-public python-cheetah
12466 (package
12467 (name "python-cheetah")
12468 (version "3.1.0")
12469 (source
12470 (origin
12471 (method url-fetch)
12472 (uri (pypi-uri "Cheetah3" version))
12473 (sha256
12474 (base32
12475 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12476 (build-system python-build-system)
12477 (arguments
12478 `(#:modules ((guix build utils)
12479 (guix build python-build-system)
12480 (ice-9 ftw)
12481 (srfi srfi-1)
12482 (srfi srfi-26))
12483 #:phases (modify-phases %standard-phases
12484 (add-after 'unpack 'use-absolute-python
12485 (lambda _
12486 (substitute* "Cheetah/CheetahWrapper.py"
12487 (("#!/usr/bin/env python")
12488 (string-append "#!" (which "python"))))
12489 #t))
12490 (replace 'check
12491 (lambda _
12492 (let ((cwd (getcwd)))
12493 (setenv "PYTHONPATH"
12494 (string-append
12495 cwd "/build/"
12496 (find (cut string-prefix? "lib" <>)
12497 (scandir (string-append cwd "/build")))
12498 ":" (getenv "PYTHONPATH")))
12499 (setenv "PATH"
12500 (string-append (getenv "PATH")
12501 ":" cwd "/bin"))
12502 (setenv "TMPDIR" "/tmp")
12503
12504 (substitute* "Cheetah/Tests/Test.py"
12505 (("unittest.TextTestRunner\\(\\)")
12506 "unittest.TextTestRunner(verbosity=2)"))
12507
12508 (invoke "python" "Cheetah/Tests/Test.py")))))))
12509 (propagated-inputs
12510 `(("python-markdown" ,python-markdown))) ;optional
12511 (home-page "http://cheetahtemplate.org/")
12512 (synopsis "Template engine")
12513 (description "Cheetah is a text-based template engine and Python code
12514 generator.
12515
12516 Cheetah can be used as a standalone templating utility or referenced as
12517 a library from other Python applications. It has many potential uses,
12518 but web developers looking for a viable alternative to ASP, JSP, PHP and
12519 PSP are expected to be its principle user group.
12520
12521 Features:
12522 @enumerate
12523 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12524 text-based format.
12525 @item Cleanly separates content, graphic design, and program code.
12526 @item Blends the power and flexibility of Python with a simple template language
12527 that non-programmers can understand.
12528 @item Gives template writers full access to any Python data structure, module,
12529 function, object, or method in their templates.
12530 @item Makes code reuse easy by providing an object-orientated interface to
12531 templates that is accessible from Python code or other Cheetah templates.
12532 One template can subclass another and selectively reimplement sections of it.
12533 @item Provides a simple, yet powerful, caching mechanism that can dramatically
12534 improve the performance of a dynamic website.
12535 @item Compiles templates into optimized, yet readable, Python code.
12536 @end enumerate")
12537 (license (license:x11-style "file://LICENSE"))))
12538
12539 (define-public python2-cheetah
12540 (package-with-python2 python-cheetah))
12541
12542 (define-public python-dulwich
12543 (package
12544 (name "python-dulwich")
12545 (version "0.18.6")
12546 (source
12547 (origin
12548 (method url-fetch)
12549 (uri (list (string-append "https://www.dulwich.io/releases/"
12550 "dulwich-" version ".tar.gz")
12551 (pypi-uri "dulwich" version)))
12552 (sha256
12553 (base32
12554 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12555 (build-system python-build-system)
12556 (arguments
12557 `(#:phases
12558 (modify-phases %standard-phases
12559 (add-before 'check 'fix-tests
12560 (lambda* (#:key inputs #:allow-other-keys)
12561 ;; The tests use Popen with a custom environment which doesn't
12562 ;; include PATH.
12563 (substitute* "dulwich/tests/compat/utils.py"
12564 (("'git'") (string-append "'"
12565 (which "git")
12566 "'")))
12567 (substitute* '("dulwich/tests/test_repository.py"
12568 "dulwich/tests/test_hooks.py")
12569 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12570 (setenv "TEST_RUNNER" "unittest")
12571 (setenv "PYTHONHASHSEED" "random")
12572 #t)))))
12573 (propagated-inputs
12574 `(("python-fastimport" ,python-fastimport)))
12575 (native-inputs
12576 `(("python-mock" ,python-mock)
12577 ("python-geventhttpclient" ,python-geventhttpclient)
12578 ("git" ,git)))
12579 (home-page "https://www.dulwich.io/")
12580 (synopsis "Git implementation in Python")
12581 (description "Dulwich is an implementation of the Git file formats and
12582 protocols written in pure Python.")
12583 ;; Can be used with either license.
12584 (license (list license:asl2.0 license:gpl2+))))
12585
12586 (define-public python2-dulwich
12587 (package-with-python2 python-dulwich))
12588
12589 (define-public python-pbkdf2
12590 (package
12591 (name "python-pbkdf2")
12592 (version "1.3")
12593 (source
12594 (origin
12595 (method url-fetch)
12596 (uri (pypi-uri "pbkdf2" version))
12597 (sha256
12598 (base32
12599 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12600 (build-system python-build-system)
12601 (arguments
12602 '(#:phases
12603 (modify-phases %standard-phases
12604 (replace 'check
12605 (lambda _
12606 (setenv "PYTHONPATH"
12607 (string-append (getcwd) "/build/lib:"
12608 (getenv "PYTHONPATH")))
12609 (invoke "python" "test/test_pbkdf2.py"))))))
12610 (propagated-inputs
12611 `(("python-pycrypto" ,python-pycrypto))) ; optional
12612 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12613 (synopsis "Password-based key derivation")
12614 (description "This module implements the password-based key derivation
12615 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12616
12617 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12618 is part of the RSA Public Key Cryptography Standards series. The provided
12619 implementation takes a password or a passphrase and a salt value (and
12620 optionally a iteration count, a digest module, and a MAC module) and provides
12621 a file-like object from which an arbitrarly-sized key can be read.")
12622 (license license:expat)))
12623
12624 (define-public python2-pbkdf2
12625 (package-with-python2 python-pbkdf2))
12626
12627 (define-public python-qrcode
12628 (package
12629 (name "python-qrcode")
12630 (version "6.1")
12631 (source
12632 (origin
12633 (method url-fetch)
12634 (uri (pypi-uri "qrcode" version))
12635 (sha256
12636 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12637 (build-system python-build-system)
12638 (arguments
12639 ;; FIXME: Tests require packaging 'pymaging'.
12640 '(#:tests? #f))
12641 (propagated-inputs
12642 `(("python-lxml" ,python-lxml) ; for SVG output
12643 ("python-pillow" ,python-pillow) ; for PNG output
12644 ("python-six" ,python-six)))
12645 (home-page "https://github.com/lincolnloop/python-qrcode")
12646 (synopsis "QR Code image generator")
12647 (description "This package provides a pure Python QR Code generator
12648 module. It uses the Python Imaging Library (PIL) to allow for the generation
12649 of QR Codes.
12650
12651 In addition this package provides a command line tool to generate QR codes and
12652 either write these QR codes to a file or do the output as ascii art at the
12653 console.")
12654 (license license:bsd-3)))
12655
12656 (define-public python2-qrcode
12657 (package-with-python2 python-qrcode))
12658
12659 (define-public python-rst2ansi
12660 (package
12661 (name "python-rst2ansi")
12662 (version "0.1.5")
12663 (source
12664 (origin
12665 (method url-fetch)
12666 (uri (pypi-uri "rst2ansi" version))
12667 (sha256
12668 (base32
12669 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12670 (build-system python-build-system)
12671 (propagated-inputs
12672 `(("python-docutils" ,python-docutils)))
12673 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12674 (synopsis "Convert RST to ANSI-decorated console output")
12675 (description
12676 "Python module dedicated to rendering RST (reStructuredText) documents
12677 to ansi-escaped strings suitable for display in a terminal.")
12678 (license license:expat)))
12679
12680 (define-public python-ansi2html
12681 (package
12682 (name "python-ansi2html")
12683 (version "1.2.0")
12684 (source
12685 (origin
12686 (method url-fetch)
12687 (uri (pypi-uri "ansi2html" version))
12688 (sha256
12689 (base32
12690 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12691 (build-system python-build-system)
12692 (native-inputs
12693 `(("python-mock" ,python-mock)
12694 ("python-nose" ,python-nose)))
12695 (propagated-inputs
12696 `(("python-six" ,python-six)))
12697 (home-page "https://github.com/ralphbean/ansi2html")
12698 (synopsis "Convert ANSI-decorated console output to HTML")
12699 (description
12700 "@command{ansi2html} is a Python library and command line utility for
12701 convering text with ANSI color codes to HTML or LaTeX.")
12702 (license license:gpl3+)))
12703
12704 (define-public python2-ansi2html
12705 (package-with-python2 python-ansi2html))
12706
12707 (define-public python-ddt
12708 (package
12709 (name "python-ddt")
12710 (version "1.1.3")
12711 (source
12712 (origin
12713 (method url-fetch)
12714 (uri (pypi-uri "ddt" version))
12715 (sha256
12716 (base32
12717 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12718 (build-system python-build-system)
12719 (native-inputs
12720 `(("python-mock" ,python-mock)
12721 ("python-nose" ,python-nose)))
12722 (propagated-inputs
12723 `(("python-six" ,python-six)
12724 ("python-pyyaml" ,python-pyyaml)))
12725 (home-page "https://github.com/txels/ddt")
12726 (synopsis "Data-Driven Tests")
12727 (description
12728 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12729 running it with different test data, and make it appear as multiple test
12730 cases.")
12731 (license license:expat)))
12732
12733 (define-public python2-ddt
12734 (package-with-python2 python-ddt))
12735
12736 (define-public python-pycountry
12737 (package
12738 (name "python-pycountry")
12739 (version "18.5.26")
12740 (source
12741 (origin
12742 (method url-fetch)
12743 (uri (pypi-uri "pycountry" version))
12744 (sha256
12745 (base32
12746 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12747 (build-system python-build-system)
12748 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12749 (synopsis "ISO databases for languages, countries, currencies, etc.")
12750 (description
12751 "@code{pycountry} provides the ISO databases for the standards:
12752 @enumerate
12753 @item 639-3 (Languages)
12754 @item 3166 (Countries)
12755 @item 3166-3 (Deleted Countries)
12756 @item 3166-2 (Subdivisions of countries)
12757 @item 4217 (Currencies)
12758 @item 15924 (Scripts)
12759 @end enumerate
12760 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12761 through a Python API.")
12762 (license license:lgpl2.1+)))
12763
12764 (define-public python2-pycountry
12765 (package-with-python2 python-pycountry))
12766
12767 (define-public python-pycosat
12768 (package
12769 (name "python-pycosat")
12770 (version "0.6.1")
12771 (source
12772 (origin
12773 (method url-fetch)
12774 (uri (pypi-uri "pycosat" version))
12775 (sha256
12776 (base32
12777 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12778 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12779 (build-system python-build-system)
12780 (home-page "https://github.com/ContinuumIO/pycosat")
12781 (synopsis "Bindings to picosat (a SAT solver)")
12782 (description
12783 "This package provides efficient Python bindings to @code{picosat} on
12784 the C level. When importing pycosat, the @code{picosat} solver becomes part
12785 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12786 Problem} (SAT) solver.")
12787 (license license:expat)))
12788
12789 (define-public python2-pycosat
12790 (package-with-python2 python-pycosat))
12791
12792 (define-public python2-ruamel.ordereddict
12793 (package
12794 (name "python2-ruamel.ordereddict")
12795 (version "0.4.9")
12796 (source
12797 (origin
12798 (method url-fetch)
12799 (uri (pypi-uri "ruamel.ordereddict" version))
12800 (sha256
12801 (base32
12802 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12803 (build-system python-build-system)
12804 (arguments
12805 `(#:python ,python-2
12806 #:phases
12807 (modify-phases %standard-phases
12808 (delete 'check)
12809 (add-after 'install 'check
12810 (lambda* (#:key inputs outputs #:allow-other-keys)
12811 (add-installed-pythonpath inputs outputs)
12812 (invoke "python" "test/testordereddict.py"))))))
12813 (home-page "https://bitbucket.org/ruamel/ordereddict")
12814 (synopsis "Version of dict that keeps keys in insertion order")
12815 (description
12816 "This is an implementation of an ordered dictionary with @dfn{Key
12817 Insertion Order} (KIO: updates of values do not affect the position of the
12818 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12819 removed and put at the back). The standard library module @code{OrderedDict},
12820 implemented later, implements a subset of @code{ordereddict} functionality.
12821 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12822 Order} (KSO, no sorting function can be specified, but a transform can be
12823 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12824 (license license:expat)))
12825
12826 (define-public python-pypeg2
12827 (package
12828 (name "python-pypeg2")
12829 (version "2.15.2")
12830 (source
12831 (origin
12832 (method url-fetch)
12833 (uri (pypi-uri "pyPEG2" version))
12834 (sha256
12835 (base32
12836 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12837 (build-system python-build-system)
12838 (propagated-inputs `(("python-lxml" ,python-lxml)))
12839 (arguments
12840 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12841 '(#:tests? #f))
12842 (home-page "https://fdik.org/pyPEG/")
12843 (synopsis "Parsering Expression Grammars in Python")
12844 (description "PyPEG is an intrinsic parser interpreter framework for
12845 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12846 parse many formal languages.")
12847 (license license:gpl2)))
12848
12849 (define-public python-incremental
12850 (package
12851 (name "python-incremental")
12852 (version "17.5.0")
12853 (source
12854 (origin
12855 (method url-fetch)
12856 (uri (pypi-uri "incremental" version))
12857 (sha256
12858 (base32
12859 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12860 (build-system python-build-system)
12861 (home-page "https://github.com/hawkowl/incremental")
12862 (synopsis "Library for versioning Python projects")
12863 (description "Incremental is a small library that versions your Python
12864 projects.")
12865 (license license:expat)))
12866
12867 (define-public python2-incremental
12868 (package-with-python2 python-incremental))
12869
12870 (define-public python-invoke
12871 (package
12872 (name "python-invoke")
12873 (home-page "https://www.pyinvoke.org/")
12874 (version "1.3.0")
12875 (source (origin
12876 (method url-fetch)
12877 (uri (pypi-uri "invoke" version))
12878 (sha256
12879 (base32
12880 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12881 (build-system python-build-system)
12882 (arguments
12883 ;; XXX: Requires many dependencies that are not yet in Guix.
12884 `(#:tests? #f))
12885 (synopsis "Pythonic task execution")
12886 (description
12887 "Invoke is a Python task execution tool and library, drawing inspiration
12888 from various sources to arrive at a powerful and clean feature set. It is
12889 evolved from the Fabric project, but focuses on local and abstract concerns
12890 instead of servers and network commands.")
12891 (license license:bsd-3)))
12892
12893 (define-public python2-invoke
12894 (package-with-python2 python-invoke))
12895
12896 (define-public python-automat
12897 (package
12898 (name "python-automat")
12899 (version "0.7.0")
12900 (source (origin
12901 (method url-fetch)
12902 (uri (pypi-uri "Automat" version))
12903 (sha256
12904 (base32
12905 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12906 (build-system python-build-system)
12907 ;; We disable the tests because they require python-twisted, while
12908 ;; python-twisted depends on python-automat. Twisted is optional, but the
12909 ;; tests fail if it is not available. Also see
12910 ;; <https://github.com/glyph/automat/issues/71>.
12911 (arguments '(#:tests? #f))
12912 (native-inputs
12913 `(("python-m2r" ,python-m2r)
12914 ("python-setuptools-scm" ,python-setuptools-scm)
12915 ("python-graphviz" ,python-graphviz)))
12916 (propagated-inputs
12917 `(("python-six" ,python-six)
12918 ("python-attrs" ,python-attrs)))
12919 (home-page "https://github.com/glyph/Automat")
12920 (synopsis "Self-service finite-state machines")
12921 (description "Automat is a library for concise, idiomatic Python
12922 expression of finite-state automata (particularly deterministic finite-state
12923 transducers).")
12924 (license license:expat)))
12925
12926 (define-public python2-automat
12927 (package-with-python2 python-automat))
12928
12929 (define-public python-m2r
12930 (package
12931 (name "python-m2r")
12932 (version "0.2.1")
12933 (source (origin
12934 (method url-fetch)
12935 (uri (pypi-uri "m2r" version))
12936 (sha256
12937 (base32
12938 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12939 (build-system python-build-system)
12940 (propagated-inputs
12941 `(("python-docutils" ,python-docutils)
12942 ("python-mistune" ,python-mistune)))
12943 (native-inputs
12944 `(("python-pygments" ,python-pygments)
12945 ("python-mock" ,python-mock)))
12946 (home-page "https://github.com/miyakogi/m2r")
12947 (synopsis "Markdown to reStructuredText converter")
12948 (description "M2R converts a markdown file including reST markups to valid
12949 reST format.")
12950 (license license:expat)))
12951
12952 (define-public python2-m2r
12953 (package-with-python2 python-m2r))
12954
12955 (define-public python-constantly
12956 (package
12957 (name "python-constantly")
12958 (version "15.1.0")
12959 (source (origin
12960 (method url-fetch)
12961 (uri (pypi-uri "constantly" version))
12962 (sha256
12963 (base32
12964 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12965 (build-system python-build-system)
12966 (home-page "https://github.com/twisted/constantly")
12967 (synopsis "Symbolic constants in Python")
12968 (description "Constantly is a Python library that provides symbolic
12969 constant support. It includes collections and constants with text, numeric,
12970 and bit flag values.")
12971 (license license:expat)))
12972
12973 (define-public python2-constantly
12974 (package-with-python2 python-constantly))
12975
12976 (define-public python-attrs
12977 (package
12978 (name "python-attrs")
12979 (version "19.1.0")
12980 (source (origin
12981 (method url-fetch)
12982 (uri (pypi-uri "attrs" version))
12983 (sha256
12984 (base32
12985 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12986 (build-system python-build-system)
12987 (arguments
12988 `(#:modules ((guix build utils)
12989 (guix build python-build-system)
12990 (ice-9 ftw)
12991 (srfi srfi-1)
12992 (srfi srfi-26))
12993 #:phases (modify-phases %standard-phases
12994 (replace 'check
12995 (lambda _
12996 (let ((cwd (getcwd)))
12997 (setenv "PYTHONPATH"
12998 (string-append
12999 cwd "/build/"
13000 (find (cut string-prefix? "lib" <>)
13001 (scandir (string-append cwd "/build")))
13002 ":"
13003 (getenv "PYTHONPATH")))
13004 (invoke "python" "-m" "pytest")))))))
13005 (native-inputs
13006 `(("python-coverage" ,python-coverage)
13007 ("python-hypothesis" ,python-hypothesis)
13008 ("python-pympler" ,python-pympler)
13009 ("python-pytest" ,python-pytest)
13010 ("python-six" ,python-six)
13011 ("python-sphinx" ,python-sphinx)
13012 ("python-zope-interface" ,python-zope-interface)))
13013 (home-page "https://github.com/python-attrs/attrs/")
13014 (synopsis "Attributes without boilerplate")
13015 (description "@code{attrs} is a Python package with class decorators that
13016 ease the chores of implementing the most common attribute-related object
13017 protocols.")
13018 (license license:expat)))
13019
13020 (define-public python2-attrs
13021 (package-with-python2 python-attrs))
13022
13023 (define-public python-attrs-bootstrap
13024 (package
13025 (inherit python-attrs)
13026 (name "python-attrs-bootstrap")
13027 (native-inputs `())
13028 (arguments `(#:tests? #f))))
13029
13030 (define-public python2-attrs-bootstrap
13031 (package-with-python2 python-attrs-bootstrap))
13032
13033 (define-public python2-cliapp
13034 (package
13035 (name "python2-cliapp")
13036 (version "1.20180812.1")
13037 (source
13038 (origin
13039 (method url-fetch)
13040 (uri (string-append
13041 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13042 version ".tar.gz"))
13043 (sha256
13044 (base32
13045 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
13046 (build-system python-build-system)
13047 (arguments
13048 `(#:python ,python-2
13049 #:phases
13050 (modify-phases %standard-phases
13051 ;; check phase needs to be run before the build phase. If not,
13052 ;; coverage-test-runner looks for tests for the built source files,
13053 ;; and fails.
13054 (delete 'check)
13055 (add-before 'build 'check
13056 (lambda _
13057 ;; Disable python3 tests
13058 (substitute* "check"
13059 (("python3") "# python3"))
13060 (invoke "./check"))))))
13061 (native-inputs
13062 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13063 ("python2-pep8" ,python2-pep8)))
13064 (propagated-inputs
13065 `(("python2-pyaml" ,python2-pyaml)))
13066 (home-page "https://liw.fi/cliapp/")
13067 (synopsis "Python framework for command line programs")
13068 (description "@code{python2-cliapp} is a python framework for
13069 command line programs. It contains the typical stuff such programs
13070 need to do, such as parsing the command line for options, and
13071 iterating over input files.")
13072 (license license:gpl2+)))
13073
13074 (define-public python2-ttystatus
13075 (package
13076 (name "python2-ttystatus")
13077 (version "0.36")
13078 (source
13079 (origin
13080 (method url-fetch)
13081 (uri (string-append
13082 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13083 version ".tar.gz"))
13084 (sha256
13085 (base32
13086 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
13087 (build-system python-build-system)
13088 (native-inputs
13089 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13090 ("python2-pep8" ,python2-pep8)))
13091 (arguments
13092 `(#:python ,python-2
13093 #:phases
13094 (modify-phases %standard-phases
13095 ;; check phase needs to be run before the build phase. If not,
13096 ;; coverage-test-runner looks for tests for the built source files,
13097 ;; and fails.
13098 (delete 'check)
13099 (add-before 'build 'check
13100 (lambda _ (invoke "make" "check"))))))
13101 (home-page "https://liw.fi/ttystatus/")
13102 (synopsis "Python library for showing progress reporting and
13103 status updates on terminals")
13104 (description "@code{python2-ttystatus} is a python library for
13105 showing progress reporting and status updates on terminals, for
13106 command line programs. Output is automatically adapted to the width
13107 of the terminal: truncated if it does not fit, and resized if the
13108 terminal size changes.")
13109 (license license:gpl3+)))
13110
13111 (define-public python2-tracing
13112 (package
13113 (name "python2-tracing")
13114 (version "0.10")
13115 (source
13116 (origin
13117 (method url-fetch)
13118 (uri (string-append
13119 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13120 version ".tar.gz"))
13121 (sha256
13122 (base32
13123 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13124 (build-system python-build-system)
13125 (arguments
13126 `(#:python ,python-2))
13127 (home-page "https://liw.fi/tracing/")
13128 (synopsis "Python debug logging helper")
13129 (description "@code{python2-tracing} is a python library for
13130 logging debug messages. It provides a way to turn debugging messages
13131 on and off, based on the filename they occur in. It is much faster
13132 than using @code{logging.Filter} to accomplish the same thing, which
13133 matters when code is run in production mode. The actual logging still
13134 happens using the @code{logging} library.")
13135 (license license:gpl3+)))
13136
13137 (define-public python2-larch
13138 (package
13139 (name "python2-larch")
13140 (version "1.20151025")
13141 (source
13142 (origin
13143 (method url-fetch)
13144 (uri (string-append
13145 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13146 version ".tar.gz"))
13147 (patches (search-patches
13148 "python2-larch-coverage-4.0a6-compatibility.patch"))
13149 (sha256
13150 (base32
13151 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13152 (build-system python-build-system)
13153 (arguments
13154 `(#:python ,python-2
13155 #:phases
13156 (modify-phases %standard-phases
13157 ;; check phase needs to be run before the build phase. If not,
13158 ;; coverage-test-runner looks for tests for the built source files,
13159 ;; and fails.
13160 (delete 'check)
13161 (add-before 'build 'check
13162 (lambda _ (invoke "make" "check"))))))
13163 (native-inputs
13164 `(("cmdtest" ,cmdtest)
13165 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13166 (propagated-inputs
13167 `(("python2-tracing" ,python2-tracing)))
13168 (home-page "https://liw.fi/larch/")
13169 (synopsis "Python copy-on-write B-tree library")
13170 (description "@code{python2-larch} is an implementation of
13171 particular kind of B-tree, based on research by Ohad Rodeh. See
13172 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13173 on the data structure.
13174
13175 The distinctive feature of this B-tree is that a node is never
13176 (conceptually) modified. Instead, all updates are done by
13177 copy-on-write. This makes it easy to clone a tree, and modify only the
13178 clone, while other processes access the original tree.")
13179 (license license:gpl3+)))
13180
13181 (define-public python-astroid
13182 (package
13183 (name "python-astroid")
13184 (version "2.3.3")
13185 (source
13186 (origin
13187 (method url-fetch)
13188 (uri (pypi-uri "astroid" version))
13189 (sha256
13190 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
13191 (build-system python-build-system)
13192 (propagated-inputs
13193 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13194 ("python-six" ,python-six)
13195 ("python-typed-ast" ,python-typed-ast)
13196 ("python-wrapt" ,python-wrapt)))
13197 (native-inputs
13198 `(("python-dateutil" ,python-dateutil)
13199 ("python-nose" ,python-nose)
13200 ("python-pytest" ,python-pytest)
13201 ("python-pytest-runner" ,python-pytest-runner)))
13202 (arguments
13203 `(#:phases
13204 (modify-phases %standard-phases
13205 (add-after 'unpack 'remove-spurious-test
13206 (lambda _
13207 ;; This can be removed after upgrading from python-3.7
13208 ;; https://github.com/PyCQA/astroid/issues/593
13209 ;; https://bugs.python.org/issue34056
13210 (delete-file "astroid/tests/unittest_modutils.py")
13211 #t))
13212 (replace 'check
13213 (lambda _
13214 (invoke "pytest" "astroid"))))))
13215 (home-page "https://github.com/PyCQA/astroid")
13216 (synopsis "Common base representation of python source code for pylint and
13217 other projects")
13218 (description "@code{python-astroid} provides a common base representation
13219 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13220
13221 It provides a compatible representation which comes from the _ast module. It
13222 rebuilds the tree generated by the builtin _ast module by recursively walking
13223 down the AST and building an extended ast. The new node classes have
13224 additional methods and attributes for different usages. They include some
13225 support for static inference and local name scopes. Furthermore, astroid
13226 builds partial trees by inspecting living objects.")
13227 (license license:lgpl2.1+)
13228 (properties `((python2-variant . ,(delay python2-astroid))))))
13229
13230 (define-public python2-astroid
13231 (let ((base (package-with-python2
13232 (strip-python2-variant python-astroid))))
13233 (package (inherit base)
13234 ;; Version 2.x removes python2 support.
13235 (version "1.6.5")
13236 (source
13237 (origin
13238 (method url-fetch)
13239 (uri (pypi-uri "astroid" version))
13240 (sha256
13241 (base32
13242 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13243 (arguments
13244 (substitute-keyword-arguments (package-arguments base)
13245 ((#:phases phases)
13246 `(modify-phases ,phases
13247 (add-after 'unpack 'remove-spurious-test
13248 (lambda _
13249 ;; https://github.com/PyCQA/astroid/issues/276
13250 (delete-file "astroid/tests/unittest_brain.py")
13251 #t))
13252 (replace 'check
13253 (lambda _
13254 (invoke"python" "-m" "unittest" "discover"
13255 "-p" "unittest*.py")))))))
13256 (native-inputs `())
13257 (propagated-inputs
13258 `(("python2-backports-functools-lru-cache"
13259 ,python2-backports-functools-lru-cache)
13260 ("python2-enum34" ,python2-enum34)
13261 ("python2-singledispatch" ,python2-singledispatch)
13262 ,@(alist-delete "python-typed-ast"
13263 (package-propagated-inputs base)))))))
13264
13265 (define-public python-isort
13266 (package
13267 (name "python-isort")
13268 (version "4.3.4")
13269 (source
13270 (origin
13271 (method git-fetch)
13272 (uri (git-reference
13273 ;; Tests pass only from the Github sources
13274 (url "https://github.com/timothycrosley/isort")
13275 (commit version)))
13276 (file-name (git-file-name name version))
13277 (sha256
13278 (base32
13279 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
13280 (build-system python-build-system)
13281 (native-inputs
13282 `(("python-mock" ,python-mock)
13283 ("python-pytest" ,python-pytest)))
13284 (home-page "https://github.com/timothycrosley/isort")
13285 (synopsis "Python utility/library to sort python imports")
13286 (description "@code{python-isort} is a python utility/library to sort
13287 imports alphabetically, and automatically separated into sections. It
13288 provides a command line utility, a python library and plugins for various
13289 editors.")
13290 (license license:expat)
13291 (properties `((python2-variant . ,(delay python2-isort))))))
13292
13293 (define-public python2-isort
13294 (let ((base (package-with-python2
13295 (strip-python2-variant python-isort))))
13296 (package (inherit base)
13297 (native-inputs
13298 `(("python2-futures" ,python2-futures)
13299 ,@(package-native-inputs base))))))
13300
13301 (define-public python2-backports-functools-lru-cache
13302 (package
13303 (name "python2-backports-functools-lru-cache")
13304 (version "1.5")
13305 (source
13306 (origin
13307 (method url-fetch)
13308 ;; only the pypi tarballs contain the necessary metadata
13309 (uri (pypi-uri "backports.functools_lru_cache" version))
13310 (sha256
13311 (base32
13312 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
13313 (build-system python-build-system)
13314 (native-inputs
13315 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13316 (arguments
13317 `(#:python ,python-2))
13318 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13319 (synopsis "Backport of functools.lru_cache from Python 3.3")
13320 (description "@code{python2-backports-functools-lru-cache} is a backport
13321 of @code{functools.lru_cache} from python 3.3.")
13322 (license license:expat)))
13323
13324 (define-public python-configparser
13325 (package
13326 (name "python-configparser")
13327 (version "3.7.1")
13328 (source
13329 (origin
13330 (method url-fetch)
13331 (uri (pypi-uri "configparser" version))
13332 (sha256
13333 (base32
13334 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
13335 (build-system python-build-system)
13336 (home-page "https://github.com/jaraco/configparser/")
13337 (synopsis "Backport of configparser from python 3.5")
13338 (description "@code{python-configparser} is a backport of
13339 @code{configparser} from Python 3.5 so that it can be used directly
13340 in other versions.")
13341 (license license:expat)))
13342
13343 (define-public python2-configparser
13344 (package-with-python2 python-configparser))
13345
13346 (define-public python-mando
13347 (package
13348 (name "python-mando")
13349 (version "0.6.4")
13350 (source (origin
13351 (method url-fetch)
13352 (uri (pypi-uri "mando" version))
13353 (sha256
13354 (base32
13355 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13356 (build-system python-build-system)
13357 (propagated-inputs
13358 `(("python-rst2ansi" ,python-rst2ansi)
13359 ("python-six" ,python-six)))
13360 (native-inputs
13361 `(("python-pytest" ,python-pytest)))
13362 (home-page "https://mando.readthedocs.org/")
13363 (synopsis
13364 "Wrapper around argparse, allowing creation of complete CLI applications")
13365 (description
13366 "This package is a wrapper around argparse, allowing you to write complete CLI
13367 applications in seconds while maintaining all the flexibility.")
13368 (license license:expat)))
13369
13370 (define-public python2-mando
13371 (package-with-python2 python-mando))
13372
13373 (define-public python2-argparse
13374 (package
13375 (name "python2-argparse")
13376 (version "1.4.0")
13377 (source
13378 (origin
13379 (method url-fetch)
13380 (uri (pypi-uri "argparse" version))
13381 (sha256
13382 (base32
13383 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13384 (build-system python-build-system)
13385 (arguments
13386 `(#:python ,python-2))
13387 (home-page "https://github.com/ThomasWaldmann/argparse/")
13388 (synopsis "Python command-line parsing library")
13389 (description
13390 "This package is mostly for people who want to have @code{argparse} on
13391 older Pythons because it was not part of the standard library back then.")
13392 (license license:psfl)))
13393
13394 (define-public python-fudge
13395 (package
13396 (name "python-fudge")
13397 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13398 ;; package, which is currently the only use of this package.
13399 (version "0.9.6")
13400 (source
13401 (origin
13402 (method url-fetch)
13403 (uri (pypi-uri "fudge" version))
13404 (sha256
13405 (base32
13406 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13407 (build-system python-build-system)
13408 (arguments
13409 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13410 (home-page "https://github.com/fudge-py/fudge")
13411 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13412 (description
13413 "Fudge is a Python module for using fake objects (mocks and stubs) to
13414 test real ones.
13415
13416 In readable Python code, you declare the methods available on your fake object
13417 and how they should be called. Then you inject that into your application and
13418 start testing. This declarative approach means you don’t have to record and
13419 playback actions and you don’t have to inspect your fakes after running code.
13420 If the fake object was used incorrectly then you’ll see an informative
13421 exception message with a traceback that points to the culprit.")
13422 (license license:expat)))
13423
13424 (define-public python2-fudge
13425 (package-with-python2 python-fudge))
13426
13427 (define-public python-mwclient
13428 (package
13429 (name "python-mwclient")
13430 (version "0.10.0")
13431 (source
13432 (origin
13433 (method git-fetch)
13434 ;; The PyPI version wouldn't contain tests.
13435 (uri (git-reference
13436 (url "https://github.com/mwclient/mwclient")
13437 (commit (string-append "v" version))))
13438 (file-name (git-file-name name version))
13439 (sha256
13440 (base32
13441 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
13442 (build-system python-build-system)
13443 (propagated-inputs
13444 `(("python-requests-oauthlib" ,python-requests-oauthlib)
13445 ("python-six" ,python-six)))
13446 (native-inputs
13447 `(("python-mock" ,python-mock)
13448 ("python-pytest" ,python-pytest)
13449 ("python-pytest-cov" ,python-pytest-cov)
13450 ("python-pytest-runner" ,python-pytest-runner)
13451 ("python-responses" ,python-responses)))
13452 (home-page "https://github.com/btongminh/mwclient")
13453 (synopsis "MediaWiki API client")
13454 (description "This package provides a MediaWiki API client.")
13455 (license license:expat)))
13456
13457 (define-public python2-mwclient
13458 (package-with-python2 python-mwclient))
13459
13460 (define-public python-utils
13461 (package
13462 (name "python-utils")
13463 (version "2.1.0")
13464 (source (origin
13465 (method url-fetch)
13466 (uri (pypi-uri "python-utils" version))
13467 (sha256
13468 (base32
13469 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13470 (build-system python-build-system)
13471 (native-inputs
13472 `(("pytest-runner" ,python-pytest-runner)
13473 ("pytest" ,python-pytest)
13474 ("six" ,python-six)))
13475 (home-page "https://github.com/WoLpH/python-utils")
13476 (synopsis "Convenient utilities not included with the standard Python install")
13477 (description
13478 "Python Utils is a collection of small Python functions and classes which
13479 make common patterns shorter and easier.")
13480 (license license:bsd-2)))
13481
13482 (define-public python2-utils
13483 (package-with-python2 python-utils))
13484
13485 (define-public python-diff-match-patch
13486 (package
13487 (name "python-diff-match-patch")
13488 (version "20121119")
13489 (source
13490 (origin
13491 (method url-fetch)
13492 (uri (pypi-uri "diff-match-patch" version))
13493 (sha256
13494 (base32
13495 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13496 (build-system python-build-system)
13497 (home-page "https://code.google.com/p/google-diff-match-patch")
13498 (synopsis "Synchronize plain text")
13499 (description "Diff Match and Patch libraries offer robust algorithms to
13500 perform the operations required for synchronizing plain text.")
13501 (license license:asl2.0)))
13502
13503 (define-public python2-diff-match-patch
13504 (package-with-python2 python-diff-match-patch))
13505
13506 (define-public python-dirsync
13507 (package
13508 (name "python-dirsync")
13509 (version "2.2.3")
13510 (source
13511 (origin
13512 (method url-fetch)
13513 (uri (pypi-uri "dirsync" version))
13514 (sha256
13515 (base32
13516 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13517 (build-system python-build-system)
13518 (propagated-inputs
13519 `(("six" ,python-six)))
13520 (home-page "https://bitbucket.org/tkhyn/dirsync")
13521 (synopsis "Advanced directory tree synchronisation tool")
13522 (description "Advanced directory tree synchronisation tool.")
13523 (license license:expat)))
13524
13525 (define-public python2-dirsync
13526 (package-with-python2 python-dirsync))
13527
13528 (define-public python-levenshtein
13529 (package
13530 (name "python-levenshtein")
13531 (version "0.12.0")
13532 (source
13533 (origin
13534 (method url-fetch)
13535 (uri (pypi-uri "python-Levenshtein" version))
13536 (sha256
13537 (base32
13538 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13539 (build-system python-build-system)
13540 (home-page "https://github.com/ztane/python-Levenshtein")
13541 (synopsis "Fast computation of Levenshtein distance and string similarity")
13542 (description
13543 "The Levenshtein Python C extension module contains functions for fast computation of
13544 @enumerate
13545 @item Levenshtein (edit) distance, and edit operations
13546 @item string similarity
13547 @item approximate median strings, and generally string averaging
13548 @item string sequence and set similarity
13549 @end enumerate
13550 It supports both normal and Unicode strings.")
13551 (license license:gpl2+)))
13552
13553 (define-public python2-levenshtein
13554 (package-with-python2 python-levenshtein))
13555
13556 (define-public python-scandir
13557 (package
13558 (name "python-scandir")
13559 (version "1.9.0")
13560 (source
13561 (origin
13562 (method url-fetch)
13563 (uri (pypi-uri "scandir" version))
13564 (sha256
13565 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13566 (build-system python-build-system)
13567 (arguments
13568 `(#:phases (modify-phases %standard-phases
13569 (replace 'check
13570 (lambda _
13571 (invoke "python" "test/run_tests.py"))))))
13572 (home-page "https://github.com/benhoyt/scandir")
13573 (synopsis "Directory iteration function")
13574 (description
13575 "Directory iteration function like os.listdir(), except that instead of
13576 returning a list of bare filenames, it yields DirEntry objects that include
13577 file type and stat information along with the name. Using scandir() increases
13578 the speed of os.walk() by 2-20 times (depending on the platform and file
13579 system) by avoiding unnecessary calls to os.stat() in most cases.
13580
13581 This package is part of the Python standard library since version 3.5.")
13582 (license license:bsd-3)))
13583
13584 (define-public python2-scandir
13585 (package-with-python2 python-scandir))
13586
13587 (define-public python2-stemming
13588 (package
13589 (name "python2-stemming")
13590 (version "1.0.1")
13591 (source
13592 (origin
13593 (method url-fetch)
13594 (uri (pypi-uri "stemming" version))
13595 (sha256
13596 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13597 (build-system python-build-system)
13598 (arguments
13599 `(#:python ,python-2))
13600 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13601 (synopsis "Python implementations of various stemming algorithms")
13602 (description
13603 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13604 stemming algorithms for English. These implementations are straightforward and
13605 efficient, unlike some Python versions of the same algorithms available on the
13606 Web. This package is an extraction of the stemming code included in the Whoosh
13607 search engine.")
13608 (license license:public-domain)))
13609
13610 (define-public python-factory-boy
13611 (package
13612 (name "python-factory-boy")
13613 (version "2.8.1")
13614 (source
13615 (origin
13616 (method url-fetch)
13617 (uri (pypi-uri "factory_boy" version))
13618 (sha256
13619 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13620 (build-system python-build-system)
13621 (arguments
13622 ;; Tests are not included in the tarball.
13623 `(#:tests? #f))
13624 (propagated-inputs
13625 `(("faker" ,python-faker)))
13626 (home-page "https://github.com/benhoyt/scandir")
13627 (synopsis "Versatile test fixtures replacement")
13628 (description
13629 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13630
13631 As a fixtures replacement tool, it aims to replace static, hard to maintain
13632 fixtures with easy-to-use factories for complex object.
13633
13634 Instead of building an exhaustive test setup with every possible combination
13635 of corner cases, factory_boy allows you to use objects customized for the
13636 current test, while only declaring the test-specific fields")
13637 (license license:expat)))
13638
13639 (define-public python2-factory-boy
13640 (package-with-python2 python-factory-boy))
13641
13642 (define-public python-translate-toolkit
13643 (package
13644 (name "python-translate-toolkit")
13645 (version "2.1.0")
13646 (source
13647 (origin
13648 (method url-fetch)
13649 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13650 (sha256
13651 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13652 (build-system python-build-system)
13653 (native-inputs
13654 `(("python-pytest" ,python-pytest)
13655 ("python-sphinx" ,python-sphinx)))
13656 (propagated-inputs
13657 `(("python-babel" ,python-babel)
13658 ("python-beautifulsoup4" ,python-beautifulsoup4)
13659 ("python-chardet" ,python-chardet)
13660 ("python-diff-match-patch" ,python-diff-match-patch)
13661 ("python-levenshtein" ,python-levenshtein)
13662 ("python-lxml" ,python-lxml)
13663 ("python-six" ,python-six)
13664 ("python-vobject" ,python-vobject)
13665 ("python-pyyaml" ,python-pyyaml)))
13666 (arguments
13667 ;; TODO: tests are not run, because they end with
13668 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13669 ;; 'parse_funcs'
13670 ;; during test setup.
13671 `(#:tests? #f))
13672 (home-page "https://toolkit.translatehouse.org")
13673 (synopsis "Tools and API for translation and localization engineering")
13674 (description
13675 "Tools and API for translation and localization engineering. It contains
13676 several utilities, as well as an API for building localization tools.")
13677 (license license:gpl2+)))
13678
13679 (define-public python2-translate-toolkit
13680 (package-with-python2 python-translate-toolkit))
13681
13682 (define-public python-packaging
13683 (package
13684 (name "python-packaging")
13685 (version "20.0")
13686 (source
13687 (origin
13688 (method url-fetch)
13689 (uri (pypi-uri "packaging" version))
13690 ;; XXX: The URL in the patch file is wrong, it should be
13691 ;; <https://github.com/pypa/packaging/pull/256>.
13692 (patches (search-patches "python-packaging-test-arch.patch"))
13693 (sha256
13694 (base32
13695 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13696 (build-system python-build-system)
13697 (arguments
13698 `(#:phases (modify-phases %standard-phases
13699 (replace 'check
13700 (lambda _ (invoke "py.test" "-vv"))))))
13701 (native-inputs
13702 `(("python-pretend" ,python-pretend)
13703 ("python-pytest" ,python-pytest)))
13704 (propagated-inputs
13705 `(("python-pyparsing" ,python-pyparsing)
13706 ("python-six" ,python-six)))
13707 (home-page "https://github.com/pypa/packaging")
13708 (synopsis "Core utilities for Python packages")
13709 (description "Packaging is a Python module for dealing with Python packages.
13710 It offers an interface for working with package versions, names, and dependency
13711 information.")
13712 ;; From 'LICENSE': This software is made available under the terms of
13713 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13714 ;; Contributions to this software is made under the terms of *both* these
13715 ;; licenses.
13716 (license (list license:asl2.0 license:bsd-2))))
13717
13718 (define-public python2-packaging
13719 (package-with-python2 python-packaging))
13720
13721 (define-public python-relatorio
13722 (package
13723 (name "python-relatorio")
13724 (version "0.8.0")
13725 (source
13726 (origin
13727 (method url-fetch)
13728 (uri (pypi-uri "relatorio" version))
13729 (sha256
13730 (base32
13731 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13732 (build-system python-build-system)
13733 (propagated-inputs
13734 `(("python-lxml" ,python-lxml)
13735 ("python-genshi" ,python-genshi)))
13736 (native-inputs
13737 `(("python-magic" ,python-magic)))
13738 (home-page "https://relatorio.tryton.org/")
13739 (synopsis "Templating library able to output ODT and PDF files")
13740 (description "Relatorio is a templating library which provides a way to
13741 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13742 for more filetypes can be easily added by creating plugins for them.")
13743 (license license:gpl3+)))
13744
13745 (define-public python2-relatorio
13746 (package-with-python2 python-relatorio))
13747
13748 (define-public python-radon
13749 (package
13750 (name "python-radon")
13751 (version "4.1.0")
13752 (source
13753 (origin
13754 (method url-fetch)
13755 (uri (pypi-uri "radon" version))
13756 (sha256
13757 (base32
13758 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
13759 (build-system python-build-system)
13760 (arguments
13761 `(#:phases (modify-phases %standard-phases
13762 (replace 'check
13763 (lambda _
13764 (invoke "python" "radon/tests/run.py"))))))
13765 (propagated-inputs
13766 `(("python-colorama" ,python-colorama)
13767 ("python-flake8-polyfill" ,python-flake8-polyfill)
13768 ("python-mando" ,python-mando)))
13769 (native-inputs
13770 `(("python-pytest" ,python-pytest)
13771 ("python-pytest-mock" ,python-pytest-mock)))
13772 (home-page "https://radon.readthedocs.org/")
13773 (synopsis "Code Metrics in Python")
13774 (description "Radon is a Python tool which computes various code metrics.
13775 Supported metrics are:
13776 @itemize @bullet
13777 @item raw metrics: SLOC, comment lines, blank lines, &c.
13778 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13779 @item Halstead metrics (all of them)
13780 @item the Maintainability Index (a Visual Studio metric)
13781 @end itemize")
13782 (properties `((python2-variant . ,(delay python2-radon))))
13783 (license license:expat)))
13784
13785 (define-public python2-radon
13786 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
13787 (package
13788 (inherit base)
13789 (propagated-inputs
13790 `(("python-configparser" ,python2-configparser)
13791 ("python-future" ,python2-future)
13792 ,@(package-propagated-inputs base))))))
13793
13794 (define-public python-sure
13795 (package
13796 (name "python-sure")
13797 (version "1.4.11")
13798 (source
13799 (origin
13800 (method url-fetch)
13801 (uri (pypi-uri "sure" version))
13802 (sha256
13803 (base32
13804 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13805 (build-system python-build-system)
13806 (propagated-inputs
13807 `(("python-mock" ,python-mock)
13808 ("python-six" ,python-six)))
13809 (native-inputs
13810 `(("python-nose" ,python-nose)))
13811 (home-page "https://github.com/gabrielfalcao/sure")
13812 (synopsis "Automated testing library in python for python")
13813 (description
13814 "Sure is a python library that leverages a DSL for writing assertions.
13815 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13816 (license license:gpl3+)))
13817
13818 (define-public python2-sure
13819 (package-with-python2 python-sure))
13820
13821 (define-public python2-couleur
13822 ;; This package does not seem to support python3 at all, hence,
13823 ;; only the python2 variant definition is provided.
13824 (package
13825 (name "python2-couleur")
13826 (version "0.6.2")
13827 (source
13828 (origin
13829 (method url-fetch)
13830 (uri (pypi-uri "couleur" version))
13831 (sha256
13832 (base32
13833 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13834 (build-system python-build-system)
13835 (arguments
13836 `(#:python ,python-2))
13837 (home-page "https://github.com/gabrielfalcao/couleur")
13838 (synopsis
13839 "ANSI terminal tool for python, colored shell and other handy fancy features")
13840 (description
13841 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13842 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13843 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13844 ;; https://github.com/gabrielfalcao/couleur/issues/11
13845 (license license:lgpl3+)))
13846
13847 (define-public python-misaka
13848 (package
13849 (name "python-misaka")
13850 (version "2.1.1")
13851 (source
13852 (origin
13853 (method url-fetch)
13854 (uri (pypi-uri "misaka" version))
13855 (sha256
13856 (base32
13857 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13858 (build-system python-build-system)
13859 (arguments
13860 `(;; Line 37 of setup.py calls self.run_command('develop')
13861 ;; in the 'check' phase. This command seems to be trying
13862 ;; to write to
13863 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13864 ;; for which it does not have the permission to write.
13865 #:tests? #f))
13866 (propagated-inputs
13867 `(("python-cffi" ,python-cffi)))
13868 (home-page "https://github.com/FSX/misaka")
13869 (synopsis "Python binding for Hoedown")
13870 (description
13871 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13872 library written in C. It features a fast HTML renderer and functionality to make custom
13873 renderers (e.g. man pages or LaTeX).")
13874 (license license:expat)))
13875
13876 (define-public python2-misaka
13877 (package-with-python2 python-misaka))
13878
13879 (define-public python2-steadymark
13880 ;; This is forced into being a python2 only variant
13881 ;; due to its dependence on couleur that has no support
13882 ;; for python3
13883 (package
13884 (name "python2-steadymark")
13885 (version "0.7.3")
13886 (source
13887 (origin
13888 (method url-fetch)
13889 (uri (pypi-uri "steadymark" version))
13890 (sha256
13891 (base32
13892 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13893 (build-system python-build-system)
13894 (native-inputs
13895 `(("python-couleur" ,python2-couleur)
13896 ("python-sure" ,python2-sure)
13897 ("python-misaka" ,python2-misaka)))
13898 (arguments
13899 `(#:python ,python-2
13900 #:phases
13901 (modify-phases %standard-phases
13902 (add-before 'build 'patch-setup-py
13903 (lambda _
13904 ;; Update requirements from dependency==version
13905 ;; to dependency>=version
13906 (substitute* "setup.py"
13907 (("==") ">="))
13908 #t)))))
13909 (home-page "https://github.com/gabrielfalcao/steadymark")
13910 (synopsis "Markdown-based test runner for python")
13911 (description
13912 "@code{Steadymark} allows documentation to be written in github-flavoured
13913 markdown. The documentation may contain snippets of code surrounded by python
13914 code blocks and @code{Steadymark} will find these snippets and run them, making
13915 sure that there are no old malfunctional examples in the documentation examples.")
13916 (license license:expat)))
13917
13918 (define-public python-jsonpointer
13919 (package
13920 (name "python-jsonpointer")
13921 (version "1.10")
13922 (source
13923 (origin
13924 (method url-fetch)
13925 (uri (pypi-uri "jsonpointer" version))
13926 (sha256
13927 (base32
13928 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13929 (build-system python-build-system)
13930 (home-page "https://github.com/stefankoegl/python-json-pointer")
13931 (synopsis "Identify specific nodes in a JSON document")
13932 (description "@code{jsonpointer} allows you to access specific nodes
13933 by path in a JSON document (see RFC 6901).")
13934 (license license:bsd-3)))
13935
13936 (define-public python2-jsonpointer
13937 (package-with-python2 python-jsonpointer))
13938
13939 (define-public python-jsonpatch
13940 (package
13941 (name "python-jsonpatch")
13942 (version "1.16")
13943 (source
13944 (origin
13945 (method git-fetch)
13946 ;; pypi version lacks tests.js
13947 (uri (git-reference
13948 (url "https://github.com/stefankoegl/python-json-patch")
13949 (commit (string-append "v" version))))
13950 (file-name (git-file-name name version))
13951 (sha256
13952 (base32
13953 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13954 (build-system python-build-system)
13955 (native-inputs
13956 `(("python-jsonpointer" ,python-jsonpointer)))
13957 (home-page "https://github.com/stefankoegl/python-json-patch")
13958 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13959 (description "@code{jsonpatch} is a library and program that allows
13960 applying JSON Patches according to RFC 6902.")
13961 (license license:bsd-3)))
13962
13963 (define-public python2-jsonpatch
13964 (package-with-python2 python-jsonpatch))
13965
13966 (define-public python-jsonpatch-0.4
13967 (package (inherit python-jsonpatch)
13968 (name "python-jsonpatch")
13969 (version "0.4")
13970 (source
13971 (origin
13972 (method git-fetch)
13973 (uri (git-reference
13974 (url "https://github.com/stefankoegl/python-json-patch")
13975 (commit (string-append "v" version))))
13976 (file-name (git-file-name name version))
13977 (sha256
13978 (base32
13979 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13980
13981 (define-public python2-jsonpatch-0.4
13982 (package-with-python2 python-jsonpatch-0.4))
13983
13984 (define-public python-rfc3986
13985 (package
13986 (name "python-rfc3986")
13987 (version "1.1.0")
13988 (source (origin
13989 (method url-fetch)
13990 (uri (pypi-uri "rfc3986" version))
13991 (sha256
13992 (base32
13993 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13994 (build-system python-build-system)
13995 (arguments
13996 `(#:modules ((guix build utils)
13997 (guix build python-build-system)
13998 (ice-9 ftw)
13999 (srfi srfi-1)
14000 (srfi srfi-26))
14001 #:phases
14002 (modify-phases %standard-phases
14003 (replace 'check
14004 (lambda _
14005 (let ((cwd (getcwd)))
14006 (setenv "PYTHONPATH"
14007 (string-append cwd "/build/"
14008 (find (cut string-prefix? "lib" <>)
14009 (scandir (string-append cwd "/build")))
14010 ":"
14011 (getenv "PYTHONPATH")))
14012 (invoke "pytest" "-v")))))))
14013 (native-inputs
14014 `(("python-pytest" ,python-pytest)))
14015 (home-page "https://rfc3986.readthedocs.io/")
14016 (synopsis "Parse and validate URI references")
14017 (description
14018 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14019 validation and authority parsing. This module also supports RFC@tie{}6874
14020 which adds support for zone identifiers to IPv6 addresses.")
14021 (license license:asl2.0)))
14022
14023 (define-public python2-rfc3986
14024 (package-with-python2 python-rfc3986))
14025
14026 (define-public python-rfc3987
14027 (package
14028 (name "python-rfc3987")
14029 (version "1.3.7")
14030 (source
14031 (origin
14032 (method url-fetch)
14033 (uri (pypi-uri "rfc3987" version))
14034 (sha256
14035 (base32
14036 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14037 (build-system python-build-system)
14038 (home-page "https://pypi.org/project/rfc3987/")
14039 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14040 (description "@code{rfc3987} provides routines for parsing and
14041 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14042 (license license:gpl3+)))
14043
14044 (define-public python2-rfc3987
14045 (package-with-python2 python-rfc3987))
14046
14047 (define-public python-validate-email
14048 (package
14049 (name "python-validate-email")
14050 (version "1.3")
14051 (source
14052 (origin
14053 (method url-fetch)
14054 (uri (pypi-uri "validate_email" version))
14055 (sha256
14056 (base32
14057 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14058 (build-system python-build-system)
14059 (home-page "https://github.com/syrusakbary/validate_email")
14060 (synopsis "Verifies if an email address is valid and really exists")
14061 (description "@code{validate_email} can be used to verify if an email
14062 address is valid and really exists.")
14063 (license license:lgpl3+)))
14064
14065 (define-public python2-validate-email
14066 (package-with-python2 python-validate-email))
14067
14068 (define-public python-flex
14069 (package
14070 (name "python-flex")
14071 (version "6.10.0")
14072 (source
14073 (origin
14074 (method url-fetch)
14075 (uri (pypi-uri "flex" version))
14076 (sha256
14077 (base32
14078 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14079 (build-system python-build-system)
14080 (propagated-inputs
14081 `(("python-click" ,python-click)
14082 ("python-iso8601" ,python-iso8601)
14083 ("python-jsonpointer" ,python-jsonpointer)
14084 ("python-pyyaml" ,python-pyyaml)
14085 ("python-requests" ,python-requests)
14086 ("python-rfc3987" ,python-rfc3987)
14087 ("python-six" ,python-six)
14088 ("python-validate-email" ,python-validate-email)))
14089 (home-page "https://github.com/pipermerriam/flex")
14090 (synopsis "Validates Swagger schemata")
14091 (description "@code{flex} can be used to validate Swagger schemata.")
14092 (license license:bsd-3)))
14093
14094 (define-public python2-flex
14095 (package-with-python2 python-flex))
14096
14097 (define-public python-marshmallow
14098 (package
14099 (name "python-marshmallow")
14100 (version "3.0.0b14")
14101 (source
14102 (origin
14103 (method url-fetch)
14104 (uri (pypi-uri "marshmallow" version))
14105 (sha256
14106 (base32
14107 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14108 (build-system python-build-system)
14109 (propagated-inputs
14110 `(("python-dateutil" ,python-dateutil)
14111 ("python-simplejson" ,python-simplejson)))
14112 (native-inputs
14113 `(("python-pytest" ,python-pytest)
14114 ("python-pytz" ,python-pytz)))
14115 (home-page "https://github.com/marshmallow-code/marshmallow")
14116 (synopsis "Convert complex datatypes to and from native
14117 Python datatypes.")
14118 (description "@code{marshmallow} provides a library for converting
14119 complex datatypes to and from native Python datatypes.")
14120 (license license:expat)))
14121
14122 (define-public python2-marshmallow
14123 (package-with-python2 python-marshmallow))
14124
14125 (define-public python-apispec
14126 (package
14127 (name "python-apispec")
14128 (version "0.25.3")
14129 (source
14130 (origin
14131 (method url-fetch)
14132 (uri (pypi-uri "apispec" version))
14133 (sha256
14134 (base32
14135 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14136 (build-system python-build-system)
14137 (propagated-inputs
14138 `(("python-pyyaml" ,python-pyyaml)))
14139 (native-inputs
14140 `(("python-pytest" ,python-pytest)
14141 ("python-flask" ,python-flask)
14142 ("python-marshmallow" ,python-marshmallow)
14143 ("python-tornado" ,python-tornado)
14144 ("python-bottle" ,python-bottle)
14145 ("python-mock" ,python-mock)))
14146 (home-page "https://github.com/marshmallow-code/apispec")
14147 (synopsis "Swagger 2.0 API specification generator")
14148 (description "@code{python-apispec} is a pluggable API specification
14149 generator. Currently supports the OpenAPI specification (f.k.a.
14150 Swagger 2.0).")
14151 (license license:expat)))
14152
14153 (define-public python2-apispec
14154 (package-with-python2 python-apispec))
14155
14156 (define-public python-flasgger
14157 (package
14158 (name "python-flasgger")
14159 (version "0.6.3")
14160 (source
14161 (origin
14162 (method git-fetch)
14163 (uri (git-reference
14164 (url "https://github.com/rochacbruno/flasgger.git")
14165 (commit version)))
14166 (file-name (git-file-name name version))
14167 (sha256
14168 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
14169 (build-system python-build-system)
14170 (arguments
14171 `(#:phases
14172 (modify-phases %standard-phases
14173 (replace 'check
14174 (lambda* (#:key inputs outputs #:allow-other-keys)
14175 (substitute* "Makefile"
14176 (("flake8 flasgger --ignore=F403")
14177 "flake8 flasgger --ignore=E731,F403"))
14178 (setenv "PYTHONPATH" (string-append (getcwd)
14179 ":"
14180 (getenv "PYTHONPATH")))
14181 (invoke "py.test"))))))
14182 (propagated-inputs
14183 `(("python-flask" ,python-flask)
14184 ("python-pyyaml" ,python-pyyaml)
14185 ("python-jsonschema" ,python-jsonschema)
14186 ("python-mistune" ,python-mistune)
14187 ("python-six" ,python-six)))
14188 (native-inputs
14189 `(("python-decorator" ,python-decorator)
14190 ("python-flake8" ,python-flake8)
14191 ("python-flask-restful" ,python-flask-restful)
14192 ("python-flex" ,python-flex)
14193 ("python-pytest" ,python-pytest)
14194 ("python-pytest-cov" ,python-pytest-cov)
14195 ("python-marshmallow" ,python-marshmallow)
14196 ("python-apispec" ,python-apispec)))
14197 (home-page "https://github.com/rochacbruno/flasgger/")
14198 (synopsis "Extract Swagger specs from your Flask project")
14199 (description "@code{python-flasgger} allows extracting Swagger specs
14200 from your Flask project. It is a fork of Flask-Swagger.")
14201 (license license:expat)))
14202
14203 (define-public python2-flasgger
14204 (package-with-python2 python-flasgger))
14205
14206 (define-public python-swagger-spec-validator
14207 (package
14208 (name "python-swagger-spec-validator")
14209 (version "2.4.3")
14210 (source
14211 (origin
14212 (method url-fetch)
14213 (uri (pypi-uri "swagger-spec-validator" version))
14214 (sha256
14215 (base32
14216 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
14217 (build-system python-build-system)
14218 (propagated-inputs
14219 `(("python-jsonschema" ,python-jsonschema)
14220 ("python-pyyaml" ,python-pyyaml)
14221 ("python-six" ,python-six)))
14222 (home-page
14223 "https://github.com/Yelp/swagger_spec_validator")
14224 (synopsis "Validation of Swagger specifications")
14225 (description "@code{swagger_spec_validator} provides a library for
14226 validating Swagger API specifications.")
14227 (license license:asl2.0)))
14228
14229 (define-public python2-swagger-spec-validator
14230 (package-with-python2 python-swagger-spec-validator))
14231
14232 (define-public python-apache-libcloud
14233 (package
14234 (name "python-apache-libcloud")
14235 (version "2.4.0")
14236 (source
14237 (origin
14238 (method url-fetch)
14239 (uri (pypi-uri "apache-libcloud" version))
14240 (sha256
14241 (base32
14242 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
14243 (build-system python-build-system)
14244 (arguments
14245 `(#:phases
14246 (modify-phases %standard-phases
14247 (add-after 'unpack 'patch-ssh
14248 (lambda* (#:key inputs #:allow-other-keys)
14249 (substitute* "libcloud/compute/ssh.py"
14250 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
14251 "/bin/ssh" "'")))
14252 #t))
14253 (add-after 'unpack 'patch-tests
14254 (lambda _
14255 (substitute* "./libcloud/test/test_file_fixtures.py"
14256 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
14257 (("def _ascii") "def _raw_data(self, method, url, body, headers):
14258 return (httplib.OK,
14259 \"1234abcd\",
14260 {\"test\": \"value\"},
14261 httplib.responses[httplib.OK])
14262 def _ascii"))
14263 (substitute* "libcloud/test/compute/test_ssh_client.py"
14264 (("class ShellOutSSHClientTests")
14265 "@unittest.skip(\"Guix container doesn't have ssh service\")
14266 class ShellOutSSHClientTests")
14267 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
14268 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
14269 (("'.xF0', '.x90', '.x8D', '.x88'")
14270 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
14271 #t))
14272 (add-before 'check 'copy-secret
14273 (lambda _
14274 (copy-file "libcloud/test/secrets.py-dist"
14275 "libcloud/test/secrets.py")
14276 #t)))))
14277 (inputs
14278 `(("openssh" ,openssh)))
14279 (propagated-inputs
14280 `(("python-paramiko" ,python-paramiko)
14281 ("python-requests" ,python-requests)))
14282 (native-inputs
14283 `(("python-lockfile" ,python-lockfile)
14284 ("python-mock" ,python-mock)
14285 ("python-pytest" ,python-pytest)
14286 ("python-pytest-runner" ,python-pytest-runner)
14287 ("python-requests-mock" ,python-requests-mock)))
14288 (home-page "https://libcloud.apache.org/")
14289 (synopsis "Unified Cloud API")
14290 (description "@code{libcloud} is a Python library for interacting with
14291 many of the popular cloud service providers using a unified API.")
14292 (license license:asl2.0)))
14293
14294 (define-public python2-apache-libcloud
14295 (package-with-python2 python-apache-libcloud))
14296
14297 (define-public python-smmap
14298 (package
14299 (name "python-smmap")
14300 (version "3.0.1")
14301 (source
14302 (origin
14303 (method url-fetch)
14304 (uri (pypi-uri "smmap" version))
14305 (sha256
14306 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
14307 (build-system python-build-system)
14308 (native-inputs
14309 `(("python-nosexcover" ,python-nosexcover)))
14310 (home-page "https://github.com/Byron/smmap")
14311 (synopsis "Python sliding window memory map manager")
14312 (description "@code{smmap} is a pure Python implementation of a sliding
14313 window memory map manager.")
14314 (license license:bsd-3)))
14315
14316 (define-public python-smmap2
14317 (deprecated-package "python-smmap2" python-smmap))
14318
14319 (define-public python2-smmap
14320 (package-with-python2 python-smmap))
14321
14322 (define-public python2-smmap2
14323 (deprecated-package "python2-smmap2" python2-smmap))
14324
14325 (define-public python-regex
14326 (package
14327 (name "python-regex")
14328 (version "2019.04.14")
14329 (source (origin
14330 (method url-fetch)
14331 (uri (pypi-uri "regex" version))
14332 (sha256
14333 (base32
14334 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
14335 ;; TODO: Fix and enable regex_test.py tests that complain about the
14336 ;; test.support module not existing.
14337 (build-system python-build-system)
14338 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
14339 (synopsis "Alternative regular expression module")
14340 (description "This regular expression implementation is backwards-
14341 compatible with the standard @code{re} module, but offers additional
14342 functionality like full case-folding for case-insensitive matches in Unicode.")
14343 (license license:psfl)))
14344
14345 (define-public python2-regex
14346 (package-with-python2 python-regex))
14347
14348 (define-public python2-pyopengl
14349 (package
14350 (name "python2-pyopengl")
14351 (version "3.1.0")
14352 (source
14353 (origin
14354 (method url-fetch)
14355 (uri (pypi-uri "PyOpenGL" version))
14356 (sha256
14357 (base32
14358 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14359 (arguments
14360 `(#:python ,python-2))
14361 (build-system python-build-system)
14362 (home-page "http://pyopengl.sourceforge.net")
14363 (synopsis "Standard OpenGL bindings for Python")
14364 (description
14365 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14366 related APIs. The binding is created using the standard @code{ctypes}
14367 library.")
14368 (license license:bsd-3)))
14369
14370 (define-public python2-pyopengl-accelerate
14371 (package
14372 (inherit python2-pyopengl)
14373 (name "python2-pyopengl-accelerate")
14374 (version "3.1.0")
14375 (source
14376 (origin
14377 (method url-fetch)
14378 (uri (pypi-uri "PyOpenGL-accelerate" version))
14379 (sha256
14380 (base32
14381 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14382 (synopsis "Acceleration code for PyOpenGL")
14383 (description
14384 "This is the Cython-coded accelerator module for PyOpenGL.")))
14385
14386 (define-public python-rencode
14387 (package
14388 (name "python-rencode")
14389 (version "1.0.5")
14390 (source
14391 (origin
14392 (method url-fetch)
14393 (uri (pypi-uri "rencode" version))
14394 (sha256
14395 (base32
14396 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14397 (build-system python-build-system)
14398 (arguments
14399 `(#:phases
14400 (modify-phases %standard-phases
14401 (add-before 'check 'delete-bogus-test
14402 ;; This test requires /home/aresch/Downloads, which is not provided by
14403 ;; the build environment.
14404 (lambda _
14405 (delete-file "rencode/t.py")
14406 #t)))))
14407 (native-inputs `(("pkg-config" ,pkg-config)
14408 ("python-cython" ,python-cython)))
14409 (home-page "https://github.com/aresch/rencode")
14410 (synopsis "Serialization of heterogeneous data structures")
14411 (description
14412 "The @code{rencode} module is a data structure serialization library,
14413 similar to @code{bencode} from the BitTorrent project. For complex,
14414 heterogeneous data structures with many small elements, r-encoding stake up
14415 significantly less space than b-encodings. This version of rencode is a
14416 complete rewrite in Cython to attempt to increase the performance over the
14417 pure Python module.")
14418 (license license:bsd-3)))
14419
14420 (define-public python2-rencode
14421 (package-with-python2 python-rencode))
14422
14423 (define-public python-xenon
14424 (package
14425 (name "python-xenon")
14426 (version "0.7.0")
14427 (source
14428 (origin
14429 (method url-fetch)
14430 (uri (pypi-uri "xenon" version))
14431 (sha256
14432 (base32
14433 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
14434 (build-system python-build-system)
14435 (native-inputs
14436 `(("python-pyyaml" ,python-pyyaml)
14437 ("python-radon" ,python-radon)
14438 ("python-requests" ,python-requests)
14439 ("python-flake8" ,python-flake8)
14440 ("python-tox" ,python-tox)))
14441 (arguments
14442 `(#:tests? #f ;test suite not shipped with the PyPI archive
14443 #:phases
14444 (modify-phases %standard-phases
14445 (add-before 'build 'patch-test-requirements
14446 (lambda _
14447 ;; Remove httpretty dependency for tests.
14448 (substitute* "setup.py"
14449 (("httpretty") ""))
14450 #t)))))
14451 (home-page "https://xenon.readthedocs.org/")
14452 (synopsis "Monitor code metrics for Python on your CI server")
14453 (description
14454 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14455 Ideally, @code{xenon} is run every time code is committed. Through command
14456 line options, various thresholds can be set for the complexity of code. It
14457 will fail (i.e. it will exit with a non-zero exit code) when any of these
14458 requirements is not met.")
14459 (license license:expat)))
14460
14461 (define-public python2-xenon
14462 (package-with-python2 python-xenon))
14463
14464 (define-public python-pysocks
14465 (package
14466 (name "python-pysocks")
14467 (version "1.7.0")
14468 (source
14469 (origin
14470 (method url-fetch)
14471 (uri (pypi-uri "PySocks" version))
14472 (sha256
14473 (base32
14474 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
14475 (build-system python-build-system)
14476 (arguments `(#:tests? #f))
14477 (home-page "https://github.com/Anorov/PySocks")
14478 (synopsis "SOCKS client module")
14479 (description "@code{pysocks} is an updated and semi-actively maintained
14480 version of @code{SocksiPy} with bug fixes and extra features.")
14481 (license license:bsd-3)))
14482
14483 (define-public python2-pysocks
14484 (package-with-python2 python-pysocks))
14485
14486 (define-public python-pydiff
14487 (package
14488 (name "python-pydiff")
14489 (version "0.2")
14490 (source
14491 (origin
14492 (method url-fetch)
14493 (uri (pypi-uri "pydiff" version))
14494 (sha256
14495 (base32
14496 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14497 (build-system python-build-system)
14498 (home-page "https://github.com/myint/pydiff")
14499 (synopsis "Library to diff two Python files at the bytecode level")
14500 (description
14501 "@code{pydiff} makes it easy to look for actual code changes while
14502 ignoring formatting changes.")
14503 (license license:expat)))
14504
14505 (define-public python2-pydiff
14506 (package-with-python2 python-pydiff))
14507
14508 (define-public python-tqdm
14509 (package
14510 (name "python-tqdm")
14511 (version "4.43.0")
14512 (source
14513 (origin
14514 (method url-fetch)
14515 (uri (pypi-uri "tqdm" version))
14516 (sha256
14517 (base32
14518 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
14519 (build-system python-build-system)
14520 (arguments
14521 '(#:phases (modify-phases %standard-phases
14522 (replace 'check
14523 (lambda* (#:key inputs outputs #:allow-other-keys)
14524 (add-installed-pythonpath inputs outputs)
14525 ;; This invokation is taken from tox.ini.
14526 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
14527 "-d" "-v" "tqdm/"))))))
14528 (native-inputs
14529 `(("python-nose" ,python-nose)))
14530 (home-page "https://github.com/tqdm/tqdm")
14531 (synopsis "Fast, extensible progress meter")
14532 (description
14533 "Make loops show a progress bar on the console by just wrapping any
14534 iterable with @code{|tqdm(iterable)|}. Offers many options to define
14535 design and layout.")
14536 (license (list license:mpl2.0 license:expat))))
14537
14538 (define-public python2-tqdm
14539 (package-with-python2 python-tqdm))
14540
14541 (define-public python-pkginfo
14542 (package
14543 (name "python-pkginfo")
14544 (version "1.4.2")
14545 (source
14546 (origin
14547 (method url-fetch)
14548 (uri (pypi-uri "pkginfo" version))
14549 (sha256
14550 (base32
14551 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14552 (build-system python-build-system)
14553 (arguments
14554 ;; The tests are broken upstream.
14555 '(#:tests? #f))
14556 (home-page
14557 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14558 (synopsis
14559 "Query metadatdata from sdists, bdists, and installed packages")
14560 (description
14561 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14562 source distriubtion (an sdist) or a binary distribution (e.g., created by
14563 running bdist_egg). It can also query the EGG-INFO directory of an installed
14564 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14565 created by running @code{python setup.py develop}).")
14566 (license license:expat)))
14567
14568 (define-public python2-pkginfo
14569 (package-with-python2 python-pkginfo))
14570
14571 (define-public python-twine
14572 (package
14573 (name "python-twine")
14574 (version "1.9.1")
14575 (source
14576 (origin
14577 (method url-fetch)
14578 (uri (pypi-uri "twine" version))
14579 (sha256
14580 (base32
14581 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14582 (build-system python-build-system)
14583 (propagated-inputs
14584 `(("python-tqdm" ,python-tqdm)
14585 ("python-pkginfo" ,python-pkginfo)
14586 ("python-requests" ,python-requests)
14587 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14588 (home-page "https://github.com/pypa/twine")
14589 (synopsis "Collection of utilities for interacting with PyPI")
14590 (description
14591 "@code{twine} currently supports registering projects and uploading
14592 distributions. It authenticates the user over HTTPS, allows them to pre-sign
14593 their files and supports any packaging format (including wheels).")
14594 (license license:asl2.0)))
14595
14596 (define-public python2-twine
14597 (package-with-python2 python-twine))
14598
14599 (define-public python-linecache2
14600 (package
14601 (name "python-linecache2")
14602 (version "1.0.0")
14603 (source
14604 (origin
14605 (method url-fetch)
14606 (uri (pypi-uri "linecache2" version))
14607 (sha256
14608 (base32
14609 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14610 (build-system python-build-system)
14611 (arguments
14612 `(;; The tests depend on unittest2, and our version is a bit too old.
14613 #:tests? #f))
14614 (native-inputs
14615 `(("python-pbr" ,python-pbr-minimal)))
14616 (home-page
14617 "https://github.com/testing-cabal/linecache2")
14618 (synopsis "Backports of the linecache module")
14619 (description
14620 "The linecache module allows one to get any line from any file, while
14621 attempting to optimize internally, using a cache, the common case where many
14622 lines are read from a single file.")
14623 (license license:psfl)))
14624
14625 (define-public python2-linecache2
14626 (package-with-python2 python-linecache2))
14627
14628 (define-public python-traceback2
14629 (package
14630 (name "python-traceback2")
14631 (version "1.4.0")
14632 (source
14633 (origin
14634 (method url-fetch)
14635 (uri (pypi-uri "traceback2" version))
14636 (sha256
14637 (base32
14638 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14639 (build-system python-build-system)
14640 (arguments
14641 `(;; python-traceback2 and python-unittest2 depend on one another.
14642 #:tests? #f))
14643 (native-inputs
14644 `(("python-pbr" ,python-pbr-minimal)))
14645 (propagated-inputs
14646 `(("python-linecache2" ,python-linecache2)))
14647 (home-page
14648 "https://github.com/testing-cabal/traceback2")
14649 (synopsis "Backports of the traceback module")
14650 (description
14651 "This module provides a standard interface to extract, format and print
14652 stack traces of Python programs. It exactly mimics the behavior of the Python
14653 interpreter when it prints a stack trace.")
14654 (license license:psfl)))
14655
14656 (define-public python2-traceback2
14657 (package-with-python2 python-traceback2))
14658
14659 (define-public python-ratelimiter
14660 (package
14661 (name "python-ratelimiter")
14662 (version "1.2.0")
14663 (source
14664 (origin
14665 (method url-fetch)
14666 (uri (pypi-uri "ratelimiter" version))
14667 (sha256
14668 (base32
14669 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14670 (build-system python-build-system)
14671 (arguments
14672 '(#:tests? #f)) ; There are no tests in the pypi archive.
14673 (home-page "https://github.com/RazerM/ratelimiter")
14674 (synopsis "Simple rate limiting object")
14675 (description
14676 "The @code{ratelimiter} module ensures that an operation will not be
14677 executed more than a given number of times during a given period.")
14678 (license license:asl2.0)))
14679
14680 (define-public python2-ratelimiter
14681 (package-with-python2 python-ratelimiter))
14682
14683 (define-public python-dukpy
14684 (package
14685 (name "python-dukpy")
14686 (version "0.3")
14687 (source
14688 (origin
14689 (method git-fetch)
14690 (uri (git-reference
14691 (url "https://github.com/kovidgoyal/dukpy.git")
14692 (commit (string-append "v" version))))
14693 (file-name (git-file-name name version))
14694 (sha256
14695 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14696 (build-system python-build-system)
14697 (home-page "https://github.com/kovidgoyal/dukpy")
14698 (synopsis "Run JavaScript in python")
14699 (description
14700 "dukpy is a JavaScript runtime environment for Python using the duktape
14701 embeddable JavaScript engine.")
14702 ;; Dukpy is licensed under MIT like the embedded duktape library,
14703 ;; with 'errors.c' as GPL3.
14704 (license (list license:expat license:gpl3))))
14705
14706 (define-public python2-dukpy
14707 (package-with-python2 python-dukpy))
14708
14709 (define-public python-jsonrpclib-pelix
14710 (package
14711 (name "python-jsonrpclib-pelix")
14712 (version "0.3.2")
14713 (source
14714 (origin
14715 (method url-fetch)
14716 (uri (pypi-uri "jsonrpclib-pelix" version))
14717 (sha256
14718 (base32
14719 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14720 (build-system python-build-system)
14721 (arguments
14722 `(#:tests? #f)) ; no tests in PyPI tarball
14723 (home-page "https://github.com/tcalmant/jsonrpclib/")
14724 (synopsis "JSON-RPC 2.0 client library for Python")
14725 (description
14726 "This library implements the JSON-RPC v2.0
14727 specification (backwards-compatible) as a client library for Python. This
14728 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14729 services.")
14730 (license license:asl2.0)))
14731
14732 (define-public python2-jsonrpclib-pelix
14733 (package-with-python2 python-jsonrpclib-pelix))
14734
14735 (define-public python-setuptools-scm-git-archive
14736 (package
14737 (name "python-setuptools-scm-git-archive")
14738 (version "1.0")
14739 (source
14740 (origin
14741 (method url-fetch)
14742 (uri (pypi-uri "setuptools_scm_git_archive" version))
14743 (sha256
14744 (base32
14745 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14746 (build-system python-build-system)
14747 (native-inputs
14748 `(("python-pytest" ,python-pytest)))
14749 (propagated-inputs
14750 `(("python-setuptools-scm" ,python-setuptools-scm)))
14751 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14752 (synopsis "Setuptools_scm plugin for git archives")
14753 (description
14754 "The setuptools_scm_git_archive package is a plugin to
14755 setuptools_scm, which supports obtaining versions from git archives that
14756 belong to tagged versions.")
14757 (license license:expat)))
14758
14759 (define-public python2-setuptools-scm-git-archive
14760 (package-with-python2 python-setuptools-scm-git-archive))
14761
14762 (define-public python-setuptools-git
14763 (package
14764 (name "python-setuptools-git")
14765 (version "1.2")
14766 (source
14767 (origin
14768 (method url-fetch)
14769 (uri (pypi-uri "setuptools-git" version))
14770 (sha256
14771 (base32
14772 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14773 (build-system python-build-system)
14774 (arguments
14775 `(#:phases
14776 (modify-phases %standard-phases
14777 ;; This is needed for tests.
14778 (add-after 'unpack 'configure-git
14779 (lambda _
14780 (setenv "HOME" "/tmp")
14781 (invoke "git" "config" "--global" "user.email" "guix")
14782 (invoke "git" "config" "--global" "user.name" "guix")
14783 #t)))))
14784 (native-inputs
14785 `(("git" ,git-minimal)))
14786 (home-page "https://github.com/msabramo/setuptools-git")
14787 (synopsis "Setuptools revision control system plugin for Git")
14788 (description
14789 "This package provides a plugin for Setuptools for revision control with
14790 Git.")
14791 (license license:bsd-3)))
14792
14793 (define-public python-pyclipper
14794 (package
14795 (name "python-pyclipper")
14796 (version "1.1.0.post3")
14797 (source
14798 (origin
14799 (method url-fetch)
14800 (uri (pypi-uri "pyclipper" version ".zip"))
14801 (sha256
14802 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14803 (modules '((guix build utils)))
14804 (snippet
14805 '(begin
14806 ;; This file is generated by Cython.
14807 (delete-file "pyclipper/pyclipper.cpp") #t))))
14808 (build-system python-build-system)
14809 (arguments
14810 `(#:phases
14811 (modify-phases %standard-phases
14812 (add-before 'build 'cythonize-sources
14813 (lambda _
14814 (with-directory-excursion "pyclipper"
14815 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14816 (propagated-inputs
14817 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14818 (native-inputs
14819 `(("python-cython" ,python-cython)
14820 ("python-pytest" ,python-pytest)
14821 ("python-pytest-runner" ,python-pytest-runner)
14822 ("python-unittest2" ,python-unittest2)
14823 ("unzip" ,unzip)))
14824 (home-page "https://github.com/greginvm/pyclipper")
14825 (synopsis "Wrapper for Angus Johnson's Clipper library")
14826 (description
14827 "Pyclipper is a Cython wrapper for the C++ translation of the
14828 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14829 (license license:expat)))
14830
14831 (define-public python2-pyclipper
14832 (package-with-python2 python-pyclipper))
14833
14834 (define-public python2-booleanoperations
14835 (package
14836 (name "python2-booleanoperations")
14837 (version "0.7.1")
14838 (source
14839 (origin
14840 (method url-fetch)
14841 (uri (pypi-uri "booleanOperations" version ".zip"))
14842 (sha256
14843 (base32
14844 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14845 (build-system python-build-system)
14846 (arguments
14847 `(#:python ,python-2))
14848 (native-inputs
14849 `(("unzip" ,unzip)
14850 ("python2-pytest" ,python2-pytest)
14851 ("python2-pytest-runner" ,python2-pytest-runner)))
14852 (propagated-inputs
14853 `(("python-fonttools" ,python2-fonttools)
14854 ("python-pyclipper" ,python2-pyclipper)
14855 ("python-ufolib" ,python2-ufolib)))
14856 (home-page "https://github.com/typemytype/booleanOperations")
14857 (synopsis "Boolean operations on paths")
14858 (description
14859 "BooleanOperations provides a Python library that enables
14860 boolean operations on paths.")
14861 (license license:expat)))
14862
14863 (define-public python-tempdir
14864 (package
14865 (name "python-tempdir")
14866 (version "0.7.1")
14867 (source
14868 (origin
14869 (method url-fetch)
14870 (uri (pypi-uri "tempdir" version))
14871 (sha256
14872 (base32
14873 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14874 (build-system python-build-system)
14875 (home-page "https://pypi.org/project/tempdir/")
14876 (arguments
14877 ;; the package has no tests
14878 '(#:tests? #f))
14879 (synopsis "Python library for managing temporary directories")
14880 (description
14881 "This library manages temporary directories that are automatically
14882 deleted with all their contents when they are no longer needed. It is
14883 particularly convenient for use in tests.")
14884 (license license:expat)))
14885
14886 (define-public python2-tempdir
14887 (package-with-python2 python-tempdir))
14888
14889 (define-public python-activepapers
14890 (package
14891 (name "python-activepapers")
14892 (version "0.2.2")
14893 (source
14894 (origin
14895 (method url-fetch)
14896 (uri (pypi-uri "ActivePapers.Py" version))
14897 (sha256
14898 (base32
14899 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14900 (build-system python-build-system)
14901 (arguments
14902 `(#:modules ((ice-9 ftw)
14903 (srfi srfi-1)
14904 (guix build utils)
14905 (guix build python-build-system))
14906
14907 #:phases
14908 (modify-phases %standard-phases
14909 (add-after 'unpack 'delete-python2-code
14910 (lambda _
14911 (for-each delete-file
14912 '("lib/activepapers/builtins2.py"
14913 "lib/activepapers/standardlib2.py"
14914 "lib/activepapers/utility2.py"))))
14915 (replace 'check
14916 (lambda _
14917 ;; Deactivate the test cases that download files
14918 (setenv "NO_NETWORK_ACCESS" "1")
14919 ;; For some strange reason, some tests fail if nosetests runs all
14920 ;; test modules in a single execution. They pass if each test
14921 ;; module is run individually.
14922 (for-each (lambda (filename)
14923 (invoke "nosetests"
14924 (string-append "tests/" filename)))
14925 (scandir "tests"
14926 (lambda (filename)
14927 (string-suffix? ".py" filename)))))))))
14928 (native-inputs
14929 `(("python-tempdir" ,python-tempdir)
14930 ("python-nose" ,python-nose)))
14931 (propagated-inputs
14932 `(("python-h5py" ,python-h5py)))
14933 (home-page "https://www.activepapers.org/")
14934 (synopsis "Executable papers for scientific computing")
14935 (description
14936 "ActivePapers is a tool for working with executable papers, which
14937 combine data, code, and documentation in single-file packages,
14938 suitable for publication as supplementary material or on repositories
14939 such as figshare or Zenodo.")
14940 (properties `((python2-variant . ,(delay python2-activepapers))))
14941 (license license:bsd-3)))
14942
14943 (define-public python2-activepapers
14944 (let ((base (package-with-python2
14945 (strip-python2-variant python-activepapers))))
14946 (package
14947 (inherit base)
14948 (arguments
14949 (substitute-keyword-arguments (package-arguments base)
14950 ((#:phases phases)
14951 `(modify-phases ,phases
14952 (delete 'delete-python2-code)
14953 (add-after 'unpack 'delete-python3-code
14954 (lambda _
14955 (for-each delete-file
14956 '("lib/activepapers/builtins3.py"
14957 "lib/activepapers/standardlib3.py"
14958 "lib/activepapers/utility3.py")))))))))))
14959
14960 (define-public python-semver
14961 (package
14962 (name "python-semver")
14963 (version "2.9.0")
14964 (source
14965 (origin
14966 (method url-fetch)
14967 (uri (pypi-uri "semver" version))
14968 (sha256
14969 (base32
14970 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14971 (build-system python-build-system)
14972 (native-inputs
14973 `(("python-appdirs" ,python-appdirs)
14974 ("python-distlib" ,python-distlib)
14975 ("python-importlib-metadata" ,python-importlib-metadata)
14976 ("python-filelock" ,python-filelock)
14977 ("python-six" ,python-six)
14978 ("python-tox" ,python-tox)
14979 ("python-virtualenv" ,python-virtualenv)))
14980 (home-page "https://github.com/k-bx/python-semver")
14981 (synopsis "Python helper for Semantic Versioning")
14982 (description "This package provides a Python library for
14983 @url{Semantic Versioning, http://semver.org/}.")
14984 (license license:bsd-3)))
14985
14986 (define-public python2-semver
14987 (package-with-python2 python-semver))
14988
14989 (define-public python-pyro4
14990 (package
14991 (name "python-pyro4")
14992 (version "4.77")
14993 (source
14994 (origin
14995 (method url-fetch)
14996 (uri (pypi-uri "Pyro4" version))
14997 (sha256
14998 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14999 (build-system python-build-system)
15000 (arguments
15001 '(#:tests? #f)) ;FIXME: Some tests require network access.
15002 (native-inputs
15003 `(("python-cloudpickle" ,python-cloudpickle)
15004 ("python-dill" ,python-dill)
15005 ("python-msgpack" ,python-msgpack)))
15006 (propagated-inputs
15007 `(("python-serpent" ,python-serpent)))
15008 (home-page "https://pyro4.readthedocs.io")
15009 (synopsis "Distributed object middleware for Python")
15010 (description
15011 "Pyro enables you to build applications in which objects can talk to each
15012 other over the network. You can just use normal Python method calls to call
15013 objects on other machines, also known as remote procedure calls (RPC).")
15014 (license license:expat)))
15015
15016 (define-public python2-pyro
15017 (package
15018 (name "python2-pyro")
15019 (version "3.16")
15020 (source
15021 (origin
15022 (method url-fetch)
15023 (uri (pypi-uri "Pyro" version))
15024 (file-name (string-append "Pyro-" version ".tar.gz"))
15025 (sha256
15026 (base32
15027 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15028 (build-system python-build-system)
15029 (arguments
15030 ;; Pyro is not compatible with Python 3
15031 `(#:python ,python-2
15032 ;; Pyro has no test cases for automatic execution
15033 #:tests? #f))
15034 (home-page "http://pythonhosted.org/Pyro/")
15035 (synopsis "Distributed object manager for Python")
15036 (description "Pyro is a Distributed Object Technology system
15037 written in Python that is designed to be easy to use. It resembles
15038 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15039 which is a system and language independent Distributed Object Technology
15040 and has much more to offer than Pyro or RMI. Pyro 3.x is no
15041 longer maintained. New projects should use Pyro4 instead, which
15042 is the new Pyro version that is actively developed.")
15043 (license license:expat)))
15044
15045 (define-public python2-scientific
15046 (package
15047 (name "python2-scientific")
15048 (version "2.9.4")
15049 (source
15050 (origin
15051 (method git-fetch)
15052 (uri (git-reference
15053 (url "https://github.com/khinsen/ScientificPython")
15054 (commit (string-append "rel" version))))
15055 (file-name (git-file-name name version))
15056 (sha256
15057 (base32
15058 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
15059 (build-system python-build-system)
15060 (inputs
15061 `(("netcdf" ,netcdf)))
15062 (propagated-inputs
15063 `(("python-numpy" ,python2-numpy-1.8)
15064 ("python-pyro" ,python2-pyro)))
15065 (arguments
15066 ;; ScientificPython is not compatible with Python 3
15067 `(#:python ,python-2
15068 #:tests? #f ; No test suite
15069 #:phases
15070 (modify-phases %standard-phases
15071 (replace 'build
15072 (lambda* (#:key inputs #:allow-other-keys)
15073 (invoke "python" "setup.py" "build"
15074 (string-append "--netcdf_prefix="
15075 (assoc-ref inputs "netcdf"))))))))
15076 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
15077 (synopsis "Python modules for scientific computing")
15078 (description "ScientificPython is a collection of Python modules that are
15079 useful for scientific computing. Most modules are rather general (Geometry,
15080 physical units, automatic derivatives, ...) whereas others are more
15081 domain-specific (e.g. netCDF and PDB support). The library is currently
15082 not actively maintained and works only with Python 2 and NumPy < 1.9.")
15083 (license license:cecill-c)))
15084
15085 (define-public python2-mmtk
15086 (package
15087 (name "python2-mmtk")
15088 (version "2.7.12")
15089 (source
15090 (origin
15091 (method git-fetch)
15092 (uri (git-reference
15093 (url "https://github.com/khinsen/MMTK")
15094 (commit (string-append "rel" version))))
15095 (file-name (git-file-name name version))
15096 (sha256
15097 (base32
15098 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
15099 (build-system python-build-system)
15100 (native-inputs
15101 `(("netcdf" ,netcdf)))
15102 (propagated-inputs
15103 `(("python-scientific" ,python2-scientific)
15104 ("python-tkinter" ,python-2 "tk")))
15105 (arguments
15106 `(#:python ,python-2
15107 #:tests? #f
15108 #:phases
15109 (modify-phases %standard-phases
15110 (add-before 'build 'includes-from-scientific
15111 (lambda* (#:key inputs #:allow-other-keys)
15112 (mkdir-p "Include/Scientific")
15113 (copy-recursively
15114 (string-append
15115 (assoc-ref inputs "python-scientific")
15116 "/include/python2.7/Scientific")
15117 "Include/Scientific"))))))
15118 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15119 (synopsis "Python library for molecular simulation")
15120 (description "MMTK is a library for molecular simulations with an emphasis
15121 on biomolecules. It provides widely used methods such as Molecular Dynamics
15122 and normal mode analysis, but also basic routines for implementing new methods
15123 for simulation and analysis. The library is currently not actively maintained
15124 and works only with Python 2 and NumPy < 1.9.")
15125 (license license:cecill-c)))
15126
15127 (define-public python-phonenumbers
15128 (package
15129 (name "python-phonenumbers")
15130 (version "8.9.1")
15131 (source
15132 (origin
15133 (method url-fetch)
15134 (uri (pypi-uri "phonenumbers" version))
15135 (sha256
15136 (base32
15137 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15138 (build-system python-build-system)
15139 (home-page
15140 "https://github.com/daviddrysdale/python-phonenumbers")
15141 (synopsis
15142 "Python library for dealing with international phone numbers")
15143 (description
15144 "This package provides a Python port of Google's libphonenumber library.")
15145 (license license:asl2.0)))
15146
15147 (define-public python2-phonenumbers
15148 (package-with-python2 python-phonenumbers))
15149
15150 (define-public python-send2trash
15151 (package
15152 (name "python-send2trash")
15153 (version "1.5.0")
15154 (source
15155 (origin (method git-fetch)
15156 ;; Source tarball on PyPI doesn't include tests.
15157 (uri (git-reference
15158 (url "https://github.com/hsoft/send2trash.git")
15159 (commit version)))
15160 (file-name (git-file-name name version))
15161 (sha256
15162 (base32
15163 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
15164 (build-system python-build-system)
15165 (arguments
15166 '(#:phases
15167 (modify-phases %standard-phases
15168 (add-before 'check 'pre-check
15169 (lambda _
15170 (mkdir-p "/tmp/foo")
15171 (setenv "HOME" "/tmp/foo")
15172 #t)))))
15173 (home-page "https://github.com/hsoft/send2trash")
15174 (synopsis "Send files to the user's @file{~/Trash} directory")
15175 (description "This package provides a Python library to send files to the
15176 user's @file{~/Trash} directory.")
15177 (properties `((python2-variant . ,(delay python2-send2trash))))
15178 (license license:bsd-3)))
15179
15180 (define-public python2-send2trash
15181 (package
15182 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
15183 (arguments
15184 (substitute-keyword-arguments (package-arguments python-send2trash)
15185 ((#:phases phases)
15186 `(modify-phases ,phases
15187 (add-before 'check 'setenv
15188 (lambda _
15189 (setenv "PYTHONPATH"
15190 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
15191 #t))))))))
15192
15193 (define-public python-yapf
15194 (package
15195 (name "python-yapf")
15196 (version "0.29.0")
15197 (source
15198 (origin
15199 (method url-fetch)
15200 (uri (pypi-uri "yapf" version))
15201 (sha256
15202 (base32
15203 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
15204 (build-system python-build-system)
15205 (home-page "https://github.com/google/yapf")
15206 (synopsis "Formatter for Python code")
15207 (description "YAPF is a formatter for Python code. It's based off of
15208 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15209 takes the code and reformats it to the best formatting that conforms to the
15210 style guide, even if the original code didn't violate the style guide.")
15211 (license license:asl2.0)))
15212
15213 (define-public python2-yapf
15214 (package-with-python2 python-yapf))
15215
15216 (define-public python-gyp
15217 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
15218 (revision "0"))
15219 (package
15220 (name "python-gyp")
15221 ;; Google does not release versions,
15222 ;; based on second most recent commit date.
15223 (version (git-version "0.0.0" revision commit))
15224 (source
15225 (origin
15226 ;; Google does not release tarballs,
15227 ;; git checkout is needed.
15228 (method git-fetch)
15229 (uri (git-reference
15230 (url "https://chromium.googlesource.com/external/gyp")
15231 (commit commit)))
15232 (file-name (git-file-name name version))
15233 (sha256
15234 (base32
15235 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
15236 (build-system python-build-system)
15237 (home-page "https://gyp.gsrc.io/")
15238 (synopsis "GYP is a Meta-Build system")
15239 (description
15240 "GYP builds build systems for large, cross platform applications.
15241 It can be used to generate XCode projects, Visual Studio projects, Ninja build
15242 files, and Makefiles.")
15243 (license license:bsd-3))))
15244
15245 (define-public python2-gyp
15246 (package-with-python2 python-gyp))
15247
15248 (define-public python-whatever
15249 (package
15250 (name "python-whatever")
15251 (version "0.6")
15252 (source
15253 (origin
15254 (method git-fetch)
15255 (uri (git-reference
15256 (url "https://github.com/Suor/whatever")
15257 (commit version)))
15258 (file-name (git-file-name name version))
15259 (sha256
15260 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
15261 (build-system python-build-system)
15262 (arguments
15263 `(#:phases
15264 (modify-phases %standard-phases
15265 (replace 'check
15266 (lambda _
15267 (invoke "py.test"))))))
15268 (native-inputs
15269 `(("python-pytest" ,python-pytest)))
15270 (home-page "http://github.com/Suor/whatever")
15271 (synopsis "Make anonymous functions by partial application of operators")
15272 (description "@code{whatever} provides an easy way to make anonymous
15273 functions by partial application of operators.")
15274 (license license:bsd-3)))
15275
15276 (define-public python2-whatever
15277 (package-with-python2 python-whatever))
15278
15279 (define-public python-funcy
15280 (package
15281 (name "python-funcy")
15282 (version "1.11")
15283 (source
15284 (origin
15285 (method git-fetch)
15286 (uri (git-reference
15287 (url "https://github.com/Suor/funcy.git")
15288 (commit version)))
15289 (sha256
15290 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
15291 (file-name (git-file-name name version))))
15292 (build-system python-build-system)
15293 (arguments
15294 `(#:phases
15295 (modify-phases %standard-phases
15296 (replace 'check
15297 (lambda _
15298 (invoke "py.test"))))))
15299 (native-inputs
15300 `(("python-pytest" ,python-pytest)
15301 ("python-whatever" ,python-whatever)))
15302 (home-page "http://github.com/Suor/funcy")
15303 (synopsis "Functional tools")
15304 (description "@code{funcy} is a library that provides functional tools.
15305 Examples are:
15306 @enumerate
15307 @item merge - Merges collections of the same type
15308 @item walk - Type-preserving map
15309 @item select - Selects a part of a collection
15310 @item take - Takes the first n items of a collection
15311 @item first - Takes the first item of a collection
15312 @item remove - Predicated-removes items of a collection
15313 @item concat - Concatenates two collections
15314 @item flatten - Flattens a collection with subcollections
15315 @item distinct - Returns only distinct items
15316 @item split - Predicated-splits a collection
15317 @item split_at - Splits a collection at a given item
15318 @item group_by - Groups items by group
15319 @item pairwise - Pairs off adjacent items
15320 @item partial - Partially-applies a function
15321 @item curry - Curries a function
15322 @item compose - Composes functions
15323 @item complement - Complements a predicate
15324 @item all_fn - \"all\" with predicate
15325 @end enumerate")
15326 (license license:bsd-3)))
15327
15328 (define-public python2-funcy
15329 (package-with-python2 python-funcy))
15330
15331 (define-public python-isoweek
15332 (package
15333 (name "python-isoweek")
15334 (version "1.3.3")
15335 (source
15336 (origin
15337 (method url-fetch)
15338 (uri (pypi-uri "isoweek" version))
15339 (sha256
15340 (base32
15341 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
15342 (build-system python-build-system)
15343 (home-page "https://github.com/gisle/isoweek")
15344 (synopsis "Objects representing a week")
15345 (description "The @code{isoweek} module provide the class Week that
15346 implements the week definition of ISO 8601. This standard also defines
15347 a notation for identifying weeks; yyyyWww (where the W is a literal).
15348 Week instances stringify to this form.")
15349 (license license:bsd-3)))
15350
15351 (define-public python2-isoweek
15352 (package-with-python2 python-isoweek))
15353
15354 (define-public python-tokenize-rt
15355 (package
15356 (name "python-tokenize-rt")
15357 (version "2.0.1")
15358 (source
15359 (origin
15360 (method url-fetch)
15361 (uri (pypi-uri "tokenize-rt" version))
15362 (sha256
15363 (base32
15364 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15365 (build-system python-build-system)
15366 (home-page "https://github.com/asottile/tokenize-rt")
15367 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15368 (description
15369 "This Python library is a wrapper around @code{tokenize} from the Python
15370 standard library. It provides two additional tokens @code{ESCAPED_NL} and
15371 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15372 and @code{tokens_to_src} to roundtrip.")
15373 (license license:expat)))
15374
15375 (define-public python-future-fstrings
15376 (package
15377 (name "python-future-fstrings")
15378 (version "0.4.1")
15379 (source
15380 (origin
15381 (method url-fetch)
15382 (uri (pypi-uri "future_fstrings" version))
15383 (sha256
15384 (base32
15385 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15386 (build-system python-build-system)
15387 (propagated-inputs
15388 `(("python-tokenize-rt" ,python-tokenize-rt)))
15389 (home-page "https://github.com/asottile/future-fstrings")
15390 (synopsis "Backport of fstrings to Python < 3.6")
15391 (description
15392 "This package provides a UTF-8 compatible encoding
15393 @code{future_fstrings}, which performs source manipulation. It decodes the
15394 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15395 @code{f} strings.")
15396 (license license:expat)))
15397
15398 (define-public python-typed-ast
15399 (package
15400 (name "python-typed-ast")
15401 (version "1.4.0")
15402 (source
15403 (origin
15404 (method git-fetch)
15405 (uri (git-reference
15406 (url "https://github.com/python/typed_ast.git")
15407 (commit version)))
15408 (sha256
15409 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15410 (file-name (git-file-name name version))))
15411 (build-system python-build-system)
15412 (arguments
15413 `(#:modules ((guix build utils)
15414 (guix build python-build-system)
15415 (ice-9 ftw)
15416 (srfi srfi-1)
15417 (srfi srfi-26))
15418 #:phases
15419 (modify-phases %standard-phases
15420 (replace 'check
15421 (lambda _
15422 (let ((cwd (getcwd)))
15423 (setenv "PYTHONPATH"
15424 (string-append cwd "/build/"
15425 (find (cut string-prefix? "lib" <>)
15426 (scandir (string-append cwd "/build")))
15427 ":"
15428 (getenv "PYTHONPATH"))))
15429 (invoke "pytest")
15430 #t)))))
15431 (native-inputs `(("python-pytest" ,python-pytest)))
15432 (home-page "https://github.com/python/typed_ast")
15433 (synopsis "Fork of Python @code{ast} modules with type comment support")
15434 (description "This package provides a parser similar to the standard
15435 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15436 include PEP 484 type comments and are independent of the version of Python
15437 under which they are run. The @code{typed_ast} parsers produce the standard
15438 Python AST (plus type comments), and are both fast and correct, as they are
15439 based on the CPython 2.7 and 3.7 parsers.")
15440 ;; See the file "LICENSE" for the details.
15441 (license (list license:psfl
15442 license:asl2.0
15443 license:expat)))) ;ast27/Parser/spark.py
15444
15445 (define-public python-typing
15446 (package
15447 (name "python-typing")
15448 (version "3.6.6")
15449 (source
15450 (origin
15451 (method url-fetch)
15452 (uri (pypi-uri "typing" version))
15453 (sha256
15454 (base32
15455 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15456 (build-system python-build-system)
15457 (home-page "https://docs.python.org/3/library/typing.html")
15458 (synopsis "Type hints for Python")
15459 (description "This is a backport of the standard library @code{typing}
15460 module to Python versions older than 3.5. Typing defines a standard notation
15461 for Python function and variable type annotations. The notation can be used
15462 for documenting code in a concise, standard format, and it has been designed
15463 to also be used by static and runtime type checkers, static analyzers, IDEs
15464 and other tools.")
15465 (license license:psfl)))
15466
15467 (define-public python2-typing
15468 (package-with-python2 python-typing))
15469
15470 (define-public python-typing-extensions
15471 (package
15472 (name "python-typing-extensions")
15473 (version "3.7.2")
15474 (source
15475 (origin
15476 (method url-fetch)
15477 (uri (pypi-uri "typing_extensions" version))
15478 (sha256
15479 (base32
15480 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15481 (build-system python-build-system)
15482 (home-page
15483 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15484 (synopsis "Experimental type hints for Python")
15485 (description
15486 "The typing_extensions module contains additional @code{typing} hints not
15487 yet present in the of the @code{typing} standard library.
15488 Included are implementations of:
15489 @enumerate
15490 @item ClassVar
15491 @item ContextManager
15492 @item Counter
15493 @item DefaultDict
15494 @item Deque
15495 @item NewType
15496 @item NoReturn
15497 @item overload
15498 @item Protocol
15499 @item runtime
15500 @item Text
15501 @item Type
15502 @item TYPE_CHECKING
15503 @item AsyncGenerator
15504 @end enumerate\n")
15505 (license license:psfl)))
15506
15507 (define-public bpython
15508 (package
15509 (name "bpython")
15510 (version "0.18")
15511 (source
15512 (origin
15513 (method url-fetch)
15514 (uri (pypi-uri "bpython" version))
15515 (sha256
15516 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
15517 (build-system python-build-system)
15518 (arguments
15519 `(#:phases
15520 (modify-phases %standard-phases
15521 (add-after 'unpack 'remove-failing-test
15522 (lambda _
15523 ;; Remove failing test. FIXME: make it pass
15524 (delete-file "bpython/test/test_args.py")
15525 #t))
15526 (add-after 'wrap 'add-aliases
15527 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15528 (lambda* (#:key outputs #:allow-other-keys)
15529 (let ((out (assoc-ref outputs "out")))
15530 (for-each
15531 (lambda (old new)
15532 (symlink old (string-append out "/bin/" new)))
15533 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15534 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15535 #t)))))
15536 (propagated-inputs
15537 `(("python-pygments" ,python-pygments)
15538 ("python-requests" ,python-requests)
15539 ("python-babel" ,python-babel) ; optional, for internationalization
15540 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15541 ("python-greenlet" ,python-greenlet)
15542 ("python-urwid" ,python-urwid) ; for bpython-urwid only
15543 ("python-six" ,python-six)))
15544 (native-inputs
15545 `(("python-sphinx" ,python-sphinx)
15546 ("python-mock" ,python-mock)))
15547 (home-page "https://bpython-interpreter.org/")
15548 (synopsis "Fancy interface to the Python interpreter")
15549 (description "Bpython is a fancy interface to the Python
15550 interpreter. bpython's main features are
15551
15552 @enumerate
15553 @item in-line syntax highlighting,
15554 @item readline-like autocomplete with suggestions displayed as you type,
15555 @item expected parameter list for any Python function,
15556 @item \"rewind\" function to pop the last line of code from memory and
15557 re-evaluate,
15558 @item send the code you've entered off to a pastebin,
15559 @item save the code you've entered to a file, and
15560 @item auto-indentation.
15561 @end enumerate")
15562 (license license:expat)))
15563
15564 (define-public bpython2
15565 (let ((base (package-with-python2
15566 (strip-python2-variant bpython))))
15567 (package (inherit base)
15568 (name "bpython2")
15569 (arguments
15570 `(#:python ,python-2
15571 #:phases
15572 (modify-phases %standard-phases
15573 (add-after 'unpack 'remove-failing-test
15574 (lambda _
15575 ;; Remove failing test. FIXME: make it pass
15576 (delete-file "bpython/test/test_args.py")
15577 ;; Disable failing test-cases (renaming inhibits they are
15578 ;; discovered)
15579 (substitute* "bpython/test/test_curtsies_repl.py"
15580 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15581 (string-append a "xxx_off_" b))
15582 (("^(\\s*def )(test_complex\\W)" _ a b)
15583 (string-append a "xxx_off_" b)))
15584 #t))
15585 (add-before 'build 'rename-scripts
15586 ;; rename the scripts to bypthon2, bpdb2, etc.
15587 (lambda _
15588 (substitute* "setup.py"
15589 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15590 (string-append name "2" rest "\n"))
15591 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15592 (string-append name "2" (or sub "") rest "\n")))
15593 #t))))))))
15594
15595 (define-public python-pyinotify
15596 (package
15597 (name "python-pyinotify")
15598 (version "0.9.6")
15599 (source (origin
15600 (method url-fetch)
15601 (uri (pypi-uri "pyinotify" version))
15602 (sha256
15603 (base32
15604 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15605 (build-system python-build-system)
15606 (arguments `(#:tests? #f)) ;no tests
15607 (home-page "https://github.com/seb-m/pyinotify")
15608 (synopsis "Python library for monitoring inotify events")
15609 (description
15610 "@code{pyinotify} provides a Python interface for monitoring
15611 file system events on Linux.")
15612 (license license:expat)))
15613
15614 (define-public python2-pyinotify
15615 (package-with-python2 python-pyinotify))
15616
15617 ;; Ada parser uses this version.
15618 (define-public python2-quex-0.67.3
15619 (package
15620 (name "python2-quex")
15621 (version "0.67.3")
15622 (source
15623 (origin
15624 (method url-fetch)
15625 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15626 (version-major+minor version)
15627 "/quex-" version ".zip"))
15628 (sha256
15629 (base32
15630 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15631 (build-system python-build-system)
15632 (native-inputs
15633 `(("unzip" ,unzip)))
15634 (arguments
15635 `(#:python ,python-2
15636 #:tests? #f
15637 #:phases
15638 (modify-phases %standard-phases
15639 (delete 'configure)
15640 (delete 'build)
15641 (replace 'install
15642 (lambda* (#:key outputs #:allow-other-keys)
15643 (let* ((out (assoc-ref outputs "out"))
15644 (share/quex (string-append out "/share/quex"))
15645 (bin (string-append out "/bin")))
15646 (copy-recursively "." share/quex)
15647 (mkdir-p bin)
15648 (symlink (string-append share/quex "/quex-exe.py")
15649 (string-append bin "/quex"))
15650 #t))))))
15651 (native-search-paths
15652 (list (search-path-specification
15653 (variable "QUEX_PATH")
15654 (files '("share/quex")))))
15655 (home-page "http://quex.sourceforge.net/")
15656 (synopsis "Lexical analyzer generator in Python")
15657 (description "@code{quex} is a lexical analyzer generator in Python.")
15658 (license license:lgpl2.1+))) ; Non-military
15659
15660 (define-public python2-quex
15661 (package (inherit python2-quex-0.67.3)
15662 (name "python2-quex")
15663 (version "0.68.1")
15664 (source
15665 (origin
15666 (method url-fetch)
15667 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15668 (sha256
15669 (base32
15670 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15671 (file-name (string-append name "-" version ".tar.gz"))))))
15672
15673 (define-public python-more-itertools
15674 (package
15675 (name "python-more-itertools")
15676 (version "7.1.0")
15677 (source
15678 (origin
15679 (method url-fetch)
15680 (uri (pypi-uri "more-itertools" version))
15681 (sha256
15682 (base32
15683 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15684 (build-system python-build-system)
15685 (home-page "https://github.com/erikrose/more-itertools")
15686 (synopsis "More routines for operating on iterables, beyond itertools")
15687 (description "Python's built-in @code{itertools} module implements a
15688 number of iterator building blocks inspired by constructs from APL, Haskell,
15689 and SML. @code{more-itertools} includes additional building blocks for
15690 working with iterables.")
15691 (properties `((python2-variant . ,(delay python2-more-itertools))))
15692 (license license:expat)))
15693
15694 ;; The 5.x series are the last versions supporting Python 2.7.
15695 (define-public python2-more-itertools
15696 (package
15697 (inherit python-more-itertools)
15698 (name "python2-more-itertools")
15699 (version "5.0.0")
15700 (source (origin
15701 (method url-fetch)
15702 (uri (pypi-uri "more-itertools" version))
15703 (sha256
15704 (base32
15705 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15706 (arguments
15707 `(#:python ,python2-minimal))
15708 (propagated-inputs
15709 `(("python2-six" ,python2-six-bootstrap)))))
15710
15711 (define-public python-latexcodec
15712 (package
15713 (name "python-latexcodec")
15714 (version "1.0.7")
15715 (source
15716 (origin
15717 (method url-fetch)
15718 (uri (pypi-uri "latexcodec" version))
15719 (sha256
15720 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15721 (build-system python-build-system)
15722 (inputs
15723 `(("python-six" ,python-six)))
15724 (home-page "https://readthedocs.org/projects/latexcodec/")
15725 (synopsis "Work with LaTeX code in Python")
15726 (description "Lexer and codec to work with LaTeX code in Python.")
15727 (license license:expat)))
15728
15729 (define-public python-pybtex
15730 (package
15731 (name "python-pybtex")
15732 (version "0.22.2")
15733 (source
15734 (origin
15735 (method url-fetch)
15736 (uri (pypi-uri "pybtex" version))
15737 (sha256
15738 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15739 (build-system python-build-system)
15740 (native-inputs
15741 `(("python-nose" ,python-nose)))
15742 (inputs
15743 `(("python-latexcodec" ,python-latexcodec)
15744 ("python-pyyaml" ,python-pyyaml)
15745 ("python-six" ,python-six)))
15746 (arguments
15747 `(#:test-target "nosetests"))
15748 (home-page "https://pybtex.org/")
15749 (synopsis "BibTeX-compatible bibliography processor")
15750 (description "Pybtex is a BibTeX-compatible bibliography processor written
15751 in Python. You can simply type pybtex instead of bibtex.")
15752 (license license:expat)))
15753
15754 (define-public python-onetimepass
15755 (package
15756 (name "python-onetimepass")
15757 (version "1.0.1")
15758 (source
15759 (origin
15760 (method url-fetch)
15761 (uri (pypi-uri "onetimepass" version))
15762 (sha256
15763 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15764 (build-system python-build-system)
15765 (propagated-inputs `(("python-six" ,python-six)))
15766 (home-page "https://github.com/tadeck/onetimepass/")
15767 (synopsis "One-time password library")
15768 (description "Python one-time password library for HMAC-based (HOTP) and
15769 time-based (TOTP) passwords.")
15770 (license license:expat)))
15771
15772 (define-public python-parso
15773 (package
15774 (name "python-parso")
15775 (version "0.6.2")
15776 (source
15777 (origin
15778 (method url-fetch)
15779 (uri (pypi-uri "parso" version))
15780 (sha256
15781 (base32
15782 "0mr1j4ijqnrihz1yap34g6i8vjldg5lz814sz4v0d8pbqvh5jmhc"))))
15783 (native-inputs
15784 `(("python-pytest" ,python-pytest)))
15785 (build-system python-build-system)
15786 (arguments
15787 `(#:phases (modify-phases %standard-phases
15788 (replace 'check
15789 (lambda _ (invoke "pytest" "-vv"))))))
15790 (home-page "https://github.com/davidhalter/parso")
15791 (synopsis "Python Parser")
15792 (description "Parso is a Python parser that supports error recovery and
15793 round-trip parsing for different Python versions (in multiple Python versions).
15794 Parso is also able to list multiple syntax errors in your Python file.")
15795 (license license:expat)))
15796
15797 (define-public python2-parso
15798 (package-with-python2 python-parso))
15799
15800 (define-public python-async-generator
15801 (package
15802 (name "python-async-generator")
15803 (version "1.10")
15804 (source
15805 (origin
15806 (method url-fetch)
15807 (uri (pypi-uri "async_generator" version))
15808 (sha256
15809 (base32
15810 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15811 (build-system python-build-system)
15812 (native-inputs
15813 `(("python-pytest" ,python-pytest)))
15814 (home-page "https://github.com/python-trio/async_generator")
15815 (synopsis "Async generators and context managers for Python 3.5+")
15816 (description "@code{async_generator} back-ports Python 3.6's native async
15817 generators and Python 3.7's context managers into Python 3.5.")
15818 ;; Dual licensed.
15819 (license (list license:expat license:asl2.0))))
15820
15821 (define-public python-async-timeout
15822 (package
15823 (name "python-async-timeout")
15824 (version "3.0.1")
15825 (source
15826 (origin
15827 (method url-fetch)
15828 (uri (pypi-uri "async-timeout" version))
15829 (sha256
15830 (base32
15831 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15832 (build-system python-build-system)
15833 (home-page "https://github.com/aio-libs/async_timeout/")
15834 (synopsis "Timeout context manager for asyncio programs")
15835 (description "@code{async-timeout} provides a timeout timeout context
15836 manager compatible with @code{asyncio}.")
15837 (license license:asl2.0)))
15838
15839 (define-public python-glob2
15840 (package
15841 (name "python-glob2")
15842 (version "0.7")
15843 (source
15844 (origin
15845 (method git-fetch)
15846 (uri (git-reference
15847 (url "https://github.com/miracle2k/python-glob2.git")
15848 (commit (string-append "v" version))))
15849 (file-name (git-file-name name version))
15850 (sha256
15851 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15852 (build-system python-build-system)
15853 (home-page "https://github.com/miracle2k/python-glob2/")
15854 (synopsis "Extended Version of the python buildin glob module")
15855 (description "This is an extended version of the Python
15856 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15857 adds:
15858
15859 @itemize
15860 @item The ability to capture the text matched by glob patterns, and return
15861 those matches alongside the file names.
15862 @item A recursive @code{**} globbing syntax, akin for example to the
15863 @code{globstar} option of Bash.
15864 @item The ability to replace the file system functions used, in order to glob
15865 on virtual file systems.
15866 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15867 @end itemize
15868
15869 Glob2 currently based on the glob code from Python 3.3.1.")
15870 (license license:bsd-2)))
15871
15872 (define-public python2-glob2
15873 (package-with-python2 python-glob2))
15874
15875 (define-public python-gipc
15876 (package
15877 (name "python-gipc")
15878 (version "0.6.0")
15879 (source
15880 (origin
15881 (method url-fetch)
15882 (uri (pypi-uri "gipc" version ".zip"))
15883 (sha256
15884 (base32
15885 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15886 (build-system python-build-system)
15887 (native-inputs
15888 `(("unzip" ,unzip)))
15889 (propagated-inputs
15890 `(("python-gevent" ,python-gevent)))
15891 (home-page "https://gehrcke.de/gipc/")
15892 (synopsis "Child process management in the context of gevent")
15893 (description "Usage of Python's multiprocessing package in a
15894 gevent-powered application may raise problems. With @code{gipc},
15895 process-based child processes can safely be created anywhere within a
15896 gevent-powered application.")
15897 (license license:expat)))
15898
15899 (define-public python2-gipc
15900 (package-with-python2 python-gipc))
15901
15902 (define-public python-fusepy
15903 (package
15904 (name "python-fusepy")
15905 (version "2.0.4")
15906 (source
15907 (origin
15908 (method url-fetch)
15909 (uri (pypi-uri "fusepy" version))
15910 (sha256
15911 (base32
15912 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15913 (build-system python-build-system)
15914 (arguments
15915 `(#:phases
15916 (modify-phases %standard-phases
15917 (add-before 'build 'set-library-file-name
15918 (lambda* (#:key inputs #:allow-other-keys)
15919 (let ((fuse (assoc-ref inputs "fuse")))
15920 (substitute* "fuse.py"
15921 (("find_library\\('fuse'\\)")
15922 (string-append "'" fuse "/lib/libfuse.so'")))
15923 #t))))))
15924 (propagated-inputs
15925 `(("fuse" ,fuse)))
15926 (home-page "https://github.com/fusepy/fusepy")
15927 (synopsis "Simple ctypes bindings for FUSE")
15928 (description "Python module that provides a simple interface to FUSE and
15929 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15930 (license license:isc)))
15931
15932 (define-public python2-fusepy
15933 (package-with-python2 python-fusepy))
15934
15935 (define-public python2-gdrivefs
15936 (package
15937 (name "python2-gdrivefs")
15938 (version "0.14.9")
15939 (source
15940 (origin
15941 (method url-fetch)
15942 (uri (pypi-uri "gdrivefs" version))
15943 (sha256
15944 (base32
15945 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15946 (build-system python-build-system)
15947 (arguments
15948 `(#:python ,python-2
15949 #:phases
15950 (modify-phases %standard-phases
15951 (add-before 'build 'patch-setup-py
15952 (lambda _
15953 ;; Update requirements from dependency==version
15954 ;; to dependency>=version
15955 (substitute* "gdrivefs/resources/requirements.txt"
15956 (("==") ">="))
15957 #t)))))
15958 (native-inputs
15959 `(("python2-gipc" ,python2-gipc)
15960 ("python2-gevent" ,python2-gevent)
15961 ("python2-greenlet" ,python2-greenlet)
15962 ("python2-httplib2" ,python2-httplib2)
15963 ("python2-uritemplate" ,python2-uritemplate)
15964 ("python2-oauth2client" ,python2-oauth2client)
15965 ("python2-six" ,python2-six)))
15966 (propagated-inputs
15967 `(("python2-dateutil" ,python2-dateutil)
15968 ("python2-fusepy" ,python2-fusepy)
15969 ("python2-google-api-client" ,python2-google-api-client)))
15970 (home-page "https://github.com/dsoprea/GDriveFS")
15971 (synopsis "Mount Google Drive as a local file system")
15972 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15973 under Python 2.7.")
15974 (license license:gpl2)))
15975
15976 (define-public pybind11
15977 (package
15978 (name "pybind11")
15979 (version "2.4.3")
15980 (source (origin
15981 (method git-fetch)
15982 (uri (git-reference
15983 (url "https://github.com/pybind/pybind11.git")
15984 (commit (string-append "v" version))))
15985 (sha256
15986 (base32
15987 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
15988 (file-name (git-file-name name version))))
15989 (build-system cmake-build-system)
15990 (native-inputs
15991 `(("python" ,python-wrapper)
15992
15993 ;; The following dependencies are used for tests.
15994 ("python-pytest" ,python-pytest)
15995 ("catch" ,catch-framework2-1)
15996 ("eigen" ,eigen)))
15997 (arguments
15998 `(#:configure-flags
15999 (list (string-append "-DCATCH_INCLUDE_DIR="
16000 (assoc-ref %build-inputs "catch")
16001 "/include/catch"))
16002
16003 #:phases (modify-phases %standard-phases
16004 (add-after 'install 'install-python
16005 (lambda* (#:key outputs #:allow-other-keys)
16006 (let ((out (assoc-ref outputs "out")))
16007 (with-directory-excursion "../source"
16008 (setenv "PYBIND11_USE_CMAKE" "yes")
16009 (invoke "python" "setup.py" "install"
16010 "--single-version-externally-managed"
16011 "--root=/"
16012 (string-append "--prefix=" out)))))))
16013
16014 #:test-target "check"))
16015 (home-page "https://github.com/pybind/pybind11/")
16016 (synopsis "Seamless operability between C++11 and Python")
16017 (description
16018 "@code{pybind11} is a lightweight header-only library that exposes C++
16019 types in Python and vice versa, mainly to create Python bindings of existing
16020 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
16021 library: to minimize boilerplate code in traditional extension modules by
16022 inferring type information using compile-time introspection.")
16023 (license license:bsd-3)))
16024
16025 (define-public python-fasteners
16026 (package
16027 (name "python-fasteners")
16028 (version "0.14.1")
16029 (source
16030 (origin
16031 (method url-fetch)
16032 (uri (pypi-uri "fasteners" version))
16033 (sha256
16034 (base32
16035 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16036 (build-system python-build-system)
16037 (propagated-inputs
16038 `(("python-monotonic" ,python-monotonic)
16039 ("python-six" ,python-six)
16040 ("python-testtools" ,python-testtools)))
16041 (home-page "https://github.com/harlowja/fasteners")
16042 (synopsis "Python package that provides useful locks")
16043 (description
16044 "This package provides a Python program that provides following locks:
16045
16046 @itemize
16047 @item Locking decorator
16048 @item Reader-writer locks
16049 @item Inter-process locks
16050 @item Generic helpers
16051 @end itemize\n")
16052 (properties `((python2-variant . ,(delay python2-fasteners))))
16053 (license license:asl2.0)))
16054
16055 (define-public python2-fasteners
16056 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16057 (package
16058 (inherit base)
16059 (propagated-inputs
16060 `(("python2-futures" ,python2-futures)
16061 ,@(package-propagated-inputs base))))))
16062
16063 (define-public python-requests-file
16064 (package
16065 (name "python-requests-file")
16066 (version "1.4.3")
16067 (source
16068 (origin
16069 (method url-fetch)
16070 (uri (pypi-uri "requests-file" version))
16071 (sha256
16072 (base32
16073 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16074 (build-system python-build-system)
16075 (propagated-inputs
16076 `(("python-requests" ,python-requests)
16077 ("python-six" ,python-six)))
16078 (home-page
16079 "https://github.com/dashea/requests-file")
16080 (synopsis "File transport adapter for Requests")
16081 (description
16082 "Requests-File is a transport adapter for use with the Requests Python
16083 library to allow local file system access via @code{file://} URLs.")
16084 (license license:asl2.0)))
16085
16086 (define-public python2-requests-file
16087 (package-with-python2 python-requests-file))
16088
16089 (define-public python-tldextract
16090 (package
16091 (name "python-tldextract")
16092 (version "2.2.0")
16093 (source
16094 (origin
16095 (method url-fetch)
16096 (uri (pypi-uri "tldextract" version))
16097 (sha256
16098 (base32
16099 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16100 (build-system python-build-system)
16101 (native-inputs
16102 `(("python-pytest" ,python-pytest)
16103 ("python-responses" ,python-responses)))
16104 (propagated-inputs
16105 `(("python-idna" ,python-idna)
16106 ("python-requests" ,python-requests)
16107 ("python-requests-file" ,python-requests-file)))
16108 (home-page
16109 "https://github.com/john-kurkowski/tldextract")
16110 (synopsis
16111 "Separate the TLD from the registered domain and subdomains of a URL")
16112 (description
16113 "TLDExtract accurately separates the TLD from the registered domain and
16114 subdomains of a URL, using the Public Suffix List. By default, this includes
16115 the public ICANN TLDs and their exceptions. It can optionally support the
16116 Public Suffix List's private domains as well.")
16117 (license license:bsd-3)))
16118
16119 (define-public python2-tldextract
16120 (package-with-python2 python-tldextract))
16121
16122 (define-public python-pynamecheap
16123 (package
16124 (name "python-pynamecheap")
16125 (version "0.0.3")
16126 (source
16127 (origin
16128 (method url-fetch)
16129 (uri (pypi-uri "PyNamecheap" version))
16130 (sha256
16131 (base32
16132 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16133 (build-system python-build-system)
16134 (propagated-inputs
16135 `(("python-requests" ,python-requests)))
16136 (home-page
16137 "https://github.com/Bemmu/PyNamecheap")
16138 (synopsis
16139 "Namecheap API client in Python")
16140 (description
16141 "PyNamecheap is a Namecheap API client in Python.")
16142 (license license:expat)))
16143
16144 (define-public python2-pynamecheap
16145 (package-with-python2 python-pynamecheap))
16146
16147 (define-public python-dns-lexicon
16148 (package
16149 (name "python-dns-lexicon")
16150 (version "2.4.0")
16151 (source
16152 (origin
16153 (method url-fetch)
16154 (uri (pypi-uri "dns-lexicon" version))
16155 (sha256
16156 (base32
16157 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16158 (build-system python-build-system)
16159 (arguments
16160 `(#:tests? #f)) ;requires internet access
16161 (propagated-inputs
16162 `(("python-future" ,python-future)
16163 ("python-pynamecheap" ,python-pynamecheap)
16164 ("python-requests" ,python-requests)
16165 ("python-tldextract" ,python-tldextract)
16166 ("python-urllib3" ,python-urllib3)))
16167 (home-page "https://github.com/AnalogJ/lexicon")
16168 (synopsis
16169 "Manipulate DNS records on various DNS providers")
16170 (description
16171 "Lexicon provides a way to manipulate DNS records on multiple DNS
16172 providers in a standardized way. It has a CLI but it can also be used as a
16173 Python library. It was designed to be used in automation, specifically with
16174 Let's Encrypt.")
16175 (license license:expat)))
16176
16177 (define-public python2-dns-lexicon
16178 (package-with-python2 python-dns-lexicon))
16179
16180 (define-public python-commandlines
16181 (package
16182 (name "python-commandlines")
16183 (version "0.4.1")
16184 (source
16185 (origin
16186 (method url-fetch)
16187 (uri (pypi-uri "commandlines" version))
16188 (sha256
16189 (base32
16190 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
16191 (build-system python-build-system)
16192 (home-page "https://github.com/chrissimpkins/commandlines")
16193 (synopsis "Command line argument to object parsing library")
16194 (description
16195 "@code{Commandlines} is a Python library for command line application
16196 development that supports command line argument parsing, command string
16197 validation testing and application logic.")
16198 (license license:expat)))
16199
16200 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
16201 ;; python-numba. They have a very unflexible relationship.
16202 (define-public python-numba
16203 (package
16204 (name "python-numba")
16205 (version "0.46.0")
16206 (source
16207 (origin
16208 (method url-fetch)
16209 (uri (pypi-uri "numba" version))
16210 (sha256
16211 (base32
16212 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
16213 (build-system python-build-system)
16214 (arguments
16215 `(#:modules ((guix build utils)
16216 (guix build python-build-system)
16217 (ice-9 ftw)
16218 (srfi srfi-1)
16219 (srfi srfi-26))
16220 #:phases
16221 (modify-phases %standard-phases
16222 (add-after 'unpack 'disable-proprietary-features
16223 (lambda _
16224 (setenv "NUMBA_DISABLE_HSA" "1")
16225 (setenv "NUMBA_DISABLE_CUDA" "1")
16226 #t))
16227 (add-after 'unpack 'remove-failing-tests
16228 (lambda _
16229 ;; FIXME: These tests fail for unknown reasons:
16230 ;; test_non_writable_pycache, test_non_creatable_pycache, and
16231 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
16232 (substitute* "numba/tests/test_dispatcher.py"
16233 (("def test(_non_writable_pycache)" _ m)
16234 (string-append "def guix_skip" m))
16235 (("def test(_non_creatable_pycache)" _ m)
16236 (string-append "def guix_skip" m))
16237 (("def test(_frozen)" _ m)
16238 (string-append "def guix_skip" m)))
16239
16240 ;; These tests fail because we don't run the tests from the build
16241 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
16242 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
16243 (substitute* "numba/tests/test_pycc.py"
16244 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
16245 (string-append "def guix_skip" m)))
16246
16247 ;; These tests fail because our version of Python does not have
16248 ;; a recognizable front-end for the Numba distribution to use
16249 ;; to check against.
16250 (substitute* "numba/tests/test_entrypoints.py"
16251 (("def test(_init_entrypoint)" _ m)
16252 (string-append "def guix_skip" m)))
16253 (substitute* "numba/tests/test_jitclasses.py"
16254 (("def test(_jitclass_longlabel_not_truncated)" _ m)
16255 (string-append "def guix_skip" m)))
16256 #t))
16257 (replace 'check
16258 (lambda _
16259 (let ((cwd (getcwd)))
16260 (setenv "PYTHONPATH"
16261 (string-append cwd "/build/"
16262 (find (cut string-prefix? "lib" <>)
16263 (scandir (string-append cwd "/build")))
16264 ":"
16265 (getenv "PYTHONPATH")))
16266 ;; Something is wrong with the PYTHONPATH when running the
16267 ;; tests from the build directory, as it complains about not being
16268 ;; able to import certain modules.
16269 (with-directory-excursion "/tmp"
16270 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
16271 #t)))))
16272 (propagated-inputs
16273 `(("python-llvmlite" ,python-llvmlite)
16274 ("python-numpy" ,python-numpy)
16275 ("python-singledispatch" ,python-singledispatch)))
16276 ;; Needed for tests.
16277 (inputs
16278 `(("python-jinja2" ,python-jinja2)
16279 ("python-pygments" ,python-pygments)))
16280 (home-page "https://numba.pydata.org")
16281 (synopsis "Compile Python code using LLVM")
16282 (description "Numba gives you the power to speed up your applications with
16283 high performance functions written directly in Python. With a few
16284 annotations, array-oriented and math-heavy Python code can be just-in-time
16285 compiled to native machine instructions, similar in performance to C, C++ and
16286 Fortran, without having to switch languages or Python interpreters.
16287
16288 Numba works by generating optimized machine code using the LLVM compiler
16289 infrastructure at import time, runtime, or statically (using the included pycc
16290 tool).")
16291 (license license:bsd-3)))
16292
16293 (define-public python-numcodecs
16294 (package
16295 (name "python-numcodecs")
16296 (version "0.6.4")
16297 (source
16298 (origin
16299 (method url-fetch)
16300 (uri (pypi-uri "numcodecs" version))
16301 (sha256
16302 (base32
16303 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
16304 (build-system python-build-system)
16305 (propagated-inputs
16306 `(("python-numpy" ,python-numpy)
16307 ("python-msgpack" ,python-msgpack)))
16308 (native-inputs
16309 `(("python-pytest" ,python-pytest)
16310 ("python-setuptools-scm" ,python-setuptools-scm)))
16311 (home-page "https://github.com/zarr-developers/numcodecs")
16312 (synopsis "Buffer compression and transformation codecs")
16313 (description
16314 "This Python package provides buffer compression and transformation
16315 codecs for use in data storage and communication applications.")
16316 (license license:expat)))
16317
16318 (define-public python-asciitree
16319 (package
16320 (name "python-asciitree")
16321 (version "0.3.3")
16322 (source
16323 (origin
16324 (method url-fetch)
16325 (uri (pypi-uri "asciitree" version))
16326 (sha256
16327 (base32
16328 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
16329 (build-system python-build-system)
16330 (home-page "https://github.com/mbr/asciitree")
16331 (synopsis "Draws ASCII trees")
16332 (description "This package draws tree structures using characters.")
16333 (license license:expat)))
16334
16335 (define-public python-zarr
16336 (package
16337 (name "python-zarr")
16338 (version "2.4.0")
16339 (source
16340 (origin
16341 (method url-fetch)
16342 (uri (pypi-uri "zarr" version))
16343 (sha256
16344 (base32
16345 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
16346 (build-system python-build-system)
16347 (arguments
16348 `(#:phases
16349 (modify-phases %standard-phases
16350 (add-after 'unpack 'disable-service-tests
16351 (lambda _
16352 (setenv "ZARR_TEST_ABS" "0")
16353 (setenv "ZARR_TEST_MONGO" "0")
16354 (setenv "ZARR_TEST_REDIS" "0")
16355 #t))
16356 (replace 'check
16357 (lambda _
16358 (invoke "pytest" "-vv" "-k" "not lmdb")
16359 #t)))))
16360 (propagated-inputs
16361 `(("python-asciitree" ,python-asciitree)
16362 ("python-fasteners" ,python-fasteners)
16363 ("python-numcodecs" ,python-numcodecs)
16364 ("python-numpy" ,python-numpy)))
16365 (native-inputs
16366 `(("python-pytest" ,python-pytest)
16367 ("python-setuptools-scm" ,python-setuptools-scm)))
16368 (home-page "https://github.com/zarr-developers/zarr-python")
16369 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16370 (description
16371 "This package provides an implementation of chunked, compressed,
16372 N-dimensional arrays for Python.")
16373 (license license:expat)))
16374
16375 (define-public python-anndata
16376 (package
16377 (name "python-anndata")
16378 (version "0.7.1")
16379 (source
16380 (origin
16381 (method url-fetch)
16382 (uri (pypi-uri "anndata" version))
16383 (sha256
16384 (base32
16385 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
16386 (build-system python-build-system)
16387 (arguments
16388 `(#:phases
16389 (modify-phases %standard-phases
16390 (add-after 'unpack 'delete-inconvenient-tests
16391 (lambda _
16392 ;; This test depends on python-scikit-learn.
16393 (delete-file "anndata/tests/test_inplace_subset.py")
16394 #t))
16395 (delete 'check)
16396 (add-after 'install 'check
16397 (lambda* (#:key inputs outputs #:allow-other-keys)
16398 (add-installed-pythonpath inputs outputs)
16399 (invoke "pytest" "-vv"))))))
16400 (propagated-inputs
16401 `(("python-h5py" ,python-h5py)
16402 ("python-importlib-metadata" ,python-importlib-metadata)
16403 ("python-natsort" ,python-natsort)
16404 ("python-numcodecs" ,python-numcodecs)
16405 ("python-packaging" ,python-packaging)
16406 ("python-pandas" ,python-pandas)
16407 ("python-scipy" ,python-scipy)
16408 ("python-zarr" ,python-zarr)))
16409 (native-inputs
16410 `(("python-joblib" ,python-joblib)
16411 ("python-pytest" ,python-pytest)
16412 ("python-setuptools-scm" ,python-setuptools-scm)))
16413 (home-page "https://github.com/theislab/anndata")
16414 (synopsis "Annotated data for data analysis pipelines")
16415 (description "Anndata is a package for simple (functional) high-level APIs
16416 for data analysis pipelines. In this context, it provides an efficient,
16417 scalable way of keeping track of data together with learned annotations and
16418 reduces the code overhead typically encountered when using a mostly
16419 object-oriented library such as @code{scikit-learn}.")
16420 (license license:bsd-3)))
16421
16422 (define-public python-dill
16423 (package
16424 (name "python-dill")
16425 (version "0.3.1.1")
16426 (source
16427 (origin
16428 (method url-fetch)
16429 (uri (pypi-uri "dill" version))
16430 (sha256
16431 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
16432 (build-system python-build-system)
16433 (arguments
16434 `(#:phases
16435 (modify-phases %standard-phases
16436 (replace 'check
16437 (lambda _
16438 (with-directory-excursion "/tmp"
16439 (invoke "nosetests" "-v"))
16440 #t)))))
16441 (native-inputs
16442 `(("python-nose" ,python-nose)))
16443 (home-page "https://pypi.org/project/dill/")
16444 (synopsis "Serialize all of Python")
16445 (description "Dill extends Python's @code{pickle} module for serializing
16446 and de-serializing Python objects to the majority of the built-in Python
16447 types. Dill provides the user the same interface as the @code{pickle} module,
16448 and also includes some additional features. In addition to pickling Python
16449 objects, @code{dill} provides the ability to save the state of an interpreter
16450 session in a single command. Hence, it would be feasible to save a
16451 interpreter session, close the interpreter, ship the pickled file to another
16452 computer, open a new interpreter, unpickle the session and thus continue from
16453 the saved state of the original interpreter session.")
16454 (license license:bsd-3)))
16455
16456 (define-public python-multiprocess
16457 (package
16458 (name "python-multiprocess")
16459 (version "0.70.9")
16460 (source
16461 (origin
16462 (method url-fetch)
16463 (uri (pypi-uri "multiprocess" version))
16464 (sha256
16465 (base32
16466 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
16467 (build-system python-build-system)
16468 (arguments
16469 `(#:phases
16470 (modify-phases %standard-phases
16471 (add-after 'unpack 'disable-broken-tests
16472 (lambda _
16473 ;; This test is broken as there is no keyboard interrupt.
16474 (substitute* "py3.7/multiprocess/tests/__init__.py"
16475 (("^(.*)def test_wait_result"
16476 line indent)
16477 (string-append indent
16478 "@unittest.skip(\"Disabled by Guix\")\n"
16479 line)))
16480 #t))
16481 ;; Tests must be run after installation.
16482 (delete 'check)
16483 (add-after 'install 'check
16484 (lambda* (#:key inputs outputs #:allow-other-keys)
16485 (add-installed-pythonpath inputs outputs)
16486 (invoke "python" "-m" "multiprocess.tests")
16487 #t)))))
16488 (propagated-inputs
16489 `(("python-dill" ,python-dill)))
16490 (home-page "https://pypi.org/project/multiprocess/")
16491 (synopsis "Multiprocessing and multithreading in Python")
16492 (description
16493 "This package is a fork of the multiprocessing Python package, a package
16494 which supports the spawning of processes using the API of the standard
16495 library's @code{threading} module.")
16496 (license license:bsd-3)))
16497
16498 (define-public python-toolz
16499 (package
16500 (name "python-toolz")
16501 (version "0.9.0")
16502 (source
16503 (origin
16504 (method url-fetch)
16505 (uri (pypi-uri "toolz" version))
16506 (sha256
16507 (base32
16508 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16509 (build-system python-build-system)
16510 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16511 ;; unregistered loader type"
16512 (arguments '(#:tests? #f))
16513 (home-page "https://github.com/pytoolz/toolz/")
16514 (synopsis "List processing tools and functional utilities")
16515 (description
16516 "This package provides a set of utility functions for iterators,
16517 functions, and dictionaries.")
16518 (license license:bsd-3)))
16519
16520 (define-public python2-toolz
16521 (package-with-python2 python-toolz))
16522
16523 (define-public python-cytoolz
16524 (package
16525 (name "python-cytoolz")
16526 (version "0.9.0.1")
16527 (source
16528 (origin
16529 (method url-fetch)
16530 (uri (pypi-uri "cytoolz" version))
16531 (sha256
16532 (base32
16533 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16534 (build-system python-build-system)
16535 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16536 ;; 'exceptions'"
16537 (arguments '(#:tests? #f))
16538 (propagated-inputs
16539 `(("python-toolz" ,python-toolz)))
16540 (native-inputs
16541 `(("python-cython" ,python-cython)))
16542 (home-page "https://github.com/pytoolz/cytoolz")
16543 (synopsis "High performance functional utilities")
16544 (description
16545 "The cytoolz package implements the same API as provided by toolz. The
16546 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16547 that is accessible to other projects developed in Cython.")
16548 (license license:bsd-3)))
16549
16550 (define-public python-sortedcontainers
16551 (package
16552 (name "python-sortedcontainers")
16553 (version "2.1.0")
16554 (source
16555 (origin
16556 (method url-fetch)
16557 (uri (pypi-uri "sortedcontainers" version))
16558 (sha256
16559 (base32
16560 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
16561 (build-system python-build-system)
16562 (native-inputs
16563 `(("python-tox" ,python-tox)))
16564 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16565 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16566 (description
16567 "This package provides a sorted collections library, written in
16568 pure-Python.")
16569 (license license:asl2.0)))
16570
16571 (define-public python-cloudpickle
16572 (package
16573 (name "python-cloudpickle")
16574 (version "0.6.1")
16575 (source
16576 (origin
16577 (method url-fetch)
16578 (uri (pypi-uri "cloudpickle" version))
16579 (sha256
16580 (base32
16581 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16582 (build-system python-build-system)
16583 ;; FIXME: there are 5 errors in 122 tests:
16584 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16585 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16586 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16587 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16588 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16589 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16590 (arguments '(#:tests? #f))
16591 (native-inputs
16592 `(("python-pytest" ,python-pytest)
16593 ("python-mock" ,python-mock)
16594 ("python-tornado" ,python-tornado)))
16595 (home-page "https://github.com/cloudpipe/cloudpickle")
16596 (synopsis "Extended pickling support for Python objects")
16597 (description
16598 "Cloudpickle makes it possible to serialize Python constructs not
16599 supported by the default pickle module from the Python standard library. It
16600 is especially useful for cluster computing where Python expressions are
16601 shipped over the network to execute on remote hosts, possibly close to the
16602 data.")
16603 (license license:bsd-3)))
16604
16605 (define-public python2-cloudpickle
16606 (package-with-python2 python-cloudpickle))
16607
16608 (define-public python-locket
16609 (package
16610 (name "python-locket")
16611 (version "0.2.0")
16612 (source
16613 (origin
16614 (method url-fetch)
16615 (uri (pypi-uri "locket" version))
16616 (sha256
16617 (base32
16618 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16619 (build-system python-build-system)
16620 (home-page "https://github.com/mwilliamson/locket.py")
16621 (synopsis "File-based locks for Python")
16622 (description
16623 "Locket implements a lock that can be used by multiple processes provided
16624 they use the same path.")
16625 (license license:bsd-2)))
16626
16627 (define-public python2-locket
16628 (package-with-python2 python-locket))
16629
16630 (define-public python-blosc
16631 (package
16632 (name "python-blosc")
16633 (version "1.5.1")
16634 (source
16635 (origin
16636 (method url-fetch)
16637 (uri (pypi-uri "blosc" version))
16638 (sha256
16639 (base32
16640 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16641 (build-system python-build-system)
16642 ;; FIXME: all tests pass, but then this error is printed:
16643 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16644 (arguments '(#:tests? #f))
16645 (propagated-inputs
16646 `(("python-numpy" ,python-numpy)))
16647 (home-page "https://github.com/blosc/python-blosc")
16648 (synopsis "Python wrapper for the Blosc data compressor library")
16649 (description "Blosc is a high performance compressor optimized for binary
16650 data. It has been designed to transmit data to the processor cache faster
16651 than the traditional, non-compressed, direct memory fetch approach via a
16652 @code{memcpy()} system call.
16653
16654 Blosc works well for compressing numerical arrays that contains data with
16655 relatively low entropy, like sparse data, time series, grids with
16656 regular-spaced values, etc.
16657
16658 This Python package wraps the Blosc library.")
16659 (license license:bsd-3)))
16660
16661 (define-public python2-blosc
16662 (package-with-python2 python-blosc))
16663
16664 (define-public python-partd
16665 (package
16666 (name "python-partd")
16667 (version "0.3.9")
16668 (source
16669 (origin
16670 (method url-fetch)
16671 (uri (pypi-uri "partd" version))
16672 (sha256
16673 (base32
16674 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16675 (build-system python-build-system)
16676 (propagated-inputs
16677 `(("python-blosc" ,python-blosc)
16678 ("python-locket" ,python-locket)
16679 ("python-numpy" ,python-numpy)
16680 ("python-pandas" ,python-pandas)
16681 ("python-pyzmq" ,python-pyzmq)
16682 ("python-toolz" ,python-toolz)))
16683 (home-page "https://github.com/dask/partd/")
16684 (synopsis "Appendable key-value storage")
16685 (description "Partd stores key-value pairs. Values are raw bytes. We
16686 append on old values. Partd excels at shuffling operations.")
16687 (license license:bsd-3)))
16688
16689 (define-public python2-partd
16690 (package-with-python2 python-partd))
16691
16692 (define-public python-fsspec
16693 (package
16694 (name "python-fsspec")
16695 (version "0.6.1")
16696 (source
16697 (origin
16698 (method url-fetch)
16699 (uri (pypi-uri "fsspec" version))
16700 (sha256
16701 (base32
16702 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16703 (build-system python-build-system)
16704 (arguments '(#:tests? #f)) ; there are none
16705 (home-page "https://github.com/intake/filesystem_spec")
16706 (synopsis "File-system specification")
16707 (description "The purpose of this package is to produce a template or
16708 specification for a file-system interface, that specific implementations
16709 should follow, so that applications making use of them can rely on a common
16710 behavior and not have to worry about the specific internal implementation
16711 decisions with any given backend.")
16712 (license license:bsd-3)))
16713
16714 (define-public python-dask
16715 (package
16716 (name "python-dask")
16717 (version "2.9.0")
16718 (source
16719 (origin
16720 (method url-fetch)
16721 (uri (pypi-uri "dask" version))
16722 (sha256
16723 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
16724 (build-system python-build-system)
16725 (arguments
16726 `(#:phases
16727 (modify-phases %standard-phases
16728 (add-after 'unpack 'disable-broken-tests
16729 (lambda _
16730 ;; This test is marked as xfail when pytest-xdist is used.
16731 (substitute* "dask/tests/test_threaded.py"
16732 (("def test_interrupt\\(\\)" m)
16733 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16734 m)))
16735 ;; This one fails with a type error:
16736 ;; TypeError: Already tz-aware, use tz_convert to convert.
16737 (substitute* "dask/dataframe/tests/test_shuffle.py"
16738 (("def test_set_index_timestamp\\(\\)" m)
16739 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16740 m)))
16741 #t))
16742 (replace 'check
16743 (lambda _ (invoke "pytest" "-vv"))))))
16744 (propagated-inputs
16745 `(("python-cloudpickle" ,python-cloudpickle)
16746 ("python-fsspec" ,python-fsspec)
16747 ("python-numpy" ,python-numpy)
16748 ("python-packaging" ,python-packaging)
16749 ("python-pandas" ,python-pandas)
16750 ("python-partd" ,python-partd)
16751 ("python-toolz" ,python-toolz)
16752 ("python-pyyaml" ,python-pyyaml)))
16753 (native-inputs
16754 `(("python-pytest" ,python-pytest)
16755 ("python-pytest-runner" ,python-pytest-runner)))
16756 (home-page "https://github.com/dask/dask/")
16757 (synopsis "Parallel computing with task scheduling")
16758 (description
16759 "Dask is a flexible parallel computing library for analytics. It
16760 consists of two components: dynamic task scheduling optimized for computation,
16761 and large data collections like parallel arrays, dataframes, and lists that
16762 extend common interfaces like NumPy, Pandas, or Python iterators to
16763 larger-than-memory or distributed environments. These parallel collections
16764 run on top of the dynamic task schedulers. ")
16765 (license license:bsd-3)))
16766
16767 (define-public python-ilinkedlist
16768 (package
16769 (name "python-ilinkedlist")
16770 (version "0.4.0")
16771 (source
16772 (origin
16773 (method url-fetch)
16774 (uri (pypi-uri "ilinkedlist" version))
16775 (sha256
16776 (base32
16777 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16778 (build-system python-build-system)
16779 (native-inputs `(("python-pytest" ,python-pytest)))
16780 (inputs `(("python" ,python)))
16781 (home-page "https://github.com/luther9/ilinkedlist-py")
16782 (synopsis "Immutable linked list library")
16783 (description
16784 "This is a implementation of immutable linked lists for Python. It
16785 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16786 Since a linked list is treated as immutable, it is hashable, and its length
16787 can be retrieved in constant time. Some of the terminology is inspired by
16788 LISP. It is possible to create an improper list by creating a @code{Pair}
16789 with a non-list @code{cdr}.")
16790 (license license:gpl3+)))
16791
16792 (define-public python-readlike
16793 (package
16794 (name "python-readlike")
16795 (version "0.1.3")
16796 (source
16797 (origin
16798 (method url-fetch)
16799 (uri (pypi-uri "readlike" version))
16800 (sha256
16801 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16802 (build-system python-build-system)
16803 (home-page "https://github.com/jangler/readlike")
16804 (synopsis "GNU Readline-like line editing module")
16805 (description
16806 "This Python module provides line editing functions similar to the default
16807 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16808 @code{readline} package, this one allows access to those capabilties in settings
16809 outside of a standard command-line interface. It is especially well-suited to
16810 interfacing with Urwid, due to a shared syntax for describing key inputs.
16811
16812 Currently, all stateless Readline commands are implemented. Yanking and history
16813 are not supported.")
16814 (license license:expat)))
16815
16816 (define-public python2-readlike
16817 (package-with-python2 python-readlike))
16818
16819 (define-public python-reparser
16820 (package
16821 (name "python-reparser")
16822 (version "1.4.3")
16823 (source
16824 (origin
16825 (method url-fetch)
16826 (uri (pypi-uri "ReParser" version))
16827 (sha256
16828 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16829 (build-system python-build-system)
16830 (home-page "https://github.com/xmikos/reparser")
16831 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16832 (description
16833 "This Python library provides a simple lexer/parser for inline markup based
16834 on regular expressions.")
16835 (license license:expat)))
16836
16837 (define-public python2-reparser
16838 (let ((reparser (package-with-python2
16839 (strip-python2-variant python-reparser))))
16840 (package (inherit reparser)
16841 (propagated-inputs
16842 `(("python2-enum34" ,python2-enum34)
16843 ,@(package-propagated-inputs reparser))))))
16844
16845 (define-public python-precis-i18n
16846 (package
16847 (name "python-precis-i18n")
16848 (version "1.0.0")
16849 (source
16850 (origin
16851 (method url-fetch)
16852 (uri (pypi-uri "precis_i18n" version))
16853 (sha256
16854 (base32
16855 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16856 (build-system python-build-system)
16857 (home-page "https://github.com/byllyfish/precis_i18n")
16858 (synopsis "Implementation of the PRECIS framework")
16859 (description
16860 "This module implements the PRECIS Framework as described in RFC 8264,
16861 RFC 8265 and RFC 8266.")
16862 (license license:expat)))
16863
16864 (define-public python-absl-py
16865 (package
16866 (name "python-absl-py")
16867 (version "0.6.1")
16868 (source
16869 (origin
16870 (method url-fetch)
16871 (uri (pypi-uri "absl-py" version))
16872 (sha256
16873 (base32
16874 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16875 (build-system python-build-system)
16876 (propagated-inputs
16877 `(("python-six" ,python-six)))
16878 (home-page "https://github.com/abseil/abseil-py")
16879 (synopsis "Abseil Python common libraries")
16880 (description
16881 "This package provides the Abseil Python Common Libraries, a collection
16882 of Python libraries for building Python applications.")
16883 (license license:asl2.0)))
16884
16885 (define-public python-astor
16886 (package
16887 (name "python-astor")
16888 (version "0.7.1")
16889 (source
16890 (origin
16891 (method url-fetch)
16892 (uri (pypi-uri "astor" version))
16893 (sha256
16894 (base32
16895 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16896 (build-system python-build-system)
16897 ;; FIXME: There are two errors and two test failures.
16898 (arguments `(#:tests? #f))
16899 (home-page "https://github.com/berkerpeksag/astor")
16900 (synopsis "Read and write Python ASTs")
16901 (description "Astor is designed to allow easy manipulation of Python
16902 source via the Abstract Syntax Tree.")
16903 (license license:bsd-3)))
16904
16905 (define-public python2-astor
16906 (package-with-python2 python-astor))
16907
16908 (define-public python-grpcio
16909 (package
16910 (name "python-grpcio")
16911 (version "1.17.1")
16912 (source
16913 (origin
16914 (method url-fetch)
16915 (uri (pypi-uri "grpcio" version))
16916 (sha256
16917 (base32
16918 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16919 (build-system python-build-system)
16920 (propagated-inputs
16921 `(("python-six" ,python-six)))
16922 (home-page "https://grpc.io")
16923 (synopsis "HTTP/2-based RPC framework")
16924 (description "This package provides a Python library for communicating
16925 with the HTTP/2-based RPC framework gRPC.")
16926 (license license:asl2.0)))
16927
16928 (define-public python-astunparse
16929 (package
16930 (name "python-astunparse")
16931 (version "1.6.2")
16932 (source
16933 (origin
16934 (method url-fetch)
16935 (uri (pypi-uri "astunparse" version))
16936 (sha256
16937 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16938 (build-system python-build-system)
16939 (arguments '(#:tests? #f)) ; there are none
16940 (propagated-inputs
16941 `(("python-six" ,python-six)
16942 ("python-wheel" ,python-wheel)))
16943 (home-page "https://github.com/simonpercivall/astunparse")
16944 (synopsis "AST unparser for Python")
16945 (description "This package provides an AST unparser for Python. It is a
16946 factored out version of @code{unparse} found in the Python source
16947 distribution.")
16948 (license license:bsd-3)))
16949
16950 (define-public python-gast
16951 (package
16952 (name "python-gast")
16953 (version "0.2.2")
16954 (source
16955 (origin
16956 (method url-fetch)
16957 (uri (pypi-uri "gast" version))
16958 (sha256
16959 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16960 (build-system python-build-system)
16961 (propagated-inputs
16962 `(("python-astunparse" ,python-astunparse)))
16963 (home-page "https://pypi.org/project/gast/")
16964 (synopsis "Generic Python AST that abstracts the underlying Python version")
16965 (description
16966 "GAST provides a compatibility layer between the AST of various Python
16967 versions, as produced by @code{ast.parse} from the standard @code{ast}
16968 module.")
16969 (license license:bsd-3)))
16970
16971 (define-public python-wikidata
16972 (package
16973 (name "python-wikidata")
16974 (version "0.6.1")
16975 (source
16976 (origin
16977 (method url-fetch)
16978 (uri (pypi-uri "Wikidata" version))
16979 (sha256
16980 (base32
16981 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16982 (build-system python-build-system)
16983 (propagated-inputs
16984 `(("python-babel" ,python-babel)))
16985 (home-page "https://github.com/dahlia/wikidata")
16986 (synopsis "Wikidata client library")
16987 (description
16988 "This package provides a Python interface to
16989 @url{https://www.wikidata.org/, Wikidata}.")
16990 (properties '((upstream-name . "Wikidata")))
16991 (license license:gpl3+)))
16992
16993 (define-public python-doctest-ignore-unicode
16994 (package
16995 (name "python-doctest-ignore-unicode")
16996 (version "0.1.2")
16997 (source
16998 (origin
16999 (method url-fetch)
17000 (uri (pypi-uri "doctest-ignore-unicode" version))
17001 (sha256
17002 (base32
17003 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
17004 (build-system python-build-system)
17005 (native-inputs
17006 `(("python-nose" ,python-nose)))
17007 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
17008 (synopsis "Ignore Unicode literal prefixes in doctests")
17009 (description
17010 "This package adds support for a flag to ignore Unicode literal prefixes
17011 in doctests.")
17012 (license license:asl2.0)))
17013
17014 (define-public python-attr
17015 (package
17016 (name "python-attr")
17017 (version "0.3.1")
17018 (source
17019 (origin
17020 (method url-fetch)
17021 (uri (pypi-uri "attr" version))
17022 (sha256
17023 (base32
17024 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
17025 (build-system python-build-system)
17026 (home-page "https://github.com/denis-ryzhkov/attr")
17027 (synopsis "Decorator for attributes of target function or class")
17028 (description "Simple decorator to set attributes of target function or
17029 class in a @acronym{DRY, Don't Repeat Yourself} way.")
17030 (license license:expat)))
17031
17032 (define-public python-construct
17033 (package
17034 (name "python-construct")
17035 (version "2.10.56")
17036 (source
17037 (origin
17038 (method url-fetch)
17039 (uri (pypi-uri "construct" version))
17040 (sha256
17041 (base32
17042 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
17043 (build-system python-build-system)
17044 (arguments
17045 `(#:tests? #f)) ; No tests exist.
17046 (propagated-inputs
17047 `(("python-extras" ,python-extras)
17048 ("python-arrow" ,python-arrow)
17049 ("python-numpy" ,python-numpy)
17050 ("python-ruamel.yaml" ,python-ruamel.yaml)))
17051 (home-page "https://construct.readthedocs.io")
17052 (synopsis "Declarative and symmetrical parser and builder for binary data")
17053 (description
17054 "This package provides both simple, atomic constructs (such as
17055 integers of various sizes), as well as composite ones which allow you
17056 form hierarchical and sequential structures of increasing complexity.
17057 It features bit and byte granularity, easy debugging and testing, an
17058 easy-to-extend subclass system, and lots of primitive constructs to
17059 make your work easier.")
17060 (license license:expat)))
17061
17062 (define-public python-humanize
17063 (package
17064 (name "python-humanize")
17065 (version "0.5.1")
17066 (source
17067 (origin
17068 (method url-fetch)
17069 (uri (pypi-uri "humanize" version))
17070 (sha256
17071 (base32
17072 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17073 (arguments
17074 '(#:tests? #f)) ; tests not in pypi archive
17075 (build-system python-build-system)
17076 (home-page "https://github.com/jmoiron/humanize")
17077 (synopsis "Print numerical information in a human-readable form")
17078 (description "This package provides a Python module that displays numbers
17079 and dates in \"human readable\" forms. For example, it would display
17080 \"12345591313\" as \"12.3 billion\".")
17081 (license license:expat)))
17082
17083 (define-public python-txaio
17084 (package
17085 (name "python-txaio")
17086 (version "18.8.1")
17087 (source
17088 (origin
17089 (method url-fetch)
17090 (uri (pypi-uri "txaio" version))
17091 (sha256
17092 (base32
17093 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17094 (build-system python-build-system)
17095 (propagated-inputs
17096 `(("python-twisted" ,python-twisted)
17097 ("python-six" ,python-six)))
17098 (home-page "https://github.com/crossbario/txaio")
17099 (synopsis "Compatibility layer between Python asyncio and Twisted")
17100 (description "Txaio provides a compatibility layer between the Python
17101 @code{asyncio} module and @code{Twisted}.")
17102 (license license:expat)))
17103
17104 (define-public python-toolshed
17105 (package
17106 (name "python-toolshed")
17107 (version "0.4.6")
17108 (source
17109 (origin
17110 (method url-fetch)
17111 (uri (pypi-uri "toolshed" version))
17112 (sha256
17113 (base32
17114 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17115 (build-system python-build-system)
17116 (native-inputs
17117 `(("python-nose" ,python-nose)))
17118 (home-page "https://github.com/brentp/toolshed/")
17119 (synopsis "Collection of modules and functions for working with data")
17120 (description "This is a collection of well-tested, simple modules and
17121 functions that aim to reduce boilerplate when working with data.")
17122 (license license:bsd-2)))
17123
17124 (define-public python-annoy
17125 (package
17126 (name "python-annoy")
17127 (version "1.15.1")
17128 (source
17129 (origin
17130 (method url-fetch)
17131 (uri (pypi-uri "annoy" version))
17132 (sha256
17133 (base32
17134 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17135 (build-system python-build-system)
17136 (native-inputs
17137 `(("python-nose" ,python-nose)))
17138 (home-page "https://github.com/spotify/annoy/")
17139 (synopsis "Approximate nearest neighbors library")
17140 (description
17141 "Annoy is a C++ library with Python bindings to search for points in
17142 space that are close to a given query point. It also creates large read-only
17143 file-based data structures that are @code{mmap}ped into memory so that many
17144 processes may share the same data.")
17145 (license license:asl2.0)))
17146
17147 (define-public python-pylzma
17148 (package
17149 (name "python-pylzma")
17150 (version "0.5.0")
17151 (source
17152 (origin
17153 (method url-fetch)
17154 (uri (pypi-uri "pylzma" version))
17155 (sha256
17156 (base32
17157 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
17158 (build-system python-build-system)
17159 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
17160 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
17161 (description "This package provides Python bindings for the LZMA library
17162 by Igor Pavlov.")
17163 (license license:lgpl2.1+)))
17164
17165 (define-public python2-pylzma
17166 (package-with-python2 python-pylzma))
17167
17168 (define-public python2-zeroconf
17169 (package
17170 (name "python2-zeroconf")
17171
17172 ;; This is the last version that supports Python 2.x.
17173 (version "0.19.1")
17174 (source
17175 (origin
17176 (method url-fetch)
17177 (uri (pypi-uri "zeroconf" version))
17178 (sha256
17179 (base32
17180 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
17181 (build-system python-build-system)
17182 (arguments
17183 `(#:python ,python-2
17184 #:phases
17185 (modify-phases %standard-phases
17186 (add-after 'unpack 'patch-requires
17187 (lambda* (#:key inputs #:allow-other-keys)
17188 (substitute* "setup.py"
17189 (("enum-compat")
17190 "enum34"))
17191 #t)))))
17192 (native-inputs
17193 `(("python2-six" ,python2-six)
17194 ("python2-enum32" ,python2-enum34)
17195 ("python2-netifaces" ,python2-netifaces)
17196 ("python2-typing" ,python2-typing)))
17197 (home-page "https://github.com/jstasiak/python-zeroconf")
17198 (synopsis "Pure Python mDNS service discovery")
17199 (description
17200 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
17201 compatible).")
17202 (license license:lgpl2.1+)))
17203
17204 (define-public python-bsddb3
17205 (package
17206 (name "python-bsddb3")
17207 (version "6.2.6")
17208 (source
17209 (origin
17210 (method url-fetch)
17211 (uri (pypi-uri "bsddb3" version))
17212 (sha256
17213 (base32
17214 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
17215 (build-system python-build-system)
17216 (inputs
17217 `(("bdb" ,bdb)))
17218 (arguments
17219 '(#:phases
17220 (modify-phases %standard-phases
17221 (add-after 'unpack 'configure-locations
17222 (lambda* (#:key inputs #:allow-other-keys)
17223 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
17224 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
17225 #t))
17226 (replace 'check
17227 (lambda _
17228 (invoke "python3" "test3.py" "-v"))))))
17229 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
17230 (synopsis "Python bindings for Oracle Berkeley DB")
17231 (description
17232 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
17233 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
17234 Transaction objects, and each of these is exposed as a Python type in the
17235 bsddb3.db module. The database objects can use various access methods: btree,
17236 hash, recno, and queue. Complete support of Berkeley DB distributed
17237 transactions. Complete support for Berkeley DB Replication Manager.
17238 Complete support for Berkeley DB Base Replication. Support for RPC.")
17239 (license license:bsd-3)))
17240
17241 (define-public python-dbfread
17242 (package
17243 (name "python-dbfread")
17244 (version "2.0.7")
17245 (source (origin
17246 (method url-fetch)
17247 (uri (pypi-uri "dbfread" version))
17248 (sha256
17249 (base32
17250 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
17251 (build-system python-build-system)
17252 (native-inputs
17253 `(("python-pytest" ,python-pytest)))
17254 (home-page "https://dbfread.readthedocs.io")
17255 (synopsis "Read DBF Files with Python")
17256 (description
17257 "This library reads DBF files and returns the data as native Python data
17258 types for further processing. It is primarily intended for batch jobs and
17259 one-off scripts.")
17260 (license license:expat)))
17261
17262 (define-public python-cached-property
17263 (package
17264 (name "python-cached-property")
17265 (version "1.5.1")
17266 (source
17267 (origin
17268 (method url-fetch)
17269 (uri (pypi-uri "cached-property" version))
17270 (sha256
17271 (base32
17272 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
17273 (build-system python-build-system)
17274 (arguments
17275 `(#:phases
17276 (modify-phases %standard-phases
17277 ;; https://github.com/pydanny/cached-property/issues/131
17278 ;; recent versions of freezegun break one test
17279 (add-after 'unpack 'disable-broken-test
17280 (lambda _
17281 (substitute* "tests/test_cached_property.py"
17282 (("def test_threads_ttl_expiry\\(self\\)" m)
17283 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
17284 " " m)))
17285 #t)))))
17286 (native-inputs
17287 `(("python-freezegun" ,python-freezegun)))
17288 (home-page
17289 "https://github.com/pydanny/cached-property")
17290 (synopsis
17291 "Decorator for caching properties in classes")
17292 (description
17293 "This package provides a decorator which makes caching
17294 time-or-computationally-expensive properties quick and easy and works in Python
17295 2 or 3.")
17296 (license license:bsd-3)))
17297
17298 (define-public python-folium
17299 (package
17300 (name "python-folium")
17301 (version "0.10.1")
17302 (source
17303 (origin
17304 (method url-fetch)
17305 (uri (pypi-uri "folium" version))
17306 (sha256
17307 (base32
17308 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
17309 (build-system python-build-system)
17310 (propagated-inputs
17311 `(("python-branca" ,python-branca)
17312 ("python-jinja2" ,python-jinja2)
17313 ("python-numpy" ,python-numpy)
17314 ("python-requests" ,python-requests)))
17315 (native-inputs
17316 `(("python-pytest" ,python-pytest)))
17317 (home-page "https://github.com/python-visualization/folium")
17318 (synopsis "Make beautiful maps with Leaflet.js & Python")
17319 (description "@code{folium} makes it easy to visualize data that’s been
17320 manipulated in Python on an interactive leaflet map. It enables both the
17321 binding of data to a map for @code{choropleth} visualizations as well as
17322 passing rich vector/raster/HTML visualizations as markers on the map.
17323
17324 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
17325 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
17326 supports Image, Video, GeoJSON and TopoJSON overlays.")
17327 (license license:expat)))
17328
17329 (define-public jube
17330 (package
17331 ;; This is a command-line tool, so no "python-" prefix.
17332 (name "jube")
17333 (version "2.2.2")
17334 (source (origin
17335 (method url-fetch)
17336 (uri (string-append
17337 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
17338 version))
17339 (sha256
17340 (base32
17341 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
17342 (file-name (string-append "jube-" version ".tar.gz"))))
17343 (build-system python-build-system)
17344 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
17345 (synopsis "Benchmarking environment")
17346 (description
17347 "JUBE helps perform and analyze benchmarks in a systematic way. For each
17348 benchmarked application, benchmark data is stored in a format that allows JUBE
17349 to deduct the desired information. This data can be parsed by automatic pre-
17350 and post-processing scripts that draw information and store it more densely
17351 for manual interpretation.")
17352 (license license:gpl3+)))
17353
17354 (define-public python-pyroutelib3
17355 (package
17356 (name "python-pyroutelib3")
17357 (version "1.3.post1")
17358 (source
17359 (origin
17360 (method url-fetch)
17361 (uri (pypi-uri "pyroutelib3" version))
17362 (sha256
17363 (base32
17364 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17365 (build-system python-build-system)
17366 (propagated-inputs
17367 `(("python-dateutil" ,python-dateutil)))
17368 (home-page "https://github.com/MKuranowski/pyroutelib3")
17369 (synopsis "Library for simple routing on OSM data")
17370 (description "Library for simple routing on OSM data")
17371 (license license:gpl3+)))
17372
17373 (define-public python-bibtexparser
17374 (package
17375 (name "python-bibtexparser")
17376 (version "1.1.0")
17377 (source
17378 (origin
17379 (method url-fetch)
17380 (uri (pypi-uri "bibtexparser" version))
17381 (sha256
17382 (base32
17383 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17384 (build-system python-build-system)
17385 (propagated-inputs
17386 `(("python-pyparsing" ,python-pyparsing)))
17387 (native-inputs
17388 `(("python-future" ,python-future)))
17389 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17390 (synopsis "Python library to parse BibTeX files")
17391 (description "BibtexParser is a Python library to parse BibTeX files.")
17392 (license (list license:bsd-3 license:lgpl3))))
17393
17394 (define-public python-distro
17395 (package
17396 (name "python-distro")
17397 (version "1.4.0")
17398 (source
17399 (origin
17400 (method url-fetch)
17401 (uri (pypi-uri "distro" version))
17402 (sha256
17403 (base32
17404 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17405 (build-system python-build-system)
17406 (native-inputs
17407 `(("python-pytest" ,python-pytest)))
17408 (home-page "https://github.com/nir0s/distro")
17409 (synopsis
17410 "OS platform information API")
17411 (description
17412 "@code{distro} provides information about the OS distribution it runs on,
17413 such as a reliable machine-readable ID, or version information.
17414
17415 It is the recommended replacement for Python's original
17416 `platform.linux_distribution` function (which will be removed in Python 3.8).
17417 @code{distro} also provides a command-line interface to output the platform
17418 information in various formats.")
17419 (license license:asl2.0)))
17420
17421 (define-public python-cairosvg
17422 (package
17423 (name "python-cairosvg")
17424 (version "2.4.2")
17425 (source
17426 (origin
17427 (method url-fetch)
17428 (uri (pypi-uri "CairoSVG" version))
17429 (sha256
17430 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17431 (build-system python-build-system)
17432 (arguments
17433 `(#:phases
17434 (modify-phases %standard-phases
17435 (replace 'check
17436 (lambda _ (invoke "pytest"))))))
17437 (propagated-inputs
17438 `(("python-cairocffi" ,python-cairocffi)
17439 ("python-cssselect2" ,python-cssselect2)
17440 ("python-defusedxml" ,python-defusedxml)
17441 ("python-pillow" ,python-pillow)
17442 ("python-tinycss2" ,python-tinycss2)))
17443 (native-inputs
17444 `(("python-pytest-flake8" ,python-pytest-flake8)
17445 ("python-pytest-isort" ,python-pytest-isort)
17446 ("python-pytest-runner" ,python-pytest-runner)))
17447 (home-page "https://cairosvg.org/")
17448 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17449 (description "CairoSVG is a SVG converter based on Cairo. It can export
17450 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17451 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17452 parsed, the result is drawn to a Cairo surface that can be exported to
17453 qvarious formats: PDF, PostScript, PNG and even SVG.")
17454 (license license:lgpl3+)))
17455
17456 (define-public python-pyphen
17457 (package
17458 (name "python-pyphen")
17459 (version "0.9.5")
17460 (source
17461 (origin
17462 (method url-fetch)
17463 (uri (pypi-uri "Pyphen" version))
17464 (sha256
17465 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17466 (build-system python-build-system)
17467 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17468 ;; embedded set provided by upstream - like Debian does.
17469 (home-page "https://github.com/Kozea/Pyphen")
17470 (synopsis "Pure Python module to hyphenate text")
17471 (description "Pyphen is a pure Python module to hyphenate text using
17472 existing Hunspell hyphenation dictionaries.")
17473 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
17474
17475 (define-public python-intelhex
17476 (package
17477 (name "python-intelhex")
17478 (version "2.2.1")
17479 (source
17480 (origin
17481 (method url-fetch)
17482 (uri (pypi-uri "intelhex" version))
17483 (sha256
17484 (base32
17485 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17486 (build-system python-build-system)
17487 (arguments '(#:tests? #f)) ;issue with version
17488 (home-page "https://pypi.org/project/IntelHex/")
17489 (synopsis "Python library for Intel HEX files manipulations")
17490 (description "The Intel HEX file format is widely used in microprocessors
17491 and microcontrollers area (embedded systems etc.) as the de facto standard for
17492 representation of code to be programmed into microelectronic devices. This
17493 package provides an intelhex Python library to read, write, create from
17494 scratch and manipulate data from Intel HEX file format. It also includes
17495 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17496 converters and more, those based on the library itself.")
17497 (license license:bsd-3)))
17498
17499 (define-public python-pykwalify
17500 (package
17501 (name "python-pykwalify")
17502 (version "1.7.0")
17503 (source
17504 (origin
17505 (method url-fetch)
17506 (uri (pypi-uri "pykwalify" version))
17507 (sha256
17508 (base32
17509 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17510 (build-system python-build-system)
17511 (arguments '(#:tests? #f)) ;missing dependencies
17512 (propagated-inputs
17513 `(("python-dateutil" ,python-dateutil)
17514 ("python-docopt" ,python-docopt)
17515 ("python-pyyaml" ,python-pyyaml)))
17516 (home-page "https://github.com/grokzen/pykwalify")
17517 (synopsis
17518 "Python lib/cli for JSON/YAML schema validation")
17519 (description
17520 "This package provides a parser, schema validator, and data binding tool
17521 for YAML and JSON.")
17522 (license license:expat)))
17523
17524 (define-public python-dbusmock
17525 (package
17526 (name "python-dbusmock")
17527 (version "0.18.3")
17528 (source
17529 (origin
17530 (method url-fetch)
17531 (uri (pypi-uri "python-dbusmock" version))
17532 (sha256
17533 (base32
17534 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17535 (build-system python-build-system)
17536 (arguments
17537 '(#:phases
17538 (modify-phases %standard-phases
17539 (add-after 'unpack 'patch-shell-path
17540 (lambda _
17541 (substitute* "tests/test_code.py"
17542 (("/bin/bash") (which "bash")))
17543 #t)))))
17544 (native-inputs
17545 `(;; For tests.
17546 ("dbus" ,dbus) ; for dbus-daemon
17547 ("python-nose" ,python-nose)
17548 ("which" ,which)))
17549 (propagated-inputs
17550 `(("python-dbus" ,python-dbus)
17551 ("python-pygobject" ,python-pygobject)))
17552 (home-page "https://github.com/martinpitt/python-dbusmock")
17553 (synopsis "Python library for mock D-Bus objects")
17554 (description "python-dbusmock allows for the easy creation of mock objects on
17555 D-Bus. This is useful for writing tests for software which talks to D-Bus
17556 services such as upower, systemd, logind, gnome-session or others, and it is
17557 hard (or impossible without root privileges) to set the state of the real
17558 services to what you expect in your tests.")
17559 (license license:lgpl3+)))
17560
17561 (define-public python-ujson
17562 (package
17563 (name "python-ujson")
17564 (version "1.35")
17565 (source
17566 (origin
17567 (method url-fetch)
17568 (uri (pypi-uri "ujson" version))
17569 (sha256
17570 (base32
17571 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17572 (build-system python-build-system)
17573 (home-page "http://www.esn.me")
17574 (synopsis
17575 "Ultra fast JSON encoder and decoder for Python")
17576 (description
17577 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17578 bindings for Python 2.5+ and 3.")
17579 (license license:bsd-3)))
17580
17581 (define-public python2-ujson
17582 (package-with-python2 python-ujson))
17583
17584 (define-public python-iocapture
17585 ;; The latest release is more than a year older than this commit.
17586 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17587 (revision "1"))
17588 (package
17589 (name "python-iocapture")
17590 (version "0.1.2")
17591 (source
17592 (origin
17593 (method git-fetch)
17594 (uri (git-reference
17595 (url "https://github.com/oinume/iocapture.git")
17596 (commit commit)))
17597 (file-name (git-file-name name version))
17598 (sha256
17599 (base32
17600 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17601 (build-system python-build-system)
17602 (arguments
17603 `(#:phases
17604 (modify-phases %standard-phases
17605 (delete 'check)
17606 (add-after 'install 'check
17607 (lambda* (#:key inputs outputs #:allow-other-keys)
17608 (add-installed-pythonpath inputs outputs)
17609 (invoke "py.test" "-v" "tests")
17610 #t)))))
17611 (propagated-inputs
17612 `(("python-flexmock" ,python-flexmock)
17613 ("python-pytest" ,python-pytest)
17614 ("python-pytest-cov" ,python-pytest-cov)
17615 ("python-six" ,python-six)))
17616 (home-page "https://github.com/oinume/iocapture")
17617 (synopsis "Python capturing tool for stdout and stderr")
17618 (description
17619 "This package helps you to capture the standard out (stdout) and the
17620 standard error channel (stderr) in your program.")
17621 (license license:expat))))
17622
17623 (define-public python-argh
17624 ;; There are 21 commits since the latest release containing important
17625 ;; improvements.
17626 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17627 (revision "1"))
17628 (package
17629 (name "python-argh")
17630 (version (git-version "0.26.2" revision commit))
17631 (source
17632 (origin
17633 (method git-fetch)
17634 (uri (git-reference
17635 (url "https://github.com/neithere/argh.git")
17636 (commit commit)))
17637 (file-name (git-file-name name version))
17638 (sha256
17639 (base32
17640 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17641 (build-system python-build-system)
17642 (propagated-inputs
17643 `(("python-iocapture" ,python-iocapture)
17644 ("python-mock" ,python-mock)
17645 ("python-pytest" ,python-pytest)
17646 ("python-pytest-cov" ,python-pytest-cov)
17647 ("python-pytest-xdist" ,python-pytest-xdist)
17648 ("python-tox" ,python-tox)))
17649 (home-page "https://github.com/neithere/argh/")
17650 (synopsis "Argparse wrapper with natural syntax")
17651 (description
17652 "python-argh is a small library that provides several layers of
17653 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17654 always possible to declare a command with the highest possible (and least
17655 flexible) layer and then tune the behaviour with any of the lower layers
17656 including the native API of @code{python-argparse}.")
17657 (license license:lgpl3+))))
17658
17659 (define-public python-ppft
17660 (package
17661 (name "python-ppft")
17662 (version "1.6.6.1")
17663 (source
17664 (origin
17665 (method url-fetch)
17666 (uri (pypi-uri "ppft" version))
17667 (sha256
17668 (base32
17669 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17670 (build-system python-build-system)
17671 (arguments '(#:tests? #f)) ; there are none
17672 (propagated-inputs
17673 `(("python-six" ,python-six)))
17674 (home-page "https://pypi.org/project/ppft/")
17675 (synopsis "Fork of Parallel Python")
17676 (description
17677 "This package is a fork of Parallel Python. The Parallel Python
17678 module (@code{pp}) provides an easy and efficient way to create
17679 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17680 computers and clusters. It features cross-platform portability and dynamic
17681 load balancing.")
17682 (license license:bsd-3)))
17683
17684 (define-public python-pox
17685 (package
17686 (name "python-pox")
17687 (version "0.2.7")
17688 (source
17689 (origin
17690 (method url-fetch)
17691 (uri (pypi-uri "pox" version))
17692 (sha256
17693 (base32
17694 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17695 (build-system python-build-system)
17696 (arguments
17697 `(#:phases
17698 (modify-phases %standard-phases
17699 (replace 'check
17700 (lambda _
17701 (mkdir-p "/tmp/guix")
17702 (setenv "SHELL" "bash")
17703 (setenv "USERNAME" "guix")
17704 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17705 (invoke "py.test" "-vv")
17706 #t)))))
17707 (native-inputs
17708 `(("python-pytest" ,python-pytest)
17709 ("which" ,which)))
17710 (home-page "https://pypi.org/project/pox/")
17711 (synopsis "Python utilities for filesystem exploration and automated builds")
17712 (description
17713 "Pox provides a collection of utilities for navigating and manipulating
17714 filesystems. This module is designed to facilitate some of the low level
17715 operating system interactions that are useful when exploring a filesystem on a
17716 remote host. Pox provides Python equivalents of several shell commands such
17717 as @command{which} and @command{find}. These commands allow automated
17718 discovery of what has been installed on an operating system, and where the
17719 essential tools are located.")
17720 (license license:bsd-3)))
17721
17722 (define-public python-pathos
17723 (package
17724 (name "python-pathos")
17725 (version "0.2.5")
17726 (source
17727 (origin
17728 (method url-fetch)
17729 (uri (pypi-uri "pathos" version))
17730 (sha256
17731 (base32
17732 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17733 (build-system python-build-system)
17734 (arguments
17735 '(#:phases
17736 (modify-phases %standard-phases
17737 (replace 'check
17738 (lambda _
17739 (setenv "PYTHONPATH"
17740 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17741 (invoke "python" "./tests/__main__.py"))))))
17742 (propagated-inputs
17743 `(("python-dill" ,python-dill)
17744 ("python-multiprocess" ,python-multiprocess)
17745 ("python-pox" ,python-pox)
17746 ("python-ppft" ,python-ppft)))
17747 (native-inputs
17748 `(("python-pytest" ,python-pytest)))
17749 (home-page "https://pypi.org/project/pathos/")
17750 (synopsis
17751 "Parallel graph management and execution in heterogeneous computing")
17752 (description
17753 "Python-pathos is a framework for heterogenous computing. It provides a
17754 consistent high-level interface for configuring and launching parallel
17755 computations across heterogenous resources. Python-pathos provides configurable
17756 launchers for parallel and distributed computing, where each launcher contains
17757 the syntactic logic to configure and launch jobs in an execution environment.")
17758 (license license:bsd-3)))
17759
17760 (define-public python-flit
17761 (package
17762 (name "python-flit")
17763 (version "2.1.0")
17764 (source
17765 (origin
17766 (method url-fetch)
17767 (uri (pypi-uri "flit" version))
17768 (sha256
17769 (base32
17770 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17771 (build-system python-build-system)
17772 (arguments
17773 `(#:tests? #f)) ; XXX: Check requires network access.
17774 (home-page "https://flit.readthedocs.io/")
17775 (synopsis
17776 "Simple packaging tool for simple packages")
17777 (description
17778 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17779 packages a single importable module or package at a time, using the import
17780 name as the name on PyPI. All subpackages and data files within a package
17781 are included automatically.")
17782 (license license:bsd-3)))
17783
17784 (define-public python-pathtools
17785 (package
17786 (name "python-pathtools")
17787 (version "0.1.2")
17788 (source
17789 (origin
17790 (method url-fetch)
17791 (uri (pypi-uri "pathtools" version))
17792 (sha256
17793 (base32
17794 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17795 (build-system python-build-system)
17796 (home-page
17797 "https://github.com/gorakhargosh/pathtools")
17798 (synopsis "Path utilities for Python")
17799 (description "Pattern matching and various utilities for file systems
17800 paths.")
17801 (license license:expat)))
17802
17803 (define-public python-fastentrypoints
17804 (package
17805 (name "python-fastentrypoints")
17806 (version "0.12")
17807 (source
17808 (origin
17809 (method url-fetch)
17810 (uri (pypi-uri "fastentrypoints" version))
17811 (sha256
17812 (base32
17813 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17814 (build-system python-build-system)
17815 (home-page
17816 "https://github.com/ninjaaron/fast-entry_points")
17817 (synopsis
17818 "Makes entry_points specified in setup.py load more quickly")
17819 (description
17820 "Using entry_points in your setup.py makes scripts that start really
17821 slowly because it imports pkg_resources. This package allows such setup
17822 scripts to load entry points more quickly.")
17823 (license license:bsd-3)))
17824
17825 (define-public python-funcparserlib
17826 (package
17827 (name "python-funcparserlib")
17828 (version "0.3.6")
17829 (source
17830 (origin
17831 (method url-fetch)
17832 (uri (pypi-uri "funcparserlib" version))
17833 (sha256
17834 (base32
17835 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17836 (native-inputs
17837 `(("python-tox" ,python-tox)))
17838 (arguments
17839 `(#:phases
17840 (modify-phases %standard-phases
17841 (replace 'check
17842 (lambda _
17843 (invoke "tox"))))))
17844 (build-system python-build-system)
17845 (home-page
17846 "https://github.com/vlasovskikh/funcparserlib")
17847 (synopsis
17848 "Recursive descent parsing library based on functional combinators")
17849 (description
17850 "This package is a recursive descent parsing library for Python based on
17851 functional combinators. Parser combinators are just higher-order functions
17852 that take parsers as their arguments and return them as result values.")
17853 (license license:expat)))
17854
17855 (define-public python-speg
17856 (package
17857 (name "python-speg")
17858 (version "0.3")
17859 (source
17860 (origin
17861 (method url-fetch)
17862 (uri (pypi-uri "speg" version ".zip"))
17863 (sha256
17864 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17865 (arguments
17866 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17867 (native-inputs
17868 `(("unzip" ,unzip)))
17869 (build-system python-build-system)
17870 (home-page "https://github.com/avakar/speg")
17871 (synopsis "PEG-based parser interpreter with memoization")
17872 (description "This package is a PEG-based parser and interpreter with
17873 memoization.")
17874 (license license:expat)))
17875
17876 (define-public python-cson
17877 (package
17878 (name "python-cson")
17879 (version "0.8")
17880 (source
17881 (origin
17882 (method url-fetch)
17883 (uri (pypi-uri "cson" version))
17884 (sha256
17885 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17886 (build-system python-build-system)
17887 (propagated-inputs
17888 `(("python-speg" ,python-speg)))
17889 (home-page "https://github.com/avakar/pycson")
17890 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17891 (description "This package is a parser for Coffeescript Object
17892 Notation (CSON).")
17893 (license license:expat)))
17894
17895 (define-public python-asynctest
17896 (package
17897 (name "python-asynctest")
17898 (version "0.13.0")
17899 (source
17900 (origin
17901 (method url-fetch)
17902 (uri (pypi-uri "asynctest" version))
17903 (sha256
17904 (base32
17905 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17906 (build-system python-build-system)
17907 (arguments
17908 '(#:phases
17909 (modify-phases %standard-phases
17910 (replace 'check
17911 (lambda _
17912 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17913 (add-after 'unpack 'disable-tests
17914 (lambda* _
17915 (substitute* "test/test_selector.py"
17916 ;; XXX: This test fails for unknown reason inside the build
17917 ;; environment.
17918 (("def test_events_watched_outside_test_are_ignored")
17919 "@unittest.skip('disabled by guix')
17920 def test_events_watched_outside_test_are_ignored")))))))
17921 (home-page "https://github.com/Martiusweb/asynctest")
17922 (synopsis "Extension of unittest for testing asyncio libraries")
17923 (description
17924 "The package asynctest is built on top of the standard unittest module
17925 and cuts down boilerplate code when testing libraries for asyncio.")
17926 (license license:asl2.0)))
17927
17928 (define-public python-aionotify
17929 (package
17930 (name "python-aionotify")
17931 (version "0.2.0")
17932 (source
17933 (origin
17934 ;; Source tarball on PyPi lacks tests
17935 (method git-fetch)
17936 (uri (git-reference
17937 (url "https://github.com/rbarrois/aionotify")
17938 (commit (string-append "v" version))))
17939 (file-name (git-file-name name version))
17940 (sha256
17941 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17942 (build-system python-build-system)
17943 (native-inputs `(("python-asynctest" ,python-asynctest)))
17944 (home-page "https://github.com/rbarrois/aionotify")
17945 (synopsis "Asyncio-powered inotify library")
17946 (description
17947 "@code{aionotify} is a simple, asyncio-based inotify library.")
17948 (license license:bsd-3)))
17949
17950 (define-public python-forbiddenfruit
17951 (package
17952 (name "python-forbiddenfruit")
17953 (version "0.1.3")
17954 (source
17955 (origin
17956 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17957 (method git-fetch)
17958 (uri (git-reference
17959 (url "https://github.com/clarete/forbiddenfruit")
17960 (commit version)))
17961 (file-name (git-file-name name version))
17962 (sha256
17963 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17964 (build-system python-build-system)
17965 (arguments
17966 '(#:phases
17967 (modify-phases %standard-phases
17968 (replace 'check
17969 (lambda _
17970 (invoke "make" "SKIP_DEPS=1"))))))
17971 (native-inputs
17972 `(("python-nose" ,python-nose)
17973 ("python-coverage" ,python-coverage)))
17974 (home-page "https://github.com/clarete/forbiddenfruit")
17975 (synopsis "Patch python built-in objects")
17976 (description "This project allows Python code to extend built-in types.")
17977 (license (list license:gpl3+ license:expat))))
17978
17979 (define-public python-shouldbe
17980 (package
17981 (name "python-shouldbe")
17982 (version "0.1.2")
17983 (source
17984 (origin
17985 (method url-fetch)
17986 (uri (pypi-uri "shouldbe" version))
17987 (sha256
17988 (base32
17989 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17990 (build-system python-build-system)
17991 (propagated-inputs
17992 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17993 (native-inputs
17994 `(("python-nose" ,python-nose)))
17995 (home-page "https://github.com/directxman12/should_be")
17996 (synopsis "Python Assertion Helpers inspired by Shouldly")
17997 (description
17998 "Python Assertion Helpers inspired by Shouldly.")
17999 (license license:isc)))
18000
18001 (define-public python-k5test
18002 (package
18003 (name "python-k5test")
18004 (version "0.9.2")
18005 (source
18006 (origin
18007 (method url-fetch)
18008 (uri (pypi-uri "k5test" version))
18009 (sha256
18010 (base32
18011 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
18012 (build-system python-build-system)
18013 (propagated-inputs
18014 `(("python-six" ,python-six)
18015 ;; `which`, `kadmin.local` binaries called inside library
18016 ("which" ,which)
18017 ("mit-krb5" ,mit-krb5)))
18018 (native-inputs `(("mit-krb5" ,mit-krb5)))
18019 (arguments
18020 '(#:phases
18021 (modify-phases %standard-phases
18022 (add-after 'unpack 'patch-paths
18023 (lambda* _
18024 (substitute* "k5test/realm.py"
18025 (("'kadmin_local'") "'kadmin.local'")))))))
18026 (home-page "https://github.com/pythongssapi/k5test")
18027 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18028 (description
18029 "@code{k5test} is a library for setting up self-contained Kerberos 5
18030 environments, and running Python unit tests inside those environments. It is
18031 based on the file of the same name found alongside the MIT Kerberos 5 unit
18032 tests.")
18033 (license license:isc)))
18034
18035 (define-public python-gssapi
18036 (package
18037 (name "python-gssapi")
18038 (version "1.6.1")
18039 (source
18040 (origin
18041 (method url-fetch)
18042 (uri (pypi-uri "gssapi" version))
18043 (sha256
18044 (base32
18045 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
18046 (build-system python-build-system)
18047 (propagated-inputs
18048 `(("python-decorator" ,python-decorator)
18049 ("python-six" ,python-six)))
18050 (inputs
18051 `(("mit-krb5" ,mit-krb5)))
18052 ;; for tests
18053 (native-inputs
18054 `(("python-shouldbe" ,python-shouldbe)
18055 ("python-parameterized" ,python-parameterized)
18056 ("python-k5test" ,python-k5test)
18057 ("python-nose" ,python-nose)))
18058 (home-page "https://github.com/pythongssapi/python-gssapi")
18059 (synopsis "Python GSSAPI Wrapper")
18060 (description
18061 "Python-GSSAPI provides both low-level and high level wrappers around the
18062 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18063 also be useable with other GSSAPI mechanisms.")
18064 (license license:isc)))
18065
18066 (define-public python-check-manifest
18067 (package
18068 (name "python-check-manifest")
18069 (version "0.37")
18070 (source
18071 (origin
18072 (method url-fetch)
18073 (uri (pypi-uri "check-manifest" version))
18074 (sha256
18075 (base32
18076 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18077 (build-system python-build-system)
18078 (native-inputs
18079 `(("python-mock" ,python-mock)
18080 ("git" ,git)))
18081 (home-page "https://github.com/mgedmin/check-manifest")
18082 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18083 (description "Python package can include a MANIFEST.in file to help with
18084 sending package files to the Python Package Index. This package checks that
18085 file to ensure it completely and accurately describes your project.")
18086 (license license:expat)))
18087
18088 (define-public python-android-stringslib
18089 (package
18090 (name "python-android-stringslib")
18091 (version "0.1.2")
18092 (source
18093 (origin
18094 (method git-fetch)
18095 (uri (git-reference
18096 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18097 (commit (string-append "v" version))))
18098 (file-name (git-file-name name version))
18099 (sha256
18100 (base32
18101 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18102 (build-system python-build-system)
18103 (arguments
18104 `(#:tests? #f))
18105 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18106 (synopsis "Android strings.xml support")
18107 (description "Android Strings Lib provides support for android's strings.xml
18108 files. These files are used to translate strings in android apps.")
18109 (license license:expat)))
18110
18111 (define-public python-watchdog
18112 (package
18113 (name "python-watchdog")
18114 (version "0.9.0")
18115 (source
18116 (origin
18117 (method url-fetch)
18118 (uri (pypi-uri "watchdog" version))
18119 (sha256
18120 (base32
18121 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
18122 (build-system python-build-system)
18123 (arguments
18124 `(#:phases
18125 (modify-phases %standard-phases
18126 (add-before 'check 'remove-failing
18127 (lambda _
18128 (delete-file "tests/test_inotify_buffer.py")
18129 (delete-file "tests/test_snapshot_diff.py")
18130 #t)))))
18131 (propagated-inputs
18132 `(("python-argh" ,python-argh)
18133 ("python-pathtools" ,python-pathtools)
18134 ("python-pyyaml" ,python-pyyaml)))
18135 (native-inputs
18136 `(("python-pytest-cov" ,python-pytest-cov)
18137 ("python-pytest-timeout" ,python-pytest-timeout)))
18138 (home-page "https://github.com/gorakhargosh/watchdog")
18139 (synopsis "Filesystem events monitoring")
18140 (description "This package provides a way to monitor filesystem events
18141 such as a file modification and trigger an action. This is similar to inotify,
18142 but portable.")
18143 (license license:asl2.0)))
18144
18145 (define-public python-wget
18146 (package
18147 (name "python-wget")
18148 (version "3.2")
18149 (source
18150 (origin
18151 (method url-fetch)
18152 (uri (pypi-uri "wget" version ".zip"))
18153 (sha256
18154 (base32
18155 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
18156 (build-system python-build-system)
18157 (native-inputs `(("unzip" ,unzip)))
18158 (home-page "https://bitbucket.org/techtonik/python-wget/")
18159 (synopsis "Pure Python download utility")
18160 (description "The python-wget library provides an API to download files
18161 with features similar to the @command{wget} utility.")
18162 (license license:unlicense)))
18163
18164 (define-public offlate
18165 (package
18166 (name "offlate")
18167 (version "0.5")
18168 (source
18169 (origin
18170 (method git-fetch)
18171 (uri (git-reference
18172 (url "https://framagit.org/tyreunom/offlate")
18173 (commit version)))
18174 (file-name (git-file-name name version))
18175 (sha256
18176 (base32
18177 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
18178 (build-system python-build-system)
18179 (arguments
18180 ;; No tests
18181 `(#:tests? #f))
18182 (propagated-inputs
18183 `(("python-android-stringslib" ,python-android-stringslib)
18184 ("python-dateutil" ,python-dateutil)
18185 ("python-gitlab" ,python-gitlab)
18186 ("python-lxml" ,python-lxml)
18187 ("python-polib" ,python-polib)
18188 ("python-pyenchant" ,python-pyenchant)
18189 ("python-pygit2" ,python-pygit2)
18190 ("python-pygithub" ,python-pygithub)
18191 ("python-pyqt" ,python-pyqt)
18192 ("python-requests" ,python-requests)
18193 ("python-ruamel.yaml" ,python-ruamel.yaml)
18194 ("python-translation-finder" ,python-translation-finder)
18195 ("python-watchdog" ,python-watchdog)))
18196 (native-inputs
18197 `(("qttools" ,qttools)))
18198 (home-page "https://framagit.org/tyreunom/offlate")
18199 (synopsis "Offline translation interface for online translation tools")
18200 (description "Offlate offers a unified interface for different translation
18201 file formats, as well as many different online translation platforms. You can
18202 use it to get work from online platforms, specialized such as the Translation
18203 Project, or not such a gitlab instance when your upstream doesn't use any
18204 dedicated platform. The tool proposes a unified interface for any format and
18205 an upload option to send your work back to the platform.")
18206 (license license:gpl3+)))
18207
18208 (define-public python-pypng
18209 (package
18210 (name "python-pypng")
18211 (version "0.0.20")
18212 (source
18213 (origin
18214 (method url-fetch)
18215 (uri (pypi-uri "pypng" version))
18216 (sha256
18217 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
18218 (build-system python-build-system)
18219 (home-page "https://github.com/drj11/pypng")
18220 (synopsis "Pure Python PNG image encoder/decoder")
18221 (description
18222 "The PyPNG module implements support for PNG images. It reads and writes
18223 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
18224 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
18225 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
18226 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
18227 A number of optional chunks can be specified (when writing) and
18228 understood (when reading): tRNS, bKGD, gAMA.
18229
18230 PyPNG is not a high level toolkit for image processing (like PIL) and does not
18231 aim at being a replacement or competitor. Its strength lies in fine-grained
18232 extensive support of PNG features. It can also read and write Netpbm PAM
18233 files, with a focus on its use as an intermediate format for implementing
18234 custom PNG processing.")
18235 (license license:expat)))
18236
18237 (define-public python-fuzzywuzzy
18238 (package
18239 (name "python-fuzzywuzzy")
18240 (version "0.18.0")
18241 (source
18242 (origin
18243 (method url-fetch)
18244 (uri (pypi-uri "fuzzywuzzy" version))
18245 (sha256
18246 (base32
18247 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
18248 (build-system python-build-system)
18249 (native-inputs
18250 `(("python-hypothesis" ,python-hypothesis)
18251 ("python-pycodestyle" ,python-pycodestyle)
18252 ("python-pytest" ,python-pytest)))
18253 (propagated-inputs
18254 `(("python-levenshtein" ,python-levenshtein)))
18255 (home-page "https://github.com/seatgeek/fuzzywuzzy")
18256 (synopsis "Fuzzy string matching in Python")
18257 (description "Approximate string matching using
18258 @emph{Levenshtein Distance} to calculate the differences between
18259 sequences.")
18260 (license license:gpl2)))
18261
18262 (define-public python2-fuzzywuzzy
18263 (package-with-python2 python-fuzzywuzzy))