gnu: mallard-ducktype: Update to 1.0.2.
[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 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 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 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 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 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;;
68 ;;; This file is part of GNU Guix.
69 ;;;
70 ;;; GNU Guix is free software; you can redistribute it and/or modify it
71 ;;; under the terms of the GNU General Public License as published by
72 ;;; the Free Software Foundation; either version 3 of the License, or (at
73 ;;; your option) any later version.
74 ;;;
75 ;;; GNU Guix is distributed in the hope that it will be useful, but
76 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
77 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78 ;;; GNU General Public License for more details.
79 ;;;
80 ;;; You should have received a copy of the GNU General Public License
81 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
82
83 (define-module (gnu packages python-xyz)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (gnu packages)
86 #:use-module (gnu packages algebra)
87 #:use-module (gnu packages adns)
88 #:use-module (gnu packages attr)
89 #:use-module (gnu packages backup)
90 #:use-module (gnu packages bash)
91 #:use-module (gnu packages check)
92 #:use-module (gnu packages compression)
93 #:use-module (gnu packages crypto)
94 #:use-module (gnu packages databases)
95 #:use-module (gnu packages dbm)
96 #:use-module (gnu packages file)
97 #:use-module (gnu packages fontutils)
98 #:use-module (gnu packages gcc)
99 #:use-module (gnu packages geo)
100 #:use-module (gnu packages ghostscript)
101 #:use-module (gnu packages gl)
102 #:use-module (gnu packages glib)
103 #:use-module (gnu packages graphviz)
104 #:use-module (gnu packages graphics)
105 #:use-module (gnu packages gstreamer)
106 #:use-module (gnu packages gtk)
107 #:use-module (gnu packages icu4c)
108 #:use-module (gnu packages image)
109 #:use-module (gnu packages imagemagick)
110 #:use-module (gnu packages libevent)
111 #:use-module (gnu packages libffi)
112 #:use-module (gnu packages linux)
113 #:use-module (gnu packages llvm)
114 #:use-module (gnu packages man)
115 #:use-module (gnu packages maths)
116 #:use-module (gnu packages monitoring)
117 #:use-module (gnu packages multiprecision)
118 #:use-module (gnu packages networking)
119 #:use-module (gnu packages ncurses)
120 #:use-module (gnu packages openstack)
121 #:use-module (gnu packages pcre)
122 #:use-module (gnu packages perl)
123 #:use-module (gnu packages pkg-config)
124 #:use-module (gnu packages python)
125 #:use-module (gnu packages python-check)
126 #:use-module (gnu packages python-compression)
127 #:use-module (gnu packages python-crypto)
128 #:use-module (gnu packages python-web)
129 #:use-module (gnu packages qt)
130 #:use-module (gnu packages readline)
131 #:use-module (gnu packages sdl)
132 #:use-module (gnu packages search)
133 #:use-module (gnu packages shells)
134 #:use-module (gnu packages sphinx)
135 #:use-module (gnu packages ssh)
136 #:use-module (gnu packages terminals)
137 #:use-module (gnu packages tex)
138 #:use-module (gnu packages texinfo)
139 #:use-module (gnu packages time)
140 #:use-module (gnu packages tls)
141 #:use-module (gnu packages version-control)
142 #:use-module (gnu packages video)
143 #:use-module (gnu packages web)
144 #:use-module (gnu packages base)
145 #:use-module (gnu packages xml)
146 #:use-module (gnu packages xorg)
147 #:use-module (gnu packages xdisorg)
148 #:use-module (gnu packages tcl)
149 #:use-module (gnu packages bdw-gc)
150 #:use-module (gnu packages serialization)
151 #:use-module (guix packages)
152 #:use-module (guix download)
153 #:use-module (guix git-download)
154 #:use-module (guix hg-download)
155 #:use-module (guix utils)
156 #:use-module (guix build-system gnu)
157 #:use-module (guix build-system cmake)
158 #:use-module (guix build-system python)
159 #:use-module (guix build-system trivial)
160 #:use-module (srfi srfi-1)
161 #:use-module (srfi srfi-26))
162
163 (define-public python-psutil
164 (package
165 (name "python-psutil")
166 (version "5.6.2")
167 (source
168 (origin
169 (method url-fetch)
170 (uri (pypi-uri "psutil" version))
171 (sha256
172 (base32
173 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
174 (build-system python-build-system)
175 (arguments
176 ;; FIXME: some tests does not return and times out.
177 '(#:tests? #f))
178 (home-page "https://www.github.com/giampaolo/psutil")
179 (synopsis "Library for retrieving information on running processes")
180 (description
181 "psutil (Python system and process utilities) is a library for retrieving
182 information on running processes and system utilization (CPU, memory, disks,
183 network) in Python. It is useful mainly for system monitoring, profiling and
184 limiting process resources and management of running processes. It implements
185 many functionalities offered by command line tools such as: ps, top, lsof,
186 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
187 pidof, tty, taskset, pmap.")
188 (properties `((python2-variant . ,(delay python2-psutil))))
189 (license license:bsd-3)))
190
191 (define-public python2-psutil
192 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
193 (package
194 (inherit base)
195 (propagated-inputs
196 `(("python2-enum34" ,python2-enum34) ;optional
197 ,@(package-propagated-inputs base))))))
198
199 (define-public python-shapely
200 (package
201 (name "python-shapely")
202 (version "1.6.4.post2")
203 (source
204 (origin
205 (method url-fetch)
206 (uri (pypi-uri "Shapely" version))
207 (sha256
208 (base32
209 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
210 (build-system python-build-system)
211 (native-inputs
212 `(("python-cython" ,python-cython)
213 ("python-matplotlib" ,python-matplotlib)
214 ("python-pytest" ,python-pytest)
215 ("python-pytest-cov" ,python-pytest-cov)))
216 (inputs
217 `(("geos" ,geos)))
218 (propagated-inputs
219 `(("python-numpy" ,python-numpy)))
220 (arguments
221 `(#:phases
222 (modify-phases %standard-phases
223 (add-after 'unpack 'patch-geos-path
224 (lambda* (#:key inputs #:allow-other-keys)
225 (let ((geos (assoc-ref inputs "geos"))
226 (glibc (assoc-ref inputs ,(if (%current-target-system)
227 "cross-libc" "libc"))))
228 (substitute* "shapely/geos.py"
229 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
230 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
231 geos "/lib/libgeos_c.so'])"))
232 (("free = load_dll\\('c'\\)\\.free")
233 (string-append "free = load_dll('c', fallbacks=['"
234 glibc "/lib/libc.so.6']).free"))))
235 #t)))))
236 (home-page "https://github.com/Toblerity/Shapely")
237 (synopsis "Library for the manipulation and analysis of geometric objects")
238 (description "Shapely is a Python package for manipulation and analysis of
239 planar geometric objects. It is based on the @code{GEOS} library.")
240 (license license:bsd-3)))
241
242 (define-public python-shortuuid
243 (package
244 (name "python-shortuuid")
245 (version "0.5.0")
246 (source
247 (origin
248 (method url-fetch)
249 (uri (pypi-uri "shortuuid" version))
250 (sha256
251 (base32
252 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
253 (build-system python-build-system)
254 (native-inputs
255 `(("python-pep8" ,python-pep8)))
256 (home-page "https://github.com/skorokithakis/shortuuid")
257 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
258 (description
259 "@code{shortuuid} is a Python library for generating concise, unambiguous
260 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
261 module and then similar looking characters are removed.")
262 (license license:bsd-3)))
263
264 (define-public python-logwrap
265 (package
266 (name "python-logwrap")
267 (version "3.2.1")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (pypi-uri "logwrap" version ".zip"))
272 (sha256
273 (base32
274 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
275 (build-system python-build-system)
276 (propagated-inputs
277 `(("python-six" ,python-six)
278 ("python-typing" ,python-typing)))
279 (native-inputs
280 `(("unzip" ,unzip)
281 ("python-cython" ,python-cython)
282 ("python-pytest" ,python-pytest)
283 ("python-pytest-cov" ,python-pytest-cov)
284 ("python-pytest-runner" ,python-pytest-runner)))
285 (home-page "https://github.com/penguinolog/logwrap")
286 (synopsis "Decorator for logging function arguments")
287 (description "This package provides a decorator to log function arguments
288 and function call return values in a human-readable way.")
289 (license license:asl2.0)))
290
291 (define-public python2-shapely
292 (package-with-python2 python-shapely))
293
294 (define-public python-clyent
295 (package
296 (name "python-clyent")
297 (version "1.2.1")
298 (source
299 (origin
300 (method url-fetch)
301 (uri (pypi-uri "clyent" version))
302 (sha256
303 (base32
304 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
305 (build-system python-build-system)
306 (native-inputs
307 `(("python-mock" ,python-mock)))
308 (home-page "https://github.com/binstar/clyent")
309 (synopsis "Command line client library")
310 (description "Clyent is a Python command line utiliy library. It is used
311 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
312 (license license:bsd-3)))
313
314 (define-public python2-clyent
315 (package-with-python2 python-clyent))
316
317 (define-public python-babel
318 (package
319 (name "python-babel")
320 (version "2.7.0")
321 (source
322 (origin
323 (method url-fetch)
324 (uri (pypi-uri "Babel" version))
325 (sha256
326 (base32
327 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
328 (build-system python-build-system)
329 (native-inputs
330 `(("python-freezegun" ,python-freezegun)
331 ("python-pytest" ,python-pytest)))
332 (propagated-inputs
333 `(("python-pytz" ,python-pytz)))
334 (arguments
335 `(#:phases (modify-phases %standard-phases
336 (replace 'check
337 (lambda _ (invoke "pytest" "-vv"))))))
338 (home-page "http://babel.pocoo.org/")
339 (synopsis
340 "Tools for internationalizing Python applications")
341 (description
342 "Babel is composed of two major parts:
343 - tools to build and work with gettext message catalogs
344 - a Python interface to the CLDR (Common Locale Data Repository), providing
345 access to various locale display names, localized number and date formatting,
346 etc. ")
347 (license license:bsd-3)))
348
349 (define-public python2-babel
350 (package-with-python2 python-babel))
351
352 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
353 (define-public python2-babel-2.6
354 (package
355 (inherit python2-babel)
356 (version "2.6.0")
357 (source (origin
358 (method url-fetch)
359 (uri (pypi-uri "Babel" version))
360 (sha256
361 (base32
362 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
363
364 (define-public python2-backport-ssl-match-hostname
365 (package
366 (name "python2-backport-ssl-match-hostname")
367 (version "3.5.0.1")
368 (source
369 (origin
370 (method url-fetch)
371 (uri (pypi-uri "backports.ssl_match_hostname" version))
372 (sha256
373 (base32
374 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
375 (build-system python-build-system)
376 (arguments
377 `(#:python ,python-2
378 #:tests? #f)) ; no test target
379 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
380 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
381 (description
382 "This backport brings the ssl.match_hostname() function to users of
383 earlier versions of Python. The function checks the hostname in the
384 certificate returned by the server to which a connection has been established,
385 and verifies that it matches the intended target hostname.")
386 (license license:psfl)))
387
388 (define-public python-hdf4
389 (package
390 (name "python-hdf4")
391 (version "0.9")
392 (source
393 (origin
394 (method url-fetch)
395 (uri (pypi-uri name version))
396 (sha256
397 (base32
398 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
399 (build-system python-build-system)
400 (native-inputs `(("nose" ,python-nose)))
401 (propagated-inputs `(("numpy" ,python-numpy)))
402 (inputs
403 `(("hdf4" ,hdf4)
404 ("libjpeg" ,libjpeg)
405 ("zlib" ,zlib)))
406 (arguments
407 `(#:phases
408 (modify-phases %standard-phases
409 (replace 'check
410 (lambda _
411 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
412 ;; on to import numpy. Somehow this works on their CI system.
413 ;; Let's just manage PYTHONPATH here instead.
414 (substitute* "runexamples.sh"
415 (("export PYTHONPATH=.*") ""))
416 (setenv "PYTHONPATH"
417 (string-append (getcwd) ":"
418 (getenv "PYTHONPATH")))
419 (invoke "./runexamples.sh")
420 (invoke "nosetests" "-v"))))))
421 (home-page "https://github.com/fhs/python-hdf4")
422 (synopsis "Python interface to the NCSA HDF4 library")
423 (description
424 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
425 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
426 NetCDF files can also be read and modified. Python-HDF4 is a fork of
427 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
428 (license license:expat)))
429
430 (define-public python2-hdf4
431 (package-with-python2 python-hdf4))
432
433 (define-public python-h5py
434 (package
435 (name "python-h5py")
436 (version "2.8.0")
437 (source
438 (origin
439 (method url-fetch)
440 (uri (pypi-uri "h5py" version))
441 (sha256
442 (base32
443 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
444 (build-system python-build-system)
445 (arguments
446 `(#:tests? #f ; no test target
447 #:phases
448 (modify-phases %standard-phases
449 (add-after 'unpack 'fix-hdf5-paths
450 (lambda* (#:key inputs #:allow-other-keys)
451 (let ((prefix (assoc-ref inputs "hdf5")))
452 (substitute* "setup_build.py"
453 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
454 (string-append "['" prefix "/lib" "']"))
455 (("'/opt/local/include', '/usr/local/include'")
456 (string-append "'" prefix "/include" "'")))
457 (substitute* "setup_configure.py"
458 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
459 (string-append "['" prefix "/lib" "']")))
460 #t))))))
461 (propagated-inputs
462 `(("python-six" ,python-six)
463 ("python-numpy" ,python-numpy)))
464 (inputs
465 `(("hdf5" ,hdf5)))
466 (native-inputs
467 `(("python-cython" ,python-cython)
468 ("python-pkgconfig" ,python-pkgconfig)))
469 (home-page "http://www.h5py.org/")
470 (synopsis "Read and write HDF5 files from Python")
471 (description
472 "The h5py package provides both a high- and low-level interface to the
473 HDF5 library from Python. The low-level interface is intended to be a
474 complete wrapping of the HDF5 API, while the high-level component supports
475 access to HDF5 files, datasets and groups using established Python and NumPy
476 concepts.")
477 (license license:bsd-3)))
478
479 (define-public python2-h5py
480 (package-with-python2 python-h5py))
481
482 (define-public python-sh
483 (package
484 (name "python-sh")
485 (version "1.12.14")
486 (source
487 (origin
488 (method url-fetch)
489 (uri (pypi-uri "sh" version))
490 (sha256
491 (base32
492 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
493 (build-system python-build-system)
494 (arguments
495 '(#:phases
496 (modify-phases %standard-phases
497 (replace 'check
498 (lambda _
499 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
500 (setenv "HOME" "/tmp")
501 (invoke "python" "sh.py" "test"))))))
502 (native-inputs
503 `(("python-coverage" ,python-coverage)))
504 (home-page "https://github.com/amoffat/sh")
505 (synopsis "Python subprocess replacement")
506 (description "This package provides a replacement for Python's
507 @code{subprocess} feature.")
508 (license license:expat)))
509
510 (define-public python2-sh
511 (package-with-python2 python-sh))
512
513 (define-public python-cftime
514 (package
515 (name "python-cftime")
516 (version "1.0.3.4")
517 (source
518 (origin
519 (method url-fetch)
520 (uri (pypi-uri "cftime" version))
521 (sha256
522 (base32
523 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
524 (build-system python-build-system)
525 (propagated-inputs
526 `(("python-numpy" ,python-numpy)))
527 (native-inputs
528 `(("python-coveralls" ,python-coveralls)
529 ("python-cython" ,python-cython)
530 ("python-pytest-cov" ,python-pytest-cov)))
531 (home-page "https://github.com/Unidata/cftime")
532 (synopsis "Library for time handling")
533 (description
534 "This package provides time-handling functionality that used to be part
535 of the netcdf4 package before.")
536 ;; This package claims to include code under the GPLv3 but is released
537 ;; under ISC.
538 (license (list license:isc license:gpl3+))))
539
540 (define-public python-netcdf4
541 (package
542 (name "python-netcdf4")
543 (version "1.4.2")
544 (source
545 (origin
546 (method url-fetch)
547 (uri (pypi-uri "netCDF4" version))
548 (sha256
549 (base32
550 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
551 (build-system python-build-system)
552 (arguments
553 '(#:phases
554 (modify-phases %standard-phases
555 (add-after 'unpack 'configure-locations
556 (lambda* (#:key inputs #:allow-other-keys)
557 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
558 #t)))))
559 (native-inputs
560 `(("python-cython" ,python-cython)))
561 (propagated-inputs
562 `(("python-numpy" ,python-numpy)
563 ("python-cftime" ,python-cftime)))
564 (inputs
565 `(("netcdf" ,netcdf)
566 ("hdf4" ,hdf4)
567 ("hdf5" ,hdf5)))
568 (home-page "https://github.com/Unidata/netcdf4-python")
569 (synopsis "Python/numpy interface to the netCDF library")
570 (description "Netcdf4-python is a Python interface to the netCDF C
571 library. netCDF version 4 has many features not found in earlier
572 versions of the library and is implemented on top of HDF5. This module
573 can read and write files in both the new netCDF 4 and the old netCDF 3
574 format, and can create files that are readable by HDF5 clients. The
575 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
576 to users of that module.")
577 ;; The software is mainly ISC, but includes some files covered
578 ;; by the Expat license.
579 (license (list license:isc license:expat))))
580
581 (define-public python2-netcdf4
582 (package-with-python2 python-netcdf4))
583
584 (define-public python-lockfile
585 (package
586 (name "python-lockfile")
587 (version "0.12.2")
588 (source
589 (origin
590 (method url-fetch)
591 (uri (pypi-uri "lockfile" version))
592 (sha256
593 (base32
594 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
595 (build-system python-build-system)
596 (arguments '(#:test-target "check"))
597 (native-inputs
598 `(("python-pbr" ,python-pbr)))
599 (home-page "https://launchpad.net/pylockfile")
600 (synopsis "Platform-independent file locking module")
601 (description
602 "The lockfile package exports a LockFile class which provides a simple
603 API for locking files.")
604 (license license:expat)))
605
606 (define-public python2-lockfile
607 (package-with-python2 python-lockfile))
608
609 (define-public python-semantic-version
610 (package
611 (name "python-semantic-version")
612 (version "2.6.0")
613 (source
614 (origin
615 (method url-fetch)
616 (uri (pypi-uri "semantic_version" version))
617 (sha256
618 (base32
619 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
620 (build-system python-build-system)
621 (arguments
622 `(#:tests? #f)) ; PyPI tarball lacks tests
623 (home-page "https://github.com/rbarrois/python-semanticversion")
624 (synopsis "Semantic versioning module for Python")
625 (description
626 "The @code{semantic_version} class is a small library for handling
627 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
628
629 It can compare versions, generate a new version that represents a bump in one of
630 the version levels, and check whether any given string is a proper semantic
631 version identifier.")
632 (license license:bsd-3)))
633
634 (define-public python2-semantic-version
635 (package-with-python2 python-semantic-version))
636
637 (define-public python-serpent
638 (package
639 (name "python-serpent")
640 (version "1.28")
641 (source
642 (origin
643 (method url-fetch)
644 (uri (pypi-uri "serpent" version))
645 (sha256
646 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
647 (build-system python-build-system)
648 (native-inputs
649 `(("python-attrs" ,python-attrs)
650 ("python-pytz" ,python-pytz)))
651 (home-page "https://github.com/irmen/Serpent")
652 (synopsis "Serializer for literal Python expressions")
653 (description
654 "Serpent provides @code{ast.literal_eval()}-compatible object tree
655 serialization. It serializes an object tree into bytes (an utf-8 encoded
656 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
657 to rebuild the original object tree.
658
659 Because only safe literals are encoded, it is safe to send serpent data to
660 other machines, such as over the network.")
661 (license license:expat)))
662
663 (define-public python-setuptools
664 (package
665 (name "python-setuptools")
666 (version "41.0.1")
667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "setuptools" version ".zip"))
671 (sha256
672 (base32
673 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
674 (modules '((guix build utils)))
675 (snippet
676 '(begin
677 ;; Remove included binaries which are used to build self-extracting
678 ;; installers for Windows.
679 ;; TODO: Find some way to build them ourself so we can include them.
680 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
681 #t))))
682 (build-system python-build-system)
683 ;; FIXME: Tests require pytest, which itself relies on setuptools.
684 ;; One could bootstrap with an internal untested setuptools.
685 (arguments
686 `(#:tests? #f))
687 (home-page "https://pypi.python.org/pypi/setuptools")
688 (synopsis
689 "Library designed to facilitate packaging Python projects")
690 (description
691 "Setuptools is a fully-featured, stable library designed to facilitate
692 packaging Python projects, where packaging includes:
693 Python package and module definitions,
694 distribution package metadata,
695 test hooks,
696 project installation,
697 platform-specific details,
698 Python 3 support.")
699 ;; TODO: setuptools now bundles the following libraries:
700 ;; packaging, pyparsing, six and appdirs. How to unbundle?
701 (license (list license:psfl ; setuptools itself
702 license:expat ; six, appdirs, pyparsing
703 license:asl2.0 ; packaging is dual ASL2/BSD-2
704 license:bsd-2))))
705
706 (define-public python2-setuptools
707 (package-with-python2 python-setuptools))
708
709 (define-public python-uniseg
710 (package
711 (name "python-uniseg")
712 (version "0.7.1")
713 (source
714 (origin
715 (method url-fetch)
716 (uri (pypi-uri "uniseg" version ".zip"))
717 (sha256
718 (base32
719 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
720 (build-system python-build-system)
721 (arguments
722 '(#:tests? #f)) ; The test suite requires network access.
723 (native-inputs
724 `(("unzip" ,unzip)))
725 (home-page
726 "https://bitbucket.org/emptypage/uniseg-python")
727 (synopsis
728 "Python library to determine Unicode text segmentations")
729 (description
730 "Uniseg is a Python package used to determine Unicode text segmentations.
731 Supported segmentations include:
732 @enumerate
733 @item @dfn{Code point} (any value in the Unicode codespace)
734 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
735 multiple Unicode code points, e.g. \"G\" + acute-accent)
736 @item Word break
737 @item Sentence break
738 @item Line break
739 @end enumerate")
740 (license license:expat)))
741
742 (define-public python2-uniseg
743 (package-with-python2 python-uniseg))
744
745 (define-public python-humanfriendly
746 (package
747 (name "python-humanfriendly")
748 (version "4.4.1")
749 (source
750 (origin
751 (method url-fetch)
752 (uri (pypi-uri "humanfriendly" version))
753 (sha256
754 (base32
755 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
756 (build-system python-build-system)
757 (arguments
758 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
759 #:tests? #f))
760 (propagated-inputs
761 `(("python-monotonic" ,python-monotonic)))
762 (home-page "https://humanfriendly.readthedocs.io")
763 (synopsis "Human-friendly input and output in Python")
764 (description
765 "The functions and classes in @code{humanfriendly} can be used to make
766 text interfaces more user-friendly. It includes tools to parse and format
767 numbers, file sizes, and timespans, timers for long-running operations, menus
768 to allow the user to choose from a list of options, and terminal interaction
769 helpers.")
770 (license license:expat)))
771
772 (define-public python2-humanfriendly
773 (package-with-python2 python-humanfriendly))
774
775 (define-public python-capturer
776 (package
777 (name "python-capturer")
778 (version "2.4")
779 (source
780 (origin
781 (method url-fetch)
782 (uri (pypi-uri "capturer" version))
783 (sha256
784 (base32
785 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
786 (build-system python-build-system)
787 (arguments
788 `(#:tests? #f))
789 (propagated-inputs
790 `(("python-humanfriendly" ,python-humanfriendly)))
791 (home-page "https://capturer.readthedocs.io")
792 (synopsis "Capture stdout and stderr streams of the current process")
793 (description
794 "The capturer package makes it easy to capture the stdout and stderr
795 streams of the current process and subprocesses. Output can be relayed
796 to the terminal in real time but is also available to the Python program
797 for additional processing.")
798 (license license:expat)))
799
800 (define-public python2-capturer
801 (package-with-python2 python-capturer))
802
803 (define-public python-case
804 (package
805 (name "python-case")
806 (version "1.5.3")
807 (source
808 (origin
809 (method url-fetch)
810 (uri (pypi-uri "case" version))
811 (sha256
812 (base32
813 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
814 (build-system python-build-system)
815 (propagated-inputs
816 `(("python-mock" ,python-mock)
817 ("python-nose" ,python-nose)
818 ("python-six" ,python-six)
819 ("python-unittest2" ,python-unittest2)))
820 (native-inputs
821 `(("python-coverage" ,python-coverage)))
822 (home-page "https://github.com/celery/case")
823 (synopsis "Unittest utilities and convenience methods")
824 (description
825 "The @code{case} package provides utilities on top of unittest, including
826 some helpful Python 2 compatibility convenience methods.")
827 (license license:bsd-3)))
828
829 (define-public python-verboselogs
830 (package
831 (name "python-verboselogs")
832 (version "1.7")
833 (source
834 (origin
835 (method url-fetch)
836 (uri (pypi-uri "verboselogs" version))
837 (sha256
838 (base32
839 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
840 (build-system python-build-system)
841 (native-inputs
842 `(("python-mock" ,python-mock)
843 ("python-astroid" ,python-astroid)
844 ("python-pylint" ,python-pylint)))
845 (home-page "https://verboselogs.readthedocs.io")
846 (synopsis "Verbose logging level for Python's logging module")
847 (description
848 "The @code{verboselogs} package extends Python's @code{logging} module to
849 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
850 (license license:expat)))
851
852 (define-public python2-verboselogs
853 (package-with-python2 python-verboselogs))
854
855 (define-public python-coloredlogs
856 (package
857 (name "python-coloredlogs")
858 (version "7.3")
859 (source
860 (origin
861 (method url-fetch)
862 (uri (pypi-uri "coloredlogs" version))
863 (sha256
864 (base32
865 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
866 (build-system python-build-system)
867 (arguments
868 `(;Tests require some updated modules
869 #:tests? #f))
870 (propagated-inputs
871 `(("python-capturer" ,python-capturer)))
872 (home-page "https://coloredlogs.readthedocs.io")
873 (synopsis "Colored stream handler for Python's logging module")
874 (description
875 "The @code{coloredlogs} package enables colored terminal output for
876 Python's logging module. The @code{ColoredFormatter} class inherits from
877 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
878 messages in color.")
879 (license license:expat)))
880
881 (define-public python2-coloredlogs
882 (package-with-python2 python-coloredlogs))
883
884 (define-public python-et-xmlfile
885 (package
886 (name "python-et-xmlfile")
887 (version "1.0.1")
888 (source
889 (origin
890 (method url-fetch)
891 (uri (pypi-uri "et_xmlfile" version))
892 (sha256
893 (base32
894 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
895 (build-system python-build-system)
896 (arguments
897 `(#:phases (modify-phases %standard-phases
898 (replace 'check
899 (lambda _
900 (invoke "pytest"))))))
901 (native-inputs
902 `(("python-pytest" ,python-pytest)
903 ("python-lxml" ,python-lxml))) ;used for the tests
904 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
905 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
906 (description "This Python library is based upon the @code{xmlfile} module
907 from @code{lxml}. It aims to provide a low memory, compatible implementation
908 of @code{xmlfile}.")
909 (license license:expat)))
910
911 (define-public python2-et-xmlfile
912 (package-with-python2 python-et-xmlfile))
913
914 (define-public python-openpyxl
915 (package
916 (name "python-openpyxl")
917 (version "2.6.2")
918 (source
919 (origin
920 ;; We use the upstream repository, as the tests are not included in the
921 ;; PyPI releases.
922 (method hg-fetch)
923 (uri (hg-reference
924 (url "https://bitbucket.org/openpyxl/openpyxl")
925 (changeset version)))
926 (file-name (string-append name "-" version "-checkout"))
927 (sha256
928 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
929 (build-system python-build-system)
930 (arguments
931 `(#:phases (modify-phases %standard-phases
932 (replace 'check
933 (lambda _
934 (invoke "pytest"))))))
935 (native-inputs
936 ;; For the test suite.
937 `(("python-lxml" ,python-lxml)
938 ("python-pillow" ,python-pillow)
939 ("python-pytest" ,python-pytest)))
940 (propagated-inputs
941 `(("python-et-xmlfile" ,python-et-xmlfile)
942 ("python-jdcal" ,python-jdcal)))
943 (home-page "https://openpyxl.readthedocs.io")
944 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
945 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
946 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
947 standard.")
948 (license license:expat)))
949
950 (define-public python-eventlet
951 (package
952 (name "python-eventlet")
953 (version "0.20.1")
954 (source
955 (origin
956 (method url-fetch)
957 (uri (pypi-uri "eventlet" version))
958 (sha256
959 (base32
960 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
961 (build-system python-build-system)
962 (propagated-inputs
963 `(("python-greenlet" ,python-greenlet)))
964 (arguments
965 ;; TODO: Requires unpackaged 'enum-compat'.
966 '(#:tests? #f))
967 (home-page "http://eventlet.net")
968 (synopsis "Concurrent networking library for Python")
969 (description
970 "Eventlet is a concurrent networking library for Python that
971 allows you to change how you run your code, not how you write it.
972 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
973 Coroutines ensure that the developer uses a blocking style of programming
974 that is similar to threading, but provide the benefits of non-blocking I/O.
975 The event dispatch is implicit, which means you can easily use @code{Eventlet}
976 from the Python interpreter, or as a small part of a larger application.")
977 (license license:expat)))
978
979 (define-public python2-eventlet
980 (let ((base (package-with-python2
981 (strip-python2-variant python-eventlet))))
982 (package (inherit base)
983 (propagated-inputs
984 `(("python2-enum34" ,python2-enum34)
985 ,@(package-propagated-inputs base))))))
986
987 (define-public python-six
988 (package
989 (name "python-six")
990 (version "1.11.0")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (pypi-uri "six" version))
995 (sha256
996 (base32
997 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
998 (build-system python-build-system)
999 (arguments
1000 `(#:phases
1001 (modify-phases %standard-phases
1002 (replace 'check
1003 (lambda _
1004 (invoke "py.test" "-v"))))))
1005 (native-inputs
1006 `(("python-py" ,python-py)
1007 ("python-pytest" ,python-pytest-bootstrap)))
1008 (home-page "https://pypi.python.org/pypi/six/")
1009 (synopsis "Python 2 and 3 compatibility utilities")
1010 (description
1011 "Six is a Python 2 and 3 compatibility library. It provides utility
1012 functions for smoothing over the differences between the Python versions with
1013 the goal of writing Python code that is compatible on both Python versions.
1014 Six supports every Python version since 2.5. It is contained in only one
1015 Python file, so it can be easily copied into your project.")
1016 (license license:x11)))
1017
1018 (define-public python2-six
1019 (package-with-python2 python-six))
1020
1021 (define-public python-six-bootstrap
1022 (package
1023 (inherit python-six)
1024 (name "python-six-bootstrap")
1025 (native-inputs `())
1026 (arguments `(#:tests? #f))))
1027
1028 (define-public python2-six-bootstrap
1029 (package-with-python2 python-six-bootstrap))
1030
1031 (define-public python-schedule
1032 (package
1033 (name "python-schedule")
1034 (version "0.4.3")
1035 (source
1036 (origin
1037 (method url-fetch)
1038 (uri (pypi-uri "schedule" version))
1039 (sha256
1040 (base32
1041 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1042 (build-system python-build-system)
1043 (native-inputs
1044 `(("python-pytest" ,python-pytest)
1045 ("python-mock" ,python-mock)))
1046 (home-page "https://github.com/dbader/schedule")
1047 (synopsis "Schedule periodic function calls in Python")
1048 (description
1049 "Schedule is an in-process scheduler for periodic jobs that uses the
1050 builder pattern for configuration. Schedule lets you run Python functions (or
1051 any other callable) periodically at pre-determined intervals using a simple,
1052 human-friendly syntax.")
1053 (license license:expat)))
1054
1055 (define-public python2-schedule
1056 (package-with-python2 python-schedule))
1057
1058 (define-public python-pandas
1059 (package
1060 (name "python-pandas")
1061 (version "0.24.2")
1062 (source
1063 (origin
1064 (method url-fetch)
1065 (uri (pypi-uri "pandas" version))
1066 (sha256
1067 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1068 (build-system python-build-system)
1069 (arguments
1070 `(#:modules ((guix build utils)
1071 (guix build python-build-system)
1072 (ice-9 ftw)
1073 (srfi srfi-26))
1074 #:phases (modify-phases %standard-phases
1075 (add-after 'unpack 'patch-which
1076 (lambda* (#:key inputs #:allow-other-keys)
1077 (let ((which (assoc-ref inputs "which")))
1078 (substitute* "pandas/io/clipboard/__init__.py"
1079 (("^CHECK_CMD = .*")
1080 (string-append "CHECK_CMD = \"" which "\"\n"))))
1081 #t))
1082 (replace 'check
1083 (lambda _
1084 (let ((build-directory
1085 (string-append
1086 (getcwd) "/build/"
1087 (car (scandir "build"
1088 (cut string-prefix? "lib." <>))))))
1089 ;; Disable the "strict data files" option which causes
1090 ;; the build to error out if required data files are
1091 ;; not available (as is the case with PyPI archives).
1092 (substitute* "setup.cfg"
1093 (("addopts = --strict-data-files") "addopts = "))
1094 (with-directory-excursion build-directory
1095 ;; Delete tests that require "moto" which is not yet
1096 ;; in Guix.
1097 (for-each delete-file
1098 '("pandas/tests/io/conftest.py"
1099 "pandas/tests/io/json/test_compression.py"
1100 "pandas/tests/io/parser/test_network.py"
1101 "pandas/tests/io/test_parquet.py"))
1102 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1103 "--skip-network" "-k"
1104 ;; XXX: Due to the deleted tests above.
1105 "not test_read_s3_jsonl"))))))))
1106 (propagated-inputs
1107 `(("python-numpy" ,python-numpy)
1108 ("python-openpyxl" ,python-openpyxl)
1109 ("python-pytz" ,python-pytz)
1110 ("python-dateutil" ,python-dateutil)
1111 ("python-xlrd" ,python-xlrd)))
1112 (inputs
1113 `(("which" ,which)))
1114 (native-inputs
1115 `(("python-cython" ,python-cython)
1116 ("python-beautifulsoup4" ,python-beautifulsoup4)
1117 ("python-lxml" ,python-lxml)
1118 ("python-html5lib" ,python-html5lib)
1119 ("python-nose" ,python-nose)
1120 ("python-pytest" ,python-pytest)
1121 ("python-pytest-mock" ,python-pytest-mock)))
1122 (home-page "https://pandas.pydata.org")
1123 (synopsis "Data structures for data analysis, time series, and statistics")
1124 (description
1125 "Pandas is a Python package providing fast, flexible, and expressive data
1126 structures designed to make working with structured (tabular,
1127 multidimensional, potentially heterogeneous) and time series data both easy
1128 and intuitive. It aims to be the fundamental high-level building block for
1129 doing practical, real world data analysis in Python.")
1130 (license license:bsd-3)))
1131
1132 (define-public python2-pandas
1133 (package-with-python2 python-pandas))
1134
1135 (define-public python2-mechanize
1136 (package
1137 (name "python2-mechanize")
1138 (version "0.2.5")
1139 (source
1140 (origin
1141 (method url-fetch)
1142 (uri (pypi-uri "mechanize" version))
1143 (sha256
1144 (base32
1145 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1146 (build-system python-build-system)
1147 (arguments
1148 `(#:python ,python-2 ; apparently incompatible with Python 3
1149 #:tests? #f))
1150 ;; test fails with message
1151 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1152 ;; (python-3.3.2) or
1153 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1154 ;; (python-2.7.5).
1155 ;; The source code is from March 2011 and probably not up-to-date
1156 ;; with respect to python unit tests.
1157 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1158 (synopsis
1159 "Stateful programmatic web browsing in Python")
1160 (description
1161 "Mechanize implements stateful programmatic web browsing in Python,
1162 after Andy Lester’s Perl module WWW::Mechanize.")
1163 (license (license:non-copyleft
1164 "file://COPYING"
1165 "See COPYING in the distribution."))))
1166
1167
1168 (define-public python-simplejson
1169 (package
1170 (name "python-simplejson")
1171 (version "3.14.0")
1172 (source
1173 (origin
1174 (method url-fetch)
1175 (uri (pypi-uri "simplejson" version))
1176 (sha256
1177 (base32
1178 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1179 (build-system python-build-system)
1180 (home-page "http://simplejson.readthedocs.org/en/latest/")
1181 (synopsis
1182 "Json library for Python")
1183 (description
1184 "JSON (JavaScript Object Notation) is a subset of JavaScript
1185 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1186 format.
1187
1188 Simplejson exposes an API familiar to users of the standard library marshal
1189 and pickle modules. It is the externally maintained version of the json
1190 library contained in Python 2.6, but maintains compatibility with Python 2.5
1191 and (currently) has significant performance advantages, even without using
1192 the optional C extension for speedups. Simplejson is also supported on
1193 Python 3.3+.")
1194 (license license:x11)))
1195
1196 (define-public python2-simplejson
1197 (package-with-python2 python-simplejson))
1198
1199
1200 (define-public python-pyicu
1201 (package
1202 (name "python-pyicu")
1203 (version "2.2")
1204 (source
1205 (origin
1206 (method url-fetch)
1207 (uri (pypi-uri "PyICU" version))
1208 (sha256
1209 (base32
1210 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1211 (build-system python-build-system)
1212 (inputs
1213 `(("icu4c" ,icu4c)))
1214 (native-inputs
1215 `(("python-pytest" ,python-pytest)
1216 ("python-six" ,python-six)))
1217 (home-page "https://github.com/ovalhub/pyicu")
1218 (synopsis "Python extension wrapping the ICU C++ API")
1219 (description
1220 "PyICU is a python extension wrapping the ICU C++ API.")
1221 (properties `((python2-variant . ,(delay python2-pyicu))))
1222 (license license:x11)))
1223
1224 (define-public python2-pyicu
1225 (let ((base (package-with-python2
1226 (strip-python2-variant python-pyicu))))
1227 (package
1228 (inherit base)
1229 (arguments
1230 `(,@(package-arguments base)
1231 #:phases
1232 (modify-phases %standard-phases
1233 (add-before 'check 'delete-failing-test
1234 (λ _
1235 ;; XXX: This fails due to Unicode issues unique to Python 2,
1236 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1237 (delete-file "test/test_Script.py")
1238 #t))))))))
1239
1240 (define-public python2-dogtail
1241 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1242 ;; spaces in indentation" with Python 3.
1243 (package
1244 (name "python2-dogtail")
1245 (version "0.9.9")
1246 (source (origin
1247 (method url-fetch)
1248 (uri (pypi-uri "dogtail" version))
1249 (sha256
1250 (base32
1251 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1252 (build-system python-build-system)
1253 (arguments `(#:python ,python-2
1254 #:tests? #f)) ; invalid command "test"
1255 ;; Currently no offical homepage.
1256 (home-page "https://pypi.python.org/pypi/dogtail/")
1257 (synopsis "GUI test tool and automation framework written in Python")
1258 (description
1259 "Dogtail is a GUI test tool and automation framework written in Python.
1260 It uses Accessibility (a11y) technologies to communicate with desktop
1261 applications. dogtail scripts are written in Python and executed like any
1262 other Python program.")
1263 (license license:gpl2+)))
1264
1265 (define-public python-empy
1266 (package
1267 (name "python-empy")
1268 (version "3.3.3")
1269 (source (origin
1270 (method url-fetch)
1271 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1272 version ".tar.gz"))
1273 (sha256
1274 (base32
1275 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1276 (build-system python-build-system)
1277 (arguments
1278 `(#:tests? #f)) ; python2 only
1279 (home-page "http://www.alcyone.com/software/empy/")
1280 (synopsis "Templating system for Python")
1281 (description
1282 "EmPy is a system for embedding Python expressions and statements in
1283 template text; it takes an EmPy source file, processes it, and produces
1284 output. This is accomplished via expansions, which are special signals to the
1285 EmPy system and are set off by a special prefix (by default the at sign, @@).
1286 EmPy can expand arbitrary Python expressions and statements in this way, as
1287 well as a variety of special forms. Textual data not explicitly delimited in
1288 this way is sent unaffected to the output, allowing Python to be used in
1289 effect as a markup language. Also supported are callbacks via hooks,
1290 recording and playback via diversions, and dynamic, chainable filters. The
1291 system is highly configurable via command line options and embedded
1292 commands.")
1293 (license license:lgpl2.1+)))
1294
1295 (define-public python2-empy
1296 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1297 (package
1298 (inherit base)
1299 (arguments `(,@(package-arguments base)
1300 #:tests? #t)))))
1301
1302 (define-public python2-element-tree
1303 (package
1304 (name "python2-element-tree")
1305 (version "1.2.6")
1306 (source (origin
1307 (method url-fetch)
1308 (uri (string-append
1309 "http://effbot.org/media/downloads/elementtree-"
1310 version "-20050316.tar.gz"))
1311 (sha256
1312 (base32
1313 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1314 (build-system python-build-system)
1315 (arguments
1316 `(#:python ,python-2 ; seems to be part of Python 3
1317 #:tests? #f)) ; no 'test' sub-command
1318 (synopsis "Toolkit for XML processing in Python")
1319 (description
1320 "ElementTree is a Python library supporting lightweight XML processing.")
1321 (home-page "http://effbot.org/zone/element-index.htm")
1322 (license (license:x11-style
1323 "http://docs.python.org/2/license.html"
1324 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1325
1326 (define-public python2-pybugz
1327 (package
1328 (name "python2-pybugz")
1329 (version "0.6.11")
1330 (source (origin
1331 (method url-fetch)
1332 (uri (string-append
1333 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1334 version ".tar.gz"))
1335 (sha256
1336 (base32
1337 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1338 (patches (search-patches "pybugz-stty.patch"
1339 "pybugz-encode-error.patch"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:python ,python-2 ; SyntaxError with Python 3
1343 #:tests? #f)) ; no 'test' sub-command
1344 (propagated-inputs
1345 `(("element-tree" ,python2-element-tree)))
1346 (synopsis "Python and command-line interface to Bugzilla")
1347 (description
1348 "PyBugz is a Python library and command-line tool to query the Bugzilla
1349 bug tracking system. It is meant as an aid to speed up interaction with the
1350 bug tracker.")
1351 (home-page "http://www.liquidx.net/pybugz/")
1352 (license license:gpl2)))
1353
1354 (define-public python2-enum
1355 (package
1356 (name "python2-enum")
1357 (version "0.4.6")
1358 (source (origin
1359 (method url-fetch)
1360 (uri (pypi-uri "enum" version))
1361 (sha256
1362 (base32
1363 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:python ,python-2))
1367 (home-page "http://pypi.python.org/pypi/enum/")
1368 (synopsis "Robust enumerated type support in Python")
1369 (description
1370 "This provides a module for robust enumerations in Python. It has
1371 been superseded by the Python standard library and is provided only for
1372 compatibility.")
1373 ;; Choice of either license.
1374 (license (list license:gpl3+ license:psfl))))
1375
1376 (define-public python-enum34
1377 (package
1378 (name "python-enum34")
1379 (version "1.1.6")
1380 (source
1381 (origin
1382 (method url-fetch)
1383 (uri (pypi-uri "enum34" version))
1384 (sha256
1385 (base32
1386 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1387 (build-system python-build-system)
1388 (home-page "https://pypi.python.org/pypi/enum34")
1389 (synopsis "Backported Python 3.4 Enum")
1390 (description
1391 "Enum34 is the new Python stdlib enum module available in Python 3.4
1392 backported for previous versions of Python from 2.4 to 3.3.")
1393 (license license:bsd-3)))
1394
1395 (define-public python2-enum34
1396 (package-with-python2 python-enum34))
1397
1398 (define-public python-parse-type
1399 (package
1400 (name "python-parse-type")
1401 (version "0.4.2")
1402 (source
1403 (origin
1404 (method url-fetch)
1405 (uri (pypi-uri "parse_type" version))
1406 (sha256
1407 (base32
1408 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1409 (build-system python-build-system)
1410 (propagated-inputs
1411 `(("python-six" ,python-six)
1412 ("python-parse" ,python-parse)))
1413 (native-inputs
1414 `(("python-pytest" ,python-pytest)
1415 ("python-pytest-runner" ,python-pytest-runner)))
1416 (home-page "https://github.com/jenisys/parse_type")
1417 (synopsis "Extended parse module")
1418 (description
1419 "Parse_type extends the python parse module.")
1420 (properties
1421 `((python2-variant . ,(delay python2-parse-type))))
1422 (license license:bsd-3)))
1423
1424 (define-public python2-parse-type
1425 (let ((base (package-with-python2
1426 (strip-python2-variant python-parse-type))))
1427 (package (inherit base)
1428 (propagated-inputs
1429 `(("python2-enum34" ,python2-enum34)
1430 ,@(package-propagated-inputs base))))))
1431
1432 (define-public python-parse
1433 (package
1434 (name "python-parse")
1435 (version "1.8.4")
1436 (source
1437 (origin
1438 (method url-fetch)
1439 (uri (pypi-uri "parse" version))
1440 (sha256
1441 (base32
1442 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1443 (build-system python-build-system)
1444 (arguments
1445 `(#:phases
1446 (modify-phases %standard-phases
1447 (replace 'check
1448 (lambda _ (invoke "python" "test_parse.py"))))))
1449 (home-page "https://github.com/r1chardj0n3s/parse")
1450 (synopsis "Parse strings")
1451 (description
1452 "Parse strings using a specification based on the Python @code{format()}
1453 syntax.")
1454 (license license:x11)))
1455
1456 (define-public python-polib
1457 (package
1458 (name "python-polib")
1459 (version "1.0.8")
1460 (source (origin
1461 (method url-fetch)
1462 (uri (pypi-uri "polib" version))
1463 (sha256
1464 (base32
1465 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1466 (build-system python-build-system)
1467 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1468 (synopsis "Manipulate, create and modify gettext files")
1469 (description "Polib can manipulate any gettext format (po, pot and mo)
1470 files. It can be used to create po files from scratch or to modify
1471 existing ones.")
1472 (license license:expat)))
1473
1474 (define-public python2-polib
1475 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1476 (package
1477 (inherit base)
1478 (arguments `(,@(package-arguments base)
1479 ;; Tests don't work with python2.
1480 #:tests? #f)))))
1481
1482 (define-public scons
1483 (package
1484 (name "scons")
1485 (version "3.0.4")
1486 (source (origin
1487 (method git-fetch)
1488 (uri (git-reference
1489 (url "https://github.com/SCons/scons.git")
1490 (commit version)))
1491 (file-name (git-file-name name version))
1492 (sha256
1493 (base32
1494 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1495 (build-system python-build-system)
1496 (arguments
1497 `(#:use-setuptools? #f ; still relies on distutils
1498 #:tests? #f ; no 'python setup.py test' command
1499 #:phases
1500 (modify-phases %standard-phases
1501 (add-before 'build 'bootstrap
1502 (lambda _
1503 (substitute* "src/engine/SCons/compat/__init__.py"
1504 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1505 "sys.modules[new] = __import__(old)"))
1506 (substitute* "src/engine/SCons/Platform/__init__.py"
1507 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1508 "mod = __import__(full_name)"))
1509 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1510 (chdir "build/scons")
1511 #t)))))
1512 (home-page "http://scons.org/")
1513 (synopsis "Software construction tool written in Python")
1514 (description
1515 "SCons is a software construction tool. Think of SCons as an improved,
1516 cross-platform substitute for the classic Make utility with integrated
1517 functionality similar to autoconf/automake and compiler caches such as ccache.
1518 In short, SCons is an easier, more reliable and faster way to build
1519 software.")
1520 (license license:x11)))
1521
1522 (define-public scons-python2
1523 (package
1524 (inherit (package-with-python2 scons))
1525 (name "scons-python2")))
1526
1527 (define-public python-extras
1528 (package
1529 (name "python-extras")
1530 (version "1.0.0")
1531 (source
1532 (origin
1533 (method url-fetch)
1534 (uri (pypi-uri "extras" version))
1535 (sha256
1536 (base32
1537 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1538 (build-system python-build-system)
1539 (arguments
1540 ;; FIXME: Circular dependency on testtools.
1541 '(#:tests? #f))
1542 (home-page "https://github.com/testing-cabal/extras")
1543 (synopsis "Useful extensions to the Python standard library")
1544 (description
1545 "Extras is a set of extensions to the Python standard library.")
1546 (license license:expat)))
1547
1548 (define-public python2-extras
1549 (package-with-python2 python-extras))
1550
1551 (define-public python-mimeparse
1552 (package
1553 (name "python-mimeparse")
1554 (version "1.6.0")
1555 (source
1556 (origin
1557 (method url-fetch)
1558 (uri (pypi-uri "python-mimeparse" version))
1559 (sha256
1560 (base32
1561 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1562 (build-system python-build-system)
1563 (arguments
1564 '(#:phases
1565 (modify-phases %standard-phases
1566 (replace 'check
1567 (lambda _
1568 (invoke "./mimeparse_test.py"))))))
1569 (home-page
1570 "https://github.com/dbtsai/python-mimeparse")
1571 (synopsis "Python library for parsing MIME types")
1572 (description
1573 "Mimeparse provides basic functions for parsing MIME type names and
1574 matching them against a list of media-ranges.")
1575 (license license:expat)))
1576
1577 (define-public python2-mimeparse
1578 (package-with-python2 python-mimeparse))
1579
1580 (define-public python-miniboa
1581 (package
1582 (name "python-miniboa")
1583 (version "1.0.7")
1584 (source
1585 (origin
1586 (method url-fetch)
1587 (uri (pypi-uri "miniboa" version))
1588 (sha256
1589 (base32
1590 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1591 (build-system python-build-system)
1592 (home-page "https://github.com/shmup/miniboa")
1593 (synopsis "Simple, single-threaded Telnet server")
1594 (description
1595 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1596 server.")
1597 (license license:asl2.0)))
1598
1599 (define-public python2-miniboa
1600 (package-with-python2 python-miniboa))
1601
1602 (define-public python-pafy
1603 (package
1604 (name "python-pafy")
1605 (version "0.5.3.1")
1606 (source
1607 (origin
1608 (method url-fetch)
1609 (uri (pypi-uri "pafy" version))
1610 (sha256
1611 (base32
1612 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1613 (build-system python-build-system)
1614 (arguments
1615 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1616 (propagated-inputs
1617 ;; Youtube-dl is a python package which is imported in the file
1618 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1619 `(("youtube-dl" ,youtube-dl)))
1620 (home-page "https://np1.github.io/pafy/")
1621 (synopsis "Retrieve YouTube content and metadata")
1622 (description
1623 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1624 (license license:lgpl3+)))
1625
1626 (define-public python2-funcsigs
1627 (package
1628 (name "python2-funcsigs")
1629 (version "1.0.2")
1630 (source (origin
1631 (method url-fetch)
1632 (uri (pypi-uri "funcsigs" version))
1633 (sha256
1634 (base32
1635 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1636 (build-system python-build-system)
1637 (arguments
1638 `(#:python ,python-2))
1639 (native-inputs
1640 `(("python2-unittest2" ,python2-unittest2)))
1641 (home-page "http://funcsigs.readthedocs.org")
1642 (synopsis "Python function signatures from PEP362")
1643 (description
1644 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1645 (license license:asl2.0)))
1646
1647 (define-public python2-funcsigs-bootstrap
1648 (package
1649 (inherit python2-funcsigs)
1650 (name "python2-funcsigs-bootstrap")
1651 (native-inputs `())
1652 (arguments
1653 `(#:tests? #f
1654 ,@(package-arguments python2-funcsigs)))))
1655
1656 (define-public python-py
1657 (package
1658 (name "python-py")
1659 (version "1.5.4")
1660 (source
1661 (origin
1662 (method url-fetch)
1663 (uri (pypi-uri "py" version))
1664 (sha256
1665 (base32
1666 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1667 (build-system python-build-system)
1668 (arguments
1669 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1670 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1671 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1672 ;; Is this module globally installed?"
1673 '(#:tests? #f))
1674 (native-inputs
1675 `(("python-setuptools-scm" ,python-setuptools-scm)))
1676 (home-page "https://github.com/pytest-dev/py")
1677 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1678 (description
1679 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1680 code introspection, and logging.")
1681 (license license:expat)))
1682
1683 (define-public python2-py
1684 (package-with-python2 python-py))
1685
1686 ;; Recent versions of python-fixtures and python-testrepository need
1687 ;; python-pbr for packaging, which itself needs these two packages for
1688 ;; testing.
1689 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1690 ;; same source, just without any test dependencies and with tests disabled.
1691 ;; python-pbr-minmal is then used to package python-fixtures and
1692 ;; python-testrepository.
1693 ;; Strictly speaking we currently could remove the test-requirements from the
1694 ;; normal python-pbr package (and save this package) since test are disabled
1695 ;; there anyway. But this may change in future.
1696 (define-public python-pbr-minimal
1697 (package
1698 (name "python-pbr-minimal")
1699 (version "3.0.1")
1700 (source
1701 (origin
1702 (method url-fetch)
1703 (uri (pypi-uri "pbr" version))
1704 (sha256
1705 (base32
1706 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1707 (build-system python-build-system)
1708 (arguments
1709 `(#:tests? #f))
1710 (home-page "http://docs.openstack.org/developer/pbr/")
1711 (synopsis "Minimal build of python-pbr used for bootstrapping")
1712 (description
1713 "Used only for bootstrapping python2-pbr, you should not need this.")
1714 (license license:asl2.0)))
1715
1716 (define-public python2-pbr-minimal
1717 (package-with-python2 python-pbr-minimal))
1718
1719 (define-public python-pbr
1720 (package
1721 (inherit python-pbr-minimal)
1722 (name "python-pbr")
1723 (arguments
1724 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1725 (propagated-inputs
1726 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1727 (native-inputs
1728 `(("python-fixtures" ,python-fixtures-bootstrap)
1729 ;; discover, coverage, hacking, subunit
1730 ("python-mock" ,python-mock)
1731 ("python-six" ,python-six)
1732 ("python-sphinx" ,python-sphinx)
1733 ("python-testrepository" ,python-testrepository-bootstrap)
1734 ("python-testresources" ,python-testresources-bootstrap)
1735 ("python-testscenarios" ,python-testscenarios-bootstrap)
1736 ("python-testtools" ,python-testtools-bootstrap)
1737 ("python-virtualenv" ,python-virtualenv)))
1738 (synopsis "Enhance the default behavior of Python’s setuptools")
1739 (description
1740 "Python Build Reasonableness (PBR) is a library that injects some useful
1741 and sensible default behaviors into your setuptools run. It will set
1742 versions, process requirements files and generate AUTHORS and ChangeLog file
1743 from git information.
1744 ")))
1745
1746 (define-public python2-pbr
1747 (package-with-python2 python-pbr))
1748
1749 (define-public python-pyrsistent
1750 (package
1751 (name "python-pyrsistent")
1752 (version "0.14.11")
1753 (home-page "https://github.com/tobgu/pyrsistent")
1754 (source (origin
1755 (method url-fetch)
1756 (uri (pypi-uri "pyrsistent" version))
1757 (sha256
1758 (base32
1759 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1760 (build-system python-build-system)
1761 (native-inputs
1762 `(("python-hypothesis" ,python-hypothesis)
1763 ("python-pytest" ,python-pytest)
1764 ("python-pytest-runner" ,python-pytest-runner)))
1765 (propagated-inputs
1766 `(("python-six" ,python-six)))
1767 (synopsis "Persistent data structures for Python")
1768 (description
1769 "Pyrsistent is a number of persistent collections (by some referred to as
1770 functional data structures). Persistent in the sense that they are immutable.
1771
1772 All methods on a data structure that would normally mutate it instead return a
1773 new copy of the structure containing the requested updates. The original
1774 structure is left untouched.")
1775 (license license:expat)))
1776
1777 (define-public python2-pyrsistent
1778 (package-with-python2 python-pyrsistent))
1779
1780 (define-public python-exif-read
1781 (package
1782 (name "python-exif-read")
1783 (version "2.1.2")
1784 (source (origin
1785 (method url-fetch)
1786 (uri (pypi-uri "ExifRead" version))
1787 (sha256
1788 (base32
1789 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1790 (build-system python-build-system)
1791 (arguments `(#:tests? #f)) ; no tests
1792 (home-page "https://github.com/ianare/exif-py")
1793 (synopsis "Python library to extract EXIF data from image files")
1794 (description
1795 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1796 files.")
1797 (license license:bsd-3)))
1798
1799 (define-public python2-exif-read
1800 (package-with-python2 python-exif-read))
1801
1802 (define-public python-pyld
1803 (package
1804 (name "python-pyld")
1805 (version "1.0.3")
1806 (source (origin
1807 (method url-fetch)
1808 (uri (pypi-uri "PyLD" version))
1809 (sha256
1810 (base32
1811 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1812 (build-system python-build-system)
1813 (home-page "https://github.com/digitalbazaar/pyld")
1814 (synopsis "Python implementation of the JSON-LD specification")
1815 (description
1816 "PyLD is an implementation of the JSON-LD specification.")
1817 (license license:bsd-3)))
1818
1819 (define-public python2-pyld
1820 (package-with-python2 python-pyld))
1821
1822 (define-public python-click
1823 (package
1824 (name "python-click")
1825 (version "7.0")
1826 (source
1827 (origin
1828 (method url-fetch)
1829 (uri (pypi-uri "click" version))
1830 (sha256
1831 (base32
1832 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1833 (build-system python-build-system)
1834 (arguments
1835 `(#:phases
1836 (modify-phases %standard-phases
1837 (add-after 'unpack 'fix-paths
1838 (lambda* (#:key inputs #:allow-other-keys)
1839 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1840 "cross-libc" "libc"))))
1841 (substitute* "click/_unicodefun.py"
1842 (("'locale'")
1843 (string-append "'" glibc "/bin/locale'"))))
1844 #t))
1845 (replace 'check
1846 (lambda _
1847 (invoke "python" "-m" "pytest"))))))
1848 (native-inputs
1849 `(("python-pytest" ,python-pytest)))
1850 (home-page "https://palletsprojects.com/p/click/")
1851 (synopsis "Command line library for Python")
1852 (description
1853 "Click is a Python package for creating command line interfaces in a
1854 composable way with as little code as necessary. Its name stands for
1855 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1856 with sensible defaults out of the box.")
1857 (license license:bsd-3)))
1858
1859 (define-public python2-click
1860 (package-with-python2 python-click))
1861
1862 (define-public python-wheel
1863 (package
1864 (name "python-wheel")
1865 (version "0.32.3")
1866 (source
1867 (origin
1868 (method url-fetch)
1869 (uri (pypi-uri "wheel" version))
1870 (sha256
1871 (base32
1872 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1873 (build-system python-build-system)
1874 (native-inputs
1875 `(("python-jsonschema" ,python-jsonschema)
1876 ("python-pytest-cov" ,python-pytest-cov)))
1877 (home-page "https://bitbucket.org/pypa/wheel/")
1878 (synopsis "Format for built Python packages")
1879 (description
1880 "A wheel is a ZIP-format archive with a specially formatted filename and
1881 the @code{.whl} extension. It is designed to contain all the files for a PEP
1882 376 compatible install in a way that is very close to the on-disk format. Many
1883 packages will be properly installed with only the @code{Unpack} step and the
1884 unpacked archive preserves enough information to @code{Spread} (copy data and
1885 scripts to their final locations) at any later time. Wheel files can be
1886 installed with a newer @code{pip} or with wheel's own command line utility.")
1887 (license license:expat)
1888 (properties `((python2-variant . ,(delay python2-wheel))))))
1889
1890 (define-public python2-wheel
1891 (let ((wheel (package-with-python2
1892 (strip-python2-variant python-wheel))))
1893 (package (inherit wheel)
1894 (native-inputs `(("python2-functools32" ,python2-functools32)
1895 ,@(package-native-inputs wheel))))))
1896
1897 (define-public python-vcversioner
1898 (package
1899 (name "python-vcversioner")
1900 (version "2.16.0.0")
1901 (source
1902 (origin
1903 (method url-fetch)
1904 (uri (pypi-uri "vcversioner" version))
1905 (sha256
1906 (base32
1907 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1908 (build-system python-build-system)
1909 (synopsis "Python library for version number discovery")
1910 (description "Vcversioner is a Python library that inspects tagging
1911 information in a variety of version control systems in order to discover
1912 version numbers.")
1913 (home-page "https://github.com/habnabit/vcversioner")
1914 (license license:isc)))
1915
1916 (define-public python2-vcversioner
1917 (package-with-python2 python-vcversioner))
1918
1919 (define-public python-jdcal
1920 (package
1921 (name "python-jdcal")
1922 (version "1.4")
1923 (source
1924 (origin
1925 (method url-fetch)
1926 (uri (pypi-uri "jdcal" version))
1927 (sha256
1928 (base32
1929 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1930 (build-system python-build-system)
1931 (arguments
1932 `(#:phases (modify-phases %standard-phases
1933 (replace 'check
1934 (lambda _
1935 (invoke "pytest"))))))
1936 (native-inputs
1937 `(("python-pytest" ,python-pytest)))
1938 (home-page "https://github.com/phn/jdcal")
1939 (synopsis "Functions to convert between Julian dates Gregorian dates")
1940 (description "This Python library provides functions for converting
1941 between Julian dates and Gregorian dates.")
1942 (license license:bsd-2)))
1943
1944 (define-public python2-jdcal
1945 (package-with-python2 python-jdcal))
1946
1947 (define-public python-jsonschema
1948 (package
1949 (name "python-jsonschema")
1950 (version "3.0.1")
1951 (source (origin
1952 (method url-fetch)
1953 (uri (pypi-uri "jsonschema" version))
1954 (sha256
1955 (base32
1956 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1957 (build-system python-build-system)
1958 (arguments
1959 '(#:phases
1960 (modify-phases %standard-phases
1961 (replace 'check
1962 (lambda _
1963 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1964 (invoke "trial" "jsonschema"))))))
1965 (native-inputs
1966 `(("python-setuptools_scm" ,python-setuptools-scm)
1967 ("python-twisted" ,python-twisted)))
1968 (propagated-inputs
1969 `(("python-attrs" ,python-attrs)
1970 ("python-pyrsistent" ,python-pyrsistent)
1971 ("python-six" ,python-six)))
1972 (home-page "https://github.com/Julian/jsonschema")
1973 (synopsis "Implementation of JSON Schema for Python")
1974 (description
1975 "Jsonschema is an implementation of JSON Schema for Python.")
1976 (license license:expat)
1977 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1978
1979 (define-public python2-jsonschema
1980 (let ((jsonschema (package-with-python2
1981 (strip-python2-variant python-jsonschema))))
1982 (package (inherit jsonschema)
1983 (propagated-inputs
1984 `(("python2-functools32" ,python2-functools32)
1985 ,@(package-propagated-inputs jsonschema))))))
1986
1987 ;; This old version is still required by docker-compose as of 1.24.0.
1988 (define-public python-jsonschema-2.6
1989 (package
1990 (name "python-jsonschema")
1991 (version "2.6.0")
1992 (source (origin
1993 (method url-fetch)
1994 (uri (pypi-uri "jsonschema" version))
1995 (sha256
1996 (base32
1997 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1998 (build-system python-build-system)
1999 (arguments
2000 '(#:phases
2001 (modify-phases %standard-phases
2002 (replace 'check (lambda _ (invoke "nosetests"))))))
2003 (native-inputs
2004 `(("python-nose" ,python-nose)
2005 ("python-vcversioner" ,python-vcversioner)))
2006 (home-page "https://github.com/Julian/jsonschema")
2007 (synopsis "Implementation of JSON Schema for Python")
2008 (description
2009 "Jsonschema is an implementation of JSON Schema for Python.")
2010 (license license:expat)
2011 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2012
2013 (define-public python-schema
2014 (package
2015 (name "python-schema")
2016 (version "0.6.6")
2017 (source
2018 (origin
2019 (method url-fetch)
2020 (uri (pypi-uri "schema" version))
2021 (sha256
2022 (base32
2023 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2024 (build-system python-build-system)
2025 (native-inputs
2026 `(("python-pytest" ,python-pytest)))
2027 (home-page "https://github.com/keleshev/schema")
2028 (synopsis "Simple data validation library")
2029 (description
2030 "@code{python-schema} is a library for validating Python data
2031 structures, such as those obtained from config-files, forms, external
2032 services or command-line parsing, converted from JSON/YAML (or
2033 something else) to Python data-types.")
2034 (license license:psfl)))
2035
2036 (define-public python2-schema
2037 (package-with-python2 python-schema))
2038
2039 (define-public python-schema-0.5
2040 (package (inherit python-schema)
2041 (version "0.5.0")
2042 (source
2043 (origin
2044 (method url-fetch)
2045 (uri (pypi-uri "schema" version))
2046 (sha256
2047 (base32
2048 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2049
2050 (define-public python2-schema-0.5
2051 (package-with-python2 python-schema-0.5))
2052
2053 (define-public python-kitchen
2054 (package
2055 (name "python-kitchen")
2056 (version "1.2.5")
2057 (source
2058 (origin
2059 (method url-fetch)
2060 (uri (pypi-uri "kitchen" version))
2061 (sha256
2062 (base32
2063 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2064 (build-system python-build-system)
2065 (propagated-inputs
2066 `(("python-chardet" ,python-chardet)))
2067 (home-page "https://github.com/fedora-infra/kitchen")
2068 (synopsis "Python API for snippets")
2069 (description "@code{kitchen} module provides a python API for all sorts of
2070 little useful snippets of code that everybody ends up writing for their projects
2071 but never seem big enough to build an independent release. Use kitchen and stop
2072 cutting and pasting that code over and over.")
2073 (license (list license:lgpl2.1+
2074 ;; subprocess.py, test_subprocess.py,
2075 ;; kitchen/pycompat25/defaultdict.py:
2076 license:psfl))))
2077
2078 (define-public python2-kitchen
2079 (package-with-python2 python-kitchen))
2080
2081 (define-public python-unidecode
2082 (package
2083 (name "python-unidecode")
2084 (version "1.1.0")
2085 (source (origin
2086 (method url-fetch)
2087 (uri (pypi-uri "Unidecode" version))
2088 (sha256
2089 (base32
2090 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2091 (build-system python-build-system)
2092 (home-page "https://pypi.python.org/pypi/Unidecode")
2093 (synopsis "ASCII transliterations of Unicode text")
2094 (description
2095 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2096 useful when integrating with legacy code that doesn't support Unicode, or for
2097 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2098 machine identifiers from human-readable Unicode strings that should still be
2099 somewhat intelligible.")
2100 (license license:gpl2+)))
2101
2102 (define-public python2-unidecode
2103 (package-with-python2 python-unidecode))
2104
2105 (define-public python-pyjwt
2106 (package
2107 (name "python-pyjwt")
2108 (version "1.5.3")
2109 (source
2110 (origin
2111 (method url-fetch)
2112 (uri (pypi-uri "PyJWT" version))
2113 (sha256
2114 (base32
2115 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2116 (modules '((guix build utils)))
2117 (snippet
2118 '(begin
2119 (for-each delete-file-recursively
2120 (find-files "." "\\.pyc$"))
2121 #t))))
2122 (build-system python-build-system)
2123 (native-inputs
2124 `(("python-pytest" ,python-pytest)
2125 ("python-pytest-cov" ,python-pytest-cov)
2126 ("python-pytest-runner" ,python-pytest-runner)))
2127 (home-page "https://github.com/progrium/pyjwt")
2128 (synopsis "JSON Web Token implementation in Python")
2129 (description
2130 "PyJWT is a JSON Web Token implementation written in Python.")
2131 (license license:expat)))
2132
2133 (define-public python2-pyjwt
2134 (package-with-python2 python-pyjwt))
2135
2136 (define-public python-pykka
2137 (package
2138 (name "python-pykka")
2139 (version "1.2.1")
2140 (source
2141 (origin
2142 (method url-fetch)
2143 (uri (pypi-uri "Pykka" version))
2144 (sha256
2145 (base32
2146 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2147 (build-system python-build-system)
2148 (native-inputs
2149 `(("python-mock" ,python-mock)
2150 ("python-nose" ,python-nose)
2151 ("python-gevent" ,python-gevent)
2152 ("python-eventlet" ,python-eventlet)))
2153 (home-page "https://www.pykka.org/")
2154 (synopsis "Pykka is a Python implementation of the actor model")
2155 (description
2156 "Pykka is a Python implementation of the actor model.
2157 The actor model introduces some simple rules to control the sharing
2158 of state and cooperation between execution units, which makes it
2159 easier to build concurrent applications.")
2160 (license license:asl2.0)))
2161
2162 (define-public python2-pykka
2163 (package-with-python2 python-pykka))
2164
2165 (define-public python-pymsgbox
2166 (package
2167 (name "python-pymsgbox")
2168 (version "1.0.6")
2169 (source
2170 (origin
2171 (method git-fetch)
2172 (uri (git-reference
2173 ;; LICENSE.txt is not present on pypi
2174 (url "https://github.com/asweigart/PyMsgBox")
2175 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2176 (file-name (git-file-name name version))
2177 (sha256
2178 (base32
2179 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2180 (arguments
2181 ;; Circular dependency to run tests:
2182 ;; Tests need pyautogui, which depends on pymsgbox.
2183 '(#:tests? #f))
2184 (build-system python-build-system)
2185 (home-page "https://github.com/asweigart/PyMsgBox")
2186 (synopsis "Python module for JavaScript-like message boxes")
2187 (description
2188 "PyMsgBox is a simple, cross-platform, pure Python module for
2189 JavaScript-like message boxes. Types of dialog boxes include:
2190 @enumerate
2191 @item alert
2192 @item confirm
2193 @item prompt
2194 @item password
2195 @end enumerate
2196 ")
2197 (license license:bsd-3)))
2198
2199 (define-public python-pympler
2200 (package
2201 (name "python-pympler")
2202 (home-page "https://pythonhosted.org/Pympler/")
2203 (version "0.5")
2204 (source (origin
2205 (method url-fetch)
2206 (uri (pypi-uri "Pympler" version))
2207 (sha256
2208 (base32
2209 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2210 (build-system python-build-system)
2211 (arguments
2212 `(#:phases (modify-phases %standard-phases
2213 (delete 'check)
2214 (add-after 'install 'check
2215 (lambda* (#:key inputs outputs #:allow-other-keys)
2216 (add-installed-pythonpath inputs outputs)
2217 (invoke "python" "setup.py" "test"))))))
2218 (synopsis "Measure, monitor and analyze memory behavior")
2219 (description
2220 "Pympler is a development tool to measure, monitor and analyze
2221 the memory behavior of Python objects in a running Python application.
2222
2223 By pympling a Python application, detailed insight in the size and the
2224 lifetime of Python objects can be obtained. Undesirable or unexpected
2225 runtime behavior like memory bloat and other @samp{pymples} can easily
2226 be identified.
2227
2228 A web profiling frontend exposes process statistics, garbage
2229 visualisation and class tracker statistics.")
2230 (license license:asl2.0)))
2231
2232 (define-public python2-pympler
2233 (package-with-python2 python-pympler))
2234
2235 (define-public python-itsdangerous
2236 (package
2237 (name "python-itsdangerous")
2238 (version "1.1.0")
2239 (source
2240 (origin
2241 (method url-fetch)
2242 (uri (pypi-uri "itsdangerous" version))
2243 (sha256
2244 (base32
2245 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2246 (build-system python-build-system)
2247 (home-page "https://palletsprojects.com/p/itsdangerous/")
2248 (synopsis "Python library for passing data to/from untrusted environments")
2249 (description
2250 "Itsdangerous provides various helpers to pass trusted data to untrusted
2251 environments and back.")
2252 (license license:bsd-3)))
2253
2254 (define-public python2-itsdangerous
2255 (package-with-python2 python-itsdangerous))
2256
2257 (define-public python-pyyaml
2258 (package
2259 (name "python-pyyaml")
2260 (version "3.13")
2261 (source
2262 (origin
2263 (method url-fetch)
2264 (uri (pypi-uri "PyYAML" version))
2265 (sha256
2266 (base32
2267 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2268 (build-system python-build-system)
2269 (inputs
2270 `(("libyaml" ,libyaml)))
2271 (home-page "http://pyyaml.org/wiki/PyYAML")
2272 (synopsis "YAML parser and emitter for Python")
2273 (description
2274 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2275 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2276 API, and sensible error messages. PyYAML supports standard YAML tags and
2277 provides Python-specific tags that allow to represent an arbitrary Python
2278 object.")
2279 (license license:expat)))
2280
2281 (define-public python2-pyyaml
2282 (package-with-python2 python-pyyaml))
2283
2284 (define-public python-vine
2285 (package
2286 (name "python-vine")
2287 (version "1.1.4")
2288 (source
2289 (origin
2290 (method url-fetch)
2291 (uri (pypi-uri "vine" version))
2292 (sha256
2293 (base32
2294 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2295 (build-system python-build-system)
2296 (native-inputs
2297 `(("python-pytest" ,python-pytest)
2298 ("python-case" ,python-case)))
2299 (home-page "https://github.com/celery/vine")
2300 (synopsis "Promises for Python")
2301 (description
2302 "@code{vine} provides a special implementation of promises in that it can
2303 be used both for \"promise of a value\" and lazy evaluation. The biggest
2304 upside for this is that everything in a promise can also be a promise,
2305 e.g. filters, callbacks and errbacks can all be promises.")
2306 (license license:bsd-3)))
2307
2308 (define-public python-virtualenv
2309 (package
2310 (name "python-virtualenv")
2311 (version "16.1.0")
2312 (source
2313 (origin
2314 (method url-fetch)
2315 (uri (pypi-uri "virtualenv" version))
2316 (sha256
2317 (base32
2318 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2319 (build-system python-build-system)
2320 (arguments
2321 `(#:phases
2322 (modify-phases %standard-phases
2323 (add-before 'check 'disable-failing-test
2324 (lambda _
2325 ;; Disable failing test. See upstream bug report
2326 ;; https://github.com/pypa/virtualenv/issues/957
2327 (substitute* "tests/test_virtualenv.py"
2328 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2329 #t)))))
2330 (native-inputs
2331 `(("python-mock" ,python-mock)
2332 ("python-pytest" ,python-pytest)))
2333 (home-page "https://virtualenv.pypa.io/")
2334 (synopsis "Virtual Python environment builder")
2335 (description
2336 "Virtualenv is a tool to create isolated Python environments.")
2337 (license license:expat)))
2338
2339 (define-public python2-virtualenv
2340 (package-with-python2 python-virtualenv))
2341
2342 (define-public python-markupsafe
2343 (package
2344 (name "python-markupsafe")
2345 (version "1.1.1")
2346 (source
2347 (origin
2348 (method url-fetch)
2349 (uri (pypi-uri "MarkupSafe" version))
2350 (sha256
2351 (base32
2352 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2353 (build-system python-build-system)
2354 (arguments
2355 `(#:modules ((ice-9 ftw)
2356 (srfi srfi-1)
2357 (srfi srfi-26)
2358 (guix build utils)
2359 (guix build python-build-system))
2360 #:phases (modify-phases %standard-phases
2361 (replace 'check
2362 (lambda _
2363 (let ((cwd (getcwd))
2364 (libdir (find (cut string-prefix? "lib." <>)
2365 (scandir "build"))))
2366 (setenv "PYTHONPATH"
2367 (string-append cwd "/build/" libdir ":"
2368 (getenv "PYTHONPATH")))
2369 (invoke "pytest" "-vv")))))))
2370 (native-inputs
2371 `(("python-pytest" ,python-pytest)))
2372 (home-page "https://github.com/mitsuhiko/markupsafe")
2373 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2374 (description
2375 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2376 for Python.")
2377 (license license:bsd-3)))
2378
2379 (define-public python2-markupsafe
2380 (package-with-python2 python-markupsafe))
2381
2382 (define-public python-jinja2
2383 (package
2384 (name "python-jinja2")
2385 (version "2.10.1")
2386 (source
2387 (origin
2388 (method url-fetch)
2389 (uri (pypi-uri "Jinja2" version))
2390 (sha256
2391 (base32
2392 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2393 (build-system python-build-system)
2394 (propagated-inputs
2395 `(("python-markupsafe" ,python-markupsafe)))
2396 (home-page "http://jinja.pocoo.org/")
2397 (synopsis "Python template engine")
2398 (description
2399 "Jinja2 is a small but fast and easy to use stand-alone template engine
2400 written in pure Python.")
2401 (license license:bsd-3)))
2402
2403 (define-public python2-jinja2
2404 (package-with-python2 python-jinja2))
2405
2406 (define-public python-pystache
2407 (package
2408 (name "python-pystache")
2409 (version "0.5.4")
2410 (source (origin
2411 (method url-fetch)
2412 (uri (pypi-uri "pystache" version))
2413 (sha256
2414 (base32
2415 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2416 (build-system python-build-system)
2417 (arguments
2418 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2419 (home-page "http://defunkt.io/pystache/")
2420 (synopsis "Python logic-less template engine")
2421 (description
2422 "Pystache is a Python implementation of the framework agnostic,
2423 logic-free templating system Mustache.")
2424 (license license:expat)
2425 (properties `((python2-variant . ,(delay python2-pystache))))))
2426
2427 (define-public python2-pystache
2428 (package (inherit (package-with-python2
2429 (strip-python2-variant python-pystache)))
2430 (arguments
2431 `(#:python ,python-2
2432 #:phases
2433 (modify-phases %standard-phases
2434 (replace 'check
2435 (lambda _
2436 (invoke "python" "test_pystache.py"))))))))
2437
2438 (define-public python-joblib
2439 (package
2440 (name "python-joblib")
2441 (version "0.13.0")
2442 (source (origin
2443 (method url-fetch)
2444 (uri (pypi-uri "joblib" version))
2445 (sha256
2446 (base32
2447 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2448 (build-system python-build-system)
2449 (arguments
2450 `(#:phases
2451 (modify-phases %standard-phases
2452 (replace 'check
2453 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2454 (native-inputs
2455 `(("python-pytest" ,python-pytest)))
2456 (home-page "https://joblib.readthedocs.io/")
2457 (synopsis "Using Python functions as pipeline jobs")
2458 (description
2459 "Joblib is a set of tools to provide lightweight pipelining in Python.
2460 In particular, joblib offers: transparent disk-caching of the output values
2461 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2462 logging and tracing of the execution.")
2463 (license license:bsd-3)))
2464
2465 (define-public python2-joblib
2466 (package-with-python2 python-joblib))
2467
2468 (define-public python-daemon
2469 (package
2470 (name "python-daemon")
2471 (version "2.2.3")
2472 (source
2473 (origin
2474 (method url-fetch)
2475 (uri (pypi-uri "python-daemon" version))
2476 (sha256
2477 (base32
2478 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2479 (build-system python-build-system)
2480 (arguments
2481 `(#:phases
2482 (modify-phases %standard-phases
2483 (add-before 'check 'disable-tests
2484 (lambda _
2485 ;; FIXME: Determine why test fails
2486 (substitute* "test/test_daemon.py"
2487 (("test_detaches_process_context")
2488 "skip_test_detaches_process_context"))
2489 #t)))))
2490 (propagated-inputs
2491 `(("python-lockfile" ,python-lockfile)))
2492 (native-inputs
2493 `(("python-unittest2" ,python-unittest2)
2494 ("python-testtools" ,python-testtools)
2495 ("python-testscenarios" ,python-testscenarios)
2496 ("python-mock" ,python-mock)
2497 ("python-docutils" ,python-docutils)))
2498 (home-page "https://pagure.io/python-daemon/")
2499 (synopsis "Python library for making a Unix daemon process")
2500 (description "Python-daemon is a library that assists a Python program to
2501 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2502
2503 This library provides a @code{DaemonContext} class that manages the following
2504 important tasks for becoming a daemon process:
2505 @enumerate
2506 @item Detach the process into its own process group.
2507 @item Set process environment appropriate for running inside a chroot.
2508 @item Renounce suid and sgid privileges.
2509 @item Close all open file descriptors.
2510 @item Change the working directory, uid, gid, and umask.
2511 @item Set appropriate signal handlers.
2512 @item Open new file descriptors for stdin, stdout, and stderr.
2513 @item Manage a specified PID lock file.
2514 @item Register cleanup functions for at-exit processing.
2515 @end enumerate")
2516 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2517 (license (list license:asl2.0 license:gpl3+))))
2518
2519 (define-public python-docutils
2520 (package
2521 (name "python-docutils")
2522 (version "0.14")
2523 (source
2524 (origin
2525 (method url-fetch)
2526 (uri (pypi-uri "docutils" version))
2527 (sha256
2528 (base32
2529 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2530 (build-system python-build-system)
2531 (arguments
2532 '(#:tests? #f)) ; no setup.py test command
2533 (home-page "http://docutils.sourceforge.net/")
2534 (synopsis "Python Documentation Utilities")
2535 (description
2536 "Docutils is a modular system for processing documentation into useful
2537 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2538 reStructuredText.")
2539 ;; Most of the source code is public domain, but some source files are
2540 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2541 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2542
2543 (define-public python2-docutils
2544 (package-with-python2 python-docutils))
2545
2546 (define-public python-pygments
2547 (package
2548 (name "python-pygments")
2549 (version "2.4.2")
2550 (source
2551 (origin
2552 (method url-fetch)
2553 (uri (pypi-uri "Pygments" version))
2554 (sha256
2555 (base32
2556 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2557 (build-system python-build-system)
2558 (arguments
2559 ;; FIXME: Tests require sphinx, which depends on this.
2560 '(#:tests? #f))
2561 (home-page "http://pygments.org/")
2562 (synopsis "Syntax highlighting")
2563 (description
2564 "Pygments is a syntax highlighting package written in Python.")
2565 (license license:bsd-2)))
2566
2567 (define-public python2-pygments
2568 (package-with-python2 python-pygments))
2569
2570 (define-public python-bumpversion
2571 (package
2572 (name "python-bumpversion")
2573 (version "0.5.3")
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (pypi-uri "bumpversion" version))
2578 (sha256
2579 (base32
2580 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2581 (build-system python-build-system)
2582 (home-page "https://github.com/peritus/bumpversion")
2583 (synopsis "Tool to bump software version")
2584 (description "This tool provides a command-line interface (CLI) to bump a
2585 software version simply.")
2586 (license license:expat)))
2587
2588 (define-public python-deprecated
2589 (package
2590 (name "python-deprecated")
2591 (version "1.2.5")
2592 (source
2593 (origin
2594 (method git-fetch)
2595 (uri (git-reference
2596 (url "https://github.com/tantale/deprecated.git")
2597 (commit (string-append "v" version))))
2598 (file-name (git-file-name name version))
2599 (sha256
2600 (base32
2601 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2602 (build-system python-build-system)
2603 (arguments
2604 `(#:phases (modify-phases %standard-phases
2605 (replace 'check
2606 (lambda _
2607 (invoke "pytest"))))))
2608 (propagated-inputs
2609 `(("python-wrapt" ,python-wrapt)))
2610 (native-inputs
2611 `(("python-bumpversion" ,python-bumpversion)
2612 ("python-pytest" ,python-pytest)
2613 ("python-pytest-cov" ,python-pytest-cov)
2614 ("python-sphinx" ,python-sphinx)
2615 ("python-tox" ,python-tox)))
2616 (home-page "https://github.com/tantale/deprecated")
2617 (synopsis "Python decorator to deprecate classes, functions or methods")
2618 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2619 to deprecate classes, functions or methods.")
2620 (license license:expat)))
2621
2622 (define-public python-pygithub
2623 (package
2624 (name "python-pygithub")
2625 (version "1.43.7")
2626 (source
2627 ;; We fetch from the Git repo because there are no tests in the PyPI
2628 ;; archive.
2629 (origin
2630 (method git-fetch)
2631 (uri (git-reference
2632 (url "https://github.com/PyGithub/PyGithub.git")
2633 (commit (string-append "v" version))))
2634 (file-name (git-file-name name version))
2635 (sha256
2636 (base32
2637 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2638 (build-system python-build-system)
2639 (arguments
2640 `(#:phases (modify-phases %standard-phases
2641 ;; Some tests rely on the network.
2642 (add-after 'unpack 'disable-failing-tests
2643 (lambda _
2644 (substitute* "tests/Issue142.py"
2645 (("testDecodeJson") "disabled_testDecodeJson"))
2646 #t))
2647 (add-before 'check 'prepare-for-tests
2648 (lambda _
2649 (for-each (lambda (f)
2650 (chmod f #o666))
2651 (find-files "./tests"))
2652 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2653 (setenv "PYTHONPATH"
2654 (string-append "./tests:" (getenv "PYTHONPATH")))
2655 #t)))))
2656 (propagated-inputs
2657 `(("python-deprecated" ,python-deprecated)
2658 ("python-pyjwt" ,python-pyjwt)
2659 ("python-requests" ,python-requests)))
2660 (native-inputs `(("python-httpretty" ,python-httpretty)))
2661 (home-page "https://pygithub.readthedocs.io/en/latest/")
2662 (synopsis "Python library for the GitHub API")
2663 (description "This library allows managing GitHub resources such as
2664 repositories, user profiles, and organizations in your Python applications,
2665 using version 3 of the GitHub application programming interface (API).")
2666 (license license:lgpl3+)))
2667
2668 (define-public python-rellu
2669 (package
2670 (name "python-rellu")
2671 (version "0.7")
2672 (source
2673 (origin
2674 (method url-fetch)
2675 (uri (pypi-uri "rellu" version))
2676 (sha256
2677 (base32
2678 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2679 (build-system python-build-system)
2680 (propagated-inputs
2681 `(("python-invoke" ,python-invoke)
2682 ("python-pygithub" ,python-pygithub)))
2683 (home-page "https://github.com/robotframework/rellu")
2684 (synopsis "Utilities to create PyPI releases")
2685 (description "This collection of utilities contains tooling and templates
2686 to assist in creating releases on GitHub and publishing them on PyPI. It is
2687 designed to be used by Robot Framework and tools and libraries in its
2688 ecosystem, but can naturally be used also by other projects.")
2689 (license license:asl2.0)))
2690
2691 (define-public python-robotframework
2692 (package
2693 (name "python-robotframework")
2694 (version "3.1.2")
2695 ;; There are no tests in the PyPI archive.
2696 (source
2697 (origin
2698 (method git-fetch)
2699 (uri (git-reference
2700 (url "https://github.com/robotframework/robotframework.git")
2701 (commit (string-append "v" version))))
2702 (file-name (git-file-name name version))
2703 (sha256
2704 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2705 (patches (search-patches
2706 "python-robotframework-honor-source-date-epoch.patch"))))
2707 (build-system python-build-system)
2708 (arguments
2709 `(#:phases (modify-phases %standard-phases
2710 (add-before 'build 'build-and-install-doc
2711 (lambda* (#:key outputs #:allow-other-keys)
2712 (let* ((doc-output (assoc-ref outputs "doc"))
2713 (doc (string-append doc-output "/share/"
2714 ,name "-" ,version "/")))
2715 (invoke "invoke" "library-docs" "all")
2716 (mkdir-p doc)
2717 (copy-recursively "doc/libraries"
2718 (string-append doc "/libraries"))
2719 #t)))
2720 (replace 'check
2721 (lambda _
2722 (invoke "python" "utest/run.py"))))))
2723 (native-inputs
2724 `(("python-invoke" ,python-invoke)
2725 ("python-rellu" ,python-rellu)
2726 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2727 (outputs '("out" "doc"))
2728 (home-page "https://robotframework.org")
2729 (synopsis "Generic automation framework")
2730 (description "Robot Framework is a generic automation framework for
2731 acceptance testing, acceptance test driven development (ATDD), and robotic
2732 process automation (RPA).")
2733 (license license:asl2.0)))
2734
2735 (define-public python-robotframework-lint
2736 ;; There is no properly tagged release; the commit below seems to correspond
2737 ;; to the 0.9 stable release available from PyPI. The tests are not
2738 ;; included in the PyPI archive, so we fetch the sources from the upstream
2739 ;; Git repo.
2740 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2741 (revision "1"))
2742 (package
2743 (name "python-robotframework-lint")
2744 (version (git-version "0.9.0" revision commit))
2745 (source
2746 (origin
2747 (method git-fetch)
2748 (uri (git-reference
2749 (url "https://github.com/boakley/robotframework-lint.git")
2750 (commit commit)))
2751 (file-name (git-file-name name version))
2752 (sha256
2753 (base32
2754 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2755 (build-system python-build-system)
2756 (arguments
2757 `(#:phases
2758 (modify-phases %standard-phases
2759 (replace 'check
2760 (lambda _
2761 (invoke "python" "-m" "robot" "-A"
2762 "tests/conf/default.args" "tests"))))))
2763 (propagated-inputs
2764 `(("python-robotframework" ,python-robotframework)))
2765 (home-page "https://github.com/boakley/robotframework-lint/")
2766 (synopsis "Static analysis tool (linter) for Robot Framework")
2767 (description "This package provides the @code{rflint} command-line
2768 utility, a static analysis tool (linter) for Robot Framework source files.")
2769 (license license:asl2.0))))
2770
2771 (define-public python-robotframework-sshlibrary
2772 (package
2773 (name "python-robotframework-sshlibrary")
2774 (version "3.3.0")
2775 ;; There are no tests in the PyPI archive.
2776 (source
2777 (origin
2778 (method git-fetch)
2779 (uri (git-reference
2780 (url "https://github.com/robotframework/SSHLibrary.git")
2781 (commit (string-append "v" version))))
2782 (file-name (git-file-name name version))
2783 (sha256
2784 (base32
2785 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2786 (build-system python-build-system)
2787 (arguments
2788 `(#:phases
2789 (modify-phases %standard-phases
2790 (add-before 'build 'build-and-install-doc
2791 (lambda* (#:key outputs #:allow-other-keys)
2792 (let* ((doc-output (assoc-ref outputs "doc"))
2793 (doc (string-append doc-output "/share/"
2794 ,name "-" ,version "/")))
2795 (invoke "chmod" "-R" "+w" "docs")
2796 (invoke "invoke" "kw-docs" "project-docs")
2797 (mkdir-p doc)
2798 (for-each delete-file (find-files "docs" "\\.rst"))
2799 (copy-recursively "docs" doc)
2800 #t)))
2801 (replace 'check
2802 (lambda _
2803 ;; Some tests require an SSH server; we remove them.
2804 (delete-file "utest/test_client_api.py")
2805 (delete-file "utest/test_scp.py")
2806 (invoke "python" "utest/run.py"))))))
2807 (propagated-inputs
2808 `(("python-robotframework" ,python-robotframework)
2809 ("python-paramiko" ,python-paramiko)
2810 ("python-scp" ,python-scp)))
2811 (native-inputs
2812 `(("openssh" ,openssh)
2813 ("which" ,which)
2814 ;; To generate the documentation
2815 ("python-docutils" ,python-docutils)
2816 ("python-invoke" ,python-invoke)
2817 ("python-pygments" ,python-pygments)
2818 ("python-rellu" ,python-rellu)))
2819 (outputs '("out" "doc"))
2820 (home-page "https://github.com/robotframework/SSHLibrary")
2821 (synopsis "Robot Framework library for SSH and SFTP")
2822 (description "SSHLibrary is a Robot Framework library providing support
2823 for SSH and SFTP. It has the following main usages:
2824 @itemize @bullet
2825 @item Executing commands on the remote machine, either blocking or non-blocking.
2826 @item Writing and reading in an interactive shell.
2827 @item Transferring files and directories over SFTP.
2828 @item Ensuring that files and directories exist on the remote machine.
2829 @end itemize")
2830 (license license:asl2.0)))
2831
2832 (define-public python-scp
2833 (package
2834 (name "python-scp")
2835 (version "0.13.2")
2836 (source
2837 (origin
2838 (method url-fetch)
2839 (uri (pypi-uri "scp" version))
2840 (sha256
2841 (base32
2842 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2843 (build-system python-build-system)
2844 (arguments
2845 '(#:tests? #f)) ;tests require an SSH server
2846 (propagated-inputs
2847 `(("python-paramiko" ,python-paramiko)))
2848 (home-page "https://github.com/jbardin/scp.py")
2849 (synopsis "SCP protocol module for Python and Paramiko")
2850 (description "The scp module extends the Paramiko library to send and
2851 receive files via the SCP1 protocol, as implemented by the OpenSSH
2852 @command{scp} program.")
2853 (license license:gpl2+)))
2854
2855 (define-public python-rst.linker
2856 (package
2857 (name "python-rst.linker")
2858 (version "1.10")
2859 (source
2860 (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "rst.linker" version))
2863 (sha256
2864 (base32
2865 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2866 (build-system python-build-system)
2867 (propagated-inputs
2868 `(("python-dateutil" ,python-dateutil)
2869 ("python-six" ,python-six)))
2870 (native-inputs
2871 `(("python-setuptools-scm" ,python-setuptools-scm)))
2872 ;; Test would require path.py, which would introduce a cyclic dependence.
2873 (arguments `(#:tests? #f))
2874 ;; Note: As of version 1.7 the documentation is not worth building.
2875 (home-page "https://github.com/jaraco/rst.linker")
2876 (synopsis "Sphinx plugin to add links and timestamps")
2877 (description "rst.linker allows to automatically replace text by a
2878 reStructuredText external reference or timestamps. It's primary purpose is to
2879 augment the changelog, but it can be used for other documents, too.")
2880 (license license:expat)))
2881
2882 (define-public python2-rst.linker
2883 (package-with-python2 python-rst.linker))
2884
2885 (define-public python-feedgenerator
2886 (package
2887 (name "python-feedgenerator")
2888 (version "1.9")
2889 (source
2890 (origin
2891 (method url-fetch)
2892 (uri (pypi-uri "feedgenerator" version))
2893 (sha256
2894 (base32
2895 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2896 (modules '((guix build utils)))
2897 (snippet
2898 '(begin
2899 ;; Remove pre-compiled .pyc files from source.
2900 (for-each delete-file-recursively
2901 (find-files "." "__pycache__" #:directories? #t))
2902 (for-each delete-file (find-files "." "\\.pyc$"))
2903 #t))))
2904 (build-system python-build-system)
2905 (propagated-inputs
2906 `(("python-pytz" ,python-pytz)
2907 ("python-six" ,python-six)))
2908 (home-page "https://github.com/getpelican/feedgenerator")
2909 (synopsis
2910 "Standalone version of Django's Atom/RSS feed generator")
2911 (description
2912 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2913 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2914 (license license:bsd-3)))
2915
2916 (define-public python2-feedgenerator
2917 (package-with-python2 python-feedgenerator))
2918
2919 (define-public python-toml
2920 (package
2921 (name "python-toml")
2922 (version "0.9.4")
2923 (source
2924 (origin
2925 (method url-fetch)
2926 (uri (pypi-uri "toml" version))
2927 (sha256
2928 (base32
2929 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2930 (build-system python-build-system)
2931 (arguments
2932 `(#:tests? #f)) ;no tests suite in release
2933 (home-page "https://github.com/uiri/toml")
2934 (synopsis "Library for TOML")
2935 (description
2936 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2937 Language (TOML) configuration files.")
2938 (license license:expat)))
2939
2940 (define-public python-jsonrpc-server
2941 (package
2942 (name "python-jsonrpc-server")
2943 (version "0.1.2")
2944 (source
2945 (origin
2946 (method url-fetch)
2947 (uri (pypi-uri "python-jsonrpc-server" version))
2948 (sha256
2949 (base32
2950 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2951 (build-system python-build-system)
2952 (propagated-inputs
2953 `(("python-future" ,python-future)
2954 ("python-mock" ,python-mock)
2955 ("python-pytest" ,python-pytest)))
2956 (home-page
2957 "https://github.com/palantir/python-jsonrpc-server")
2958 (synopsis "JSON RPC 2.0 server library")
2959 (description
2960 "This package provides a JSON RPC 2.0 server library for Python.")
2961 (license license:expat)))
2962
2963 (define-public python-pydocstyle
2964 (package
2965 (name "python-pydocstyle")
2966 (version "3.0.0")
2967 (source
2968 (origin
2969 (method url-fetch)
2970 (uri (pypi-uri "pydocstyle" version))
2971 (sha256
2972 (base32
2973 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2974 (build-system python-build-system)
2975 (propagated-inputs
2976 `(("python-six" ,python-six)
2977 ("python-snowballstemmer" ,python-snowballstemmer)))
2978 (home-page
2979 "https://github.com/PyCQA/pydocstyle/")
2980 (synopsis "Python docstring style checker")
2981 (description
2982 "This package provides a style checker for the Python Language
2983 Server (PLS).")
2984 (license license:expat)))
2985
2986 (define-public python-language-server
2987 (package
2988 (name "python-language-server")
2989 (version "0.26.1")
2990 (source
2991 (origin
2992 (method url-fetch)
2993 (uri (pypi-uri "python-language-server" version))
2994 (sha256
2995 (base32
2996 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
2997 (build-system python-build-system)
2998 (propagated-inputs
2999 `(("python-pluggy" ,python-pluggy)
3000 ("python-jsonrpc-server" ,python-jsonrpc-server)
3001 ("python-jedi" ,python-jedi)
3002 ("python-yapf" ,python-yapf)
3003 ("python-pyflakes" ,python-pyflakes)
3004 ("python-pydocstyle" ,python-pydocstyle)
3005 ("python-pycodestyle" ,python-pycodestyle)
3006 ("python-mccabe" ,python-mccabe)
3007 ("python-rope" ,python-rope)
3008 ("python-autopep8" ,python-autopep8)
3009 ("python-pylint" ,python-pylint)))
3010 (home-page "https://github.com/palantir/python-language-server")
3011 (synopsis "Python implementation of the Language Server Protocol")
3012 (description
3013 "The Python Language Server (pyls) is an implementation of the Python 3
3014 language specification for the Language Server Protocol (LSP). This tool is
3015 used in text editing environments to provide a complete and integrated
3016 feature-set for programming Python effectively.")
3017 (license license:expat)))
3018
3019 (define-public python-black
3020 (package
3021 (name "python-black")
3022 (version "18.6b4")
3023 (source
3024 (origin
3025 (method url-fetch)
3026 (uri (pypi-uri "black" version))
3027 (sha256
3028 (base32
3029 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3030 (build-system python-build-system)
3031 (arguments
3032 `(#:phases
3033 (modify-phases %standard-phases
3034 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3035 (lambda _
3036 (let ((python3 (which "python3")))
3037 (substitute* '("tests/data/fmtonoff.py"
3038 "tests/data/string_prefixes.py"
3039 "tests/data/function.py")
3040 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3041 (string-append "#!" python3 (if (string? minor-version)
3042 minor-version
3043 ""))))))))))
3044 (propagated-inputs
3045 `(("python-click" ,python-click)
3046 ("python-attrs" ,python-attrs)
3047 ("python-appdirs" ,python-appdirs)
3048 ("python-toml" ,python-toml)))
3049 (home-page "https://github.com/ambv/black")
3050 (synopsis "The uncompromising code formatter")
3051 (description "Black is the uncompromising Python code formatter.")
3052 (license license:expat)))
3053
3054 (define-public python-blinker
3055 (package
3056 (name "python-blinker")
3057 (version "1.4")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "blinker" version))
3062 (sha256
3063 (base32
3064 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3065 (build-system python-build-system)
3066 (home-page "http://pythonhosted.org/blinker/")
3067 (synopsis "Fast, simple object-to-object and broadcast signaling")
3068 (description
3069 "Blinker provides a fast dispatching system that allows any number of
3070 interested parties to subscribe to events, or \"signals\".")
3071 (license license:expat)))
3072
3073 (define-public python2-blinker
3074 (package-with-python2 python-blinker))
3075
3076 (define-public pelican
3077 (package
3078 (name "pelican")
3079 (version "4.0.1")
3080 (source
3081 (origin
3082 (method url-fetch)
3083 (uri (pypi-uri "pelican" version))
3084 (sha256
3085 (base32
3086 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3087 (build-system python-build-system)
3088 (propagated-inputs
3089 `(("python-feedgenerator" ,python-feedgenerator)
3090 ("python-jinja2" ,python-jinja2)
3091 ("python-pygments" ,python-pygments)
3092 ("python-docutils" ,python-docutils)
3093 ("python-pytz" ,python-pytz)
3094 ("python-blinker" ,python-blinker)
3095 ("python-unidecode" ,python-unidecode)
3096 ("python-six" ,python-six)
3097 ("python-dateutil" ,python-dateutil)
3098 ("python-markdown" ,python-markdown)))
3099 (home-page "https://getpelican.com/")
3100 (arguments
3101 `(;; XXX Requires a lot more packages to do unit tests :P
3102 #:tests? #f
3103 #:phases (modify-phases %standard-phases
3104 (add-before
3105 'install 'adjust-requires
3106 ;; Since feedgenerator is installed from git, it doesn't
3107 ;; conform to the version requirements.
3108 ;;
3109 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3110 ;; version requirement so setuptools doesn't get confused.
3111 (lambda _
3112 (substitute* "setup.py"
3113 (("['\"]feedgenerator.*?['\"]")
3114 "'feedgenerator'")))))))
3115 (synopsis "Python-based static site publishing system")
3116 (description
3117 "Pelican is a tool to generate a static blog from reStructuredText,
3118 Markdown input files, and more. Pelican uses Jinja2 for templating
3119 and is very extensible.")
3120 (license license:agpl3+)))
3121
3122 (define-public mallard-ducktype
3123 (package
3124 (name "mallard-ducktype")
3125 (version "1.0.2")
3126 (source
3127 (origin
3128 (method git-fetch)
3129 ;; git-reference because tests are not included in pypi source tarball
3130 ;; https://issues.guix.gnu.org/issue/36755#2
3131 (uri (git-reference
3132 (url "https://github.com/projectmallard/mallard-ducktype.git")
3133 (commit version)))
3134 (file-name (git-file-name name version))
3135 (sha256
3136 (base32
3137 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3138 (build-system python-build-system)
3139 (arguments
3140 '(#:phases
3141 (modify-phases %standard-phases
3142 (replace 'check
3143 (lambda _
3144 (with-directory-excursion "tests"
3145 (invoke "sh" "runtests")))))))
3146 (home-page "http://projectmallard.org")
3147 (synopsis "Convert Ducktype to Mallard documentation markup")
3148 (description
3149 "Ducktype is a lightweight syntax that can represent all the semantics
3150 of the Mallard XML documentation system. Ducktype files can be converted to
3151 Mallard using the @command{ducktype} tool. The yelp-tools package
3152 provides additional functionality on the produced Mallard documents.")
3153 (license license:expat)))
3154
3155 (define-public python-scikit-image
3156 (package
3157 (name "python-scikit-image")
3158 (version "0.14.2")
3159 (source
3160 (origin
3161 (method url-fetch)
3162 (uri (pypi-uri "scikit-image" version))
3163 (sha256
3164 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3165 (build-system python-build-system)
3166 (arguments
3167 ;; TODO: Some tests require running X11 server. Disable them?
3168 '(#:tests? #f))
3169 ;; See DEPENDS.txt for the list of build and run time requiremnts
3170 (propagated-inputs
3171 `(("python-cloudpickle" ,python-cloudpickle)
3172 ("python-dask" ,python-dask)
3173 ("python-matplotlib" ,python-matplotlib)
3174 ("python-networkx" ,python-networkx)
3175 ("python-numpy" ,python-numpy)
3176 ("python-pillow" ,python-pillow)
3177 ("python-pywavelets" ,python-pywavelets)
3178 ("python-scipy" ,python-scipy)
3179 ("python-six" ,python-six)))
3180 (native-inputs
3181 `(("python-cython" ,python-cython)))
3182 (home-page "http://scikit-image.org/")
3183 (synopsis "Image processing in Python")
3184 (description
3185 "Scikit-image is a collection of algorithms for image processing.")
3186 (license license:bsd-3)))
3187
3188 (define-public python2-scikit-image
3189 (package-with-python2 python-scikit-image))
3190
3191 (define-public python-cython
3192 (package
3193 (name "python-cython")
3194 (version "0.29.11")
3195 (source
3196 (origin
3197 (method url-fetch)
3198 (uri (pypi-uri "Cython" version))
3199 (sha256
3200 (base32
3201 "1866m01ggl2h3rky4hac3m5p048gg4a0jb09ljkknryiqln54fkn"))))
3202 (build-system python-build-system)
3203 ;; we need the full python package and not just the python-wrapper
3204 ;; because we need libpython3.3m.so
3205 (inputs
3206 `(("python" ,python)))
3207 (arguments
3208 `(#:phases
3209 (modify-phases %standard-phases
3210 (add-before 'check 'set-HOME
3211 ;; some tests require access to "$HOME/.cython"
3212 (lambda _ (setenv "HOME" "/tmp") #t))
3213
3214 ;; FIXME: These tests started failing on armhf after the 0.28 update
3215 ;; (commit c69d11c5930), both with an error such as this:
3216 ;; compiling (cpp) and running dictcomp ...
3217 ;; === C/C++ compiler error output: ===
3218 ;; ‘
3219 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3220 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3221 ,@(if (target-arm32?)
3222 `((add-before 'check 'disable-failing-tests
3223 (lambda _
3224 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3225 (for-each (lambda (test)
3226 (format disabled-tests "~a\n" test))
3227 '("memslice" "dictcomp"))
3228 (close-port disabled-tests)))))
3229 '())
3230
3231 (replace 'check
3232 (lambda _
3233 (invoke "python" "runtests.py" "-vv"))))))
3234 (home-page "https://cython.org/")
3235 (synopsis "C extensions for Python")
3236 (description "Cython is an optimising static compiler for both the Python
3237 programming language and the extended Cython programming language. It makes
3238 writing C extensions for Python as easy as Python itself.")
3239 (license license:asl2.0)
3240 (properties `((python2-variant . ,(delay python2-cython))))))
3241
3242 (define-public python2-cython
3243 (package (inherit (package-with-python2
3244 (strip-python2-variant python-cython)))
3245 (name "python2-cython")
3246 (inputs
3247 `(("python-2" ,python-2))))) ; this is not automatically changed
3248
3249 ;; The RPython toolchain currently does not support Python 3.
3250 (define-public python2-rpython
3251 (package
3252 (name "python2-rpython")
3253 (version "0.2.1")
3254 (source
3255 (origin
3256 (method url-fetch)
3257 (uri (pypi-uri "rpython" version))
3258 (sha256
3259 (base32
3260 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3261 (build-system python-build-system)
3262 (arguments `(#:python ,python-2))
3263 (native-inputs
3264 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3265 (home-page "https://rpython.readthedocs.org")
3266 (synopsis "Framework for implementing interpreters and virtual machines")
3267 (description "RPython is a translation and support framework for
3268 producing implementations of dynamic languages, emphasizing a clean separation
3269 between language specification and implementation aspects.")
3270 (license license:expat)))
3271
3272 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3273 ;; python-scipy still build, as these three packages are often used together.
3274 (define-public python-numpy
3275 (package
3276 (name "python-numpy")
3277 (version "1.15.4")
3278 (source
3279 (origin
3280 (method url-fetch)
3281 (uri (string-append
3282 "https://github.com/numpy/numpy/releases/download/v"
3283 version "/numpy-" version ".tar.gz"))
3284 (sha256
3285 (base32
3286 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3287 (build-system python-build-system)
3288 (inputs
3289 `(("openblas" ,openblas)
3290 ("lapack" ,lapack)))
3291 (native-inputs
3292 `(("python-cython" ,python-cython)
3293 ("python-pytest" ,python-pytest)
3294 ("gfortran" ,gfortran)))
3295 (arguments
3296 `(#:phases
3297 (modify-phases %standard-phases
3298 (add-before 'build 'configure-blas-lapack
3299 (lambda* (#:key inputs #:allow-other-keys)
3300 (call-with-output-file "site.cfg"
3301 (lambda (port)
3302 (format port
3303 "[openblas]
3304 libraries = openblas
3305 library_dirs = ~a/lib
3306 include_dirs = ~a/include
3307
3308 # backslash-n to make emacs happy
3309 \n[lapack]
3310 lapack_libs = lapack
3311 library_dirs = ~a/lib
3312 include_dirs = ~a/include
3313 "
3314 (assoc-ref inputs "openblas")
3315 (assoc-ref inputs "openblas")
3316 (assoc-ref inputs "lapack")
3317 (assoc-ref inputs "lapack"))))
3318 #t))
3319 (add-before 'build 'fix-executable-paths
3320 (lambda* (#:key inputs #:allow-other-keys)
3321 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3322 ;; instead of /bin/sh.
3323 (substitute* "numpy/distutils/exec_command.py"
3324 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3325 (string-append match-start (assoc-ref inputs "bash") match-end)))
3326 ;; Use "gcc" executable, not "cc".
3327 (substitute* "numpy/distutils/system_info.py"
3328 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3329 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3330 #t))
3331 ;; Tests can only be run after the library has been installed and not
3332 ;; within the source directory.
3333 (delete 'check)
3334 (add-after 'install 'check
3335 (lambda* (#:key outputs inputs #:allow-other-keys)
3336 ;; Make installed package available for running the tests
3337 (add-installed-pythonpath inputs outputs)
3338 ;; Make sure "f2py" etc is found.
3339 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3340 ":" (getenv "PATH")))
3341 (with-directory-excursion "/tmp"
3342 (invoke "python" "-c"
3343 "import numpy; numpy.test(verbose=2)")))))))
3344 (home-page "http://www.numpy.org/")
3345 (synopsis "Fundamental package for scientific computing with Python")
3346 (description "NumPy is the fundamental package for scientific computing
3347 with Python. It contains among other things: a powerful N-dimensional array
3348 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3349 and Fortran code, useful linear algebra, Fourier transform, and random number
3350 capabilities.")
3351 (license license:bsd-3)))
3352
3353 (define-public python2-numpy
3354 (package-with-python2 python-numpy))
3355
3356 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3357 ;; interest only for legacy code going back to NumPy's predecessor
3358 ;; Numeric.
3359 (define-public python2-numpy-1.8
3360 (package (inherit python2-numpy)
3361 (version "1.8.2")
3362 (source
3363 (origin
3364 (method url-fetch)
3365 (uri (string-append
3366 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3367 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3368 (sha256
3369 (base32
3370 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3371 (arguments
3372 (substitute-keyword-arguments (package-arguments python2-numpy)
3373 ((#:phases phases)
3374 `(modify-phases ,phases
3375 (replace 'configure-blas-lapack
3376 (lambda* (#:key inputs #:allow-other-keys)
3377 (call-with-output-file "site.cfg"
3378 (lambda (port)
3379 (format port
3380 "[openblas]
3381 libraries = openblas,lapack
3382 library_dirs = ~a/lib:~a/lib
3383 include_dirs = ~a/include:~a/include
3384 "
3385 (assoc-ref inputs "openblas")
3386 (assoc-ref inputs "lapack")
3387 (assoc-ref inputs "openblas")
3388 (assoc-ref inputs "lapack"))))
3389 #t))))))
3390 (native-inputs
3391 `(("python2-nose" ,python2-nose)))
3392 (description "NumPy is the fundamental package for scientific computing
3393 with Python. It contains among other things: a powerful N-dimensional array
3394 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3395 and Fortran code, useful linear algebra, Fourier transform, and random number
3396 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3397 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3398 Numeric.")
3399 (license license:bsd-3)))
3400
3401 (define-public python-munch
3402 (package
3403 (name "python-munch")
3404 (version "2.0.4")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (pypi-uri "munch" version))
3409 (sha256
3410 (base32
3411 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3412 (build-system python-build-system)
3413 (home-page "https://github.com/Infinidat/munch")
3414 (synopsis "Dot-accessible dictionary")
3415 (description "Munch is a dot-accessible dictionary similar to JavaScript
3416 objects.")
3417 (license license:expat)))
3418
3419 (define-public python2-munch
3420 (package-with-python2 python-munch))
3421
3422 (define-public python-colormath
3423 (package
3424 (name "python-colormath")
3425 (version "3.0.0")
3426 (source
3427 (origin
3428 (method url-fetch)
3429 (uri (pypi-uri "colormath" version))
3430 (sha256
3431 (base32
3432 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3433 (build-system python-build-system)
3434 (propagated-inputs
3435 `(("python-networkx" ,python-networkx)
3436 ("python-numpy" ,python-numpy)))
3437 (home-page "https://github.com/gtaylor/python-colormath")
3438 (synopsis "Color math and conversion library")
3439 (description
3440 "This is a Python library for color math and conversions.")
3441 (license license:bsd-3)))
3442
3443 (define-public python2-colormath
3444 (package-with-python2 python-colormath))
3445
3446 (define-public python-spectra
3447 (package
3448 (name "python-spectra")
3449 (version "0.0.11")
3450 (source
3451 (origin
3452 (method url-fetch)
3453 (uri (pypi-uri "spectra" version))
3454 (sha256
3455 (base32
3456 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3457 (build-system python-build-system)
3458 (arguments
3459 `(#:phases
3460 (modify-phases %standard-phases
3461 (replace 'check
3462 (lambda _ (invoke "nosetests" "-v"))))))
3463 (propagated-inputs
3464 `(("python-colormath" ,python-colormath)))
3465 (native-inputs
3466 `(("python-nose" ,python-nose)))
3467 (home-page "https://github.com/jsvine/spectra")
3468 (synopsis "Color scales and color conversion")
3469 (description
3470 "This package provides a Python library intended to make color math,
3471 color scales, and color space conversion easy. It has support for:
3472
3473 @enumerate
3474 @item Color scales
3475 @item Color ranges
3476 @item Color blending
3477 @item Brightening/darkening colors
3478 @item Saturating/desaturating colors
3479 @item Conversion to/from multiple color spaces.
3480 @end enumerate\n")
3481 (license license:expat)))
3482
3483 (define-public python2-spectra
3484 (package-with-python2 python-spectra))
3485
3486 (define-public python-numpy-documentation
3487 (package
3488 (name "python-numpy-documentation")
3489 (version (package-version python-numpy))
3490 (source (package-source python-numpy))
3491 (build-system python-build-system)
3492 (native-inputs
3493 `(("python-matplotlib" ,python-matplotlib)
3494 ("python-numpy" ,python-numpy)
3495 ("pkg-config" ,pkg-config)
3496 ("python-sphinx" ,python-sphinx)
3497 ("python-numpydoc" ,python-numpydoc)
3498 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3499 texlive-fonts-cm-super
3500 texlive-fonts-ec
3501 texlive-generic-ifxetex
3502 texlive-generic-pdftex
3503 texlive-latex-amsfonts
3504 texlive-latex-capt-of
3505 texlive-latex-cmap
3506 texlive-latex-environ
3507 texlive-latex-eqparbox
3508 texlive-latex-etoolbox
3509 texlive-latex-expdlist
3510 texlive-latex-fancyhdr
3511 texlive-latex-fancyvrb
3512 texlive-latex-fncychap
3513 texlive-latex-float
3514 texlive-latex-framed
3515 texlive-latex-geometry
3516 texlive-latex-graphics
3517 texlive-latex-hyperref
3518 texlive-latex-mdwtools
3519 texlive-latex-multirow
3520 texlive-latex-needspace
3521 texlive-latex-oberdiek
3522 texlive-latex-parskip
3523 texlive-latex-preview
3524 texlive-latex-tabulary
3525 texlive-latex-threeparttable
3526 texlive-latex-titlesec
3527 texlive-latex-trimspaces
3528 texlive-latex-ucs
3529 texlive-latex-upquote
3530 texlive-latex-url
3531 texlive-latex-varwidth
3532 texlive-latex-wrapfig)))
3533 ("texinfo" ,texinfo)
3534 ("perl" ,perl)
3535 ("scipy-sphinx-theme"
3536 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3537 (method git-fetch)
3538 (uri (git-reference
3539 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3540 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3541 (sha256
3542 (base32
3543 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3544 ,@(package-native-inputs python-numpy)))
3545 (arguments
3546 `(#:tests? #f ; we're only generating the documentation
3547 #:phases
3548 (modify-phases %standard-phases
3549 (delete 'build)
3550 (replace 'install
3551 (lambda* (#:key inputs outputs #:allow-other-keys)
3552 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3553 (doc (string-append
3554 data "/doc/" ,name "-"
3555 ,(package-version python-numpy)))
3556 (info-reader (string-append data "/info"))
3557 (html (string-append doc "/html"))
3558 (scipy-sphinx-theme "scipy-sphinx-theme")
3559 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3560 (pyver ,(string-append "PYVER=")))
3561
3562 ;; FIXME: this is needed to for texlive-union to generate
3563 ;; fonts, which are not found.
3564 (setenv "HOME" "/tmp")
3565
3566 (with-directory-excursion "doc"
3567 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3568 (mkdir-p html)
3569 (invoke "make" "html" pyver)
3570 (invoke "make" "latex" "PAPER=a4" pyver)
3571 (invoke "make" "-C" "build/latex"
3572 "all-pdf" "PAPER=a4" pyver)
3573 ;; FIXME: Generation of the info file fails.
3574 ;; (invoke "make" "info" pyver)
3575 ;; (mkdir-p info)
3576 ;; (copy-file "build/texinfo/numpy.info"
3577 ;; (string-append info "/numpy.info"))
3578 (for-each (lambda (file)
3579 (copy-file (string-append "build/latex" file)
3580 (string-append doc file)))
3581 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3582 (with-directory-excursion "build/html"
3583 (for-each (lambda (file)
3584 (let* ((dir (dirname file))
3585 (tgt-dir (string-append html "/" dir)))
3586 (unless (equal? "." dir)
3587 (mkdir-p tgt-dir))
3588 (install-file file html)))
3589 (find-files "." ".*")))))
3590 #t)))))
3591 (home-page (package-home-page python-numpy))
3592 (synopsis "Documentation for the python-numpy package")
3593 (description (package-description python-numpy))
3594 (license (package-license python-numpy))))
3595
3596 (define-public python2-numpy-documentation
3597 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3598 (package
3599 (inherit numpy-documentation)
3600 (native-inputs `(("python2-functools32" ,python2-functools32)
3601 ,@(package-native-inputs numpy-documentation))))))
3602
3603 (define-public python-pygit2
3604 (package
3605 (name "python-pygit2")
3606 (version "0.28.2")
3607 (source
3608 (origin
3609 (method url-fetch)
3610 (uri (pypi-uri "pygit2" version))
3611 (sha256
3612 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3613 (build-system python-build-system)
3614 (arguments
3615 '(#:tests? #f)) ; tests don't run correctly in our environment
3616 (propagated-inputs
3617 `(("python-six" ,python-six)
3618 ("python-cffi" ,python-cffi)
3619 ("libgit2" ,libgit2)
3620 ("python-tox" ,python-tox)))
3621 (native-inputs
3622 `(("python-pytest" ,python-pytest)))
3623 (home-page "https://github.com/libgit2/pygit2")
3624 (synopsis "Python bindings for libgit2")
3625 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3626 library, libgit2 implements Git plumbing.")
3627 ;; GPL2.0 only, with linking exception.
3628 (license license:gpl2)))
3629
3630 (define-public python2-pygit2
3631 (package-with-python2 python-pygit2))
3632
3633 (define-public python-pyparsing
3634 (package
3635 (name "python-pyparsing")
3636 (version "2.3.1")
3637 (source
3638 (origin
3639 (method url-fetch)
3640 (uri (pypi-uri "pyparsing" version))
3641 (sha256
3642 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3643 (build-system python-build-system)
3644 (outputs '("out" "doc"))
3645 (arguments
3646 `(#:tests? #f ; no test target
3647 #:phases
3648 (modify-phases %standard-phases
3649 (add-after 'install 'install-doc
3650 (lambda* (#:key outputs #:allow-other-keys)
3651 (let* ((doc (string-append (assoc-ref outputs "doc")
3652 "/share/doc/" ,name "-" ,version))
3653 (html-doc (string-append doc "/html"))
3654 (examples (string-append doc "/examples")))
3655 (mkdir-p html-doc)
3656 (mkdir-p examples)
3657 (for-each
3658 (lambda (dir tgt)
3659 (map (lambda (file)
3660 (install-file file tgt))
3661 (find-files dir ".*")))
3662 (list "docs" "htmldoc" "examples")
3663 (list doc html-doc examples))
3664 #t))))))
3665 (home-page "https://github.com/pyparsing/pyparsing")
3666 (synopsis "Python parsing class library")
3667 (description
3668 "The pyparsing module is an alternative approach to creating and
3669 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3670 of regular expressions. The pyparsing module provides a library of classes
3671 that client code uses to construct the grammar directly in Python code.")
3672 (license license:expat)))
3673
3674 (define-public python2-pyparsing
3675 (package-with-python2 python-pyparsing))
3676
3677 (define-public python-numpydoc
3678 (package
3679 (name "python-numpydoc")
3680 (version "0.8.0")
3681 (source
3682 (origin
3683 (method url-fetch)
3684 (uri (pypi-uri "numpydoc" version))
3685 (sha256
3686 (base32
3687 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3688 (build-system python-build-system)
3689 (propagated-inputs
3690 `(("python-sphinx" ,python-sphinx)))
3691 (native-inputs
3692 `(("python-nose" ,python-nose)))
3693 (home-page "https://pypi.python.org/pypi/numpydoc")
3694 (synopsis
3695 "Numpy's Sphinx extensions")
3696 (description
3697 "Sphinx extension to support docstrings in Numpy format.")
3698 (license license:bsd-2)))
3699
3700 (define-public python2-numpydoc
3701 (package-with-python2 python-numpydoc))
3702
3703 (define-public python-numexpr
3704 (package
3705 (name "python-numexpr")
3706 (version "2.6.5")
3707 (source
3708 (origin
3709 (method url-fetch)
3710 (uri (pypi-uri "numexpr" version))
3711 (sha256
3712 (base32
3713 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3714 (build-system python-build-system)
3715 (arguments `(#:tests? #f)) ; no tests included
3716 (propagated-inputs
3717 `(("python-numpy" ,python-numpy)))
3718 (home-page "https://github.com/pydata/numexpr")
3719 (synopsis "Fast numerical expression evaluator for NumPy")
3720 (description
3721 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3722 expressions that operate on arrays are accelerated and use less memory than
3723 doing the same calculation in Python. In addition, its multi-threaded
3724 capabilities can make use of all your cores, which may accelerate
3725 computations, most specially if they are not memory-bounded (e.g. those using
3726 transcendental functions).")
3727 (license license:expat)))
3728
3729 (define-public python2-numexpr
3730 (package-with-python2 python-numexpr))
3731
3732 (define-public python-cycler
3733 (package
3734 (name "python-cycler")
3735 (version "0.10.0")
3736 (source (origin
3737 (method url-fetch)
3738 (uri (pypi-uri "cycler" version))
3739 (sha256
3740 (base32
3741 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3742 (build-system python-build-system)
3743 (arguments
3744 ;; XXX: The current version requires 'coveralls' which we don't have.
3745 ;; Enable this for the next release which uses 'python-pytest'.
3746 '(#:tests? #f))
3747 (propagated-inputs
3748 `(("python-six" ,python-six)))
3749 (home-page "http://matplotlib.org/cycler/")
3750 (synopsis "Composable keyword argument iterator")
3751 (description
3752 "When using @code{matplotlib} and plotting more than one line, it is
3753 common to want to be able to want to be able to cycle over one or more artist
3754 styles; but the plotting logic can quickly become involved.
3755 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3756 @code{Cycler} class was developed.")
3757 (license license:bsd-3)))
3758
3759 (define-public python2-cycler
3760 (package-with-python2 python-cycler))
3761
3762 (define-public python-colorspacious
3763 (package
3764 (name "python-colorspacious")
3765 (version "1.1.0")
3766 (source
3767 (origin
3768 (method git-fetch)
3769 (uri (git-reference
3770 (url "https://github.com/njsmith/colorspacious.git")
3771 (commit (string-append "v" version))))
3772 (file-name (git-file-name name version))
3773 (sha256
3774 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3775 (build-system python-build-system)
3776 (propagated-inputs
3777 `(("python-numpy" ,python-numpy)))
3778 (native-inputs
3779 `(("python-nose" ,python-nose)))
3780 (arguments
3781 `(#:phases
3782 (modify-phases %standard-phases
3783 (replace 'check
3784 (lambda _
3785 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3786 (home-page "https://github.com/njsmith/colorspacious")
3787 (synopsis "Python library for colorspace conversions")
3788 (description "@code{colorspacious} is a Python library that lets you
3789 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3790 (license license:expat)))
3791
3792 (define-public python2-colorspacious
3793 (package-with-python2 python-colorspacious))
3794
3795 (define-public python-matplotlib
3796 (package
3797 (name "python-matplotlib")
3798 (version "2.2.3")
3799 (source
3800 (origin
3801 (method url-fetch)
3802 (uri (pypi-uri "matplotlib" version))
3803 (sha256
3804 (base32
3805 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3806 (build-system python-build-system)
3807 (propagated-inputs ; the following packages are all needed at run time
3808 `(("python-cycler" ,python-cycler)
3809 ("python-kiwisolver" ,python-kiwisolver)
3810 ("python-pyparsing" ,python-pyparsing)
3811 ("python-pygobject" ,python-pygobject)
3812 ("gobject-introspection" ,gobject-introspection)
3813 ("python-tkinter" ,python "tk")
3814 ("python-dateutil" ,python-dateutil)
3815 ("python-numpy" ,python-numpy)
3816 ("python-pillow" ,python-pillow)
3817 ("python-pytz" ,python-pytz)
3818 ("python-six" ,python-six)
3819 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3820 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3821 ;; object. For this reason we need to import both libraries.
3822 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3823 ("python-pycairo" ,python-pycairo)
3824 ("python-cairocffi" ,python-cairocffi)))
3825 (inputs
3826 `(("libpng" ,libpng)
3827 ("imagemagick" ,imagemagick)
3828 ("freetype" ,freetype)
3829 ("cairo" ,cairo)
3830 ("glib" ,glib)
3831 ;; FIXME: Add backends when available.
3832 ;("python-wxpython" ,python-wxpython)
3833 ("tcl" ,tcl)
3834 ("tk" ,tk)))
3835 (native-inputs
3836 `(("pkg-config" ,pkg-config)
3837 ("python-nose" ,python-nose)
3838 ("python-mock" ,python-mock)))
3839 (arguments
3840 `(#:phases
3841 (modify-phases %standard-phases
3842 (add-before 'build 'configure-environment
3843 (lambda* (#:key outputs inputs #:allow-other-keys)
3844 (let ((cairo (assoc-ref inputs "cairo")))
3845 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3846 ;; has not effect.
3847 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3848 (setenv "HOME" (getcwd))
3849 (call-with-output-file "setup.cfg"
3850 (lambda (port)
3851 (format port "[directories]~%
3852 basedirlist = ~a,~a~%
3853 [rc_options]~%
3854 backend = TkAgg~%"
3855 (assoc-ref inputs "tcl")
3856 (assoc-ref inputs "tk")))))
3857 #t)))))
3858 (home-page "http://matplotlib.org")
3859 (synopsis "2D plotting library for Python")
3860 (description
3861 "Matplotlib is a Python 2D plotting library which produces publication
3862 quality figures in a variety of hardcopy formats and interactive environments
3863 across platforms. Matplotlib can be used in Python scripts, the python and
3864 ipython shell, web application servers, and six graphical user interface
3865 toolkits.")
3866 (license license:psfl)
3867 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3868
3869 (define-public python2-matplotlib
3870 (let ((matplotlib (package-with-python2
3871 (strip-python2-variant python-matplotlib))))
3872 (package (inherit matplotlib)
3873 ;; Make sure to use special packages for Python 2 instead
3874 ;; of those automatically rewritten by package-with-python2.
3875 (propagated-inputs
3876 `(("python2-pycairo" ,python2-pycairo)
3877 ("python2-backports-functools-lru-cache"
3878 ,python2-backports-functools-lru-cache)
3879 ("python2-functools32" ,python2-functools32)
3880 ("python2-pygobject-2" ,python2-pygobject-2)
3881 ("python2-subprocess32" ,python2-subprocess32)
3882 ("python2-tkinter" ,python-2 "tk")
3883 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3884 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3885
3886 (define-public python-matplotlib-documentation
3887 (package
3888 (name "python-matplotlib-documentation")
3889 (version (package-version python-matplotlib))
3890 (source (package-source python-matplotlib))
3891 (build-system python-build-system)
3892 (native-inputs
3893 `(("python-matplotlib" ,python-matplotlib)
3894 ("python-colorspacious" ,python-colorspacious)
3895 ("python-sphinx" ,python-sphinx)
3896 ("python-sphinx-gallery" ,python-sphinx-gallery)
3897 ("python-numpydoc" ,python-numpydoc)
3898 ("python-ipython" ,python-ipython)
3899 ("python-ipykernel" ,python-ipykernel)
3900 ("python-mock" ,python-mock)
3901 ("graphviz" ,graphviz)
3902 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3903 texlive-latex-amsmath
3904 texlive-latex-enumitem
3905 texlive-latex-expdlist
3906 texlive-latex-geometry
3907 texlive-latex-preview
3908 texlive-latex-type1cm
3909 texlive-latex-ucs
3910
3911 texlive-generic-pdftex
3912
3913 texlive-fonts-amsfonts
3914 texlive-fonts-ec
3915 texlive-fonts-adobe-times
3916 texlive-fonts-txfonts)))
3917 ("texinfo" ,texinfo)
3918 ,@(package-native-inputs python-matplotlib)))
3919 (arguments
3920 `(#:tests? #f ; we're only generating documentation
3921 #:phases
3922 (modify-phases %standard-phases
3923 (replace 'build
3924 (lambda _
3925 (chdir "doc")
3926 (setenv "PYTHONPATH"
3927 (string-append (getenv "PYTHONPATH")
3928 ":" (getcwd) "/../examples/units"))
3929 (substitute* "conf.py"
3930 ;; Don't use git.
3931 (("^SHA = check_output.*")
3932 (string-append "SHA = \"" ,version "\"\n"))
3933 ;; Don't fetch intersphinx files from the Internet
3934 (("^explicit_order_folders" m)
3935 (string-append "intersphinx_mapping = {}\n" m))
3936 (("'sphinx.ext.intersphinx',") "")
3937 ;; Disable URL embedding which requires internet access.
3938 (("'https://docs.scipy.org/doc/numpy'") "None")
3939 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3940 (invoke "make"
3941 "SPHINXBUILD=sphinx-build"
3942 "SPHINXOPTS=" ; don't abort on warnings
3943 "html" "texinfo")))
3944 (replace 'install
3945 (lambda* (#:key inputs outputs #:allow-other-keys)
3946 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3947 (doc (string-append data "/doc/python-matplotlib-" ,version))
3948 (info (string-append data "/info"))
3949 (html (string-append doc "/html")))
3950 (mkdir-p html)
3951 (mkdir-p info)
3952 (copy-recursively "build/html" html)
3953 (symlink (string-append html "/_images")
3954 (string-append info "/matplotlib-figures"))
3955 (with-directory-excursion "build/texinfo"
3956 (substitute* "matplotlib.texi"
3957 (("@image\\{([^,]*)" all file)
3958 (string-append "@image{matplotlib-figures/" file)))
3959 (symlink (string-append html "/_images")
3960 "./matplotlib-figures")
3961 (invoke "makeinfo" "--no-split"
3962 "-o" "matplotlib.info" "matplotlib.texi"))
3963 (install-file "build/texinfo/matplotlib.info" info))
3964 #t)))))
3965 (home-page (package-home-page python-matplotlib))
3966 (synopsis "Documentation for the python-matplotlib package")
3967 (description (package-description python-matplotlib))
3968 (license (package-license python-matplotlib))))
3969
3970 (define-public python2-matplotlib-documentation
3971 (package-with-python2 python-matplotlib-documentation))
3972
3973 (define-public python-matplotlib-venn
3974 (package
3975 (name "python-matplotlib-venn")
3976 (version "0.11.5")
3977 (source
3978 (origin
3979 (method url-fetch)
3980 (uri (pypi-uri "matplotlib-venn" version ".zip"))
3981 (sha256
3982 (base32
3983 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
3984 (build-system python-build-system)
3985 (arguments '(#:tests? #f)) ; tests are not included
3986 (propagated-inputs
3987 `(("python-matplotlib" ,python-matplotlib)
3988 ("python-numpy" ,python-numpy)
3989 ("python-scipy" ,python-scipy)))
3990 (native-inputs
3991 `(("unzip" ,unzip)))
3992 (home-page "https://github.com/konstantint/matplotlib-venn")
3993 (synopsis "Plot area-proportional Venn diagrams")
3994 (description
3995 "This package provides tools for plotting area-proportional two- and
3996 three-way Venn diagrams in @code{matplotlib}.")
3997 (license license:expat)))
3998
3999 (define-public python2-pysnptools
4000 (package
4001 (name "python2-pysnptools")
4002 (version "0.3.13")
4003 (source
4004 (origin
4005 (method url-fetch)
4006 (uri (pypi-uri "pysnptools" version))
4007 (sha256
4008 (base32
4009 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4010 (build-system python-build-system)
4011 (arguments
4012 `(#:python ,python-2 ; only Python 2.7 is supported
4013 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4014 (propagated-inputs
4015 `(("python2-numpy" ,python2-numpy)
4016 ("python2-scipy" ,python2-scipy)
4017 ("python2-pandas" ,python2-pandas)))
4018 (native-inputs
4019 `(("python2-cython" ,python2-cython)))
4020 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4021 (synopsis "Library for reading and manipulating genetic data")
4022 (description
4023 "PySnpTools is a library for reading and manipulating genetic data. It
4024 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4025 those files. It can also efficiently manipulate ranges of integers using set
4026 operators such as union, intersection, and difference.")
4027 (license license:asl2.0)))
4028
4029 (define-public python-scipy
4030 (package
4031 (name "python-scipy")
4032 (version "1.2.2")
4033 (source
4034 (origin
4035 (method url-fetch)
4036 (uri (pypi-uri "scipy" version))
4037 (sha256
4038 (base32
4039 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4040 (build-system python-build-system)
4041 (propagated-inputs
4042 `(("python-numpy" ,python-numpy)
4043 ("python-matplotlib" ,python-matplotlib)
4044 ("python-pyparsing" ,python-pyparsing)))
4045 (inputs
4046 `(("lapack" ,lapack)
4047 ("openblas" ,openblas)))
4048 (native-inputs
4049 `(("python-cython" ,python-cython)
4050 ("python-pytest" ,python-pytest)
4051 ("python-sphinx" ,python-sphinx)
4052 ("python-numpydoc" ,python-numpydoc)
4053 ("gfortran" ,gfortran)
4054 ("perl" ,perl)
4055 ("which" ,which)))
4056 (outputs '("out" "doc"))
4057 (arguments
4058 `(#:phases
4059 (modify-phases %standard-phases
4060 (add-after 'unpack 'disable-broken-tests
4061 (lambda _
4062 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4063 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4064 (string-append indent
4065 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4066 m)))
4067 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4068 (("^def test_parallel_threads\\(\\):" m)
4069 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4070 m)))
4071 #t))
4072 (add-before 'build 'configure-openblas
4073 (lambda* (#:key inputs #:allow-other-keys)
4074 (call-with-output-file "site.cfg"
4075 (lambda (port)
4076 (format port
4077 "[blas]
4078 libraries = openblas
4079 library_dirs = ~a/lib
4080 include_dirs = ~a/include
4081
4082 # backslash-n to make emacs happy
4083 \n[atlas]
4084 library_dirs = ~a/lib
4085 atlas_libs = openblas
4086 "
4087 (assoc-ref inputs "openblas")
4088 (assoc-ref inputs "openblas")
4089 (assoc-ref inputs "openblas"))))
4090 #t))
4091 (add-after 'install 'install-doc
4092 (lambda* (#:key inputs outputs #:allow-other-keys)
4093 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4094 (doc (string-append data "/doc/" ,name "-" ,version))
4095 (html (string-append doc "/html"))
4096 (pyver ,(string-append "PYVER=" (version-major+minor
4097 (package-version python))))
4098 ;; By default it tries to run sphinx-build through the Python
4099 ;; interpreter which won't work with our shell wrapper.
4100 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4101 ;; Make installed package available for building the
4102 ;; documentation
4103 (add-installed-pythonpath inputs outputs)
4104 (with-directory-excursion "doc"
4105 ;; Fix generation of images for mathematical expressions.
4106 (substitute* (find-files "source" "conf\\.py")
4107 (("pngmath_use_preview = True")
4108 "pngmath_use_preview = False"))
4109 (mkdir-p html)
4110 (invoke "make" "html" pyver sphinxbuild)
4111 (with-directory-excursion "build/html"
4112 (for-each (lambda (file)
4113 (let* ((dir (dirname file))
4114 (tgt-dir (string-append html "/" dir)))
4115 (install-file file html)))
4116 (find-files "." ".*")))))
4117 #t))
4118 ;; Tests can only be run after the library has been installed and not
4119 ;; within the source directory.
4120 (delete 'check)
4121 (add-after 'install 'check
4122 (lambda* (#:key inputs outputs #:allow-other-keys)
4123 (add-installed-pythonpath inputs outputs)
4124 (with-directory-excursion "/tmp"
4125 (invoke "python" "-c"
4126 "import scipy; scipy.test(verbose=2)")))))))
4127 (home-page "https://www.scipy.org/")
4128 (synopsis "The Scipy library provides efficient numerical routines")
4129 (description "The SciPy library is one of the core packages that make up
4130 the SciPy stack. It provides many user-friendly and efficient numerical
4131 routines such as routines for numerical integration and optimization.")
4132 (properties `((python2-variant . ,(delay python2-scipy))))
4133 (license license:bsd-3)))
4134
4135 (define-public python2-scipy
4136 (package-with-python2
4137 (strip-python2-variant python-scipy)))
4138
4139 (define-public python-socksipy-branch
4140 (package
4141 (name "python-socksipy-branch")
4142 (version "1.01")
4143 (source
4144 (origin
4145 (method url-fetch)
4146 (uri (pypi-uri "SocksiPy-branch" version))
4147 (sha256
4148 (base32
4149 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4150 (build-system python-build-system)
4151 (arguments
4152 `(#:tests? #f)) ; There are no tests
4153 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4154 (synopsis "Python SOCKS module")
4155 (description
4156 "SocksiPy - A Python SOCKS client module. It provides a
4157 socket-like interface that supports connections to any TCP
4158 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4159 The original version was developed by Dan Haim, this is a
4160 branch created by Mario Vilas to address some open issues,
4161 as the original project seems to have been abandoned circa 2007.")
4162 (license license:bsd-3)))
4163
4164 (define-public python2-socksipy-branch
4165 (package-with-python2 python-socksipy-branch))
4166
4167 (define-public python-pycodestyle
4168 (package
4169 (name "python-pycodestyle")
4170 (version "2.4.0")
4171 (source
4172 (origin
4173 (method url-fetch)
4174 (uri (pypi-uri "pycodestyle" version))
4175 (sha256
4176 (base32
4177 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4178 (build-system python-build-system)
4179 (home-page "https://pycodestyle.readthedocs.io/")
4180 (synopsis "Python style guide checker")
4181 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4182 Python code against some of the style conventions in
4183 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4184 (license license:expat)))
4185
4186 (define-public python2-pycodestyle
4187 (package-with-python2 python-pycodestyle))
4188
4189 (define-public python-multidict
4190 (package
4191 (name "python-multidict")
4192 (version "4.2.0")
4193 (source
4194 (origin
4195 (method url-fetch)
4196 (uri (pypi-uri "multidict" version))
4197 (sha256
4198 (base32
4199 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4200 (build-system python-build-system)
4201 (native-inputs
4202 `(("python-pytest" ,python-pytest)
4203 ("python-pytest-runner" ,python-pytest-runner)))
4204 (home-page "https://github.com/aio-libs/multidict/")
4205 (synopsis "Multidict implementation")
4206 (description "Multidict is dict-like collection of key-value pairs
4207 where key might be occurred more than once in the container.")
4208 (license license:asl2.0)))
4209
4210 (define-public python-orderedmultidict
4211 (package
4212 (name "python-orderedmultidict")
4213 (version "0.7.11")
4214 (source
4215 (origin
4216 (method url-fetch)
4217 (uri (pypi-uri "orderedmultidict" version))
4218 (sha256
4219 (base32
4220 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4221 (build-system python-build-system)
4222 (arguments
4223 `(#:phases
4224 (modify-phases %standard-phases
4225 (add-after 'unpack 'fix-tests
4226 (lambda _
4227 ;; The package uses nosetest for running the tests.
4228 ;; Adding this initfile allows to run the test suite
4229 ;; without requiring nosetest.
4230 (with-output-to-file "tests/__init__.py" newline)
4231 #t)))))
4232 (propagated-inputs
4233 `(("python-six" ,python-six)))
4234 (native-inputs
4235 `(("python-pycodestyle" ,python-pycodestyle)))
4236 (home-page "https://github.com/gruns/orderedmultidict")
4237 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4238 (description "This package contains a library for ordered multivalue
4239 dictionaries. A multivalue dictionary is a dictionary that can store
4240 multiple values for the same key. An ordered multivalue dictionary is a
4241 multivalue dictionary that retains the order of insertions and deletions.")
4242 (license license:unlicense)))
4243
4244 (define-public python2-orderedmultidict
4245 (package-with-python2 python-orderedmultidict))
4246
4247 (define-public python-autopep8
4248 (package
4249 (name "python-autopep8")
4250 (version "1.3.5")
4251 (source
4252 (origin
4253 (method url-fetch)
4254 (uri (pypi-uri "autopep8" version))
4255 (sha256
4256 (base32
4257 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4258 (build-system python-build-system)
4259 (propagated-inputs
4260 `(("python-pycodestyle" ,python-pycodestyle)))
4261 (home-page "https://github.com/hhatto/autopep8")
4262 (synopsis "Format Python code according to the PEP 8 style guide")
4263 (description
4264 "@code{autopep8} automatically formats Python code to conform to
4265 the PEP 8 style guide. It uses the pycodestyle utility to determine
4266 what parts of the code needs to be formatted. @code{autopep8} is
4267 capable of fixing most of the formatting issues that can be reported
4268 by pycodestyle.")
4269 (license (license:non-copyleft
4270 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4271
4272 (define-public python2-autopep8
4273 (package-with-python2 python-autopep8))
4274
4275 (define-public python-distutils-extra
4276 (package
4277 (name "python-distutils-extra")
4278 (version "2.38")
4279 (source
4280 (origin
4281 (method url-fetch)
4282 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4283 version "/+download/python-distutils-extra-"
4284 version ".tar.gz"))
4285 (sha256
4286 (base32
4287 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4288 (build-system python-build-system)
4289 (home-page "https://launchpad.net/python-distutils-extra/")
4290 (synopsis "Enhancements to Python's distutils")
4291 (description
4292 "The python-distutils-extra module enables you to easily integrate
4293 gettext support, themed icons, and scrollkeeper-based documentation into
4294 Python's distutils.")
4295 (license license:gpl2)))
4296
4297 (define-public python2-distutils-extra
4298 (package-with-python2 python-distutils-extra))
4299
4300 (define-public python2-elib.intl
4301 (package
4302 (name "python2-elib.intl")
4303 (version "0.0.3")
4304 (source
4305 (origin
4306 ;; This project doesn't tag releases or publish tarballs, so we take
4307 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4308 (method git-fetch)
4309 (uri (git-reference
4310 (url "https://github.com/dieterv/elib.intl.git")
4311 (commit "d09997cfef")))
4312 (file-name (string-append name "-" version "-checkout"))
4313 (sha256
4314 (base32
4315 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4316 (build-system python-build-system)
4317 (arguments
4318 ;; incompatible with Python 3 (exception syntax)
4319 `(#:python ,python-2
4320 #:tests? #f))
4321 (home-page "https://github.com/dieterv/elib.intl")
4322 (synopsis "Enhanced internationalization for Python")
4323 (description
4324 "The elib.intl module provides enhanced internationalization (I18N)
4325 services for your Python modules and applications.")
4326 (license license:lgpl3+)))
4327
4328 (define-public python-olefile
4329 (package
4330 (name "python-olefile")
4331 (version "0.46")
4332 (source
4333 (origin
4334 (method url-fetch)
4335 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4336 "download/v" version "/olefile-" version ".tar.gz"))
4337 (file-name (string-append name "-" version ".tar.gz"))
4338 (sha256
4339 (base32
4340 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4341 (build-system python-build-system)
4342 (home-page "https://www.decalage.info/python/olefileio")
4343 (synopsis "Read and write Microsoft OLE2 files.")
4344 (description
4345 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4346 Storage or Compound Document, Microsoft Office). It is an improved version of
4347 the OleFileIO module from PIL, the Python Image Library.")
4348 (license license:bsd-3)))
4349
4350 (define-public python2-olefile
4351 (package-with-python2 python-olefile))
4352
4353 (define-public python-pillow
4354 (package
4355 (name "python-pillow")
4356 (version "5.4.1")
4357 (source
4358 (origin
4359 (method url-fetch)
4360 (uri (pypi-uri "Pillow" version))
4361 (sha256
4362 (base32
4363 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4364 (build-system python-build-system)
4365 (native-inputs
4366 `(("python-pytest" ,python-pytest)))
4367 (inputs
4368 `(("freetype" ,freetype)
4369 ("lcms" ,lcms)
4370 ("zlib" ,zlib)
4371 ("libjpeg" ,libjpeg)
4372 ("openjpeg" ,openjpeg)
4373 ("libtiff" ,libtiff)
4374 ("libwebp" ,libwebp)))
4375 (propagated-inputs
4376 `(("python-olefile" ,python-olefile)))
4377 (arguments
4378 `(#:phases
4379 (modify-phases %standard-phases
4380 (add-after 'unpack 'patch-ldconfig
4381 (lambda _
4382 (substitute* "setup.py"
4383 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4384 (delete 'check) ; We must run checks after python-pillow is installed.
4385 (add-after 'install 'check-installed
4386 (lambda* (#:key outputs inputs #:allow-other-keys)
4387 (begin
4388 (setenv "HOME" (getcwd))
4389 ;; Make installed package available for running the tests.
4390 (add-installed-pythonpath inputs outputs)
4391 (invoke "python" "selftest.py" "--installed")
4392 (invoke "python" "-m" "pytest" "-vv")))))))
4393 (home-page "https://python-pillow.org")
4394 (synopsis "Fork of the Python Imaging Library")
4395 (description
4396 "The Python Imaging Library adds image processing capabilities to your
4397 Python interpreter. This library provides extensive file format support, an
4398 efficient internal representation, and fairly powerful image processing
4399 capabilities. The core image library is designed for fast access to data
4400 stored in a few basic pixel formats. It should provide a solid foundation for
4401 a general image processing tool.")
4402 (license (license:x11-style
4403 "http://www.pythonware.com/products/pil/license.htm"
4404 "The PIL Software License"))))
4405
4406 (define-public python2-pillow
4407 (package-with-python2 python-pillow))
4408
4409 (define-public python-pycparser
4410 (package
4411 (name "python-pycparser")
4412 (version "2.19")
4413 (source
4414 (origin
4415 (method url-fetch)
4416 (uri (pypi-uri "pycparser" version))
4417 (sha256
4418 (base32
4419 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4420 (outputs '("out" "doc"))
4421 (build-system python-build-system)
4422 (native-inputs
4423 `(("pkg-config" ,pkg-config)))
4424 (arguments
4425 `(#:phases
4426 (modify-phases %standard-phases
4427 (replace 'check
4428 (lambda _
4429 (with-directory-excursion "tests"
4430 (invoke "python" "all_tests.py"))
4431 #t))
4432 (add-after 'install 'install-doc
4433 (lambda* (#:key outputs #:allow-other-keys)
4434 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4435 (doc (string-append data "/doc/" ,name "-" ,version))
4436 (examples (string-append doc "/examples")))
4437 (mkdir-p examples)
4438 (for-each (lambda (file)
4439 (copy-file (string-append "." file)
4440 (string-append doc file)))
4441 '("/README.rst" "/CHANGES" "/LICENSE"))
4442 (copy-recursively "examples" examples)
4443 #t))))))
4444 (home-page "https://github.com/eliben/pycparser")
4445 (synopsis "C parser in Python")
4446 (description
4447 "Pycparser is a complete parser of the C language, written in pure Python
4448 using the PLY parsing library. It parses C code into an AST and can serve as
4449 a front-end for C compilers or analysis tools.")
4450 (license license:bsd-3)))
4451
4452 (define-public python2-pycparser
4453 (package-with-python2 python-pycparser))
4454
4455 (define-public python-pywavelets
4456 (package
4457 (name "python-pywavelets")
4458 (version "1.0.1")
4459 (home-page "https://github.com/PyWavelets/pywt")
4460 (source (origin
4461 (method url-fetch)
4462 (uri (pypi-uri "PyWavelets" version))
4463 (sha256
4464 (base32
4465 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4466 (build-system python-build-system)
4467 (arguments
4468 '(#:modules ((ice-9 ftw)
4469 (srfi srfi-1)
4470 (srfi srfi-26)
4471 (guix build utils)
4472 (guix build python-build-system))
4473 #:phases (modify-phases %standard-phases
4474 (replace 'check
4475 (lambda _
4476 (let ((cwd (getcwd))
4477 (libdir (find (cut string-prefix? "lib." <>)
4478 (scandir "build"))))
4479 (with-directory-excursion (string-append cwd "/build/" libdir)
4480 (invoke "nosetests" "-v" "."))))))))
4481 (native-inputs
4482 `(("python-matplotlib" ,python-matplotlib) ;for tests
4483 ("python-nose" ,python-nose)))
4484 (propagated-inputs
4485 `(("python-numpy" ,python-numpy)))
4486 (synopsis "Wavelet transforms in Python")
4487 (description
4488 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4489 mathematical basis functions that are localized in both time and frequency.
4490 Wavelet transforms are time-frequency transforms employing wavelets. They are
4491 similar to Fourier transforms, the difference being that Fourier transforms are
4492 localized only in frequency instead of in time and frequency.")
4493 (license license:expat)))
4494
4495 (define-public python2-pywavelets
4496 (package-with-python2 python-pywavelets))
4497
4498 (define-public python-xcffib
4499 (package
4500 (name "python-xcffib")
4501 (version "0.6.0")
4502 (source
4503 (origin
4504 (method url-fetch)
4505 (uri (pypi-uri "xcffib" version))
4506 (sha256
4507 (base32
4508 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4509 (build-system python-build-system)
4510 (inputs
4511 `(("libxcb" ,libxcb)))
4512 (propagated-inputs
4513 `(("python-cffi" ,python-cffi) ; used at run time
4514 ("python-six" ,python-six)))
4515 (arguments
4516 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4517 #:tests? #f
4518 #:phases
4519 (modify-phases %standard-phases
4520 (add-after 'unpack 'fix-libxcb-path
4521 (lambda* (#:key inputs #:allow-other-keys)
4522 (let ((libxcb (assoc-ref inputs "libxcb")))
4523 (substitute* '("xcffib/__init__.py")
4524 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4525 #t)))
4526 (add-after 'install 'install-doc
4527 (lambda* (#:key outputs #:allow-other-keys)
4528 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4529 "/doc/" ,name "-" ,version)))
4530 (mkdir-p doc)
4531 (copy-file "README.md"
4532 (string-append doc "/README.md"))
4533 #t))))))
4534 (home-page "https://github.com/tych0/xcffib")
4535 (synopsis "XCB Python bindings")
4536 (description
4537 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4538 support for Python 3 and PyPy. It is based on cffi.")
4539 (license license:expat)))
4540
4541 (define-public python2-xcffib
4542 (package-with-python2 python-xcffib))
4543
4544 (define-public python-cairocffi
4545 (package
4546 (name "python-cairocffi")
4547 (version "0.9.0")
4548 (source
4549 (origin
4550 (method url-fetch)
4551 (uri (pypi-uri "cairocffi" version))
4552 (sha256
4553 (base32
4554 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4555 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4556 (build-system python-build-system)
4557 (outputs '("out" "doc"))
4558 (inputs
4559 `(("glib" ,glib)
4560 ("gtk+" ,gtk+)
4561 ("gdk-pixbuf" ,gdk-pixbuf)
4562 ("cairo" ,cairo)
4563 ("pango" ,pango)))
4564 (native-inputs
4565 `(("pkg-config" ,pkg-config)
4566 ("python-pytest" ,python-pytest)
4567 ("python-pytest-cov" ,python-pytest-cov)
4568 ("python-pytest-runner" ,python-pytest-runner)
4569 ("python-sphinx" ,python-sphinx)
4570 ("python-docutils" ,python-docutils)))
4571 (propagated-inputs
4572 `(("python-xcffib" ,python-xcffib))) ; used at run time
4573 (arguments
4574 `(#:phases
4575 (modify-phases %standard-phases
4576 (add-after 'unpack 'patch-paths
4577 (lambda* (#:key inputs outputs #:allow-other-keys)
4578 (substitute* (find-files "." "\\.py$")
4579 (("dlopen\\(ffi, 'cairo'")
4580 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4581 "/lib/libcairo.so.2'"))
4582 (("dlopen\\(ffi, 'gdk-3'")
4583 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4584 "/lib/libgtk-3.so.0'"))
4585 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4586 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4587 "/lib/libgdk_pixbuf-2.0.so.0'"))
4588 (("dlopen\\(ffi, 'glib-2.0'")
4589 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4590 "/lib/libglib-2.0.so.0'"))
4591 (("dlopen\\(ffi, 'gobject-2.0'")
4592 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4593 "/lib/libgobject-2.0.so.0'"))
4594 (("dlopen\\(ffi, 'pangocairo-1.0'")
4595 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4596 "/lib/libpangocairo-1.0.so.0'"))
4597 (("dlopen\\(ffi, 'pango-1.0'")
4598 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4599 "/lib/libpango-1.0.so.0'")))
4600 #t))
4601 (add-after 'install 'install-doc
4602 (lambda* (#:key inputs outputs #:allow-other-keys)
4603 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4604 (doc (string-append data "/doc/" ,name "-" ,version))
4605 (html (string-append doc "/html")))
4606 (setenv "LD_LIBRARY_PATH"
4607 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4608 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4609 (setenv "LANG" "en_US.UTF-8")
4610 (mkdir-p html)
4611 (for-each (lambda (file)
4612 (copy-file (string-append "." file)
4613 (string-append doc file)))
4614 '("/README.rst" "/CHANGES" "/LICENSE"))
4615 (system* "python" "setup.py" "build_sphinx")
4616 (copy-recursively "docs/_build/html" html)
4617 #t))))))
4618 (home-page "https://github.com/Kozea/cairocffi")
4619 (synopsis "Python bindings and object-oriented API for Cairo")
4620 (description
4621 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4622 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4623 graphics library with support for multiple backends including image buffers,
4624 PNG, PostScript, PDF, and SVG file output.")
4625 (license license:bsd-3)))
4626
4627 (define-public python2-cairocffi
4628 (package-with-python2 python-cairocffi))
4629
4630 (define-public python-decorator
4631 (package
4632 (name "python-decorator")
4633 (version "4.3.0")
4634 (source
4635 (origin
4636 (method url-fetch)
4637 (uri (pypi-uri "decorator" version))
4638 (sha256
4639 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4640 (build-system python-build-system)
4641 (home-page "https://pypi.python.org/pypi/decorator/")
4642 (synopsis "Python module to simplify usage of decorators")
4643 (description
4644 "The aim of the decorator module is to simplify the usage of decorators
4645 for the average programmer, and to popularize decorators usage giving examples
4646 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4647 etc. The core of this module is a decorator factory.")
4648 (license license:expat)))
4649
4650 (define-public python2-decorator
4651 (package-with-python2 python-decorator))
4652
4653 (define-public python-drmaa
4654 (package
4655 (name "python-drmaa")
4656 (version "0.7.7")
4657 (source
4658 (origin
4659 (method url-fetch)
4660 (uri (pypi-uri "drmaa" version))
4661 (sha256
4662 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4663 (build-system python-build-system)
4664 ;; The test suite requires libdrmaa which is provided by the cluster
4665 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4666 ;; should be set to the path of the libdrmaa library.
4667 (arguments '(#:tests? #f))
4668 (native-inputs
4669 `(("python-nose" ,python-nose)))
4670 (home-page "https://pypi.python.org/pypi/drmaa")
4671 (synopsis "Python bindings for the DRMAA library")
4672 (description
4673 "A Python package for Distributed Resource Management (DRM) job
4674 submission and control. This package is an implementation of the DRMAA 1.0
4675 Python language binding specification.")
4676 (license license:bsd-3)))
4677
4678 (define-public python2-drmaa
4679 (package-with-python2 python-drmaa))
4680
4681 (define-public python-grako
4682 (package
4683 (name "python-grako")
4684 (version "3.99.9")
4685 (source
4686 (origin
4687 (method url-fetch)
4688 (uri
4689 (pypi-uri "grako" version ".zip"))
4690 (sha256
4691 (base32
4692 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4693 (build-system python-build-system)
4694 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4695 (native-inputs
4696 `(("unzip" ,unzip)
4697 ("python-pytest" ,python-pytest)
4698 ("python-pytest-runner" ,python-pytest-runner)))
4699 (home-page "https://bitbucket.org/neogeny/grako")
4700 (synopsis "EBNF parser generator")
4701 (description
4702 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4703 memoizing PEG/Packrat parser in Python.")
4704 (license license:bsd-3)))
4705
4706 (define-public python2-grako
4707 (package-with-python2 python-grako))
4708
4709 (define-public python-gridmap
4710 (package
4711 (name "python-gridmap")
4712 (version "0.13.0")
4713 (source
4714 (origin
4715 (method git-fetch)
4716 (uri (git-reference
4717 (url "https://github.com/pygridtools/gridmap.git")
4718 (commit (string-append "v" version))))
4719 (file-name (git-file-name name version))
4720 (sha256
4721 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4722 (build-system python-build-system)
4723 (arguments
4724 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4725 (propagated-inputs
4726 `(("python-psutil" ,python-psutil)
4727 ("python-drmaa" ,python-drmaa)
4728 ("python-pyzmq" ,python-pyzmq)))
4729 (home-page "https://github.com/pygridtools/gridmap")
4730 (synopsis "Create jobs on a cluster directly from Python")
4731 (description
4732 "Gridmap is a Python package to allow you to easily create jobs on the
4733 cluster directly from Python. You can directly map Python functions onto the
4734 cluster without needing to write any wrapper code yourself.")
4735 (license license:gpl3+)))
4736
4737 (define-public python2-gridmap
4738 (package-with-python2 python-gridmap))
4739
4740 (define-public python-honcho
4741 (package
4742 (name "python-honcho")
4743 (version "1.0.1")
4744 (source
4745 (origin
4746 (method git-fetch)
4747 (uri (git-reference
4748 (url "https://github.com/nickstenning/honcho.git")
4749 (commit (string-append "v" version))))
4750 (file-name (git-file-name name version))
4751 (sha256
4752 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4753 (build-system python-build-system)
4754 (native-inputs
4755 `(("python-pytest" ,python-pytest)
4756 ("python-mock" ,python-mock)
4757 ("python-tox" ,python-tox)
4758 ("which" ,which))) ;for tests
4759 (propagated-inputs
4760 `(("python-jinja2" ,python-jinja2)))
4761 (arguments
4762 `(#:phases
4763 (modify-phases %standard-phases
4764 (delete 'check)
4765 (add-after 'install 'check
4766 (lambda* (#:key outputs inputs #:allow-other-keys)
4767 ;; fix honcho path in testsuite
4768 (substitute* "tests/conftest.py"
4769 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4770 "/bin/honcho" "'")))
4771 ;; It's easier to run tests after install.
4772 ;; Make installed package available for running the tests
4773 (add-installed-pythonpath inputs outputs)
4774 (invoke "py.test" "-v"))))))
4775 (home-page "https://github.com/nickstenning/honcho")
4776 (synopsis "Manage Procfile-based applications")
4777 (description
4778 "A Procfile is a file which describes how to run an application
4779 consisting of several processes. honcho starts all listed processes.
4780 The output of all running processes is collected by honcho and
4781 displayed.")
4782 (license license:expat)))
4783
4784 (define-public python2-honcho
4785 (package-with-python2 python-honcho))
4786
4787 (define-public python-pexpect
4788 (package
4789 (name "python-pexpect")
4790 (version "4.6.0")
4791 (source
4792 (origin
4793 (method url-fetch)
4794 (uri (pypi-uri "pexpect" version))
4795 (sha256
4796 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4797 (build-system python-build-system)
4798 (arguments
4799 `(#:phases
4800 (modify-phases %standard-phases
4801 (add-before 'check 'prepare-tests
4802 (lambda _
4803 (substitute* (find-files "tests")
4804 (("/bin/ls") (which "ls"))
4805 (("/bin/echo") (which "echo"))
4806 (("/bin/which") (which "which"))
4807 ;; Many tests try to use the /bin directory which
4808 ;; is not present in the build environment.
4809 ;; Use one that's non-empty and unlikely to change.
4810 (("/bin'") "/dev'"))
4811 ;; XXX: Socket connection test gets "Connection reset by peer".
4812 ;; Why does it not work? Delete for now.
4813 (delete-file "tests/test_socket.py")
4814 #t))
4815 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4816 (native-inputs
4817 `(("python-nose" ,python-nose)
4818 ("python-pytest" ,python-pytest)
4819 ("man-db" ,man-db)
4820 ("which" ,which)
4821 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4822 (propagated-inputs
4823 `(("python-ptyprocess" ,python-ptyprocess)))
4824 (home-page "http://pexpect.readthedocs.org/")
4825 (synopsis "Controlling interactive console applications")
4826 (description
4827 "Pexpect is a pure Python module for spawning child applications;
4828 controlling them; and responding to expected patterns in their output.
4829 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4830 child application and control it as if a human were typing commands.")
4831 (license license:isc)))
4832
4833 (define-public python2-pexpect
4834 (package-with-python2 python-pexpect))
4835
4836 (define-public python-setuptools-scm
4837 (package
4838 (name "python-setuptools-scm")
4839 (version "3.1.0")
4840 (source (origin
4841 (method url-fetch)
4842 (uri (pypi-uri "setuptools_scm" version))
4843 (sha256
4844 (base32
4845 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4846 (build-system python-build-system)
4847 (home-page "https://github.com/pypa/setuptools_scm/")
4848 (synopsis "Manage Python package versions in SCM metadata")
4849 (description
4850 "Setuptools_scm handles managing your Python package versions in
4851 @dfn{software configuration management} (SCM) metadata instead of declaring
4852 them as the version argument or in a SCM managed file.")
4853 (license license:expat)))
4854
4855 (define-public python2-setuptools-scm
4856 (package-with-python2 python-setuptools-scm))
4857
4858 (define-public python-pathlib2
4859 (package
4860 (name "python-pathlib2")
4861 (version "2.3.3")
4862 (source
4863 (origin
4864 (method url-fetch)
4865 (uri (pypi-uri "pathlib2" version))
4866 (sha256
4867 (base32
4868 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4869 (build-system python-build-system)
4870 (propagated-inputs
4871 `(("python-scandir" ,python-scandir)
4872 ("python-six" ,python-six)))
4873 (home-page "https://pypi.python.org/pypi/pathlib2/")
4874 (synopsis "Object-oriented file system paths")
4875 (description "The goal of pathlib2 is to provide a backport of the
4876 standard @code{pathlib} module which tracks the standard library module, so
4877 all the newest features of the standard @code{pathlib} can be used also on
4878 older Python versions.")
4879 (license license:expat)))
4880
4881 (define-public python-importlib-metadata
4882 (package
4883 (name "python-importlib-metadata")
4884 (version "0.18")
4885 (source
4886 (origin
4887 (method url-fetch)
4888 (uri (pypi-uri "importlib_metadata" version))
4889 (sha256
4890 (base32
4891 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4892 (build-system python-build-system)
4893 (propagated-inputs
4894 `(("python-configparser" ,python-configparser)
4895 ("python-contextlib2" ,python-contextlib2)
4896 ("python-docutils" ,python-docutils)
4897 ("python-pathlib2" ,python-pathlib2)
4898 ("python-rst.linker" ,python-rst.linker)
4899 ("python-zipp" ,python-zipp)))
4900 (native-inputs
4901 `(("python-setuptools-scm" ,python-setuptools-scm)
4902 ("python-sphinx" ,python-sphinx)))
4903 (home-page "https://importlib-metadata.readthedocs.io/")
4904 (synopsis "Read metadata from Python packages")
4905 (description
4906 "@code{importlib_metadata} is a library which provides an API for
4907 accessing an installed Python package's metadata, such as its entry points or
4908 its top-level name. This functionality intends to replace most uses of
4909 @code{pkg_resources} entry point API and metadata API. Along with
4910 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4911 need to use the older and less efficient @code{pkg_resources} package.")
4912 (license license:asl2.0)))
4913
4914 (define-public python-jaraco-packaging
4915 (package
4916 (name "python-jaraco-packaging")
4917 (version "6.1")
4918 (source
4919 (origin
4920 (method url-fetch)
4921 (uri (pypi-uri "jaraco.packaging" version))
4922 (sha256
4923 (base32
4924 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4925 (build-system python-build-system)
4926 (propagated-inputs
4927 `(("python-pytest" ,python-pytest)
4928 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4929 ("python-pytest-flake8" ,python-pytest-flake8)
4930 ("python-rst.linker" ,python-rst.linker)
4931 ("python-setuptools" ,python-setuptools)
4932 ("python-setuptools-scm" ,python-setuptools-scm)
4933 ("python-six" ,python-six)
4934 ("python-sphinx" ,python-sphinx)))
4935 (home-page "https://github.com/jaraco/jaraco.packaging")
4936 (synopsis "Tools to supplement packaging Python releases")
4937 (description
4938 "This package provides various tools to supplement packaging Python
4939 releases.")
4940 (license license:expat)))
4941
4942 (define-public python-pathpy
4943 (package
4944 (name "python-pathpy")
4945 (version "11.5.0")
4946 (source
4947 (origin
4948 (method url-fetch)
4949 (uri (pypi-uri "path.py" version))
4950 (sha256
4951 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4952 (outputs '("out" "doc"))
4953 (build-system python-build-system)
4954 (propagated-inputs
4955 `(("python-appdirs" ,python-appdirs)))
4956 (native-inputs
4957 `(("python-setuptools-scm" ,python-setuptools-scm)
4958 ("python-sphinx" ,python-sphinx)
4959 ("python-rst.linker" ,python-rst.linker)
4960 ("python-pytest" ,python-pytest)
4961 ("python-pytest-runner" ,python-pytest-runner)
4962 ("python-jaraco-packaging" ,python-jaraco-packaging)))
4963 (arguments
4964 `(#:phases
4965 (modify-phases %standard-phases
4966 (add-after 'build 'build-doc
4967 (lambda _
4968 (setenv "LANG" "en_US.UTF-8")
4969 (invoke "python" "setup.py" "build_sphinx")))
4970 (add-after 'install 'install-doc
4971 (lambda* (#:key outputs #:allow-other-keys)
4972 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4973 (doc (string-append data "/doc/" ,name "-" ,version))
4974 (html (string-append doc "/html")))
4975 (mkdir-p html)
4976 (for-each (lambda (file)
4977 (copy-file file (string-append doc "/" file)))
4978 '("README.rst" "CHANGES.rst"))
4979 (copy-recursively "build/sphinx/html" html)
4980 #t)))
4981 (replace 'check
4982 (lambda _
4983 ;; The import time test aborts if an import takes longer than
4984 ;; 100ms. It may very well take a little longer than that.
4985 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
4986 (home-page "https://github.com/jaraco/path.py")
4987 (synopsis "Python module wrapper for built-in os.path")
4988 (description
4989 "@code{path.py} implements path objects as first-class entities, allowing
4990 common operations on files to be invoked on those path objects directly.")
4991 (license license:expat)))
4992
4993 (define-public python2-pathpy
4994 (package-with-python2 python-pathpy))
4995
4996 (define-public python-simplegeneric
4997 (package
4998 (name "python-simplegeneric")
4999 (version "0.8.1")
5000 (source
5001 (origin
5002 (method url-fetch)
5003 (uri (pypi-uri "simplegeneric" version ".zip"))
5004 (sha256
5005 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5006 (build-system python-build-system)
5007 (native-inputs
5008 `(("unzip" ,unzip)))
5009 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5010 (synopsis "Python module for simple generic functions")
5011 (description
5012 "The simplegeneric module lets you define simple single-dispatch generic
5013 functions, akin to Python’s built-in generic functions like @code{len()},
5014 @code{iter()} and so on. However, instead of using specially-named methods,
5015 these generic functions use simple lookup tables, akin to those used by
5016 e.g. @code{pickle.dump()} and other generic functions found in the Python
5017 standard library.")
5018 (license license:zpl2.1)))
5019
5020 (define-public python2-simplegeneric
5021 (package-with-python2 python-simplegeneric))
5022
5023 (define-public python-ipython-genutils
5024 ;; TODO: This package is retired, check if can be removed, see description.
5025 (package
5026 (name "python-ipython-genutils")
5027 (version "0.1.0")
5028 (source
5029 (origin
5030 (method url-fetch)
5031 (uri (pypi-uri "ipython_genutils" version))
5032 (sha256
5033 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5034 (build-system python-build-system)
5035 (arguments `(#:tests? #f)) ; no tests
5036 (home-page "https://ipython.org")
5037 (synopsis "Vestigial utilities from IPython")
5038 (description
5039 "This package provides retired utilities from IPython. No packages
5040 outside IPython/Jupyter should depend on it.
5041
5042 This package shouldn't exist. It contains some common utilities shared by
5043 Jupyter and IPython projects during The Big Split. As soon as possible, those
5044 packages will remove their dependency on this, and this package will go
5045 away.")
5046 (license license:bsd-3)))
5047
5048 (define-public python2-ipython-genutils
5049 (package-with-python2 python-ipython-genutils))
5050
5051 (define-public python-traitlets
5052 (package
5053 (name "python-traitlets")
5054 (version "4.3.2")
5055 (source
5056 (origin
5057 (method url-fetch)
5058 (uri (pypi-uri "traitlets" version))
5059 (sha256
5060 (base32
5061 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5062 (build-system python-build-system)
5063 (arguments
5064 `(#:phases
5065 (modify-phases %standard-phases
5066 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5067 (propagated-inputs
5068 `(("python-ipython-genutils" ,python-ipython-genutils)
5069 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5070 (native-inputs
5071 `(("python-pytest" ,python-pytest)))
5072 (properties `((python2-variant . ,(delay python2-traitlets))))
5073 (home-page "https://ipython.org")
5074 (synopsis "Configuration system for Python applications")
5075 (description
5076 "Traitlets is a framework that lets Python classes have attributes with
5077 type checking, dynamically calculated default values, and ‘on change’
5078 callbacks. The package also includes a mechanism to use traitlets for
5079 configuration, loading values from files or from command line arguments. This
5080 is a distinct layer on top of traitlets, so you can use traitlets in your code
5081 without using the configuration machinery.")
5082 (license license:bsd-3)))
5083
5084 (define-public python2-traitlets
5085 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5086 (package
5087 (inherit traitlets)
5088 (propagated-inputs
5089 `(("python2-enum34" ,python2-enum34)
5090 ,@(package-propagated-inputs traitlets))))))
5091
5092 (define-public python-jupyter-core
5093 (package
5094 (name "python-jupyter-core")
5095 (version "4.4.0")
5096 (source
5097 (origin
5098 (method url-fetch)
5099 (uri (string-append (pypi-uri "jupyter_core" version)))
5100 (sha256
5101 (base32
5102 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5103 (build-system python-build-system)
5104 ;; FIXME: not sure how to run the tests
5105 (arguments `(#:tests? #f))
5106 (propagated-inputs
5107 `(("python-traitlets" ,python-traitlets)))
5108 (home-page "http://jupyter.org/")
5109 (synopsis "Jupyter base package")
5110 (description
5111 "Jupyter core is the base package on which Jupyter projects rely.")
5112 (license license:bsd-3)))
5113
5114 (define-public python2-jupyter-core
5115 (package-with-python2 python-jupyter-core))
5116
5117 (define-public python-jupyter-client
5118 (package
5119 (name "python-jupyter-client")
5120 (version "5.2.4")
5121 (source
5122 (origin
5123 (method url-fetch)
5124 (uri (pypi-uri "jupyter_client" version))
5125 (sha256
5126 (base32
5127 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5128 (build-system python-build-system)
5129 ;; Tests fail because of missing native python kernel which I assume is
5130 ;; provided by the ipython package, which we cannot use because it would
5131 ;; cause a dependency cycle.
5132 (arguments
5133 `(#:tests? #f
5134
5135 #:phases (modify-phases %standard-phases
5136 (add-after 'unpack 'set-tool-file-names
5137 (lambda* (#:key inputs #:allow-other-keys)
5138 (let ((iproute (assoc-ref inputs "iproute")))
5139 (substitute* "jupyter_client/localinterfaces.py"
5140 (("'ip'")
5141 (string-append "'" iproute "/sbin/ip'")))
5142 #t))))))
5143 (inputs
5144 `(("iproute" ,iproute)))
5145 (propagated-inputs
5146 `(("python-pyzmq" ,python-pyzmq)
5147 ("python-traitlets" ,python-traitlets)
5148 ("python-jupyter-core" ,python-jupyter-core)))
5149 (home-page "http://jupyter.org/")
5150 (synopsis "Jupyter protocol implementation and client libraries")
5151 (description
5152 "The @code{jupyter_client} package contains the reference implementation
5153 of the Jupyter protocol. It also provides client and kernel management APIs
5154 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5155 installing @code{kernelspec}s for use with Jupyter frontends.")
5156 (license license:bsd-3)))
5157
5158 (define-public python2-jupyter-client
5159 (package-with-python2 python-jupyter-client))
5160
5161 (define-public python-ipykernel
5162 (package
5163 (name "python-ipykernel")
5164 (version "5.1.1")
5165 (source
5166 (origin
5167 (method url-fetch)
5168 (uri (pypi-uri "ipykernel" version))
5169 (sha256
5170 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5171 (build-system python-build-system)
5172 (arguments
5173 `(#:phases
5174 (modify-phases %standard-phases
5175 (replace 'check
5176 (lambda _
5177 (setenv "HOME" "/tmp")
5178 (invoke "pytest" "-v")
5179 #t))
5180 (add-after 'install 'set-python-file-name
5181 (lambda* (#:key outputs #:allow-other-keys)
5182 ;; Record the absolute file name of the 'python' executable in
5183 ;; 'kernel.json'.
5184 (let ((out (assoc-ref outputs "out")))
5185 (substitute* (string-append out "/share/jupyter"
5186 "/kernels/python3/kernel.json")
5187 (("\"python\"")
5188 (string-append "\"" (which "python") "\"")))
5189 #t))))))
5190 (propagated-inputs
5191 `(("python-ipython" ,python-ipython)
5192 ;; imported at runtime during connect
5193 ("python-jupyter-client" ,python-jupyter-client)))
5194 (native-inputs
5195 `(("python-pytest" ,python-pytest)
5196 ("python-nose" ,python-nose)))
5197 (home-page "https://ipython.org")
5198 (synopsis "IPython Kernel for Jupyter")
5199 (description
5200 "This package provides the IPython kernel for Jupyter.")
5201 (license license:bsd-3)))
5202
5203 ;; Version 5.1.1 and above no longer support Python 2.
5204 (define-public python2-ipykernel
5205 (package
5206 (name "python2-ipykernel")
5207 (version "5.1.0")
5208 (source
5209 (origin
5210 (method url-fetch)
5211 (uri (pypi-uri "ipykernel" version))
5212 (sha256
5213 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5214 (build-system python-build-system)
5215 (arguments
5216 `(#:python ,python-2
5217 #:phases
5218 (modify-phases %standard-phases
5219 (replace 'check
5220 (lambda _
5221 (setenv "HOME" "/tmp")
5222 (invoke "pytest" "-v")
5223 #t)))))
5224 (propagated-inputs
5225 `(("python2-ipython" ,python2-ipython)
5226 ;; imported at runtime during connect
5227 ("python2-jupyter-client" ,python2-jupyter-client)))
5228 (native-inputs
5229 `(("python2-pytest" ,python2-pytest)
5230 ("python2-nose" ,python2-nose)))
5231 (home-page "https://ipython.org")
5232 (synopsis "IPython Kernel for Jupyter")
5233 (description
5234 "This package provides the IPython kernel for Jupyter.")
5235 (license license:bsd-3)))
5236
5237 (define-public python-pari-jupyter
5238 (package
5239 (name "python-pari-jupyter")
5240 (version "1.3.2")
5241 (source
5242 (origin
5243 (method url-fetch)
5244 (uri (pypi-uri "pari_jupyter" version))
5245 (sha256
5246 (base32
5247 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5248 (build-system python-build-system)
5249 (propagated-inputs
5250 `(("python-ipykernel" ,python-ipykernel)))
5251 (inputs
5252 `(("pari-gp" ,pari-gp)
5253 ("readline" ,readline)))
5254 (arguments
5255 `(#:tests? #f)) ; no test suite
5256 (home-page
5257 "https://github.com/jdemeyer/pari_jupyter")
5258 (synopsis "A Jupyter kernel for PARI/GP")
5259 (description "The package provides a PARI/GP kernel for Jupyter.")
5260 (license license:gpl3+)))
5261
5262 (define-public python-backcall
5263 (package
5264 (name "python-backcall")
5265 (version "0.1.0")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (pypi-uri "backcall" version))
5270 (sha256
5271 (base32
5272 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5273 (build-system python-build-system)
5274 (home-page "https://github.com/takluyver/backcall/")
5275 (synopsis "Specifications for callback functions passed in to an API")
5276 (description
5277 "If your code lets other people supply callback functions, it's important
5278 to specify the function signature you expect, and check that functions support
5279 that. Adding extra parameters later would break other peoples code unless
5280 you're careful. The @code{backcall} package provides a way of specifying the
5281 callback signature using a prototype function.")
5282 (license license:bsd-3)))
5283
5284 ;; This is the latest release of the LTS version of ipython with support for
5285 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5286 ;; dropped support for Python 2.7.
5287 (define-public python2-ipython
5288 (package
5289 (name "python2-ipython")
5290 (version "5.8.0")
5291 (source
5292 (origin
5293 (method url-fetch)
5294 (uri (pypi-uri "ipython" version ".tar.gz"))
5295 (sha256
5296 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5297 (build-system python-build-system)
5298 (propagated-inputs
5299 `(("python2-backports-shutil-get-terminal-size"
5300 ,python2-backports-shutil-get-terminal-size)
5301 ("python2-pathlib2" ,python2-pathlib2)
5302 ("python2-pyzmq" ,python2-pyzmq)
5303 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5304 ("python2-terminado" ,python2-terminado)
5305 ("python2-matplotlib" ,python2-matplotlib)
5306 ("python2-numpy" ,python2-numpy)
5307 ("python2-numpydoc" ,python2-numpydoc)
5308 ("python2-jinja2" ,python2-jinja2)
5309 ("python2-mistune" ,python2-mistune)
5310 ("python2-pexpect" ,python2-pexpect)
5311 ("python2-pickleshare" ,python2-pickleshare)
5312 ("python2-simplegeneric" ,python2-simplegeneric)
5313 ("python2-jsonschema" ,python2-jsonschema)
5314 ("python2-traitlets" ,python2-traitlets)
5315 ("python2-nbformat" ,python2-nbformat)
5316 ("python2-pygments" ,python2-pygments)))
5317 (inputs
5318 `(("readline" ,readline)
5319 ("which" ,which)))
5320 (native-inputs
5321 `(("graphviz" ,graphviz)
5322 ("pkg-config" ,pkg-config)
5323 ("python2-requests" ,python2-requests) ;; for tests
5324 ("python2-testpath" ,python2-testpath)
5325 ("python2-mock" ,python2-mock)
5326 ("python2-nose" ,python2-nose)))
5327 (arguments
5328 `(#:python ,python-2
5329 #:phases
5330 (modify-phases %standard-phases
5331 (add-before 'check 'delete-broken-tests
5332 (lambda* (#:key inputs #:allow-other-keys)
5333 ;; These tests throw errors for unknown reasons.
5334 (delete-file "IPython/core/tests/test_profile.py")
5335 (delete-file "IPython/core/tests/test_interactiveshell.py")
5336 (delete-file "IPython/core/tests/test_magic.py")
5337 #t)))))
5338 (home-page "https://ipython.org")
5339 (synopsis "IPython is a tool for interactive computing in Python")
5340 (description
5341 "IPython provides a rich architecture for interactive computing with:
5342 Powerful interactive shells, a browser-based notebook, support for interactive
5343 data visualization, embeddable interpreters and tools for parallel
5344 computing.")
5345 (license license:bsd-3)))
5346
5347 (define-public python-ipython
5348 (package
5349 (name "python-ipython")
5350 (version "7.5.0")
5351 (source
5352 (origin
5353 (method url-fetch)
5354 (uri (pypi-uri "ipython" version ".tar.gz"))
5355 (sha256
5356 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5357 (build-system python-build-system)
5358 (propagated-inputs
5359 `(("python-backcall" ,python-backcall)
5360 ("python-pyzmq" ,python-pyzmq)
5361 ("python-prompt-toolkit" ,python-prompt-toolkit)
5362 ("python-terminado" ,python-terminado)
5363 ("python-matplotlib" ,python-matplotlib)
5364 ("python-numpy" ,python-numpy)
5365 ("python-numpydoc" ,python-numpydoc)
5366 ("python-jedi" ,python-jedi)
5367 ("python-jinja2" ,python-jinja2)
5368 ("python-mistune" ,python-mistune)
5369 ("python-pexpect" ,python-pexpect)
5370 ("python-pickleshare" ,python-pickleshare)
5371 ("python-simplegeneric" ,python-simplegeneric)
5372 ("python-jsonschema" ,python-jsonschema)
5373 ("python-traitlets" ,python-traitlets)
5374 ("python-nbformat" ,python-nbformat)
5375 ("python-pygments" ,python-pygments)))
5376 (inputs
5377 `(("readline" ,readline)
5378 ("which" ,which)))
5379 (native-inputs
5380 `(("graphviz" ,graphviz)
5381 ("pkg-config" ,pkg-config)
5382 ("python-requests" ,python-requests) ;; for tests
5383 ("python-testpath" ,python-testpath)
5384 ("python-nose" ,python-nose)))
5385 (arguments
5386 `(#:phases
5387 (modify-phases %standard-phases
5388 ;; Tests can only be run after the library has been installed and not
5389 ;; within the source directory.
5390 (delete 'check)
5391 (add-after 'install 'check
5392 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5393 (if tests?
5394 (begin
5395 ;; Make installed package available for running the tests
5396 (add-installed-pythonpath inputs outputs)
5397 (setenv "HOME" "/tmp/") ;; required by a test
5398 ;; We only test the core because one of the other tests
5399 ;; tries to import ipykernel.
5400 (invoke "python" "IPython/testing/iptest.py"
5401 "-v" "IPython/core/tests"))
5402 #t)))
5403 (add-before 'check 'fix-tests
5404 (lambda* (#:key inputs #:allow-other-keys)
5405 (substitute* "./IPython/utils/_process_posix.py"
5406 (("/usr/bin/env', 'which") (which "which")))
5407 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5408 (("#!/usr/bin/env python")
5409 (string-append "#!" (which "python"))))
5410 ;; This test introduces a circular dependency on ipykernel
5411 ;; (which depends on ipython).
5412 (delete-file "IPython/core/tests/test_display.py")
5413 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5414 (delete-file "IPython/core/tests/test_interactiveshell.py")
5415 #t)))))
5416 (home-page "https://ipython.org")
5417 (synopsis "IPython is a tool for interactive computing in Python")
5418 (description
5419 "IPython provides a rich architecture for interactive computing with:
5420 Powerful interactive shells, a browser-based notebook, support for interactive
5421 data visualization, embeddable interpreters and tools for parallel
5422 computing.")
5423 (license license:bsd-3)))
5424
5425 (define-public python-ipython-documentation
5426 (package
5427 (inherit python-ipython)
5428 (name "python-ipython-documentation")
5429 (version (package-version python-ipython))
5430 (arguments
5431 `(#:phases
5432 (modify-phases %standard-phases
5433 (delete 'build)
5434 (delete 'check)
5435 (replace 'install
5436 (lambda* (#:key outputs #:allow-other-keys)
5437 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5438 (doc (string-append data "/doc/" ,name "-" ,version))
5439 (html (string-append doc "/html"))
5440 (man1 (string-append data "/man/man1"))
5441 (info (string-append data "/info"))
5442 (examples (string-append doc "/examples"))
5443 (python-arg (string-append "PYTHON=" (which "python"))))
5444 (setenv "LANG" "en_US.utf8")
5445 (with-directory-excursion "docs"
5446 ;; FIXME: pdf fails to build
5447 ;;(system* "make" "pdf" "PAPER=a4")
5448 (system* "make" python-arg "html")
5449 ;; FIXME: the generated texi file contains ^@^@, which trips
5450 ;; up the parser.
5451 ;; (system* "make" python-arg "info")
5452 )
5453 (copy-recursively "docs/man" man1)
5454 (copy-recursively "examples" examples)
5455 (copy-recursively "docs/build/html" html)
5456 ;; (copy-file "docs/build/latex/ipython.pdf"
5457 ;; (string-append doc "/ipython.pdf"))
5458 (mkdir-p info)
5459 ;; (copy-file "docs/build/texinfo/ipython.info"
5460 ;; (string-append info "/ipython.info"))
5461 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5462 #t)))))
5463 (inputs
5464 `(("python-ipython" ,python-ipython)
5465 ("python-ipykernel" ,python-ipykernel)))
5466 (native-inputs
5467 `(("python-sphinx" ,python-sphinx)
5468 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5469 ;; FIXME: It's possible that a smaller union would work just as well.
5470 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5471 texlive-fonts-ec
5472 texlive-generic-ifxetex
5473 texlive-generic-pdftex
5474 texlive-latex-amsfonts
5475 texlive-latex-capt-of
5476 texlive-latex-cmap
5477 texlive-latex-environ
5478 texlive-latex-eqparbox
5479 texlive-latex-etoolbox
5480 texlive-latex-expdlist
5481 texlive-latex-fancyhdr
5482 texlive-latex-fancyvrb
5483 texlive-latex-fncychap
5484 texlive-latex-float
5485 texlive-latex-framed
5486 texlive-latex-geometry
5487 texlive-latex-graphics
5488 texlive-latex-hyperref
5489 texlive-latex-mdwtools
5490 texlive-latex-multirow
5491 texlive-latex-needspace
5492 texlive-latex-oberdiek
5493 texlive-latex-parskip
5494 texlive-latex-preview
5495 texlive-latex-tabulary
5496 texlive-latex-threeparttable
5497 texlive-latex-titlesec
5498 texlive-latex-trimspaces
5499 texlive-latex-ucs
5500 texlive-latex-upquote
5501 texlive-latex-url
5502 texlive-latex-varwidth
5503 texlive-latex-wrapfig)))
5504 ("texinfo" ,texinfo)))))
5505
5506 (define-public python-urwid
5507 (package
5508 (name "python-urwid")
5509 (version "2.0.1")
5510 (source
5511 (origin
5512 (method url-fetch)
5513 (uri (pypi-uri "urwid" version))
5514 (sha256
5515 (base32
5516 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5517 (build-system python-build-system)
5518 (home-page "http://urwid.org")
5519 (synopsis "Console user interface library for Python")
5520 (description
5521 "Urwid is a curses-based UI/widget library for Python. It includes many
5522 features useful for text console applications.")
5523 (license license:lgpl2.1+)))
5524
5525 (define-public python2-urwid
5526 (package-with-python2 python-urwid))
5527
5528 (define-public python-urwidtrees
5529 (package
5530 (name "python-urwidtrees")
5531 (version "1.0.2")
5532 (source
5533 (origin
5534 (method url-fetch)
5535 ;; package author intends on distributing via github rather than pypi:
5536 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5537 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5538 version ".tar.gz"))
5539 (file-name (string-append name "-" version ".tar.gz"))
5540 (sha256
5541 (base32
5542 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5543 (build-system python-build-system)
5544 (arguments
5545 '(#:tests? #f)) ; no tests
5546 (propagated-inputs `(("python-urwid" ,python-urwid)))
5547 (home-page "https://github.com/pazz/urwidtrees")
5548 (synopsis "Tree widgets for urwid")
5549 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5550 toolkit. Use it to build trees of widgets.")
5551 (license license:gpl3+)))
5552
5553 (define-public python2-urwidtrees
5554 (package-with-python2 python-urwidtrees))
5555
5556 (define-public python-ua-parser
5557 (package
5558 (name "python-ua-parser")
5559 (version "0.8.0")
5560 (source
5561 (origin
5562 (method url-fetch)
5563 (uri (pypi-uri "ua-parser" version))
5564 (sha256
5565 (base32
5566 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5567 (build-system python-build-system)
5568 (arguments
5569 `(#:tests? #f)) ;no test suite in release
5570 (native-inputs
5571 `(("python-pyyaml" ,python-pyyaml)))
5572 (home-page "https://github.com/ua-parser/uap-python")
5573 (synopsis "User agent parser")
5574 (description
5575 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5576 (license license:asl2.0)))
5577
5578 (define-public python2-ua-parser
5579 (package-with-python2 python-ua-parser))
5580
5581 (define-public python-user-agents
5582 (package
5583 (name "python-user-agents")
5584 (version "1.1.0")
5585 (source
5586 (origin
5587 (method url-fetch)
5588 (uri (pypi-uri "user-agents" version))
5589 (sha256
5590 (base32
5591 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5592 (build-system python-build-system)
5593 (arguments
5594 `(#:tests? #f)) ;missing devices.json test file in release
5595 (propagated-inputs
5596 `(("python-ua-parser" ,python-ua-parser)))
5597 (home-page "https://github.com/selwin/python-user-agents")
5598 (synopsis "User Agent strings parsing library")
5599 (description
5600 "A library to identify devices (phones, tablets) and their capabilities by
5601 parsing (browser/HTTP) user agent strings.")
5602 (license license:expat)))
5603
5604 (define-public python2-user-agents
5605 (package-with-python2 python-user-agents))
5606
5607 (define-public python-dbus
5608 (package
5609 (name "python-dbus")
5610 (version "1.2.8")
5611 (source
5612 (origin
5613 (method url-fetch)
5614 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5615 "dbus-python-" version ".tar.gz"))
5616 (sha256
5617 (base32
5618 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5619 (build-system gnu-build-system)
5620 (arguments
5621 '(#:phases
5622 (modify-phases %standard-phases
5623 (add-before
5624 'check 'pre-check
5625 (lambda _
5626 ;; XXX: For the missing '/etc/machine-id'.
5627 (substitute* "test/run-test.sh"
5628 (("DBUS_FATAL_WARNINGS=1")
5629 "DBUS_FATAL_WARNINGS=0"))
5630 #t)))))
5631 (native-inputs
5632 `(("pkg-config" ,pkg-config)))
5633 (inputs
5634 `(("python" ,python-wrapper)
5635 ("dbus-glib" ,dbus-glib)))
5636 (synopsis "Python bindings for D-bus")
5637 (description "python-dbus provides bindings for libdbus, the reference
5638 implementation of D-Bus.")
5639 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5640 (license license:expat)))
5641
5642 (define-public python2-dbus
5643 (package (inherit python-dbus)
5644 (name "python2-dbus")
5645 (inputs `(("python" ,python-2)
5646 ,@(alist-delete "python"
5647 (package-inputs python-dbus)
5648 equal?)))
5649 ;; FIXME: on Python 2, the test_utf8 fails with:
5650 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5651 (arguments `(#:tests? #f))))
5652
5653 (define-public python-notify2
5654 (package
5655 (name "python-notify2")
5656 (version "0.3.1")
5657 (source
5658 (origin
5659 (method url-fetch)
5660 (uri (pypi-uri "notify2" version))
5661 (sha256
5662 (base32
5663 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5664 (build-system python-build-system)
5665 (arguments `(#:tests? #f)) ; tests depend on system state
5666 (native-inputs
5667 `(("python-dbus" ,python-dbus)))
5668 (home-page "https://bitbucket.org/takluyver/pynotify2")
5669 (synopsis "Python interface to D-Bus notifications")
5670 (description
5671 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5672 It is a reimplementation of pynotify in pure Python, and an alternative to
5673 the GObject Introspection bindings to libnotify for non-GTK applications.")
5674 (license (list license:bsd-2
5675 license:lgpl2.1+))))
5676
5677 (define-public python2-notify2
5678 (package-with-python2 python-notify2))
5679
5680 (define-public python-lxml
5681 (package
5682 (name "python-lxml")
5683 (version "4.2.5")
5684 (source
5685 (origin
5686 (method url-fetch)
5687 (uri (pypi-uri "lxml" version))
5688 (sha256
5689 (base32
5690 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5691 (build-system python-build-system)
5692 (inputs
5693 `(("libxml2" ,libxml2)
5694 ("libxslt" ,libxslt)))
5695 (home-page "http://lxml.de/")
5696 (synopsis
5697 "Python XML processing library")
5698 (description
5699 "The lxml XML toolkit is a Pythonic binding for the C libraries
5700 libxml2 and libxslt.")
5701 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5702
5703 (define-public python2-lxml
5704 (package-with-python2 python-lxml))
5705
5706 ;; beautifulsoup4 has a totally different namespace than 3.x,
5707 ;; and pypi seems to put it under its own name, so I guess we should too
5708 (define-public python-beautifulsoup4
5709 (package
5710 (name "python-beautifulsoup4")
5711 (version "4.7.1")
5712 (source
5713 (origin
5714 (method url-fetch)
5715 (uri (pypi-uri "beautifulsoup4" version))
5716 (sha256
5717 (base32
5718 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5719 (build-system python-build-system)
5720 (arguments
5721 `(#:phases
5722 (modify-phases %standard-phases
5723 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5724 ;; must use this conversion script when building with Python 3. The
5725 ;; conversion script also runs the tests.
5726 ;; For more information, see the file 'convert-py3k' in the source
5727 ;; distribution.
5728 (replace 'check
5729 (lambda _ (invoke "./convert-py3k"))))))
5730 (propagated-inputs
5731 `(("python-soupsieve" ,python-soupsieve)))
5732 (home-page
5733 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5734 (synopsis
5735 "Python screen-scraping library")
5736 (description
5737 "Beautiful Soup is a Python library designed for rapidly setting up
5738 screen-scraping projects. It offers Pythonic idioms for navigating,
5739 searching, and modifying a parse tree, providing a toolkit for
5740 dissecting a document and extracting what you need. It automatically
5741 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5742 (license license:expat)
5743 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5744
5745 (define-public python2-beautifulsoup4
5746 (package
5747 (inherit (package-with-python2
5748 (strip-python2-variant python-beautifulsoup4)))
5749 (arguments `(#:python ,python-2))))
5750
5751 (define-public python-soupsieve
5752 (package
5753 (name "python-soupsieve")
5754 (version "1.9.2")
5755 (source
5756 (origin
5757 (method url-fetch)
5758 (uri (pypi-uri "soupsieve" version))
5759 (sha256
5760 (base32
5761 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5762 (build-system python-build-system)
5763 (arguments `(#:tests? #f))
5764 ;;XXX: 2 tests fail currently despite claming they were to be
5765 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5766 ;;don't want to create a circular dependency.
5767 (home-page "https://github.com/facelessuser/soupsieve")
5768 (synopsis "CSS selector library")
5769 (description
5770 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5771 Soup 4. It aims to provide selecting, matching, and filtering using modern
5772 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5773 specifications up through the latest CSS level 4 drafts and beyond (though
5774 some are not yet implemented).")
5775 (properties `((python2-variant . ,(delay python2-soupsieve))))
5776 (license license:expat)))
5777
5778 (define-public python2-soupsieve
5779 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5780 (package
5781 (inherit base)
5782 (propagated-inputs
5783 `(("python2-backports-functools-lru-cache"
5784 ,python2-backports-functools-lru-cache)
5785 ,@(package-propagated-inputs base))))))
5786
5787 (define-public python-netifaces
5788 (package
5789 (name "python-netifaces")
5790 (version "0.10.7")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (pypi-uri "netifaces" version))
5795 (sha256
5796 (base32
5797 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5798 (build-system python-build-system)
5799 (home-page "https://github.com/al45tair/netifaces")
5800 (synopsis
5801 "Python module for portable network interface information")
5802 (description
5803 "Netifaces is a Python module providing information on network
5804 interfaces in an easy and portable manner.")
5805 (license license:expat)))
5806
5807 (define-public python2-netifaces
5808 (package-with-python2 python-netifaces))
5809
5810 (define-public python-networkx
5811 (package
5812 (name "python-networkx")
5813 (version "2.2")
5814 (source
5815 (origin
5816 (method url-fetch)
5817 (uri (pypi-uri "networkx" version ".zip"))
5818 (sha256
5819 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5820 (build-system python-build-system)
5821 ;; python-decorator is needed at runtime.
5822 (propagated-inputs
5823 `(("python-decorator" ,python-decorator)))
5824 (native-inputs
5825 `(("python-nose" ,python-nose)
5826 ("unzip" ,unzip)))
5827 (home-page "https://networkx.github.io/")
5828 (synopsis "Python module for creating and manipulating graphs and networks")
5829 (description
5830 "NetworkX is a Python package for the creation, manipulation, and study
5831 of the structure, dynamics, and functions of complex networks.")
5832 (license license:bsd-3)))
5833
5834 (define-public python2-networkx
5835 (package-with-python2 python-networkx))
5836
5837 (define-public python-datrie
5838 (package
5839 (name "python-datrie")
5840 (version "0.7.1")
5841 (source
5842 (origin
5843 (method url-fetch)
5844 (uri (pypi-uri "datrie" version))
5845 (sha256
5846 (base32
5847 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5848 (build-system python-build-system)
5849 (arguments
5850 `(#:phases (modify-phases %standard-phases
5851 (add-before 'build 'cythonize
5852 (lambda _
5853 ;; Regenerate Cython classes to solve ABI issues with Python
5854 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5855 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5856 "src/stdio_ext.pxd" "-a"))))))
5857 (native-inputs
5858 `(("python-cython" ,python-cython)
5859 ("python-hypothesis" ,python-hypothesis)
5860 ("python-pytest" ,python-pytest)
5861 ("python-pytest-runner" ,python-pytest-runner)))
5862 (home-page "https://github.com/kmike/datrie")
5863 (synopsis "Fast, efficiently stored trie for Python")
5864 (description
5865 "This package provides a fast, efficiently stored trie implementation for
5866 Python.")
5867 (license license:lgpl2.1+)))
5868
5869 (define-public snakemake
5870 (package
5871 (name "snakemake")
5872 (version "5.2.4")
5873 (source
5874 (origin
5875 (method url-fetch)
5876 (uri (pypi-uri "snakemake" version))
5877 (sha256
5878 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5879 (build-system python-build-system)
5880 (arguments
5881 ;; TODO: Package missing test dependencies.
5882 '(#:tests? #f
5883 #:phases
5884 (modify-phases %standard-phases
5885 ;; For cluster execution Snakemake will call Python. Since there is
5886 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5887 ;; this by calling the snakemake wrapper instead.
5888 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5889 (lambda* (#:key outputs #:allow-other-keys)
5890 (substitute* "snakemake/executors.py"
5891 (("\\{sys.executable\\} -m snakemake")
5892 (string-append (assoc-ref outputs "out")
5893 "/bin/snakemake")))
5894 #t)))))
5895 (propagated-inputs
5896 `(("python-gitpython" ,python-gitpython)
5897 ("python-wrapt" ,python-wrapt)
5898 ("python-requests" ,python-requests)
5899 ("python-appdirs" ,python-appdirs)
5900 ("python-configargparse" ,python-configargparse)
5901 ("python-datrie" ,python-datrie)
5902 ("python-docutils" ,python-docutils)
5903 ("python-jinja2" ,python-jinja2)
5904 ("python-jsonschema" ,python-jsonschema)
5905 ("python-networkx" ,python-networkx)
5906 ("python-pyyaml" ,python-pyyaml)
5907 ("python-ratelimiter" ,python-ratelimiter)))
5908 (home-page "https://snakemake.readthedocs.io")
5909 (synopsis "Python-based execution environment for make-like workflows")
5910 (description
5911 "Snakemake aims to reduce the complexity of creating workflows by
5912 providing a clean and modern domain specific specification language (DSL) in
5913 Python style, together with a fast and comfortable execution environment.")
5914 (license license:expat)))
5915
5916 ;; This is currently needed for the pigx-* packages.
5917 (define-public snakemake-4
5918 (package (inherit snakemake)
5919 (version "4.4.0")
5920 (source
5921 (origin
5922 (method url-fetch)
5923 (uri (pypi-uri "snakemake" version))
5924 (sha256
5925 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5926 (propagated-inputs
5927 `(("python-wrapt" ,python-wrapt)
5928 ("python-requests" ,python-requests)
5929 ("python-appdirs" ,python-appdirs)
5930 ("python-configargparse" ,python-configargparse)
5931 ("python-pyyaml" ,python-pyyaml)
5932 ("python-ratelimiter" ,python-ratelimiter)))))
5933
5934 (define-public python-pyqrcode
5935 (package
5936 (name "python-pyqrcode")
5937 (version "1.2.1")
5938 (source
5939 (origin
5940 (method url-fetch)
5941 (uri (pypi-uri "PyQRCode" version))
5942 (sha256
5943 (base32
5944 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5945 (build-system python-build-system)
5946 (home-page
5947 "https://github.com/mnooner256/pyqrcode")
5948 (synopsis "QR code generator")
5949 (description
5950 "Pyqrcode is a QR code generator written purely in Python with
5951 SVG, EPS, PNG and terminal output.")
5952 (license license:bsd-3)))
5953
5954 (define-public python-seaborn
5955 (package
5956 (name "python-seaborn")
5957 (version "0.9.0")
5958 (source
5959 (origin
5960 (method url-fetch)
5961 (uri (pypi-uri "seaborn" version))
5962 (sha256
5963 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5964 (build-system python-build-system)
5965 (arguments
5966 `(#:phases
5967 (modify-phases %standard-phases
5968 (add-before 'check 'start-xserver
5969 (lambda* (#:key inputs #:allow-other-keys)
5970 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5971 ;; There must be a running X server and make check doesn't
5972 ;; start one. Therefore we must do it.
5973 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5974 (setenv "DISPLAY" ":1")
5975 #t)))
5976 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5977 (propagated-inputs
5978 `(("python-pandas" ,python-pandas)
5979 ("python-matplotlib" ,python-matplotlib)
5980 ("python-numpy" ,python-numpy)
5981 ("python-scipy" ,python-scipy)))
5982 (native-inputs
5983 `(("python-pytest" ,python-pytest)
5984 ("xorg-server" ,xorg-server)))
5985 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5986 (synopsis "Statistical data visualization")
5987 (description
5988 "Seaborn is a library for making attractive and informative statistical
5989 graphics in Python. It is built on top of matplotlib and tightly integrated
5990 with the PyData stack, including support for numpy and pandas data structures
5991 and statistical routines from scipy and statsmodels.")
5992 (license license:bsd-3)))
5993
5994 (define-public python2-seaborn
5995 (package-with-python2 python-seaborn))
5996
5997 (define-public python-mpmath
5998 (package
5999 (name "python-mpmath")
6000 (version "0.19")
6001 (source (origin
6002 (method url-fetch)
6003 (uri (string-append "http://mpmath.org/files/mpmath-"
6004 version ".tar.gz"))
6005 (sha256
6006 (base32
6007 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6008 (build-system python-build-system)
6009 (arguments
6010 '(#:phases
6011 (modify-phases %standard-phases
6012 (replace 'check
6013 (lambda _
6014 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6015 (home-page "http://mpmath.org")
6016 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6017 (description
6018 "@code{mpmath} can be used as an arbitrary-precision substitute for
6019 Python's float/complex types and math/cmath modules, but also does much
6020 more advanced mathematics.")
6021 (license license:bsd-3)))
6022
6023 (define-public python2-mpmath
6024 (package-with-python2 python-mpmath))
6025
6026 (define-public python-bigfloat
6027 (package
6028 (name "python-bigfloat")
6029 (version "0.3.0")
6030 (source
6031 (origin
6032 (method url-fetch)
6033 (uri (pypi-uri "bigfloat" version))
6034 (sha256
6035 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6036 (build-system python-build-system)
6037 (inputs
6038 `(("mpfr" ,mpfr)))
6039 (home-page "https://github.com/mdickinson/bigfloat")
6040 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6041 (description
6042 "This package provides a Python interface to the MPFR library for
6043 multiprecision arithmetic.")
6044 (license license:lgpl3+)))
6045
6046 (define-public python2-bigfloat
6047 (package-with-python2 python-bigfloat))
6048
6049 (define-public python-sympy
6050 (package
6051 (name "python-sympy")
6052 (version "1.1.1")
6053 (source
6054 (origin
6055 (method url-fetch)
6056 (uri (string-append
6057 "https://github.com/sympy/sympy/releases/download/sympy-"
6058 version "/sympy-" version ".tar.gz"))
6059 (sha256
6060 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6061 (build-system python-build-system)
6062 (arguments
6063 `(#:phases
6064 (modify-phases %standard-phases
6065 ;; Run the core tests after installation. By default it would run
6066 ;; *all* tests, which take a very long time to complete and are known
6067 ;; to be flaky.
6068 (delete 'check)
6069 (add-after 'install 'check
6070 (lambda* (#:key outputs #:allow-other-keys)
6071 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6072 #t)))))
6073 (propagated-inputs
6074 `(("python-mpmath" ,python-mpmath)))
6075 (home-page "http://www.sympy.org/")
6076 (synopsis "Python library for symbolic mathematics")
6077 (description
6078 "SymPy is a Python library for symbolic mathematics. It aims to become a
6079 full-featured computer algebra system (CAS) while keeping the code as simple
6080 as possible in order to be comprehensible and easily extensible.")
6081 (license license:bsd-3)))
6082
6083 (define-public python2-sympy
6084 (package
6085 (inherit (package-with-python2 python-sympy))
6086 (arguments
6087 `(#:phases
6088 (modify-phases %standard-phases
6089 ;; Run the core tests after installation. By default it would run
6090 ;; *all* tests, which take a very long time to complete and are known
6091 ;; to be flaky.
6092 (delete 'check)
6093 (add-after 'install 'check
6094 (lambda* (#:key outputs #:allow-other-keys)
6095 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6096 #t)))))))
6097
6098 (define-public python-q
6099 (package
6100 (name "python-q")
6101 (version "2.6")
6102 (source
6103 (origin
6104 (method url-fetch)
6105 (uri (pypi-uri "q" version))
6106 (sha256
6107 (base32
6108 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6109 (build-system python-build-system)
6110 (home-page "https://github.com/zestyping/q")
6111 (synopsis "Quick-and-dirty debugging output for tired programmers")
6112 (description
6113 "q is a Python module for \"print\" style of debugging Python code. It
6114 provides convenient short API for print out of values, tracebacks, and
6115 falling into the Python interpreter.")
6116 (license license:asl2.0)))
6117
6118 (define-public python2-q
6119 (package-with-python2 python-q))
6120
6121 (define-public python2-xlib
6122 (package
6123 (name "python2-xlib")
6124 (version "0.14")
6125 (source (origin
6126 (method url-fetch)
6127 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6128 "/" version "/"
6129 "python-xlib-" version ".tar.gz"))
6130 (sha256
6131 (base32
6132 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6133 (build-system python-build-system)
6134 (arguments
6135 `(#:python ,python-2 ;Python 2 only
6136 #:tests? #f)) ;no tests
6137 (home-page "http://python-xlib.sourceforge.net/")
6138 (synopsis "Python X11 client library")
6139 (description
6140 "The Python X Library is intended to be a fully functional X client
6141 library for Python programs. It is useful to implement low-level X clients.
6142 It is written entirely in Python.")
6143 (license license:gpl2+)))
6144
6145 (define-public python-singledispatch
6146 (package
6147 (name "python-singledispatch")
6148 (version "3.4.0.3")
6149 (source
6150 (origin
6151 (method url-fetch)
6152 (uri (pypi-uri "singledispatch" version))
6153 (sha256
6154 (base32
6155 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6156 (build-system python-build-system)
6157 (native-inputs
6158 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6159 (home-page
6160 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6161 (synopsis "Backport of singledispatch feature from Python 3.4")
6162 (description
6163 "This library brings functools.singledispatch from Python 3.4 to Python
6164 2.6-3.3.")
6165 (license license:expat)))
6166
6167 (define-public python2-singledispatch
6168 (package-with-python2 python-singledispatch))
6169
6170 ;; the python- version can be removed with python-3.5
6171 (define-public python-backports-abc
6172 (package
6173 (name "python-backports-abc")
6174 (version "0.5")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "backports_abc" version))
6179 (sha256
6180 (base32
6181 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6182 (build-system python-build-system)
6183 (home-page "https://github.com/cython/backports_abc")
6184 (synopsis "Backport of additions to the 'collections.abc' module")
6185 (description
6186 "Python-backports-abc provides a backport of additions to the
6187 @code{collections.abc} module in Python-3.5.")
6188 (license license:psfl)))
6189
6190 (define-public python2-backports-abc
6191 (package-with-python2 python-backports-abc))
6192
6193 (define-public python-backports-csv
6194 (package
6195 (name "python-backports-csv")
6196 (version "1.0.5")
6197 (source
6198 (origin
6199 (method url-fetch)
6200 (uri (pypi-uri "backports.csv" version))
6201 (sha256
6202 (base32
6203 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6204 (build-system python-build-system)
6205 (home-page "https://github.com/ryanhiebert/backports.csv")
6206 (synopsis "Backport of Python 3's csv module for Python 2")
6207 (description
6208 "Provides a backport of Python 3's @code{csv} module for parsing
6209 comma separated values. The API of the @code{csv} module in Python 2
6210 is drastically different from the @code{csv} module in Python 3.
6211 This is due, for the most part, to the difference between str in
6212 Python 2 and Python 3.")
6213 (license license:psfl)))
6214
6215 (define-public python2-backports-csv
6216 (package-with-python2 python-backports-csv))
6217
6218 (define-public python2-backports-shutil-get-terminal-size
6219 (package
6220 (name "python2-backports-shutil-get-terminal-size")
6221 (version "1.0.0")
6222 (source
6223 (origin
6224 (method url-fetch)
6225 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6226 (sha256
6227 (base32
6228 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6229 (build-system python-build-system)
6230 (arguments
6231 `(#:python ,python-2
6232 #:phases
6233 (modify-phases %standard-phases
6234 (replace 'check
6235 (lambda _
6236 (invoke "py.test" "-v"))))))
6237 (native-inputs
6238 `(("python2-pytest" ,python2-pytest)))
6239 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6240 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6241 (description
6242 "This package provides a backport of the @code{get_terminal_size
6243 function} from Python 3.3's @code{shutil}.
6244 Unlike the original version it is written in pure Python rather than C,
6245 so it might be a tiny bit slower.")
6246 (license license:expat)))
6247
6248 (define-public python-waf
6249 (package
6250 (name "python-waf")
6251 (version "2.0.11")
6252 (source (origin
6253 (method url-fetch)
6254 (uri (string-append "https://waf.io/"
6255 "waf-" version ".tar.bz2"))
6256 (sha256
6257 (base32
6258 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6259 (build-system python-build-system)
6260 (arguments
6261 '(#:phases
6262 (modify-phases %standard-phases
6263 (replace 'build
6264 (lambda _
6265 (invoke "python" "waf-light" "configure" "build")))
6266 (replace 'check
6267 (lambda _
6268 (invoke "python" "waf" "--version")))
6269 (replace 'install
6270 (lambda* (#:key outputs #:allow-other-keys)
6271 (let ((out (assoc-ref outputs "out")))
6272 (install-file "waf" (string-append out "/bin")))
6273 #t))
6274 ;; waf breaks when it is wrapped.
6275 (delete 'wrap))))
6276 (home-page "https://waf.io/")
6277 (synopsis "Python-based build system")
6278 (description
6279 "Waf is a Python-based framework for configuring, compiling and installing
6280 applications.")
6281 (license license:bsd-3)))
6282
6283 (define-public python2-waf
6284 (package-with-python2 python-waf))
6285
6286 (define-public python-pyzmq
6287 (package
6288 (name "python-pyzmq")
6289 (version "17.1.2")
6290 (source
6291 (origin
6292 (method url-fetch)
6293 (uri (pypi-uri "pyzmq" version))
6294 (sha256
6295 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6296 (build-system python-build-system)
6297 (arguments
6298 `(#:configure-flags
6299 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6300 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6301 ;; --inplace' for 'python setup.py test' to work.
6302 #:tests? #f))
6303 (inputs
6304 `(("zeromq" ,zeromq)))
6305 (native-inputs
6306 `(("pkg-config" ,pkg-config)
6307 ("python-nose" ,python-nose)))
6308 (home-page "https://github.com/zeromq/pyzmq")
6309 (synopsis "Python bindings for 0MQ")
6310 (description
6311 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6312 (license license:bsd-4)))
6313
6314 (define-public python2-pyzmq
6315 (package-with-python2 python-pyzmq))
6316
6317 (define-public python-pep8
6318 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6319 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6320 ;; some dependents' test suites, and nothing more.
6321 (package
6322 (name "python-pep8")
6323 (version "1.7.0")
6324 (source
6325 (origin
6326 (method url-fetch)
6327 (uri (pypi-uri "pep8" version))
6328 (sha256
6329 (base32
6330 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6331 (build-system python-build-system)
6332 (home-page "https://pep8.readthedocs.org/")
6333 (synopsis "Python style guide checker")
6334 (description
6335 "This tools checks Python code against some of the style conventions in
6336 PEP 8.")
6337 (license license:expat)))
6338
6339 (define-public python2-pep8
6340 (package-with-python2 python-pep8))
6341
6342 (define-public python-pyflakes
6343 (package
6344 (name "python-pyflakes")
6345 (version "2.0.0")
6346 (source
6347 (origin
6348 (method url-fetch)
6349 (uri (pypi-uri "pyflakes" version))
6350 (sha256
6351 (base32
6352 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6353 (build-system python-build-system)
6354 (home-page
6355 "https://github.com/pyflakes/pyflakes")
6356 (synopsis "Passive checker of Python programs")
6357 (description
6358 "Pyflakes statically checks Python source code for common errors.")
6359 (license license:expat)))
6360
6361 (define-public python2-pyflakes
6362 (package-with-python2 python-pyflakes))
6363
6364 (define-public python-mccabe
6365 (package
6366 (name "python-mccabe")
6367 (version "0.6.1")
6368 (source
6369 (origin
6370 (method url-fetch)
6371 (uri (pypi-uri "mccabe" version))
6372 (sha256
6373 (base32
6374 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6375 (build-system python-build-system)
6376 (native-inputs
6377 `(("python-pytest" ,python-pytest-bootstrap)
6378 ("python-pytest-runner" ,python-pytest-runner)))
6379 (home-page "https://github.com/flintwork/mccabe")
6380 (synopsis "McCabe checker, plugin for flake8")
6381 (description
6382 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6383 complexity of Python source code.")
6384 (license license:expat)))
6385
6386 (define-public python2-mccabe
6387 (package-with-python2 python-mccabe))
6388
6389 (define-public python-mccabe-0.2.1
6390 (package (inherit python-mccabe)
6391 (version "0.2.1")
6392 (source
6393 (origin
6394 (method url-fetch)
6395 (uri (pypi-uri "mccabe" version))
6396 (sha256
6397 (base32
6398 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6399
6400 (define-public python2-mccabe-0.2.1
6401 (package-with-python2 python-mccabe-0.2.1))
6402
6403 ;; Flake8 2.4.1 requires an older version of pep8.
6404 ;; This should be removed ASAP.
6405 (define-public python-pep8-1.5.7
6406 (package (inherit python-pep8)
6407 (version "1.5.7")
6408 (source
6409 (origin
6410 (method url-fetch)
6411 (uri (pypi-uri "pep8" version))
6412 (sha256
6413 (base32
6414 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6415 (arguments
6416 ;; XXX Tests not compatible with Python 3.5.
6417 '(#:tests? #f))))
6418
6419 (define-public python2-pep8-1.5.7
6420 (package-with-python2 python-pep8-1.5.7))
6421
6422 ;; Flake8 2.4.1 requires an older version of pyflakes.
6423 ;; This should be removed ASAP.
6424 (define-public python-pyflakes-0.8.1
6425 (package (inherit python-pyflakes)
6426 (version "0.8.1")
6427 (source
6428 (origin
6429 (method url-fetch)
6430 (uri (pypi-uri "pyflakes" version))
6431 (sha256
6432 (base32
6433 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6434 (arguments
6435 ;; XXX Tests not compatible with Python 3.5.
6436 '(#:tests? #f))))
6437
6438 (define-public python2-pyflakes-0.8.1
6439 (package-with-python2 python-pyflakes-0.8.1))
6440
6441 ;; This package is used by hypothesis which has thousands of dependent packages.
6442 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6443 (define-public python-flake8-3.5
6444 (package
6445 (name "python-flake8")
6446 (version "3.5.0")
6447 (source
6448 (origin
6449 (method url-fetch)
6450 (uri (pypi-uri "flake8" version))
6451 (sha256
6452 (base32
6453 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6454 (build-system python-build-system)
6455 (arguments
6456 `(#:phases
6457 (modify-phases %standard-phases
6458 ;; Two errors don't seem to have assigned codes.
6459 (add-after 'unpack 'delete-broken-test
6460 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6461 (add-after 'unpack 'fix-problem-with-pycodestyle
6462 (lambda _
6463 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6464 ;; This should no longer be needed with the next release.
6465 (substitute* "setup.py"
6466 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6467 "PEP8_PLUGIN('break_after_binary_operator'),\
6468 PEP8_PLUGIN('break_before_binary_operator'),"))
6469 #t))
6470 (delete 'check)
6471 (add-after 'install 'check
6472 (lambda* (#:key inputs outputs #:allow-other-keys)
6473 (add-installed-pythonpath inputs outputs)
6474 (invoke "pytest" "-v")
6475 #t)))))
6476 (propagated-inputs
6477 `(("python-pycodestyle" ,python-pycodestyle)
6478 ("python-pyflakes" ,python-pyflakes)
6479 ("python-mccabe" ,python-mccabe)))
6480 (native-inputs
6481 `(("python-mock" ,python-mock)
6482 ("python-pytest" ,python-pytest-bootstrap)
6483 ("python-pytest-runner" ,python-pytest-runner)))
6484 (home-page "https://gitlab.com/pycqa/flake8")
6485 (synopsis
6486 "The modular source code checker: pep8, pyflakes and co")
6487 (description
6488 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6489 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6490 (license license:expat)))
6491
6492 (define-public python2-flake8-3.5
6493 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6494 (package (inherit base)
6495 (propagated-inputs
6496 `(("python2-configparser" ,python2-configparser)
6497 ("python2-enum34" ,python2-enum34)
6498 ,@(package-propagated-inputs base))))))
6499
6500 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6501 ;; this newer version. Keep it as a separate variable for now to avoid
6502 ;; rebuilding "python-hypothesis"; this should be removed in the next
6503 ;; rebuild cycle.
6504 (define-public python-flake8
6505 (package
6506 (inherit python-flake8-3.5)
6507 (version "3.6.0")
6508 (source (origin
6509 (method url-fetch)
6510 (uri (pypi-uri "flake8" version))
6511 (sha256
6512 (base32
6513 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6514 (arguments
6515 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6516 ((#:phases phases)
6517 `(modify-phases ,phases
6518 (delete 'delete-broken-test)
6519 (delete 'fix-problem-with-pycodestyle)))))
6520 (properties `((python2-variant . ,(delay python2-flake8))))))
6521
6522 (define-public python2-flake8
6523 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6524 (package (inherit base)
6525 (propagated-inputs
6526 (package-propagated-inputs python2-flake8-3.5)))))
6527
6528 ;; python-hacking requires flake8 <2.6.0.
6529 (define-public python-flake8-2.5
6530 (package
6531 (inherit python-flake8)
6532 (version "2.5.5")
6533 (source (origin
6534 (method url-fetch)
6535 (uri (pypi-uri "flake8" version))
6536 (sha256
6537 (base32
6538 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6539 (propagated-inputs
6540 `(("python-pep8" ,python-pep8)
6541 ,@(package-propagated-inputs python-flake8)))
6542 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6543
6544 (define-public python2-flake8-2.5
6545 (package
6546 (inherit python2-flake8)
6547 (version (package-version python-flake8-2.5))
6548 (source (origin
6549 (inherit (package-source python-flake8-2.5))))
6550 (propagated-inputs
6551 `(("python2-pep8" ,python2-pep8)
6552 ,@(package-propagated-inputs python2-flake8)))))
6553
6554 (define-public python-flake8-polyfill
6555 (package
6556 (name "python-flake8-polyfill")
6557 (version "1.0.2")
6558 (source
6559 (origin
6560 (method url-fetch)
6561 (uri (pypi-uri "flake8-polyfill" version))
6562 (sha256
6563 (base32
6564 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6565 (build-system python-build-system)
6566 (arguments
6567 '(#:phases
6568 (modify-phases %standard-phases
6569 (replace 'check
6570 (lambda _
6571 (setenv "PYTHONPATH"
6572 (string-append (getcwd) "/build/lib:"
6573 (getenv "PYTHONPATH")))
6574 (invoke "py.test" "-v"))))))
6575 (native-inputs
6576 `(("python-flake8" ,python-flake8)
6577 ("python-mock" ,python-mock)
6578 ("python-pep8" ,python-pep8)
6579 ("python-pycodestyle" ,python-pycodestyle)
6580 ("python-pytest" ,python-pytest)))
6581 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6582 (synopsis "Polyfill package for Flake8 plugins")
6583 (description
6584 "This package that provides some compatibility helpers for Flake8
6585 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6586 (license license:expat)))
6587
6588 (define-public python2-flake8-polyfill
6589 (package-with-python2 python-flake8-polyfill))
6590
6591 (define-public python-mistune
6592 (package
6593 (name "python-mistune")
6594 (version "0.8.4")
6595 (source
6596 (origin
6597 (method url-fetch)
6598 (uri (pypi-uri "mistune" version))
6599 (sha256
6600 (base32
6601 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6602 (build-system python-build-system)
6603 (native-inputs
6604 `(("python-nose" ,python-nose)
6605 ("python-cython" ,python-cython)))
6606 (home-page "https://github.com/lepture/mistune")
6607 (synopsis "Markdown parser in pure Python")
6608 (description "This package provides a fast markdown parser in pure
6609 Python.")
6610 (license license:bsd-3)))
6611
6612 (define-public python2-mistune
6613 (package-with-python2 python-mistune))
6614
6615 (define-public python-markdown
6616 (package
6617 (name "python-markdown")
6618 (version "3.1.1")
6619 (source
6620 (origin
6621 (method url-fetch)
6622 (uri (pypi-uri "Markdown" version))
6623 (sha256
6624 (base32
6625 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6626 (build-system python-build-system)
6627 (native-inputs
6628 `(("python-nose" ,python-nose)
6629 ("python-pyyaml" ,python-pyyaml)))
6630 (home-page "https://python-markdown.github.io/")
6631 (synopsis "Python implementation of Markdown")
6632 (description
6633 "This package provides a Python implementation of John Gruber's
6634 Markdown. The library features international input, various Markdown
6635 extensions, and several HTML output formats. A command line wrapper
6636 markdown_py is also provided to convert Markdown files to HTML.")
6637 (license license:bsd-3)))
6638
6639 (define-public python2-markdown
6640 (package-with-python2 python-markdown))
6641
6642 (define-public python-ptyprocess
6643 (package
6644 (name "python-ptyprocess")
6645 (version "0.5.2")
6646 (source
6647 (origin
6648 (method url-fetch)
6649 (uri (pypi-uri "ptyprocess" version))
6650 (sha256
6651 (base32
6652 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6653 (build-system python-build-system)
6654 (native-inputs
6655 `(("python-nose" ,python-nose)))
6656 (arguments
6657 `(#:phases
6658 (modify-phases %standard-phases
6659 (replace 'check
6660 (lambda _ (invoke "nosetests"))))))
6661 (home-page "https://github.com/pexpect/ptyprocess")
6662 (synopsis "Run a subprocess in a pseudo terminal")
6663 (description
6664 "This package provides a Python library used to launch a subprocess in a
6665 pseudo terminal (pty), and interact with both the process and its pty.")
6666 (license license:isc)))
6667
6668 (define-public python2-ptyprocess
6669 (package-with-python2 python-ptyprocess))
6670
6671 (define-public python-cram
6672 (package
6673 (name "python-cram")
6674 (version "0.7")
6675 (home-page "https://bitheap.org/cram/")
6676 (source (origin
6677 (method url-fetch)
6678 (uri (list (string-append home-page "cram-"
6679 version ".tar.gz")
6680 (pypi-uri "cram" version)))
6681 (sha256
6682 (base32
6683 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6684 (arguments
6685 '(#:phases
6686 (modify-phases %standard-phases
6687 (add-after 'unpack 'patch-source
6688 (lambda _
6689 (substitute* (find-files "cram" ".*\\.py$")
6690 ;; Replace default shell path.
6691 (("/bin/sh") (which "sh")))
6692 (substitute* (find-files "tests" ".*\\.t$")
6693 (("md5") "md5sum")
6694 (("/bin/bash") (which "bash"))
6695 (("/bin/sh") (which "sh")))
6696 (substitute* "cram/_test.py"
6697 ;; This hack works around a bug triggered by substituting
6698 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6699 ;; "cram -h", which breaks the output at 80 characters. This
6700 ;; causes the line showing the default shell to break into two
6701 ;; lines, but the test expects a single line...
6702 (("env\\['COLUMNS'\\] = '80'")
6703 "env['COLUMNS'] = '160'"))
6704 #t))
6705 (delete 'check)
6706 (add-after 'install 'check
6707 ;; The test phase uses the built library and executable.
6708 ;; It's easier to run it after install since the build
6709 ;; directory contains version-specific PATH.
6710 (lambda* (#:key inputs outputs #:allow-other-keys)
6711 (add-installed-pythonpath inputs outputs)
6712 (setenv "PATH" (string-append (getenv "PATH") ":"
6713 (assoc-ref outputs "out") "/bin"))
6714 (invoke "make" "test"))))))
6715 (build-system python-build-system)
6716 (native-inputs
6717 `(("python-coverage" ,python-coverage)
6718 ("which" ,which)))
6719 (synopsis "Simple testing framework for command line applications")
6720 (description
6721 "Cram is a functional testing framework for command line applications.
6722 Cram tests look like snippets of interactive shell sessions. Cram runs each
6723 command and compares the command output in the test with the command’s actual
6724 output.")
6725 (license license:gpl2+)))
6726
6727 (define-public python2-cram
6728 (package-with-python2 python-cram))
6729
6730 (define-public python-straight-plugin
6731 (package
6732 (name "python-straight-plugin")
6733 (version "1.4.1")
6734 (source
6735 (origin
6736 (method url-fetch)
6737 (uri (pypi-uri "straight.plugin" version))
6738 (sha256
6739 (base32
6740 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6741 (build-system python-build-system)
6742 (home-page "https://github.com/ironfroggy/straight.plugin")
6743 (synopsis "Simple namespaced plugin facility")
6744 (description "Straight Plugin provides a type of plugin you can create from
6745 almost any existing Python modules, and an easy way for outside developers to
6746 add functionality and customization to your projects with their own plugins.")
6747 (license license:expat)))
6748
6749 (define-public python2-straight-plugin
6750 (package-with-python2 python-straight-plugin))
6751
6752 (define-public python-fonttools
6753 (package
6754 (name "python-fonttools")
6755 (version "3.28.0")
6756 (source (origin
6757 (method url-fetch)
6758 (uri (pypi-uri "fonttools" version ".zip"))
6759 (sha256
6760 (base32
6761 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6762 (build-system python-build-system)
6763 (native-inputs
6764 `(("unzip" ,unzip)
6765 ("python-pytest" ,python-pytest)
6766 ("python-pytest-runner" ,python-pytest-runner)))
6767 (home-page "https://github.com/behdad/fonttools")
6768 (synopsis "Tools to manipulate font files")
6769 (description
6770 "FontTools/TTX is a library to manipulate font files from Python. It
6771 supports reading and writing of TrueType/OpenType fonts, reading and writing
6772 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6773 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6774 from an XML-based format.")
6775 (license license:expat)))
6776
6777 (define-public python2-fonttools
6778 (package-with-python2 python-fonttools))
6779
6780 (define-public python-ly
6781 (package
6782 (name "python-ly")
6783 (version "0.9.5")
6784 (source
6785 (origin
6786 (method url-fetch)
6787 (uri (pypi-uri name version))
6788 (sha256
6789 (base32
6790 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6791 (build-system python-build-system)
6792 (arguments
6793 ;; FIXME: Some tests need network access.
6794 '(#:tests? #f))
6795 (synopsis "Tool and library for manipulating LilyPond files")
6796 (description "This package provides a Python library to parse, manipulate
6797 or create documents in LilyPond format. A command line program ly is also
6798 provided that can be used to do various manipulations with LilyPond files.")
6799 (home-page "https://pypi.python.org/pypi/python-ly")
6800 (license license:gpl2+)))
6801
6802 (define-public python-appdirs
6803 (package
6804 (name "python-appdirs")
6805 (version "1.4.3")
6806 (source
6807 (origin
6808 (method url-fetch)
6809 (uri (pypi-uri "appdirs" version))
6810 (sha256
6811 (base32
6812 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6813 (build-system python-build-system)
6814 (home-page "https://github.com/ActiveState/appdirs")
6815 (synopsis
6816 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6817 (description
6818 "This module provides a portable way of finding out where user data
6819 should be stored on various operating systems.")
6820 (license license:expat)))
6821
6822 (define-public python2-appdirs
6823 (package-with-python2 python-appdirs))
6824
6825 (define-public python-llfuse
6826 (package
6827 (name "python-llfuse")
6828 (version "1.3.5")
6829 (source (origin
6830 (method url-fetch)
6831 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6832 (sha256
6833 (base32
6834 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6835 (build-system python-build-system)
6836 (inputs
6837 `(("fuse" ,fuse)
6838 ("attr" ,attr)))
6839 (native-inputs
6840 `(("pkg-config" ,pkg-config)))
6841 (synopsis "Python bindings for FUSE")
6842 (description
6843 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6844 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6845 (license license:lgpl2.0+)
6846 (properties `((python2-variant . ,(delay python2-llfuse))))))
6847
6848 (define-public python2-llfuse
6849 (package (inherit (package-with-python2
6850 (strip-python2-variant python-llfuse)))
6851 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6852
6853 ;; For attic-0.16
6854 (define-public python-llfuse-0.41
6855 (package (inherit python-llfuse)
6856 (version "0.41.1")
6857 (source (origin
6858 (method url-fetch)
6859 (uri (string-append
6860 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6861 "llfuse-" version ".tar.bz2"))
6862 (sha256
6863 (base32
6864 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6865 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6866 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6867 (license (list license:expat license:lgpl2.0+))))
6868
6869 (define-public python-msgpack
6870 (package
6871 (name "python-msgpack")
6872 (version "0.5.6")
6873 (source (origin
6874 (method url-fetch)
6875 (uri (pypi-uri "msgpack" version))
6876 (sha256
6877 (base32
6878 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6879 (build-system python-build-system)
6880 (arguments
6881 `(#:modules ((guix build utils)
6882 (guix build python-build-system)
6883 (ice-9 ftw)
6884 (srfi srfi-1)
6885 (srfi srfi-26))
6886 #:phases
6887 (modify-phases %standard-phases
6888 (replace 'check
6889 (lambda _
6890 (let ((cwd (getcwd)))
6891 (setenv "PYTHONPATH"
6892 (string-append cwd "/build/"
6893 (find (cut string-prefix? "lib" <>)
6894 (scandir (string-append cwd "/build")))
6895 ":"
6896 (getenv "PYTHONPATH")))
6897 (invoke "pytest" "-v" "test")))))))
6898 (native-inputs
6899 `(("python-pytest" ,python-pytest)))
6900 (synopsis "MessagePack (de)serializer")
6901 (description "MessagePack is a fast, compact binary serialization format,
6902 suitable for similar data to JSON. This package provides CPython bindings for
6903 reading and writing MessagePack data.")
6904 (home-page "https://pypi.python.org/pypi/msgpack/")
6905 (license license:asl2.0)))
6906
6907 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6908 ;; release 0.5. Some packages like borg still call it by the old name for now.
6909 ;; <https://bugs.gnu.org/30662>
6910 (define-public python-msgpack-transitional
6911 (package
6912 (inherit python-msgpack)
6913 (name "python-msgpack-transitional")
6914 (arguments
6915 (substitute-keyword-arguments (package-arguments python-msgpack)
6916 ((#:phases phases)
6917 `(modify-phases ,phases
6918 (add-after 'unpack 'configure-transitional
6919 (lambda _
6920 ;; Keep using the old name.
6921 (substitute* "setup.py"
6922 (("TRANSITIONAL = False")
6923 "TRANSITIONAL = 1"))
6924 #t))))))))
6925
6926 (define-public python2-msgpack
6927 (package-with-python2 python-msgpack))
6928
6929 (define-public python-netaddr
6930 (package
6931 (name "python-netaddr")
6932 (version "0.7.19")
6933 (source
6934 (origin
6935 (method url-fetch)
6936 (uri (pypi-uri "netaddr" version))
6937 (sha256
6938 (base32
6939 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6940 (build-system python-build-system)
6941 (arguments `(#:tests? #f)) ;; No tests.
6942 (home-page "https://github.com/drkjam/netaddr/")
6943 (synopsis "Pythonic manipulation of network addresses")
6944 (description
6945 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6946 and MAC network addresses.")
6947 (license license:bsd-3)))
6948
6949 (define-public python2-netaddr
6950 (package-with-python2 python-netaddr))
6951
6952 (define-public python2-pyroute2
6953 (package
6954 (name "python2-pyroute2")
6955 (version "0.5.6")
6956 (source
6957 (origin
6958 (method url-fetch)
6959 (uri (pypi-uri "pyroute2" version))
6960 (sha256
6961 (base32
6962 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6963 (build-system python-build-system)
6964 (arguments
6965 `(#:python ,python-2)) ;Python 3.x is not supported
6966 (home-page "https://github.com/svinota/pyroute2")
6967 (synopsis "Python netlink library")
6968 (description
6969 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6970 Supported netlink families and protocols include:
6971 @itemize
6972 @item rtnl, network settings - addresses, routes, traffic controls
6973 @item nfnetlink - netfilter API: ipset, nftables, ...
6974 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6975 @item devlink - manage and monitor devlink-enabled hardware
6976 @item generic - generic netlink families
6977 @itemize
6978 @item nl80211 - wireless functions API (basic support)
6979 @item taskstats - extended process statistics
6980 @item acpi_events - ACPI events monitoring
6981 @item thermal_events - thermal events monitoring
6982 @item VFS_DQUOT - disk quota events monitoring
6983 @end itemize
6984 @end itemize")
6985 (license license:gpl2+)))
6986
6987 (define-public python-wrapt
6988 (package
6989 (name "python-wrapt")
6990 (version "1.11.1")
6991 (source
6992 (origin
6993 (method url-fetch)
6994 (uri (pypi-uri "wrapt" version))
6995 (sha256
6996 (base32
6997 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6998 (build-system python-build-system)
6999 (arguments
7000 ;; Tests are not included in the tarball, they are only available in the
7001 ;; git repository.
7002 `(#:tests? #f))
7003 (home-page "https://github.com/GrahamDumpleton/wrapt")
7004 (synopsis "Module for decorators, wrappers and monkey patching")
7005 (description
7006 "The aim of the wrapt module is to provide a transparent object proxy for
7007 Python, which can be used as the basis for the construction of function
7008 wrappers and decorator functions.")
7009 (license license:bsd-2)))
7010
7011 (define-public python2-wrapt
7012 (package-with-python2 python-wrapt))
7013
7014 (define-public python-xlrd
7015 (package
7016 (name "python-xlrd")
7017 (version "1.0.0")
7018 (source (origin
7019 (method url-fetch)
7020 (uri (pypi-uri "xlrd" version))
7021 (sha256
7022 (base32
7023 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7024 (build-system python-build-system)
7025 (arguments
7026 `(#:phases
7027 (modify-phases %standard-phases
7028 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7029 ;; run tests instead for now.
7030 (replace 'check (lambda _ (invoke "nosetests"))))))
7031 (native-inputs `(("python-nose" ,python-nose)))
7032 (home-page "http://www.python-excel.org/")
7033 (synopsis "Library for extracting data from Excel files")
7034 (description "This package provides a library to extract data from
7035 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7036 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7037 Unicode-aware. It is not intended as an end-user tool.")
7038 (license license:bsd-3)))
7039
7040 (define-public python2-xlrd
7041 (package-with-python2 python-xlrd))
7042
7043 (define-public python-prettytable
7044 (package
7045 (name "python-prettytable")
7046 (version "0.7.2")
7047 (source
7048 (origin
7049 (method url-fetch)
7050 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7051 (sha256
7052 (base32
7053 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7054 (build-system python-build-system)
7055 (home-page "http://code.google.com/p/prettytable/")
7056 (synopsis "Display tabular data in an ASCII table format")
7057 (description
7058 "A library designed to represent tabular data in visually appealing ASCII
7059 tables. PrettyTable allows for selection of which columns are to be printed,
7060 independent alignment of columns (left or right justified or centred) and
7061 printing of sub-tables by specifying a row range.")
7062 (license license:bsd-3)))
7063
7064 (define-public python2-prettytable
7065 (package-with-python2 python-prettytable))
7066
7067 (define-public python-tables
7068 (package
7069 (name "python-tables")
7070 (version "3.4.4")
7071 (source
7072 (origin
7073 (method url-fetch)
7074 (uri (pypi-uri "tables" version))
7075 (sha256
7076 (base32
7077 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7078 (modules '((guix build utils)))
7079 (snippet
7080 '(begin
7081 ;; Remove pre-compiled .pyc files from source.
7082 (for-each delete-file-recursively
7083 (find-files "." "__pycache__" #:directories? #t))
7084 (for-each delete-file (find-files "." "\\.pyc$"))
7085 #t))))
7086 (build-system python-build-system)
7087 (arguments
7088 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7089 ;; or "check", so we must override the build and check phases.
7090 #:phases
7091 (modify-phases %standard-phases
7092 (add-after 'unpack 'use-gcc
7093 (lambda _
7094 (substitute* "setup.py"
7095 (("compiler = new_compiler\\(\\)" line)
7096 (string-append line
7097 "\ncompiler.set_executables(compiler='gcc',"
7098 "compiler_so='gcc',"
7099 "linker_exe='gcc',"
7100 "linker_so='gcc -shared')")))
7101 #t))
7102 (replace 'build
7103 (lambda* (#:key inputs #:allow-other-keys)
7104 (invoke "python" "setup.py" "build"
7105 (string-append "--hdf5="
7106 (assoc-ref inputs "hdf5")))))
7107 (replace 'check
7108 (lambda* (#:key inputs #:allow-other-keys)
7109 (invoke "python" "setup.py" "check"
7110 (string-append "--hdf5="
7111 (assoc-ref inputs "hdf5"))))))))
7112 (propagated-inputs
7113 `(("python-numexpr" ,python-numexpr)
7114 ("python-numpy" ,python-numpy)))
7115 (native-inputs
7116 `(("python-cython" ,python-cython)
7117 ("pkg-config" ,pkg-config)))
7118 (inputs
7119 `(("hdf5" ,hdf5)
7120 ("bzip2" ,bzip2)
7121 ("zlib" ,zlib)))
7122 (home-page "http://www.pytables.org/")
7123 (synopsis "Hierarchical datasets for Python")
7124 (description "PyTables is a package for managing hierarchical datasets and
7125 designed to efficiently cope with extremely large amounts of data.")
7126 (license license:bsd-3)))
7127
7128 (define-public python2-tables
7129 (package-with-python2 python-tables))
7130
7131 (define-public python-pyasn1
7132 (package
7133 (name "python-pyasn1")
7134 (version "0.4.3")
7135 (source
7136 (origin
7137 (method url-fetch)
7138 (uri (pypi-uri "pyasn1" version))
7139 (sha256
7140 (base32
7141 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7142 (build-system python-build-system)
7143 (home-page "http://pyasn1.sourceforge.net/")
7144 (synopsis "ASN.1 types and codecs")
7145 (description
7146 "This is an implementation of ASN.1 types and codecs in Python. It is
7147 suitable for a wide range of protocols based on the ASN.1 specification.")
7148 (license license:bsd-2)))
7149
7150 (define-public python2-pyasn1
7151 (package-with-python2 python-pyasn1))
7152
7153 (define-public python-pyasn1-modules
7154 (package
7155 (name "python-pyasn1-modules")
7156 (version "0.2.2")
7157 (source
7158 (origin
7159 (method url-fetch)
7160 (uri (pypi-uri "pyasn1-modules" version))
7161 (sha256
7162 (base32
7163 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7164 (build-system python-build-system)
7165 (propagated-inputs
7166 `(("python-pyasn1" ,python-pyasn1)))
7167 (home-page "https://sourceforge.net/projects/pyasn1/")
7168 (synopsis "ASN.1 codec implementations")
7169 (description
7170 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7171 implementations of ASN.1-based codecs and protocols.")
7172 (license license:bsd-3)))
7173
7174 (define-public python2-pyasn1-modules
7175 (package-with-python2 python-pyasn1-modules))
7176
7177 (define-public python-ipaddress
7178 (package
7179 (name "python-ipaddress")
7180 (version "1.0.22")
7181 (source (origin
7182 (method url-fetch)
7183 (uri (pypi-uri "ipaddress" version))
7184 (sha256
7185 (base32
7186 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7187 (build-system python-build-system)
7188 (home-page "https://github.com/phihag/ipaddress")
7189 (synopsis "IP address manipulation library")
7190 (description
7191 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7192 in Python. This library is used to create, poke at, and manipulate IPv4 and
7193 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7194 module to older versions of Python.")
7195 (license license:psfl)))
7196
7197 (define-public python2-ipaddress
7198 (package-with-python2 python-ipaddress))
7199
7200 (define-public python2-ipaddr
7201 (package
7202 (name "python2-ipaddr")
7203 (version "2.1.11")
7204 (source
7205 (origin
7206 (method url-fetch)
7207 (uri (pypi-uri "ipaddr" version))
7208 (sha256
7209 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7210 (build-system python-build-system)
7211 (arguments
7212 `(#:python ,python-2 ;version 2 only
7213 #:phases
7214 (modify-phases %standard-phases
7215 (replace 'check
7216 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7217 (home-page "https://github.com/google/ipaddr-py")
7218 (synopsis "IP address manipulation library")
7219 (description
7220 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7221 IPv6 addresses and networks.
7222
7223 For new implementations you may prefer to use the standard module
7224 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7225 versions of Python.")
7226 (license license:asl2.0)))
7227
7228 (define-public python-idna
7229 (package
7230 (name "python-idna")
7231 (version "2.8")
7232 (source
7233 (origin
7234 (method url-fetch)
7235 (uri (pypi-uri "idna" version))
7236 (sha256
7237 (base32
7238 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7239 (build-system python-build-system)
7240 (home-page "https://github.com/kjd/idna")
7241 (synopsis "Internationalized domain names in applications")
7242 (description
7243 "This is a library to support the Internationalised Domain Names in
7244 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7245 protocol is often referred to as “IDNA2008” and can produce different results
7246 from the earlier standard from 2003. The library is also intended to act as a
7247 suitable drop-in replacement for the “encodings.idna” module that comes with
7248 the Python standard library but currently only supports the older 2003
7249 specification.")
7250 (license license:bsd-4)))
7251
7252 (define-public python-idna-2.7
7253 (package (inherit python-idna)
7254 (version "2.7")
7255 (source (origin
7256 (method url-fetch)
7257 (uri (pypi-uri "idna" version))
7258 (sha256
7259 (base32
7260 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7261
7262
7263 (define-public python2-idna
7264 (package-with-python2 python-idna))
7265
7266 (define-public python-idna-ssl
7267 (package
7268 (name "python-idna-ssl")
7269 (version "1.0.1")
7270 (source
7271 (origin
7272 (method url-fetch)
7273 (uri (pypi-uri "idna-ssl" version))
7274 (sha256
7275 (base32
7276 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7277 (build-system python-build-system)
7278 (arguments
7279 `(#:tests? #f)) ;circular dependency with python-aiohttp
7280 (home-page "https://github.com/aio-libs/idna-ssl")
7281 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7282 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7283 domains support.")
7284 (license license:expat)))
7285
7286 (define-public python-pretend
7287 (package
7288 (name "python-pretend")
7289 (version "1.0.9")
7290 (source
7291 (origin
7292 (method url-fetch)
7293 (uri (pypi-uri "pretend" version))
7294 (sha256
7295 (base32
7296 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7297 (build-system python-build-system)
7298 (home-page "https://github.com/alex/pretend")
7299 (synopsis "Library for stubbing in Python")
7300 (description
7301 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7302 technique for writing tests. You may hear the term mixed up with mocks,
7303 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7304 responses, rather than doing any computation.")
7305 (license license:bsd-3)))
7306
7307 (define-public python2-pretend
7308 (package-with-python2 python-pretend))
7309
7310 (define-public python-pip
7311 (package
7312 (name "python-pip")
7313 (version "18.1")
7314 (source
7315 (origin
7316 (method url-fetch)
7317 (uri (pypi-uri "pip" version))
7318 (sha256
7319 (base32
7320 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7321 (build-system python-build-system)
7322 (arguments
7323 '(#:tests? #f)) ; there are no tests in the pypi archive.
7324 (home-page "https://pip.pypa.io/")
7325 (synopsis "Package manager for Python software")
7326 (description
7327 "Pip is a package manager for Python software, that finds packages on the
7328 Python Package Index (PyPI).")
7329 (license license:expat)))
7330
7331 (define-public python2-pip
7332 (package-with-python2 python-pip))
7333
7334 (define-public python-tlsh
7335 (package
7336 (name "python-tlsh")
7337 (version "3.4.5")
7338 (home-page "https://github.com/trendmicro/tlsh")
7339 (source
7340 (origin
7341 (method git-fetch)
7342 (uri (git-reference
7343 (url "https://github.com/trendmicro/tlsh.git")
7344 (commit (string-append "v" version))))
7345 (file-name (git-file-name name version))
7346 (sha256
7347 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7348 (build-system cmake-build-system)
7349 (arguments
7350 '(#:out-of-source? #f
7351 #:phases (modify-phases %standard-phases
7352 (replace
7353 'install
7354 (lambda* (#:key outputs #:allow-other-keys)
7355 ;; Build and install the Python bindings. The underlying
7356 ;; C++ library is apparently not meant to be installed.
7357 (let ((out (assoc-ref outputs "out")))
7358 (with-directory-excursion "py_ext"
7359 (and (system* "python" "setup.py" "build")
7360 (system* "python" "setup.py" "install"
7361 (string-append "--prefix=" out))))))))))
7362 (inputs `(("python" ,python-wrapper))) ;for the bindings
7363 (synopsis "Fuzzy matching library for Python")
7364 (description
7365 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7366 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7367 value which can be used for similarity comparisons. Similar objects have
7368 similar hash values, which allows for the detection of similar objects by
7369 comparing their hash values. The byte stream should have a sufficient amount
7370 of complexity; for example, a byte stream of identical bytes will not generate
7371 a hash value.")
7372 (license license:asl2.0)))
7373
7374 (define-public python2-tlsh
7375 (package
7376 (inherit python-tlsh)
7377 (name "python2-tlsh")
7378 (inputs `(("python" ,python-2)))))
7379
7380 (define-public python-termcolor
7381 (package
7382 (name "python-termcolor")
7383 (version "1.1.0")
7384 (source
7385 (origin
7386 (method url-fetch)
7387 (uri (pypi-uri "termcolor" version))
7388 (sha256
7389 (base32
7390 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7391 (build-system python-build-system)
7392 (arguments
7393 ;; There are no tests.
7394 `(#:tests? #f))
7395 (home-page "https://pypi.python.org/pypi/termcolor")
7396 (synopsis "ANSII Color formatting for terminal output")
7397 (description
7398 "This package provides ANSII Color formatting for output in terminals.")
7399 (license license:expat)))
7400
7401 (define-public python2-termcolor
7402 (package-with-python2 python-termcolor))
7403
7404 (define-public python-libarchive-c
7405 (package
7406 (name "python-libarchive-c")
7407 (version "2.8")
7408 (source (origin
7409 (method url-fetch)
7410 (uri (pypi-uri "libarchive-c" version))
7411 (sha256
7412 (base32
7413 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7414 (build-system python-build-system)
7415 (arguments
7416 '(#:phases (modify-phases %standard-phases
7417 (add-before
7418 'build 'reference-libarchive
7419 (lambda* (#:key inputs #:allow-other-keys)
7420 ;; Retain the absolute file name of libarchive.so.
7421 (let ((libarchive (assoc-ref inputs "libarchive")))
7422 (substitute* "libarchive/ffi.py"
7423 (("find_library\\('archive'\\)")
7424 (string-append "'" libarchive
7425 "/lib/libarchive.so'"))))))
7426 (replace 'check
7427 (lambda _ (invoke "pytest" "-vv"))))))
7428 (native-inputs
7429 `(("python-mock" ,python-mock)
7430 ("python-pytest" ,python-pytest)))
7431 (inputs
7432 `(("libarchive" ,libarchive)))
7433 (home-page "https://github.com/Changaco/python-libarchive-c")
7434 (synopsis "Python interface to libarchive")
7435 (description
7436 "This package provides Python bindings to libarchive, a C library to
7437 access possibly compressed archives in many different formats. It uses
7438 Python's @code{ctypes} foreign function interface (FFI).")
7439 (license license:lgpl2.0+)))
7440
7441 (define-public python2-libarchive-c
7442 (package-with-python2 python-libarchive-c))
7443
7444 (define-public python-file
7445 (package
7446 (inherit file)
7447 (name "python-file")
7448 (build-system python-build-system)
7449 (arguments
7450 '(#:tests? #f ;no tests
7451 #:configure-flags '("--single-version-externally-managed" "--root=/")
7452 #:phases (modify-phases %standard-phases
7453 (add-before 'build 'change-directory
7454 (lambda _
7455 (chdir "python")
7456 #t))
7457 (add-before 'build 'set-library-file-name
7458 (lambda* (#:key inputs #:allow-other-keys)
7459 (let ((file (assoc-ref inputs "file")))
7460 (substitute* "magic.py"
7461 (("find_library\\('magic'\\)")
7462 (string-append "'" file "/lib/libmagic.so'")))
7463 #t))))))
7464 (inputs `(("file" ,file)))
7465 (native-inputs (if (%current-target-system)
7466 `(("self" ,this-package))
7467 '()))
7468 (synopsis "Python bindings to the libmagic file type guesser. Note that
7469 this module and the python-magic module both provide a \"magic.py\" file;
7470 these two modules, which are different and were developed separately, both
7471 serve the same purpose: provide Python bindings for libmagic.")))
7472
7473 (define-public python2-file
7474 (package-with-python2 python-file))
7475
7476 (define-public python-debian
7477 (package
7478 (name "python-debian")
7479 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7480 (version "0.1.28")
7481 (source
7482 (origin
7483 (method url-fetch)
7484 (uri (pypi-uri name version))
7485 (sha256
7486 (base32
7487 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7488 (build-system python-build-system)
7489 (propagated-inputs
7490 `(("python-six" ,python-six)))
7491 (synopsis "Debian package related modules")
7492 (description
7493 ;; XXX: Use @enumerate instead of @itemize to work around
7494 ;; <http://bugs.gnu.org/21772>.
7495 "This package provides Python modules that abstract many formats of
7496 Debian-related files, such as:
7497
7498 @enumerate
7499 @item Debtags information;
7500 @item @file{debian/changelog} files;
7501 @item packages files, pdiffs;
7502 @item control files of single or multiple RFC822-style paragraphs---e.g.
7503 @file{debian/control}, @file{.changes}, @file{.dsc};
7504 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7505 contained files and meta-information.
7506 @end enumerate\n")
7507
7508 ;; Modules are either GPLv2+ or GPLv3+.
7509 (license license:gpl3+)))
7510
7511 (define-public python2-debian
7512 (package-with-python2 python-debian))
7513
7514 (define-public python-nbformat
7515 (package
7516 (name "python-nbformat")
7517 (version "4.4.0")
7518 (source
7519 (origin
7520 (method url-fetch)
7521 (uri (pypi-uri "nbformat" version))
7522 (sha256
7523 (base32
7524 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7525 (build-system python-build-system)
7526 (arguments `(#:tests? #f)) ; no test target
7527 (propagated-inputs
7528 `(("python-ipython-genutils" ,python-ipython-genutils)
7529 ("python-jsonschema" ,python-jsonschema)
7530 ("python-jupyter-core" ,python-jupyter-core)
7531 ("python-traitlets" ,python-traitlets)))
7532 (home-page "http://jupyter.org")
7533 (synopsis "Jupyter Notebook format")
7534 (description "This package provides the reference implementation of the
7535 Jupyter Notebook format and Python APIs for working with notebooks.")
7536 (license license:bsd-3)))
7537
7538 (define-public python2-nbformat
7539 (package-with-python2 python-nbformat))
7540
7541 (define-public python-bleach
7542 (package
7543 (name "python-bleach")
7544 (version "1.4.3")
7545 (source
7546 (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "bleach" version))
7549 (sha256
7550 (base32
7551 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7552 (build-system python-build-system)
7553 (propagated-inputs
7554 `(("python-html5lib" ,python-html5lib-0.9)
7555 ("python-six" ,python-six)))
7556 (native-inputs
7557 `(("python-nose" ,python-nose)))
7558 (home-page "https://github.com/jsocol/bleach")
7559 (synopsis "Whitelist-based HTML-sanitizing tool")
7560 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7561 (license license:asl2.0)))
7562
7563 (define-public python2-bleach
7564 (package-with-python2 python-bleach))
7565
7566 (define-public python-entrypoints
7567 (package
7568 (name "python-entrypoints")
7569 (version "0.3")
7570 (source
7571 (origin
7572 (method url-fetch)
7573 (uri (pypi-uri "entrypoints" version))
7574 (sha256
7575 (base32
7576 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7577 (build-system python-build-system)
7578 ;; The package does not come with a setup.py file, so we have to generate
7579 ;; one ourselves.
7580 (arguments
7581 `(#:tests? #f
7582 #:phases
7583 (modify-phases %standard-phases
7584 (add-after 'unpack 'create-setup.py
7585 (lambda _
7586 (call-with-output-file "setup.py"
7587 (lambda (port)
7588 (format port "\
7589 from setuptools import setup
7590 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7591 " ,version))))))))
7592 (home-page "https://github.com/takluyver/entrypoints")
7593 (synopsis "Discover and load entry points from installed Python packages")
7594 (description "Entry points are a way for Python packages to advertise
7595 objects with some common interface. The most common examples are
7596 @code{console_scripts} entry points, which define shell commands by
7597 identifying a Python function to run. The @code{entrypoints} module contains
7598 functions to find and load entry points.")
7599 (license license:expat)))
7600
7601 (define-public python2-entrypoints
7602 (package-with-python2 python-entrypoints))
7603
7604 (define-public python-nbconvert
7605 (package
7606 (name "python-nbconvert")
7607 (version "5.0.0b1")
7608 (source
7609 (origin
7610 (method url-fetch)
7611 (uri (pypi-uri "nbconvert" version))
7612 (sha256
7613 (base32
7614 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7615 (build-system python-build-system)
7616 (arguments
7617 `(;; The "bdist_egg" target is disabled by default, causing the installation
7618 ;; to fail.
7619 #:configure-flags (list "bdist_egg")
7620 ;; FIXME: 5 failures, 40 errors.
7621 #:tests? #f))
7622 ;; #:phases
7623 ;; (modify-phases %standard-phases
7624 ;; (replace 'check
7625 ;; (lambda _
7626 ;; (zero? (system* "py.test" "-v")))))
7627 (native-inputs
7628 `(("python-pytest" ,python-pytest)))
7629 (propagated-inputs
7630 `(("python-bleach" ,python-bleach)
7631 ("python-entrypoints" ,python-entrypoints)
7632 ("python-jinja2" ,python-jinja2)
7633 ("python-jupyter-core" ,python-jupyter-core)
7634 ("python-mistune" ,python-mistune)
7635 ("python-nbformat" ,python-nbformat)
7636 ("python-pygments" ,python-pygments)
7637 ("python-traitlets" ,python-traitlets)))
7638 (home-page "http://jupyter.org")
7639 (synopsis "Converting Jupyter Notebooks")
7640 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7641 notebooks to various other formats via Jinja templates. It allows you to
7642 convert an @code{.ipynb} notebook file into various static formats including:
7643
7644 @enumerate
7645 @item HTML
7646 @item LaTeX
7647 @item PDF
7648 @item Reveal JS
7649 @item Markdown (md)
7650 @item ReStructured Text (rst)
7651 @item executable script
7652 @end enumerate\n")
7653 (license license:bsd-3)))
7654
7655 (define-public python2-nbconvert
7656 (package-with-python2 python-nbconvert))
7657
7658 (define-public python-notebook
7659 (package
7660 (name "python-notebook")
7661 (version "5.7.4")
7662 (source (origin
7663 (method url-fetch)
7664 (uri (pypi-uri "notebook" version))
7665 (sha256
7666 (base32
7667 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7668 (build-system python-build-system)
7669 (arguments
7670 `(#:phases
7671 (modify-phases %standard-phases
7672 (replace 'check
7673 (lambda _
7674 ;; These tests require a browser
7675 (delete-file-recursively "notebook/tests/selenium")
7676 ;; Some tests need HOME
7677 (setenv "HOME" "/tmp")
7678 ;; This file contains "warningfilters", which are not supported
7679 ;; by this version of nose.
7680 (delete-file "setup.cfg")
7681 (with-directory-excursion "/tmp"
7682 (invoke "nosetests" "-v"))
7683 #t)))))
7684 (propagated-inputs
7685 `(("python-jupyter-core" ,python-jupyter-core)
7686 ("python-nbformat" ,python-nbformat)
7687 ("python-nbconvert" ,python-nbconvert)
7688 ("python-prometheus-client" ,python-prometheus-client)
7689 ("python-send2trash" ,python-send2trash)
7690 ("python-terminado" ,python-terminado)))
7691 (native-inputs
7692 `(("python-nose" ,python-nose)
7693 ("python-sphinx" ,python-sphinx)
7694 ("python-requests" ,python-requests)))
7695 (home-page "http://jupyter.org/")
7696 (synopsis "Web-based notebook environment for interactive computing")
7697 (description
7698 "The Jupyter HTML notebook is a web-based notebook environment for
7699 interactive computing.")
7700 (properties `((python2-variant . ,(delay python2-notebook))))
7701 (license license:bsd-3)))
7702
7703 (define-public python2-notebook
7704 (let ((base (package-with-python2
7705 (strip-python2-variant python-notebook))))
7706 (package (inherit base)
7707 (native-inputs
7708 `(("python2-mock" ,python2-mock)
7709 ,@(package-native-inputs base)))
7710 (arguments
7711 (substitute-keyword-arguments (package-arguments base)
7712 ((#:phases phases)
7713 `(modify-phases ,phases
7714 (add-before 'check 'disable-test-case
7715 ;; The test requires network access to localhost. Curiously it
7716 ;; fails with Python 2 only. Simply make the test-case return
7717 ;; immediately.
7718 (lambda _
7719 (substitute*
7720 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7721 (("formats = self.nbconvert_api") "return #")))))))))))
7722
7723 (define-public python-widgetsnbextension
7724 (package
7725 (name "python-widgetsnbextension")
7726 (version "3.4.2")
7727 (source
7728 (origin
7729 (method url-fetch)
7730 (uri (pypi-uri "widgetsnbextension" version))
7731 (sha256
7732 (base32
7733 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7734 (build-system python-build-system)
7735 (propagated-inputs
7736 `(("python-ipykernel" ,python-ipykernel)
7737 ("python-notebook" ,python-notebook)))
7738 (native-inputs
7739 `(("python-certifi" ,python-certifi)
7740 ("python-nose" ,python-nose)))
7741 (home-page "https://ipython.org")
7742 (synopsis "IPython HTML widgets for Jupyter")
7743 (description "This package provides interactive HTML widgets for Jupyter
7744 notebooks.")
7745 (license license:bsd-3)))
7746
7747 (define-public python2-widgetsnbextension
7748 (package-with-python2 python-widgetsnbextension))
7749
7750 (define-public python-ipywidgets
7751 (package
7752 (name "python-ipywidgets")
7753 (version "5.2.2")
7754 (source
7755 (origin
7756 (method url-fetch)
7757 (uri (pypi-uri "ipywidgets" version))
7758 (sha256
7759 (base32
7760 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7761 (build-system python-build-system)
7762 (propagated-inputs
7763 `(("python-ipython" ,python-ipython)
7764 ("python-traitlets" ,python-traitlets)
7765 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7766 (native-inputs
7767 `(("python-nose" ,python-nose)
7768 ("python-pytest" ,python-pytest)))
7769 (home-page "https://ipython.org")
7770 (synopsis "IPython HTML widgets for Jupyter")
7771 (description "Ipywidgets are interactive HTML widgets for Jupyter
7772 notebooks and the IPython kernel. Notebooks come alive when interactive
7773 widgets are used. Users gain control of their data and can visualize changes
7774 in the data.")
7775 (license license:bsd-3)))
7776
7777 (define-public python2-ipywidgets
7778 (package-with-python2 python-ipywidgets))
7779
7780 (define-public python-jupyter-console
7781 (package
7782 (name "python-jupyter-console")
7783 (version "6.0.0")
7784 (source
7785 (origin
7786 (method url-fetch)
7787 (uri (pypi-uri "jupyter_console" version))
7788 (sha256
7789 (base32
7790 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7791 (build-system python-build-system)
7792 (propagated-inputs
7793 `(("python-ipykernel" ,python-ipykernel)
7794 ("python-jupyter-client" ,python-jupyter-client)
7795 ("python-prompt-toolkit" ,python-prompt-toolkit)
7796 ("python-pygments" ,python-pygments)))
7797 (native-inputs
7798 `(("python-nose" ,python-nose)))
7799 (home-page "https://jupyter.org")
7800 (synopsis "Jupyter terminal console")
7801 (description "This package provides a terminal-based console frontend for
7802 Jupyter kernels. It also allows for console-based interaction with non-Python
7803 Jupyter kernels such as IJulia and IRKernel.")
7804 (license license:bsd-3)))
7805
7806 (define-public python2-jupyter-console
7807 (package
7808 (name "python2-jupyter-console")
7809 (version "5.2.0")
7810 (source
7811 (origin
7812 (method url-fetch)
7813 (uri (pypi-uri "jupyter_console" version))
7814 (sha256
7815 (base32
7816 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7817 (build-system python-build-system)
7818 ;; Tests only run in an TTY.
7819 (arguments `(#:tests? #f))
7820 (propagated-inputs
7821 `(("python2-ipykernel" ,python2-ipykernel)
7822 ("python2-jupyter-client" ,python2-jupyter-client)
7823 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7824 ("python2-pygments" ,python2-pygments)))
7825 (native-inputs
7826 `(("python2-nose" ,python2-nose)))
7827 (home-page "https://jupyter.org")
7828 (synopsis "Jupyter terminal console")
7829 (description "This package provides a terminal-based console frontend for
7830 Jupyter kernels. It also allows for console-based interaction with non-Python
7831 Jupyter kernels such as IJulia and IRKernel.")
7832 (license license:bsd-3)))
7833
7834 ;; The python-ipython and python-jupyter-console require each other. To get
7835 ;; the functionality in both packages working, strip down the
7836 ;; python-jupyter-console package when using it as an input to python-ipython.
7837 (define python-jupyter-console-minimal
7838 (package
7839 (inherit python-jupyter-console)
7840 (name "python-jupyter-console-minimal")
7841 (arguments
7842 (substitute-keyword-arguments
7843 (package-arguments python-jupyter-console)
7844 ((#:phases phases)
7845 `(modify-phases ,phases
7846 (add-after 'install 'delete-bin
7847 (lambda* (#:key outputs #:allow-other-keys)
7848 ;; Delete the bin files, to avoid conflicts in profiles
7849 ;; where python-ipython and python-jupyter-console are
7850 ;; both present.
7851 (delete-file-recursively
7852 (string-append
7853 (assoc-ref outputs "out") "/bin"))))))))
7854 ;; Remove the python-ipython propagated input, to avoid the cycle
7855 (propagated-inputs
7856 (alist-delete
7857 "python-ipython"
7858 (package-propagated-inputs python-jupyter-console)))))
7859
7860 (define-public python-qtconsole
7861 (package
7862 (name "python-qtconsole")
7863 (version "4.4.3")
7864 (source
7865 (origin
7866 (method url-fetch)
7867 (uri (pypi-uri "qtconsole" version))
7868 (sha256
7869 (base32
7870 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7871 (build-system python-build-system)
7872 (arguments
7873 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7874 ;; but we only have the LTS version 5.x. This means that there might be
7875 ;; runtime errors, but since this is a dependency of the Jupyter package,
7876 ;; and Jupyter can be used without the qtconsole we can overlook this for
7877 ;; now.
7878 `(#:tests? #f
7879 #:phases
7880 (modify-phases %standard-phases
7881 (add-before 'check 'pre-check
7882 (lambda _
7883 (setenv "QT_QPA_PLATFORM" "offscreen")
7884 #t)))))
7885 (propagated-inputs
7886 `(("python-ipykernel" ,python-ipykernel)
7887 ("python-ipython" ,python-ipython)))
7888 (native-inputs
7889 `(("python-pytest" ,python-pytest)))
7890 (home-page "http://jupyter.org")
7891 (synopsis "Jupyter Qt console")
7892 (description "This package provides a Qt-based console for Jupyter with
7893 support for rich media output.")
7894 (license license:bsd-3)))
7895
7896 (define-public jupyter
7897 (package
7898 (name "jupyter")
7899 (version "1.0.0")
7900 (source
7901 (origin
7902 (method url-fetch)
7903 (uri (pypi-uri "jupyter" version))
7904 (sha256
7905 (base32
7906 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7907 (build-system python-build-system)
7908 (arguments '(#:tests? #f)) ; there are none.
7909 (propagated-inputs
7910 `(("python-ipykernel" ,python-ipykernel)
7911 ("python-ipywidgets" ,python-ipywidgets)
7912 ("python-jupyter-console" ,python-jupyter-console)
7913 ("python-nbconvert" ,python-nbconvert)
7914 ("python-notebook" ,python-notebook)
7915 ("python-qtconsole" ,python-qtconsole)))
7916 (native-search-paths
7917 (list (search-path-specification
7918 (variable "JUPYTER_PATH")
7919 (files '("share/jupyter")))))
7920 (home-page "https://jupyter.org")
7921 (synopsis "Web application for interactive documents")
7922 (description
7923 "The Jupyter Notebook is a web application that allows you to create and
7924 share documents that contain live code, equations, visualizations and
7925 explanatory text. Uses include: data cleaning and transformation, numerical
7926 simulation, statistical modeling, machine learning and much more.")
7927 (license license:bsd-3)))
7928
7929 (define-public python-chardet
7930 (package
7931 (name "python-chardet")
7932 (version "3.0.4")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "chardet" version))
7937 (sha256
7938 (base32
7939 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7940 (native-inputs
7941 `(("python-hypothesis" ,python-hypothesis)
7942 ("python-pytest" ,python-pytest)
7943 ("python-pytest-runner" ,python-pytest-runner)))
7944 (build-system python-build-system)
7945 (home-page "https://github.com/chardet/chardet")
7946 (synopsis "Universal encoding detector for Python 2 and 3")
7947 (description
7948 "This package provides @code{chardet}, a Python module that can
7949 automatically detect a wide range of file encodings.")
7950 (license license:lgpl2.1+)))
7951
7952 (define-public python2-chardet
7953 (package-with-python2 python-chardet))
7954
7955 (define-public python-docopt
7956 (package
7957 (name "python-docopt")
7958 (version "0.6.2")
7959 (source
7960 (origin
7961 (method url-fetch)
7962 ;; The release on PyPI does not include tests.
7963 (uri (string-append
7964 "https://github.com/docopt/docopt/archive/"
7965 version ".tar.gz"))
7966 (file-name (string-append name "-" version ".tar.gz"))
7967 (sha256
7968 (base32
7969 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7970 (build-system python-build-system)
7971 (native-inputs
7972 `(("python-pytest" ,python-pytest)))
7973 (arguments
7974 `(#:phases
7975 (modify-phases %standard-phases
7976 (replace 'check
7977 (lambda _ (invoke "py.test"))))))
7978 (home-page "http://docopt.org")
7979 (synopsis "Command-line interface description language for Python")
7980 (description "This library allows the user to define a command-line
7981 interface from a program's help message rather than specifying it
7982 programmatically with command-line parsers like @code{getopt} and
7983 @code{argparse}.")
7984 (license license:expat)))
7985
7986 (define-public python2-docopt
7987 (package-with-python2 python-docopt))
7988
7989 (define-public python-pythondialog
7990 (package
7991 (name "python-pythondialog")
7992 (version "3.4.0")
7993 (source
7994 (origin
7995 (method url-fetch)
7996 (uri (pypi-uri "pythondialog" version))
7997 (sha256
7998 (base32
7999 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8000 (build-system python-build-system)
8001 (arguments
8002 `(#:phases
8003 (modify-phases %standard-phases
8004 (add-after 'unpack 'patch-path
8005 (lambda* (#:key inputs #:allow-other-keys)
8006 (let* ((dialog (assoc-ref inputs "dialog")))
8007 ;; Since this library really wants to grovel the search path, we
8008 ;; must hardcode dialog's store path into it.
8009 (substitute* "dialog.py"
8010 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8011 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8012 #t))))
8013 #:tests? #f)) ; no test suite
8014 (propagated-inputs
8015 `(("dialog" ,dialog)))
8016 (home-page "http://pythondialog.sourceforge.net/")
8017 (synopsis "Python interface to the UNIX dialog utility")
8018 (description "A Python wrapper for the dialog utility. Its purpose is to
8019 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8020 This allows one to make simple text-mode user interfaces on Unix-like systems")
8021 (license license:lgpl2.1)
8022 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8023
8024 (define-public python2-pythondialog
8025 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8026 (package
8027 (inherit base)
8028 (version (package-version python-pythondialog))
8029 (source (origin
8030 (method url-fetch)
8031 (uri (pypi-uri "python2-pythondialog" version))
8032 (sha256
8033 (base32
8034 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8035
8036 (define-public python-configobj
8037 (package
8038 (name "python-configobj")
8039 (version "5.0.6")
8040 (source (origin
8041 (method url-fetch)
8042 (uri (pypi-uri "configobj" version))
8043 (sha256
8044 (base32
8045 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8046 ;; Patch setup.py so it looks for python-setuptools, which is
8047 ;; required to parse the keyword 'install_requires' in setup.py.
8048 (patches (search-patches "python-configobj-setuptools.patch"))))
8049 (build-system python-build-system)
8050 (propagated-inputs
8051 `(("python-six" ,python-six)))
8052 (synopsis "Config file reading, writing and validation")
8053 (description "ConfigObj is a simple but powerful config file reader and
8054 writer: an ini file round tripper. Its main feature is that it is very easy to
8055 use, with a straightforward programmer’s interface and a simple syntax for
8056 config files.")
8057 (home-page "https://github.com/DiffSK/configobj")
8058 (license license:bsd-3)))
8059
8060 (define-public python2-configobj
8061 (package-with-python2 python-configobj))
8062
8063 (define-public python-configargparse
8064 (package
8065 (name "python-configargparse")
8066 (version "0.14.0")
8067 (source (origin
8068 (method url-fetch)
8069 (uri (pypi-uri "ConfigArgParse" version))
8070 (sha256
8071 (base32
8072 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8073 (build-system python-build-system)
8074 (native-inputs
8075 `(("python-pyyaml" ,python-pyyaml)))
8076 (arguments
8077 `(#:phases
8078 (modify-phases %standard-phases
8079 (replace 'check
8080 (lambda _
8081 ;; Bypass setuptools-shim because one test relies on "setup.py"
8082 ;; being the first argument passed to the python call.
8083 ;;
8084 ;; NOTE: Many tests do not run because they rely on Python's
8085 ;; built-in test.test_argparse, but we remove the unit tests from
8086 ;; our Python installation.
8087 (invoke "python" "setup.py" "test"))))))
8088 (synopsis "Replacement for argparse")
8089 (description "A drop-in replacement for argparse that allows options to also
8090 be set via config files and/or environment variables.")
8091 (home-page "https://github.com/bw2/ConfigArgParse")
8092 (license license:expat)))
8093
8094 (define-public python2-configargparse
8095 (package-with-python2 python-configargparse))
8096
8097 (define-public python-argparse-manpage
8098 (package
8099 (name "python-argparse-manpage")
8100 (version "1.1")
8101 (source
8102 (origin
8103 (method url-fetch)
8104 (uri (pypi-uri "argparse-manpage" version))
8105 (sha256
8106 (base32
8107 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8108 (build-system python-build-system)
8109 (home-page "https://github.com/praiskup/argparse-manpage")
8110 (synopsis "Build manual page from Python's ArgumentParser object")
8111 (description
8112 "This package provides tools to build manual pages from Python's
8113 @code{ArgumentParser} object.")
8114 (license license:asl2.0)))
8115
8116 (define-public python-contextlib2
8117 (package
8118 (name "python-contextlib2")
8119 (version "0.5.5")
8120 (source
8121 (origin
8122 (method url-fetch)
8123 (uri (pypi-uri "contextlib2" version))
8124 (sha256
8125 (base32
8126 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8127 (build-system python-build-system)
8128 (home-page "http://contextlib2.readthedocs.org/")
8129 (synopsis "Tools for decorators and context managers")
8130 (description "This module is primarily a backport of the Python
8131 3.2 contextlib to earlier Python versions. Like contextlib, it
8132 provides utilities for common tasks involving decorators and context
8133 managers. It also contains additional features that are not part of
8134 the standard library.")
8135 (license license:psfl)))
8136
8137 (define-public python2-contextlib2
8138 (package
8139 (name "python2-contextlib2")
8140 (version "0.5.5")
8141 (source
8142 (origin
8143 (method url-fetch)
8144 (uri (pypi-uri "contextlib2" version))
8145 (sha256
8146 (base32
8147 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8148 (build-system python-build-system)
8149 (arguments
8150 `(#:python ,python-2
8151 #:phases
8152 (modify-phases %standard-phases
8153 (replace 'check
8154 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8155 (native-inputs
8156 `(("python2-unittest2" ,python2-unittest2)))
8157 (home-page "http://contextlib2.readthedocs.org/")
8158 (synopsis "Tools for decorators and context managers")
8159 (description "This module is primarily a backport of the Python
8160 3.2 contextlib to earlier Python versions. Like contextlib, it
8161 provides utilities for common tasks involving decorators and context
8162 managers. It also contains additional features that are not part of
8163 the standard library.")
8164 (license license:psfl)))
8165
8166 (define-public python-texttable
8167 (package
8168 (name "python-texttable")
8169 (version "0.9.1")
8170 (source
8171 (origin
8172 (method url-fetch)
8173 (uri (pypi-uri "texttable" version))
8174 (sha256
8175 (base32
8176 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8177 (build-system python-build-system)
8178 (arguments '(#:tests? #f)) ; no tests
8179 (home-page "https://github.com/foutaise/texttable/")
8180 (synopsis "Python module for creating simple ASCII tables")
8181 (description "Texttable is a Python module for creating simple ASCII
8182 tables.")
8183 (license license:lgpl2.1+)))
8184
8185 (define-public python2-texttable
8186 (package-with-python2 python-texttable))
8187
8188 (define-public python-atomicwrites
8189 (package
8190 (name "python-atomicwrites")
8191 (version "1.1.5")
8192 (source (origin
8193 (method url-fetch)
8194 (uri (pypi-uri "atomicwrites" version))
8195 (sha256
8196 (base32
8197 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8198 (build-system python-build-system)
8199 (synopsis "Atomic file writes in Python")
8200 (description "Library for atomic file writes using platform dependent tools
8201 for atomic file system operations.")
8202 (home-page "https://github.com/untitaker/python-atomicwrites")
8203 (license license:expat)))
8204
8205 (define-public python2-atomicwrites
8206 (package-with-python2 python-atomicwrites))
8207
8208 (define-public python-click-threading
8209 (package
8210 (name "python-click-threading")
8211 (version "0.4.4")
8212 (source (origin
8213 (method url-fetch)
8214 (uri (pypi-uri "click-threading" version))
8215 (sha256
8216 (base32
8217 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8218 (build-system python-build-system)
8219 (propagated-inputs
8220 `(("python-click" ,python-click)))
8221 (synopsis "Utilities for multithreading in Click")
8222 (description "This package provides utilities for multithreading in Click
8223 applications.")
8224 (home-page "https://github.com/click-contrib/click-threading")
8225 (license license:expat)))
8226
8227 (define-public python-click-log
8228 (package
8229 (name "python-click-log")
8230 (version "0.3.2")
8231 (source (origin
8232 (method url-fetch)
8233 (uri (pypi-uri "click-log" version))
8234 (sha256
8235 (base32
8236 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8237 (build-system python-build-system)
8238 (propagated-inputs
8239 `(("python-click" ,python-click)))
8240 (synopsis "Logging for click applications")
8241 (description "This package provides a Python library for logging Click
8242 applications.")
8243 (home-page "https://github.com/click-contrib/click-log")
8244 (license license:expat)))
8245
8246 (define-public python-apipkg
8247 (package
8248 (name "python-apipkg")
8249 (version "1.4")
8250 (source (origin
8251 (method url-fetch)
8252 (uri (pypi-uri "apipkg" version))
8253 (sha256
8254 (base32
8255 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8256 (build-system python-build-system)
8257 (native-inputs
8258 `(("python-pytest" ,python-pytest)))
8259 (synopsis "Namespace control and lazy-import mechanism")
8260 (description "With apipkg you can control the exported namespace of a Python
8261 package and greatly reduce the number of imports for your users. It is a small
8262 pure Python module that works on virtually all Python versions.")
8263 (home-page "https://github.com/pytest-dev/apipkg")
8264 (license license:expat)))
8265
8266 (define-public python2-apipkg
8267 (package-with-python2 python-apipkg))
8268
8269 (define-public python-execnet
8270 (package
8271 (name "python-execnet")
8272 (version "1.4.1")
8273 (source (origin
8274 (method url-fetch)
8275 (uri (pypi-uri "execnet" version))
8276 (sha256
8277 (base32
8278 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8279 (build-system python-build-system)
8280 (arguments
8281 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8282 ;; The two test failures are caused by the lack of an `ssh` executable.
8283 ;; The test suite can be run with pytest after the 'install' phase.
8284 #:tests? #f))
8285 (native-inputs
8286 `(("python-pytest" ,python-pytest)
8287 ("python-setuptools-scm" ,python-setuptools-scm)))
8288 (propagated-inputs
8289 `(("python-apipkg" ,python-apipkg)))
8290 (synopsis "Rapid multi-Python deployment")
8291 (description "Execnet provides a share-nothing model with
8292 channel-send/receive communication for distributing execution across many
8293 Python interpreters across version, platform and network barriers. It has a
8294 minimal and fast API targeting the following uses:
8295 @enumerate
8296 @item distribute tasks to (many) local or remote CPUs
8297 @item write and deploy hybrid multi-process applications
8298 @item write scripts to administer multiple environments
8299 @end enumerate")
8300 (home-page "http://codespeak.net/execnet/")
8301 (license license:expat)))
8302
8303 (define-public python2-execnet
8304 (package-with-python2 python-execnet))
8305
8306 (define-public python-icalendar
8307 (package
8308 (name "python-icalendar")
8309 (version "4.0.3")
8310 (source (origin
8311 (method url-fetch)
8312 (uri (pypi-uri "icalendar" version))
8313 (sha256
8314 (base32
8315 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8316 (build-system python-build-system)
8317 (propagated-inputs
8318 `(("python-dateutil" ,python-dateutil)
8319 ("python-pytz" ,python-pytz)))
8320 (synopsis "Python library for parsing iCalendar files")
8321 (description "The icalendar package is a parser/generator of iCalendar
8322 files for use with Python.")
8323 (home-page "https://github.com/collective/icalendar")
8324 (license license:bsd-2)))
8325
8326 (define-public python-args
8327 (package
8328 (name "python-args")
8329 (version "0.1.0")
8330 (source (origin
8331 (method url-fetch)
8332 (uri (pypi-uri "args" version))
8333 (sha256
8334 (base32
8335 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8336 (build-system python-build-system)
8337 (home-page "https://github.com/kennethreitz/args")
8338 (synopsis "Command-line argument parser")
8339 (description
8340 "This library provides a Python module to parse command-line arguments.")
8341 (license license:bsd-3)))
8342
8343 (define-public python2-args
8344 (package-with-python2 python-args))
8345
8346 (define-public python-clint
8347 (package
8348 (name "python-clint")
8349 (version "0.5.1")
8350 (source (origin
8351 (method url-fetch)
8352 (uri (pypi-uri "clint" version))
8353 (sha256
8354 (base32
8355 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8356 (build-system python-build-system)
8357 (arguments
8358 '(#:phases
8359 (modify-phases %standard-phases
8360 (replace 'check
8361 (lambda _ (invoke "py.test" "-v"))))))
8362 (native-inputs
8363 `(("python-pytest" ,python-pytest)))
8364 (propagated-inputs
8365 `(("python-args" ,python-args)))
8366 (home-page "https://github.com/kennethreitz/clint")
8367 (synopsis "Command-line interface tools")
8368 (description
8369 "Clint is a Python module filled with a set of tools for developing
8370 command-line applications, including tools for colored and indented
8371 output, progress bar display, and pipes.")
8372 (license license:isc)))
8373
8374 (define-public python2-clint
8375 (package-with-python2 python-clint))
8376
8377 (define-public python-rply
8378 (package
8379 (name "python-rply")
8380 (version "0.7.5")
8381 (source (origin
8382 (method url-fetch)
8383 (uri (pypi-uri "rply" version))
8384 (sha256
8385 (base32
8386 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8387 (build-system python-build-system)
8388 (propagated-inputs
8389 `(("python-appdirs" ,python-appdirs)))
8390 (home-page "https://github.com/alex/rply")
8391 (synopsis "Parser generator for Python")
8392 (description
8393 "This package provides a pure Python based parser generator, that also
8394 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8395 with a new public API, and RPython support.")
8396 (license license:bsd-3)))
8397
8398 (define-public python2-rply
8399 (package-with-python2 python-rply))
8400
8401 (define-public python-hy
8402 (package
8403 (name "python-hy")
8404 (version "0.13.0")
8405 (source (origin
8406 (method url-fetch)
8407 (uri (pypi-uri "hy" version))
8408 (sha256
8409 (base32
8410 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8411 (build-system python-build-system)
8412 (arguments
8413 '(#:phases
8414 (modify-phases %standard-phases
8415 (replace 'check
8416 (lambda _
8417 ;; Tests require write access to HOME.
8418 (setenv "HOME" "/tmp")
8419 (invoke "nosetests"))))))
8420 (native-inputs
8421 `(("python-coverage" ,python-coverage)
8422 ("python-nose" ,python-nose)))
8423 (propagated-inputs
8424 `(("python-astor" ,python-astor)
8425 ("python-clint" ,python-clint)
8426 ("python-rply" ,python-rply)))
8427 (home-page "http://hylang.org/")
8428 (synopsis "Lisp frontend to Python")
8429 (description
8430 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8431 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8432 Python at your fingertips, in Lisp form.")
8433 (license license:expat)))
8434
8435 (define-public python2-hy
8436 (package-with-python2 python-hy))
8437
8438 (define-public python2-functools32
8439 (package
8440 (name "python2-functools32")
8441 (version "3.2.3-2")
8442 (source
8443 (origin
8444 (method url-fetch)
8445 (uri (pypi-uri "functools32" version))
8446 (sha256
8447 (base32
8448 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8449 (build-system python-build-system)
8450 (arguments
8451 `(#:python ,python-2
8452 #:tests? #f)) ; no test target
8453 (home-page "https://github.com/MiCHiLU/python-functools32")
8454 (synopsis
8455 "Backport of the functools module from Python 3.2.3")
8456 (description
8457 "This package is a backport of the @code{functools} module from Python
8458 3.2.3 for use with older versions of Python and PyPy.")
8459 (license license:expat)))
8460
8461 (define-public python2-subprocess32
8462 (package
8463 (name "python2-subprocess32")
8464 (version "3.2.7")
8465 (source (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "subprocess32" version))
8468 (sha256
8469 (base32
8470 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8471 (patches
8472 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8473 (build-system python-build-system)
8474 (arguments
8475 `(#:python ,python-2
8476 ;; The test suite fails with Python > 2.7.13:
8477 ;; import test.support
8478 ;; ImportError: No module named support
8479 #:tests? #f
8480 #:phases
8481 (modify-phases %standard-phases
8482 (add-after 'unpack 'patch-/bin/sh
8483 (lambda _
8484 (substitute* '("subprocess32.py"
8485 "test_subprocess32.py")
8486 (("/bin/sh") (which "sh")))
8487 #t)))))
8488 (home-page "https://github.com/google/python-subprocess32")
8489 (synopsis "Backport of the subprocess module from Python 3.2")
8490 (description
8491 "This is a backport of the @code{subprocess} standard library module
8492 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8493 new features. On POSIX systems it is guaranteed to be reliable when used
8494 in threaded applications. It includes timeout support from Python 3.3 but
8495 otherwise matches 3.2’s API.")
8496 (license license:psfl)))
8497
8498 (define-public python2-futures
8499 (package
8500 (name "python2-futures")
8501 (version "3.2.0")
8502 (source
8503 (origin
8504 (method url-fetch)
8505 (uri (pypi-uri "futures" version))
8506 (sha256
8507 (base32
8508 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8509 (build-system python-build-system)
8510 (arguments `(#:python ,python-2
8511 ;; FIXME: Python 2.7.14 moved the test.support library,
8512 ;; but our package has not yet been adjusted. Enable
8513 ;; tests when the python2 package has been fixed.
8514 #:tests? #f))
8515 (home-page "https://github.com/agronholm/pythonfutures")
8516 (synopsis
8517 "Backport of the concurrent.futures package from Python 3.2")
8518 (description
8519 "The concurrent.futures module provides a high-level interface for
8520 asynchronously executing callables. This package backports the
8521 concurrent.futures package from Python 3.2")
8522 (license license:bsd-3)))
8523
8524 (define-public python-promise
8525 (package
8526 (name "python-promise")
8527 (version "0.4.2")
8528 (source
8529 (origin
8530 (method url-fetch)
8531 (uri (pypi-uri "promise" version))
8532 (sha256
8533 (base32
8534 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8535 (build-system python-build-system)
8536 ;; Tests wants python-futures, which is a python2 only program, and
8537 ;; can't be found by python-promise at test time.
8538 (arguments `(#:tests? #f))
8539 (home-page "https://github.com/syrusakbary/promise")
8540 (synopsis "Promises/A+ implementation for Python")
8541 (description
8542 "Promises/A+ implementation for Python")
8543 (properties `((python2-variant . ,(delay python2-promise))))
8544 (license license:expat)))
8545
8546 (define-public python2-promise
8547 (let ((promise (package-with-python2
8548 (strip-python2-variant python-promise))))
8549 (package (inherit promise)
8550 (arguments (substitute-keyword-arguments (package-arguments promise)
8551 ((#:tests? _) #t)))
8552 (native-inputs
8553 `(("python2-futures" ,python2-futures)
8554 ("python2-pytest" ,python2-pytest)
8555 ,@(package-native-inputs promise))))))
8556
8557 (define-public python-progressbar33
8558 (package
8559 (name "python-progressbar33")
8560 (version "2.4")
8561 (source
8562 (origin
8563 (method url-fetch)
8564 (uri (pypi-uri "progressbar33" version))
8565 (sha256
8566 (base32
8567 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8568 (build-system python-build-system)
8569 (home-page "http://github.com/germangh/python-progressbar")
8570 (synopsis "Text progress bar library for Python")
8571 (description
8572 "This package provides a text progress bar library for Python. This
8573 version only differs from the original @code{progressbar} package in that it
8574 uses relative package imports instead of absolute imports, which is necessary
8575 for the module to work under Python 3.3.")
8576 ;; Either or both of these licenses may be selected.
8577 (license (list license:lgpl2.1+ license:bsd-3))))
8578
8579 (define-public python-colorama
8580 (package
8581 (name "python-colorama")
8582 (version "0.3.9")
8583 (source
8584 (origin
8585 (method url-fetch)
8586 (uri (pypi-uri "colorama" version))
8587 (sha256
8588 (base32
8589 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8590 (build-system python-build-system)
8591 (synopsis "Colored terminal text rendering for Python")
8592 (description "Colorama is a Python library for rendering colored terminal
8593 text.")
8594 (home-page "https://pypi.python.org/pypi/colorama")
8595 (license license:bsd-3)))
8596
8597 (define-public python2-colorama
8598 (package-with-python2 python-colorama))
8599
8600 (define-public python-rsa
8601 (package
8602 (name "python-rsa")
8603 (version "3.4.2")
8604 (source
8605 (origin
8606 (method url-fetch)
8607 (uri (pypi-uri "rsa" version))
8608 (sha256
8609 (base32
8610 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8611 (build-system python-build-system)
8612 (propagated-inputs
8613 `(("python-pyasn1" ,python-pyasn1)))
8614 (synopsis "Pure-Python RSA implementation")
8615 (description "Python-RSA is a pure-Python RSA implementation. It supports
8616 encryption and decryption, signing and verifying signatures, and key
8617 generation according to PKCS#1 version 1.5. It can be used as a Python
8618 library as well as on the command line.")
8619 (home-page "https://stuvel.eu/rsa")
8620 (license license:asl2.0)))
8621
8622 (define-public python2-rsa
8623 (package-with-python2 python-rsa))
8624
8625 (define-public python-pluggy
8626 (package
8627 (name "python-pluggy")
8628 (version "0.7.1")
8629 (source
8630 (origin
8631 (method url-fetch)
8632 (uri (pypi-uri "pluggy" version))
8633 (sha256
8634 (base32
8635 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8636 (build-system python-build-system)
8637 (native-inputs
8638 `(("python-setuptools-scm" ,python-setuptools-scm)))
8639 (synopsis "Plugin and hook calling mechanism for Python")
8640 (description "Pluggy is an extraction of the plugin manager as used by
8641 Pytest but stripped of Pytest specific details.")
8642 (home-page "https://pypi.python.org/pypi/pluggy")
8643 (license license:expat)))
8644
8645 (define-public python2-pluggy
8646 (package-with-python2 python-pluggy))
8647
8648 (define-public python-tox
8649 (package
8650 (name "python-tox")
8651 (version "2.8.1")
8652 (source
8653 (origin
8654 (method url-fetch)
8655 (uri (pypi-uri "tox" version))
8656 (sha256
8657 (base32
8658 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8659 (build-system python-build-system)
8660 (arguments
8661 ;; FIXME: Tests require pytest-timeout, which itself requires
8662 ;; pytest>=2.8.0 for installation.
8663 '(#:tests? #f))
8664 (propagated-inputs
8665 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8666 ("python-py" ,python-py)
8667 ("python-virtualenv" ,python-virtualenv)))
8668 (native-inputs
8669 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8670 ("python-pytest" ,python-pytest) ; >= 2.3.5
8671 ("python-setuptools-scm" ,python-setuptools-scm)))
8672 (home-page "http://tox.testrun.org/")
8673 (synopsis "Virtualenv-based automation of test activities")
8674 (description "Tox is a generic virtualenv management and test command line
8675 tool. It can be used to check that a package installs correctly with
8676 different Python versions and interpreters, or run tests in each type of
8677 supported environment, or act as a frontend to continuous integration
8678 servers.")
8679 (license license:expat)))
8680
8681 (define-public python2-tox
8682 (package-with-python2 python-tox))
8683
8684 (define-public python-jmespath
8685 (package
8686 (name "python-jmespath")
8687 (version "0.9.3")
8688 (source
8689 (origin
8690 (method url-fetch)
8691 (uri (pypi-uri "jmespath" version))
8692 (sha256
8693 (base32
8694 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8695 (build-system python-build-system)
8696 (native-inputs
8697 `(("python-nose" ,python-nose)))
8698 (synopsis "JSON Matching Expressions")
8699 (description "JMESPath (pronounced “james path”) is a Python library that
8700 allows one to declaratively specify how to extract elements from a JSON
8701 document.")
8702 (home-page "https://github.com/jmespath/jmespath.py")
8703 (license license:expat)))
8704
8705 (define-public python2-jmespath
8706 (package-with-python2 python-jmespath))
8707
8708 (define-public python-botocore
8709 (package
8710 (name "python-botocore")
8711 (version "1.12.149")
8712 (source
8713 (origin
8714 (method url-fetch)
8715 (uri (pypi-uri "botocore" version))
8716 (sha256
8717 (base32
8718 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8719 (build-system python-build-system)
8720 (arguments
8721 ;; FIXME: Many tests are failing.
8722 '(#:tests? #f))
8723 (propagated-inputs
8724 `(("python-dateutil" ,python-dateutil)
8725 ("python-docutils" ,python-docutils)
8726 ("python-jmespath" ,python-jmespath)))
8727 (native-inputs
8728 `(("python-mock" ,python-mock)
8729 ("python-nose" ,python-nose)
8730 ("behave" ,behave)
8731 ("python-tox" ,python-tox)
8732 ("python-urllib3" ,python-urllib3)
8733 ("python-wheel" ,python-wheel)))
8734 (home-page "https://github.com/boto/botocore")
8735 (synopsis "Low-level interface to AWS")
8736 (description "Botocore is a Python library that provides a low-level
8737 interface to the Amazon Web Services (AWS) API.")
8738 (license license:asl2.0)))
8739
8740 (define-public python2-botocore
8741 (package-with-python2 python-botocore))
8742
8743 (define-public python-xdo
8744 (package
8745 (name "python-xdo")
8746 (version "0.3")
8747 (source (origin
8748 (method url-fetch)
8749 (uri (string-append
8750 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8751 "python-xdo_" version ".orig.tar.gz"))
8752 (sha256
8753 (base32
8754 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8755 (build-system python-build-system)
8756 (arguments
8757 '(#:phases
8758 (modify-phases %standard-phases
8759 (add-before 'install 'patch-libxdo-path
8760 ;; Hardcode the path of dynamically loaded libxdo library.
8761 (lambda* (#:key inputs #:allow-other-keys)
8762 (let ((libxdo (string-append
8763 (assoc-ref inputs "xdotool")
8764 "/lib/libxdo.so")))
8765 (substitute* "xdo/_xdo.py"
8766 (("find_library\\(\"xdo\"\\)")
8767 (simple-format #f "\"~a\"" libxdo)))
8768 #t))))
8769 #:tests? #f)) ; no tests provided
8770 (propagated-inputs
8771 `(("python-six" ,python-six)))
8772 (inputs
8773 `(("xdotool" ,xdotool)
8774 ("libX11" ,libx11)))
8775 (home-page "https://tracker.debian.org/pkg/python-xdo")
8776 (synopsis "Python library for simulating X11 keyboard/mouse input")
8777 (description "Provides bindings to libxdo for manipulating X11 via simulated
8778 input. (Note that this is mostly a legacy library; you may wish to look at
8779 python-xdo for newer bindings.)")
8780 (license license:bsd-3)))
8781
8782 (define-public python2-xdo
8783 (package-with-python2 python-xdo))
8784
8785 (define-public python-mako
8786 (package
8787 (name "python-mako")
8788 (version "1.0.13")
8789 (source
8790 (origin
8791 (method url-fetch)
8792 (uri (pypi-uri "Mako" version))
8793 (sha256
8794 (base32
8795 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
8796 (build-system python-build-system)
8797 (propagated-inputs
8798 `(("python-markupsafe" ,python-markupsafe)))
8799 (native-inputs
8800 `(("python-mock" ,python-mock)
8801 ("python-nose" ,python-nose)
8802 ("python-pytest" ,python-pytest)))
8803 (home-page "https://www.makotemplates.org/")
8804 (synopsis "Templating language for Python")
8805 (description "Mako is a templating language for Python that compiles
8806 templates into Python modules.")
8807 (license license:expat)))
8808
8809 (define-public python2-mako
8810 (package-with-python2 python-mako))
8811
8812 (define-public python-waitress
8813 (package
8814 (name "python-waitress")
8815 (version "1.1.0")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "waitress" version))
8820 (patches (search-patches "python-waitress-fix-tests.patch"))
8821 (sha256
8822 (base32
8823 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8824 (build-system python-build-system)
8825 (home-page "https://github.com/Pylons/waitress")
8826 (synopsis "Waitress WSGI server")
8827 (description "Waitress is meant to be a production-quality pure-Python WSGI
8828 server with very acceptable performance.")
8829 (license license:zpl2.1)))
8830
8831 (define-public python2-waitress
8832 (package-with-python2 python-waitress))
8833
8834 (define-public python-pyquery
8835 (package
8836 (name "python-pyquery")
8837 (version "1.2.17")
8838 (source
8839 (origin
8840 (method url-fetch)
8841 (uri (pypi-uri "pyquery" version))
8842 (sha256
8843 (base32
8844 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8845 (build-system python-build-system)
8846 (native-inputs
8847 `(("python-webob" ,python-webob)
8848 ("python-webtest" ,python-webtest)))
8849 (propagated-inputs
8850 `(("python-lxml" ,python-lxml)
8851 ("python-cssselect" ,python-cssselect)))
8852 (home-page "https://github.com/gawel/pyquery")
8853 (synopsis "Make jQuery-like queries on xml documents")
8854 (description "pyquery allows you to make jQuery queries on xml documents.
8855 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8856 fast xml and html manipulation.")
8857 (license license:bsd-3)))
8858
8859 (define-public python-anyjson
8860 (package
8861 (name "python-anyjson")
8862 (version "0.3.3")
8863 (source
8864 (origin
8865 (method url-fetch)
8866 (uri (pypi-uri "anyjson" version))
8867 (sha256
8868 (base32
8869 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8870 (build-system python-build-system)
8871 (arguments
8872 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8873 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8874 ;; whatever) so this transformation needs to be done before the tests
8875 ;; can be run. Maybe we could add a build step to transform beforehand
8876 ;; but it could be annoying/difficult.
8877 ;; We can enable tests for the Python 2 version, though, and do below.
8878 #:tests? #f))
8879 (home-page "https://bitbucket.org/runeh/anyjson/")
8880 (synopsis
8881 "Wraps best available JSON implementation in a common interface")
8882 (description
8883 "Anyjson loads whichever is the fastest JSON module installed
8884 and provides a uniform API regardless of which JSON implementation is used.")
8885 (license license:bsd-3)
8886 (properties `((python2-variant . ,(delay python2-anyjson))))))
8887
8888 (define-public python2-anyjson
8889 (let ((anyjson (package-with-python2
8890 (strip-python2-variant python-anyjson))))
8891 (package
8892 (inherit anyjson)
8893 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8894 #:tests? #t
8895 ,@(package-arguments anyjson)))
8896 (native-inputs `(("python2-nose" ,python2-nose))))))
8897
8898 (define-public python-amqp
8899 (package
8900 (name "python-amqp")
8901 (version "2.3.2")
8902 (source
8903 (origin
8904 (method url-fetch)
8905 (uri (pypi-uri "amqp" version))
8906 (sha256
8907 (base32
8908 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8909 (build-system python-build-system)
8910 (native-inputs
8911 `(("python-case" ,python-case)
8912 ("python-pytest-sugar" ,python-pytest-sugar)
8913 ("python-mock" ,python-mock)))
8914 (propagated-inputs
8915 `(("python-vine" ,python-vine)))
8916 (home-page "https://github.com/celery/py-amqp")
8917 (synopsis
8918 "Low-level AMQP client for Python (fork of amqplib)")
8919 (description
8920 "This is a fork of amqplib which was originally written by Barry Pederson.
8921 It is maintained by the Celery project, and used by kombu as a pure python
8922 alternative when librabbitmq is not available.")
8923 (license license:lgpl2.1+)
8924 (properties `((python2-variant . ,(delay python2-amqp))))))
8925
8926 (define-public python2-amqp
8927 (let ((amqp (package-with-python2
8928 (strip-python2-variant python-amqp))))
8929 (package
8930 (inherit amqp)
8931 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8932 ;; unmaintained. Weirdly, does not do this on the python 3
8933 ;; version?
8934 #:tests? #f
8935 ,@(package-arguments amqp))))))
8936
8937 (define-public python-txamqp
8938 (package
8939 (name "python-txamqp")
8940 (version "0.8.2")
8941 (source
8942 (origin
8943 (method url-fetch)
8944 (uri (pypi-uri "txAMQP" version))
8945 (sha256
8946 (base32
8947 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8948 (build-system python-build-system)
8949 (propagated-inputs
8950 `(("python-six" ,python-six)
8951 ("python-twisted" ,python-twisted)))
8952 (home-page "https://github.com/txamqp/txamqp")
8953 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8954 (description
8955 "This package provides a Python library for communicating with AMQP peers
8956 and brokers using the asynchronous networking framework Twisted. It contains
8957 all the necessary code to connect, send and receive messages to/from an
8958 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8959 also includes support for using Thrift RPC over AMQP in Twisted
8960 applications.")
8961 (license license:asl2.0)))
8962
8963 (define-public python2-txamqp
8964 (package-with-python2 python-txamqp))
8965
8966 (define-public python-kombu
8967 (package
8968 (name "python-kombu")
8969 (version "4.2.2")
8970 (source
8971 (origin
8972 (method url-fetch)
8973 (uri (pypi-uri "kombu" version))
8974 (sha256
8975 (base32
8976 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8977 (build-system python-build-system)
8978 (native-inputs
8979 `(("python-mock" ,python-mock)
8980 ("python-case" ,python-case)
8981 ("python-pyro4" ,python-pyro4)
8982 ("python-pytest-sugar" ,python-pytest-sugar)
8983 ("python-pytz" ,python-pytz)))
8984 (propagated-inputs
8985 `(("python-anyjson" ,python-anyjson)
8986 ("python-amqp" ,python-amqp)
8987 ("python-redis" ,python-redis)))
8988 (home-page "https://kombu.readthedocs.io")
8989 (synopsis "Message passing library for Python")
8990 (description "The aim of Kombu is to make messaging in Python as easy as
8991 possible by providing an idiomatic high-level interface for the AMQ protocol,
8992 and also provide proven and tested solutions to common messaging problems.
8993 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8994 message orientation, queuing, routing, reliability and security, for which the
8995 RabbitMQ messaging server is the most popular implementation.")
8996 (license license:bsd-3)
8997 (properties `((python2-variant . ,(delay python2-kombu))))))
8998
8999 (define-public python2-kombu
9000 (let ((kombu (package-with-python2
9001 (strip-python2-variant python-kombu))))
9002 (package
9003 (inherit kombu)
9004 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9005 ;; It works fine on the python3 variant.
9006 #:tests? #f
9007 ,@(package-arguments kombu)))
9008 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9009 ,@(package-native-inputs kombu))))))
9010
9011 (define-public python-billiard
9012 (package
9013 (name "python-billiard")
9014 (version "3.5.0.5")
9015 (source
9016 (origin
9017 (method url-fetch)
9018 (uri (pypi-uri "billiard" version))
9019 (sha256
9020 (base32
9021 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9022 (build-system python-build-system)
9023 (native-inputs
9024 `(("python-case" ,python-case)
9025 ("python-pytest" ,python-pytest)))
9026 (home-page "https://github.com/celery/billiard")
9027 (synopsis
9028 "Python multiprocessing fork with improvements and bugfixes")
9029 (description
9030 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9031 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9032 pyprocessing package. This standalone variant is intended to be compatible with
9033 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9034 (license license:bsd-3)
9035 (properties `((python2-variant . ,(delay python2-billiard))))))
9036
9037 (define-public python2-billiard
9038 (let ((billiard (package-with-python2
9039 (strip-python2-variant python-billiard))))
9040 (package
9041 (inherit billiard)
9042 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9043 ("python2-mock" ,python2-mock)
9044 ,@(package-native-inputs billiard))))))
9045
9046 (define-public python-celery
9047 (package
9048 (name "python-celery")
9049 (version "4.2.1")
9050 (source
9051 (origin
9052 (method url-fetch)
9053 (uri (pypi-uri "celery" version))
9054 (sha256
9055 (base32
9056 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9057 (build-system python-build-system)
9058 (arguments
9059 '(;; TODO The tests fail with Python 3.7
9060 ;; https://github.com/celery/celery/issues/4849
9061 #:tests? #f
9062 #:phases
9063 (modify-phases %standard-phases
9064 (add-after 'unpack 'patch-requirements
9065 (lambda _
9066 (substitute* "requirements/test.txt"
9067 (("pytest>=3\\.0,<3\\.3")
9068 "pytest>=3.0"))
9069 #t)))))
9070 (native-inputs
9071 `(("python-case" ,python-case)
9072 ("python-pytest" ,python-pytest)))
9073 (propagated-inputs
9074 `(("python-pytz" ,python-pytz)
9075 ("python-billiard" ,python-billiard)
9076 ("python-kombu" ,python-kombu)))
9077 (home-page "https://celeryproject.org")
9078 (synopsis "Distributed Task Queue")
9079 (description "Celery is an asynchronous task queue/job queue based on
9080 distributed message passing. It is focused on real-time operation, but
9081 supports scheduling as well. The execution units, called tasks, are executed
9082 concurrently on a single or more worker servers using multiprocessing,
9083 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9084 synchronously (wait until ready).")
9085 (license license:bsd-3)
9086 (properties `((python2-variant . ,(delay python2-celery))))))
9087
9088 (define-public python2-celery
9089 (let ((celery (package-with-python2
9090 (strip-python2-variant python-celery))))
9091 (package
9092 (inherit celery)
9093 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9094 ("python2-mock" ,python2-mock)
9095 ,@(package-native-inputs celery))))))
9096
9097 (define-public python-translitcodec
9098 (package
9099 (name "python-translitcodec")
9100 (version "0.4.0")
9101 (source
9102 (origin
9103 (method url-fetch)
9104 (uri (pypi-uri "translitcodec" version))
9105 (sha256
9106 (base32
9107 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9108 (build-system python-build-system)
9109 (arguments
9110 `(#:tests? #f)) ; no tests provided
9111 (home-page
9112 "https://github.com/claudep/translitcodec")
9113 (synopsis
9114 "Unicode to 8-bit charset transliteration codec")
9115 (description
9116 "This package contains codecs for transliterating ISO 10646 texts into
9117 best-effort representations using smaller coded character sets (ASCII,
9118 ISO 8859, etc.).")
9119 (license license:expat)))
9120
9121 (define-public python2-translitcodec
9122 (package-with-python2 python-translitcodec))
9123
9124 (define-public python-editor
9125 (package
9126 (name "python-editor")
9127 (version "0.5")
9128 (source
9129 (origin
9130 (method url-fetch)
9131 (uri (pypi-uri "python-editor" version))
9132 (sha256
9133 (base32
9134 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9135 (build-system python-build-system)
9136 (home-page
9137 "https://github.com/fmoo/python-editor")
9138 (synopsis
9139 "Programmatically open an editor, capture the result")
9140 (description
9141 "python-editor is a library that provides the editor module for
9142 programmatically interfacing with your system's $EDITOR.")
9143 (license license:asl2.0)))
9144
9145 (define-public python2-editor
9146 (package-with-python2 python-editor))
9147
9148 (define-public python-vobject
9149 (package
9150 (name "python-vobject")
9151 (version "0.9.5")
9152 (source (origin
9153 (method url-fetch)
9154 (uri (pypi-uri "vobject" version))
9155 (sha256
9156 (base32
9157 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9158 (build-system python-build-system)
9159 (arguments
9160 '(;; The test suite relies on some non-portable Windows interfaces.
9161 #:tests? #f))
9162 (propagated-inputs
9163 `(("python-dateutil" ,python-dateutil)
9164 ("python-pyicu" ,python-pyicu)))
9165 (synopsis "Parse and generate vCard and vCalendar files")
9166 (description "Vobject is intended to be a full featured Python package for
9167 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9168 are supported and well tested. vCard 3.0 files are supported, and all data
9169 should be imported, but only a few components are understood in a sophisticated
9170 way.")
9171 (home-page "http://eventable.github.io/vobject/")
9172 (license license:asl2.0)))
9173
9174 (define-public python2-vobject
9175 (package-with-python2 python-vobject))
9176
9177 (define-public python-munkres
9178 (package
9179 (name "python-munkres")
9180 (version "1.0.8")
9181 (source (origin
9182 (method url-fetch)
9183 (uri (pypi-uri "munkres" version))
9184 (sha256
9185 (base32
9186 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9187 (build-system python-build-system)
9188 (arguments
9189 '(#:tests? #f)) ; no test suite
9190 (home-page "http://software.clapper.org/munkres/")
9191 (synopsis "Implementation of the Munkres algorithm")
9192 (description "The Munkres module provides an implementation of the Munkres
9193 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9194 useful for solving the Assignment Problem.")
9195 (license license:bsd-3)))
9196
9197 (define-public python2-munkres
9198 (package-with-python2 python-munkres))
9199
9200 (define-public python-whoosh
9201 (package
9202 (name "python-whoosh")
9203 (version "2.7.4")
9204 (source
9205 (origin
9206 (method url-fetch)
9207 (uri (pypi-uri "Whoosh" version))
9208 (sha256
9209 (base32
9210 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9211 (build-system python-build-system)
9212 (native-inputs
9213 `(("python-pytest" ,python-pytest)))
9214 (home-page "https://bitbucket.org/mchaput/whoosh")
9215 (synopsis "Full text indexing, search, and spell checking library")
9216 (description
9217 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9218 checking library.")
9219 (license license:bsd-2)))
9220
9221 (define-public python2-whoosh
9222 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9223 (package (inherit whoosh)
9224 (propagated-inputs
9225 `(("python2-backport-ssl-match-hostname"
9226 ,python2-backport-ssl-match-hostname)
9227 ,@(package-propagated-inputs whoosh))))))
9228
9229 (define-public python-pathlib
9230 (package
9231 (name "python-pathlib")
9232 (version "1.0.1")
9233 (source (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "pathlib" version))
9236 (sha256
9237 (base32
9238 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9239 (build-system python-build-system)
9240 ;; The tests depend on the internal "test" module, which does not provide
9241 ;; a stable interface.
9242 (arguments `(#:tests? #f))
9243 (home-page "https://pathlib.readthedocs.org/")
9244 (synopsis "Object-oriented file system paths")
9245 (description "Pathlib offers a set of classes to handle file system paths.
9246 It offers the following advantages over using string objects:
9247
9248 @enumerate
9249 @item No more cumbersome use of os and os.path functions. Everything can
9250 be done easily through operators, attribute accesses, and method calls.
9251 @item Embodies the semantics of different path types. For example,
9252 comparing Windows paths ignores casing.
9253 @item Well-defined semantics, eliminating any inconsistencies or
9254 ambiguities (forward vs. backward slashes, etc.).
9255 @end enumerate
9256
9257 Note: In Python 3.4, pathlib is now part of the standard library. For other
9258 Python versions please consider python-pathlib2 instead, which tracks the
9259 standard library module. This module (python-pathlib) isn't maintained
9260 anymore.")
9261 (license license:expat)))
9262
9263 (define-public python2-pathlib
9264 (package-with-python2 python-pathlib))
9265
9266 (define-public python2-pathlib2
9267 (package
9268 (name "python2-pathlib2")
9269 (version "2.3.2")
9270 (source (origin
9271 (method url-fetch)
9272 (uri (pypi-uri "pathlib2" version))
9273 (sha256
9274 (base32
9275 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9276 (build-system python-build-system)
9277 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9278 ;; version is 3.4 which already includes this package as part of the
9279 ;; standard library.
9280 (arguments
9281 `(#:python ,python-2))
9282 (propagated-inputs
9283 `(("python2-scandir" ,python2-scandir)
9284 ("python2-six" ,python2-six)))
9285 (home-page "https://pypi.python.org/pypi/pathlib2/")
9286 (synopsis "Object-oriented file system paths - backport of standard
9287 pathlib module")
9288 (description "The goal of pathlib2 is to provide a backport of standard
9289 pathlib module which tracks the standard library module, so all the newest
9290 features of the standard pathlib can be used also on older Python versions.
9291
9292 Pathlib offers a set of classes to handle file system paths. It offers the
9293 following advantages over using string objects:
9294
9295 @enumerate
9296 @item No more cumbersome use of os and os.path functions. Everything can
9297 be done easily through operators, attribute accesses, and method calls.
9298 @item Embodies the semantics of different path types. For example,
9299 comparing Windows paths ignores casing.
9300 @item Well-defined semantics, eliminating any inconsistencies or
9301 ambiguities (forward vs. backward slashes, etc.).
9302 @end enumerate")
9303 (license license:expat)))
9304
9305 (define-public python2-pathlib2-bootstrap
9306 (hidden-package
9307 (package
9308 (inherit python2-pathlib2)
9309 (name "python2-pathlib2-bootstrap")
9310 (propagated-inputs
9311 `(("python2-scandir" ,python2-scandir)
9312 ("python2-six" ,python2-six-bootstrap))))))
9313
9314 (define-public python-jellyfish
9315 (package
9316 (name "python-jellyfish")
9317 (version "0.5.6")
9318 (source (origin
9319 (method url-fetch)
9320 (uri (pypi-uri "jellyfish" version))
9321 (sha256
9322 (base32
9323 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9324 (build-system python-build-system)
9325 (native-inputs
9326 `(("python-pytest" ,python-pytest)))
9327 (home-page "https://github.com/jamesturk/jellyfish")
9328 (synopsis "Approximate and phonetic matching of strings")
9329 (description "Jellyfish uses a variety of string comparison and phonetic
9330 encoding algorithms to do fuzzy string matching.")
9331 (license license:bsd-2)
9332 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9333
9334 (define-public python2-jellyfish
9335 (let ((jellyfish (package-with-python2
9336 (strip-python2-variant python-jellyfish))))
9337 (package (inherit jellyfish)
9338 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9339 ,@(package-native-inputs jellyfish))))))
9340
9341 (define-public python2-unicodecsv
9342 (package
9343 (name "python2-unicodecsv")
9344 (version "0.14.1")
9345 (source (origin
9346 (method url-fetch)
9347 ;; The test suite is not included in the PyPi release.
9348 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9349 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9350 "archive/" version ".tar.gz"))
9351 (file-name (string-append name "-" version ".tar.gz"))
9352 (sha256
9353 (base32
9354 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9355 (build-system python-build-system)
9356 (arguments
9357 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9358 #:python ,python-2))
9359 (native-inputs
9360 `(("python2-unittest2" ,python2-unittest2)))
9361 (home-page "https://github.com/jdunck/python-unicodecsv")
9362 (synopsis "Unicode CSV module for Python 2")
9363 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9364 module, adding support for Unicode strings.")
9365 (license license:bsd-2)))
9366
9367 (define-public python-rarfile
9368 (package
9369 (name "python-rarfile")
9370 (version "2.8")
9371 (source (origin
9372 (method url-fetch)
9373 (uri (pypi-uri "rarfile" version))
9374 (sha256
9375 (base32
9376 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9377 (build-system python-build-system)
9378 (arguments
9379 '(#:phases
9380 (modify-phases %standard-phases
9381 (replace 'check
9382 ;; Many tests fail, but the installation proceeds.
9383 (lambda _ (invoke "make" "-C" "test" "test"))))))
9384 (native-inputs
9385 `(("which" ,which))) ; required for tests
9386 (propagated-inputs
9387 `(("libarchive" ,libarchive)))
9388 (home-page "https://github.com/markokr/rarfile")
9389 (synopsis "RAR archive reader for Python")
9390 (description "This is Python module for RAR archive reading. The interface
9391 is made as zipfile like as possible.")
9392 (license license:isc)))
9393
9394 (define-public python2-rarfile
9395 (package-with-python2 python-rarfile))
9396
9397 (define-public python-magic
9398 (package
9399 (name "python-magic")
9400 (version "0.4.15")
9401 (source
9402 (origin
9403 (method url-fetch)
9404 (uri (pypi-uri "python-magic" version))
9405 (sha256
9406 (base32
9407 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9408 (file-name (string-append name "-" version "-checkout"))))
9409 (build-system python-build-system)
9410 (arguments
9411 ;; The tests are unreliable, so don't run them. The tests fail
9412 ;; under Python3 because they were written for Python2 and
9413 ;; contain import statements that do not work in Python3. One of
9414 ;; the tests fails under Python2 because its assertions are
9415 ;; overly stringent; it relies on comparing output strings which
9416 ;; are brittle and can change depending on the version of
9417 ;; libmagic being used and the system on which the test is
9418 ;; running. In my case, under GuixSD 0.10.0, only one test
9419 ;; failed, and it seems to have failed only because the version
9420 ;; of libmagic that is packaged in Guix outputs a slightly
9421 ;; different (but not wrong) string than the one that the test
9422 ;; expected.
9423 '(#:tests? #f
9424 #:phases (modify-phases %standard-phases
9425 ;; Replace a specific method call with a hard-coded
9426 ;; path to the necessary libmagic.so file in the
9427 ;; store. If we don't do this, then the method call
9428 ;; will fail to find the libmagic.so file, which in
9429 ;; turn will cause any application using
9430 ;; python-magic to fail.
9431 (add-before 'build 'hard-code-path-to-libmagic
9432 (lambda* (#:key inputs #:allow-other-keys)
9433 (let ((file (assoc-ref inputs "file")))
9434 (substitute* "magic.py"
9435 (("ctypes.util.find_library\\('magic'\\)")
9436 (string-append "'" file "/lib/libmagic.so'")))
9437 #t)))
9438 (add-before 'install 'disable-egg-compression
9439 (lambda _
9440 (let ((port (open-file "setup.cfg" "a")))
9441 (display "\n[easy_install]\nzip_ok = 0\n"
9442 port)
9443 (close-port port)
9444 #t))))))
9445 (inputs
9446 ;; python-magic needs to be able to find libmagic.so.
9447 `(("file" ,file)))
9448 (home-page
9449 "https://github.com/ahupp/python-magic")
9450 (synopsis
9451 "File type identification using libmagic")
9452 (description
9453 "This module uses ctypes to access the libmagic file type
9454 identification library. It makes use of the local magic database and
9455 supports both textual and MIME-type output. Note that this module and
9456 the python-file module both provide a \"magic.py\" file; these two
9457 modules, which are different and were developed separately, both serve
9458 the same purpose: to provide Python bindings for libmagic.")
9459 (license license:expat)))
9460
9461 (define-public python2-magic
9462 (package-with-python2 python-magic))
9463
9464 (define-public python2-s3cmd
9465 (package
9466 (name "python2-s3cmd")
9467 (version "1.6.1")
9468 (source
9469 (origin
9470 (method url-fetch)
9471 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9472 "s3cmd-" version ".tar.gz"))
9473 (sha256
9474 (base32
9475 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9476 (build-system python-build-system)
9477 (arguments
9478 ;; s3cmd is written for python2 only and contains no tests.
9479 `(#:python ,python-2
9480 #:tests? #f))
9481 (propagated-inputs
9482 `(("python2-dateutil" ,python2-dateutil)
9483 ;; The python-file package also provides a magic.py module.
9484 ;; This is an unfortunate state of affairs; however, s3cmd
9485 ;; fails to install if it cannot find specifically the
9486 ;; python-magic package. Thus we include it, instead of using
9487 ;; python-file. Ironically, s3cmd sometimes works better
9488 ;; without libmagic bindings at all:
9489 ;; https://github.com/s3tools/s3cmd/issues/198
9490 ("python2-magic" ,python2-magic)))
9491 (home-page "http://s3tools.org/s3cmd")
9492 (synopsis "Command line tool for S3-compatible storage services")
9493 (description
9494 "S3cmd is a command line tool for uploading, retrieving and managing data
9495 in storage services that are compatible with the Amazon Simple Storage
9496 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9497 GnuPG encryption, and more. It also supports management of Amazon's
9498 CloudFront content delivery network.")
9499 (license license:gpl2+)))
9500
9501 (define-public python-pkgconfig
9502 (package
9503 (name "python-pkgconfig")
9504 (version "1.3.1")
9505 (source
9506 (origin
9507 (method url-fetch)
9508 (uri (pypi-uri "pkgconfig" version))
9509 (sha256
9510 (base32
9511 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9512 (build-system python-build-system)
9513 (native-inputs
9514 `(("python-nose" ,python-nose)))
9515 (inputs
9516 `(("pkg-config" ,pkg-config)))
9517 (arguments
9518 `(#:phases
9519 (modify-phases %standard-phases
9520 (add-before 'build 'patch
9521 ;; Hard-code the path to pkg-config.
9522 (lambda _
9523 (substitute* "pkgconfig/pkgconfig.py"
9524 (("cmd = 'pkg-config")
9525 (string-append "cmd = '" (which "pkg-config"))))
9526 #t))
9527 (replace 'check
9528 (lambda _
9529 (invoke "nosetests" "test.py"))))))
9530 (home-page "https://github.com/matze/pkgconfig")
9531 (synopsis "Python interface for pkg-config")
9532 (description "This module provides a Python interface to pkg-config. It
9533 can be used to find all pkg-config packages, check if a package exists,
9534 check if a package meets certain version requirements, query CFLAGS and
9535 LDFLAGS and parse the output to build extensions with setup.py.")
9536 (license license:expat)))
9537
9538 (define-public python2-pkgconfig
9539 (package-with-python2 python-pkgconfig))
9540
9541 (define-public python-bz2file
9542 (package
9543 (name "python-bz2file")
9544 (version "0.98")
9545 (source
9546 (origin
9547 (method url-fetch)
9548 (uri (pypi-uri "bz2file" version))
9549 (sha256
9550 (base32
9551 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9552 (build-system python-build-system)
9553 (arguments
9554 `(#:tests? #f)) ; Tests use deprecated python modules.
9555 (home-page "https://github.com/nvawda/bz2file")
9556 (synopsis "Read and write bzip2-compressed files")
9557 (description
9558 "Bz2file is a Python library for reading and writing bzip2-compressed
9559 files. It contains a drop-in replacement for the I/O interface in the
9560 standard library's @code{bz2} module, including features from the latest
9561 development version of CPython that are not available in older releases.")
9562 (license license:asl2.0)))
9563
9564 (define-public python2-bz2file
9565 (package-with-python2 python-bz2file))
9566
9567 (define-public python-future
9568 (package
9569 (name "python-future")
9570 (version "0.17.1")
9571 (source
9572 (origin
9573 (method url-fetch)
9574 (uri (pypi-uri "future" version))
9575 (sha256
9576 (base32
9577 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9578 (build-system python-build-system)
9579 ;; Many tests connect to the network or are otherwise flawed.
9580 ;; https://github.com/PythonCharmers/python-future/issues/210
9581 (arguments
9582 `(#:tests? #f))
9583 (home-page "http://python-future.org")
9584 (synopsis "Single-source support for Python 3 and 2")
9585 (description
9586 "@code{python-future} is the missing compatibility layer between Python 2 and
9587 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9588 to support both Python 2 and Python 3 with minimal overhead.")
9589 (license license:expat)))
9590
9591 (define-public python2-future
9592 (package-with-python2 python-future))
9593
9594 (define-public python-cysignals
9595 (package
9596 (name "python-cysignals")
9597 (version "1.9.0")
9598 (source
9599 (origin
9600 (method url-fetch)
9601 (uri (pypi-uri "cysignals" version))
9602 (sha256
9603 (base32
9604 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9605 (build-system python-build-system)
9606 (native-inputs
9607 `(("python-cython" ,python-cython)
9608 ("python-sphinx" ,python-sphinx)))
9609 (inputs
9610 `(("pari-gp" ,pari-gp)))
9611 (arguments
9612 `(#:modules ((guix build python-build-system)
9613 ((guix build gnu-build-system) #:prefix gnu:)
9614 (guix build utils))
9615 ;; FIXME: Tests are executed after installation and currently fail
9616 ;; when not installing into standard locations; the author is working
9617 ;; on a fix.
9618 #:tests? #f
9619 #:phases
9620 (modify-phases %standard-phases
9621 (add-before
9622 'build 'configure
9623 (assoc-ref gnu:%standard-phases 'configure)))))
9624 (home-page
9625 "https://github.com/sagemath/cysignals")
9626 (synopsis
9627 "Handling of interrupts and signals for Cython")
9628 (description
9629 "The cysignals package provides mechanisms to handle interrupts (and
9630 other signals and errors) in Cython code, using two related approaches,
9631 for mixed Cython/Python code or external C libraries and pure Cython code,
9632 respectively.")
9633 (license license:lgpl3+)))
9634
9635 (define-public python2-cysignals
9636 (package-with-python2 python-cysignals))
9637
9638 (define-public python2-shedskin
9639 (package
9640 (name "python2-shedskin")
9641 (version "0.9.4")
9642 (source
9643 (origin
9644 (method url-fetch)
9645 (uri (string-append "https://github.com/shedskin/shedskin/"
9646 "releases/download/v" version
9647 "/shedskin-" version ".tgz"))
9648 (sha256
9649 (base32
9650 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9651 (build-system python-build-system)
9652 (arguments
9653 `(#:python ,python-2
9654 #:phases (modify-phases %standard-phases
9655 (add-after 'unpack 'fix-resulting-include-libs
9656 (lambda* (#:key inputs #:allow-other-keys)
9657 (let ((libgc (assoc-ref inputs "libgc"))
9658 (pcre (assoc-ref inputs "pcre")))
9659 (substitute* "shedskin/makefile.py"
9660 (("variable == 'CCFLAGS':[ ]*")
9661 (string-append "variable == 'CCFLAGS':\n"
9662 " line += ' -I " pcre "/include"
9663 " -I " libgc "/include'"))
9664 (("variable == 'LFLAGS':[ ]*")
9665 (string-append "variable == 'LFLAGS':\n"
9666 " line += ' -L" pcre "/lib"
9667 " -L " libgc "/lib'")))
9668 #t))))))
9669 (inputs `(("pcre" ,pcre)
9670 ("libgc" ,libgc)))
9671 (home-page "https://shedskin.github.io/")
9672 (synopsis "Experimental Python-2 to C++ Compiler")
9673 (description (string-append "This is an experimental compiler for a subset of
9674 Python. It generates C++ code and a Makefile."))
9675 (license (list license:gpl3 license:bsd-3 license:expat))))
9676
9677 (define-public python2-rope
9678 (package
9679 (name "python2-rope")
9680 (version "0.11.0")
9681 (source
9682 (origin
9683 (method url-fetch)
9684 (uri (pypi-uri "rope" version))
9685 (sha256
9686 (base32
9687 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9688 (arguments
9689 ;; Rope has only partial python3 support, see `python-rope'
9690 `(#:python ,python-2))
9691 (build-system python-build-system)
9692 (native-inputs
9693 `(("python2-unittest2" ,python2-unittest2)))
9694 (home-page "https://github.com/python-rope/rope")
9695 (synopsis "Refactoring library for Python")
9696 (description "Rope is a refactoring library for Python. It facilitates
9697 the renaming, moving and extracting of attributes, functions, modules, fields
9698 and parameters in Python 2 source code. These refactorings can also be applied
9699 to occurrences in strings and comments.")
9700 (license license:gpl2)))
9701
9702 (define-public python-rope
9703 (package
9704 (inherit python2-rope)
9705 (name "python-rope")
9706 (arguments `(#:python ,python-wrapper
9707 ;; XXX: Only partial python3 support, results in some failing
9708 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9709 #:tests? #f))
9710 (properties `((python2-variant . ,(delay python2-rope))))))
9711
9712 (define-public python-py3status
9713 (package
9714 (name "python-py3status")
9715 (version "3.16")
9716 (source
9717 (origin
9718 (method url-fetch)
9719 (uri (pypi-uri "py3status" version))
9720 (sha256
9721 (base32
9722 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9723 (build-system python-build-system)
9724 (inputs
9725 `(("file" ,file)))
9726 (arguments
9727 '(#:phases
9728 (modify-phases %standard-phases
9729 ;; 'file' is used for detection of configuration file encoding
9730 ;; let's make link the dependency to particular input
9731 (add-before 'build 'patch-file-path
9732 (lambda* (#:key inputs #:allow-other-keys)
9733 (let ((file-path (assoc-ref inputs "file")))
9734 (substitute* "py3status/parse_config.py"
9735 (("\\['file', '-b'")
9736 (string-append "['" file-path "/bin/file', '-b'")))
9737 #t))))
9738 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9739 (home-page "https://github.com/ultrabug/py3status")
9740 (synopsis "Extensible i3status wrapper written in Python")
9741 (description "py3status is an i3status wrapper which extends i3status
9742 functionality in a modular way, allowing you to extend your panel with your
9743 own code, responding to click events and updating clock every second.")
9744 (license license:bsd-3)))
9745
9746 (define-public python-tblib
9747 (package
9748 (name "python-tblib")
9749 (version "1.3.2")
9750 (source (origin
9751 (method url-fetch)
9752 (uri (pypi-uri "tblib" version))
9753 (sha256 (base32
9754 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9755 (build-system python-build-system)
9756 (arguments
9757 `(#:phases
9758 (modify-phases %standard-phases
9759 (add-before 'check 'adjust-tests
9760 (lambda _
9761 (when (which "python3")
9762 ;; Adjust the example output to match that of Python 3.7:
9763 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9764 (substitute* "README.rst"
9765 (("Exception\\('fail',") "Exception('fail'"))
9766 #t)))
9767 (replace 'check
9768 (lambda _
9769 ;; Upstream runs tests after installation and the package itself
9770 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9771 ;; found.
9772 (setenv "PYTHONPATH"
9773 (string-append (getcwd) "/build/lib:"
9774 (getenv "PYTHONPATH")))
9775 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9776 (native-inputs
9777 `(("python-pytest" ,python-pytest)
9778 ("python-six" ,python-six)))
9779 (home-page "https://github.com/ionelmc/python-tblib")
9780 (synopsis "Traceback serialization library")
9781 (description
9782 "Traceback serialization allows you to:
9783
9784 @enumerate
9785 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9786 different processes. This allows better error handling when running code over
9787 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9788
9789 @item Parse traceback strings and raise with the parsed tracebacks.
9790 @end enumerate\n")
9791 (license license:bsd-3)))
9792
9793 (define-public python2-tblib
9794 (package-with-python2 python-tblib))
9795
9796 (define-public python-greenlet
9797 (package
9798 (name "python-greenlet")
9799 (version "0.4.15")
9800 (source (origin
9801 (method url-fetch)
9802 (uri (pypi-uri "greenlet" version))
9803 (sha256
9804 (base32
9805 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9806 (build-system python-build-system)
9807 (home-page "https://greenlet.readthedocs.io/")
9808 (synopsis "Lightweight in-process concurrent programming")
9809 (description
9810 "Greenlet package is a spin-off of Stackless, a version of CPython
9811 that supports micro-threads called \"tasklets\". Tasklets run
9812 pseudo-concurrently (typically in a single or a few OS-level threads) and
9813 are synchronized with data exchanges on \"channels\".")
9814 (license (list license:psfl license:expat))))
9815
9816 (define-public python2-greenlet
9817 (package-with-python2 python-greenlet))
9818
9819 (define-public python-objgraph
9820 (package
9821 (name "python-objgraph")
9822 (version "3.4.0")
9823 (source
9824 (origin
9825 (method url-fetch)
9826 (uri (pypi-uri "objgraph" version))
9827 (sha256
9828 (base32
9829 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9830 (build-system python-build-system)
9831 (propagated-inputs
9832 `(("python-graphviz" ,python-graphviz)))
9833 (native-inputs
9834 `(("python-mock" ,python-mock)
9835 ("graphviz" ,graphviz)))
9836 (home-page "https://mg.pov.lt/objgraph/")
9837 (synopsis "Draw Python object reference graphs with graphviz")
9838 (description
9839 "This package provides tools to draw Python object reference graphs with
9840 graphviz.")
9841 (license license:expat)))
9842
9843 (define-public python-gevent
9844 (package
9845 (name "python-gevent")
9846 (version "1.3.7")
9847 (source (origin
9848 (method url-fetch)
9849 (uri (pypi-uri "gevent" version))
9850 (sha256
9851 (base32
9852 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9853 (modules '((guix build utils)))
9854 (snippet
9855 '(begin
9856 ;; unbunding libev and c-ares
9857 (delete-file-recursively "deps")
9858 #t))))
9859 (build-system python-build-system)
9860 (arguments
9861 `(#:modules ((ice-9 ftw)
9862 (ice-9 match)
9863 (srfi srfi-26)
9864 (guix build utils)
9865 (guix build python-build-system))
9866 #:phases (modify-phases %standard-phases
9867 (add-after 'unpack 'unpack-libev
9868 (lambda* (#:key inputs #:allow-other-keys)
9869 (mkdir-p "deps/libev")
9870 ;; FIXME: gevent requires building libev, even though
9871 ;; it only links against the proper one.
9872 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9873 "--strip-components=1" "-C" "deps/libev")))
9874 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9875 (lambda _
9876 (substitute* "src/gevent/subprocess.py"
9877 (("/bin/sh") (which "sh")))
9878 (for-each (lambda (file)
9879 (substitute* file
9880 (("/bin/sh") (which "sh"))
9881 (("/bin/true") (which "true"))))
9882 (find-files "src/greentest" "\\.py$"))
9883 #t))
9884 (add-before 'build 'do-not-use-bundled-sources
9885 (lambda* (#:key inputs #:allow-other-keys)
9886 (setenv "CONFIG_SHELL" (which "bash"))
9887 (setenv "LIBEV_EMBED" "false")
9888 (setenv "CARES_EMBED" "false")
9889 (setenv "EMBED" "false")
9890
9891 (let ((greenlet (string-append
9892 (assoc-ref inputs "python-greenlet")
9893 "/include")))
9894 (match (scandir greenlet
9895 (lambda (item)
9896 (string-prefix? "python" item)))
9897 ((python)
9898 (setenv "CPATH"
9899 (string-append greenlet "/" python)))))
9900 #t))
9901 (add-before 'check 'skip-timer-test
9902 (lambda _
9903 ;; XXX: Skip 'TestTimerResolution', which appears to be
9904 ;; unreliable.
9905 (substitute* "src/greentest/test__core_timer.py"
9906 (("not greentest.RUNNING_ON_CI") "False"))
9907 #t))
9908 (replace 'check
9909 (lambda _
9910 ;; Make sure the build directory is on PYTHONPATH.
9911 (setenv "PYTHONPATH"
9912 (string-append
9913 (getenv "PYTHONPATH") ":"
9914 (getcwd) "/build/"
9915 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9916 (with-directory-excursion "src/greentest"
9917 ;; XXX: Many tests require network access. Instead we only
9918 ;; run known-good tests. Unfortunately we cannot use
9919 ;; recursion here since this directory also contains
9920 ;; Python-version-specific subfolders.
9921 (apply invoke "python" "testrunner.py" "--config"
9922 "known_failures.py"
9923 (scandir "." (cut regexp-exec
9924 (make-regexp "test_+(subprocess|core)")
9925 <>)))))))))
9926 (propagated-inputs
9927 `(("python-greenlet" ,python-greenlet)
9928 ("python-objgraph" ,python-objgraph)))
9929 (native-inputs
9930 `(("libev-source" ,(package-source libev))
9931 ("python-six" ,python-six)))
9932 (inputs
9933 `(("c-ares" ,c-ares)
9934 ("libev" ,libev)))
9935 (home-page "http://www.gevent.org/")
9936 (synopsis "Coroutine-based network library")
9937 (description
9938 "gevent is a coroutine-based Python networking library that uses greenlet
9939 to provide a high-level synchronous API on top of the libev event loop.")
9940 (license license:expat)
9941 (properties `((python2-variant . ,(delay python2-gevent))))))
9942
9943 (define-public python2-gevent
9944 (let ((base (package-with-python2
9945 (strip-python2-variant python-gevent))))
9946 (package
9947 (inherit base)
9948 (native-inputs `(,@(package-native-inputs python-gevent)
9949 ("python-mock" ,python2-mock))))))
9950
9951 (define-public python-fastimport
9952 (package
9953 (name "python-fastimport")
9954 (version "0.9.6")
9955 (source
9956 (origin
9957 (method url-fetch)
9958 (uri (pypi-uri "fastimport" version))
9959 (sha256
9960 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9961 (build-system python-build-system)
9962 (home-page "https://github.com/jelmer/python-fastimport")
9963 (synopsis "VCS fastimport parser and generator in Python")
9964 (description "This package provides a parser for and generator of the Git
9965 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9966 format.")
9967 (license license:gpl2+)))
9968
9969 (define-public python2-fastimport
9970 (package-with-python2 python-fastimport))
9971
9972 (define-public python-twisted
9973 (package
9974 (name "python-twisted")
9975 (version "19.2.1")
9976 (source (origin
9977 (method url-fetch)
9978 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9979 (sha256
9980 (base32
9981 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
9982 (build-system python-build-system)
9983 (arguments
9984 '(#:tests? #f)) ; FIXME: some tests fail
9985 (propagated-inputs
9986 `(("python-zope-interface" ,python-zope-interface)
9987 ("python-pyhamcrest" ,python-pyhamcrest)
9988 ("python-incremental" ,python-incremental)
9989 ("python-hyperlink" ,python-hyperlink)
9990 ("python-constantly" ,python-constantly)
9991 ("python-automat" ,python-automat)))
9992 (home-page "https://twistedmatrix.com/")
9993 (synopsis "Asynchronous networking framework written in Python")
9994 (description
9995 "Twisted is an extensible framework for Python programming, with special
9996 focus on event-based network programming and multiprotocol integration.")
9997 (license license:expat)))
9998
9999 (define-public python2-twisted
10000 (package-with-python2 python-twisted))
10001
10002 (define-public python-pika
10003 (package
10004 (name "python-pika")
10005 (version "0.12.0")
10006 (source
10007 (origin
10008 (method url-fetch)
10009 (uri (pypi-uri "pika" version))
10010 (sha256
10011 (base32
10012 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10013 (build-system python-build-system)
10014 (native-inputs
10015 `(("python-pyev" ,python-pyev)
10016 ("python-tornado" ,python-tornado)
10017 ("python-twisted" ,python-twisted)))
10018 (home-page "https://pika.readthedocs.org")
10019 (synopsis "Pure Python AMQP Client Library")
10020 (description
10021 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10022 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10023 network support library.")
10024 (license license:bsd-3)))
10025
10026 (define-public python2-pika
10027 (package-with-python2 python-pika))
10028
10029 (define-public python-ply
10030 (package
10031 (name "python-ply")
10032 (version "3.10")
10033 (source
10034 (origin
10035 (method url-fetch)
10036 (uri (pypi-uri "ply" version))
10037 (sha256
10038 (base32
10039 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10040 (build-system python-build-system)
10041 (home-page "http://www.dabeaz.com/ply/")
10042 (synopsis "Python Lex & Yacc")
10043 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10044 It uses LR parsing and does extensive error checking.")
10045 (license license:bsd-3)))
10046
10047 (define-public python2-ply
10048 (package-with-python2 python-ply))
10049
10050 (define-public python-tabulate
10051 (package
10052 (name "python-tabulate")
10053 (version "0.7.7")
10054 (source (origin
10055 (method url-fetch)
10056 (uri (pypi-uri "tabulate" version))
10057 (sha256
10058 (base32
10059 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10060 (build-system python-build-system)
10061 (arguments
10062 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10063 ;; and the latest release is not tagged in the upstream repository.
10064 '(#:tests? #f))
10065 (home-page "https://bitbucket.org/astanin/python-tabulate")
10066 (synopsis "Pretty-print tabular data")
10067 (description
10068 "Tabulate is a library and command-line utility to pretty-print tabular
10069 data in Python.")
10070 (license license:expat)))
10071
10072 (define-public python2-tabulate
10073 (package-with-python2 python-tabulate))
10074
10075 (define-public python-kazoo
10076 (package
10077 (name "python-kazoo")
10078 (version "2.4.0")
10079 (source
10080 (origin
10081 (method url-fetch)
10082 (uri (pypi-uri "kazoo" version))
10083 (sha256
10084 (base32
10085 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10086 (build-system python-build-system)
10087 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10088 (propagated-inputs
10089 `(("python-six" ,python-six)))
10090 (home-page "https://kazoo.readthedocs.org")
10091 (synopsis "High-level Zookeeper client library")
10092 (description
10093 "Kazoo is a Python client library for the Apache Zookeeper distributed
10094 application service. It is designed to be easy to use and to avoid common
10095 programming errors.")
10096 (license license:asl2.0)))
10097
10098 (define-public python2-kazoo
10099 (package-with-python2 python-kazoo))
10100
10101 (define-public python-pykafka
10102 (package
10103 (name "python-pykafka")
10104 (version "2.4.0")
10105 (source (origin
10106 (method url-fetch)
10107 (uri (pypi-uri "pykafka" version))
10108 (sha256
10109 (base32
10110 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10111 (build-system python-build-system)
10112 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10113 (propagated-inputs
10114 `(("python-gevent" ,python-gevent)
10115 ("python-kazoo" ,python-kazoo)
10116 ("python-tabulate" ,python-tabulate)))
10117 (inputs
10118 `(("librdkafka" ,librdkafka)))
10119 (home-page "https://pykafka.readthedocs.io/")
10120 (synopsis "Apache Kafka client for Python")
10121 (description
10122 "PyKafka is a client for the Apache Kafka distributed messaging system.
10123 It includes Python implementations of Kafka producers and consumers, which
10124 are optionally backed by a C extension built on librdkafka.")
10125 (license license:asl2.0)))
10126
10127 (define-public python2-pykafka
10128 (package-with-python2 python-pykafka))
10129
10130 (define-public python-wcwidth
10131 (package
10132 (name "python-wcwidth")
10133 (version "0.1.7")
10134 (source
10135 (origin
10136 (method url-fetch)
10137 (uri (pypi-uri "wcwidth" version))
10138 (sha256
10139 (base32
10140 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10141 (build-system python-build-system)
10142 (home-page "https://github.com/jquast/wcwidth")
10143 (synopsis "Measure number of terminal column cells of wide-character codes")
10144 (description "Wcwidth measures the number of terminal column cells of
10145 wide-character codes. It is useful for those implementing a terminal emulator,
10146 or programs that carefully produce output to be interpreted by one. It is a
10147 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10148 specified in POSIX.1-2001 and POSIX.1-2008.")
10149 (license license:expat)))
10150
10151 (define-public python2-wcwidth
10152 (package-with-python2 python-wcwidth))
10153
10154 (define-public python2-jsonrpclib
10155 (package
10156 (name "python2-jsonrpclib")
10157 (version "0.1.7")
10158 (source (origin
10159 (method url-fetch)
10160 (uri (pypi-uri "jsonrpclib" version))
10161 (sha256
10162 (base32
10163 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10164 (build-system python-build-system)
10165 (arguments
10166 `(#:tests? #f
10167 #:python ,python-2))
10168 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10169 (synopsis "Implementation of JSON-RPC specification for Python")
10170 (description
10171 "This library is an implementation of the JSON-RPC specification.
10172 It supports both the original 1.0 specification, as well as the
10173 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10174 etc.")
10175 (license license:asl2.0)))
10176
10177 (define-public python-chai
10178 (package
10179 (name "python-chai")
10180 (version "1.1.2")
10181 (source (origin
10182 (method url-fetch)
10183 (uri (pypi-uri "chai" version))
10184 (sha256
10185 (base32
10186 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10187 (build-system python-build-system)
10188 (home-page "https://github.com/agoragames/chai")
10189 (synopsis "Mocking framework for Python")
10190 (description
10191 "Chai provides an api for mocking, stubbing and spying your python
10192 objects, patterned after the Mocha library for Ruby.")
10193 (license license:bsd-3)))
10194
10195 (define-public python2-chai
10196 (package-with-python2 python-chai))
10197
10198 (define-public python-inflection
10199 (package
10200 (name "python-inflection")
10201 (version "0.3.1")
10202 (source
10203 (origin (method url-fetch)
10204 (uri (pypi-uri "inflection" version))
10205 (sha256
10206 (base32
10207 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10208 (build-system python-build-system)
10209 (native-inputs
10210 `(("python-pytest" ,python-pytest)))
10211 (home-page "https://github.com/jpvanhal/inflection")
10212 (synopsis "Python string transformation library")
10213 (description
10214 "Inflection is a string transformation library. It singularizes
10215 and pluralizes English words, and transforms strings from CamelCase to
10216 underscored string.")
10217 (license license:expat)))
10218
10219 (define-public python2-inflection
10220 (package-with-python2 python-inflection))
10221
10222 (define-public python-pylev
10223 (package
10224 (name "python-pylev")
10225 (version "1.3.0")
10226 (source (origin
10227 (method url-fetch)
10228 (uri (pypi-uri "pylev" version))
10229 (sha256
10230 (base32
10231 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10232 (build-system python-build-system)
10233 (home-page "https://github.com/toastdriven/pylev")
10234 (synopsis "Levenshtein distance implementation in Python")
10235 (description "Pure Python Levenshtein implementation, based off the
10236 Wikipedia code samples at
10237 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10238 (license license:bsd-3)))
10239
10240 (define-public python2-pylev
10241 (package-with-python2 python-pylev))
10242
10243 (define-public python-cleo
10244 (package
10245 (name "python-cleo")
10246 (version "0.6.1")
10247 (source (origin
10248 (method url-fetch)
10249 (uri (pypi-uri "cleo" version))
10250 (sha256
10251 (base32
10252 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10253 (build-system python-build-system)
10254 (native-inputs
10255 `(;; For testing
10256 ("python-mock" ,python-mock)
10257 ("python-pytest-mock" ,python-pytest-mock)
10258 ("python-pytest" ,python-pytest)))
10259 (propagated-inputs
10260 `(("python-backpack" ,python-backpack)
10261 ("python-pastel" ,python-pastel)
10262 ("python-pylev" ,python-pylev)))
10263 (home-page "https://github.com/sdispater/cleo")
10264 (synopsis "Command-line arguments library for Python")
10265 (description
10266 "Cleo allows you to create command-line commands with signature in
10267 docstring and colored output.")
10268 (license license:expat)))
10269
10270 (define-public python2-cleo
10271 (package-with-python2 python-cleo))
10272
10273 (define-public python-lazy-object-proxy
10274 (package
10275 (name "python-lazy-object-proxy")
10276 (version "1.3.1")
10277 (source (origin
10278 (method url-fetch)
10279 (uri (pypi-uri "lazy-object-proxy" version))
10280 (sha256
10281 (base32
10282 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10283 (build-system python-build-system)
10284 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10285 (synopsis "Lazy object proxy for python")
10286 (description
10287 "Lazy object proxy is an object that wraps a callable but defers the call
10288 until the object is actually required, and caches the result of said call.")
10289 (license license:bsd-2)))
10290
10291 (define-public python2-lazy-object-proxy
10292 (package-with-python2 python-lazy-object-proxy))
10293
10294 (define-public python-dnspython
10295 (package
10296 (name "python-dnspython")
10297 (version "1.15.0")
10298 (source (origin
10299 (method url-fetch)
10300 (uri (string-append "http://www.dnspython.org/kits/"
10301 version "/dnspython-" version ".tar.gz"))
10302 (sha256
10303 (base32
10304 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10305 (build-system python-build-system)
10306 (arguments '(#:tests? #f)) ; XXX: requires internet access
10307 (home-page "http://www.dnspython.org")
10308 (synopsis "DNS toolkit for Python")
10309 (description
10310 "dnspython is a DNS toolkit for Python. It supports almost all record
10311 types. It can be used for queries, zone transfers, and dynamic updates.
10312 It supports TSIG authenticated messages and EDNS0.")
10313 (license license:expat)))
10314
10315 (define-public python2-dnspython
10316 (package-with-python2 python-dnspython))
10317
10318 (define-public python-email-validator
10319 (package
10320 (name "python-email-validator")
10321 (version "1.0.2")
10322 (source
10323 (origin (method url-fetch)
10324 (uri (pypi-uri "email_validator" version))
10325 (sha256
10326 (base32
10327 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10328 (build-system python-build-system)
10329 (arguments
10330 '(#:phases
10331 (modify-phases %standard-phases
10332 (add-before 'build 'use-dnspython
10333 (lambda _
10334 (substitute* "setup.py"
10335 (("dnspython3") "dnspython"))
10336 #t)))))
10337 (propagated-inputs
10338 `(("python-dnspython" ,python-dnspython)
10339 ("python-idna" ,python-idna)))
10340 (home-page "https://github.com/JoshData/python-email-validator")
10341 (synopsis "Email address validation library for Python")
10342 (description
10343 "This library validates email address syntax and deliverability.")
10344 (license license:cc0)))
10345
10346 (define-public python2-email-validator
10347 (package-with-python2 python-email-validator))
10348
10349 (define-public python-ukpostcodeparser
10350 (package
10351 (name "python-ukpostcodeparser")
10352 (version "1.0.3")
10353 (source (origin
10354 (method url-fetch)
10355 (uri (pypi-uri "UkPostcodeParser" version))
10356 (sha256
10357 (base32
10358 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10359 (build-system python-build-system)
10360 (home-page "https://github.com/hamstah/ukpostcodeparser")
10361 (synopsis "UK Postcode parser for Python")
10362 (description
10363 "This library provides the @code{parse_uk_postcode} function for
10364 parsing UK postcodes.")
10365 (license license:expat)))
10366
10367 (define-public python2-ukpostcodeparser
10368 (package-with-python2 python-ukpostcodeparser))
10369
10370 (define-public python-faker
10371 (package
10372 (name "python-faker")
10373 (version "0.7.9")
10374 (source (origin
10375 (method url-fetch)
10376 (uri (pypi-uri "Faker" version))
10377 (sha256
10378 (base32
10379 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10380 (patches
10381 (search-patches "python-faker-fix-build-32bit.patch"))
10382 (modules '((guix build utils)))
10383 (snippet
10384 '(begin
10385 (for-each delete-file (find-files "." "\\.pyc$"))
10386 #t))))
10387 (build-system python-build-system)
10388 (arguments
10389 '(#:phases
10390 (modify-phases %standard-phases
10391 (replace 'check
10392 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10393 (native-inputs
10394 `(;; For testing
10395 ("python-email-validator" ,python-email-validator)
10396 ("python-mock" ,python-mock)
10397 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10398 (propagated-inputs
10399 `(("python-dateutil" ,python-dateutil)
10400 ("python-six" ,python-six)))
10401 (home-page "https://github.com/joke2k/faker")
10402 (synopsis "Python package that generates fake data")
10403 (description
10404 "Faker is a Python package that generates fake data such as names,
10405 addresses, and phone numbers.")
10406 (license license:expat)
10407 (properties `((python2-variant . ,(delay python2-faker))))))
10408
10409 (define-public python2-faker
10410 (let ((base (package-with-python2 (strip-python2-variant
10411 python-faker))))
10412 (package
10413 (inherit base)
10414 (propagated-inputs
10415 `(("python2-ipaddress" ,python2-ipaddress)
10416 ,@(package-propagated-inputs base))))))
10417
10418 (define-public python-pyaml
10419 (package
10420 (name "python-pyaml")
10421 (version "18.11.0")
10422 (source (origin
10423 (method url-fetch)
10424 (uri (pypi-uri "pyaml" version))
10425 (sha256
10426 (base32
10427 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10428 (build-system python-build-system)
10429 (native-inputs
10430 `(("python-unidecode" ,python-unidecode)))
10431 (propagated-inputs
10432 `(("python-pyyaml" ,python-pyyaml)))
10433 (home-page "https://github.com/mk-fg/pretty-yaml")
10434 (synopsis "YAML pretty-print library for Python")
10435 (description
10436 "pyaml is a PyYAML based python module to produce pretty and readable
10437 YAML-serialized data.")
10438 (license license:wtfpl2)))
10439
10440 (define-public python2-pyaml
10441 (package-with-python2 python-pyaml))
10442
10443 (define-public python-backpack
10444 (package
10445 (name "python-backpack")
10446 (version "0.1")
10447 (source
10448 (origin
10449 (method url-fetch)
10450 (uri (pypi-uri "backpack" version))
10451 (sha256
10452 (base32
10453 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10454 (build-system python-build-system)
10455 (native-inputs
10456 `(("python-pytest" ,python-pytest)
10457 ("python-nose" ,python-nose)))
10458 (propagated-inputs
10459 `(("python-simplejson" ,python-simplejson)))
10460 (home-page "https://github.com/sdispater/backpack")
10461 (synopsis "Utilities for working with Python collections")
10462 (description "Backpack provides some useful utilities for working with
10463 collections of data.")
10464 (license license:expat)))
10465
10466 (define-public python2-backpack
10467 (package-with-python2 python-backpack))
10468
10469 (define-public python-prompt-toolkit
10470 (package
10471 (name "python-prompt-toolkit")
10472 (version "2.0.7")
10473 (source
10474 (origin
10475 (method url-fetch)
10476 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10477 (sha256
10478 (base32
10479 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10480 (build-system python-build-system)
10481 (arguments
10482 `(#:phases
10483 (modify-phases %standard-phases
10484 (delete 'check)
10485 (add-after 'install 'post-install-check
10486 (lambda* (#:key inputs outputs #:allow-other-keys)
10487 ;; HOME is needed for the test
10488 ;; "test_pathcompleter_can_expanduser".
10489 (setenv "HOME" "/tmp")
10490 (add-installed-pythonpath inputs outputs)
10491 (invoke "py.test"))))))
10492 (propagated-inputs
10493 `(("python-wcwidth" ,python-wcwidth)
10494 ("python-six" ,python-six)
10495 ("python-pygments" ,python-pygments)))
10496 (native-inputs
10497 `(("python-pytest" ,python-pytest)))
10498 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10499 (synopsis "Library for building command line interfaces in Python")
10500 (description
10501 "Prompt-Toolkit is a library for building interactive command line
10502 interfaces in Python. It's like GNU Readline but it also features syntax
10503 highlighting while typing, out-of-the-box multi-line input editing, advanced
10504 code completion, incremental search, support for Chinese double-width
10505 characters, mouse support, and auto suggestions.")
10506 (license license:bsd-3)))
10507
10508 (define-public python2-prompt-toolkit
10509 (package-with-python2 python-prompt-toolkit))
10510
10511 (define-public python-prompt-toolkit-1
10512 (package (inherit python-prompt-toolkit)
10513 (version "1.0.15")
10514 (source
10515 (origin
10516 (method url-fetch)
10517 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10518 (sha256
10519 (base32
10520 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10521
10522 (define-public python2-prompt-toolkit-1
10523 (package-with-python2 python-prompt-toolkit-1))
10524
10525 (define-public python-jedi
10526 (package
10527 (name "python-jedi")
10528 (version "0.13.3")
10529 (source
10530 (origin
10531 (method url-fetch)
10532 (uri (pypi-uri "jedi" version))
10533 (sha256
10534 (base32
10535 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10536 (build-system python-build-system)
10537 (arguments
10538 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10539 ;; https://github.com/davidhalter/jedi/issues/1263)
10540 #:tests? #f
10541 #:phases
10542 (modify-phases %standard-phases
10543 (replace 'check
10544 (lambda* (#:key tests? #:allow-other-keys)
10545 (when tests?
10546 (invoke "py.test" "-vv")))))))
10547 (native-inputs
10548 `(("python-pytest" ,python-pytest)
10549 ("python-docopt" ,python-docopt)))
10550 (propagated-inputs
10551 `(("python-parso" ,python-parso)))
10552 (home-page "https://github.com/davidhalter/jedi")
10553 (synopsis "Autocompletion and static analysis library for Python")
10554 (description
10555 "Jedi is a static analysis tool for Python that can be used in Integrated
10556 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10557 on a deeper level than many other static analysis frameworks for Python.
10558
10559 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10560 well.")
10561 (license license:expat)))
10562
10563 (define-public python2-jedi
10564 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10565 (package
10566 (inherit base)
10567 (arguments (substitute-keyword-arguments (package-arguments base)
10568 ((#:tests? _) #t))))))
10569
10570 (define-public ptpython
10571 (package
10572 (name "ptpython")
10573 (version "0.34")
10574 (source (origin
10575 (method url-fetch)
10576 (uri (pypi-uri "ptpython" version))
10577 (sha256
10578 (base32
10579 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10580 (build-system python-build-system)
10581 (arguments
10582 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10583 (propagated-inputs
10584 `(("python-docopt" ,python-docopt)
10585 ("python-jedi" ,python-jedi)
10586 ("python-prompt-toolkit" ,python-prompt-toolkit)
10587 ("python-pygments" ,python-pygments)))
10588 (home-page "https://github.com/jonathanslenders/ptpython")
10589 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10590 (description
10591 "ptpython is a Python read-eval-print loop with IDE-like features.
10592 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10593 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10594 etc.")
10595 (license license:bsd-3)
10596 (properties `((python2-variant . ,(delay ptpython-2))))))
10597
10598 (define-public ptpython-2
10599 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10600 (package
10601 (inherit base)
10602 (name "ptpython2"))))
10603
10604 (define-public python-stem
10605 (package
10606 (name "python-stem")
10607 (version "1.7.1")
10608 (source
10609 (origin
10610 (method url-fetch)
10611 (uri (pypi-uri "stem" version))
10612 (sha256
10613 (base32
10614 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10615 (build-system python-build-system)
10616 (arguments
10617 `(#:phases
10618 (modify-phases %standard-phases
10619 (replace 'check
10620 (lambda _
10621 (invoke "./run_tests.py" "--unit")
10622 #t)))))
10623 (native-inputs
10624 `(("python-mock" ,python-mock)
10625 ("python-pycodestyle" ,python-pycodestyle)
10626 ("python-pyflakes" ,python-pyflakes)))
10627 (home-page "https://stem.torproject.org/")
10628 (synopsis
10629 "Python controller library that allows applications to interact with Tor")
10630 (description
10631 "Stem is a Python controller library for Tor. With it you can use Tor's
10632 control protocol to script against the Tor process and read descriptor data
10633 relays publish about themselves.")
10634 (license license:lgpl3)))
10635
10636 (define-public python2-stem
10637 (package-with-python2 python-stem))
10638
10639 (define-public python-pyserial
10640 (package
10641 (name "python-pyserial")
10642 (version "3.1.1")
10643 (source
10644 (origin
10645 (method url-fetch)
10646 (uri (pypi-uri "pyserial" version))
10647 (sha256
10648 (base32
10649 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10650 (build-system python-build-system)
10651 (arguments
10652 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10653 ;; #:phases
10654 ;; (modify-phases %standard-phases
10655 ;; (replace 'check
10656 ;; (lambda _
10657 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10658 (home-page
10659 "https://github.com/pyserial/pyserial")
10660 (synopsis "Python Serial Port Bindings")
10661 (description "@code{pyserial} provide serial port bindings for Python. It
10662 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10663 and/or Xon/Xoff. The port is accessed in RAW mode.")
10664 (license license:bsd-3)))
10665
10666 (define-public python2-pyserial
10667 (package-with-python2 python-pyserial))
10668
10669 (define-public python-kivy
10670 (package
10671 (name "python-kivy")
10672 (version "1.10.1")
10673 (source
10674 (origin
10675 (method url-fetch)
10676 (uri (pypi-uri "Kivy" version))
10677 (file-name (string-append name "-" version ".tar.gz"))
10678 (sha256
10679 (base32
10680 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10681 (build-system python-build-system)
10682 (arguments
10683 `(#:tests? #f ; Tests require many optional packages
10684 #:phases
10685 (modify-phases %standard-phases
10686 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10687 (lambda* (#:key inputs #:allow-other-keys)
10688 (setenv "KIVY_SDL2_PATH"
10689 (string-append (assoc-ref inputs "sdl-union")
10690 "/include/SDL2"))
10691 #t)))))
10692 (native-inputs
10693 `(("git" ,git)
10694 ("pkg-config" ,pkg-config)
10695 ("python-cython" ,python-cython)))
10696 (inputs
10697 `(("gstreamer" ,gstreamer)
10698 ("mesa" ,mesa)
10699 ("sdl-union"
10700 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10701 (home-page "http://kivy.org")
10702 (synopsis
10703 "Multitouch application framework")
10704 (description
10705 "A software library for rapid development of
10706 hardware-accelerated multitouch applications.")
10707 (license license:expat)))
10708
10709 (define-public python2-kivy
10710 (package-with-python2 python-kivy))
10711
10712 (define-public python-kivy-next
10713 (deprecated-package "python-kivy-next" python-kivy))
10714
10715 (define-public python2-kivy-next
10716 (deprecated-package "python2-kivy-next" python2-kivy))
10717
10718 (define-public python-binaryornot
10719 (package
10720 (name "python-binaryornot")
10721 (version "0.4.4")
10722 (source (origin
10723 (method url-fetch)
10724 (uri (pypi-uri "binaryornot" version))
10725 (sha256
10726 (base32
10727 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10728 (build-system python-build-system)
10729 (propagated-inputs
10730 `(("python-chardet" ,python-chardet)
10731 ("python-hypothesis" ,python-hypothesis)))
10732 (home-page "https://github.com/audreyr/binaryornot")
10733 (synopsis "Package to check if a file is binary or text")
10734 (description "Ultra-lightweight pure Python package to check if a file is
10735 binary or text.")
10736 (license license:bsd-3)
10737 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10738
10739 (define-public python2-binaryornot
10740 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10741 (package (inherit base)
10742 (propagated-inputs
10743 `(("python2-enum34" ,python2-enum34)
10744 ,@(package-propagated-inputs base))))))
10745
10746 (define-public python-nltk
10747 (package
10748 (name "python-nltk")
10749 (version "3.2.1")
10750 (source (origin
10751 (method url-fetch)
10752 (uri (pypi-uri "nltk" version))
10753 (sha256
10754 (base32
10755 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10756 (build-system python-build-system)
10757 (arguments
10758 '(;; The tests require some extra resources to be downloaded.
10759 ;; TODO Try packaging these resources.
10760 #:tests? #f))
10761 (home-page "http://nltk.org/")
10762 (synopsis "Natural Language Toolkit")
10763 (description "It provides interfaces to over 50 corpora and lexical
10764 resources such as WordNet, along with a suite of text processing libraries
10765 for classification, tokenization, stemming, tagging, parsing, and semantic
10766 reasoning, wrappers for natural language processing libraries.")
10767 (license license:asl2.0)))
10768
10769 (define-public python2-nltk
10770 (package-with-python2 python-nltk))
10771
10772 (define-public python-pymongo
10773 (package
10774 (name "python-pymongo")
10775 (version "3.7.2")
10776 (source (origin
10777 (method url-fetch)
10778 (uri (pypi-uri "pymongo" version))
10779 (sha256
10780 (base32
10781 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10782 (build-system python-build-system)
10783 (propagated-inputs
10784 `(("python-certifi" ,python-certifi)))
10785 (home-page "https://github.com/mongodb/mongo-python-driver")
10786 (synopsis "Python driver for MongoDB")
10787 (description "Python driver for MongoDB.")
10788 (license license:asl2.0)))
10789
10790 (define-public python2-pymongo
10791 (package-with-python2 python-pymongo))
10792
10793 (define-public python-consul
10794 (package
10795 (name "python-consul")
10796 (version "0.6.1")
10797 (source
10798 (origin
10799 (method url-fetch)
10800 (uri (pypi-uri "python-consul" version))
10801 (sha256
10802 (base32
10803 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10804 (build-system python-build-system)
10805 (arguments
10806 '(#:tests? #f)) ; The tests are not distributed
10807 (propagated-inputs
10808 `(("python-requests" ,python-requests)
10809 ("python-six" ,python-six)))
10810 (home-page "https://github.com/cablehead/python-consul")
10811 (synopsis "Python client for Consul")
10812 (description
10813 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10814 discovery, monitoring and configuration.")
10815 (license license:expat)))
10816
10817 (define-public python2-consul
10818 (package-with-python2 python-consul))
10819
10820 (define-public python-schematics
10821 (package
10822 (name "python-schematics")
10823 (version "1.1.1")
10824 (source
10825 (origin
10826 (method git-fetch)
10827 (uri (git-reference
10828 (url "https://github.com/schematics/schematics.git")
10829 (commit (string-append "v" version))))
10830 (file-name (git-file-name name version))
10831 (sha256
10832 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10833 (build-system python-build-system)
10834 (propagated-inputs
10835 `(("python-six" ,python-six)))
10836 (arguments
10837 ;; The tests require a bunch of not very nice packages with fixed
10838 ;; version requirements (e.g. python-coveralls).
10839 `(#:tests? #f))
10840 (home-page "https://github.com/schematics/schematics")
10841 (synopsis "Python Data Structures for Humans")
10842 (description "Python Data Structures for Humans.")
10843 (license license:bsd-3)))
10844
10845 (define-public python2-schematics
10846 (package-with-python2 python-schematics))
10847
10848 (define-public python-odfpy
10849 (package
10850 (name "python-odfpy")
10851 (version "1.3.3")
10852 (source (origin
10853 (method url-fetch)
10854 (uri (pypi-uri "odfpy" version))
10855 (sha256
10856 (base32
10857 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10858 (arguments
10859 `(#:modules ((srfi srfi-1)
10860 (guix build python-build-system)
10861 (guix build utils))
10862 #:phases
10863 (modify-phases %standard-phases
10864 (replace 'check
10865 ;; The test runner invokes python2 and python3 for test*.py.
10866 ;; To avoid having both in inputs, we replicate it here.
10867 (lambda _
10868 (for-each (lambda (test-file) (invoke "python" test-file))
10869 (find-files "tests" "^test.*\\.py$"))
10870 #t)))))
10871 (build-system python-build-system)
10872 (home-page "https://github.com/eea/odfpy")
10873 (synopsis "Python API and tools to manipulate OpenDocument files")
10874 (description "Collection of libraries and utility programs written in
10875 Python to manipulate OpenDocument 1.2 files.")
10876 (license
10877 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10878 ;; number of files with other licenses.
10879 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10880
10881 (define-public python2-odfpy
10882 (package-with-python2 python-odfpy))
10883
10884 (define-public python-natsort
10885 (package
10886 (name "python-natsort")
10887 (version "5.4.1")
10888 (source (origin
10889 (method url-fetch)
10890 (uri (pypi-uri "natsort" version))
10891 (sha256
10892 (base32
10893 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10894 (build-system python-build-system)
10895 (arguments
10896 `(#:modules ((guix build utils)
10897 (guix build python-build-system)
10898 (srfi srfi-1)
10899 (srfi srfi-26)
10900 (ice-9 ftw))
10901 #:phases
10902 (modify-phases %standard-phases
10903 (add-before 'check 'set-cachedir
10904 ;; Tests require write access to $HOME by default
10905 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10906 (replace 'check
10907 (lambda _
10908 (let ((cwd (getcwd)))
10909 (setenv "PYTHONPATH"
10910 (string-append
10911 cwd "/build/"
10912 (find (cut string-prefix? "lib" <>)
10913 (scandir (string-append cwd "/build")))
10914 ":"
10915 (getenv "PYTHONPATH")))
10916 (invoke "pytest" "-v")))))))
10917 (native-inputs
10918 `(("python-hypothesis" ,python-hypothesis)
10919 ("python-pytest-cov" ,python-pytest-cov)
10920 ("python-pytest-mock" ,python-pytest-mock)
10921 ("python-pytest" ,python-pytest)))
10922 (propagated-inputs ; TODO: Add python-fastnumbers.
10923 `(("python-pyicu" ,python-pyicu)))
10924 (home-page "https://github.com/SethMMorton/natsort")
10925 (synopsis "Natural sorting for python and shell")
10926 (description
10927 "Natsort lets you apply natural sorting on lists instead of
10928 lexicographical. If you use the built-in @code{sorted} method in python
10929 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10930 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10931 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10932 identifies numbers and sorts them separately from strings. It can also sort
10933 version numbers, real numbers, mixed types and more, and comes with a shell
10934 command @command{natsort} that exposes this functionality in the command line.")
10935 (license license:expat)
10936 (properties `((python2-variant . ,(delay python2-natsort))))))
10937
10938 (define-public python2-natsort
10939 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10940 (package (inherit base)
10941 (native-inputs
10942 `(("python2-pathlib" ,python2-pathlib)
10943 ,@(package-native-inputs base))))))
10944
10945 (define-public python-glances
10946 (package
10947 (name "python-glances")
10948 (version "3.0.2")
10949 (source
10950 (origin
10951 (method url-fetch)
10952 (uri (pypi-uri "Glances" version))
10953 (sha256
10954 (base32
10955 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10956 (build-system python-build-system)
10957 (propagated-inputs
10958 `(("python-psutil" ,python-psutil)))
10959 (home-page
10960 "https://github.com/nicolargo/glances")
10961 (synopsis
10962 "A cross-platform curses-based monitoring tool")
10963 (description
10964 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10965 Glances uses the PsUtil library to get information from your system. It monitors
10966 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10967 (license license:lgpl3+)))
10968
10969 (define-public python2-glances
10970 (package-with-python2 python-glances))
10971
10972 (define-public python-graphql-core
10973 (package
10974 (name "python-graphql-core")
10975 (version "0.5.3")
10976 (source
10977 (origin
10978 (method url-fetch)
10979 (uri (pypi-uri "graphql-core" version))
10980 (sha256
10981 (base32
10982 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10983 (build-system python-build-system)
10984 (arguments
10985 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10986 #:phases
10987 (modify-phases %standard-phases
10988 (add-after 'unpack 'patch-hardcoded-version
10989 (lambda _ (substitute*
10990 "setup.py"
10991 (("'gevent==1.1rc1'") "'gevent'"))
10992 #t)))))
10993 (native-inputs
10994 `(("python-gevent" ,python-gevent)
10995 ("python-mock" ,python-mock)
10996 ("python-pytest-mock" ,python-pytest-mock)))
10997 (propagated-inputs
10998 `(("python-promise" ,python-promise)
10999 ("python-six" ,python-six)))
11000 (home-page "https://github.com/graphql-python/graphql-core")
11001 (synopsis "GraphQL implementation for Python")
11002 (description
11003 "GraphQL implementation for Python. GraphQL is a data query language and
11004 runtime designed and used to request and deliver data to mobile and web apps.
11005 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11006 to Python.")
11007 (license license:expat)))
11008
11009 (define-public python2-graphql-core
11010 (package-with-python2 python-graphql-core))
11011
11012 (define-public python-graphql-relay
11013 (package
11014 (name "python-graphql-relay")
11015 (version "0.4.5")
11016 (source
11017 (origin
11018 (method url-fetch)
11019 (uri (pypi-uri "graphql-relay" version))
11020 (sha256
11021 (base32
11022 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11023 (build-system python-build-system)
11024 (arguments
11025 '(#:tests? #f)) ; The tests are not distributed
11026 (propagated-inputs
11027 `(("python-graphql-core" ,python-graphql-core)
11028 ("python-promise" ,python-promise)
11029 ("python-six" ,python-six)))
11030 (home-page "https://github.com/graphql-python/graphql-relay-py")
11031 (synopsis "Relay implementation for Python")
11032 (description
11033 "This is a library to allow the easy creation of Relay-compliant servers
11034 using the GraphQL Python reference implementation of a GraphQL server. It
11035 should be noted that the code is a exact port of the original
11036 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11037 from Facebook.")
11038 (license license:expat)))
11039
11040 (define-public python2-graphql-relay
11041 (package-with-python2 python-graphql-relay))
11042
11043 (define-public python-graphene
11044 (package
11045 (name "python-graphene")
11046 (version "0.10.2")
11047 (source
11048 (origin
11049 (method url-fetch)
11050 (uri (pypi-uri "graphene" version))
11051 (sha256
11052 (base32
11053 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11054 (build-system python-build-system)
11055 (propagated-inputs
11056 `(("python-graphql-core" ,python-graphql-core)
11057 ("python-graphql-relay" ,python-graphql-relay)
11058 ("python-iso8601" ,python-iso8601)
11059 ("python-promise" ,python-promise)
11060 ("python-six" ,python-six)))
11061 (arguments
11062 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11063 (home-page "http://graphene-python.org/")
11064 (synopsis "GraphQL Framework for Python")
11065 (description
11066 "Graphene is a Python library for building GraphQL schemas/types.
11067 A GraphQL schema describes your data model, and provides a GraphQL server
11068 with an associated set of resolve methods that know how to fetch data.")
11069 (properties `((python2-variant . ,(delay python2-graphene))))
11070 (license license:expat)))
11071
11072 (define-public python2-graphene
11073 (let ((base (package-with-python2
11074 (strip-python2-variant python-graphene))))
11075 (package (inherit base)
11076 (native-inputs
11077 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11078 ,@(package-native-inputs base))))))
11079
11080 (define-public python-nautilus
11081 (package
11082 (name "python-nautilus")
11083 (version "0.4.9")
11084 (source
11085 (origin
11086 (method url-fetch)
11087 (uri (pypi-uri "nautilus" version))
11088 (sha256
11089 (base32
11090 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11091 (build-system python-build-system)
11092 (arguments `(#:tests? #f)) ; fails to import test modules
11093 (propagated-inputs
11094 `(("python-bcrypt" ,python-bcrypt)
11095 ("python-click" ,python-click)
11096 ("python-consul" ,python-consul)
11097 ("python-graphene" ,python-graphene)
11098 ("python-jinja2" ,python-jinja2)
11099 ("python-peewee" ,python-peewee)
11100 ("python-pika" ,python-pika)
11101 ("python-tornado" ,python-tornado)
11102 ("python-wtforms" ,python-wtforms)))
11103 (native-inputs
11104 `(("python-nose2" ,python-nose2)))
11105 (home-page "https://github.com/AlecAivazis/nautilus")
11106 (synopsis "Library for creating microservice applications")
11107 (description
11108 "Nautilus is a framework for flux based microservices that looks to
11109 provide extendible implementations of common aspects of a cloud so that you can
11110 focus on building massively scalable web applications.")
11111 (license license:expat)))
11112
11113 (define-public python-snowballstemmer
11114 (package
11115 (name "python-snowballstemmer")
11116 (version "1.2.1")
11117 (source (origin
11118 (method url-fetch)
11119 (uri (pypi-uri "snowballstemmer" version))
11120 (sha256
11121 (base32
11122 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11123 (build-system python-build-system)
11124 (arguments
11125 `(;; No tests exist
11126 #:tests? #f))
11127 (home-page "https://github.com/shibukawa/snowball_py")
11128 (synopsis "Snowball stemming library collection for Python")
11129 (description "This package provides 16 word stemmer algorithms generated
11130 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11131 English stemmer.")
11132 (license license:bsd-3)))
11133
11134 (define-public python2-snowballstemmer
11135 (package-with-python2 python-snowballstemmer))
11136
11137 (define-public python-setproctitle
11138 (package
11139 (name "python-setproctitle")
11140 (version "1.1.10")
11141 (source
11142 (origin
11143 (method url-fetch)
11144 (uri (pypi-uri "setproctitle" version))
11145 (sha256
11146 (base32
11147 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11148 (build-system python-build-system)
11149 (arguments
11150 '(#:phases
11151 (modify-phases %standard-phases
11152 (add-before 'check 'patch-Makefile
11153 ;; Stricly this is only required for the python2 variant.
11154 ;; But adding a phase in an inherited package seems to be
11155 ;; cumbersum. So we patch even for python3.
11156 (lambda _
11157 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11158 (when nose
11159 (substitute* "Makefile"
11160 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11161 (string-append nose "/bin/nosetests "))))
11162 #t)))
11163 (replace 'check
11164 (lambda _
11165 (setenv "PYTHON" (or (which "python3") (which "python")))
11166 (setenv "PYCONFIG" (or (which "python3-config")
11167 (which "python-config")))
11168 (setenv "CC" "gcc")
11169 ;; No need to extend PYTHONPATH to find the built package, since
11170 ;; the Makefile will build anyway
11171 (invoke "make" "check"))))))
11172 (native-inputs
11173 `(("procps" ,procps))) ; required for tests
11174 (home-page
11175 "https://github.com/dvarrazzo/py-setproctitle")
11176 (synopsis
11177 "Setproctitle implementation for Python to customize the process title")
11178 (description "The library allows a process to change its title (as displayed
11179 by system tools such as ps and top).
11180
11181 Changing the title is mostly useful in multi-process systems, for
11182 example when a master process is forked: changing the children's title
11183 allows to identify the task each process is busy with. The technique
11184 is used by PostgreSQL and the OpenSSH Server for example.")
11185 (license license:bsd-3)
11186 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11187
11188 (define-public python2-setproctitle
11189 (let ((base (package-with-python2
11190 (strip-python2-variant python-setproctitle))))
11191 (package
11192 (inherit base)
11193 (native-inputs `(("python2-nose" ,python2-nose)
11194 ,@(package-native-inputs base))))))
11195
11196 (define-public python-validictory
11197 (package
11198 (name "python-validictory")
11199 (version "1.0.1")
11200 (source
11201 (origin
11202 (method url-fetch)
11203 (uri (pypi-uri "validictory" version))
11204 (sha256
11205 (base32
11206 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11207 (build-system python-build-system)
11208 (arguments
11209 '(#:phases
11210 (modify-phases %standard-phases
11211 (add-after 'unpack 'bootstrap
11212 ;; Move the tests out of the package directory to avoid
11213 ;; packaging them.
11214 (lambda* _
11215 (rename-file "validictory/tests" "tests")
11216 (delete-file "tests/__init__.py")))
11217 (replace 'check
11218 (lambda _
11219 ;; Extend PYTHONPATH so the built package will be found.
11220 (setenv "PYTHONPATH"
11221 (string-append (getcwd) "/build/lib:"
11222 (getenv "PYTHONPATH")))
11223 (invoke "py.test" "-vv" ))))))
11224 (native-inputs
11225 `(("python-pytest" ,python-pytest)))
11226 (home-page
11227 "https://github.com/jamesturk/validictory")
11228 (synopsis "General purpose Python data validator")
11229 (description "It allows validation of arbitrary Python data structures.
11230
11231 The schema format is based on the JSON Schema
11232 proposal (http://json-schema.org), so combined with json the library is also
11233 useful as a validator for JSON data.")
11234 (license license:expat)))
11235
11236 (define-public python2-validictory
11237 (package-with-python2 python-validictory))
11238
11239 (define-public python-pyelftools
11240 (package
11241 (name "python-pyelftools")
11242 (version "0.25")
11243 (source
11244 (origin
11245 (method url-fetch)
11246 (uri (pypi-uri "pyelftools" version))
11247 (sha256
11248 (base32
11249 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11250 (build-system python-build-system)
11251 (arguments
11252 `(#:phases
11253 (modify-phases %standard-phases
11254 (add-before 'check 'set-pythonpath
11255 (lambda _
11256 (setenv "PYTHONPATH"
11257 (string-append
11258 (getcwd) "/test/"
11259 ":" (getenv "PYTHONPATH")))
11260 #t)))))
11261 (home-page
11262 "https://github.com/eliben/pyelftools")
11263 (synopsis
11264 "Analyze binary and library file information")
11265 (description "This Python library provides interfaces for parsing and
11266 analyzing two binary and library file formats; the Executable and Linking
11267 Format (ELF), and debugging information in the Debugging With Attributed
11268 Record Format (DWARF).")
11269 (license license:public-domain)))
11270
11271 (define-public python-pyev
11272 (package
11273 (name "python-pyev")
11274 (version "0.9.0")
11275 (source
11276 (origin
11277 (method url-fetch)
11278 (uri (pypi-uri "pyev" version))
11279 (sha256
11280 (base32
11281 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11282 (build-system python-build-system)
11283 (arguments
11284 `(#:tests? #f ; no test suite
11285 #:phases
11286 (modify-phases %standard-phases
11287 (add-after 'unpack 'patch
11288 (lambda* (#:key inputs #:allow-other-keys)
11289 (let ((libev (string-append (assoc-ref inputs "libev")
11290 "/lib/libev.so.4")))
11291 (substitute* "setup.py"
11292 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11293 (string-append "libev_dll_name = \"" libev "\"")))))))))
11294 (inputs
11295 `(("libev" ,libev)))
11296 (home-page "http://pythonhosted.org/pyev/")
11297 (synopsis "Python libev interface")
11298 (description "Pyev provides a Python interface to libev.")
11299 (license license:gpl3)))
11300
11301 (define-public python2-pyev
11302 (package-with-python2 python-pyev))
11303
11304 (define-public python-imagesize
11305 (package
11306 (name "python-imagesize")
11307 (version "1.1.0")
11308 (source
11309 (origin
11310 (method url-fetch)
11311 (uri (pypi-uri "imagesize" version))
11312 (sha256
11313 (base32
11314 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11315 (build-system python-build-system)
11316 (home-page "https://github.com/shibukawa/imagesize_py")
11317 (synopsis "Gets image size of files in various formats in Python")
11318 (description
11319 "This package allows determination of image size from
11320 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11321 (license license:expat)))
11322
11323 (define-public python2-imagesize
11324 (package-with-python2 python-imagesize))
11325
11326 (define-public python-termstyle
11327 (package
11328 (name "python-termstyle")
11329 (version "0.1.11")
11330 (source
11331 (origin
11332 (method url-fetch)
11333 (uri (pypi-uri "termstyle" version))
11334 (sha256
11335 (base32
11336 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11337 (build-system python-build-system)
11338 (arguments
11339 '(#:phases
11340 (modify-phases %standard-phases
11341 (replace 'check
11342 (lambda _
11343 (invoke "python" "test3.py"))))))
11344 (home-page "https://github.com/gfxmonk/termstyle")
11345 (synopsis "Console text coloring for Python")
11346 (description "This package provides console text coloring for Python.")
11347 (license license:bsd-3)))
11348
11349 (define-public python-argcomplete
11350 (package
11351 (name "python-argcomplete")
11352 (version "1.7.0")
11353 (source
11354 (origin
11355 (method url-fetch)
11356 (uri (pypi-uri "argcomplete" version))
11357 (sha256
11358 (base32
11359 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11360 (build-system python-build-system)
11361 (native-inputs
11362 `(("python-pexpect" ,python-pexpect)
11363 ("tcsh" ,tcsh)
11364 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11365 (home-page "https://github.com/kislyuk/argcomplete")
11366 (synopsis "Shell tab completion for Python argparse")
11367 (description "argcomplete provides extensible command line tab completion
11368 of arguments and options for Python scripts using @code{argparse}. It's
11369 particularly useful for programs with many options or sub-parsers that can
11370 dynamically suggest completions; for example, when browsing resources over the
11371 network.")
11372 (license license:asl2.0)))
11373
11374 (define-public python2-argcomplete
11375 (package-with-python2 python-argcomplete))
11376
11377 (define-public python-xopen
11378 (package
11379 (name "python-xopen")
11380 (version "0.5.0")
11381 (source
11382 (origin
11383 (method url-fetch)
11384 (uri (pypi-uri "xopen" version))
11385 (sha256
11386 (base32
11387 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11388 (build-system python-build-system)
11389 (propagated-inputs
11390 `(("python-setuptools-scm" ,python-setuptools-scm)))
11391 (home-page "https://github.com/marcelm/xopen/")
11392 (synopsis "Open compressed files transparently")
11393 (description "This module provides an @code{xopen} function that works like
11394 Python's built-in @code{open} function, but can also deal with compressed files.
11395 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11396 recognized by their file extensions. The focus is on being as efficient as
11397 possible on all supported Python versions.")
11398 (license license:expat)))
11399
11400 (define-public python2-xopen
11401 (let ((base (package-with-python2
11402 (strip-python2-variant python-xopen))))
11403 (package
11404 (inherit base)
11405 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11406 ,@(package-propagated-inputs base))))))
11407
11408 (define-public python-cheetah
11409 (package
11410 (name "python-cheetah")
11411 (version "3.1.0")
11412 (source
11413 (origin
11414 (method url-fetch)
11415 (uri (pypi-uri "Cheetah3" version))
11416 (sha256
11417 (base32
11418 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11419 (build-system python-build-system)
11420 (arguments
11421 `(#:modules ((guix build utils)
11422 (guix build python-build-system)
11423 (ice-9 ftw)
11424 (srfi srfi-1)
11425 (srfi srfi-26))
11426 #:phases (modify-phases %standard-phases
11427 (add-after 'unpack 'use-absolute-python
11428 (lambda _
11429 (substitute* "Cheetah/CheetahWrapper.py"
11430 (("#!/usr/bin/env python")
11431 (string-append "#!" (which "python"))))
11432 #t))
11433 (replace 'check
11434 (lambda _
11435 (let ((cwd (getcwd)))
11436 (setenv "PYTHONPATH"
11437 (string-append
11438 cwd "/build/"
11439 (find (cut string-prefix? "lib" <>)
11440 (scandir (string-append cwd "/build")))
11441 ":" (getenv "PYTHONPATH")))
11442 (setenv "PATH"
11443 (string-append (getenv "PATH")
11444 ":" cwd "/bin"))
11445 (setenv "TMPDIR" "/tmp")
11446
11447 (substitute* "Cheetah/Tests/Test.py"
11448 (("unittest.TextTestRunner\\(\\)")
11449 "unittest.TextTestRunner(verbosity=2)"))
11450
11451 (invoke "python" "Cheetah/Tests/Test.py")))))))
11452 (propagated-inputs
11453 `(("python-markdown" ,python-markdown))) ;optional
11454 (home-page "http://cheetahtemplate.org/")
11455 (synopsis "Template engine")
11456 (description "Cheetah is a text-based template engine and Python code
11457 generator.
11458
11459 Cheetah can be used as a standalone templating utility or referenced as
11460 a library from other Python applications. It has many potential uses,
11461 but web developers looking for a viable alternative to ASP, JSP, PHP and
11462 PSP are expected to be its principle user group.
11463
11464 Features:
11465 @enumerate
11466 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11467 text-based format.
11468 @item Cleanly separates content, graphic design, and program code.
11469 @item Blends the power and flexibility of Python with a simple template language
11470 that non-programmers can understand.
11471 @item Gives template writers full access to any Python data structure, module,
11472 function, object, or method in their templates.
11473 @item Makes code reuse easy by providing an object-orientated interface to
11474 templates that is accessible from Python code or other Cheetah templates.
11475 One template can subclass another and selectively reimplement sections of it.
11476 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11477 improve the performance of a dynamic website.
11478 @item Compiles templates into optimized, yet readable, Python code.
11479 @end enumerate")
11480 (license (license:x11-style "file://LICENSE"))))
11481
11482 (define-public python2-cheetah
11483 (package-with-python2 python-cheetah))
11484
11485 (define-public python-dulwich
11486 (package
11487 (name "python-dulwich")
11488 (version "0.18.6")
11489 (source
11490 (origin
11491 (method url-fetch)
11492 (uri (list (string-append "https://www.dulwich.io/releases/"
11493 "dulwich-" version ".tar.gz")
11494 (pypi-uri "dulwich" version)))
11495 (sha256
11496 (base32
11497 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11498 (build-system python-build-system)
11499 (arguments
11500 `(#:phases
11501 (modify-phases %standard-phases
11502 (add-before 'check 'fix-tests
11503 (lambda* (#:key inputs #:allow-other-keys)
11504 ;; The tests use Popen with a custom environment which doesn't
11505 ;; include PATH.
11506 (substitute* "dulwich/tests/compat/utils.py"
11507 (("'git'") (string-append "'"
11508 (which "git")
11509 "'")))
11510 (substitute* '("dulwich/tests/test_repository.py"
11511 "dulwich/tests/test_hooks.py")
11512 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11513 (setenv "TEST_RUNNER" "unittest")
11514 (setenv "PYTHONHASHSEED" "random")
11515 #t)))))
11516 (propagated-inputs
11517 `(("python-fastimport" ,python-fastimport)))
11518 (native-inputs
11519 `(("python-mock" ,python-mock)
11520 ("python-geventhttpclient" ,python-geventhttpclient)
11521 ("git" ,git)))
11522 (home-page "https://www.dulwich.io/")
11523 (synopsis "Git implementation in Python")
11524 (description "Dulwich is an implementation of the Git file formats and
11525 protocols written in pure Python.")
11526 ;; Can be used with either license.
11527 (license (list license:asl2.0 license:gpl2+))))
11528
11529 (define-public python2-dulwich
11530 (package-with-python2 python-dulwich))
11531
11532 (define-public python-pbkdf2
11533 (package
11534 (name "python-pbkdf2")
11535 (version "1.3")
11536 (source
11537 (origin
11538 (method url-fetch)
11539 (uri (pypi-uri "pbkdf2" version))
11540 (sha256
11541 (base32
11542 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11543 (build-system python-build-system)
11544 (arguments
11545 '(#:phases
11546 (modify-phases %standard-phases
11547 (replace 'check
11548 (lambda _
11549 (setenv "PYTHONPATH"
11550 (string-append (getcwd) "/build/lib:"
11551 (getenv "PYTHONPATH")))
11552 (invoke "python" "test/test_pbkdf2.py"))))))
11553 (propagated-inputs
11554 `(("python-pycrypto" ,python-pycrypto))) ; optional
11555 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11556 (synopsis "Password-based key derivation")
11557 (description "This module implements the password-based key derivation
11558 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11559
11560 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11561 is part of the RSA Public Key Cryptography Standards series. The provided
11562 implementation takes a password or a passphrase and a salt value (and
11563 optionally a iteration count, a digest module, and a MAC module) and provides
11564 a file-like object from which an arbitrarly-sized key can be read.")
11565 (license license:expat)))
11566
11567 (define-public python2-pbkdf2
11568 (package-with-python2 python-pbkdf2))
11569
11570 (define-public python-qrcode
11571 (package
11572 (name "python-qrcode")
11573 (version "6.1")
11574 (source
11575 (origin
11576 (method url-fetch)
11577 (uri (pypi-uri "qrcode" version))
11578 (sha256
11579 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11580 (build-system python-build-system)
11581 (arguments
11582 ;; FIXME: Tests require packaging 'pymaging'.
11583 '(#:tests? #f))
11584 (propagated-inputs
11585 `(("python-lxml" ,python-lxml) ; for SVG output
11586 ("python-pillow" ,python-pillow) ; for PNG output
11587 ("python-six" ,python-six)))
11588 (home-page "https://github.com/lincolnloop/python-qrcode")
11589 (synopsis "QR Code image generator")
11590 (description "This package provides a pure Python QR Code generator
11591 module. It uses the Python Imaging Library (PIL) to allow for the generation
11592 of QR Codes.
11593
11594 In addition this package provides a command line tool to generate QR codes and
11595 either write these QR codes to a file or do the output as ascii art at the
11596 console.")
11597 (license license:bsd-3)))
11598
11599 (define-public python2-qrcode
11600 (package-with-python2 python-qrcode))
11601
11602 (define-public python-rst2ansi
11603 (package
11604 (name "python-rst2ansi")
11605 (version "0.1.5")
11606 (source
11607 (origin
11608 (method url-fetch)
11609 (uri (pypi-uri "rst2ansi" version))
11610 (sha256
11611 (base32
11612 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11613 (build-system python-build-system)
11614 (propagated-inputs
11615 `(("python-docutils" ,python-docutils)))
11616 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11617 (synopsis "Convert RST to ANSI-decorated console output")
11618 (description
11619 "Python module dedicated to rendering RST (reStructuredText) documents
11620 to ansi-escaped strings suitable for display in a terminal.")
11621 (license license:expat)))
11622
11623 (define-public python-ansi2html
11624 (package
11625 (name "python-ansi2html")
11626 (version "1.2.0")
11627 (source
11628 (origin
11629 (method url-fetch)
11630 (uri (pypi-uri "ansi2html" version))
11631 (sha256
11632 (base32
11633 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11634 (build-system python-build-system)
11635 (native-inputs
11636 `(("python-mock" ,python-mock)
11637 ("python-nose" ,python-nose)))
11638 (propagated-inputs
11639 `(("python-six" ,python-six)))
11640 (home-page "https://github.com/ralphbean/ansi2html")
11641 (synopsis "Convert ANSI-decorated console output to HTML")
11642 (description
11643 "@command{ansi2html} is a Python library and command line utility for
11644 convering text with ANSI color codes to HTML or LaTeX.")
11645 (license license:gpl3+)))
11646
11647 (define-public python2-ansi2html
11648 (package-with-python2 python-ansi2html))
11649
11650 (define-public python-ddt
11651 (package
11652 (name "python-ddt")
11653 (version "1.1.3")
11654 (source
11655 (origin
11656 (method url-fetch)
11657 (uri (pypi-uri "ddt" version))
11658 (sha256
11659 (base32
11660 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11661 (build-system python-build-system)
11662 (native-inputs
11663 `(("python-mock" ,python-mock)
11664 ("python-nose" ,python-nose)))
11665 (propagated-inputs
11666 `(("python-six" ,python-six)
11667 ("python-pyyaml" ,python-pyyaml)))
11668 (home-page "https://github.com/txels/ddt")
11669 (synopsis "Data-Driven Tests")
11670 (description
11671 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11672 running it with different test data, and make it appear as multiple test
11673 cases.")
11674 (license license:expat)))
11675
11676 (define-public python2-ddt
11677 (package-with-python2 python-ddt))
11678
11679 (define-public python-pycountry
11680 (package
11681 (name "python-pycountry")
11682 (version "18.5.26")
11683 (source
11684 (origin
11685 (method url-fetch)
11686 (uri (pypi-uri "pycountry" version))
11687 (sha256
11688 (base32
11689 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11690 (build-system python-build-system)
11691 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11692 (synopsis "ISO databases for languages, countries, currencies, etc.")
11693 (description
11694 "@code{pycountry} provides the ISO databases for the standards:
11695 @enumerate
11696 @item 639-3 (Languages)
11697 @item 3166 (Countries)
11698 @item 3166-3 (Deleted Countries)
11699 @item 3166-2 (Subdivisions of countries)
11700 @item 4217 (Currencies)
11701 @item 15924 (Scripts)
11702 @end enumerate
11703 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11704 through a Python API.")
11705 (license license:lgpl2.1+)))
11706
11707 (define-public python2-pycountry
11708 (package-with-python2 python-pycountry))
11709
11710 (define-public python-pycosat
11711 (package
11712 (name "python-pycosat")
11713 (version "0.6.1")
11714 (source
11715 (origin
11716 (method url-fetch)
11717 (uri (pypi-uri "pycosat" version))
11718 (sha256
11719 (base32
11720 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11721 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11722 (build-system python-build-system)
11723 (home-page "https://github.com/ContinuumIO/pycosat")
11724 (synopsis "Bindings to picosat (a SAT solver)")
11725 (description
11726 "This package provides efficient Python bindings to @code{picosat} on
11727 the C level. When importing pycosat, the @code{picosat} solver becomes part
11728 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11729 Problem} (SAT) solver.")
11730 (license license:expat)))
11731
11732 (define-public python2-pycosat
11733 (package-with-python2 python-pycosat))
11734
11735 (define-public python2-ruamel.ordereddict
11736 (package
11737 (name "python2-ruamel.ordereddict")
11738 (version "0.4.9")
11739 (source
11740 (origin
11741 (method url-fetch)
11742 (uri (pypi-uri "ruamel.ordereddict" version))
11743 (sha256
11744 (base32
11745 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11746 (build-system python-build-system)
11747 (arguments
11748 `(#:python ,python-2
11749 #:phases
11750 (modify-phases %standard-phases
11751 (delete 'check)
11752 (add-after 'install 'check
11753 (lambda* (#:key inputs outputs #:allow-other-keys)
11754 (add-installed-pythonpath inputs outputs)
11755 (invoke "python" "test/testordereddict.py"))))))
11756 (home-page "https://bitbucket.org/ruamel/ordereddict")
11757 (synopsis "Version of dict that keeps keys in insertion order")
11758 (description
11759 "This is an implementation of an ordered dictionary with @dfn{Key
11760 Insertion Order} (KIO: updates of values do not affect the position of the
11761 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11762 removed and put at the back). The standard library module @code{OrderedDict},
11763 implemented later, implements a subset of @code{ordereddict} functionality.
11764 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11765 Order} (KSO, no sorting function can be specified, but a transform can be
11766 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11767 (license license:expat)))
11768
11769 (define-public python-pypeg2
11770 (package
11771 (name "python-pypeg2")
11772 (version "2.15.2")
11773 (source
11774 (origin
11775 (method url-fetch)
11776 (uri (pypi-uri "pyPEG2" version))
11777 (sha256
11778 (base32
11779 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11780 (build-system python-build-system)
11781 (propagated-inputs `(("python-lxml" ,python-lxml)))
11782 (arguments
11783 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11784 '(#:tests? #f))
11785 (home-page "https://fdik.org/pyPEG/")
11786 (synopsis "Parsering Expression Grammars in Python")
11787 (description "PyPEG is an intrinsic parser interpreter framework for
11788 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11789 parse many formal languages.")
11790 (license license:gpl2)))
11791
11792 (define-public python-incremental
11793 (package
11794 (name "python-incremental")
11795 (version "17.5.0")
11796 (source
11797 (origin
11798 (method url-fetch)
11799 (uri (pypi-uri "incremental" version))
11800 (sha256
11801 (base32
11802 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11803 (build-system python-build-system)
11804 (home-page "https://github.com/hawkowl/incremental")
11805 (synopsis "Library for versioning Python projects")
11806 (description "Incremental is a small library that versions your Python
11807 projects.")
11808 (license license:expat)))
11809
11810 (define-public python2-incremental
11811 (package-with-python2 python-incremental))
11812
11813 (define-public python-invoke
11814 (package
11815 (name "python-invoke")
11816 (home-page "http://www.pyinvoke.org/")
11817 (version "1.1.0")
11818 (source (origin
11819 (method url-fetch)
11820 (uri (pypi-uri "invoke" version))
11821 (sha256
11822 (base32
11823 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11824 (build-system python-build-system)
11825 (arguments
11826 ;; XXX: Requires many dependencies that are not yet in Guix.
11827 `(#:tests? #f))
11828 (synopsis "Pythonic task execution")
11829 (description
11830 "Invoke is a Python task execution tool and library, drawing inspiration
11831 from various sources to arrive at a powerful and clean feature set. It is
11832 evolved from the Fabric project, but focuses on local and abstract concerns
11833 instead of servers and network commands.")
11834 (license license:bsd-3)))
11835
11836 (define-public python2-invoke
11837 (package-with-python2 python-invoke))
11838
11839 (define-public python-automat
11840 (package
11841 (name "python-automat")
11842 (version "0.7.0")
11843 (source (origin
11844 (method url-fetch)
11845 (uri (pypi-uri "Automat" version))
11846 (sha256
11847 (base32
11848 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11849 (build-system python-build-system)
11850 ;; We disable the tests because they require python-twisted, while
11851 ;; python-twisted depends on python-automat. Twisted is optional, but the
11852 ;; tests fail if it is not available. Also see
11853 ;; <https://github.com/glyph/automat/issues/71>.
11854 (arguments '(#:tests? #f))
11855 (native-inputs
11856 `(("python-m2r" ,python-m2r)
11857 ("python-setuptools-scm" ,python-setuptools-scm)
11858 ("python-graphviz" ,python-graphviz)))
11859 (propagated-inputs
11860 `(("python-six" ,python-six)
11861 ("python-attrs" ,python-attrs)))
11862 (home-page "https://github.com/glyph/Automat")
11863 (synopsis "Self-service finite-state machines")
11864 (description "Automat is a library for concise, idiomatic Python
11865 expression of finite-state automata (particularly deterministic finite-state
11866 transducers).")
11867 (license license:expat)))
11868
11869 (define-public python2-automat
11870 (package-with-python2 python-automat))
11871
11872 (define-public python-m2r
11873 (package
11874 (name "python-m2r")
11875 (version "0.2.1")
11876 (source (origin
11877 (method url-fetch)
11878 (uri (pypi-uri "m2r" version))
11879 (sha256
11880 (base32
11881 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11882 (build-system python-build-system)
11883 (propagated-inputs
11884 `(("python-docutils" ,python-docutils)
11885 ("python-mistune" ,python-mistune)))
11886 (native-inputs
11887 `(("python-pygments" ,python-pygments)
11888 ("python-mock" ,python-mock)))
11889 (home-page "https://github.com/miyakogi/m2r")
11890 (synopsis "Markdown to reStructuredText converter")
11891 (description "M2R converts a markdown file including reST markups to valid
11892 reST format.")
11893 (license license:expat)))
11894
11895 (define-public python2-m2r
11896 (package-with-python2 python-m2r))
11897
11898 (define-public python-constantly
11899 (package
11900 (name "python-constantly")
11901 (version "15.1.0")
11902 (source (origin
11903 (method url-fetch)
11904 (uri (pypi-uri "constantly" version))
11905 (sha256
11906 (base32
11907 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11908 (build-system python-build-system)
11909 (home-page "https://github.com/twisted/constantly")
11910 (synopsis "Symbolic constants in Python")
11911 (description "Constantly is a Python library that provides symbolic
11912 constant support. It includes collections and constants with text, numeric,
11913 and bit flag values.")
11914 (license license:expat)))
11915
11916 (define-public python2-constantly
11917 (package-with-python2 python-constantly))
11918
11919 (define-public python-attrs
11920 (package
11921 (name "python-attrs")
11922 (version "19.1.0")
11923 (source (origin
11924 (method url-fetch)
11925 (uri (pypi-uri "attrs" version))
11926 (sha256
11927 (base32
11928 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11929 (build-system python-build-system)
11930 (arguments
11931 `(#:modules ((guix build utils)
11932 (guix build python-build-system)
11933 (ice-9 ftw)
11934 (srfi srfi-1)
11935 (srfi srfi-26))
11936 #:phases (modify-phases %standard-phases
11937 (replace 'check
11938 (lambda _
11939 (let ((cwd (getcwd)))
11940 (setenv "PYTHONPATH"
11941 (string-append
11942 cwd "/build/"
11943 (find (cut string-prefix? "lib" <>)
11944 (scandir (string-append cwd "/build")))
11945 ":"
11946 (getenv "PYTHONPATH")))
11947 (invoke "python" "-m" "pytest")))))))
11948 (native-inputs
11949 `(("python-coverage" ,python-coverage)
11950 ("python-hypothesis" ,python-hypothesis)
11951 ("python-pympler" ,python-pympler)
11952 ("python-pytest" ,python-pytest)
11953 ("python-six" ,python-six)
11954 ("python-sphinx" ,python-sphinx)
11955 ("python-zope-interface" ,python-zope-interface)))
11956 (home-page "https://github.com/python-attrs/attrs/")
11957 (synopsis "Attributes without boilerplate")
11958 (description "@code{attrs} is a Python package with class decorators that
11959 ease the chores of implementing the most common attribute-related object
11960 protocols.")
11961 (license license:expat)))
11962
11963 (define-public python2-attrs
11964 (package-with-python2 python-attrs))
11965
11966 (define-public python-attrs-bootstrap
11967 (package
11968 (inherit python-attrs)
11969 (name "python-attrs-bootstrap")
11970 ;; Keep this on a fixed version so python-attrs can be updated without
11971 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11972 (version "17.4.0")
11973 (source (origin
11974 (method url-fetch)
11975 (uri (pypi-uri "attrs" version))
11976 (sha256
11977 (base32
11978 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11979 (native-inputs `())
11980 (arguments `(#:tests? #f))))
11981
11982 (define-public python2-attrs-bootstrap
11983 (package-with-python2 python-attrs-bootstrap))
11984
11985 (define-public python2-cliapp
11986 (package
11987 (name "python2-cliapp")
11988 (version "1.20180812.1")
11989 (source
11990 (origin
11991 (method url-fetch)
11992 (uri (string-append
11993 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11994 version ".tar.gz"))
11995 (sha256
11996 (base32
11997 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
11998 (build-system python-build-system)
11999 (arguments
12000 `(#:python ,python-2
12001 #:phases
12002 (modify-phases %standard-phases
12003 ;; check phase needs to be run before the build phase. If not,
12004 ;; coverage-test-runner looks for tests for the built source files,
12005 ;; and fails.
12006 (delete 'check)
12007 (add-before 'build 'check
12008 (lambda _
12009 ;; Disable python3 tests
12010 (substitute* "check"
12011 (("python3") "# python3"))
12012 (invoke "./check"))))))
12013 (native-inputs
12014 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12015 ("python2-pep8" ,python2-pep8)))
12016 (propagated-inputs
12017 `(("python2-pyaml" ,python2-pyaml)))
12018 (home-page "https://liw.fi/cliapp/")
12019 (synopsis "Python framework for command line programs")
12020 (description "@code{python2-cliapp} is a python framework for
12021 command line programs. It contains the typical stuff such programs
12022 need to do, such as parsing the command line for options, and
12023 iterating over input files.")
12024 (license license:gpl2+)))
12025
12026 (define-public python2-ttystatus
12027 (package
12028 (name "python2-ttystatus")
12029 (version "0.36")
12030 (source
12031 (origin
12032 (method url-fetch)
12033 (uri (string-append
12034 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12035 version ".tar.gz"))
12036 (sha256
12037 (base32
12038 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12039 (build-system python-build-system)
12040 (native-inputs
12041 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12042 ("python2-pep8" ,python2-pep8)))
12043 (arguments
12044 `(#:python ,python-2
12045 #:phases
12046 (modify-phases %standard-phases
12047 ;; check phase needs to be run before the build phase. If not,
12048 ;; coverage-test-runner looks for tests for the built source files,
12049 ;; and fails.
12050 (delete 'check)
12051 (add-before 'build 'check
12052 (lambda _ (invoke "make" "check"))))))
12053 (home-page "https://liw.fi/ttystatus/")
12054 (synopsis "Python library for showing progress reporting and
12055 status updates on terminals")
12056 (description "@code{python2-ttystatus} is a python library for
12057 showing progress reporting and status updates on terminals, for
12058 command line programs. Output is automatically adapted to the width
12059 of the terminal: truncated if it does not fit, and resized if the
12060 terminal size changes.")
12061 (license license:gpl3+)))
12062
12063 (define-public python2-tracing
12064 (package
12065 (name "python2-tracing")
12066 (version "0.10")
12067 (source
12068 (origin
12069 (method url-fetch)
12070 (uri (string-append
12071 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12072 version ".tar.gz"))
12073 (sha256
12074 (base32
12075 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12076 (build-system python-build-system)
12077 (arguments
12078 `(#:python ,python-2))
12079 (home-page "https://liw.fi/tracing/")
12080 (synopsis "Python debug logging helper")
12081 (description "@code{python2-tracing} is a python library for
12082 logging debug messages. It provides a way to turn debugging messages
12083 on and off, based on the filename they occur in. It is much faster
12084 than using @code{logging.Filter} to accomplish the same thing, which
12085 matters when code is run in production mode. The actual logging still
12086 happens using the @code{logging} library.")
12087 (license license:gpl3+)))
12088
12089 (define-public python2-larch
12090 (package
12091 (name "python2-larch")
12092 (version "1.20151025")
12093 (source
12094 (origin
12095 (method url-fetch)
12096 (uri (string-append
12097 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12098 version ".tar.gz"))
12099 (patches (search-patches
12100 "python2-larch-coverage-4.0a6-compatibility.patch"))
12101 (sha256
12102 (base32
12103 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12104 (build-system python-build-system)
12105 (arguments
12106 `(#:python ,python-2
12107 #:phases
12108 (modify-phases %standard-phases
12109 ;; check phase needs to be run before the build phase. If not,
12110 ;; coverage-test-runner looks for tests for the built source files,
12111 ;; and fails.
12112 (delete 'check)
12113 (add-before 'build 'check
12114 (lambda _ (invoke "make" "check"))))))
12115 (native-inputs
12116 `(("cmdtest" ,cmdtest)
12117 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12118 (propagated-inputs
12119 `(("python2-tracing" ,python2-tracing)))
12120 (home-page "https://liw.fi/larch/")
12121 (synopsis "Python copy-on-write B-tree library")
12122 (description "@code{python2-larch} is an implementation of
12123 particular kind of B-tree, based on research by Ohad Rodeh. See
12124 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12125 on the data structure.
12126
12127 The distinctive feature of this B-tree is that a node is never
12128 (conceptually) modified. Instead, all updates are done by
12129 copy-on-write. This makes it easy to clone a tree, and modify only the
12130 clone, while other processes access the original tree.")
12131 (license license:gpl3+)))
12132
12133 (define-public python-astroid
12134 (package
12135 (name "python-astroid")
12136 (version "2.1.0")
12137 (source
12138 (origin
12139 (method url-fetch)
12140 (uri (pypi-uri "astroid" version))
12141 (sha256
12142 (base32
12143 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12144 (build-system python-build-system)
12145 (propagated-inputs
12146 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12147 ("python-six" ,python-six)
12148 ("python-wrapt" ,python-wrapt)))
12149 (native-inputs
12150 `(("python-dateutil" ,python-dateutil)
12151 ("python-nose" ,python-nose)
12152 ("python-pytest" ,python-pytest)
12153 ("python-pytest-runner" ,python-pytest-runner)))
12154 (arguments
12155 `(#:phases
12156 (modify-phases %standard-phases
12157 (add-after 'unpack 'remove-spurious-test
12158 (lambda _
12159 ;; This can be removed after upgrading from python-3.7
12160 ;; https://github.com/PyCQA/astroid/issues/593
12161 ;; https://bugs.python.org/issue34056
12162 (delete-file "astroid/tests/unittest_modutils.py")
12163 #t))
12164 (replace 'check
12165 (lambda _
12166 (invoke "pytest" "astroid"))))))
12167 (home-page "https://github.com/PyCQA/astroid")
12168 (synopsis "Common base representation of python source code for pylint and
12169 other projects")
12170 (description "@code{python-astroid} provides a common base representation
12171 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12172
12173 It provides a compatible representation which comes from the _ast module. It
12174 rebuilds the tree generated by the builtin _ast module by recursively walking
12175 down the AST and building an extended ast. The new node classes have
12176 additional methods and attributes for different usages. They include some
12177 support for static inference and local name scopes. Furthermore, astroid
12178 builds partial trees by inspecting living objects.")
12179 (license license:lgpl2.1+)
12180 (properties `((python2-variant . ,(delay python2-astroid))))))
12181
12182 (define-public python2-astroid
12183 (let ((base (package-with-python2
12184 (strip-python2-variant python-astroid))))
12185 (package (inherit base)
12186 ;; Version 2.x removes python2 support.
12187 (version "1.6.5")
12188 (source
12189 (origin
12190 (method url-fetch)
12191 (uri (pypi-uri "astroid" version))
12192 (sha256
12193 (base32
12194 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12195 (arguments
12196 (substitute-keyword-arguments (package-arguments base)
12197 ((#:phases phases)
12198 `(modify-phases ,phases
12199 (add-after 'unpack 'remove-spurious-test
12200 (lambda _
12201 ;; https://github.com/PyCQA/astroid/issues/276
12202 (delete-file "astroid/tests/unittest_brain.py")
12203 #t))
12204 (replace 'check
12205 (lambda _
12206 (invoke"python" "-m" "unittest" "discover"
12207 "-p" "unittest*.py")))))))
12208 (native-inputs `())
12209 (propagated-inputs
12210 `(("python2-backports-functools-lru-cache"
12211 ,python2-backports-functools-lru-cache)
12212 ("python2-enum34" ,python2-enum34)
12213 ("python2-singledispatch" ,python2-singledispatch)
12214 ,@(package-propagated-inputs base))))))
12215
12216 (define-public python-isort
12217 (package
12218 (name "python-isort")
12219 (version "4.3.4")
12220 (source
12221 (origin
12222 (method git-fetch)
12223 (uri (git-reference
12224 ;; Tests pass only from the Github sources
12225 (url "https://github.com/timothycrosley/isort")
12226 (commit version)))
12227 (file-name (git-file-name name version))
12228 (sha256
12229 (base32
12230 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12231 (build-system python-build-system)
12232 (native-inputs
12233 `(("python-mock" ,python-mock)
12234 ("python-pytest" ,python-pytest)))
12235 (home-page "https://github.com/timothycrosley/isort")
12236 (synopsis "Python utility/library to sort python imports")
12237 (description "@code{python-isort} is a python utility/library to sort
12238 imports alphabetically, and automatically separated into sections. It
12239 provides a command line utility, a python library and plugins for various
12240 editors.")
12241 (license license:expat)
12242 (properties `((python2-variant . ,(delay python2-isort))))))
12243
12244 (define-public python2-isort
12245 (let ((base (package-with-python2
12246 (strip-python2-variant python-isort))))
12247 (package (inherit base)
12248 (native-inputs
12249 `(("python2-futures" ,python2-futures)
12250 ,@(package-native-inputs base))))))
12251
12252 (define-public python2-backports-functools-lru-cache
12253 (package
12254 (name "python2-backports-functools-lru-cache")
12255 (version "1.5")
12256 (source
12257 (origin
12258 (method url-fetch)
12259 ;; only the pypi tarballs contain the necessary metadata
12260 (uri (pypi-uri "backports.functools_lru_cache" version))
12261 (sha256
12262 (base32
12263 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12264 (build-system python-build-system)
12265 (native-inputs
12266 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12267 (arguments
12268 `(#:python ,python-2))
12269 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12270 (synopsis "Backport of functools.lru_cache from Python 3.3")
12271 (description "@code{python2-backports-functools-lru-cache} is a backport
12272 of @code{functools.lru_cache} from python 3.3.")
12273 (license license:expat)))
12274
12275 (define-public python-configparser
12276 (package
12277 (name "python-configparser")
12278 (version "3.5.0")
12279 (source
12280 (origin
12281 (method url-fetch)
12282 (uri (string-append
12283 "https://bitbucket.org/ambv/configparser/get/"
12284 version ".tar.bz2"))
12285 (file-name (string-append name "-" version ".tar.gz"))
12286 (sha256
12287 (base32
12288 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12289 (build-system python-build-system)
12290 (home-page "https://github.com/jaraco/configparser/")
12291 (synopsis "Backport of configparser from python 3.5")
12292 (description "@code{python-configparser} is a backport of
12293 @code{configparser} from Python 3.5 so that it can be used directly
12294 in other versions.")
12295 (license license:expat)))
12296
12297 (define-public python2-configparser
12298 (package-with-python2 python-configparser))
12299
12300 (define-public python-mando
12301 (package
12302 (name "python-mando")
12303 (version "0.6.4")
12304 (source (origin
12305 (method url-fetch)
12306 (uri (pypi-uri "mando" version))
12307 (sha256
12308 (base32
12309 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12310 (build-system python-build-system)
12311 (propagated-inputs
12312 `(("python-rst2ansi" ,python-rst2ansi)
12313 ("python-six" ,python-six)))
12314 (native-inputs
12315 `(("python-pytest" ,python-pytest)))
12316 (home-page "https://mando.readthedocs.org/")
12317 (synopsis
12318 "Wrapper around argparse, allowing creation of complete CLI applications")
12319 (description
12320 "This package is a wrapper around argparse, allowing you to write complete CLI
12321 applications in seconds while maintaining all the flexibility.")
12322 (license license:expat)))
12323
12324 (define-public python2-mando
12325 (package-with-python2 python-mando))
12326
12327 (define-public python2-argparse
12328 (package
12329 (name "python2-argparse")
12330 (version "1.4.0")
12331 (source
12332 (origin
12333 (method url-fetch)
12334 (uri (pypi-uri "argparse" version))
12335 (sha256
12336 (base32
12337 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12338 (build-system python-build-system)
12339 (arguments
12340 `(#:python ,python-2))
12341 (home-page "https://github.com/ThomasWaldmann/argparse/")
12342 (synopsis "Python command-line parsing library")
12343 (description
12344 "This package is mostly for people who want to have @code{argparse} on
12345 older Pythons because it was not part of the standard library back then.")
12346 (license license:psfl)))
12347
12348 (define-public python-fudge
12349 (package
12350 (name "python-fudge")
12351 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12352 ;; package, which is currently the only use of this package.
12353 (version "0.9.6")
12354 (source
12355 (origin
12356 (method url-fetch)
12357 (uri (pypi-uri "fudge" version))
12358 (sha256
12359 (base32
12360 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12361 (build-system python-build-system)
12362 (arguments
12363 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12364 (home-page "https://github.com/fudge-py/fudge")
12365 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12366 (description
12367 "Fudge is a Python module for using fake objects (mocks and stubs) to
12368 test real ones.
12369
12370 In readable Python code, you declare the methods available on your fake object
12371 and how they should be called. Then you inject that into your application and
12372 start testing. This declarative approach means you don’t have to record and
12373 playback actions and you don’t have to inspect your fakes after running code.
12374 If the fake object was used incorrectly then you’ll see an informative
12375 exception message with a traceback that points to the culprit.")
12376 (license license:expat)))
12377
12378 (define-public python2-fudge
12379 (package-with-python2 python-fudge))
12380
12381 (define-public python-mwclient
12382 (package
12383 (name "python-mwclient")
12384 (version "0.8.4")
12385 (source
12386 (origin
12387 (method url-fetch)
12388 ;; The PyPI version wouldn't contain tests.
12389 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12390 "v" version ".tar.gz"))
12391 (file-name (string-append name "-" version ".tar.gz"))
12392 (sha256
12393 (base32
12394 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12395 (build-system python-build-system)
12396 (propagated-inputs
12397 `(("python-requests" ,python-requests)
12398 ("python-requests-oauthlib"
12399 ,python-requests-oauthlib)
12400 ("python-six" ,python-six)))
12401 (native-inputs
12402 `(("python-mock" ,python-mock)
12403 ("python-pytest" ,python-pytest)
12404 ("python-pytest-pep8" ,python-pytest-pep8)
12405 ("python-pytest-cache" ,python-pytest-cache)
12406 ("python-pytest-cov" ,python-pytest-cov)
12407 ("python-responses" ,python-responses)))
12408 (home-page "https://github.com/btongminh/mwclient")
12409 (synopsis "MediaWiki API client")
12410 (description "This package provides a MediaWiki API client.")
12411 (license license:expat)))
12412
12413 (define-public python2-mwclient
12414 (package-with-python2 python-mwclient))
12415
12416 (define-public python-utils
12417 (package
12418 (name "python-utils")
12419 (version "2.1.0")
12420 (source (origin
12421 (method url-fetch)
12422 (uri (pypi-uri "python-utils" version))
12423 (sha256
12424 (base32
12425 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12426 (build-system python-build-system)
12427 (native-inputs
12428 `(("pytest-runner" ,python-pytest-runner)
12429 ("pytest" ,python-pytest)
12430 ("six" ,python-six)))
12431 (home-page "https://github.com/WoLpH/python-utils")
12432 (synopsis "Convenient utilities not included with the standard Python install")
12433 (description
12434 "Python Utils is a collection of small Python functions and classes which
12435 make common patterns shorter and easier.")
12436 (license license:bsd-2)))
12437
12438 (define-public python2-utils
12439 (package-with-python2 python-utils))
12440
12441 (define-public python-diff-match-patch
12442 (package
12443 (name "python-diff-match-patch")
12444 (version "20121119")
12445 (source
12446 (origin
12447 (method url-fetch)
12448 (uri (pypi-uri "diff-match-patch" version))
12449 (sha256
12450 (base32
12451 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12452 (build-system python-build-system)
12453 (home-page "https://code.google.com/p/google-diff-match-patch")
12454 (synopsis "Synchronize plain text")
12455 (description "Diff Match and Patch libraries offer robust algorithms to
12456 perform the operations required for synchronizing plain text.")
12457 (license license:asl2.0)))
12458
12459 (define-public python2-diff-match-patch
12460 (package-with-python2 python-diff-match-patch))
12461
12462 (define-public python-dirsync
12463 (package
12464 (name "python-dirsync")
12465 (version "2.2.3")
12466 (source
12467 (origin
12468 (method url-fetch)
12469 (uri (pypi-uri "dirsync" version))
12470 (sha256
12471 (base32
12472 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12473 (build-system python-build-system)
12474 (propagated-inputs
12475 `(("six" ,python-six)))
12476 (home-page "https://bitbucket.org/tkhyn/dirsync")
12477 (synopsis "Advanced directory tree synchronisation tool")
12478 (description "Advanced directory tree synchronisation tool.")
12479 (license license:expat)))
12480
12481 (define-public python2-dirsync
12482 (package-with-python2 python-dirsync))
12483
12484 (define-public python-levenshtein
12485 (package
12486 (name "python-levenshtein")
12487 (version "0.12.0")
12488 (source
12489 (origin
12490 (method url-fetch)
12491 (uri (pypi-uri "python-Levenshtein" version))
12492 (sha256
12493 (base32
12494 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12495 (build-system python-build-system)
12496 (home-page "https://github.com/ztane/python-Levenshtein")
12497 (synopsis "Fast computation of Levenshtein distance and string similarity")
12498 (description
12499 "The Levenshtein Python C extension module contains functions for fast computation of
12500 @enumerate
12501 @item Levenshtein (edit) distance, and edit operations
12502 @item string similarity
12503 @item approximate median strings, and generally string averaging
12504 @item string sequence and set similarity
12505 @end enumerate
12506 It supports both normal and Unicode strings.")
12507 (license license:gpl2+)))
12508
12509 (define-public python2-levenshtein
12510 (package-with-python2 python-levenshtein))
12511
12512 (define-public python-scandir
12513 (package
12514 (name "python-scandir")
12515 (version "1.9.0")
12516 (source
12517 (origin
12518 (method url-fetch)
12519 (uri (pypi-uri "scandir" version))
12520 (sha256
12521 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12522 (build-system python-build-system)
12523 (arguments
12524 `(#:phases (modify-phases %standard-phases
12525 (replace 'check
12526 (lambda _
12527 (invoke "python" "test/run_tests.py"))))))
12528 (home-page "https://github.com/benhoyt/scandir")
12529 (synopsis "Directory iteration function")
12530 (description
12531 "Directory iteration function like os.listdir(), except that instead of
12532 returning a list of bare filenames, it yields DirEntry objects that include
12533 file type and stat information along with the name. Using scandir() increases
12534 the speed of os.walk() by 2-20 times (depending on the platform and file
12535 system) by avoiding unnecessary calls to os.stat() in most cases.
12536
12537 This package is part of the Python standard library since version 3.5.")
12538 (license license:bsd-3)))
12539
12540 (define-public python2-scandir
12541 (package-with-python2 python-scandir))
12542
12543 (define-public python2-stemming
12544 (package
12545 (name "python2-stemming")
12546 (version "1.0.1")
12547 (source
12548 (origin
12549 (method url-fetch)
12550 (uri (pypi-uri "stemming" version))
12551 (sha256
12552 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12553 (build-system python-build-system)
12554 (arguments
12555 `(#:python ,python-2))
12556 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12557 (synopsis "Python implementations of various stemming algorithms")
12558 (description
12559 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12560 stemming algorithms for English. These implementations are straightforward and
12561 efficient, unlike some Python versions of the same algorithms available on the
12562 Web. This package is an extraction of the stemming code included in the Whoosh
12563 search engine.")
12564 (license license:public-domain)))
12565
12566 (define-public python-factory-boy
12567 (package
12568 (name "python-factory-boy")
12569 (version "2.8.1")
12570 (source
12571 (origin
12572 (method url-fetch)
12573 (uri (pypi-uri "factory_boy" version))
12574 (sha256
12575 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12576 (build-system python-build-system)
12577 (arguments
12578 ;; Tests are not included in the tarball.
12579 `(#:tests? #f))
12580 (propagated-inputs
12581 `(("faker" ,python-faker)))
12582 (home-page "https://github.com/benhoyt/scandir")
12583 (synopsis "Versatile test fixtures replacement")
12584 (description
12585 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12586
12587 As a fixtures replacement tool, it aims to replace static, hard to maintain
12588 fixtures with easy-to-use factories for complex object.
12589
12590 Instead of building an exhaustive test setup with every possible combination
12591 of corner cases, factory_boy allows you to use objects customized for the
12592 current test, while only declaring the test-specific fields")
12593 (license license:expat)))
12594
12595 (define-public python2-factory-boy
12596 (package-with-python2 python-factory-boy))
12597
12598 (define-public python-translate-toolkit
12599 (package
12600 (name "python-translate-toolkit")
12601 (version "2.1.0")
12602 (source
12603 (origin
12604 (method url-fetch)
12605 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12606 (sha256
12607 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12608 (build-system python-build-system)
12609 (native-inputs
12610 `(("python-pytest" ,python-pytest)
12611 ("python-sphinx" ,python-sphinx)))
12612 (propagated-inputs
12613 `(("python-babel" ,python-babel)
12614 ("python-beautifulsoup4" ,python-beautifulsoup4)
12615 ("python-chardet" ,python-chardet)
12616 ("python-diff-match-patch" ,python-diff-match-patch)
12617 ("python-levenshtein" ,python-levenshtein)
12618 ("python-lxml" ,python-lxml)
12619 ("python-six" ,python-six)
12620 ("python-vobject" ,python-vobject)
12621 ("python-pyyaml" ,python-pyyaml)))
12622 (arguments
12623 ;; TODO: tests are not run, because they end with
12624 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12625 ;; 'parse_funcs'
12626 ;; during test setup.
12627 `(#:tests? #f))
12628 (home-page "https://toolkit.translatehouse.org")
12629 (synopsis "Tools and API for translation and localization engineering")
12630 (description
12631 "Tools and API for translation and localization engineering. It contains
12632 several utilities, as well as an API for building localization tools.")
12633 (license license:gpl2+)))
12634
12635 (define-public python2-translate-toolkit
12636 (package-with-python2 python-translate-toolkit))
12637
12638 (define-public python-packaging
12639 (package
12640 (name "python-packaging")
12641 (version "19.0")
12642 (source
12643 (origin
12644 (method url-fetch)
12645 (uri (pypi-uri "packaging" version))
12646 (sha256
12647 (base32
12648 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12649 (build-system python-build-system)
12650 (arguments
12651 `(#:phases (modify-phases %standard-phases
12652 (replace 'check
12653 (lambda _ (invoke "py.test" "-vv"))))))
12654 (native-inputs
12655 `(("python-pretend" ,python-pretend)
12656 ("python-pytest" ,python-pytest)))
12657 (propagated-inputs
12658 `(("python-pyparsing" ,python-pyparsing)
12659 ("python-six" ,python-six)))
12660 (home-page "https://github.com/pypa/packaging")
12661 (synopsis "Core utilities for Python packages")
12662 (description "Packaging is a Python module for dealing with Python packages.
12663 It offers an interface for working with package versions, names, and dependency
12664 information.")
12665 ;; From 'LICENSE': This software is made available under the terms of
12666 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12667 ;; Contributions to this software is made under the terms of *both* these
12668 ;; licenses.
12669 (license (list license:asl2.0 license:bsd-2))))
12670
12671 (define-public python2-packaging
12672 (package-with-python2 python-packaging))
12673
12674 (define-public python-relatorio
12675 (package
12676 (name "python-relatorio")
12677 (version "0.8.0")
12678 (source
12679 (origin
12680 (method url-fetch)
12681 (uri (pypi-uri "relatorio" version))
12682 (sha256
12683 (base32
12684 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12685 (build-system python-build-system)
12686 (propagated-inputs
12687 `(("python-lxml" ,python-lxml)
12688 ("python-genshi" ,python-genshi)))
12689 (native-inputs
12690 `(("python-magic" ,python-magic)))
12691 (home-page "https://relatorio.tryton.org/")
12692 (synopsis "Templating library able to output ODT and PDF files")
12693 (description "Relatorio is a templating library which provides a way to
12694 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12695 for more filetypes can be easily added by creating plugins for them.")
12696 (license license:gpl3+)))
12697
12698 (define-public python2-relatorio
12699 (package-with-python2 python-relatorio))
12700
12701 (define-public python-radon
12702 (package
12703 (name "python-radon")
12704 (version "2.2.0")
12705 (source
12706 (origin
12707 (method url-fetch)
12708 (uri (pypi-uri "radon" version))
12709 (sha256
12710 (base32
12711 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12712 (build-system python-build-system)
12713 (arguments
12714 `(#:phases (modify-phases %standard-phases
12715 (replace 'check
12716 (lambda _
12717 (invoke "python" "radon/tests/run.py"))))))
12718 (propagated-inputs
12719 `(("python-colorama" ,python-colorama)
12720 ("python-flake8-polyfill" ,python-flake8-polyfill)
12721 ("python-mando" ,python-mando)))
12722 (native-inputs
12723 `(("python-pytest" ,python-pytest)
12724 ("python-pytest-mock" ,python-pytest-mock)))
12725 (home-page "https://radon.readthedocs.org/")
12726 (synopsis "Code Metrics in Python")
12727 (description "Radon is a Python tool which computes various code metrics.
12728 Supported metrics are:
12729 @itemize @bullet
12730 @item raw metrics: SLOC, comment lines, blank lines, &c.
12731 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12732 @item Halstead metrics (all of them)
12733 @item the Maintainability Index (a Visual Studio metric)
12734 @end itemize")
12735 (license license:expat)))
12736
12737 (define-public python2-radon
12738 (package-with-python2 python-radon))
12739
12740 (define-public python-sure
12741 (package
12742 (name "python-sure")
12743 (version "1.4.11")
12744 (source
12745 (origin
12746 (method url-fetch)
12747 (uri (pypi-uri "sure" version))
12748 (sha256
12749 (base32
12750 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12751 (build-system python-build-system)
12752 (propagated-inputs
12753 `(("python-mock" ,python-mock)
12754 ("python-six" ,python-six)))
12755 (native-inputs
12756 `(("python-nose" ,python-nose)))
12757 (home-page "https://github.com/gabrielfalcao/sure")
12758 (synopsis "Automated testing library in python for python")
12759 (description
12760 "Sure is a python library that leverages a DSL for writing assertions.
12761 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12762 (license license:gpl3+)))
12763
12764 (define-public python2-sure
12765 (package-with-python2 python-sure))
12766
12767 (define-public python2-couleur
12768 ;; This package does not seem to support python3 at all, hence,
12769 ;; only the python2 variant definition is provided.
12770 (package
12771 (name "python2-couleur")
12772 (version "0.6.2")
12773 (source
12774 (origin
12775 (method url-fetch)
12776 (uri (pypi-uri "couleur" version))
12777 (sha256
12778 (base32
12779 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12780 (build-system python-build-system)
12781 (arguments
12782 `(#:python ,python-2))
12783 (home-page "https://github.com/gabrielfalcao/couleur")
12784 (synopsis
12785 "ANSI terminal tool for python, colored shell and other handy fancy features")
12786 (description
12787 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12788 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12789 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12790 ;; https://github.com/gabrielfalcao/couleur/issues/11
12791 (license license:lgpl3+)))
12792
12793 (define-public python-misaka
12794 (package
12795 (name "python-misaka")
12796 (version "2.1.1")
12797 (source
12798 (origin
12799 (method url-fetch)
12800 (uri (pypi-uri "misaka" version))
12801 (sha256
12802 (base32
12803 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12804 (build-system python-build-system)
12805 (arguments
12806 `(;; Line 37 of setup.py calls self.run_command('develop')
12807 ;; in the 'check' phase. This command seems to be trying
12808 ;; to write to
12809 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12810 ;; for which it does not have the permission to write.
12811 #:tests? #f))
12812 (propagated-inputs
12813 `(("python-cffi" ,python-cffi)))
12814 (home-page "https://github.com/FSX/misaka")
12815 (synopsis "Python binding for Hoedown")
12816 (description
12817 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12818 library written in C. It features a fast HTML renderer and functionality to make custom
12819 renderers (e.g. man pages or LaTeX).")
12820 (license license:expat)))
12821
12822 (define-public python2-misaka
12823 (package-with-python2 python-misaka))
12824
12825 (define-public python2-steadymark
12826 ;; This is forced into being a python2 only variant
12827 ;; due to its dependence on couleur that has no support
12828 ;; for python3
12829 (package
12830 (name "python2-steadymark")
12831 (version "0.7.3")
12832 (source
12833 (origin
12834 (method url-fetch)
12835 (uri (pypi-uri "steadymark" version))
12836 (sha256
12837 (base32
12838 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12839 (build-system python-build-system)
12840 (native-inputs
12841 `(("python-couleur" ,python2-couleur)
12842 ("python-sure" ,python2-sure)
12843 ("python-misaka" ,python2-misaka)))
12844 (arguments
12845 `(#:python ,python-2
12846 #:phases
12847 (modify-phases %standard-phases
12848 (add-before 'build 'patch-setup-py
12849 (lambda _
12850 ;; Update requirements from dependency==version
12851 ;; to dependency>=version
12852 (substitute* "setup.py"
12853 (("==") ">="))
12854 #t)))))
12855 (home-page "https://github.com/gabrielfalcao/steadymark")
12856 (synopsis "Markdown-based test runner for python")
12857 (description
12858 "@code{Steadymark} allows documentation to be written in github-flavoured
12859 markdown. The documentation may contain snippets of code surrounded by python
12860 code blocks and @code{Steadymark} will find these snippets and run them, making
12861 sure that there are no old malfunctional examples in the documentation examples.")
12862 (license license:expat)))
12863
12864 (define-public python-jsonpointer
12865 (package
12866 (name "python-jsonpointer")
12867 (version "1.10")
12868 (source
12869 (origin
12870 (method url-fetch)
12871 (uri (pypi-uri "jsonpointer" version))
12872 (sha256
12873 (base32
12874 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12875 (build-system python-build-system)
12876 (home-page "https://github.com/stefankoegl/python-json-pointer")
12877 (synopsis "Identify specific nodes in a JSON document")
12878 (description "@code{jsonpointer} allows you to access specific nodes
12879 by path in a JSON document (see RFC 6901).")
12880 (license license:bsd-3)))
12881
12882 (define-public python2-jsonpointer
12883 (package-with-python2 python-jsonpointer))
12884
12885 (define-public python-jsonpatch
12886 (package
12887 (name "python-jsonpatch")
12888 (version "1.16")
12889 (source
12890 (origin
12891 (method url-fetch)
12892 ;; pypi version lacks tests.js
12893 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12894 "archive/v" version ".tar.gz"))
12895 (file-name (string-append name "-" version ".tar.gz"))
12896 (sha256
12897 (base32
12898 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12899 (build-system python-build-system)
12900 (native-inputs
12901 `(("python-jsonpointer" ,python-jsonpointer)))
12902 (home-page "https://github.com/stefankoegl/python-json-patch")
12903 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12904 (description "@code{jsonpatch} is a library and program that allows
12905 applying JSON Patches according to RFC 6902.")
12906 (license license:bsd-3)))
12907
12908 (define-public python2-jsonpatch
12909 (package-with-python2 python-jsonpatch))
12910
12911 (define-public python-jsonpatch-0.4
12912 (package (inherit python-jsonpatch)
12913 (name "python-jsonpatch")
12914 (version "0.4")
12915 (source
12916 (origin
12917 (method url-fetch)
12918 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12919 "archive/v" version ".tar.gz"))
12920 (file-name (string-append name "-" version ".tar.gz"))
12921 (sha256
12922 (base32
12923 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12924
12925 (define-public python2-jsonpatch-0.4
12926 (package-with-python2 python-jsonpatch-0.4))
12927
12928 (define-public python-rfc3986
12929 (package
12930 (name "python-rfc3986")
12931 (version "1.1.0")
12932 (source (origin
12933 (method url-fetch)
12934 (uri (pypi-uri "rfc3986" version))
12935 (sha256
12936 (base32
12937 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12938 (build-system python-build-system)
12939 (arguments
12940 `(#:modules ((guix build utils)
12941 (guix build python-build-system)
12942 (ice-9 ftw)
12943 (srfi srfi-1)
12944 (srfi srfi-26))
12945 #:phases
12946 (modify-phases %standard-phases
12947 (replace 'check
12948 (lambda _
12949 (let ((cwd (getcwd)))
12950 (setenv "PYTHONPATH"
12951 (string-append cwd "/build/"
12952 (find (cut string-prefix? "lib" <>)
12953 (scandir (string-append cwd "/build")))
12954 ":"
12955 (getenv "PYTHONPATH")))
12956 (invoke "pytest" "-v")))))))
12957 (native-inputs
12958 `(("python-pytest" ,python-pytest)))
12959 (home-page "https://rfc3986.readthedocs.io/")
12960 (synopsis "Parse and validate URI references")
12961 (description
12962 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12963 validation and authority parsing. This module also supports RFC@tie{}6874
12964 which adds support for zone identifiers to IPv6 addresses.")
12965 (license license:asl2.0)))
12966
12967 (define-public python2-rfc3986
12968 (package-with-python2 python-rfc3986))
12969
12970 (define-public python-rfc3987
12971 (package
12972 (name "python-rfc3987")
12973 (version "1.3.7")
12974 (source
12975 (origin
12976 (method url-fetch)
12977 (uri (pypi-uri "rfc3987" version))
12978 (sha256
12979 (base32
12980 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12981 (build-system python-build-system)
12982 (home-page "https://pypi.python.org/pypi/rfc3987")
12983 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12984 (description "@code{rfc3987} provides routines for parsing and
12985 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12986 (license license:gpl3+)))
12987
12988 (define-public python2-rfc3987
12989 (package-with-python2 python-rfc3987))
12990
12991 (define-public python-validate-email
12992 (package
12993 (name "python-validate-email")
12994 (version "1.3")
12995 (source
12996 (origin
12997 (method url-fetch)
12998 (uri (pypi-uri "validate_email" version))
12999 (sha256
13000 (base32
13001 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13002 (build-system python-build-system)
13003 (home-page "https://github.com/syrusakbary/validate_email")
13004 (synopsis "Verifies if an email address is valid and really exists")
13005 (description "@code{validate_email} can be used to verify if an email
13006 address is valid and really exists.")
13007 (license license:lgpl3+)))
13008
13009 (define-public python2-validate-email
13010 (package-with-python2 python-validate-email))
13011
13012 (define-public python-flex
13013 (package
13014 (name "python-flex")
13015 (version "6.10.0")
13016 (source
13017 (origin
13018 (method url-fetch)
13019 (uri (pypi-uri "flex" version))
13020 (sha256
13021 (base32
13022 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13023 (build-system python-build-system)
13024 (propagated-inputs
13025 `(("python-click" ,python-click)
13026 ("python-iso8601" ,python-iso8601)
13027 ("python-jsonpointer" ,python-jsonpointer)
13028 ("python-pyyaml" ,python-pyyaml)
13029 ("python-requests" ,python-requests)
13030 ("python-rfc3987" ,python-rfc3987)
13031 ("python-six" ,python-six)
13032 ("python-validate-email" ,python-validate-email)))
13033 (home-page "https://github.com/pipermerriam/flex")
13034 (synopsis "Validates Swagger schemata")
13035 (description "@code{flex} can be used to validate Swagger schemata.")
13036 (license license:bsd-3)))
13037
13038 (define-public python2-flex
13039 (package-with-python2 python-flex))
13040
13041 (define-public python-marshmallow
13042 (package
13043 (name "python-marshmallow")
13044 (version "3.0.0b14")
13045 (source
13046 (origin
13047 (method url-fetch)
13048 (uri (pypi-uri "marshmallow" version))
13049 (sha256
13050 (base32
13051 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13052 (build-system python-build-system)
13053 (propagated-inputs
13054 `(("python-dateutil" ,python-dateutil)
13055 ("python-simplejson" ,python-simplejson)))
13056 (native-inputs
13057 `(("python-pytest" ,python-pytest)
13058 ("python-pytz" ,python-pytz)))
13059 (home-page "https://github.com/marshmallow-code/marshmallow")
13060 (synopsis "Convert complex datatypes to and from native
13061 Python datatypes.")
13062 (description "@code{marshmallow} provides a library for converting
13063 complex datatypes to and from native Python datatypes.")
13064 (license license:expat)))
13065
13066 (define-public python2-marshmallow
13067 (package-with-python2 python-marshmallow))
13068
13069 (define-public python-apispec
13070 (package
13071 (name "python-apispec")
13072 (version "0.25.3")
13073 (source
13074 (origin
13075 (method url-fetch)
13076 (uri (pypi-uri "apispec" version))
13077 (sha256
13078 (base32
13079 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13080 (build-system python-build-system)
13081 (propagated-inputs
13082 `(("python-pyyaml" ,python-pyyaml)))
13083 (native-inputs
13084 `(("python-pytest" ,python-pytest)
13085 ("python-flask" ,python-flask)
13086 ("python-marshmallow" ,python-marshmallow)
13087 ("python-tornado" ,python-tornado)
13088 ("python-bottle" ,python-bottle)
13089 ("python-mock" ,python-mock)))
13090 (home-page "https://github.com/marshmallow-code/apispec")
13091 (synopsis "Swagger 2.0 API specification generator")
13092 (description "@code{python-apispec} is a pluggable API specification
13093 generator. Currently supports the OpenAPI specification (f.k.a.
13094 Swagger 2.0).")
13095 (license license:expat)))
13096
13097 (define-public python2-apispec
13098 (package-with-python2 python-apispec))
13099
13100 (define-public python-flasgger
13101 (package
13102 (name "python-flasgger")
13103 (version "0.6.3")
13104 (source
13105 (origin
13106 (method git-fetch)
13107 (uri (git-reference
13108 (url "https://github.com/rochacbruno/flasgger.git")
13109 (commit version)))
13110 (file-name (git-file-name name version))
13111 (sha256
13112 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13113 (build-system python-build-system)
13114 (arguments
13115 `(#:phases
13116 (modify-phases %standard-phases
13117 (replace 'check
13118 (lambda* (#:key inputs outputs #:allow-other-keys)
13119 (substitute* "Makefile"
13120 (("flake8 flasgger --ignore=F403")
13121 "flake8 flasgger --ignore=E731,F403"))
13122 (setenv "PYTHONPATH" (string-append (getcwd)
13123 ":"
13124 (getenv "PYTHONPATH")))
13125 (invoke "py.test"))))))
13126 (propagated-inputs
13127 `(("python-flask" ,python-flask)
13128 ("python-pyyaml" ,python-pyyaml)
13129 ("python-jsonschema" ,python-jsonschema)
13130 ("python-mistune" ,python-mistune)
13131 ("python-six" ,python-six)))
13132 (native-inputs
13133 `(("python-decorator" ,python-decorator)
13134 ("python-flake8" ,python-flake8)
13135 ("python-flask-restful" ,python-flask-restful)
13136 ("python-flex" ,python-flex)
13137 ("python-pytest" ,python-pytest)
13138 ("python-pytest-cov" ,python-pytest-cov)
13139 ("python-marshmallow" ,python-marshmallow)
13140 ("python-apispec" ,python-apispec)))
13141 (home-page "https://github.com/rochacbruno/flasgger/")
13142 (synopsis "Extract Swagger specs from your Flask project")
13143 (description "@code{python-flasgger} allows extracting Swagger specs
13144 from your Flask project. It is a fork of Flask-Swagger.")
13145 (license license:expat)))
13146
13147 (define-public python2-flasgger
13148 (package-with-python2 python-flasgger))
13149
13150 (define-public python-swagger-spec-validator
13151 (package
13152 (name "python-swagger-spec-validator")
13153 (version "2.4.3")
13154 (source
13155 (origin
13156 (method url-fetch)
13157 (uri (pypi-uri "swagger-spec-validator" version))
13158 (sha256
13159 (base32
13160 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13161 (build-system python-build-system)
13162 (propagated-inputs
13163 `(("python-jsonschema" ,python-jsonschema)
13164 ("python-pyyaml" ,python-pyyaml)
13165 ("python-six" ,python-six)))
13166 (home-page
13167 "https://github.com/Yelp/swagger_spec_validator")
13168 (synopsis "Validation of Swagger specifications")
13169 (description "@code{swagger_spec_validator} provides a library for
13170 validating Swagger API specifications.")
13171 (license license:asl2.0)))
13172
13173 (define-public python2-swagger-spec-validator
13174 (package-with-python2 python-swagger-spec-validator))
13175
13176 (define-public python-apache-libcloud
13177 (package
13178 (name "python-apache-libcloud")
13179 (version "2.4.0")
13180 (source
13181 (origin
13182 (method url-fetch)
13183 (uri (pypi-uri "apache-libcloud" version))
13184 (sha256
13185 (base32
13186 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13187 (build-system python-build-system)
13188 (arguments
13189 `(#:phases
13190 (modify-phases %standard-phases
13191 (add-after 'unpack 'patch-ssh
13192 (lambda* (#:key inputs #:allow-other-keys)
13193 (substitute* "libcloud/compute/ssh.py"
13194 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13195 "/bin/ssh" "'")))
13196 #t))
13197 (add-after 'unpack 'patch-tests
13198 (lambda _
13199 (substitute* "./libcloud/test/test_file_fixtures.py"
13200 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13201 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13202 return (httplib.OK,
13203 \"1234abcd\",
13204 {\"test\": \"value\"},
13205 httplib.responses[httplib.OK])
13206 def _ascii"))
13207 (substitute* "libcloud/test/compute/test_ssh_client.py"
13208 (("class ShellOutSSHClientTests")
13209 "@unittest.skip(\"Guix container doesn't have ssh service\")
13210 class ShellOutSSHClientTests")
13211 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13212 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13213 (("'.xF0', '.x90', '.x8D', '.x88'")
13214 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13215 #t))
13216 (add-before 'check 'copy-secret
13217 (lambda _
13218 (copy-file "libcloud/test/secrets.py-dist"
13219 "libcloud/test/secrets.py")
13220 #t)))))
13221 (inputs
13222 `(("openssh" ,openssh)))
13223 (propagated-inputs
13224 `(("python-paramiko" ,python-paramiko)
13225 ("python-requests" ,python-requests)))
13226 (native-inputs
13227 `(("python-lockfile" ,python-lockfile)
13228 ("python-mock" ,python-mock)
13229 ("python-pytest" ,python-pytest)
13230 ("python-pytest-runner" ,python-pytest-runner)
13231 ("python-requests-mock" ,python-requests-mock)))
13232 (home-page "https://libcloud.apache.org/")
13233 (synopsis "Unified Cloud API")
13234 (description "@code{libcloud} is a Python library for interacting with
13235 many of the popular cloud service providers using a unified API.")
13236 (license license:asl2.0)))
13237
13238 (define-public python2-apache-libcloud
13239 (package-with-python2 python-apache-libcloud))
13240
13241 (define-public python-smmap2
13242 (package
13243 (name "python-smmap2")
13244 (version "2.0.3")
13245 (source
13246 (origin
13247 (method url-fetch)
13248 (uri (pypi-uri "smmap2" version))
13249 (sha256
13250 (base32
13251 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13252 (build-system python-build-system)
13253 (native-inputs
13254 `(("python-nosexcover" ,python-nosexcover)))
13255 (home-page "https://github.com/Byron/smmap")
13256 (synopsis "Python sliding window memory map manager")
13257 (description "@code{smmap2} is a pure Python implementation of a sliding
13258 window memory map manager.")
13259 (license license:bsd-3)))
13260
13261 (define-public python2-smmap2
13262 (package-with-python2 python-smmap2))
13263
13264 (define-public python-regex
13265 (package
13266 (name "python-regex")
13267 (version "2019.04.14")
13268 (source (origin
13269 (method url-fetch)
13270 (uri (pypi-uri "regex" version))
13271 (sha256
13272 (base32
13273 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13274 ;; TODO: Fix and enable regex_test.py tests that complain about the
13275 ;; test.support module not existing.
13276 (build-system python-build-system)
13277 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13278 (synopsis "Alternative regular expression module")
13279 (description "This regular expression implementation is backwards-
13280 compatible with the standard @code{re} module, but offers additional
13281 functionality like full case-folding for case-insensitive matches in Unicode.")
13282 (license license:psfl)))
13283
13284 (define-public python2-regex
13285 (package-with-python2 python-regex))
13286
13287 (define-public python2-pyopengl
13288 (package
13289 (name "python2-pyopengl")
13290 (version "3.1.0")
13291 (source
13292 (origin
13293 (method url-fetch)
13294 (uri (pypi-uri "PyOpenGL" version))
13295 (sha256
13296 (base32
13297 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13298 (arguments
13299 `(#:python ,python-2))
13300 (build-system python-build-system)
13301 (home-page "http://pyopengl.sourceforge.net")
13302 (synopsis "Standard OpenGL bindings for Python")
13303 (description
13304 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13305 related APIs. The binding is created using the standard @code{ctypes}
13306 library.")
13307 (license license:bsd-3)))
13308
13309 (define-public python2-pyopengl-accelerate
13310 (package
13311 (inherit python2-pyopengl)
13312 (name "python2-pyopengl-accelerate")
13313 (version "3.1.0")
13314 (source
13315 (origin
13316 (method url-fetch)
13317 (uri (pypi-uri "PyOpenGL-accelerate" version))
13318 (sha256
13319 (base32
13320 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13321 (synopsis "Acceleration code for PyOpenGL")
13322 (description
13323 "This is the Cython-coded accelerator module for PyOpenGL.")))
13324
13325 (define-public python-rencode
13326 (package
13327 (name "python-rencode")
13328 (version "1.0.5")
13329 (source
13330 (origin
13331 (method url-fetch)
13332 (uri (pypi-uri "rencode" version))
13333 (sha256
13334 (base32
13335 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13336 (build-system python-build-system)
13337 (arguments
13338 `(#:phases
13339 (modify-phases %standard-phases
13340 (add-before 'check 'delete-bogus-test
13341 ;; This test requires /home/aresch/Downloads, which is not provided by
13342 ;; the build environment.
13343 (lambda _
13344 (delete-file "rencode/t.py")
13345 #t)))))
13346 (native-inputs `(("pkg-config" ,pkg-config)
13347 ("python-cython" ,python-cython)))
13348 (home-page "https://github.com/aresch/rencode")
13349 (synopsis "Serialization of heterogeneous data structures")
13350 (description
13351 "The @code{rencode} module is a data structure serialization library,
13352 similar to @code{bencode} from the BitTorrent project. For complex,
13353 heterogeneous data structures with many small elements, r-encoding stake up
13354 significantly less space than b-encodings. This version of rencode is a
13355 complete rewrite in Cython to attempt to increase the performance over the
13356 pure Python module.")
13357 (license license:bsd-3)))
13358
13359 (define-public python2-rencode
13360 (package-with-python2 python-rencode))
13361
13362 (define-public python-xenon
13363 (package
13364 (name "python-xenon")
13365 (version "0.5.4")
13366 (source
13367 (origin
13368 (method url-fetch)
13369 (uri (pypi-uri "xenon" version))
13370 (sha256
13371 (base32
13372 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13373 (build-system python-build-system)
13374 (native-inputs
13375 `(("python-pyyaml" ,python-pyyaml)
13376 ("python-radon" ,python-radon)
13377 ("python-requests" ,python-requests)
13378 ("python-flake8" ,python-flake8)
13379 ("python-tox" ,python-tox)))
13380 (arguments
13381 `(#:phases
13382 (modify-phases %standard-phases
13383 (add-before 'build 'patch-test-requirements
13384 (lambda _
13385 ;; Remove httpretty dependency for tests.
13386 (substitute* "setup.py"
13387 (("httpretty") ""))
13388 #t)))))
13389 (home-page "https://xenon.readthedocs.org/")
13390 (synopsis "Monitor code metrics for Python on your CI server")
13391 (description
13392 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13393 Ideally, @code{xenon} is run every time code is committed. Through command
13394 line options, various thresholds can be set for the complexity of code. It
13395 will fail (i.e. it will exit with a non-zero exit code) when any of these
13396 requirements is not met.")
13397 (license license:expat)))
13398
13399 (define-public python2-xenon
13400 (package-with-python2 python-xenon))
13401
13402 (define-public python-pysocks
13403 (package
13404 (name "python-pysocks")
13405 (version "1.7.0")
13406 (source
13407 (origin
13408 (method url-fetch)
13409 (uri (pypi-uri "PySocks" version))
13410 (sha256
13411 (base32
13412 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13413 (build-system python-build-system)
13414 (arguments `(#:tests? #f))
13415 (home-page "https://github.com/Anorov/PySocks")
13416 (synopsis "SOCKS client module")
13417 (description "@code{pysocks} is an updated and semi-actively maintained
13418 version of @code{SocksiPy} with bug fixes and extra features.")
13419 (license license:bsd-3)))
13420
13421 (define-public python2-pysocks
13422 (package-with-python2 python-pysocks))
13423
13424 (define-public python-pydiff
13425 (package
13426 (name "python-pydiff")
13427 (version "0.2")
13428 (source
13429 (origin
13430 (method url-fetch)
13431 (uri (pypi-uri "pydiff" version))
13432 (sha256
13433 (base32
13434 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13435 (build-system python-build-system)
13436 (home-page "https://github.com/myint/pydiff")
13437 (synopsis "Library to diff two Python files at the bytecode level")
13438 (description
13439 "@code{pydiff} makes it easy to look for actual code changes while
13440 ignoring formatting changes.")
13441 (license license:expat)))
13442
13443 (define-public python2-pydiff
13444 (package-with-python2 python-pydiff))
13445
13446 (define-public python-tqdm
13447 (package
13448 (name "python-tqdm")
13449 (version "4.19.6")
13450 (source
13451 (origin
13452 (method url-fetch)
13453 (uri (pypi-uri "tqdm" version))
13454 (sha256
13455 (base32
13456 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13457 (build-system python-build-system)
13458 (native-inputs
13459 `(("python-flake8" ,python-flake8)
13460 ("python-nose" ,python-nose)
13461 ("python-coverage" ,python-coverage)))
13462 (home-page "https://github.com/tqdm/tqdm")
13463 (synopsis "Fast, extensible progress meter")
13464 (description
13465 "Make loops show a progress bar on the console by just wrapping any
13466 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13467 design and layout.")
13468 (license (list license:mpl2.0 license:expat))))
13469
13470 (define-public python2-tqdm
13471 (package-with-python2 python-tqdm))
13472
13473 (define-public python-pkginfo
13474 (package
13475 (name "python-pkginfo")
13476 (version "1.4.2")
13477 (source
13478 (origin
13479 (method url-fetch)
13480 (uri (pypi-uri "pkginfo" version))
13481 (sha256
13482 (base32
13483 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13484 (build-system python-build-system)
13485 (arguments
13486 ;; The tests are broken upstream.
13487 '(#:tests? #f))
13488 (home-page
13489 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13490 (synopsis
13491 "Query metadatdata from sdists, bdists, and installed packages")
13492 (description
13493 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13494 source distriubtion (an sdist) or a binary distribution (e.g., created by
13495 running bdist_egg). It can also query the EGG-INFO directory of an installed
13496 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13497 created by running @code{python setup.py develop}).")
13498 (license license:expat)))
13499
13500 (define-public python2-pkginfo
13501 (package-with-python2 python-pkginfo))
13502
13503 (define-public python-twine
13504 (package
13505 (name "python-twine")
13506 (version "1.9.1")
13507 (source
13508 (origin
13509 (method url-fetch)
13510 (uri (pypi-uri "twine" version))
13511 (sha256
13512 (base32
13513 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13514 (build-system python-build-system)
13515 (propagated-inputs
13516 `(("python-tqdm" ,python-tqdm)
13517 ("python-pkginfo" ,python-pkginfo)
13518 ("python-requests" ,python-requests)
13519 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13520 (home-page "https://github.com/pypa/twine")
13521 (synopsis "Collection of utilities for interacting with PyPI")
13522 (description
13523 "@code{twine} currently supports registering projects and uploading
13524 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13525 their files and supports any packaging format (including wheels).")
13526 (license license:asl2.0)))
13527
13528 (define-public python2-twine
13529 (package-with-python2 python-twine))
13530
13531 (define-public python-linecache2
13532 (package
13533 (name "python-linecache2")
13534 (version "1.0.0")
13535 (source
13536 (origin
13537 (method url-fetch)
13538 (uri (pypi-uri "linecache2" version))
13539 (sha256
13540 (base32
13541 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13542 (build-system python-build-system)
13543 (arguments
13544 `(;; The tests depend on unittest2, and our version is a bit too old.
13545 #:tests? #f))
13546 (native-inputs
13547 `(("python-pbr" ,python-pbr-minimal)))
13548 (home-page
13549 "https://github.com/testing-cabal/linecache2")
13550 (synopsis "Backports of the linecache module")
13551 (description
13552 "The linecache module allows one to get any line from any file, while
13553 attempting to optimize internally, using a cache, the common case where many
13554 lines are read from a single file.")
13555 (license license:psfl)))
13556
13557 (define-public python2-linecache2
13558 (package-with-python2 python-linecache2))
13559
13560 (define-public python-traceback2
13561 (package
13562 (name "python-traceback2")
13563 (version "1.4.0")
13564 (source
13565 (origin
13566 (method url-fetch)
13567 (uri (pypi-uri "traceback2" version))
13568 (sha256
13569 (base32
13570 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13571 (build-system python-build-system)
13572 (arguments
13573 `(;; python-traceback2 and python-unittest2 depend on one another.
13574 #:tests? #f))
13575 (native-inputs
13576 `(("python-pbr" ,python-pbr-minimal)))
13577 (propagated-inputs
13578 `(("python-linecache2" ,python-linecache2)))
13579 (home-page
13580 "https://github.com/testing-cabal/traceback2")
13581 (synopsis "Backports of the traceback module")
13582 (description
13583 "This module provides a standard interface to extract, format and print
13584 stack traces of Python programs. It exactly mimics the behavior of the Python
13585 interpreter when it prints a stack trace.")
13586 (license license:psfl)))
13587
13588 (define-public python2-traceback2
13589 (package-with-python2 python-traceback2))
13590
13591 (define-public python-ratelimiter
13592 (package
13593 (name "python-ratelimiter")
13594 (version "1.2.0")
13595 (source
13596 (origin
13597 (method url-fetch)
13598 (uri (pypi-uri "ratelimiter" version))
13599 (sha256
13600 (base32
13601 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13602 (build-system python-build-system)
13603 (arguments
13604 '(#:tests? #f)) ; There are no tests in the pypi archive.
13605 (home-page "https://github.com/RazerM/ratelimiter")
13606 (synopsis "Simple rate limiting object")
13607 (description
13608 "The @code{ratelimiter} module ensures that an operation will not be
13609 executed more than a given number of times during a given period.")
13610 (license license:asl2.0)))
13611
13612 (define-public python2-ratelimiter
13613 (package-with-python2 python-ratelimiter))
13614
13615 (define-public python-dukpy
13616 (package
13617 (name "python-dukpy")
13618 (version "0.3")
13619 (source
13620 (origin
13621 (method git-fetch)
13622 (uri (git-reference
13623 (url "https://github.com/kovidgoyal/dukpy.git")
13624 (commit (string-append "v" version))))
13625 (file-name (git-file-name name version))
13626 (sha256
13627 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13628 (build-system python-build-system)
13629 (home-page "https://github.com/kovidgoyal/dukpy")
13630 (synopsis "Run JavaScript in python")
13631 (description
13632 "dukpy is a JavaScript runtime environment for Python using the duktape
13633 embeddable JavaScript engine.")
13634 ;; Dukpy is licensed under MIT like the embedded duktape library,
13635 ;; with 'errors.c' as GPL3.
13636 (license (list license:expat license:gpl3))))
13637
13638 (define-public python2-dukpy
13639 (package-with-python2 python-dukpy))
13640
13641 (define-public python-jsonrpclib-pelix
13642 (package
13643 (name "python-jsonrpclib-pelix")
13644 (version "0.3.2")
13645 (source
13646 (origin
13647 (method url-fetch)
13648 (uri (pypi-uri "jsonrpclib-pelix" version))
13649 (sha256
13650 (base32
13651 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13652 (build-system python-build-system)
13653 (arguments
13654 `(#:tests? #f)) ; no tests in PyPI tarball
13655 (home-page "https://github.com/tcalmant/jsonrpclib/")
13656 (synopsis "JSON-RPC 2.0 client library for Python")
13657 (description
13658 "This library implements the JSON-RPC v2.0
13659 specification (backwards-compatible) as a client library for Python. This
13660 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13661 services.")
13662 (license license:asl2.0)))
13663
13664 (define-public python2-jsonrpclib-pelix
13665 (package-with-python2 python-jsonrpclib-pelix))
13666
13667 (define-public python-setuptools-scm-git-archive
13668 (package
13669 (name "python-setuptools-scm-git-archive")
13670 (version "1.0")
13671 (source
13672 (origin
13673 (method url-fetch)
13674 (uri (pypi-uri "setuptools_scm_git_archive" version))
13675 (sha256
13676 (base32
13677 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13678 (build-system python-build-system)
13679 (native-inputs
13680 `(("python-pytest" ,python-pytest)))
13681 (propagated-inputs
13682 `(("python-setuptools-scm" ,python-setuptools-scm)))
13683 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13684 (synopsis "Setuptools_scm plugin for git archives")
13685 (description
13686 "The setuptools_scm_git_archive package is a plugin to
13687 setuptools_scm, which supports obtaining versions from git archives that
13688 belong to tagged versions.")
13689 (license license:expat)))
13690
13691 (define-public python2-setuptools-scm-git-archive
13692 (package-with-python2 python-setuptools-scm-git-archive))
13693
13694 (define-public python-setuptools-git
13695 (package
13696 (name "python-setuptools-git")
13697 (version "1.2")
13698 (source
13699 (origin
13700 (method url-fetch)
13701 (uri (pypi-uri "setuptools-git" version))
13702 (sha256
13703 (base32
13704 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13705 (build-system python-build-system)
13706 (arguments
13707 `(#:phases
13708 (modify-phases %standard-phases
13709 ;; This is needed for tests.
13710 (add-after 'unpack 'configure-git
13711 (lambda _
13712 (setenv "HOME" "/tmp")
13713 (invoke "git" "config" "--global" "user.email" "guix")
13714 (invoke "git" "config" "--global" "user.name" "guix")
13715 #t)))))
13716 (native-inputs
13717 `(("git" ,git-minimal)))
13718 (home-page "https://github.com/msabramo/setuptools-git")
13719 (synopsis "Setuptools revision control system plugin for Git")
13720 (description
13721 "This package provides a plugin for Setuptools for revision control with
13722 Git.")
13723 (license license:bsd-3)))
13724
13725 (define-public python-pyclipper
13726 (package
13727 (name "python-pyclipper")
13728 (version "1.1.0.post1")
13729 (source
13730 (origin
13731 (method url-fetch)
13732 (uri (pypi-uri "pyclipper" version ".zip"))
13733 (sha256
13734 (base32
13735 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13736 (modules '((guix build utils)))
13737 (snippet
13738 '(begin
13739 ;; This file is generated by Cython.
13740 (delete-file "pyclipper/pyclipper.cpp") #t))))
13741 (build-system python-build-system)
13742 (arguments
13743 `(#:phases
13744 (modify-phases %standard-phases
13745 (add-before 'build 'cythonize-sources
13746 (lambda _
13747 (with-directory-excursion "pyclipper"
13748 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13749 (propagated-inputs
13750 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13751 (native-inputs
13752 `(("python-cython" ,python-cython)
13753 ("python-pytest" ,python-pytest)
13754 ("python-pytest-runner" ,python-pytest-runner)
13755 ("python-unittest2" ,python-unittest2)
13756 ("unzip" ,unzip)))
13757 (home-page "https://github.com/greginvm/pyclipper")
13758 (synopsis "Wrapper for Angus Johnson's Clipper library")
13759 (description
13760 "Pyclipper is a Cython wrapper for the C++ translation of the
13761 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13762 (license license:expat)))
13763
13764 (define-public python2-pyclipper
13765 (package-with-python2 python-pyclipper))
13766
13767 (define-public python2-booleanoperations
13768 (package
13769 (name "python2-booleanoperations")
13770 (version "0.7.1")
13771 (source
13772 (origin
13773 (method url-fetch)
13774 (uri (pypi-uri "booleanOperations" version ".zip"))
13775 (sha256
13776 (base32
13777 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13778 (build-system python-build-system)
13779 (arguments
13780 `(#:python ,python-2))
13781 (native-inputs
13782 `(("unzip" ,unzip)
13783 ("python2-pytest" ,python2-pytest)
13784 ("python2-pytest-runner" ,python2-pytest-runner)))
13785 (propagated-inputs
13786 `(("python-fonttools" ,python2-fonttools)
13787 ("python-pyclipper" ,python2-pyclipper)
13788 ("python-ufolib" ,python2-ufolib)))
13789 (home-page "https://github.com/typemytype/booleanOperations")
13790 (synopsis "Boolean operations on paths")
13791 (description
13792 "BooleanOperations provides a Python library that enables
13793 boolean operations on paths.")
13794 (license license:expat)))
13795
13796 (define-public python-tempdir
13797 (package
13798 (name "python-tempdir")
13799 (version "0.7.1")
13800 (source
13801 (origin
13802 (method url-fetch)
13803 (uri (pypi-uri "tempdir" version))
13804 (sha256
13805 (base32
13806 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13807 (build-system python-build-system)
13808 (home-page "https://pypi.org/project/tempdir/")
13809 (arguments
13810 ;; the package has no tests
13811 '(#:tests? #f))
13812 (synopsis "Python library for managing temporary directories")
13813 (description
13814 "This library manages temporary directories that are automatically
13815 deleted with all their contents when they are no longer needed. It is
13816 particularly convenient for use in tests.")
13817 (license license:expat)))
13818
13819 (define-public python2-tempdir
13820 (package-with-python2 python-tempdir))
13821
13822 (define-public python-activepapers
13823 (package
13824 (name "python-activepapers")
13825 (version "0.2.2")
13826 (source
13827 (origin
13828 (method url-fetch)
13829 (uri (pypi-uri "ActivePapers.Py" version))
13830 (sha256
13831 (base32
13832 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13833 (build-system python-build-system)
13834 (arguments
13835 `(#:modules ((ice-9 ftw)
13836 (srfi srfi-1)
13837 (guix build utils)
13838 (guix build python-build-system))
13839
13840 #:phases
13841 (modify-phases %standard-phases
13842 (add-after 'unpack 'delete-python2-code
13843 (lambda _
13844 (for-each delete-file
13845 '("lib/activepapers/builtins2.py"
13846 "lib/activepapers/standardlib2.py"
13847 "lib/activepapers/utility2.py"))))
13848 (replace 'check
13849 (lambda _
13850 ;; Deactivate the test cases that download files
13851 (setenv "NO_NETWORK_ACCESS" "1")
13852 ;; For some strange reason, some tests fail if nosetests runs all
13853 ;; test modules in a single execution. They pass if each test
13854 ;; module is run individually.
13855 (for-each (lambda (filename)
13856 (invoke "nosetests"
13857 (string-append "tests/" filename)))
13858 (scandir "tests"
13859 (lambda (filename)
13860 (string-suffix? ".py" filename)))))))))
13861 (native-inputs
13862 `(("python-tempdir" ,python-tempdir)
13863 ("python-nose" ,python-nose)))
13864 (propagated-inputs
13865 `(("python-h5py" ,python-h5py)))
13866 (home-page "http://www.activepapers.org/")
13867 (synopsis "Executable papers for scientific computing")
13868 (description
13869 "ActivePapers is a tool for working with executable papers, which
13870 combine data, code, and documentation in single-file packages,
13871 suitable for publication as supplementary material or on repositories
13872 such as figshare or Zenodo.")
13873 (properties `((python2-variant . ,(delay python2-activepapers))))
13874 (license license:bsd-3)))
13875
13876 (define-public python2-activepapers
13877 (let ((base (package-with-python2
13878 (strip-python2-variant python-activepapers))))
13879 (package
13880 (inherit base)
13881 (arguments
13882 (substitute-keyword-arguments (package-arguments base)
13883 ((#:phases phases)
13884 `(modify-phases ,phases
13885 (delete 'delete-python2-code)
13886 (add-after 'unpack 'delete-python3-code
13887 (lambda _
13888 (for-each delete-file
13889 '("lib/activepapers/builtins3.py"
13890 "lib/activepapers/standardlib3.py"
13891 "lib/activepapers/utility3.py")))))))))))
13892
13893 (define-public python-semver
13894 (package
13895 (name "python-semver")
13896 (version "2.7.9")
13897 (source
13898 (origin
13899 (method url-fetch)
13900 (uri (pypi-uri "semver" version))
13901 (sha256
13902 (base32
13903 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13904 (build-system python-build-system)
13905 (arguments
13906 `(#:phases
13907 (modify-phases %standard-phases
13908 (add-after 'unpack 'patch-test-requirements
13909 (lambda _
13910 (substitute* "setup.py"
13911 ;; Our Python is new enough.
13912 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13913 #t)))))
13914 (native-inputs
13915 `(("python-tox" ,python-tox)
13916 ("python-virtualenv" ,python-virtualenv)))
13917 (home-page "https://github.com/k-bx/python-semver")
13918 (synopsis "Python helper for Semantic Versioning")
13919 (description "This package provides a Python library for
13920 @url{Semantic Versioning, http://semver.org/}.")
13921 (license license:bsd-3)))
13922
13923 (define-public python2-semver
13924 (package-with-python2 python-semver))
13925
13926 (define-public python-pyro4
13927 (package
13928 (name "python-pyro4")
13929 (version "4.75")
13930 (source
13931 (origin
13932 (method url-fetch)
13933 (uri (pypi-uri "Pyro4" version))
13934 (sha256
13935 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13936 (build-system python-build-system)
13937 (propagated-inputs
13938 `(("python-serpent" ,python-serpent)))
13939 (home-page "https://pyro4.readthedocs.io")
13940 (synopsis "Distributed object middleware for Python")
13941 (description
13942 "Pyro enables you to build applications in which objects can talk to each
13943 other over the network. You can just use normal Python method calls to call
13944 objects on other machines, also known as remote procedure calls (RPC).")
13945 (license license:expat)))
13946
13947 (define-public python2-pyro
13948 (package
13949 (name "python2-pyro")
13950 (version "3.16")
13951 (source
13952 (origin
13953 (method url-fetch)
13954 (uri (pypi-uri "Pyro" version))
13955 (file-name (string-append "Pyro-" version ".tar.gz"))
13956 (sha256
13957 (base32
13958 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13959 (build-system python-build-system)
13960 (arguments
13961 ;; Pyro is not compatible with Python 3
13962 `(#:python ,python-2
13963 ;; Pyro has no test cases for automatic execution
13964 #:tests? #f))
13965 (home-page "http://pythonhosted.org/Pyro/")
13966 (synopsis "Distributed object manager for Python")
13967 (description "Pyro is a Distributed Object Technology system
13968 written in Python that is designed to be easy to use. It resembles
13969 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13970 which is a system and language independent Distributed Object Technology
13971 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13972 longer maintained. New projects should use Pyro4 instead, which
13973 is the new Pyro version that is actively developed.")
13974 (license license:expat)))
13975
13976 (define-public python2-scientific
13977 (package
13978 (name "python2-scientific")
13979 (version "2.9.4")
13980 (source
13981 (origin
13982 (method url-fetch)
13983 (uri (string-append "https://bitbucket.org/khinsen/"
13984 "scientificpython/downloads/ScientificPython-"
13985 version ".tar.gz"))
13986 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13987 (sha256
13988 (base32
13989 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13990 (build-system python-build-system)
13991 (inputs
13992 `(("netcdf" ,netcdf)))
13993 (propagated-inputs
13994 `(("python-numpy" ,python2-numpy-1.8)
13995 ("python-pyro" ,python2-pyro)))
13996 (arguments
13997 ;; ScientificPython is not compatible with Python 3
13998 `(#:python ,python-2
13999 #:tests? #f ; No test suite
14000 #:phases
14001 (modify-phases %standard-phases
14002 (replace 'build
14003 (lambda* (#:key inputs #:allow-other-keys)
14004 (invoke "python" "setup.py" "build"
14005 (string-append "--netcdf_prefix="
14006 (assoc-ref inputs "netcdf"))))))))
14007 (home-page "https://bitbucket.org/khinsen/scientificpython")
14008 (synopsis "Python modules for scientific computing")
14009 (description "ScientificPython is a collection of Python modules that are
14010 useful for scientific computing. Most modules are rather general (Geometry,
14011 physical units, automatic derivatives, ...) whereas others are more
14012 domain-specific (e.g. netCDF and PDB support). The library is currently
14013 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14014 (license license:cecill-c)))
14015
14016 (define-public python2-mmtk
14017 (package
14018 (name "python2-mmtk")
14019 (version "2.7.11")
14020 (source
14021 (origin
14022 (method url-fetch)
14023 (uri (string-append "https://bitbucket.org/khinsen/"
14024 "mmtk/downloads/MMTK-" version ".tar.gz"))
14025 (file-name (string-append "MMTK-" version ".tar.gz"))
14026 (sha256
14027 (base32
14028 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14029 (build-system python-build-system)
14030 (native-inputs
14031 `(("netcdf" ,netcdf)))
14032 (propagated-inputs
14033 `(("python-scientific" ,python2-scientific)
14034 ("python-tkinter" ,python-2 "tk")))
14035 (arguments
14036 `(#:python ,python-2
14037 #:tests? #f
14038 #:phases
14039 (modify-phases %standard-phases
14040 (add-before 'build 'includes-from-scientific
14041 (lambda* (#:key inputs #:allow-other-keys)
14042 (mkdir-p "Include/Scientific")
14043 (copy-recursively
14044 (string-append
14045 (assoc-ref inputs "python-scientific")
14046 "/include/python2.7/Scientific")
14047 "Include/Scientific"))))))
14048 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14049 (synopsis "Python library for molecular simulation")
14050 (description "MMTK is a library for molecular simulations with an emphasis
14051 on biomolecules. It provides widely used methods such as Molecular Dynamics
14052 and normal mode analysis, but also basic routines for implementing new methods
14053 for simulation and analysis. The library is currently not actively maintained
14054 and works only with Python 2 and NumPy < 1.9.")
14055 (license license:cecill-c)))
14056
14057 (define-public python-phonenumbers
14058 (package
14059 (name "python-phonenumbers")
14060 (version "8.9.1")
14061 (source
14062 (origin
14063 (method url-fetch)
14064 (uri (pypi-uri "phonenumbers" version))
14065 (sha256
14066 (base32
14067 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14068 (build-system python-build-system)
14069 (home-page
14070 "https://github.com/daviddrysdale/python-phonenumbers")
14071 (synopsis
14072 "Python library for dealing with international phone numbers")
14073 (description
14074 "This package provides a Python port of Google's libphonenumber library.")
14075 (license license:asl2.0)))
14076
14077 (define-public python2-phonenumbers
14078 (package-with-python2 python-phonenumbers))
14079
14080 (define-public python-send2trash
14081 (package
14082 (name "python-send2trash")
14083 (version "1.5.0")
14084 (source
14085 (origin (method git-fetch)
14086 ;; Source tarball on PyPI doesn't include tests.
14087 (uri (git-reference
14088 (url "https://github.com/hsoft/send2trash.git")
14089 (commit version)))
14090 (file-name (git-file-name name version))
14091 (sha256
14092 (base32
14093 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14094 (build-system python-build-system)
14095 (arguments
14096 '(#:phases
14097 (modify-phases %standard-phases
14098 (add-before 'check 'pre-check
14099 (lambda _
14100 (mkdir-p "/tmp/foo")
14101 (setenv "HOME" "/tmp/foo")
14102 #t)))))
14103 (home-page "https://github.com/hsoft/send2trash")
14104 (synopsis "Send files to the user's @file{~/Trash} directory")
14105 (description "This package provides a Python library to send files to the
14106 user's @file{~/Trash} directory.")
14107 (properties `((python2-variant . ,(delay python2-send2trash))))
14108 (license license:bsd-3)))
14109
14110 (define-public python2-send2trash
14111 (package
14112 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14113 (arguments
14114 (substitute-keyword-arguments (package-arguments python-send2trash)
14115 ((#:phases phases)
14116 `(modify-phases ,phases
14117 (add-before 'check 'setenv
14118 (lambda _
14119 (setenv "PYTHONPATH"
14120 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14121 #t))))))))
14122
14123 (define-public python-yapf
14124 (package
14125 (name "python-yapf")
14126 (version "0.24.0")
14127 (source
14128 (origin
14129 (method url-fetch)
14130 (uri (pypi-uri "yapf" version))
14131 (sha256
14132 (base32
14133 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14134 (build-system python-build-system)
14135 (home-page "https://github.com/google/yapf")
14136 (synopsis "Formatter for Python code")
14137 (description "YAPF is a formatter for Python code. It's based off of
14138 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14139 takes the code and reformats it to the best formatting that conforms to the
14140 style guide, even if the original code didn't violate the style guide.")
14141 (license license:asl2.0)))
14142
14143 (define-public python2-yapf
14144 (package-with-python2 python-yapf))
14145
14146 (define-public python-gyp
14147 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14148 (revision "0"))
14149 (package
14150 (name "python-gyp")
14151 ;; Google does not release versions,
14152 ;; based on second most recent commit date.
14153 (version (git-version "0.0.0" revision commit))
14154 (source
14155 (origin
14156 ;; Google does not release tarballs,
14157 ;; git checkout is needed.
14158 (method git-fetch)
14159 (uri (git-reference
14160 (url "https://chromium.googlesource.com/external/gyp")
14161 (commit commit)))
14162 (file-name (git-file-name name version))
14163 (sha256
14164 (base32
14165 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14166 (build-system python-build-system)
14167 (home-page "https://gyp.gsrc.io/")
14168 (synopsis "GYP is a Meta-Build system")
14169 (description
14170 "GYP builds build systems for large, cross platform applications.
14171 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14172 files, and Makefiles.")
14173 (license license:bsd-3))))
14174
14175 (define-public python2-gyp
14176 (package-with-python2 python-gyp))
14177
14178 (define-public python-whatever
14179 (package
14180 (name "python-whatever")
14181 (version "0.5")
14182 (source
14183 (origin
14184 (method url-fetch)
14185 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14186 ".tar.gz"))
14187 (sha256
14188 (base32
14189 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14190 (file-name (string-append name "-" version ".tar.gz"))))
14191 (build-system python-build-system)
14192 (arguments
14193 `(#:phases
14194 (modify-phases %standard-phases
14195 (replace 'check
14196 (lambda _
14197 (invoke "py.test"))))))
14198 (native-inputs
14199 `(("python-pytest" ,python-pytest)))
14200 (home-page "http://github.com/Suor/whatever")
14201 (synopsis "Make anonymous functions by partial application of operators")
14202 (description "@code{whatever} provides an easy way to make anonymous
14203 functions by partial application of operators.")
14204 (license license:bsd-3)))
14205
14206 (define-public python2-whatever
14207 (package-with-python2 python-whatever))
14208
14209 (define-public python-funcy
14210 (package
14211 (name "python-funcy")
14212 (version "1.11")
14213 (source
14214 (origin
14215 (method git-fetch)
14216 (uri (git-reference
14217 (url "https://github.com/Suor/funcy.git")
14218 (commit version)))
14219 (sha256
14220 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14221 (file-name (git-file-name name version))))
14222 (build-system python-build-system)
14223 (arguments
14224 `(#:phases
14225 (modify-phases %standard-phases
14226 (replace 'check
14227 (lambda _
14228 (invoke "py.test"))))))
14229 (native-inputs
14230 `(("python-pytest" ,python-pytest)
14231 ("python-whatever" ,python-whatever)))
14232 (home-page "http://github.com/Suor/funcy")
14233 (synopsis "Functional tools")
14234 (description "@code{funcy} is a library that provides functional tools.
14235 Examples are:
14236 @enumerate
14237 @item merge - Merges collections of the same type
14238 @item walk - Type-preserving map
14239 @item select - Selects a part of a collection
14240 @item take - Takes the first n items of a collection
14241 @item first - Takes the first item of a collection
14242 @item remove - Predicated-removes items of a collection
14243 @item concat - Concatenates two collections
14244 @item flatten - Flattens a collection with subcollections
14245 @item distinct - Returns only distinct items
14246 @item split - Predicated-splits a collection
14247 @item split_at - Splits a collection at a given item
14248 @item group_by - Groups items by group
14249 @item pairwise - Pairs off adjacent items
14250 @item partial - Partially-applies a function
14251 @item curry - Curries a function
14252 @item compose - Composes functions
14253 @item complement - Complements a predicate
14254 @item all_fn - \"all\" with predicate
14255 @end enumerate")
14256 (license license:bsd-3)))
14257
14258 (define-public python2-funcy
14259 (package-with-python2 python-funcy))
14260
14261 (define-public python-isoweek
14262 (package
14263 (name "python-isoweek")
14264 (version "1.3.3")
14265 (source
14266 (origin
14267 (method url-fetch)
14268 (uri (pypi-uri "isoweek" version))
14269 (sha256
14270 (base32
14271 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14272 (build-system python-build-system)
14273 (home-page "https://github.com/gisle/isoweek")
14274 (synopsis "Objects representing a week")
14275 (description "The @code{isoweek} module provide the class Week that
14276 implements the week definition of ISO 8601. This standard also defines
14277 a notation for identifying weeks; yyyyWww (where the W is a literal).
14278 Week instances stringify to this form.")
14279 (license license:bsd-3)))
14280
14281 (define-public python2-isoweek
14282 (package-with-python2 python-isoweek))
14283
14284 (define-public python-tokenize-rt
14285 (package
14286 (name "python-tokenize-rt")
14287 (version "2.0.1")
14288 (source
14289 (origin
14290 (method url-fetch)
14291 (uri (pypi-uri "tokenize-rt" version))
14292 (sha256
14293 (base32
14294 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14295 (build-system python-build-system)
14296 (home-page "https://github.com/asottile/tokenize-rt")
14297 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14298 (description
14299 "This Python library is a wrapper around @code{tokenize} from the Python
14300 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14301 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14302 and @code{tokens_to_src} to roundtrip.")
14303 (license license:expat)))
14304
14305 (define-public python-future-fstrings
14306 (package
14307 (name "python-future-fstrings")
14308 (version "0.4.1")
14309 (source
14310 (origin
14311 (method url-fetch)
14312 (uri (pypi-uri "future_fstrings" version))
14313 (sha256
14314 (base32
14315 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14316 (build-system python-build-system)
14317 (propagated-inputs
14318 `(("python-tokenize-rt" ,python-tokenize-rt)))
14319 (home-page "https://github.com/asottile/future-fstrings")
14320 (synopsis "Backport of fstrings to Python < 3.6")
14321 (description
14322 "This package provides a UTF-8 compatible encoding
14323 @code{future_fstrings}, which performs source manipulation. It decodes the
14324 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14325 @code{f} strings.")
14326 (license license:expat)))
14327
14328 (define-public python-typed-ast
14329 (package
14330 (name "python-typed-ast")
14331 (version "1.3.5")
14332 (source
14333 (origin
14334 (method url-fetch)
14335 (uri (pypi-uri "typed-ast" version))
14336 (sha256
14337 (base32
14338 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14339 (build-system python-build-system)
14340 (arguments
14341 `(#:modules ((guix build utils)
14342 (guix build python-build-system)
14343 (ice-9 ftw)
14344 (srfi srfi-1)
14345 (srfi srfi-26))
14346 #:phases
14347 (modify-phases %standard-phases
14348 (replace 'check
14349 (lambda _
14350 (let ((cwd (getcwd)))
14351 (setenv "PYTHONPATH"
14352 (string-append cwd "/build/"
14353 (find (cut string-prefix? "lib" <>)
14354 (scandir (string-append cwd "/build")))
14355 ":"
14356 (getenv "PYTHONPATH"))))
14357 (invoke "pytest")
14358 #t)))))
14359 (native-inputs `(("python-pytest" ,python-pytest)))
14360 (home-page "https://github.com/python/typed_ast")
14361 (synopsis "Fork of Python @code{ast} modules with type comment support")
14362 (description "This package provides a parser similar to the standard
14363 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14364 include PEP 484 type comments and are independent of the version of Python
14365 under which they are run. The @code{typed_ast} parsers produce the standard
14366 Python AST (plus type comments), and are both fast and correct, as they are
14367 based on the CPython 2.7 and 3.7 parsers.")
14368 ;; See the file "LICENSE" for the details.
14369 (license (list license:psfl
14370 license:asl2.0
14371 license:expat)))) ;ast27/Parser/spark.py
14372
14373 (define-public python-typing
14374 (package
14375 (name "python-typing")
14376 (version "3.6.6")
14377 (source
14378 (origin
14379 (method url-fetch)
14380 (uri (pypi-uri "typing" version))
14381 (sha256
14382 (base32
14383 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14384 (build-system python-build-system)
14385 (home-page "https://docs.python.org/3/library/typing.html")
14386 (synopsis "Type hints for Python")
14387 (description "This is a backport of the standard library @code{typing}
14388 module to Python versions older than 3.5. Typing defines a standard notation
14389 for Python function and variable type annotations. The notation can be used
14390 for documenting code in a concise, standard format, and it has been designed
14391 to also be used by static and runtime type checkers, static analyzers, IDEs
14392 and other tools.")
14393 (license license:psfl)))
14394
14395 (define-public python2-typing
14396 (package-with-python2 python-typing))
14397
14398 (define-public python-typing-extensions
14399 (package
14400 (name "python-typing-extensions")
14401 (version "3.7.2")
14402 (source
14403 (origin
14404 (method url-fetch)
14405 (uri (pypi-uri "typing_extensions" version))
14406 (sha256
14407 (base32
14408 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14409 (build-system python-build-system)
14410 (home-page
14411 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14412 (synopsis "Experimental type hints for Python")
14413 (description
14414 "The typing_extensions module contains additional @code{typing} hints not
14415 yet present in the of the @code{typing} standard library.
14416 Included are implementations of:
14417 @enumerate
14418 @item ClassVar
14419 @item ContextManager
14420 @item Counter
14421 @item DefaultDict
14422 @item Deque
14423 @item NewType
14424 @item NoReturn
14425 @item overload
14426 @item Protocol
14427 @item runtime
14428 @item Text
14429 @item Type
14430 @item TYPE_CHECKING
14431 @item AsyncGenerator
14432 @end enumerate\n")
14433 (license license:psfl)))
14434
14435 (define-public bpython
14436 (package
14437 (name "bpython")
14438 (version "0.17.1")
14439 (source
14440 (origin
14441 (method url-fetch)
14442 (uri (pypi-uri "bpython" version))
14443 (sha256
14444 (base32
14445 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14446 (build-system python-build-system)
14447 (arguments
14448 `(#:phases
14449 (modify-phases %standard-phases
14450 (add-after 'unpack 'remove-failing-test
14451 (lambda _
14452 ;; Remove failing test. FIXME: make it pass
14453 (delete-file "bpython/test/test_args.py")
14454 #t))
14455 (add-after 'wrap 'add-aliases
14456 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14457 (lambda* (#:key outputs #:allow-other-keys)
14458 (let ((out (assoc-ref outputs "out")))
14459 (for-each
14460 (lambda (old new)
14461 (symlink old (string-append out "/bin/" new)))
14462 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14463 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14464 #t)))))
14465 (propagated-inputs
14466 `(("python-pygments" ,python-pygments)
14467 ("python-requests" ,python-requests)
14468 ("python-babel" ,python-babel) ; optional, for internationalization
14469 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14470 ("python-greenlet" ,python-greenlet)
14471 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14472 ("python-six" ,python-six)))
14473 (native-inputs
14474 `(("python-sphinx" ,python-sphinx)
14475 ("python-mock" ,python-mock)))
14476 (home-page "https://bpython-interpreter.org/")
14477 (synopsis "Fancy interface to the Python interpreter")
14478 (description "Bpython is a fancy interface to the Python
14479 interpreter. bpython's main features are
14480
14481 @enumerate
14482 @item in-line syntax highlighting,
14483 @item readline-like autocomplete with suggestions displayed as you type,
14484 @item expected parameter list for any Python function,
14485 @item \"rewind\" function to pop the last line of code from memory and
14486 re-evaluate,
14487 @item send the code you've entered off to a pastebin,
14488 @item save the code you've entered to a file, and
14489 @item auto-indentation.
14490 @end enumerate")
14491 (license license:expat)))
14492
14493 (define-public bpython2
14494 (let ((base (package-with-python2
14495 (strip-python2-variant bpython))))
14496 (package (inherit base)
14497 (name "bpython2")
14498 (arguments
14499 `(#:python ,python-2
14500 #:phases
14501 (modify-phases %standard-phases
14502 (add-after 'unpack 'remove-failing-test
14503 (lambda _
14504 ;; Remove failing test. FIXME: make it pass
14505 (delete-file "bpython/test/test_args.py")
14506 ;; Disable failing test-cases (renaming inhibits they are
14507 ;; discovered)
14508 (substitute* "bpython/test/test_curtsies_repl.py"
14509 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14510 (string-append a "xxx_off_" b))
14511 (("^(\\s*def )(test_complex\\W)" _ a b)
14512 (string-append a "xxx_off_" b)))
14513 #t))
14514 (add-before 'build 'rename-scripts
14515 ;; rename the scripts to bypthon2, bpdb2, etc.
14516 (lambda _
14517 (substitute* "setup.py"
14518 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14519 (string-append name "2" rest "\n"))
14520 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14521 (string-append name "2" (or sub "") rest "\n")))
14522 #t))))))))
14523
14524 (define-public python-pyinotify
14525 (package
14526 (name "python-pyinotify")
14527 (version "0.9.6")
14528 (source (origin
14529 (method url-fetch)
14530 (uri (pypi-uri "pyinotify" version))
14531 (sha256
14532 (base32
14533 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14534 (build-system python-build-system)
14535 (arguments `(#:tests? #f)) ;no tests
14536 (home-page "https://github.com/seb-m/pyinotify")
14537 (synopsis "Python library for monitoring inotify events")
14538 (description
14539 "@code{pyinotify} provides a Python interface for monitoring
14540 file system events on Linux.")
14541 (license license:expat)))
14542
14543 (define-public python2-pyinotify
14544 (package-with-python2 python-pyinotify))
14545
14546 ;; Ada parser uses this version.
14547 (define-public python2-quex-0.67.3
14548 (package
14549 (name "python2-quex")
14550 (version "0.67.3")
14551 (source
14552 (origin
14553 (method url-fetch)
14554 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14555 (version-major+minor version)
14556 "/quex-" version ".zip"))
14557 (sha256
14558 (base32
14559 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14560 (build-system python-build-system)
14561 (native-inputs
14562 `(("unzip" ,unzip)))
14563 (arguments
14564 `(#:python ,python-2
14565 #:tests? #f
14566 #:phases
14567 (modify-phases %standard-phases
14568 (delete 'configure)
14569 (delete 'build)
14570 (replace 'install
14571 (lambda* (#:key outputs #:allow-other-keys)
14572 (let* ((out (assoc-ref outputs "out"))
14573 (share/quex (string-append out "/share/quex"))
14574 (bin (string-append out "/bin")))
14575 (copy-recursively "." share/quex)
14576 (mkdir-p bin)
14577 (symlink (string-append share/quex "/quex-exe.py")
14578 (string-append bin "/quex"))
14579 #t))))))
14580 (native-search-paths
14581 (list (search-path-specification
14582 (variable "QUEX_PATH")
14583 (files '("share/quex")))))
14584 (home-page "http://quex.sourceforge.net/")
14585 (synopsis "Lexical analyzer generator in Python")
14586 (description "@code{quex} is a lexical analyzer generator in Python.")
14587 (license license:lgpl2.1+))) ; Non-military
14588
14589 (define-public python2-quex
14590 (package (inherit python2-quex-0.67.3)
14591 (name "python2-quex")
14592 (version "0.68.1")
14593 (source
14594 (origin
14595 (method url-fetch)
14596 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14597 (sha256
14598 (base32
14599 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14600 (file-name (string-append name "-" version ".tar.gz"))))))
14601
14602 (define-public python-more-itertools
14603 (package
14604 (name "python-more-itertools")
14605 (version "4.3.0")
14606 (source
14607 (origin
14608 (method url-fetch)
14609 (uri (pypi-uri "more-itertools" version))
14610 (sha256
14611 (base32
14612 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14613 (build-system python-build-system)
14614 (arguments
14615 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14616 (%current-target-system)))
14617 '("armhf" "i686"))
14618 '(#:phases
14619 (modify-phases %standard-phases
14620 ;; This is required for 32-bit hardware.
14621 ;; TODO: Try to remove this when upgrading.
14622 (add-after 'unpack 'patch-test
14623 (lambda _
14624 (substitute* "more_itertools/tests/test_more.py"
14625 (("10 \\*\\* 10") "9 ** 9"))
14626 #t))))
14627 '())))
14628 (propagated-inputs
14629 `(("python-six" ,python-six-bootstrap)))
14630 (home-page "https://github.com/erikrose/more-itertools")
14631 (synopsis "More routines for operating on iterables, beyond itertools")
14632 (description "Python's built-in @code{itertools} module implements a
14633 number of iterator building blocks inspired by constructs from APL, Haskell,
14634 and SML. @code{more-itertools} includes additional building blocks for
14635 working with iterables.")
14636 (license license:expat)))
14637
14638 (define-public python2-more-itertools
14639 (package-with-python2 python-more-itertools))
14640
14641 (define-public python-latexcodec
14642 (package
14643 (name "python-latexcodec")
14644 (version "1.0.6")
14645 (source
14646 (origin
14647 (method url-fetch)
14648 (uri (pypi-uri "latexcodec" version))
14649 (sha256
14650 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14651 (build-system python-build-system)
14652 (inputs
14653 `(("python-six" ,python-six)))
14654 (home-page "https://readthedocs.org/projects/latexcodec/")
14655 (synopsis "Work with LaTeX code in Python")
14656 (description "Lexer and codec to work with LaTeX code in Python.")
14657 (license license:expat)))
14658
14659 (define-public python-pybtex
14660 (package
14661 (name "python-pybtex")
14662 (version "0.21")
14663 (source
14664 (origin
14665 (method url-fetch)
14666 (uri (pypi-uri "pybtex" version))
14667 (sha256
14668 (base32
14669 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14670 (build-system python-build-system)
14671 (native-inputs
14672 `(("python-nose" ,python-nose)))
14673 (inputs
14674 `(("python-latexcodec" ,python-latexcodec)
14675 ("python-pyyaml" ,python-pyyaml)
14676 ("python-six" ,python-six)))
14677 (arguments
14678 `(#:test-target "nosetests"))
14679 (home-page "https://pybtex.org/")
14680 (synopsis "BibTeX-compatible bibliography processor")
14681 (description "Pybtex is a BibTeX-compatible bibliography processor written
14682 in Python. You can simply type pybtex instead of bibtex.")
14683 (license license:expat)))
14684
14685 (define-public python-onetimepass
14686 (package
14687 (name "python-onetimepass")
14688 (version "1.0.1")
14689 (source
14690 (origin
14691 (method url-fetch)
14692 (uri (pypi-uri "onetimepass" version))
14693 (sha256
14694 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14695 (build-system python-build-system)
14696 (propagated-inputs `(("python-six" ,python-six)))
14697 (home-page "https://github.com/tadeck/onetimepass/")
14698 (synopsis "One-time password library")
14699 (description "Python one-time password library for HMAC-based (HOTP) and
14700 time-based (TOTP) passwords.")
14701 (license license:expat)))
14702
14703 (define-public python-parso
14704 (package
14705 (name "python-parso")
14706 (version "0.3.1")
14707 (source
14708 (origin
14709 (method url-fetch)
14710 (uri (pypi-uri "parso" version))
14711 (sha256
14712 (base32
14713 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14714 (native-inputs
14715 `(("python-pytest" ,python-pytest)))
14716 (build-system python-build-system)
14717 (home-page "https://github.com/davidhalter/parso")
14718 (synopsis "Python Parser")
14719 (description "Parso is a Python parser that supports error recovery and
14720 round-trip parsing for different Python versions (in multiple Python versions).
14721 Parso is also able to list multiple syntax errors in your Python file.")
14722 (license license:expat)))
14723
14724 (define-public python2-parso
14725 (package-with-python2 python-parso))
14726
14727 (define-public python-async-generator
14728 (package
14729 (name "python-async-generator")
14730 (version "1.10")
14731 (source
14732 (origin
14733 (method url-fetch)
14734 (uri (pypi-uri "async_generator" version))
14735 (sha256
14736 (base32
14737 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14738 (build-system python-build-system)
14739 (native-inputs
14740 `(("python-pytest" ,python-pytest)))
14741 (home-page "https://github.com/python-trio/async_generator")
14742 (synopsis "Async generators and context managers for Python 3.5+")
14743 (description "@code{async_generator} back-ports Python 3.6's native async
14744 generators and Python 3.7's context managers into Python 3.5.")
14745 ;; Dual licensed.
14746 (license (list license:expat license:asl2.0))))
14747
14748 (define-public python-async-timeout
14749 (package
14750 (name "python-async-timeout")
14751 (version "3.0.1")
14752 (source
14753 (origin
14754 (method url-fetch)
14755 (uri (pypi-uri "async-timeout" version))
14756 (sha256
14757 (base32
14758 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14759 (build-system python-build-system)
14760 (home-page "https://github.com/aio-libs/async_timeout/")
14761 (synopsis "Timeout context manager for asyncio programs")
14762 (description "@code{async-timeout} provides a timeout timeout context
14763 manager compatible with @code{asyncio}.")
14764 (license license:asl2.0)))
14765
14766 (define-public python-glob2
14767 (package
14768 (name "python-glob2")
14769 (version "0.6")
14770 (source
14771 (origin
14772 (method git-fetch)
14773 (uri (git-reference
14774 (url "https://github.com/miracle2k/python-glob2.git")
14775 (commit version)))
14776 (file-name (git-file-name name version))
14777 (sha256
14778 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14779 (build-system python-build-system)
14780 (home-page "https://github.com/miracle2k/python-glob2/")
14781 (synopsis "Extended Version of the python buildin glob module")
14782 (description "This is an extended version of the Python
14783 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14784 adds:
14785
14786 @itemize
14787 @item The ability to capture the text matched by glob patterns, and return
14788 those matches alongside the file names.
14789 @item A recursive @code{**} globbing syntax, akin for example to the
14790 @code{globstar} option of Bash.
14791 @item The ability to replace the file system functions used, in order to glob
14792 on virtual file systems.
14793 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14794 @end itemize
14795
14796 Glob2 currently based on the glob code from Python 3.3.1.")
14797 (license license:bsd-2)))
14798
14799 (define-public python2-glob2
14800 (package-with-python2 python-glob2))
14801
14802 (define-public python-gipc
14803 (package
14804 (name "python-gipc")
14805 (version "0.6.0")
14806 (source
14807 (origin
14808 (method url-fetch)
14809 (uri (pypi-uri "gipc" version ".zip"))
14810 (sha256
14811 (base32
14812 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14813 (build-system python-build-system)
14814 (native-inputs
14815 `(("unzip" ,unzip)))
14816 (propagated-inputs
14817 `(("python-gevent" ,python-gevent)))
14818 (home-page "http://gehrcke.de/gipc")
14819 (synopsis "Child process management in the context of gevent")
14820 (description "Usage of Python's multiprocessing package in a
14821 gevent-powered application may raise problems. With @code{gipc},
14822 process-based child processes can safely be created anywhere within a
14823 gevent-powered application.")
14824 (license license:expat)))
14825
14826 (define-public python2-gipc
14827 (package-with-python2 python-gipc))
14828
14829 (define-public python-fusepy
14830 (package
14831 (name "python-fusepy")
14832 (version "2.0.4")
14833 (source
14834 (origin
14835 (method url-fetch)
14836 (uri (pypi-uri "fusepy" version))
14837 (sha256
14838 (base32
14839 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14840 (build-system python-build-system)
14841 (arguments
14842 `(#:phases
14843 (modify-phases %standard-phases
14844 (add-before 'build 'set-library-file-name
14845 (lambda* (#:key inputs #:allow-other-keys)
14846 (let ((fuse (assoc-ref inputs "fuse")))
14847 (substitute* "fuse.py"
14848 (("find_library\\('fuse'\\)")
14849 (string-append "'" fuse "/lib/libfuse.so'")))
14850 #t))))))
14851 (propagated-inputs
14852 `(("fuse" ,fuse)))
14853 (home-page "https://github.com/fusepy/fusepy")
14854 (synopsis "Simple ctypes bindings for FUSE")
14855 (description "Python module that provides a simple interface to FUSE and
14856 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14857 (license license:isc)))
14858
14859 (define-public python2-fusepy
14860 (package-with-python2 python-fusepy))
14861
14862 (define-public python2-gdrivefs
14863 (package
14864 (name "python2-gdrivefs")
14865 (version "0.14.9")
14866 (source
14867 (origin
14868 (method url-fetch)
14869 (uri (pypi-uri "gdrivefs" version))
14870 (sha256
14871 (base32
14872 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14873 (build-system python-build-system)
14874 (arguments
14875 `(#:python ,python-2
14876 #:phases
14877 (modify-phases %standard-phases
14878 (add-before 'build 'patch-setup-py
14879 (lambda _
14880 ;; Update requirements from dependency==version
14881 ;; to dependency>=version
14882 (substitute* "gdrivefs/resources/requirements.txt"
14883 (("==") ">="))
14884 #t)))))
14885 (native-inputs
14886 `(("python2-gipc" ,python2-gipc)
14887 ("python2-gevent" ,python2-gevent)
14888 ("python2-greenlet" ,python2-greenlet)
14889 ("python2-httplib2" ,python2-httplib2)
14890 ("python2-uritemplate" ,python2-uritemplate)
14891 ("python2-oauth2client" ,python2-oauth2client)
14892 ("python2-six" ,python2-six)))
14893 (propagated-inputs
14894 `(("python2-dateutil" ,python2-dateutil)
14895 ("python2-fusepy" ,python2-fusepy)
14896 ("python2-google-api-client" ,python2-google-api-client)))
14897 (home-page "https://github.com/dsoprea/GDriveFS")
14898 (synopsis "Mount Google Drive as a local file system")
14899 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14900 under Python 2.7.")
14901 (license license:gpl2)))
14902
14903 (define-public pybind11
14904 (package
14905 (name "pybind11")
14906 (version "2.2.4")
14907 (source (origin
14908 (method git-fetch)
14909 (uri (git-reference
14910 (url "https://github.com/pybind/pybind11.git")
14911 (commit (string-append "v" version))))
14912 (sha256
14913 (base32
14914 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14915 (file-name (git-file-name name version))))
14916 (build-system cmake-build-system)
14917 (native-inputs
14918 `(("python" ,python)
14919 ("python-pytest" ,python-pytest)))
14920 (arguments
14921 `(#:test-target "check"))
14922 (home-page "https://github.com/pybind/pybind11/")
14923 (synopsis "Seamless operability between C++11 and Python")
14924 (description "pybind11 is a lightweight header-only library that exposes
14925 C++ types in Python and vice versa, mainly to create Python bindings of
14926 existing C++ code. Its goals and syntax are similar to the excellent
14927 Boost.Python library by David Abrahams: to minimize boilerplate code in
14928 traditional extension modules by inferring type information using compile-time
14929 introspection.")
14930 (license license:expat)))
14931
14932 (define-public python-fasteners
14933 (package
14934 (name "python-fasteners")
14935 (version "0.14.1")
14936 (source
14937 (origin
14938 (method url-fetch)
14939 (uri (pypi-uri "fasteners" version))
14940 (sha256
14941 (base32
14942 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14943 (build-system python-build-system)
14944 (propagated-inputs
14945 `(("python-monotonic" ,python-monotonic)
14946 ("python-six" ,python-six)
14947 ("python-testtools" ,python-testtools)))
14948 (home-page "https://github.com/harlowja/fasteners")
14949 (synopsis "Python package that provides useful locks")
14950 (description
14951 "This package provides a Python program that provides following locks:
14952
14953 @itemize
14954 @item Locking decorator
14955 @item Reader-writer locks
14956 @item Inter-process locks
14957 @item Generic helpers
14958 @end itemize\n")
14959 (properties `((python2-variant . ,(delay python2-fasteners))))
14960 (license license:asl2.0)))
14961
14962 (define-public python2-fasteners
14963 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14964 (package
14965 (inherit base)
14966 (propagated-inputs
14967 `(("python2-futures" ,python2-futures)
14968 ,@(package-propagated-inputs base))))))
14969
14970 (define-public python-requests-file
14971 (package
14972 (name "python-requests-file")
14973 (version "1.4.3")
14974 (source
14975 (origin
14976 (method url-fetch)
14977 (uri (pypi-uri "requests-file" version))
14978 (sha256
14979 (base32
14980 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14981 (build-system python-build-system)
14982 (propagated-inputs
14983 `(("python-requests" ,python-requests)
14984 ("python-six" ,python-six)))
14985 (home-page
14986 "https://github.com/dashea/requests-file")
14987 (synopsis "File transport adapter for Requests")
14988 (description
14989 "Requests-File is a transport adapter for use with the Requests Python
14990 library to allow local file system access via @code{file://} URLs.")
14991 (license license:asl2.0)))
14992
14993 (define-public python2-requests-file
14994 (package-with-python2 python-requests-file))
14995
14996 (define-public python-tldextract
14997 (package
14998 (name "python-tldextract")
14999 (version "2.2.0")
15000 (source
15001 (origin
15002 (method url-fetch)
15003 (uri (pypi-uri "tldextract" version))
15004 (sha256
15005 (base32
15006 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15007 (build-system python-build-system)
15008 (native-inputs
15009 `(("python-pytest" ,python-pytest)
15010 ("python-responses" ,python-responses)))
15011 (propagated-inputs
15012 `(("python-idna" ,python-idna)
15013 ("python-requests" ,python-requests)
15014 ("python-requests-file" ,python-requests-file)))
15015 (home-page
15016 "https://github.com/john-kurkowski/tldextract")
15017 (synopsis
15018 "Separate the TLD from the registered domain and subdomains of a URL")
15019 (description
15020 "TLDExtract accurately separates the TLD from the registered domain and
15021 subdomains of a URL, using the Public Suffix List. By default, this includes
15022 the public ICANN TLDs and their exceptions. It can optionally support the
15023 Public Suffix List's private domains as well.")
15024 (license license:bsd-3)))
15025
15026 (define-public python2-tldextract
15027 (package-with-python2 python-tldextract))
15028
15029 (define-public python-pynamecheap
15030 (package
15031 (name "python-pynamecheap")
15032 (version "0.0.3")
15033 (source
15034 (origin
15035 (method url-fetch)
15036 (uri (pypi-uri "PyNamecheap" version))
15037 (sha256
15038 (base32
15039 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15040 (build-system python-build-system)
15041 (propagated-inputs
15042 `(("python-requests" ,python-requests)))
15043 (home-page
15044 "https://github.com/Bemmu/PyNamecheap")
15045 (synopsis
15046 "Namecheap API client in Python")
15047 (description
15048 "PyNamecheap is a Namecheap API client in Python.")
15049 (license license:expat)))
15050
15051 (define-public python2-pynamecheap
15052 (package-with-python2 python-pynamecheap))
15053
15054 (define-public python-dns-lexicon
15055 (package
15056 (name "python-dns-lexicon")
15057 (version "2.4.0")
15058 (source
15059 (origin
15060 (method url-fetch)
15061 (uri (pypi-uri "dns-lexicon" version))
15062 (sha256
15063 (base32
15064 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15065 (build-system python-build-system)
15066 (arguments
15067 `(#:tests? #f)) ;requires internet access
15068 (propagated-inputs
15069 `(("python-future" ,python-future)
15070 ("python-pynamecheap" ,python-pynamecheap)
15071 ("python-requests" ,python-requests)
15072 ("python-tldextract" ,python-tldextract)
15073 ("python-urllib3" ,python-urllib3)))
15074 (home-page "https://github.com/AnalogJ/lexicon")
15075 (synopsis
15076 "Manipulate DNS records on various DNS providers")
15077 (description
15078 "Lexicon provides a way to manipulate DNS records on multiple DNS
15079 providers in a standardized way. It has a CLI but it can also be used as a
15080 Python library. It was designed to be used in automation, specifically with
15081 Let's Encrypt.")
15082 (license license:expat)))
15083
15084 (define-public python2-dns-lexicon
15085 (package-with-python2 python-dns-lexicon))
15086
15087 (define-public python-commandlines
15088 (package
15089 (name "python-commandlines")
15090 (version "0.4.1")
15091 (source
15092 (origin
15093 (method url-fetch)
15094 (uri (pypi-uri "commandlines" version))
15095 (sha256
15096 (base32
15097 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15098 (build-system python-build-system)
15099 (home-page "https://github.com/chrissimpkins/commandlines")
15100 (synopsis "Command line argument to object parsing library")
15101 (description
15102 "@code{Commandlines} is a Python library for command line application
15103 development that supports command line argument parsing, command string
15104 validation testing and application logic.")
15105 (license license:expat)))
15106
15107 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15108 ;; python-numba. They have a very unflexible relationship.
15109 (define-public python-numba
15110 (package
15111 (name "python-numba")
15112 (version "0.42.0")
15113 (source
15114 (origin
15115 (method url-fetch)
15116 (uri (pypi-uri "numba" version))
15117 (sha256
15118 (base32
15119 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15120 (build-system python-build-system)
15121 (arguments
15122 `(#:modules ((guix build utils)
15123 (guix build python-build-system)
15124 (ice-9 ftw)
15125 (srfi srfi-1)
15126 (srfi srfi-26))
15127 #:phases
15128 (modify-phases %standard-phases
15129 (add-after 'unpack 'disable-proprietary-features
15130 (lambda _
15131 (setenv "NUMBA_DISABLE_HSA" "1")
15132 (setenv "NUMBA_DISABLE_CUDA" "1")
15133 #t))
15134 (add-after 'unpack 'remove-failing-tests
15135 (lambda _
15136 ;; FIXME: these tests fail for unknown reasons:
15137 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15138 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15139 (substitute* "numba/tests/test_dispatcher.py"
15140 (("def test(_non_writable_pycache)" _ m)
15141 (string-append "def guix_skip" m))
15142 (("def test(_non_creatable_pycache)" _ m)
15143 (string-append "def guix_skip" m))
15144 (("def test(_frozen)" _ m)
15145 (string-append "def guix_skip" m)))
15146
15147 ;; These tests fail because we don't run the tests from the build
15148 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15149 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15150 (substitute* "numba/tests/test_pycc.py"
15151 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15152 (string-append "def guix_skip" m)))
15153 #t))
15154 (replace 'check
15155 (lambda _
15156 (let ((cwd (getcwd)))
15157 (setenv "PYTHONPATH"
15158 (string-append cwd "/build/"
15159 (find (cut string-prefix? "lib" <>)
15160 (scandir (string-append cwd "/build")))
15161 ":"
15162 (getenv "PYTHONPATH")))
15163 ;; Something is wrong with the PYTHONPATH when running the
15164 ;; tests from the build directory, as it complains about not being
15165 ;; able to import certain modules.
15166 (with-directory-excursion "/tmp"
15167 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15168 #t)))))
15169 (propagated-inputs
15170 `(("python-llvmlite" ,python-llvmlite)
15171 ("python-numpy" ,python-numpy)
15172 ("python-singledispatch" ,python-singledispatch)))
15173 ;; Needed for tests.
15174 (inputs
15175 `(("python-jinja2" ,python-jinja2)
15176 ("python-pygments" ,python-pygments)))
15177 (home-page "https://numba.pydata.org")
15178 (synopsis "Compile Python code using LLVM")
15179 (description "Numba gives you the power to speed up your applications with
15180 high performance functions written directly in Python. With a few
15181 annotations, array-oriented and math-heavy Python code can be just-in-time
15182 compiled to native machine instructions, similar in performance to C, C++ and
15183 Fortran, without having to switch languages or Python interpreters.
15184
15185 Numba works by generating optimized machine code using the LLVM compiler
15186 infrastructure at import time, runtime, or statically (using the included pycc
15187 tool).")
15188 (license license:bsd-3)))
15189
15190 (define-public python-anndata
15191 (package
15192 (name "python-anndata")
15193 (version "0.6.18")
15194 (source
15195 (origin
15196 (method url-fetch)
15197 (uri (pypi-uri "anndata" version))
15198 (sha256
15199 (base32
15200 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15201 (build-system python-build-system)
15202 (propagated-inputs
15203 `(("python-h5py" ,python-h5py)
15204 ("python-natsort" ,python-natsort)
15205 ("python-pandas" ,python-pandas)
15206 ("python-scipy" ,python-scipy)))
15207 (home-page "https://github.com/theislab/anndata")
15208 (synopsis "Annotated data for data analysis pipelines")
15209 (description "Anndata is a package for simple (functional) high-level APIs
15210 for data analysis pipelines. In this context, it provides an efficient,
15211 scalable way of keeping track of data together with learned annotations and
15212 reduces the code overhead typically encountered when using a mostly
15213 object-oriented library such as @code{scikit-learn}.")
15214 (license license:bsd-3)))
15215
15216 (define-public python-dill
15217 (package
15218 (name "python-dill")
15219 (version "0.2.9")
15220 (source
15221 (origin
15222 (method url-fetch)
15223 (uri (pypi-uri "dill" version))
15224 (sha256
15225 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15226 (build-system python-build-system)
15227 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15228 (arguments '(#:tests? #f))
15229 (home-page "https://pypi.org/project/dill")
15230 (synopsis "Serialize all of Python")
15231 (description "Dill extends Python's @code{pickle} module for serializing
15232 and de-serializing Python objects to the majority of the built-in Python
15233 types. Dill provides the user the same interface as the @code{pickle} module,
15234 and also includes some additional features. In addition to pickling Python
15235 objects, @code{dill} provides the ability to save the state of an interpreter
15236 session in a single command. Hence, it would be feasible to save a
15237 interpreter session, close the interpreter, ship the pickled file to another
15238 computer, open a new interpreter, unpickle the session and thus continue from
15239 the saved state of the original interpreter session.")
15240 (license license:bsd-3)))
15241
15242 (define-public python-multiprocess
15243 (package
15244 (name "python-multiprocess")
15245 (version "0.70.6.1")
15246 (source
15247 (origin
15248 (method url-fetch)
15249 (uri (pypi-uri "multiprocess" version))
15250 (sha256
15251 (base32
15252 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15253 (build-system python-build-system)
15254 (propagated-inputs
15255 `(("python-dill" ,python-dill)))
15256 (home-page "https://pypi.org/project/multiprocess")
15257 (synopsis "Multiprocessing and multithreading in Python")
15258 (description
15259 "This package is a fork of the multiprocessing Python package, a package
15260 which supports the spawning of processes using the API of the standard
15261 library's @code{threading} module.")
15262 (license license:bsd-3)))
15263
15264 (define-public python-toolz
15265 (package
15266 (name "python-toolz")
15267 (version "0.9.0")
15268 (source
15269 (origin
15270 (method url-fetch)
15271 (uri (pypi-uri "toolz" version))
15272 (sha256
15273 (base32
15274 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15275 (build-system python-build-system)
15276 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15277 ;; unregistered loader type"
15278 (arguments '(#:tests? #f))
15279 (home-page "https://github.com/pytoolz/toolz/")
15280 (synopsis "List processing tools and functional utilities")
15281 (description
15282 "This package provides a set of utility functions for iterators,
15283 functions, and dictionaries.")
15284 (license license:bsd-3)))
15285
15286 (define-public python2-toolz
15287 (package-with-python2 python-toolz))
15288
15289 (define-public python-cytoolz
15290 (package
15291 (name "python-cytoolz")
15292 (version "0.9.0.1")
15293 (source
15294 (origin
15295 (method url-fetch)
15296 (uri (pypi-uri "cytoolz" version))
15297 (sha256
15298 (base32
15299 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15300 (build-system python-build-system)
15301 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15302 ;; 'exceptions'"
15303 (arguments '(#:tests? #f))
15304 (propagated-inputs
15305 `(("python-toolz" ,python-toolz)))
15306 (native-inputs
15307 `(("python-cython" ,python-cython)))
15308 (home-page "https://github.com/pytoolz/cytoolz")
15309 (synopsis "High performance functional utilities")
15310 (description
15311 "The cytoolz package implements the same API as provided by toolz. The
15312 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15313 that is accessible to other projects developed in Cython.")
15314 (license license:bsd-3)))
15315
15316 (define-public python-sortedcontainers
15317 (package
15318 (name "python-sortedcontainers")
15319 (version "2.0.4")
15320 (source
15321 (origin
15322 (method url-fetch)
15323 (uri (pypi-uri "sortedcontainers" version))
15324 (sha256
15325 (base32
15326 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15327 (build-system python-build-system)
15328 (native-inputs
15329 `(("python-tox" ,python-tox)))
15330 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15331 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15332 (description
15333 "This package provides a sorted collections library, written in
15334 pure-Python.")
15335 (license license:asl2.0)))
15336
15337 (define-public python-cloudpickle
15338 (package
15339 (name "python-cloudpickle")
15340 (version "0.6.1")
15341 (source
15342 (origin
15343 (method url-fetch)
15344 (uri (pypi-uri "cloudpickle" version))
15345 (sha256
15346 (base32
15347 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15348 (build-system python-build-system)
15349 ;; FIXME: there are 5 errors in 122 tests:
15350 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15351 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15352 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15353 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15354 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15355 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15356 (arguments '(#:tests? #f))
15357 (native-inputs
15358 `(("python-pytest" ,python-pytest)
15359 ("python-mock" ,python-mock)
15360 ("python-tornado" ,python-tornado)))
15361 (home-page "https://github.com/cloudpipe/cloudpickle")
15362 (synopsis "Extended pickling support for Python objects")
15363 (description
15364 "Cloudpickle makes it possible to serialize Python constructs not
15365 supported by the default pickle module from the Python standard library. It
15366 is especially useful for cluster computing where Python expressions are
15367 shipped over the network to execute on remote hosts, possibly close to the
15368 data.")
15369 (license license:bsd-3)))
15370
15371 (define-public python2-cloudpickle
15372 (package-with-python2 python-cloudpickle))
15373
15374 (define-public python-locket
15375 (package
15376 (name "python-locket")
15377 (version "0.2.0")
15378 (source
15379 (origin
15380 (method url-fetch)
15381 (uri (pypi-uri "locket" version))
15382 (sha256
15383 (base32
15384 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15385 (build-system python-build-system)
15386 (home-page "https://github.com/mwilliamson/locket.py")
15387 (synopsis "File-based locks for Python")
15388 (description
15389 "Locket implements a lock that can be used by multiple processes provided
15390 they use the same path.")
15391 (license license:bsd-2)))
15392
15393 (define-public python2-locket
15394 (package-with-python2 python-locket))
15395
15396 (define-public python-blosc
15397 (package
15398 (name "python-blosc")
15399 (version "1.5.1")
15400 (source
15401 (origin
15402 (method url-fetch)
15403 (uri (pypi-uri "blosc" version))
15404 (sha256
15405 (base32
15406 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15407 (build-system python-build-system)
15408 ;; FIXME: all tests pass, but then this error is printed:
15409 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15410 (arguments '(#:tests? #f))
15411 (propagated-inputs
15412 `(("python-numpy" ,python-numpy)))
15413 (home-page "https://github.com/blosc/python-blosc")
15414 (synopsis "Python wrapper for the Blosc data compressor library")
15415 (description "Blosc is a high performance compressor optimized for binary
15416 data. It has been designed to transmit data to the processor cache faster
15417 than the traditional, non-compressed, direct memory fetch approach via a
15418 @code{memcpy()} system call.
15419
15420 Blosc works well for compressing numerical arrays that contains data with
15421 relatively low entropy, like sparse data, time series, grids with
15422 regular-spaced values, etc.
15423
15424 This Python package wraps the Blosc library.")
15425 (license license:bsd-3)))
15426
15427 (define-public python2-blosc
15428 (package-with-python2 python-blosc))
15429
15430 (define-public python-partd
15431 (package
15432 (name "python-partd")
15433 (version "0.3.9")
15434 (source
15435 (origin
15436 (method url-fetch)
15437 (uri (pypi-uri "partd" version))
15438 (sha256
15439 (base32
15440 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15441 (build-system python-build-system)
15442 (propagated-inputs
15443 `(("python-blosc" ,python-blosc)
15444 ("python-locket" ,python-locket)
15445 ("python-numpy" ,python-numpy)
15446 ("python-pandas" ,python-pandas)
15447 ("python-pyzmq" ,python-pyzmq)
15448 ("python-toolz" ,python-toolz)))
15449 (home-page "https://github.com/dask/partd/")
15450 (synopsis "Appendable key-value storage")
15451 (description "Partd stores key-value pairs. Values are raw bytes. We
15452 append on old values. Partd excels at shuffling operations.")
15453 (license license:bsd-3)))
15454
15455 (define-public python2-partd
15456 (package-with-python2 python-partd))
15457
15458 (define-public python-dask
15459 (package
15460 (name "python-dask")
15461 (version "1.2.2")
15462 (source
15463 (origin
15464 (method url-fetch)
15465 (uri (pypi-uri "dask" version))
15466 (sha256
15467 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15468 (build-system python-build-system)
15469 ;; A single test out of 5000+ fails. This test is marked as xfail when
15470 ;; pytest-xdist is used.
15471 (arguments
15472 `(#:phases
15473 (modify-phases %standard-phases
15474 (add-after 'unpack 'disable-broken-test
15475 (lambda _
15476 (substitute* "dask/tests/test_threaded.py"
15477 (("def test_interrupt\\(\\)" m)
15478 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15479 m)))
15480 (when (which "python2")
15481 ;; This test fails with recent Pandas:
15482 ;; <https://github.com/dask/dask/issues/3794>.
15483 (substitute* "dask/dataframe/tests/test_dataframe.py"
15484 (("def test_info\\(\\)" m)
15485 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15486 m))))
15487 #t))
15488 (replace 'check
15489 (lambda _ (invoke "pytest" "-vv"))))))
15490 (propagated-inputs
15491 `(("python-cloudpickle" ,python-cloudpickle)
15492 ("python-numpy" ,python-numpy)
15493 ("python-pandas" ,python-pandas)
15494 ("python-partd" ,python-partd)
15495 ("python-toolz" ,python-toolz)
15496 ("python-pyyaml" ,python-pyyaml)))
15497 (native-inputs
15498 `(("python-pytest" ,python-pytest)
15499 ("python-pytest-runner" ,python-pytest-runner)))
15500 (home-page "https://github.com/dask/dask/")
15501 (synopsis "Parallel computing with task scheduling")
15502 (description
15503 "Dask is a flexible parallel computing library for analytics. It
15504 consists of two components: dynamic task scheduling optimized for computation,
15505 and large data collections like parallel arrays, dataframes, and lists that
15506 extend common interfaces like NumPy, Pandas, or Python iterators to
15507 larger-than-memory or distributed environments. These parallel collections
15508 run on top of the dynamic task schedulers. ")
15509 (license license:bsd-3)))
15510
15511 (define-public python2-dask
15512 (package-with-python2 python-dask))
15513
15514 (define-public python-ilinkedlist
15515 (package
15516 (name "python-ilinkedlist")
15517 (version "0.4.0")
15518 (source
15519 (origin
15520 (method url-fetch)
15521 (uri (pypi-uri "ilinkedlist" version))
15522 (sha256
15523 (base32
15524 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15525 (build-system python-build-system)
15526 (native-inputs `(("python-pytest" ,python-pytest)))
15527 (inputs `(("python" ,python)))
15528 (home-page "https://github.com/luther9/ilinkedlist-py")
15529 (synopsis "Immutable linked list library")
15530 (description
15531 "This is a implementation of immutable linked lists for Python. It
15532 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15533 Since a linked list is treated as immutable, it is hashable, and its length
15534 can be retrieved in constant time. Some of the terminology is inspired by
15535 LISP. It is possible to create an improper list by creating a @code{Pair}
15536 with a non-list @code{cdr}.")
15537 (license license:gpl3+)))
15538
15539 (define-public python-readlike
15540 (package
15541 (name "python-readlike")
15542 (version "0.1.3")
15543 (source
15544 (origin
15545 (method url-fetch)
15546 (uri (pypi-uri "readlike" version))
15547 (sha256
15548 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15549 (build-system python-build-system)
15550 (home-page "https://github.com/jangler/readlike")
15551 (synopsis "GNU Readline-like line editing module")
15552 (description
15553 "This Python module provides line editing functions similar to the default
15554 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15555 @code{readline} package, this one allows access to those capabilties in settings
15556 outside of a standard command-line interface. It is especially well-suited to
15557 interfacing with Urwid, due to a shared syntax for describing key inputs.
15558
15559 Currently, all stateless Readline commands are implemented. Yanking and history
15560 are not supported.")
15561 (license license:expat)))
15562
15563 (define-public python2-readlike
15564 (package-with-python2 python-readlike))
15565
15566 (define-public python-reparser
15567 (package
15568 (name "python-reparser")
15569 (version "1.4.3")
15570 (source
15571 (origin
15572 (method url-fetch)
15573 (uri (pypi-uri "ReParser" version))
15574 (sha256
15575 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15576 (build-system python-build-system)
15577 (home-page "https://github.com/xmikos/reparser")
15578 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15579 (description
15580 "This Python library provides a simple lexer/parser for inline markup based
15581 on regular expressions.")
15582 (license license:expat)))
15583
15584 (define-public python2-reparser
15585 (let ((reparser (package-with-python2
15586 (strip-python2-variant python-reparser))))
15587 (package (inherit reparser)
15588 (propagated-inputs
15589 `(("python2-enum34" ,python2-enum34)
15590 ,@(package-propagated-inputs reparser))))))
15591
15592 (define-public python-precis-i18n
15593 (package
15594 (name "python-precis-i18n")
15595 (version "1.0.0")
15596 (source
15597 (origin
15598 (method url-fetch)
15599 (uri (pypi-uri "precis_i18n" version))
15600 (sha256
15601 (base32
15602 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15603 (build-system python-build-system)
15604 (home-page "https://github.com/byllyfish/precis_i18n")
15605 (synopsis "Implementation of the PRECIS framework")
15606 (description
15607 "This module implements the PRECIS Framework as described in RFC 8264,
15608 RFC 8265 and RFC 8266.")
15609 (license license:expat)))
15610
15611 (define-public python-absl-py
15612 (package
15613 (name "python-absl-py")
15614 (version "0.6.1")
15615 (source
15616 (origin
15617 (method url-fetch)
15618 (uri (pypi-uri "absl-py" version))
15619 (sha256
15620 (base32
15621 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15622 (build-system python-build-system)
15623 (propagated-inputs
15624 `(("python-six" ,python-six)))
15625 (home-page "https://github.com/abseil/abseil-py")
15626 (synopsis "Abseil Python common libraries")
15627 (description
15628 "This package provides the Abseil Python Common Libraries, a collection
15629 of Python libraries for building Python applications.")
15630 (license license:asl2.0)))
15631
15632 (define-public python-astor
15633 (package
15634 (name "python-astor")
15635 (version "0.7.1")
15636 (source
15637 (origin
15638 (method url-fetch)
15639 (uri (pypi-uri "astor" version))
15640 (sha256
15641 (base32
15642 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15643 (build-system python-build-system)
15644 ;; FIXME: There are two errors and two test failures.
15645 (arguments `(#:tests? #f))
15646 (home-page "https://github.com/berkerpeksag/astor")
15647 (synopsis "Read and write Python ASTs")
15648 (description "Astor is designed to allow easy manipulation of Python
15649 source via the Abstract Syntax Tree.")
15650 (license license:bsd-3)))
15651
15652 (define-public python2-astor
15653 (package-with-python2 python-astor))
15654
15655 (define-public python-grpcio
15656 (package
15657 (name "python-grpcio")
15658 (version "1.17.1")
15659 (source
15660 (origin
15661 (method url-fetch)
15662 (uri (pypi-uri "grpcio" version))
15663 (sha256
15664 (base32
15665 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15666 (build-system python-build-system)
15667 (propagated-inputs
15668 `(("python-six" ,python-six)))
15669 (home-page "https://grpc.io")
15670 (synopsis "HTTP/2-based RPC framework")
15671 (description "This package provides a Python library for communicating
15672 with the HTTP/2-based RPC framework gRPC.")
15673 (license license:asl2.0)))
15674
15675 (define-public python-astunparse
15676 (package
15677 (name "python-astunparse")
15678 (version "1.6.2")
15679 (source
15680 (origin
15681 (method url-fetch)
15682 (uri (pypi-uri "astunparse" version))
15683 (sha256
15684 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15685 (build-system python-build-system)
15686 (arguments '(#:tests? #f)) ; there are none
15687 (propagated-inputs
15688 `(("python-six" ,python-six)
15689 ("python-wheel" ,python-wheel)))
15690 (home-page "https://github.com/simonpercivall/astunparse")
15691 (synopsis "AST unparser for Python")
15692 (description "This package provides an AST unparser for Python. It is a
15693 factored out version of @code{unparse} found in the Python source
15694 distribution.")
15695 (license license:bsd-3)))
15696
15697 (define-public python-gast
15698 (package
15699 (name "python-gast")
15700 (version "0.2.2")
15701 (source
15702 (origin
15703 (method url-fetch)
15704 (uri (pypi-uri "gast" version))
15705 (sha256
15706 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15707 (build-system python-build-system)
15708 (propagated-inputs
15709 `(("python-astunparse" ,python-astunparse)))
15710 (home-page "https://pypi.org/project/gast/")
15711 (synopsis "Generic Python AST that abstracts the underlying Python version")
15712 (description
15713 "GAST provides a compatibility layer between the AST of various Python
15714 versions, as produced by @code{ast.parse} from the standard @code{ast}
15715 module.")
15716 (license license:bsd-3)))
15717
15718 (define-public python-wikidata
15719 (package
15720 (name "python-wikidata")
15721 (version "0.6.1")
15722 (source
15723 (origin
15724 (method url-fetch)
15725 (uri (pypi-uri "Wikidata" version))
15726 (sha256
15727 (base32
15728 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15729 (build-system python-build-system)
15730 (propagated-inputs
15731 `(("python-babel" ,python-babel)))
15732 (home-page "https://github.com/dahlia/wikidata")
15733 (synopsis "Wikidata client library")
15734 (description
15735 "This package provides a Python interface to
15736 @url{https://www.wikidata.org/, Wikidata}.")
15737 (properties '((upstream-name . "Wikidata")))
15738 (license license:gpl3+)))
15739
15740 (define-public python-doctest-ignore-unicode
15741 (package
15742 (name "python-doctest-ignore-unicode")
15743 (version "0.1.2")
15744 (source
15745 (origin
15746 (method url-fetch)
15747 (uri (pypi-uri "doctest-ignore-unicode" version))
15748 (sha256
15749 (base32
15750 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15751 (build-system python-build-system)
15752 (native-inputs
15753 `(("python-nose" ,python-nose)))
15754 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15755 (synopsis "Ignore Unicode literal prefixes in doctests")
15756 (description
15757 "This package adds support for a flag to ignore Unicode literal prefixes
15758 in doctests.")
15759 (license license:asl2.0)))
15760
15761 (define-public python-attr
15762 (package
15763 (name "python-attr")
15764 (version "0.3.1")
15765 (source
15766 (origin
15767 (method url-fetch)
15768 (uri (pypi-uri "attr" version))
15769 (sha256
15770 (base32
15771 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15772 (build-system python-build-system)
15773 (home-page "https://github.com/denis-ryzhkov/attr")
15774 (synopsis "Decorator for attributes of target function or class")
15775 (description "Simple decorator to set attributes of target function or
15776 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15777 (license license:expat)))
15778
15779 (define-public python-construct
15780 (package
15781 (name "python-construct")
15782 (version "2.9.45")
15783 (source
15784 (origin
15785 (method url-fetch)
15786 (uri (pypi-uri "construct" version))
15787 (sha256
15788 (base32
15789 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15790 (build-system python-build-system)
15791 (arguments
15792 `(#:tests? #f)) ; No tests exist.
15793 (propagated-inputs
15794 `(("python-extras" ,python-extras)
15795 ("python-arrow" ,python-arrow)
15796 ("python-numpy" ,python-numpy)
15797 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15798 (home-page "http://construct.readthedocs.io")
15799 (synopsis "Declarative and symmetrical parser and builder for binary data")
15800 (description
15801 "This package provides both simple, atomic constructs (such as
15802 integers of various sizes), as well as composite ones which allow you
15803 form hierarchical and sequential structures of increasing complexity.
15804 It features bit and byte granularity, easy debugging and testing, an
15805 easy-to-extend subclass system, and lots of primitive constructs to
15806 make your work easier.")
15807 (license license:expat)))
15808
15809 (define-public python-humanize
15810 (package
15811 (name "python-humanize")
15812 (version "0.5.1")
15813 (source
15814 (origin
15815 (method url-fetch)
15816 (uri (pypi-uri "humanize" version))
15817 (sha256
15818 (base32
15819 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15820 (arguments
15821 '(#:tests? #f)) ; tests not in pypi archive
15822 (build-system python-build-system)
15823 (home-page "https://github.com/jmoiron/humanize")
15824 (synopsis "Print numerical information in a human-readable form")
15825 (description "This package provides a Python module that displays numbers
15826 and dates in \"human readable\" forms. For example, it would display
15827 \"12345591313\" as \"12.3 billion\".")
15828 (license license:expat)))
15829
15830 (define-public python-txaio
15831 (package
15832 (name "python-txaio")
15833 (version "18.8.1")
15834 (source
15835 (origin
15836 (method url-fetch)
15837 (uri (pypi-uri "txaio" version))
15838 (sha256
15839 (base32
15840 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15841 (build-system python-build-system)
15842 (propagated-inputs
15843 `(("python-twisted" ,python-twisted)
15844 ("python-six" ,python-six)))
15845 (home-page "https://github.com/crossbario/txaio")
15846 (synopsis "Compatibility layer between Python asyncio and Twisted")
15847 (description "Txaio provides a compatibility layer between the Python
15848 @code{asyncio} module and @code{Twisted}.")
15849 (license license:expat)))
15850
15851 (define-public python-toolshed
15852 (package
15853 (name "python-toolshed")
15854 (version "0.4.6")
15855 (source
15856 (origin
15857 (method url-fetch)
15858 (uri (pypi-uri "toolshed" version))
15859 (sha256
15860 (base32
15861 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15862 (build-system python-build-system)
15863 (native-inputs
15864 `(("python-nose" ,python-nose)))
15865 (home-page "https://github.com/brentp/toolshed/")
15866 (synopsis "Collection of modules and functions for working with data")
15867 (description "This is a collection of well-tested, simple modules and
15868 functions that aim to reduce boilerplate when working with data.")
15869 (license license:bsd-2)))
15870
15871 (define-public python-annoy
15872 (package
15873 (name "python-annoy")
15874 (version "1.15.1")
15875 (source
15876 (origin
15877 (method url-fetch)
15878 (uri (pypi-uri "annoy" version))
15879 (sha256
15880 (base32
15881 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15882 (build-system python-build-system)
15883 (native-inputs
15884 `(("python-nose" ,python-nose)))
15885 (home-page "https://github.com/spotify/annoy/")
15886 (synopsis "Approximate nearest neighbors library")
15887 (description
15888 "Annoy is a C++ library with Python bindings to search for points in
15889 space that are close to a given query point. It also creates large read-only
15890 file-based data structures that are @code{mmap}ped into memory so that many
15891 processes may share the same data.")
15892 (license license:asl2.0)))
15893
15894 (define-public python-pylzma
15895 (package
15896 (name "python-pylzma")
15897 (version "0.5.0")
15898 (source
15899 (origin
15900 (method url-fetch)
15901 (uri (pypi-uri "pylzma" version))
15902 (sha256
15903 (base32
15904 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15905 (build-system python-build-system)
15906 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15907 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15908 (description "This package provides Python bindings for the LZMA library
15909 by Igor Pavlov.")
15910 (license license:lgpl2.1+)))
15911
15912 (define-public python2-pylzma
15913 (package-with-python2 python-pylzma))
15914
15915 (define-public python2-zeroconf
15916 (package
15917 (name "python2-zeroconf")
15918
15919 ;; This is the last version that supports Python 2.x.
15920 (version "0.19.1")
15921 (source
15922 (origin
15923 (method url-fetch)
15924 (uri (pypi-uri "zeroconf" version))
15925 (sha256
15926 (base32
15927 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15928 (build-system python-build-system)
15929 (arguments
15930 `(#:python ,python-2
15931 #:phases
15932 (modify-phases %standard-phases
15933 (add-after 'unpack 'patch-requires
15934 (lambda* (#:key inputs #:allow-other-keys)
15935 (substitute* "setup.py"
15936 (("enum-compat")
15937 "enum34"))
15938 #t)))))
15939 (native-inputs
15940 `(("python2-six" ,python2-six)
15941 ("python2-enum32" ,python2-enum34)
15942 ("python2-netifaces" ,python2-netifaces)
15943 ("python2-typing" ,python2-typing)))
15944 (home-page "https://github.com/jstasiak/python-zeroconf")
15945 (synopsis "Pure Python mDNS service discovery")
15946 (description
15947 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15948 compatible).")
15949 (license license:lgpl2.1+)))
15950
15951 (define-public python-bsddb3
15952 (package
15953 (name "python-bsddb3")
15954 (version "6.2.6")
15955 (source
15956 (origin
15957 (method url-fetch)
15958 (uri (pypi-uri "bsddb3" version))
15959 (sha256
15960 (base32
15961 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15962 (build-system python-build-system)
15963 (inputs
15964 `(("bdb" ,bdb)))
15965 (arguments
15966 '(#:phases
15967 (modify-phases %standard-phases
15968 (add-after 'unpack 'configure-locations
15969 (lambda* (#:key inputs #:allow-other-keys)
15970 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15971 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15972 #t))
15973 (replace 'check
15974 (lambda _
15975 (invoke "python3" "test3.py" "-v"))))))
15976 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15977 (synopsis "Python bindings for Oracle Berkeley DB")
15978 (description
15979 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15980 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15981 Transaction objects, and each of these is exposed as a Python type in the
15982 bsddb3.db module. The database objects can use various access methods: btree,
15983 hash, recno, and queue. Complete support of Berkeley DB distributed
15984 transactions. Complete support for Berkeley DB Replication Manager.
15985 Complete support for Berkeley DB Base Replication. Support for RPC.")
15986 (license license:bsd-3)))
15987
15988 (define-public python-dbfread
15989 (package
15990 (name "python-dbfread")
15991 (version "2.0.7")
15992 (source (origin
15993 (method url-fetch)
15994 (uri (pypi-uri "dbfread" version))
15995 (sha256
15996 (base32
15997 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
15998 (build-system python-build-system)
15999 (native-inputs
16000 `(("python-pytest" ,python-pytest)))
16001 (home-page "https://dbfread.readthedocs.io")
16002 (synopsis "Read DBF Files with Python")
16003 (description
16004 "This library reads DBF files and returns the data as native Python data
16005 types for further processing. It is primarily intended for batch jobs and
16006 one-off scripts.")
16007 (license license:expat)))
16008
16009 (define-public python-cached-property
16010 (package
16011 (name "python-cached-property")
16012 (version "1.5.1")
16013 (source
16014 (origin
16015 (method url-fetch)
16016 (uri (pypi-uri "cached-property" version))
16017 (sha256
16018 (base32
16019 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16020 (build-system python-build-system)
16021 (arguments
16022 `(#:phases
16023 (modify-phases %standard-phases
16024 ;; https://github.com/pydanny/cached-property/issues/131
16025 ;; recent versions of freezegun break one test
16026 (add-after 'unpack 'disable-broken-test
16027 (lambda _
16028 (substitute* "tests/test_cached_property.py"
16029 (("def test_threads_ttl_expiry\\(self\\)" m)
16030 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16031 " " m)))
16032 #t)))))
16033 (native-inputs
16034 `(("python-freezegun" ,python-freezegun)))
16035 (home-page
16036 "https://github.com/pydanny/cached-property")
16037 (synopsis
16038 "Decorator for caching properties in classes")
16039 (description
16040 "This package provides a decorator which makes caching
16041 time-or-computationally-expensive properties quick and easy and works in Python
16042 2 or 3.")
16043 (license license:bsd-3)))